Posts by Rogério Dec • 1,511 points
66 posts
-
1
votes1
answer58
viewsQ: Bitdefender reporting virus when compiling c++ source with Codeblocks
I’ve been using Bitdefender for a few years, and Codeblocks for some time, and today specifically the programs weren’t compiling, until I saw that Bitdefender was reporting viruses…
-
2
votes1
answer61
viewsA: Get the innermost multidimensional array array
Try this code (the $json variable must contain its literal string according to its post): $nivel = 0; $nivelMax = 0; $posLim = 0; for ($i = 0; $i < strlen ($json); $i++) { $car = substr($json,…
phpanswered Rogério Dec 1,511 -
1
votes2
answers1397
viewsA: Insert in the value of an input type="date" the date returned from the Select of the database
Date has to be in format YYYY-MM-DD. Ex: <input type="date" name="data" value="2013-12-01">
-
3
votes3
answers90
viewsA: How to "break" the PHP variable and bring separate results
In a simplified form: $tipo=array('a','b','c',''); $metragem=array(15,18,32,44); for ($i=0; $i<sizeof($tipo); $i++) if ($tipo[$i] <> '') echo "$tipo[$i]: $metragem[$i]<br>"; Upshot:…
phpanswered Rogério Dec 1,511 -
0
votes1
answer32
viewsA: cPanel backup script moving files to wrong folder
Resolved by changing line 47 to: find $HOME/* -maxdepth 0 -type f -name "backup-*" -exec mv {} $BACKUP_FOLDER/ \;
-
0
votes1
answer32
viewsQ: cPanel backup script moving files to wrong folder
I have this full cPanel backup script that works well: (https://github.com/pietromalerba/cPanel-Full-Backup-Script). I followed exactly the orientation settings, created two folders…
-
0
votes1
answer41
viewsA: Load resized image in wordpress
I don’t know if it’s your case, but when you upload the images via Wordpress media library, it creates several versions of the image with different dimensions in the directory wp-content/uploads.…
-
0
votes1
answer178
viewsA: .bat number generator
I suggest you meet the Autohotkey. It is a programmable script that you leave active in the windows taskbar. With it you can do virtually anything, without great difficulties. I think it’s worth…
-
5
votes2
answers59
viewsA: How not to return an "X" value in the BD?
If you refer to SQL, just use for example: SELECT * FROM tabela_artistas WHERE id_artista <> id_artista_atual
-
0
votes1
answer41
viewsA: How to capture the URL of the first image of my Wordpress post?
I’m not sure I understand your question, but if you want to have a list of external Urls, the business is to create a custom table in Wordpress. For this, you must install the plugin Pods, where you…
-
2
votes2
answers1469
viewsA: How to automatically add two columns from two different tables and perform Insert in another table in Mysql?
What is the purpose if the records of the tables do not have a relationship with each other? To relate the 2 tables, they have to have a common key field for you to declare in INNER JOIN any other…
-
-1
votes1
answer92
viewsA: How do these Divs have the same height, but with their content they can be different?
I think all the confusions and difficulties I had concerning height, positioning, responsiveness, etc, could be solved with the models of this link I think the idea of tables is much more intuitive,…
-
1
votes1
answer135
viewsA: How to access a database using C
The C language does not create databases, but you can access multiple databases through existing libraries, for example: SOCI OTL LMDB++…
-
1
votes1
answer40
viewsA: What is the best way to group objects in SFML?
Apparently, from everything I’ve seen, the simplest and most intuitive way is to put objects inside the view. For example: RectangleShape background (Vector2f(windowWidth, windowHeight)); // draw a…
-
0
votes1
answer40
viewsQ: What is the best way to group objects in SFML?
If I have for example 3 different shapes in SFML, and I want to rotate them all relative to a single center, as if these 3 shapes were inside a square, what would be the best shape? Would it be…
-
6
votes1
answer85
viewsQ: Should I avoid operations between constants in a loop?
In C++ there is some sort of optimization or cache that prevents the same mathematical operation between constants to be repeated, mainly in loops, thus decreasing application performance? For…