Posts

Showing posts from March, 2014

indexing - Finding rows which match between 2 dataframes, and the index of them in R -

i have 2 dataframes. first (and know how this) want find rows (the whole row) match between 2 dataframes. can create column in tells me if entire row in b. however, part don't know how find indices in b be. tl dr; need create new column in a, tells me false if whole row isn't in b, or instead give me index of row in b. a = as.data.frame(matrix(data = 1:10,nrow=5)) b = as.data.frame(matrix(data = c(1:5,10,7,6,9,8), nrow=5)) set.seed(02138) b = b[sample(nrow(b)),] rownames(b) = 1:nrow(b) a_ = do.call("paste", a[,1:2]) b_ = do.call("paste", b[,1:2]) # gets me true/false of whether there complete row-wise match a$inb = a_ %in% b_ # gets me rows in b b[b_ %in% a_,] # need combining # expected output > a$inb = temp > v1 v2 inb 1 1 6 false 2 2 7 3 3 3 8 false 4 4 9 5 5 5 10 false you can add this: a$inb[a$inb] <- as.character(which(b_ %in% a_)) # v1 v2 inb #1 1 6 false #2 2 7 3 #3 3 8 false #4

python - AttributeError: 'NotFound' object has no attribute 'encode' -

when user goes on flask app url has more 3 sub paths, "domain.com/var1/var2/var3/var4", throws error below: traceback (most recent call last): file "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__ return self.wsgi_app(environ, start_response) file "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) file "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) file "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() file "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1478, in full_dispatch_request response = self.make_response(rv) file "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1574, in make_response rv = self.response_class(rv, headers=headers,

vhdl - Xilinx / ISim seem claims value to be X but it has been declared -

Image
have started learning how use tool if question seems silly apologize in advance. have searched error in numerous forums (already answered posts , not mine) , couldn't understand doing wrong here question: my behavioral code: ----------------------------------------------------------------------------- ----- -- company: -- engineer: -- -- create date: 01:47:22 07/07/2015 -- design name: -- module name: module_1 - behavioral -- project name: -- target devices: -- tool versions: -- description: -- -- dependencies: -- -- revision: -- revision 0.01 - file created -- additional comments: -- ----------------------------------------------------------------------------- ----- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; -- uncomment following library declaration if using -- arithmetic functions signed or unsigned valuessss --use ieee.numeric_std.all; -- uncomment following library declaration if

ios - uilabel animating to original position -

i'm trying animate uilabel frame position in middle of screen. instead, seems animating somewhere outside view original position. [uiview beginanimations:@"labelanim" context:nil]; [uiview setanimationbeginsfromcurrentstate:yes]; [uiview setanimationcurve: uiviewanimationcurveeasein]; [uiview setanimationduration:1.0]; [self.scorelabel setframe:self.endscoreframe]; [uiview commitanimations]; here starting , ending frames: start frame: {{10, 30}, {144, 21}} final frame: {{93.75, 158.71438598632812}, {187.5, 46.875}} try code [uiview animatewithduration:1.0 delay:0.0 options:uiviewanimationcurveeasein | uiviewanimationoptionbeginfromcurrentstate animations:^{ [self.scorelabel setframe:self.endscoreframe]; } completion:^(bool finished) { nslog("completed"); }]; and make sure end

linux - Wrong exit value from pthread_exit -

below code creates 2 threads , tries return values of them. i've compiled , run on 32-bit glibc-2.15 system , went right (output: r1: 1, r2: 2). when did same thing on 64-bit glibc-2.17 system, output wrong (output: r1: 0, r2: 2). why same code behaves differently on different systems? note: if types of r1 , r2 changed void* or int* commented below, code works on both systems. #include <stdio.h> #include <pthread.h> #include <unistd.h> #include <string.h> void* worker(void* arg) { int = (int) arg; pthread_exit((void*)i); } int main(int argc, char** argv) { pthread_t tid[2]; int err = 0; err = pthread_create(&tid[0], null, worker, (void*) 1); if(err != 0) printf("error: %s\n", strerror(err)); err = pthread_create(&tid[1], null, worker, (void*) 2); if(err != 0) printf("error: %s\n", strerror(err)); ///* int r1 = 0, r2 = 0; // <-- wrong: r1: 0, r2: 2 //void *r1, *r2; // &

phantomjs - Make a executable file work anywhere mac os -

i installed phantomjs in mac. thought when input in terminal phantomjs xx.js should work. however, returns -bash: phantomjs: command not found then found file phantomjs located in /usr/local/cellar/phantomjs/2.0.0/bin only if in directory, can use command phantomjs . question how can make command phantomjs work in other locations, /usr/documents/... thanks!

swift - XCode 7 Beta 3 - Array extension -

old version of code before xcode 7 beta 3: extension array { func filterbyindex<s: sequencetype s.generator.element == int>(indices: s) -> [t] { return array(permutationgenerator(elements: self, indices: indices)) } func find(includedelement: t -> bool) -> int? { (idx, element) in self.enumerate() { if includedelement(element) { return idx } } return nil } } new version of code after xcode 7 beta 3: extension array { func filterbyindex<s: sequencetype s.generator.element == int>(indices: s) -> [element] { return array(permutationgenerator(elements: self, indices: indices)) } func find(includedelement: element -> bool) -> int? { (idx, element) in self.enumerate() { if includedelement(element) { return idx } } return nil } } but function filterbyindex gives me error when

cloudant - Pouchdb Unknown Error -

Image
i using pouchdb 3.6.0 , syncing cloudant inside chrome app (i.e. clients chrome browser). the app being used approx 30 users far , of them happy. approx 3 users experiencing ' database encountered unknown error'. below image of console on problem client, unfortunately difficult debug packaged app, struggling dig deeper - wondering if 403 error normal or not ??? the error message ('database encountered unknown error') produced db.replicate.from(systemurl).on('error', function (err) { //console log })

Saving to drawable folder programmatically in Android -

i looking have user select image gallery, , have file saved permanent drawable resource when open app @ later time. possible? i mean object in actual drawable folder. no, it's not possible. "the drawable folder" doesn't exist file system folder @ runtime - it's part of (read-only) binary .apk file.

ios9 - iOS - Safari Content Blocker can't read data from NSUserDefaults -

i've been working on content blocking application time now. have switch in main app should turn of blocking filter. value of switch saved in nsuserdefaults property that's enabled app groups blocking extension can read whether it's enabled or not (if blocking enabled returns full json list , if not returns empty one). on simulator works fine, when start running on device (tested on 5s , 5c) extension can't read properties userdefaults anymore (it returns nil) , application can't read properties extension anymore. i think has app groups, can't seem find problems (it's enabled in capibilities etc.) i'm bit lost. has ever had problem? if so, able fix it? i'm using xcode 7 beta, ios 9 beta2 , mac os x yosemite.

html - Align bottom different size images -

i have 5 images per slider, , different sizes, need way align images bottom aligned well, , being able add same padding between images. the issue having images bunch together, , padding isn't consistent between images. ul.building_images { margin: 0; padding: 0; } .building_images li { width: 270px; height: 270px; list-style-type: none; float: left; margin: 2px; margin-right: -62px; /*border: 1px solid #000;*/ position: relative; } .building_images li img { position: absolute; top: 0; left: 0; } img { } .building_images li:hover img { /*width: 273px;*/ height: 273px; /*background-color: blue;*/ z-index: 1; } <div id="randomcontainer"> <div class="container"> <div class="row"> <ul class="building_images"> <li><img class="img1" src="<?php echourl(); ?>/images/slider/1.png" />

html - inline-block content over three columns -

i trying vertically align content on 3 columns (bootstrap framework) want effect on screen size columns, stacks fine col-xs-12 added. html <div class="row sub-footer"> <div class="col-xs-12 col-md-1"> <a class="sub-footer-brand" href="<?php echo home_url(); ?>"></a> </div> <div class="col-xs-12 col-md-5"> <div class="sub-logo-text"><p>a designer , creative strategist specializing in new business ventures</p></div> </div> <div class="col-xs-12 col-md-6 fcred"> <p class="fcred">&copy; <?php echo date('y');?> - <strong><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"> <?php bloginfo('name'); ?></a></strong> <?php bloginfo('de

android - Open fragment from another fragment -

i´m building android application , trying default navigation android studio generates scratch. how should open new fragment inside fragment? replace fragment b fragment a : fragmentmanager fragmentmanager = getactivity().getfragmentmanager(); fragmenttransaction fragmenttransaction = fragmentmanager.begintransaction(); fragmenttransaction.replace(r.id.frame_layout_container, new fragmentb()); fragmenttransaction.addtobackstack(null); fragmenttransaction.commit(); done

java - Android/OkHttp Get source code -

i want source code of page, " http://wankil.fr/dons ", , print in textview, nothing printed don't know why, need please. on code, want name of donater, , comment of every donation. information in code source nothing printed on textview test, don't understand why... public class main extends actionbaractivity { private listview vue; private vector<vector<string>> listdons = new vector<vector<string>>(); private list<hashmap<string, string>> listhash = new arraylist<hashmap<string, string>>(); private url url; private okhttpclient client = new okhttpclient(); public void oncreate(bundle savedinstancestate) { try { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); vue = (listview) findviewbyid(r.id.listview); this.createnewdonation("raphael t.", "vous etes tro

java - Is using an int and then incrementing it slower than doing both simultaneously? -

i ran old source code recently, , noticed pattern this: t item = array[index]; index++; would faster express as t item = array[index++]; ? until thought there wouldn't difference, since thought shorthand index = index + 1 , either way dereferencing index twice. this post has made me think otherwise; instead, getting value of index once. would yield difference (however small) in performance, or modern jits optimize away? most moderns langages optimise during compile or execute time. simple things directly optimised during compilation. but note exemple typo question, in 2 cases java understand t item = array[index++]; : get object in index place add 1 index that's same thing writting t item = array[index]; index++; (but not same thing t item = array[++index]; equivalent : index++; t item = array[index]; edit: can add that's loops improved too, compile or execute time exemple in c or c++ for(int = 0; < 1000; i++) { t[i] =

How to turn off Visual Studio 2015 Roslyn error highlighting? -

Image
for resharper can selectively turn on/off, not find way turn off built-in visual studio 2015 code highlights/suggestions. the reason want because have quite few left-join linqs , these queries messed visual studio. i seeing lots of squiggles on linqs , prefer turn them off. here 1 of error talking about.. have no idea how rid of it. the result of expression 'true' since value of type 'int' never equal 'null' of type 'int?' edit i have found way fix scottgu's blog here: the c# ?? null coalescing operator (and using linq) if talking code analysis rules. under project references, there analyzers node. if right click , select "open active rule set", can turn off of analyzers don't want.

researchkit - return new ViewController in Swift -

this follow question : assign viewcontroller class or vice versa so have viewcontroller called swipestepviewcontroller, subclasses orkactivestepviewcontroller. in swipestep class try override default viewcontroller custom swipestepviewcontroller . i tried override +stepviewcontrollerclass method , return custom viewcontroller inside swipestep class: import researchkit class swipestep:orkactivestep{ override func stepviewcontrollerclass(){ return swipestepviewcontroller.self } } but not work @ all. use researchkit, guess general swift question. i don't have experience researchkit, after taking @ objective-c code believe method should be: override class func stepviewcontrollerclass() -> anyclass { return swipestepviewcontroller.self } to explain why you're getting errors: method not override method superclass. and 'swipestepviewcontroller.type' not convertible '()' take @ class method (i

Changing Android styles by using theme -

i have app few different activities . different activities have different styled buttons, texts, etc... i've set components have various styles based on location/activity. (eg. style="@style/mainmenuactionbartitle , or style="@style/mainmenuactionbartagline ). these styles set background ( drawable , mipmap , or color ), textcolor , etc... the app offering theme packs change colors of these various components throughout application, , hoping there way have styles same name, different values based on theme of app. way can change theme whenever activity loaded whatever theme user has chosen. there's info here on how change standard widget & feel using themes, changes , feel standard-un-styled widgets. is there way accomplish using themes, or wrong direction altogether? there better/easier route? edit: after doing more research , more fiddling, i've realized want isn't far off how can accomplish this. want change component styles when set

Android: datepickerdialog cancel dialog without getting the date -

in fragment class i'm using snippet: calendar c = calendar.getinstance(); int myear = c.get(calendar.year); int mmonth = c.get(calendar.month); int mday = c.get(calendar.day_of_month); datepickerdialog dialog = new datepickerdialog(getactivity(), datepickerlistener, myear, mmonth, mday); dialog.setbutton(datepickerdialog.button_positive, "ok", dialog); dialog.setbutton(datepickerdialog.button_negative, "annulla", (dialoginterface.onclicklistener)null); dialog.show(); private datepickerdialog.ondatesetlistener datepickerlistener = new datepickerdialog.ondatesetlistener() { // when dialog box closed, below method called. public void ondateset(datepicker view, int selectedyear, int selectedmonth, int selectedday) { //do whatever want log.d("datepicker",&q

eclipse - jax-rs GlassFish4 upload file -

good day i use eclipseee luna,win7 32bit,java 8_45 , glassfish 4.1 as. create standard dynamic project without maven. want use web service jax-rs upload selected file defined folder. use example ( http://www.mkyong.com/webservices/jax-rs/file-upload-example-in-jersey/ ). when want upload(deploy) glassfish in eclipse show me error , project not load as. not know bad. have bad? or have forgot something? cannot deploy java.rest02.glassfish4.htmlform deploy failing=application name [java.rest02.glassfish4.htmlform] not deployed application : package server; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import service3.fileupload.*; @applicationpath("server") public class server extends application { private final set<class<?>> classes; public server() { hashset<class<?>> c = new hashset<>(); c.add(restservice3.class); classes = collections.unmodifiableset(c); } public set<cla

angularjs - Angular POST request not formatting correctly -

i have angular form looks this: <form ng-submit="createnewquestion()" name="createnewquestionform"> <div class="form-group"> <textarea class="form-control" rows="3" ng-model="question.question" placeholder="add question here."></textarea> </div> <div class="form-group"> <textarea class="form-control" rows="3" ng-model="question.answer" placeholder="add answer here."></textarea> </div> <button type="submit" class="btn btn-default">next</button> </form> it submits createnewquestion() function in controller, looks this: $scope.createnewquestion = function () { $scope.question.droplet_id = $scope.createddroplet.id; //add droplet_id form data question.create($scope.question).success(function(question) { $scope.questions.push(question); //return qu

javascript - Alter array object using loop -

var arr = [{id:1,"name":"john"},{id:2,"name":"james"}] $.each(arr, function(){ if(this.id == 1){ //change john johnathan } }); without using key, possible alter array object? sure can converting object string if looking hack. looking do? var arr = [{id:1,"name":"john"},{id:2,"name":"james"}] $.each(arr, function(i){ if(this.id == 1){ arr[i] = json.parse(json.stringify(this).replace("john", "johnathan")) } });

haskell - How to give a type signature to polymorphic functions when PolyKinds is enabled? -

when enabling polykinds , valid type signatures can become invalid. the following code compiles without polykinds . {-# language kindsignatures #-} import ghc.generics foo :: constructor c => t c (f :: * -> *) -> [char] foo = conname when enable polykinds fails compile. kind incompatibility when matching types: t0 :: * -> (* -> *) -> * -> * t :: * -> (* -> *) -> k -> * expected type: t c f -> [char] actual type: t0 c f a0 -> [char] relevant bindings include foo :: t c f -> [char] (bound @ gen.hs:8:1) in expression: conname in equation ‘foo’: foo = conname is there way give type signature foo when polykinds enabled? note discrepancy is t0 :: * -> (* -> *) -> * -> * t :: * -> (* -> *) -> k -> * that is, in 1 of signatures ghc thinks third argument of t should have kind * , , in other thinks should have polymorphic kind k . i think former signature (with * ) comes conname , while la

java - What is the accurate syntax for SQLite JDBC Connections? -

this may repeated question but, not. have tried looking answer on 48 hours no result. firstly, closing preparedstatment & resultset necessary in sqlite jdbc connection? because unable so. try { class.forname(database.getjdbc_driver()); cnn = drivermanager.getconnection(database.getdb_url()); p = cnn.preparestatement(query); rs = p.executequery(); p.close(); cnn.close(); } catch (sqlexception e) { e.printstacktrace(); } catch (classnotfoundexception e) { e.printstacktrace(); } { try { system.out.println(p.isclosed()); if (cnn != null) cnn.close(); system.out.println(p.isclosed()); } catch (sqlexception e) { e.printstacktrace(); } } as can see, closed preparedstatement inside try block. however, when i'm checking state of same outside try block, result false. (which means isn't closed). besides, if have below

elasticsearch - Parsing XML files to LogStash -

i have following logstash conf file: input { file { path => "c:\dashboard\elmah\*.xml" start_position => "beginning" type => "error" codec => multiline { pattern => "^<\?error .*\>" negate => true => "previous" } sincedb_path => "c:\dashboard\elmah" } } filter { xml { source => "error" xpath => [ "/error/@errorid", "errorid", "/error/@type", "type", "/error/@message", "message", "/error/@time", "time", "/error/@user", "user" ] store_xml => true } } output { elasticsearch { action => "index" host => "localhost" index => "stock"

Execute javascript everytime a route is hit in rails -

this question has answer here: rails 4: how use $(document).ready() turbo-links 18 answers when page loads first time code in /assets/javascript/home.js executes, positions navbar using bootstraps affix. $('.navbar').affix({ offset: { top: function() { return this.bottom = $('.hero').outerheight(true); } } }); when go route such /blog , don't want code execute , want static css render works great. problem when got home route( / ), javascript doesn't execute again , navbar using natural css. if refresh @ point, page reload , navbar positioned correctly. i think problem because of turbo-links not experienced enough rails resolve issue. hope can shed light! if you're using turbolinks, can this: $(function() { if (window.location.pathname === '/') { // run code } }); turbolinks changes $(

javascript - Documents are added and then removed immediately after -

here's simple template: <template name="feed"> {{> crewchat}} {{> statussubmit}} {{#each statuses}} {{> statusitem}} {{/each}} </template> in groupchat.html , groupchat.js files: <template name="crewchat"> <div class="post-item"> <div class="ui feed"> {{#each messages}} {{> crewchatmessage}} {{/each}} </div> </div> <form class="new-message"> <textarea id="message" name="content" rows="2"></textarea> <div class="post-actions text-right"> <input type="submit" value="submit" class="compact tiny ui primary button"> </div> </form> </template> template.crewchat.events({ 'submit form': function(e) { e.preventdefault(); var crewmessage = { content: e.target.content

How can I compare more than 2 condition in python -

angle1 = int(input('please enter 1st angle:')) angle2 = int(input('please enter 2nd angle:')) angle3 = int(input('please enter 3rd angle:')) angle = angle1 + angle2 + angle3 while angle == 180: if angle1 , angle2 , angle3 < 90: print ('this actue triangle') elif angle1 or angle2 or angle3 == 90: print ('this right triangle') elif angle1 or angle2 or angle3 > 90: print ('this obtuse triangle') angle = angle1 + angle2 + angle3 angle1 = int(input('please enter 1st angle:')) angle2 = int(input('please enter 2nd angle:')) angle3 = int(input('please enter 3rd angle:')) i tried compare each angle condition seem whenever enter number in angle3, compare condition , ignore other 2 angle. please me this! you can use any , all functions. ask = lambda: [int(input('please enter {0}st angle:'.format(i))) in range(1,4)] angles = ask() whil

tsql - How do I convert number of minutes to interval in SQL Server? -

i have duration column of type time(7) in appointments table. i know how number of minutes in appointment using select durationminutes = datediff(n, a.starton, a.endon) appointments but duration column time(7) . how convert int duration ? declare @time time(7) = '01:02:03'; select @time 'time(7)', datediff( minute, 0, @time ) 'minutes'; declare @minutes int = 90; select @minutes 'minutes', cast( dateadd( minute, @minutes, 0 ) time(7) ) 'time(7)';

WAV File ambiguity -

i have 8 bit mono wav file. each 1 byte of file represents sample (1/44100 of second). want know if sound, heard when wav file played, depends on samples or depend on difference between 2 consecutive samples? following pair of consecutive samples produce same sound: 1st pair :20 , 22 2nd pair :78 , 80 please me... it's meaningless talk 'same sound' in case of 2 44khz samples can think of them both representing same frequency (i.e. pitch) latter louder former.

PHP Phar archive creation fails -

i'm trying create tar archive php phar. i've got 8500 files in directory , use following code: try { $tmp_archive = tempnam(sys_get_temp_dir(), 'arc') . ".tar"; $a = new phardata($tmp_archive); $a->buildfromdirectory('/tmp/data'); $a->compress(phar::gz); unset ($a); unlink($tmp_archive); rename ($tmp_archive . ".gz", '/tmp/result.tar.gz'); } catch (exception $e) { echo "tar exception : " . $e; } it fails during process following message: tar exception : exception 'pharexception' message 'tar-based phar "/tmp/arcroyeoc.tar" cannot created, contents of file "3147.pdf" not written, seek failed' in /tmp/test.php:9 does know how around this? shall use command line tar instead?

parsing - Hadoop Informatica Log processing -

i working on project involving creating queryable set of data large informatica log files. so, files imported hadoop cluster using flume, configured coworker before began project. job create table data contained within logs queries can performed easily. issue i'm encountering has log file formatting. logs in format: timestamp : severity : (pid | thread) : (servicetype | servicename) : clientnode : messagecode : message the issue message field contains additional colon-delimited comments, example message [ x : y : z ]. when using hcatalog create table cannot account behavior , instead results in additional columns. any suggestions? use ruby separate fields or replace delimiter keep integrity when importing using hcatalog. there pre-processing can cluster side allowing me this? files large handle locally. the answer use pig script , python udf. pig script loads in file calls python script line line break fields properly. result can written friendlier csv and/or sto

c++ - Override function with "virtual" keyword and without it -

this question has answer here: virtual qualifier in derived class 4 answers i'm reading virtual functions , little confused overriding virtual functions. want confirm below given codes same? class a{ public: virtual void fun(){ } }; class b :public a{ public: void fun(){} }; and class a{ public: virtual void fun(){ } }; class b :public a{ public: virtual void fun(){} }; if not same what's difference? expected b's function virtual keyword same b's derived. please clear confusion thanks. yes, same. function overriding virtual function in base class implicitly declared virtual. from last working draft of c++14 standard: 10.3 virtual functions [class.virtual] if virtual member function vf declared in class base , in class derived, derived directly or indirectly base, member function vf same name, parameter-type-l

php - Laravel 5 built in User Authentication -

i trying use laravel 5 built in user authentication.in regard redirect user route/page/controller after logged in. trying change code of complied.php file. trying change /home of below code, not working. trait authenticatesandregistersusers { protected $auth; protected $registrar; public function getregister() { return view('auth.register'); } public function postregister(request $request) { $validator = $this->registrar->validator($request->all()); if ($validator->fails()) { $this->throwvalidationexception($request, $validator); } $this->auth->login($this->registrar->create($request->all())); return redirect($this->redirectpath()); } public function getlogin() { return view('auth.login'); } public function postlogin(request $request

java - How to get rid of tomcat memory leak log entries caused by a sleeping thread -

any idea how can rid of following tomcat log entries: severe: web application [/my-app] appears have started thread named [thread-11] has failed stop it. create memory leak. jun 29, 2015 11:14:33 org.apache.catalina.loader.webappclassloader clearreferencesthreads i'm getting them while shutting down tomcat 7.0.42. the thread dump looks this: "thread-11" daemon prio=10 tid=0x00007fedc0bd5000 nid=0x2983 waiting on condition [0x00007fedbacef000] java.lang.thread.state: timed_waiting (sleeping) @ java.lang.thread.sleep(native method) @ com.my.app.test$workerthread.run(test.java:248) where java line 248 is: sleep(1000*60*pollintervalminutes); public void start() { workerthread t= new workerthread(this); t.setdaemon(true); t.start(); } private class workerthread extends thread { controller controller=null; int pollintervalminutes=0; private boolean alive = true; public workerthread(controller control

python - My for-Loop isn't working as intended -

i want fill in list_of_occurences correct item list grundformen . my for-loop doesn't work intended though. doesn't restart beginning , goes through rows in reader once. therefore won't fill list completely. this prints (you can see part missing - because doesn't start searching beginning of list - ): # list_of_occurrences (1 line - wrapped easier reading) [['nn', 1328, ('ziel',)], ['art', 771, ('der',)], ['$.', 732, ('_',)], ['vvfin', 682, ('schlagen',)], ['pper', 592, ('sie',)], ['$,', 561, ('_',)], ['adv', 525, ('so',)], ['appr', 507, ('in',)], ['ne', 433, ('johanna',)], ['$(', 363, ('_',)], ['vafin', 334, ('haben',)], ['adja', 307, ('tragisch',)], ['adjd', 278, ('recht',)], ['kon', 228, ('doch',)], ['vvpp', 194,