Posts by Pedro Soares • 1,136 points
75 posts
-
7
votes8
answers2700
viewsA: Is it good practice to mix Php and Html?
It is not recommended to mix PHP with HTML, I really like, and even encourage my students, to use a library called Smarty, with it we can manage templates without mixing php with HTML. Take an…
-
1
votes0
answers215
viewsQ: Mysql Longblob only accepts file up to 128mb
Create a table to store files, but all the life I send a file above 128mb all the columns are null except the id. I also realized that it saves only pictures, other type of file it doesn’t want to…
-
2
votes1
answer823
viewsQ: Check if any Select output line in Mysql contains a value
I would like to know how to check in the Where clause if any of the lines has a certain number. For example: If a select returns 1 2 3 4 and in clause ask the 4 it returns the values, if return 1 2…
-
1
votes1
answer233
viewsA: Error loading Library Monodevelop
I solved the problem, opened the Monodevelop installation folder and searched for Newtonsoft.Json.dll, copied to my project folder, went to References and added as external. At first he did not load…
-
1
votes1
answer233
viewsQ: Error loading Library Monodevelop
I am trying to use the Newtonsoft.Json library in mono, but I get the following error: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0,…
-
0
votes0
answers77
viewsQ: Mysql Lost Tables?
I just had a strange experience with mysql, I have a database with 8 tables on my local server. Suddenly my system no longer wanted to log in, I went to check on phpmyadmin and showed the tables,…
-
1
votes1
answer95
viewsQ: Webview with GTK
In Swift I have a webview which is basically a safari window, in C#. NET I have a webview which is practically a IE window. But in other cross-platform languages that use for example GTK for window…
-
0
votes1
answer2115
viewsA: mysql_fetch_array() does not show all records
Because you do not replace mysql_fetch_array with mysql_fetch_row. would look like this: while($arrayMateriaProva = mysql_fetch_array($resMateriaProva)){ print_r($arrayMateriaProva); } and you don’t…
-
1
votes1
answer78
viewsA: Window to save Swift File
I solved this problem with the following code: var painelSalvar: NSSavePanel = NSSavePanel(); painelSalvar.prompt = "Salvar"; painelSalvar.worksWhenModal = true; painelSalvar.title = "Salvar…
-
0
votes1
answer170
viewsQ: Url Friendly . htaccess problem
I have the following file . htaccess: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ErrorDocument 404 /erro404 RewriteRule ^(.*)$ index.php?rota=$1 [L,QSA]…
-
1
votes0
answers38
viewsQ: Pick selected item from a Nsmenu on Swift
I am using Ampathpopupbutton to save a text file, but the problem is that I cannot get the folder selected by the user. The code is like this: import Cocoa; class SaveFile: NSViewController {…
swiftasked Pedro Soares 1,136 -
8
votes1
answer87
viewsQ: Compile Archive . ly
I’m compiling a program in Haskell, but came a file .ly, and I can’t compile it. I try ghc Grammar.ly And I get the message: ld: warning: ignoring file Grammar.ly, file was built for unsupported…
haskellasked Pedro Soares 1,136 -
2
votes1
answer78
viewsQ: Window to save Swift File
I would like to create a window to save text files on disk, but do not know how to create a File Explorer using Storyboard.
-
0
votes1
answer87
viewsQ: Open Terminal with Swift
Can I ask my graphics program to open a terminal window by passing some commands with parameters? I’m using Swift for OS X, Grateful.
-
1
votes2
answers2222
viewsQ: Socket UDP Send and Receive C#
I’m developing a c# application that uses UDP, the problem is that I can’t answer the customer. I get the following error: Additional information: A request for sending or receiving data was not…
c#asked Pedro Soares 1,136 -
6
votes1
answer2411
viewsQ: Block keyboard and mouse or prevent user from leaving window in C#
I’m developing a lock screen style of lan-house where the user does not leave the screen without the server’s permission, I would like to know if it has to prevent the user from using keyboard and…
c#asked Pedro Soares 1,136 -
0
votes2
answers2303
viewsA: Prevent an application from being closed by the user through the task manager
The solution I found was to keep checking the processes and if the user opens the task manager I close it. I made a Thread for that purpose. public void antiGerenciadorDeTarefas() { while (true) {…
-
5
votes2
answers2303
viewsQ: Prevent an application from being closed by the user through the task manager
I have a C# application that cannot be closed by the user. But even if I eliminate all the means to close the application, including by itself, it is still possible to finish the process by the task…
-
0
votes4
answers1592
viewsA: How to ask the PDO if the insertion was made or error?
Here’s what you can do: if(isset($_POST['cadastra_produtos'])){ /////////////////////////////////// $Produtos = $pdo->prepare("INSERT INTO tbl_produtos VALUES (NULL, :prod_nome, :prod_categoria,…
-
1
votes0
answers32
viewsQ: Handle PHP build error
I am developing a web system in PHP with MVC and Smarty. But I am having the following problem. My system when entering an Exception it automatically opens a call already with the error (inserts a…
-
6
votes2
answers2325
viewsQ: Control Serial Port using Web Application
I need to communicate my system with the computer serial port Client, the detail is that with PHP I can use the fopen, but I don’t want to access the server’s serial port, but the client’s. I…
phpasked Pedro Soares 1,136 -
3
votes2
answers1246
viewsA: Count number of records in a database
Try it this way: $select = "select count(*) as numeroOnline from users;"; $r = $base_hndl->exec($select); $value = $r->fetch(PDO::FETCH_ASSOC); Echo "número online ".$value['numeroOnline']; I…
-
2
votes1
answer829
viewsA: "Headers already sent" error when creating tables in plugin activation
Besides you put it FOREIGN_KEY (partner_id) and should be the id of the same table, that is to say, FOREIGN_KEY (id). And as colleagues have said, you forgot the prefix when doing the FOREIGN KEY.…
-
1
votes2
answers412
viewsQ: Install IPA using Swift
I’m developing an APP for jailbreak, I would like to know how to install a .ipa that I downloaded from my server to be able to install on the device (iPhone and iPad). My app does not promote…
-
0
votes1
answer172
viewsQ: Select with JOIN to return an Object with Internal List
I wonder if it is possible to select with Join where the second table will return more than one row and in that create an object with an internal list. For clarity see the example: Tabela Usuario:…