Posts

Showing posts from March, 2015

asp.net - .NET Control.ID property inconsistency -

asp.net - .NET Control.ID property inconsistency - please have @ code below: partial class _default inherits system.web.ui.page protected sub page_load(byval sender object, byval e system.eventargs) handles me.load dim c1 new checkbox c1.id = "test1/" 'line 7 placeholder1.controls.add(c1) end sub protected sub button1_click(byval sender object, byval e system.eventargs) handles button1.click each c command in page.controls each d command in c.controls each f command in d.controls each g command in f.controls each h command in g.controls if typeof h checkbox dim cbox new checkbox cbox = ctype(h, checkbox) msgbox(cbox.checked) 'line 20 end if next ...

php - 1 to many mysql statment plus showing images and text -

php - 1 to many mysql statment plus showing images and text - hi have little problem 1 many statment. adding images in mysql database , in folder part perfect. when want display them tricky part. don't know problem in way i've created database or in code. here both: my 2 tables text , imagess in text table: text_id - primary text_field - unique in imagess table: id - primary name title path my code this: <?php $result = mysql_query("select * text text_id, imagess id (text_id=id , text_field=title) "); while($row = mysql_fetch_assoc($result)){ echo '<br>№'.$row['text_id'].'<br>'; echo''.$row['title'].'<br>' .$row['text_field']; echo'<br><img src="'.$row['path'].'?url='.$row['path'].'/>'; } ?> my goal larn how display 1 title + text 2-3 images. hope explain me mistakes...

javascript - jQuery focus() page scroll length -

javascript - jQuery focus() page scroll length - i've got code this: <a href="javascript://" onclick="$('#newmsgtxt').focus();">new message</a> <div style="min-height: 1300px;"></div> <textarea id="newmsgtxt"></textarea> <div style="min-height: 500px;"></div> and here problem: after click link, in different browsers page scroll different position. example of textarea position on screen after click: chrome: center ff: bottom opera: top how can create browsers work chrome do? $('a').click(function(e){ e.preventdefault(); var o = $('#newmsgtxt').focus().offset().top, $w = $(window); $w.scrolltop(o - ($w.height() / 2)); }); http://jsfiddle.net/2bhrw/ javascript jquery css browser cross-browser

javascript - Set Click event on value display in Html file and want to show there child Element When Clicked on it -

javascript - Set Click event on value display in Html file and want to show there child Element When Clicked on it - this xml file:- <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="final.xsl"?> <root> <child1 entity_id = "1" value= "asia"> <child2 entity_id = "2" value = "india"> <child3 entity_id = "3" value = "gujarat"> <child5 entity_id = "5" value ="rajkot"></child5> </child3> <child4 entity_id = "4" value = "rajshthan"> <child6 entity_id = "6" value = "ajmer"></child6> </child4> </child2> </child1> </root> this xslt file:- <xsl:template match="*"> <xsl:for-each select="//chil...

java - How to skip a iteration/loop in while-loop -

java - How to skip a iteration/loop in while-loop - this question has reply here: goto next iteration in loop in java 6 answers is there elegant way skip iteration in while-loop ? what want is while(rs.next()) { if(f.exists() && !f.isdirectory()){ //then skip iteration } else { //proceed } } while(rs.next()) { if(f.exists() && !f.isdirectory()) continue; //then skip iteration else { //proceed } } java

iphone - Image Sequences -> performance hit? -

iphone - Image Sequences -> performance hit? - my question using uiimageviews , animationimages . since need pause, using quite bit of same "empty frames" of animation accomplish simple pause. question basically, if utilize lot of same image, using more gpu/cpu memory or affecting length of stored array of images negligible? is image sequence real time generated or pre-rendered (i guess essence of question) iphone ios objective-c

http - Requests done in the onModuleLoad are not cached at all. Mainly in FireFox -

http - Requests done in the onModuleLoad are not cached at all. Mainly in FireFox - i faced issue in requests done in onmoduleload event not beingness cached in cases (mainly firefox). checked network console on firebug , shows kinds of requests beingness fetched server , not cache. i prepared test case, can check @ http://tradeosam.appspot.com/ and here onmoduleload implementation: public void onmoduleload() { requestbuilder request = new requestbuilder(requestbuilder.get, "query/test?v=1-8951245"); seek { request.sendrequest(null, new requestcallback() { @override public void onresponsereceived(request request, response response) { } @override public void onerror(request request, throwable exception) { } }); } grab (requestexception e) { } new timer() { @override public void run() { reques...

unit testing - Maintainable mocks -

unit testing - Maintainable mocks - mock objects introduce approach deep behavior testing of programme unit. should pass mocked dependency tested unit , check if works dependency should do. let have 2 classes , b: public class { private b b; public a(b b) { this.b = b; } public void dosomething() { b.performsomeaction(); if(b.state == special value) { b.performanotheraction(); } } } public class b { public bstate state { get; private set; } public void performsomeaction() { //some actions state = special value; } public void performanotheraction() { if(state != special value) { fail(); //for illustration throw new invalidoperationexception(); } } } imagine class b beingness tested unit test testb. to unit test class can either pass b it's constructor (to state based testing) or pass b's mock (to ...

java - How to get package version at running Tomcat? -

java - How to get package version at running Tomcat? - how bundle version @ running tomcat? i seek getclass().getpackage().getimplementationversion() returns null . guess because war wasn't yet packaged , tomcat executes .classes (aka exploded war). meta-inf\manifest.mf nowadays in final war, not in target\<project.name>\meta-inf folder java.lang.package package objects contain version info implementation , specification of java package. versioning info retrieved , made available classloader instance loaded class(es). typically, stored in manifest distributed classes. related how maven artifact version @ runtime? update. before have added configuration war build. when running tomcat eclipse, null . <plugin> <artifactid>maven-war-plugin</artifactid> <version>2.1</version> <configuration> <archive> <manifest> <adddefaulti...

vba - Changing transparency of specific columns in a powerpoint graph -

vba - Changing transparency of specific columns in a powerpoint graph - i looking vba solution on alter of transparency of specific columns in graph. have @ to the lowest degree 50 graphs need shade forecasted years differently changing transparency. doing manually hard, hence utilize knowledge , experience help little. thank very much in advance. vba graph transparency powerpoint

vba - VB Script code to read column value from lotus notes database -

vba - VB Script code to read column value from lotus notes database - set domsession = createobject("notes.notessession") dim domdatabase set domdatabase = domsession.getdatabase("server name", "xyz.nsf") set domview = domdatabase.getview("all projects") up here it's ok. seek lot unable read document values. i looking vbscript code read document data. add this: dim i% dim s$ dim doc object i% = 1 domview.entrycount set doc = domview.getnthdocument(i%) s$ = doc.getitemvalue("itemname")(0) ' whatever want string value stored in s$ next this code assumes items text type. utilize dim s item type (number, date). to column values view can utilize doc.columnvalues(2) . returns value of 3rd column (0 first). vba lotus-notes lotus names

R Transition Matrix -

R Transition Matrix - i convert vector transitions matrix. have vector t , divided max value values between 0 , 1. made matrix t <- c(22, 65, 37, 84, 36, 14, 9, 19, 5, 49) x <- t/max(t) y <- x%*%t(x) my problem want columns of matrix (y) add together 1, i.e. create transition matrix i'm not sure how that. suggestions appreciated! sweep() versatile little function can utilize here split each column own sum: yy <- sweep(y, margin = 2, stats = colsums(y), fun = "/") ## confirm columns of yy sum 1 colsums(yy) ## [1] 1 1 1 1 1 1 1 1 1 1 r

.net - CruiseControl.NET, SVN and multiple dependencies -

.net - CruiseControl.NET, SVN and multiple dependencies - i'm using cruisecontrol.net , devenv within ccnet.config automate build of vs 2005 .net solution. solution contains references several projects, dependent on each other library folder contains 3rd party dll's , other dll's compiled projects i've created. the problem i'm having trying setup ccnet.config file latest updates of each of projects within .net sln file , library folder svn before begins devenv task. can help or point me in right direction can't seem find on web? below ccent.config file, i'm using preprocessor's avoid repetition reusing other solution files of similar structure: <cruisecontrol xmlns:cb="urn:ccnet.config.builder"> <cb:define maintrunk="svn://mysvnurl"/> <cb:define workingdir="c:\svn\"/> <cb:define svnexec="c:\program files\collabnet subversion client\svn.exe"/> <cb:define artifactsdi...

android - Eclipse setup for a single AOSP or CyanogenMod java application -

android - Eclipse setup for a single AOSP or CyanogenMod java application - preamble: java android developer. know standard android development flow. i want start developing aosp-cm. follow guide import whole java source code in eclipse, using .classpath file provided source code. have java project source code, , can browse , edit everything. the next step seek setup single android project, illustration phone application, in order utilize adt plugin feature gui graphical editor. want edit phone sources, build within eclipse , above utilize eclipse debugger. it possible? can find guide or tutorial ? my final solution is: setup classpath cd /path/to/android/root cp development/ide/eclipse/.classpath . chmod u+w .classpath create java project , select cm (or android aosp) base of operations folder instead of "use default location". now, in eclipse, can attach emulator, run ddms , select process want debug (for example, com.andro...

class - Getting Declared Methods - Java -

class - Getting Declared Methods - Java - suppose have next 3 classes a.java public class { public static void main (string[] args) { new c(); } } b.java import java.lang.reflect.method; import java.util.arrays; public class b { public b() { method[] m = this.getclass().getdeclaredmethods(); system.out.println(arrays.tostring(m)); } public void hello() { } } c.java public class c extends b{ public c() { super(); } } and run main method in class a. well, should instantiate class c, in turn should phone call class b's constructor, print out declared methods. output [] . surprise me, expecting output (assuming classes in bundle called test ): [public void test.b.hello()] so, what's wrong? , how actual output? getclass returns class of instance. in case, c . there no declared method in class c . can solve problem using 'getsuperclass' method of returned class object...

paypal - How to setup Order Summary for PayflowPro Express Checkout? -

paypal - How to setup Order Summary for PayflowPro Express Checkout? - i want display description of items this: i wrote solution according article , attached asp.net solution. however, on paypal login page (such in first picture), see purchase , amount (not in first picture). i utilize these urls create transaction: sandbox - https://pilot-payflowpro.paypal.com/ live - https://payflowpro.paypal.com to setup transaction send these parameters: "partner" "vendor" "user" "pwd" "trxtype" "amt" "currency" "createsecuretoken" "securetokenid" "returnurl" "cancelurl" "errorurl" "verbosity" "billtofirstname" "billtolastname" "billtostreet" "billtocity" "billtostate" "billtozip" "billtocountry" "shiptofirstname" "shiptolastname" "shiptostreet" "...

.net - Running Powershell scripts for Exchange in web services -

.net - Running Powershell scripts for Exchange in web services - i trying run powershell scripts microsoft exchange in web services. code written below works fine when run console application when move web services project , phone call web method, errors when calls addpssnapin. thought why? i'm running on windows server 2008 r2 64-bit machine. target platform has been changed cpu x64 without luck. dim rsconfig runspaceconfiguration = runspaceconfiguration.create() dim snapinexception pssnapinexception = nil dim info pssnapininfo = rsconfig.addpssnapin("microsoft.exchange.management.powershell.e2010", snapinexception) <-- throws error ' create powershell runspace , open dim myrunspace runspace = runspacefactory.createrunspace(rsconfig) myrunspace.open() error- system.web.services.protocols.soapexception: system.web.services.protocols.soapexception: server unable process request. ---> system.management.automation.psargumen...

php - Procedurally generating a texture -

php - Procedurally generating a texture - i'm trying figure out script generate texture (which can multiplied grayscale image "apply" it). far method involves seeding rng, randomly generating 8x8 matrix of integers in range [0,3], scaling matrix 256x256 image using level of interpolation. here's illustration output (seed value 24): on left matrix scaled nearest-neighbor interpolation. on right effort @ bilinear interpolation. part seems okay, structures near middle-left there 2 diagonally-adjoining orange squares faced 2 diagonally-adjoining reddish squares, andthe result no interpolation area. additionally, it's beingness treated more heatmap (as shown abundance of orange in top-left corner) , that's causing more problems. here's code have "bilinear interpolation": <?php $matrix = array(); srand(24); $dim = 256; $scale = 32; for($y=0;$y<=$dim/$scale;$y++) for($x=0;$x<=$dim/$scale;$x++) $matrix[$y][$x] = rand(0,3); $i...

ios - How to find if a view is tapped more than 2 times within certain time period in cocos 2D -

ios - How to find if a view is tapped more than 2 times within certain time period in cocos 2D - i developing game in cocos 2d. in game need tap view number of times. if user attempts tap view beyond limit, should display alert. please can help me find number of taps on view. of import number of taps not simultaneously. in total game user can tap number of times, after should not tap view. you can nstimeinterval. //decalre in interface file nstimeinterval mlasttaptime; . -(id)init { if(self = [super init]) { mlasttaptime = [nsdate timeintervalsincereferencedate]; } homecoming self; } //in touch method nstimeinterval currenttime = [nsdate timeintervalsincereferencedate]; nstimeinterval diff = currenttime - mlasttaptime; if(diff < 0.3 ) { //do whatever want if user press 0.3second } mlasttaptime = [nsdate timeintervalsincereferencedate]; ios objective-c cocos2d-iphone touch

multithreading - How to release all permits for a Java Semaphore -

multithreading - How to release all permits for a Java Semaphore - so code: int usedpermits = totalpermits - semaphore.availablepermits(); semaphore.release(usedpermits); isn't threadsafe, because if between 2 lines thread releases permit, semaphore's capacity increment above original maximum. this works in situation since strip of code 1) single-threaded , 2) place permits released, may illustrate fact "release all" , "acquire/release" 2 incompatible design patterns on same object. however, want inquire if there preferred pattern less subtle thread synchronization policy. as explained in other answers, there solution create piece of code atomic. however, there no guarantee solve problem, in general setting, because code cannot right in situations. either permits released activities using them, in case code superfluous: semaphore replenished naturally, or don't, in case need piece of code, , safe, long don't weird it. n...

IPC using CORBA with C++ and Java -

IPC using CORBA with C++ and Java - i decided utilize corba communicate between c++ service , java service. want know possible using corba inter phone call c++ library , java library phone call dll in application. helpful if help me take decision! (seems confusion in previous answer. think improve give reply state clearer point) corba interactions between "remote" components. although used term "remote" here, doesn't mean components needs located in remote machine. can in same machine, or same process. the reply depends on aim: if writing new libraries/components in c++ , java, , want utilize them in same application , have components in both language able interact each other, yes, corba can help in extend. corba helping in component communication part. still need utilize jni (or other similar solutions) invoke/startup c++/java component in java/c++ application. corba not going help on this. may want poc see if having 2 orbs in s...

mongodb - Is there a connection leak while using Grails with Mongo DB -

mongodb - Is there a connection leak while using Grails with Mongo DB - i followed next link build sample app using grails , mongo db. http://etcpe9.wordpress.com/2012/01/28/beginning-grails-2-0-with-mongodb/ but each time create new person can see next in mongod shell xx connection open . i not sure if means connection leak ? thu feb 21 21:04:06 [initandlisten] connection accepted 127.0.0.1:50526 #22 (1 connection open) thu feb 21 21:04:27 [initandlisten] connection accepted 127.0.0.1:50527 #23 (2 connections open) thu feb 21 21:04:27 [initandlisten] connection accepted 127.0.0.1:50528 #24 (3 connections open) thu feb 21 21:04:36 [initandlisten] connection accepted 127.0.0.1:50531 #25 (4 connections open) thu feb 21 21:04:36 [initandlisten] connection accepted 127.0.0.1:50532 #26 (5 connections open) thu feb 21 21:04:48 [initandlisten] connection accepted 127.0.0.1:50533 #27 (6 connections open) thu feb 21 21:04:53 [initandlisten] connection accepted 127.0.0.1:5...

asp.net - Bug in my code or Am not doing it right -

asp.net - Bug in my code or Am not doing it right - i have been struggling usecase 2 days now.all need read patient's visitnumber patient visit table , populate dropdownlist given patient number.after much research these 2 links address same issue.i did described here sample on stackover site still mine not working , no error displayed. another sample described here! here codes:html <li> <asp:label runat="server" id ="lblvisits">visit number</asp:label> <asp:dropdownlist id="dropdownlist2" runat="server" height="16px" width="174px" style="margin-left: 46px"> <asp:listitem text=""></asp:listitem> <asp:listitem value=""></asp:listitem> </asp:dropdownlist> </li> codebehind: protected void btn_search_click(object sender, eventargs e) { s...

c# - WPF how to open Excel File and Read Data From the file Cell by Cell -

c# - WPF how to open Excel File and Read Data From the file Cell by Cell - im trying introduced , read excel file have loop , each time goes within loop read new cell lets "cell+1" there few method saw online assign , read info excel can't create them work in wpf/c# help great how introduced excel file store in c:/excelfolder/excel.xls , read info it thanks you need utilize vsto (visual studio tools office). c# wpf excel

javascript - NodeJS async library parallel method strange behavior -

javascript - NodeJS async library parallel method strange behavior - i'm attempting utilize async module nodejs first time, , i'm running problem when seek , dynamically build array of functions async.parallel function run: methods = []; (key in entries) { methods.push(function(callback) { homecoming callback(null, key); }); } homecoming async.parallel(methods, function(err, results) { console.log(results); homecoming render_views(req, res, 'view_blog_all', { entries: entries }); }); the output maintain seeing is: [ 'powerful_sms_communication_for_teams', 'powerful_sms_communication_for_teams', 'powerful_sms_communication_for_teams' ] and 'entries' object i'm looping on has 3 different keys. i'm missing? async module: https://github.com/caolan/async this mutual problem people run asynchronous logic. key remember callback not...

php - using json data from Curl response -

php - using json data from Curl response - hi i'm little new @ curl, i'm trying request json info , parse results. having success retrieving data, can't handle response. here's code function bitbucketcurl($url) { global $bitpassword; global $bitusername; $ch = curl_init(); // set url , other appropriate options curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_userpwd, "$bitusername:$bitpassword"); curl_setopt($ch, curlopt_header, 0); // grab url , pass browser $commitinfo = curl_exec($ch); // close curl resource, , free scheme resources curl_close($ch); homecoming $commitinfo; } $json = bitbucketcurl($url); echo $json; // seems work in that, when load page, can see json info //turn json info array - not seem working $obj_a = json_decode($json, true); print_r ($obj_a); //the result 1 rather array expect the basic problem json info shows when echo $json when seek turn info array doesn't work. when print array, ...

sas - CSV document import by using filename statement -

sas - CSV document import by using filename statement - i want read csv document using filename statement in sas excel included variable names first line when input variable names using input statement--there going mistake. how can deal situation? filename outdata "c:\users\xiang\desktop\crime2005.csv"; info crime; infile outdata dlm="," dsd ; proc means mean std maxdec=1 ; proc print; run; first off - you're confusing things bit saying 'via filename statement'. via datastep. filename statement happens relatively little component of this. second, let's proper sas indenting can see what's going on: filename outdata "c:\users\xiang\desktop\crime2005.csv"; info crime; infile outdata dlm="," dsd ; input [your-variable-list]; run; proc means data=crime mean std maxdec=1 ; run; proc print data=crime; run; data steps , procs end run (except procs end in quit). each of these separate ste...

Batch file formatting? -

Batch file formatting? - why work: set /a num = %random% %% 5 + 1 if %num% == 1 set map=cs_assault if %num% == 2 set map=cs_italy if %num% == 3 set map=cs_office if %num% == 4 set map=de_aztec if %num% == 5 set map=de_bank srcds -game csgo -port 27016 -console +game_type 0 +game_mode 0 +mapgroup mg_casual +map %map% but doesn't? set /a num = %random% %% 5 + 1 if %num% == 1 set map = cs_assault if %num% == 2 set map = cs_italy if %num% == 3 set map = cs_office if %num% == 4 set map = de_aztec if %num% == 5 set map = de_bank srcds -game csgo -port 27016 -console +game_type 0 +game_mode 0 +mapgroup mg_casual +map %map% i can't seem wrap brain around @ all. because sec illustration creating variable called "map " not "map" , value " de_mapname" not "de_mapname" so if alter srcds -game csgo -port 27016 -console +game_type 0 +game_mode 0 +mapgroup mg_casual +map %map% to srcds -game csgo -port 27016 -co...

python - Django Groups not updating when saving User -

python - Django Groups not updating when saving User - i'm trying add together users belong staff staff grouping on change. i've tried signals , overloading save in user model neither of them seem work. django has limitations i'm not aware of when saving? here both code snippets tried work with. user inherited abstractuser , used new django 1.5 feature auth_user_model = 'app.user', groups standard auth groups. class user(abstractuser): def save(self, force_insert=false, force_update=false, **kwargs): if self.is_staff: if not self.groups.filter(name='staff').exists(): g = group.objects.get(name='staff') g.user_set.add(self) else: if self.groups.filter(name='staff').exists(): g = group.objects.get(name='staff') g.user_set.remove(self) super(user, self).save(force_insert, force_update) @receiver(post_save, se...

asp.net mvc - Razor - @Html.Raw() still encoding & in meta tag attributes -

asp.net mvc - Razor - @Html.Raw() still encoding &amp; in meta tag attributes - when utilize @html.raw(mystring) normal renders example: @{ viewbag.title = "my site&reg;"; } <title>@html.raw(viewbag.title)</title> will render <title>my site&reg;</title> when utilize in attribute: <meta name="description" content="@html.raw(viewbag.title)" /> it renders <meta name="description" content="my site&amp;reg;" /> not right because not render registered mark. how right behavior? as patridge pointed out in reply can include attribute markup in parameter .raw . in case result in similar following: <meta name="description" @html.raw("content=\"my site&amp;reg;\"") /> asp.net-mvc asp.net-mvc-3 razor asp.net-mvc-4

jquery - Javascripts not initiating correctly -

jquery - Javascripts not initiating correctly - a wordpress site i've been working seems have weird initiation of of scripts. 1 concerned drop-down header. un-styled experimenting, but, if look, shouldn't dropping downwards until length downwards page, , while that, on page load, shows unti user interaction. know might happening? help much appreciated. the site link nextworld.kbddev.com here code bar: <script> $(function() { $(window).scroll(function(){ if($(window).scrolltop() > 542){ $("#follownav").slidedown("fast"); $('#follownav').removeclass('hide').addclass('show'); } }); $(window).scroll(function(){ if($(window).scrolltop() < 542){ $("#follownav").slideup("fast"); } }); }); </script> the problem not checking on page load. a simple prepare be: $(function(){ $(window).scroll(); }); j...

deployment - deploying java applet -

deployment - deploying java applet - i wanted set java application online having classnnotfoundexception error. next code in index.html page <applet width="200" height="200" archive="calculator.jar" code="calculator.calculator" /> i created jar file called calculator.jar including files, in same directory index.html. main in class called calculator within jar file. don't know doing wrong when created jar file compressed it. should seek uncompressing it? any hints much appreciated java deployment jar applet zip

sql - Select records that start with special letter -

sql - Select records that start with special letter - imagine have table several records below: zare azre arze arez i want find records contain 'z' if search in these records first find 'zare' because start 'z' , sec find 'azre' because z sec letter , etc you can seek this: select * tbl col '%z%' order charindex('z', col) sql sql-server tsql

asp.net - Designing a page with fixedrow header and scroll functionality -

asp.net - Designing a page with fixedrow header and scroll functionality - i new designing,can please suggest me how design table fixed row header @ top , should able see info under relevant columns scrolling fixed header.either using tables or divs please. is demo need? <div style="margin: 0; padding: 0; border-collapse: collapse; width: 519px; height: 100px; overflow: hidden; border: 1px solid black;"> <table style="margin: 0; padding: 0; border-collapse: collapse; color: white; width: 517px; height: 20px; text-align: left; background-color: blue;"> <colgroup> <col width="200px"/> <col width="150px"/> <col width="150px"/> <col width="16px"/> </colgroup> <tbody> <tr style="margin: 0; padding: 0; border-collapse: collapse;"> <th style="margin: 0; padding: 0; border-collapse: collapse;">...

knockout.js - Simple Knockout + Bootstrap Typeahead plugin race condition -

knockout.js - Simple Knockout + Bootstrap Typeahead plugin race condition - i have very simple bootstrap typeahead binding (jsfiddle) knockout.js, this: ko.bindinghandlers.typeahead = { init: function (element, valueaccessor) { var $e = $(element), source = valueaccessor(); $e.typeahead({ source: source, minlength: 0 }); }, }; its usage simple: <input data-bind='typeahead: source, value: item, valueupdate: "afterkeydown"' /> the binding works expected in jsfiddle. when loaded requirejs, not work expected. there seems race status knockout , jquery loading in parallel. if @ change event handlers bound input element, if jquery handler binding works expected. if knockout handler change event then, example, if type "alp", , typeahead suggests "alpha", , select "alpha" typeahead dropdown list <input> element show selected te...

asp.net - WF4 WCF Send Message at wrong time -

asp.net - WF4 WCF Send Message at wrong time - i hosting workflow service (xamlx) in iis. has receive activities, e.g. methoda , methodb. wrote mvc pplication client phone call these methods. in pagea, user submits form phone call methoda, workflow goes receive activity waiting methodb. in page b, user submits form phone call methodb. however, if user submits in pagea , go pagea , submit 1 time again same workflow instance, wait min , give timeout exception: the request channel timed out while waiting reply after 00:01:00. increment timeout value passed phone call request or increment sendtimeout value on binding. time allotted operation may have been portion of longer timeout. this error seems come wcf while suppose give next error: the execution of instancepersistencecommand interrupted because instance key 'guid' not associated instance. can occur because instance or key has been cleaned up, or because key invalid. key may invalid if m...

impersonation - C# Copying a file from one server to another with permissions -

impersonation - C# Copying a file from one server to another with permissions - i have written c# console app re-create backup 1 server on schedule every day. works if have logged share folder , credentials chached, if credentials have not been input on share of source server, error in code. need have app impersonate login shared folder of source, can grab file , move destination. public static void copynewestbackup() { string sourcepath = @"\\source"; string targetpath = @"\\destination"; fileinfo newestfile = getnewestfile(); string sourcefile = path.combine(sourcepath, newestfile.name); string destfile = path.combine(targetpath, newestfile.name); console.write("copying " + newestfile.name + " " + sourcepath + " " + destfile); filesystem.copyfile(sourcefile, destfile, uioption.alldialogs); //file.copy(sourcefile, destfile, true); } how can impe...

sass - Ruby Compass outputting backtrace in CSS -

sass - Ruby Compass outputting backtrace in CSS - compass outputting backtrace in css instead of generating css. have had same results windows 7 , ubuntu linux 12.0 have tested on compass 0.12.2 , 0.11.1 , tested on ruby 1.9.3p385 , 1.9.1p378. my config.rb file: # require additional compass plugins here. http_path = "/n4" css_dir = "css" sass_dir = "sass" images_dir = "images" javascripts_dir = "js" # relative_assets = true output_style = :compact #or :nested, :expanded, :compressed line_comments = false # disable these production (also when viewing in ie6; cause unnecessary display errors) # sass_options = {:debug_info => true} the contents of css file: /* syntax error: undefined mixin 'linear-gradient'. on line 305 of c:/users/bens/workspace/n4e/src/main/webapp/sass/screen.sass, in `linear-gradient' line 305 of c:/users/bens/workspace/n4e/src/main/webapp/sass/screen.sass, in `button_style...

java - ArrayList to int[][] - index out of bounds exception -

java - ArrayList to int[][] - index out of bounds exception - this question has reply here: how convert arraylist<arraylist<integer>> int[][]? 3 answers i interested in returning int[][] via passing non-null parameters of single , dual arraylists class method, such as: //outer loop arraylist<arraylist<integer>> rowsinmatrixa; //inner loop arraylist<integer> colsinmatrixa; using native java. have searched high , low here, in java api, java tutorials, , many other places. ideas , suggestions welcome. edit: here's i've tried: public static int[][] convertintegers(arraylist<arraylist<integer>> rows, arraylist<integer> cols) { int[][] newmatrix = new int[rowsinmatrixa.size()][colsinmatrixb.size()]; //iterate outer, through rows (int i=0; < newmatrix.length; i++) { //iterate ...

nHibernate Mapping issue -- Nulling, not deleting children and grandchildren -

nHibernate Mapping issue -- Nulling, not deleting children and grandchildren - blockquote we using bycode method of mapping our data.. i have process (process table) object has list of processstep (processstep table) objects in turn has handbag of processstepuser (processstepuser table) objects assigned each step. the objects load fine, in web page if delete step collection, rehydrate mvc action process , save process, step in database has processid set null breaks link, leaves step in database , assigned users. what want able delete step , have processstep , processstepusers deleted. likewise, when edit processstep (say alter name of step) , save, it's saving that, processstep users nulled out (of processstepid) , recreated, leaving orphaned records. i have column on processstepuser overall processid well, can prevent user beingness assigned more 1 time step of process. my relevant mapping follows: process: list(x => x.processsteps, m...

php - Unique number list -

php - Unique number list - i have html form user selects numbers using checkboxes. numbers set php array this: <input type="checkbox" name="formnumber[]" value="1" /> there 24 numbers pick 1 24. want output list of 10 unique lines 5 unique numbers per line using numbers array. e.g.: pick 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 form. output this: class="lang-none prettyprint-override"> 2 16 4 1 15 10 13 2 4 5 12 1 3 16 11 etc etc (10 lines) i got work still duplicate every , then. can come in 5 24 numbers in form , unique random lines of 4 numbers in output. $i=1; while ($i<=$xresults) { $numbers = $_post['formnumber']; shuffle($numbers); $counter = 0; foreach ($numbers $number1) { echo "<span>$number1</span> "; if(++$counter >= 4) { break; } } $i++; echo '<p>'; } } so want pick different combinations of 5 of selected boxes. ...

SQL Server - Rows to Columns without Aggregation -

SQL Server - Rows to Columns without Aggregation - i have info looks this: address | id 12anystreet | 1234 12anystreet | 1235 12anystreet | 1236 12anystreet | 1237 my goal create this: address id1 id2 id3 id4 123any 1234 1235 1246 1237 based on googling , not, able generate next cte: with cust_cte (address, id, rid) ( select address, id, row_number() on (partition (address) order address) rid tab) the next step pivot each rid, place associated id in column. however, can't seem illustration found work. rather post rest of illustration may not apply, i'll leave audience. other novel approaches not utilizing cte appreciated. chugging through lot of data, efficiency important. you can transform info using pivot function in sql server. in order pivot data, want create new column using row_number() . if have known number of values, can hard-code query: select * ( select address...

javascript - document.getElementById innerHTML not displaying -

javascript - document.getElementById innerHTML not displaying - this should pretty easy thing do, it's not returning anything. function love() should kick off, getting simple number prompt, , spitting out list of few items uses starting number. alert box correctly displays expect, want display on screen. (this little section of i'm after, it's kernel of it). no text displaying in ie, ff, or chrome... <script type="text/javascript"> function love() { var ncxelement=""; var idnumber = prompt("enter origin number",""); var mytext=document.getelementbyid("here"); (var i=1;i<5;i++) { ncxelement+=("<navpoint class=\"other\" id=\"page_"+idnumber+"\">\n"); idnumber++; } alert(ncxelement); mytext.innerhtml=ncxelement; ...

asp classic - jQuery.param is asp? -

asp classic - jQuery.param is asp? - i know if there asp resource implement same functionality of jquery.param. creating json response on asp, , characters (example: "/") have received errors "uncaught syntaxerror: unexpected token h jquery-1.8.3.min.js:2 v.extend.parsejson jquery-1.8.3.min.js:2" while trying "jquery.parsejson" response. so, think i, need replace "/" "%5c" , on. there anyway "response.write" without treating characters need replace manually? i'll appreciate help much. http://jsonlint.com/ : { "name": "hmp", "url": """ } parse error on line 3: ..."hmp", "url": """ } ----------------------^ expecting '}', ':', ',', ']' you have write own function classic asp has no such function. escape " have utilize " (classic asp vbscript): di...

javascript - Attach script to jQuery ready method before jQuery is loaded -

javascript - Attach script to jQuery ready method before jQuery is loaded - for example, bootstrap set jquery @ end of html, e.g. http://twitter.github.com/bootstrap/examples/starter-template.html what if, want insert code block before loading of jquery script itself, e.g. <div id="test1"></div> <div id="test2"></div> <script> $(document).ready(function() { $('#test1').html('test1'); // not work, workaround? code must set before.. }); </script> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script> $(document).ready(function() { $('#test2').html('test2'); // work }); </script> test: http://jsfiddle.net/e5hkz/ i want both test1 & test2 displayed. any idea? if have set jquery code before line loads jquery itself, assign function document.ready . window.document.ready = function() { ...

r - Using dynamic column names in `data.table` -

r - Using dynamic column names in `data.table` - my question similar 2 other questions on (one , two) couldn't apply on problem. i have data.table , want calculate mean values of several columns groupped value of anothe colum. here example: library(data.table) txt <- "condition,var1,var2,var3 one,100,1000,10000 one,101,1001,10001 one,102,1002,10002 two,103,1003,10003 two,104,1004,10004 two,105,1005,10005 three,106,1006,10006 three,107,1007,10007 three,108,1008,10008 four,109,1009,10009 four,110,1010,10010" dtb <- data.table(read.delim(textconnection(txt), header=t, sep=',')) print(dtb) here output: status var1 var2 var3 1: 1 100 1000 10000 2: 1 101 1001 10001 3: 1 102 1002 10002 4: 2 103 1003 10003 5: 2 104 1004 10004 6: 2 105 1005 10005 7: 3 106 1006 10006 8: 3 107 1007 10007 9: 3 108 1008 10008 10: 4 109 1009 10009 11: 4 110 1010 10010 i want mean values of var...

jquery - How to avoid refreshing the page in a bootstrap modal? -

jquery - How to avoid refreshing the page in a bootstrap modal? - here code modal in twitter bootstrap: <div class="modal-body"> <form class="form-horizontal" method="post" name="loginform" id="loginform"> <div class="control-group"> <label class="control-label" for="inputemail">email</label> <div class="controls"> <div class="input-prepend"> <span class="add-on"><i class="icon-envelope"></i></span> <input class="span2" id="inputicon" type="text" name="email"/> </div> </div> </div> <div class="control-group"> <label class="control-label" for="inputpassword">password</label> <div class="controls"> <div class="input-prepend"> <span cla...