Posts

Showing posts from February, 2012

How to use Eclipse Birt 4.3 with mongoDB data source -

how use eclipse birt 4.3 mongodb data source? how use ui provided in latest version? how write mongodb query? try http://code.google.com/a/eclipselabs.org/p/mongodb-oda-birt-plugin/ or try http://www.birt-exchange.org/devshare/_/designing-birt-reports/1414-mongodb-oda-for-birt user guide available in downloads section , helpful developing reports in birt

Hosting WCF Service as Windows Service -

i have created wcf service project. has following content in svc file. <%@ servicehost service="deepak.businessservices.implementation.apiimplementation" factory="deepak.businessservices.implementation.customservicehostfactory"%> svc reference http://localhost/deepakgateway/service.svc service , wsdl generated. want host service windows service. how can it? i have created "windows service" project ans have following code. protected override void onstart(string[] args) { if (m_host != null) { m_host.close(); } uri httpurl = new uri("http://localhost/deepakgateway/service.svc"); m_host = new servicehost (typeof(?????? fill here?), httpurl); //add service endpoint m_host.addserviceendpoint (typeof(?????? fill here?), ), new wshttpbinding(), ""); //enable metadata exchange servicemetadatabehavior smb ...

weblogic maven plugin - how to deploy to a remote server -

i have setup oracle maven command deploy remote server (myservername.com). <plugin> <!-- configuration weblogic-maven-plugin --> <groupid>com.oracle.weblogic</groupid> <artifactid>weblogic-maven-plugin</artifactid> <version>12.1.2-0-0</version> <configuration> <adminurl>t3://myservername.com:7001</adminurl> <user>test</user> <password>test1</password> <upload>true</upload> <remote>true</remote> <targets>adminserver</targets> <verbose>true</verbose> <source>${project.build.directory}/${project.build.finalname}</source> <name>${project.build.finalname}</name> </configuration> <executions> <execution> <!--...

How can I see my .csv file data in the output client area of Visual C++? -

after getting read data in .csv file, want see of them in window area. tried use textout() didn't make it. the easiest way display text use edit control (with multiline style set if have multiple lines). call setwindowtext edit control text display.

scheme - How to load an extension in Guile 2.0? -

i'm trying load graphviz extension guile 2.0 . line of scheme code, suggested graphviz's documentation, works in guile 1.8 : (load-extension "/usr/lib/graphviz/guile/libgv_guile.so" "swig_init") however, fail in guile 2.0 following error: scheme@(guile-user)> (load-extension "/usr/lib/graphviz/guile/libgv_guile.so" "swig_init") error: in procedure load-extension: error: in procedure dynamic-link: file: "/usr/lib/graphviz/guile/libgv_guile.so", message: "file not found" entering new prompt. type `,bt' backtrace or `,q' continue. i've tried using following alternative paths well: /usr/lib/graphviz/guile/libgv_guile libgv_guile same results. how do that? the problem distribution's graphviz packages compiled against guile 1.8, , 2 versions of guile not abi compatible. compiling graphviz linking against guile 2.0 (with guile 2.0's headers) solved it.

python - sqlalchemy, postgresql and relationship stuck in "idle in transaction" -

i have problem related sqlalchemy , postgresql. class profile(base): ... roles = relationship('role', secondary=role_profiles, backref='profiles', lazy='dynamic') when running ( current_user instance of profile class): roles = current_user.roles.filter().all() using sqlalchemy idle in transaction selects reading profile in postgresql. edit: from echoing query see every select starts with: begin (implicit) another edit: after adding pool_size=20, max_overflow=0 to create_engine seems idle in transaction -statements being rolled when number of idle getting big. idea on , bad solution problem? how manage , how go getting rid of begin selects? starting sqlalchemy 0.8.2 can disable implicit begin statements when calling create_engine() engine = create_engine(uri, isolation_level="autocommit") there subtle implications change. first, there statements not quietly hid in unterminated tr...

ios - How to keep showing splash screen until webview is finished loading. objective-c -

after splash screen loads there white background few seconds until html loads. how can keep displaying splash screen till webivew loads. you can add uiimageview splash screen image on uiwebview of course view controller showing both views must uiwebview delegate , when receives – webviewdidfinishload: or – webview:didfailloadwitherror: in case of error of course should remove image view

c - file not recognized: File format not recognized -

when run make file error "obj/viojournal.o: file not recognized: file format not recognized collect2: ld returned 1 exit status" and make file follows how fix problem. using gcc compiler on centos 5.4 linx 64bit machine. all: libvioft.so fdump syncer cppflags = -i/usr/include/libxml2 -i../clogger -i../marshall -i../ddp \ -i../http -i../xml -i../nfsop -i../include/common -i../restful \ -i../include/onegrid cflags = -g3 -wall -wextra -fpic -dreplication_enabled -djournaling_enabled #cflags = -g3 -wall -wextra -fpic ldflags = -wl,-rpath=\$$origin -wl,-rpath=\$$origin/../clogger \ -wl,-rpath=\$$origin/../marshall -wl,-rpath=\$$origin/../ddp \ -wl,-rpath=\$$origin/../http -wl,-rpath=\$$origin/../xml \ -wl,-rpath=\$$origin/../restful libs = -lpthread -lssl -lxml2 -lbz2 -l../clogger -lclogger \ -l../marshall -lmarshall -l../ddp -lddp -l../nfsop -lnfsop libsources = filefs.c viojournal.c recvreplicaupdate.c syncer.c hostops.c filetable.c...

Creating gradients with Core Graphics in iOS -

i have following code create gradient (or start of one): cagradientlayer *gradient = [cagradientlayer layer]; uicolor *lightgreen = [uicolor colorwithred:66.0f/255.0f green:79.0f/255.0f blue:91.0f/255.0f alpha:1.0f]; uicolor *darkgreen = [uicolor colorwithred:66.0f/255.0f green:79.0f/255.0f blue:91.0f/255.0f alpha:1.0f]; why line give me "expected identifier"? gradient.colors = [nsarray arraywithobjects:(id)[lightgreen.cgcolor]]; you have many [ in code , not closing , nil : gradient.colors = [nsarray arraywithobjects:(id)[lightgreen.cgcolor]]; should be: gradient.colors = [nsarray arraywithobjects:(id)lightgreen.cgcolor, nil]; or even: gradient.colors = @[(id)lightgreen.cgcolor];

html - Using jQuery to change CSS attributes with delay -

how can use jquery change css attributes of html element delay. imagine scenario. have div bg color blue. want fade out , when fades in want bg color red. i tried this. $("div").fadeout().delay(500).css("background-color","red").fadein(); while fading out div changes color red before fades in. not follow sequence of chained events. how can make happen in 1 single line. you can have function participate in animation queue using queue function : $("div") .fadeout() .delay(500) .queue(function() { $(this).css("background-color","red").dequeue(); }) .fadein(); note dequeue call within callback, tells jquery continue next thing in queue.

php - OpenX: Deactivated Banners to shown in Zone -

i have created 1 compaign ( ad1_compaign ), , have put two banners compaign (ad1_compaign). , have linked these 2 banners( banner1 , banner2 ) 1 zone under 1 website. after that, running invocation code zone, displays (both banners displaying randomly). i have 2 doubts. doubt i: how many times once change banner everytime page re-loading? how measure that?... then after deactivated banner1 means, in zone->linked banners shows inactive banner. but generating zone code banner1 displayed... deactivated... doubt ii: how display active banners in zone? anyone please me... the number of times banner appears can controlled "banner properties" section in openx. the deactivated banner showing because of openx cache. (it set default 1200 secs i.e 20 mins) if have admin access openx, can reset cache period smaller value. if want delete existing cache immediately, should go server openx installed , delete contents of openx/var/cache in...

android - Trying to build an Age Calculator -

if i'm given date of birth (d.o.b.) how calculate current age in android: protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); mdatedisplay = (textview) findviewbyid(r.id.datedisplay); textview_cage = (textview) findviewbyid(r.id.textview_cage); textview_currentagediff = (textview) findviewbyid(r.id.textview_currentagediff); textview4 = (textview) findviewbyid(r.id.textview4); mpickdate = (button) findviewbyid(r.id.pickdate); mpickdate.setonclicklistener(new view.onclicklistener() { @suppresslint("validfragment") @targetapi(build.version_codes.honeycomb) public void onclick(view v) { dialogfragment newfragment = new datepickerfragment(); newfragment.show(getfragmentmanager(), "datepicker"); } }); } @targetapi(build....

c# - Neo4jClient Cypher query collect statement with multiple values -

i'm trying convert query cypher use neo4jclient api in c# here cypher start server=node:node_auto_index(serverid='sho2k3ms49') match server-[:is_server_type]->type, appenv-[:has_server]->server, app-[:has_env]->appenv return server.serverid, collect([ appenv.environmenttypeid, appenv.appenvid, app.appid, app.appname ]) ; the query returns 1 line per server , collects applications on server. the .collectas api far can see allows single values. an idea how .net api? edit i've tried query _connectedclient .cypher .start(new {server = node.byindexlookup("node_auto_index", "serverid", "sho2k3ms49") }) .match("server-[:is_server_type]->type", "appenv-[:has_server]->server", "app-[:has_env]->appenv") .return((server, appenv, app) => new { servername = return.as<string>("server.serverid...

jquery - Remove shadows between two navigation items -

i tried create navigation menu, have 1 problem with. so html: <div id="navigation"> <ul> <li class="active"><a href="#">fd</a></li> <li><a href="#">vc</a></li> <li><a href="#">ew</a></li> <li><a href="#">ds</a></li> <li><a href="#">vcx</a></li> <li class="active"><a href="#">re</a></li> </ul> </div> the css file on codepen project, because big. problem 2 closest menu items, when 1 of active , 1 applied hover. how possible fix it? mean remove shadows between them. http://cdpn.io/asjde if want no box shadow in navigations remove css , eliminates shadows on nav. box-shadow: inset -4px 0 7px -5px black, inset 4px 0 7px -5px black;

java - App engine default page to be servlet -

i have app engine application, servlet: <servlet> <servlet-name>authorization</servlet-name> <servlet-class>x.y.z.authorization</servlet-class> </servlet> <servlet-mapping> <servlet-name>authorization</servlet-name> <url-pattern>/pattern</url-pattern> </servlet-mapping> everything works. servlet invokes pattern http ://localhost/pattern now want create autorizationservlet default page. need invoke servlet pattern: http ://localhost if write <url-pattern></url-pattern> have appengineconfigexception: try : <url-pattern>/</url-pattern>

jquery - Flex Slider 2.2.0 error in IE8/7 -

i'm getting error in ie8/7 : script5007: unable property 'addslide' of undefined or null reference while using flex slider 2.2.0 see http://msdn.microsoft.com/en-us/library/gg622942%28v=vs.85%29.aspx basically, ie9 breaks flash externalinterface calls if flash component embedded object tag embed tag fallback, , object id , embed name same. the easiest workaround tell ie9 render page in ie8 standards mode. this, insert in element: <!-- enable ie8 standards mode --> <meta http-equiv="x-ua-compatible" content="ie=8" > otherwise, might want use object tag or embed tag only.

javascript - Unable to get key defined -

suppose response {"errmsg":"error_bb"} or {"msg":"i bb"} . var jsonparsed = json.parse(response);// ok, works var key = object.getownpropertynames(jsonparsed);// key can msg or errmsg, ok, works if("errmsg" == key) { throw ("error says:"+jsonparsed.key); //it cannot work if jsonparsed.errmsg, works } else { alert("data says:"+jsonparsed.key); //it cannot work if jsonparsed. msg, works } i alert: the error says value undefined why since key seems defined comparison condition can determined. i not able throw or produce alert msg. however, if key replaced errmsg or msg shown in comments works. well, jsonparsed doesn't have property key , it? either has errmsg or msg , said. it's not surprising jsonparsed.key undefined . if want access property name contained in variable, have use bracket notation : obj[prop] but there more: object.getown...

java - SWT GridLayout columns overlap -

Image
code: final composite sectionclient = toolkit.createcomposite(parent, swt.none); sectionclient.setlayout(uihelper.getlayoutforwidgets(new gridlayout(2, true))); sectionclient.setlayoutdata(new griddata(swt.fill, swt.fill, true, true)); final composite leftcolumncomposite = toolkit.createcomposite(sectionclient); leftcolumncomposite.setlayout(new gridlayout(5, false)); leftcolumncomposite.setlayoutdata(new griddata(swt.fill, swt.fill, true, true)); final composite rightcolumncomposite = toolkit.createcomposite(sectionclient); rightcolumncomposite.setlayout(new gridlayout(5, false)); rightcolumncomposite.setlayoutdata(new griddata(swt.fill, swt.fill, true, true)); before: after: description: when window minimized (i.e. user progressively minimizes it), right column overlaps left column. given layout of containers, expect columns not overlap. of widgets become hidden. what missing? i'm opened different approach on laying out components. sscce / lots of boi...

java - Mavenized Seam 2.3.1.Final project get FileNotFoundException while trying to access a simple view -

when access example src/main/webapp/home.xhtml browser displays no problem, when trying access src/main/webapp/views/example.xhtml following: 02:04:27,513 error [org.apache.catalina.core.containerbase.[jboss.web].[default-host].[/myproject].[faces servlet]] (http-localhost-127.0.0.1-8080-16) servlet.service() servlet faces servlet threw exception: java.io.filenotfoundexception @ org.apache.naming.resources.dircontexturlconnection.getinputstream(dircontexturlconnection.java:369) [jbossweb-7.0.13.final.jar:] @ com.sun.faces.facelets.impl.defaultfaceletcache._getlastmodified(defaultfaceletcache.java:172) [jsf-impl-2.1.7-jbossorg-2.jar:] @ com.sun.faces.facelets.impl.defaultfaceletcache.access$000(defaultfaceletcache.java:62) [jsf-impl-2.1.7-jbossorg-2.jar:] @ com.sun.faces.facelets.impl.defaultfaceletcache$1.newinstance(defaultfaceletcache.java:82) [jsf-impl-2.1.7-jbossorg-2.jar:] @ com.sun.faces.facelets.impl.defaultfaceletcache$1.newinstance(defaultfaceletcache.java:78) [jsf-imp...

php - Improving query run time (Takes more than 20seconds to load a page) -

i've got query loaded everytime user open profile page. , slow. takes more 20 seconds load page. kinda simple query, alot of lines don't scared looking @ it. :) i appericiate on improving query. select `h`.`login` `login`, sum(if(((`h`.`cmd` = 0) or (`h`.`cmd` = 1)),`h`.`pips`,null)) `total_pips`, count(if(((`h`.`cmd` = 0) or (`h`.`cmd` = 1)),`h`.`position_num`,null)) `total_trades`, (count(if(((`h`.`pl` > 0) , ((`h`.`cmd` = 0) or (`h`.`cmd` = 1))),`h`.`pl`,null)) / count(if(((`h`.`cmd` = 0) or (`h`.`cmd` = 1)),`h`.`position_num`,null))) `winning_trades_percent`, sum(if(((`h`.`cmd` = 0) or (`h`.`cmd` = 1)),`h`.`gain`,null)) `total_gain`, (select avg(`wg`.`weekly_gain_all`) `gt_view_weekly_gain` `wg` (`wg`.`login` = `h`.`login`) group `wg`.`login`) `weekly_gain`, avg(if(((`h`.`pips` > 0) , ((`h`.`cmd` = 0) or (`h`.`cmd` = 1))),`h`.`pips`,null)) `average_profit_pips`, avg(if(((`h`.`pips` <= 0) , ((`h`.`cmd` = 0) or (`h`.`cmd` = 1)...

How do you post to a friend's wall using the C# Facebook SDK? -

so tried post on friends wall using following code: var fb = new facebookclient(_accesstoken); dynamic parameters = new expandoobject(); parameters.message = "google friend"; parameters.link = "http://gidf.de/"; parameters.name = "test"; parameters.from = new { id = "100000", name = "me" }; parameters.to = new { id = "1000001", name = "friend" }; dynamic result = fb.post("1000001/feed", parameters); however, told application not support this. did googling work, , read [user_id]/feed deprecated , have invoke feed dialog ask user publish it. how go on doing c# sdk? as of february 6, 2013, can't post friends timeline on behalf of user. read here: https://developers.facebook.com/roadmap/completed-changes/ client-side can use fb.ui method pop feed dialog. here's example: https://stackoverflow.com/a/15426243/1405120 server-side, can use url redirection. https://www.facebook.com/dia...

java - Image Segmentation From Edge Detection -

how can apply segmentation technique through edge detection in android? want run edge detection on picture , extract part of choice picture. bitmap or jpeg. possible in android? there working example or tutorial? your use case isn't descriptive, give general answer. maybe can go bit deeper detail of problem want solve. if aren't afraid of using modern c++ techniques, highly recommend opencv . has lot of features regarding image segmentation , edge detection. example canny edge detector implemented in opencv.

qt creator - How to use DEPLOYMENTFOLDERS directive in Qt Widget based application -

when use qt creator create qt quick / qml project adds deploymentfolders .pro file. can use directive folders/files copied build directory upon building (compilation) of application. how can use in simple qt widget based application? qt creator doesn't add simple qt project , when manually it, it's not working. this project file: folder_01.source = sounds #folder_01.target = deploymentfolders += folder_01 qt += core gui widgets target = myapp template = app sources += main.cpp i tried "/sounds" , "sounds/*" , thinks that. nothing works. missing here? i researching , stumbled on unanswered question. basically advocate using resource system when you're doing rapid ui development (qml) waiting resource file compile can irritation wanted copy files over. what confusing here source/target mean different things. best way describe copy -> root opposed copy -> here my build wants resources "raw" on path copying fold...

php - How to limit maximum number of items in category in yii? -

i have page model. pages nested - each page can belong another. because of space limit need force maximum number of "main pages"(pages without parent page). question best place check limit? in beforesave ? or in custom validation rule? or elsewhere? here example of custom rule class page, provided parentid attribute nullable foreign key parent page, sets null if page has no parent, i.e. main page . class page extends cactiverecord { const mainpages_limit = 10; public function rules() { return array( ... array('parentid', 'maynewmainpagebecreated', 'on'=>'insert'), ... ); } // custom rule validator public function maynewmainpagebecreated($attribute, $params) { $count = page::model()->count("parentid null"); if ($count >= self::mainpages_limit) { $this->adderror($attribute, "can't create more...

jquery - On scroll change opacity of header? -

im new jquery , im sure answer super basic. if can point me in right direction great. want opacity of header change 0 1 user scrolls past 400 pixels. help? www.hulu.com has perfect example. <code> <script> $(document).ready(function() { $(window).scroll(function() { if ($(this).scrolltop() > 400) { $('.header').css("background", "#000"); } else { $('.header').css("background", "transparent"); } }); }); </script> </code> try one: example: http://jsfiddle.net/seh5m/ html: <div class="header"> <div id="background"></div> <div id="labels"> labels here </div> </div> <div class="content"> </div> css: .header{ width:100%; height:100px; position:fixed; top:0px; z-ind...

jsp - Calling user defined functions in bean using JSTL -

this question has answer here: how call static method in jsp/el? 7 answers i have method public void x(httpservletresponse response) in bean. want call function in jsp using jstl. how can that? have call function.it not return value. you can achieve using custom tags. can put utility methods in class static , expose them using tld file. include tld in jsp , can call method using el - ${util:mymethod(anyparameter)} see this custom tags.

The difference between #include .h and just stating class A; in C++ -

this question has answer here: when can use forward declaration? 12 answers i'm analying operating systems project school , came across header file: //kernelev.h #ifndef _kernelev_h #define _event_h_ typedef unsigned char ivtno; class thread; class pcb; class kernelsem; class kernelev { public: kernelev (ivtno ivtno); ~kernelev(); int wait(int maxtimetowait); void signal(); [...] now, when writing complete definitions of these methods (kernelev, ~kernelev, wait , signal), used attributes of classes thread, pcb , kernelsem. difference between introducing instance #include thread.h; #include kernelsem.h; , declaring classes this: class thread; there differences in data access rights? or it's somehow different? thanks help, hope question clear enough. first, note if introduce classes, won't able use methods; class...

mysql - Difference between two datetime entries -

select eta,sta `schedule` `num`="5567"; 2013-08-26 18:37:00 2013-08-26 18:30:00 select datediff(eta,sta) `schedule` `num`="5567"; 0 why result 0 instead of 7 (i.e. minutes)? datediff give result in days. select hour (eta - sta) `schedule` `num`="5567"; an alternative hour difference.

java - How many times a text appears in webpage - Selenium Webdriver -

hi count how many times text ex: "vim liquid marathi" appears on page using selenium webdriver(java). please help. i have used following check if text appears in page using following in main class assertequals(true,istextpresent("vim liquid marathi")); and function return boolean protected boolean istextpresent(string text){ try{ boolean b = driver.getpagesource().contains(text); system.out.println(b); return b; } catch(exception e){ return false; } } ... not know how count number of occurrences... the problem using getpagesource() , there id's, classnames, or other parts of code match string, don't appear on page. suggest using gettext() on body element, return page's content, , not html. if i'm understanding question correctly, think more looking for. // text of body element webelement body = driver.findelement(by.tagname("body")); string bodytext = body.gettext(); ...

vb.net - Display Metadata-thumbnail of Jpeg in picturebox -

i need display image's thumbnail, saved in metadata in picturebox. i'm using vb.net http://msdn.microsoft.com/en-us/library/windows/desktop/ee719904%28v=vs.85%29.aspx#_jpeg_metadata so far came this. adding breakpoint displays getquery returns empty if know file indeed have thumbnail private sub form1_load(sender system.object, e system.eventargs) handles mybase.load dim imagepath = "c:\xampp\htdocs\downloads\img_1322.jpg" ' path file dim stream = new filestream(imagepath, filemode.open, fileaccess.read, fileshare.readwrite) dim decoder = new jpegbitmapdecoder(stream, bitmapcreateoptions.none, bitmapcacheoption.none) dim metadata = trycast(decoder.frames(0).metadata, bitmapmetadata) dim ms new system.io.memorystream dim bm bitmap dim ardata() byte ardata = metadata.getquery("/app0/{ushort=6}") '<--- breakpoint here: query returns nothing! ms.write(ardata, 78, ardata.length - 78) bm = new ...

python - Run App Engine development server with modules in PyCharm -

since latest release of google app engine python sdk, it's possible use modules . have python application default module , module. start module in development server, development server has run this: dev_appserver.py app.yaml othermodule.yaml when add app.yaml othermodule.yaml "additional options" in run/debug configuration of pycharm , run development server, following error message: google.appengine.tools.devappserver2.errors.invalidappconfigerror: "." directory , yaml configuration file required this because pycharm adds dot @ end of command run development server, this: dev_appserver.py app.yaml othermodule.yaml . is possible remove dot, or have wait until fixed in pycharm? before there modules, there no need this. you can go around time being creating new run configuration. chose python configuration, fill this: script: /path/to/your/dev_appserver.py script parameters: dispatch.yaml module1.yaml module2.yaml working dire...

css - Navigation bar disappears in Internet Explorer -

i've completed first custom-built wordpress website, based on automattic's toolbox theme, , in process of testing it. i'm having strange issues ie 6-8 i've not experienced before - entire navigation bar, including background colour, disappears leaving logo. none of navigation links show up, nor button triggers menu dropdown on small screen sizes. the website http://fpsl.eu , , i'm pretty stumped. don't think it's js issue since works fine in firefox , chrome without js. html5 shiv comes preinstalled toolbox don't think it's compatibility issue in respect...but maybe i'm wrong, , don't know how check! (i'm using browserstack test , wondering if rendering accurate - portfolio website tested extensively few months ago - www.dearjackalope.com - causing browserstack's ie virtual machine hang, despite having made no major changes other adding content - separate issue guess, makes me unsure whether sites breaking @ once or if it...

nokogiri - Why is this generated ruby regex not working in the actual code? -

Image
i found site can generate ruby regex. enter text , click part want extract: so tried it: product.css('.cravgstars .swsprite span').text[/([+-]?\\d*\\.\\d+)(?![-+0-9\\.])/, 1] to 4.4 got nil instead. is regex not working or placed in incorrect way? try this: s = "4.4 out of 5 stars" p s[/([+-]?\d*\.\d+)(?![-+0-9\.])/] # >> "4.4" you can find way regexp.new : regexp.new('([+-]?\\d*\\.\\d+)(?![-+0-9\\.])') # => /([+-]?\d*\.\d+)(?![-+0-9\.])/

windows - How do I print the return value of a program in a loop in a batch file script? -

the task run program(the same program) ten times , output each run exit code(the return value of main function). want run batch file(windows), this: for /l %%x in (1,1,10) ( automatedtest.exe cip.log echo %errorlevel% ) the code above should if you're thinking intuitively, doesn't work because code it's running actually: ( automatedtest.exe cip.log echo 0 ) and piece executed 10 times. any ideas on how make work? thanks! what need delayed variable expansion: for /l %%x in (1,1,10) ( automatedtest.exe cip.log echo !errorlevel! ) to enable delayed variable expansion precede batch setlocal enabledelayedexpansion or start command shell cmd.exe /v:on . another approach using subroutines: for /l %%x in (1,1,10) call :test goto :eof :test automatedtest.exe cip.log echo %errorlevel% goto :eof yet approach use if errorlevel .

plugins - Eclipse: Open containing folder for file NOT in the project explorer -

i know there various plugins startexplorer or easy shell allow open containing folder files or folders selected in project explorer. looking open containing folder file not in eclipse project explorer. a typical situation find myself in cdt view, crtl-click on include statement , open .h file not in project explorer, can't use plugins above open containing folder. pathname tip appears 5 seconds when put mouse pointer on top of name of file, can navigate folder manually, very deep pathnames , takes ages navigate there, , have check pathname tip many times because keeps disappearing. other editors have open containing folder option when right click on name of file. miss functionality in eclipse. does know how solve this? edit: easy way reproduce situation dragging , dropping text file outside eclipse eclipse. i'd open containing folder of file (imagine didn't know came from). suggested below, tried ctrl+return, doesn't work in situation, says there not property...

android - display Two activity on Same screen -

i working on android 3.0 need divide screen on 2 parts 1 part should attached under activity , second actvity b, how possible? tried using fragment fragment attached 1 activity. challenge 2 activtiy. @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { // todo auto-generated method stub view view = inflater.inflate(r.layout.fragment1, container, false); button button = (button)view.findviewbyid(r.id.button1); button.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub intent intent = new intent(getactivity() , a.class); intent.setflags(intent.flag_activity_clear_task); startactivity(intent); } }); return view; } you cannot. purpose need use fragment , designed for. screen estate on mobile devices limited, hence, design choice not support mult...

eclipse - Changes to HTML files not showing on built phonegap 3.0 app -

so have phonegap 3.0 app ( project folder), , it's project ( project/platforms/android ) on eclipse. the problem when change project/www/index.html , , tell eclipse run project, changes don't appear on device. i noticed eclipse saying application deployed. no need reinstall. tried adding space in .java file eclipse notice change in project , rebuild it. worked, installing ringto.apk... success! showed on log, still changes index.html didn't show @ device... changes made files inside project/www/ not automatically copied project (in case project/platforms/android/assets/www/ ). have run following command iteratively copy changes platform specific projects , build them. open command prompt , navigate root of project (in case project/ ). or can right click on project/ folder while pressing shift key. run following command: cordova build you can optionally limit scope of each build specific platforms: cordova build android alternatively, can run ...

php - AddEmbeddedImage() function embadding inline images as well as attaching same image as attachement -

i have added following parameters phpmailer object. though have embedded images inline purpose using addembeddedimage() function, working expected, additionally attaching same images attachment email & displaying @ bottom. $msg = `<table><tr><td colspan="2"><img src="cid:header_jpg" alt="www.example.in" width="770" height="4" border="0" /></td></tr></table>`; $mail = new phpmailer(true); //new instance, exceptions enabled $mail->issmtp(); // tell class use smtp $mail->smtpauth = false; // enable smtp authentication $mail->port = 25; // set smtp server port $mail->host = 'localhost'; // smtp server $mail->username = ""; // smtp server username $mail->password = ""; // smtp server password $mail->addreplyto($sender, $sender_name); $mail->from = $sender; $mail-...

iframe - How to override X-Frame-Options for a controller or action in Rails 4 -

rails 4 appears set default value of sameorigin x-frame-options http response header. great security, not allow parts of app available in iframe on different domain. you can override value of x-frame-options globally using config.action_dispatch.default_headers setting: config.action_dispatch.default_headers['x-frame-options'] = "allow-from https://apps.facebook.com" but how override single controller or action? if want remove header completely, can create after_action filter: class filescontroller < applicationcontroller after_action :allow_iframe, only: :embed def embed end private def allow_iframe response.headers.except! 'x-frame-options' end end or, of course, can code after_action set value different: class facebookcontroller < applicationcontroller after_action :allow_facebook_iframe private def allow_facebook_iframe response.headers['x-frame-options'] = 'allow-from https://ap...

How can I convert dummy variables to factors in R? -

Image
in data frame (called survey) there 1 variable called "answer" answer 1 2 1 2 i want convert these dummy variables answer no yes no yes what command should apply survey$answer data? actually want visualize data lattice barchart(as.factor(with(survey, survey$answer))) the above command did result in barchart, need change labels "yes" , "no" instead of "2" , "1". that's why need convert dummy variables. use factor function in: > answer <- c(1,2,1,2) > answer <- factor(answer, labels=c("no", "yes")) [1] no yes no yes levels: no yes

vba - Find duplicate data in sheet1 and if it is found in sheet2 then it has to highlight with some specific design(Color) -

sub compare2sheets() dim ws1 workbook, ws2 workbook dim s1 string, s2 string s1 = inputbox("enter 1st sheet name") s2 = inputbox("enter 2nd sheet name") set ws1 = sheets("s1") set ws2 = sheets("s2") dim rcount long, ccount long rcount = ws1.usedrange.rows.count ccount = ws1.usedrange.columns.count dim r long, c integer r = 1 rcount c = 1 ccount if ws1.cells(r, c) <> ws2.cells(r, c) ws2.cells(r, c).interior.colorindex = 6 end if next c next r set ws1 = nothing set ws2 = nothing end sub question: not able execute above code. how execute code? ws1 , ws2 declared workbooks, should declared worksheets. change first line of code to: dim ws1 worksheet, ws2 worksheet furthermore youe have remove double quotes when referring worksheets: set ws1 = sheets(s1) set ws2 = sheets(s2)

fortran - Check the input data type and whether it is empty or null -

i asking user give value @ run time calculations. i want test if user entered value real/integer number, , if not give warning program expecting real/integer number here. in addition, know how check if particular variable @ moment null or empty. i.e. have declared variable if @ time of calculation value null or empty or not yet set, in case, program shouldn't crash instead give warning provide correct value. both these operations more easier in c++ , c#, couldn't find way in fortran. i guess "null or empty" mean whether variable has been initialized: "not yet set". "null" has particular meaning fortran pointer variables, suppose not question. fortran doesn't automatically give variables special value before intentionally initialized there no easy way check whether variable has been initialized. 1 approach initialize variable declaration special value. means need know special value never obtain in operation of program. ...

sass - Failed to load COMPASS resource: the server responded with a status of 404 (Not Found) -

i created theme on liferay 6.1 using same css, jsp, js, images of classic theme (which located in root\html\themes\classic ). my copied theme works fine , standard css works except compass , sass doesn't work. compass version 0.12.2 sass version 3.2.1 my custom.css : @import "compass"; @import "mixins"; @import url(custom_common.css); $dockbargradientend: #1273c7; $dockbargradientstart: #118ade; $dockbaropengradientend: #0993dd; $dockbaropengradientstart: #0ea6f9; /* ---------- base styles ---------- */ .aui { .separator { border-color: #bfbfbf transparent #fff; border-style: solid; border-width: 1px 0; } #wrapper { background: none; margin: 0 auto; padding: 2em 5em 0; position: relative; @include respond-to(phone) { padding-left: 0.5em; padding-right: 0.5em; } @include respond-to(tablet) { padding-left: 1em; ...

jquery - Google script repository with HTTPS? -

i need load jquery google repository here . on https enviroment, possible? can't test right now, , need know. maked it? yes. if @ urls give you, you'll notice protocol-relative urls. on https sites, urls parsed https.

matlab - solving linear complex system of equations -

suppose system of equations looks like: a(1+2i) + b(100i) =10i; conj(a)*(11i) +b(12+ 17i)= 167; where a , b complex numbers; how solve a , b using matlab? (i need solve system of 10 equations.) this math problem. have 4 equations in 4 unknowns once separate real/imag components a*(1+2i) + b*(100i) =10i; conj(a)*(11i) +b*(12+ 17i)= 167; is equivalent real(a) - 2*imag(a) - 100*imag(b) = 0 2*real(a) + imag(a) + 100*real(b) = 10 11*imag(a) + 12*real(b) - 17*imag(b) = 167 11*real(a) + 17*real(b) + 12*imag(b) = 0 then define coefficients x= [real(a) imag(a) real(b) imag(b)] in linear equations , solve them a= [1 -2 0 -100 2 1 100 0 0 11 12 -17 11 0 17 12]; b = [0 10 167 0]'; a\b ans = 0.4049 14.7920 -0.0560 -0.2918 so a=0.4049+14.7929i , b = -0.0560 -0.2908i with mean rounding errors. of course not helpful if have 10 complex equati...

Java OOP Data Access -

i programming in java , using common patterns (dao,factorys, ..). in cases, needed hold global accessible data (for example game entities in game requested several windows). save global data? there solution scalable? the static data structures occupy memory.so shouldn't use static data structures unless have use it

c# - Change display Zoom level -

in windows 8 there change size of items under display, can zoom 100%-150%, there way programatically change using c#? i don't believe there api's control (i've looked before, may have missed it). know i've changed setting on windows 7 , requires logout/logon cycle. windows mess around device/font metrics application fooled making text larger on screen. if declare application high-dpi aware, windows not app. control create each font instance in application. windows offers option defeat automatic font metrics kludge on application application basis. however, if writing windows forms apps, want @ autoscalemode property may want accomplish.