Posts by João Paraná • 3,277 points
69 posts
-
13
votes2
answers2267
viewsQ: What is the best way to run a java application as a Service on Windows (32 or 64 bit)?
What you need to do to run a Java application (no visual interface) as a Windows service. The program basically uses the Filesystem API and the network API (java.net, java.io and java.nio.) If it is…
-
5
votes8
answers16873
viewsA: How to invert a string in Javascript?
My solution uses https://raw2.github.com/bestiejs/punycode.js/master/punycode.js and was based in this article excellent (in English) do Mathias Bynens The solution works for any UTF-16 string…
-
4
votes2
answers176
viewsA: What is the forecast to support importing text/html content into modern browsers using the link tag?
I just discovered that there is Polyfill for the following Browsers. Android Chrome, Chrome, Canary, Firefox, IE 10+, Safari 6+ and Mobile Safari. Works That way: function supportsImports() { return…
-
2
votes2
answers1556
viewsA: How to add a file extension to the list of extensions supported by Adobe Brackets?
It’s not exactly what I expected but I found that I can create a simple extension for Brackets as follows: main file.js define(function (require, exports, module) { var LanguageManager =…
-
8
votes2
answers176
viewsQ: What is the forecast to support importing text/html content into modern browsers using the link tag?
Recently I came across the current TAG documentation <link> on the website W3.org - http://www.w3.org/TR/html-imports where you specify that you can import content with mime-type text/html, ie…
-
0
votes2
answers1085
viewsA: Save image after upload
Caro @vanilson-Ourenco, the solution shown below is not exactly what you want because it runs on Client (Javascript) but maybe it solves your problem. HTML <img id="myImage"…
-
20
votes7
answers21276
viewsA: Best kind of data to work with money?
Never use floating point types such as float or double. The representation of these values follows the pattern IEEE_754 and were designed exclusively for scientific applications. Financial…
-
6
votes1
answer648
viewsA: How to convert screen coordinates to Cartesian coordinates?
This is a coordinate system conversion problem and considering that its programming language originates from (0, 0) the upper left corner of the screen we have (in Javascript - in Python is…
-
0
votes3
answers589
viewsA: Is there any way to run batch files during the build of a Maven project?
The Exec Maven Plugin provides two Goals to run system programs and Java programs exec:exec que executa programa Java ou um programa arbitrário em um processo separado exec:java que executa programa…
-
3
votes2
answers609
viewsA: Retrieve elements by class in IE8 with pure JS
Use the following in IE 8: document.querySelectorAll('.destino'); According to the documentation in IE8 works only for simple selectors such as this one above. If you use the 'input.destination'…
-
3
votes2
answers817
viewsA: How to create an immutable object in Javascript?
The class Object in Ecmascript 5 allows defining a READ-ONLY property in an arbitrary object via the method defineProperty and with this we can create immutable objects in Javascript, but this only…
-
0
votes2
answers2143
viewsA: Take measurements of an element and play in variables? How to do?
Using the framework YUI 3 the solution is this: var largura, altura; YUI().use('node', function (Y) { largura = Y.one('div#meu-id').getComputedStyle('width'); altura =…
-
3
votes2
answers1395
viewsA: Problem using 'Google Fonts'
the Skyfonts allows you to synchronize Googlefonts fonts with your Desktop. On MAC OS X Skyfonts downloads the fonts to the ~/Library/Application Support/skyfonts-google folder and you can copy to…
-
6
votes2
answers1556
viewsQ: How to add a file extension to the list of extensions supported by Adobe Brackets?
I’m using the files with html extension.echo in my WEB project and I am trying to edit in Adobe Brackets, but I cannot specify that it should treat these files as HTML sources. I would like Brackets…
-
1
votes8
answers2292
viewsA: Why create an object using the superclass?
In Software Design we must always prevent abstractions to the detriment of concrete classes to decrease Coupling and dependency among the various collaborators of the system. That is, we should seek…
-
4
votes6
answers3343
viewsA: Methods to test websites in different browsers?
To test on mobile devices the best solution I know is the service EDGE adobe Try EDGE
-
22
votes6
answers17915
viewsA: How to make a phonetic algorithm for Brazilian Portuguese?
The Metaphone already mentioned above by @Uiz-vieira is able to generate strings by phonetic similarity from strings. C fonts can be seen at this link. See below text extracted from the project’s…
-
0
votes4
answers2018
viewsA: How to use a class-specific thread with multiple threads?
If you want to independently control each Thread you must save reference to each object created from your Runnable and use the standard Thread Lifecycle methods to control it. View this PDF…
-
9
votes8
answers5453
viewsA: Why in some if’s situations are considered bad?
Excess IF or CASE does increase code complexity, but Object-Oriented methodologies, for example, can simplify code when you use Inheritance and Polymorphism. The difference is that instead of having…