Posts by zwitterion • 2,876 points
171 posts
-
1
votes3
answers643
viewsA: How to mount the regular expression below
I was kind of wondering about that question. Note that the regex suggested by Rodrigo selects (digit, bar, hyphen) but tbm the first digits OR the first bar OR the first hyphen ONLY (separately),…
regexanswered zwitterion 2,876 -
2
votes1
answer156
viewsA: Relationship of Tables - how to do
I think this architecture should solve your problem. I didn’t put all the VPN fields but you can do it yourself. If you need the code that generates these tables, see below: CREATE SCHEMA IF NOT…
-
0
votes1
answer371
viewsQ: PHP multi-level array_merge. How to do?
I have the following array: $arrIni["ENV"]="US"; $arrIni["sap_db_server"] = "192.xxx.x.xx"; $arrIni["local_db_server"] = "localhost"; $arrIni["local_db_username"] = "root"; //Default settings…
-
0
votes1
answer872
viewsQ: Session variables $_SESSION vs class variables in PHP
I wanted to know the pros and/or cons of using session variables on class constructor or even within class methods. Let’s say I have the following class: class minhaClasse { private $arrEnvSettings;…
-
1
votes1
answer37
viewsQ: Another global chat room. What is the technology for this type of application?
In that link we have one more global chat room. The interesting thing is that it seems to use google map. Could someone clarify what the technology is involved in creating an application like this?…
-
1
votes1
answer272
viewsQ: Do php’s autoload functions make an object available to any part of the site in the same session, even in different subdirectories?
I intend to make my code cleaner and therefore avoid using include or include_once all page start. I would not like to use frameworks that already do this work as Windows for example. I want to…
-
2
votes2
answers519
viewsA: Freeze background when calling Popup?
If I understand your question correctly, you’re referring to "Modal," correct? If so, test this code below. It is a bootstrap application. Demo <!DOCTYPE html> <html lang="en">…
-
0
votes1
answer1789
viewsA: Insert value of a radio button into the database
Caesar, it seems that you are doing everything right. I found no mistake. I am understanding that only the value of the variable $perfil is not being inserted into mysql. I suggest doing a debug.…
-
0
votes2
answers696
viewsA: Insert Image into a table already created
"want to know now how to add relating the photo to the student that appears in select" I’m understanding that your question is specifically how to pass the student id to the php page. When creating…
-
1
votes2
answers70
viewsA: Set click event to an element that was inserted via AJAX, after page loading
You have to link the element and the listern event to the document Document DOM. Try this function below, it will work for any DOM element created in the future: //Vc enqueceu de escolher o selector…
-
3
votes3
answers1837
viewsA: Get back deleted files in Git
Use $ git checkout chave where the keyword is the branch number at a stage where your files existed. Ex: $ git checkout bc39326028de55653c8245cb7077b44023239735 At that point you’ll see your files…
-
1
votes1
answer128
viewsA: Pass the value of an option to another option without going through pages
Your answer goes through AJAX. Test this function: <script> $(function(){ //Toda vez que o curso for selecionado. Nota: a primeira op'cao tem que ser do tipo "Escolha o seu curso" com Id=0 por…
phpanswered zwitterion 2,876 -
0
votes2
answers60
viewsA: How to capture all images from an image field in XML to write to MYSQL?
I don’t know if you’ve had your answer, but here’s an extra solution: Use this function to read your xml file and turn it into a php array. The xml file can have any structure. Never mind. The…
-
1
votes3
answers278
viewsA: How to fire a message every click in jquery?
Use like this: $('#mensagem').html('<b>Seu IMC é de <b>'+imc+' Obesidade Grau II (severa)</b></p>');
-
2
votes1
answer107
viewsA: Separate the XML information
Use this function to move from xml to a php array I will update the function as I found a method of a class that is not available here. So now it is complete. /* This function goes to the directory…
phpanswered zwitterion 2,876 -
1
votes0
answers485
viewsQ: Call to a Member Function prepare() on null in
I got this class that connects to Mysql through PDO, in this link. It works just fine. But I decided to turn it into a static class. And here’s the modified code. class db { private static $dsn;…
-
0
votes2
answers76
viewsA: Change backgroud from one class to another event
I think it’s gonna be kind of hard without javascript. If you want to use JS this is a possible solution. //HTML <table border="1"> <tr class="line_item"> <td>L1C1</td>…
-
0
votes2
answers2311
viewsA: How to Make Dropdown Menu with Pop-up Effect
Israel, I don’t quite understand what the purpose of your menu is, whether it’s just to study CSS and jquery or whether you’ll actually develop an application. If it is the second case, I suggest…
-
2
votes1
answer1364
viewsA: How to read XML in real live pattern?
Just yesterday I was working on it. Try that fução below. It will receive the path to your xml, will taravessar the nodes and will return an array in php. That makes it easy for you to manipulate.…
-
5
votes1
answer485
viewsA: How to Extract Data from Excell to Generate Graphics?
A good option is to use the D3.js. Uses pure javascript, but if you want you can associate jQuery to facilitate the manipulation of the objects on the page. See here examples of basic maps. You can…
-
0
votes2
answers90
viewsA: Zoom in out mousedown
Depends on what zoom you’re referring to. There are basically 2 types of ZOOM: Geometric Zoom -> The displayed image stores its unchanging physical proportions. Zoom Semantic -> Image…