Posts

Showing posts from March, 2015

Springdata Neo4j primary key -

i new neo4j , sdn . trying create primary key entities using @indexed(unique=true). creates unique nodes replace other properties if used same property value indexed. eg: class abc{ @indexed(unique=true) long abc_id; string abc_name; } new abc(1,"asd")// creates node id: 1 name : asd new abc(1,"xyz")// replaces asd xyz . however want throw exception primary key violation/duplicate node. is there method achieve same? currently @indexed implementation doesnt throw exception duplicates quoted in jira ticket on spring data neo4j forum : here , in thread you may create unique nodes running cypher queries (which faster). can use merge create or update nodes. from documentation merge either matches existing nodes , binds them, or creates new data , binds that. it’s combination of match , create additionally allows specify happens if data matched or created. so can below if want update node or create node if pattern doesnt exist. merge (kea

sql - SSIS - The value is too large to fit in the column data area of the buffer -

Image
i'm passing column of json data script component process. went fine until had json data contains on 600,000 length, follow error occurs. i did change maxbuffer size 10mb, , data around 600k still doesn't work, please advice. there few things need check - if using string assigned output column, go property of output column , set it's length higher value. set size of string in output column bigger of original string. compare sizes of input , output columns of script task ( right click -> show advanced editor… ) , find input columns greater output columns. pay attention column size in outputs section of script component. if having parent-child packages, please note pipeline buffers not shared between child , parent packages, need set properties accordingly. to check truncation happening, try implementing doesnotfitbufferexception. if using sql server 2005, it's worth have this thread.

ios - How to convert NSArray object to double -

i'm retrieving value json in nsarray format. it's temperature. however in celsius , wish convert kelvin. need add 274.15. i'm not able since it's nsarray , can't add directly. i tried converting nsstring , converting double seems don't have option. this current code: nsdictionary *temp = [currentdate objectforkey:@"temp"]; nsarray* maxtemp = [temp objectforkey:@"max"]; nslog(@"max temp : %@ kelvin",maxtemp ); nsarray* mintemp = [temp objectforkey:@"min"]; nslog(@"min temp : %@ kelvin",mintemp); all wanna ( maxtemp + 274.15 ) current values in celsius: max temp : 28.8 kelvin min temp : 26.55 kelvin since log statements displaying numeric values, can tell contents of dictionary "max" , "min" keys not arrays. strings. (json sends data strings.) nsstring has method doublevalue. try this: nsdictionary *temp = [currentdate objectf

css - How do I keep nested children (li) inline for my footer navigation? -

i have simple question. i'm trying display elements "about" "general" , "social-buttons" classes within nested unordered list. want these appear horizontal , inline each other. want them side side basically, not vertical. if can me figure out selector need add 'display:inline' block, useful. <div class="footer-container"> <div id="footer_menu"> <div id="footer-copy"> <li class="about-blurb"> <h3>viral dna</h3> <ul> <li> <p>virael marketing leading digital marketing blog social web. one-stop hub learn viral marketing campaigns, offer tips & tricks, , build best digital marketing teams.</p> </li> </ul> <li class="general"> <h3>general</h3> <ul> <li><a class="button" href="#&q

php - Laravel captcha image not working in production but dev is ok -

i'm using following package johntaa/laravel-captcha enable captcha input on site. works fine in dev environment. however, in prod can't find image (present blank). code //login page @if (session::has('show_captcha')) <div class="form-group"> <label for="captcha">captcha</label> <p>{{ html::image(captcha::img(), 'captcha image') }}</p> {{ form::text('captcha',null,array('class' => 'form-control', 'placeholder' => 'enter characters'))}} </div> @endif //html output snippet in dev <p><img src="http://localhost:8888/mysite/public/captcha?730518" alt="captcha image"></p> //html output snippet in prod <p><img src="http://mysite/captcha?262091" alt="captcha image"></p> clicking on dev link yields result prod link errors to: call undefined func

java - Trouble With Getting Timestamp Info From JSP To Database Using Ajax -

i using ajax retrieve elapsed time 2 on clicks , store in table, trying text appear after each click same table well. below servlet , jsp. can please provide input or explanation? httpsession session = request.getsession(); string responsetime = request.getparameter("responsetime"); string stimname = request.getparameter("stimname"); string sid = request.getparameter("stimid"); string ar = request.getparameter("act_response"); loginfo log = new loginfo(); log.setuser_response(responsetime); log.setstimname(stimname); log.setstimname(sid); log.setstimname(ar); logdb.insert(log); logdb.selectstim(responsetime); session.setattribute("log", log); string url = "/testcaserun.jsp"; requestdispatcher dispatcher = getservletcontext().getrequestdispatcher(url); dispatcher.forward(request, response); } var starttime; function imagel

java - custom linked list iteration -

i have java web app has save bunch of items user add cart display each item user added on jsp page. have custom made linked list called "cart" doesn't use library/api(whatever call it) practicing purpose. cart includes bunch of node , product e element of each node. if node public outer class, can iterate using "node current" outside of class (i.e. main, other pages). if put node inline class people do, can't that. there way iterate through list without moving node outside?

cassandra - CQL2 Java Client Results Binary Data -

i have built table using cql2, data looks fine cqlsh hive command prompt. when reading data java client shows binary value 2 columns, shown below "hr1":"\u0000\u0000\u0000\u000e","hr2":"\u0000\u0000\u0000)" after creating table have created index on column "col1" cql prompt. my java code looks : public void read() { if (null != cluster && null != keyspace) { cqlquery<string, string, string> cqlquery = new cqlquery<string, string, string>( keyspace, stringserializer.get(), stringserializer.get(), stringserializer.get()); cqlquery.setquery("select * mytable col1 = 'hr100'"); queryresult<cqlrows<string, string, string>> result = cqlquery .execute(); cqlrows rows = result.get(); (int = 0; < rows.getcount(); i++) { rowimpl<string,

Refused to display site in an iframe, X-Frame-Options to 'SAMEORIGIN' -

getting error when try inspect element in chrome: refused display ' http://www.samplesite.com/ ' in frame because set 'x-frame-options' 'sameorigin'. how display site inside iframe in website has 'x-frame-options' 'sameorigin'? i tried searching in google cannot find solution, asp.net only. web server conf, for me use nginx.conf find add_header x-frame-options sameorigin; , change to add_header x-frame-options "allowall"; your web server sends header , blocks content. should change setting allow same origin.

jquery - Enable or Disable selectboxes with radio buttons -

i have set of radio buttons , set of select boxes dynamically generated through php code using same class name respective radio button , select box like. <input type="radio" name="selop" class="1111" /> <select name="selval" class="1111"><options><!--all options--></options></select> <input type="radio" name="selop" class="2222" /> <select name="selval" class="2222"><options><!--all options--></options></select> <input type="radio" name="selop" class="3333" /> <select name="selval" class="3333"><options><!--all options--></options></select> <input type="radio" name="selop" class="4444" /> <select name="selval" class="4444"><options><!--all options--><

regex - jQuery add class to href for target _blank -

i'd dynamically add class="external-link" hrefs target="_blank" excluding hrefs surrounding <img> tag. e.g. <a href="#" target="_blank" >test</a> // i'd add class="external_link" <a href="#" target="_blank" ><img src="#" /></a> // nope, no class here thanks. i assume regex can't figure out how exclude <img> tags. thanks. a more general way, can apply tag, using jquery function $obj.children() $obj.children().length tells if there tag or not. $('a[target="_blank"]').addclass(function(){ if($(this).children().length==0) return 'external_link'; }) check sample here: http://jsfiddle.net/pwru7/

php - Change background randomly when the page is refreshed -

i have 10 image files in folder ( images ) named 1.jpg 10.jpg what want change background randomly every time page refreshed this have tried far : <body background='<?php echo 'images/'.rand(1,6).'.jpg' ?>'> this doesn't work . can tell me how using php, please ? <script> $(function(){ var min = 1; var max = 6; var random = math.floor(math.random() * (max - min + 1)) + min; $("body").css("background-image","url(images/"+random+".jpg") }): </script>

php - How can I embed the AJAX output of JS in Javascript function -

it's becoming nightmare me solving problem. developing app using phonegap. have used highcharts in graphs. graph coming not tooltip in graph. please check code below, need code able show tooltip proper data. there has loop of following code , has every user or series in graph. have ran loop in php , saved in variable , got whole output of loop using ajax in json format. when use variable in javascript code in have saved ajax output, doesn't if alert alerts exact code want make tooltip work. have tried eval() no benefit. or guidance appreciated. loop code $tooltip = ''; for($i=0;$i<$teamcontrollerw->total_user;$i++){ $tooltip .= "var chart = $('#team_containerwf').highcharts();"; $tooltip .= "var figures".$i." = [".join($teamcontrollerw->new_yaxesdata1[$i], ",") ."]; "; $tooltip .= "var fatvals".$i." = [". join($teamcontrol

ektron - How to determine whether an item in a Menu is not published yet? -

in ektron api, if have menutreenode item, how determine if page added menu list published or unpublished. when ektron api, assume referring menumanager? the status of content item held in contentdata object retrieved contentmanager api. var contentmanager = new contentmanager(); var contentdata = contentmanager.getitem(contentid); var contentstatus = contentdata.status; in order content id can in menuitemdata object can had menumanager api. var menumanager = new menumanager(); var menuitemdata = menumanager.getmenuitem(menuitemid); var contentid = menuitemdata.itemid; finally content "unpublished", i.e. not have status of "a", not retrieved apis shown above. in order content not published, apis need told in site preview mode so: contentmanager.inpreviewmode = true;

search - Grep after and before lines of last Match -

i searching through few logs , want grep last match along it's above , below few lines. grep -a10 -b10 "searchstring" my.log print matches after , before 10 lines grep "searchstring" my.log | tail -n 1 print last match. i want combine both , after , before 10 lines of last match. if have in 1 command, try awk awk '/search/ {f=nr} {a[nr]=$0} end {while(i++<nr) if (i>f-3 && i<f+3) print a[i]}' file how works: awk ' /search/ { # pattern found f=nr} # yes, store line number (it store last when run { a[nr]=$0} # save lines in array "a" end { while(i++<nr) # run trough lines once more if (i>f-3 && i<f+3) # if line number +/- 2 compare last found pattern, print a[i] # printe line array "a" }' file # read file a more flexible s

javascript - Yammer not working using js -

i have tried display data yammer using embedded feed using below code work: yam.connect.embedfeed({ container: "#embedded-feed", network: "elliottaustralia.com", feedtype: "group", feedid: "1000157" }); but not work custom code fetch data follow: <script type="text/javascript"> var tagdisplayname = "supplier"; var groupid = "1000157"; yam.connect.loginbutton('#yammer-login', function (response) { if (response.authresponse) { var yurl = "https://www.yammer.com/api/v1/messages/in_group/" + groupid + ".json?include_counts=true&threaded=extended&exclude_own_messages_from_unseen=true"; yam.request( { url: yurl, method: "get", type: "json",

c# - find xaml text with regular expression -

how find textblocks in xaml files contains style parameter using search in microsoft visual studio . there regexp possible used here? here example of block: <textblock text="{binding localizedresources.boom, source={staticresource localizedstrings}}" foreground="{staticresource gray}" textwrapping="wrap" style="{staticresource sdfsdf}" horizontalalignment="center" visibility="{binding erroroccured,converter={staticresource tovisibilityconverter},converterparameter=true}"/> thanks. since you're in editor, usual warnings using regex parse xml can relaxed (only bit)... this work: (?s)<textblock(?:(?!/>).)*?\bstyle=.*?/> see demo . the trick make sure don't past closing tag , end matching more text want. if there nested <tags> , fail explanation (?s) activates dotall mode, allowing dot match across lines <textblock matche

Excel Column formatting or VBA -

in excel, want numbers formatted in column. if enter other number want number have dash (-) after fourth letter. eg. if enter 12345678 want convert 1234-5678. thanks! use escape character \ e.g. number format 0000\-0000 enter string above 'custom' number format from : http://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.110).aspx to vba: sub fmt() range("a1").numberformat = "0000\-0000" end sub

c - What does tANI_U32 data type mean? -

i reading library , in came across data type. mean? can 1 explain me? have tried searching in google , asked peers, found no answers. this may assign alternative names existing data type, structure or union using typedef . in qualcomm atheros driver typedef tani_u32 eqwpttstatus; . , eqwpttstatus structure.

php - From where to start webservices in android? -

Image
some people vote down after seeing these kinds of question. if votedown please tell reason may improve. i learning android , started studying webservices. i used php code <?php echo "hello abhi how you"; ?> and code in activity class of android application public class mainactivity extends activity { bufferedreader in = null; textview tv1; httpclient httpclient; httppost httppost; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); tv1 = (textview) findviewbyid(r.id.tv1); httpclient = new defaulthttpclient(); httppost = new httppost("http://10.0.2.2/devilabhi/a.php"); new getresult().execute(); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; add

android - Phonegap Parse Plugin Installations are showing but notifications aren't being received -

i'm getting installation show in parse data browser, right app name, version number, installationid , i'm subscribing channel based on users session id, shows in right columns devicetoken column empty (although i'm not sure if android needs or ios) when try , send push parse, shows correct number of recipients, status shows done in parse, pn never arrives on phone. this cordova 3.5.0 app, code i'm using in deviceready function. again i'm not sure need installationid i'm not using - tutorials i've seen seem mention after initialize method: // init parse window.parseplugin.initialize( "app_id", "client_key", function() { console.log( 'parse init ok' ); window.parseplugin.getinstallationid(function(id) { installationid = id; }, function(e) { console.log("error getting id: " + e.code + " : " + e.message); }) }, functi

sql server - MSSQL Text and Varchar(MAX) fields shown (MEMO) in DBGrid -

Image
i have encountered problem in mssql & delphi xe3. text , varchar(max) fields seemed (memo) or (widememo) in tdbgrid & tdbadvgrid (tms dbgrid). in first screenshot can see table fiels, in second screentshot can see sample data in database: in screenshot, see how in dbgrid or in query results. i figured out changing field type char , varchar not max solves issue don't know why having problem. can please let me know?

google api - Chrome uncaught error 'Protocols must match' on G+ signin -

i've added g+ login button on website, keep seeing issue. in cases comes first time , if try connect after refreshing page, works. here's error: uncaught securityerror: blocked frame origin .com" accessing frame origin " https://accounts.google.com ". frame requesting access has protocol of "http", frame being accessed has protocol of "https". protocols must match. i saw post google + signin button blocked frame solution isn't relevant me. first, want emphasize should using https when handling user credentials. if can, get ssl certificate , serve content on https . using https, can prevent mitm attacks , user information leaks. that aside, there number of potential sources triggering warning: if using sign-in button page serving http instead of more secure https, communication sign-in servers gets blocked. if sign-in works , doesn't, may cause. if authorized javascript origin protocol (http / https) does

java - Traceback on Dagger .plus() on incomplete parent -

consider dagger module: @module(library = true, complete = false) public static class module { @provides public contextualized providescontextualized(context ctx) { return new contextualized(ctx.getusername()); } // ... , many more such provides. } context object may connected e.g. http session cannot known @ startup, when 1 create graph: @module(library = true, complete = false) public static class contextmodule { private final string username; public contextmodule(string username) { this.username = username; } @provides public context providescontext() { return new context() { public string getusername() { return username; } }; } } given module sufficiently long, seem make sense first create graph module: objectgraph baseline = objectgraph.create(new module()); and then, on processing particular request, create unique graph makes graph complete: objectgraph withcontext = baseline.plus(new conte

struct - Swift - From Dictionary to NSManagedObject -

i trying value dictionary , set attributes class values this have done: class myclass : nsmanagedobject{ @nsmanaged var remoteid:nsnumber @nsmanaged var creationdate:nsdate @nsmanaged var title:string @nsmanaged var total:nsnumber func fromdictionary(dictionary:dictionary<string,anyobject>) { if let x:int = dictionary["id"]! as? int { remoteid = nsnumber(integer: x) } if let x:string = dictionary["creation_date"]! as? string { creationdate = x.formatteddate() } if let x:double = dictionary["total"]! as? double { total = nsnumber(double: x) } if let x:string = dictionary["title"]! as? string { title = x } } i'm looking way optimize or function in more generic way, in order usable other classes until attempted use enum (to enumerate dictionary keys, seems me wrong way) i trying have that enum keytypes { case int case currency case text case bool

android - quiz program Timer issue -

i'm creating 1 quiz application android in using timer.based on timer questions move next. there 20 questions. giving 6 seconds of time each question. should answer within 6 seconds otherwise question move next question. if answer in 4 seconds means remaining 2 seconds added next question. next question have 8 seconds of time. have add remaining seconds next question till end. used below code has start , stop timer. private runnable updatetimerthread = new runnable() { public void run() { timeinmilliseconds = systemclock.uptimemillis() - starttime; updatedtime = timeswapbuff + timeinmilliseconds; int secs = (int) (updatedtime / 1000); int mins = secs / 60; secs = secs % 60; mtimertext.settext("" + mins + ":" + string.format("%02d", secs)); customhandler.postdelayed(this, 0); } }; public void playclock() { starttime = systemclock.uptimemillis(); customhandler.postdela

java - JSTL Taglib -error -

i have following pice of code: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> if want run programm following error message: http status 500 - absolute uri: http://java.sun.com/jsp/jstl/core cannot resolved in either web.xml or jar files deployed application my jar files in web-inf/lib/ folder --->javax.servlet.jsp.jstl-1.2.1-javadoc.jar (imp) --->javax.servlet.jsp.jstl-api-1.2.1-javadoc.jar (api) i use web.xml version 3.0 so please can me?! thanks it seems have added javadoc of jstl instead of code. try downloading 1 , add lib directory: http://mvnrepository.com/artifact/javax.servlet/jstl/1.2

osx - Using dtrace in objective C -

i use dtrace parameters below calculate specific process network traffic usage : sudo dtrace -n 'syscall::recvfrom:return { @[pid] = sum(arg0); }' how use dtrace in objective c? i used nstask launch dtrace above parameters results of dtrace command shows after terminating dtrace, couldn't see results unless terminating dtrace. dtrace stays in loop calculating traffic of given process , because of using of nspipe could't able use [task terminate] command. main question is: how use dtrace in objective c nstask or without (via method) , terminating , seeing results? the default behaviour not print out anything, can put in profile kicker print output @ interval. adding clause like: profile:::tick-1sec { printa(@); } should achieve desired effect. or, using sudo call: sudo dtrace -n 'syscall::recvfrom:return { @[pid] = sum(arg0); } profile:::tick-1sec { printa(@); }'

javascript - To create clickable canvas using MSPointerEvent for IE 11 -

i have been trying make clickable canvas on ie 11. if click on canvas, it'll open url in next window. problem originated after reading documentation of ie 11. "mouseevent" changed "mspointertype". did try write .initpointerevent it's still not working. here non-functioning code. </head> <body> <script type="text/javascript"> var canvas = document.createelement('canvas'); canvas.id = "dgmobix-poplayer"; var body = document.getelementsbytagname("body")[0]; canvas.width = body.clientwidth; canvas.height = body.clientheight; canvas.addeventlistener('click', function(event) { var t = document.createelement("a"); t.href = "http://www.google.com"; t.target="_blank"; var n = document.createevent("mspointerevent"); n.initpointerevent("click", true, true, window, 0,`` 0, 0, 0, 0, true, false, false, true, 0, null,

FFMpeg video transpose -

i have movie rotated 90, 180 or 270 degrees. process video , make , save processed copy in place. problem in processed move rotation not included e.g. input video ratated 180 degrees output video not rotated @ all. here commad: ffmpeg -i movie.mp4 -vf crop=480:480:80:0 -strict -2 testmovie.mp4 how can apply rotation input movie output movie. running these 2 produce file out2.mp4 rotated 90 degrees, , cropped afterwards. different result? ffmpeg -i in.mp4 -vf "transpose=1" out1.mp4 ffmpeg -i out1.mp4 -vf "crop=480:480:80:0" out2.mp4

How to load external url to cordova webview - iOS -

want how call external url in embedded cordova webview in ios application. can escape giving www folder , start page? example url: http://www.stackoverflow.com this snippet tried, since checks www folder, wont work. cdvviewcontroller *viewcontroller = [cdvviewcontroller new]; viewcontroller.wwwfoldername = @""; viewcontroller.startpage = @"http://www.stackoverflow.com"; viewcontroller.usesplashscreen = yes; viewcontroller.view.frame = cgrectmake(0, 0, 320, 480); [self.view addsubview:viewcontroller.view]; is there way call such external url end? thanks bunch. this task : [viewcontroller.webview loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring:@" http://www.stackoverflow.com "]]];

asp.net - How to prevent a service from stopping on Error -

i wrote windows service polls data on timeintervalls , writes them in database. if there occures error writing database , service stops. want robust solution goes on if error occures. i put try/catch bocks around every action done service in onstart, onstop , dispose sopped anyway. is try/catch correct approach? , have put it? put try/catch in main method? many thanks. try wrapping call in transactionscope, roll failed changes trying make , should not break on failure. using (var scope = new transactionscope()) { deletestuff(); updatestuff(); scope.complete(); }

ruby on rails - Nested forms not working -

i have 2 models (bcase , c_entry) , trying 10 blank c_entry fields on each bcase creation form! what did following: models: bcase.rb class bcase < activerecord::base has_many :c_entries, :dependent => :destroy accepts_nested_attributes_for :c_entries end c_entry.rb class centry < activerecord::base belongs_to :bcase end bcase_controller.rb def new @bcase = bcase.new 10.times {@bcase.c_entries.build} end def bcase_params params.require(:bcase).permit(:pimp_id, :comment_text, :status, c_entries_attributes:[:id, :description, :bcase_id]) end form (gets rendered in bcase -> new.html.erb) <%= simple_form_for :bcase, url: bcase_path |f| %> <div class="form-inputs"> <% f.simple_fields_for :c_entries |entry| %> <%= entry.input :description %> <% end %> </div> <% end %> but if open view on localhost in browser form empty. te

c# - Can't reference all folders in universal Windows App -

so, i'm writing universal windows app , have referencing problem. when put business logic code in shared project, views in respective projects (windows , windows phone), can't reference view-folders (i c# "the type or namespace not found" error). i've checked namespaces , names, it's should be. , weird thing is, sometimes can reference some of subfolders (i have 3 subfolders in views folder , right can reference 2 of them , yesterday reference 1 , before couldn't see views namespace). when put views folder in shared project, isn't fixed - again see different folders @ different times. so, have done wrong, or problem somewhere else ? p.s. know paths in windows case-insensitive, i've noticed windows-phone project (according vs) @ ~/visual studio 2013/... , windows project @ ~/visual studio 2013/... . in explorer @ same place, mean ? sounds bad layering, begin with. (platform-specific) views should hold reference (platform-independen

oracle10g - sql not throwing invalid identifier -

i asking question because not getting error expect there should error. please me understand under circumstances possible. have query: select foracid,acct_name, schm_code, schm_type tbaadm.gam acid in(select acid tbaadm.iar); this query returning results without throwing error. expect invalid identifier because table tbaadm.iar not have field acid. when run: select acid tbaadm.iar; i get: ora-00904: "acid": invalid identifier 00904. 00000 - "%s: invalid identifier" *cause: *action: error @ line: 772 column: 8 i using sqldeveloper , oracle 10g. kind of strange me. worth mention though there field in tbaadm.iar id , right query should be: select foracid,acct_name, schm_code, schm_type tbaadm.gam acid in(select entity_id tbaadm.iar); what going on here? a subquery that's used in in clause can reference columns outer query, because necessary in correlated subqueries. clause equivalent to: where acid in (select tbaadm.gam.acid

JavaScript: addEventListener not running -

learning javscript , trying trigger click event. i'm not sure i'm doing wrong following doesn't seem work. jsfiddle http://jsfiddle.net/73e7h/1/ html <ul> <li id="nav-item-39"> <a href="#">visit</a> </li> <ul> js var $visit = document.getelementbyid('nav-item-39').firstchild; $visit.addeventlistener('click', function() { print('hello'); }); the firstchild text node containing whitespace after end of li start tag , beginning of link. need first child that's element . on many browsers, that's firstelementchild , if need support older browsers may need loop. fiddle (using alert rather print ) another option use queryselector , available on modern browsers (even ie8 — of course, ie8 doesn't have addeventlistener ): var $visit = document.queryselector('#nav-item-39 a'); $visit.addeventlistener('click', function(

php - Symfony omit filename for routing -

i pretty new symfony , learning it. though symfony's documentation has helped me of concerns , answered questions i've had far, wasn't able find solution question regarding routing. whenever access page, need specify front-controller in order trigger routing: http://localhost/symfony/app_dev.php/test what want clean url further omitting front-controller: http://localhost/symfony/test this might simple thing, haven't been able find single question or documentation page describes me how (if it's @ possible). have tried renaming front-controller index.php, unfortunately doesn't work either. if httpd.conf says allows overriding namevirtualhost *:80 <virtualhost *:80> servername foo.localhost.com documentroot "/projects/yourproject/web" <directory "/projects/yourproject/web"> options indexes followsymlinks allowoverride allow </directory> </virtualhost> you can use web/.htacces

java - JPA query using domain object Spring mvc jpa rest -

i want know if possible build jpa query using domain object. for example: @entity public class user { private string firstname; private string lastname; private string email; } in real object has more fields. receive valid json string of object. not fields filled. for example filled firstname: {"firstname":"peter","lastname":"","email":""} this json gets deserialized user object and want make search using object received parameter. result should user firstname peter. the question is possible give object query? thanks inputs edit 1 thanks until now. found solution search contracts using entity. in solution post updated values of contract , other methods. the json this: contract = {fromdate:moment($('#datepickervon').val(), 'dd-mm-yyyy').format('dd-mm-yyyy'), enddate:moment($('#datepickervon').val(), 'dd-mm-yyyy').f

sql server - SQL Select all columns from multiple tables -

a question in old exam paper reads follows: suppose have 3 tables (cardholders, cardholder_status, accounts). write query bring possible combinations (cross product) of data. now guess query this select * cardholders, cardholder_status, accounts will above query return correct results, or lost? above 1 right . can try select * cardholders cross apply cardholder_status cross apply accounts or select * cardholders cross join cardholder_status cross join accounts

bitbucket server - JENKINS : Is there a Jenkins Variable to get user name who did last commit in stash -

i got task run jenkins job every commit in stash. , in email body need mentioned user name last pushed code in stash. is there jenkins variable user name did last commit in stash you should @ email-ext plugin . provides ton features , control on email, including asking. in particular, display name of user committed change, use: ${changes, format="%a"}

sdk - How to get information from the Android notification bar? -

i want make android app sends mail when in notification bar on phone. can´t find information how check if there in notification bar. possible? if so, documented anywhere? write a notificationlistenerservice . notified notifications come , go.

python - converting NDB Datetimeproperty to date -

i have ndb datetime property stored on google app engine. i'm trying query records since yesterday converting datetime date, filtering query greater or equal yesterdays date. however, getting following error: follower_trans = fol.query( datetime.datetime.date(fol.followed_date) >= self.yesterday).fetch() typeerror: descriptor 'date' requires 'datetime.datetime' object received 'datetimeproperty' if use datetime.date() sends error requiring integer argument. you can't conversion part of query, you'll have create 'yesterday' datetime , filter using that.

java - Print list of all Eclipse quick fix suggestions for the active project -

i want write piece of java code call eclipse quick fix , print suggestions in console. as example, if have reference undefined variable, compiler error cannot resolved variable . in case, eclipse suggestes fixes such create local variable , create field , or create parameter . in project want print 3 suggestions output. i saw page , not useful. please let me know best way task. the solution extend org.eclipse.jdt.ui.quickfixprocessors plug-in, , extends ijavacompletionproposal interface. this web page describes details need. in germany, sure can use google translator have english. hope, helps.

xcode - How to write NSString with .jpg for all strings? -

i new in programming , know how can write nsstring .jpg extension. i have code viewcontroller has title , title use nsstring. use string find image same name. dont know configure .jpg extension. here code: - (void)viewdidload{ [super viewdidload]; nsstring*imagename = [nsstring stringwithformat:(@"% .jpg", self.title)]; uiimage*image = [uiimage imagenamed:imagename]; [imageview setimage:image]; nslog(@"%", imagename); } funny nslog line don't work. can problem in prepareforsegue method?: -(void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender{ if ([segue.identifier isequaltostring:@"cell segue"]) { imageshowingviewcontroller*ivc = segue.destinationviewcontroller; ivc.title = [self.objects objectatindex:(self.tableview.indexpathforselectedrow.row)]; } } when push cell in tableviewcontroller push segue activated , show second viewcontroller. part of code works fine no nslog line there if v

android - Google Maps application works on emulator but not real device -

i new user here , reputation not enough display images of app along question make more elaborative unfortunately asking question without images of app i using google nexus 4 ..api 18 (android version 4.3) virtual device , had been developing app run on android device having api 11 or 11+ , have test app on real android device (samsung galaxy s2 lite) facing problems are 1) whenever user enter location name in edit text box , click on find button in same activity marker drawn on map below.. works fine in virtual device every time on android device @ point when ever user clicks on find button application crash. 2) in second activity here have made button location when ever user clicks on ..it gps coordinates of device , reverse geocode , display location adress in 1 of edit text boxes .this works fine in virtual device .it take moment every thing in real device not display thing when ever click on icon @ top left shows search using gps not display thing why taking time here .

file - Python stream.tell() returns incorrect position -

tried use tell() cursor position after reading line. seems has problem text mode , \r . misusing method or it's bug? thanks. tested python2.6, 2.7, 3.3 , have same output. import io io.open('a', 'w') fo: fo.write(u'abc\n') fo.write(u'def\r\n') fo.write(u'hij\r') fo.write(u'klm') print('*io.open rb*') io.open('a', 'rb') fo: print('--%r--%d' % (fo.readline(), fo.tell())) print('--%r--%d' % (fo.readline(), fo.tell())) print('--%r--%d' % (fo.readline(), fo.tell())) print('--%r--%d' % (fo.readline(), fo.tell())) print('*io.open rt*') io.open('a', 'rt') fo: print('--%r--%d' % (fo.readline(), fo.tell())) print('--%r--%d' % (fo.readline(), fo.tell())) print('--%r--%d' % (fo.readline(), fo.tell())) print('--%r--%d' % (fo.readline(), fo.tell())) output: (not sure 34028236

php - Is it possible to set 2 separate unique fields using Redbean ORM -

i using redbeanphp orm , mysql. have following table: create table `mast` ( `id` int(11) unsigned not null auto_increment, `note` varchar(255) collate utf8_unicode_ci default null, `geolocation` varchar(255) collate utf8_unicode_ci default null, `location` varchar(255) collate utf8_unicode_ci default null, `zip` varchar(255) collate utf8_unicode_ci default null, `state` varchar(255) collate utf8_unicode_ci default null, `app` varchar(255) collate utf8_unicode_ci default null, primary key (`id`), unique key `uq_84a93b55f688c94f73092dba1b9590c41a92cbf5` ('app') ) engine=innodb auto_increment=98 default charset=utf8 collate=utf8_unicode_ci i want insert records 'mast' table providing unique respect both of 2 fields listed above. in other words if either 'geolocation' or 'app' duplicate, don't want insert associated record. i using following php code create 2 unique fields: $mast= r::dispense('mast'); $mast->