Posts by Ale • 2,461 points
113 posts
-
3
votes1
answer282
viewsQ: How to 'Manipulate' Cart Outside the Magento System - API
Hello, Well, I would like to integrate the Magento system in my site (only 1 page), because it has a module for quick integration of the MOIP checkout system, so I wouldn’t need to do the whole…
-
5
votes1
answer713
viewsQ: CMD, Console, MS-DOS and related terms
Well, you have embarrassed all the concepts that I’m going to list below, and I would like to present the definition of these terms, maybe some are synonymous with others and others are totally…
-
2
votes1
answer454
viewsQ: Errors installing Phonegap/Cordova - Nodejs
Your environment has been set up for using Node.js 0.12.6 (x64) and npm. C:\Users\Alexandre>npm install -g phonegap npm **WARN** addRemoteGit Error: not found: git npm **WARN** addRemoteGit at F…
-
0
votes1
answer538
viewsQ: SQL query normalize accents, til
I often have to search for names of products that have accents.. how to normalize this? In my table I use the collation utf8_general_ci, which serves well for upper and lower case (CI). Now,…
-
3
votes2
answers66
viewsQ: Problem to mount query
I cannot mount a query, the logic is: Select produtos with categorias different products, being the products with more points, so I will have a product of more points of the category X, another of…
-
5
votes4
answers545
viewsQ: File Subdomain, Site Optimization
Well, I heard that for more downloads in parallel the indication is to put them in a subdomain, and even a fact that cookies not go in the request would also make faster. Anyway, truth or myth, how…
-
1
votes0
answers49
viewsQ: Invalid but existing DKIM
Hello, well, I set up a way to send emails, I set the DKIM of the server in Cpanel correctly, but when testing in the spam tools it accuses existing DKIM but invalid. Well, the point is, the…
-
4
votes2
answers106
viewsQ: How to not automatically sort IN(Mysql)
Run this SQL command: SELECT * FROM produtos WHERE id IN (144,140,134,133,128,129,141,143,149,150,147,146,126,142,125,99,100,92,91,90,108,109,123,124,122,121,110,89) ORDER BY none But the…
-
0
votes1
answer589
viewsQ: Object Object, how to not issue this alert
Well, I have pages that send asynchronous requests, but when interrupted they send an alert [Object Object]. This gets in the way a little, because it appears while the server is pointing to the…
-
6
votes3
answers766
views -
15
votes5
answers667
viewsQ: Use JS to relieve PHP
Well, I have a PHP file that generates a document (I get it by AJAX). This document goes through some functions (which I did in PHP), such as converting a string to code, adding fields.. Well, for…
-
2
votes1
answer175
views -
2
votes1
answer259
viewsQ: indexing vs page generation with PHP
I have some products and all their information is stored in the database. When a customer selects a product, it is sent via POST the ID of the product and thus a new page is generated with the…
-
1
votes1
answer134
viewsQ: MYSQL - Return occurrences closer to REGEXP
I need to return the number of occurrences closest to REGEXP, see the example below: SELECT * FROM tabela WHERE nome_produto REGEXP 'vestido|longo|manga|curta' The idea is that this query returns me…
-
2
votes1
answer155
viewsQ: transform Query String url to a Readable url for the user
I ever noticed that it was possible to turn a query string into something more readable for the user, like this: real url: site.com/roupas?categoria=vestidos for this (what the user sees)…
-
3
votes1
answer218
views -
4
votes1
answer105
viewsQ: What is the reason for the suffix "? algumnumero" in the link of some CSS?
I was going through the sources of some websites, and sometimes I see something like this: <link href="http://css.siteX.com/imagecache/.../ymPrompt.css?2014102701" type="text/css"…
-
2
votes1
answer5879
viewsQ: Receive JSON data with Curl
I’m sending a Curl to a URL that will return a JSON as a response. By the browser, accompanying with firebug, the return is in JSON, but when I do the same procedure by PHP, it returns a page (which…
-
5
votes3
answers3857
viewsQ: Pagseguro does not redirect customer after payment
After payment, the customer should be redirected to the thank you page I set up, but that’s not what happens. See, I took an API, I just needed to set up 2 files, among them are:…
-
2
votes1
answer354
viewsQ: Cancel Javascript/Jquery event queue
So, I have a loop that will awaken some 10 functions that are AJAX requests, in the functions, which encompasses AJAX requests is a setTimeout(), what happens is, the loop is done on the hour, and…
-
2
votes1
answer289
viewsQ: About the URL how it is encoded and POST parameters
The URL is always encoded, as is the encoding, what it encodes, and what importance or need to encode a url? I have a div, who’s got line breaks and gets something printed like: 1 2 3 in HTML gets:…
-
2
votes1
answer647
viewsQ: POST request is not formatted AJAX Jquery
Look at that: HTML <form id="form" enctype="multipart/form-data" action="paginax.php" method="post"> <input name="nome_arquivo" type="file"/> <input type="hidden" value="valor_name1"…
-
1
votes1
answer1813
viewsQ: Send image via post
On facebook, I seem that when selecting an image to put in the post, they sent a request by the POST method to a URL there (which should handle the upload..) But what struck me is that the content…
-
3
votes1
answer1130
viewsQ: About Deferred and Promises Jquery
I need help to understand this concept of Deferred and Promises in Jquery, it seems that there is a library for Promises(is there?) but Jquery is breaking the branch with the implementation of this…
-
2
votes2
answers528
viewsQ: setTimeout not executed in loop(each)
See the function below: $(grupo).each(function (i) { setTimeout(function () { $.ajax({ url: "curltst.php", data: { acao: "teste", mensagem: mensagem, grupo: grupo[i] }, dataType: "xml", method:…
-
3
votes2
answers1263
viewsQ: How to create array dynamically?
I would like to create a array dynamically, I tried this way: $zt = array(); $zt = ($p_p[0] => $_p_p[1]); print_r($zt); $p_p is a array, where index 0 is the name, and index 1 is the value, 2…
-
2
votes1
answer120
viewsQ: When fetching the attribute of a tag, it is bringing the value of another
function returnvalue($namearr,$exec){ $result=""; foreach($namearr as $arr => $value) { $regex = '<.* name="'. $value .'".*>'; if (preg_match($regex,$exec,$result1) === false) { $result4="…
-
4
votes1
answer96
viewsQ: Problem with Regular Expression
preg_match('<[ \w"=]+name="xhpc_composerid"[ \w="]+>',$exec,$result1); echo $result1[0]; //input type="hidden" autocomplete="off" name="xhpc_composerid" value="u_0_1k"…
-
1
votes1
answer547
viewsQ: dataType AJAX attribute - Jquery
I know that with dataType set to XML, he understands that the return is XML and I can navigate the returned object as if I navigated by DOM, so I set it to HTML(dataType:"html"), and I hoped that…
-
2
votes1
answer200
viewsQ: Curl, how to change the country of origin
I used Curl to automatically log into Facebook, but a few minutes later, I received a message saying that someone had accessed my United States, and for security reasons they asked if I did it.. So…
-
0
votes1
answer56
viewsQ: What makes CURLOPT_DNS_CACHE_TIMEOUT
I wonder what it does: curl_setopt($ch,CURLOPT_DNS_CACHE_TIMEOUT,120); The standard is 120 in lib cURL. The following explanation, I found it half vacant for me: The number of Seconds to Keep DNS…
-
0
votes0
answers239
viewsQ: Limit Length URL GET
What character limit for a URL? I see this because I followed a GET request from facebook where the URL had around 7k of characters, so I searched, the maximum is 2048, and this depends on the…
-
1
votes0
answers79
viewsQ: Protection x Freedom - Paid Sources
We know that when a site decides to use a paid source on its site, it seeks design and at the same time differentiation. But in order for the user to see the source at work on the page, the…
-
1
votes1
answer532
viewsQ: Sublime Text 2 update right on site
Does anyone know of a way, when I save the file in Sublime Text 2, it update there on the site? It’s not localhost, so I’m always having to upload the file to the server..
sublime-text-2asked Ale 2,461 -
1
votes1
answer60
viewsQ: $. inArray() return not expected
Array cookiesplit contain exactly this content: _utma=246244038.1458519878.1422527074.1423248864.1423253252.8, __utmz=246244038.1422527074.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none),…
-
3
votes1
answer68
viewsQ: Generate CSS from inline css of DOM elements
Hello, made a document, large, full of inline css, and know that mixing css with html, using the style attribute right in the element is a bad practice.. But now, do you have a way to generate a…
-
2
votes1
answer81
viewsQ: UPDATE, field with "placeholder query" failed execution
Follows the code: $campo = $_POST['campo']; $valor = $_POST['valor']; $id = $_POST['id']; $mysqli = new mysqli("localhost","root","","tabela"); mysqli_set_charset($mysqli,"utf8"); $consulta =…
-
7
votes2
answers1493
views -
1
votes1
answer63
viewsQ: about ajax vs assigned events
When the document is ready, $(document).ready, I send an AJAX request to a PHP page that generates a table that I put in my body, but,... below this ajax request, I have functions that handle events…
-
2
votes2
answers13571
viewsQ: navigate through the child elements
I would like to know how to make a loop to navigate through all the child elements? Preferably code in Jquery, I believe it is something with next(), children(),find()....…
-
3
votes1
answer52481
viewsQ: How to open a PHP file in the browser?
I’m trying to open files with the extension .php. In Firefox, it asks to download. In the IE it asks to carry out the download. Already in the Chrome it displays the PHP code. Before it wasn’t like…
-
2
votes2
answers1020
viewsQ: Assign various elements different values using the same function
See, I have 5 IDS(5 DOM elements) and accurate, using Jquery’s text() function, add to each of them a different text, I can do so.. $("#ID1").text("bla"); $("#ID2").text("blabla"); .... There is a…
-
0
votes1
answer529
viewsQ: connect to multiple sites with Curl
If there was a list of 10 sites, or more, using Curl to connect and puck content from each site, which would be the most effective way, which would give less time between one connection and…
-
4
votes1
answer7435
viewsQ: On HREF and SRC, finally, what are the differences of application?
From what I’ve been reading, HREF serves to point to something external(outside the page) that the user requests, or that the page containing it needs to use it (in the case of style sheets). That…
-
19
votes1
answer5560
viewsQ: About the boolean attribute Defer and async vs optimization
The use of async and defer for optimization is a good subject to touch when we want pages loaded more quickly and also without blocking problems. Doubts: Using async, if the browser does not…
-
4
votes2
answers1969
viewsQ: How to make a CSS animation stop in the last state?
I have a div, which is lively, and would not like that at the end of the animation she turns to the state of when she started, because she ends up returning to the original state at the end of the…
-
4
votes2
answers205
viewsQ: Why match returns an object - JAVASCRIPT
I was always one of those who understood the functions and applied, but I want to understand, why this: var a = "__myseld=ej232;Nome=Alexandre"; var as = a.split(";"); var x = 0; while (x<5) {…
javascriptasked Ale 2,461 -
1
votes2
answers346
viewsQ: CSS pseudo-class :Nth-of-type()
Look at that.. div .p:nth-of-type(2) { font-weight: bold; } DIV 1 <div div="div1"> <p class="p">p1</p> <p>p2</p> <p>p3</p> <p class="p">p4</p>…
-
2
votes1
answer684
viewsQ: $. ajax does not answer
Code: <script> $(document).ready(function () { $("#submitbuy").click(function () { alert("clicou no submitbuy"); var emailc = $("#emailc").val(); alert("variavel emailc atribuida: " + emailc);…
-
3
votes1
answer1084
viewsQ: What is ":eq(0)" for and how?
I was watching a tutorial on slider for jQuery, and in a part of the code, in which the goal was to return to the first image, the author of the code did it in a way that I do not know, and also did…