Posts

Showing posts from April, 2015

Android Things and Bluetooth -

as far read dev boards, every soc capable use bluetooth. i didn't tested yet, can use android things bluetooth connection? question is, how can enable bluetooth without input device? if want enable bluetooth on phone (with code), had confirm it, can't possible on android things. update: since release of android things developer preview 3, bluetooth , ble available. old answer no. can not use bluetooth current version of androidthings (developer preview 1). it said in known issues part of release notes bluetooth disabled (and usb). it supposed included @ point, @ moment if try bluetoothadapter return null .

The server threw an exception error in Windows 7 Excel to CSV Vbs -

Image
i running script below in command line: excel-to-csv.vbs test.xlsx test.csv if wscript.arguments.count < 2 wscript.echo "please specify source , destination files. usage: exceltocsv <xls/xlsx source file> <csv destination file>" wscript.quit end if csv_format = 6 set objfso = createobject("scripting.filesystemobject") src_file = objfso.getabsolutepathname(wscript.arguments.item(0)) dest_file = objfso.getabsolutepathname(wscript.arguments.item(1)) dim oexcel set oexcel = createobject("excel.application") dim obook set obook = oexcel.workbooks.open(src_file) obook.saveas dest_file, csv_format obook.close false oexcel.quit i have excel 2007 installed on windows 7 home - 64 bit pc. the script converts .xlsx/.xls file .csv file. when run script, error message seen in image below, cannot understand why comes out. idea how fix this? line: 17 char: 1 error:the server threw exception code: 80010105 source: (null) here s

types - Minus sign on the left and comma as separation sign -

i want display decimal number on alv. minus sign on negative values shown on right side. when use fa "cloi_put_sign_in_front" need use char typed value. if comma replaced separation point. how can achieve both, minus sign on left , comma separation sign. thanks hints! try using cl_salv_column method set_edit_mask set either classic mask or conversion exit. reason, method lost in translation of online documentation - present in german version , missing in english version .

node.js - ytdl-core getInfo() function -

so trying metainfo youtube url using ytdl in node.js here's code i'm trying working : ytdl.getinfo('https://www.youtube.com/watch?v=yqhsxmglc9a',{downloadurl: true}, function(err, info) { if (err) throw err; console.log(info.title); } ); so, works fine , title of song. i'm trying info in stocking in var me use later. , can't manage it, tried return callback methode or catching whatever getinfo() giving keep saying it's 'undefined'. if of have ideas i'll glad try these. thanks, lucas

javascript - Scraping HTML page for contents of div and passing it to a variable -

i need scrape web page json string rests inside div "json-data" id . json string not on same page jquery code itself, first need page (using .get?), find div (using something) , parse json :( i need parse contents of div json object , pass variable can use later in code. i have use jquery v1.8.3, suppose .get() , .load() work. i'm not sure how grab json , put in variable. here's example using jquery 1.8.3, asked. quite simple! i put example json string in #json-data element, read element's contents jquery's .html() , parsed string json.parse() . $.get( "ajax/test.html", function( data ) { var myjson = json.parse( $(data).find('#json-data').html() ); console.log('glossary.title:', myjson.glossary.title) }); <!-- html ajax/test.html page --> <div id="json-data"> { "glossary": { "title": "example glossary", "glossdiv": { "

c - MPLAB PIC chip security alarm code advice -

i'm pretty new mplab , c coding please bare me things obvious , seem stupid me still getting grips software there pretty hard see. firstly getting error: ake: * no rule make target 'build/default/production/alarmcode.o'. stop. build failed (exit value 2, total time: 102ms)** also, can tell me how far off @ succeeding code, it's security circuit using pir sensor, has 3 leds show system state , buzzer when triggered. code below thank you. */ #include <stdio.h> #include <stdlib.h> sbit sensor_ip @ rc3_bit; // sensor i/p sbit led1 @ rb2_bit; // green led o/p sbit led2 @ rb1_bit; // yellow led sbit led3 @ rb0_bit; // red led unsigned short trigger, counter; void get_delay(){ delay_ms(300); } void main() { intconbits.gie = 1; //global interrupt enable on intconbits.tmr0ie = 1; //enable interrupt timer0 overflow //1 1 1 = 1:256, fosc/4/256 trisio = 0b00101000; // rc3, 5 i/

javascript - Nodejs getTime() only displays time of execution -

i working in nodejs application running , need current system time every second. problem is displays same time repeatedly rather following system time. var date = new date(); setinterval(function(){ console.log(date.gettime()); }, 1000); this keep returning exact same timestamp every second when need return current system time is, in real time. well should create new date when function executed. should work: setinterval(function(){ var date = new date(); console.log(date.gettime()); }, 1000); what difference? well created date before execution of setinterval function. when function executed getting time when object created. in example before calling setinterval function. in example, date object created every time when interval expire , function called. i hope have helped you.

security - JWT token SSO flow -

Image
i have simple question sso flow jwt let's have separate authorization server, provides jwt client app/server , resource server, client trying access token. the question is, should resource server validate token (e.g. share private certificate auth server) or should request auth server validate jwt each client request? the jwt specification built scalability in mind. purpose of jwt's design trusted app can validate signature block. if care performance use sha-256 hmac , validate signature locally on each endpoint shared secret. using asymmetric signature jwt creates overhead, can store public key on endpoints verify not issue jwt, , private key on central authority issues tokens. separation of concern between validation , issuing reduces possibilities token creation process can subverted adversary (read: defense-in-depth). if need revoke tokens in real time, need central authority validates each token. works, defeats purpose of jwt's design, , syst

How Nested Find MongoDB ? Javascript -

how nested find in mongodb collection data below : { "_id": { "$oid": "585b998297f53460d5f760e6" }, "newspaper": { "playerid": "57bffe76b6a70d6e2a3855b7", "playerusername": "dennis", "player_newspaper": "{\"id\":\"57bffe76b6a70d6e2a3855b7\",\"username\":\"dennis\",\"itemname\":\"corn\",\"comment\":\"jagung promo\",\"date\":\"12/27/2016\"}" } } my code : var datex = new date(); var dates = datex.getmonth() + '/' + datex.getdate() + '/' + datex.getfullyear(); db.playernewspaper.remove( {"newspaper.player_newspaper.date": dates } } } ) ; this not working. and that's how insert data: var currentplayer = { "playerid": playerid, "playerusername": playerusername, "player_newspaper": n

r - Custom Iterator with more than one return value -

my custom iterator bit slow. hope speed when use unlist(as.list(ic, n=2000)) construct. however, not know how implement functionality. found nextelem , hasnext methods. iterator looks this: library(itertools) fibonacci <- function(count = na) { ab = c(0, 1) n <- function() { if (!is.na(count)) { if (count > 0) count <<- count -1 else stop('stopiteration') } # ab <<- c(ab[2], sum(ab)) ab[1] } obj <- list(nextelem = n) class(obj) <- c('fibonacci', 'abstractiter', 'iter') obj } i can use this: ic <- fibonacci () print (nextelem (ic)) now next 10 fibonacci numbers @ once, via print(unlist(as.list(ic, n=10))) but of course needs implemented. how this? the fibonacci iterator serves example. actually, work on iterator gives k-combinations of n-set, i.e. memory-friendly version of combn .

ios - add InvoicID new key and value in json data -

here json data http://pastie.org/10988178 want add invoice id in particular item.like if 1 invoice have 3 item item each item array add particular invoiceid "itemdetails":[ { "itemid":1, "itemtype":1, "invoicedetailid":1, "upc":"upccode1", "sku":"item 1", "description":"item description", "qty":12, "punchlistpart":"item part new if return item", "comment":"comment1", "barcode":"" "invoiceid":95 }, i want output here code not work nslog(@"item=%lu",[[ret_val valueforkey:@"itemdetails" ] count]); nsarray *testarray=[ret_val valueforkey:@"itemdetails" ]; nsmutablearray *item=[[nsmutablearray alloc]init]; for(int i=0; i<[[ret_val valueforkey:@"itemdetails" ] count]; i++) { nsmutabledictionary *dictvalues = [nsmutabledictionary dictionary

C++ template parameter inference -

as exercise trying write array implementation using templates, function pointer template parameter. function called every time array gets indexed. template<typename t, int size> using array_fnindex = void (*)(int index); template<typename t, int size, typename array_fnindex<t, size> fnindex> struct array { t data[size]; t& operator[](int index) { fnindex(index); return data[index]; } }; // example index function template<typename t, int size> void checkindex(int index) { assert(index < size); } int main() { array<int, 10, checkindex<int, 10>> a; // works array<int, 10, checkindex<int, 11>> b; // works, not want array<int, 10, checkindex> c; // doesn't work, want return 0; } the last array declaration in main function like, template parameters of checkindex match previous template parameters in array. doesn't compile (using microsoft compiler). following error

javafx - Unable to Call another fxml page on button click event -

i trying come simple tool want call fxml page on button click present fxml page. main java class designed follows: import javafx.application.application; import javafx.fxml.fxmlloader; import javafx.stage.stage; import javafx.scene.parent; import javafx.scene.scene; import javafx.scene.control.titledpane; import javafx.scene.layout.borderpane; public class main extends application { @override public void start(stage stage) { try { titledpane page = (titledpane)fxmlloader.load(getclass().getresource("newtest.fxml")); scene scene = new scene(page); stage.setscene(scene); stage.settitle("welome page"); stage.show(); } catch (exception e) { e.printstacktrace(); } } public static void main(string[] args) { application.launch(main.class, (java.lang.string[])null); }} and controller class designed : import javafx.event.actionevent; import java.net.url; import java.util.resourceb

Parallel programming using OpenMPI : Program not running -

so pretty new paradigm of parallel programming. trying send across indexed matrix root process (rank = 0) slave process (rank = 1). using following commands run : mpicc q_9.c -o q_9 mpirun -np 2 ./q_9 the program compiles successfully, doesn't run whatsoever. have feeling mpi_send() , mpi_recv() routines aren't correctly synchronized. kind of go long way. below code : #include <stdio.h> #include <stdlib.h> #include "mpi.h" int main(int argc, char *argv[]) { int curr_rank; int num_process; int i; int j; int in_matrix[4][4]; int out_matrix[4][4]; int num_rows = 4; int num_cols = 4; int displacement_array[4]; int block_length[4]; mpi_datatype new_index_t; mpi_status status; mpi_init(&argc, &argv); mpi_comm_size(mpi_comm_world, &num_process); mpi_comm_rank(mpi_comm_world, &curr_rank); if(num_process == 2){ if(curr_rank == 0){ /*root process populates ma

hibernate - Force lazy loading of usually eager attributes -

how force specific query lazy load attribute, has eager loading? entitygraphtype.fetch isn't working. @namedentitygraph(name="neggraphname",attributenodes={ @namedattributenode("name"), @namedattributenode("grup")}) class user{ private string name; @manytoone private usergroup grup; @manytomany(fetch=fetchtype.eager) protected set<authority> authoritieslist; } interface userrepository extends crudrepository<string, user>{ @entitygraph(value="neggraphname", type=entitygraphtype.fetch) @query("<custom query here>") private collection<user> getusersinspecialquery(@param("paramname") string paramname); } basically, when call userrepository.getusersinspecialquery() initial query joins in object, , doesn't join in authority, hibernate anyway initializes authorities list separate sql query per user result, highly inefficient. also, initializes domainobject obje

android - Change Google Map Offset Center -

Image
i'm trying set user location on map such sits 1/3 of way bottom of screen, , when map rotates, rotate around point. the closest i've got achieving using setpadding() method, however, causes map sort of shake when rotated, center point sort of 'floats' around should be. looks quite ugly int mapheight = mapview.getheight(); googlemap.setpadding(0, mapheight / 5, 0, 0); is there better way this? edit : explained in picture below you don't need paddings change mappoint x , y values need can call want! may inside onlocationchanged changeoffsetcenter(location.getlatitude(),location.getlongitude()); public void changeoffsetcenter(double latitude,double longitude) { point mappoint = mgooglemap.getprojection().toscreenlocation(new latlng(latitude, longitude)); mappoint.set(mappoint.x, mappoint.y-100); // change these values need , hard coded value if want can give based on ratio using displaymetrics mgooglem

Google Apps Script Calendar get specific event with eventID -

with google apps script ( calendar ) how can specific event eventid i can't find on references it's right here: gas-get event series

What`s the VARNISHSRC path for Varnish installations on ubuntu via apt-get? -

i'm building docker container varnish 3.0 , need compile libvmod-cookie . docker container uses ubuntu:14.04.2 image. from ubuntu:14.04.2 run apt-get update -qq && \ apt-get upgrade -yqq && \ apt-get -yqq install make curl build-essential git automake \ pkg-config libmhash-dev python-docutils sed libtool libpcre3 libpcre3-dev \ libreadline6-dev libeditline0 libeditline-dev psmisc net-tools \ libvarnishapi-dev automake autotools-dev libedit-dev libjemalloc-dev \ libncurses-dev libpcre3-dev libtool pkg-config python-docutils python-sphinx \ graphviz varnish && \ apt-get -yqq clean run git clone https://github.com/varnish/libvmod-cookie.git && cd libvmod-cookie \ && git checkout libvmod-cookie-1.01 && ./autogen.sh && \ ./configure && make && make install expose 80 cmd ["/var/www/yazawa/install.sh"] as can see in dockerfile i'm doing following steps build libv

python - Why does this program print the message more than once? -

i'm new programming , made simple program determine if user inputted number or odd. made function checks if inputted number integer rather float. the program executes correctly if user types number, message telling whether number odd or prints multiple times if user inputs multiple floats first. why happen? def check_int(x,y): if x != int(x): print "the number not integer" y() else: print "the number integer" def even_odd(): given_number = input("please type integer: ") check_int(given_number, even_odd) if (given_number % 2) != 0: print "the number odd" elif (given_number % 2) == 0: print "the number even" even_odd() even_odd called within check_int again (under name y ). that's why see output multiple times. i suppose think required in order continue even_odd after check_int finished. not necessary. when function finished, program automati

vb.net - VB Windows form will not size to applications width/height -

Image
i have visual basic windows form size set applications width/height it's not working. while works fine me in vba, not working desired addin: dim newform new exportingform newform.showdialog() public class exportingform private sub exportingform_layout(sender object, e eventargs) handles mybase.layout dim exclapp excel.application = globals.thisaddin.application if exclapp.windowstate = excel.xlwindowstate.xlmaximized me.windowstate = system.windows.forms.formwindowstate.maximized else me.size = new drawing.point(exclapp.width, exclapp.height) end if end sub end class additionally in designer mode here settings windows form: ismdicontainer false location 0,0 maximumsize 0,0 minimumsize 0,0 padding 0,0,0,0 size 250,250 startposition centerparent it centers fine , can alter width/height programmatically fine well, however, when setting applications width/height changes point , stops. need correct thi

java - ConcurrentModificationError - but no modifications? -

i have piece of code: public static final reentrantlock lock = new reentrantlock(); public static void sendmessage(final arraylist<string> jids, final string text) { synchronized (mainactivity.getcontext()) { if (jids != null) { lock.lock(); try { runnable r = new runnable() { public void run() { if (looper.mylooper() == null) {looper.prepare();} (string jid : jids) { if (jid != null) { intent sendintent = new intent(); sendintent.setaction("message.platform.send_message"); sendintent.putextra("jid", jid); sendintent.putextra("content", text); mainactivity.getcontext().sendbroadcast(sendintent); }

php - How S3 putObject "expires" works? -

s3's putobject method aws sdk php states can pass expires parameter specifies the date , time @ object no longer cacheable. i'm confused that... mean exactly? i thought object's bucket, key , url stays same forever. that info used cloudfront know how long cache objects s3. or if serving static website s3 without cloudfront, used browsers determine how long cache file in local browser cache.

java - Configure Tomcat web app to log FINE for a specific class -

i'm building web app run on tomcat , want log fine messages coming io.socket.client.socket class. i've added following logging.properties file web-inf/classes directory: io.socket.client.socket.level = fine io.socket.client.socket.handlers=java.util.logging.consolehandler but socket class still seems pick default logger. i'm launching tomcat server eclipse way.

php - two while loop fetching data from two queries only show one result -

i have code use fetch data database: function show_volanti($data){ $con = $data; // passo connessione $id = 1; // 1 volante $visibile = 1; // variabile di visibilita' $rows1 = array(); // preparo array 1 per id articoli volante $rows2 = array(); // preparo array 2 per le foto volanti $id_articoli = ''; // riferimento articoli per seconda query galleria $g = ''; // riferimento associazione gallery viewer //$rif_id = ''; // rif_id se ok da cancellare $query1 = "select articoli.id id_articoli, articoli.titolo, articoli.descrizione articoli articoli.genere1 = ? , articoli.visibile = ?"; $query2 = "select galleria.id id_galleria, gall

python 3.x - cluster.cpython-34m.so: undefined symbol: PyException_Check -

this question has answer here: datastax python cassandra driver build fails on ubuntu 2 answers i running simple python(3.4.3) flask app on amazon linux, uses datastax cassandra-driver(3.6). application failing import module. traceback (most recent call last): file "application.py", line 12, in <module> cassandra.cluster import cluster importerror: /opt/python/run/venv/local/lib64/python3.4/site-packages/cassandra/cluster.cpython-34m.so: undefined symbol: pyexception_check (venv)[ec2-user@ip-1-1-1-1 app]$ uname -a linux ip-1-1-1-1 4.4.15-25.57.amzn1.x86_64 #1 smp wed jul 27 22:37:49 utc 2016 x86_64 x86_64 x86_64 gnu/linux other packages installed: $ pip freeze cassandra-driver==3.6.0 click==6.6 flask==0.11 itsdangerous==0.24 jinja2==2.8 markupsafe==0.23 six==1.10.0 werkzeug==0.11.11 xmltodict==0.10.2 latest version of cython (0.25) r

amazon web services - restrict (HTTP) access to Elasticbeanstalk only to IAM users and other EB instances -

i have eb instance behind elb : elb->eb. need restrict access eb: 1) other specific eb instances. 2) specific iam users, making signed requests outside internet. as first case, seems work me changing default security group of elb (which grants open access internet) security group include eb instances want grant access to. as second m planning create iam user (or group) , attach policy them e.g. "awselasticbeanstalkfullaccess" ( http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/awshowto.iam.managed-policies.html ). however m missing how instruct eb instance or elb accept requests specific iam users. how sound you? there more efficient way achieve these 2 cases? thnx

javascript - onchange + validation + enter key weird behaviour -

i have form input field dates. dates should validated: dates today + maximum 3 years allowed. if date valid, modal show, else there alert error message. assuming somone changes date 26.10.2099: everything works expected, if 1 leaves input field (by clicking somewhere else mouse): error message appears date gets automatically changed back no modal shows but if 1 presses enter instead of leaving input field, following happens: no error message shows date gets automatically changed back modal shows up my thought changing date initial value causees onchange event triggered again, , date valid , modal show. not case first scenario. in second scenario event triggers twice not always. you can tryout here: https://jsfiddle.net/6x9n53fx/3/ or read code below: html: <div class="container"> <form method="post" action="" enctype="multipart/form-data"> <div class="row"> <di

Google Server Key API restriction is not removed -

Image
i noticed strange behaviour in google api console. added ip adress restriction on server key , worked fine: restriction behaving expected. afterward tried torevert "no restriction" situation. console did not show error , restriction seems removed (i have again yellow alert notice), restriction still blocking google cloud messages i'm trying send previous unauthorized ip adress. for instance cannot add new ip adress, since may vary. do know if i'm doing wrong?

azure - How to know the installed Software version in PowerShell -

i wanted know version of software(say x software) installed in system powershell. in case, wanted know version of service fabric sdk installed in system powershell. if process/software run , use command : get-process -name "xsoftware" | format-list -property productversion

java - Storing archetypes with maven in different ways -

to hang of maven. in downloaded commons-cli. uncompiled apache cli helper. i created new maven project , yanked uncompiled code in it. so: mvn archetype:generate -darchetypeartifactid=maven-archetype- quickstart -dinteractivemode=false this created: commons-cli/ src/ main/ java/ cli/ *.java <- java code. now run: mvn archetype:create-from-project this creates: generated-sources/ archetype/ src/ main/ test/ target/ pom.xml in pom.xml: <groupid>com.company.app</groupid> <artifactid>test-archetype</artifactid> <version>1.0-snapshot</version> <packaging>maven-archetype</packaging> <name>test-archetype</name> now: cd target/generated-sources/archetype/ and mvn clean install now hava jar in .m2/ folder , can not use dependecy. becuase code uncompiled. my quistion

hadoop - Trafodion in cluster mode with spark -

i have developed spark application trafodion. when running application using --master local[*] mode using spark-submit command it's working fine , data inserting in db properly. when running same application in --master yarn cluster mode not running. giving errors : error[29716] error writing certificate file /home/hadoop-testing-m3_yarn.cer. error[29716] error writing certificate file /home/hadoop-testing-m1_yarn.cer. error[29716] error writing certificate file /home/hadoop-testing-m2_yarn.cer. we have 3 node cluster , getting error while running trafodion in cluster mode. could tell me how can resolve issue ? this error due lack of write privileges /home yarn user. can override default location specifying directory in jdbc url yarn user has permissions "jdbc:t4jdbc://:23400/:certificatedir=/tmp"

java - How to change default https certificate for web services in Dataminder? -

when installing dataminder , 2 web service ports set up. 1 http , other https. self-signed certificate created during installation. need use certificate certificate authority. how change certificate used on web service https port? to replace default self-signed certificate certificates certificate authority simplest replace dmkeystore file (which standard java keystore file) new java keystore file containing new certificates. note new keystore file must named , placed @ default destination: dataminder/server/config/certificates/dmkeystore to start using new certificates file update dataminder properties file: dataminder/server/config/dataminder.properties the properties update are: dataminder.environment.web.https.keystorepassword=... dataminder.environment.web.https.keyalias=... dataminder.environment.web.https.keypassword=.... update properties , restart dataminder. dataminder use new certificates. note: certificates used both admin https , web service

c# - How to Prevent a Person To Go into tab page in winfom -

i creating windows form application in if dictionary of quantity empty user shall not go sales tab creating using metro design , material skin mix using regular form control works using metro , material doesn't work here piece of code //check if selected tab sales tab if (tcmain.selectedtab == tpsales) { //check if our cart empty or not if (globals.qty.count == 0) { //show error msg var diaemptcart = messagebox.show("there 0 products in cart", "error", messageboxbuttons.ok, messageboxicon.error); //set selected tab purchase tcmain.selectedtab = tppurchase; } else { //or show products available in cart sales //populate combo box them cmbpro.datasource = new bindingsource(globals.qty, null);

Can I use a string as key in mongodb for search? -

i moving first steps in nosqldb , mongo, it, , have question indexes: in traditional mysql dbs, find record in table id, primary key. now in mongo can save lot of different information in text format, , know fast in search strings, let's working on cms lot of records, several millions, , each document has url, think idea pull document using that, rather id? know sound weird have reasons that, unless particularly slow. thanks indexes - indexes support efficient execution of queries in mongodb. create index on appropriate field used in search , retrieve documents in faster fashion. text index - mongodb provides text indexes support text search queries on string content. text indexes can include field value string or array of string elements. reference: https://code.tutsplus.com/tutorials/full-text-search-in-mongodb--cms-24835

.htaccess - htaccess - disallow direct access to all files except logged in users (PHP) -

using .htacess (deny all) - possible allow users logged in system directly access files? if makes difference site built drupal (php). if possible ideally ideally check user's role well. you cannot .htaccess alone. need is: deny file access all have "file provider" script allows file passthrough after authentication. example: proxy.php <?php $proxieddirectory = "./files/"; //whatever directory blocked access is. $filename = isset($_get["fn"])?$_get["fn"]:null; if ($filename === null || !file_exists($proxieddirectory.$filename)) { http_response_code(404); exit; } if (!user_is_authenticated()) { //not real method, use own check http_response_code(403); exit; } $fp = fopen($proxieddirectory.$filename, 'rb'); header("content-type: image/???"); //may need determine mime type somehow header("content-length: " . filesize($proxieddirectory.$filename)); fpassthru($fp); exit;

javascript - Issue in handsontable. If i begin correcting my error cells or update a new cell, cell highlights disappear -

if begin correcting error cells or update new cell, cell highlights disappear.the issue exists if scroll vertically. attached screenshot you need apply each cell want validate validator : requiredfieldvalidator = function (value, callback) { if (!value) { //adderrordiv(mymessagediv, myerrormessages.required_field); callback(false); } else { callback(true); } }; like : columns: [ {data: 'firstname', validator: 'requiredfieldvalidator'}, {data: 'lastname', validator: 'requiredfieldvalidator'}, ] example : jsfiddle

shapefile - Converting coordinates from SVY21 to WGS84 -

i trying transform svy21 coordinates have wgs84 coordinate system. i tried using gdal software , pasted following command after installing: ogr2ogr -f geojson –t_srs wgs84 <jsonfilename>.json <shapefile>.shp it results in failure: unable open datasource 'wgs84' following drivers and drivers listed. also tried use python utm package convert n48 utm coordinate wgs48, did not manage convert svy21 coordinates n48 utm reference point. i found proposed solution in old post confusing in terms of terminology , prefer using existing solution. is there "easy" solution makes use of previous approaches or applicable problem? happy if provide me more precise explanation of approach featured in older post. thanks in advance. edit: tried writing python script implements vicenty direct calculation "old post" mentioned before. help, if confirm substracting false coordinates of projection origin (28001.642me,38744.572mn) raw svy21

java - how to use @XmlMixed in jaxB -

how use @xmlmixed ess content value 'essvalue'. i'm getting ess content value null . please @xmlmixed annotation ess.xml <?xml version="1.0" encoding="utf-8"?> <ess id="9b8fb6c4-9636-11e0-8718-88f89cff4b22"> essvalue <title id="test">common core content standards</title> <title id="test2">test</title> </ess> i want read ess value 'essvalue' . and have ess java class @xmlrootelement(name="ess") public class ess { private string id; @xmlmixed private string content; private list<title> title; @xmlattribute public string getid () { return id; } public void setid (string id) { this.id = id; } @override public string tostring() { return "classpojo [id = "+id+", title = "+title+"]"; } @xmlelementre

android - Synchronization of Volley API data to sqlite data -

i working cardview implemented along recyclerview. parsing list of data api , save these data sqlite , these sqlite saved datas retrieved in cardview. so, facing problem regarding synchronization of sqlite data api data. so, whenever there new data inserted in api, how store new datas [except existing 1 in sqlite] in sqlite . can determine solution ?

c# - How can i make something like this in WPF? -

Image
i got functionality slider, make extensible list in microsoft office. im not sure how make in xaml. thing can think of expander> looks different. you mean <combobox> <comboboxitem>1</comboboxitem> <comboboxitem>2</comboboxitem> <comboboxitem>3</comboboxitem> </combobox> resp: <combobox itemssource="{binding numbers}" />

css - HTML 5 progress bar tag with gradient as background -

i want style html5 progress bar tag following: the bar background should gradient fixed 100% width. gradient should visible value of bar is... progress[value]::-webkit-progress-bar { background: linear-gradient(to right, red 1%, green); } what put in style value, or can else? progress[value]::-webkit-progress-value { //some code here } or maybe kind of inverted css masking? thanks kind of help! ok, solved workaround. i rotate progress bar on y axis with: > transform: rotatey(180deg); then, set value background inherited background in order make transparent. now, last step, in value calculation inverted values. value="100" represents empty progress bar in dom , value="0" represent full (100%) progress bar.

c# - Name A Telemetry Event in App Insights -

i trying use app insights track button clicks: try { telemetryclient telemetry = new telemetryclient(); var ev = new eventtelemetry("buttoncancel_click"); telemetry.trackevent(ev); telemetry.flush(); } catch { } now, in azure dashboard event shows buttoncancel_click (which name of event handler of buttoncancel's click event). want use better name "user cancels subscription". i have put above code in event handler called buttoncancel_click in asp.net web forms application. i couldn't find way that. thanks help.

android studio - I want to show enable a button on first click and when other button is clicked, then the previously clicked one should be inactive -

i had set images in drawable , tried set them using onclicklisteners , uing view.visible , view.gone once button clicked becomes active forever whereas want clicked button disabled or inactive when new 1 clicked. please me out anyone? xml code: <linearlayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbottom="@+id/toolbartitle" android:layout_toleftof="@+id/toolbartitle" android:layout_tostartof="@+id/toolbartitle" android:id="@+id/linearlayout3" android:orientation="horizontal"></linearlayout> <horizontalscrollview android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/horizontalscrollview" android:fillviewport="false" android:background="#ffffff" android:layout_alignparenttop="true" android:layout_alignpa