0 down vote favorite I have created a network scanner, that looks for a specific port on a range of IP's. I would like to thread the application but I am getting and error message ERROR: for worker in range(network.hosts): TypeError: 'method' object cannot be interpreted as an integer Now I understand why the error is there it is because the IP Address is not an INT. However, what I would prefer to do is split the subnet into equal parts and run X number of IP's on a per thread bases. Example Thread 1 192.168.1 - 30 Thread 2 …

Member Avatar
Member Avatar
+0 forum 1

Hi, i am using setExpirationSeconds() to set the timeout for user. but how to update the timeout timestamp in data base when user session expires automatically due to user inactivity. Regards, Nabin

Member Avatar
Member Avatar
+0 forum 2

Hi, am not a experianced coder, would like to seek for help. i would like to create a session logout. a pop out appear which able to count 60 sec " Warning your eMyHome session will expire in 60 seconds. Do you wish to continue?" with button continue & logout. i would like below to be coded in my script. 1. if click on continue it should appear after the 60 sec if session idle 2. if click on logout go back to main page 3. if nothing/no response then sys automatically show the main page after the session expired. …

Member Avatar
Member Avatar
+0 forum 2

Hi there - I had written some php for users to login to a password protected part of our site. Today an SSL certificate was installed. Previous to the SSL being installed the pages would timeout and kick the user out to the login screen after a certain period of time. Since the SSL was installed it kicks the user out to the root of the site. The only difference was that I had to change the .htaccess file to route everyone to the https instead of the http. Could this be the error? The .htacess code is: [CODE]RewriteEngine On …

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I currently have a custom network protocol I have written that uses the NetworkStream class. Within my protocol I have implemented a way to detect data that also works as a timeout. This seemed to be working fine until my client uploads an image of approx 24kb+ and then my timeout method fails and returns which then causes the upload to fail. Does anybody have any pointers as to where I am going wrong? The code I have is below: public bool WaitForData(int TimeoutSeconds) { if (TimeoutSeconds < 0) // No timeout { while (__netstream.DataAvailable == false) Thread.Sleep(1); …

Member Avatar
Member Avatar
+0 forum 1

Hello. I have a function that checks the internet connection. I need to set a timeout to it. I have tried without success to do that. Please help. Here is the function: function isOnline() { if(navigator.onLine){ var uri = baseUrl+'ping'; var xhr = new XMLHttpRequest(); xhr.open('GET',uri,false); try{ xhr.send(); return true; }catch(err){ return false; } }else{ return false; } }

Member Avatar
Member Avatar
+0 forum 1

Using Python 3.3.0 and this script: from ftplib import FTP_TLS ftps = FTP_TLS('xxx.xx.xxx.xx') ftps.sendcmd('USER myuname') ftps.sendcmd('PASS mypwd') ftps.prot_p() ftps.retrlines('LIST') ftps.quit() I get a connection failure due to timeout >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:\Python33\fixFTP.py", line 2, in <module> ftps = FTP_TLS('xxx.xx.xxx.xx') File "C:\Python33\lib\ftplib.py", line 685, in __init__ FTP.__init__(self, host, user, passwd, acct, timeout, source_address) File "C:\Python33\lib\ftplib.py", line 114, in __init__ self.connect(host) File "C:\Python33\lib\ftplib.py", line 148, in connect source_address=self.source_address) File "C:\Python33\lib\socket.py", line 424, in create_connection raise err File "C:\Python33\lib\socket.py", line 415, in create_connection sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt failed because the connected party …

Member Avatar
Member Avatar
+0 forum 3

I'm writing a script to automatically up load a file from Server A to FTP server B. I'm getting stuck at the connecting part. I can connect with a python script using regular FTP, and have done so, but when trying to implement a SSL connection, I keep getting a timeout. I can't figure out why. Have searched here and stackoverflow. Any ideas welcomed! I've verified the SSL setup on the receiving server by manually connecting using a Filezilla client Here's my script: from ftplib import FTP from ftplib import FTP_TLS ftps = FTP_TLS('xxx.xx.xxx.xx') ftps.auth() ftps.sendcmd('USER User') ftps.sendcmd('PASS Password') ftps.prot_p() …

Member Avatar
Member Avatar
+0 forum 1

What would I need to add to the code below to have the random redirect timeout for 5 seconds before triggering? <script type="text/javascript"> (function(n){ var pages = ['http://www.thestormybrain.com/2013/11/malcolm-gladwell-choice-happiness-and.html', 'http://www.thestormybrain.com/2013/11/steve-jobs-how-to-live-before-you-die.html', 'http://www.thestormybrain.com/2013/11/david-blaine-how-i-held-my-breath-for.html']; n = n < 3? 0 : n < 8? 1 : 2; window.location.replace(pages[n]); })(Math.floor(Math.random() * 10)); </script> I know what a regular redirect looks like, but I don't know where to place it within this special array. <script type="text/JavaScript"> <!-- setTimeout("location.href = 'http://www.yourURL.com';",1500); --> </script> Thanks for any help you're able to provide!

Member Avatar
Member Avatar
-1 forum 2

i am using the below code for creating the connection to database. connectionURL = "jdbc:oracle:thin:@//testdsfsdfgs:1521/TEST"; conn = DriverManager.getConnection(connectionURL, userName,Password); i want to set the transaction time out. How can i do that. Please some one help. Thanks in advance

Member Avatar
Member Avatar
+0 forum 5

Hi! I have a work Samba file server on Ubuntu Server 12.04. I can successfully add small files to it like docs and pdfs. However when I try to add a large file, for instance a 1.2gb video file, the server appears to timeout after appearing to be halfway completed. What can I do to solve this error? I looked into the logs and this is apparently what occurred: smbd/process.c:244(read_packet_remainder) read_fd_with_timeout failed for client 0.0.0.0 read error = NT_STATUS_CONNECT$ How can I resolve this to allow for these bigger files to be transferred to the server? Thanks!

Member Avatar
+0 forum 0

I have three scripts running under crontab and theyre executing perfectly (see the log below): Oct 9 10:40:01 servercharlie CRON[29850]: (root) CMD (php -q /var/www/folder/script-3.php) Oct 9 10:41:01 servercharlie CRON[29861]: (root) CMD (php -q /var/www/tasks/script-1.php) Oct 9 10:42:01 servercharlie CRON[29867]: (root) CMD (php -q /var/www/tasks/script-1.php) Oct 9 10:43:01 servercharlie CRON[29873]: (root) CMD (php -q /var/www/tasks/script-1.php) Oct 9 10:44:01 servercharlie CRON[29879]: (root) CMD (php -q /var/www/tasks/script-1.php) Oct 9 10:45:01 servercharlie CRON[29887]: (root) CMD ( php -q /var/www/script-2.php) Oct 9 10:45:01 servercharlie CRON[29888]: (root) CMD (php -q /var/www/tasks/script-1.php) Oct 9 10:45:01 servercharlie CRON[29889]: (root) CMD (php -q /var/www/folder/script-3.php) Oct 9 10:46:01 servercharlie …

Member Avatar
Member Avatar
+0 forum 7

I am running easyphp12 running mysql as a local db server for a some software. This software can also connect to a remote db where it doesnt give this error while performing the exact mysql query, so I only get the error when using the local db. Ive tried increasing max_execution_time in php from 30 seconds to 180 then 300 then 600 and none of this has helped. Any suggestions? Here is an image of the timeout error. http://i46.tinypic.com/302s9oz.jpg

Member Avatar
Member Avatar
+0 forum 1

` connectionString="Data Source=########;Initial Catalog=DowntimeD51;Persist Security Info=True;User ID=#######;Password=########;Connection Timeout=120;Encrypt=False;TrustServerCertificate=False;Network Library=dbmssocn"` I have the above connection string in a vb windows application , This is part of my app config file. I then have a number of table adapters for connecting my business logic to the database , One of the queries inparticular is a pretty large one and requires extra time to complete however the connection is getting a timeout error. When I checked the adapter connection with `Dim connection2 As Int32 = Adapter1.Connection.ConnectionTimeout` This shows the connection time out to be 120 seconds but the timeout is still occuring after …

Member Avatar
Member Avatar
+0 forum 2

Hey all, writing some code but keep getting a javascript related "Not Implemented" error. The code is window.onload=setTimeout('loadAll()',10); The code works fine but the error is annoying in that "An error has occured.." keeps popping up. Oh how I love cross browser coding. Anyways, any input is appreciated, thanks!

Member Avatar
Member Avatar
+0 forum 1

I am trying to connect to an external server via FTP using windows explorer. On other computers I have no problems but on 2 computers, the windows explorer comes up and asks for the password as usual but will then run through twice and time out. Clicking on the refresh button then brings up the relevant folders and the connection is made. Unfortunately while this is eventually working, it takes a considerable time to come up. I am running windows 7 and IE 9. I have turned off all firewalls, doesn't help. I have also added the website as a …

Member Avatar
+0 forum 0

I am a web developer who has just had PHP thrust upon me. I have created a login-protected site and have put a timeout script on each page which redirects the user back to the login page if they have left the site idle for a certain period of time. In Opera and Safari it works great but in Firefox the login page still has the login credentials in the text fields, so anyone could just press "login" and log right back into the site, which sort of defeats the purpose. Exhaustive Google searches have turned up nothing. Any advice …

Member Avatar
Member Avatar
+0 forum 2

I hate websites that timeout and don't let you know about it this script pops up a message when you timeout and allows you to re-login in place

Member Avatar
+0 forum 0

Actually I'm trying to open serial port to send logging data in j2me. When I connect my phone via usb cable to pc my code works correctly. But when I start app without usb cable connecting to phone it is hanging up. [CODE]private static void sendToSerial(String msg) { try { if (msg == null) return; msg += getEol(); // append End Of Line symbol "\r\n" CommConnection comm = (CommConnection)Connector.open("comm:" + getComPort()); OutputStream os = comm.openOutputStream(); os.write(msg.getBytes()); os.close(); comm.close(); } catch (Exception error) { error.printStackTrace(); } } [/CODE] in above code getComPort() returns "com0" string. Is there any way to use …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have a WCF Webservice, and I have an asp.net application that uses this web service. I Have them both running on the same machine, but get a time out. Is there something I have to specify myself in the web.config? I am fairly new in WCF, as this is my first project using it, so please as informative as possible! Thanx

Member Avatar
Member Avatar
+0 forum 2

I have two tables: CDDemographics and CBTechProviderData. Both have 200,000+ rows. A common column between these tables is CensusBlockID, of which the first 5 integers are the fips code - in this case I am defining that code as 55001. I am trying to sum the population of CensusBlockIDs where a certain technology type is present. The query below seems to be okay syntax-wise (maybe not?), but my server times out: [CODE]SELECT SUM(Population) FROM CBDemographics WHERE CensusBlockID IN (SELECT CensusBlockID FROM CBTechProviderData WHERE LEFT(CensusBlockID, 5) = 55001 AND TransTech = 80)[/CODE] The subquery identifies all the CensusBlockIDs that match the …

Member Avatar
Member Avatar
+0 forum 2

My friend has two HP desktop computers running Windows XP (SP3) in his living room and entertains many, many guests daily. Guests who do not usually carry laptop/netbook with them are allowed access to these computers and their internet connections without much supervision. Most of said users are very respectful of their privileges and limit their usage mostly to checking emails, updating Facebook/MySpace/Twitter, etc., or playing games (either already installed or online) without downloading more apps and toolbars or worse. I have for months been acting as an ad hoc administrator, handling antivirus/malware scanning, updates, fixing crashes. I am by …

Member Avatar
Member Avatar
+0 forum 1

Hi While learning how to create and manage a session, I got through session time out technique, I got throw 2 ways : 1. Setting up garpage collection directive in php.ini file and 2. Create a session variable named, say, EXPIRE that holds the value [code]$_SESSION['EXPIRES']=time()+360;[/code] at the beginning of a session and then keep checking if it's the correct time to expire or not yet. My question is : which is the best practice in practical life? to depend on the server configuration file? or create your custom time out session?? Thank you in advance

Member Avatar
Member Avatar
+0 forum 2

Could somebody please help me to add a function to this script in which the image to test if the server is up has a timeout, so it shows an error message to the user instead of just loading forever. The current function of the code is: Attempt to load the image, Show the user the webcam on success, on failiure it says the webcam is offline (but uses a timeout set by the browser I think or just a default timeout which takes ages) Show an alert box after 3 minutes that the user has to close to continue …

Member Avatar
+0 forum 0

Hi All, thanks in advance for any replies. Environment: PHP5, MySQL, Windows XP/Server 2000/Server 2003. Problem: Using shell_exec to run a small program connected to a database, waiting for it to finish and then outputting a file which was produced. All was fine until I got a new and larger database, now my script will run for 10+ minutes before timing out when it hangs on the shell_exec function. Until the timeout, I can see a new instance of CMD.exe appear as expected. Yet when I run the exact same command (referenceing the same database) manually in a command prompt …

Member Avatar
+0 forum 0

The End.