Posts

angular - display ngFor with json object return from service -

this service: https://api.myjson.com/bins/quv59 im trying display in html *ngfor="let item of bookslist; let = index" my ts file ngoninit() { this.booksdataservice.getbooks().subscribe( function(response) { this.bookslist = response.books; }, );} thanks in advance <li *ngfor="let item of bookslist; let = index"> {{ item.author }} </li>

ruby on rails - Cannot play MP4 video on LAN in iOS through asset pipeline, but can from WAN -

i'm trying embed <video> on site , show in dialog box. thought there javascript problem, narrowed down fact ios mobile safari on iphone not play mp4 file local network, direct link. link looks http://localhost:3000/assets/introduction-0cf920e06b4224f8f83f59d02f878b7d5733b09590a14147d1580cbfb5081f18.mp4 except changed localhost ip of desktop server. load black screen same color first frame of video 2 dashes in middle. if load hotlink of mp4 staging, plays fine. plays fine in chrome on desktop. i tried play in ipad ios 9.3.5 , failed play, did display whole play button, did nothing. if copy video /public folder, play on ios safari. seems fail when goes through asset pipeline, in development (same file in staging). how play mp4 video on iphone safari in development environment? i funneled iphone through fiddler4 proxy , reloaded page. made 2 consecutive requests: get /assets/introduction-0cf920e06b4224f8f83f59d02f878b7d5733b09590a14147d1580cbfb5081f18.mp4 htt...

shell - How to delete docker after use in Jenkins -

i want delete remains of docker-operations within jenkins. but somehow following line not work... the issue seems parenthesis. any advice? if [ docker images -f dangling=true -q|wc -l > 0 ]; docker rmi --force $(docker images -f dangling=true -q);fi i store output of docker images command , use it: images=$(docker images -f dangling=true -q); if [[ ${images} ]]; docker rmi --force ${images}; fi

How to print the next line of a match in Perl? -

so, wrote script calculates factorials of 4^(0) 4^(10) wanted test run-times, , wanted compare stirling's approximation with actual number of digits of respective factorials. so have file data called factorials.txt contains following data example: the factorial of 1 1 factorial of 4 24 factorial of 16 20922789888000 factorial of 64 126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000 i output of factorials following: factorial 1: 1 digits. factorial 4: 2 digits. factorial 16: 14 digits. factorial 64: 90 digits i able write script these values, after statement factorial of ___ ... on next line value of factorial. wasn't able select next line after match, wrote using while loop through file matching nonexistence of letters, , printing length of characters on line. works, don't think it's efficient. #!/usr/bin/env perl use strict; use warnings; use feature 'say'; $file = 'factorials.txt'; $filehandl...

sql server - How do I map java.util.Date to sys.datetime -

i upgrading our jdbc driver mssql-jdbc-6.2.1 can move sql server 2016. works fine new driver except our reports. have 6000+ reports use java.util.date . previous driver these treated datetime in sql new driver treats them date . reports failing on code "dateadd(minute, ..." since not supported date. i tried java.util.map map = conn.gettypemap(); map.put("sys.datetime", java.util.date.class); conn.settypemap(map); but apparently settypemap not implemented in ms driver. rewriting reports not option. there anyway override mapping?

ngcomponentrouter - AngularJs to keep query string on refresh -

i'm using angularjs 1.6 , ngcomponentrouter. want query string maintained after refresh. for example, if go localhost:8080/something?foo=bar&bar=foo , hit refresh want go same url including query sting. currently when refresh go base route ( localhost:8080/something ).

php - Facebook destroy session on logout -

i doing site client , using facebook login.. when login , log out of facebook works fine. when login shortly after log out, automatically logs in previous person logged in. question how destroy (i assume session or cookies) storing info or need expire access token? either way wandering if had solution has worked them quick fix turning long problem because of this. session_start(); session_unset(); $_session['fbid'] = null; $_session['fullname'] = null; $_session['email'] = null; $_session['valid'] = null; header("location: " ."http://www.muchogusto.net"); from session_destroy() man page in order kill session altogether, session id must unset. if cookie used propagate session id (default behavior), session cookie must deleted. setcookie() may used that. edit this use: session_start(); session_destroy(); setcookie('phpsessid','',time()-864000,'/'); // persistent cookie setc...