Posts

Showing posts from August, 2014

Android Studio: ExternalSystemException -

Image
when opening project (android application) in android studio, shows externalsystemexception. (i cloned android application system github repo). event log: externalsystemexception: unable save '/home/prasang/privly/privly-android/local.properties'/home/rest path of app/-android/local.properties (permission denied) i'm not sure if using mac or windows machine fix work mac. i encountered same error after cloning copy of android transition tutorial github here on mac os sierra: https://github.com/lgvalle/material-animations to correct error, have go mac , find folder had clone code. need "get info". now, change permission @ bottom system, staff , can "read , write" folder. try opening repo in android studio again , find error has disappeared.

iphone - Fixed transparent header in a UITableView -

Image
i trying add fixed transparent header in uitableview similar 1 on attached image (lhr-syd / 372 results). "built in" component in xcode/ios or how done ? use these methods , - (uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section; above method setting view. - (nsstring *)tableview:(uitableview *)tableview titleforheaderinsection:(nsinteger)section; above method setting title . see 1 , - (uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section { uilabel *lbl = [[[uilabel alloc] init] autorelease]; lbl.textalignment = uitextalignmentleft; lbl.text=@"lhr-syd / 372 results"; return lbl; } by using above method can add different objects headerview. (or) - (nsstring *)tableview:(uitableview *)tableview titleforheaderinsection:(nsinteger)section{ return @"lhr-syd / 372 results"; } this 1 requirement think so. - (cgfloat)tableview:(uitableview *...

java - How to write a code that will execute after each step is executed -

the application working throws lot of unexpected alerts . wanted implement way catch these through common method isalert present . but how call isalertpresnt each step in webdrriver , can me here ? typically method :- public void checkalert() { try { webdriverwait wait = new webdriverwait(driver, 2); wait.until(expectedconditions.alertispresent()); alert alert = driver.switchto().alert(); alert.accept(); } catch (exception e) { //exception handling } } the issue how call before every step ? know make code slow badly want implemented . i looking executes after each command\step in test .is possible ? currently calling method in expected scenarios try catch. webdriver has webdrivereventlistener listener trying exactly. implementing listener , registering driver - can checkalert method called behind scenes before/after every action perform using webdriver. take @ example. http://toolsqa.com/selenium-webdriv...

xml - Show Edit Text in Text View, & adjust height according to Content written in Edit text (Android) -

Image
when send message or joke of 1 line or 1 word, why space left @ bottom. take text view wrap_content . i need text wrapped height. needed shown in picture below. text view <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:textappearance="?android:attr/textappearancesmall" android:text="" android:ems="10" android:gravity="top|left" android:hint="enter message" android:inputtype="textmultiline|textpostaladdress" android:minheight="200dip" android:padding="5dip" android:scrollbars="vertical" android:layout_margintop="-5dp" android:layout_marginbottom="-5dp" android:textcolor="@color/blue" android:maxlines="1000000" android:id="@+id/messagedetail" android:layout_alignparentleft="true" android:...

node.js - Visual studio code nodejs debug failure - request 'launch': cannot launch -

on windows 10 nodejs , visualstudio code installed, can't debug vs code sample code microsoft- https://code.visualstudio.com/docs/runtimes/nodejs the error " request 'launch': cannot launch target(reason:spawn node enoent) ", looks configuration issue, , checked nodejs did install under c:\program files\nodejs. i saw 1 same question on stackoverflow - visual studio code nodejs request 'launch': cannot launch target (reason: spawn node enoent) , there's no answer, have suggestion on this? in advance! i pretty sure because node has not been added path. say, can't type "node" anyway in command line , have correctly open node installation. double check node correctly added path first, try again.

javascript - Typescript hasOwnProperty equivalent -

in javascript if want loop through dictionary , set properties of dictionary, i'd use this: for (let key in dict) { if (obj.hasownproperty(key)) { obj[key] = dict[key]; } } if obj typescript object (instance of class), there way perform same operation? if obj typescript object (instance of class), there way perform same operation? your javascript valid typescript ( more ). can use same code is. here example: class foo{ foo = 123 } const dict = new foo(); const obj = {} foo; (let key in dict) { if (obj.hasownproperty(key)) { obj[key] = dict[key]; } } note: recommend object.keys(obj).foreach(k=> javascript not question asking here.

multithreading - Are java variables themselves thread safe? When updating variables? -

this question has answer here: thread-safe setting of variable (java)? 5 answers suppose have 2 threads updating object, , 1 thread reading object no synchronization. obviously, run condition. however, wondering if variable can partially written. public class commonobject extends object { static int membervar=-1; } public class input1thread extends thread { public void run() { while(true) commonobject.membervar = 1 } } public class input2thread extends thread { public void run() { while(true) commonobject.membervar = 2; } } public class outputthread extends thread { public void run() { while(true) system.out.println("commonobject.membervar"+ commonobject.membervar); } } i assume value printed out either 2 or 1. however, wondering ...

Android: SoapObject replace a property value -

in 1 of project using ksoap2 library. i have find way update value particular key added soapobject , either a) removing key/value soapobject , adding key again new value or b) updating value of existing key for example, have soapobject similar below data, savexxxxrecord{referenceno=tp002011; reportdatetime=2016-02-29 12:13; notes=test; tokenid=2760dad08feb5c8b553ad02c; } i have replace value of tokenid new value. i used following code update value in soapobject, private synchronized static void updateproperty(soapobject request, string name, string value) { try { for(int i=0; < request.getpropertycount(); i++) { propertyinfo pidata = new propertyinfo(); request.getpropertyinfo(i, pidata); if (commonfunctions.ifstringssame(name, pidata.name)) { pidata.setvalue(value); request.setproperty(i, pidata.getvalue()); ...

html - Cant connect php to mysql -

new php , connecting form attributes php connect godaddy mysql. every attempt ends in blank screen no error messages. there syntax errors jump out? sublime text wont register php syntax, thats problem time. may need call godaddy support? password has been removed privacy. <?php $servername = "localhost"; $dbusername = "jaysenhenderson"; $dbpassword = "xxxxx"; $dbname = "eotdsurvey"; $con = new mysqli ($servername, $dbusername, $dbpassword, $dbname); mysql_select_db('eotdsurvey', $con) // check connection if ($conn->connect_error) { die("connection failed: " . $conn->connect_error); } echo("connected successfully"); $_post['bi1'] $_post['bi2'] $_post['bi3'] $_post['bi4'] $_post['bi5'] $_post['bi6'] $_post['bi7'] $_post['bi8'] $_post['bi9'] $_post['bi10'] $_post['bi11'] $_post['bi12'] $_post['bi13...

html - JSON-LD - Does using the `location` property the correct way to markup multiple business locations? -

i tasked optimized our clients website using structured data (json-ld) search engine friendly. our client's business has multiple locations , i wondering if using location property structure different business location correct. or should mark each location separately? here sample code of did (although validating using google structured data testing tool results in all good , i'm wondering if using location property correctly) also, remove of properties make code small , replace values generic values: <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "attorney", "name" : "example injury lawyer", "url": "http://example.com/", "logo": "http://example.com/assets/images/logo.png", "location": [{ "@type": "attorney", "@id": "http://example.com/offices/city-injury-lawyer",...

WOWZA Streaming Server Bandwidth consumption monitoring for specific app/folder -

i new wowza streaming server have created new vod application "voddemo" generate streaming url video content of "voddemo" folder placed inside "content" directory of wowza app folder (aka 'application-specific directory') looking know way obtain total streaming bandwidth consumption directory of "voddemo" which used video analytic purpose there's several ways can statistics info on wowza streaming application. as orde pointed out above, can use monitoring page manager ui. page can reached selecting application page, , clicking on monitoring left content menu. can view network usage on historical basis well. you can use built-in httpprovider connectioncounts ( http://localhost:8086/connectioncounts ). shows xml snapshot of current connection info. can see network usage particular application checking messagesoutbytesrate value. <messagesoutbytesrate>139055.0</messagesoutbytesrate> you can create own ...

registration - Exception generated on multi band blending of two images -

i doing multi view occlusion image registration. have applied surf finding , matching of feature. using homography transformation, generated perspective transformed image of reference image. have applied linear blending , additive weighted blending generate final registered image. did not result. so, applying "multi band blending" in opencv library using c++. code written as: // apply multi band blender overlaying of 2 images detail::multibandblender blender; //blender::multibandblender blender; try{ rect bounding_box; rect dst_roi; cout << "before blend preparing" << endl; blender.prepare(dst_roi); cout << "after blend preparing" << endl; mat mask, bigimage, curimage; // warpperspective(image3, perimg1, h, cv::size(image3.cols, image3.rows)); warpperspective(image3, curimage, perimg1, bounding_box.size()); //mat makemask(size sz, vector<point2f> imagecorners, mat homo...

c# - How to add a field to TFS workitem -

i'm new user tfs i add custom field work item in project in project collection. my expectation add custom field("bizid") work item "task" **c# code behind.** i know possible ways add custom field work item? p.s: dont need process template interruption , not using wit. some references help. in advance. at present time, in order add field process template in on-premise tfs, need modify process template xml. there's no way around it. you may able avoid using process template customization using combination of custom backlog columns , tags, however. depends on data want capture.

android - checking battery level in background and notify when reach 7 percentage -

can code android app run in background , continuously checks battery percentage , notify me when battery level reaches 7 percentage, tried installing not showing app on screen. here listen intent (action_battery_changed) , register receiver when intent fired. in actionscript, believe dispatchevent, , call mbatinforeceiver , current level of our battery life , put int value our textfield or textview. public class main extends activity { private textview contenttxt; private broadcastreceiver mbatinforeceiver = new broadcastreceiver(){ @override public void onreceive(context arg0, intent intent) { int level = intent.getintextra("batterylevel", 7); contenttext.settext(string.valueof(level) + "%"); } }; @override public void oncreate(bundle icicle) { super.oncreate(icicle); setcontentview(r.layout.main_layout); contenttext = (textview) this.findviewbyid(r.id.mspacetxt); this.registerreceiver(this.mbatinfor...

linux - Valgrind does not show correct heap usage when run an app through shell script -

i using valgrind check heap allocation of archive/compression tool p7zip (7zip on windows) on linux. downloaded code here ( https://sourceforge.net/projects/p7zip/files/p7zip/ ) , build (make all_test) , installed (./install.sh). after installation, shell script named '7za' created @ /usr/local/bin , content reads as: #! /bin/sh "/usr/local/lib/p7zip/7za" "$@" also, on specified path /usr/local/lib/p7zip/7za executable of 7za placed. now, if run valgrind test memory usage of 7za (which runs shell script) using command 2kb of heap usage. valgrind 7za x file.7z whereas, if directly use 7za binary high memory usage around 1mb looks real one: valgrind /usr/local/lib/p7zip/7za x /home/z/desktop/file.7z similary, when build code, bin directory created there containing 7za executable. if run there, again high , correct memory usage. i trying understand difference in both approaches. why using installed app (run through sheel script) not give c...

java - Appending data to an XML file using OutputStreamWriter (StAX parser) -

i want append data xml file using outputstreamwriter ending below <?xml version="1.0" encoding="utf-8"?> <doc> <msg> <tag1>data1</tag1> ... </msg> </doc> <?xml version="1.0" encoding="utf-8"?> <doc> <msg> <tag1>data2</tag1> ... </msg> </doc> how can achieve correct format <?xml version="1.0" encoding="utf-8"?> <doc> <msg> <tag1>data1</tag1> ... </msg> <msg> <tag1>data2</tag1> ... </msg> </doc> i have tried below code xmloutputfactory outputfactory = xmloutputfactory.newinstance(); file file = new file(outputfile); writer fw = null; xmlstreamwriter w = null; try { if(!file.isfile()) { file.createnewfile(); } fw = new outputstreamwriter(new fileoutputstream(file, true), "utf-8...

jquery - How to wait for multiple ajax requests, when the list grows as requests come in? -

i know "$.when.apply($, list)", works when have set list. in case, i'm getting tree of urls on ajax, starting root url point 0 or more other urls get, can each point 0 more other urls, etc. for example, suppose "url1", returns ["url2", "url3"], means want urls, , on. first ajax call url1 complete before can start ajax calls url2 , url3. writing function retrieve whole tree , store data easy enough, way trigger action when all these ajax calls done?

Regex to get all character to the right of first space? -

i trying craft regular expression match characters after (but not including) first space in string. input text: foo bar bacon desired match: bar bacon the closest thing i've found far is: \s(.*) however, matches first space in addition "bar bacon", undesirable. appreciated. you can use positive lookbehind : (?<=\s).* ( demo ) although looks you've put capturing group around .* in current regex, try grabbing that.

php - iframe not loading properly -

Image
i loading page in iframe. code using: file: iframe_load.html <?php echo 'url = '.$_request['url']; ?> <iframe width="1015px" id="article_frame" src="<?php echo $_request['url']; ?>" style="border:0 none;" height="576px" sandbox="allow-scripts"></iframe> in browser if browse url: http://mywebsite.com/iframe_load.html?url=http://www.northjersey.com/r?19=961&43=515347&44=234450391&32=4497&7=309037&40=http%3a%2f%2fwww.northjersey.com%2fnews%2fsecret_bunker_under_prague_hotel_opens_to_public_.html&nid=4306612 then $_request['url'] showing value partially. iframe not showing actual page content. please me. let me simplify url demonstration purposes: http://yoursite.com/iframe_load.html?url=http://theirsite.com/index.php?a=1&b=2 notice website's url contains query string ( index.php?a=1&b=2 ) well. because url...

java - Why setTableHeader() method throws NullPointerException? -

i try add tooltips jtable header. in case use ttheader class extends jtableheader java class. seems fine, when try add new ttheader header jtable, nullpointerexception unknown source. don't know why. ttheader class seems ok. problem somewhere else. here code approach. jtable populate: private jpanel contentpane; private jscrollpane scrollpane; private jtable table; private string tooltipssdb[] = {"sessionid", "userid", "patientid", "pluginid", "date", "time"}; connection conn = null; resultset rs = null; preparedstatement ps = null; table() { // connection component conn = connectionjdbc.connectdb(); settitle("my sample table"); setsize(new dimension(400, 400)); setdefaultcloseoperation(jframe.exit_on_close); setlocationrelativeto(null); setvisible(true); contentpane = new jpanel(); contentpane.setlayout(new borderlayout(0, 0)); setco...

How to add string to ListView dynamically in android? -

public class myactivity extends activity { context context; list<string> tasks; arrayadapter<string> adapter; /** * called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); context = this; tasks = new arraylist<string>(); button add = (button) findviewbyid(r.id.button); add.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { edittext edittext = (edittext) findviewbyid(r.id.edittext); edittext.setvisibility(1); inputmethodmanager imm = (inputmethodmanager) getsystemservice(context.input_method_service); imm.showsoftinput(edittext, 0); string value = edittext.gettext().tostring(); tasks.add(value); ad...

javascript - how to show div when scroll reach? -

Image
divs showing underneath 1 bye 1 of div is there option show each .slide on basis of mouse scrolling ? go underneath while scroll up http://jsfiddle.net/wq3he/ you can check out current scroll top, , based on that, fire jquery code activate current tab. that's possible. few things unclear question. first being, looks homework question. know have done far. secondly, didn't provide need after scroll. $(document).ready(function(){ $(window).scroll(function(){ if (window.scrolly > 100) $(".slide[data-slide='2']").height(2000); }); }); fiddle: http://jsfiddle.net/praveenscience/wq3he/1/

python - How to use crosstab/pivot with multi dimensions -

i tried using pivot tables have more 1 values in 'values' field pivot_table function doesnt work, im trying see if can crosstabs. here code table=pandas.pivot_table(xl2, values='applications', rows='sub-product',cols='application date',aggfunc=numpy.sum) i when export csv. sub-product 11/1/12 11/2/12 11/3/12 gp 190 207 65 gpf 1391 1430 1269 in python, after converting pivot table, dtype float64() , using <class 'pandas.core.frame.dataframe'> what want output in csv: row labels 11/1/2012 11/2/2012 11/3/2012 gp acquisitions 164 168 54 applications 190 207 65 gpf acquisitions 1124 1142 992 applications 1391 1430 1269 with code along lines of (currently doesnt work :/ ) : table=pd.pivot_table(xl2, values=['acquisitions','applications'], rows=['sub-product']...

Programmatically access User permissions for web application in sharepoint 2010 -

i trying access user permissions > create subsite enable/disable feature sharepoint api. how access user permission webapplications? if go ca in sharepoint 2010 , click on web application , choose user permission in ribbon shows lot of check boxes. under site permission there option create subsites. looking for. based on ref: toggle permission in webapplication.rightsmask ) powershell: $webapp = get-spwebapplication -identity http://mywebapp $allowsubsites = $false $newpermissions=$null if ($allowsubsites){ $newpermissions=[microsoft.sharepoint.spbasepermissions]($webapp.rightsmask -bor [microsoft.sharepoint.spbasepermissions]::managesubwebs) } else { $newpermissions=[microsoft.sharepoint.spbasepermissions]($webapp.rightsmask -band [system.int64](-bnot ([microsoft.sharepoint.spbasepermissions]::emptymask -bor [microsoft.sharepoint.spbasepermissions]::managesubwebs))) } $webapp.rightsmask = $newpermissions $webapp.update() c#: spwebapplication ...

javascript - How can I repopulate the jquery UI datepicker from an Ajax response -

i've been using this question guide associating events jquery ui datepicker. i have dates , events highlighting current month works fine. question how can refresh calendar new events ( new set of social events on calendar stored in spektrixapp.events) based on further ajax call (see onchangemonthyear in code below) spektrixapp = {}; (function($) { $.post( // see tip #1 how declare global javascript variables spektrixajax.ajaxurl, { // here declare parameters send along request // means following action hooks fired: // wp_ajax_nopriv_spektrix_get_events , wp_ajax_spektrix_get_events action : 'spektrix_get_events', // other parameters can added along "action" monthid : 9 }, function( response ) { spektrixapp.events = response; //console.log(events[1]); $("#spektrix-event-calendar" ).datepicker({...

java - Android External library path -

i using external library in project. in current java build path library path shows c:/xxx/xxx/github/myproject/libraryone/libs . as, not 1 developer,other people might work code. so, want make ../libraryone/libs i think, first 1 not work in other platform, right ? so, how can , best solution me ? its not matter of platform. matter of different machine. first path hard coded , c: in other developer's machine not same c:. thus, system not able traverse right folder when run on machine. second way write path good, assuming myproject folder has project working on. thus, when other developer start using myproject, automatically have folder libs.

javascript - On submit function is not called -

at end of document have: <script> $("#submitevent").click(function() { $("#eventform").submit(); }); $(document).ready(function() { $('#eventform').submit(function() { console.log("i on submit"); }); }); </script> now submitevent button not within form , reason having on .click event. when button pressed form submit triggered correctly: <form id="eventform" action="${contextpath}/dashboard/event/new" method="post"> now expect event fired when submit fired ignored reason. instead of console.log not surprisingly going use ajax, console.log not print event not triggered.. update, did suggested still nothing :-) : $(document).ready(function() { $("#submitevent").click(function() { $("#eventform").submit(); }); $('#eventform').submit(function() { console.log("...

jquery - Persistent Header for web page -

i have looked @ several jquery methods of making persistent header, don't understand how functions work. the basis of idea being, have drop down menu somewhere on page , when top of screen gets position, change drop down menu fixed position @ top... any appreciated. something this? http://jsfiddle.net/c5nxh/ html <div class="test">hello!</div> jquery $( window ).scroll(function() { offset = $('.test').offset(); if ( offset.top < $( window ).scrolltop() + 10 ){ $('.test').addclass('fixed'); } }); css body{ height: 2000px; } .test{ position: relative; top: 100px; } .test.fixed{ position: fixed; top: 10px; }

iphone - error to add buttons inside scrollView -

i have problem app (iphone), have created 2 vc (centerviewcontroller , buttonsviewcontroller). in .xib of centerviewcontroller have uiscrollview. scrollview show contents of buttonsviewcontroller. until here it's ok. problem appears when click button scrollview show, error pointing main file. this link shows error: http://www.mediafire.com/view/6elkxbzmn9ctzze/captura_de_pantalla_2013-09-24_a_la(s)_18.41.43.png can me please?¿ thanks much. probably connected ibaction / target selector not existing in implementation file. check connections , implement actions correctly. if did set in code, note need write : every argument in method, eg. @selector(didtouchbutton:) .

php - Silex variable mount point? -

i have series of pages route definitions: $app->get('/{region}/{instance}/events', 'myapp\eventscontroller::index'); $app->post('/{region}/{instance}/events', 'myapp\eventscontroller::add'); $app->get('/{region}/{instance}/event/{id}', 'myapp\eventscontroller::edit'); $app->post('/{region}/{instance}/event/{id}', 'myapp\eventscontroller::update'); i have eventscontroller class has have region , instance parameters 4 functions ( index , add , edit , , update ). i'm wondering if it's possible clean up, , possibly move region , instance values global $app object. i'd love able do $app->mount('/{region}/{instance}/', new myapp\eventscontrollerprovider()); and have eventscontrollerprovider validate region , instance variables, , map "event" routes on top of path, seems mount points can't contain variables (the controllerproviderinterface::connect() method ...

Capture OpenLayers.Layer.Image 404 Not found as an error message -

is there way know when openlayers.layer.image fails find image, i.e. returns 404 (not found)? i tried adding listener "loadend", comes looking ok - unless there deep within event object i'm missing. mylayer.events.register("loadend", mylayer, function(e) { console.log(e); }); had same problem - imho it's not possible track status of content

angularjs - Loader screen in anguarJS -

i want show loader screen while main page of application loading, i'd similar angularjs blog (which thinki that's pretty cool), i've seen documentation ngcloak looks hides content while it's loading application preventing display {{}}, how can manage show layout or "main page" until that's loaded? which best way implement solution according use case? i'm not sure directive, http interceptor, defer route, ngcloak, candidates solution? thanks

How can invoke a function in Javascript automatically like jquery -

i've been trying understand how jquery works. let's instance when anchor tag clicked. take code below example: $('.selector').click the "$" references jquery how jquery know supposed , find ('.selector') in dom? how jquery automatically know run following method of "click" on matched element? $ function. you're passing ('.selector') argument. that's how knows fetch. it returns jquery object populated dom elements found. jquery object has methods on it. when call .click() on jquery object, iterates through matched dom elements it's holding, , performs expected operation. here's very simple example. var $ = function(selector) { return new jquery(selector); } function jquery(selector) { var elems = document.queryselectorall(selector); this.length = [].push.apply(this, elems); } jquery.prototype.click = function() { (var = 0; < this.length; i++) console.log(...

c# - Converting numbers as Facebook Like Counter -

this current code: public static string formatnumber(int64 num) { if (num >= 100000) return formatnumber(num / 1000) + "thousand"; if (num >= 10000) { return (num / 1000d).tostring("0.#") + "thousand"; } return num.tostring("#,0"); } question: i want convert numbers facebook's counter. examples: 190,000 => "190t" 244,555,232 => "190m 500t" 555,123,456,021 = "555b 123m" is there possible way facebook counter? here solution type of problem: object[][] list = { new object[] {"b", 1000000000}, new object[] {"m", 1000000}, new object[] {"t", 1000} }; long num = 123412456255; // here should number of facebook likes string return...

design patterns - Re-factoring Web API controllers using Interfaces and/or Dependency Injection -

i have bunch of web api controllers example: public class productscontroller : apicontroller { private readonly context db = new context(); public product getproductbyid(int id) { var product = db.products.firstordefault((p) => p.id == id); var category = db.category.firstordefault((p) => p.id == id); if (product == null) { throw new httpresponseexception(httpstatuscode.notfound); } if (category == somecategory) { throw new httpresponseexception(httpstatuscode.badrequest,new httperror( "custom message")); } if (itsrainingtoday == someotherspaghetticode) { throw new httpresponseexception(httpstatuscode.badrequest, new httperror("some other mess")); } //and on , forth return product; } } as can see, big ugly mess, ...

upload - Where are uploaded images stored in Magnolia CMS 5.0? -

i have created custom dialog in magnolia cms 5.0 upload images, in theory, dam repository. however, after upload pictures, cannot find stored. not in assets module fat have seen. does of have idea of can access upload in magnolia? in advance. have @ http://documentation.magnolia-cms.com/display/docs/basic+upload image ends binary node directly under node created dialog. might better solution create link field point dam , use dams own upload functionality become available once open selection of image dam. hth, jan

How can I trigger an ant task only if input is newer than output? -

i have build process in java need use ant exec task launch external program. external program create sources based on abstract specification, i.e. kind of code generation. how can exec task execute if input code generation newer output ? i.e. when input has been modified after output last created? use uptodate task set property , add if or unless property target contains exec task.

osx - setenv equivalent on mac? -

i want set environment variable using setenv: setenv node_env localhost but setenv gives me error saying command not found. know how perform mac osx equivalent of setenv? thanks! you want export node_env=localhost export node_env or on 1 line export node_env=localhost and has nothing osx per se , more bash vs (t)csh shell

How to process a string in a cell with MatLab -

'10004_1' '01:27:29' '27' 'uncertainty' '' '10004_2' '02:03:10' '3:29' 'neutral' '' '10004_3' '01:01:01' '5:31' 'neutral' '' '10004_4' '01:10:02' '1:16' 'neutral' '' i have above sample data , these "%%:%%:%%" format data needed processed in following way. i.e. 01:27:29 => (((1*60+27)*60)+29)*30 numeric value. i tried using cellfun, , function used in cellfun split string ':', , make calculation. maybe other ways. newbie matlab, no clue. in meantime, try function see if work. please feel free let me know thoughts or sample codes. appreciate this. text = '01:23:12'; nums = textscan(text, '%d:%d:...

Building ios corePlot with Xcode 5.0 using a Dependent project scenario -

Image
i new ios , writing ios 7.0 app uses coreplot (latest version 1.3). had "build active architecture" set yes - during development, did not run linking problem (i used static linking method described @ https://code.google.com/p/core-plot/wiki/usingcoreplotinapplications then built , deployed on device (iphone 4, ios 7). worked fine - dont remember if asked change build settings or not. today morning, when tried run same code on simulator started giving me linker error. after doing research, realized need set build active architecture no , rebuild core plot using "dependent project install" strategy. stuck @ point need set header files search path. compilation fails detect header file. coreplot in directory coreplot_1.3. the main linking error reads "ignoring file /users/rmenon/documents/developer/moneytrail/moneytrail/libcoreplot-cocoatouch.a, missing required architecture x86_64 in file /users/rmenon/documents/developer/moneytrail/moneytrail/libcorepl...

java - How to search millions of documents with an average of 8000 words each? -

i have odd problem , need on this. i have dataset of 6 million documents, composed of close 8000 words each. each word number , words/numbers separated whitespace. after indexing data (i'm indexing subset now) need perform queries list of numbers want documents have all numbers (the condition and). i came this: string [] codes_vec = array_with_500_strings_all_numbers; boolquerybuilder qbuilder = querybuilders.boolquery(); (int =0; < codes_vec.length; ++i) { qbuilder = qbuilder.must(querybuilders.matchquery("code", codes_vec[i])); } the problem is, seems inefficient, how can speed search ? there better way of querying elasticsearch faster in case ? kind regards, zé maria using filter faster match query. here's documentation on boolean filters: http://www.elasticsearch.org/guide/reference/query-dsl/bool-filter/ here's how create , use one: // create filter // cache results, add .cache(true); boolfilterbuilder filterbuilder = ...

c# - Storing different user permissions in databse with customizations -

Image
in custom user permissions, have like: userid permission 11100001 viewthis 11100001 viewthat 11100002 editthis 11100003 editthat now, want viewthis more customized, example target specific cost center, user can view employees cost center(s). added column costcenter . if it's null means user can view cost centers. problem other permissions, example viewthat needs customized well, problem customization or limitation not target cost center, target other factors, example contract type. users permission viewthat should limited employees contract type. added column contracttypeid . column should ignored in permissions field not required. permission requires 2 or more of customization/limitation fields. the problem now, table growing horizontally whenever need add customization/limitation permission. there better way or best practice in dealing such dilemma? there way normalize out in data model. let me show example: tabl...

verilog - what is this error "invalid module item" in verliog? -

i have defined 2 modules, datapath , ctrl. then define module in same file instantiates both datapath , ctrl module mult(input reset, input [3:0] i0,i1, output o); wire [3:0] cnt, sh; wire load, go,ld1 datapath d0(i0,i1,cnt,sh,load,go,o); ctrl c0(reset, clk,sh,cnt,ld1,load,go); endmodule but verilog complains "invalid module item" on line "datapath d0...", why? you missing semi-colon on previous line.

ruby on rails - Display Acts_as_taggable Tags seperatly -

i'm trying display each tag question has in span. use acts_as_taggable_on . i managed below code working, it's tag cloud. meaning tags displayed. <% tag_cloud question.tag_counts, %w[s m l] |tag, css_class| %> <span class="label label-default"> <%= link_to tag.name, tag_path(tag.name), class: "css_class" %> </span> <% end %> to retrieve tags: question.tag_list can me refactor code current tags on question shown ? question.tag_list return string, , can not loop through it. question.tags return array, <% question.tags.each |tag| %> <span class="label label-default"> <%= link_to tag.name, tag_path(tag.name), class: "css_class" %> </span> <% end %>

iphone - iOS7 - View under status bar - edgesForExtendedLayout not working -

i have project built last year, , uses xibs, no storyboards. xibs not use auto layout, use autosizing. have issue when running ios7, in views tucked under status bar. understand new feature ios7, in can expected. however, of solutions fixing not not working. have image @ top of view shows under status-bar, , i'm not using nav-bars or that. i have tried updating y-deltas in xib (they have no effect on view), have tried setting edgesforextendedlayout uirectedgenone (does nothing), , multitude of other things. every time, status bar shows view tucked under it, no matter do.. unless manually move down view in xib allow room status bar (but solution doesn't work because doesn't right in ios6, of course). what's odd when try line of code hack in view-shift, doesn't work (like following): self.view.frame = cgrectmake(self.view.frame.origin.x, self.view.frame.origin.y+20, self.view.frame.size.width, self.view.frame.size.height); ..not go kind of solution...

internet explorer - Twitter Bootstrap Carousel IE All versions weird space at top of carosel -

i used twitter bootstrap basic carousel template on website: http://www.btwodesign.net/files/fusion/index.html you notice on ff, chrome , safari, appears correct. on versions of ie there 100px's or of space added top of slider behind nav. nav still there background color of added space white (same nav) looks disappears. thank you, alex just thought take crack @ it. don't have great solution have come far. ( tried on ie 10 ) .navbar-header { position: absolute; left: 20.5%; } .navbar-nav { position: absolute; left: 53.15%; } .carousel { margin-top: -40px; } i apply these changes if detect ie. once got point realized the carousel buttons use change pictures don't work in ie 10.. believe case before apply these changes. ran out of time can figure out how address that.

javascript - Requirejs ignore loading error for optional dependency -

this question has answer here: requirejs optional dependency 3 answers i'm using require.js , load library handles tracking. however, have users block loading. since not critical part of app, still work, when tracking library fails load. i've looked @ documentation handling errors via errbacks, config fallbacks, , global onerror function. i thinking of like: requirejs.onerror = function (err) { var modules = err.requiremodules; (var = 0; < modules.length; i++) { if (modules[i] == 'tracking-lib') { // great if define('modules[i]', [], null) } } }; similar questions (that don't solve problem): requirejs optional dependency null dependencies in requirejs when ajax returns 404 i have created little require plugin ( code in github ) can lazy-load amd modules, e.g. th...

javascript - IE8 not recognizing <span class="ui-button-text">? -

i working on mapping application. following code block works great in ie10, chrome, etc., not ie8. button activates aerial layer, changes text of button "street" (allows use of new overlays button @ point), , toggles if hit "street" button. btnstreetaerial_click = function () { var isabovethreshold = (map.getscale() > 18055); if ($("#btnstreetaerial").html() == '<span class="ui-button-text">aerial</span>') { //switch aerial if (isabovethreshold) { map.getlayer(mapesriaeriallayerid).show(); } else { map.getlayer(maplocalaeriallayerid).show(); } map.getlayer(swova.mapstreetid).hide(); $("#btnaerialoverlay").show(); $("#btnstreetaerial").html('<span class="ui-button-text">street</span>'); } else if ($("#btnstreetaerial").html() == '<span class="ui-button-text">street</span>') { ...

sql server - create a dummy column and populate with select -

i need use select query create dummy column , pad constant value. found partial answer question in related post, here answer: select name, address, 'no' vacationing, zipcode mytable; my question do if want pad number, such as: '9999' vacationing - error that also, if want cell empty, such as; '' vacationing - error here also tia '9999' vacationing valid. you must using union different column type - hence error.