Posts

Showing posts from February, 2015

Javascript - Problems with Loop with Array -

Javascript - Problems with Loop with Array - i have next code when working correctly should open link 1 in iframe, wait 3 seconds, open link 2 in iframe, wait 3 seconds, etc.. currently it's skipping straight lastly value in array (the lastly link). any js expert takers? <html> <head></head> <body> <a href="http://www.google.com">google</a><br /> <a href="http://www.thinkgeek.com">thinkgeek</a><br /> <a href="http://www.themetapicture.com">the meta picture</a> <iframe src="http://www.google.com" id="myid" name="main" width="1024" height="768"> </iframe> <script> function getlinksarray() { (var = 0; < document.links.length; i++) { var linx = document.links[i].href; // create closure each loop iteration (function(linx) { settimeout(function() ...

linux - How and why does "setenforce 0" allow Java 7 to run? -

linux - How and why does "setenforce 0" allow Java 7 to run? - i've made changes on programme i'm working on , i've updated java java 6 java 7. i running programme on centos 5.8 32-bit vm. before java update worked fine. now process isn't starting error: [root@centos-58-i-0 bin]# ./agent.sh start starting agent.....d. running (23442). error: dl failure on line 864 error: failed /agent/jre/lib/i386/client/libjvm.so, because /agent/jre/lib/i386/client/libjvm.so: cannot restore segment prot after reloc: permission denied i've checked online , solution/workaround run command: setenforce 0 and work. reading documentation on setenforce command, didn't understand , how did solve problem. so questions are: what may cause error prevents me starting process? why setenforce command solve it? please give short explanation of setenforce in general. 1) may cause error prevents me starting process ? this pro...

Top Down Web Service on Google App Engine in Java -

Top Down Web Service on Google App Engine in Java - has managed develop top downwards web service (wsdl first) , deployed google app engine. illustration given @ https://developers.google.com/appengine/articles/soap bottom approach. i've used apache cxf generate java web service stubs wsdl, bundled in app engine libraries , xml config files, no joy. see java.lang.noclassdeffounderror: javax/management/jmexception in app engine logs when initialising cxfservlet , pretty nasty. classnotfoundexception maybe about, noclassdeffounderror indicative of class available @ compile time not available @ runtime. jmexception jdk class, expect available. i'm not bothered in fixing exception , i'm more interested in whether has proof of concept top downwards web service in java on gae i read article mentioned, exercise: code lab exercise 5: soap web services what understood 2 sources (and others) is, top downwards / contract first approach not supported gae build...

When using execandwait interceptor in In struts2 the session is locked during the initial delay -

When using execandwait interceptor in In struts2 the session is locked during the initial delay - i have struts2 application has few actions take time load (because of heavy db calls). in order display wait page i'm using execandwait interceptor. setup of action looks this: <action name="showcustomerholding" class="showcustomerholdingaction"> <interceptor-ref name="defaultstack" /> <interceptor-ref name="execandwait"> <param name="delay">30000</param> <param name="delaysleepinterval">500</param> <param name="threadpriority">1</param> </interceptor-ref> <result name="success">/web-inf/jsp/customerholding.jsp</result> </action> as test i've set initial delay 30 seconds. in scenario expect never see wait page. instead whole application seems freeze 30 seconds. i've figured out reason happens i...

java - wsimport and WSDL with duplicate variables -

java - wsimport and WSDL with duplicate variables - i'm trying run wsimport against wsdl file cannot modify. portion of wsdl looks this: <xsd:complextype name="bapiitemex"> <xsd:sequence> <xsd:element name="itmnumber" type="n0:numeric6"/> <xsd:element name="poitmno" type="n0:char6"/> <xsd:element name="material" type="n0:char18"/> <xsd:element name="matentrd" type="n0:char18"/> <xsd:element name="shorttext" type="n0:char40"/> <xsd:element name="netvalue" type="n0:numeric15"/> <xsd:element name="currency" type="n0:cuky5"/> <xsd:element name="subtotal1" type="n0:numeric15"/> <xsd:element name="subtotal2" type="n0:numeric15"/> <xsd:element...

In Rails, is it possible to use the show view as an edit view? -

In Rails, is it possible to use the show view as an edit view? - new rails here, excuse me if simple. i'm having hard time finding out answer, want know before dive in deep. the app i'm aiming build not have differentiation between 'show' view , 'edit' view. part, have listings of entries (index view) click straight through edit view. no 'show' view necessary. it bulk of app. there still sections require 'show' views, though. is possible set routing construction this? if show view isn't necessary, can tell resource route in routes.rb not include it, like: resources :users, :except => :show if want utilize same view both edit , show, in show action, example, can like: def show @user = user.find(params[:id]) render :action => 'edit' end this utilize edit.html.erb file when show action hit, although in sentiment best alternative pick view plan utilize , omit other in routes.rb . if want...

html - JavaScript, No JQuery Please, how to get total count of specific tag inside an iframe -

html - JavaScript, No JQuery Please, how to get total count of specific tag inside an iframe - i need know how total count of specific tag within iframe on same domain. using working illustration without iframe: <div id="id_of_first_div"> <p> </p> <p> </p> <div> <p> </p> </div> <p> </p> <p> </p> </div> <script> var top_level_div = document.getelementbyid('id_of_first_div'); var count = top_level_div.getelementsbytagname('p').length; document.write(count); </script> assuming iframe on same domain containing window: ifr = // preferred method of getting <iframe> element, getelementbyid preferred count = ifr.contentdocument.getelementsbytagname('p').length; javascript html

linux - Small exception in linking shared library -

linux - Small exception in linking shared library - i have kept libawesomium.1.6.5.so , libawesomium.1.6.5.so.0 files in /usr/lib/awesomium.1.6.5 folder, , given path .so library in ld.co.config.d, in new .conf file, when run project gives me a system.dll not found exception libawesomium.1.6.5.so.0 @ (wrapper managed-to-native). how solve error. when check existence of library through sudo ldconfig -p | grep libawesomium-1.6.5.so command, gives me next output: libawesomium-1.6.5.so.0 (libc6) => /usr/lib/awesomium-1.6.5/libawesomium-1.6.5.so.0 it means exists. still @ run-time project giving error : system.dllnotfoundexception libawesomium-1.6.5.so.0 i working on monodevelop, can suggest me please thing missing. there addon have install or terminal command have follow. hoping quick responses. regards rohit you should able add together libdir=/lib /etc/ld.so.conf , issue ldconfig. if not, might using vmx or other type of setup require utilize linker ...

android - Continuously Scan Bluetooth Devices -

android - Continuously Scan Bluetooth Devices - i've written below code continuously scan bluetooth devices based on solution provided in link. according solution, device should continuously scan/search bluetooth devices in range, in case scan happens ~64 seconds. i've tested code on 2 devices, 1 android v2.2 , other v2.3, both devices scan ~64sec. how create device scan continuously? public void onreceive(context context, intent intent) { string action = intent.getaction(); if(bluetoothdevice.action_found.equals(action)){ //do }else if(bluetoothadapter.action_discovery_finished.equals(action)){ btadapter.startdiscovery(); } } android bluetooth

Killing a JavaScript function which runs infinite -

Killing a JavaScript function which runs infinite - as example var runinfinite = function(){ while(1) { // stuff; } }; settimeout(runinfinite, 0); is possible break runinfinite function form running infinite? mean possible kill function function without using flag or homecoming statement? the reply no. since javascript single-threaded ( unless using less mutual implementation uncertainty ) nil can break loop ( or other block of code ) outside. javascript javascript-events

php - Ajax not returning any atributes -

php - Ajax not returning any <table> atributes - this rather weird, , rather complicated, im going seek explain best can. im making calendar hand, plan on open sourcing etc. im going , sense of google calendar, seem best, plan on 1 upping + open source. running flawlessly except when click previous month, in order view previous month, ajax query ran, php returns new calendar, when renders renders without any <table> elements other havent nail snag yet ideas? heres code/images: html: //function utilize xml function xml(){ //need set xml run php query if (window.xmlhttprequest) {// code ie7+, firefox, chrome, opera, safari xmlhttp = new xmlhttprequest(); } else {// code ie6, ie5 xmlhttp=new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readystate == 4 && xmlhttp.status == 200) { document.getelementbyid("calendar").innerhtml...

c++ - Create Array Beginning at Specific Address -

c++ - Create Array Beginning at Specific Address - in c++, possible create array of specific size (such short array[2048]) begins @ specific address, such 0x1000? short answer: no. in non-embedded systems (for i'll limit reply to) user address space virtual address space. meaning if pointer points 0x1000 not physical location of allocated info in physical memory map. so, since scheme hides physical addresses - can't request specific physical address. virtual addresses however, adiffernet story... having understood there no guarantee pointing 0x1000 mean pointing physical address 0x1000, in linux can utilize function mmap() , windows counterpart virtualalloc() request allocation specific virtual address. of course of study these functions not guaranteed work (for instance, if virtual address requesting mapped or if scheme "reserved"). c++ arrays memory

Regular Expression,Regex PHP -

Regular Expression,Regex PHP - i need validade string in next format: numbers, letters , _ minimum length 4 , max length 15 @ to the lowest degree 1 letter [a-z] for example: valid: abcd abcde abc_ 01a_ a12345_bcdw1234 not valid: abc 01a a12345_bcdw123411 _1212392034 _ a_1 i made couple tries none work. i don't think can in 1 regex, validation of constraints on length {4,15} , "must contains letter" must done independently. $test_inputs = array( 'abcd', 'abcde', 'abc_', '01a_', 'a12345_bcdw1234' , 'abc', '01a', 'a12345_bcdw123411', '_1212392034', '_', 'a_1' ); $res = array(); foreach($test_inputs $input) { $res[$input] = (preg_match('/^[a-z0-9_]{4,15}$/i', $input) && preg_match('/[a-z]/i', $input)); } var_dump($res); php regex expression

ssl - Any issues talking with Java communicating with Active Directory over JNDI/LDAP/TLS due to BEAST fixes? -

ssl - Any issues talking with Java communicating with Active Directory over JNDI/LDAP/TLS due to BEAST fixes? - both microsoft , java have made changes in order address beast vulnerability. based on this msdn article, looks interoperability issues have crept up, microsoft has apparently provided sql server patch help out interoperability java 6 update 30 , later. since beast issue related tls protocol, think similar interoperability issues creep with java code tries talk tls windows systems. so... does know similar interoperability issues have occurred java code running on java 6 update 29 or later tries communicate active directory via jndi, ldap, , tls? anyone have thought why microsoft's interoperability patch appears sql server , not windows? java ssl active-directory beast

vb.net - How to populate an SQL Server table with users information from Active Directory? -

vb.net - How to populate an SQL Server table with users information from Active Directory? - using vb.net in ssis package, how populate sql server table users in multiple active directory domains (in same forest)? script component (vb.net) system.directoryservices here sample logic import active directory users info 1 domain database table help of vb.net in script component configured source. sample tested in ssis 2012 should work in ssis 2008 , above. logic not work in ssis 2005 because namespace system.directoryservices.accountmanagement introduced in .net framework 3.5 , ssis 2005 uses .net framework 2.0 create ssis package. sample uses ssis 2012. create oledb connection manager connect sql server database. if created info source, add together info source package's connection manager tab. drag , drop data flow task onto control flow tab. double-click data flow task switch data flow tab. drag , drop script component onto data flow tab. check source...

regex - Is this a regular language? If so, what is it's regular expression? -

regex - Is this a regular language? If so, what is it's regular expression? - b = {1^k y | k >= 1, y in {0, 1}* , y contains @ to the lowest degree k 1's } is language regular? if so, how prove it, , how represent regular look in python? this class work, if explain reasons , processes behind answer, it'd much appreciated. the language have equivalent language: class="lang-none prettyprint-override"> b' = {1 y | y in {0, 1}* , y contains @ to the lowest degree 1 1} you can prove b' subset of b, since status in b' same b, k set 1. proving b subset of b' involves proving words in b k >= 1 belongs b', easy, since can take away first 1 in words in b , set y rest of string, y contain @ to the lowest degree 1 1. therefore, can conclude b = b' . so our job simplified ensuring first character 1 , there @ to the lowest degree 1 1 in rest of string. the regular look (the cs notation) be: 10*1(0...

R doesn't recognize Pandoc Linux Mint -

R doesn't recognize Pandoc Linux Mint - i asked related question: check if programme installed but refraining answering until i've tested solutions myself on 3 systems. can pandoc work within r on windows machine on linux error/response each method r terminal: 1: > system('pandoc -v') sh: 1: pandoc: not found 2: > mypaths <- c("pandoc", + "~/.cabal/bin/pandoc", + "~/library/haskell/bin/pandoc", + "c:\\progra~1\\pandoc\\bin\\pandoc") > sys.which(mypaths) pandoc ~/.cabal/bin/pandoc "" "/home/tyler/.cabal/bin/pandoc" ~/library/haskell/bin/pandoc c:\\progra~1\\pandoc\\bin\\pandoc "" "" 3: > sys.which("pandoc") pandoc "" you may think don't ...

algorithm - C++ Chocolate Puzzle -

algorithm - C++ Chocolate Puzzle - let's have n chocolates have packed p boxes in order arrive. each chocolate has number of calories x , each box has capacity k has less or equal 3*sum(x1, x2, ..., xn) + max(x1, x2, ..., xn)^2 - min(x1, x2, ..., xn)^2. in task i'm given n, p , x each chocolate , have figure out lowest possible k. help me on (not looking solution hints regarding problem)? example: n = 8, p = 3, x = {1, 4, 5, 6, 3, 2, 5, 3} k first 3 chocolates = 3*(1+4+5) + 5^2 - 1^2 = 54 k next 2 chocolates = 3*(6+3) + 6^2 - 3^2 = 54 k lastly 3 chocolates = 3*(2+5+3) + 5^2 - 2^2 = 51 lowest possible k = 54 so goal find best combination using p boxes has lowest k. thanks! here how solve in java: import java.util.hashmap; import java.util.map; import java.util.random; public class chocolatepuzzle { private static final map <string, integer> solutions = new hashmap <string, integer> (); private static final m...

jquery - losing content when sending ajax value to php -

jquery - losing content when sending ajax value to php - im using ajax send info php , next whats beingness sent title=2&note= logo mynameisdonald%s's photo mynameisdonald sign out forums garage club shop classifieds systems my-stoc club advanced forum fiesta st owners club → fiesta st mk6 technical handbook → brakes, wheels & tyres view new content shoutbox open shoutbox in popup we've noticed you've been inactive on 10 minute(s). we've stopped running shoutbox due inactivity. if again, please click i'm button below. 3 follow forum brakes, wheels & tyres page 1 of 172 1 2 3 next » start new topic mark forum read updated start date replies viewed custom new replies pinned center caps started jim, 22 jun 2006 1 2 3 13 → hot 190 replies 5,979 views center caps - lastly post st-lloydy st-lloydy 13 feb 2013 pinned centre caps fitting diagram started scotty h , 20 mar 2009 6 replies 993 views centre caps fitting diagra...

testing - Using a single physical test machine for multiple team projects -

testing - Using a single physical test machine for multiple team projects - my situation this: have multiple rather little winforms projects i'm creating coded ui tests for. have 1 physical machine availble running said ui tests, , each project needs run tests quite rarely, 1 machine enough. i got tests running on single project (using mtm, created test cases, on vs side used associated automation -thing, created labdefaultprocess , mapped them test suite) , works wanted. the problem comes when seek using same testing machine team project. unable add together environment mtm lab management because says chosen environment in use. so there such limitation (meaning have combine projects single team project on it), or there more sophicisticated way of doing this? on single computer available testing have test controller , test agent installed. the environment have created bound team project. requirement within lab management machine not loosely coupled entity reu...

jvm - what is the difference between java-1.7.0-openjdk-i386 and java-7-openjdk-i386 -

jvm - what is the difference between java-1.7.0-openjdk-i386 and java-7-openjdk-i386 - when install netbeans gives me alternative select java environment, have 3 options, oracle java , these 2 (java-1.7.0-openjdk-i386 , java-7-openjdk-i386). difference between these two?the os if ubuntu. the 2 openjdk same. openjdk different oracle jdk. read this post more clarification. the reason why getting 2 options openjdk have 2 copies of openjdk installed (or 2 different references same directory on system.) for farther investigation, seek ls -lh /usr/lib/jvm . /usr/lib/jvm directory java gets installed. check if 1 of them symbolic link. also, check in netbeans location of 2 jdk , see if in fact have 2 versions or references of java on system. for example, here output of ls -lh on system: ls -lh total 24k lrwxrwxrwx 1 root root 26 sep 10 13:41 default-java -> /usr/lib/jvm/java-7-oracle lrwxrwxrwx 1 root root 18 mar 13 2012 java-1.5.0-gcj -> java-1.5.0-gcj...

active directory - VB.net creating new AD user account using UserPrincipalEx? -

active directory - VB.net creating new AD user account using UserPrincipalEx? - i'm having heck of time trying add together fields section , title. i'm using create user account: dim ctx new principalcontext(contexttype.domain, "domain.name.pvt", "ou=users,dc=global,dc=pvt") dim usr userprincipal = new userprincipal(ctx) i have no problem creating business relationship can't add together simple things department , title . read using extensions in c++ , have no clue on how it. any help great!!! thanks! if you're on .net 3.5 , up, should check out system.directoryservices.accountmanagement (s.ds.am) namespace. read here: managing directory security principals in .net framework 3.5 msdn docs on system.directoryservices.accountmanagement to extend userprincipal class, don't need much - suffice (i wrote in c# , converted vb.net on 'net - hope there's no issues vb.net code!) imports system.directoryservi...

c# - Get usage overview programmatically -

c# - Get usage overview programmatically - i have trial business relationship of windows azure. under category "web sites", can see usage overview of deployed websites: is possible info (both used , max) programmatically somehow? no. not possible retrieve info programmatically api behind (i'm assuming there's api behind this) not publicly available. c# azure

A Visual C++ Project for Linking Without Compiling -

A Visual C++ Project for Linking Without Compiling - i'm trying create vc++ project link several libraries together, without first compiling anything. created empty project, added additional dependencies in linker options, when seek build following: 1>------ rebuild started: project: sde-mix-mt, configuration: release x64 ------ 1>build started 2/6/2013 11:32:49 pm. 1>_prepareforclean: 1> deleting file "x64\release\sde-mix-mt.lastbuildstate". 1>initializebuildstatus: 1> creating "x64\release\sde-mix-mt.unsuccessfulbuild" because "alwayscreate" specified. 1>finalizebuildstatus: 1> deleting file "x64\release\sde-mix-mt.unsuccessfulbuild". 1> touching "x64\release\sde-mix-mt.lastbuildstate". 1> 1>build succeeded. 1> 1>time elapsed 00:00:00.04 ========== rebuild all: 1 succeeded, 0 failed, 0 skipped ========== although says build succeeded didn't build (check time elapsed). ...

xcode - Adding OCMock causes Test to launch main app instead of running tests -

xcode - Adding OCMock causes Test to launch main app instead of running tests - i'm trying add together ocmock existing cocoa project, running unusual problem don't see else cover. i isolated following: if add together ocmock.framework reference project (i.e. drag in somehow link binary libraries build phase), when run tests, real app gets launched instead. without ocmock, output normal: test suite 'multiple selected tests' started @ 2013-02-07 20:07:03 +0000 with ocmock framework link (partial output): error loading myprojtests.octest/contents/macos/myprojtests library not loaded: @rpath/ocmock.framework/versions/a/ocmock reason: image not found idebundleinjection.c: error loading bundle '/users/alex/library/developer/xcode/deriveddata/myproj-bqwyxyspdiudktfnjcdgibdmpgsa/build/products/debug/myprojtests.octest' other app output appears normal after point. while app running, test progress spinning on lastly tab of project navigator, , do...

ruby on rails - ActionView::Template::Error (undefined method `+' for nil:NilClass): -

ruby on rails - ActionView::Template::Error (undefined method `+' for nil:NilClass): - one of pages keeps hitting error: actionview::template::error (undefined method `+' nil:nilclass): 15: <div class="look_list"> 16: <% collection.each |look| %> 17: <div class="look_book" id="<%= look.content_id %>"> 18: <% thumbnail_image = (look.processing? ? "/assets/processing_placeholder.gif" : (look.image.url(:thumb) + "?#{look.updated_at.to_i}")) %> 19: <%= image_tag thumbnail_image || "/assets/processing_placeholder.gif",:class=> "look_image", :size => "118x118" %> 20: <script type="text/javascript"> 21: app/views/looks/index.html.erb:18:in `block in _app_views_looks_index_html_erb__3409922204803071014_68666020' app/views/looks/index.html.erb:16:in `_app_views_looks_index...

visual studio Python tools plugin command line: pass '%09' as a string and NOT have it be interpreted as tab -

visual studio Python tools plugin command line: pass '%09' as a string and NOT have it be interpreted as tab - i'm in visual studio 2010 debugger using python tools plugin (which fabulous way). set command line args 'bon7%09/13' , want passed in string. visual studio tells me have 2 command line args, not one: "bon7" , "/13". because %09 ascii code tab, , it's converting char. don't want conversion. how block it? tried usual escapes (single quotes around string, double quotes around string, backslash in front end of %) none of help. how create visual studio treat command line arg pure text? it's worth, doesn't convert %09 when run command line without visual studio. also, tried same thing in c# works fine there. you seek work around of using %3709 if consumed described should create %09 . visual-studio command-line tabs

design patterns - Junit and java classes. -

design patterns - Junit and java classes. - the below simple java class file checks if file provided user under home directory or not. throws exception when file not under home directory. public class { public static void main(string args[]) { if (new a().processargs(args[0]) { throw exception("not under home directory"); } } // simple method check if file @ home directory private boolean processargs(string s) { file f = new file(s); string userhome = system.getproperty("user.home"); if (s.startswith(userhome) && f.exists() && additionallogic()) homecoming true; else homecoming false; } // additional business logic private boolean additionalbusinesslogic() { // wonderful things. } } i want write simple junit test case testing java class. primary concern test additional business logic method. there way can bypass check directory must under user home directory. i not co...

three.js - THREEjs cant get a sphree to render to screen -

three.js - THREEjs cant get a sphree to render to screen - hii trying sphree render screen. here js file. function earth() { this.getearth = init(); function init() { var map = {map:three.imageutils.loadtexture("images/earth_surface_2048.jpg")}; var material = new three.meshbasicmaterial(map); var geometry = new three.spheregeometry(1,32,32); homecoming new three.mesh(geometry, material); } function update() { getearth.rotation.x += .01; } } and here script in html file threejs included page. <script> var renderer = null; var scene = null; var photographic camera = null; var mesh = null; var earth = null; $(document).ready( function() { var container = document.getelementbyid("container"); renderer = new three.webglrenderer({ antialias: true } ); renderer.setsize(container.offsetwidth,container.offsetheight); cont...

javascript - Cachin jquery objects simple code -

javascript - Cachin jquery objects simple code - i'm trying implement caching , reduced dom manipulation complex js code. want create sure, what's more efficient? 1) var $thebox = $(".textbox[data-title*='"+dt+"']"); $thebox.remove(); or 2) $(".textbox[data-title*='"+dt+"']").remove(); ? they same if utilize $(".textbox[data-title*='"+dt+"']") 1 time. it case. if have to re-new 'selector' before remove of them. you have utilize $(".textbox[data-title*='"+dt+"']").remove(); because $thebox old now. javascript jquery performance

Is there a way yet to configure mathjax for wordpress.com? -

Is there a way yet to configure mathjax for wordpress.com? - there plugin wordpress.org. there way add together code page template in wordpress.com, can blogger? searching "mathjax" on wordpress.com, i've found this thread useful. in sec post, provides link official guide on latex support, helpful if just need typeset math on wordpress.com. mathjax

java - Prime Faces - remove select checkbox based on row criteria - is it possible -

java - Prime Faces - remove select checkbox based on row criteria - is it possible - i have implemented org.primefaces.model.selectabledatamodel . now when rendering <p:datatable> based on selectabledatamodel add together column checkboxes using: <p:column selectionmode="multiple" /> for rows not want checkbox appear, based on attribute of row. i cannot see way this. possible out box prime faces functionality ? you can disable checkbox: <p:column selectionmode="multiple" style="width:18px" disabledselection="#{car.color =='black'}" styleclass="#{car.color =='black' ? 'selectiondisabled':''}"/> the check box disabled, however, visible. hide disabled checkbox css: td.selectiondisabled .ui-chkbox{ display: none; } java jsf java-ee jsf-2 primefaces

javascript - Need an image/shape at the position of mouse -

javascript - Need an image/shape at the position of mouse - i working on research project , need little help. since novice in js/highcharts, issue may seem basic many. want display circle @ mouse position (i.e. whenever mouse hovers on chart). and when click mouse (mousedown) want circle stick in position, , thereafter circle not follow mouse position remains stuck in mouseclick position. i believe circle can made using renderer.circle(). , mouse position can obtained jquery function. need logic incorporate them within highstocks. any help appreciated. if can provide solution based on demo link(jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/stock/demo/candlestick/) thats amazing. it's not perfect (a little choppy), next should started: // setup `chart` object ... var circle = chart.renderer.circle(0, 0, 5).attr({ fill: 'blue', stroke: 'black', 'stroke-width': 1 }).add() .tofront(...

coding style - variables and functions naming convention in c applications -

coding style - variables and functions naming convention in c applications - i have made c application using vs 2010 , have followed lowercase underscores naming convention variables , functions in application. asked follow camel case in entire application. want inquire whether right approach naming convention in c if yes there tool can convert variables , functions camel case in existing c application. coding standards vary company company. mature companies have one, , there old code lying somewhere doesn't follow it. as long coding done consistent style, know name of function checks if car-door open in application, whether called car_door_open , cardooropen , cardoorisopen matters lot less. key consistency. i'm not aware of tool can rename identifiers in code, modern ide's have "rename identifier", can helpful these type of things. c coding-style

python - Selenium webdriver without any Desktop browser -

python - Selenium webdriver without any Desktop browser - i using selenium. have next code: from selenium import webdriver selenium.common.exceptions import nosuchelementexception selenium.webdriver.common.keys import keys browser = webdriver.firefox() browser.get("http://www.mysite.com") x = browser.find_elements_by_xpath("//div[@id='containeriso3']/div/a[1]") hrefs = [i.get_attribute('href') in x] now, works. but want on server runs on ubuntu command line. means cannot utilize this browser = webdriver.firefox() in code. alternative can used through command line? you can utilize htmlunitdriver headless browser based on rhino javascript engine. http://code.google.com/p/selenium/wiki/htmlunitdriver python selenium command-line selenium-webdriver htmlunit

jquery - Using trigger() to check a checkbox, how can I tell if it's checked or not without the checked="checked" being set? -

jquery - Using trigger() to check a checkbox, how can I tell if it's checked or not without the checked="checked" being set? - using jquery 1.9.0, if utilize .trigger('click') on checkbox, checked attribute not set. there way else can tell if checkbox checked then? right now, have explicitly handle click event , manually toggle attribute. jquery supposedly simplifying javascript, seems long way go it. i used not have in 1.8.3, in 1.9.0, setting attribute doesn't update display in browser whatever reason. check property, not attribute. attribute isn't useful. $(checkbox).prop("checked") // true if checked, false otherwise $(checkbox).prop("checked",true) // create checked $(checkbox).prop("checked",false) // create not checked edit comment: there's selector that: $(".mycheckboxes:checked") jquery

Putting interest rates on US states map in R -

Putting interest rates on US states map in R - how plot involvement rate bubbles of respective states in on map using r. in r have maps library , can draw states map. so. library(maps) map("state", boundary = false, col="gray", add= true) now if want add together bubble diameter involvement rate mean state on map of state. first find out capitols of states, find co-ordinates , utilize points(latcapitol, loncapitol, col="blue",pch=19, cex=interest.rate ) for each state. there simpler way. perhaps library has required info state capitol co-ordinates. or should place points in middle of state , not on state capitols. plus how prepare eastern states density. there lot of little states in north east. here solution sample false dataset states mean involvement rate state.mean.interest <- data.frame("state" = c("az", "id", "sc", "tx", "nj"), ...

c# - get only 1 pixel's color from a texture2D -

c# - get only 1 pixel's color from a texture2D - currently, i'm using method pixels' color of texture2d color[] pixelcolours = new color[mytexture.width*mytexture.height]; mytexture.getdata<color>(pixelcolours); as can see, store every pixels' color in tab. the texture2d pretty huge : 1000 pixels x 1000 pixels. but need 1 pixel's color, means store 999.999 useless others pixels. the pixel's position on texture2d moving, code in update() method. are there others ways 1 pixel fast low memory cost ? the getdata method overloaded , allows specify starting pixel , how many elements get: http://msdn.microsoft.com/en-us/library/bb197093.aspx. c# colors xna texture2d

python - QT/PySide processEvents call locks up -

python - QT/PySide processEvents call locks up - why phone call processevents block doing nil 9 seconds? i have application pyside-based qt interface, ui code sits decoupled layer on lower level actual application logic. when user performs action executes lower level application logic may run while, happens is: directly on gui thread progress dialog displayed. directly on gui thread, lower level logic starts worker thread. directly on gui thread, lower level logic loops updating progress dialog (indirectly/decoupled) , ticking application event queue via qtgui.qapp.processevents() (again indirectly/decoupled). on worker thread, qt functions invoked (again indirectly/decoupled) in reaction events, , these happen on gui thread via slots/signals, running when gui thread (as mentioned above) calls processevents(). directly on gui thread, before loop exits, lastly processevents() phone call blocks around 9 seconds. after logic on worker thread on , done with, , there no more...

media player - Android Listview. How to play all music and select song -

media player - Android Listview. How to play all music and select song - this code loads music in listview, , play song select, need play music in list, when while or for , cant select song while playing. import android.app.activity; import android.content.context; import android.database.cursor; import android.media.mediaplayer; import android.os.bundle; import android.provider.mediastore; import android.view.view; import android.view.viewgroup; import android.widget.adapterview; import android.widget.baseadapter; import android.widget.listview; import android.widget.mediacontroller; import android.widget.mediacontroller.mediaplayercontrol; import android.widget.textview; import android.widget.adapterview.onitemclicklistener; public class mainactivity extends activity { listview musiclist; cursor musiccursor; int music_column_index; int count; mediaplayer mmediaplayer; mediacontroller mc; /** called when activity first created. */ @override public void oncre...

Installshield: is it possible to use ProductVersion property in MSI Upgrade table? -

Installshield: is it possible to use ProductVersion property in MSI Upgrade table? - a typical "upgrade table" installshield msi installation cntains 2 records: "from version current upgrade" , "from current downgrade". requires manually copy-paste "current version" number every time major, minor or build number has changed, not good. currently i'm using script parses .ism project file , replace version number in upgrade table before build. dirty hack. maybe possible utilize "productversion" msi property in upgrade table, product version stored only in property? have tried come in property name multiple ways, [productversion] or ##productversion## , nil helps - not beingness replaced property value, , resulting msi contains "##productversion##" text instead of "1.30.1264" property value. a new project should contain 2 records intended behave describe. instead of storing actual product version, ...

sql - do multiple inserts for each row -

sql - do multiple inserts for each row - briefly, question how next in t-sql 2012, without cursors (pseudo-code): for each r in input_list: insert t1(...) ... if (r.field1 not null) insert ta(...) (...@@identity ... r.field1) ... else if (r.field2 not null) insert tb(...) (...@@identity... r.field2) ... long question: suppose have next 3 tables, modelling fact object can either file or directory. obj(id int, creation_date datetime) -- objects have creation date. file(id int, id_obj int, path nvarchar(max)) -- id_obj foreign key obj dir(id int, id_obj int, path nvarchar(max), shared bit) -- id_obj foreign key obj i need write stored proc takes list of "logical objects" (which can represent either files or dirs) , must add together them db, i.e. must create, each logical object, 1) row in obj, , 2) row in either file or dir (depending on whether logical object represent file or directory). to write stored proc, cre...

actionscript 3 - AS3 Error 1014 when loading multiple local SWFs -

actionscript 3 - AS3 Error 1014 when loading multiple local SWFs - i have 2 swfs, phone call them , b. never deployed website, , beingness used tools. b depends on - of classes in b extend classes in a. i creating 3rd swf, phone call x. x attempting load , b using flash.display.loader , flash.net.urlrequest . , b paths pushed array, , called in loadlibrary function so: public class libraryloader { private static const class_name:string = "libraryloader"; private var _libraries:displayobjectcontainer; ... public function loadlibrary(callback:function, libname:string):void { trace("loadlibrary('" + libname + "')"); var loader:loader = new loader(); loader.name = libname; var listener:function = function(e:event):void { trace("finished loading '" + libname + "', event: " + e); loader.contentloaderinfo.removeeventlisten...

xforms - Integration of Chiba with an Java Application -

xforms - Integration of Chiba with an Java Application - i new x-forms & chiba. i looking @ integrating chiba in simple java ee application. what steps this? what has been achieved far submit xform chiba using stream or file through jsp , servlet. to output form chiba html, css, js , ajax. the created xhtml x-form used customers fill in data. on submit, instance xml goes servlet. the servlet saves instance xml (assume in rdbms clob). can provide sample application can help me understand flow of xform processing through server-side xform engine? this won't reply core question, if don't have lot of code tied chiba, improve utilize xforms implementation that's beingness actively maintained. main developers of chiba working on betterform (and of course of study there other java-based implementations of xforms, if want tight integration within java, , non-java-based implementations, if want looser coupling). xforms xforms-betterform

Converting multiple Markdown files with links to PDF -

Converting multiple Markdown files with links to PDF - i've written load of technical documentation in markdown. chose utilize versioning , can view in on github. we need share external users (who aren't comfortable markdown), convert pdf. gimli seems best tool have found conversion (it uses same stylesheet github looks same), doesn't convert links well. there that'll this? i don't know type of links have problems (inline links, reference links, html links, image links, automatic links...), can seek utilize pandoc: pandoc *.md -o result.pdf this convert files *.md file extension single pdf. pdf markdown

assembly - MIPS: Check how many alphabetic characters are in a string -

assembly - MIPS: Check how many alphabetic characters are in a string - right i'm trying load null-terminated string , homecoming number of alphabetic characters in string. have 3 functions: main, countalpha (which intended count number of characters), , isalpha, determines whether character alphabetic or not. help algorithm. so, main load string, jump , link countalpha, , load syscall commands print int , exit program. for countalpha, having problem with, want create loop goes through each character in string , if isalpha returns 1 (indicating character alphabetic), increment count. isalpha straightforward-just determine if character between specific numbers in ascii. so guess question how attack countalpha. help. (note: don't want actual code, tips , hints) sounds want test homecoming value / register phone call isalpha , add/increment seperate register/count var everytime test true. or add together homecoming value straight count register every t...

eclipse - FileNotFoundException when loading freemarker template in java -

eclipse - FileNotFoundException when loading freemarker template in java - i file not found exception while loading freemarker template though template nowadays in path. update: running webservice. homecoming xml client based on search query. template loads when phone call java program(from static main). when client requests xml, filenotfoundexception occurs. os: windows 7 absolute path of file: c:/users/jay/workspace/webservice/templates/ here code: private string templatizequestion(questionresponse qr) throws exception { simplehash context = new simplehash(); configuration config = new configuration(); stringwriter out = new stringwriter(); template _template = null; if(condition1) { _template = config.gettemplate("/templates/fibplain.xml"); } else if(condition2) { _template = config.gettemplate("/templates/mcq.xml"); } context.put("questionresponse", qr); _te...

Google map is showing different location while searching a address -

Google map is showing different location while searching a address - i build application auto pooling, in have used google map search ride. every thing working fine expect 1 unusual thing happening when searching address in google map, official site showing marker @ different location example:- suppose searching for:" manhattan associates republic of india dev center, epip zone, bangalore, karnataka, india" official site showing marker @ right location in site showing marker @ different place,i inspect response of route request using console.log in start address coming "epip zone, bangalore, karnataka, india" . don't know why finish address not coming.please help me unusual thing. google maps shows 2 results query (and provides 8 additional matches...) that location in places database. but there no "address" geocoder can't find it. can utilize geographic coordinates places result. google-maps google-maps-api-3 goo...

autocomplete - Configuring git auto completion in .bash_profile -

autocomplete - Configuring git auto completion in .bash_profile - i'm having problem installing git auto completion bash profile. i've attached version of bash script. know why auto completion in git isn't working when save , exit nano? thanks! you need logout , log in forcefulness .bash_profile run. or seek if working right away, run source ~/.git-completion.bash source ~/.bash_profile work git autocomplete .bash-profile nano

PHP IF Else Statement Not working -

PHP IF Else Statement Not working - i'm having problems if statement. why code a not greater b have done wrong? when number greater says it's not? <?php //vars $a = '454'; $b = '1001'; ?> <?php function difference($val3, $val4) { $subtract = ($val3 - $val4); homecoming $subtract; } // random number generator function function random($min, $max) { homecoming rand($min,$max); } $anum = random(1,$a); $bnum = random(1,$b); $difference = "-170"; //difference($teamanum, $teambnum); function result() { if ($anum > $bnum) { echo "a greater b"; } else { echo "a not greater b"; } } ?> <?php echo "a: ".$teamanum."\n"; echo "b: ".$teambnum."\n"; echo "difference: ".$difference."\n"; echo result()."\n"; ?> thanks you out of scope. function result...