Invalid length for a Base-64 char array

The length of a base64 encoded string is always a multiple of 4. If it is not a multiple of 4, then = characters are appended until it is. A query string of the form ?name=value has problems when the value contains = charaters (some of them will be dropped, I don’t recall the exact behavior). You may be able to get away … Read more

How do I embed PHP code in JavaScript?

If your whole JavaScript code gets processed by PHP, then you can do it just like that. If you have individual .js files, and you don’t want PHP to process them (for example, for caching reasons), then you can just pass variables around in JavaScript. For example, in your index.php (or wherever you specify your layout), you’d do something … Read more

Difference between this and self in JavaScript

Unless set elsewhere, the value of self is window because JavaScript lets you access any property x of window as simply x, instead of window.x. Therefore, self is really window.self, which is different to this. If you’re using a function that is executed in the global scope and is not in strict mode, this defaults to window, and therefore If you’re using a function in a different context, this will refer to that context, but self will still … Read more

mailto using javascript

No need for jQuery. And it isn’t necessary to open a new window. Protocols which doesn’t return HTTP data to the browser (mailto:, irc://, magnet:, ftp:// (<- it depends how it is implemented, normally the browser has an FTP client built in)) can be queried in the same window without losing the current content. In your case: Or just … Read more

where does stdio.o live in linux machine?

I’d suggest that you run gcc -v your_file.c. That will let you see exactly what commands your linker is using. You probably don’t have an stdio.o file to link against. Instead this is included in the C runtime library and the exact file will depend on your system configuration.

mailto using javascript

No need for jQuery. And it isn’t necessary to open a new window. Protocols which doesn’t return HTTP data to the browser (mailto:, irc://, magnet:, ftp:// (<- it depends how it is implemented, normally the browser has an FTP client built in)) can be queried in the same window without losing the current content. In your case: Or just … Read more

How to convert .crt cetificate file to .pfx

I have solved this issue by converting this .crt file into a .pfx file using following method. To convert .crt to .pfx, we need CSA certificate (Private Key) provided by hosting provider. Below are the steps to convert this: Download and install OpenSSL software from below link based on your system type https://slproweb.com/products/Win32OpenSSL.html Run the following command on command prompt:openssl pkcs12 -export -out … Read more