Posts by Gustavo • 470 points
17 posts
- 
		0 votes0 answers83 viewsQ: How to validate an identifier name in Javascript?This question is possibly duplicated, but I seek a different approach. The situation is as follows: I made a small program to create a JSON file, creating names and assigning values. The JSON… 
- 
		1 votes0 answers86 viewsQ: Javascript DOM Parser incompatible with Document?My idea with the DOM Parser was to load HTML layouts, place them in a single element, and then use them when necessary. But in tests, the object generated by DOMParser not added to Document. See the… 
- 
		0 votes1 answer154 viewsQ: How to change http Accept language in Firefox Developer Edition?I am developing a website that should work for Portuguese and English - preferably automatically. By php I already got the HTTP-ACCEPT-LANGUAGE, and now I need to start testing the code that will… 
- 
		2 votes2 answers310 viewsQ: Javascript prototype: possible to change value of reference object?EDIT: It’s usually at the end, but the question was poorly worded and I decided to switch to this example that is much better. Follow the example of a function that does nothing as an array method:… 
- 
		1 votes2 answers643 viewsA: Smooth serration in the gradientFirst, I suggest changing the code to... p { background: linear-gradient(161.2deg, green 50%, white 50%, white); } ...without -image. But I imagine that’s not the cause. Browsers traditionally save… 
- 
		0 votes0 answers171 viewsQ: Problem generating JPEG PDF image with Imagick via GhostscriptThe problem is this: it no longer generates any image... My script has stopped working, apparently after an Imagemagick update. When I searched for answers I saw many complained that the script… 
- 
		2 votes2 answers1465 viewsQ: How do I locate the right origin of an event in a complex object via Javascript?If I create a button... <button id="btn" value="fui eu">Clique Aqui</button> the event... document.getElementById("btn").onclick = function(e){ console.log("Quem clicou "+e.target.value)… 
- 
		1 votes1 answer38 viewsQ: How to detect if the browser accepts xmlhttprequest events?It is the following, gurizada, to make my object compatible with old browsers (if not swear me) I created a new problem. It is difficult to deviate the path according to the browser version because… 
- 
		0 votes0 answers60 viewsQ: file_exists, just not: test error with false TRUEThis is not exactly a direct question, but it might be interesting since there is another discussion here about file_exists vs is_file. I, like many programmers, define variables to find myself in… 
- 
		1 votes0 answers45 viewsQ: php imagemagic cannot use Ghostscript to render PDFIn my hosting, Imagemagic renders PDF to JPEG normally. But I need to make it work on my MAMP test site - making websites without a test site sucks! Imagemagic is apparently OK on my MAMP running on… 
- 
		8 votes1 answer577 viewsQ: How to count touches (letters, spaces and symbols) in PHP?I made a program that extracts my annotations from my code and creates a file txt to be a little manual. I made a format to make it cooler: +-----------+ | | | ESPECIAIS | | | +-----------+ It takes… 
- 
		5 votes1 answer2701 viewsQ: Javascript: how to count the characters of an html text?The problem: I have formatted html text and I need to count how many characters (ringtones for journalists) I have. I will use Javascript. Some solutions came to mind, but as this will be done… 
- 
		7 votes4 answers714 viewsQ: Trying to condense conditional with three possibilitiesThe problem is to present a result flexing to the plural if necessary, or "no": Let ni>=0 (number of items): switch(true){ case $ni==0: $html = ' (nenhum)'; break; case $ni==1: $html = ' (1… 
- 
		0 votes1 answer164 viewsA: Date Condition and ValidationI think you solve it this way, with ifs cascading: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />… 
- 
		1 votes3 answers318 viewsA: Converting a datetime to text does not show the resultYou have to do the reverse way. To store, you created a Datetime object, formatted in String in sent to the base. The base will return a String if the type is datetime (I think it is) and you will… 
- 
		2 votes2 answers115 viewsA: simple dom php 404 errorpdonatilio solved the problem by not using the class when there was no file, but this solves part of the problem. The central issue is that the class generates a fatal error and will no longer run… 
- 
		1 votes5 answers141242 viewsA: How to get the current date and time without using the computer clock?You can set the date and time using functions such as date_date_set. However, you will need a source for this information. If you have any servers out there, like the one that hosts your personal…