Posts

Showing posts from March, 2010

javascript - Change DIV in one remove/append -

here doing, create div structure dynamically var divt = $('<div id="toplevel"></div>'); divt.append('<div id="child1"><div class="content1"></div></div>'); divt.append('<div id="child2"><div class="content1"></div></div>'); i store clone separate node , add dom. this.emptydivt = $(divt).clone(); maindiv.append(divt); later on in code want replace contents of top level div using 1 remove/append. firstly create new node saved... this.newdivt = this.emptydivt.clone(); here want child divs , append new content , have tried various function can't work eg. var childdiv = this.newdivt.find('#child1').html(); childdiv.append('<div> new content</div>'); then after replace top level div maindiv.remove('#toplevel'); maindiv.append(this.newdivt); so there way child div jquery or js node not in do...

eclipse - Import existing Android project results in a lot "bugs" in JNI folder -

i have eclipse project native library , need copy project machine. i coping project folder there , use "file->new->android project existing code". using tick "copy projects workspace". then go jni folder , see lot of bugs "unresolved inclusion: ", "type 'jnicall' not resolved", "method 'getstringutfchars' not resolved", etc. 31 errors @ all. i trying compile jni library. no problem. has compiled still see bugs see before. trying launch android application , saying me project containing errors. this problem native libraries. how fix this? go project propriets >> c/c++ general >> paths , symbols , add: "/home/ademar/android-ndk-r9/platforms/android-18/arch-arm/usr/include" you can include de x86 , mips version too: "/home/ademar/android-ndk-r9/platforms/android-18/arch-x86/usr/include" "/home/ademar/android-ndk-r9/platforms/android-18/arch-mips/usr/in...

javascript - do not understand object oriented programming -

i have looked @ number of tutorials i'm still struggling following code, can please explain code. can please explain each part , oit does. function person (name, age) { this.name = name; this.age = age; } var agedifference = function(person1, person2) { return person1.age - person2.age; } var alice = new person("alice", 30); var billy = new person("billy", 25); // difference in age between alice , billy using our function var diff = function person(name, age) { // define _constructor_ called _person_ this.name = name; // constructor sets instance property _name_ this.age = age; // constructor sets instance property _age_ } // when invoked _new_, creates an.. // ..object instance of person var agedifference = function (person1, person2) { // function (expression) return person1.age - person2.age; // returns difference.. } // ..between _age_ properties var alice ...

TYPO3: show/hide specific menu items depending on current language -

typo3 version 6.1 my page structure: root page1 subpage1-1 subpage_only_for_fr_1-2 subpage_only_for_de_1-3 page2 subpage2-1 subpage2-2 my menu structure same (except root item): page1 subpage1-1 subpage_only_for_fr_1-2 subpage_only_for_de_1-3 page2 subpage2-1 subpage2-2 my menu ts is: leftnav = hmenu leftnav { 1 = tmenu 1 { wrap = <ul>|</ul> no = 1 no { wrapitemandsub = <li>|</li> stdwrap.field = title } act = 1 act { wrapitemandsub = <li class="active">|</li> stdwrap.field = title } } 2 < .1 } i have 1 additional language site (default = deutsch, additional = french): [globalvar=gp:l=0] config.sys_language_uid = 0 config.language = de [global] [globalvar=gp:l=2] config.sys_language_uid = 2 config.language = fr [global] i want show/hide pages ...

php - column filter in datatables -

i implementing datatables plugin, in page, individual column should filtered.i trying implement following following link: http://datatables.net/release-datatables/examples/api/multi_filter_select.html but not working. there file have include? added <tfoot> also. please me. you should use: $(document).ready(function() { var otable = $('#example').datatable({ "aocolumndefs": [ { "bsortable":false,"atargets": [xxx] } }); } ); where xxx column number (starting first column = 0) wish sorted. see documentation more details.

vba - Is there a way to use an input value (textbox) of a userform as a variable for another userform? -

ok trying accomplish: have 1 userform asks how many new orders user needs process. set user input variable in code (not sure if anything). private sub commandbutton1_click() userform2.show ordernum.text = neworders 'i changed textbox name ordernum end sub then when userform2 pops up, want able input more data more specific information orders. if on userform1 entered in 3, want have submit new data userform2 3 different times. tried using - next loop (below) doesn't work. i'm not sure how (or if) can store variables between userforms. private sub commandbutton1_click() dim lrow long dim ws worksheet set ws = worksheets("core info") ordernum.text = neworders lrow = ws.cells(rows.count, 2).end(xlup).offset(1, 0).row = 1 neworders ws.cells(lrow, 1).value = textbox1.text ws.cells(lrow, 3).value = textbox2.text next userform2.hide end sub the second userform pops should, nothing works after that. can tell me fix this? note: realize of above star...

html - CSS triangle with background image -

Image
this question has answer here: how css triangles work? 17 answers creating transparent arrow above image in css3 2 answers respected stackoverflowers, how create triangle element background pattern? for example need div : but state : all examples triangle elements use borders cant have img in .... this subsection class needs coolarrow: <div class="subsection"><span>ryan gosling, mr landlord</span></div> .subsection { .box-shadow (0, -1px, 1px, 0, rgba(0, 0, 0, 0.3)); background: url('/assets/pattern-lorem.png'); // inner part of slider have pattern display: block; clear: both; float: left; width: 100%; padding-top: 15px; padding-bottom: 15px; display: none; } .subsection { position:relative; } .sub...

Android Gradle Release build libraries -

Image
in android studio project have 2 flavours both having separate corresponding dependencies. dependencies { libflavour1compile project(':testlib1') libflavour2compile project(':testlib2') } building both of these flavours in debug works great, pulling in respectful resources. however, both flavours debug , release urls needed. 'testlib1' added strings.xml release/res/values folder. build inserting release string debug build. in android studio, selecting build variants debug still results in release string being used though folder not highlighted. creating debug build on command line has same result. ./gradlew installlibflavour1debug is there i'm doing wrong here or libraries default release build type?

javascript - Issues with cross browser compatibility in the following code -

i facing issues in following code. code working fine in firefox, when tried same on chrome, internet explorer 8, opera not working. following code: <script type="text/javascript"> $('bodyul').ready(function(){ // checking if @ end of window $(document).scroll(function(){ if ($(window).scrolltop() == $(document).height() - $(window).height()){ loadnewdata(); } }); function loadnewdata(){ alert('loadingnewdata'); (var i=0; i<20; i++){ $('ul').append($('<li>'+new date().gettime()+'</li>')); } } }); </script> please let me know changes need make in code run in browsers. thanks. only element matching current document has ready() method : $(document).ready(function(){ $(window).on('scroll', function(){ if ( $(window).scrolltop(...

Solr search Query with white spaces or without case sensitive and exact matching -

i implementing solr searching product not working in case. example: productcode=030101 01 in schema.xml used <fieldtype name="string" class="solr.strfield" sortmissinglast="true" omitnorms="true"/> <field name="itemcode" type="string" indexed="true" stored="true" required="true"/> if changed fieldtype i.e <fieldtype name="text_ws" class="solr.textfield" positionincrementgap="100"> <analyzer type="index"> <tokenizer class="solr.whitespacetokenizerfactory"/> <filter class="solr.reversedwildcardfilterfactory" withoriginal="true" maxposasterisk="2" maxposquestion="1" mintrailing="2" maxfractionasterisk="0"/> <filter class="solr.lowercasefilterfactory"/> </analyzer>...

android - How can I avoid user being prompted a second time for Google account selection? -

i'm developing , android app google play games services , i've followed getting started guide importing basegameutils module intellij project. working fine except whenever open activity inherits basegameactivity , call beginuserinitiatedsignin() , user prompted select google account connect (if more 1 present @ phone). fine if weren't fact in app, user authed through google play services using oauth2 ( googleauthutil / accountpicker ). it's given account he/she wants use - 1 shouldn't need ask again. is there anyway can modifiy basegameactivity.java or gamehelper.java user not prompted again? and/or need alter how log in oauth2? i've tried adding 4 scopes plus_profile, plus_login, games , app_state oauth login routine, accountpicker-popup sill appears in activity inheriting basegameactivity. update : logcat-log 07-23 11:45:25.275: debug/csdn-gms(22315): isgoogleplayservicesavailable returned 0 07-23 11:45:25.275: debug/csdn-gms(22315): beginuser...

windows - unable to launch Android SDK Manager from eclipse -

Image
i not able launch sdk manager eclipse getting below error. [2013-07-17 15:41:31 - sdk manager] [sdk manager] usage: java [-options] class [args...] [2013-07-17 15:41:31 - sdk manager] [sdk manager] (to execute class) [2013-07-17 15:41:31 - sdk manager] [sdk manager] or java [-options] -jar jarfile [args...] [2013-07-17 15:41:31 - sdk manager] [sdk manager] (to execute jar file) [2013-07-17 15:41:31 - sdk manager] [sdk manager] options include: [2013-07-17 15:41:31 - sdk manager] [sdk manager] -d32 use 32-bit data model if available [2013-07-17 15:41:31 - sdk manager] [sdk manager] -d64 use 64-bit data model if available [2013-07-17 15:41:31 - sdk manager] [sdk manager] -server select "server" vm [2013-07-17 15:41:31 - sdk manager] [sdk manager] -hotspot synonym "server" vm [deprecated] [2013-07-17 15:41:31 - sdk manager] [sdk manager] default vm server. [2013-07-17 15:41:31 - sdk manager...

java - What is the best approach to upload a file using Jersey client? -

i want upload file (a zip file specific) jersey-backed rest server. basically there 2 approaches (i mean using jersey client, otherwise 1 can use pure servlet api or various http clients) this: 1) webresource webresource = resource(); final file filetoupload = new file("d:/temp.zip"); final formdatamultipart multipart = new formdatamultipart(); if (filetoupload != null) { multipart.bodypart(new filedatabodypart("file", filetoupload, mediatype.valueof("application/zip"))); } final clientresponse clientresp = webresource.type(mediatype.multipart_form_data_type).post( clientresponse.class, multipart); system.out.println("response: " + clientresp.getclientresponsestatus()); 2) file filename = new file("d:/temp.zip"); inputstream fileinstream = new fileinputstream(filename); string scontentdisposition = "attachment; filename=\"" + filename.getname() + ...

Android Layout MinWidth -

i know can set minwidth using xml want know how set in code, because i'm adding linear layouts code view when content small layout's content i'm adding change , so, need set minimun width code. you have use viewinstance.setminimumwidth (int minwidth) . can read here

java - Custom Handler not added to own Logger -

i'm using jboss 7.1 , want use custom handler module. problem handler not added logger. standalone.xml: ... <subsystem xmlns="urn:jboss:domain:logging:1.1"> ... <custom-handler name="custom" class="my.company.logging.handler.myhandler" module="my.company.logging.handler"> <level name="info"/> <formatter> <pattern-formatter pattern="%d{hh:mm:ss,sss} %-5p [%c] (%t) %s%e%n"/> </formatter> </custom-handler> ... <logger category="my.company"> <level name="info"/> <handlers> <handler name="custom"/> </handlers> </logger> <root-logger> <level name="info"/> <handlers> <handler name=...

c# - DST in JavaScript -

how can check in js file whether current date in dst or not? in c# there below code available check this. can suggest similar code in js? var timezone = timezone.currenttimezone var tzbyid = timezoneinfo.findsystemtimezonebyid(timezone.standardname); var localdate = timezoneinfo.converttimefromutc(datetime.utcnow, tzbyid); let's start c# code provided. have bug. findsystemtimezonebyid expects value id property of timezoneinfo object. looking standardname of timezone object, might work, time zones, , on english language systems. id not localized, names are. really, should never use timezone . use timezoneinfo . if want local timezoneinfo , use timezoneinfo.local . but really, have written elaborate version of datetime.now . code doesn't other that. equivalent javascript new date() . so, asked how determine if current date in daylight saving time or not. assume meant local time zone. in c# datetime.now.isdaylightsavingtime . in javascript, ...

javascript - Dynamic content in custom mobiscroll -

i using mobiscroll select forms , having no problem when using static content, but... now trying create mobiscroll dynamic content ajax/json. here trying do: $(document).ready(function(){ $(function(){ var all_friends = []; $.getjson('http://mypage.com/json/friends.php', function(data){ $.each(data, function (i, val) { all_friends.push("'1':'<div class='friend'><div class='profileimg'><img src='http://mypage.com/"+val.img+"'/></div><span>"+val.name+"</span></div>'"); }); var friendlist = {all_friends}; // gives me trouble. cant this? // var wheel = [{}]; wheel[0]['choose friend'] = friendlist; $('#friends').scroller({ display: 'bottom', mode: 'scroller', wheels: whee...

actionscript 3 - Adobe Air multi-download -

i have been searching both web , stackoverflow complete answer implementing multiple downloads of mp3 files downloadmanager. have read number of post , realize efficient facilities use bytearray, urlstream , filestream saving t disk. have implemented follows: <?xml version="1.0" encoding="utf-8"?> <s:windowedapplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationcomplete="downloadfiles()"> <fx:declarations> </fx:declarations> <fx:script> <![cdata[ import flash.filesystem.*; import flash.net.urlstream; public var stream:urlstream; public var filedata:bytearray; public var filestream:filestream; public var file:file; public var trackstring:string; public var filearray:array; public var urlreq:urlrequest; private function downloadfiles():void { filearray = new array(); filearray[0]="c...

java - Eclipse juno won't hit breakpoints in GWT server side code running in tomcat -

i'm running vogella's tutorial on gwt ( http://www.vogella.com/articles/gwt/article.html ) , eclipse juno installation on osx not able hit breakpoint in server-side service module implementation java class myuserserviceimpl. i've linked external (not workspace) installation of tomcat 7 eclipse, able start , stop server. can see during server startup port 8000 setup attachment (by adding vm args: -xdebug -xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n). appear able attach port 8000 using remote debugging on localhost url in eclipse. any suggestions on why i'm not able hit breakpoint? turns out instead of debugging remote java application, debugging web application works. still need ensure in fact getting deployed correct tomcat installation directory. i've unchecked "run built-in server" in debug configuration web application type project. i've ensured eclipse has taken control of tomcat installation identified in pr...

How to retrieve value from multidimensional array in Ruby? -

what's simplest way retrieve english array providing en ? languages = [ ['english', 'en'], ['deutsch', 'de'] ] array#rassoc fits use case perfectly. languages = [ ['english', 'en'], ['deutsch', 'de'] ] languages.rassoc("en")[0] => "english"

Whats the python equivalent of a `while read ... do; ... done < file` for tab delimited file? -

i'm in process of converting bash scripts i've written python (my bash chops put me in minority i'm working). i've got bash while read function loop opens file , formats tab delimited content html table: function table_item_row { old_ifs="${ifs}" ifs=$'\t' while read code price description link picture line; printf " <tr>\n" printf " <td><img src=\"%s\"></td>\n" "${picture}" printf " <td><a href=\"%s\">%s</a> ($%.2f)</td>\n" "${link}" "${description}" "${price}" printf " </tr>\n" done < inventory.txt ifs="${old_ifs}" } i can in python, but, having heard of csv module, i'm wondering if there's preferred way: for line in open(filename): category, code, price, description, link, picture, plans = lin...

python - Confused about regular expression -

in book programming collective intelligence there regular expression, splitter = re.compile('\\w*') from context looks matches non-alphanumeric character. confused because seems matches backslash, 1 or more w's. match? your regex equivalent \w* . matches 0 or more non-alphanumeric characters. actually, using python string literal, instead of raw string. in python string literal, match literal backslash, need escape backslash - \\ , backslash has special meaning there. , regex, need escape both backslashes, make - \\\\ . so, match \ followed 0 or more w , need \\\\w* in string literal. can simplify using raw string. \\ match literal \ . that's because, backslashes not handled in special way when used inside raw string . the below example understand this: >>> s = "\wwww$$$$" # without raw string >>> splitter = re.compile('\\w*') # match non-alphanumeric characters >>> re.findall(splitter, s) [...

javascript - Handling negative-position images with overflow:auto -

consider following markup: http://jsfiddle.net/gbwgh/ . because list overflows container , overlaps text below, i'd scrollable instead, set overflow:auto . however, cuts off parts of image: http://jsfiddle.net/gbwgh/1/ . removing rule make image appear properly. how can make text scrollable without cutting off image? simplest option calculate coordinates manually using javascript, suggested in this answer ? img {position:relative; top : 20px; left : 20px;}

SQL Server Calculate the total update -

i have code, know not efficient way job done can say! new sql , line line. updating specific fields in table. need find total update, see list long , have more know need know how many total updates have. know if can in sql other copying , pasting code word document , count number of word update . can temp table that? update tblmep_monthlydata set consumption = 51634 tblmep_sites join tblmep_meters on tblmep_meters.siteid = tblmep_sites.id join tblmep_monthlydata on tblmep_monthlydata.meterid = tblmep_meters.id projectid = 40 , consumption != 51634 , tblmep_sites.name '%altgeld%' , type = 1 , billingmonth = '2012-11-01 00:00:00.000' ----------------------------------------------------------------------------- update tblmep_monthlydata set consumption = 38370 tblmep_sites join tblmep_meters on tblmep_meters.siteid = tblmep_sites.id join tblmep_monthlydata on tblmep_monthlydata.meterid = tblmep_meters.id projectid = 40 , tblmep_sites.name ...

c# - LINQ and ReSharper -

Image
hi have following code: if (!_jobs.any(j => j.id == emailjob.id)) { } this code should find elements satisfy condition. assume should return after finding first element, this: if (!_jobs.firstordefault(j => j.id == emailjob.id) != null) { } resharper tries simplify linq expression to: if (_jobs.all(j => j.id != emailjob.id)) { } this seems less efficient me because has check every single element satisifies inverse condition. sorry if i'm misunderstanding how linq works. joe both any , all stop looking upon condition failing. if looking more taking our word or anecdotal evidence, can see source doing. there inversion in all method after predicate applied. relative 0 performance impact, code readability main concern.

CSS background gradient not working in Google Chrome -

i'm using following css try vertical background gradient display in browsers. it works fine in firefox not displaying in chrome. you can see i'm trying apply gradient in footer section of http://blog.bmxboss.com background: -moz-linear-gradient(top, #222222 0%, #111111 100%); /* ff3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#222222), color-stop(100%,#111111)); /* chrome,safari4+ */ background: -webkit-linear-gradient(top, #222222 0%,#111111 100%); /* chrome10+,safari5.1+ */ background: -o-linear-gradient(top, #222222 0%,#111111 100%); /* opera 11.10+ */ background: -ms-linear-gradient(top, #222222 0%,#111111 100%); /* ie10+ */ background: linear-gradient(to bottom, #222222 0%,#111111 100%); /* w3c */ filter: progid:dximagetransform.microsoft.gradient( startcolorstr='#222222', endcolorstr='#111111',gradienttype=0 ); /* ie6-9 */ how can make work in chrome? using a tool made generate css gradients, css gr...

Git: make a branch as master on Github while keeping real master on BitBucket -

i have project hosted on bitbucket private project. project public trimming many source codes , configurations root project. have put public project on github. since internal project, keep working on project in git manner, push public appropriate changes project on github. have been managing 2 projects using svn on both since svn tool had been used before git. push more stuffs internal public, feel stupid way it. i think public project should master, since internal project has many additions on top of public, want stay away github internal project. theproject(on github) ->(branch)theproject_internal(on bitbucket) i want continue working on 'theproject_internal' , merge changes 'theproject' while keeping internal project absolutely forbidden public. how can achieve without headaches git? use tracking branches . suposing master branch of bitbucket has changes you'll release public, on github repository: $ git checkout -b master_of_bitb...

php - Open cart can't edit view -

i'am trying edit file view/common/home.tpl , see no changes in browser, i've tried clear system/cache - folder, still no changes, if edit controllers, work fine, can't edit view files, ideas? few possible reasons: if using vqmod edit file, clear vqmod cache deleting files of vqmod/vqcache folder (if reason,then update vqmod) if catalog side, make user editing home.tpl of current theme easiest way of checking delete content of home.tpl directly , home page should disappear.

python - How to keep a number below n -

i have python program outputs list of coordinates correspond points in survey. keep simple, i'm trying make coordinate above n (36) display like: 1.8+36 , 37.8, 1x1.8 (same number) work, or similar permutation... coordinates in lists (one x , 1 y). use if statement, works numbers less 72. as long values remain below 1296 (36*36), can divide number 36 , represent number 36. input_1 = 105 output_1 = (105 * 1.0) / 36 # 2.197 print '36*' + output_1 # 36*2.197

javascript - Single Page Web Design w/ Dynamic Navbar -

quite frankly don't know how describe i'm attempting do. "dynamic navbar" best have come with. basically, i've created single page website 4 "pages" (sections) using purely html , css (as jquery smoothscroll). i want highlighted link on navbar (the current page) change when users scroll between pages. i've seen done before, such on site: http://thinkpixellab.com/ i have little-to-no experience javascript , jquery , i'm not sure start. if point me in right direction appreicate it! what you're looking scrollspy. it's made mootools originally, think: scrollspy bootstrap have plugin framework: bootstrap scrollspy i found standalone jquery plugin it, though not sure how haven't used myself: plugin obviously write yourself, not experience of js/jquery reckon you're better off sticking plugin or something.

javascript - How can I add a keyboard shortcut for my command in CKEditor 3? -

my plugin defines command paste data , generate link it. is there way make keyboard shortcut it? can't find works. i cannot this work. running plugin definition doesn't work either ckeditor.config.keystrokes.append([ckeditor.ctrl + ckeditor.shift + 108, 'pastelotuslink']); nor trying @ least bold work c-q: editor.keystrokehandler.keystrokes[ckeditor.ctrl + 113, 'bold']; for 4.x, use editor.setkeystroke : ckeditor.plugins.add( 'foo', { init: function( editor ) { editor.setkeystroke( ckeditor.ctrl + 81, 'bold' ); // ctrl+q } } ); for 3.x: ckeditor.plugins.add( 'foo', { init: function( editor ) { editor.on( 'instanceready', function( evt ) { evt.removelistener(); this.keystrokehandler.keystrokes[ ckeditor.ctrl + 81 ] = 'bold'; // ctrl+q } ); } } );

java - Save HTMLDocument -

package htmldocsave; import java.io.ioexception; import javax.swing.text.badlocationexception; import javax.swing.text.html.*; import java.io.*; public class htmldocsave { public static void main(string[] args) { htmldocument doc = new htmldocument(); htmleditorkit kit = new htmleditorkit(); file f = new file("greeting.html"); try { kit.inserthtml(doc,doc.getlength(),"<b>hello</b>",0,0,null); fileoutputstream fos = new fileoutputstream(f); ??????????????????????????? fos.close(); } catch (badlocationexception | ioexception e) { e.printstacktrace(); } } } how save html document on file system? javax.swing.text.html.htmldocument class doesn't override tostring() method , gettext() removes tags. use htmleditorkit.write() method.

visual studio 2012 - Copied my asp.net project folder to open it in my laptop, and css stopped working -

i'm working on asp.net project , i'm doing css stuff. on desktop, works supposed to. when try open on laptop, css doesn't work anymore. one example usage of 'placeholder' atribute in asp.textbox. @ home, works on every browser have (ie, firefox , chrome). on laptop, property doesn't work. widths broken well. did wrong? thought copying project folder enough...or there's else should've done? i think 1 common mistake having mismatching paths when copy 1 machine (at least in workarea is!) did double check paths css in code , filesystem? if asp.net engine cant find files wont able use them.

c# - RegisterStartupScript only working part of the time -

i have method pulls html webservice , displays info in series of popup windows. achieve wrote javascript create popup: function dynamicpopup(title, htmlstring) { newwindow = window.open(); newdocument = newwindow.document; newdocument.write(htmlstring); newdocument.title = title; }; the loop through results calling following every object returned webservice. page.clientscript.registerstartupscript(this.gettype(), datetime.now.tostring(), resultmessage, true); the problem works when few popups returned if 15 returned 8-10 of them displayed. as bandage added wait after registerstartupscript , seems work results in slower delivery times. know other way address issue? instead of calling multiple page.clientscript.registerstartupscript in loop, first construct script needs run (e.g. using stringbuilder, combine multiple resultmessage separated ';') , call page.clientscript.registerstartupscript once execute resulting string.

parsing - How to parse a functions argument block? -

i'd reorganise arguments block in given rebol function provide more comprehensible understanding of arguments required function. arguments block in rebol function great example of malleable data structures in rebol: adjoin: func [ "adjoins" series [series!] "series adjoin" joinee /local other ][...] but need more predictable make sense of metadata. how more compliant format? example: [ ; should include value whether string there or not none none "adjoins" argument series [series!] "series adjoin" argument joinee none none option local none none argument other none none ] any thoughts transform method or best way represent arguments content helpful. here complete rebol script should out :-) note variables not have start dot, nor parse rules require surrounded in = signs. quick way separate task of each thing within rules. way easier identify word what, important when start build...

xaml - StaticResource for StringFormat in win phone not working -

i have declared resource in application.resources <sys:string x:key="decimalformat">\{0:f2\}</sys:string> now on textbox giving static resource stringformat not working. tried binding of stringformat application breaks. there want make stringformat dynamic. use without slash when defining resource <sys:string x:key="decimalformat">{0:f2}</sys:string> <textblock text="{binding mydecimal, stringformat={staticresource decimalformat}}" />

android - Google Spreadsheet API ListQuery by row id (row.getId) possible? -

when add row google spreadsheet using listfeed service shown below, receive bunch of row metadata back. 1 of values row id. row = service.insert(listfeedurl, row); system.out.println("row id " + row.getid()); // server generated row id attached is possible create list query @ later time returns row, using metadata (e.g. row id?) just background on trying do. multiple instances of app using same spreadsheet, , think far more efficient use server generated unique id retrieve row later (if possible), rather have app first query sheet see unique ids available. see listdemo.java. think demos (maybe all) of main listfeed features. search closest can see, if have primary key work. https://github.iu.edu/weng/incrementallearning/blob/master/gdata/java/sample/spreadsheet/list/listdemo.java i have not tried one, celldemo.java easy setup.

.net - How use WHERE in SqlDataAdapter in C# -

how use where in sqldataadapter in c#? i want name in textbox , use @ query wont work . sqlconnection sqlconnection = new sqlconnection("server=behnam\\accounting;initial catalog=accounting;integrated security=true"); datatable dt = new datatable(); string _search_name = txt_search.text; sqldataadapter sda = new sqldataadapter("select dbo.tbl_user.field1,dbo.tbl_user.field2 tbl_user dbo.tbl_user.name=_search_name ", sqlconnection); sda.fill(dt); datagridview1.datasource = dt; prepare command text , use parameter value of search. use command text initialize new sqlcommand . fill parameter value addwithvalue , pass sqlcommand constructor of sqldataadapter . string cmdtext = "select dbo.tbl_user.field1,dbo.tbl_user.field2 " + "from tbl_user dbo.tbl_user.name=@search_name" sqlcommand cmd = new sqlcommand(cmdtext, sqlconnection); cmd.parameters.addwithvalue("@search_name", _search_name); sqldataa...

shell - Check if there are any running processes in the current tab of terminal -

i have script opens many terminal tabs devices plugged in, runs tests on devices. clean terminal tabs after tests done. run things in background, , don't know when each process done. how can check if there process running in current tab of terminal? i plan command w in applescript kill each terminal command after each tab of terminal has no running processes. thanks! if use applescript, can check busy property: tell application "terminal" repeat t in tabs of windows if busy of t false script "exit" in t end if end repeat end tell exit closes tab if set "preferences > settings > shell > when shell exits" "close window".

coldfusion - CFChart labels disappear -

Image
i'm running following query , after running qoq secondconn , not getting desired output in cfchart. <!--- qoq firstconn ---> <!--- master query ---> <cfquery datasource = "xx.xx.x.xx" name="master1"> select str_to_date(date_format(timedetail,'%m-%d-%y'),'%m-%d-%y') firstconn , count(timedetail) firstoccurances , events mydatabase events = "first" group firstconn ; </cfquery> <!--- detail query ---> <!--- <cfdump var = "#master#"> ---> <cfquery dbtype="query" name="detail1"> select * master1 firstconn >= <cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar"> , firstconn < <cfqueryparam value="#dateadd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar">; </cfquery> <!--- qoq secondconn ---> ...

jquery validation with identical form names create single error messages -

i have form set of form fields can added , removed dynamically (using javascript) , therefore use array values names (example: id="namesupplier[]") pass them via ajax. my issue relates using jquery validate() - similar described in jquery validation identical form names . used solution suggested jab (second solution) on page, not work completely; when entering wrong value in example form field of second (third, etc) set, error message pops @ form field in first set (the error box related form field in second (third) set indicate error color expected, without message) any idea how solve this? code adding & removing form fields (getproductconfigform() returns string formfields of 1 set; each form field name=anarrayvalue[])) <script src="js/jquery-1.10.1.min.js"></script> <script src="js/productconfigform1.js"></script> <script> //!max of 5 energy electricity products! //values of these variable...

jquery - opening new tab on ipad triggered via AJAX not working -

seems not work opening new tab on ipad after ajax call has been made. here code. html: <form id="confirmform" action="http://www.google.com" target="_blank" method="post"> <input type="hidden" name="hinp" value="1" /> </form> <div id="someel">click</div> js: $("#someel").click(function(){ var nid = 123; $.post("http://someurl.com", { eyed: nid }) .done(function () { $("#confirmform").submit(); }); }); on ipad not open new tab. bug? opens fine regular web browser not ipad. maybe security or something? need post form on completion of ajax call points server open in new tab. it appears in .done() cannot open new window reason. not sure if bug, tried creating function window.open , firing .done() still no luck. since there lack of answers considering closed. work around open after ajax call , make ...

css - First row of table disappears once the column headers are fixed (sticky header) -

i need help, i can't seem figure out why first row in table (abc-123-123456) disappears or appears hidden once top columns fixed. work uses ie7 still need able have browser compliant sticky column headers. <!doctype html> <html> <head> <style type="text/css"> #data_container { margin-top: 5px; width: 100%; height: 200px; overflow-x: scroll; overflow-y: scroll; border: 1px solid #ccc; position: relative; color: rgb(60,60,60); font-size: 9pt; } #data { border-collapse:collapse; border-spacing: 0; border-right: 1px solid #ccc; table-layout: fixed; } #data th { border-bottom:1px solid #ccc; border-left: 1px solid #ccc; filter:progid:dximagetransform.microsoft.gradient(startcolorstr="#ffffff", endcolorstr="#dcdcdc"); font-weight: normal; } #data tr { text-align: center; } #data td { border-bottom:1px solid #ccc; border-left: 1px soli...

javascript - How to modify only the DESIGN temporarily (client-side) of an external site that I don't have directly access to? -

it normal website have captcha , form submit , check if captcha correct, take id , request information. i not have access site, , not mine. need information, site not have design, want modify design of site make better see, visually. can this? i tried using php curl , jquery $ajax crossdomain true, got access denied on two. important: want firebug does, temporary changes page layout, when refresh lose because client-side. something like: javascript:changecontent(); is possible? you can't. can include site using iframe. won't able update it. if could, every other site. means, go on site facebook , change things. access dom of iframe: var iframe = document.getelementbyid('myframe'); // id of iframe var iframe = iframe.contentwindow || iframe.contentdocument; if (iframe.document) { // dom can accessed iframe = iframe.document; iframe.body.style.backgroundcolor = "blue"; // example } else { // dom can't accessed in ...

tfs - How do I get my build agent to build a solution with external project references? -

currently plagued 2 tfs build issues: issue one: have solution project references dll product of project in solution. build agent not seem include these dlls , build fails. issue two: have solution references project in solution. build agent not seem include externally referenced project , build fails. i have looked @ "copy directory" build activity have no idea shim in or put source , output values. the best practice use project references referencing other projects within same solution. references external solution should use file references, , check in compiled dll being referenced. solution1 \project1 --> project1.dll \project2 --> project2.dll solution2 \projecta (references project1.dll) \projectb (references project2.dll) \references \project1.dll -- dll gets checked in here , projecta references here \project2.dll -- dll gets checked in here , projectb references here projecta.csproj <reference include="p...

ibm mq - Bouncing Out Of Method In IBM Websphere Studio Enterprise Developer - Java Code -

i have call method in class in action dispatcher, goes this: ... casemanagementletter cml = new casemanagementletter(); string content = cml.generatelettersbyclaimantspdf(cids, request, response, currentuser); ... the method opening looks this: public string generatelettersbyclaimantspdf(list cids, httpservletrequest request, httpservletresponse response, user currentuser) throws exception { hashmap ids = new hashmap(); ... immediately after line, code bounces out previous method. i have check variables , populated, , have checked break points , placed follow code, step-by-step. so why bouncing out of method this? edit: message seems consistently appear after being bounced out. [7/17/13 15:59:59:978 edt] 312f312f sharedpool j2ca0086w: shareable connection mcwrapper id 34aa34aa managed connection com.ibm.ws.rsadapter.spi.wsrdbmanagedconnectionimpl@32ca32ca state:state_tran_wrapper_inuse resource jdbc/wpm_datasource used within local transaction contain...

Wrap text to a circle shape in svg or canvas -

Image
what solution fitting text circle on website, flows curves of circle, instead of rectangular bounding box? here's i'm trying achieve: there number of black circles (of fixed size) on page, textarea next each of them. when text entered textarea, appears in black circle, centered on both axes. if text entered line becomes longer radius of circle, minus specified value margin, line break expect regular wrapping, block of text still being centered. lines nearer top or bottom will, of course, shorter ones near middle. the text have fixed size , when circle filled text, content should not shown (like overflow hidden). the black circles text speech bubbles, meant printed , glued onto poster. do of fantastic svg/canvas libraries support or have figure our method scratch? there proposed css feature call "exclusions" make possible flow text inside defined areas: http://www.w3.org/tr/css3-exclusions/ this means svg , canvas paths defined containers , text ...