Posts

javascript - angularjs factory promises and couchDB -

please bare me still learning angularjs. i have written following service data local json file: healthsystemservice.factory('healthsystemdata', ['$resource', function($resource) { return $resource('scripts/data/health-system/data.json', {}, { get: { method: 'get', isarray: true } }); } ]); then use service in controllers: $scope.healthsystems = healthsystemdata.get(); now, know how fetch same data pouchdb database: var db = new pouchdb('healthsystems'); db.get('healthsystems_list').then(function(doc) { return doc.list; }); as can see promise resolve .then my problem when try replace hard coded data in factory 'scripts/data/health-system/data.json' with data couchdb. trying like: healthsystemservice.factory('healthsystemdata', ['$resource', function($resource) { return $resource(***data couchdb(a promise)***, {}, { get: { method: 'get', ...

android - Passing "this" as root to LayoutInflater.inflate() in a custom component -

i writing code custom component extends linearlayout. include spinner @ top, , number of settings below, depending on spinner set to. i.e., when user selects "apple" on spinner, "color" option appears, , when select "banana" "length" option appears. since spinner option might have many settings associated it, define each group of settings in layout xml "merge" root tag. call initviews() in each constructor inflate views can add/remove them later. here code class: public class schedulepickerview extends linearlayout { protected context context; protected spinner typespinner; protected viewgroup defaultsetters; // viewgroup show when no schedule selected in spinner protected viewgroup simplesetters; // viewgroup show when simpleschedule selected in spinner public schedulepickerview(context context) { super(context); this.context = context; in...

dns - Custom domains for Azure Web App -

i'm trying set multiple custom domains our web app. basically it's dynamic website checks url , displays specific content based on customer determined url. let's have contoso.com our customer. in order website work need , record poiting our server ip provided azure , txt record poiting mywebsite.azurewebsites.net. but not enough, have go azure portal, , add hostname there, 'contoso.com', otherwise our customer 404 error. my question is, can tell azure, our web app, accept hostname, not ones defined in azure portal? i know can add hostnames via powershell or rest api, have thousands of customers , maintain. no that's not possible. think, can have multiple sites running on same vm , they'll have same ip address. service requires each site register it's hostname ahead of time when request comes in, service knows site request should routed to.

Connect android device to computer with usb and send data(string,int) -

system that, android device pluged macintosh usb cable. and in android application, want send data (a line of string,int, not matter) computer. how can ? possible ? do need application on computer ? or terminal enough? i create irc bitlbee server on computer, send string, or whatever through irc channel in it. or maybe find app it.

javascript - Is It possible to show tooltip on dropdown in asp.net -

in web application, have dropdowncheckboxes control trying show tooltip on selectbox items. is possible do. i tried code: .aspx: <%@ register namespace="saplin.controls" assembly="dropdowncheckboxes" tagprefix="asp" %> <link rel="stylesheet" href="css/bootstrap-3.1.1.min.css" type="text/css" /> <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet" /> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> script tag <script> $(function () { $("#tooltip1").tooltip(); }); </script> <div class="tooltip1"> <asp:dropdowncheckboxes id="dropdown1" runat="server" usese...

How to get all the yyyymm dates between two dates which are in yyyymm format in SAS? -

i have 2 different dates 201509 , 201608. want dates between them in format yyyymm (201509,201510,201511,201512,201601,201602,201603,201604,201605,201606,201607,201608). issue tackling months between years. also, teh months keep changing , might 201601 201612. it's daily run code , i'm trying automate in sas. appreciated! sas has functions allow must first convert/read dates "sas dates". can use intck count months between start , end , intnx create new month date values. data months; input (start end)(:yymmn.); format start end yymm.; = 0 intck('month',start,end); month = intnx('month',start,i); output; end; format month yymm.; cards; 201509 201608 ;;;; run; proc print; run;

Is there a way to tell less-css/gulp-less to leave an @import rule as-is -

i'd css file produced less compiler contain @import directive @ beginning of file. i.e. given less file: @import "external.css" /* import directive should left */ @import "globals.less" { color: @linkcolor; } /* defined in globals.less */ the resulting css file should this: @import "external.css" { color: #00a; } it seems none of various options of less import directive helps producing this. there other way? update: i'm using gulp-less compile less files. might problem package , not less ( @import (css) "external.css"; doesn't give desired result). update: seem gulp-less problem (or other library in chain) because code in question should output @import statement as-is without using (css) option. the less compiler seems capable of reading file extension , if css leaves @import directive as-is . so, should not less compiler issue. yes, try using css keyword @import (css) "external.css";...