Posts

c# - The request channel timed out while waiting for a reply -

i have small application uses wcf communicate webserver. program used 200 clients, , each client sending in 5-20 requests/min. looking @ error logs get: the request channel timed out while waiting reply after 00:00:59.9989999 the requests made follows: clientservice client = new clientservice(); client.open(); client.updateonline(userid); client.close(); this app.config <configuration> <configsections> </configsections> <startup><supportedruntime version="v2.0.50727"/></startup><system.servicemodel> <bindings> <wshttpbinding> <binding name="wshttpbinding_iclientservice" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00" bypassproxyonlocal="false" transactionflow="false" hostnamecomparisonmode="strongwildcard" ...

mysql - having trouble writing a query that list all salesmen that did not sell to a particular customer -

i successful in writing query lists salesmen did sell particular customer, not have not. suspect because same salesmen sold specific customer, sold other customers. select a.name salesperson inner join orders b on a.salesperson_id = b.salesperson_id cust_id="4"; i thinking modifying same query trick: .... a.salesperson_id <> b.salesperson_id cust_id="4"; but result lists salesmen. due fact same salesmen returned in original query, sold other customers the 3 tables this: salesperson table salesperson_id, name, age, salary 1 abe 61 140000 2 bob 34 44000 5 chris 34 40000 7 dan 41 52000 8 ken 57 115000 ...

java - Why does DefaultHttpClient send data over a half-closed socket? -

i'm using defaulthttpclient threadsafeclientconnmanager on android (2.3.x) send http requests rest server (embedded jetty). after ~200 seconds of idle time, server closes tcp connection [fin]. android client responds [ack]. should , leave socket in half-closed state (server still listening, can't send data). i expect when client tries use connection again (via httpclient.execute ), defaulthttpclient detect half-closed state, close socket on client side (thus sending it's [fin/ack] finalize close), , open new connection request. but, there's rub. instead, sends new http request on half-closed socket. after sending half-closed state detected , socket closed on client-side (with [fin] sent server). of course, server can't respond request (it had sent [fin]), client thinks request failed , automatically retries via new socket/connection. the end result server sees , processes 2 copies of request. any ideas on how fix this? (my server correct thing...

mysql - PHP Get the most popular item in table -

lets table looks like: username userid a1 1 a1 1 a1 1 b2 2 c2 3 d2 3 the popular username: a1 how find popular item in table? select username, count(*) frequency your_table group username order frequency desc limit 1 would yield single row: username | frequency ---------+---------- a1 3

php - Deleting a database value after a confirmationscreen - value not deleting -

i posted likewise question yesterday ran other problem. made confirmation screen use of javascript, after pressing "ok" value isn't deleted. this code: <script type="text/javascript"> function confirmation() { var answer = confirm("weet u zeker dat u deze activiteit wilt verwijderen?"); if (answer){ alert("de activiteit wordt nu verwijderd."); window.location ="roosters_verwijderen.php"; } else{ alert("de activiteit niet verwijderd."); } } </script> this button: <a href="roosters_verwijderen.php?activiteitid='. $row['activiteitid'] .'" onclick="confirmation(); return false"><img src="iconen/kruis.png" border="0"></a> the problem here is, "activiteitid" isn't sent page "roosters_verwijdweren.php" anymore. can me solve this? try code of function: ...

c# - How to format a column with number decimal with max and min in DataGridView? -

i want format decimal places displayed , captured in datagridview, have minimum number of decimal places , maximum number of decimal places. example: if caught, "120.0" display "120.00" if caught "120.01" display "120.01" if caught "120,123" display "120,123" if caught "120.1234" display "120.1234" if caught "120.12348" display "120.1235" (round) in datagridview column "txtcdecimal" has property (from designer) txtcdecimal.defaultcellstyle.format = "n2"; txtcdecimal.defaultcellstyle.format = "0.00##"; // answer. not work event interfered the mask "0.00##" work "n2" 2 decimals correct rounding 2 decimal places not need (as show in example) how can in simple manner without consuming many resources? thanks harlam357 & tom garske to format between 2 , 4 decimal places can use custom format string. txtcdecimal....

C# security of resource files -

i looking hour, didn't find anything. read tutorial resource files , decided try them. surprised when saw output, because resource files changed in dlls , weren't in .exe file. my question are: how these files safe? what safe store in them? the first google hit on "resource files security site:msdn.microsoft.com" states: caution do not use resource files store passwords, security-sensitive information, or private data. they don't no reason: resource file default not encrypted or obfuscated, program resource editor, msil.exe, or justdecompile can see contents of resource file. you can apply encryption using sort of key, again you'd have store key somewhere decrypt resources. key subject same problems: securely store that, attacker can't use decrypt resources? it's nigh impossible if have distribute program, alternate solution. perhaps explaining you're trying helps towards useful answer.