Posts

Showing posts from June, 2015

Swift: 'Class.type' does not have member named 'variable' -

i have started swift programming language course , need on first program. using playground write anagram program in xcode v6.3.2. logic, first sorting words alphabetically , comparing them. error occurs when declaring word1 , word2 arrays , dictates 'anagram.type' not have member named 'word1'. believe logic correct. struggling understand why error occurs, , how solve it. have looked around online, having difficulty applying find own code. first time using stack overflow. constructive feedback welcomed. import uikit class anagram{ let word1 :string let word2 :string init(word1: string, word2: string){ self.word1 = word1 self.word2 = word2 } var characters1 = array(word1) var characters2 = array(word2) characters1 = characters1.sort() characters2 = characters2.sort() var pos = 0 var match = true while pos < characters2.length && m

python - Calculating hamming distance with mongodb? -

say i've got large set of documents contain perceptual hashes (around 35,000), fastest way can (using mongodb) compare given hash x hashes in database , find ones distance less n. i'm using python way, i'm assuming isn't possible natively in mongo, maybe possible optimize somehow?

How to get help for S4 class in R? -

beginners in r know how use ? , help learn topic. how documentation s4 classes? i not find systematic discussion of this. there brief mentions of method ? , methods ? , method ? generic("class") . is how help?

What's a simple workaround for this bug in PHP Simple HTML DOM Parser 1.5? -

can suggest simple code (not data) workaround bug in php simple html dom parser 1.5? $html = str_get_html('<html><body><table><tr><td><td><tr><td><td></body></html>'); $r=$html->find('tr',0); echo count($r->find('td')); // expected: 2 ; observed: 4 [code using $r] edit: issue occurs added </table> (^ workaround site's misinterpretation of string inline). edit: find advanced html dom fixes problem not compatible replacement. see incomatible how workaround php advanced html dom's conversion of entities? the simplest workaround switch this library fixes issue , lots of other ones.

class - iOS Size Classes, Uninstalled Views and Outlets -

i have outlet uilabel. label "installed" width , height, "uninstalled" compact width , height. when run project iphone 5 simulator (compact width, height), can still see valid outlet. why this? shouldn't nil or something? thinking valid hidden (i can't see outlet, ishidden false). happens it? what missing? thanks in advance! from apple's size classes design help a runtime object uninstalled view still created. however, view , related constraints not added view hierarchy , view has superview property of nil. different being hidden. hidden view in view hierarchy along related constraints. if @ superview property of uninstalled uilabel see nil . if outlet nil have issues if tried access it; code have explicitly check active size class , adapt behaviour. still creating object not adding view hierarchy code can still operate on label, operations won't have visible effect.

graphics - Circle crop image with transparent background - Android -

i'm trying described here "i want crop circular region bitmap. pixels outside circle should transparent." i trying what's in post of them don't offer transparent background, circle image, tried below , didn't work, ideas? public bitmap getcroppedcircleimage(bitmap bmp, view view) { bitmap bitmap = getcroppedimage(bmp, view); bitmap output = bitmap.createbitmap(bitmap.getwidth(), bitmap.getheight(), bitmap.config.argb_8888); canvas canvas = new canvas(output); final int color = 0xff227722; final paint paint = new paint(); final rect rect = new rect(0, 0, bitmap.getwidth(), bitmap.getheight()); paint.setantialias(true); canvas.drawargb(0, 0, 0, 0); paint.setcolor(color); //canvas.drawroundrect(rectf, roundpx, roundpx, paint); canvas.drawcircle(bitmap.getwidth() / 2, bitmap.getheight() / 2, bitmap.getwidth() / 2, paint); paint.setxfermode(new porterduffxfermode(porterduff.mode.src_in)); canvas.drawb

security - Data encryption algorithm which decrypts the data only once but need a different key to decrypt it again -

is there encryption algorithm in encrypted data/file can decrypted key once, should re-encrypt file different key needed decrypt same file again. well, not algorithm per se -- once have key, data decrypted. there techniques that, , typically pivot on 1 of following: software obfuscation (you can google keywords such "software protection"), or hardware attack countermeasures (look "trusted execution environment" example), or both @ same time. this example pretty happens when watch netflix movie on pc connected hdmi tv: @ simplified level, happens movie encrypted drm key k1, gets decrypted k1 on pc, , re-encrypted new hdcp key k2 on way out tv (then tv decrypt same hdcp key k2). same story miracast , other similar protocols.

php - How to Categoriy and Product XML files combined -

this categories xml file. category levels top bottom : <categories> <category> <category id="17" name="off-road" /> <category id="141" name="hpi - maverick" /> <category id="453" name="hsp" /> <category id="412" name="diger" /> </category> <category> <category id="124" name="benzinli" /> <category id="125" name="off-road" /> <category id="295" name="mcd racing" /> <category id="315" name="rtr" /> <category id="316" name="kit versiyonları" /> </category> </categories> this product xml file. have category id: <products> <product> <id>001300v4</id> <name>mcd rrv4 competition - no engin

algorithm - How to find if two binary trees are identical in terms of content? -

i see several posts around how determine if 2 trees same in terms of structure have not found answer on how find if 2 trees same in terms of content. say, tree node defined follows. treenode { string data; treenode* left; treenode* right }; now have 2 binary tree , need find out if 2 trees same in terms of content. these 2 may not structurally identical nor cannot assume data string identical in words. for instance, might have following 2 trees. these 2 trees can treated identical in terms of content when inorder walk. clear, when concatenate node strings these 2 trees, same. i.e. abcdedfg (abc) | \ (d) (efg) (a) | \ (b) (cdefg) i know can inorder walk collect string of both trees , can compare resulting 2 strings want know if there more efficient way of comparing 2 trees either somehow walking 2 trees in parallel or creating iterator. none of these seemed obvious me wanted feedback , maybe code snippet better ideas. thanks in advance. y

Unexpected PHP error: Not yet implemented -

i've upgraded environment php 5.6 , code generating warning when runs: warning: cpage::findonpagelinks(): not yet implemented in / .. /crawler/page.class.php on line 162 stepping through code , enters function , throws error when try step through - seemingly - unrelated array. i'm baffled coming , means. it's being thrown when try step through list of xml nodes: $xpath = new domxpath( $this->xml ); set_error_handler( array( $this, 'xmlerrorhandler' ) ); $nodelist = $xpath->query( $xpathquery ); restore_error_handler(); foreach( $nodelist $node ) # <<<<--- php $xpath->query expression not working bug in php seems. https://bugs.php.net/bug.php?id=61858&edit=1

python - How can I place a FloatLayout within a GridLayout using kivy? -

Image
i'm usng kivy , kv languge make gui, i'm still new kivy. in image below the buttons in black bit on right side of gui scrollview buttons on fitted half of height of screen put floatlayout in rule , indented buttons on wrong side of screen. #:kivy 1.9.0 gridlayout: rows: 1 leftarea: rightarea: <leftarea@floatlayout>: canvas: color: rgb: 0, 1, 0 rectangle: size: self.size pos: self.pos image: source: 'moneyswags.gif' size: self.size pos: self.pos <rightarea@gridlayout>: cols: 1 size_hint_x: 0.3 spacing: '10dp' floatlayout: scrollview: linksgrid: id: links_grid boxlayout: cols: 1 rows: 2 getlinksbutton: links_grid: links_grid clearlinkbuttons: links_grid: links_grid <linksgrid@gridlayout>: cols: 1

ios - KeychainWrapper as a substitute for NSUserDefaults for storing highScore -

hi created app , use store highscores in nsuserdefaults , load highscore everytime game launched using code: var highscore = nsuserdefaults.standarduserdefaults().integerforkey("highscore") then ive heard modified , thought use keychain. dont know keychain found swiftkeychainwrapper looked rather easy implement. using code var highscorestring: string = keychainwrapper.stringforkey("highscore")! var highscore = int(highscorestring) however, everytime app launches found nil while unwrapping optional value suspect due first line of code force unwraps highscorestring . i guess keychain not retain data after quits? tested without force unwrap instead did let if , highscore 0 because code not run. can 1 explain little why happens?

Keyboard shortcut to expand all the package tree folders (project view) in Android Studio? -

Image
is there way expand folders of project view in android studio 1.5.1 ? @ point have use right arrow expand whole tree. thank you! afaik, there isn't way that, if you're trying find in project hierarchy, can use shortcut cmd + shift + o , start typing. note fuzzy search

php - "We were able to connect to the database server" error in WordPress -

i not find answer. have production website production db. have backed db , restored development environment created development website in same server, same cpanel, same user , same password both dbs. magento platform 1.9.2, although not think important. here issue: can execute sql in development db same sql sentence not execute in production db. have uploaded wp development , isntalled using development db magento installation, when try run wp installation production site, wp replies "we able connect database server". remote mysql, firewall, etc same both db, cause of , how solve it? thank you. the error we able connect database server means wp can connect database, user or password or permissions wrong. are sure database user in wp-config.php has adequate permissions database? try giving user privileges, i.e. select, insert, update, delete, create, drop, index, alter, create temporary tables database. and, try wp_debug find php errors may indicate other

objective c - iOS 9 iPad split screen completion/finished notification -

i implementing new feature in ios 9 new ipads of having multitasking of 2 apps split screen. i can't seem find completion method of when split screen adjustment has finished after user has dragged app view size handle . how notify app app being run in split screen? note: different uisplitviewcontroller . referring multitasking of 2 apps in split screen, not uisplitviewcontroller when user alters split screen sizes root view layout it's subviews new size, can implement viewdidlayoutsubviews in view controller. -(void)viewdidlayoutsubviews { if(!cgsizeequaltosize(self.lastframesize,self.view.frame.size)) { nslog(@"size changed:(%f x %f)",self.view.frame.size.width, self.view.frame.size.height); } self.lastframesize=self.view.frame.size; }

if statement - Syntax error in COBOL program, unexpected if -

i coding in cobol, , after adding if statement listed below, kept getting " in paragraph '000-main': error: syntax error, unexpected if" identification division. program-id. lab2. *this program generate statement single investment *that compounds interest monthly. * prompt use 3 inputs, calculate total interest * earned, final balance, & entire account balance schedule. * display output console. environment division. data division. working-storage section. 01 invest-amt pic s9(9)v99. 01 invest-error-msg pic x(40) value "investment " & "amount must positive". 01 int-rate pic s9(2)v99. 01 int-rate-error-msg pic x(40) value "annual interest " & "rate must positive". 01 int-rate-final pic 9v99999. 01 num-months pic s9(3). 01 num-months-error-msg pic x(40) value "number of months " & "must

php - Bitcoin wallet address won't save -

i installing web application deals in bitcoin. got installed when open accounts page , try add bitcoin payout address keep getting "you must enter valid address" error. the accounts section of code below payout specific part starts quater of way down, uses bitcoin_model pasted below section of code. <?php /** * accounts.php * * provides accounts functionality, , users profiles/settings * @category accounts * @package bitwasp * @licence unlicence * @subpackage controllers * @author thomas kerin <thomas@bitwasp.co> */ defined('basepath') or exit('no direct script access allowed'); use bitwasp\bitcoinlib\bitcoinlib; /** * accounts management controller * * @category accounts * @package bitwasp * @licence unlicence * @subpackage controllers * @author thomas kerin <thomas@bitwasp.co> */ class accounts extends my_controller { /** * constructor * * @access public */ pub

java - Sort/ Merge arrays using multi threading -

i'm trying learn multi-threading cant hang of it. i've example here. idea use 2 threads sort 2 arrays , b , use thread merge sorted arrays array c. code. tried threads didnt work, i've put code without threads public class main { public static void main(string[] args){ random r = new random(system.currenttimemillis()); int n = r.nextint(101) + 50; int[] = new int[n]; for(int = 0; < n; i++) a[i] = r.nextint(100); n = r.nextint(101) + 50; int[] b = new int[n]; for(int = 0; < n; i++) b[i] = r.nextint(100); sortthread t1 = new sortthread(a); sortthread t2 = new sortthread(b); mergethread m = new mergethread(t1.get(),t2.get()); system.out.println(arrays.tostring(m.get())); } } public class sortthread { int[] x; public sortthread(int[] x){ this.x = x; run(); } public void run(){ sort(x); } private void sort(int[] x){ for(int = 0; < x.length ; i++){ int ind

mkmapview - Swift 2.0 locationManager refreshes view but wont stay still once the view has loaded -

i'm working on app shows annotations within 30 mile radius. can part work. , on loading, zooms down current location. can zoom in/out, within few seconds if not zooms original region view. i've scoured internet , site solutions, none have been adequate. code below not include annotations replicate problem having. one suggestion found use locationmanager.requestlocation instead of .startupdatinglocations makes crash. import mapkit import uikit import corelocation import foundation class viewcontroller: uiviewcontroller, mkmapviewdelegate, cllocationmanagerdelegate{ @iboutlet weak var mapview: mkmapview! var locationmanager = cllocationmanager() override func viewdidload() { super.viewdidload() locationmanager = cllocationmanager() locationmanager.delegate = self locationmanager.requestwheninuseauthorization() locationmanager.startupdatinglocation() } func locationmanager(manager: cllocationmanager, didupdatelocations locations: [cl

list - using a sub-string to identify file names in python -

i attempting combine files based on similarity in file name. have list of file names , based in list of identifiers (sub-strings) combine files. i using: in identifylist: print("\n".join(s s in filelist if i.lower() in s.lower())) when run script files printed in correct order. cannot manage use product of statement printing. if assign variable , print variable list of: <generator object <genexpr> @ longnumber> i looked how use generators , found confusing. any ideas? cheers i suspect you're getting generator objects somewhere because you're using generator expressions when want using list comprehensions. a list comprehension looks [some_expression(variable) variable in some_iterable if some_condition(variable)] . produces list, explicit loop does: result = [] variable in some_iterable: if some_condition(variable): result.append(some_expression(variable)) the advantage list comprehension on 1 line

java - how to get dictionary meaning from direct to web android -

this main activity code. kind of jumble solver program. jumble helper create solve unjumble word. when enter unordered word gives correct dictionary word. currently when tap on word text converted in voice (tts api) instead of want open dictionary meaning. now want add dictionary meaning web dictionary.. how can add word meaning?? note call data unix word dic. @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); edt_char = (edittext) findviewbyid(r.id.edittext); wordlistview = (listview) findviewbyid(r.id.word_listview); wordlistview.setonitemclicklistener(this); tts = new texttospeech(getapplicationcontext(), new texttospeech.oninitlistener() { @override public void oninit(int i) { if (i != texttospeech.error) { tts.setlanguage(locale.english); }

jquery - Calling a function on click of OK button in a pop up in the Javascript -

i have function in javascript displays pop-up. doing in sitecore based mvc project , hence can not events in normal way following practice followed in project. if (iswarning) { $('#warning').modal('show'); $("#warningdisplay").val("true"); } now modal shown without problem , modal has ok button (only 1 button). clicking on ok should call function below. function dialogokclick() { $('#warning').modal('close'); $('#calbutton').click(); } basically, intend in function is, close pop , trigger click of home page. how call function on click of ok in pop displayed result of first function? modal pop up. edit: we use infodialogviewmodel in cshtml file defining warning dialog , contents. <!doctype html> <html lang="en"> <head> <title>bootstrap example</title> <meta charset="utf-8"> <meta name="viewport" cont

java - 'cannot resolve symbol R' android studio error -

execution failed task : app:mergedebugresources . error , how fix it? <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.internet" /> <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsrtl="true" android:theme="@style/apptheme"> <activity android:name=".mainactivity"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <!-- attention: auto-generated add google play services project app indexing. see https://g.co/appindexing/androidstudio more information. --> <meta-data andr

php - Refresh page automatically after submitting form -

after submit data form don't see immediate on screen, have refresh via browser refresh button. <form action="" method="post"> <input type="submit" name="submit" > i using settimeout function gave me lot of issues in submitting database , retrieving it. not debug properly, , removed function. without settimeout , able store in database , retrieve via refresh button. how make auto refresh? i have done of jquery , ajax without refresh , page loading html file ajax <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#sub").click(function(){ $.ajax({ url: 'dbadd.php', type: 'post', data:

javascript - Ionic view does not route to correct view -

for reason 1 of tabs(the chat tab) doesn't work. other tabs work i'm not sure why chat tab doesn't work. can see plunker chats tab blank while other tabs show content. in actual app title bar shows has text of previous tab. so heres plunker: http://plnkr.co/edit/k4sknwdmdm2twjmurdxj?p=preview heres code: index.html: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title></title> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" type="text/css" href="http://code.ionicframework.com/1.0.0-beta.11/css/ionic.min.css"> <script src="http://code.ionicframework.com/1.0.0-beta.11/js/ionic.bundle.min.js"></script> <!-- ionic/angularjs js -

java - JFace ComboViewer resizes itself when the main composite is maximized/minimized -

in jface wizard have main composite , comboviewer within composite. first time when open window can see comboviewer in proper size within parent composite, when resize jface wizard (through clicking maximize option on window) comboviewer adjust size of window , close window without minimizing back. fine until point. when reopen wizard see comboviewer resizes very small widget hardly seen, strange behaviour happens through workflow - 1) open wizard. 2) maximize window , close wizard. 3) reopen wizard , see comboviewer resizes and displays extremely small widget. 4) again maximize/minimize main window comboviewer draws original intended size. [please note - strange behaviour happens swt 3.7, tried resetting target platform in eclipse swt 3.5 , comboviewer behaved absolutely perfect under circumstances, swt 3.7 able reproduce issue consistently] here's code comboviewer, it's normal code - final composite c = new composite(parent, swt.none); //layout composite

arrays - Querying Twitter JSON File in HBase -

i have downloaded twitter data through flume directly hbase table containing 1 column family , of data stored in 1 column this hbase(main):005:0> scan 'tweet' row default00fbf898-6f6e-4b41-aee8-646efadfba46 column+cell column=data:pcol, timestamp=1454394077534, value={"extended_entities":{"media":[{"display_url":"pic.twitter.com/a7mjq2dakz","source_user_id":2987221847,"type":"photo".... now want access structs , arrays through hbase can access in hive. have tried googling issue still clue less. kindly help you can't query display_url , source_user_id or json fields in hbase directly. should use document store nosql db mongodb.

string - im getting following exception when doing following code: java.lang.StringIndexOutOfBoundsException -

//for loop traversing rows (int = 1 ; < roorws.getcount() ; i++) { // loop traversing columns (int j = 1 ;j<tcols ; j++) { //if column 5 if(j==5) //printing values of cell 5 system.out.print(cells.get(i,j).getvalue().tostring().substring(0, 26).length()+ "\t"); string cell1=cells.get(i,j).getvalue().tostring().substring(0, 26); cell=cells.get("f2"); cell.putvalue(cell1); } system.out.println(""); } apparently length of string not (at least) 26 characters. change: system.out.print(cells.get(i,j).getvalue().tostring().substring(0, 26).length()+ "\t"); to: system.out.print(cells.get(i,j).getvalue().tostring().length()+ "\t"); to print length of string. you can use apache commons stringutils substring() method sub string in safe way (so takes @

build - Building UWP app from command line -

i need create kind of builder universal windows app (uwp) application, load configuration it, build , create app store package. there way build uwp app command line, without associating store , using visual studio @ all? there winappdeploycmd, can used install builded appx package on device , need tool generate package. update i've managed build , create app packages command line, here command used: msbuild "path .csproj file" /p:outdir=output_dir /p:appxbundle=always;appxbundleplatforms="x86|x64|arm" /p:buildappxuploadpackageforuap=true it's working not should apparently. can not install generated appx package on phone (and emulator). error failure reason: failed start deployment. failure text: install failed. please contact software vendor. (0x80073cf9) i found many solutions windows 10 pc version, there 1 solution found windows 10 mobile , "solution" hard reset phone, not want that. there other way? and there 1 more probl

python - Django: add a list filter option to filter related models under parent model -

i request assistance in matter i have following models: class job(models.model): job_position = models.charfield(max_length=30, null=true, unique=true) class job_posting(models.model): fkey = models.foreignkey("job", verbose_name="job positions", unique=true) and admin: class jobs(admin.tabularinline): model = job_posting readonly_fields = [ 'fkey',] = 0 class applicant(admin.modeladmin): model = job list_display = ('job_position') list_filter = ['job_position'] inlines = [jobs] is possible add list filter option inline? list_filter = ['job_position', 'job_posting.fkey'] or example, current list_filter have shows items under job_position (selecting job_position shows record have position) , want add option filtering job_position have specific job_posting.fkey while giving me option see records can or it's not possible? or if there other options be? in advance.

Python Doubly Linked List - Inserts data into a new node after the given node -

i writing code doubly linked list in python . however, struggling how insert data new node after given node. , understanding wrong constructing doubly linked list's insertafter() method in python . want know how fix code. this code far: class node: # constructor initialize data # if data not given user,its taken none def __init__(self, data=none, next=none, prev=none): self.data = data self.next = next self.prev = prev class doubly_linked_list: def __init__(self): self.head = none self.tail = none # inserts data new node after given node def insertafter(self, node, data): runner = node(none, data, node, none) runner.next = self.head if self.head not none: self.head.prev = runner self.head = runner # # adds given value last value in list def addlast(self, data): if self.head not none: runner = self.head while(runner.next !=

android - Implement openAphid Flip animation(flipboard) for scrollable grid screen -

Image
hi stuck problem in implementing flipboard app page fold animation. using openaphid/android-flip library this. able implement animations screen displays list of items using gridview, library shows fold animation screen having adapters only, showing fold animation individual item of adapter. want show animation single screen either fragment or activity , possible since animation implemented in "havells mcatalogue app". if has worked library animation , knows how implement animation screen showing several items in gridview please let me know how work on thing. adding photos reference of animation app. , here's link animation library https://github.com/openaphid/android-flip ] 2 well able implement required function inflating fragment shows gridview adapter inside getview method of 1 adapter class extends base adapter. since flip couldn't flip next items of fragment having grid view, needed go different technique. i.e had create hard coded screens , defin

spring - Feign Client + Eureka POST request body -

i'm trying use feign , eureka forward post request server server b. both servers discrovered sucessfully eureka. this works: @feignclient public interface myfeignclient { @requestmapping(value = "test", = requestmethod.post, consumes = "application/json") responseentity<string> theactualmethod( httpservletrequest request, @requestheader("firstheader") string header1, @requestheader("secondheader") byte[] header2); } however, when change second argument @requestbody in order read post request content, exception: java.lang.illegalstateexception: method has many body parameters: public abstract org.springframework.http.responseentity myfeignclient.theactualmethod(javax.servlet.http.httpservletrequest,java.lang.string,byte[]) the problem method in feign interface cannot have more 1 'general' argument. can have many header arguments want not more 1 body. since @requestb

java - Want to login to Router with android application -

i'm starting develop android application , want try connect router. wrote application using jackson, stuck json request login router. ip of router 192.168.1.1 , username , password should taken edittext fields. android.os.networkonmainthreadexception there json string login: { "jsonrpc": "2.0", "id": 1, "method": "call", "params": [ "00000000000000000000000000000000", "session", "login", { "username": "root", "password": "admin01" } ] } this restrequest.java public class restrequest { private static final string tag = jacksonutil.class.getsimplename(); static string response = null; public final static int = 1; public final static int post = 2; //constructor no parameter public restrequest(){ } public string makewebservicecall(string url, int requestmeth

css - Table not fit in container-fluid -

Image
i'm sorry. mistake. bootstrap css , sb-admin css used wrong. replaced same bootstrap css sb-admin used. thx way.!! i have table not fit in container fluid. on right side, table pass through container-fluid - not fit in container. here code: <body> <div id="wrapper"> <!-- navigation --> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> <span class="sr-only">toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </b

performance - jQuery sets a temporary id on elements every time it traverses -

i noticed in chrome element inspector elements being manipulated. upon inspecting further breaking on attribute manipulation. noticed jquery setting temporary attribute id deleting every time. traced code made check on visible elements. code made check if user selected elements inside visible option containers regularly. would have impact on performance , if set id manually elements, help?

gstreamer - cerbero build system: how to rebuild? -

building openwebrtc sources , uses cerbero build system. os ubuntu. built once. changed file in openwebrtc sources: $home/cerbero/sources/linux_x86_64/openwebrtc-0.3.0/local/owr_video_renderer.c . then: ./cerbero-uninstalled -c config/linux.cbc package -f openwebrtc why it's saying "openwebrtc -> built"? how rebuild? you should use git create local branch in project (openwebrtc folder) $git checkout -b <name_local_branch> then in recipes/ openwebrtc.recipe (or similar) , these lines , modify them this remotes = {'<name_local_branch>','file:///path/to/source'} commit = '<name_local_branch>/<commit>' i working on , works me once, hope helps you. if make working, tell me. check link fyi http://gstreamer-devel.966125.n4.nabble.com/building-gstreamer-sdk-from-latest-sources-for-arm-android-td4670784.html

c# - How to insert data into datatable from datagrid without using ItemSource in Wpf? -

i have datagrid has dataview itemsource . datagrid not display data in dataview. i.e if dataview has 21 column datagrid displayed 13 column.now want select 13 columns , add new datatable. dont know how this. please me. thankyou you can use dataview.totable : c#: string[] columnnames = { " col1", "col2", "...", "col13" }; datatable newtable = view.totable("tablename", false, columnnames); vb.net: dim columnnames = { " col1", "col2", "...", "col13" } dim newtable datatable = view.totable("tablename", false, columnnames)

javascript - first element not collapsing in bootstrap -

i using collapse using bootstrap.i trying collapse first element not working.here's code <li class="c-bg-before-yellow list-group-item c-dropdown" style="font-size: 16px;font-weight:500;"> <a class="analytics collapsed" role="button" data-toggle="collapse" href="#collapseexample" aria-expanded="false" aria-controls="collapseexample">audit &amp; assurance</a> <div class="collapse" id="collapseexample" aria-expanded="false" style="height: 0px;"> <ul class="c-dropdown-menu c-content-list-1 c-theme c-square listsss"> <li class="c-bg-before-yellow"> <a href="external_audits.php" class="">external audits</a> </li> <li class="c-bg-before-yellow"> <a href="inter

javascript - How to split the text in css -

here java script code use append cvg.append('<text x="20" y="1034" style="font-size: 14px;font-style: italic;">' + note + '</text>'); the data "note" displaying json value, large , not getting displayedproperly.only portion of getting displayed.please me split text in 2 line display properly..?

cloudpebble - Not receiving data from JSON source -

i'm attempting make pebble app reads data json url. however, no matter can't seem make data appear on app. when entering code in: console.log(data.contents.availablebal); console.log(data.contents.currentbal); i expect result in logs get: [phone] pebble-app.js:?: none [phone] pebble-app.js:?: none and when viewing app in emulator, both values data should be, "undefined". my code follows. great! var ui = require('ui'); var ajax = require('ajax'); var splashcard = new ui.card({ title: "please wait", body: "downloading..." }); splashcard.show(); ajax( { url: 'https://djkhaled.xyz/balance.json', type: 'json' }, function(data) { console.log(data.contents.availablebal); console.log(data.contents.currentbal); var main = new ui.card({ title: 'balances', body: 'available balance: ' + data.contents.availablebal + '\ncurrent balance: ' + data.contents.current

python - Fusion Two dataframes into one dataframe -

Image
i have 2 dataframes data_df , taux_df. use condition select data taux_df , put new field on data_df use data_df['taux technique']=(indexed_taux_df.loc[data_df['date effet'].dt.year.where(data_df['duree (mois)']>120),['>10 ans']]).values have result this column contains many nan values .i want fill nan values dataframe contains values in place of nan values. use doesnt work data_df['taux technique'].fillna(indexed_taux_df.loc[data_df['date effet'].dt.year.where(data_df['duree (mois)']<120),['<10 ans']]) this picture of taux_df not indexed have error valueerror: invalid fill value class 'pandas.core.frame.dataframe' data_df['duree (mois)'] number of months in period use function have data_df['date effet'].data_df['date fin effet'].dt.month in taux_df have rate of every period example if have period less 10 years on 2014 should have result 0.34600 have select

python - Getting AttributeError on nltk Textual entailment classifier -

im referring link in section http://www.nltk.org/book/ch06.html#recognizing-textual-entailment def rte_features(rtepair): extractor = nltk.rtefeatureextractor(rtepair) features = {} features['word_overlap'] = len(extractor.overlap('word')) features['word_hyp_extra'] = len(extractor.hyp_extra('word')) features['ne_overlap'] = len(extractor.overlap('ne')) features['ne_hyp_extra'] = len(extractor.hyp_extra('ne')) return features rtepair = nltk.corpus.rte.pairs(['rte3_dev.xml']) extractor = nltk.rtefeatureextractor(rtepair) --------------------------------------------------------------------------- attributeerror traceback (most recent call last) <ipython-input-39-a7f96e33ba9e> in <module>() ----> 1 extractor = nltk.rtefeatureextractor(rtepair) c:\users\ravina\anaconda2\lib\site-packages\nltk\classify\rte_classify.pyc in __init__(self, rtepai