Posts

Showing posts from May, 2015

jquery - Prevent Ajax Call When there is no session & Network Discoonects in codeigniter -

i facing 2 issues in project.please me rid of those. i using .load() function in javascript load other page using ajax. it's working great. if opened project in other tab , logout , here , try make ajax call showing login page loading page using .load() function.how solve it. how stop ajax call when network disconnects ? how solve these 2 issues?? what trying achieve little complex want browser (client) keep record of weather active session current user exists on server. the problem user's session record maintained @ server , want client know sessions status. need write java script keep calling function on server after fixed interval of time check if session valid. i : // call function make request server , check if session exist's after every 10 seconds. var t=setinterval(checksessionexist,10000); function checksessionexist(){ $.get( "somefunctiontochecksession", function( data ) { if(!data.issessionactive){ clearinterval(t)...

ios - How to pass value in uitextview using segue -

i'm trying create in uitextview every time text encounter kind of symbol "@". text after symbol send other controller. here's code - (bool)textview:(uitextview *)atextview shouldchangetextinrange:(nsrange)range replacementtext:(nsstring *)text { // "length of existing text" - "length of replaced text" + "length of replacement text" nsinteger newtextlength = [self.addingtext.text length] - range.length + [text length]; if([text isequaltostring:@"@"] || secondstring){ secondstring = true; nsstring * stringtorange = [self.addingtext.text substringwithrange:nsmakerange(0,range.location)]; // appending typed charactor stringtorange = [stringtorange stringbyappendingstring:text]; // processing last typed word nsarray *wordarray = [stringtorange componentsseparatedbystring:@"@"]; self.getsecondstring = [wordarray lastobject]; // ...

mysql - Display and retrieve image from database in PHP -

i want display image database displays name of image. need help. here code submit.php <?php $radio = $_post['radiogroup1']; $img_banner = $_files['bannerimage']['name']; $target_file = "uploads/"; if(!empty($img_banner)) { $errors = array(); $file_name = $_files['bannerimage']['name']; $file_size = $_files['bannerimage']['size']; $file_tmp = $_files['bannerimage']['tmp_name']; $file_type = $_files['bannerimage']['type']; $file_ext = strtolower(end(explode('.',$_files['bannerimage']['name']))); $k = move_uploaded_file($file_tmp,"uploads/".$file_name); } $date = $_post['date']; $qry_banner = "insert `banner_tbl`(`banner_img`, `date`) values ('$img_banner','$date')"; $res_banner = mysql_query($qry_banner); $banner_tbl_i...

Locking for JPA entities without @Version -

env: java ee 7 jpa 2.1 ejb 3.1 hibernate 4 recently experiencing data problems in 1 of table. couple of points the table mapped jpa entity table entity not have "version" column/attribute. in other words, there no optimistic locking available table. on doing rca, turned out concurrent data modification issues. questions : in such cases @version not available/used (in other words optimistic locking), using singleton repository class option make sure data consistency maintained ? what pessimistic locking in such cases ? i believe general use case application (especially legacy) can have tables version column , dont. there known patterns handling tables/entities without version column ? thanks in advance, rakesh jpa supports pessimistic locking , free use in case cannot or not want use optimistic locking. in short, entitymanager provides lock methods lock retrieved entity, , overloaded em.find , em.merge , query.setlockmode provide means s...

how to authenticate facebook login using graph api ios with ARC? -

how authenticate facebook login using graph api ios arc. have followed link, http://room214.com/best-practices/iphone-facebook-oauth-2-0-and-the-graph-api-a-tutorial-part-2

Build and Debug using ios 8.4 SDK in Xcode 7 -

xcode 6.4 doesn't allow debug on ios 9 devices installed xcode 7 doesn't have ios sdk 8.4 installed. since have xcode 6.4 installation, copied the iphoneos8.4.sdk /applications/xcode 3.app/contents/developer/platforms/iphoneos.platform/developer/sdks folder and copied iphonesimulator8.4.sdk /applications/xcode 3.app/contents/developer/platforms/iphonesimulator.platform/developer/sdks. however ios 8.4 sdk not appear in base sdk options list. there 1 work around situation. used in routine work below: open project in xcode 6.4 (you can see ios 9 device debugging disabled) now open xcode 7 (without project opened it) such looks active in "dock tray". by doing above 2 steps, xcode 6.4 enable debug ios 9 devices. hope helps.

android - List is empty in arrayadapter -

i have arrayadapter in android follows : public class smsarrayadapter extends arrayadapter<string> { list<string> smsbody; list<boolean> status; list<string> time; list<string> smsmessageid; context context; private static layoutinflater inflater = null; string fromnumber; public smsarrayadapter(context context, int resource, list<string> smsbody, list<boolean> status, list<string> time, list<string> smsmessageid, string fromnumber) { super(context, resource, smsbody); this.smsbody = smsbody; this.status = status; this.context = context; inflater = (layoutinflater) context .getsystemservice(context.layout_inflater_service); this.fromnumber = fromnumber; this.time = time; this.smsmessageid=smsmessageid; } public string getstr(int position) { return smsbody.get(position); ...

javascript - Site provoking error in Microsoft Edge (but not any other browsers) -

when loading page on our site in microsoft edge, sometimes see following error (that is, happens 1/3 times): this page having problem loading we tried load page few times, there still problem site. know have better things watch page reload on , on again try coming page later. the page looks reloads once or twice before showing error. don't see same issue in other major browser (ie 9-11, chrome, firefox, etc.), , there no console errors (although there couple of warnings). here console warnings shown: the code on page disabled , forward caching malformed comment. comments should start <!-- . (specifically referring lines of code include conditional formatting earlier versions of ie.) here's example of page on our site we've seen error: https://casetext.com/case/cole-taylor-bank-v-corrigan for it's worth, we're angularjs website on version 1.4.4 , we're using ui-router routing.

ibm mq - Event Viewer for Websphere MQ failures, errors on Unix -

on windows server, event viewer can provide several errors 2035 or insufficient size of logs transactions,... don't see can find same events logs on unix ( solaris & redhat). nothing on syslog, messages , audit. idea ? because 2035 error returned application, not logged in qmgr error logs default. can enable reporting on 2035 can troubleshoot further yourself. use mqsautherrors generate ffdc detail or use mqs_report_noauth better diagnose return code 2035

ios - set same navigation bar in xib and storyboard -

i creating project in have frontviewcontroller , slideoutmenu. on clicking menuitem want according view in frontviewcontroller's subview. the frontviewcontroller having storyboard , subviews created in .xib . , getting subview not getting navigation bar in storyboard. so question is: how same navigation bar in xib storyboard has? i have tried: uinavigationcontroller *navigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:bookingviewcontroller]; [_swreveal pushfrontviewcontroller:navigationcontroller animated:yes]; but not getting anything.

.net - How to move an 'user.config' file from source PC to target PC preserving its settings? -

i have 3rd party application, remove empty directories aka red can downloaded here: http://sourceforge.net/projects/rem-empty-dir/files/?source=navbar the user settings of application follows standard .net settings infrastructure, saves settings in directory this: ...\appdata\local\red2\red2.ex_url_ilre4odeu2sx2xsqyulyx2jybty45cd5\2.2.0.0 my problem make ignore_directories setting perssistent inside user.config file when move application folder pc, mean preserve user settings of source pc when move app , settings file target pc, of course can't copy folder stores user.config file because user.config settings automatically stored in new folder new hash totally different source pc, old user.config file in target pc ignored ...not recognized. this default content of user.config file: <?xml version="1.0" encoding="utf-8"?> <configuration> <configsections> <sectiongroup name="usersettings" type=...

javascript - iOS9: Try to open app via scheme if possible, or redirect to app store otherwise -

my question ios9 only! i have html landing page, , try redirect user to app via url scheme if app installed, or redirect appstore otherwise. my code is: document.addeventlistener("domcontentloaded", function(event) { var body = document.getelementsbytagname('body')[0]; body.onclick = function () { openapp(); }; }); var timeout; function preventpopup() { cleartimeout(timeout); timeout = null; window.removeeventlistener('pagehide', preventpopup); } function openapp(appinstanceid, platform) { window.addeventlistener('pagehide', preventpopup); document.addeventlistener('pagehide', preventpopup); // create iframe var iframe = document.createelement("iframe"); document.body.appendchild(iframe); iframe.setattribute("style", "display:none;"); iframe.src = 'myscheme://launch?var=val'; var timeouttime = 1000; timeout = settimeout(function () { document...

Android Date Time Format Pattern -

i want know if there way format being used system. of using joda time library , manually specifying foramt expect date in. private final datetimeformatter formatter = datetimeformat.forpattern("yyyy-mm-dd"); localdate date = localdate.parse(event_date, formatter); this of course not best idea hardcode pattern,so there way can pattern system? you can use this: dateformat formatter = dateformat.getdateinstance(dateformat.short, locale.getdefault()); string pattern = ((simpledateformat)formatter).topattern(); string localpattern = ((simpledateformat)formatter).tolocalizedpattern();

geometry - Are OpenCV Hough Circles sorted? -

i want use opencv hough circles' implementation, have question: the circles function returns sorted vote? since hough transform based on voting mechanism, want know if circles return in order voted least voted, or in random order. yes, sorted according vote in accumulator in descending order. you'll notice in function computes hough transform icvhoughcirclesgradient inside hough.cpp , icvhoughsortdescent32s( &sort_buf[0], center_count, adata ); called on buffer containing votes. note ( source ) centers sorted according highest accumulated values based on circle centers highest vote surrounding edge pixels, , not according number of supporting radius pixels. make sense, since bigger circles have higher support then.

Rails Bootstrap Modal not appearing -

i have included bootstrap modal inside page. page gets grey out when press on button , no pop dialog appears. however, when press esc button, dialog flashes once before exiting. instance tried was, included //= bootstrap/modal inside application.js file. inside file had line //= bootstrap . when have both of line included, modal stays less 1 second when press button. below code of view page, <% provide(:title, "log in") %> <div class="center jumbotron"> <h1> kaching </h1> <div class = "row" > <div class="col-md-6 col-md-offset-3"> <%= form_for(:session, url: login_path) |f| %> <%= f.label :logid, "log id" %> <%= f.text_field :logid %> <%= f.label :password %> <%= f.password_field :password, class: 'form-control' %> <%= f.submit "log in", class:"btn btn-primary" %> <% end %> </div> ...

c# - Implicitly typed local variables must be initialised -

i want dynamically put condition :- var data; if(employeid != 0) { data = (from in ctx.tblto1 join b in ctx.tblto2 on a.company equals b.company a.id == b.id && a.employeeid == employeeid select new { = a, b = b }).tolist(); }else{ data = (from in ctx.tblto1 join b in ctx.tblto2 on a.company equals b.company a.id == b.id && a.cat == cats select new { = a, b = b }).tolist(); } the result of above expression of anonymous type. not able declare & 1st line gives error. implicitly typed local variables must initialised . what way solve this? can use separate function, functions return type? well, of course var data; makes no sense. you define type appropriate fields element type. particularly useful if same type comes more once. you use ?:...

maven - Fail rpm install on missing environment variable -

i using maven rpm plugin. rpm kind of zip can extracted different environment variables example dev , prod etc i want fail rpm install if there no environment variable called install-env secondly how can read , use environment variable inside install script used rpm. thanks

shell - Crontab not recognizing editor -

i made script run on specific time each day. however, when trying edit crontab running crontab -e , following output: crontab: no crontab rpoddighe - using empty 1 crontab: /usr/local/bin/mvim -v -f: no such file or directory crontab: "/usr/local/bin/mvim -v -f" exited status 1 running echo $editor outputs following, no surprise there: /usr/local/bin/mvim -v -f furthermore, editor works fine. have idea might going on? please let me know if need clarify or add more details. edit: using zsh shell, in case of relevance. it turned out there discrepancy between system vim , 1 installed homebrew, , aliasing vim -> mvim -v -f not correct solution. after correctly symlinking vim macvim works expected.

.net - How do I parse a json/javascript date with timezone to C# DateTime? -

how parse date format: /date(1402537043438+1000)/ to c# datetime? i'm limited .net 3.5 , can't use nuget package newtonsoft. javascriptserializer (an external assembly, of sorts, not nuget requirement) can parse dates, need have \ @ start , end of string, e.g.: var date = "/date(1402537043438+1000)/"; var parseddate = new javascriptserializer().deserialize<datetime>("\"" + date.replace("/", "\\/") + "\"");

Can I hide typescript autogenerated .js and .map.js files in atom? -

does know if there plugin/option hiding or grouping autogenerated files in atom? the files want hidden/grouped typescript compiler auto generates ( .js , .map.js files). visual studio style grouping best, if possible my typescript file file.ts which generates file.js file.map.js file.js interesting read once in while, in general autogenerated , shouldn't care it. so letting file.ts virtual folder like - file.ts - file.js - file.map.js would ideal solution. plain hiding fine. (hiding .js files in general not solution, since typescript projects typically mix .js , .ts , .tsx files) atom respects .gitignore , grey out files matching .gitignore place in root of project. should sufficient ignore generated files: *.js *.jsx in addition, tsconfig.json can output files path. example: { "version": "1.6.2", "compileroptions": { "outdir": "build" "sourcemap": true }...

Printing the timestamp miliseconds in R does not work -

i have application logs info in r. using logging library that. problem timestamp has no milliseconds, , not order of logs. in logging file, r puts logs in right order, use logstash , es having history , monitoring. because timestamp got not right order of logs, add milliseconds. i have tried use strptime , %os(n) , seems not work. if add %os , na simple things: strptime(sys.time(), "%h:%m:%os") i have seen there more posts this, no answer, posting here, too. i have use r 3.2.0 under linux ubuntu 14.04. how solve it? how have milliseconds in timestamp ? ok, after using strftime , getting milliseconds, seems 0. i have log formater: logformatter <- function(record) { sprintf('application(%s) %s [%s] [] %s - %s', format(as.hexmode(sys.getpid()), width = 8), record$levelname, strftime(record$timestamp, "%y-%m-%dt%h:%m:%os3"), record$logger, record$msg) } i have added logger: addhandler(writetofile, logger = "mylogger",...

c# - Binding to child item property -

i have pages view models. page displaed in frame using frame.navigationmanager.navigate() . in 1 page have groupbox child datagrid . want groupbox change it's visibility according items count in datagrid . here have: <groupbox .... visibility="{binding elementname=somedatagrid, path=hasitems, converter={staticresource booleantovisibilityconverter}}"> <datagrid x:name="somedatagrid" isreadonly="true" itemssource="{binding items}"/> </groupbox> the problem after changing page , going have following binding exception system.windows.data error: 4 : cannot find source binding reference 'elementname=somedatagrid'. bindingexpression:path=hasitems; i've tried using x:reference got same problem. could explain i'm doing wrong? probably, items col...

afnetworking with iOS 9 sessions -

i have big project it's websites made subclass afhttpsessionmanager service class, working fine till ios 9 released, login doesn't work checked token , can't use them mean when request see cars example server sends me not logged in. used keys server exception didnt work. sorry lame question. if you’re developing new app, should use https exclusively. if have existing app, should use https as can right now, , create plan migrating rest of app possible. for quick hack can following, add info.plist: <key>nsapptransportsecurity</key> <dict> <key>nsallowsarbitraryloads</key> <true/> </dict>

javascript - Unable to include jquery.dataTables.min.js in html -

my code : <!doctype html> <meta charset='utf-8'> <html> <head> <script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script type="text/javascript" src="http://cdn.datatables.net/1.10.9/js/jquery.datatables.min.js"></script> <script type="text/javascript" src="https://raw.githubusercontent.com/mpryvkin/plugins/master/pagination/simple_numbers_no_ellipses.js"></script> <link rel='stylesheet' href='style.css'> <link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.9/css/jquery.datatables.min.css"> <script> $(document).ready(function() { alert("hello"); $("...

cocoa touch - iOS - Hanling plural noun localization with .stringsdict - not working -

i trying implement plural rules localisation. i.e., expect "one file..." when argument 1, "2 files..." when argument 2 , likewise. i followed apple guidelines . results plural, 1 i.e, "1 files...". i've created localizable.stringsdict file following content (exactly apple guidelines). <?xml version="1.0" encoding="utf-8"?> <!doctype plist public "-//apple//dtd plist 1.0//en" "http://www.apple.com/dtds/propertylist-1.0.dtd"> <plist version="1.0"> <dict> <key>%d messages in inbox</key> <dict> <key>nsstringlocalizedformatkey</key> <string>%#@messages@ in inbox</string> <key>messages</key> <dict> <key>nsstringformatspectypekey</key> <string>nsstringpluralruletype</string> <...

ios - objective c error "No visible @interface for 'NSString' declares the selector 'timeIntervalSinceDate:'" -

sorry posting have been wrestling sometime, have been trying use timeintervalsincedate but not behaving. m file: #import "viewcontroller.h" @interface viewcontroller() @end @implementation viewcontroller //warning: method definition 'timeintervalsincedate:' not found -(ibaction) setbuttontapped:(id)sender { nsdateformatter *dateformatter = [[nsdateformatter alloc] init]; nsstring *datetimestring = [dateformatter stringfromdate: datetimepicker.date ]; nslog( @"set button tapped : %@", datetimestring ); nsdate* currentdate = [nsdate date]; nstimeinterval secs = [datetimestring timeintervalsincedate:currentdate]; //error: no visible @interface 'nsstring' declares selector 'timeintervalsincedate:’ nslog(@"seconds %f", secs); [self schedulelocalnotificationwithdate: datetimepicker.date]; [self presentmessage:@"succesfully set!"]; } - (void)didreceivememorywarning { [super didreceivememorywarning]; // dispos...

javascript - How to get a filtered angular string as a js function parameter? -

i want have string goes through angular's filter parameter javascript function. angular doesn't parse it, how fix this? <input type="text" ng-required="true" ng-model="foobar" oninvalid="this.setcustomvalidity({{ 'string' | myfilter }})"> the {{ .. }} not go through angular's parsing. if remove double quotation marks still doesn't work angular 'fixes' oninvalid="this.setcustomvalidity( " {{ also, if there another, more angular way of customizing browser validation message, trick me also. you might want read angular documentation input , in particular example plunker provides solution question. if still want hint on use filter in argument please provide information oninvalid directive.

razor - Calling TagHelpers from another TagHelper? -

is there way taghelper render taghelper? example taghelpers; public class outertaghelper : taghelper { public override void process(taghelpercontext context, taghelperoutput output) { output.tagname = ""; output.content.setcontent("hello <inner></inner>"); } } public class innertaghelper : taghelper { public override void process(taghelpercontext context, taghelperoutput output) { output.tagname = ""; output.content.setcontent("world!"); } } example view; <outer></outer> expected result; hello world! i know should use viewcomponent instead, @ possible achieve expected behavior presented above? @daniel j.g. right, not recommended. technically if ran content through highly customized razor parser , executed content if page - it's wrong approach problem.

Graphic in google charts php mysql not working -

i having problems output of graphic. graphic appears empty. want construct graphic shows number of users registered in year/month. the values getting database are: example: id=1 , registado = 2014-05-04 id=2 , registado = 2014-07-09 the code divide in 2 files 1 fields database , functions call graphic , query put data in graphic. the output query: 1 may 20148 jul 201411 aug 2014 the respective code: getpiechartdata.php <?php $dbuser="root"; $dbname="dissertacao"; $dbpass=""; $dbserver="localhost"; $sql_query = "select id,registado,monthname(registado), year(registado), sum(id) utilizadores group year(registado), month(registado)"; $con = mysql_connect($dbserver,$dbuser,$dbpass); if (!$con){ die('could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $result = mysql_query($sql_query); $total_rows = mysql_num_rows($resu...

scala - Scalaz Writer Monad and filterM -

i working way through learning scalaz , learn haskell greater good , wonder how translate filterm example lyahfgg scala. fst $ runwriter $ filterm keepsmall [9,1,5,2,10,3] with keepsmall defined as keepsmall :: int -> writer [string] bool keepsmall x | x < 4 = tell ["keeping " ++ show x] return true | otherwise = tell [show x ++ " large, throwing away"] return false my naive approach ends compilation errors , have no clue how go around issue! val keepsmall: (int => writert[id, vector[string], boolean]) = (x: int) => if (x < 4) { _ <- vector("keeping " + x.shows).tell } yield true else { _ <- vector(x.shows + " large, throwing away").tell } yield false println(list(9,1,5,2,10,3) filterm keepsmall) compilation errors: error:(182, 32) no type parameters method filterm: (p: int => m[boolean])(implicit evide...

Dealing with returned JSON data from PHP - AJAX JQUERY -

i've been trying retrieve json data php. have html table opens modal. i'm passing id of data in row via ajax post, within php file plan relevant row in database using passed id , return information dispaly in modal. ive been trying return id along temp values. javascript: var id = recipient; console.log("id: " + id); var idobject = { id: id } $.ajax({ url: "json.php", type: "post", data: idobject, datatype: "json", contenttype: "application/json" }) json.php: <?php $id = $_post["id"]; $firstname = "firstname"; $lastname = "lastname"; $email = "email@hotmail.co.uk"; if(isset($id)){ $data = array( "id" => $id, "firstname" => $firstname, "lastname" => $lastname, "email" => $email ); echo json_encode($da...

hex - Java - Convert Big-Endian to Little-Endian -

i have following hex string: 00000000000008a3a41b85b8b29ad444def299fee21793cd8b9e567eab02cd81 but want this: 81cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000 (big endian) i think have reverse , swap string, doesn't give me right result: string hex = "00000000000008a3a41b85b8b29ad444def299fee21793cd8b9e567eab02cd81"; hex = new stringbuilder(hex).reverse().tostring(); result: 81dc20bae765e9b8dc39712eef992fed444da92b8b58b14a3a80000000000000 (wrong) 81cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000 (should be) the swapping: public static string hexswap(string orighex) { // make number hex biginteger orig = new biginteger(orighex,16); // bytes swap byte[] origbytes = orig.tobytearray(); int = 0; while(origbytes[i] == 0) i++; // swap bytes byte[] swapbytes = new byte[origbytes.length]; for(/**/; < origbytes.length; i++) { ...

jquery - Why ajax call not hit the action method in MVC? -

[![enter image description here][1]][1]i working on assignment , ajax call not hit action method. debugged , check not reach action method.here code. $.ajax({ type: "post", cache: false, contenttype: "application/json; charset-utf-8", data: json.stringify(obj), datatype: "json", url: "/admin/workflow/save?id=" + id + "&template=" + template, success: function() { alert("success"); }, error: function(xhr) { alert("data not saved"); } it show data not saved. worked fine don't know happen. here actin method public jsonresult save(int id, int template, list<sequence> data) problem resolved. fine. issue data not converted correctly in json. checked json, there problem in array (obj) stringfy in json. corrected objtasktemplate.it works...

php - can i open my own dialog box within javascript and pass value object? -

i want run dialog box code , pass value object it. when click link value object passed correctly. if there way call div ="#mymodel" , pass value it. <!-- modal --> <div class="modal fade" id="mymodal" role="dialog"> <div class="modal-dialog"> <!-- modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="btn btn-default" style='float: right;' data-dismiss="modal"><span class="glyphicon glyphicon-remove-circle"></span></button> <a href="#" class="btn btn-default" style='float: right;'> <span class="glyphicon glyphicon-trash"></span> </a> <a href="#" class="btn btn-default" style='float: right;...

algorithm - Find the minimum set of vertices in a DAG that disconnects a certain fraction of paths -

the problem given follows: given dag , number 0 < p ≤ 1 , return minimum-cardinality set of vertices disconnects @ least p -fraction of paths source (i.e., no incoming arcs) sink (i.e., no outgoing arcs). p = 1 , problem equivalent minimum cut. other values of p , however, i'm not sure answer be. an algorithm i'm thinking of first compute min-cut set dag , try prune satisfy criteria. interesting see if subset find minimum cut-set specific p given. problem algorithm is wasteful, because computes many nodes don't need in final answer , in fact, solving "bigger" problem in first place. any pointers solution of problem? wouldn't possible of algorithms of min-cut, put constraint early-stopping criterion? for checking how many paths removed, suppose have indexed each vertex (and keep updated if needed) know how many paths disconnected removal. please not worry complexity of index being updated. 1 last thing, there no constraint on resulting components ...

jsf - Simulation of f:viewAction on master page template -

there application scoped bean. @named @applicationscoped public class bean { @inject private service service; private entity entity; // getter. // entity periodically fetched ejb timers on server side // when fetched notifies associated clients through websockets. // clients update sending ajax request. // of these things collectively form different chapter. // update() needs invoked, when client sends synchronous request public bean() {} @postconstruct private void init() { consume(); } private void consume() { entity = service.getentity(); } public void update() { consume(); system.out.println("update called."); } } this bean accessed page included in master template follows ( west.xhtml ) : <html lang="#{localebean.language}" xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f=...

ios - UIStoryboardSegue sourceViewController above destinationViewController -

i want "slide out" view controller above destinationviewcontroller segue. code: override func perform() { let src = self.sourceviewcontroller let dst = self.destinationviewcontroller dst.view.superview?.insertsubview(src.view, abovesubview: dst.view) src.view.transform = cgaffinetransformmaketranslation(0, 0) uiview.animatewithduration(0.25, delay: 0.0, options: uiviewanimationoptions.curveeaseinout, animations: { src.view.transform = cgaffinetransformmaketranslation(src.view.frame.size.width * -1, 0) }, completion: { finished in src.presentviewcontroller(dst, animated: false, completion: nil) } ) } the slide looks good, destinationviewcontroller black during animation, when animation completed destinationviewcontroller shown correctly. how can make display during segue animation? edit: solved it: override func perform() { let src = self.sourceviewcontroller ...

activeperl - Perl not recognised as a command -

i have installed activeperl 5.20.2 build 2002. however, when open command prompt window , type command perl -v, obtain message: 'perl' n'est pas n'est pas reconnu en tant que commande interne ou externe,...i.e 'perl' not not recognized internal or external command. in list of programs installed, activeperl appears. confused. can me please??

laravel - how can I edit image in tiny mce editor -

i using tinymce text editor in laravel , have 2 textareas in index.blade.php file. when adding images , text, should added database perfectly. when click edit button not working. i try show editor colorbox. unable show images , text textarea. how can solve it. index.blade.php <div class="middle-containers"> <form method="post" id="form" action="{{url::to('project/postfaq')}}" enctype="multipart/form-data"> <ul class="middle-left" style="width:74%;"> @foreach($faqs $key=>$faq) <li> <label class="titl-left-side col-md-3" >{{trans('messages.faq')}} #{{$key+1}}</label> <div class="col-md-9"> <ul class="amont-bar"> <li> ...