Posts

Showing posts from May, 2014

javascript - Meteor - Simple Search Issues -

so i'm trying live search of client-side info in meteor. i have template.usertable.events({ "change #namesearchbar":function(event){ //console.log(event); searchtext = event.target.value; filteredusers = meteor.users.find({"profile.name":{$regex: (".*"+searchtext+".*") } }); console.log(filteredusers.fetch()); } }); in js, and template.usertable.helpers({ usersonline: function() { return filteredusers; } }); as well. can see filteredusers updated in console logs, don't nice live-update of html lists usersonline - instead of them, usersonline initialised to, calling filteredusers = meteor.users.find(). how can desired live-update? your filteredusers variable not reactive, when changes, nothing telling usersonline helper re-run. think can in 1 of 2 ways: use reactivevar . i'm admittedly not experienced them, think assign reactivevar part

PHP MySQL date ordering -

ok im trying order results date , time in ascending order far isnt working :( $kalendarquery = mysqli_query($con, "select people.firstname, people.lastname, people.id, people.avatar, dates.date, dates.time, dates.timezonedate people inner join dates on people.id=dates.invited_id dates.inviter_id='$user_id' , status='1' order str_to_date(concat(dates.date,' ',dates.time), '%d/%m/%y %h:%m') asc limit 50"); i mean doesnt order lowest date biggest your second parameter str_to_date has match date format in char field; otherwise, conversion return null every row why not being ordered. so since dates formatted 27.03.2015 using . delimeter, need make sure use . in parameter rather / . also lower case %y 2-digit year, need %y because you're using 4-digits: order str_to_date(concat(dates.date,' ',dates.time), '%d.%m.%y %h:%i') asc you didn't give example of time format, can figure out how r

Drupal Restaurant Reservation - how to Install? -

i'm new web dev drupal. i've made simple site using drupal commerce , ubercart modules food order , delivery functions. i wanted include option reserve tables, , drupal's open restaurant seemed straight forward way go. now know open restaurant distribution , cannot installed simple modules. however, want reservation option. how go installing relevant parts on existing site? my drupal , module details follows: drupal : 7.34 commerce : 7.x-1.11 ubercart - core modules : 7.x-3.8 if suggest simple table reservation system, great too. the open restaurant distribution assumed installed "package". not via pick-the-modules-that-you-need approach, though in theory (but requires quite bit of drupal experience). therefor recommend have @ various "reservation" related drupal extensions available today, further detailed below. modules stable d7 release here modules might fit, have stable d7 release (quotes project pages): avai

javascript - MongoDB Combine data from multiple collections -

i'm trying combine 3 collections one the first collection make of vehicles vehicle { "_id" : , "vehicle_id" : , "engine_id" : , "service_schedule_id" : } the other 2 service schedules , parts service_schedule { "service_schedule_id" : , "date" : , "description" : } parts { "part_id" : , "vehicle_id" : , "description" :, "name" : } what want combine them in end have 1 collection instead of having id's contains actual information collection vehicle_complete { "_id" : , "vehicle_id" : , "engine_id" : , "service_schedule" : { "service_schedule_id" : , "date" : , "description" :, "parts" : }, "parts" : [ { "part

php - Insert form and multiple upload -

i want insert advertisement. advertisement contains title, text, price , can have 1 or multiple images. form on 1 page. php , html in 1 file. in database have advertisement table , image table. both have unique id primary. the image table contains filename , advertisement_id advertisement table foreign key table. questions: how upload multiples files? do need insert everthing @ once or insert advertisement first , pictures? <div class="form-group"> <label for="image" class="col-sm-2 control-label">image:</label> <div class="col-sm-6"> <input type="file" id="exampleinputfile" name="filename[]" id="filename" multiple"> </div> </div> as second question, thing more sensible insert advertisement insert pictures. for first question, the html code that <form name="multiupload" action="u

elasticsearch - How to store raw values for all properties? -

how can store raw values properties in elasticsearch ? i need raw values aggregation, properties not known a-priory. update: want properties be { "type": "string", "fields": { "raw": { "type": "string", "index": "not_analyzed" } } } whereas properties dynamic thanks in advance. you have use put method add data elasticsearch. example: `$ curl -xput 'http://localhost:9200/products/product/123' -d '{ "productid": 123, "sellingprice": 1200.00, "discountamount":0.00, "discount": { "type": "percentage", "amount": 25, "startdate": "2014-08-13t12:05:00", "enddate": "2014-12-31t12:10:00" } }'` curl library can used send data elasticsearch. testing purpose can use [chrome sense plugin]

osx - Installing pygame mac, python 2.7.9, issues with freetype and other dependencies -

i'm trying install pygame on mac, , i've been able install dependencies, i'm stuck @ step pip install hg+http://bitbucket.org/pygame/pygame the installation fails @ point: fatal error: 'freetype/config/ftheader.h' file not found #include <freetype/config/ftheader.h> how fix this, i'm pretty sure have freetype (see below)? i noticed though installed dependencies, notifications these when compiling. sdl : found 1.2.15 framework sdl not found font : found framework sdl_ttf not found image : found framework sdl_image not found mixer : found framework sdl_mixer not found smpeg : found 0.4.5 framework smpeg not found framework coremidi found framework quicktime found png : found jpeg : found portmidi: found freetype: found 2.5.3 avformat: not found swscale : not found i ran similar problem , following worked me: first, find location of systems freetype include files with freetype-config --cflags for me, first

java - Storing and comparing tree nodes in a Map -

i have following: map<mynode, mynode> nodes = new hashmap<mynode, mynode>(); this map won't ever filled more 100 nodes @ time, don't have worry overhead. trying when create new node, , set contents of node. want check if node exact same contents exist in map. doing maps.containskey(); but realized don't have same signature. though there might node exact same content, java different. question how can store node in map, , able check if node exact same contents exists? class mynode { boolean end = false; map<string, mynode> edges = new hashmap<string, mynode>(); } i haven't wrote own hashcode or equal. figured if use containskey tell me if equal use own object. don't use node object unless can modify it. use own created object , override equals() (and hashcode() ) methods determine if 2 such objects unique. work expected respect containskey() , other approach.

ruby - Can I create an interval loop in an array? -

i'm trying created timed loop in array. mean.. array = [10, 15, 19, 25] array.each |e| loop ... end end i want output this: 10 #=> waits 10 seconds... 15 #=> waits 10 seconds... 19 #=> waits 10 seconds... 25 is possible? thank in advance. :) sleep x pauses output x number of seconds. so you're looking is: array = [10, 15, 19, 25] array.each |e| puts e sleep 10 end

What's the meaning of hash sign (#) in SPARQL? -

in sparql, see usage of # @ end of prefix definitions, this: @prefix dt: <http://example.org/datatype#> what's purpose? couldn't find in sparql documentation. your example seems in turtle , in sparql syntax be: prefix dt: <http://example.org/datatype#> but it’s same idea: instead of having use full iris in query, can use prefixed names : in example, prefix label dt . it’s mapped iri http://example.org/datatype# . in query, might used dt:foobar , foobar called local part . the mapped iri prefix label , local part concatenated form "actual" iri: http://example.org/datatype# + foobar = http://example.org/datatype#foobar (instead of using dt:foobar , use <http://example.org/datatype#foobar> .) so # happens part of iri design. it’s popular way structure vocabulary iris in semantic web. other popular way using / . see hashvsslash .

c# - Error inserting code after a break -

it's gives me error after break in second if sequence. int value; value=somemethod(); foreach(list<gameobject>lista in tilesorganizadosporcoluna) { bool found=false; //dosomething(); if(value==1) { //if value=1 first iteration. break; } } if(!found) //dootherthhink(); } what's correct way it? (i want stop foreach loop not if)thanks. tryed google, example found. (that break inside if stop foreach not if). the lack of indentation makes hard read, figure meant this: bool found=false; int value; value=...; foreach(list<gameobject>lista in tilesorganizadosporcoluna) { if(value==1) { found=true; break; } } if(!found) { //dosomething() } you missing couple of brackets. figure ide should have warned of this. i'm afraid code doesn't make whole lot of sense though, since you're not doing you're iterating, found dependant on value initialized to.

c# - how can I swap two child entity values -

i have entity called "space" , inside has "images". images has ordering property int. i'm trying see if there easy linq can made swap ordering values. public class space { public int spaceid { get; set; } public virtual icollection<spaceimage> images { get; set; } } public class spaceimage { public int spaceimageid { get; set; } public byte[] image { get; set; } public byte[] imagethumbnail { get; set; } public string contenttype { get; set; } public int ordering { get; set; } } ex. image might have ordering 3 , have 6, want swap these 2 numbers each of these images public void swap(int spaceid, int old, int new) { //swap 3 , 6 ordering value 2 spaceimages contain these values spaceid spaceid } in general, linq used querying. use find appropriate spaceimage instances, set values appropriately: // assuming method in space class public void swap(int oldorder, int neworder) { var oldinst = this.imag

IIS Express executes another console app ok but deploy to IIS doesn't run successfully -

i have asp.net application , point have execute console application. development env iis express, executing console app fine. but host web app in iis , executing console app not working , not error. i have tried suggestions found stackoverflow or other places. still not luck. could issue? i have solved issue. because of permission. after iis apppool\poolname granted execute assess folder, working fine.

Graph theory: Every vertex belongs to some component of the graph -

i know intuitively, every vertex of undirected graph must belong component of graph, since @ least, every vertex of graph connected itself. how can proven formally? consider operator ~ on vertices in (possibly infinite) graph g, v1 ~ v2 iff there path between v1 , v2 (and allowing v ~ v). ~ equivalence relation on vertices(g), since reflexive, symmetric , transitive (you should verify each of these properties). by definition of component, each equivalence class in vertices(g)/~ associated 1 component of g, , contains vertices of associated component. equivalence classes form partition of sets on defined , each vertex of g in @ least 1 equivalence class, , hence in 1 component.

correlation - Why PCA gives vector as output for 294*40 matrix in matlab -

Image
i new stats , matlab too. have feature selection in project used principle component analysis(pca). i referred tutorial use pca in matlab my code given below, pcainput = rand(294,40); disp(size(pcainput)) % output 294 40 pcaoutput=pca(pcainput); disp(size(pcaoutput)) % output 40 1 , unacceptable per tutorial %that's as per tutorial , if input matrix of pca() function has p variables , output p*p matrix.so function should give me matrix of 40*40 giving me matrix of 40*1. going wrong ? as per tutorial , output unacceptable. searched on internet , can not find article on topic.

c++ - What is the advantage of a move constructor over a copy constructor that takes a bool that says whether to copy or move? -

why need move constructor/assignment operator in c++ when can this: foo(const foo& x, bool copy = false) { if (copy) { // copy } else { // move } } or missing something? move constructors implicitly written (unless block it). move constructors called automatically in contexts, if have code written before existed. move types can exist move constructors, , block copy-actions error @ compile time. marking 'please move this' not require 2nd parameter, making perfect forwarding work. perfect forwarding works rvalues. (perfect forwarding imperfect, btw) move assignment won't work well pattern. the rvalue ref useful in contexts outside of move/assign. honestly, comparing c++11 move , rvalue refs proposal asking why telsa better tricycle broken wheel. broken trike cheaper, grant it.

Mysql order by percent of two values sum -

so need order percent counted 2 values of 1 field data stored in json. the field name values stored named program_invested_details , example value is: {"invested":"120.00","received":"1.08"} i need $query (received * 100 / invested) field select *, ($query) perrcent_total programs_list program_add_status = 4 , program_status = 1 order perrcent_total desc how possible make? by default mysql not have ability parse json string. one option use extension such common_schema add ability parse json , extract fields (see get_option ). not sure of performance hit take extension. another option query data , parse json in client program. once again, there significant performance impact if there lot of data.

java - Modify duplicating random number generator to non-duplicating random number generator -

int size = 5; int[] list = new int[size]; random rand = new random(); for(int = 0; < size; i++) { list[i] = rand.nextint(100); } for(int element : list) system.out.print(element + " "); i'm trying modify random number generator not duplicate random generated numbers. how can accomplish this? help. there various ways it. simple variant on have: int size = 5; int[] values = new int[100]; int[] list = new int[size]; for( int = 0; < 100; i++ ) values[i] = i; random rand = new random(); int ctlistsize = 0; int xlist = 0; while( true ){ int icandidatevalue = rand.nextint(100); if( values[ icandidatevalue ] == 0 ) continue; // used list[ xlist++ ] = icandidatevalue; values[ icandidatevalue ] = 0; if( xlist == size || xlist == 100 ) break; } for(int element : list) system.out.print(element + " ");

css3 - CSS to add commas between <dd>s -

best attempt far dd { display: inline; margin: 0; } dd + dd::before { content: ', '; } <dl> <dt>one</dt> <dd>one</dd> <dd>two</dd> <dd>three</dd> <dt>two</dt> <dd>one</dd> <dd>two</dd> <dd>three</dd> </dl> i'd add commas between <dd> elements using css pseudo-elements. problem above attempt there's space before each comma. when <li> s, can use ::after pseudo-elements , target li:last-of-type remove comma last item, can't figure out way target last <dd> in example. think proposed has selector (like dd:has(+ dd) ). there workaround in css3? or there way rid of space? if have to, i'll use negative margin pull comma toward preceding word. the space seeing between elements determined parent element's font-size . inline elements respect whitespace in markup. one way re

java - Reading input from a file in a specific pattern -

i have text file have read array list. looks this: [up, 1, up, 1, up, 1, left, 1, right, 1, down, 3] how separate inputs arraylist in way assign numbers following method up(int n) until next method left(int n) , on? lol threw check , see if works. bufferedreader br = new bufferedreader(new filereader("myfile.txt")); string line = br.readline(); string [ ] words = line.split ( "," ); for(int = 0; < words.length; i++) { switch(words[i]) { case " up": case "up": moveup(integer.parse(words[i + 1]); i++; break; case " down": case "down": movedown(integer.parse(words[i + 1]); i++; break; case " left": case "left": moveleft(integer.parse(words[i + 1]); i++; break; case " right": case "right": moveri

android - Getting error "java.lang.RuntimeException: Unable to start activity" in my app -

my application worked yesterday, cant figure out why stopped working. thing tried doing create signed apk. had create new google maps key , place manifest file. done following google developers tutorial. when try run app start up, click button , force closes. this error log: 03-20 23:31:33.636 10036-10036/project.sharethefare e/androidruntime﹕ fatal exception: main process: project.sharethefare, pid: 10036 java.lang.runtimeexception: unable start activity componentinfo{project.sharethefare/project.sharethefare.currentlocation}: android.view.inflateexception: binary xml file line #9: error inflating class fragment @ android.app.activitythread.performlaunchactivity(activitythread.java:2658) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2725) @ android.app.activitythread.access$900(activitythread.java:172) @ android.app.activitythread$h.handlemessage(activitythread.java:1422)

r - Why does JAGS require at least two chains to calculate DIC? -

i'm trying understand how jags calculates deviance , deviance information criterion (dic). the dic.samples function in rjags in r throws error if have 1 chain. stop("2 or more parallel chains required") the formula calculating dic involves calculating expected deviance , deviance @ expected values of parameters in model. imagine such estimates obtained single chain (albeit there might convergence issues can identified more 1 chain). the manual states that: the pd monitor estimates contribution effective number of parameters (pd) [3] observed stochastic node comparing deviance deviance across multiple chains [1]. created using option type(pd). if model has 1 chain pd monitor cannot defined. so question is: why jags require @ least 2 chains calculate dic? or more specifically, why pd monitor require 2 chains? there number of different ways calculate pd - method jags uses described martyn plummer in discussion 'bayesian measur

kernel - Raspberry Pi 2 Crash: Internal error oops preempt smp arm -

after 24 hours on raspberry pi 2 syslogs messages , after must hard reset/reboot pi. message syslogd@raspberry @ mar 20 23:30:53 ... kernel:[12540.865789] internal error: oops: 17 [#1] preempt smp arm message syslogd@raspberry @ mar 20 23:30:53 ... kernel:[12542.177016] process motion (pid: 3151, stack limit = 0xb90c8238) message syslogd@raspberry @ mar 20 23:30:53 ... kernel:[12542.183009] stack: (0xb90c9d18 0xb90ca000) message syslogd@raspberry @ mar 20 23:30:53 ... kernel:[12542.187356] 9d00: ba7b5280 b90bcc60 message syslogd@raspberry @ mar 20 23:30:53 ... kernel:[12542.195520] 9d20: b90c9d4c b90b0450 b90bcc60 70a90000 00002000 b90c9d88 00000000 b939c700 message syslogd@raspberry @ mar 20 23:30:53 ... kernel:[12542.203683] 9d40: b90c9d7c b90c9d50 80112f7c 8011e600 70a90000 00418004 b81e26e0 b90c9db0 message syslogd@raspberry @ mar 20 23:30:53 ... kernel:[12542.211847] 9d60: b939c700 b2831ae4 00418004 b9365c00

java - Something going wrong with the charAt method? -

this part of program giving me trouble. file getting received program. without charat method program runs perfectly. i'm not sure issue is. not program in entirety, part giving me error. the error: java.lang.stringindexoutofboundsexception: string index out of range: 0 @ java.lang.string.charat(unknown source) @ genseq.main(genseq.java:111) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ edu.rice.cs.drjava.model.compiler.javaccompiler.runcommand(javaccompiler.java:272) program: do{ line = inputstream.nextline(); line = line.trim(); if (line.charat(0) == '>'){ //checking see if it's information line info = info + line; count++; //used count number of entries } else{ seq = seq + line; //concatenati

indexing - Why this query still taking time to return 500K records having 14 columns -

i looking advise regarding improvement in query ( if any). please @ below query plan , notice of tables using index seek ( non-clustered) , nested loops. still query taking 00:01:17 time extract 500k rows. please suggest if wrong or needs improvement in it. stmttext |--top(top expression:((500000))) |--nested loops(inner join, outer references:([mydatabase].[dbo].[cardmerchant].[cardid], [expr1028]) optimized unordered prefetch) |--nested loops(inner join, outer references:([mydatabase].[dbo].[merchant].[merchantid], [expr1027]) unordered prefetch) | |--nested loops(inner join, outer references:([mydatabase].[dbo].[merchantgroup].[merchantgroupid], [expr1026]) unordered prefetch) | | |--nested loops(inner join, outer references:([mydatabase].[dbo].[regionalgroup].[id])) | | | |--nested loops(inner join, outer references:([mydatabase].[dbo].[company].[companyid])) | | | | |--nested loops(inner

android - Hide action bar for small screen -

i working on android aap , want hide action bar small screen (240x320) not normal , large screen. possible hide if how? then need dimenstion first.. here's how dimension: display display = getwindowmanager().getdefaultdisplay(); int width = display.getwidth(); int height = display.getheight(); see answers here on how screen dimension here's how hide action bar getwindow().requestfeature(window.feature_action_bar); getactionbar().hide(); addition v7 support actionbar user, code be: getwindow().requestfeature(window.feature_action_bar); getsupportactionbar().hide(); see answers here on how hide action bar

Java: Is creating a "System" class a bad thing? -

i started project in java, contains class called system . class (luckily) contains methods output management, in rare cases need use system. methods (or system object in general) reference java.lang.system. . believe looked down upon, system looked @ reserved name. in beginning stages of program, , change accordingly quickly, there little calls class itself. while it's not illegal, don't want this. if next person working on code, first thing try remove " java.lang " " java.lang.system " , miffed when wouldn't compile. the idea go toward brevity , write need write, while making sense of next person. it's more art science. you name projectnameheresystem or outputmanager or effect.

java - how to translate the double colon operator to clojure? -

i discovered new syntax java 8 reading through source framework i'm attempting wrangle: runtime.getruntime().addshutdownhook(new thread(sirius::stop)); in clojure, can translate as: (.addshutdownhook (runtime/getruntime) (thread. ????)) but i'm not sure put ??? ifn extends runnable, can do #(sirius/stop) it worth noting that you have make lambda. clojure won't let refer sirius/stop java 8 functional interfaces under hood work making anonymous implementations of interfaces 1 method. so new thread(sirius::stop) is syntactic sugar for new thread(new runnable { public void run() { sirius.stop(); } }) if interface in question isn't runnable/callable, you'll have use reify macro.

java - unable to find class referenced in signature (Lorg/shaded/apache/log4j/Logger;) after upgrading Firebase for Android -

Image
when save firebase data storage, getting following errors email , password registration fine in login&auth section. using java, android. spent 3 hours cannot fix problems (maybe new firebase android update?). here proof email/pass working: firebase f = new firebase("https://myapp.firebaseio.com/"); firebase userdata = f.child("user"); //save login&auth of email , password success userdata.createuser(emailaddr.gettext().tostring(), passwd.gettext().tostring(), new firebase.valueresulthandler<map<string, object>>() { @override public void onsuccess(map<string, object> result) { system.out.println("successfully created user account uid: " + result.get("uid")); } @override public void onerror(firebaseerror firebaseerror) { // there error

c++ - Face Detection Using OCL (OPENCV) -

Image
i trying detect faces using below code making use of gpu #include <opencv\cv.h> #include <opencv\highgui.h> #include <iostream> #include <stdio.h> #include <opencv2\ocl\ocl.hpp> std::string face_cascade = "c:\\opencv\\data\\haarcascades\\haarcascade_frontalface_alt.xml"; std::vector<cv::rect> detectfaces(cv::mat gray){ cv::ocl::oclmat oclgray; std::vector<cv::rect> faces; cv::ocl::oclcascadeclassifier face_detector; oclgray.upload(gray); face_detector.load(face_cascade); face_detector.detectmultiscale(oclgray, faces, 1.1, 3, 0|cv_haar_scale_image, cv::size(30, 30), cv::size(0, 0)); return faces; } int main(){ cv::videocapture webcam; cv::mat mainimage; std::vector<cv::rect> faces; webcam.open(0); cv::namedwindow("face",cv_window_autosize); while(webcam.isopened()){ webcam.read(mainimage); if(!mainimage.empty()){ cv::resize(

how apply function on all element of array and get result as array in clojure? -

generally want know when have array of object have property can same "object literal in javascript" can calculated specific function. want create property array in clojure apply calculation on them such sorting or more simpler finding maximum according property.for example how try find maximum in example? (def asqh (fn [x] (* x x))) (def masqh (max (apply asqh [1 2 3 4]))) the have error output object , not number you seem thinking of mapping operation (take function of 1 argument , collection, replace every element result of function on element), in clojure called map . apply function plumbing collections functions if given each element separate argument. want use variadic functions (i.e. functions such max , take variable number of arguments). instance (def masqh (apply max (map asqh [1 2 3 4]))) ;;=> 16 if want preserve datatype of collection after performing mapping, can use into , empty : (defn preserving-map [f coll] (into (empty coll) (ma

jquery - remove white space and empty search using ajax and codeigniter -

i facing problem when give space got results database using jquery ajax function, when give space , remove space return results database please how fix this. here html <div class="col-md-6 col-md-offset-3 search"> <div class="input-group"> <input type="text" id="search" data-action="<?php echo site_url('home/search') ?>" class="form-control" placeholder="search lectures"> <span class="input-group-btn"> <button class="btn btn-default " type="button">go!</button> </span> </div><!-- /input-group --> <div id="user_serach"></div> </div> here jquery code $('#search').keyup(function(){ var user_search = $('#search').val(); if(user_search == &#

python - Recursively name all .pyc.py files to .py files -

i'm trying recursively rename .pyc.py files .py files. my code : import os,sys def main(): ffolder = raw_input("folder >> ") folder = 'c:\users\account name\desktop\disney\toontown\\'+ ffolder +'' filename in os.listdir(folder): infilename = os.path.join(folder,filename) if not os.path.isfile(infilename): continue oldbase = os.path.splitext(filename) newname = infilename.replace('.pyc.py', '.py') output = os.rename(infilename, newname) while true: main() it works fine requires me type in each folder name. how make on own? use os.walk recursively traverse directory tree. import os import fnmatch dirpath, dirnames, filenames in os.walk(folder): f in filenames: if f.endswith('.pyc.py'): os.rename(os.path.join(dirpath, f), os.path.join(dirpath, f[:-7] + '.py'))

MediaElement windows phone 8.1 rt -

i have problem mediaelement. assume play video mediaelement, , phone locks screen after 1 minute. so, after 1 minute, mediaelement stops playing video , phone on lock screen. want play video normally. how can that? the behaviour of mediaelement design. there's no playback supported behind lock screen. question isn't clear, think want prevent phone locking while video being played. so, must create displayrequest object @ global scope , set active when start playback. if (disprequest == null) { disprequest = new displayrequest(); disprequest.requestactive(); rootpage.notifyuser("display request activated", notifytype.statusmessage); } also, make sure call requestrelease() once playback finished. can find more details @ msdn here .

xml - Where does the OwnedName type come from? -

i trying parse xml file in rust using rust-xml , having trouble matching on name of tag: for e in parser.events() { match e { xmlevent::startelement { name, attributes: _, namespace: _ } => { match name { "lexicalentry" => { this error message getting: enter codesrc/main.rs|127 col 21| 127:35 error: mismatched types: || expected `xml::name::ownedname`, || found `&'static str` || (expected struct `xml::name::ownedname`, || found &-ptr) [e0308] || src/main.rs:127 "lexicalentry" => { || ^~~~~~~~~~~~~~ here i find surprising because ownedname identifier doesn't show anywhere in code or dependencies project (including rust sources!): $ rgrep ownedname . binary file ./woordenboek/src/.main.rs.swp matches ./woordenboek/src/main.rs: //xml::name::ownedname("lexicalentry") => { binary file ./woordenboek/target/

html - Morris.js chart doesn't display properly within Polymer core-animated-pages > section > core-animated-pages > section > card > div -

i'm designing webpage using polymer. there's section within core-animated-pages contains card. i've got javascript generates chart using morris.js , inserts div on aforementioned card. here's problem, no matter width/height set div chart doesn't display properly. here screenshot: apparently need more reputation this? link: http://i.stack.imgur.com/agi3z.jpg but, if resize window (i've got morris' resize function enabled), resizes properly. http://i.stack.imgur.com/mx7me.jpg i've tried using chart.js instead, that, chart doesn't display @ all. i'm confident it's not problem js, because if copy js jsbin, can chart display using both morris , chart.js here of html morris chart being inserted: <body unresolved fullbleed> <template is="auto-binding"> <div style="height:100%;width:100%;position:absolute;"> <core-animated-pages id="selector" selected="0&qu

a for loop to generate multiple data frames in python -

i new python , trying clean code using function generates many data frames desire. want df1, df2, df3, etc. out reading in different lists (one, two, three, etc.). variable "input" same. here code: thx! convert list data frame import numpy np import pandas pd df1 = pd.dataframe(one, columns=[(input.cell(0, 0)).value + 'a', (input.cell(0, 0)).value + 'b', (input.cell(0, 2)).value + 'a', (input.cell(0, 2)).value + 'b', (input.cell(0, 3)).value + 'a', (input.cell(0, 3)).value + 'b', (input.cell(0, 4)).value + 'a', (input.cell(0, 4)).value + 'b', (input.cell(0, 5)).value + 'a', (input.cell(0, 5)).value +