Posts

Showing posts from January, 2015

oracle - How to get combined output from a inner subquery? -

my output: a b c d e f 773 26 429 150000 500000 800000 773 26 117 150000 500000 800000 808 26 26 150000 500000 800000 809 26 26 150000 500000 800000 need output below: a b c d e f 773 26 429 150000 773 26 117 150000 808 26 26 500000 809 26 26 800000 i need column d e & f shown above.based on column amount in d,e,f should displayed. how acheieve this? thanks in advance. you can use case determine whether value of column or null should returned select , b , c , case when 773 d else null end d , case when 808 e else null end e , case when 809 f else null end f table_name ;

Redis SignalR performance inconsistency -

i looking scale out signalr application, , i'm testing few ways it. when tried "redis" got results, unfortunately, when sent few bulks of messages recieve time each bulk inconsistent. (varies x10) i tried same sql scaleout (also built in, in signalr) , had more stable results. is normal?

android - My application is not listed for tablets -

i have uploaded play.google.com new application: https://play.google.com/store/apps/details?id=development.nk.anguide the problem can not install application in tablet. @ optimization tips there following message: "your apk needs meet following criteria: required hardware features available on tablets." this manifest file: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="development.nk.anguide" android:versioncode="2" android:versionname="1.01" > <supports-screens android:resizeable="true" android:smallscreens="true" android:normalscreens="true" android:largescreens="true" android:xlargescreens="true" android:anydensity="true" /> <uses-sdk android:minsdkversion="8" andro

php - Implode JSON object -

below given, code: $array=$_post[number]; $jstring = json_decode($array,true); $sa = "'".implode("','",$jstring)."'"; the error given below. warning: implode() [function.implode]: invalid arguments passed <root> on line <line no> number json object. can me out? please. thanks in advance. edit: number json string. need comma separated. number holds phone numbers mobiles contact. need each number used in sql query . problem fixed: fixed problem. sharing others. $array = $_post[number]; $json = (array) json_decode($array,true); $sa = "'" . implode(',', $json) . "'"; if you're having trouble debugging, use var_dump or in combination gettype() around argument you're trying implode. never need implode json objects, decoded find. make sure know difference between csv (comma separated values) , json. csv: believe,it,or,not,i,am,csv whereas json: {&qu

c++ - service discovery with android smartphone and other devices -

in environment have android smartphone , other devices. other devices running linux. devices connected local network via wifi. want smartphone recognize , discover other devices in network, need implement kind of service discovery. there should no user interaction necessary on other devices. after that, 2 devices should able pair each other. i've read android has support network service discovery (nsd) . nice thing seems work across android devices, right? in case, other devices custom hardware running embedded linux. progamming languages not same. applicateion on other decices implemented using c++. i've read simple service discovery protocol (ssdp) . guess should work in platform independent manner, right? can provide simple explanation how realize using ssdp? recommend ssdp implement service discovery? there useful libraries android , c++? or suggest other approaches realize trying do? regards we have done somethign similar between ios , mac devices us

iphone - get birthdate, birthplace from mediawiki xml format api -

i trying details of person mediawiki in objective-c . using http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&rvsection=0&titles=albert_einstein&format=xml i getting data in response follow: </i>$0 = 0x07562e60 <?xml version="1.0"?><api><query><normalized><n from="albert_einstein" to="albert einstein" /></normalized><pages><page pageid="736" ns="0" title="albert einstein"><revisions><rev contentformat="text/x-wiki" contentmodel="wikitext" xml:space="preserve">{{redirect|einstein}} {{good article}} {{pp-semi|small=yes}}{{pp-move-indef}} {{infobox scientist | name = albert einstein | image = einstein 1921 f schmutzer.jpg | caption = albert einstein in 1921 | birth_date = {{birth date|df=yes|1879|3|14}} | birth_place = [[ulm]], [[kingdom of württemberg]],

Android how to change contents of edittext in real time -

this question has answer here: how use textwatcher class in android? 7 answers i looking make app converts 1 unit another(say currency). consists of 2 edit-texts. 1 in user enters value , second contains result. now, here, instead of having 'convert' button put value in second edit text, converted value appear in second edit text enter values first one. how can achieve this? thanks use textwatcher this. set on edittext user types in: myedittext1.addtextchangedlistener(new textwatcher() { @override public void aftertextchanged(editable s) { string value = s.tostring(); // perform computations using string // example: parse value integer , use value // set computed value other edittext myedittext2.settext(comput

scala - Changing Scalatra Port -

this sounds basic, cost me whole day: want change change port scalatra runs on, in development. started hello world g8 template, , have been building there. here's i've tried far: changing port in build.scala, ala documentation: http://www.scalatra.org/guides/deployment/configuration.html doesn't compile, because port undefined. changing port in build.scala, ala these 2 examples: https: gist.github.com dozed 58af6cfbfe721a562a48 https://github.com/jamesearldouglas/xsbt-web-plugin/blob/master/src/sbt-test/web/servlet/project/build.scala same problem: port undefined redefining entry point, ala http: www.scalatra.org guides deployment standalone.html still runs on port 8080 changing init params in bootstrap, ala http: www.scalatra.org guides deployment configuration.html still runs on port 8080 any appreciated. can't post more 2 links reason, replace spaces forward slashes follow urls. here's build.scala in case helps. import sbt._ import keys.

c# - AES to return Alphanumeric -

i have aes encryption code, want make return alphanumerical characters {0123456789abcdefghijklmnopqrstwuvyz} but not figure out how that. have no idea encryption, not figure out fix. apreciate feedback. regards... public class clscrypto { private string _key = string.empty; protected internal string key { { return _key; } set { if (!string.isnullorempty(value)) { _key = value; } } } private string _iv = string.empty; protected internal string iv { { return _iv; } set { if (!string.isnullorempty(value)) { _iv = value; } } } private string calcmd5(string strinput) { string stro

How to record requests during testing Javascript crawler (Capybara + Poltergeist) in Ruby? -

i using capybara + poltergeist replacement mechanize. mechanize doesn't support javascript , want scrap page heavily uses js , iframes. i using similiar approach this: http://www.chadcf.com/blog/using-capybara-javascript-capable-replacement-mechanize but haven't found resources how record requests in vcr capybara. simple recording vcr: true doesnt works... any thoughts?

database - Issue with EntityManager with Tapestry and JPA -

i've been trying go tapestry-hibernate tapestry-jpa. i've followed user guide http://tapestry.apache.org/integrating-with-jpa.html , however, i'm experiencing some, me unknown, exceptions , have no more ideas how solve it. 2013-07-25 12:36:20.608:warn::failed app: java.lang.runtimeexception: exception constructing service 'registrystartup': error invoking service contribution method org.apache.tapestry5.jpa.jpamodule.startupearly(entitymanagermanager, boolean): no persistence providers available "demounit" after trying following discovered implementations: none 2013-07-25 12:36:20.608:warn::failed startup of context org.mortbay.jetty.webapp.webappcontext@2bbd9de3{/addressbook,c:\users\eivaore\workspaces\training\addressbook\src\main\webapp} java.lang.runtimeexception: exception constructing service 'registrystartup': error invoking service contribution method org.apache.tapestry5.jpa.jpamodule.startupearly(entitymanagermanager, boolean): n

c# - Why should I use "About box" instead of using a form to display about Information in Visual Studio? -

i have confusion, why should use "about box" item provided microsoft visual studio display information app instead of using "windows form" item same, while have found inherent box difficult used compared "windows form"? there's no reason far know, other convenience. has layout, , version information - don't have write it. it's damn ugly though.

Writing text in MS WORD -

i developping application export few number of edittext in ms word file (.doc) formating text (font, textsize, underlined text, bold, breaking line etc) asking if there library doing or code. please think's. yes sure there is, depends on text editor use. if use dreamweaver, can paste in liveview (try it, it's worth it, download demo) assume dont have so, use website here. give me tick if you're happy answer :)

javascript - Generate poll/survey code from ordered list of answers to be used in email newsletter -

i have little problem need generate poll/survey template list of answers used in email newsletter. so - poll created in cms , answers displayed in ordered list. there's text field in list item users input answer. - beneath ordered list textarea button called "generate poll code" right beneath - on clicking button, javascript should generate desired "template" answers, answer ids , poll id in anchor links query (as shown below). so ordered list markup following: <ol id="9999"> <li id="1234"><input value="answer1"/></li> <li id="5678"><input value="answer1"/></li> <li id="9876"><input value="answer1"/></li> </ol> where poll id id of ordered list , each li has answer id. what i've been trying simple list of anchor links: poll question<br /> <a href="http://urlpath?pollid=9999&answer

javascript - how to display the node attributes like person's name photo and address in a force directed graph -

hi working on force directed graph example of d3.js library want fix positions of nodes. , when click on node want display pop shows image , info of user(node). i'm going best answer, there lot cover in question, more of overview of more info, , bit started down right path. please excuse shoddy links ( can't post more 2 yet...) nodes can fixed position setting boolean "fixed" property of each individual node true. see sections on: # force.nodes([nodes]) https://github.com/mbostock/d3/wiki/force-layout to make nodes clickable, attach event listener node selection appending new nodes node selection. see here: github /mbostock/d3/wiki/selections#wiki-on to add more properties each node, add data objects inside "node" array before joining selection. here edit made show how can add drag behavior, , mouse "click" listener event toggle nodes between fixed=true , false, comments on add additional node properties, , possibly make

How to hide animation in DrawableAnimation android -

i have written animation progressdialog . want stop , hide animation when click button. here codes. protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); img = (imageview)findviewbyid(r.id.imageview1); startbutton.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { img.setbackgroundresource(r.drawable.animitems); myanim = (animationdrawable)img.getbackground(); if(videoview.isplaying()){ videoview.pause(); myanim.stop(); myanim.setvisible(false, true); startbutton.setbackgroundresource(r.drawable.andplaybtn); }else{ startbutton.setbackgroundresource(r.drawable.andstopbtn); myanim.start(); videoview.start(); } } }); you see have used drawableanima

objective c - How to use properties in Obj C -

i trying learn how use properties in ios programming. want check people here if got right? say have property @interface person : nsobject @property nsstring *firstname; @end in implementation @implementation xyzperson @synthesize firstname; ... @end by this, a) instance variable named: firstname created b) whenever want use property inside class, call self.firstname (or setter/getter) c) can initialize property in init method this: -(id) init { ... self.firstname=@"sometext"; ... } i believe points mentioned above, correct, right? what pretty correct although missing few things @property declaration. need @ least property attribute strong or copy or assign . strings might mutable, use copy ensure string can't modified under us. @property (copy) nsstring *firstname . see answer more details this . most people use nonatomic improve performance disabling thread synchronization in generated getters/setters. see answer more in

c++ - How to split a full=number into two groups according to their position(even or odd) -

i need split txt file 2 arrays txt file contains full number.can without string? example,for input 4(how many line) 2 1 3 7 8 0 3 7 i want array 1 contains (firt number in line) {2 3 8 3} array 2 contains (second number in line) {1 7 0 7} how can that?just curious...here code not work.. ifstream ifs("sth.txt"); int g; ifs>>g; int girl[g]; int boy[g]; for(int i=0;i<2*g,i++;){ if (i%2==0)ifs>>gil[g]; if (i%2==1)ifs>>boy[g];} cout<<boy[1]; ifstream ifs("sth.txt"); int g; ifs>>g; int girl[g]; int boy[g]; for(int i=0;i<g,i++;){ ifs>>girl[i]; ifs>>boy[i]; } cout<<boy[0]; you reading girl[g] , boy[g] instead of 0..(g-1) . i changed reading: 2 ints insted of 1 in 1 iteration of loop. at end changed counting first (index 0) instead of second element of boy .

python - How to open a form in editable mode -

models.py class userprofile(models.model): user = models.onetoonefield(user) phone_daytime = models.charfield(max_length=50, null=true, blank=true) class user(models.model): first_name = models.charfield(max_length=30) last_name = models.charfield(max_length=30) email = models.charfield(max_length=75) password = models.charfield(max_length=75) views.py def profile(request): """""" registerform = userregisterform(request.post) createprofileform = usercreateprofileform(request.post) if registerform.is_valid() , createprofileform.is_valid(): result = registerform.save(commit=false) result.set_password(request.post['password']) result.save() member.user_id = user.id member.member_id = result.id member.save() member_profile = userprofile.objects.get(u

Magento, access functions in Mage_Core_Helper_Abstract -

im new magento just installed plugin http://shop.bubblecode.net/magento-attribute-image.html going well, on product view page run following code attribute ids $ids = $_product->getdata('headset_features'); now above plugin states comes helper http://shop.bubblecode.net/attachment/download/link/id/11/ the function in class need use is public function getattributeoptionimage($optionid) { $images = $this->getattributeoptionimages(); $image = array_key_exists($optionid, $images) ? $images[$optionid] : ''; if ($image && (strpos($image, 'http') !== 0)) { $image = mage::getdesign()->getskinurl($image); } return $image; } i struggling make use of function. noticed in helper class bubble_attributeoptionpro_helper_data extends mage_core_helper_abstract here thought should work echo mage::helper('core')->bubble_attributeoptionpro_helper_data->getattributeoptionimage($ids[0]); but not workin

ios - Image on UITableView Cell -

i have different folder on document directory , have images on each folder. want display 1 image different folder. have tried program crashe @ line. - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"cell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) { cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier]; } //i dont know put here display sqlite nsuinteger row = [indexpath row]; cell.textlabel.text = [array1 objectatindex:row]; //cell.detailtextlabel.text = [array2 objectatindex:row]; nsstring *b = [array2 objectatindex:row]; nslog(@"b=%@",b); nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nslog(@"%@",paths); nsstring *documentsdirectory = [paths objectatindex:0]; nserror *error =

jQuery, issue with .each() -

i want reduce every sentence has more 3 letters, code showing first 3 letters, adds "...", clicking on these "..." want show whole sentence. when i'm clicking on every single "..." reveals every sentence instead of sentence clicked on. my code is: $('.test').each(function(){ var el = $(this); var textori = el.html(); if(textori.length > 3){ el.html(textori.substring(0,3)+'<span class="more">...</span>'); } $(document).on('click', el.find('.more'), function() { el.html(textori); }); }); here jsfiddle: http://jsfiddle.net/malamine_kebe/gxdsj/ the syntax you've got click handler isn't correct, because it's inside each loop, because you're not limiting text swapping element clicked. try this: $('.test').each(function(){ var $el = $(this); var originaltext = $el.html(); if (originaltext.length >

Python logging message redirection and filtering -

i looking extend single-user console application allow access multiple users. main purpose user see status of system , issue single commands. all logging performed python's logging module , works great single user can specify logging level interested in seeing in console. however, when comes allowing multiple users, need abstract simple output of log messages console. question is, best way redirect output of logging module location? also, how can distinguish log level of individual messages in order show varying verbosity different users? guess parse out , the debug/info prefix but, surely, there has better way "tag" individual messages. more details: at moment, user views messages on local console in future, there more clients connected via web-based terminal emulations ajax updating (hence need more control) this sounds architectural question. if understand requirements properly, looking this, you have python based system 1 or more standard

android group GPS coordinate by postilion -

i have punch of gps coordinates (latitude longitude) want create groups each 1 contain coordinates in same radius , iam using code distance between 2 points:- float radius = (float) 1000.0; float distance = loc.distanceto(loc2); if (distance < radius) toast.maketext(getapplicationcontext(), "inside", toast.length_long).show(); } but code need compare each coordinate rest check 1 closest ,which seem insufficient , there other way? thanks in advance the other way use geo spatial index, quad tree . in case first calculate quad cells within radius, , consider points inside cells. but programming, search , understanding effort, use such index when brute force search on points slow.

Google BigQuery insert using POST -

i'm trying insert data bigquery table using post request. application create body request in specified format: --xxx content-type: application/json; charset=utf-8 { "configuration": { "load": { "sourceformat": "newline_delimited_json" }, "destinationtable": { "projectid": "some-id", "datasetid": "dataset-id", "tableid": "cards" } } } --xxx content-type: application/octet-stream {"board_id":1,"version":2,"card_id":1,"title":"tytul kartki 1"} --xxx-- but when send data using: credentials = signedjwtassertioncredentials( service_account_email, key, scope='https://www.googleapis.com/auth/bigquery') self.http = credentials.authorize(httplib2.http()) headers = {'content-type': 'multipart/related; bo

java - Connection Reset -

i using sql server database, jtds driver , java1.6.0_16. in client code, want execute number of query(stored procedure) , write data file. first query executed , write file. second query executed , while iterating result set object, thrown exception "java.sql.sqlexception: i/o error: connection reset" **below full stack trace :** caused by: java.sql.sqlexception: i/o error: connection reset @ net.sourceforge.jtds.jdbc.tdscore.nexttoken(tdscore.java:2277) @ net.sourceforge.jtds.jdbc.tdscore.getnextrow(tdscore.java:761) @ net.sourceforge.jtds.jdbc.jtdsresultset.next(jtdsresultset.java:593) ... 2 more caused by: java.net.socketexception: connection reset @ java.net.socketinputstream.read(unknown source) @ java.io.datainputstream.readfully(unknown source) @ net.sourceforge.jtds.jdbc.sharedsocket.readpacket(sharedsocket.java:860) @ net.sourceforge.jtds.jdbc.sharedsocket.getnetpacket(sharedsocket.java:707) @ net.sourceforge.jtds.jdbc.responsestream.getpacket(responsestrea

Windows Phone 8 skydrive backup isolated storage -

i developing windows phone 8 application, saves data isolated storage (text,images,...) i create backup skydrive functionality recovery , want ask if can backup isolated storage whole, , recover it? the procedure be: (1) generate file (like zip) containing whole isolated storage, (2) upload skydrive, (3) downloading skydrive , (4) replacing data downloaded file existing files in storage.

oauth - Does the Paypal user_id for a user ever change? -

i trying user paypal oauth login authenticate users on django system. getting user_id not match user_id got when user logged in via paypal. other details same same account. has else seen paypal user_id changing on time?

bash - Parsing a flag with a list of values -

i'm creating bash script involves parsing arguments. usage be: $ ./my_script.sh -a arg_1 -b arg_2 [-c list_of_args...] using getopts i'm able parse -a , -b , respective values arg_1 , arg_2 . if , if user places -c last argument, i'm able -c , create list values in list_of_args... . but not force user insert -c last flag. instance, great if script can invoked way: $ ./my_script.sh -b arg_2 -c v1 v2 v3 -a arg_1 here current code: while getopts a:b:c opt case $opt in a) a_flag=$optarg ;; b) b_flag=$optarg ;; c) # handle values regular expressions args=("$@") c_list=() (( i=$optind-1 ; <= $#-1 ; i++ )) c_list=("${c_list[@]}" ${args[$i]}) done ;; ?) usage ;; esac done on system, haven /usr/share/doc/util-linux/examp

python - access search from XML file -

my code make search in xml file ( function "findterminal") specific attribute name , pass other function ( called dbaccess) find attribut in access database . attribute name not concatenated in database, had make comparison. buut nothing happend when execute code ? import csv import pyodbc xml.dom import minidom # ************************************* def dbaccess (term): mdb = 'c:/test/mydb.mdb' drv = '{microsoft access driver (*.mdb)}' pwd = '' conn = pyodbc.connect('driver=%s;dbq=%s;pwd=%s' % (drv,mdb,pwd)) curs = conn.cursor() print 'connexion opened' sql = 'select * gdo_arc;' # insert query here curs.execute(sql) curs.execute("select nat_arc gdo_segment") rows = curs.fetchall() row in rows: t = 't' + row.tronson + '_' + row.noued1 + '-' + row.noued2 if t == term : print (' terminal found') curs.close() conn.close() #************

joomla2.5 - How To Solve Ambiguous Joomla Link -

i still don't understand joomla menu structure. let have categories structure below category 1 - category 1.1 - category 1.2 - category 1.3 - category 1.4 category 2 - category 2.1 - category 2.2 - category 2.3 - category 2.4 then, create menu, structure of menu follow home category 1 ( article >> categories ) -- category 1.1 ( article >> category blog ) -- category 1.2 ( article >> category blog ) -- category 1.3 ( article >> category blog ) -- category 1.4 ( article >> category blog ) category 2 ( article >> categories ) -- category 2.1 ( article >> category blog ) -- category 2.2 ( article >> category blog ) -- category 2.3 ( article >> category blog ) -- category 2.4 ( article >> category blog ) so, when create menu, run joomla, let open category 2 page, joomla show categories child of category 2 (including links). however, when open 1 of category child directly page (n

content management system - Orchard CMS Widget Creation -

my goal create series of widgets orchard can re-use on following projects. with in mind i'm able create widgets particular theme utilising migrations.cs file have found in orchard docs: http://docs.orchardproject.net/documentation/widgets stating: "a widget composed of 2 or more files placed in /packages/[mypackage]/widgets directory of application." suit me better in theory each widget have it's own folder, manifest txt , self contained it's own resources. my question is: link out of date , therefore incorrect? , if not add 'packages' folder (i've tried adding various places inc 'src' folder) can't work. creating widget way possible? thanks in advance i have been working orchard since version 1.4 , haven't faced type of code crate widget.i think article out of date check link instead create widget. in short sentence widget contenttype has part called widgetpart , has stereotype of widget .the migration wi

wsdl - PHP SoapClient - SOAP ERROR Fatal error couldn't load from external entity -

i'm using php soapclient in order connect webservice. $this->client = new soapclient($this->wsdl, array('trace'=>true, 'cache' => wsdl_cache_disk)); i have many requests each day , i'm getting following error exception soap: soapfault exception: [wsdl] soap-error: parsing wsdl: couldn't load 'http://ws-rca.24broker.ro/?wsdl' : failed load external entity "http://www.example.ro/?wsdl" in ... i repeat, it's not happens time. it's happening couple seconds. so wanted check if in moment when error occurs, wsdl can accessed, in try/catch statement use file_get_contents above url, , seems wsdl & running because can xml code, in exact moment when error occurs. so tried: spoke guys hosting company handles above url; said wsdl & running @ time checked server log files; nothing related above error except error does have clue what's happening ? thanks. look php.ini , if: default_socket_t

java - Why is my program only letting me input one value after the first iteration of the for loop? -

this question has answer here: scanner skipping nextline() after using next(), nextint() or other nextfoo()? 12 answers i extremely new java programming , trying make poker hand evaluator. asking suit , value of card, using loop. reason, works first iteration of loop asks me 1 value after that. here code: import java.util.scanner; public class pokerrun { public static void main(string[] args) { int [] suit = new int[5]; int [] value = new int[20]; card card1 = new card(); scanner in = new scanner(system.in); int counter = 1; system.out.println("welcome poker hand evaluator!"); for(int = 1; i<6; i++) { system.out.println("what suit of card " + + "?\nplease type suit in lowercase letters: "); card1.suit = in.nextline(); system.out.println("what value of card " + + &

vb.net - Visual Basic 2010 Finding objects at a point on the form -

so i've been doing programing in visual basic 2010. program need determine whether there object @ point on main form [for example (20, 35)]. tried: dim objectfind object objectfind = me.getchildatpoint(20, 35) i'm not sure if works, objectfind equals {system.windows.forms.form} figured if objectfind doesn't equal {system.windows.forms.form} me there's different object there, did: if objectfind <> system.windows.forms.form ' code here end if but visual basic says system.windows.forms.form can't use in condition. i've done lots of research , didn't find on how find object @ point in visual basic. i tried: if objectfind.equals(system.windows.forms.form) = false ' code here end if i got same error before. since system.windows.forms.form main form tried: if objectfind.equals(me) = false ' code here end if but false no matter object @ (20, 35) in case not sure question is: how can find

winapi - Check if Windows OS runs in safe mode -

what windows api call need in order check whether system booted in safe mode or normal mode? call getsystemmetrics( sm_cleanboot ) , nonzero value.

sql server 2008 - DB2 Connect issue using Native OLE DB\MS OLEDB Provider for DB2 -

i downloaded , installed driver setup file, db2oledb.exe, here: http://download.microsoft.com/mwg-internal/de5fs23hu73ds/progress?id=hylbkufgnl using connection string worked on pc, tried create connection object in ssis package. when tested connection got error: test connection failed because of error in initializing provider. tcpip socket error has occurred (10057): request send or receive data disallowed because socket not connected , (when sending on datagram socket using sendto call) no address supplied. any suggestions on cause of error , how might resolve issue? by way, when use db2 configuration set utility , test connection within that, able connect. what other info can provide answer question? thank you could related blocked port? if follow steps illustrated here: http://www.bidn.com/blogs/patrickleblanc/ssis/700/connecting-to-db2-using-ssis still same result? maybe silly question, did restart computer after installation? admin user on 1 machin

TCP Sockets and .Net Micro Framework -

i'm new sockets , can't seem app working. want send log file netduino+2 laptop. approach took prepend file size byte array before sending. however, never seem receive send. realize common problem folks new sockets , i've searched high , low find tips on how avoid problem. maybe unique micro framework, kind of doubt it. here code. i've got client app runs on n+2 , console app running on laptop. data file i'm retrieving attached below. sort of works, not delivering file consistently. can give me appreciated. client app running on n+2. when press onboard button, sends file. using system; using system.net; using system.net.sockets; using system.threading; using system.text; using system.io; using microsoft.spot; using microsoft.spot.hardware; using secretlabs.netmf.hardware; using secretlabs.netmf.hardware.netduino; namespace socketclient { public class program { static string strdeviceip = ""; static string strdevic

sql server 2008 - How can I transpose multiple lines of data into strings with a unidue ID? -

i have file millions of rows need convert. i'm having trouble getting desired result wanted defer experts; select [id], min ([date]) 'payment1', min ([date]) 'payment2', 'payment2' > 'payment1' min ([date]) 'payment3', 'payment3' > 'payment2' min ([date]) 'payment4', 'payment4' > 'payment3' [fp&a].[dbo].[paymentschedules] group [id] order [id] it looks want select 4 lowest distinct dates 4 payments. present easy understand way this: find payment1 join table again find payment2 join table again find payment3 ... the end result here: with step1 ( select id, min(date) payment1 ps group id ), step2 ( select step1.*, min(date) payment2 step1 join ps on step1.id = ps.id step1.payment1 < ps.date group step1.id, payment1 ), step3 ( select step2.*, min(date) payment3 step2 join ps on step2.id = ps.id step2.payment2 < ps.date group step2.id