Posts

WCF can not read XML -

i received xml value android. on .net have coded: try { var reader = operationcontext.current.requestcontext.requestmessage.getreaderatbodycontents(); if (reader.read()) { result += reader.readstring(); } but got error character not attended '<' any ideas ? getreaderatbodycontents returns xmldictionaryreader . that-> https://stackoverflow.com/a/1708681/1923256

mysql - SQL Query with Alias and Re-use it. how its work? -

i have query using alias 'as' example: select (table_a.name) name_a table_b id = 1 what im trying re-call/re-use name_a next column like: select (table_a.name) name_a, (name_a+"me") name_b table_b id = 1 how can that?? thx advance. have nice day you cannot reference select list alias in same select list. mysql documentation on select list aliases says: a select_expr can given alias using alias_name. alias used expression's column name , can used in group by, order by, or having clauses. you need wrap aliased select expression subquery , can use aliased expression in outer query. or refer field under original name.

java - Adding multiple on click listeners for several buttons -

how can make user can have several buttons on click listeners. tried 2 buttons, said had defined on-click listener not make on click listener result. code have far is: import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.support.v4.app.fragmentactivity; import android.support.v4.app.fragmentmanager; import android.support.v4.app.fragmenttransaction; import android.view.view; import android.widget.linearlayout; public class mainactivity extends appcompatactivity { private view btnrender; private linearlayout container; private view btnrendered; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); btnrender = (view)findviewbyid(r.id.btn_render); container = (linearlayout)findviewbyid(r.id.fragment_layout); btnrendered = (view) findviewbyid(r.id.btn_rendered); //set event handling button ...

python - Advice about Azure IoT hub and raspberry pi -

currently i'm creating iot hub device reads sensor multiple times each second. achieve 3 4 reading each second. the sensor returns true or false , when true want time-stamp , other information send azure iot hub. device raspberry pi 3 i advice. best language create program with? can send messages every time or slow? i made sample program python , used gpio event detect if pin changed. , when changed, send message iot hub. have feeling isn't fast enough? thank time in advance! hope can give me advice it sounds bit missing here windows 10 iot core operating system raspberry pi. pi 3 officially still in preview mode, still works doing you've described. i've been using on new pi3 few months now. there loads of sample projects can hands on things sensors using c# language. here's couple of links started windows 10 iot core. https://developer.microsoft.com/en-us/windows/iot http://www.purplefrogsystems.com/paul/2016/06/controlling-your-windo...

android - how to generate signed wear apk with jenkins without copying it to under handheld project -

i want generate , run wear apk jenkins. in www.developer.android.com, named "package manually". but don't want copy wear apk under handheld project. want operation processes automatically, not manually. link: https://developer.android.com/training/wearables/apps/packaging.html#packagemanually how can fix problem? thank advance.

datetime - How to calculate difference between two date(date object) in Java -

this question has answer here: calculating difference between 2 java date instances 43 answers i have 2 date in form as: date1 = tue jan 01 00:00:00 npt 2013 date2 = tue sep 30 00:00:00 npt 2014 now need find difference between these 2 dates. how can in java or in groovy. convert dates miliseconds , operate them: long diffinmills = date2.gettime() - date1.gettime(); in seconds diffinmills / 1000 in minutes diffinmills / (1000*60) in hours diffinmills / (1000*60*60) in days diffinmills / (1000*60*60*24)

loading data to hive dynamic partitioned tables -

i have created hive table dynamic partitioning on column. there way directly load data files using "load data" statement? or have depend on creating non-partitioned intermediate table , load file data , inserting data intermediate table partitioned table mentioned in hive loading in partitioned table ? no, load data command copies files destination directory. doesn't read records of input file, cannot partitioning based on record values. if input data split multiple files based on partitions, directly copy files table location in hdfs under partition directory manually created (or point current location in case of external table) , use following alter command add partition. way skip load data statement altogether. alter table <table-name> add partition (<...>)