Posts

Showing posts from July, 2014

c# - Why doesn't the socket close on the other side of the socket? (close_wait)? -

c# - Why doesn't the socket close on the other side of the socket? (close_wait)? - i have issue sockets. i'm creating socket between computer , phone send messages. when close server or client sends fin packet , stays in fin_wait2 state minute. however, other side stuck in close_wait state, apparently incapable of closing socket. reckon sockets should closed instantly, maybe should somehow implement code in client closes socket when server wants close , vice versa. how can that? you need close both ends of socket channel. if server closes connection client, client needs close connection on client-end, lastly fin packet transmitted (from client server). trigger lastly state transition in tcp state machine. c# c++ c sockets

How do you output a resources file from C# application? -

How do you output a resources file from C# application? - i using visual c# 2010 express. set .dotx or word template files resources folder of application , when installed, output files different directory preferably c://myfolder/. couldn't find here. there ways solve this? click on resources (in "properties"), , on arrow next "strings" , take "files". then drag file in , name it. use: properties.resources.filename; which byte[] , , save using: file.writeallbytes(environment.getfolderpath(environment.specialfolder.userprofile) + @"\filename", properties.resources.filename); c# file resources

c# Stream data not reading correctly -

c# Stream data not reading correctly - solved issue was assuming got info @ 1 time when told read, escaping out of read screenshot method , dumping info pack packet parser, proceeded spam console junk >.< thanks jon. i have new problem, time cant figure out whats wrong info streams, i'm attempting stream image files captured central networked server, have client > server set up, talking fine, passing info , forth day long, when effort phone call screenshot function , send it, thats issues. the current code im using is: notes datahandler wrapper sending , receiving data, addvar overloaded method takes variable , sends through stream (new datahandler(stream)) datahandler linked tcp stream readint , readlong etc reverse, helper functions facilitate making code easier maintain later. at point server sends out ping every second, client, client set respond ping if isnt busy responding packet (the incoming packets run on single thread) server follo...

ios - MFMessageComposeViewController inserts a new line at the end -

ios - MFMessageComposeViewController inserts a new line at the end - i've made little app ios utilize apple's mfmessagecomposeviewcontroller send sms/imessage. saw inserts new line ( \n ) @ end of text sent. checked how in other apps using mfmessagecomposeviewcontroller , turned out new line appears there too, should not fault. is there way tell mfmessagecomposeviewcontroller not insert annoying line, or maybe possibility delete myself after displaying view controller? ios mfmessagecomposeview imessage

qt - QRubberBand colour isn't changed under Mac -

qt - QRubberBand colour isn't changed under Mac - this code draws qrubberband in bluish colour under windows doesn't work under macos. , wonder why? qrubberband *rubberband = new qrubberband(qrubberband::rectangle, this->imagelabel); rubberband->setgeometry(rec); qpalette palette; palette.setbrush(qpalette::highlight, qbrush(qt::darkblue)); rubberband->setpalette(palette); i've resolved way: qrubberband *rubberband = new qrubberband(qrubberband::rectangle, this->imagelabel); rubberband->setgeometry(rec); qpalette palette; qcolor color(qt::blue); color.setalpha(80); palette.setbrush(qpalette::highlight, qbrush(color)); rubberband->setpalette(palette); now rubberband same under macos , windows. qt

google app engine - Why can't GWT deserialize the native datastore key any more? -

google app engine - Why can't GWT deserialize the native datastore key any more? - i've started have problem having upgraded of libraries: i using gwt 2.4, app engine 1.6.3 , objectify 3.0. i upgraded gwt 2.5, app engine 1.7.4 , objectify 4.0b1. since getting unusual error only 1 other person seems have on entire internet! stack trace: class="lang-java prettyprint-override"> caused by: com.google.gwt.user.client.rpc.serializationexception: com.google.appengine.api.datastore.key/1349195865 @ com.google.gwt.user.client.rpc.impl.serializerbase.gettypehandler(serializerbase.java:153) @ com.google.gwt.user.client.rpc.impl.serializerbase.instantiate(serializerbase.java:114) @ com.google.gwt.user.client.rpc.impl.clientserializationstreamreader.deserialize(clientserializationstreamreader.java:396) @ com.google.gwt.user.client.rpc.impl.abstractserializationstreamreader.readobject(abstractserializationstreamreader.java:119) @ com.googlec...

x86 - Assembly I/O programming -

x86 - Assembly I/O programming - i have learned bit of assembly code , learned there is't much tutorials on net this. wondering sending signals devicesex. parallel ports, usb(perhaps)i wondering if there code can share lead me in right direction. , in-case didn't know signal mean sending out voltage.so sum know how interact ports assemblyi using dosbox running assembly, , using flat assembler program. running on window 8.thanks in advance, 36redsoxfan i'm not fasm expert... but, according post... may or may not fasm... http://board.flatassembler.net/topic.php?t=8638 set bios bidirectional parallel port mode (spp) this sets i/o permission: mov eax,101 ; sys_ioperm mov ebx,base_parallel ; 378h mov ecx,size ; 3 mov edx,1 ; turn on int 80h test eax,eax js error_set_io to write: mov dx,37ah in al,dx , al,11011111b ; reset bit 5 ( write mode) out dx,al ...

iphone - Showing a view controller modally in monotouch -

iphone - Showing a view controller modally in monotouch - in monotouch based ios project , have 2 view controllers .on first viewcontroller have created button xib. on selection of button want display sec view controller not happening , causes application crash. so in design.cs file way button created [outlet] monotouch.uikit.uibutton firstbutton { get; set; } [action ("clickme:")] partial void clickme (monotouch.foundation.nsobject sender); this in button action method in .cs file, causing crash. partial void clickme (monotouch.foundation.nsobject sender) { secondviewcontroller secondviewcontrollerobject=new secondviewcontroller(); this.presentviewcontroller(secondviewcontrollerobject, true, null); } error description :- got sigabrt while executing native code. terminating runtime due unhandled exception unhandled exception: 0 testingfirstproject 0x0008ebce mono_handle_exception_internal_first_pass + 2190 1 testingfirstpro...

Not selecting columns from Table in MySQL with NULL values -

Not selecting columns from Table in MySQL with NULL values - i know if there way next in mysql select relevant row table excluding columns null values. for eg : table : ---------------------------- id hdr1 hdr2 hdr3 ---------------------------- 1 7.8 9.0 null 2 8.0 10.0 7.8 3 7.8 7.8 null ---------------------------- if require row id 1, need sql statement homecoming next : id hdr1 hdr2 1 7.8 9.0 is possible in mysql. mysql

javascript - event listening jQuery -

javascript - event listening jQuery - in page beingness iframed in have code window.parent.trigger('swipeforward'); now need hear event in parent jquery(document).ready(function () { //how hear here swipeforward event }); just other event: $(window).on('swipeforward', function () { // code goes here... }); don't forget wrap window.parent in jquery: $(window.parent).trigger('swipeforward'); javascript jquery events

ios - Retrieving Twitter OAuth Token using Social Framework (iOS6) -

ios - Retrieving Twitter OAuth Token using Social Framework (iOS6) - i'm little confused how twitter oauth token using ios social framework. assuming have facebook , twitter business relationship setup on ios6, , can acaccount. when check acaccountcredential facebook acaccount oauthtoken property set twitter acaccount isn't. every other detail twitter acaccount set acaccountcredential not. to add together confusion came across article on using reverse auth oauth token (https://dev.twitter.com/docs/ios/using-reverse-auth). article talks calling https://api.twitter.com/oauth/request_token , passing in dictionary of oauth_* params params e.g. consumer_key, nononce, etc. but, certainly attaching acaccount slrequest serves purpose? in event error "failed validate oauth signature , token" when seek this. so question should seeing twitter oauth token in acaccountcredential, or should using reverse auth? , if so, need explicit pass in nsdictionary containing oaut...

Creating a Java Combination Lock -

Creating a Java Combination Lock - i'm working on computer science assignment, , can't life of me figure out why isn't working. we're supposed create combination lock (via constructor) prompts user letters spell out password. the kicker has allow user create few mistakes @ first. example, if password were d o g the user type in a b c d o g and unlock combination lock. the attached code my... 5th effort @ this, , i'm not quite sure why it's not working. ideas? edit: code on ideone: http://ideone.com/d3yfyt http://ideone.com/jzmnjj thanks in advance!! maybe not getting explanation correctly, apologies... why don't merge input , test if input .endswith("dog"). if that's not point can list few more scenarios? java

.htaccess - Redirect 301 from /store to / -

.htaccess - Redirect 301 from /store to / - my store 1 time named domain.com/store it's domain.com but google links dead due this, how can prepare this? can create rewrite how old domain.com/store/category/item.html redirected domain.com/category/item.html ? redirect 301 /store/ http://www.domain.com/ adding .htaccess solved problem .htaccess redirect

linux - Accessing a SMB share without a password -

linux - Accessing a SMB share without a password - when accessing smb shared password-protected, smbclient works fine. but when i'm trying access shared have no password protection (public shares), smbclient prints: tree connect failed: nt_status_access_denied how can access shares? i'm trying access windows 7 ubuntu 12.10 linux windows ubuntu smb shared-folders

actionscript 3 - AS3 (Flex/MXML) rtmp connection rejected on localTrusted file -

actionscript 3 - AS3 (Flex/MXML) rtmp connection rejected on localTrusted file - i'm writing application connects external rtmp server live stream. opening file firefox on localhost (apache 2.2 server) works fine , i'm getting stream. if i'm opening file file protocol (file:///) error "netconnection.connect.rejected" , "netconnection.connect.closed". i'm assuming happens because of security restrictions of flash player , have set flash file trusted in /etc/adobe/flashplayertrust/trusted.cfg (after alter security.sandboxtype returning localtrusted). alter connection still gets rejected. rtmp address contains port 1935 , have tried utilize rtmpt protocol in case i'm getting error "netconnection.connect.failed". the event handler gets thrown netstatusevent there no security exception. have read many documentations , looked hours can't figure out why doesn't work. actionscript-3 flex mxml rtmp

ruby on rails - How to change error message of model in rails3 on attach file name -

ruby on rails - How to change error message of model in rails3 on attach file name - i need alter error message my model code is: class resume < activerecord::base attr_accessible :key_skills, :resume_category, :about_myself, :year_experience, :month_experience, :current_salary, :education_details, :jobs_preference, :resume_title,:avatar,:avatar_file_name,:avatar_content_type has_attached_file :avatar, :storage => :dropbox, :dropbox_credentials => "#{rails.root}/config/dropbox.yml", :dropbox_options => { :unique_filename => true } validates_format_of :avatar_file_name, :with => %r{\.(docx|doc|pdf)$}i,:message => "accept doc , pdf" but error message displaying on submit form : "avatar file name take doc , pdf" i need error message: "accept doc , pdf" you have alter :"errors.format" in locale file, format: %{message} . doing this, each mes...

lambda - Removing duplicates in list results with unneeded tail -

lambda - Removing duplicates in list results with unneeded tail - i want remove duplicates given list . consider next code : % check if given element in given list member(element,[element|_]). member(element,[_|list]):-member(element, list). % append element if it's not in input list appending([],x,x). appending([h|t1],elem,[h|t2]):- appending(t1,elem,t2). appendhlp(listorg,res,addme):- not(member(addme,listorg)), appending(listorg,[addme],res). appendhlp(listorg,res,addme):- member(addme,listorg), res=listorg. % remove duplicates setify([h|t],set):-appendhlp(set,output,h), setify(t,output). setify([],_). and when run code : 1 ?- setify([1,2,3,3,2],x). the output : x = [1, 2, 3|_g2725] how can remove tail ? thanks i quite new prolog. solution came remove duplicate elements. hope helps. % define negation of "member" notmember(x,l) :- not( member(x,l) ). % remove duplicates termi...

.net - Unable to start Windows Service that hosts WCF service with NetNamedPipeBinding binding -

.net - Unable to start Windows Service that hosts WCF service with NetNamedPipeBinding binding - i creating windows service supposed host wcf service netnamedpipebinding binding. next code: protected override void onstart(string[] args) { var servicetype = typeof(iservehi); var namedpipebinding = new netnamedpipebinding(); namedpipebinding.security.mode = netnamedpipesecuritymode.none; var namedpipeendpoint = ""; var basenamedpipeuri = new uri("net.pipe://myworkstation:51301/"); // line # 41 host = new servicehost(typeof(servehi), basenamedpipeuri); host.addserviceendpoint(servicetype, namedpipebinding, namedpipeendpoint); host.description.behaviors.add(new servicemetadatabehavior { httpgetenabled = true}); host.open(); } the installutil.exe able install it. however, when seek start service, message the windowsservicehost1 on local computer started , stopped. services stop automatically if not in utilize other...

javascript - Set the bubble color on a bubble chart based on the value -

javascript - Set the bubble color on a bubble chart based on the value - i have set colors of each bubble on bubble chart based on number have on array. thing know is: if value equal 3, color has "#a68500" if value equal 0, color has "#fff79b" so, if 1 element of array has value "2.5" have find color represents number in color scale. i'm using dojox.charting, have no thought how create function that, based on value, returns color. any thought helpful!!!! function getinterpolation(x, min1, max1, min2, max2) { homecoming math.round(x/(max1-min1)*(max2-min2)+min2); } use getinterpolation(2.5, 0, 3, 0xff, 0xa6); each rgb component. if utilize in loop can alter min , max const values. javascript

validation - How to validate XML (via an XSD file) in Haskell? -

validation - How to validate XML (via an XSD file) in Haskell? - i using hxt transforming xml. want validate input , output against xsd-file. hxt seem include relaxng , dtd validators. i don't care utilize else validating. the closest can think haxml , elbow grease: https://hackage.haskell.org/package/haxml-1.25.3 in particular, have tools parse xsd , validate dtd. don't there's "out of box" way validate xsd -- possible nail info want dtd format, or replicate validation logic against parsed xsd. at to the lowest degree that's start... xml validation haskell xsd hxt

How do you turn an element into an ms ajax object? -

How do you turn an element into an ms ajax object? - i have element $get(myid).children[0] i want turn element ms ajax object but $get($get(myid).children[0]) doesn't work. $get finds element. if have element represents ajax control, utilize $find, takes id of command param, in: $find("mycontrolclientid") so you'd want do: $find($get(myid).children[0].clientid) if first kid ajax command ui element. asp.net-ajax

vba - How to use a static member in UDF that is called by query? -

vba - How to use a static member in UDF that is called by query? - i have query 1 of values returned udf: select name,coord,convertcoord(coord) testtable; convertcoord() uses regex , matchcollection objects homecoming value: dim re new regexp dim mtch match dim matches matchcollection function convertcoord(str string) string re.pattern = "(find|this)pattern" set matches = re.execute(str) if matches.count > 0 set mtch = matches(1) convertcoord = mtch.value else convertcoord = "" end if end function i'm trying speed query, , i'm wondering if there's way create 1 instance of re , mtch , , matches can referred every phone call convertcoord() . if understand correctly, every result row in query calls convertcoord() , constructs , destructs objects repeatedly, , object creation slows downwards query. or static, , hence constructed once, because i've declared them outside of function? you can utilize st...

browser - WAMP Directory Forbidden Error -

browser - WAMP Directory Forbidden Error - i'm running wamp on windows 7, , have 2 virtual hosts set -- 1 @localhost , 1 @acutek.local. can pull both pages in browser without issue, know basic setup correct. localhost index.html file, i've changed acutek.local -- acutek.local bunch of files, no more index html or php page. when pull acutek.local, tree-structure list of files: which seems fine @ first; can browse through directories , see contents. however, when seek load specific file, fails. "403 forbidden - don't have access / permissions..." error. if seek loading robots.txt file screenshot. however, if add together html file t same directory robots.txt , seek open browser, loads fine. i didn't see answers explain in other stackoverflow posts. out of curiosity, know why forbidden error non-html files? have assumed if problem browser displaying files error other permissions error. edit here httpd.conf file: (localhost c:/wamp/www, , acut...

python - How can display the lines from linux log file in browser -

python - How can display the lines from linux log file in browser - i getting lines linux log files , displaying in bowser using django. they displaying same paragarah want show them new lines they display in nelwines if warp them in <pre> lines </pre> html tags not rendered properly is there way display in format newlines , html tag rendered properly you can utilize built-in template tags: {{ lines|linebreaks }} or {{ lines|linebreaksbr }} python linux django

ember.js - How can I use a custom/dynamic attribute for a view in Ember JS? -

ember.js - How can I use a custom/dynamic attribute for a view in Ember JS? - my handlebars file looks bit this: {{#each book in view.bookcase}} {{view app.bookview classbinding="book.read:read:unread"}} {{/each}} i'd add together attribute tune of book-id="1" or whatever current book's id is, have no thought how. if seek this... {{#each book in view.bookcase}} {{view app.bookview book-id="book.id" classbinding="book.read:read:unread"}} {{/each}} ...then attribute literally gets set "book.id". ideas? hmm, @ first thought using attributebindings allowed according this post , this post, when seek it, error: uncaught error: assertion failed: setting 'attributebindings' via handlebars not allowed. please subclass ember.view , set there instead. so think best method doing in class instead. handlebar template: <script type="text/x-handlebars"> {{#each book in vie...

regex - How to identify files which have empty new lines at the bottom of the file -

regex - How to identify files which have empty new lines at the bottom of the file - i have several files either have 2 or 3 or more empty lines @ bottom of of file. how find such files , remove empty lines in automated fashion. you can utilize regex dotall option selected ^(\r?\n){2,}$ and replace nothing regex eclipse

Get the data in Word Excel and PDF format of datagridview using C# -

Get the data in Word Excel and PDF format of datagridview using C# - i have 1 windows form , datagridview on it, want info of datagridview in word, excel or pdf format code please using c# in visual studio? c#

maven - How can I compile and run my Custom Doclet class in my project? -

maven - How can I compile and run my Custom Doclet class in my project? - i'm trying dump class javadoc comment (preferabbly subclasses of libraries webpage class) @ compile time .properties file in format classname=comment . so far have: created doclet class sitemapdoclet the class defined scan javadocs in project , dump them .properties file added necessary configs pom.xml work. versions: java 1.6.0.21, maven 2.2.1 problem: mvn site returns: embedded error: error rendering maven report: exit code: 1 - java.lang.noclassdeffounderror: org/apache/commons/logging/logfactory @ us.ak.state.revenue.cssd.personnel.utils.sitemapdoclet.<clinit>(sitemapdoclet.java:27) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:5...

php - Array isn't being seen by function.. storing in variable a no-no? -

php - Array isn't being seen by function.. storing in variable a no-no? - i've googled around , didn't see answer. have array i'm storing in variable i'm trying pass function.. $myarr = 'array('item1', 'item2')'; require('script.php'); //where actual function makecode($myarr); when utilize makecode(array('item1', 'item2')); works fine.. i've tried add together global $myarr makecode , didn't work either. i'm thinking it's scope problem, maybe i'm misusing string. print_r($myarr) prints properly, isn't passing or something. the function compares $myarr values , if matches what's in function's array, outputs right html, didn't list it. works, not variable.. thanks! --makecode()-- function makecode($listarr){ /* global $myarr; //tried */ $output = ''; $items = array( 'item1' => "code item1", 'item2'...

c# - How to export Large dataset (around 40k rows and 26columns), to be written in excel sheet -

c# - How to export Large dataset (around 40k rows and 26columns), to be written in excel sheet - we have big dataset (around 40k rows). want write excel file. i have tried writing excel file writing info cell cell , works. the problem face , takes lot of time write excel. is there efficient way same. instead of looping through every row/column, assign total dataset array in memory - , assign array range object of same dimension. in vba, like: dim arr variant arr = ... ' code fill array here set workbook("yourworkbook").worksheets("worksheetname"). _ range(1,1).resize(40000, 20).value = arr hope can translate c#... c# excel dataset

mysql - No dialect mapping for JDBC type: 0 -

mysql - No dialect mapping for JDBC type: 0 - if run query in hibernate this: sessionfactory.getcurrentsession().createsqlquery("select 'test' dual 1=2").list() i correctly size=(0) . however when run hibernate query this: sessionfactory.getcurrentsession().createsqlquery("select null dual 1=2").list() i error saying `"no dialect mapping jdbc type: 0"? how can prepare instead of error results size=(0)? * edit * configure dialect hibernate in hibernate.cfg.xml so: <property name="dialect">org.hibernate.dialect.mysqldialect</property> try: <property name="hibernate.dialect">org.hibernate.dialect.mysql5dialect</property> mysql spring hibernate

How does the model update the view in MVC pattern? -

How does the model update the view in MVC pattern? - i have confusion construction of mvc pattern. in places while searching on google found model updates views subscribed model. how model updates view in mvc pattern? can give me simple , clear thought how happen giving example? thanks mvc comes in variety of flavours. sounds may have been reading supervising controller pattern in view observes on changes model. i see past questions , answers php. i'm not sure how mutual supervising presenter in php (i've never used it, interested know if others do). mutual in .net applications (eg winforms) model can databound ui control. view notified of changes model subscribing model events. anyhow, because thought fun seek in php set example: <?php $input = array(2, 3, 4, 5, 6, 7, 8, 9, 10); $model = new model(1); $controller = new controller( $model, new view($model, 0), new view($model, 2) ); $controller->doaction($input...

Android HorizontalScrollView disable touch handling but allow child get events -

Android HorizontalScrollView disable touch handling but allow child get events - i have case includes 3 scrollviews stacked next way: horizontalscrollview on top , contains layout, has scrollview , contains layout containing horizontalscrollview . horizontalscrollview --------scrollview ------------horizontalscrollview without top horizontalscrollview touch event's work okay, , need disable top horizontalscrollview , allow child's events normally, kid horizontalscrollview scroll top horizontalscrollview . thanks. i not clear regarding want but, should work, ontouchlistener skiptouchlistener = new ontouchlistener() { @override public boolean ontouch(view v, motionevent event) { //do nil homecoming false; } }; yourview.setontouchlistener(skiptouchlistener); this way yourview not process touch events. android android-layout horizontalscrollview android-scrollview

asp.net mvc - Adding model with user input and hard coded values -

asp.net mvc - Adding model with user input and hard coded values - okay using mvc framework. have view adding model. @ moment using default "create" controller. i want able create model own variables pre-set. illustration model.userid want set users id. want values inputed user , want set. there way this (pseudo code) model.matchid = 123 model.prediction type = "user input" add together model here current code below @using (html.beginform()) { @html.validationsummary(true) <fieldset> <legend>predictions</legend> <div class="editor-label"> @html.labelfor(model => model.matchid, "match") </div> <div class="editor-field"> @html.dropdownlist("matchid", string.empty) @html.validationmessagefor(model => model.matchid) </div> <div class="editor-label"> @html.labelfor(model => model.userid,...

database - Accepting user input in MYSQL? Shell Script / Batch File -

database - Accepting user input in MYSQL? Shell Script / Batch File - here issue. have set of sql database queries triggering using shell script , corresponding batch file .sql extension. of queries require manual user input (as per request), have had no luck implementing in script. as of now, take in user input date through shell script: echo "please specify date in yyyy-mm-dd format: 'input;" read input mysql -u user -ppass < batch_file.sql i pass variable $input batch file. the batch file sql queries beingness executed looks this: select count(*) count subscriptions date_add(optin_date, interval 1 year) between "$input" , date(curdate()) , active = 1 , stype = "domain"; where "$input" variable passed downwards shell script. any ideas bee appreciated, give thanks you. try doing using here-doc in script : #!/bin/sh echo "please specify date in yyyy-mm-dd format: 'input;" read input ...

Understanding javascript functions, scope and closures -

Understanding javascript functions, scope and closures - can explain in detail snippet of js does? (function (window) { var test = window['test'] = {}; test.utils = new(function(){ ... })(); })(window); i understand function not globally scoped. understand creating variable called test points property in window object empty object. understand utils property of test. i don't understand purpose of lastly part (window); or why utils function beingness designated new . please explain. javascript scope closures

javascript - single line if statement -

javascript - single line if statement - please help me. using single line javascript if statement, want execute 2 actions after has checked status not know how set sec statement. thought semicolon work, doesn't. says semicolon error. here code, semicolons... this.classname === "unclickedbutton" ? this.classname = "clickedbutton"; $("#alert").style.display="block" : this.classname = "unclickedbutton"; $("#alert").style.display="none" you can this, using comma operator: this.classname === "unclickedbutton" ? (this.classname = ($("#alert").style.display="block", "clickedbutton")) : (this.classname = ($("#alert").style.display="none", "unclickedbutton")); ...but wouldn't makes readable code. i'd utilize normal if . here's live example using jquery (source). (i used show , hide , see below). seriously, comp...

c - How to see CUDA thread value using Nvidia NSight in VS 2010? -

c - How to see CUDA thread value using Nvidia NSight in VS 2010? - i know there way @ variable values in given kernel, example, threadidx.x = 1 on info working , what's value of data? all working correctly, question how see variables can in normal vs, using "quick watch" or "add watch", equivalent in nsight? give thanks you, have been struggling few hours now. i have cuda info window , cuda warp window showing blockidx, threadidx coordinates when debuging through nsight. __global__ void addkernel(int *c, const int *a, const int *b) { int = threadidx.x; if(i<n) c[i]=a[i]*b[i]; // dummy code if(i<2) int k=i; } my kernel called addkernel<<<1,n>>>(dev_c,dev_a,dev_b) and #define n 10. i set breakpoints within if , else. output in warp window set show: *(a+i) *(b+i) *(c+i) 0 0 -1 0 2 1 -1 1 4 4 -1 2 6 9 -1 3 8 ...

windows - Msbuild works via VS and command-line, but fails via Jenkins -

windows - Msbuild works via VS and command-line, but fails via Jenkins - i trying build vs .sln has multiple c++ .vcproj's in it. solution file generated using cmake , i've got part working in jenkins (with cmake builder plugin). build solution file, using msbuild. able build solution using both visual studio , command line next command: c:\jenkins\workspace\soniotest>"c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe" /t:rebuild bin/sonio.sln this builds (on same machine jenkins resides). however, trying automate portion of build in jenkins , build ends failing couple of c1083 errors ( "cannot open source file: '..\path\to\file.ext': no such file or directory ). have tried using both jenkins msbuild plugin , using exact same command works in terminal "execute windows batch command" build step, same result. when using windows batch command build step, can see in log command beingness executed: c:\jenkins\workspace\...

reporting services - SSRS 2005 Syntax for using two datasets in one expression -

reporting services - SSRS 2005 Syntax for using two datasets in one expression - i have next look works beautifully add together 2 values, regular hours , overtime hours. sum(iif(fields!billstatus.value = "f", (cdec(fields!reghrs.value) + cdec(fields!ovthrs.value)),cdec(0)),"reportdataset") what need add together 3rd value that, 3rd value come different dataset, , cannot seem find proper syntax that. somehow, after ovthrs.value, need effect of... + (fields!hoursworked.value, "rbasejobbaseline") how inject value part of "true" clause of iif, since needs come different dataset. the way combine sets in ssrs it's lookup [msdn][1] lookupset msdn multilookup msdn but these functions comes ssrs from ms sql 2008r2 version, unfortunately in ssrs 2005 can't , should combine datasets in info base of operations level. [1]: http://technet.microsoft.com/en-us/library/ee210531.aspx ???? reporting-services ...

javascript - mongodb won't find my schema method in nested container -

javascript - mongodb won't find my schema method in nested container - i trying access method of schema stored within mixed container. here situation : have cases model can many different things, have schema each of these things stored in "casecontent" mixed property. var caseschema = mongoose.schema({ casecontent : {}, object : {type:string, default : "null"}, collision : {type : boolean, default : false} }); the casecontent property filled model of 1 of schemas, 1 exemple : var treeschema = new mongoose.schema({ applecount : {type : number, default : 3} }); treeschema.methods.dostuff = function (data) { console.log('hey, listen'); homecoming true; }; then, want utilize method of schema original container : caseschema.methods.dostuff = function (data) { if (this.casecontent.dostuff !== undefined) { this.casecontent.dostuff(); console.log('it worked'); } else { ...

asp classic - Import asp.net and html pages in Umbraco CMS -

asp classic - Import asp.net and html pages in Umbraco CMS - i new umbraco cms. have existing website developed in asp , asp.net. have requirement convert existing website new website using umbraco cms. the pages available in existing website static pages.. my question : there way import these static pages umbraco website. can skip manual content creation of these pages in umbraco. in short, depends on how much need edit on original pages , how many pages there are. if content never going edited, can maybe create normal masterpages (umbraco templates). can add together in navigations , other cms spec or way of doing create 1 template , add together big text box doctype can paste html into. mean end loads of html in db. if want create 'true' umbraco site , utilize much of cms functionality possible there no easy way of converting html umbraco site. if info in db utilize cmsimport , map old new doctype fields, still have htmltidy work on before impo...

sitecore6 - MSDN like API for sitecore -

sitecore6 - MSDN like API for sitecore - quiet new sitecore world , haven't come across online api looks msdn. please advice if there such resource sitecore development? api documentation exists on sdn site, illustration database.getitem documented http://sdn.sitecore.net/doc/api%205.0/sitecore.data.database.getitem.html admittedly it's 5.0 api documentation, kernel api methods don't alter often. sitecore sitecore6

java - Where do I store images so that an executable jar file can access them? -

java - Where do I store images so that an executable jar file can access them? - i using eclipse create executable jar file of game created, when create jar , run it, images in game no longer show up. store images jar file can access them? put them in jar, , utilize class.getresource , class.getresourceasstream , classloader.getresource or classloader.getresourceasstream access them. appropriate depends on else you're doing, might want like: image image = new image(program.class.getresource("/images/foo.jpg")); ... program.class any class within same jar file. or if you're storing images in same folder classes (by time you're deployed) use: image image = new image(gamecharacter.class.getresource("knight.jpg")); that's relative resource name. (relative class in question.) java eclipse image executable-jar

google maps - Different locations in different browsers -

google maps - Different locations in different browsers - why locations differs regarding browser? chrome / firefox : same location 30 kms i'm ie : 250 kms i'm safari : i'm how can safari observe i'm , others can't? is navigator.geolocation.getcurrentposition() the best way users current position browser? i checked on browser see if had same result had. unfortunately, result had same on safari, firefox , chrome. gave me exact current position. on ie 10 , ie9 result differ couple of meters of actually. the navigator.geolocation.getcurrentposition() methods seek locate info ip address , wifi signals. on devices, can utilize gps signals if device equip gps module. the trick gps signals less acurate wifi signals. don't think show why there difference between browser. maybe can seek utilize enablehighaccuracy:true parameter getcurrentposition see if result differs 1 time again between each browsers. google-maps geoloc...

Magento Fake ShoppingCart issue -

Magento Fake ShoppingCart issue - i have little issue code false magento checkout. here code: $checkout = mage::getsingleton('checkout/type_onepage'); $checkout->savecheckoutmethod('guest'); $checkout->savebilling($address, $customeraddressid); $checkout->saveshipping($address, $customeraddressid); $checkout->saveshippingmethod('freeshipping_freeshipping'); $checkout->savepayment(array('method'=>'checkmo')); $checkout->saveorder(); when refresh page can place order. every first time after logging in shop. have throw exception. do have thought ? magento

java - Server program taking lots of CPU even when not in use -

java - Server program taking lots of CPU even when not in use - i have client/server java game im working on. there's bunch of code , im trying paste little possible while still giving enough. when first start server, takes no cpu. when first game client connects, jumps 25%(which seems quite high does, thats not main concern yet). problem is, even when client disconnects, cpu usage of server app remains @ 25%. the server takes name client , receives x, y coordinates player. here code actual server run 1 time server started: (i apologize beforehand excessive indentation) tcpserver(int port) { seek { tcpsock = new serversocket(port); int z = 0; while(true) { socket sock = tcpsock.accept(); sock.setkeepalive(true); clientlist.addelement(new...