- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 6
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
42 Posted Topics
Hey guys, I got a little bored and thought I would to make some of the basic Client/Server applications I have a little bit flashier with a gui interface. So far I have just been working with the server and the main problem that I run into is when the … | |
Hi all... Can somebody explain to me why this code only works when I uncomment a specific line. It's not a crazy precision timer or anything just messing around atm, but don't understand the behavior. #include <iostream> #include <string> #include <time.h> // clock_t, clock, CLOCKS_PER_SEC unsigned int timer(){ clock_t t; … | |
Ok so I have my .dll working correctly however I can't get my hook to load properly. When I use GetLastError() to figure out what went wrong I get error code 1428. ERROR_HOOK_NEEDS_HMOD 1428 (0x594) Cannot set nonlocal hook without a module handle. I've seen a ton of examples that … | |
Hello all. I'm working on a simple game at the moment and thus I started heading in the direction of windows hooks. I easily got the low level keyboard hook working. But of course I had to attempt the other version which uses dll's for hooking. After many attempts at … | |
Re: Not sure if this is a proper method or not but I havn't had any problems so far using.... [CODE=python] x = repr(request.urlopen(req).read()) print(x) [/CODE] | |
Re: Well I definatly applaude your effort the way you are coding this project, although I think by now you have the just of functions. And your code at this point is probably pretty confusing even to you at times. Look at this [url]http://www.wellho.net/resources/ex.php4?item=y103/python_switch_case[/url] for some idea of how to shorten … | |
Re: Not sure if you have used classes at all yet, but seems logical to use one for what you are doing. I'm posting an example that hopefully doesn't hurt your head to bad. But you can also just run it to see if this is the kind of functionality you … | |
![]() | Re: I had a go at it although its been a "while" since I coded any python so probably ugly. I also didn't change anything but the comment with your function because it seemed more clear to me that, that is what the function does. Also I really liked the way … |
Re: Yes it can grab specific links, but it can't do it without instructions. You are going to have to tell it where to crawl and why. I'm not sure what you mean by that link is encrypted, but to me it looks like it could have valuable information that you … | |
Re: Maybe post up some code or give some better examples of what you want to do. | |
Re: Hello, I am in a similar position and would be interested to get some more feedback on some of these topics. Although I'm pretty much a hobbiest programmer but I think if you are dealing with anything as far as security goes you would be pretty much dead in the … | |
Re: Well for your first queston I found this that might make things a bit more clear for you. [URL="http://code.activestate.com/recipes/52304/"]http://code.activestate.com/recipes/52304/[/URL] As for your secound question. And I hope I'm not way off in left feild about this. But I believe they are trying to domonstrate that some attributes and methods are … | |
Hello all, I have been trying for a few days now and done quite a bit of reasearch on the internet and this website to find out how I can authenicate to a website. It could very well be that this particualar web server is picky I'm not to sure. … | |
Re: Wow you have really good eyes to catch that by the indentation.:) | |
Re: Unless I'm missing something all you are doing with the variable t_main_page is copying the contents of the variable main_page which already has the information you want. Just return main_page. [CODE=python] #/usr/bin/env/python # Script to fetch and parse the specific web page of PPI for Manufactured Goods # on http://www.stats.gov.cn/english/ … | |
Re: I think it is because you have to be leet to run that code :). J/K... [CODE=python] while count < 256: print(chr(count), count) count += 1 [/CODE] If you run that then look at line 10 of your script you will see where it came from. | |
Re: I found the perfect tool for you. I commonly refer to it as python. It has extensive libraries for parsing files and manipulating strings. | |
Re: If you are not feeling confident in the material you have learned up to this point. Then start writing lots of code to practice those parts until you understand them as well as you understand english, then move on to the next concept. Sometimes when you are in a hurry … | |
Hello all. I been messing around with this port scanner for a while now and can't wrap my head around the speed issue. I tried to create a few threads to help speed it up, but I'm pretty sure I havn't made any progress. Could someone explain why the speed … | |
Re: [CODE=python] #opens a test file to write data to newfile = open("test.py", "wt") newfile.write("TXRGP = 370.5\n") newfile.write("GPYBN = 666\n") newfile.write("FCITC = 690.4\n") newfile.close() #read the file and search for a string #strip of any unwanted charecters newfile = open("test.py", "rt") for line in newfile: if "FCITC" in line: x = … | |
Re: I just started using reg expressions myself, but this should help you figure out how to get the position into your output. It will have to be modified a bit, but here is how I have been doing it. Hope it helps. [CODE=python] import re string = "5672035890" look = … | |
Re: I would assume there are multiple issues that could cause it, does it only crash after the switch to error comes up? What action are you preforming when that error is raised? What are your options when you press switch to? Are you allowing Vista to run these applications with … | |
Re: If I understand what you are saying you want to find the frequency in the regular sentence and then use that number as the number to shift by. If I'm understanding correctly, this may help or at least give you a few new tools to understand and work with. [CODE= … | |
Re: Be a little more specific what is the problem? Are you getting and error, are you getting a diffrent result than what you expected? Also wrap your code in the code tags, it makes it easier to read and locate possible mistakes. | |
Re: "".stringmethod() works if you need an empty string to use the string methods to. | |
Re: Hello, I'm pretty much at the same point you are at as far as working with web pages goes. I havn't actually logged in to a page with user authentication yet, and I'm also using python 3.1, but I did a quick search on google and found this, it looks … | |
Re: It's working, n isn't the amount of decimal points its the number being divided. round(2.5, 5) output = 2.5 round(2.8, 5) output = 2.7999999999999998 | |
Re: One thing that could really help you as well is to write it out in english form so that you can use that as a blueprint for your program. So for instance this project you are working on would look like. 1. Create 2 variables 2. Assign variable value through … | |
Re: You really shouldn't have to pass the variable in the return statement. It should be passed to the "method" inside your "object". class temp(object): #temp is the object def celTofer(self, cel): #celTofer is the method print("I can use ", cel, " now") #if I am x I am 34, If … | |
Hey all, I've figured out how to monitor changes in a directory. But is it possible to monitor if a user is accessing a directory. I assume that when you click on a folder to change directory that triggers some event, but what event and how would I get access … | |
Re: Not exactly sure by looking at the code, but from what you said you let python release first then let the other process access the file, but you didn't say anything about doin the same for that process to release the file for python. It's definatly gonna roll both ways. | |
![]() | Re: [CODE=python] def word(word): print("do you wanna save" + word) print("y=yes n=not this time nn=never") define = input("Enter choice: ") if define.lower() not in never and define.lower() == "nn": never.append(word) elif define.lower() == "y": word = word + " " words.append(word) elif define.lower() == "n": pass else: print("invalid choice") [/CODE] I … |
Re: Yes syntax is very important, just a note for now don't forget it's, print("string") or print('string') The reason you can use either of those is because for instance. print("it's") or print('<HTML BGCOLOR ="black">') So yes when you are just beggining its good to for good habits now to save headaches … | |
Re: Hello, I'm pretty new to network programming as well. But I have managed to get some simple codes working such as a sniffer which can moniter all packets traveling in and out. I would assume that something like this would be useful so maybe read up as much as you … | |
Re: If you posted the function it would probably make more sence, also random I believe is in the eye of the beholder. If you want no reapeats ever, you should probably keep your own log of recorded outputs, if you want it to be random as in you may get … | |
Re: I would break it down into steps. If I were doing it I might read it in as a list, then parse the elements of the list to create my dictionary. [CODE=python] mlist = [] newfile = open("comp.txt", "rt") for item in newfile: mlist.append(item) print(mlist) [/CODE] Then just manipulate the … | |
Hello all, I'm trying to run a simple client/server socket progaram from a refrence of the net to get my feet wet a bit with network programming. I can connect fine but can't seem to send data from the client due to the fact python is saying its of type"str" … | |
Re: Hi, I'm basically a programming hobbiest and new to this forum so I may be wrong, but that being said I don't think you have provided enough information here. Unless of course you are wanting someone to point you in the right direction, or actually code something for you. I'm … | |
Re: Well I havn't done anything with spreadsheets yet but maybe this can help get you pointed in the right direction with how you would structure you're project. [CODE=python] #import os for operating system stuff import os #set path to location of files path = "c:\\lala\\lala\\" #create a list to put … | |
Hello, I'm working on a new little project that moniters a configuration file. Everything seems to work great except for when I attempt to do some error handling. The configuration file simply looks like this. # third sets the lights # 0 = off, 1 = on, 3 = lights … | |
Re: If you want something to keep looping couldn't you just wrap it up in a while loop? While count < somenumber: do these things | |
Hello all I have been a hobbiest programmer for quite some time now and recently got back into it. I'm starting with a pretty simple program that will track inventory for my moms buisness. I've worked through most the common problems but can't seem to figure out why im getting … |
The End.