Posts

Showing posts from July, 2014

Adding extra php parameters for sql -

so im making mini webpage has 8 links, 4 males , 4 females in each has 2 pants , 2 pants. ive made 5 php pages , scripted them, males shirts , pants not work. know can make them work? ill post teedetails.php page code , listoftees.php page code since both pants pages samething. teedetails: <?php $selection = $_get["id"]; mysql_connect("localhost", "root", ""); mysql_select_db("clothesshop"); $sql = "select * tshirts tid=$selection;"; $result = mysql_query($sql); $row = mysql_fetch_array($result); ?> <!doctype html> <html> <head> <link rel="stylesheet" href="boilerplate.css"> <link rel="stylesheet" href="teedetails.css"> <meta charset="utf-8"> <meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0"> </head> <bo...

split a string Java (At certain character) -

i'm trying split string after character 266 instance. user enters string, , if on length, spit @ (in case) 266th char. here code: if(inputtext.length() > 266){ //max chars reached. move part 2 } so, need takes 267th , on , sets var(p2 instance) , rest p1. you can use substring() split strings @ specific indexes: if(inputtext.length() > 266){ string var1 = inputtext.substring(0, 267); string var2 = inputtext.substring(267); } more information strings can found in javadocs .

java - cucumber tags dynamically set when triggering jenkins job -

how can set cucumber --tags while triggering jenkins job using jenkins api, i.e. "server_url + cfh_job + build_with_params + "/test_env=" + env_url + "/browser_type=" + browser" in runnertest looks this: @runwith(cucumber.class) @cucumberoptions( plugin = {"pretty", "html:target/html/", "json:target/cucumber.json"}, features = "src/test/resource", tags = {"@application"} ) i dynamically change tag parameter , control test suite run. thanks ronen i have similar use case in project. java project uses maven, can call "invoke top-level maven targets" pre steps. in case, have pass additional string paramater in jenkins job : server_url + cfh_job + "buildwithparameters?test_env=" + env_url + "&browser_type=" + browser + "&tags=" + tags where tags : tags= "@application,~@ignore" then, in jenkins job, in invoke top-l...

angularjs - Dynamic Karma running -

i using karma run unit test angularjs project , have configure karma.conf.js run complete test of whole application. problem project grow big, list of test run become long. make karma unit test become unpractical every-time need wait long time complete test whenever changes code. as project structure in way every different module put in each independent folder. so, thinking there way dynamically run test on folder file changes? meaning, example if there file changes in module a folder, karma automatically run test in folder only. way test run faster.

javascript - How do I exchange data via JSONP using jQuery with Safari? -

i use jquery exchange data using jsonp python server, works fine, e.g. in chrome. but in safari not work. looking in safari console error "[error] failed load resource: die netzwerkverbindung wurde unterbrochen. (here, line 0)". there seems network error in safari. looking @ server side can see, request reaches server. there processed in right way , reply generated. server's reply can't processed in safari. <script src="jquery.js"></script> <script src="jquery.mobile-1.4.5.js"></script> $.ajax({ url : "http://127.0.0.1:8888/url/here?callback=?", data: {request: "get_text", value: " "}, datatype: 'jsonp', beforesend: setheader, success: function(data){ console.log(data) $("#page_content").html(data.reply); }, error: function (request, status, error) { console.log(error ); } ...

mysql - Selecting rows whose foreign rows ONLY match a single value -

say have 2 tables -- people , pets -- each person may have more 1 pet: people : +-----------+-------+ | person_id | name | +-----------+-------+ | 1 | bob | | 2 | john | | 3 | pete | | 4 | waldo | +-----------+-------+ pets : +--------+-----------+--------+ | pet_id | person_id | animal | +--------+-----------+--------+ | 1 | 1 | dog | | 2 | 1 | dog | | 3 | 1 | cat | | 4 | 2 | cat | | 5 | 3 | dog | | 6 | 3 | tiger | | 7 | 3 | tiger | | 8 | 4 | tiger | | 9 | 4 | tiger | | 10 | 4 | tiger | +--------+-----------+--------+ i'm trying select people have tiger s pets. 1 fits criteria waldo , since pete has dog well... i'm having trouble writing query this. the obvious case select people.person_id, people.name people join pets on people.person_id = pets.person_id pets.animal = "...

javascript - How to put multiple canvas js animations on one page. (Createjs) -

i'm trying put multiple js animations on 1 html page. i've started testing 2 animations. figured once learn how implement two, can implement ten. i'm using flash cc publish html5 canvas animations (which outputs simple html file , js file). 1 animation called "ship" , other called "car". stands, "ship" appearing on screen. below code. (also there's link source files.) i'm no javascript/coding expert, troubleshooter/experimenter. i've repositioned code, tried renaming variables, etc. i'm pretty sure big hangup createjs variable. see createjs variable isn't called anywhere else on page... i'm guessing it's being used in remote js script(s)? i've commented out var createjs = createjs_car because if it's not commented, no animation appears. anyhow, i'm looking 2 (or more) animations working on same page. in advance! want source files? click here: click here <!doctype html>...

unity3d - Showing/Hiding Banners in Unity 5.1 and AdMob plugin 2.3 after some time won't hide banner or even load it, any idea why? -

i integrated admob in unity project banners supposed displayed @ menu , game on screen. problem after time banner ether wont hide more or stops showing up. here code requesting , showing/hiding banners: bool bannertrigger = false; public float bannerrequesttimeout; float bannerrequestedtime; float bannersakrivanjevreme; void start(){ requestbanner(); bannerrequestedtime = time.time; } void update(){ if (time.time > bannerrequestedtime + bannerrequesttimeout) { requestbanner (); bannerrequestedtime = time.time; } if ((gamecontroller.pause || gamecontroller.gameover !=0) && !bannertrigger) { bannerview.show (); bannertrigger = true; debug.log (bannertrigger); } if (!gamecontroller.pause && gamecontroller.gameover == 0 && bannertrigger) { bannerview.hide(); bannertrigger = f...

sql - How to pass current date into a query? -

this question has answer here: oracle select date between today 4 answers i'm trying pass sysdate query , respective result i'm getting no record. sql> select proc_pd_cd ps_proc_pd pd_strt_dt = sysdate 2 ; no rows selected if want current date, can using sysdate . if field has no time component: select proc_pd_cd ps_proc_pd pd_strt_dt = trunc(sysdate); otherwise: select proc_pd_cd ps_proc_pd pd_strt_dt >= trunc(sysdate) , pd_strt_dt < trunc(sysdate + 1);

multithreading - Synchronizing threads according to a specific property of monitor object in Java -

my program imitating work on repository. resource must synchronized array cells in repository object (used monitor). threads ( repothread class) allowed add or subtract values to/from cell values of array, when no other thread doing same thing on the same cell . repothread s actions(add/subtract) simultaneously long on different cells. cells in process considered "busy" , indexes stored in hashmap. i have these classes (: import java.util.hashset; import java.util.set; public class repository { private int[] cells; private set<integer> busycells; public repository(int size, int initialvalue) { busycells = new hashset<integer>(); cells = new int[size]; (int = 0; < size; i++) cells[i] = initialvalue; } public synchronized void add(int index, int amount, int threadid) { while (busycells.contains((integer) index)) { // cell busy try { system.out.println(...

localization - Load GTK-Glade translations in Windows using Python/PyGObject -

i have python script loads glade-gui can translated. works fine under linux, having lot of trouble understanding necessary steps on windows. all seems necessary under linux is: import locale [...] locale.setlocale(locale.lc_all, locale.getlocale()) locale.bindtextdomain(app_name, locale_dir) [...] class someclass(): self.builder = gtk.builder() self.builder.set_translation_domain(app_name) locale.getlocale() returns example ('de_de', 'utf-8') , locale_dir points @ folder has compiled mo-files. under windows makes things more difficult: locale.getlocale() in python console returns (none, none) , locale.getdefaultlocale() returns ("de_de", "cp1252") . furthermore when 1 tries set locale.setlocale(locale.lc_all, "de_de") spit out error: locale.setlocale(locale.lc_all, "de_de") file "c:\python34\lib\locale.py", line 592, in setlocale return _setlocale(category, locale) locale.error: unsupported ...

php - How to get the posts list and the associated tags with the smallest number of queries -

my tables structured follows: tags (more of category): id, tag name, description, slug posts: id, title, url ... poststags: id, idpost, idtag users: id, username, userslug... votes: id, idpost, iduser every post can have 5 tags , every user can vote once. currently, tags not implemented yet, retrieve paginated result set following query: select p.*, u.username, u.userslug, u.id userid, exists (select 1 votes v v.iduser=$id , p.userid=v.iduser , p.url = v.url) voted posts p join users u on u.id=p.userid order p.created desc limit 10 offset :offset the query gets ran via pdo , returned in json format angularjs ng-repeat . $id logged in user's id. use in exists subquery gray out vote buttons in angular view (there check on server side). if clicks username in view, taken detail page user's posts shown ( userslug rescue). the next step include tags in result list , here stuttered. each post in list must contain associated tags (tagname, description, ...

Using Vagrant and Docker together, by example -

so weekend installed both vagrant , docker on laptop , played around them little bit. totally understand different beasts different intentions in mind. can't think: how used complement each other? if google " docker vs vagrant " you'll ocean of blogs , articles stating how these 2 technologies different. have yet come across single concrete article demonstrating how these 2 technologies can used with each other. assume there has specific scenarios 1 use both, otherwise there no reason have vagrant-docker provisioner . so ask: can please provide me concrete scenario(s) in dev use both docker , vagrant? perhaps using vagrant manage local vm , perhaps docker "converting" configured (with deployed application in tow) vm container, or thereabouts? i'm looking specific, detailed scenarios here! in advance! this question broad dev environments can use creativity spans. so 1 scenario can think of running ubuntu in production environme...

python - Find target values in pandas dataframe -

i have multilevel dataframe df . columns, have different "objects" analyze. rows index , have case id lc , , time t . i need find, each case lc , time t (ideally interpolated, closest value fine enough) @ each object reached target value. this target value function of given object @ time t==0 . import pandas pd print(pd.__version__) 0.16.2 dummy data set example: data = {1: {(1014, 0.0): 20.25, (1014, 0.0991): 19.08, (1014, 0.1991): 18.43, (1014, 0.2991): 19.03, (1014, 0.3991): 18.71, (1015, 0.0): 20.22, (1015, 0.0991): 19.3, (1015, 0.1991): 18.68, (1015, 0.2991): 18.22, (1015, 0.3991): 17.84, (1016, 0.0): 21.75, (1016, 0.0991): 19.97, (1016, 0.1991): 19.65, (1016, 0.2991): 19.29, (1016, 0.3991): 18.94 }, 2: {(1014, 0.0): 29.11, (1014, 0.0991): 28.68, (1014, 0.1991): 28.27, (1014, 0.2991): 27.46, (1014, 0.3991): 26.96, (1015, 0.0): 29.22, (1015, 0.0991): 2...

python - Why does shutil.copy throw "OSError: [Errno 38] Function not implemented: '/media/some/path'"? -

i have relatively straight forward snippet throws error: import shutil abspath_to_source_file = '/media/moose/vff1147/map_data/back/b0000040.dft' target_dir = '/media/moose/9c33-6bbd/private/pana_grp/pavc/lumix/map_data/back' shutil.copy2(abspath_to_source_file, target_dir) which gives traceback (most recent call last): file "/usr/local/bin/lumixmaptool", line 4, in <module> __import__('pkg_resources').run_script('lumixmaptool==1.0.15', 'lumixmaptool') file "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 735, in run_script self.require(requires)[0].run_script(script_name, ns) file "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1652, in run_script exec(code, namespace, namespace) file "/usr/local/lib/python2.7/dist-packages/lumixmaptool-1.0.15-py2.7.egg/egg-info/scripts/lumixmaptool", line 56, in <module> main(ar...

c# - ConfigureAwait(true) not returning on the context it was awaited on -

sample : static void main(string[] args) { int counter = 0; var t = new system.timers.timer(); t.interval = 3000; t.elapsed += async (sender, e) => { debug.writeline("before await - thread : {0} , counter : {1}", thread.currentthread.managedthreadid, counter); await task.delay(1000).configureawait(true); debug.writeline("ater await thread : {0}, counter : {1} ", thread.currentthread.managedthreadid, counter); counter++; if (counter == 2) { debug.writeline("stop"); t.stop(); } }; t.start(); console.readkey(); } this outputs : before await - thread : 4 , counter : 0 ater await thread : 4, counter : 0 before await - thread : 5 , counter : 1 ater await thread : 4, counter : 1 stop why didn't return on thread await called on. first time timer runs on thread 5 , suppose capture context when async o...

In TextInputFormat in hadoop mapreduce what is byte offset? and how key is as byte offset and value is as content of line? -

while going through custominputformat topics came know have default inputformats textinputformat, keyvalueinputformat,sequencefileinputformat , nlineinputformat. for textinputformat line read records , byte offset of line used key , content used value. byte offset , how content of line considered value please suggest. textinputformat default inputformat . each record line of input. key, longwritable , byte offset within file of beginning of line. value contents of line, excluding line terminators (e.g., newline or carriage return), , packaged text object. file containing following text: on top of crumpetty tree quangle wangle sat, face not see, on account of beaver hat. is divided 1 split of 4 records. records interpreted following key-value pairs: (0, on top of crumpetty tree) (33, quangle wangle sat,) (57, face not see,) (89, on account of beaver hat.) clearly, keys not line numbers. impossible implement in general, in file broken splits @ byte, not line, bo...

ruby on rails - Not able to access related objects fields -

so i'm new rails , i'm not entirely sure i'm doing wrong. i've read says i'm doing right. i have relationships between 2 models. class photo < activerecord::base has_many :votes belongs_to :user end and class user < activerecord::base attr_accessible :username, :email, :password, :password_confirmation, :remember_me has_many :votes has_many :photos end here controller methods def index @photos = photo.order("created_at desc").to_a end def create @photo = photo.new(params[:photo]) @photo.user_id = current_user.id if !@photo.save @error = @photo.errors.full_messages.join('. ') render view_for_new return end end i know relationship works because in view when this: <%= photo.user %> user object back, , when <%= photo.user.inspect %> shows expected fields correct keys , values. however want access fields such username, email, etc , display on page. how ...

xDebug not connecting with Netbeans -

i have vm (centos 7, apache, php 5.4). small test php script works no problem. when try debug netbeans (8.0.2 on windows 8.1) shows 'waiting connection' , nothing more happens. using ssh tunnel vm port 9005 host port 9005. xdebug log: log opened @ 2015-08-16 18:11:22 i: connecting configured address/port: localhost:9005. i: connected client. :-) -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/project/html/index.php" language="php" protocol_version="1.0" appid="55867" idekey="netbeans-xdebug"><engine version="2.3.2"><![cdata[xdebug]]></engine><author><![cdata[derick rethans]]></author><url><![cdata[http://xdebug.org]]></url><copyright><![cdata[copyright (c) 2002-2015 derick rethans]]></copyright></init> -> <response xmlns="urn:debug...

vbscript - Convert alphanumeric string to given values for each, then add them for a total number -

i'm having difficult time wording i'm doing, have variable length alphanumeric data being fed program, , want find out total "pixel width" of string, based on fixed list of = 3 pxl, b = 3 pxl, = 1 pxl, etc... i list of pixel values of each letter , number, , script take input: ex. "this string", , convert numbers i've assigned add them , total them giving me total sum output (i assign number space " " , punctuation). so: "this string" "3+3+1+3+2+1+3+2+3+3+3+2+3+3+3+1+3+3 = 45" you need table/array of pixel widthes indexed ascii codes. can loop on string's characters , sum widthes. like: >> dim a(255) >> a(65) = 3 >> a(66) = 3 >> a(asc("i")) = 1 >> s = "aib" >> n = 0 >> p = 1 len(s) >> n = n + a(asc(mid(s, p, 1))) >> next >> wscript.echo n >> 7

php - preg_replace with pattern and html tags not working -

i have this: <span style="color:#ff8c00;"><strong>benjamin franklin</strong></span> or <span style="color:#ff8c00;"><strong><em>benjamin franklin</em></strong></span> or <span style="color:#ff8c00;">benjamin franklin</span> i need returns: [color=#ff8c00]<strong>benjamin franklin</strong>[/color] [color=#ff8c00]<strong><em>benjamin franklin</em></strong>[/color] [color=#ff8c00]benjamin franklin[/color] i have pattern in php ~<span\s[^>]*\bstyle=[\'\"]color\:([\#a-za-z0-9\(\)\,]+)\;[\'\"]>([\<a-z0-9\>]+)(.+?)\s([\<\/a-z0-9\>]+)<\/span>~is but not works well, allthough in regexr show works http://regexr.com/3bjis this returns me in php: [/[color=#benjamin franklin php $text = preg_replace( array( '~<span\s[^>]*\bstyle=[\'\"]color\:([\#a-za-z0-9\(\)\,]+)\...

c++ - Multiple template types -

is possible have multiple template types in c++? for example; template<template<typename> class baseclass> class myclass {}; template<class baseclass> class myclass {}; and using it; // using first template (template<typename> class baseclass) template<typename subclass> class myfirstsubclass : public myclass<myfirstsubclass> {}; // using second template (class baseclass) class mysecondsubclass : public myclass<mysecondsubclass> {}; you can't have separate templates same name, can have base template , 1 or more specializations of class. template<class baseclass> class myclass { }; template<class t, template<typename> class baseclass> class myclass<baseclass<t>> { }; template<> class myclass<int> { };

maven - Java manifest file altered after exporting project -

Image
this question follow of this , this question. i've placed meta-inf/manifest.mf file suggested /src/main/resources , exported project using following manifest.mf file: manifest-version: 1.0 main-class: org.fiware.kiara.generator.kiaragen there new line after main-class entry before end of file. artifact configuration bellow: the manifest.mf file in .jar file different 1 specified in resources directory: $ cat meta-inf/manifest.mf manifest-version: 1.0 created-by: 1.5.0_13 (apple inc.) why main-class entry removed? simple - done due build cycle. first sorces gets compiled along manifest resources, second maven writes new manifest, , gets overriden. if want pust custom stuff manifest, , use maven, should rather modify pom file create proper manifest insteed of putting 1 in resources. check following https://maven.apache.org/shared/maven-archiver/examples/manifestfile.html custom manifest includement.

Python, Boolean - Conditionals & Control Flow - Not understanding -

i cant seem grasp bootlean operators. i'm using example code academy. @ first read wrong , putting true or not false , false instead of true or false . can explain bit more me can more of understanding. assign true or false appropriate bool_one through bool_five. set bool_one equal result of false or not true , true set bool_two equal result of false , not true or true set bool_three equal result of true , not (false or false) set bool_four equal result of not not true or false , not true set bool_five equal result of false or not (true , true) you have 3 boolean operations , rules: not , inverses (aka not true => false , not false => true ) or , works on 2 operands x or y , returns true if either true , false if both false and , works on 2 operands x , y , returns true if both true , false otherwise they evaluated left right not has highest precedence, and after that, lastly or you can use () change precedence of operations, in everyda...

curl - Calling an PingAccess APIs from Powershell -

Image
i trying call pingaccess apis configure pingaccess. new using apis this, , have question. i trying use curl api . curl -k -u administrator:dummypsswd -h "x-xsrf-header: pingaccess" -h "content-type: application/json" -d '{"alias":"placeholder_star_mingle","filedata": [[system.io.file]::readallbytes("c:\test.pfx")],"password": "1234"}' https://localhost:9000/pa-admin-api/v1/keypairs/import -v when run following error. i still dont know why unauthorized. appreciated. when have special characters in password you'll need enclose username/password tuple in double quotes: curl -k -u "administrator:dummypsswdwithspecialcharslike&&" -h "x-xsrf-header: pingaccess" -h "content-type: application/json" -d '{"alias":"placeholder_star_mingle","filedata": [[system.io.file]::readallbytes("c:\test.pfx")],...

css - i cant get a image display before a ul li in a div -

i lost here. trying simple tick box image display before unodored list. have tried background url , list style image, no good. have changed name of div class. have tried placing codes in either 1 ul or 1 li. can display none work not images. ` html <!doctype html> <html lang="en"> <head> <title>cloudstrike</title> <meta charset=utf-8"> <link rel="stylesheet" type="text/css" href="css/style.css"> <meta name="viewport" content="width=device-width;" initial-scale=1"> </head> <body> <div id = "wrapper"> piece of text inside 500px width div centered on page <div id="site-title"><a href="#"></a></div> <header> <nav> <ul> <li><a href="#">t-shirts</a></li> <li><a href="#">...

python - Determine the coordinates of local maximas in a two-dimensional array using derivative -

i have fits image , trying find coordinates of local maxima in image far couldn't quite make work. my image can find here. have far import numpy np import scipy.nimage ndimage astropy.wcs import wcs astropy import units u astropy import coordinates coord astropy.io import fits import scipy.ndimage.filters filters scipy.ndimage.filters import maximum_filter hdulist=fits.open("mapsnr.fits") #reading 2 dimensional array fits file d=hdulist[0].data w=wcs("mapsnr.fits") idx,idy=np.where(d==np.max(d)) rr,dd=w.all_pix2word(idx,idy,o) c=coord.skycoord(ra=rr*u.degree, dec=dd*u.degree) #the sky coordinate of image maximum print c.ra print c.dec that how can find global maximum of image, obtain coordinates of local maximas have the significance of being greater three . what have found looking in web this following answer doesn't work in case. update : have used function def detect_peaks(data, threshold=1.5, neighborhood_size=5): data_max = filter...

opencart2.x - OpenCart 2 - VQmod Extensions not appearing -

getting on own - appreciated. i'm new opencart, , have 2.0.3.1 installed. installed vqmod install flexible menu , menu work on phones. went site/vqmod/install, , has done - tells me it's "already installed" after installing menu mod can't find anywhere - uploaded upload folder's contents via ftp folder shop (and vqmod) in - , nothing has changed. tried number of different menu mods, , still nothing. hoping more knowledge of oc2 can see might going wrong. appreciated!

excel - Calculate hours outside normal working time -

from sample xls(office2007) listed below. trying calculate hours worked 17:00 onwards. show me how write formula achieve this. many thanks... leaving time arrival time deliverytime rtb time per job hoursfordayswork 09:30:00 11:05:00 11:15:00 11:15:00 01:45:00 12:00:00 11:15:00 12:15:00 12:30:00 13:30:00 02:15:00 13:30:00 15:30:00 15:45:00 15:45:00 02:15:00 15:45:00 18:15:00 18:30:00 18:30:00 02:45:00 18:30:00 19:00:00 19:45:00 21:30:00 03:00:00 time in excel based upon parts of 24 (whole day) explained in this article . so assuming care hours after 17:00, not after midnight, following should out: =if(c2<17/24,0,c2-17/24)*24 c2 cell calculation for, 17/24 giving time 17:00 (5pm). *24 @ end converts response in hours instead of partial day.

php - Retrieve shopping cart items from database -

i'm trying implement shopping cart website. page loops through products in database , displays them on page 'add' button. can add item if logged in. products table | id | name | price | quantity | description | image_name | once add item stores in cart table. 'cartproduct int' same 'id' in products table. cart table | cartid | cartproduct | productcount | uniqueid | username | date if click add on same product, productcount increment. so if testuser adds cartproduct 1 & 2 , 2 again. i'm unsure on how display products username 'testuser' , need productcount * price. at moment i'm trying loop through each cartproduct logged in user, select id products table id = cartproduct (as same). can grab price , details of product. at moment selecting cart username = username logged in. can see outcome, displaying it. $sql = "select cartproduct cart username ='" . $name . "'"; ...

can Telegram CLI mimick Telegram bots? -

i saw on internet there programs can use telegram cli. want choose between them telegram bot api there more documents explaining functionality, cli there isn't explains features seems way know experiment it. unfortunately don't have linux distro installed on pc experimenting isn't option right know. thought ask people used it know telegram bot api, powers , limitations here questions: can using telegram cli can't with bot api, , vice versa? telegram bot api: do not require register new telegram account, don't need have phone number; bot cannot write user first, after user sends first message bot; already has commands interface (/command); can stuff simple http post (by sending request via curl, example). can hook tons of stuff (notifications new articles @ website or so); you can rather create lots of them; you can write own implementation in programming language; you have list of bots have created (thanks @botfather). if have lost some...

angularjs - angular-ui bootstrap tooltip issue -

for reason way structured page, tooltip not working. main.html <div class="main-navigation"> <div rt-tool-menus-"menus" selected="selectedmenus" tooltip="{{appcontroller.displayname}}"></div> </div> controller.js angular.module('abc') .controller('abccontroller',..... self.menus=[ { heading: 'head1', active: false, route: 'head1' }, { heading: 'head2', active: false, route: 'head2' tooltip: 'head2' // tried, doesnt work }]; self.selectedmenus = []' self.tooltip = appconfig.displayname; // tried not working what right approach show tooltip correct header, , location? not sure appconfig (not visible in snippet) have add text want show in tooltip instance variable of controller if you're using controlleras or $scope variable. pleas...

xml - Renaming node with namespace -

hi have issue namespaces my xml follows: <earnings xmlns="http://www.dppvgu.com" currency="usd"> <distribution>15002111</distribution> <ticket_sales> <distribution num="2">24450144</distribution> <distribution num="3">12057133</distribution> </ticket_sales> <digital_sales> <ppv_sales>19220907</ppv_sales> <stream_sales>49725265</stream_sales> <disc_sales>15082021</disc_sales> </digital_sales> </earnings> i rename node <distribution>15002111</distribution> using following command: for $doc in doc("earnings.xml")/*[local-name() = 'earnings']/*[local-name() = 'distribution'] return rename node $doc 'postbox' i following error: [xudy0023] conflicts existing namespaces. how resolve issue? please help try using qname() specify new name in defaul...

binding - QML fade out changed item -

i'm new qt , qml - seems rather simple issue can't find simple solution it. say have following example qml item { ... lots of other stuff item { id: obj_container property var obj text { text: obj.name } image { source: obj.source } } } now when obj property becomes null, fade out obj_container item, while still displaying values had before set null. alternatively, if obj item changes different obj, fade out obj_container item (still displaying previous values) , fade in again new values. how go this? update the obj in example q_property of object set using setcontextproperty c++, in engine.rootcontext()->setcontextproperty("obj_holder", &obj_holder); the obj property in example above set like obj_container.obj = obj_holder.obj though think purposes above doesn't make difference obj property coming or how set/changed. when obj changes, above sho...