Posts

javascript - firebase: retrieve specific fields from object -

i using firebase storing data of players. want show statistics of players have structure like: players:{ [playerid]:{ info:{ firstname: 'jon', lastname: 'mark', otherinfo:'aaa' }, othertoomuchinfo:{}, stats:{ totalplayed: 10, scorecounta: 14, scorecountb: 24, } }, [playerid]:{ info:{ firstname: 'hen', lastname: 'lee', otherinfo:'qwe' }, othertoomuchinfo:{}, stats:{ totalplayed: 33, scorecounta: 12, scorecountb: 43, } } } how can retrieve stats of players firebase without loading other information?

c# - To specify a DataGridView column header's text with an event -

i used way of assigning dgw's column header text below, after debugged below event causes run number of cells in dgw. of course cannot except different behave event's approach how can use better way runs 1 time assign texts columns header. private void dgwbase_columnheadercellchanged(object sender, datagridviewcolumneventargs e) { dgwbase.columns[0].headertext = "waktu mulai\nstarting time"; dgwbase.columns[1].headertext = "nama personil\npersonnel name"; dgwbase.columns[2].headertext = "nama pekerjaan\nworkshop name"; dgwbase.columns[3].headertext = "mps no"; dgwbase.columns[4].headertext = "kuantitas\nquantity"; dgwbase.columns[5].headertext = "operasi kode\noperation code"; dgwbase.columns[6].headertext = "nama operasi\noperation name"; dgwbase.columns[7].headertext = "produk kode\nproduct code"; dgwbase.columns[8].headertext = "nama produk\nproduct...

jquery - How to interpolate an object's key name in JavaScript/JSON? -

i have line of js: overlay.animate({"left":"-1000px"}, "slow").removeclass('visible'); i need use variable (direction) instead of word "left", how can rewrite string? this doesn't work: overlay.animate({direction:"-1000px"}, "slow").removeclass('visible'); thanks you need use [] access keys variable. var options = {}; options[direction] = "-1000px"; overlay.animate(options, "slow").removeclass('visible');

c# - How to get List<ColumnType> in SQL Server? -

i have establishment table shown below, estabid name checkindate 114883 marconfort griego hotel 2011-09-28 00:00:00.000 114910 royal costa hotel 2011-10-18 00:00:00.000 114912 roc flamingo hotel 2011-11-22 00:00:00.000 114912 roc flamingo hotel 2011-11-29 00:00:00.000 114912 roc flamingo hotel 2011-12-06 00:00:00.000 114912 roc flamingo hotel 2011-12-13 00:00:00.000 114912 roc flamingo hotel 2011-12-20 00:00:00.000 114894 gran hotel blue sea 2012-01-17 00:00:00.000 114894 gran hotel blue sea 2012-01-31 00:00:00.000 suppose, if want structure query result like, response : { [ estabid: 114912, name: 'roc flamingo hotel', checkindates : [2011-11-22 00:00:00.000, 2011-11-29 00:00:00.000, 2011-12-06 00:00:00.000, 2011-12-13 00:00:00.000, 2011-12-20 00:00:00.000] ,... ] } is, there recommended way achieve structure sql stored procedure or c# + sql combination ? ps...

Magento - Can add only one product to cart -

everyone! can me this. i'm using magento 1.9 , have problem adding more 1 products cart. adding first product cart works normal, when try add second product(by add cart button) deletes first , second present in cart. cross checked things through below code: mage::getsingleton('checkout/cart')->getquote() and mage::getsingleton('checkout/session') and shows [items_count] => 1 thanks in advance!

getDeclaredMethods() behaving differently in Java 7 vs. Java 8 -

consider following little example: package prv.rli.codetest; import java.lang.reflect.method; public class breakinginterfaces { interface base { basefoo foo(); interface basefoo { } } interface derived extends base { derivedfoo foo(); interface derivedfoo extends basefoo { } } public static void main(string[] args) { dumpdeclaredmethods(derived.class); } private static void dumpdeclaredmethods(class<?> class1) { system.out.println("---" + class1.getsimplename() + "---"); method[] methods = class1.getdeclaredmethods(); (method method : methods) { system.out.println(method); } system.out.println("----------"); } } if compile above example jdk1.7.0.55 output is: ---derived--- public abstract breakinginterfaces$derived$derivedfoo breakinginterfaces$derived.foo() ---------- but wh...

android - Does Google analyze uploaded .apk for warnings or errors? Does it affect play market ranking? -

i have been using android studio analyze->inspect code… - results impressive. started wondering - google analyze uploaded .apk file lint warnings or kind of errors? or check if followed guidelines in app development. have influence on play market search result? there no mention of apk analysis in android publishing documentation . believe app can flagged , if go against guidelines . can result in suspension of app among other consequences, none of affects google play search indexing (aside fact may not on if app suspended). it seems review process exists chrome apps, perhaps there may 1 android well.