This is my last hang up with this......tryin g to get the app.exe to run with every number in range.
C:\python25>app .exe 0 0 1
C:\python25>app .exe 0 0 2
I guess I need to somehow loop the app.exe as well?
User Profile
Collapse
-
Not pretty?? I think it's beautiful ;) Thanks again to the both of you! I really appreciate your knowledge.Leave a comment:
-
The 2 in the example was just a reference to numbers in the twenties,ie
20
21
22
but I want them to print out with a space:
2 0
2 1
2 2Leave a comment:
-
Thank you both for your replies! One more thing.....how could I do this:
....have the double digits print out with a space between them:Code:i = 0 for i in range(0,30): print i i +=1
2 0
2 1
2 2 etc...
Would something like this work? i = 0 0?Leave a comment:
-
-
Changing Clipboard to Notepad error
I took some C++ code and tried to change Clipboard to Notepad. When I do, I get "Notepad is not defined". I can't find any other references to Clipboard anywhere else in the code. Any ideas?
Code:
Code:if (OpenClipboard(NULL)) { EmptyClipboard(); SetClipboardData(CF_TEXT, hMem); CloseClipboard(); -
Ok, so I found a couple of different ways to get python to run the app.exe, but how do I incorporate the timing code to the exe? If I use the following code, it will run, regardless of the app.exe.
Code:
...Code:from time import time startTime = time() for i in xrange(1000): # simulate an external process for i in range(1000): pass print "Process took %f seconds"Leave a comment:
-
Awesome! That's a great start for me. Thank you! I see what you mean about the raw string as I was getting an error message with app.exe....Leave a comment:
-
Thank you for the reply. I know the path of the exe. Could I do something like this:
As far as the numbers go, the script will need 4 integer variables from 0-1000 and will slow when the right number is crossed and then move on to another series of 0-1000, and continue to loop for a total of 4 times.Code:import os, sys pyPath = "C:\python25\app.exe"
Here is a sample C++ code...Leave a comment:
-
Opening an exe
I need to write a program that will open an exe and check some timings in it.
point to exe
run exe
check time taken between numbers:
123 (08 secs)
341 (1 sec)
444 (09 secs)
What python functions do I need to research to accomplish this? Thanks -
One more question.....in the code it has this: include 'morsemod.php'; Is that like with other languages where it's making a call to another script that has to be accessed for the entire code to work, or is that just a reference to the actual code itself?Leave a comment:
-
Yeah, I figured that if I posted the website, it might get a negative reaction but for me it's just about having harmless fun and learning things in the process. I had to write a simple program to pass one challenge and it was a rewarding feeling once I finished it. I used python for that one but like I said, I came across this php script and was curious as to how it worked and I wanted to see it in action. Thanks again for the replies & for...Leave a comment:
-
Motoma, here is the site with the challenge. Could you take a quick look at it and see if it's possible to use that .php script to accomplish this? Thank you
http://www.hackthissit e.org/missions/permprogramming/2/...Leave a comment:
-
Yeah, at t35.com I saved the file as a .php but I guess I'm not sure what to do with it from there. Do I open the website with the PNG and then open the file from t35? I'm not sure how that would get the script to run.Leave a comment:
-
I'm not sure if my webserver has php enabled. The page where the image is viewed is online and the solution to it changes with every failed attempt. As for the php code, I came across it on a site in a forum similar to this one and I copied and pasted it into Notepad for the time so I could have it handy. Now, I have and account at t35.com, which is a free webhosting site, and I put the code in there and saved it as a .php file, if that helps an...Leave a comment:
-
Well, it just makes the code visible on the actual page so I figured I should post specifics. Below is the challenge and the php code:
[PNG image=small black box with white dots throughout]
The pixels in the above image are numbered 0..99 for the first row, 100..199 for the second row etc. White pixels represent ascii codes. The ascii code for a particular white pixel is equal to the offset from the last white pixel. For example,...Leave a comment:
-
-
Thank you for the quick reply. So let's say I have this:
<?php
blah
blah
blah
?>
...and I'm on this forum page. I can view the source code, then paste that in to it? Then I have to 'save as' *.php and it should run and count the page characters for me?Leave a comment:
-
Easy PHP question from clueless
Hi....I have a question about PHP, which I know nothing about. I was wondering what to do with some php code that I came across on the internet and I wanted to see how it works. Using this page as an example, let's say the code will count every letter on this page and give an answer. How do I go about getting the code to work? Do I simply insert it anywhere in the source code or does it require 'compiled' like some other languages? -
bvdet, you are my hero! This works! Thanks again for your time and knowledge!
Now I'll finish it off by adding #comments before moving on to another project. Also, thanks for the link and for helping me 'clean-up' the code by keeping it simpler....Leave a comment:
No activity results to display
Show More
Leave a comment: