Posts

Showing posts from March, 2011

google maps api autocomplete works at localhost but does not work on the server -

i used google maps api autocomplete of places. everythings works in localhost, when publish , upload on server, doesn't work...why happen? dropdown of places not show. here html: <input type="text" id="autocomplete"> here js: <script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script> <script> var autocomplete; function initialize() { autocomplete = new google.maps.places.autocomplete( (document.getelementbyid('autocomplete')), { types: ['(cities)'], componentrestrictions: { country: "ph" } }); google.maps.event.addlistener(autocomplete, 'place_changed', function () { fillinaddress(); }); } placeparser = function(place){ result = {}; for(var = 0; < place.address_components.length; i++){ ac = place.address_components[i]; result[ac.types[0]] = ac.long_name; } return result; }; function fi

jquery - Make ajax call ,success and error as functions -

i want make ajax calls , retrieve responses via functions parameters, getting triggered error function , don't know why. here code: ajaxinavdenormal = function(url_link, successfunction, errorfunction) { $.ajax({ url: url_link, success: function(response) { var respo = response; successfunction(respo); }, error: errorfunction, }); }; ajaxinvadeerror = function() { $('.div1').prepend('internet connection error'); }; isitactivepopup = function(response) { if (response == "success") { $('.div1').prepend('connection successs'); } else $('.div1').prepend('connection error'); }; isitactive = function(data) { var url_link = "http://someurl.com/somegetvar=" + data; ajaxinavdenormal(url_link, isitactivepopup, ajaxinvadeerror); }; globalactions = function() { isitactive(); }; $(document).ready( function() { globalactions

Python Java forEach equivalent -

i java programmer. started learning python few days ago. i'm wondering: there equivalents map.foreach(system.out::println) in python lambdas? or loop: for e in map: print(e) there no equivalent java's imperative iterable.foreach or stream.foreach method. there's map function, analogous java's stream.map , it's applying transformations iterable. java's stream.map , doesn't apply function until perform terminal operation on return value. you abuse map job of foreach : list(map(print, iterable)) but it's bad idea, producing side effects function shouldn't have , building giant list don't need. it'd doing somelist.stream().map(x -> {system.out.println(x); return x;}).collect(collectors.tolist()) in java. the standard way in python loop: for thing in iterable: print(thing)

c# - Can't remove items from WinForms ListView -

i have 2 listviews , want move items 1 other. i can copy new list, remove first list doesn't work. private void button2_click(object sender, eventargs e) { foreach (listviewitem in listview1.items) { if (i.checked == true) { listviewitem itemclone = i.clone() listviewitem; listview2.items.add(itemclone); } } foreach (listviewitem itemselected in listview1.selecteditems) { listview1.items.remove(itemselected); } listview1.autoresizecolumns(columnheaderautoresizestyle.headersize); listview2.autoresizecolumns(columnheaderautoresizestyle.headersize); } it's bit inelegant @ moment 2 loops, 1 post read said couldn't add , remove item in same foreach loop. you used selecteditems, not checkeditems, on second loop.

How can i change default document upload location in Liferay? -

i have change default document upload location in liferay. uploading document via cms in liferay. any highly appreciated. by default document library stores files/folder in: ${liferay.home}/data/document_library change can add property in portal-ext.properties dl.hook.file.system.root.dir=${newpath} , should enough.

collections - How can I make streams return lists? (Java) -

this question has answer here: collection stream new collection 3 answers i have following list: observablelist<string> books; i know if want have sorted list can write public observablelist<string> getbooks() { return books; } now, question may pretty nonsensical, but... there way achieve same result above streams? like books .stream() .sorted(); but having stream return me sorted observablelist? i'm starting learn streams , don't know yet, wondering if possible. side note: books wrong naming convention variable; use books . this indeed possible, using collector s. or collectors . assuming observablelist collection of sort, can following: observablelist<string> hereyougo = books.stream() .sorted() .collect(collectors.tocollection(observablelist::new)); where observablelist::new

sql - Psycopg2 Python Inserting List -

i'm trying insert list sql query via psycopg2 every time see's ' doubles it... heres code: for line in listfile: if countligne == 1: idlist = "'" + (line[1].replace('"', '')) + "', " countligne += 1 elif countligne < nbrligne: idlist += "'" + (line[1].replace('"', '')) + "', " countligne += 1 else: idlist += (line[1].replace('"', '') + "'") break print(idlist) print(type(idlist)) ftdsql = ( '''with ftd ( select m.event_user, m.event_ts, m.revenue, rank() on (partition m.event_user order m.event_ts) order_purchase agg_monetization m revenue not null ) select distinct ftd.event_user, sum(ftd.revenue) ftd order_purchase = 1 , ftd.event_user in (%s) group ftd.event_user, ftd.event_ts ''' ) cursor.execute(ftdsql, [idlist]) print(cursor

eclipse files created outside of its workspace, Why? -

while opening eclipse chose workspace in d:\education\myworkspace after closing eclipse find metadata configuration remotesystemstempfiles somemorefiles aree created in d:\, not in workspace - why? simply spoken, because eclipse stores information in different places. some go workspaces, go other places. see here starters. can see, eclipse differentiates between install, configuration , instance areas. if want to, can give command line arguments eclipse binary in order change default settings; example force eclipse use same configuration space, when going different workspaces.

php - WordPress multisite , shows all sites but only want to display last 2 -

i need display last 2 posts of network of sites. i'm retrieving latest posts sites want display 2 of them. i have following code: <?php $items = return_latest_posts(); global $wpdb; $table_search = $wpdb->prefix . "searchinfo"; $query = "select * `$table_search`"; $wpdb->show_errors(); $results = $wpdb->get_results($query); foreach ($results $site){ $item = return_latest_posts_single_site($site->username,$site->password,$site->database,$site->host,$site->db_prefix); ?> <li> <h4><?php echo $site->sitename; ?></h4> <?php foreach($item $res){ ?> <p class="date"><?php echo $res->post_date ?></p> <h4><a href="<?php echo $res->guid; ?>" target='_blank'><?php echo $res->post_title ?></a></h4> <?php } ?> <hr /> </li> <?php } ?> how able show l

angular - Angular2 - Unresolved Router Import -

i building ionic2 application , have been following heroes example on ionic framework official website have been having hard times importing router directives. import { providerouter, routerconfig } '@angular/router'; export const routes: routerconfig = [ { path: 'crisis-center', component: crisiscentercomponent }, { path: 'heroes', component: herolistcomponent }, { path: 'hero/:id', component: herodetailcomponent }]; export const app_router_providers = [ providerouter(routes) ]; the error piece of code produces is: unresolved providerouter unresolved routerconfig cannot resolve directory @angular any ideas why might be? the package.json file looks this: { "dependencies": { "@angular/common": "2.0.0-rc.3", "@angular/compiler": "2.0.0-rc.3", "@angular/core": "2.0.0-rc.3", &qu

Userscript in javascript/jQuery to watch a page for specific changes in link text -

i'm trying create userscript watch page changes in link text. script should: refresh after 10 seconds page if there no links present. refresh page if there links present contain keyword don't want (in example word don't care "phone"). alert me when there link present doesn't contain keyword (even if there think contains said keyword). in example, word should trigger should "email", want alerted whenever there link doesn't contain word "phone". i've come jsfiddle sort of simulate page watching script here , top section simulate random changes on page may take place. in example want alerted when keyword "email" appears, whether or not other link present. and here horrible attempt @ trying write this. don't know why can't seem wrap head around proper logic , loop needed accomplish this. i've been on place , it's such mess it's not useful jumping off point anymore. appreciated. var worklinks

database design - How can I enforce second-degree relationships without composite keys? -

consider database design multi-tenancy line-of-business web application: a tenant tenant of web-application, tenant has many shops , many customers ( customer records not shared between tenants , it's valid multiple customer records refer same real-life human), , each shop has many jobs . job associated each customer . there exists problem in there doesn't seem trivial constraint solution prevent case job 's customerid changed customer not belong parent tenant , creating invalid data. here present schema: create table tenants ( tenantid bigint identity(1,1) primary key ... ) create table shops ( tenantid bigint foreign key( tenants.tenantid ), shopid bigint identity(1,1) primarey key, ... ) create table customers ( tenantid bigint foreign key( tenants.tenantid ), customerid bigint identity(1,1) primary key ... ) create table jobs ( shopid bigint foreign key( shops.shopid ) jobid bigint identity(1,1) primar

java - Swing Worker and GUI update -

i'm new community! i want ask swingworker , relationship gui. i know there answered questions swingworker, , i've read lot of them, taking helpful advices. now i'd post code wrote basic application counts number of files , folders specified directory. since search take lot of time, want progress bar displayed during process. also, users have possibility of stopping count process clicking button or closing frame contains progress bar. here there questions on code posted below: the call execute() method swingworker last instruction of waitingframe constructor: there better place it? the dispose() method waitingframe called swingworker's done() method, correct? if count process fast, dispose method called before waiting frame visible? result, have 2 open frames... is there better method interrupt process , manage message dialogs shown users? used 2 boolean variables, valid , interrupted, achieve purpose... and here's code: import java.awt.*; imp

php - Unable to get Bootstrap template to work with master page laravel framework -

i learning how work laravel framework using 4.2.0 version. and have gotten part of master pages , child pages. i trying inherit characteristics of master page child page. by characteristics mean css , javascript header. i working tutorial put me on lane achieving using bootstrap template. tutorial keep on getting "whoops, looks went wrong." error whenever include various parts of master page. i notice when include different parts tutorial explains above error have tried gives error, main.blade.php <!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"> <meta name="description" content=""> <meta name="author" content=""> &l

android - chat application database design -

Image
i'm attempting create chat application in android, whatsapp. chat view have list of chat sessions , clicking chat session open chat window users chat each other. chat session show name of user @ other end , last message sent. here's attempt @ designing database is correct schema database accomplish i'm trying achieve? i'm going using signalr real time communication. want know if i'm headed in right direction.

node.js - Can we access Facebook Graph API via script -

i'm trying create simple script (node) each day collects information various apis, including facebook's graph api. the idea simple, each day want collect total friend count of personal account, total page likes of managed pages, total social interactions of content (personal , pages). now, if doing in web app, normal route using facebook login request access tokens profile , pages, since script not have public exposed url return authentication to. does know of way manually tokens, use in scenario this? thanks have tried use this node package ? if accesstoken via other oauth module everyauth , connect-auth or node-oauth can set access token directly. calls, , pretty post calls require access_token there decent article on medium works through process.

swift2 - Swift 2.0 Reflection for Type Analysis -

i trying analyze type information in swift 2.0 - , store in static structure - stuck. promising approach create mirror instance - done once on demand, assuming default init - , @ subjecttype of mirror elements. my questions are: how unwrap optional types ( e.g. optional<string> ). have string part type. how determine generic array types, e.g. array<foo> . parsing string silly , it's not possible.. other questions related arrays: if have element type, how create new instance? to make clearer. need type information higher level algorithms such mappers - object mappers, json mappers, widget mappers, etc. - require information on type of involved objects trying type safe or inserting appropriate conversions, if needed. think of property int needs mapped int? property should not raise exception. the code far fills beandescriptor class contains array of propertydescriptor 's should store required information something like: class propertydes

javascript - Backbone.js - multiple models for one view -

i have template needs receive data 2 different api endpoints (urls): cart , user . i want 2 endpoints act 1 model or collection can .changedattributes() or sync , or fetch . i know backbone permissive, lost. playground: i've created codepen see i've done far: http://codepen.io/anything/pen/axoboa desired result should like: initialize: function(){ var self = this; collection.fetch({ success: function(data){ self.collection = data; } }) }, render: function(){ var self = this; var source = $("#template").html(); var template = handlebars.compile(source); var htmltorender = template(self.collection.tojson()); } you create event concentrator listening registered objects , retrigger events catch. something like var aggregate = _.extend({}, backbone.events); aggregate.register = function(m) { var self = this; this.listento(m, 'all', function() { this.trigger.apply(this, argument

Matlab arrayfun with array of elements that are [1x4 struct] -

i have array, 'my_structures_array', single row , n columns. each element [1x4 struct]. want extract numeric valued 'thisfield' each structure of each [1x4 struct] element. the result looking 4xn array of values each 'thisfield' value, each row in result corresponds colum in [1x4 struct]. the code using this: arrayfun(@(x) (x.thisfield), my_structures_array); matlab returns error attempt reference field of non-structure array. if put following in command line, my_structures_array{1} i list of of fields of [1x4 struct]. if put in command line, my_structures_array{1}.thisfield i 4 answers, this: ans = 1 ans = 1 ans = 1 ans = 0 if @ size size(my_structures_array{1}.thisfield) matlab says "error using size", see not array. i'm not sure is. i not sure how proceed 4xn array looking for. update output command my_structures_array returns row array of [1x4 struct]. output who

r - custom aggregation function in dcast -

i have table need reformatted. table looks like: date itemid newprice sale amount 1-1 1 5 3 1-1 2 8 2 1-1 3 3 5 1-2 1 6 4 1-2 3 4 3 1-3 2 7 2 1-3 3 2 1 the first table want reformulate looks like: date item_1 item_2 item_3 1-1 3 2 5 1-2 4 0 3 1-3 0 2 1 the item id becomes column names, , value sale amount. tricky part that, days, there no record items, no item record item 2 in 1-2. in case, sale amount should fill 0. the second table reformulate looks like: date item_1 item_2 item_3 1-1 5 8 3 1-2 6 8 4 1-3 6 7 2 so thing want use item_id column, , newprice value, each date. the tricky part that, in each day, there items not show up, there no newp

java - Command prompt do not close after running batch file which have 'exit' in last line -

i running batch ( scanproject.bat ) file using java following code process p= runtime.getruntime().exec("cmd /c start /wait scanproject.bat "+ baseprojdir+"\\"+jo.getstring("name")+" "+st.nexttoken()); system.out.println("exit value : "+p.waitfor()); and following batch file code :- %2: cd %1 ant -f ..\antbuild.xml analyse exit batch file run problem command prompt window not closes automatically , hence process not terminated automatically , program wait infinite time complete process.please suggest me technique cmd exit after running ant -f ..\antbuild.xml analyse command. thanks. cd /d "full path of directory" or pushd "full path of directory" popd before exit better switch current directory directory on drive ( cd , pushd / popd ) or network share (just pushd / popd ). run in command prompt window cd /? , pushd /? details. cmd /c starts new windows command process closing proce

c# - Is there any good reason NOT to use a ViewComponent instead of a Partial View in core MVC? -

i'm new mvc , decided start .net-core, don't have understanding of differences in core vs. older versions. did find below question offers insight hasn't helped me decide whether can ignore partial views. why should use mvc 6 feature view components on partial view: difference? my question - if can viewcomponent, there reason not to? many thanks! example provided below context. main view calls: viewcomponent: <div class="modal-body" id="modalpersoninner"> @await component.invokeasync("createperson", new person()) </div> versus partial view: <div class="modal-body" id="modalpersoninner"> @{ await html.renderpartialasync("people/createpartialview", new person());} </div> javascript (personcreateform form within partial view/view component): var submitpersoncreate = function(evt) { evt.preventdefault(); if ($(this).valid()) {

matlab - Extraction of RoI in a Video -

i working on simulink develop algorithm. have video stream dimensions 640x360. trying extract region of interest (roi) each frame. however, video turns grayscale when use following code: matlab function block using roi extraction: function y = fcn(u) %some more code width = 639; height = 210; top = 150; left = 1; y = u(top:top+height, left:left+width); solution change last line follows: y = u(top:top+height, left:left+width,:); explanation the dimensions of rgb image mxnx3. m , n image height , width, , there 3 channels: red, green , blue. when perform cropping of rgb image, should performed on each channel separately. can achieve using code example above.

android - Replacing json retrieval with database retrieval in project -

apologies if i'm not providing enough information here, i'm new android/java , learning combining elements of various example projects. i have working verticalgridfragment page android tv project (using leanback) loads album cover art , details in columns , rows. borrows heavily googlesamples example on github . using test music_database_proto.json file in format of: { "cards": [ { "type": "grid_square", "title": "around world in day", "artist": "prince , revolution", "description": "prince , revolution", "grouptype": 0, "tagid": 0, "localimageresource": "food_01" } } i can load using createrows() function (from same sample project) using: presenterselector cardpresenterselector = new cardpresenterselector(getactivity()); madapter = new arrayobjectadapter(cardpresenterselector); str

How to avoid repeating yourself in WSDL operations with identical SOAP headers -

i working on wsdl file defines number of elements. this: <wsdl:operation name="myoperationname"> <soap:operation soapaction="http://www.domain.dk/myschema#myservice" style="document"/> <wsdl:input name="myservicerequest"> <soap:header use="literal" part="securityheader" message="tns:securityheader"/> <soap:header use="literal" part="somethingelseheader" message="tns:somethingelseheader"/> <soap:header use="literal" part="whitelistingheader" message="tns:whitelistingheader" wsdl:required="true"/> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="myserviceresponse"> <soap:body use="literal"/> </wsdl:output> <wsdl:fault name="myfault"> &l

python - Foreign Key Constraint Failed in Sqlite3 -

i'm executing script second time(these tables exist previously) , getting foreign key constraint failed error. i'm beginner in sqlite3 , not able figure out cause behind it. schema.sql pragma foreign_keys = 1; drop table if exists user; create table user(uid integer primary key autoincrement, username text not null, password text not null, email text not null, isadmin integer default 0); drop table if exists asset; create table asset(aid integer primary key autoincrement, assetname text not null, releasedate text, owner integer default 0, isreserved integer default 0, foreign key(owner) references user(uid) on delete set default); i'm reading file in python script. error: traceback (most recent call last): file "<stdin>", line 1, in <module> file "main.py", line 37, in create_table conn.cursor().executescript(f.read()) sqlite3.integrityerror: foreign key constraint failed when dropping table, effect same if d

c++ - VXWORKS simulator limits? -

i working on porting code under vxworks. use simulator validate changes. code requires opening of many pipes , sockets. have problem opening of these files descriptors. indeed, can open 17 files descriptors (sockets or pipes cause same error) following return error "emfile: many opened files". after research on net, modified global variable num_files, change had no effect. know if simulator limits number of files descriptors opened simultaneously ? thank help i found problem i had modify rtp_fd_num_max specific rtp value

javascript - Jquery, how to select an element by its first position value of an attribute -

in html: <tr data-s=""></tr> <tr data-s="1"></tr> <tr data-s="2 1"></tr> <tr data-s="3 2 1"></tr> i'm trying build selector in order trs value of first position of data-s attribute. thanks in advance. you can element first position of data-s attribute far understood. $('[data-s^="3 "]'); or if want first position of data-s attribute's value, can this; $('[data-s]').data('s').split(' ')[0]; there a plunker example you.

javascript - Limting Search Results in Jekyll Search -

i've been trying without success limit results in search script included in site. here original script: jquery(function() { // initialize lunr fields searched, plus boost. window.idx = lunr(function () { this.field('id'); this.field('title'); this.field('content', { boost: 10 }); this.field('categories'); }); // generated search_data.json file lunr.js can search locally. window.data = $.getjson('/search.json'); // wait data load , add lunr window.data.then(function(loaded_data){ $.each(loaded_data, function(index, value){ window.idx.add( $.extend({ "id": index }, value) ); }); }); // event when form submitted $("#site_search").submit(function(event){ event.preventdefault(); var query = $("#search_box").val(); // value text field var results = window.idx.search(query); // lunr perform search

c# - How to download image from Azure Blob into XAML -

i have public azure blob storage container trying pull down .jpg file , display on xaml control on interface. here code far: /* handling picture */ // setting blob uri here uri bloburi2 = new uri("https://fake_name.blob.core.windows.net/container/test.jpg"); // creating new cloudblockblob object (passing blob uri param) cloudblockblob picblob = new cloudblockblob(bloburi); /***** waiting more ******/ what best approach this? have seen several examples of images being pulled down , saved user's machine have no idea how display on image xaml control. update: trying change image source on c# blob uri. image.source = https://fake_name.blob.core.windows.net/container/test.jpg; getting errors. visual studio expecting ';' , '}' after statement. guess url confusing compiler. putting url in double quotes not option since vs takes string , shows error. workarounds? adding pic on xaml not viable because want modify content app goes along... solved:

I have a csv file and wanted to form JSON objects by grouping using mutiple column of csv in java -

> csv looks : (,) sperated values col_1 col_2 col_5 col_6 1 yyy1 1111 cdx00001 1 yyy2 1111 cdx00001 2 yyy3 3333 cdx00002 2 yyy4 2222 cdx00001 2 yyy5 3333 cdx00002 2 yyy6 3333 cdx00002 2 yyy7 3333 cdx00002 2 yyy8 4444 cdx00002 2 yyy9 4444 cdx00002 > **i used below code group 2 columns , json result looks below . "cdx00002$@4444": [ { "col_5": "4444", "col_6": "cdx00002", "col_1": "2", "col_2": "yyy8" }, { "col_5": "4444", "col_6": "cdx00002", "col_1": "2", "col_2": "yyy9" } ], "cdx00002$@3333": [ { "col_5": &quo

html - JQuery is loading but my javascript isn't -

so, according firefox debugger both index.js , jquery.js loading fine code in index.js not running. here js: var text = "js says hi"; var num1 = 33.6669; var num2 = 322.0258; $('#body').ready(function () { pageload(); }); $('#button').click(function () { buttonclick(); }); function pageload() { $('#button').css('visibility","visible'); } function buttonclick() { $().post('server.php', {text:text,num1:num1,num2:num2}); } here html: <head> <meta charset="utf-8"> <title>bullshit</title> <script type="text/javascript" src="jquery3.0.js"></script> <script type="text/javascript" src="index.js"></script> </head> <body id="body"> <button id="button" style="visibility:hidden">click</button> </body> </html>

python - how to compare string in one line with string in next line? -

i have file 16,000 lines in it. of them have same format. here simple example if it: atom 139 c1 dppc 18 17.250 58.420 10.850 1.00 0.00 <...> atom 189 c1 dppc 19 23.050 20.800 11.000 1.00 0.00 i need check if lines contains string dppc , has identifier 18 forms 50 line block before identifier switches 19 , etc. so now, have following code: cnt = 0 open('test_file.pdb') f1: open('out','a') f2: lines = f1.readlines() i, line in enumerate(lines): if "dppc" in line: = line.strip()[22:26] if a[i] == [i+1]: cnt = cnt + 1 elif a[i] != a[i+1]: cnt = 0 and here stuck. found examples how compare subsequent lines similar approach did not work here. still cannot figure out how compare value of a in line[i] value of a in line[i+1] . try (explanations in comments).

c# - How to use EntityFramework CodeFirstStoreFunctions nuget package? -

i trying access existing function in db. want execute function code first. searching net found: https://codefirstfunctions.codeplex.com/ my implementation of this: protected override void onmodelcreating(dbmodelbuilder modelbuilder) { modelbuilder.entity<trainmessage>() .property(e => e.latitude) .hasprecision(18, 16); modelbuilder.entity<trainmessage>() .property(e => e.longitude) .hasprecision(18, 16); modelbuilder.entity<stop>() .property(e => e.stop_lat) .hasprecision(18, 16); modelbuilder.entity<stop>() .property(e => e.stop_lon) .hasprecision(18, 16); modelbuilder.entity<order>() .property(e => e.latitude) .hasprecision(18, 16); modelbuilder.entity<order>() .property(e => e.longitude) .hasprecision(18, 16); modelbuilder.entity<subscription>() .property(e => e.starttime

database - Neo4j read_only doesn't work -

so... know there's quite few articles , stuff read how set neo4j in read-only mode. problem is, doesn't seem work me. i've got existing database in neo4j 3.0.3 (i'm not 1 put though, i'm no expert) , need start in way, read-access allowed. tried changing neo4j.conf file accordingly (some sources put "read_only=true", others "dbms.shell.read_only=true") i'm still able delete or add nodes , relations... this configuration read in neo4j.conf: # allow read operations neo4j instance. mode still requires # write access directory lock purposes. dbms.read_only=true reference: http://neo4j.com/docs/operations-manual/current/#config_dbms.read_only

Plot range for line of fit using date on the x-axis in gnuplot -

i trying plot fit function (col 3 versus col 7) dataset given below 28-08-1991 20-12-1992 24-04-1992 -263347200 -221875200 -242611200 0.060859 20-12-1992 02-09-1993 27-04-1993 -221875200 -199756800 -210816000 0.064681 10-09-1996 13-09-1997 13-03-1997 -104371200 -72576000 -88473600 0.095728 ...... i script plot fit range of dates, between 1995 2003. unable range function right since gnuplot handle dates past year 2000. please find code below. set xdata time set timefmt "%d-%m-%y" set xrange ["01-01-1991":"01-01-2015"] set yrange [0.0:0.4] offset = 24*60*60 f(x) = 1.e-7*m*(x-offset)+c fit f(x) "file" using 3:7 via m,c set fit logfile 'file.log' plot '(x < "24-02-1993" ) ? f(x) : 1/0' title "best fit" lines ls 5 the variable x in plot contain time in form of seconds since 1/1/1970. in order compare date, need convert date same format strptime . if ad

angularjs - Array Not Propagating to View -

i'm new angularjs , firebase , have been stuck on quite time. i'm trying use ng-repeat iterate on array of procedures set in controller. can print $scope.procedures in controller not in index.html . idea i'm going wrong? index.html <!doctype html> <html lang="en" ng-app="myapp"> <head> <meta charset="utf-8"> <!-- angular js --> <script src="lib/angular/angular.min.js"></script> <!-- firebase --> <script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script> <script src="js/controllers.js"></script> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="container-fluid" id="logo"> </div> <div class="container" ng-controller="mainctrl"> <div class="col-