Posts by Leandro Nogueira • 56 points
6 posts
-
0
votes2
answers1061
viewsA: Treat AJAX return (responseText)
This return you receive, an array, and if you store it in a variable, $array, and to read the information ayzac_episode_name, you scan the array with a foreach, like this: foreach($array->array…
-
0
votes1
answer128
viewsQ: Responsive Utilities from Bootstrap 4
Hello, I use the Bootstrap 3 grid in my projects, and now I’m migrating to version 4. In version 3 I use beyond the grid, a layout option called Responsive Utilities that complements the grid. I can…
-
1
votes6
answers7088
viewsA: Intersection between two sets (element that is in set A and B at the same time)
I risk codes in Phyton but I’m not an expert, so sorry if I missed something in the syntax, but you could use the following logic: def intersecao(conjuntoA, conjuntoB): inter = [] for x in…
-
2
votes2
answers872
viewsA: Deck of random cards
You can use Mysql RAND() (I’m using PHP’s PDO class to access the bd): $pdo = new PDO($dsn, $dbuser, $dbpass); $sql = "SELECT * FROM sua_tabela ORDER BY RAND() LIMIT 50"; $sql =…
-
0
votes2
answers383
viewsA: Array within PHP Array
I’m sorry it took so long, maybe I’ve already figured it out. Anyway let’s go. Just confirm the following regarding the POSTS received: 'item 'comes from protocol input'; 'item-name' comes from the…
-
1
votes2
answers383
viewsA: Array within PHP Array
The $code variable is the same because it is outside the foreach, it should be placed inside so that a new random number is generated at each iteration. The same goes for the variable $nomePres, it…