Posts

Showing posts from April, 2014

php - Twitter Bootstrap Path Breaks When Not on Homepage -

i testing website on local server. have issues twitter bootstrap's path in header view. on homepage path works fine: <link href="bootstrap/css/bootstrap.css" rel="stylesheet"> when move sub-page via link: <a href="index.php/home_controller/getfilmdetails?id... which translates to: http://localhost/www.mywebsite.co.uk/index.php/home_controller/getfilmdetails?id=114 controller code: $this->load->view('/header/header_home'); $this->load->view('movies_details_view',$data); $this->load->view('footer_home'); path twitter bootstrap not work, , need change path to: <link href="/bootstrap/css/bootstrap.css" rel="stylesheet"> how make path work on pages? in controller this: $this->load->helper('url'); $this->load->view('/header/header_home'); $this->load->view('movies_details_view',$data); $this->load->view(

android - Is it possible to replace a string (zipped) code from apk dalvik -

i replace single string hex/dalvik apk code. realize entail finding how string gets encoded when converted android class project signed apk file. is possible? well, know in code, anythings possible.. here know how it? have learned it's possible delete , add .apk files on windows platform simple zip archive (such replacing icons systemui.apk), without breaking apk.. how 1 programmatically? in python? does have ideas on how this? i have tried: import zipfile zf=zipfile.zipfile('apk.apk') # zip file filename in ['classes.dex']: # zipped file content file data=zf.read(filename) data=data.replace('mystring','newstring') #replace string within content file file=open('classes.dex','wb') file.write(data) # write new content file local disk file.close() zin=zipfile.zipfile('apk.apk','r') # create zip in , zip out zout=zipfile.zipfile('apk.apk','w') # iterate through zipped contents ,

sockets - TCP Port Duplicator -

i have service listens on tcp port connections, , processes received data. have need split data , process on 'live' , 'test' machine. i want make near perfect duplication going each machine, , figure easiest receive onto 'duplicator' service copies , retransmits data 2 other endpoints (with 1 of these able send data source) is there software this? platform windows server. i've considered writing myself, doesn't sound difficult, if solution exists i'd prefer use that. thanks how plan solve following 2 issues: if have tcp protocol have differences in tcp overhead. as tcp have answers both machines. how going handle this? my advice improve client generates 2 streams appropriate client side handling. maybe solution has specifics don't see way correct general case. if think case eligable such mirroring, probably this help. looks there another question similar yours 1 , contains couple of links. here comments iptables s

Cassandra column family last access time -

is there way check, when last time, column family accessed fetch or insert record? newbie cassandra, apology if sounds silly not find answers on here or web? please help no, cassandra not have built-in way this. of course, can update column holding timestamp (in other dedicated column family) every time read or write column family.

Pass pointers to objects by constant reference in C++ -

i'm doing practical assignment university , i've run problem. i've got class declares method: bool graficartablero(const tablero *&tablero, const string &nombrearchivo); i want pass pointer object tablero constant reference. if call function like, example: archivografico *grafico = new archivografico; if(grafico->graficartablero(tablero, archivo_grafico)){ ... ...i compilation errors. ok, won't detail error cause think found solution it, replacing method header for: bool graficartablero(tablero* const& tablero, const string &nombrearchivo); now seems work (at least compiles now), i'd know reason why first declaration doesn't work while second does. well, more importantly i'd know if mean same thing (pointer object constant reference). well, answer. edit 1: i'd avoid passing value. well, know it's not expensive operation, there no way use same pointer promise won't modified in way? thanks. edit 2: sor

c# - Communicating with ViewModel from MainView -

i new mvvm , still trying grasp on let me know if i'm setting wrong. have usercontrol listview in it. populate listview data viewmodel add control mainview. on mainview have button want use add item listview. here have: model public class item { public string name { get; set; } public item(string name) { name = name; } } viewmodel public class viewmodel : inotifypropertychanged { #region inotifypropertychanged members public event propertychangedeventhandler propertychanged; private void onpropertychanged(string propertyname) { if (propertychanged != null) { propertychanged(this, new propertychangedeventargs(propertyname)); } } #endregion private observablecollection<item> _itemcollection; public viewmodel() { itemcollection = new observablecollection<item>() { new item("one"), new item("two"),

routing - Two separate angularJS apps on the same file system -

my routes this: /create-company/index.html#/part-one /dashboard/index.html#/view1 /auth/ now create-company app used , on branch dashboard app used. currently use seed project make app, config, logs, scripts & test folders in home directory 1 app. to add second app, should create 2 folders app1 & app2 each contain own app, config, logs, scripts & test folders ? then can point /dashboard/ /app1/app , point /create-company/ /app2/app or better stick single angularjs app @ /app/ , point both /create-company/ , /dashboard/ same /app/ folder? although there may use-cases having multiple, separated apps helpful and/or appropriate, description 2 'apps' describe appear different sub-sections of 1 larger app. consider in usage, there overlapping components, such shared directives, templates, or services? if so, best avoid duplication. in addition, there no restriction on loading same app on 2 different pages, different markup - control

c# - ServiceStack REST API Design -

Image
i'm starting play around servicestack , i'm enjoying far i'm thinking design flawed go. essentially, have mssql database i'm accessing via nhibernate. confusion coming due structure request / response dtos & services should take. i have nhibernate mapping in separate project under myproject.common.models contains "client" class so: namespace myproject.common.models { public class client { public virtual int clientid { get; set; } public virtual string name { get; set; } public virtual string acronym { get; set; } public virtual string website { get; set; } } public class clientmap : classmap<client> { public clientmap() { id(x => x.clientid, "clientid").generatedby.identity(); map(x => x.name, "name"); map(x => x.acronym, "acronym"); map(x => x.website, "website");

c# - Reloading an Excel Addin Programmatically -

i have excel plug in has number of features. have button on ribbon titled "configuration settings" allows user select whether or not allow options (whether include right click menu, or display buttons on ribbon). the way know define right click menu or design ribbon in start of excel addin. i have config file gets checked on load, should user change configuration using ribbon button, has no effect until excel re-opened or user manually reloads addin. there way programmatically? probably have 2 addins. (addin1, addin2) first addin (addin1) doesnt have ribbons reads configuration , enables addin (addin2). to enable addins use following piece of code. foreach (comaddin addin in application.comaddins) { if (addin.progid.tolower().contains("addin2") && addin.connect != true) { addin.connect = true; } }

sql - mysql weighted random results - how to get changed variable value after SELECT -

Image
i have table keywords columns keyword , weight . goal randomly select 1 keyword , regard weight (probability). found 2 ways solve this, latter 1 more elegant (and consumes less ressources) - dont run. see yourself. the table , records: create table if not exists `keywords` ( `keyword` varchar(100) collate utf8_bin not null, `weight` int(11) not null, unique key `keywords` (`keyword`), key `rate` (`weight`) ) engine=myisam default charset=utf8 collate=utf8_bin; insert `keywords` (`keyword`, `weight`) values ('google', 50), ('microsoft', 20), ('apple', 10), ('yahoo', 5), ('bing', 5), ('xing', 5), ('cool', 5); query 1 consumes more ressources, work on 5k+ records. source why mysql query using rand() return no results third of time? : select * `keywords` order -log(1.0 - rand()) / weight limit 1 query 2 sums weights @weight_sum . sets @weight_point rand() number within range. loops through records, sub

firebase - Why use an object when denormalising data? -

in recent blog post on denormalising data , suggests logging of user's comments beneath each user so: comments: { comment1: true, comment2: true } why not list so: comments: [ "comment1", "comment2", ] what advantages? there difference @ all? while i'm @ it, how go generating unique references these comments distributed app? imagining list i'd push them onto end , let array take care of index. firebase ever stores objects. js client converts arrays objects using index key. so, instance if store following array using set : comments: [ "comment1", "comment2" ] in forge (the graphical debugger), show as: comments: 0: comment1 1: comment2 given this, storing id of comment directly key has advantage can refer directly in security rules, example, expression like: root.child('comments').haschild($comment) in order generate unique references these comments, please use push

c++ - Logical AND operator in diab 5.7 compiler returns non-bool type -

when following bit of code compiled diab c++ compiler (dplusplus), generates conversion warning on third line. can resolved casting result of (&&) operator other bool. code: bool first = 1; bool second = 1; bool ret = (first && second); //generates compile warning error: warning: (etoa:1643): narrowing or signed-to-unsigned type conversion found: int unsigned char i verified nothing defining bool type. compiler issue, or there else might missing cause this? wind river's web site indicates diab compiler can compile either c or c++. in c, && operator yields result of type int , value 0 or 1 . that's consistent warning you're seeing. as of 1990 iso standard, c did not have built-in bool type. common define bool typedef. appears message bool typedef unsigned char , in header. 1999 iso c standard adds new predefined boolean type called _bool ; identifier bool defined in <stdbool.h> macro expands _bool . if &

wcf - Is WebHttpBinding uses TCP connection pooling? -

i can see in msdn page nettcpbinding in new .net 4.5 uses tcp connection pooling based on service’s host dns name , port number service listening on. true webhttpbinding well? not find answer question. it seems, connection pooling allowed tcp (tcpconnectionpoolsettings) , named pipes (namedpipeconnectionpoolsettings) only. see this msdn post

javascript - DOM Exception 12 for window.postMessage -

i'm learning build chrome extensions, , i'm trying follow 1 of instructions in official guide here . what trying accomplish is: background.js shows page action targetted urls. page action executes script when clicked. executed script injects javascript on page. so far, good! use following script inject page. var injectjs = function(url, cb) { var h = document.getelementsbytagname('head')[0], s = document.createelement('script'); s.type = 'text/javascript'; s.src = url; if (cb) s.onload = cb; h.appendchild(s); }; injectjs(chrome.extension.geturl('script/do_something.js')); now, want injected script able communicate extension. seems looking what's described in documentation. https://developer.chrome.com/extensions/content_scripts.html#host-page-communication the problem is, when try window.postmessage console shows error "dom exception 12". edit: first problem running sam

Trouble getting a SubImage of an Image in Go -

i'm doing image processing in go, , i'm trying subimage of image. import ( "image/jpeg" "os" ) func main(){ image_file, err := os.open("somefile.jpeg") my_image, err := jpeg.decode(image_file) my_sub_image := my_image.subimage(rect(j, i, j+x_width, i+y_width)).(*image.rgba) } when try compile that, .\img.go:8: picture.subimage undefined (type image.image has no field or method subimage) . any thoughts? here alternative approach - use type assertion assert my_image has subimage method. work image type has subimage method (all of them except uniform @ quick scan). return image interface of unspecified type. package main import ( "fmt" "image" "image/jpeg" "log" "os" ) func main() { image_file, err := os.open("somefile.jpeg") if err != nil { log.fatal(err) } my_image, err := jpeg.decode(image_file) if err

c++ - QRegExp and double-quoted text for QSyntaxHighlighter -

what qregexp pattern capturing quoted text qsyntaxhighlighter? test pattern "one" or "two" or "three" so far have tried: qregexp rx("\\0042.*\\0042"); qregexp rx("(\\0042).*?\\1"); the last pattern succeeds on regexpal.com not qregexp class. edit: if check out syntax highlighter example , has 1 in there. http://qt-project.org/doc/qt-4.8/richtext-syntaxhighlighter-highlighter-cpp.html quotationformat.setforeground(qt::darkgreen); rule.pattern = qregexp("\".*\""); rule.format = quotationformat; highlightingrules.append(rule); just copy of code qt's highlighter example , should set. greedy v. lazy match in qregex in description of qt's variation on regex, says: note: quantifiers "greedy". match text can. example, 0+ matches first 0 finds , consecutive zeros after first zero. applied '20005', matches'20005'. quantifiers can made non-greedy, s

javascript - Highcharts - How to programmatically toggle legend items and determine which items are selected -

so have couple of requests our designers: 1) allow users select/deselect legend items via clicking link outside chart container. means need programmatically toggle items in chart on or off, regardless if selected/deselected. 2) determine particular legend items selected (or enabled) in chart can generate chart selections. i don't see way either using api wondering if has come possible solution either (or both). thanks in advance guidance. highcharts allow toggle legend states outside. series[0].hide(); series[0].show(); provided highcharts can use implement functionality asked for. here fiddle reference http://jsfiddle.net/gfnyk/1/

scripting - How to force computer not to restart -

i writing batch script automate product testing. after product finished installation, need force computer not restart. there way batch script? thank reading try shutdown -a . abort shutdown process.

c# - Which executes first Code Behind or View Model -

based on previous question accessing variables xaml , object viewmodel using code behind : how know executes first? is code behind or viewmodel? want make sure code behind executes prior viewmodel the view , viewmodel both regular classes instantiated. done calling constructor in other class. so, simple answer question: set breakpoint in each constructor , see 1 gets hit first. there no general answer question because depends on architecture , use case. often, control bound property of viewmodel of it's parent, changes @ point. @ point view exists , have no idea how long value property has been set existing already. in other cases, view created specific viewmodel , takes constructor parameter. the 1 way make sure viewmodel exists before view pass viewmodel constructor parameter. idea behind constructor parameters express: "this class needs existing instances of type xy created", asking for. however, set views datacontext in constructor , datacontex

plyr - Count occurrences of factor in R, with zero counts reported -

i want count number of occurrences of factor in data frame. example, count number of events of given type in code below: library(plyr) events <- data.frame(type = c('a', 'a', 'b'), quantity = c(1, 2, 1)) ddply(events, .(type), summarise, quantity = sum(quantity)) the output following: type quantity 1 3 2 b 1 however, if know there 3 types of events a , b , c , , want see count c 0 ? in other words, want output be: type quantity 1 3 2 b 1 3 c 0 how do this? feels there should function defined somewhere. the following 2 not-so-good ideas how go this. idea #1: know using for loop, know said if using for loop in r , doing wrong, there must better way it. idea #2: add dummy entries original data frame. solution works feels there should more elegant solution. events <- data.frame(type = c('a', 'a', 'b'),

ios - UIBackgroundModes with the location value,then app rejected -

my app includes uibackgroundmodes key (with location value) in info.plist file. app rejected apple. apple's reason rejection: "we noticed app declares support location in uibackgroundmodes key in info.plist not include features require persistent location. appropriate add features require persistent use of real-time location updates while app in background or remove "location" setting uibackgroundmodes key. if application not require persistent, real-time location updates, recommend using significant-change location service or region monitoring location service. " reason using it: my app uses either significant-change location service or standard location service,because app available both iphone , ipod touch. if significant-change location service not available, app use standard location service. questions: when app run on background,that app whether need add uibackgroundmodes key (with location value) in info.plist file or not? if not inc

ruby on rails - mongoid .limit does not work in mongoid 3.1.x -

i tried in rails mongoid 3.1.0 , lastest 3.1.3. .limit not work. below should return 1 row returns (4) code: @go = gallery.limit(1) logger.info "count: #{@go.count}" output: count: 4 moped: 54.234.11.193:10055 query database=mongohqtestdatabase collection=galleries selector= {"$query"=>{}, "$orderby"=>{:_id=>1}} flags=[:slave_ok] limit=-1 skip=0 batch_size=nil fields=nil (276.2010 ms) which version of mongoid limit() ? the limit command works fine, reason count ignores limit. if cast array you'll see limit working. array(gallery.limit(1)).length # gives 1 also, if iterate through objects you'll see limit working.

ios - invalidate NSTimer inside dispatch_async -

i creating game, , inside game need time counter. i works great when scroll map stops , when finish scrolling start again. fix dispatch_async. here code dispatch_async(dispatch_get_global_queue(dispatch_queue_priority_default, 0), ^{ timer = [nstimer scheduledtimerwithtimeinterval:1 target:self selector:@selector(timenext) userinfo:nil repeats:no]; [[nsrunloop currentrunloop] addtimer:timer formode:nsdefaultrunloopmode]; [[nsrunloop currentrunloop] run]; }); timer: __block nstimer *timer; but if app goes background need stop times (and when active starts again). with way can scroll map , timer works try: - (void)timenext { [timer invalidate]; } and didin't work. knows how stop it? or other idea accomplish task? don't create timer on global queue's thread , start run loop on thread. just create timer on main thread (main run loop), , add tracking run loop mode. timer can

Using a function from process.inc.php in a form on another page -

i trying create form has (using table formatting now. <form action="addcontent()" method="post" class="formleft"> <table> <tr> <td></td> <td><input type="hidden" id="id"/></td> </tr> <tr> <td>page:</td> <td><input type="text" id="page"/></td> </tr> <tr> <td>information:</td> <td><textarea id="info"></textarea></td> </tr> <tr> <td></td> <td><input type="submit" id="submit" value="add content"> </tr> </table> </form> how can use function called addcontent() within process.inc.php ? ideas? the action shou

What is the most up to date production version of mysqli ? -

tough figure out if have date version of mysqli or not. use in web page : $link = mysqli_connect($hostname, $username, $password, $dbname); printf("mysqli client library version: %s<br>\n", mysqli_get_client_info()); the output : mysqli client library version: mysqlnd 5.0.10 - 20111026 - $id: e707c415db32080b3752b232487a435ee0372157 $ well , nice .. mysql rev 5.5.30 base on : //connection database $dbhandle = mysql_connect($hostname, $username, $password) or die("unable connect mysql"); echo "connected "; // print mysql server version printf("mysql server version: %s<br>\n", mysql_get_server_info()); which results in : connected mysql server version: 5.5.30 should expect see mysqli rev of 5.5.x or wrong? any insight helpful. this apache 2.4.4 , php 5.4.12 if helps : $ /usr/local/bin/php --version php 5.4.12 (cli) (built: feb 25 2013 19:25:44) copyright (c) 1997-2013 php group zend engine v2.4.0, copyrigh

unit testing - jQuery UI Tooltip opens on changing content -

i've found bug in ui.tooltip: tooltip interrupts closing if content changing. here example . please me make proper test, 1 fails time time on "tooltip hidden early": asynctest( "content: change while close", function() { expect( 2 ); $.fx.off = true var tooltip, hidingduration = 20, element = $( "#tooltipped1" ).tooltip({ hide: hidingduration }); element.tooltip( "open" ); tooltip = $( "#" + element.data( "ui-tooltip-id" ) ); $.fx.off = false; element.tooltip( "close" ); settimeout( function() { ok( tooltip.is( ":visible" ), "tooltip hidden early" ); }, hidingduration * 0.5 ); //element.tooltip({ content: 'foo' }); //tooltip = $( "#" + element.data( "ui-tooltip-id" ) ); settimeout( function() { ok( !tooltip.is( ":visible" ), "tooltip doesn&#

readline - Use mouse to move cursor in terminal -

suppose write line this: find somedir -flag1 opt1 -flag2 opt2 -flag3 opt3 -flag4 opt4 -flag5 opt5 -flag6 opt6 -flag7 opt7 -flag8 opt8 -flag9 opt9 | xargs command ... then need make change opt6, using keyboard, need press go start, 15 times there (off-by-one? me, wish learned count). or, if know little bit emacs, i'd press , enter 14, bring me space after opt6. or, set -o vi press start command mode prefix f or t or uppercase cousin inaccurate count there. doubt vimmer this, use easymotion that. sometimes don't feel counting , eyes hurt staring dumb terminal. left click wonderful, mouse can select text in terminal. however, when running vim in terminal, can use mouse move around( set mouse=a ). if mouse available vim, why cannot used in terminal? ps: system ubuntu 12.04. try adding .emacs file: (xterm-mouse-mode t) see also: how can mouse selection work in emacs , iterm2 on mac?

php - How to Decode image data (sqlite) to show in HTML -

i have image data stored in sqlite database. data this: €tâm89504e470d0a1a0a0000000d494844520000012 how show data in html php? looks base64 encoding. if have php script can access database, use following php snippet: echo "<img src='data:image/png;base64,".$base64_data."' />

shell - Cronjob to be scheduled -

this question has answer here: how instruct cron execute job every second week? 10 answers i have schedule job in unix runs every other monday, have set cronjob using crontab 00 00 * * 1/2 jobname.sh will work ? for users having problems cron expressions: there multiple tools generate or validate cron expressions. one of them http://cronmaker.com/ , online , free.

java - Servlet-Servlet-Jsp redirecting -

i'm developing application in java servlet taking inputs jsp page. after inserting values in db redirect servlet. 2nd servlet dispatch jsp page arraylist. can't redirect 2nd servlet jsp page. arraylist going jsp page page not showing anything. i'm using netbeans 6.8. i'll thankful if can solve problem. code 1st servlet: requestdispatcher dispatcher = request.getrequestdispatcher("/servlet1?id="+id); dispatcher.forward(request, response); code 2nd servlet: request.setattribute("list",list); string url="test2.jsp"; requestdispatcher v=request.getrequestdispatcher(""+url+""); v.forward(request, response); try on 2nd servlet .. request.setattribute("list",list); string url="test2.jsp"; requestdispatcher v=request.getrequestdispatcher(url); v.forward(request, response); on jsp page ... <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> &l

Android Enable WebView Touch Sound -

i need play touch sounds on web view event clicks, enabled touch sounds , tried on android version less 4.1 works fine, web view click radio button make hear click sounds on 4.1 , above doesn't make click sound when click radio button or button clicks . hope it's disabled sdk web view @ 4.1 , above. let me have possible solution fix issue. thanks in advance! i believe not possible, since events inside webview not passed android system, may have chance create such beheaviour embedding these sounds inside webpage rendering inside webview.

java - Fetch contact from contact list in Android 4.1.2 -

i developing application in android. in app, on button click open list of contacts saved in phone. on selecting contact return our application , number shown on textview. working great till 2.3.6 version in 4.1.2 version number not fetched , shows null pointer exception. code used opening contact list given below intent intent= new intent(intent.action_pick, contacts.content_uri); startactivityforresult(intent, 1); kindly give suggestion. in advance stack of exception: 04-18 12:42:03.828: e/debug_tag(23826): failed number 04-18 12:42:03.828: e/debug_tag(23826): java.lang.nullpointerexception 04-18 12:42:03.828: e/debug_tag(23826): @ com.smscollection.activity.sms_send_screen.onactivityresult(sms_send_screen.java:116) 04-18 12:42:03.828: e/debug_tag(23826): @ android.support.v4.app.fragmentactivity.onactivityresult(fragmentactivity.java:161) 04-18 12:42:03.828: e/debug_tag(23826): @ android.app.activity.dispatchactivityresult(activity.java:5390) 04-18 12:42:03

c# - Why https request via ajax not working every time but its working fine on local -

i working on dotnetnuke , facing strange problem. when test locally site working fine...but go live secure https server enable ajax request handler not working every time .some times working fine of times showing object reference error same request. don't know how fix .i totally confused because times same request same process working time showing object reference error , session got expire. because of https ?....... here jquery script $("#btnaddexhibitationdate").click(function () { if ($("[id*=datetimepickerselect]").val().length != 0) { showprogressbar(); // alert($("[id*=datetimepickerselect]").val() + "," + $("[id*=hdnculturtwoletterisocode]").val()); var response = $.post('/desktopmodules/testproject/entities/bookingfolder/bookinghandler.ashx', { action: "addexhibitiondate", date: $("[id*=datetimepickerselect]").val(), languagetag: $("[id*=hd

javascript - Colorbox opening just one time after form submit? -

we have situation form submit results had shown in colorbox. did jquery.post request , tried open returned html in colorbox. here code that. jquery("#f1").submit(function(){ var formdata = $(this).serializearray(); jquery.post("index.php", formdata, function(r){ jquery.fn.colorbox({html:r,width:"80%",height:"80%",title:"event details"}); }); return false; // override non-ajax submitting }); all works first time. when form submit happens first time opens in colorbox. second time opens in new page. wrong here?

iphone - Do not get proper value in tableview from few rows first -

nsmutablearray *wholejsonarray = [loginresult objectforkey:@"response"]; //nsmutablearray *values=[nsmutablearray arraywitharray:[loginresult allvalues]]; nsmutablearray *statenamearray=[loginresult objectforkey:@"response"]; for(nsdictionary *countname in wholejsonarray) { nsstring *cname = [nsstring stringwithformat:@"%@",[countname objectforkey:@"country_name"]]; [countryarray addobject:cname]; } for(nsdictionary *cid in wholejsonarray) { nsnumber *number = [cid objectforkey:@"country_id"]; [idcountry addobject:number]; } for(nsdictionary *statename in statenamearray) { nsstring *sname=[nsstring stringwithformat:@"%@",[statename objectforkey:@"state_name"]]; [statearray addobject:sname]; } i wrote above code. country name displayed in table view. state name response gets displayed few rows display have null value , other rows proper value. should remove null value few rows.

Batch script find files in a directory -

i need find find extension *.job in specific folder. somehow code not work. works when change *.job specific name such inv.job? if exist "c:\watchfolder\incoming\*.job" ( copy /y /v "c:\watchfolder\incoming\*.job" "c:\watchfolder\inprogress" echo trigger automations ) thank reading try this: dir "c:\watchfolder\incoming\*.job" >nul 2>&1 && ( copy /y /v "c:\watchfolder\incoming\*.job" "c:\watchfolder\inprogress" echo trigger automations ) if exist work specific file, not wild cards * , ? . copy works wild cards.

GWT AutoBean category -

i'm trying @category(class) in autobean work. i have simple factory import com.google.web.bindery.autobean.shared.autobean; import com.google.web.bindery.autobean.shared.autobeanfactory.category; @category(testcategory.class) public interface testfactory { autobean<test> test(); } and category class import com.google.web.bindery.autobean.shared.autobean; public class testcategory { public static string asstring(autobean<test> instance) { return "as string"; } } and test interface. public interface test { string getvalue(); void setvalue(string value); string asstring(); } all 3 in same package. when i'm trying compile gwt project following error message [java] resolving com.mycompany.my_gwt_project.client.test.testfactory [java] found type 'com.mycompany.my_gwt_project.client.test.testfactory' [java] [error] annotation error: cannot resolve com.mycompany.my_gwt_project.cl

c++ - Setting memory breakpoint in Visual Studio 2012 -

i need set breakpoint watches specific address in memory (e.g. 0x0483d7cc) hit when content changes. using visual studio 2012 , c++. how can that? just use menu item: debug | new breakpoint | new data breakpoint...

accessibility - Text console for development in JAWS? -

i'm working on web application , want make easy use via screen reader. testing stuff in jaws time consuming. possible make jaws display text instead of reading it? don't want hear content during development. want see read jaws. there no speech viewer jaws, far know. however, can make write speech output log file using "/z" switch. unfortunately, cannot view log file in text editor while screen reader running, because locked. open command prompt or bring run dialog pressing win+r , type: "jaws_executable" /z"log_file" "jaws_executable" full path , file name of jaws application , "log_file" location , name of speech log file. important: there should no space between "/z" , log file name.

get - Access string variable outside for loop in java? -

hi folks want access string variable outside loop, can use further coding. here trying values jtable , store in string, create database table. whole code here: http://textuploader.com/?p=6&id=zvewy coding : int row = table.getrowcount(); int column = table.getcolumncount(); (int j = 0; j < row; j++) { (int = 0; < column; i++) { //system.out.println(table.getvalueat(j, i)); string readstr = (string) table.getvalueat(j, i); // want access string } } try{ // file read , table create string tname="example"; string dbname="db123"; class.forname("com.mysql.jdbc.driver"); connection conn= (connection) drivermanager.getconnection("jdbc:mysql://localhost:3306/db123","root",""); statement stmt=(statement) conn.createstatement(); system.out.println("connect"); databasemetadata dmd = (databasemetadata) conn.getmetadata(); while((readstr=brr.readline())!=n

filtering - SharePoint 2010 filter issues -

in sharepoint 2010, want automatically filter library/database similar way choice filter works, different per user, current user filter. is there way combine these 2 filters or there filter able automatically filter information current user of site? if possible, prefer filter invisible users (as in readers/contributors). i'm not sure if understand correctly, if you're referring having view base on column name, go library(for doc libraries)/list(for lists) , click on create view, create standard view , let become default view. on filters portion, place in column want filter , place on value [me]. filter items has users name on field. place in more filters if necessary.

javascript - How to mutually replace (change) 2 div nodes in DOM with jQuery? -

say have 2 node references in variables nodea , nodeb. mutually replace them each other in dom, keeping attributes , attached event handlers etc. how can accomplish jquery? tried .replacewith(...) see works html text, , keep dom object itself. there 2 .replacewith(...) call. , second 1 on node, not in dom... seems not working... thanks in advance it simmilar switch variables, need think in terms of dom. var temp = $('<div>'); temp.insertafter(first); first.insertafter(second); second.insertafter(temp); temp.remove(); js fiddle: http://jsfiddle.net/qsutq/

Export to CSV using jQuery and html -

Image
i have tabular data need export csv without using external plugin or api. used window.open method passing mime types faced issues below: how determine whether microsoft excel or open office installed on system using jquery the code should independent of fact being installed on system i.e., openoffice or ms excel. believe csv format can expected show in both editors. code <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#btnexport").click(function(e) { var msg = getmimetypes(); //openoffice window.open('data:application/vnd.oasis.opendocument.spreadsheet,' + $('#dvdata').html()); //ms-excel window.open('data:application/vnd.ms-excel,' + $('#dvdata').html()); //csv window.open('data:application/csv

multithreading - Making unknown number of child threads inside parent thread using win32 in C? -

how can make unknown number of child threads inside parent thread , wait each of them 1 one using win32 in c? parent thread life time infinite , wait request , if received request make new child thread request e.g. servers . searching web cant find . tutorial , information appreciated . lot , luck . note : 1 . example imagine simple server : when user send request server server make new thread user , wait thread terminated if user send request server make thread separate old 1 , server must wait new thread separate old 1 terminate . 2 . main thread scan global array size of constant n in infinite loop , if find specific value in each of array's block run new thread operation on block's information , after thread become terminate update block's information . parent thread life time infinite because has infinite loop . you'ld create each thread createthread , store thread handle in dynamic list or array. if want main thread recognize when thread t

java - What properties does @Column columnDefinition make redundant? -

i specify @column annotations this: @column(columndefinition="character varying (100) not null",length=100,nullable=false) as can see specify length , nullable though columndefinition specifies those. that's because don't know where/when these values used exactly. so, when specifying columndefinition , other properties of @column made redundant? if matters, use hibernate , postgresql my answer: of following should overridden (i.e. describe them within columndefinition , if appropriate): length precision scale nullable unique i.e. column ddl consist of: name + columndefinition and nothing else . rationale follows. annotation containing word "column" or "table" purely physical - properties only used control ddl/dml against database. other annotation purely logical - properties used in-memory in java control jpa processing. that's why appears optionality/nullability set twice - once via @basic(...,op

ios6 - Internationalization in iOS app -

i have internationalization in ios app.i searched , found "genstrings" .i have created localizable strings particular languages. my doubt : how create app support languages,instead of creating localizable strings each language? if body has idea ,then please me check these link making multi-language ios app https://developer.apple.com/library/ios/#documentation/macosx/conceptual/bpinternational/articles/internatandlocaliz.html#//apple_ref/doc/uid/20000277-sw1 hope clear doubts.

linux - Why zombie processes exist? -

wikipedia says "a child process terminates never waited on parent becomes zombie process." run program: #include <stdio.h> #include <unistd.h> #include <stdlib.h> int main() { pid_t pid, ppid; printf("hello world1\n"); pid=fork(); if(pid==0) { exit(0); } else { while(1) { printf("i parent\n"); printf("the pid of parent %d\n",getpid()); printf("the pid of parent of parent %d\n",getppid()); sleep(2); } } } this creates zombie process, can't understand why zombie process created here? the output of program is hello world1 parent pid of parent 3267 pid of parent of parent 2456 parent pid of parent 3267 pid of parent of parent 2456 parent .... ..... but why "child process terminates not waited on parent" in case? in code, zombie created on exit(0) (comment arrow below): pid=

regex - Oracle regexp_instr -

can 1 maybe me regular expression? i wanted check if in given string ',' present or not. literal: first_name+;last_name+john, smith here wanted check if last_name contains ',' select case when regexp_instr('first_name+;last_name+john, smith;home_adress+michigan', '^(.*?\;|\+)*last_name\+(.*\,).*$', ',') > 1 'ok' else 'nok' end test1 dual; the third argument regexp_instr() optional starting position - omit it. also, since regexp matches entire string, doesn't make sense check regexp_instr() > 1 - if match, regexp_instr() return 1, otherwise 0. with v_data ( select 'first_name+;last_name+john, smith;home_adress+michigan' name dual union select 'first_name+john;last_name+smith;home_adress+michigan' name dual ) select name, regexp_instr(name, '^(.*?\;|\+)*last_name\+(.*\,).*$') v_data

json - Jquery .change function is not working through javascript -

.change call in jquery not working when change value through javascript. for example: $(document).ready(function () { $(function () { $("select#product").change(function () { if (document.all("fatcasearchdo.bankid").disabled.value = true) { fnfieldenableclass(document.all("fatcasearchdo.bankid")); } $.ajax({ type: 'get', url: 'viewhistorydataaction.do', data: { product: $(this).val() }, datatype: 'json', cache: false, success: function (j) { var options = ''; (var k = 0; k < j.length; k++) { options += '<option value="' + j[k] + '">' + j[k] + '</option>'; }

Pasting multiple nodes in jsTree -

the documentation crrm plugin jstree states copy() method " copies node (prepares pasting) " , takes parameter " can dom node, jquery node or selector pointing element within tree ". of singular . for paste() says " pastes copied or cut nodes inside node ". implying supports pasting of multiple nodes. i have been unable figure out, however, how copy multiple nodes. possible? if so, need pass copy() method? i should mention using checkboxes plugin, , node selection copy done using them. call get_checked() method checked nodes. not work pass result of call copy(). end doing looping result of get_checked(), id of each node, , call copy() , paste() each one. the trouble is, handler "move.jstree" event (fired when pasting) ajax call serverside update. if pasting 10 nodes 10 ajax calls silly. want 1 ajax call handles pasting of multiple nodes. must possible, right? thanks in advance pointers. answering own question. all neede