Posts

Showing posts from January, 2014

includeJsFiles not working in fluid ViewHelper in TYPO3 -

i need add custom js file in backend module of typo3 v7.6 extension.i added following code in layout <f:be.container includejsfiles="{0:'{f:uri.resource(path:\'js/main.js\')}'}"> <!------------ contents ------------> </f:be.container> no error js file not included in page source.any other method there implement requirement? i assume path js-file wrong. declaration expected ext:your_extension/resources/public/js/main.js in extension (as statet in core sources). when in doubt try other pathes. (full references)

php - I have a website which contains textbox, the data entered in the text box should be imported to database -

i have created database named idea , table named user_tndrequest , connection part done, have done following coding part, when enter text in text box, output after clicking on submit button results in error, please me this. <?php require_once('auth.php'); ?> <html> <h2 align="center"> tnd request </h2> <h3 align="center"> <form method="post" action="database2.php"> <p><textarea name="inputtxt" cols=40 rows=8></textarea></p> <input type="submit" value="submit" /> <p align="center"><a href="index.php">logout</a></p> </form> </h3> </body > code database2: <?php define('db_name','idea'); define('db_user','root'); define('db_password',''); defi

x ray - x-ray.js grabbing class attributes and returning it -

i using x-ray scraping tool scrape fun sites seem can't figure out how can grab class attributes. also, guys know cheatsheet module? you can select classes using class dot '.' notation. x-ray simple understand if spend time reading thru javascript files contained there in. github site provide handy guide on web scraping using x-ray. simply google "x-ray web scraping tutorial". hope answer helps out. let me know if need detailed explanations and/or links. cheers, sylvery

angularjs - <md-list-item> in angular material js ng-repeat -

i'm new angular. have issue. have code this: <md-list-item ng-repeat="c_comments in card_comments|filter:{ parent_id:'0' }"> <img src=""></img> <md-list-item ng-repeat="c_comments in card_comments|filter:{ parent_id:'1' }"> <img src=""></img> <md-list-item ng-repeat="c_comments in card_comments|filter:{ parent_id:'2' }"> <img src=""></img> <md-list-item ng-repeat="c_comments in card_comments|filter:{ parent_id:'3' }"> <img src=""></img> </md-list-item> </md-list-item> </md-list-item> </md-list-item> here parent_id infinity ( 0,1,2,3,4,.....). how write code in ng-repeat?

android - JSON Conversion Exception to java object -

i facing json conversion exception. while converting json java object. here json [ { "prefrenceid":"228f176d-d224-32d7-9bb5-6287a06a68e8", "userid":"327e6c64-bc90-3ae8-8f7d-72837581ca13", "questionnaireid":"41f31b11-47f5-3e29-8c88-1a3615c978a7", "suggestions":"", "explanation":"", "isactive":true, "isdelete":false, "datecreated":"2016-11-01 09:53:00.000", "dateupdated":"2016-11-01 09:53:17.000" }, { "prefrenceid":"52a74739-bdd3-33ac-a83f-72f60b1992b5", "userid":"327e6c64-bc90-3ae8-8f7d-72837581ca13", "questionnaireid":"8cd5ac8e-89db-3d7b-bb2d-4e6735b245de", "suggestions":"", "explanation":"", "isactive":true,

ios - App not asking for permission to access location, popup stays in background -

i'm using mapkit in swift ios app. thing i'm requesting permission access user location when app in use, first time run app in iphone, stays frozen in splash screen, because permission request don't popup, then, if press home button, popup appears ask permission. , if accept then, next run app works properly, shouldn't work this. in code, debugger crashes here because cannot permission: let initiallocation:cllocation = cllocation(latitude: (locationmanager.location?.coordinate.latitude)!, longitude: (locationmanager.location?.coordinate.longitude)!) indicating next issue: thread 1: exc_breakpoint (code=1, subcode=0x1000b5d00) so, i'm asking permissions in viewwillappear method: let locationmanager = cllocationmanager() // ask authorisation user. // locationmanager.requestalwaysauthorization() // use in foreground locationmanager.requestwheninuseauthorization() //locationmanager.requestalwaysauthorization() if cllocationmanager.

How to add an existing java project as a module to an existing Android Studio project -

i have 2 github repositories - 1 android studio project , intellij idea java project. right build jar java project , use jar in android studio project. there way can add existing java project sub-module in existing android studio project not have go through hassle of creating new jar every time modify java project?

mysql - Create a function to split delimited string into a table -

Image
in order split delimited string, need creation of function returning table , taking comma separated string parameter. for instance, have @ input table: using function, result be: in case, delimited string person column should taken parameter. thanks in advance. try query //which work when having 3 comma select id,substring_index(substring_index(`person`, ',', 1), ',', -1) person `table` union select id,substring_index(substring_index(`person`, ',', 2), ',', -1) person `table` union select id,substring_index(substring_index(`person`, ',', 3), ',', -1) person `table` order id asc

ios - Cache Images and load on scroll in UICollectionView with SDWebImageDownloader Xamarin -

i have uicollectionview cells images downloaded url along headers. below :- internal void updatecell(profilevalues mdata) { var murl = "someurl"; var manager = sdwebimagemanager.sharedmanager; manager.imagecache.maxcacheage = 86400; sdwebimagedownloader mdownloader = manager.imagedownloader; var authtoken = "sometoken""; mdownloader.sethttpheadervalue(authtoken, "authorization"); mdownloader.sethttpheadervalue("application/json; odata=verbose", "accept"); mdownloader.sethttpheadervalue("f", "x-forms_based_auth_accepted"); try { mdownloader.downloadimage( url: new nsurl(murl), options: sdwebimagedownloaderoptions.progressivedownload, progressblock: (receivedsize, expectedsize) => { // track progress.

c# - Creating a connection between EmguCV and my projected gameboard -

i trying create interactive boardgame in unity, using hand gestures activate mechanics. game projected on table camera attached next it, used capture motion. the game consists of 2 grids, 1 30x30 hidden tile grid, map grid on top of it. my question then: smartest way go around synchronizing camera hidden tile grid, can see if detected blob emgucv on top of set tile? i've considered: creating tilemap camera, , check if tile number in both tilemaps equal eachother. check if tile center position close blob center position, using unitys method vector2.distance

javascript - BirchScheduler doesn't work properly -

i have wp website on local , on hosting. there installed birchpress scheduler . on local works , no erros. when using on hosting shows errors , scheduler doesn't work. there errors errors screenshot and there part of code (function($) { var params = birchschedule_view_admincommon; //here eror uncaught referenceerror: birchschedule_view not defined and errors ideas?

bash - How to compare two columns from two different files, and add columns from file2 to file1 for multiple consecutive columns -

relatively new coding , using awk, apologise if silly question! need compare $3 in file 1 $3 in file 2, , if match, print line file 1 with corresponding line entry $10 in file 2. have command this, awk 'nr==fnr{a[$3]=$10; next} a[$3] {print $0 "\t" a[$3]}' file2 file1 however, file2 has columns $10-$647, , need above 637 columns. there way loop this? example file 1: 1 715348 rs3131984 t g 100 pass ac=5008;af=1;an=5008;ns=2504;dp=16986;eas_af=1;amr_af=1;afr_af=1;eur_af=1;sas_af=1;aa=.|||;vt=snp gt 1|1 1|1 1|1 1 723798 rs34882115 cag c 100 pass ac=4012;af=0.801118;an=5008;ns=2504;dp=24752;eas_af=0.7946;amr_af=0.8775;afr_af=0.5416;eur_af=0.9602;sas_af=0.9407;vt=indel gt 1|1 1|1 1|1 1 723891 rs2977670 g c 100 pass ac=3906;af=0.779952;an=5008;ns=2504;dp=22718;eas_af=0.7917;amr_af=0.8689;afr_af=0.4849;eur_af=0.9483;sas_af=0.9305;aa=.|||;vt=snp gt 1|1 1|1 1|1 1 729679 rs4951859 c g 100 pass ac=3205;af=0.639976;a

R function with variable args depending on presence/absence of other args -

i've stumbled upon varargs issue in r 2 or 3 times, seems problem have little bit trickier expected. here is i have function, variables, introduce variable, kind of flag, selects way function working , parameters needed function itself: namely number , type of inputs depends on (flag) input. ok, example better: example = function(x,flag=1,y){ if (flag) return(x) else return(y) } and working fine. point in example need specify both x , y every time. instead function taking only x if flag=1 , only y if flag=0. (in stupid example 2 distinct functions, in actual case have other (common) arguments on calculations both 'parts' of functions need). i know 1 may specify whatever value unused argument , result wouldn't change, want function readable user, , cumbersome need specify argument won't used function thank help what following. example = function(x,flag=1,y){ if (flag && !missing(x)) return(x) else if(!flag &&

foreach - PHP Only print to table if is not specified value -

i have code populating table using data database query , for-each loop. have status column, can 1 of 4 values - processed, rejected, requested or cancelled. what need find out how can make table not include value if set processed? ( $stat[status]] ) any advice on should use working appreciated. print "<table class='table table-bordered table-striped datatable' style='font-size:0.7em;'>"; print "<thead>"; print "<tr>"; print "<th>id</th>"; print "<th>status</th>"; print "<th>title</th>"; print "<th>first name</th>"; print "<th>last name</th>"; print "<th>position</th>"; print "</tr>"; print "</thead>"; print "<tbody>"; foreach($data $stat) { print "<tr>";

functional testing - Importing a test suite into another project in soapUI -

i working on evaluation automation scenario in create test suite on 1 project-1 in soapui , import other projects (project2,project3) same test cases applicable. i exported test suite , imported in new project.but problem is,after importing project2 , updating test suite new request, still process request in test case of test suite having end point url of project-1.how can rectified , please point me source or documentation of how import , export test suites. exporting test suite contains: 1.testcase under are: 1.property file 2.property transfer 3.process(of project-1) soapui version-5.2.1 thanks in advance.

python - How to properly fetch single cells in pandas: loc[index,column] VS get_value(index,column) -

which method better (in terms of performance , reliability) use in order fetch single cells pandas dataframe : get_value() or loc[]? you can find info in docs in end: for getting value explicitly (equiv deprecated df.get_value('a','a')) # equivalent ``df1.at['a','a']`` in [55]: df1.loc['a', 'a'] out[55]: 0.13200317033032932 but if use there no warning. but if check index.get_value : fast lookup of value 1-dimensional ndarray. only use if know you’re doing so think better use iat , at , loc , ix . timings : df = pd.dataframe({'a':[1,2,3], 'b':[4,5,6], 'c':[7,8,9], 'd':[1,3,5], 'e':[5,3,6], 'f':[7,4,3]}) print (df) in [93]: %timeit (df.loc[0, 'a']) slowest run took 6.40 times longer fastest. mean intermediate result being cached. 10000 loops, best of 3:

Beautify cannot indent my HTML after PHP in Brackets -

Image
i know beautify cannot indent php. want skips it, because strange spaces after php code inside page. here's screenshot : i have been trying lot of plugins, looking around hour, i'm getting mad ! anyone may ? :) <!doctype html> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="style.css"> <title>microcms - home</title> </head> <body> <header> <h1>microcms</h1> </header> <?php foreach ($articles $article) : ?> <article> <h2><?php echo $article['art_title']; ?></h2> <p> <?php echo $article['art_content']; ?> </p> </article> <?php endforeach; ?> <footer> <a href="http://www.test.fr/">mircrocms</a> student

How can the Azure Active Directory Authentication Sevice be forced to reissue an id_token with updated claims? -

we using azure b2c authenticate our users working fine. after signup add custom claims our users defined in b2c portal "user attributes" using graph api. when log portal can see these values have been set our calls, have standard claims values(i.e. set display name concatening givenname , lastname values). the issue having after these values set, not appear in token retrieved sending access token authenticate endpoints until user logged out , in again (which pretty awful user experience after signup). looks original id_token cached when user created , being returned instead. this doesnt make sense, seems sensible let user update profile (claims values) while logged application , changes take affect without needing re-authenticate? could explain how/if possible force cached id_token on server expire when request id_token using access token, id_token contains up-to-date claims values? the issue having after these values set, not appear in token retriev

scala - how to create different builds using sbt based on environment? -

i using sbt scala project, want create build different environment local, development, stage , production. these build have different property file, log4j file , token files. handle need different folders files under src/main/resources local, dev, stage , prod. based on build environment should pick files respective folders. can guide me using sbt. instead of create different files use environment variables inside https://github.com/typesafehub/config , instance: akka { loglevel = "debug" loglevel = ${?loglevel} } if loglevel not set "debug" default config. anyway, if want include different files making jars can use different configuration sbt-assembly plugging.

javascript - Node.js and Heroku, how to insert a second query? -

i working node.js , heroku; , have question following code, found online: app.get('/db', function (request, response) { pg.connect(process.env.database_url, function(err, client, done) { client.query('select * test_table', function(err, result) { done(); if (err) { console.error(err); response.send("error " + err); } else { response.render('pages/db', {results: result.rows} ); } }); }); }); this lists contents of test_table table, want perform following query: *"insert test_table (fieldone, fieldtwo) values (max(fieldone)+1, max(fieldtwo) 2)" how can integrate in code above? here tried, no success: app.get('/db', function (request, response) { pg.connect(process.env.database_url, function(err, client, done) { client.query('select * test_table', function(err, result) { done(); if (err) { console.error(err); response.send("error " + er

javascript - Implement unlimited frequency in rating-widget.com -

the rating-widget documentation writes unlimited user rating frequency of star rating system. i'm not sure how add main function code. where can add line frequency=unlimited . should easy. i'm js rookie. (function(d, t, e, m){ window.rw_async_init = function(){ rw.init({ huid: "336233", uid: "2e7de74f3aeb426c10a2087ead09259c", source: "website", options: { "size": "medium", "style": "oxygen", "isdummy": false } }); rw.render(); }; // append rating-widget javascript library. var rw, s = d.getelementsbytagname(e)[0], id = "rw-js", l = d.location, ck = "y" + t.getfullyear() + "m" + t.getmonth() + "d" + t.getdate(), p = l.protocol, f = ((l.search.indexof("dbg=") >

nuget - MSBuild: How to add library reference in Visual studio project without build number? -

i faced error, when trying add nuget library reference visual studio project. in visual studio project reference specified like: <reference include="mylibrary, version=6.5.4.7, culture=neutral, publickeytoken=7fb9232453a58fc74, processorarchitecture=msil"> <specificversion>false</specificversion> <hintpath>..\..\packages\mylibrary\mylibrary.dll</hintpath> </reference> but, specify mylibrary reference despite build number (last digit), e.g. version=6.5.4.* me, not work, , looking solution. it case reference specified build number, fails when nuget package updated build agent higher build version. remove mylibrary nuget package remove mylibrary dll reference re-add mylibrary nuget package , let nuget manage mylibrary dll reference on.

html - Css for multiple class -

i'd know if it's possible use css multiple class same name 1 exception iterator inside : <div class="elem-1"></div> <div class="elem-2"></div> if it's possible, how should use css implement 2 classes (can lot more 2)? you use css attribute selectors this: [class^="elem-"], [class*=" elem-"] { /* style properties */ } but rather suggest use 2 classes this <div class="elem specialstuffclass">...</div> another option might use counting selectors nth-child.

c# - JSONConvert DeserializeObject with nested array -

i have model contains , array of different object type. parent object deserializes fine nested array fails. here objects: public class venueroomviewmodel { public string name { get; set; } public decimal hourcost { get; set; } public decimal daycost { get; set; } public int maxdelegate { get; set; } public string specialnotes { get; set; } public string status { get; set; } [jsonproperty("associatedfacilities")] public list<facilityviewmodel> associatedfacilities { get; set; } } public class facilityviewmodel { public string facilityname { get; set; } public int facilityno { get; set; } public string facilitystatus { get; set; } } i try , parse json this: venueroomviewmodel myvm = sonconvert.deserializeobject<venueroomviewmodel>(jsonmodel); and here copy of json trying parse: "{\"state\":1,\"no\":\"0\",\"name\":\"test\",\"hourcost\":\"12\",\"dayc

c++ - How to verify memory usage -

i'd implement c++ function (using win32 api) current memory usage of process. i checked code post how determine cpu , memory consumption inside process? , implemented function. bool getmemoryusage( size_t& usageinbytes ) { process_memory_counters_ex pmc; if ( getprocessmemoryinfo(getcurrentprocess(), (process_memory_counters*) &pmc, sizeof(pmc)) ) { usageinbytes = pmc.workingsetsize; return true; } else { return false; } } however, when try test that: size_t initialmemoryusage = 0; getmemoryusage( initialmemoryusage ); size_t use = 596; void* memused = malloc( use ); size_t memoryusage = 0; getmemoryusage( memoryusage ); assert( memoryusage == initialmemoryusage + 596 ); free( memused ); getmemoryusage( memoryusage ); assert( memoryusage == initialmemoryusage ); it fails: if getmemoryusage uses pmc.workingsetsize , memoryusage greater initialmemoryusage 12288 , freeing memory not make decrease if

asp.net mvc - Apply filters to a table based on conditions using LINQ and MVC C# -

i trying create list of records (partners) based on several list of conditions. problem sql generated linq selecting partners respect @ least 1 of conditions, , want partners respect conditions have applied (serviceid or/and brandid and/or traillerservice). models (simplified): public class partner { [key] public int id { get; set; } public string name { get; set; } public virtual icollection<partnerservicebrand> partnerservicebrands { get; set; } } // partner can have multiple services, brands , in each case, can have, or not have trailler service public class partnerservicebrand { [key] public int id { get; set; } public virtual partner partner { get; set; } public virtual service service { get; set; } public virtual brand brand { get; set; } public bool trailerservice { get; set; } } public class service { [key] public int id { get; set; } public string name { get; set; } public virtual icollection<partner

awk - Average of a given number of rows -

i want average of number of rows, in case number dictated second column -1 1 22.776109913596883 0.19607208141710716 -1 1 4.2985901827923954 1.0388892840309705 -1 1 4.642271812306717 0.96197712195674756 -1 2 2.8032298255711794 1.5930763994471333 -1 2 2.9358628368936479 1.5211062387604053 -1 2 4.9987168801017106 0.8933811184867273 1 4 2.6211673161014915 1.7037291934441456 1 4 4.483831056393683 0.99596956735821618 1 4 9.7189442154485732 0.4594901646050486 the expected output -1 1 0.732313 -1 2 1.33585 1 4 1.05306 i have done awk '{sum+=$4} (nr%3)==0 {print $2,$3,sum/3;sum=0;}' test which works, (somehow) generalize (nr%3)==0 in way awk realizes value of second column has changed , therefore means it's new average needs calculate. instance, first 3 rows have 1 value in second column, once 1 changes 2 means it's new average needs calculated. does make sense? try like: awk '{sum[$2] += $4; count[$2] += 1; } end { (k in sum) { prin

scala - Override trait's generic method without casting -

i planning have trait "value" attribute can extended multiple classes. need able compare different instances of trait between each other. firstly want check value defined on trait - if thats same across 2 instances, want trigger child-specific method compare 2 child instances of same type each other. i hope explained enough... i have below code written, childone class doesnt compile - error getting: class childone needs abstract, since method childcheck in trait parenttype of type (other: childone.this.t)boolean not defined (note parenttype.this.t not match com.cards.childone) trait parenttype { val value: int type t <: parenttype def parentcheck(other: t): boolean = { if (this.value == other.value) childcheck(other) else this.value > other.value } def childcheck(other: t): boolean } case class childone(name: string) extends parenttype { val value = 1 override def childcheck(other: childone): boolean = { true //some cust

nagios - Disabling notifications for a host in Check_MK -

i'm losing mind trying disable notifications specific host in check_mk. example, want host monitored - show on network topology , able see problems on host via check_mk views, don't want server send me e-mail every time host disconnected , such things. am missing simple or there roundabout way of doing this? do these: search host name on main check_mk ui click on hammer icon on top (located under page title "services of host "). the ui comes self-explanatory. can either schedule down time hosts (checks disabled) or can disable notifications selected or of services on host. hope helps.

C# force integer when converting XML to JSON -

i attempting convert xml json in order generate http post request api. getting error because 1 of fields meant integer instead of string. have read adding "json:integer="true"" node cause become int, doesnt seem working me. here xml , resulting json. arrays working, integer not. <shipments json:array="true" xmlns:json="http://james.newtonking.com/projects/json"> <shipment_tracking_number /> <response_shipment_date>2016-10-18t01:00:00.0000000-04:00</response_shipment_date> <response_shipment_method>ups ground</response_shipment_method> <expected_delivery_date>2016-10-18t01:00:00.0000000-04:00</expected_delivery_date> <ship_from_zip_code>12345</ship_from_zip_code> <carrier_pick_up_date>2016-10-18t01:00:00.0000000-04:00</carrier_pick_up_date> <carrier>ups</carrier> <shipment_items json:array="true"> <sh

android - Assign positive and negative button a dialogfragment with custom view and buttons -

Image
i using dialog fragment custom view. has tick mark below. want assign tick "postive button". setpositivebutton takes string in common way. builder.setpositivebutton("ok", new dialoginterface.onclicklistener() { public void onclick(dialoginterface dialog, int whichbutton) { getdialog().dismiss(); } } );

SQL SERVER: where clause doesn't work in some way -

Image
hi have question regarding sql server where filter clause. select person region not '%france%' , region not '%america%' , country not '%france%' , country not '%america%' or region null or country null by using code, displays joh/lily/hu. how can result appears results not contain words 'france' , 'america'? the result should lily/hu. many in advance. from 1 of comments: i don't want display containing "france" in either region or country column, displays null rows. select person ( (country not '%france%' , country not '%america%') or country null ) , ( (region not '%france%' , region not '%america%') or region null )

asp.net - How to directly Pass Gridview row cell value in UID and Article without using textbox -

if (ispostback) { gridviewrow grdrow = (gridviewrow)((linkbutton)sender).namingcontainer; //iframe1.attributes.add("src", "drawing.aspx?uid=" + grdrow.cells[0].text + "&article=" + grdrow.cells[1].text + "&testdrawing= kkk"); //iframe1.attributes.add("src", "drawing2.aspx?uid=" + grdrow.cells[0].text + "&article=" + grdrow.cells[1].text); //iframe1.attributes.add("src", "drawing2.aspx?uid=" + textbox1.text + "&article=" + textbox2.text); iframe1.attributes.add("src", "drawing2.aspx?uid=" + textbox1.text + "&article=" + textbox2.text + "&testdrawing= kkk"); //iframe1.attributes.add("src", "drawing2.aspx?uid=" + grdrow.cells[0].text + "&article=" + grdrow.cells[1].text) + "&testdrawing= kkk"); textbox1.text = grdrow.cells[0].text; textbox2.tex

ios - How to make 30 minute time intervals in swift 2.3 -

starttime = 10:00 endtime = 01:00 pm now want split time in interval of 30mins like 10:00 10:30 11:00 11:30 .......... till 01:00 pm. i tried like let startdate : nsdate! = nsdate() let time1 : nsdate = startdate.datebyaddingtimeinterval((60*60)/2) let time2 : nsdate = time1.datebyaddingtimeinterval((60*60)/2) let time3 : nsdate = time2.datebyaddingtimeinterval((60*60)/2) let time4 : nsdate = time3.datebyaddingtimeinterval((60*60)/2) func maketimeinterval(starttime:string ,endtime:string) -> string { let timeformat = dateformatter() timeformat.dateformat = "hh:mm a" var fromtime:nsdate = (timeformat.date(from:starttime) nsdate?)! let totime:nsdate = (timeformat.date(from:endtime) nsdate?)! var datebyaddingthirtyminute : nsdate! let timeinterval : timeinterval = totime.timeintervalsince(fromtime date) let numberofintervals : double = timeinter

android - How to change the particular row colour of listview -

i have listview of notification ,i want if user click on notification(particular row) color should change. changing color means notification read. changed color should reflect if app restarts. for have write code in class extending array adapter. @override public view getview(int position, view v, viewgroup parent) { view mview = v ; if(mview == null){ layoutinflater vi = (layoutinflater)mcontext.getsystemservice(context.layout_inflater_service); mview = vi.inflate(id, null); } listview=(listview)mview.findviewbyid(r.id.notiid); string sd= yorn.get(position); if(sd=="y"){ listview.getchildat(position).setbackgroundcolor(color.green); } i have used debugger , getting condition in if loop true, problem not getting changed color lisview. debugger not moving in if loop. any ideas? you should using recyclerview instead of listview start off with. in adapter recyclerview check position in onbindviewholder , s

java - How to make the following code in alfresco work properly? -

i have created class name createuserhandler in alfresco in order generate username , random password email address. getting exception in this..please me this... public class createuserhandler { private static logger logger = loggerfactory.getlogger(createuserhandler.class); private nodeservice nodeservice = getserviceregistry().getnodeservice(); private personservice personservice = getserviceregistry() .getpersonservice(); private actionservice actionservice = getserviceregistry() .getactionservice(); private searchservice searchservice = getserviceregistry() .getsearchservice(); private policycomponent eventmanager; private serviceregistry serviceregistry; //private string username; public void setserviceregistry(serviceregistry serviceregistry) { this.serviceregistry = serviceregistry; } private serviceregistry getserviceregistry() {

unity3d - Unity 2D - Why can not the enemy made? -

i making running game, face big problem. in stage, obstacles created. after time, unity didn't make new obstacle. why happen? public class gamemanager : monobehaviour { public float waitingtime = 1.5f; public static gamemanager manager; public bool ready = true; public gameobject cactus; float time = 0; // use initialization void start () { manager = this; } // update called once per frame void update () { time += time.deltatime; //debug.log(time); if(time>2f && ready==true) { ready = false; time = 0; invokerepeating("makecactus", 1f, waitingtime); } } void makecactus() { instantiate(cactus); } public void gameover() { //cancelinvoke("makecactus"); itween.shakeposition(camera.main.gameobject, itween.hash("x", 0.2, "y", 0.2, "time", 0.5f)); }

qt creator - QtCreator: An issue with the issues tab -

i working on rather large code base, created several sessions sort little bit. in sessions 1 "issues" tab works designed , fine. only in 1 session not work , no compiler errors or warnings make issues tab. my colleagues have no idea, google , stackoverflow give no real answer (yet), have ask. i using qtcreator 4.1.0 under ubuntu 14.04 , cmake version 3.7.0-rc2 , , clang++ says: ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/release_350/final) (based on llvm 3.5.0) any ideas??

python - How do I allow a user to input vectors rather than strings? -

i'm trying make program allow user input vectors of form (x,y,z) using python's built in input() function. if entered in python out using input() function indexes each vector separately. example, >>> z = (1,2,3), (4,5,6), (7,8,9) >>> z[1] (4, 5, 6) but when try use input function run following problem. >>> z = input('what vectors? ') vectors? (1,2,3), (4,5,6), (7,8,9) >>> z[1] '1' why using input function turn string , there way around this? thanks in python 3, input returns string. need convert string. type of input recommend using liter_eval module ast : import ast vectors = ast.literal_eval('(1,2,3), (4,5,6), (7,8,9)') vectors[1] #(4, 5, 6)

ios - inApp purchase, dowload free products -

i implementing inapp features download hosted content feature. products free unlimited time. each product have 1 download associated , audio file. is possible start download without user see dialog buy free product. first user must give apple id password, see dialog buy free product , dialog product succesfully purchased.than download can requested. since products free can somehow download reuested without user see confiramtion dialogs , messages , start download imedietly. if item purchased/downloaded user see message buy free item again. know restore functionalities, need track downloaded items , in case start download restore state. thanks! 1) yes, can download without dialogs. product detail using store kit, , if product price free (0), download item without processing purchase request storekit. code request product detail: kproductsrequest *productsrequest = [[skproductsrequest alloc] initwithproductidentifiers: [nsset setwitharray:productidentifiers]]; /

css - Table-cell doesn't fit its content -

i have table css , structure: table, td { border: 3px solid #208000; border-collapse: collapse; font-size: 75%; } .headingtable { text-align: center; padding: 1%; } @media screen , (min-width: 768px) { table, td { border: 3px solid #208000; font-size: 100%; } .headingtable { font-size: 100%; } } @media screen , (min-width: 1200px){ table, td { border: 5px solid #208000; } .headingtable { font-size: 125%; } } <table> <caption>table caption</caption> <thead> <tr> <td class = "headingtable">first</td> <td class = "headingtable">second</td> <td class = "headingtable">third</td> <td class = "headingtable">fourth</td> <td class = "headingtable">fifth</td> </tr> </thead>

java - How to update TreeTableView data? -

i writing app measures time spent on tasks. have tabletreeview contains details of project , tasks. this how looks: tabletreeviewimage what want make duration`s column updating values when task running. project duration should updated. this model: public abstract class simpletask{ abstract duration getduration(); } public class task extends simpletask{ duration duration; @override public duration getduration(){ return duration; } public start(){ //update duration value every second; } } public class project extends simpletask{ list<task> tasks; @override public duration getduration(){ return tasks.stream() .map(task::getduration) .reduce(duration.zero,duration::plus); } i have tried bind duration column method getduration() tabletreeview needs refreshed update values in column. durat.setcellvaluefactory(new callback<treetablecolumn.celldatafeatures<

php - Hiding .DS_store from scandir() -

i having problems little script outputs file particular directory table output annoying .ds_store file running app on mac. here script put - have tried various methods either stop script working altogether or has no effect. <?php echo '<table>'; $dir = 'archive/'; $files = scandir($dir, 0); for($i = 2; $i < count($files); $i++) echo '<tr> <td>' . $files[$i]. '</td> <td><a href="' . $files[$i]. '" download><button>download</button></a> <a href=""></a></td> </tr>'; echo '</table>'; ?> you may want ignore files begin '.' ._whatever : these files created on volumes don't natively support hfs. .trash : used store files thrown in trash haven't yet been deleted. .spotlight-v100 : stores metadata indexes , indexing rules spotlight. <?php ech

Unable to locate a particular element in selenium python -

website url using selenium-python not able locate particular element in website. looking webscrape info { data- coordinates } it. couldn't locate element , take info it. please kindly share thoughts on issue here. screenshot of html code , element . in advance tried code : - fill=driver.find_element_by_xpath("//div[contains(@class,'inner fill')]") latlong=fill.find_element_by_xpath("//div[contains(@class,'map.space-map.leaflet-container')]") latlong.find_attribute["data-coordinates"] result :- message: unable locate element: {"method":"xpath","selector":"//div[contains(@class,'map.space-map.leaflet-container')]"} if can add 2 cents: you can of selenium + beautifulsoup( https://www.crummy.com/software/beautifulsoup/bs4/doc/ ) (do : pip install beautifulsoup)than run below code: from selenium import webdriver bs4 import beautifulsoup driver = webdriver.chrome() ur

Gradle Maven like multi module project -

when define multi module project in maven, have 1 root project , modules. when build root project, maven transitivelly builds modules in correct order. far pretty similar gradle. but maven, can clone 1 submodule repository , build locally without need download whole project structure. because define dependencies on other modules within same project other external dependency , downloaded , cached local repository (nexus). with gradle, define cross module dependencies compile project(':other') . need clone whole project structure repository in order resolve , build correctly. there way use gradle multi module project support, without having locally clone whole project structure? i argue maven's multi-module support slapped on after-thought. unlike gradle, project dependency not first class concept. instead maven "reactor" substitutes local artifacts dependencies when gav (group/artifact/version) matches. if you'd use same approach in gradle ca

I am trying to automate the installation of HortonWorks using Ansible but facing errors -

i begginer ansible, when installing ambari server getting below errors. though machine has got installed python, postgress, openssl. still getting same errors. task [ambari-server : install ambari-server] *********************************** fatal: [servername]: failed! => {"changed": true, "failed": true, "msg": "repository hdp-2.5.0.0 listed more once in configuration\nrepository hdp-utils-1.1.0.21 listed more once in configuration\nrepository updates-ambari-2.4.1.0 listed more once in configuration\nerror: missing dependency: openssl needed package ambari-server-2.4.1.0-22.x86_64 (updates-ambari-2.4.1.0)\nerror: missing dependency: /bin/sh needed package ambari-server-2.4.1.0-22.x86_64 (updates-ambari-2.4.1.0)\nerror: missing dependency: python >= 2.6 needed package ambari-server-2.4.1.0-22.x86_64 tasks of install ambari-server name: add ambari repo get_url: url="{{ ambari_repo_url }}" dest=/etc/yum.repos.d/ambari.repo

php - trouble displaying mysqli database results in correct order -

i have table in database stores events , date expire. want display events on website display current events first expired events after? i have tried following sql $sql = "select noticeid, notice, noticedesc, noticeimg, noticedate, expirydate tbl_notices group noticeid ,expired order expirydate asc"; but returns expired results first due expirydate being ordered asc in query. my tbl_notice structure looks this noticeid => int(4) notice => varchar(100) noticedesc => text noticedate => timestamp noticeimg => varchar(40) expirydate => datetime expired => int(1) 0 current or 1 expired my php code is $sql = "select noticeid, notice, noticedesc, noticeimg, noticedate, expirydate tbl_notices group noticeid ,expired order expirydate asc"; $result = mysqli_query($conn,$sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) {

erd - Tool to Document Database -

is there tool (preferably open source) can used produce documentation (preferably html) database? i'd tool can show tables , relationships visually , allow enter description each column. you can use red gate sql doc create html/pdf/doc based documentation database. thing can use within sql server management studio. http://www.red-gate.com/products/sql-development/sql-doc/

jqgrid - ShrinkToFit does not expand frozen columns if grid has width to expand -

i'm creating pivot table using jqgrid group headers. calculation on input data figure out if combined column width exceed fixed width of grid. if not exceed change shrinktofit : true for grid occupy full width. if it, dragging column width creates alignment issues between header , body. problem gets worse if frozen column enabled. fixed header div wont expand column underneath if shrinktofit enabled. here demo understand problem : http://codepen.io/anon/pen/nbxwrq any leads helpful. in advance.