Centering only one (section)header

I want to center only one header and so far I have only found solutions that allow me to center ALL the section headers (e.g. usepackage [centering] {titlesec})

I’ve come up with a work around that works without using any packages:

{centering paragraph {Paragraph1} mbox {} \ par}

can this count any problems later on? So far it’s working fine.

Thanks

All topic

Web-Application with CORS Origin: * using authorization header

As stated here, https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS at “Credentialed requests and wildcards”. Quote:

When responding to a credentialed request, the server must specify an
origin in the value of the Access-Control-Allow-Origin header, instead
of specifying the “*” wildcard.

Because the request headers in the above example include a Cookie
header, the request would fail if the value of the
Access-Control-Allow-Origin header were ““. But it does not fail:
Because the value of the Access-Control-Allow-Origin header is
“http://foo.example” (an actual origin) rather than the “
” wildcard,
the credential-cognizant content is returned to the invoking web
content.

So if I read this correctly, if the Access-Control-Allow-Origin is set to *. CORS requests can’t be accomplished with credentials, so – for example with a Authorization: Bearer 123 header.

This only applies if the request comes from an different origin, than the web-application (SOP). Otherwise it would be impossible for a web-application to use Access-Control-Allow-Origin: * and Authorization: Token 123.

Did I understand this correctly?

All topic

Content-length header is set to 1

In my project I return new EmptyResult() from method of controller, but somehow Content-length header is equal to 1. Because of that my application is frozen(no jQuery promise events are fired, loader is shown and nothing happens).

So my question is “Why Content-length header is not equal to 0, when method returned new EmptyResult()? Maybe IIS somehow modifies response of my application?”

All topic

LiteSpeed ignore PHP header 404 status

After moving my website to a webhost which uses LiteSpeed it seems PHP header is ignored.

I have tried these 3 variations:

  • $s = "HTTP/1.1 404 Not Found";
  • $s = "HTTP/1.0 404 Not Found";
  • $s = "Status: 404 Not Found";

followed by

header($s)

But on LiteSpeed these all seem to be ignored.

  1. Is there any option in LiteSpeed I can turn off to get Apache compatible behavior? I have access to cPanel and .htaccess
  2. Any other possible explanation and/or solution?

All topic

magento PayPal gateway has rejected request. Security header is not valid (#10002: Security error)

PayPal gateway has rejected request. Security header is not valid (#10002: Security error).
how to resolve it

All topic

How to do an accessible and SEO-friendly image header?

given these two classes (who I copied from bootstrap 4.1.3):

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-hide {
  font: 0/0 a;
  color: transparent;
  text-shadow: none;
  background-color: transparent;
  border: 0;
}

which of the following code is better for an image logo or headline regarding accessibility, (browser) compatibility and SEO? Are there any differences?

Foo

or

Foo

or

Foo

Foo

All topic

How to extract column name (header) from a CSV file which contains the max value in a row?

I am trying to extract the column name with the maximum value in each row using bash script i.e., the column header value or the value from the same column in the first row. I am using the following to extract the max value from each row in a CSV file but can’t find out how to print its column name along with the max value:

awk -F ',' '{max=$'$col1';for (i=1;i<=NF;i++) {if ($i > max){max=$i}};print " max: " max}' "$INPUT_PATH/tmp.csv" >>$INPUT_PATH/max1.csv

Example:

Sample CSV Data:

col1,col2,col3,col4
1,5,2,6
4,0,1,2
1,2,0,0
0,0,7,0

Desired Output:

col4 6 2
col1 4 1
col2 2 2
col3 7 3

Is there a way to do this in the above command or is there a better way to extract the desired information from the CSV file?

All topic

How to add a background image to header content?

It’s been last 42 hours i am trying to get a background image to header content on luma! [magento 2]
but nothing getting accurately!!
how do i add a background image to header content on magento luma!!? and make it sticky or fixed on top!!!
can anybody give me just proper guide through this problem i’m stuck with?
enter image description here

All topic

CORS error even when header is already present, why is it so? I have used flask for backend and JS for frontend

In console it is showing “No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access. The response had HTTP status code 500.” but in the networks tab it shows Access-Control-Allow-Origin: * under headers.Here is the image showing the error

All topic

Header Location para Java Web?

Estou testando uma aplicação e apos deletar um item do banco gostaria de ser redirecionado automaticamente para a home da página.

No PHP existe o header("Location:home.html") para fazer um redirecionamento automático. Gostaria de saber se existe algo similar a isso no Java.

All topic