Posts

angularjs - IONIC: Changing colors dynamically on sidemenu demo -

i'm writing ionic framework "sidemenu" type of app (based on sidemenu demo/starter) allows user choose theme (basically, bars , buttons colors). problem when user clicks button change dynamically theme, changes color of menu's header , not color of views header (stays in first color of array). here codepen example (just click on "change color" button on side menu): http://codepen.io/anon/pen/oxqqqm note: variable $scope.temabar starts "ionic color positive" ( $scope.temabar = 'positive'; ) , changed when button "change color" clicked. can tell me i'm doing wrong? thanks well code pen not work can't tell wrong if want change classes dynamically use ng-class directive. simple, easy, fast, , works. if using ng-class please fix codepen , update answer :d https://docs.angularjs.org/api/ng/directive/ngclass and example: http://codepen.io/sevilayha/pen/onfrd html: <div class="container...

sql server - how to loop through table and set cell equal to an incremented value in sql -

Image
i have table of users , if companyid input equal companyid user name shown , other names shown xxxxx. need way set "name"(literally word name) , incremented number how ever many there are. select case when t1.companyid = @id t1.name else ( 'xxxxx' ) end name with input 148 shows i want show this, , on more names(name3, name4, etc..): with foo being name of table, works (see sqlfiddle ) : set @id = 142; set @i = 0; select companyid, case when foo.companyid = @id foo.name else (concat('name',@i := @i+1)) end name foo;

Drupal 7: Populate node fields with values from $form -

i know if it's possible populate node fields values form_state or that. basically show register form merged form content type. using field_attach_form(). on submit create node using: $node = new stdclass(); $node->type = 'company'; $node->uid = 1; node_object_prepare($node); and values form_state , put them node. many thanks! hook form, add new submit handler , place code there.

how to update com.android.application plugin? -

i'm getting message: plugin old, please update more recent version, or set android_daily_override environment variable "a9d6c794295e89d95704157e2ed8fd55ffd2765c" and: c:\path\mobile\build.gradle error:(1) problem occurred evaluating project ':mobile'. failed apply plugin [id 'com.android.application'] not create plugin of type 'appplugin'. top build.gradel file: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0-beta1' classpath 'com.google.gms:google-services:1.3.0-beta1' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } } basically, don't know how update com.android.application plugin. apparently, beta releases of gradle android plugin expire. afaik, not documented behavior. right now...

android - new playlist created using ContentResolver doesnot show up in playlist -

i have created playlist using follwing code contentvalues cv = new contentvalues(); cv.put(mediastore.audio.playlists.name, "123456"); //uri uri = getcontentresolver().insert(mediastore.audio.playlists.getcontenturi("external"), cv); uri uri = getcontentresolver().insert(mediastore.audio.playlists.internal_content_uri, cv); if (uri != null) { toast.maketext(getapplicationcontext(),uri.tostring(), toast.length_long).show(); } each time run code details playlist created in content://media/internal/audio/playlists , id of playlist shown now activity used show playlists in phone public class playlist extends listactivity { //define source of mediastore.images.media, internal or external storage uri sourceuri = mediastore.audio.playlists.external_content_uri; //uri sourceuri = mediastore.audio.playlists.internal_content_uri; simplecursoradapter mysimplecursora...

ios - Access Gelocation from UIImage -

i can location information photo album on ios, access image location (latitude , longitude) when took photo. so image finished event public override void finishedpickingmedia(uiimagepickercontroller picker, nsdictionary info) { //uiimagepickercontroller.referenceurl var originalimage = new nsstring("uiimagepickercontrolleroriginalimage"); var image = (uiimage)info[originalimage]; foreach (var item in info) console.writeline(item.key + " " + item.value); image.savetophotosalbum(delegate(uiimage img, nserror err) { console.writeline("saved!"); }); _dp.dismissmodalviewcontroller(true); onimagechoosed(image); } } and in info dictionary, can see properties uiimagepickercontrollermediametadata { dpiheight = 72; dpiwidth = 72; orientation = 6; "{exif}" = { aperturevalue = "2.275007047...

javascript - Filtering view with AngularJS -

i have view whereby using ng-repeat populate couple of labels on screen. have search , using angular filter filter items in list. the issue when enter keyword in search bar, not search keyword in values binding in view, rather in whole json object being used render ng-repeat list. there way tell angular particular keyword in values bound view, rather json object? new angular, not sure if easy config or of sort.