Posts

android - Firebase onMessageReceived is triggering twice -

i scheduling notification launched when message received firebase service problem notification triggering twice(once on time , second time after maybe 30 min) here code: sharedpreferences = preferencemanager .getdefaultsharedpreferences(getapplicationcontext()); // check if message contains data payload. if (remotemessage.getdata().size() > 0) { intent myintent = new intent(myfirebasemessagingservice.this, myalarmservice.class); pendingintent = pendingintent.getservice(myfirebasemessagingservice.this, 0, myintent, 0); alarmmanager alarmmanager = (alarmmanager)getsystemservice(alarm_service); long currenttime = system.currenttimemillis(); int hour=sharedpreferences.getint("hour",9); int min=sharedpreferences.getint("min",0); calendar calendar = calendar.getinstance(); calendar.set(calendar.hour_of_day,hour); calendar.set(calendar.minute,min); alarmmanage...

How to send checkbox checked data using jquery and ajax to struts action class -

below jquery here how checkbox checked data in struts action class using jquery , ajax please tell me <script> $(document).ready(function() { $('#datatables-example').datatable({ responsive : true, "order":[], "columndefs": [ { "targets": 0, "orderable": false, "classname": "dt-center" }] }); $("#selectall").click(function() { $('.case').prop('checked', this.checked); if ($('.case').prop('checked', this.checked)) { count = this.checked ? $(".case").length : 0; smscount.innerhtml = count; } }); $(".case").click(function() { count = $(".case:checked").length; if ($(".case").length == $(".case:checked").length) { ...

protocol buffers - Reading a protobuf3 custom option from C# -

tl;dr according doc, if doing c++, read value of custom option using string value = mymessage::descriptor()->options().getextension(my_option); . there similar examples java , python. i'm doing c# , find equivalent. can it, , if yes, how? more details i'm manipulating classes generated protobuf3 . schemas declaring custom option . looks this: import "google/protobuf/descriptor.proto"; extend google.protobuf.messageoptions { string my_option = 51234; } message mymessage { option (my_option) = "hello world!"; } my code being provided object generated mymessage , , i'd read value of option (here hello world! ) update: i'm not using protobuf-net. c# natively supported protobuf, i'm using google's protobuf3 c# library. looks feature hasn't been implemented yet: https://github.com/google/protobuf/issues/1603 it looks it's matter of time , they're open pull requests. depending on how need it, 1 doing...

datetime - r: How to print a histogram of daytimes with times in Format e.g. 13:00 in ggvis -

Image
i have data.frame datetime objects, read in csv file , turned datetime objects dmy_hm() lubridate package. want print histogram distribution of times, independent of date. here example, looks pretty good: library(dplyr) library(ggvis) library(lubridate) # create example gespeichert <- c(rep("01/05/2016 15:26",times=10), rep("13/05/2016 00:17",times=5), rep("01/08/2016 12:05",times=10), rep("17/04/1983 23:39",times=5), rep("06/07/2015 09:36",times=10)) info <- c(rep("bla",times=30),rep("bla bla",times=10)) df_time <- cbind.data.frame(gespeichert,info,stringsasfactors=false) df_time %>% mutate(gespeichert = dmy_hm(gespeichert)) -> df_time # trying reduce datetime object time df_time %>% mutate(uhrz_num = hour(gespeichert) * 60 + minute(gespeichert)) %>% # time in minute numbers, not necessary mutate(gesp_...

java - HttpsUrlConnection. setInstanceFollowRedirects(false) seems not effective -

everybody.i'm using web crawler query user's integral in web sites.but trouble.first of ,let's focus on picture: enter image description here as can see,the first request ,it's response code 302,that page redirected page.now ,look @ code,the login method: private juneyresults login(string url, string param) { juneyresults results = new juneyresults(); httpsurlconnection connection = null; int contentlength = param.getbytes().length; try { url requested = new url(url); connection = (httpsurlconnection) requested.openconnection(); connection.setinstancefollowredirects(false); connection.setdooutput(true); connection.setrequestmethod("post"); connection.setrequestproperty("user-agent", ua); connection.setrequestproperty("content-type", "application/x-www-form-urlencoded"); connection.setrequestproperty("cookie", map2string(mcookies)); ...

python - How to get Disk type information from VMware using pyvmomi? -

i have disktype information using python pyvmomi library, able same through c# vmware sdk via "get-vm | get-harddisk -disktype "flat" | select parent,name,disktype,scsicanonicalname,devicename,diskmode | fl" command, output disk in vsphere/esx flat disktype. in respective command, have searched "flat" disktype can "rawphysical, rawvirtual, or unknown" . have gone through vmware mob properties wasn't able search disktype property. thanks

sql server - Package error after adding web reference to script component in SSIS -

Image
i'm following instructions find online try generating ssrs reports via ssis package. but whenever add ssrs report web services reference, pack throw me package validation error. something "microsoft.sqlserver.dts.pipeline.cannotcreateusercomponentexception: cannot create user component class. make sure there 1 class marked ssisscriptcomponententrypointattribute in script." any idea?