Posts by fbiazi • 964 points
30 posts
-
1
votes3
answers379
viewsA: How to insert a ";" at the end of the string, program in c
Edited, because if the file being read did not end with a line break ('\n'), the last character would be deleted. A test is placed to verify that the last character of the line read is '\n' before…
-
1
votes2
answers91
viewsA: Doubts cast in c
It is written in the notice itself. The type size is different. Probably its int is 16 bits and the long is 32 bits, and the pointer is 32 bits. These sizes depend on architecture. Editing This may…
-
1
votes1
answer61
views -
3
votes2
answers309
viewsA: Mysql does not use Input in query (Inner Join)
Your create table is setting a primary key with a column that does not exist, registro. Maybe the intention was PRIMARY KEY (`protocolo`) If the desired primary key is the one already defined,…
-
2
votes1
answer711
viewsA: How to SELECT to pick up data in different tables and with different id’s
You can use two joins, a single query returns all the results you need: $resultado = $pdo->query( "SELECT e.id_categoria, e.id_subcategoria, c.categoria, s.subcategoria FROM entrada e INNER JOIN…
-
1
votes1
answer298
viewsA: Count in Postgresql using OVER
It is not restricted to Postgresql, but I would do so: Appraisal count professor |avaliacao |quantidade -------------------------------- José |B |0 José |R |0 Maria |B |0 Maria |R |1 Paulo |B |1…
-
2
votes2
answers146
viewsA: Why don’t you update?
If there are several t-shirts for the student, there will be a lot of fields with the same name, for example 'data_payment', there is one for each t-shirt. PHP accepts to put the name of the fields…
-
11
votes4
answers127
viewsA: mount a regular expression
Example of search of at least 3 bars: var expr = /\/(.*\/){2,}/; alert(expr.test('http://exemplo.com')); // exibe false alert(expr.test('http://exemplo.com/ola/')); // exibe true This expression…
-
2
votes3
answers1963
viewsA: Javascript, save the initial values of the variables
It’s because you’re messing with objects. The line var pad = document.getElementById("res"); Creates no other object, it creates a reference, in the variable pad for the object that can be accessed…
-
0
votes2
answers1376
viewsA: Problems with PHP session - Continue a session
There’s an arroba before the session_start(), I’m going to go out on a limb and say that she’s there because she generated warnings or some other unwanted output. If this was the case, the unwanted…
-
0
votes3
answers432
viewsA: Insert into seat with function
Unless there are only numbers, and floating point numbers are converted to point string, the instruction must fail. How you are using prepare, to see the error, use…
-
1
votes1
answer387
viewsA: View from largest to smallest (php + json)
Tested using the following test data: // dados de teste $results = array( 'results' => array( 'collection1' => array( array('nome' => 'a', 'cat' => '', 'nota' => 2), array('nome'…
-
2
votes3
answers775
viewsA: Is it possible to mount a server that works from my computer?
If you fulfill this: Your client application connects to the server, not the opposite; Your computer has a real IP or you can configure your router, or more than one if you have (unusual but…
-
2
votes2
answers1314
viewsA: Configure the compiler output path in Netbeans
Yes, it is in this location that changes the file destination, only the directory separator is / and not \. If there is a directory with the same name as the output file, you may need other settings…
-
2
votes1
answer318
viewsA: Using Else inside the foreach
From what I understand, if, at least once, the content of if is true, the "Nada encontrado" should not appear. Create a variable to control this and test if you found something outside the loop:…
-
1
votes1
answer494
viewsA: url from the root of the site
If the problem is just finding the host name: $_SERVER["HTTP_HOST"] When starting a link with "/" the browser automatically uses the current host. Example: Being on the page…
-
3
votes2
answers855
viewsA: What is the use of declaring variables through braces?
Are keys. Brackets = (), Brackets = [] and keys = {}. It is not only to declare, it is to reference variables, which includes declaring. This use you found I did not know the closest was the…
-
1
votes3
answers2944
viewsA: What is the best way to enter a large amount of records into the database?
The Bulk quoted by Cantoni (and 2 or 3 levels in links entering what he put) is a way to do much faster, with a little creativity you can do (just idea example) two arrays, one with Insert and the…
-
1
votes4
answers545
viewsA: File Subdomain, Site Optimization
Through the Yslow plugin of Firefox (depends on having Firebug too) I arrived at this page: http://yuiblog.com/blog/2007/04/11/performance-research-part-4/ . It’s 2007, it may have changed a lot…
-
1
votes2
answers2652
viewsA: Upload image with php
An idea is to use an image-only form, the form target being an iframe on the page itself. After receiving the post in a PHP file, redirect with an HTTP 303 response to another page that shows the…
-
0
votes4
answers115
viewsA: How do I not allow "<" and ">" in my Insert
I recommend checking both in PHP, as it has already been answered, and in javascript. In javascript because the form is not sent, it does not use network, internet and resources of your server for…
-
4
votes2
answers1307
views -
2
votes2
answers239
viewsA: Click and add id to the array. If you click again, remove this id
I think a solution to the question is: $(function(){ var idsSelecionados = []; $('li').click(function(){ var id = $(this).attr('id'); var idx = idsSelecionados.indexOf(id+','); if (idx == -1) {…
-
0
votes2
answers402
viewsA: About Mysqli functions
It seems that you are passing the query already made to the class method. This is incorrect. You are mixing procedural call with object-oriented. Once the query is done you should only use it to…
-
1
votes3
answers9623
viewsA: Cannot send Session cache Limiter in session_start()
From this information it appears that the conexão.php is sending content, or at least the headers, and should not. I deduce (because I don’t have your code) that the connection to the database is…
-
1
votes2
answers379
viewsA: Error group by Oracle
Of the documentation in https://docs.oracle.com/javadb/10.6.1.0/ref/rrefsqlj32654.html: Selectitems in the Selectexpression with a GROUP BY clause must contain only Aggregates or grouping Columns.…
-
0
votes2
answers355
viewsA: Update dlls in client
It seems that libpq are for Postgree access and should not be necessary to access Mysql. Since you have tried only to copy the new Dlls and it did not work, your current EXE cannot access the new…
-
2
votes1
answer467
viewsA: Identify via Windows Forms C# the URL the user accesses
For this task I would not use a simple application because: Depending on the browser software, you will have to access an internal resource of it: the edit box. And as if it wasn’t hard enough, an…
-
9
votes3
answers10379
viewsA: How to create web payment system using PHP
Well, that’s a lot of questions, come on: How to create a payment system via boleto or card, there is some framework or company offering the service? Via boleto, it’s easy, talk to your manager to…
-
1
votes3
answers502
views