- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 8
- Posts with Upvotes
- 7
- Upvoting Members
- 6
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
56 Posted Topics
Re: have a read through this [url]http://groups.google.com/group/python-excel/browse_thread/thread/eb3475b5438c3e50[/url] the guy convert xlsx to xls and from there you can convert the xls into csv using xlrd | |
Re: it works but not what kiddo asked for, the application that he/she wants, wants to check for keyboard inactivity and if 3 seconds passed it prints the question 'Are you ready yet' again. | |
Re: in the order by clause you could add the COUNT(pNo) desc, this will sort the branch no in ascending order and the highest property count will be on top for that branch or you could just sort it on the count. there are actually couple of ways like using max … | |
Re: [CODE] select to_char( add_months(sysdate, (-12*level)) , 'yyyy') years from dual connect by level <= 10 [/CODE] | |
Re: check this [URL="https://forums.oracle.com/forums/thread.jspa?threadID=555748"]https://forums.oracle.com/forums/thread.jspa?threadID=555748[/URL] | |
Hi i'm stuck on this script that i'm busy writing and have no idea where to start. I need a script that connects to a secure ftp, downloads files and store it on my local pc. has anyone done something similar and which modules should i be looking at. | |
Can this be done in python and which module would i have to look at. I haven't experimented with this and if I have to guess would it be the os.renames() function. | |
Re: Also to make your app a bit more efficient first search for the id in the file then assign them to the dictionary, some thing like this. [CODE] if str(id2find) in each_line: #assign values to dictionary #close file #return dict else: return s [/CODE] | |
Re: you could use the glob module to read anything with a specified extension i would use something like such: [CODE] import glob if __name__ == '__main__': output_tpo = open('tpo.csv', 'wb') output_hoh = open('hoh.csv', 'wb') for filename in glob.glob('*.txt'): # if the extensions are txt input_file = open(filename, 'rb') for line … | |
Re: for this type of programme a while loop would be best. have a method to display whatever and accept input and return into the while where you can validate it. If the input is valid process whatever and break the loop else display error message have the user to press … | |
![]() | Re: You could also specify which widgets in the sizer should be visible or not [CODE] sizer.Show(text_ctrl_1, False) [/CODE] |
Re: you could have your def notepad accept a list data type parameter, and the iterate through the list (dataList) and write the information to file. you would basically call the notepad def in the excel def. | |
Okay i have created a wxPython application and converted it into an windows executable programme using py2exe. The app works perfectly but every time i run the exe the console window appears with the gui. Is there anyway to get rid of the console because the app has to run … | |
What method / methods should be be used in order to get the frame to start up in a central position of the screen, and could you also provide the code please. I'm using wxPython. thanks | |
Re: instead of [CODE]if 'Peter' in name:[/CODE] have [CODE] if 'CA' in rank: print 'Name: %s Rank: %s'%(name, rank) [/CODE] | |
Re: i don't see a problem but bear in mind that those are two completely different languages and bear little similarities but it should be a problem seeing that is intro classes. | |
Re: i think for wxPython python version 2.6 should suffice but you could probably try 3.0. i use komodo ide 5.0 but its not free. you could try boa constructor 0.6.1 which i think is better suited for gui programming but hey thats just my opinion or Eclipse with the pyDev … | |
Re: dude i tried this in oracle and it worked but try this: [CODE] select c.Name, m.Producer from movie m, client c, rent r where c.cleintID + m.movieID = r.MovieID + r.ClientID and m.movieID = r.MovieID and c.cleintID = r.ClientID [/CODE] this might be a bit sloppy but i had to … | |
Re: try this [CODE] SELECT pm_task_user_work . * , str_to_date( pm_task_user_work.task_user_work_link_time, '%Y-%m-%d' ) AS MyDate FROM pm_task_user_work, pm_task_allotment WHERE pm_task_allotment.task_allotment_id = pm_task_user_work.task_allotment_id AND pm_task_user_work.project_id = '19' ORDER BY pm_task_user_work.project_module_id, pm_task_user_work.task_user_work_link_follow [/CODE] | |
Re: maybe you can split the query into two where you select the customers name and the select all the customers telephone number and put them into two separate datasets you can then manipulate the datasets however you want, if you want to return one only put a date_created field in … | |
Re: you're going to kick yourself if you see this but the app is right except for one part, see you pass the directory path which is awesome but what about the zip filename. [CODE]zippedHelp = zipfile.ZipFile(zip, "w", compression=zipfile.ZIP_DEFLATED )[/CODE] see you using there but it hasn't been declared anywhere in … | |
Re: maybe read the variables into a struct and then send them to allocated array | |
Re: learning the code will probably take you a year max but you should also learn about database concepts and principles (eg. normalization, database integrity, design etc) the problem though is that it might be a bit difficult to find a job with only sql knowledge as sql on it own … | |
Re: [CODE] INSERT INTO PICTABLE (MYID, PIC) VALUES (3, LOAD_FILE('/PHP/ME.JPG')); [/CODE] watch out for the slashes though i can't remember if it's correct the way i have on top or if you have to use the double slash (//) or the single backward slash(\) also it would be better to have … | |
Re: you can build a anonymous block or procedure to do this as well | |
Re: try running the insert query in the mysql console and see what happens | |
Re: did you get an exception that mentioned something about indentation because in python you have to have the executable code under the if statement. you don't need the brackets as well try this: [CODE] if counter == 1: counter += 1 [/CODE] | |
Re: i suggest building the sql query or non-query so that when it fails you can print the query and check whats happening, its usually a problem with the way the query is built. | |
Re: try this: [CODE]call GetOffice(@countryId:=1,@countryName:='India');[/CODE] | |
Re: Unneeded; because you require j_num from the journals tables you are already linking the table with researchers table. That join should suffice to return the information you required. If you wanted to return a value from the Area_Edits table then the second join would be necessary, the last join is … | |
Re: dude just combine everything snippsat posted he basically wrote you the programme it's right there, just think about it create a loop from 1 to 100 generate random number and store in a variable if the number is odd add 1 to odd variable else add 1 to even variable … | |
Re: i think you might want to have a look at cursors, can't think of anything else at the moment though, sorry. | |
Re: For instances like this i always suggest using anonymous blocks or stored procedures and you are probably most likely going to need an if statement | |
Re: try to convert it as a date in the insert statement by using this function: str_to_date('30 Jun 2009','%d %b %Y') | |
Re: for your first question [CODE] start = int(raw_input("Start at: ")) end = int(raw_input("End at: ")) count = int(raw_input("Count by: ")) while start <= end: print start start = start + count [/CODE] and for your second question have a look at this and try and figure it out [CODE] x … | |
Re: because the if statement will never equate to true person is a list and pname is a string. | |
Re: well the first apparent error i see is the many to many relationship between the book and customer as one book can be loaned by many customer and a customer can loan many books, it is also not uncommon for a library to more than one copy of the same … | |
Re: migrating from one rdbms to another is not as simple as dumping the sql scripts in the new rmdbs, unless you convert the entire script by hand a simpler solution is use a migrator tool to migrate and old dbms to a new one. | |
Re: i don't think MySql has built in email functions like Oracle's PL/SQL so instead you will have to do it from the front-end system which i assume is php. | |
Re: try this i think it's just a little less complex than the inner join syntax [CODE] SELECT m . * FROM members m, friends f WHERE f.friend1 =1 and m.member_id = f.friend2 [/CODE] | |
Re: or you can reverse the slash like such C:/HourlyATC/ etc | |
Re: just a point of interest have a look at the time() module it has very nifty function called strftime, then you could have something like this: date = time.strftime('%m/%d/%Y',time.localtime()) | |
Re: you have to convert the num variable to a string like such: even_file.write('%s\n'%num) | |
Re: this is a bad example, instead you should have a look at composite entities then. in short hand notation a better design for you above example would be: [B]main[/B]([U]id[/U],fname,uid,[I]cid[/I]) [B]category[/B]([U]cid[/U],category) underlined attributes are the pk and italics fk | |
Re: i have no idea if this can be done in php but try using an anonymous block and then test the input variables if not create a stored procedure in the database that accepts whatever you are trying to test. i know this can be done with asp so i'm … | |
Re: [CODE=SQL] SELECT * FROM $tbl1_name WHERE age BETWEEN '$from' AND '$to' AND sex='$show_all' [/CODE] | |
Re: in oracle i know the magic tables are the insert and delete when using and update so i guess it's those or maybe it's dual...hope i passed the interview | |
can someone help me identify the syntax error with this code [code] CREATE TABLE IF NOT EXISTS Persons ( id_number VARCHAR(13) NOT NULL , name VARCHAR(45) NOT NULL , name_2 VARCHAR(45) NULL , name_3 VARCHAR(45) NULL , surname VARCHAR(45) NOT NULL , date_created DATE , date_modified DATE , PRIMARY KEY … | |
Re: you can use a dictionary but it won't be wise to use the surname as the key instead use the position number. for the itemvalues you can use a list and you can append new values later if needed so basically you have a list in the dictionary. |
The End.