Posts

Showing posts from September, 2010

java - AWS Lambda Package Native Executable with JAR -

i have app runs on jvm, provided fat jar. needs invoke native linux binary, example ffmpeg . directory structure zip file need contain in order package both jar , executable together? cannot find documentation, code examples using build tools have not worked with. let's pretend name of lambda blah . hoping answer like: deployable jar contains: + blah/ # contains fat jar + lib/ # contains ffmpeg here bash script wrote not work. puts fat jar , native executable in dist/ directory before zipping them together. fatjar=blah-assembly-0.0.4.jar mkdir -p dist/ rm -f dist/* rm -f $deployed_zip cp $fatjar dist/ cp /usr/local/bin/ffmpeg dist/ (cd dist && zip -r $fatjar ffmpeg && mv $fatjar ../$deployed_zip) any structure of zip file long native binary included in package appears in path or invoked through full path. in both cases means must update java code in 1 of following ways: modify path environment variable or call binary full path. as

google chrome os - What will be the side-loading and debugging mechanism for Android apps on ChromeOS? -

i've gone through on http://www.chromium.org/chromium-os/android-apps , watched io video , there doesn't seem mention of side-loading (and debugging) mechanism available developing/testing android apps on chromeos be? i know arc used adb on desktops not chromebooks given new implementation different , full android framework in linux container , has access usb, adb available prupose? using adb useful remote debugging since devtools runs adb client edit: of 9 aug 2016 there official documentation available . unless in developer mode, won't able enable unknown sources. in order side load apps need put device developer mode (instructions here - follow steps chromebook pixel 2015). once in dev mode, go chrome settings > app settings > security > unknown sources (move right) after enabling developer mode can side load apps in 1 of 2 ways: upload .apk google drive or send via email, , open android app equivalent (drive , gmail respectively)

java - Android SignalR should be implemented as Service or IntentService? -

on android app, i'm implementing signalr connection ( https://github.com/erizet/signala ) connect hub server send requests , receive responses. a sample of code follows: signalaconnection = new com.zsoft.signala.connection(constants.gethuburl(), this, new longpollingtransport()) { @override public void onerror(exception exception) { } @override public void onmessage(string message) { } @override public void onstatechanged(statebase oldstate, statebase newstate) { } }; if (signalaconnection != null) signalaconnection.start(); there's sending bit signalaconnection.send(hubmessagejson, new sendcallback() { public void onerror(exception ex) { } public void onsent(charsequence message) { } }); the sending , receiving occur across activites, , responses sent @ random times regardless of activity, also, connection should opened long app running (even if app running in background) that's w

Overriding classes in Java -

can use classloader's definepackage override packages inside jar? for example, application contains "javax.xml.bind" abc.jar. if call classloader.definepackage(def.jar), in def.jar contains version of javax.xml.bind, can replace classpath entire application point of def.jar? thanks. no, can not use classloader.definepackage "override" packages inside jar. if understand correctly, want make jvm load class under javax.xml.bind def.jar while other ones abc.jar. in case can (in personal order of preference): 1) put def.jar before abc.jar in classpath. requires no class want loaded abc.jar present in def.jar. 2) unzip def.jar, abc.jar, or both, , remove conflicting classes irrelevant jar comes first in classpath. re-zip them. or can on 1 jar , put before other. 3) use configurable classloader (sorry, no public domain 1 know of; let me know if find one). interesting topic os project, except several initiatives similar (but broader) obj

c# - How do I enforce test isolation in MSpec when static members/methods are required? -

ok. i'm trying wrap head around why mspec uses static methods / variables. (well not static methods, member variable delegates, it's practically same). this makes impossible reuse contexts. or go through , make sure static variables reset manually. has no enforcement on test isolation. if 1 test sets variables , next 1 checks it, it'd pass when shouldn't. this starting annoying. in 1 "because" statement should stay there, not carried through every other random test because it's sharing same context. edit- the question is, how "enforce" test isolation. example, @ specs below, sharing foocontext . let's take wild guess if should_not_throw passes? public class foocontext { establish context = () => subject = new foo(); public static foo subject; public static int result; public static exception ex; } public class when_getting_an_int_incorrectly : foocontext { because of = () => ex = exception.catch(() =

android - JSON with french character in raw folder -

i have json file in raw folder name of school.json. want parse json using following code , put in listview gives me unknown character in list because of french character in json file. how fix french character. { "records" : { "record" : [ { "row" : { "a" : "collège", "b" : "8/22/2013", "c" : "8/23/2013" } }, { "row" : { "a" : "collège", "b" : "8/23/2013" } }, { "row" : { "a" : "d'anjou", "b" : "8/23/2013" } }, { "row" : { "a" : "collège", "b" : "8/26/2013" } }, { "row" : { "a" : &q

c# - UC with items defined into xaml? -

i'm trying create user control accepts collection of items directly xaml (without binding datacontext), combobox: <combobox> <comboboxitem content="test"/> <comboboxitem content="test2"/> <comboboxitem content="test3"/> </combobox> also, in class of control, want receive list of items inputed inside uc on xaml. possible? ** edit ** i need receive more 1 list, say, 3 lists: <mycontrol> <mycontrol.firstcollection> <mycontrolitem content="test"/> <mycontrolitem content="test2"/> <mycontrolitem content="test3"/> </mycontrol.firstcollection> <mycontrol.secondcollection> <mycontrolitem content="test4"/> <mycontrolitem content="test5"/> <mycontrolitem content="test6"/>

Ignoring lines in a file TCL -

suppose have file1 few queries inside, query 1 query 2 query 3 and have normal text file2 containing bunch of data data 1 query 1 something data query 2 something query 3 something data1 continue no query data2 continue no query how create loop such ignores lines containing queries file1 , prints lines without queries in file? in case these values gets printed data1 continue no query data2 continue no query i tried producing results using loop script made storing queries ignored file1 $wlistitems set openfile1 [open file1.txt r] while {[gets openfile1 data] > -1} { set wlist $data append wlistitems "{$wlist}\n" } close $openfile1 processing file2 print lines without ignored queries set openfile2 [open file2.txt r] while {[gets $openfile2 data] > -1} { {set n 0} {$n < [llength $wlistitems]} {incr n} { if {[regexp -all "[lindex $wlistitems $n]" $data value]} { continue } puts $data } } close $openfile2 however, script not skip lines.

javascript - How to use a for loop through unknown value -

i have array shown below. within javascripti need console out customer numbers, of objects existing employees not have customer , therefore not consoling out of employees. help! i have tried doing if(!tickets[k].customernumber){console.log{"undefined")} still not seem work. for (var k = 0; k < tickets.length; k++) { console.log(tickets[k].name) [ { id: 506652, name: 'sara johns', age: '26', occupation: 'architect', status: 'new', customernumber: 26222234 }, { id: 502452, name: 'emily johnson', age: '22', occupation: 'architect', status: 'existing' }, { id: 326652, name: 'claire stevens', age: '23', occupation: 'junior architect', status: 'new', customernumber: 26222234 } this print customernumber s, skipping records not have one: tickets.filter(function(item) { return item.customernumber; }).fore

javascript - display top left corner of div relative to mouse click event -

using javascript (jquery not available here) how display top left corner of div relative mouse click location? following seems work until have scroll page , becomes inaccurate. function myjsfx() { var div1 = document.getelementbyid('notecontent'); div1.style.display = "block"; div1.style.top = event.clienty + 'px'; div1.style.left = event.clientx + 'px'; } use window.scrolly , window.scrollx scrolling offsets. can subtract the window scroll position values have relative position value.

Azure blob streaming video - ASP.NET MVC -

i using azure block blob , making sure setup content type video/mp4 when uploading video asp.net mvc application. i'm using videojs framework stream video. problem is, cannot forward video or use other controls such going in video. i have read various posts on how server might not willing accept partial content requests (206) after initial request , in other cases, content type might not set. here's example video i'm trying render: https://qasimalishah.blob.core.windows.net/videoscontainer/2016-may-25-02-52-59_realize%20your%20love%20to%20family%20qasim%20ali%20shah%20urdu%20hindi%20waqasnasir.mp4 on page page cannot forward example. this how i'm rendering on view <video id="really-cool-video" class="video-js vjs-default-skin" controls poster="@model.mediathumbnailurl" preload="auto" style="width: 100%; min-height: 380px; height: 100%;" data-setu

ios - Ambiguous reference to member '(_:numberOfRowsInSection:)' -

i'm trying get gists github , pop them in table view, here's entire code, gist class defined elsewhere: var gists = [gist]() override func viewdidappear(animated: bool) { loadgists() } func loadgists() { githubapimanager.sharedinstance.fetchpublicgists() { result in guard result.error == nil else { print("error 1") return } if let fetchedgists = result.value { self.gists = fetchedgists } self.tableview.reloaddata() //error here. } } func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int { return gists.count } func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecellwithidentifier("cell")! let gist = gists[indexpath.row] cell.textlabel?.text = gist.description cell.detailtextlabel?.text = gist.ownerlogin

Why do variations of this t.test require different coding? (R) -

new r , trying head around it's coding (new coding in general) my question is, running t-tests (paired , independent) have change formula recognise columns. following both work; 'paired' code not work if styled 'independent' code (with data = ''). independent: t.test(nicotine ~ brand, data = nicotine, alternative='two.sided', conf.level=.95, var.equal=false) paired: with(omega3, t.test(before, after, paired = true, alternative='greater', conf.level=.95)) why happen? ideally i'd prefer not use with formula, cannot understand why not recognize "before" , "after" when add argument data = omega3 any insight appreciated. thom it has way data used function. when you're using formula, you're telling r: "use variable predictor (independent var), , other 1 outcome (dependent var)". in case of independent samples t-test, you'd have: continuous.variable ~ dichotomous.variable (

python - How to tell If Expression to return an empty string in Jinja2 -

i have input tag of date type value want set '' if dictionary doesn't contain isodate. if dictionary contain isodate, formats isodate string displayed correctly: <input type="date" value="{% '' if mydict['date']=='' else mydict['date'].strftime('%y-%m-%d')%}"> but error message: templatesyntaxerror: tag name expected i appreciate advice. it should double curly braces {{ your_expression }} <input type="date" value="{{ '' if dict['date']=='' else dict['date'].strftime('%y-%m-%d') }}">

JSON Array Name Change in Python -

i need change name of json array @ beginning of json "data" in python. right receiving , printing out json this: c = db.cursor() c.execute('select * stuff') return json.dumps(c.fetchall()) here json: [ { status: "f", id_num: "001", }, { status: "t", id_num: "002", }, { status: "t", id_num: "003", } ] what need insert "data": right before first square bracket indicating array? just wrap list in new dictionary: return json.dumps({'data': c.fetchall()})

oracle - Error when execuuting Before Insert Trigger -

i have oracle, apex application masterdetail form. need beforeinsert trigger details part of form. need populate fields beforeinsert_charges data table (ahar_partslabor) have far yet keeps giving me message error: ora-04082: new or old references not allowed in table level triggers. create or replace trigger beforeinsert_charges before insert on ahar_repairorder_charges --declarar variables --t_charges_type in char(11); --t_charges_price in number; --t_charges_discount in number; --validar que el char_code ingresado por el usuario exista begin --select para pasar los valores de partslabor charges select (partlabor_type, partlabor_price, partlabor_discount) (:new.charges_type, :new.charges_price, :new.harges_discount) ahar_partslabor :new.charge_code = partlabor_id; end; in order able change :new values have use "for each row" trigger: create or replace trigger beforeinsert_charges before insert on ahar_repai

Php codeigniter:Passing empty arguments through redirect -

here controller function class customer extends ci_controller{ public function view($page='customer-new-bill',$param=null,$type='normal') { } } sometimes don't want have value $param argument empty second parameter using way in redirect redirect('customer/view/customer-view-invoice//invoice'); but didn't worked. i want pass empty parameters through redirect possible? note: i used method $this->view('','','invoice') worked need redirect if want send null parameters send @ end class customer extends ci_controller{ public function view($page='customer-new-bill',$type='normal', $param=null) { } } and use route $route['customer/view/(.*)'] = "customer/view/$1/$2"; the route (.*) work unlimited perimeters.

linux - Java MappedByteBuffer performance getting worse and worse when you change the map size continuously -

recently had tests java mappedbytebuffer. found if continuously map same file , read it, time spend in reading getting longer , longer. if didn't change map size, faster use same map size in map size variation test. i hava file "datafile" in 1gb filled integers. private final file datafile = new file("~/testfile"); private final int intnum = 1024 * 1024 * 1024 / 4; // 1gb integers @test public void writefile() throws exception { dataoutputstream dos = new dataoutputstream(new bufferedoutputstream(new fileoutputstream(datafile))); (int = 0; < intnum; i++) { dos.writeint(randomutils.nextint()); } dos.close(); } and method reading it // read datafile in loop fixed map size private void buffersizeperformancetest(final int buffsize) throws exception { stopwatch stopwatch = stopwatch.createstarted(); filechannel fc = new randomaccessfile(datafile, "r").getchannel(); mappedbytebuffer buffer; final int r

multithreading - Work with Thread::Semaphore.Limit the number of threads -

i can not deal semapfor. run, passed on 1 stream? in fact, variable $ n randomnaya taken 0 2 . when condition $ n = $ (# $ num - stream number), message, flow $ num smokes. others (# $ n! = $ num) should skipped. message "trade not smoke." situation passes threads @ once , not necessary, deduces flow $ num smokes (# in fact gives correct number, not fit situation). #! usr/bin/perl -w use strict; use warnings; use 5.010; use threads; use threads::shared; use thread::semaphore; $sem = thread::semaphore->new(1); $n = int rand(3); $n; $shr : shared = 1; $threads = 2; @threads; $t ( 0 .. $threads ) { push @threads, threads->create( \&smoke, $t ); } # Дожидаемся окончания работы всех потоков $t (@threads) { $t->join(); } sub smoke { $num = shift; $sem->down; "+thread $num started"; sleep 1; if ( $num = $n ) { sleep 2; "thread $num -- smoke"; } "-thread $num done. \n"; if ( $num != $n ) { &qu

How can I install realm cocoa converter for swift into my app project -

can assist me in installing new realm cocoa converter csv files. how add project? downloaded github here: https://github.com/realm/realm-cocoa-converter i'm creator of realm cocoa converter. :) at moment, converter works os x apps, since designed integrated realm browser. if you're looking @ integrating ios apps, it's not set yet. we're looking @ adding ios support can, we're busy on few other things @ moment. aside that, if you're running os x app, dejan said, can install via cocoapods, or manually drag , link dynamic framework app project.

c# - How to style TextBox headers with multiple colors in Xaml UWP? -

Image
i have lot of textboxes (100's) , want style them such part of textbox color , other in certain. the above image states need. asterisk red in color. i have achieved using code <textbox.header> <textblock > <run >card number</run><run foreground="red">*</run> </textblock> </textbox.header> but have many textboxes can write style achieve this? content of header dynamic wondering how can this? alright achieved creating below styling. <style x:key="mandatorytextbox" targettype="textbox"> <setter property="headertemplate"> <setter.value> <datatemplate> <textblock> <run text="{binding}"></run><run foreground="red">*</run> </textblock> </datatemplate> </setter.value> <

c# - summing values of a column based on id -

Image
i have table keeps track of users online time. e.g. if user logs in @ 10:00 , leaves @ 10:30 1 record userid, login-time, logout-time , date. user comes again @ 11:05 , goes @ 11:50.that record. want sum of time each user each day. using entity-frame work, c#, here data structure id     userid     logintime     logouttime       date 1       1           10:00              10:20           11-06-2015 1       1           10:30              10:50           11-06-2015 1       1           09:00              10:00           12-06-2015 1       1           10:15              11:00           12-06-2015 output for 11-06-2015 should 40 minutes 12-06-2015 should 105 first, created single table database mimic data structure: static void createandseeddatabase() { context context = new context(); timetracker entry1 = new timetracker() { useri

php - select query for date between -

i doing project have fetch data of between dates plus name of user. query date between is working fine and operater going in wrong way please suggest me how implement achieve desired output. code: $qry11=mysqli_query($con,"select * entry (create_date between '$first' , '$second') && cnor='$nme'"); so please suggest ne how this....any idea appreciate highly gratitude. && should replaced with and you seem using and in query right (create_date between '$first' , '$second')

python - What does ** (double star/asterisk) and * (star/asterisk) do for parameters? -

in following method definitions, * , ** param2 ? def foo(param1, *param2): def bar(param1, **param2): the *args , **kwargs common idiom allow arbitrary number of arguments functions described in section more on defining functions in python documentation. the *args give function parameters as tuple : in [1]: def foo(*args): ...: in args: ...: print ...: ...: in [2]: foo(1) 1 in [4]: foo(1,2,3) 1 2 3 the **kwargs give keyword arguments except corresponding formal parameter dictionary. in [5]: def bar(**kwargs): ...: in kwargs: ...: print a, kwargs[a] ...: ...: in [6]: bar(name='one', age=27) age 27 name 1 both idioms can mixed normal arguments allow set of fixed , variable arguments: def foo(kind, *args, **kwargs): pass another usage of *l idiom unpack argument lists when calling function. in [9]: def foo(bar, lee): ...: print bar, lee ...

bash - How can I use addhour for custom date? -

i have string conf file (lets call example date1): #!/bin/bash # example date1="201605250925" datenow="$(date +%y%m%d%h%m -d "+1hour")" date2=$(date +%y%m%d%h%m -d "$date1 + 1hour") # not work? echo "$date1 --> $date2" # work! echo "$date1 --> $datenow" i need add 1 hour. getting error this: date: invalid date `201605250925 + 1hour' but work datenow . how can user addhour custom date format string? you need format meets command date expectations, like: 2016-05-25 09:25 the space denote start of time , time format hh:mm. comes international iso 8601 , using space instead of t. if format fixed, can use bash internal capacities (no external command except date used) change this: #!/bin/bash d1="201605250925" dc="${d1:0:8} ${d1:8:2}:${d1:10:2}+0" d2=$(date +'%y%m%d %h:%m' -ud "$dc + 1 hour" ) echo "$d2" or posix ly (dash) no call needed

c# - Login validation by using different tables having each email and password -

i have 4 tables student,tpo,admin,campany , each table having coloumn email , password when user entered values in login page i.e email text , password text validation query check tables , table having proper email , password can login if login credential belongs tpo tpo page can appear , if login credential belong student student can appear other process can done in same way.my form code asp.net , backed c#. create procedure pro_login logic create procedure pro_login @email varchar(max), @password varchar(max) begin if exists(select userid student userid=@email , password=@password) begin select 1 end else if exists(select userid tpo userid=@email , password=@password) begin select 2 end else if exists(select userid admin userid=@email , password=@password) begin select 3 end else if exists(select userid campany userid=@email , password=@password) begin select 4 end end & write code in your.cs page int

How to get start and end dates of a sprint using jira api? -

below url giving information except start , end dates of sprint . http://jira.example.com/rest/api/2/search?fields=assignee,key,summary,worklog,timeoriginalestimate,aggregatetimespent,&jql=project=blah+and+sprint=57 assuming you're recent version of jira , jira software, can use jira agile rest api's . interesting rest api resources are: get issue : /rest/agile/1.0/issue/{issueidorkey} output of resource include agile fields , sprint name , id, e.g.: ... "sprint": { "id": 37, "self": "http://www.example.com/jira/rest/agile/1.0/sprint/13", "state": "future", "name": "sprint 2" }, ... get sprint : /rest/agile/1.0/sprint/{sprintid} output of resource include sprint start , end dates, e.g.: { "id": 37, "self": "http://www.example.com/jira/rest/agile/1.0/sprint/23", "state": "closed", "nam

alias - SQL-Duplicate column names -

i using sql developer , trying outer join on 2 tables. error showing "duplicate column names". have used table nameswhile comparison still giving error. code following: create view oecd_view select * dm_oecd_gdp full outer join dm_oecd_doctors on dm_oecd_gdp.data_year = dm_oecd_doctors.data_year; i have heard error can resolved aliasing don't know how alias while comparing. can done? thanks you have explicitly name returned fields both tables , alias fields having same name, like: create view oecd_view select dm_oecd_gdp.data_year gdp_data_year, dm_oecd_doctors.data_year doc_data_year, ... rest of fields here dm_oecd_gdp full outer join dm_oecd_doctors on dm_oecd_gdp.data_year = dm_oecd_doctors.data_year;

ios - What technology to use to build Apple Watch's Siri Waveform -

i'm building music player ios. want have visualizer, similar waveform of siri on apple watch . i've found open source project on github looks promising. uses core graphics drawing , quite simple understand. uses ~50% of cpu on iphone 6 , high amplitudes can't achieve 60 fps. there way achieve effect using uikit or spritekit improved performance (notice blending effect - it's important)? also, author of project says fft (in todos). spent day understand fft, i'm still not sure how can in case achieve effect (or maybe become more performant). ideas? you can use siriwaveview . download github. then can make instance of like, siriwaveview = [[scsiriwaveformview alloc]initwithframe:cgrectmake(20, (self.view.frame.size.height/2) - 160 + 120, self.view.frame.size.width - 40, 80)]; //you can set desired frame siriwaveview.backgroundcolor = appgraycolor; then can set properties like, [siriwaveview setwavecolor:mycolor]; //desired color [s

javascript - dropdown list with user input calculation -

basically, want use dropdown list value in calculation user input, when add dropdown value it's either nan or not giving value. did try calculate based on index select , value change integer did not work. appreciated <div id="stock" style="padding-top:15px"> <label>text stock</label> <select name="textstock" id="textstock"> <option value="none">select stock</option> <option value="50gsm">50gsm(£0.10)</option> <option value="120gsm">120gsm(£0.15)</option> <option value="150gsm">150gsm(£0.20)</option> <option value="200gsm">200gsm(£0.30)</option> <option value="250gsm">250gsm(£0.40)</option> </select> </div> the commented bit last working tried didn't work var textstock = new array(); textstock["none

ios - Save EVObjects with CoreData -

i need save data coredata. thats not problem @ all. problem is, data created evreflection therefore inherits class evobject. save gathered data coredata have inherit nsmanagedobject. problem swift not allow inherit multiple classes. appreciate tips. class device : evobject { var channel : [channel] = [channel]() var name : string = "" var ise_id : int = 0 var unreach : bool = false var sticky_unreach : bool = false var config_pending : bool = false override internal func propertymapping() -> [(string?, string?)] { return [("name", "_name"), ("ise_id", "_ise_id"), ("unreach", "_unreach"), ("sticky_unreach", "_sticky_unreach"), ("config_pending", "_config_pending")] } } you don't have inherit. can extend them. example: class user : nsmanagedobject{ @nsmanaged ..... } //extension import evreflection extension use

Running CakePHP unit tests including code coverage in PHPStorm -

i've been following excellent article set unit testing cakephp application within phpstorm. few minor tweaks test runner, i've got working reasonably well. the last piece puzzle code coverage report working i'm not sure begin really. this coverage report being generated @ moment. <?xml version="1.0" encoding="utf-8"?> <coverage generated="1376039830"> <project timestamp="1376039830"> <metrics files="0" loc="0" ncloc="0" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/> </project> </coverage> my gut feeling custom runner dropping information somewhere. has managed achieve yet?

visual studio - Powershell Set-AzureDeployment fails with a StorageException -

i use powershell script "publishcloudservice.ps1" http://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/ deploy cloud projects. somehow, 1 project doesn't deploy , following error message: set-azuredeployment : unable write data transport connection: existing connection forcibly closed remote host. @ d:\users\4711\untitled1.ps1:78 char:22 + $setdeployment = set-azuredeployment -upgrade -slot $slot -package $packagel ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryinfo : closeerror: (:) [set-azuredeployment], storageexception + fullyqualifiederrorid : microsoft.windowsazure.management.servicemanagement.hostedservices.setazuredeploymentcommand the affected command is: set-azuredeployment -upgrade -slot $slot -package $packagelocation -configuration $cloudconfiglocation -label $deploymentlabel -servicename $servicename -force deploying project manual using publish dia

Firebase confirmation email not being sent -

i've set firebase email/password authentication successfully, security reasons want user confirm her/his email. says on firebases website: when user signs using email address , password, confirmation email sent verify email address. but when sign up, doesn't receive confirmation email. i've looked , can find code sending password reset email, not code sending email confirmation. i've looked here: https://firebase.google.com/docs/auth/ios/manage-users#send_a_password_reset_email anyone got clue how can it? i noticed new firebase email authentication docs not documented. firebase.auth().onauthstatechanged(function(user) { user.sendemailverification(); }); do note that: you can send email verification users object whom created using email&password method createuserwithemailandpassword only after signed users authenticated state, firebase return promise of auth object. the old onauth method has been changed onauthstatechanged .

SYMFONY KnpMenuBundle - Where can I find more insight about "others rendering options"? -

i having @ doc of knpmenubundle symfony, in part: knpmenu others rendering options ; lists bunch of options can used when rendering menu thru twig file this: {{ knp_menu_render('appbundle:builder:mainmenu', {'depth': 2, 'currentaslink': false}) }} {{ knp_menu_render(menuitem) }} i wondering options do, wondering "currentaslink" one. can't find link options have been detailed. have more explanation functionalities ?

java - Android - cannot inherit from final GestureDetectorCompat -

i receive error "cannot inherit final gesturedetectorcompat" when change api version in gradle file. if use api 22 works fine if use api 23 i've got error, why? here code: file clickitemtouchlistener.java package com.ddfilms.dado.recyclerview.utils; import android.content.context; import android.os.build; import android.support.v4.view.gesturedetectorcompat; import android.support.v4.view.motioneventcompat; import android.support.v7.widget.recyclerview; import android.support.v7.widget.recyclerview.onitemtouchlistener; import android.view.gesturedetector.simpleongesturelistener; import android.view.motionevent; import android.view.view; abstract class clickitemtouchlistener implements onitemtouchlistener { private static final string logtag = "clickitemtouchlistener"; private final gesturedetectorcompat mgesturedetector; clickitemtouchlistener(recyclerview hostview) { mgesturedetector = new itemclickgesturedetector(hostview.getcon

How to submit current form in ng-repeat angularjs -

i need not able access $scope.mainform.subform.submitted property in script. html goes below. <div ng-form="mainform"> <div ng-repeat="dependent in dependentdetails"> <ng-form name="subform"> <input type="text" class="textbox" ng-model="dependent.firstname"/> @*same goes other personal details*@ <input type="button" id="submitbutton" value="save" ng-model="submit" ng-click="savedependentdetailsclick($event, $index, dependent)" /> </ng-form> </div> </div> can help? first of all, think it's not correct use <ng-form name="subform">...</div> in ng-repeat in way have used because end multiple forms having same name( subform ) within same scope therefore can't refer

ios - Where is the FIReventNames.h file listing the various event classes for Google Firebase? -

we want log event in google firebase in yahoo flurry: [flurry logevent:@"stats page visited"]; how? google firebase documentation claims find " suggested events see fireventnames.h header file " unable find file. where find file? searching project in xcode - don't see though have installed pod files firebase/analytics. search google , there essentially nothing . there five results. not 5 pages. 5 results . 3 of results duplicates of page linked above. if @ ios samples, contribute nothing additional. google's sample code gives 3 examples logging firebase events , exact same examples on page referenced above. none seem show trying above. we seem unable find of other classes various event types. where find suggested firebase analytic event logging classes? fireventnames.h can found in pods/firebaseanalytics/frameworks/firebaseanalytics.framework/headers to log event firebase analytics, first : @import firebaseanalytics;

data structures - Inserting into Sorted LinkedList Java -

i have code below inserting new integer sorted linkedlist of ints not think "correct" way of doing things know there singly linkedlist pointer next value , doubly linkedlist pointers next , previous value. tried use nodes implement below case java importing import org.w3c.dom.node (document object model) got stuck. insertion cases insert empty array if value inserted less everything, insert in beginning. if value inserted greater everything, insert in last. could in between if value less than/greater values in ll. import java.util.*; public class mainlinkedlist { public static void main(string[] args) { linkedlist<integer> llist = new linkedlist<integer>(); llist.add(10); llist.add(30); llist.add(50); llist.add(60); llist.add(90); llist.add(1000); system.out.println("old linkedlist " + llist); //what if want insert 70 in sorted linkedlist linkedlist<integer> newllist = insertsortedll(llist, 70); system.out.println("new linkedl

asp.net mvc - Angular 2 strings remain undefined on first iteration -

i'm trying fetch object server via http.get , works strings remain undefined on first iteration. the full object the integers ok, problem strings. this.http.get("/home/getroom", { headers: headers }).map(res => res.json()).subscribe(q => { this.timecount = q.timeperquestion; this.player1id = json.stringify(q.player1id); this.player2id = q.player2id; }, err => console.error(err), () => console.log('complete')); after first iteration of function strings shown. edit: this class: class appcomponent implements afterviewinit { public answered = false; public title = "loading question..."; public options = []; public correctanswer = false; public working = false; public timecount=15; public timer; public roomid; public player1id; public player2id; constructor( @inject(http) private http: http, private ref: changedetectorref) { } nextquestion() { this.working = true; this.answered = false; this.ti

java - Sonarqube: Missing blame information for the following files -

i getting warning missing blame information following files during analysis sonarqube. [info] [22:19:57.714] sensor scm sensor [info] [22:19:57.715] scm provider project is: git [info] [22:19:57.715] 48 files analyzed [info] [22:19:58.448] 0/48 files analyzed [warn] [22:19:58.448] missing blame information following files: (snip 48 lines) [warn] [22:19:58.449] may lead missing/broken features in sonarqube [info] [22:19:58.449] sensor scm sensor (done) | time=735ms i using sonarqube 5.5, analysis done maven in jenkins job, on multi-module java project. git plugin 1.2 installed. manually running git blame in bash shell, on of offending files, gives expected output. related questions found svn, issue git. how git blame information on sonarqube? the cause jgit bug . jgit not support .gitattributes . had ident in .gitattributes . plain console git checked out source, applied ident on $id$ macros, jgit ignored , saw difference wasn't committed, there wasn'

vba - How do I pass an array of arguments ByRef with CallByName? -

i using callbyname dynamically call methods. there several methods pick daily table in server along arguments. reason, send array of arguments callbyname rather param array don't know number of arguments until runtime. given callbyname expects paramarray use private declare function bypass vba type definition. private declare ptrsafe function rtccallbyname lib "vbe7.dll" ( _ byval object object, _ byval procname longptr, _ byval calltype vbcalltype, _ byref args() any, _ optional byval lcid long) variant public function callbynamemethod(object object, procname string, byref args () variant) assignresult callbynamemethod, rtccallbyname(object, strptr(procname), vbmethod, args) end function private sub assignresult(target, result) if vba.isobject(result) set target = result else target = result end sub this works when pass object method changes underlying properties. however, there methods pass object , method changes values of passed arguments. ex

php - Registering Application Events in Laravel 5 -

i have website made laravel 4.2 , want upgrade larave 5.x . tried upgrading , can't seem make work completly. problem using app::before , app::after events in laravel 4.2 (for setting cookies) , see have been removed in laravel 5.x . missing or have find new way how on other way in laravel 5.x ? tried placing old code filters.php new filters.php , other places no luck. thanks you can use middleware purpose instead. create middleware. make trigger before or after page load following instructions under " before / after middleware" header in documentation: https://laravel.com/docs/5.2/middleware add global array in app/http/kernel.php - that's 1 called $middleware

Shiny / Shinydashboard Disconnected from the server -

i running shiny application on shinyserver (open source) supposed run on screen. "disconnected server" after amount of time. i've seen in shinyapps.io there function "read timeout" (seconds of inactivity before browser connection worker process considered idle , closed.) not sure, maybe source of problem? is there function setting timeout in shinyserver? can't find in documentation http://docs.rstudio.com/shiny-server/#application-timeouts thanks & best regards, stefan

Android: Prevention backup file after download -

i use code download , save sdcard download folder uri download_uri = uri.parse(link); downloadmanager.request request = new downloadmanager.request(download_uri); request.setallowedoverroaming(false); request.setmimetype(exe); string pathtoexternalstorage = environment.getexternalstoragepublicdirectory(environment.directory_downloads).getabsolutepath(); request.setdestinationuri(uri.fromfile(new file(pathtoexternalstorage + "file.mp3"))); downloadmanager.enqueue(request); after download completed , create backup file in audio folder how prevention action? note : if delete file download folder , remains audio folder

html - CSS: Trigger styling for the sibling -

so have input field , button this: <span class="btn-wrapper"> <input type="text" id="mytextfield"> <button type="submit" id="mysubmitbutton">go</button> </span> what want is, when user focuses on mytextfield , want add border both mytextfield , mysubmitbutton . i have tried fails: #mytextfield:focus + #mysubmitbutton{ border-color:solid 1px red; } thanks you have 2 problems: you using border shorthand syntax border-color property you need select both elements, not button. such: #mytextfield:focus, #mytextfield:focus + #mysubmitbutton{ border:solid 1px red; } here's fiddle check out: http://jsfiddle.net/za4ew/

Bash/Shell | How to prioritize quote from IFS in read -

this question exact duplicate of: ifs separate string “hello”,“world”,“this”,“is, boring”, “line” 3 answers i'm working hand fill file , having issue parse it. file input file cannot altered, , language of code can't change bash script. i made simple example make easy ^^ var="hey","i'm","happy, like","you" ifs="," read -r 1 2 tree 5 <<<"$var" echo $one:$two:$tree:$for:$five now think saw problem here. hey:i'm:happy, like:you: but get hey:i'm:happy: like:you i need way tell read " " more important ifs. have read eval command can't take risk. to end directory file , troublesome field description one, have in it. original file looking that "type","cn","uid","gid","gecos","description",&qu

java ee - Websphere: set user for LTPA token -

running under websphere 8 have ejb calls soap web service (using jax-ws-generated client code). authentication web service done via ltpa token. websphere configured (using policy set , binding) automatically create ltpa token. token contains user credentials context ejb running in. however, need map current user different user use web service call. (i.e. user calls me, need use user x call web service. user b calls me, need use user y etc.) is there way dynamically set credentials ltpa token? if not, can use policy set bindings set static user ltpa token, independent of current context?

ios - How to determine the current iPhone/device model? -

is there way device model name (iphone 4s, iphone 5, iphone 5s, etc) in swift? i know there property named uidevice.currentdevice().model returns device type (ipod touch, iphone, ipad, iphone simulator, etc). i know can done in objective-c method: #import <sys/utsname.h> struct utsname systeminfo; uname(&systeminfo); nsstring* devicemodel = [nsstring stringwithcstring:systeminfo.machine encoding:nsutf8stringencoding]; but i'm developing iphone app in swift please me equivalent way solve in swift? i made "pure swift" extension on uidevice . this version requires swift 2.0 if use earlier version please use an older version of answer . if looking more elegant solution can use my µ-framework devicekit published on github (also available via cocoapods) . here's code: import uikit public extension uidevice { var modelname: string { var systeminfo = utsname() uname(&systeminfo)