Posts

libreoffice calc - Using Java to get OfficeLibre Cell value -

i can not seem find documentation on accessing value in .ods table, officelibre java. using officelibre background program javafx program dump , data to, , can not figure out how access cell a1, example, holds "entrees". any appreciated. i use apache odf toolkit-simple api, here easier use version of apache's odfdom api.

android - How to add tabs to listview? -

i need add 2 tabs in listing , not know how it, wanted add 1 in first row , after fourth item separates: trend , genre, saw adding new xml layout need because can not, text between items.. my main activity: public class inicio extends appcompatactivity { private listview listaitens; private string[] itens = { "home", "playlist", "trend", "conta", "live", "rock", "hip hop", "pop", "house", "gospel music", "metal", "alt rock", "sport", "game" }; integer[] imgid={ r.drawable.home, r.drawable.playlist, r.drawable.trend, r.drawable.conta, r.drawable.live, r.drawable.rock, r.drawable.hiphop, r.drawable.pop, r.drawable.house, r.drawable.gospel, r.drawable.metal, r.d...

mongodb - Should I stringify part of document, that are not used in the query -

i have collection document similar this: { name: 'foo', age: 25, extrainfo: { // big, complex many level nesting, , different between document. }, } i query document based name, age properties. don't care extrainfo property. it's complex. not know whether reduces performance of query process. do extrainfo. should stringify , compress before insert collection.? i avoid stringifying embedded documents makes them impossible use later down line. understand there no current requirement data used knows requirements tomorrow bring. it's better plan future block in corner. it'll same amount of performance if you're creating strings of embedded objects compared serializing them in bson.

java - Getting responsecode of 400 from POST in Android Studio -

Image
i've been following wintech's youtube tutorials this. set , added few post methods. methods work fine, when try posting bits, 400 response code. know means improper/malformed syntax, cannot find is. it's been few hours of trying , searching. , yes, aware can in 1 class , method, did see bit causing problem. it's of them. can tell me bit might wrong? mainactivity.java: import android.app.activity; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.view.view; import android.content.intent; import android.net.uri; import android.widget.adapterview; import android.widget.checkbox; import android.widget.datepicker; import android.widget.edittext; import android.widget.listadapter; import android.widget.listview; import android.widget.simpleadapter; import java.io.bufferedinputstream; import java.io.bufferedoutputstream; import java.io.bufferedreader; import java.io.inputstream; import java.io.inputstreamreader; import java.io...

authentication - Create SQL Server grant user -

i created database in sql server 2014 , entered sa , administrator. how make sa have permission see procedures? and how create admin user, using code? i tried this create login ztestecom password = 'sqlserver'; you cannot remove 'sa' being system administrator. recommended disable sa account since known account have system administrator rights , therefore user attempted hacked. the being said, below create user sysadmin , make yet user , grant them ability execute stored procedures in user databases. can run 'sa' account. -- create new account secure password create login sqlmanager password = 'now master.'; go -- grant new account sysadmin rights alter server role [sysadmin] add member [sqlmanager] go -- create new role executing procedures in user db's declare @command varchar(1000) select @command = ' if ''?'' not in(''master'', ''model'', ''msdb'...

Java - Inheritance - Can you return a child self into parent instance method that returns self? -

this question has answer here: is there way refer current type type variable? 6 answers i have own custom list has bunch of functionality since manipulating same kinds of lists wanted extend custom list defined type , want able use parent functions , return child type. example: //object within list public class childobject { private string name; // getters, setters, methods, etc. } // parent custom list public class parentlist<t> extends arraylist<t> { public parentlist<t> filter(predicate<t> predicate) { collector<t, ?, list<t>> collector = collectors.tolist(); list<t> temp = this.stream().filter(predicate).collect(collector); this.clear(); this.addall(temp); return this; } } // extended custom list predefined type public class childlist extends parentlist...

php - Entering three elements at different points in retrieval/list -

i listing batsmen , have page showing top 50. want have 3 separate points in list can enter 3 different elements. i after 10th, 24th, 42nd batsmen. how go doing php? my current code retrieves batsmen , in controller has take of 50 @foreach($batsmen $bat) <h2> $bat->name</h2> <h3> $bat->nationality</h3> <h3> $bat->highscore</h3> @endforeach in normal php use index, , increment index in loop. i'm not clear 3 different elements are, should help: <?php // here $i index $i = 1; foreach($batsmen $bat){ // when index reaches 10, 24, , 42 add 3 different elements // output here done every iteration of loop // , before ads if( $i == 10 ){ echo '<div id="ad1"></div>'; } if( $i == 24 ){ echo '<div id="ad2"></div>'; } if( $i == 42 ){ echo '<div id="ad3"></div>'; } // he...