Posts

javascript - Play Local Video on PhoneGap/Cordova in Windows Apps -

i'm developing windows/windows phone 8.1 apps using phonegap(html, js, css, jqm) , native/windows runtime component. want play video in html page. video file located inside application folder. don't know what's wrong. please me. in html, have added: <div id="content"> <button onclick="domainobject.playvideo()" type="button" data-theme="b">play video</button> <video id="video" src='' type='video/mp4' width="400" autoplay="autoplay" controls></video> </div> and in js: var domainobject = { playvideo: function () { var vidpath = windows.storage.applicationdata.current.localfolder.path + "\\test.mp4"; var video = document.getelementbyid('video'); var source = document.createelement('source'); source.setattribute('src', vidpath); video.appendchild(source...

angularjs - When changing states browser doesn't find project js files -

i trying create new state in angular using ngrouter. have index.route.js file contains following: (function() { 'use strict'; angular .module('testapp') .config(routeconfig); /** @nginject */ function routeconfig($stateprovider, $urlrouterprovider) { $stateprovider .state('home', { url: '/', templateurl: 'app/main/main.html', controller: 'mainctrl' }) .state('tools', { url: '/tools/:category', templateurl: 'app/tools/tools.html', controller: 'toolsctrl', controlleras: 'tsctrl' }); $urlrouterprovider.otherwise('/'); } })(); then, have created tools.html , tools.controller.html . tools.html : hello world tools.controller.js : (function(){ 'use strict'; angular .module('testapp') .controller('toolsctrl', toolscontroller); /** @nginject */ function ...

MySQL Create Trigger if no exists? -

select trigger_schema, trigger_name information_schema.triggers; +------------------------+------------------+ | trigger_schema | trigger_name | +------------------------+------------------+ | tv_client1 | public_id | +------------------------+------------------+ i want added existing trigger public_id tv_client2. how create trigger if not exists? the final result should be: select trigger_schema, trigger_name information_schema.triggers; +------------------------+------------------+ | trigger_schema | trigger_name | +------------------------+------------------+ | tv_client1 | public_id | +------------------------+------------------+ | tv_client2 | public_id | +------------------------+------------------+ the query select trigger_schema, trigger_name information_schema.triggers; shows database name , trigger name. in case public_id trigger has been created in tv_client1 database. i...

openstack - Fiware Keystone API Create User -

we trying create users in fiware idm using keystone identity api. we sending following curl command curl -s \ -h "x-auth-token: e746971040657101bb1e" \ -h "content-type: application/json" \ -d '{"user": {"name": "newuser", "password": "changeme"}}' \ http://localhost:35357/v3/users | python -mjson.tool the token have used 1 configured in keystone.conf admin_token=e746971040657101bb1e but result getting following { "error": { "code": 401, "message": "the request have made requires authentication.", "title": "unauthorized" } } does have idea can happen? a couple of ideas you. one port value 35357 not admin api calls, it's intended user calls. also since using v3 api believe token can't used when creating user unless indicating domain. however can't tell curl command acti...

Android: keyboard numeric changes automatically to keyboard text alone -

i have simple item renderer standard listview. in item renderer have 2 edittext configure that: <edittext android:layout_width="40dp" android:layout_height="wrap_content" android:inputtype="number" android:selectallonfocus="true" android:text="8"/> when click first on 1 of these edittext, numeric keyboard appears 1 second, changes automatically standard text keyboard... don't know why! if click new time on 1 of these, numeric keyboard appears , it's ok (no change). actually, problem appears if there no open keyboard. have got idea? thank much! how check if java code have setinputtype() on edit first? if still have no clues, try method profile app or keyboard , check who's calling setinputtype() kind-a method can helpful.

python - Error using pytest tutorial -

i read unit-test brilliant feature write better code , assert features of target code stay same. wanted use it... i using anaconda on linux machine. i started using pytest working through manual's starter guide on homepage . after successful installation there appears first (unintended) error: strpeter@linuxcomputer:~$ py.test ================================================== test session starts =================================================== platform linux2 -- python 2.7.8 -- py-1.4.25 -- pytest-2.6.3 collected 0 items / 1 errors ========================================================= errors ========================================================= ___________________________________________________ error collecting . ___________________________________________________ anaconda/lib/python2.7/site-packages/py/_path/common.py:331: in visit x in visitor(fil, rec, ignore, bf, sort).gen(self): anaconda/lib/python2.7/site-packages/py/_path/common.py:377: in gen ...

knockout.js - restore page status, knockout site tutorial section -

this how knockout site restore page status. every time go page http://learn.knockoutjs.com/#/?tutorial=intro , type in click run button, , go site, click button browser go tutorial page. page prompt window saying "you've been on introduction before. continue left off?". how implement that? in advance.