I will replace C# with C++ and java with python.
C++ and python are taking the PL. Expecialy Java is sucking nowadays since it take you too much typing for a simple stuff in python.
well thats my take ;)
I will replace C# with C++ and java with python.
C++ and python are taking the PL. Expecialy Java is sucking nowadays since it take you too much typing for a simple stuff in python.
well thats my take ;)
Meaning random_str() inside the method generate_salt() is not defined
just write
return random()
You can checkup mysql multiple selct query from mysql website.
1.left join
2. inner join
3.right join
You need to set the option value.
example
<select name="foo">
<option value="bar">Bar</option>
<option value="thegecho">Thegecho</option>
</select>
That is it buddy ;)
you need a regular expression to take what you need. The next thing is how you get the file to do so. I really dont know how php can do screen scrapping. cgi's is very simple. Thus python or perl .
try php curl functions ok.?
;)
You need a pagination script.
Your style will not work since mysql does not know the next record to show.
;)
You are welcome.
just make 2 panels.
say pan1 and pan2
pan1=wx.Panel(self,-1)
pan2=wx.panel(pan1,-1)
That is it
;)
having a while loop besides the main loop in a GUI is not advisable as it can cause a freeze.
Why not simply have use to menu event tool to update the casscading menu and increase by foo += 1 or foo -=1. Push the newly created into list/dict or even a conf file and update from the list/dic/file inside the menu event method....
That is my take
;)
Associate you guesture with the top/main panel. Example.
pan1=wx.panel(self,-1)
pan2=wx.panel(self,-1)
#Now the buttons and other stuffs on pan2.
#make pan2 inherit pan1 as the parent.
#Associate the gusture on the pan1
That will fix it buddy ;)
easy tonyjv easy tonyjv .
Check your logic well.
Your code will not do waht you expects. Try something that takes real data as you will only have either True or false for the whole bunch .
Doesnt worth it.
Check it up again.
;)
You must also have locales for chinese install on your system
;)
What about if the python script not running???
I think you need a cron job. With cron job you are in win win situation for this operation.
;)
Try and have a good around in the other threads. This has been done myriad times.
Post your code please ;)
Start reading python ftp lib.
Connect via ftp then you get access to the remote system.
bingo ;)
Why upgrade if 2x does the job fine.
good things come to those who wait. ;)
There a re several ways.
I think the most easy and accurate is the wx.Timer() method.
Very simple and handy.
eg:
timer=wx.Timer(parent,-1)
# Then you use the
timer.Stop()
#or
timer.Start()
## In your events method.
check it out ;)
Wooo Slate and tonyjv are really complex
Infact the pseudo of slate is flawless but will a newbie understand the algos.?
I just wrote this as a step by step to the solution. I real life, i advice you to use Slate's example.
labyrinth = \
[[0,0,0,0,0,0,1,0],
[0,1,0,1,1,1,1,0],
[0,1,1,1,0,1,0,0],
[0,1,0,0,0,0,0,0],
[0,1,1,0,1,1,1,0],
[0,0,1,1,1,0,0,0],
[0,1,1,0,1,1,1,0],
[0,1,0,0,0,0,0,0]]
de=0
for x in labyrinth:
for y in x:
de=de+1
if y == 0:
print '##',
else:
print ".",
if de == 8:
print '\n'
de=0
for fun ;)
I am proud of you my goodfriend.
glad you made it.
Mark thread as solved and any upvoting is welcome.
Also, I need help with one thing. When you do anything (add, modify, delete), the changes do not show up untill the user restarts the program. Could someone tell me how to change the code so that the changes show up immediately? If you do not know what I mean, basically when you add a new contact, and then try searching for it, it will not find it untill the user restarts the program.
You need to commit the changes to your file. Writting to file does not write to file instanly until the file is closed. You must close the open files after reading or writting to them. Like that the info added will show straight away.
;)
You see, Daniweb is not for solving peoples problem. We share ideas. Sometimes people or new coders want solution but fails to learn how it is done.
Yes you got it working but do you undestand why it is working???? If you want to be a programmer, learn to understand why not how to.
mmmm ;)
I like personally the wx.FlexGridSizer than all the sizers.
with FlexGridSizer and the normal wx.BoxSizer you can make layouts that you realy desire.
;)
Ask for the sites API for login protocols.
;)
Your def__init__ constructor take args that are no refered anywhere in your code.
Fix that. Use that for basic initializing of your variables.
;)
haha,
tonyjv
Cant you see that it was just a mistake with naming?
Take it easy ok?
try this
gives you the idea. no checkups anyway
#Find odd numbers
def odd_find(fr, to):
if fr > to:
trans = fr
fr = to
to = trans
odd = []
noOdd = []
for x in range(fr, to):
if x % 2 == 0:
odd.append(x)
else:
noOdd.append(x)
print 'Odd Stuff', odd
print 'Not odd', noOdd
odd_find(5,40 )
print out:
Odd Stuff [6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38]
Not odd [5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]
;)
Just incase your last file names are in the third file, use the result to open and read the third file.
thats it :)
meaning????
that file1.txt contains the name of file2.txt and file3.txt and so forth?
make things a bit clearer plz ;)
tonyjv
i admire your python skills
;)
do you have the filenames in another file and want to read those filename one after the other and use the names to open the real files?????
more info needed ;)
Hi, to be precise
1. Your method/function needs 2 arg but you gave only 1.
2. The logic of your function is not complete and will never get you what you want.
The logic flow is not ok.
If you want a fuction to check up words in your dic, its a piece of cake. But untils know... we are going in circles i think.
Put the cards on the table.... what do you really need. We need to solve this once and for all.
;)
you can make a class that inherit both tkinter and wx.
with this you can have both world at your disposal.
;)
How do you guys expert a newbie to understand short algorithm like this.????
Are you helping or showing off???
;)
qingmui does not get you guys ;)
import your new class into your main programe . Then there will be a conection with the event.
Try this fancy stuff:
import time # for time
def chec(sa):
fd=sa
for x in range(1, 10): #fancy.... You dont really need this but mmmm
print ".", #
time.sleep(1) #
print '\n' # you can try
data = []; #make a list
try:
for x in sa:
data.append(x.lower()); #pack the result into the list
d1, d2 = (data[0], data[-1]);
except:
print "Values needed"
else:
if d1 == d2: #check up the results
print 'Check Results'
print "-"*30
print d1.upper(), d2.upper(), 'are the same\n';
else:
print 'Check Results'
print "-"*30
print d1.upper(), d2.upper(), 'are not the same\n'
print "You entered:",fd ,'\n\n'
while True: #
choice = raw_input("Please enter choice [Enter] or Q[to quit]: ").lower().strip()#get data
if choice == "q": #check data
break; #action
else:
try: #exception check
palin = raw_input("Please enter a Phrase: ")
chec(palin)
except ValueError: #catch
print "Enter phrase to check";
print "Check finished" #final line
Look is fun ok ;)
try the improve of hielo.
$f=scandir('/Images/');
foreach($f as $p)
{
if($p=="." || $p=="."){
}
else{
echo '<img src="/Images/'.$p.'" />';
}}
Only flash or cgi script can help you my friend ;)
Try this fancy one.
def chec(sa):
data=[]; #make a list
for x in sa:
data.append(x.lower()); #pack the result into the list
d1 ,d2 =(data[0], data[-1]);
if d1 == d2: #check up the results
print d1 ,d2 , "are the same";
else:
print d1 , d2 , "are not the same"
chec("racecar")
#============== Reuults=============
r r are the same
will do what you wnat i think ;)
We dont solve problems here my good friend.
we share ideas and give direction.
You are welcome anytime ;)
The dic Dictionary is not declared anywhere in your function toPirate.
Neither is it refferenced to. how do you code.
line #8
for words in dic.split(string) #?????
define your function to either contain the dic. Such as
def toPirate(string, **dic):
here you can pass the dic as the last arg.
Also on line 12
result+=[dic[word]] ## wrong
just code
result+=dic[word]
Hope you get the idea ;)
look i dont ge you. do you have to search the dictionary for the word occurance and print them out + a custom words ???
help is on the way
very neat stuff! ;)
also if you are taking in list as methos arg.
its better you provide the arg as list.
like....
def foo(file_name, *word_list):
#bla bla bla
This the wordlist is auto a list container.
;)
Yep woooee
That is it.
Spacemanspiff92 you heard him right.
The wordlist is blank cos the list wordlist got nothing to do with the wordlist in the exportT~ method.
;)
If you wanna use a class, you are definately in for using its member function. Proper encapsulation not when it suites you.
Designing a class is an art.
;)
griswolf,
You are getting into the nitty gritty in O/I stream here which ofcourse is not the point. It was another class operation.
I personally like your illustration about Mr. Number and the flexibility stuff. But does the thread poster?? i dont think so.
No doubt that you got a very fine idea in python and i dont wanna take that from away you.
Maybe you can be my teacher one day. Who knows.? And greetings to Mr. Number ;)