Posts

excel - Create matrix from multiple values in a single cell -

Image
i have data in excel: that want convert (5*7) matrix this: sara jone shery jack joe peter beti book1 1 0 0 0 0 0 0 book2 1 0 0 1 0 0 1 book3 0 0 0 0 0 1 0 book4 0 1 1 1 0 0 0 book5 0 0 1 0 1 0 0 what can do? my choice rearrange data suit pivottable. copy columnc , paste special values columnd. replace blanks in columnd nothing (to remove space book1, book2 ). select columnd, data > data tools - text columns, delimited, comma filter columne select non blank rows , copy visible part of columnb (excluding header) b9 (or suit) , visible part of columne (excluding header) d9 (or suit). create pivottable b1:d11 (or suit) shown (using columnd belong - ie belong2 ):

java - Superclass' fields: private+accessors vs protected -

snippet #1: public abstract class superclass { protected int i; } public class subclass extends superclass { public void method() { = doanythingwithi(i); // example } } snippet #2: public abstract class superclass { private int i; protected int geti() { return i; } protected int seti(int i) { this.i = i; } } public class subclass extends superclass { public void method() { seti(doanythingwithi(geti())); // example } } any reason why using 1 snippet instead of other one? common way process? one of more common uses of abstract class have abstract methods not implemented in abstract class, implemented in subclasses in java program. not use case. however, abstract class can used way of preventing instantiating class supposed extended first. assuming desire. furthermore, assume trivial nature of example illustration. having 2 classes "manage" single primitive 'int...

c# - Issues Debugging MVVM Bindings in Visual Studio 2010? -

Image
i'm developing application in visual studio using mvvm light , ninject. unfortunately, when try debug application , there's problem in 1 of viewmodels, instead of debugging code, this: this rather useless , impossible debug. now, if know error or have idea, can insert breakpoints there in code , visual studio show correct info, don't know error is. can't breakpoint every line of code in application. there way force visual studio past ui , debug actual code? there no need set owner of application main window. the correct way set owner of window in xaml follows <object> <object.owner> <window .../> </object.owner> </object> alternatively can set code behind // create window , make window owner window ownedwindow = new window(); ownedwindow.owner = this; ownedwindow.show(); the way have done wpf tries convert string "auto_calibrator_v0._05.mainwindow" window object not possible unless have type conv...

Android LocationManager is it more resource intensive to get the longitude and latitude from NETWORK_PROVIDER or GPS_PROVIDER? -

which method of retrieving longitude , latitude locationmanager resource intensive, network_provider or gps_provider? gps consume more resources network provider. take @ answer more details. android location providers - gps or network provider?

java - JavaFX: how do I use concurrency to read the output of an external process and display it in an FXML TextArea? -

here simple example of problem. let's have java app displays gui using javafx. when user hits start button, app pings external server 15 seconds. idea during 15 seconds, output of ping process should appear in gui of app. have far: 1) mypackage/app.fxml file use build javafx layout. 2) mypackage/appcontroller.java file 3) mypackage/app.java file in fxml file specify controller in appcontroller.java file when start button pushed. controller looks this: @fxml private void handlestartaction(actionevent event) { try { string ping_command = "ping -c 15 google.com"; console.println("\ncommand> "+ping_command); process p=runtime.getruntime().exec(ping_command); p.waitfor(); bufferedreader reader=new bufferedreader(new inputstreamreader(p.getinputstream()) ); string line=null; while((line=reader.readline())!=null) { console.println(line); } } catch(excepti...

tmux with vim command output margins way off -

when run commands such !ls or !rspec in vim while using tmux output of screen seems have margin of 50 , jacks results, making impossible read. if strictly use vim , try commands output fine appears issue tmux or configuration option need set. anyone have ideas?

android - How to download an encrypted png file without loosing data? -

i'm new android. i'm doing application can download encrypted png image file sd card displaying after decryption. notice i'm getting " javax.crypto.illegalblocksizeexception: last block incomplete in decryption image decryption " when decrypting downloaded image. found downloaded image size 0kb (original - 150kb). downloaded encrypted image browser , checked. i'm getting original image size. i'm sure there wrong in image downloading class. cant figure out. please me. in advance. image downloading asynctask class public class downloadimagestask extends asynctask<string, void, bitmap> { private string filename; @override protected bitmap doinbackground(string... urls) { //thread.currentthread().setpriority(thread.max_priority); return download_image(urls[0]); } @override protected void onpostexecute(bitmap result) { storeimage(result); } private bitmap download_image(string url...