Posts

Showing posts from June, 2014

html - PHP Reverse not working -

i'm trying reverse string , add spaces 3 in 3 characters code have right this: $rowpreco = "925000" $rowpreco = strrev($rowpreco); $rowpreco = wordwrap($rowpreco , 3 , ' ' , true ); $rowpreco = strrev($rowpreco); if take strrev out prints how want ("925 000") if have strrev print ("92 500 0"). but need use strrev because if value ("1200000") print ("120 000 0") instead of ("1 200 000"). any appreciated. thanks! update! when use number_format ignore jquery code have. echo "<script>" ."jquery(document).ready(function() {" ."var parts = jquery('.casapreco').text().split('|');" ."jquery('.casapreco2').text(parts[4]);" ."});" ."</script>"; basically initial string this: "3880562|1|1|925000|||0|0|0" i need grab 4th number i'm splitting s...

javascript - html js voice recorder not working in django python implementation -

i have tried implement django application wherein user can record voice message pass ti watson api , receive transcribed data , show result user on separate page. recorder not working not able save file changes should made if want deploy application heroku , have voice recording saved there , pass audio file watson api? code: stt/stt/settings.py: import os # build paths inside project this: os.path.join(base_dir, ...) base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # quick-start development settings - unsuitable production # see https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ # security warning: keep secret key used in production secret! secret_key = 'my-secret-key' # security warning: don't run debug turned on in production! debug = true allowed_hosts = ['*'] # application definition installed_apps = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contentty...

ldap - Setting up slapd via Ansible debops.slapd -

Image
i'm trying setup slapd service on ubuntu 16 machine using ansible , debops.slapd cannot working authentication , running. my playbook file looks this: --- - hosts: "{{hosts}}" become: true become_user: root roles: - role: debops.slapd slapd_domain: 'development.local' slapd_pki: false slapd_config_admin_password: 'passwords/ldap-admin.password' slapd_basedn_admin_password: 'passwords/ldap-admin.password' slapd_ldapscripts: true slapd_ldap_security_default: [] slapd_anonymous_bind: true the passwords/ldap-admin.password file: yoh7eque9ki0aitee5uquaichuteo0ti when launch ansible via command line ansible-playbook install-devserver-ubuntu.yml --ask-sudo-pass --extra-vars "hosts=ubuntu" installation proceeds correctly , slapd correctly installed on target machine: play [ubuntu] *********************************************************************************************...

xcode - UITableViewController Static Cells File Configuration (Swift) -

i have created table view static cells , looks in main storyboard when run application contents of table view empty. think because numberofsections , numberofrowsinsections functions resetting table view 0. when remove these functions table view appears desired. my questions okay leave these functions out , there other functions should include conform coding standards? if use static cells, can remove both methods or change values return correct number of sections , methods. you can define content of cells in storyboard or override method : func collectionview(_ collectionview: uicollectionview, cellforitemat indexpath: indexpath) -> uicollectionviewcell { it depends on looking for.

Pop up full size image on click using only html -

i need open full size of image within same window click. code looks this: <li> <a href="#"><img src="images/port.png" /><div><h3>image 2</h3></div></a> </li> port.png being image. try this: <a href="images/port.png"><img src="images/port.png" /></a>

angular - Angular4 using a collection of object -

i working angular4 , don't know how declare collection of objects , adding item , removing item ? help here did : component : import { component } '@angular/core'; @component({ selector: 'app-root', templateurl: './app.component.html', styleurls: ['./app.component.css'] }) export class appcomponent { // tableaux d'objets personnes: object[]=[{id:1, nom: "alain"},{id: 2, nom: "clémentine"},{id: 3, nom: "cathy"}]; } the template : <table> <tr *ngfor="let personne of personnes"> <td>{{personne.id}}</td> <td>{{personne.nom}}</td> </tr> </table> it works fine, want manage collection of objects, instance user provide datas , i'll create new object datas , i'll add new object collection. tried this, doesn't work : personnes: object[] = []; personne: = {{id:1, nom: "alain"}; this.personnes.pus...

javascript - Ionic: Remove view from cache dynamically -

i have view uses 1 way bindings. if refresh data view or pull refresh, 1 way bindings models don't update. possible force view reload before navigating or refreshing it? i'm not asking cache: false in router or cache-view="false" @ page level. want views cached. want force them reload if not in dom when data changes view. tried $ionichistory.clearcache(['some-view-name']).then(... didn't work.

reactjs - How to parse a string to a React component? -

say have string const s = "i love $fb" , , wanna get: <p>i love <a href="/symbol/fb">$fb</a></p> <rendercontent content={s}> i can use reg extract symbol, how can turn string react component, without using dangerouslysetinnerhtml ? an alternative render function component use regex capturing groups, no validation done on .exec result however: render() { const subs = /(^.*)(\$(.*))/.exec(this.props.content); return ( <p> { subs[1] } <a href={`/symbol/${subs[3]}`}>{subs[2]}</a> </p> ); }

joomla3.0 - Joomla onContentPrepareForm var_dump inside does nothing -

i trying var_dump($data); exit(); inside public function oncontentprepareform(jform $form, $data){ in joomla plugin nothing seems happens when open article. i want var_dump $data , $form see available manipulate need. how people go var_dump() inside oncontentprepareform(jform $form, $data){ ? how people know available manipulated? thanks

javascript - GeoJSON, Overlapping Pointers, OverlappingMarkerSpiderfier -

i'm new google maps api. in geojson file have list of geo locations (cordinates lat-lon). with: map.data.loadgeojson('json/geojson.json'); i'm putting data on map point-s. have problem points have same cordinates. i found https://github.com/jawj/overlappingmarkerspiderfier but works markers cant work. suggestions? can overlappingmarkerspiderfier? my code: function initialize() { var map = new google.maps.map(document.getelementbyid('map-canvas'), { zoom: 13, center: {lat: 45.8167, lng: 15.9833} }); map.data.loadgeojson('json/geojson.json'); ////////////////////////// //code grouping pointers/markers ////////////////////////// map.data.setstyle(function (feature) { return { icon: '/inc/mapper/img/' + feature.getproperty('icon_url') + '.png', }; }); } google.maps.event.adddomlistener(window, 'load', initialize); proc...

Empty CSS classes lost in postcss-nested & postcss-modules -

i have css i'm trying compile postcss, postcss-nested , postcss-modules : .foo { &__bar { color: red; } } i want compile , use postcss-modules classes out of it, should output: { foo: 'hash', foo__bar: 'hash', } the problem plugin going output only: .foo__bar { color: red; } and postcss-modules isn't able extract .foo , exposing only: { foo__bar: 'hash', } i noticed isn't problem if use webpack , css-loader (with ?modules&importloaders=1 ) it's problem if use barebones postcss. this repro of code: https://runkit.com/fezvrasta/59775c35542cda0012cc20ef ideas?

javascript - X-editable processing json -

i trying implement remote select using x-editable. i've followed this example , got local select work. according example, select input expects data in format "value|text". my backend json respose [{"id":1,"title":"..."},{"id":2,"title":"..."}] this html <a href="#" id="remote-select" data-type="select" data-pk="1" data-url="/articles" data-title="select remote status"></a> i've learned, according this answer datafilter should used, don't know how manipulate response change keys, id value , title text. i'd independent of key's text, works different types of responses, not ones 'title' key jquery $('#remote-select').editable({ value: 2, source:'/articles.json', datafilter: function(resp){ } });

Firebase Element May not exist on a call, iOS, Swift -

Image
i using firebase database , storage hold images , descriptions. @ moment have coded have 8 images , 8 descriptions. trying work out how if user selects4 pictures , puts in 4 descriptions allows called back. works fine 8 when add 4 , select table called crashes error 5th photo var doesn't hold anything. below code using call data table , crashes. func configurecell(post: post) { self.post = post self.carimages = [] if post.imageurl1 != "" { self.carimages.append(post.imageurl1) } if post.imageurl2 != ""{ self.carimages.append(post.imageurl2) } if post.imageurl3 != "" { self.carimages.append(post.imageurl3) } if post.imageurl4 != "" { self.carimages.append(post.imageurl4) } if post.imageurl5 != "" { print ("tony: \(post.imageurl5)") self.carimages.append(post.imageurl5) } if post.imageurl6 != "" { se...

java - How to disable a button from another activity -

i have little login program saves data shared preferences. main activity has "login" , "account" buttons. want disable login button when shared preferences null , enable "account" button user sign account second activity . how can enable/disable 2 buttons if shared preferences null? activity 1 protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main_interface); final button login = (button)findviewbyid(r.id.login); final button account = (button)findviewbyid(r.id.account); login.setenabled(false); login.setonclicklistener(new onclicklistener() { public void onclick(view arg0) { startactivity(new intent(mainactivity.this, summation.class)); } }); account.setonclicklistener(new onclicklistener() { public void onclick(view arg0) { startactivity(new intent(mainactivity.this, append.class)); } }); button exit = (button)findviewbyid(r.id.exit); exit.seton...

Python - Data Type and Non null values for each column -

Image
i trying come descriptive table data types , count of non null values each column of data frame shown in neat table. attached image. 1 has or seen code this. thank you

swift - Sandbox test account asking password repeatedly for iOS In-App Purchase -

Image
i developed application in swift language. i've added in-app purchases remove ads. created sandbox account test. forgot information of account. (i'm not sure of information) password entry screen still displayed in flashing screen display. if reset device , reload it, did not benefit. working properly. problem.what should do. i'm glad helped me. thank you. first of whenever working iap , try purchase service @ time apple ask password of itunes account or if work sandbox account too. if enter password , continue service available you. other if haven't setup account in device , try download store @ time apple ask password or account setup. as describe in case forgot sandbox test account password. , can't able procced iap so every time may cancel popup password. can continue creating sandbox account or set temporary account apple account device settings avoid popup password. , observe sandbox testing of aip after getting purchase times popup paper ...

Calling a function from another GUI class Python -

i have created gui in python consists of stacked widget containing 3 seperate widgets, loginbackend, editorbackend, mapbackend. seperate classes named loginbackend, editorbackend, mapbackend. each 1 called class , main window widget called mainbackend. idea user login (using loginbackend widget) , able access rest of widgets. problem each of other widgets need login information in order connect database. reason cannot information return when calling editorbackend class. trying this this editorbackend from loginbackend import loginbackend class editorbackend(qwidget, editordesign.ui_form): def __init__(self): super(self.__class__, self).__init__() self.setupui(self) self.initui() def initui(self): self.submitpushbutton.clicked.connect(self.insert) def insert(self): login = loginbackend() url = login.creds() print('url: ' + url) this loginbackend class loginbackend(qwidget, logindesign.ui_log...

android - How do I do something like Google Map's introduction callout -

Image
when opening google maps' drawer menu first time, or cleared app storage view this: the normal view typically this: i've been messing around in xmls while , still can't remotely similar show up. know how selective dimming , overlayed callout? try library: https://github.com/amlcurran/showcaseview bit outdated, used couple of years ago , still works in app.

c# - How to stay on a single thread while debugging an application in Visual Studio? -

while debugging asp.net mvc application in visual studio 2017, facing issue multiple threads. code flow stepping other threads too. i have tried using debug -> windows -> threads freeze unwanted threads @ first break point. it's not working expected. also, tried set thread condition breakpoints filter out other threads. i know how stop debugging multiple threads , stay on current break points. note: have resharper installed in visual studio. want know whether can handle using resharper.

python 3.x - Holoview with bokeh does not show plots -

i'm trying create environment in develop python code pycharm while @ same time creating interactive charts using holoviews , bokeh. i followed steps in holoview introduction , works in jupyter notebook - charts nicely interactive indeed. however, when run same code in pycharm's python console, no charts or browser shows up. in contrast, when directly call bokeh's methods, in this example , browser launches , can manipulate charts interactively. achieve using holoviews (+bokeh). many in advance. my libraries: python 3.4.5 holoviews 1.8.1 bokeh 0.12.6 param 1.5.1 ipython 6.1.0 jupyter 1.0.0 pandas 0.20.3 numpy 1.13.1 scipy 0.19.1 the solution in: http://holoviews.org/user_guide/deploying_bokeh_apps.html you need these lines of code: import holoviews.plotting.bokeh .... layout=#whathever holoview want plot ... doc = hv.renderer('bokeh').server_doc(layout) and go command prompt, cd right directory , run: bokeh serve --show myscrip...

python - Solve differential equation with SymPy -

Image
i have following differential equation solve sympy this differential equation has implicit solution (with h(0) = [0,1) , t = [0, inf) ) but sympy gives which other packages such maxima able find. sympy unable, however. there way so? code is import sympy sp sp.init_printing(use_unicode=true) h = sp.symbols('h', function=true) t = sp.symbols('t') eq = sp.eq(sp.derivative(h(t),t), (1 - h(t))**sp.rational(4,3) / h(t)) sp.dsolve(eq) sympy leaves integral unevaluated because unsure sign of 1-y in integral. the differential equation has singularity @ h=1, , behavior depends on side of 1 are. there isn't way h(t) < 1, 1 can substitute h(t) = 1 - g(t) g positive function: g = sp.symbols('g', function=true, positive=true) eq1 = eq.subs(h(t), 1 - g(t)) print(sp.dsolve(eq1)) this returns explicit solution of ode (actually 3 of them, sympy solves cubic equation). first 1 of looks reasonable. eq(g(t), (-2*(c1 + t)/(sqrt(-8*(c1 + t)**3...

reactjs - Pass callback with parameters to parent component -

i asking trivial has been bugging me while. lets have child component renders buttons: const picker = ({ data, label, visible, cancelcallback, onpresscallback }) => { function renderrow (data) { return data.map((el) => { return ( <touchableopacity style={listviewitemcontainer} key={el.label} onpress={} > <text style={listviewitem}> { el.label } </text> </touchableopacity> ); }); } return ( <modal visible={visible} animationtype="fade" onrequestclose={() => {}} transparent={true} > <view style={listviewcontainerstyle}> { renderrow(data) } </view> </modal> ); }; now when press 1 of buttons want make callback parent want pass parameters label of element pressed. like: <touchableopacity style={listviewitemcontainer} key={el.label} onpre...

java - libGDX freetypefont artifacts -

Image
when creating bitmapfont in libgdx .ttf file freetypefontgenerator resulting font has serious artifacts around it: those artifacts appear when using mipmapping, have transparent pixels? have tried adding padding resulting font, not work. tried using linear filtering resulting font looks pixelated. code using generate fonts: freetypefontgenerator generator = new freetypefontgenerator(gdx.files.internal("font.ttf")); freetypefontgenerator.freetypefontparameter parameter = new freetypefontgenerator.freetypefontparameter(); parameter.size = 300; parameter.color = color.white; parameter.characters = "0123456789"; parameter.kerning = true; parameter.magfilter = texture.texturefilter.mipmaplinearlinear; parameter.minfilter = texture.texturefilter.mipmaplinearlinear; parameter.genmipmaps = true; font = generator.generatefont(parameter);

amazon web services - Copy from Excel/Numbers -> Webform -

trying figure out if @ possible script or otherwise. i have hundreds of addresses need move numbers (could moved excel if easier/necessary) amazon. amazon's site not allow .csv upload literally having copy/paste 1 cell @ time (200 lines x 7 cells per line = headache). so wanted know if there any way possible easier in future doing this. have textexpander, apple scripts, , willing download other tools if necessary. i love if script take what's on clipboard, including breaks in cells, , when somehow paste webform on amazon, converts cell breaks tabs automatically throw each cell on each corresponding form. thanks in advance!

javascript - Switching temperatures using a Bootstrap toggle -

i using api provides temperatures in both celsius , fahrenheit , trying switch between 2 using toggle so: //toggle temperature var celc = $("#convert-temp").prop('checked'); var temp_c = 20; // dummy data var temp_f = 60; // dummy data if (celc == false) { $("#temp_c").html(temp_c + "<span>&#8451;</span>"); } else if (celc == true) { $("#temp_c").html(temp_f + "<span>&#8457;</span>"); } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="checkbox"> <label><input type="checkbox" id="convert-temp" data-toggle="toggle" data-on="&#8451;" data-off="&#8457;">toggle temperature</label> </div> <div id="temp_c"></div> this toggle doesn't switch between 2 temperatures. variabl...

ios - Auto password entry script in Mac OSX -

i developing mac app user has enter username & password first time. once user authenticated password saved in keychain & no need enter password next login. these operations performing on shell script nstask. now first time app check password in keychain & script shows enter password if user not exist. operation occurs in middle of script. now can suggest how should auto enter password when script start waiting password entry? please let me know if have explain more.

wordpress - iframe src disappearing after lightbox is closed then re-opend -

i'm working on wordpress site http://rgpfamtour.digital-55.com/ , trying figure out why iframe src disappearing after exiting out of lightbox appears when clicking "watch trailer". when button first click, video in iframe loads fine. however, when exiting out of lightbox , clicking "watch trailer" again, video not load, , youtube iframe src element reads "unknown". i've tried disabling plugins , using different youtube embed plugins , manually embedding iframe html, still getting same issue.

c++builder - What is the difference between Variant.IsEmpty and Variant.IsNull? -

according ( isempty , isnull ), both return true if vtype field of tvardata base class varempty i don't know if there subtle difference between both methods, or 1 best/correct 1 check see if variant value has data or not. generally null indicates missing or unknown data. empty indicates no data. think of phone number field. if don't know if has telephone number @ all, field should null . if know doesn't have telephone, field should empty . despite documentation says, isempty checks value of varempty , isnull checks value of varnull .

r - ggplot renders in shiny app but not on shinyapps.io, no errors or warnings -

the shiny app in question 250 lines of code, try copy relevant snippets below, may impractical produce working example reproduces issue having. when run shiny app, runs flawlessly locally. when deploy shinyapps.io, receive success messages , no errors or warnings. however, when view shinyapps.io in browser none of valueboxes or ggplots visible. i suspect issue memory (the dataset 500k rows). maybe shiny apps server running out of memory before loads? again, no warnings, errors, or relevant messages on logs (or on deploy tab when deploying app shinyapps.io). in ui, have these rows showing various plots , value boxes: #value boxes show numeric stats fluidrow( valueboxoutput("comp_fare"), valueboxoutput("num_comp_fares"), valueboxoutput("num_aa_fares") ), br(), h2("impact of continuous featu...

c# - Reading specific data row from CSV file using Coded UI -

here's example of problem looking solve: i have csv file 2 columns (username, password) , 10 rows (different username , password). my goal have first test method use first username/ password combination, 2nd test method uses 2nd row , on. right now, if run tests, first test method uses 10 rows of data. is there way me restrict test method read specific row(say row 1) in csv file? using testcontext.datarow["username"].tostring() now. think way test cases run in coded ui, automatically runs 10 times.

javascript - A custom event code -

i have code this: var eventtarget= function(){ object.defineproperty(this,"__listeners",{ value: {} }); }; object.defineproperties(eventtarget.prototype,{ addlistener: { value: function(type,listener){ if(typeof this.__listeners[type]==="undefined"){ this.__listeners[type]= []; } this.__listeners[type].push(listener); }, enumerable: true }, __fire: { value: function(evtobj){ if (typeof evtobj.type==="undefined"){ throw new error("event needs type"); } if (typeof evtobj.target==="undefined"){ evtobj.target = this; } var listeners =this.__listeners[evtobj.type]; if (typeof listeners==="undefined"){ return; } (var = 0, len=listeners.length; <len; i++) { ...

java - Calling Enum.values() on a generic type -

the goal implement generic enum translator. know enum1 , enum2 have same values , in same order. the goal implement this:(this works) private static enum1 translateenum(enum2 originalenum) { return enum1.values()[originalenum.ordinal()]; } but have several enums, want make generic method: (this doesn't work) private static < t extends enum<t>,g extends enum<g>> t translateenum(g originalenum) { return t.values()[originalenum.ordinal()]; } my problem @ t.values() compiler tells me : the method values() undefined type t do guys have idea of how solve issue or have alternative idea problem? a common way pass target class object (or object of target class) argument function, use methods class object tricky part. enum classes, class object has a method returns equivalent of enum.values() . can use enum values target class: public class scratch { enum lower { a, b, c }; enum upper { a, b, c }; static ...

python matplotlib save graph as data file -

i want create python script zooms in , out of matplotlib graphs along horizontal axis. plot set of horizontal bar graphs. i want make able take generic matplotlib graph. i not want load image , zoom that, want zoom graph along horizontal axis. (i know how this) is there way can save , load created graph data file or there object can save , load later? (typically, creating graph , displaying matplotlib plt.show, graph creation takes time , not want recreate graph every time want display it) you can use pickle package saving axes , load back. save plot pickle file: import pickle import matplotlib.pyplot plt ax = plt.plot([1,2,5,10]) pickle.dump(ax, open("plot.pickle", "wb")) and load back: import pickle import matplotlib.pyplot plt ax = pickle.load(open("plot.pickle", "rb")) plt.show()

php - Can't fetch multiple rows from table -

i'm making page needs display rows stored in table named 'events' in database named 'school' the problem though i've multiple entries/rows in table, reason single row displayed when run page. here's code- <?php require("includes/common.php"); $query = "select * school.events"; $result = mysqli_query($con, $query)or die(mysqli_error($con)); $row = mysqli_fetch_array($result); $ename = $row['name']; $place = $row['place']; $date = $row['date']; ?> . . . <?php while ($row) { ?> <tr> <td><?php echo $date; ?></td> <td><?php echo $ename; ?></td> <td><?php echo $place; ?></td> </tr> <?php $row = mysqli_fetch_array($result); $name = $row['name']; $place = $row['place']; $date = $row['date']; } ?> try instead while($row = mysqli_fetch_assoc($re...

c# - Why is Page_Load() hit twice on long-loading page? -

i have page depending on data bringing can take long time (minutes) load, majority of time spent in method called page_load(). have noticed once time threshold hit, page_load() hit second time. when started watching network tabs in chrome dev tools , firebug didn't see second requests go out, did notice few things: in firebug temporarily flashes status code of 407 long running request. in chrome timing tab shows stalled several minutes, proxy negotation right before page_load() hit second time. what going on here? don't know how proxies , authentication work, sure seems there re-authentication going on in middle of page load causing whole page lifecycle restart. 407 proxy authentication challenge status, means proxy requesting authentication. depending on authentication scheme (e.g. basic, ntlm, negotiate, digest etc), there subsequent requests made additional authentication information (proxy-authorization header). since these repeat requests may not n...

android - SQLite database Text column parser to double -

i wanted query sqlite db , query cost, text in sqlite. want sum of column value. how do it? here's code public class estimate extends appcompatactivity { databasehandler db; textview tv; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_estimate); db=new databasehandler(this); tv=(textview)findviewbyid(r.id.textview2); tv.settext("joma="+getjoma()+""); } public double getjoma(){ double sum=0.0; sqlitedatabase dt = db.getreadabledatabase(); cursor res = dt.rawquery("select cost tb type=জমা",null); do{ sum =sum+ double.parsedouble(res.getstring(res.getcolumnindex("cost"))); } while(res.movetonext()); return sum; } }

jquery - Trying to use datetimepicker with bootstrap, not working. Uncaught TypeError: $(...).datetimepicker is not a function -

i looked @ answers other questions , tried various solutions nothing worked. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- above 3 meta tags *must* come first in head; other head content must come *after* these tags --> <title>call report generator</title> <!-- jquery (necessary bootstrap's javascript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <!-- bootstrap --> <!-- latest compiled , minified css --> <link rel="stylesheet" href="...

javascript - Not Getting Expected Result in Negative Case with *ngIf in Angular 2 App -

in angular2 app printing view data in table layout. 1 section of our data array of flags. right i'm using combination of *ngfor , *ngif print values view when values exist. working expected code: <ng-container *ngfor="let status of record.status"> <td *ngfor="let flag of status.flags"> <span *ngif="flag.flag" class="standard-flag"> {{flag?.flag}} </span> <span *ngif="!flag.flag" class="zero-flags"> no flags </span> </td> </ng-container> now, in case there no data (i.e., empty arrays) i'd print "no flags" screen -- see above. far know, there no "else" functionality prior angular 4 (correct me if i'm wrong). need use *ngif evaluate when case , print 'no flags' screen accordingly. this proving peculiarly difficult, , i...