Posts

Strange behavior of ASP.NET 4.0 Application with SQL Server 2008 -

hi don't know how define problem let me try: have developed asp.net 4.0 application on visual studio .net 2010. deployed on windows xp. application uses database sql server 2008. sql server 2008 installed on windows xp. attached db application, created user db , used following connectionstring in web config. connectionstring="data source=pc-name;initial catalog=databasename;user id=username;password=password;" the application working i.e. querying database when try insert operation gives following error: > server error in '/' application. -------------------------------------------------------------------------------- network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: sql network interfaces, error: 26 - error locating server/instance specified) description: unhandled exception oc...

c++ - How to do AES decryption using OpenSSL -

i'd use openssl library decrypt aes data. code has access key. project uses libopenssl else, i'd stick library. i went looking directly /usr/include/openssl/aes.h since openssl site light on documentation. decrypt function one: void aes_decrypt(const unsigned char *in, unsigned char *out, const aes_key *key); unfortunately, doesn't have way specify length of in pointer, i'm not sure how work. there several other functions believe take numeric parm differentiate between encryption , decryption. example: void aes_ecb_encrypt(*in, *out, *key, enc); void aes_cbc_encrypt(*in, *out, length, *key, *ivec, enc); void aes_cfb128_encrypt(*in, *out, length, *key, *ivec, *num, enc); void aes_cfb1_encrypt(*in, *out, length, *key, *ivec, *num, enc); void aes_cfb8_encrypt(*in, *out, length, *key, *ivec, *num, enc); void aes_cfbr_encrypt_block(*in, *out, nbits, *key, *ivec, enc); void aes_ofb128_encrypt(*in, *out, length, *key, *ivec, *num); void aes_ctr128_encrypt(*...

.net - Does a Thread timeout or Thread.Sleep() for longtime close or abort a thread? -

i have windows service start tasks based on configuration. each task start on own thread, tasks runes once per day. i'm using thread.sleep() , calculate time next run. the problem after 2 or 3 days service still running tasks dont run. the sleep period right, working fine , not getting exceptions. is there make thread stop or sleep method abort thread? this main function of thread private void tasklifecycle() { try { // create task object. type tasktype = type.gettype(this.configurationelement.task); debtlogic.service.backgroundtask bgtask = activator.createinstance(tasktype) backgroundtask; bgtask.context = this; fireevent(createdeventkey, new backgroundtaskeventargs(bgtask)); fireevent(initilizingeventkey, new backgroundtaskeventargs(bgtask)); bgtask.initilize(); fireevent(initilizedeventkey, new backgroundtaskeventargs(bgtask)); /...

c# - Drawing Many Objects to Screen -

i'm working on project in need summarize substantial amount of data in form of heat map. data kept in database long possible. @ point, need store summary in matrix (possibly?) before can draw blocks heat map screen. creating windows form application c#. let's assume heat map going summarize log file online mapping program such google maps. assign color particular address or region based on number of times request made region/address. can summarize data @ differing levels of detail. is, each block on heat map can summarize data particular address (max detail, therefore billions/millions of blocks) or can summarize requests street, city, or country (minimum detail -- few blocks each represent country). imagine millions of requests made addresses. have considered summarizing database. problem need draw many blocks screen (up billions, less). let's assume data summarized in database table stores number of hits larger regions. can draw blocks window without cons...

Ruby on Rails: Generate HTML for each file in a folder -

i have folder list of small *.ogg files insert html.erb page in /public folder. the code within video tags - want use ruby scan folder , produce video snippet each video finds in folder. code stay same between videos, except video filename. the resulting page list of playable videos. any advice awesome. # assumes current dir contains ogg files html = '' dir.glob("*.ogg") |file| html += "<a href=\"#{file}\" />" end puts html # <a href="a.ogg" /><a href="b.ogg" />

Javascript filter partial op -

the function "filter" returns array [0,4] don't understand how gets that. can explain "partial"? built in function? i'm assuming "op" applies ">" operator numbers in array. since 5 greater 0 gets added array "result". how "partial" work? function filter(test, array) { var result = []; foreach(array, function (element) { if (test(element)) result.push(element); }); return result; } show(filter(partial(op[">"], 5), [0, 4, 8, 12])); in case partial takes function of 2 inputs , 1 value. call them f(x,y) , a. returns function of 1 input g(z). when call g(b) returns f(a,b). partial application. filter need functions of 1 input, while '<' 2 input function. partial function takes function , returns function, preassignes 1 (or more) of inputs.

java - Struts2 problem -- values in form not being displayed -

i got following struts2 form in jsp. no values being displayed. can help? <s:iterator value="bulletins"> <s:if test="approved == false"> <s:form action="approvebulletin" method="post"> <table> <tr> <td colspan="2"><b>from:</b> <s:property value="name" /></td> </tr> <tr> <td colspan="2"><b>subject:</b> <s:property value="subject" /></td> </tr> <tr> <td colspan="2"><b>date:</b> <s:property value="date" /> <br> </td> </tr> <tr> <td colspan="2"><s:property value="note...