Posts by IgorCarvalho • 729 points
16 posts
-
0
votes1
answer98
viewsQ: How to take the content of the JOIN clause condition
I have the following situation that can be seen in this link. The expression is: /((^|\s)(right|inner|left)\sjoin\s(.*?)on\s(.*?)(?=(inner|right|where)?))+/gmi I need to get the conditions inside…
-
0
votes2
answers273
viewsA: Switch with several POST
In fact the switch is indicated to validate the value of a only variable. Where you can see it like this $var = 1; switch ($var) { case 1: echo 'Um'; break; case 2: echo 'Dois'; break; ... } In your…
-
18
votes8
answers95476
viewsA: How to check with jQuery if there is a checkbox checked?
The best way is to use the .is(':checked') where a return boolean of validation Take the example: http://jsfiddle.net/Ek33a/…
-
1
votes1
answer797
viewsA: Oracle occurs connect problem Identifier is Too long
I think I found the problem, after a lot of searching, the problem apparently is that the file was created in windows where it has CR/LF and linux only LF, just convert to default file on Linux and…
-
-5
votes8
answers5453
viewsA: Why in some if’s situations are considered bad?
Boy, this is very relative, for example instead of writing <?php $str = 'f'; if ($str == 'a') { echo 'Letra A'; } else if ($str == 'b') { echo 'Lebra B'; } // .... Is the most appropriate…
-
2
votes1
answer797
viewsQ: Oracle occurs connect problem Identifier is Too long
I have the following problem, first setting up my PC. OS: Fedora 20 PHP 5.5 Oracle Instant Client: 11.2.0.4.0 I try to connect via file settings tnsnames.ora and the following error occurs…
-
5
votes6
answers15594
viewsA: How to do a search ignoring Javascript accent?
You can create a "Slug" from the string and after that do a search, as the code below String.prototype.toSlug = function(){ str = this.replace(/^\s+|\s+$/g, ''); // trim str = str.toLowerCase(); //…
-
1
votes4
answers359
viewsA: Difficulty storing object property in Javascript
Luiz Vieira the problem is that Ecmascript 5.1 (if I’m not mistaken) puts the variable this as global scope, the most indicated is you replace the line this.m_oClickCallback = oClickCallback; For…
javascriptanswered IgorCarvalho 729 -
1
votes5
answers48166
viewsA: How to increase or decrease the div proportional to 720x540?
You can determine the dimensions in percentage, so it is adaptable to browser resizing: div { width: 80%; height: 80%; border: 1px solid black; }…
-
0
votes4
answers289
viewsA: How do I send a "textbox" always to the right when it’s in focus?
You can use the jQuery also and use the plugin maskMoney, see an example $("#demo3").maskMoney({prefix:'R$ ', allowNegative: true, thousands:'.', decimal:',', affixesStay: false});…
-
3
votes10
answers29077
viewsA: Scroll through an Array and check if any element is empty
If you go through the entire array you can use one is_null to validate whether or not it is null and empty whether it is empty or not. <?php $arr = array('teste', 'teste 2', 123, '', null,…
-
4
votes2
answers7390
viewsA: How to save JSON file with Node.js
The most indicated, which was cited by Joel is indeed to use Mongo, but if you are interested in using a file manipulation API on Node.JS, you can use the Filesystem API, see an example below var fs…
-
7
votes6
answers690
viewsA: How do I make a page not bug when the browser is resized?
Just use the Media Queries for all elements and make them fit correctly to the size of the browser. Use the Grid CSS or even the Bootstrap which also has grids support is a good one, because then…
-
0
votes9
answers6629
viewsA: Why is using Sessions not a good alternative to authentication?
I believe that for a much safer application, it can not only be with session, but also with cookie, where you can leave a key in the client to be able to leave a "digital signature" of the pc, where…
-
5
votes4
answers594
viewsA: How to create a URL redirector?
I would also indicate doing this redirection in PHP, as the example below: <?php $url = $_GET['url']; if (filter_var($url, FILTER_VALIDATE_URL) !== false) { header('Location: '.$url); } else {…
-
3
votes4
answers2060
viewsA: How to create a PDF stream in PHP?
I don’t know if that would help you, but could an embed of PDF help you? Just put the PDF embed from Google itself, look at the code below <iframe…