Posts by Fernando • 336 points
11 posts
-
2
votes3
answers1008
viewsA: How to improve my code (many If’s and Else’s)
I don’t think you have much to do. You can remove Elses and take breaks in Ifs but honestly I don’t see any organizational or optimization gains. if ((typeof dev.status) !== 'undefined') { if…
-
0
votes2
answers257
viewsA: Pick up messages sent and received from Mysql
And if you do so SELECT pr.id_perfil, pr.id_perfil_enviou, pr.recado, pe.nome AS NomeEnviou, prm.nome AS NomeRecebeu FROM perfil_recados AS pr INNER JOIN perfil AS pe ON pe.id = pr.id_perfil_enviou…
-
1
votes1
answer254
viewsA: sum values and boxes after the comma
To sum the time loads use the SUM(). To format the decimals you can try: CONVERT(DECIMAL(10,2), [COLUMN]) And theoretically as far as I understood, take the GM1.CARGA_HORA from GROUP BY. But as the…
-
2
votes1
answer144
viewsA: Send Zend Framework project to web server
I don’t know much about Zend, but theoretically you’ll need all the files and settings you’ve done locally. The difference is that instead of "C:/" (among other settings) you will need to adjust for…
-
3
votes3
answers3236
viewsA: Mouse Click without Moving Screen Cursor
Maybe I misunderstood, but from what I understand you want to just fire the function of the 2nd button click. If so, just call the function directly. Example: procedure TForm1.Button1Click(Sender:…
-
1
votes1
answer257
viewsA: Affiliate script with team help (Problem with recursion)
You can try something with sub-select like: SELECT a.id FROM users a WHERE (SELECT count(*) FROM users b WHERE upline_id = a.id) < 2 ORDER BY a.id
-
3
votes3
answers1199
viewsA: Selection of fields that repeat in the Mysql database
You can add a GROUP BY (to group by subjects). SELECT * FROM table WHERE.... GROUP BY [column Subject]. Let’s say the table structure is: id, subject, message Ficaria: SELECT * FROM table WHERE ...…
-
4
votes3
answers3702
viewsA: Auto-click when opening site
You can use something like: $(document).ready(function(){ // ao término do carregamento do arquivo $('#ELEMENTO QUE VOCÊ QUER').click(); // disparar o click de determinado elemento…
-
2
votes3
answers230
viewsA: SQL Query export for excel
In reality the condition "OPEN" should fall on all others. That is to say: // Apresentar todas as "indisponibilidades" que se encontrem no estado "Aberto". (Aqui tenho de apresentar) var query =…
-
2
votes1
answer275
viewsA: Create a conditional using the relational model
In fact, I believe the ideal would be the opposite. Have in the tables: employee, client a FK_PESSOA. In other words, every client is a person. Every employee is a person. A person can be a customer…
-
1
votes5
answers7954
viewsA: Removing the " n" from a string read using fgets()
Once read the String you can use String class methods. Ex.: string teste; FILE arquivo; arquivo = fopen("arquivo.txt" , "r"); if( fgets (teste, [tamanho do arquivo], arquivo)!=NULL ) { puts(teste);…