connection

Python urllib2.open Connection reset by peer error

依然范特西╮ 提交于 2019-12-20 02:27:20
问题 I'm trying to scrape a page using python The problem is, I keep getting Errno54 Connection reset by peer. The error comes when I run this code - urllib2.urlopen("http://www.bkstr.com/webapp/wcs/stores/servlet/CourseMaterialsResultsView?catalogId=10001&categoryId=9604&storeId=10161&langId=-1&programId=562&termId=100020629&divisionDisplayName=Stanford&departmentDisplayName=ILAC&courseDisplayName=126&sectionDisplayName=01&demoKey=d&purpose=browse") this happens for all the urls on this pag- what

PHP doesn't detect connection abort at all

天涯浪子 提交于 2019-12-20 01:59:15
问题 I have read and deeply understood these: http://www.php.net/manual/en/features.connection-handling.php http://www.php.net/manual/en/function.register-shutdown-function.php However, I have tested both PHP 5.1.6 and 5.3 and things DON'T work as described there. What I observe is: connection_status() always return true, even after the client has closed the connection. execution of the script keeps going on after the client has closed the connection, even though ignore_user_abort is 0 a function

Add login and connect to SQL with SQL Server Authentication

a 夏天 提交于 2019-12-20 01:37:08
问题 I want to add a user in SQL Server 2008 so I can use SQL Server Authentication instead Windows Authentication for connecting to SQL, and have tried this code to create a user with login: CREATE login [newLog] with password = 'passnewLognewLog' I get it done, but when I want to connect to SQL Server using SQL Authentication, I get this message Cannot connect to "Mydb" additional information: Login failed for user 'newLog'. (Microsoft SQL Server, Error: 18456 ) What am I missing here? 回答1:

How to test the connection to a db2 database

℡╲_俬逩灬. 提交于 2019-12-20 01:36:21
问题 I need to test the connection to a db2 database. With oracle databases I'd execute a 'select * from dual' in order to do this. But dual is specific for oracle. Is there a similar canonical test sql statement for db2? 回答1: SELECT 1 FROM SYSIBM.SYSDUMMY1 cheaper then SELECT CURRENT SQLID FROM SYSIBM.SYSDUMMY1 回答2: I ended up using SELECT CURRENT SQLID FROM SYSIBM.SYSDUMMY1 which seems to work nice. 回答3: LIST DB DIRECTORY or LIST TABLES 来源: https://stackoverflow.com/questions/4733356/how-to-test

Android Emulator - No internet connectivity

走远了吗. 提交于 2019-12-20 01:35:41
问题 I know that there are several threads posted about this issue, however I believe my problem to be a bit different: I had my Android emulator working without any problems (using Eclipse plugin). I could start the emulator, run applications, and those apps would be able to connect to my computers internet. I then updated the Android SDK's (as I wanted to try out my application on 2.2). Since the update, the emulator will not connect to the internet. If I go to the browser, the page will not be

Python - Server and client problems

蓝咒 提交于 2019-12-19 11:59:14
问题 I'm trying to create a basic server and client script. The idea is that the client can connect to the server and execute commands. Kinda like SSH but very simple. Heres my server code: import sys, os, socket host = '' port = 50103 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((host, port)) print("Server started on port: ", port) s.listen(1) while (1): conn, addr = s.accept() print 'New connection from ', addr try: while True: rc = conn.recv(2) pipe = os.popen(rc) rl = pipe

Diagnosing Connection to SQL Server

血红的双手。 提交于 2019-12-19 11:49:42
问题 I'm trying to create an ODBC connection to SQL Server, but when i do, i get error: Connection failed: SQLState: '01000' SQL Server Error: 10060 [Microsoft][ODBC_SQL Server Driver][TCP/IP Sockets] COnnectionOpen (Connect()). Connection failed: SQLState: '08001' SQL Server Error: 17 [Microsoft][ODBC_SQL Server Driver][TCP/IP Sockets] SQL Server does not exist or access denied. Here's what I've tried: not a firewall issue: tried with firewall on SQL Server turned off, and client turned off. Also

Error Connecting to CouchBase from Node.js using Couchnode module v.1.2.4

旧街凉风 提交于 2019-12-19 10:08:37
问题 Using https://github.com/couchbase/couchnode @v.1.2.4 Attempting to connect to CouchBase server using the code in the README var couchbase = require('couchbase'); var cluster = new couchbase.Cluster(); var db = cluster.openBucket('default'); db.set('testdoc', {name:'Frank'}, function(err, result) { if (err) throw err; db.get('testdoc', function(err, result) { if (err) throw err; console.log(result.value); // {name: Frank} }); }); but am getting the following error: db.js:2 var cluster = new

syncadapter without internet connection

偶尔善良 提交于 2019-12-19 08:17:30
问题 I have a sync adapter that works fine. It does not need internet connection because it needs to sync the addressbook with another local storage (my application). When the Wifi is turned off and the device does not have any internet connection Android disables the sync in the Account & Synch settings activity. Is there a way to keep my synch adapter on even when the connection is off? 回答1: Well there is no way, SyncAdpater framework won't work without internet connection So its better to Re

Does Oracle DB support multiple (parallel) operations per connection?

主宰稳场 提交于 2019-12-19 07:04:15
问题 My Java application needs to hold cursor to Oracle DB for some time. During it other DB statements have to be made. Does this require separate DB connections or same (cursor's one) can be used? Thanks. 回答1: The only restriction is that a single statement can only have a single ResultSet at a given time. Note that a statement can produce multiple ResultSets but you have to access them sequentially (using getNextResult() ) To be able to have multiple open ResultSets/Cursors you need multiple