Hello. When we want to insert a vlue into a table in sqlite, we use this line, right? cursor.execute('INSERT INTO colors Values ("red", "blue")') As we can see above, we want to insert 2 words and we type them as when we are typing whole the codes. But i want to get 2 words from input and insert them into the table in sqlite. I'm using Entry box in Tkinter window and i want something like this: ent = Entry() ent.grid() ################ cursor.execute('INSERT INTO colors VALUES (ent.get())') But it doesn't work and give me a syntaxt error. What can i …

Member Avatar
Member Avatar
+0 forum 17

Hello everybody. I need a quick help. I have a problem with running my python file code. I use Linux. I had a file with the name "app3.py" file on the Desktop; then i removed ".py" from the end of the name of the file; so now i have "app3" file. The first line of the file is this: #!/usr/bin/env python3 I have checked the "Execute: Allow executing file as program" checkbox too. I have typed this command on Linux terminal: sudo chmod +x app3 Now when i type "./app3" on the terminal; it should works but it doesn't. I …

Member Avatar
Member Avatar
+0 forum 4

Hello, I have a USB key on which I do all of my programming. It is formatted as an NTFS drive with 32 gigabytes of space. On this drive I have large C::B projects which contain both windows and linux executables. When I try to run the linux executables it gives me a permission denied error. I tried right-clicking on the USB name on the left of the default Ubuntu file viewer and setting 'Allow executing file as program' but it wouldn't hold. Then I tried running `sudo chmod -R a+x media/USBKeyName`, it took a few seconds to run, but …

Member Avatar
Member Avatar
+0 forum 2

Hi All, I have just completed my project in VB 2008 express edition. Now I want the project to be converted to .EXE so that I can deploy it on other computer / laptop. Could any one please help.... Regards, Ashwin

Member Avatar
Member Avatar
+0 forum 13

OK, so I've been Googling this as well as looking for previous posts. I have a .NET site that has some classic ASP still in it (who knows why or who did that). On the old server, the ASP would execute normally. On the new server, however, the ASP code renders to the browser. Both servers so far seem setup identically, and are running Windows 2008 R2. I've checked that ASP is installed, the app pools are the same, permissions the same, etc. I have to be missing something, but am not seeing the "smoking gun", as it were. Any …

Member Avatar
Member Avatar
+0 forum 12

While extending a mysqli class, I ran into an issue with binding parameters. I've read that db names and table names should not be used as parameters, but while I was pondering this statement... SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '$dbname' I thought, as the db name is a string in this instance, a prepared query should work. Shouldn't it? This works... $stmt = $mysqli->query("SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '$dbname'"); print_r( $stmt ); //shows [num_rows] = 1 if dbname exists So if anybody could enlighten me as to why this **doesn't** work, I'd appreciate it... $stmt = …

Member Avatar
Member Avatar
+2 forum 8

while (rs.next()) { System.out.println("Name: "+rs.getString(1)+"\n"); System.out.println("Age: "+rs.getInt(2)+"\n"); System.out.println("Address: "+rs.getString(3)+"\n"); } I just don't understand what is the meaning og getString(1)

Member Avatar
Member Avatar
+0 forum 3

how can i make the system (execution process )wait for some periode of time

Member Avatar
Member Avatar
+0 forum 7

Hey what's up everyone? I have a script here that works when i execute it from command line, and when I double-click it. Now, there is something interesting going on here. 1) When the program is executed by process.start it does not load (even when called from cmd.exe /c ...) 2) When the program is executed with system.diagnostics... it loads but does not supply ANY output. 3) Created a terminal program for vb console; it gets executed and then it executes the file... no output. When you physically click on the exe files I created and they in turn shell …

Member Avatar
+0 forum 0

My php code will not execute and I'm not sure why. Below is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Before.html </title> <meta name="Generator" content="Alleycode HTML Editor" /> <meta name="Description" content="Your description here..." /> <meta name="Keywords" content="Your keywords here..." /> </head> Before #1, Test php <br /> <?php echo "Hello World!; <br> ?> <br /> Before #2, Variables <br /> <?php $name = "Name $age = Age; echo "My name is $name and I am $age years old."; ?> <br /> Before #3, Comments <br /> <?php //-----------------------------------------variables------------------------------------ $name = "Name"; $age = Age; …

Member Avatar
Member Avatar
+0 forum 8

Explore Python's sqlite3 database module, create, write and read a database file.

Member Avatar
+3 forum 0

Hi All. Have been messing around with PDO for a while, but have come across a bit of a quandry. I like the prepare - execute method for fetching data, but I needed to check if an update query actually did update or not. Now not having mysql_affected_rows() to hand, I was left scratching my head. PDO:exec can do this, but it seems only on 'straight unprepared queries'. Does anybody here have any suggestions on the best way to implement a PDO::exec but on a prepared query? This is some cut-down of my code, so you get the idea: public …

Member Avatar
Member Avatar
+0 forum 3

Can someone tell me what's the difference between Instruction Cycle and Fetch&Execute Cycle? Thanks

Member Avatar
Member Avatar
+0 forum 2

I'll try to start over again: Windows7, Python3.2.. When I click on a *.py file it starts up the python.exe interpreter in interactive mode. What I want it to do, is to RUN the *.py file. Please, how can I accomplish this. A *.py file is associated with python.exe . Thanks for your help...Vernon

Member Avatar
Member Avatar
+0 forum 11

I am having some trouble with this code. I want have an onclick function on a div and I want to call this function. Only the 'if' section of the code works. If the #about opacity is anything other than 0.47, it still executes the 'if' code, but not the 'else' [CODE] function opacityabout() { if ($('#about').css("opacity", "0.47")) { $('#about').css("opacity", "1"); $('#home').css("opacity", "0.47"); $('#right').css("-webkit-transform", "rotate(180deg)"); } else { $('#about').css("opacity", "0.47"); $('#home').css("opacity", "1"); $('#right').css("-webkit-transform", "rotate(180deg)"); } }[/CODE] My HTML is set up like this: [CODE]<div id="right" onclick="opacityabout()"> </div>[/CODE] Thanks

Member Avatar
Member Avatar
+0 forum 9

I've done some searching, and it seems a few people have asked similar questions, but none of them were quite what I was looking for. I need to be able to read lines of code from a .txt file, and then execute them in Java. Or, if that's impossible, would there be a way to convert that text file into another file type, and then run the code from that? The code in this text file is going to be user created with another program, so I want to keep this as simple as possible for them... if it's even …

Member Avatar
Member Avatar
+0 forum 37

hi, i try to run java program with ProcessBuilder but it works only with .exe file and with .jar or .java i use netbeans 6.9 why please? [CODE]import java.io.*; public class Mani { public static void main(String args[]) throws IOException, InterruptedException { try { Process p=Runtime.getRuntime().exec("javaw -jar D:\\NetBeansProjects\\GetIPAddress\\dist\\GetIPAddress.jar"); } catch(IOException e1) {System.out.println(e1);} } }[/CODE]

Member Avatar
Member Avatar
+0 forum 10

I figured out how to use time in C since the last time I asked a question here. :cool: My new dilemma is that I was wondering if its possible to save user input in a C program so that when the program is closed and executed again it will still have that data stored such as: If Jan checks in for work but is late, the program adds 1 to his late days so that it is now 4 but after being shut down for the night and rebooted next day when it executes again the number of late …

Member Avatar
Member Avatar
+0 forum 4

So I'm new to python, although not terribly new to programming. I am going through some tutorials, but am having some trouble. I am trying to execute a program from the python shell (using Python 3.1). Right now, I have the >>> prompt. I can't seem to get any program to execute from this prompt. If I put my program into a new window and then click "Run Module," it works. But I can't get it to execute from the >>> prompt in the shell. I have tried these variations (note - my module name is humansize.py and this is …

Member Avatar
Member Avatar
+0 forum 5

Hi to all experts in the forum. I know scripts can be executed through the command prompt,but what are other ways to execute it, if the file is on remote server. Please specify if any clarification is needed.

Member Avatar
Member Avatar
+0 forum 7

I am running a form that pulls data from multiple mysql tables. However whenever the php/mysql code is in the html form tags it will not read the php/mysql nor will it read any php for exampl echo "here";. I have done this several times before so I imagine it is just an issue with a config file. Any thoughts are much appreciated! Code below. [CODE]<td>Education</td> <td><select name="education"> <option value="<?echo $education;?>"><?echo $edu_desc;?></option> <? echo "here"; $edusql = ("SELECT unique_id, desc FROM education order by unique_id asc"); echo $edusql; $edurslt = mysql_query($edusql) or die("Error: ".mysql_errno().":- ".mysql_error()); while($erow = mysql_fetch_array($edurslt)) { $unique_id …

Member Avatar
Member Avatar
+0 forum 8

Hello, I am trying to execute two external programs at once. Here's my code: [CODE]#include<iostream> using namespace std; int main() { system("cd \\ && cd Program Files\\Skype\\Phone && Skype.exe"); cout<<"Skype launched \n"; system("cd \\ && cd Program Files\\MAXA Notifier for Skype && SkypeNotifier.exe "); cout<<"MAXA launched \n"; system("pause"); return 0; }[/CODE] I have very poor, basic knowledge about programming i got in high school. What I am trying to accomplish might not even be possible with my method so please provide me with detailed comments so that I can understand and learn. What is happening is that the code works …

Member Avatar
Member Avatar
+0 forum 1

if not exists (select * from sysobjects where name='amrreconAccountsTB') begin execute "create amrreconAccountsTB(acct_id char(2048) NULL)" end; Message from server 'NOCTREPI04' (Msg 156, Severity 15, State 2): error near the keyword 'end'. Can someone please help me and tell me what is the syntax error here?

Member Avatar
+0 forum 0

The End.