Posts

Showing posts from March, 2012

Explaination Of Azure Storage Account - Total Request Chart -

Image
can please me understand mechanics of azure storage account , happening when "requests" being made. the requests broken down blobs, tables, queues, , file resources my set have created azure media service, , in uploading video files has created 5 "blobs". 1 each video. what happening when there spike in type of request? what type of request valid when videos being viewed? why there spike of 100s of requests "blob"!? every interaction blobs, tables, queues , files supported underlying rest api. you're seeing api call frequency. there's no real way say, exactly, why have spikes @ specific times, it's related uploading or downloading content to/from blob storage. have spikes in table storage (and tables used logging/diagnostic information). you can enable storage analytics (for blobs), see exact blobs being accessed, , when, if want level of detail (those settings located in storage account's settings blade). by ...

spring - Java deserialzation throwing ClassCastException in Jetty server -

i'm using java object serialization transfer pojo spring controller. working fine in tomcat when deploy in jetty server throwing following exception. i've tried 2 approaches, plain objectoutputstream , apache commons-lang3 serializationutils both throwing same exception. looks missing jetty. jetty versions: 9.2.11.v20150529 9.2.10.v20150310 java.lang.classcastexception: sun.reflect.generatedserializationconstructoraccessor5 cannot cast sun.reflect.serializationconstructoraccessorimpl @ sun.reflect.methodaccessorgenerator.generateserializationconstructor(methodaccessorgenerator.java:112) @ sun.reflect.reflectionfactory.newconstructorforserialization(reflectionfactory.java:340) @ java.io.objectstreamclass.getserializableconstructor(objectstreamclass.java:1420) @ java.io.objectstreamclass.access$1500(objectstreamclass.java:72) @ java.io.objectstreamclass$2.run(objectstreamclass.java:497) @ java.io.objectstreamclass$2.run(objectstreamclass.java:472) @ java.security.ac...

scala - Finding node in tree -

i have tree can have multiple root nodes. node defined as: case class node[a] ( id: int, data: a, var children: option[seq[node[a]]], var parent: option[node[a]] ) where id identifies node, data information related node, children sequence of nodes, , parent points parent node. the tree class follows: case class tree[a] ( var nodes: option[seq[node[a]]] ) { def searchparent (searchid: int): option[node[a]] = { nodes match { case some(nodes) => { ( node <- nodes ) { val parent = searchparent2(node,searchid) parent match { case some(p) => { parent } case none => none } } none } case none => none } } def searchparent2 (node: node[a], searchid: int): optio...

c# - Detect if child GUI is hung from a parent process -

in application there parent process spawns children. trying leverage parent process watch on children ensure gui remains responsive, , if not, generate dump file. the problem i'm running process.responding detecting gui hangs (such sleeping on gui thread or stack overflow) not others (such deadlocks on gui thread). so question is: how else can check whether or not gui of child still updating parent process? edit: based on comments far guess should clarify. responsible maintaining framework of application plugin architecture heavily multi-threaded , has code base of hundreds of thousands of lines of code, of outside control. while understand ideal approach not hang in first place, still happens on occasion. these situations gracefully , collect debug information along way issue can addressed. another approach i've considered using gui thread touch file , have parent process check time stamp of file. however, i'd rather not perform file operations on gui t...

Visual Studio 2015 Xamarin Android Emulator not starting -

Image
i'm trying run android emulator in visual studio 2015 what selected debug marshmallow 6.0.0 android 6.0 api23 android emulator shows gives following error. please help hyper v shows following

javascript - Get and set selected option using template -

how change selected option dropdown list using javascript or jquery? <select id ="someid" name="somename"> <option>one</option> <option>two</option> <option>three</option> </select><br> <label>item1:</label> <input type="text" name="item1" value= <%= somevalue %>><br> <label>line item2:</label> <input type="color" name="item2" value= <%= somevalue1 %>><br> <label>item3:</label> <input type="number" name="item3" min=0 value= <%= somevalue2 %>><br> <label>item4:</label> <input type="color" name="item4" value= <%= somevalue3 %>><br> i had html saved in variable called template . how , set selected option in dropdown list, result same template 1 of 3 options selected. thank in ...

javascript events - How to focus automatically on the current date in vis.js timeline -

i wrote program uses vis.js timeline , focuses on current date on click of button: <button type="button" class="btn btn-info" onclick="timeline.focus(0)">focus on current date</button> where var timeline = new vis.timeline(container, data, options); and var data = [ //create item in dataset corresponding current date {id: 0, content: 'today', start: date()},...]; now timeline focus automatically on current date when user changes range. tried use rangechange event: timeline.on('rangechange', function (properties) { timeline.focus(0); }); , but focusing not occur expected. would please me understand what's going on , how implement functionality? rangechange gets fired multiple times, every time timeline changes, when timeline animating, trying focus on specific event keeps firing rangechange event. there couple of solutions problem. you check byuser property of pr...

javascript - Save an SVG image from a website using Java (desktop) -

i'm generating website jdenticon using code ( test.html ): <!doctype html> <html> <head> <title>test</title> </head> <body> <script src="https://cdn.jsdelivr.net/jdenticon/1.3.2/jdenticon.min.js" async></script> <svg width="200" height="200" data-jdenticon-hash="ff8adece0631821959f443c9d956fc39"> fallback text browsers not supporting inline svg</svg> </body> </html> i want image generated in code accesible java desktop application , want saved on pc. possible , maybe changing hascode ( ff8adece0631821959f443c9d956fc39 ) and whats code it? edit #1: i've found in api of jdenticon looks , used .net framework: var engine = new jurassic.scriptengine(); engine.executefile("<path jdenticon.js>"); engine.setglobalvalue("size", 200); engine.setglobalva...

Suming up array gives error C programming -

i have write program calculates number of hours worked within specific period , prints total number of hours, average length of day , itemisation of hours entered. first, program must ask how many days of working hours shall entered (max 30 days). after this, program asks daily working hours. program output shall have 1 decimal place of precision. the error getting when adding values total hours worked goes above 100000, not sure why. here code #include<stdio.h> int main() { float hours[30]; float total; int day; int ; float avg; int j; printf("the program calculates total hours worked during \na specific period , average length of day.\n\n"); printf("how many days:"); scanf("%d",&day); for(i=0; i<day; i++){ printf("enter working hours day %d:",i+1); scanf("%f",&hours[i]); total += hours[i]; } avg = total/day; printf("total hours...

How to get Google fonts (Varela Round) to work in Polymer 1.1 web component? -

Image
question: in polymer 1.1 context, how include external font (like google font, or font-awesome) used dom-module? i aware polymer favours using style-module. i'm aware technique preload font html , import dom-module. still can't work. goal of <circle-x></circle-x> component: my dom-module give circles these images <h1> below styled. under flexbox structure lay them out responsively according how many circles there are. what tried (tldr version) used rel="import" font.html style-module <circle-x> components, can't use font style (it works when used sans-serif), means selector right. google-inspected , google-font stylesheet loaded in <circle-x> component page. what tried (detail): <!-- file structure --> + circle-x.html + typography-x.html + varela-round.html + bower-components + - polymer - polymer.html + - webcomponentsjs - webcomponents.js in polymer files, noticed there's fi...

xcode 7 / iOS 9 / iPhone 6 sim: why extra padding to left of UITableView? -

Image
see screenshot below iphone 6 simulation run. i've set suggested constraints. i've cleared constraints , reset them. none of -- there still padding on left of table cells, , appears table overreaches bottom border of screen. going on? note using "compact width / regular height" in xcode storyboard. there small left-margin before each horizontal bar between uitableviewcell s in uitableview . looking @ prototype cell uitableviewcell in 1 of storyboards, believe left-margin baked cell default. not know if adjustable.

node.js - How to safely rollout new npm package version with engine requirement change -

as node deprecating old buffer usages, , unfortunately i'm using in 1 of packages. i'd love rollout new version fix before late. i rolled out version drops node < 4 support patch version number increment, , complaints breakage few hours later. as npm install --save includes full semver in package.json . makes impossible deployment machines runs different version of node resolve package earlier version. if increase minor version or major version, users face same issue after using npm install --save . i know user should use same version dev , production, , npm right thing them. not perfect world. there way make rollout transparent end users using npm features?

php - Processing multiple Symfony bundle configs with one bundle -

i have lots of bundles have similar config files called rules.yml held in bundlename/resources/config/rules.yml each config file follows same structure: bundle_name: rules: name: items: [] requirements: [] i have 1 bundle called rulerbundle. bundle needs automatically load, validate , combine rules.yml found within other bundles. rulerbundle produce like: bundle_a: rules: name: rule 1 items: ['first item'] requirements: ['second item', 'third item'] bundle_b: rules: name: rule 2 items: ['second item'] requirements: ['third item'] this should automatically updated when new bundle added rules.yml questions should validate , process config within every bundle? lead code duplication validation rules same. how go finding , merging each of bundle configs rulerbundle so can write dependencyinjection extension in top level bundle of validation. not sure should h...

validation - Validate with AngularJS -

i have form want validate ng-click, have required fields e fields email. <form role="form" name="cadastroempresa" novalidate> <div class="row"> <div class="col-lg-12"> <div class="col-lg-6"> <div class="form-group"> <label>nome</label> <input class="form-control" placeholder="nome da empresa" ng-model="empresa.nome"> </div> <div class="form-group"> <label>cnpj</label> <input id="cnpj" class="form-control" placeholder="entre com o cnpj" ng-model="empresa.cnpj">...

Running Jenkins build from remote -

i new jenkins, finish configure first build. question how can run jenkins build pc? mean via command line or script or java code, need trigger it. start? try reading documentation consuming jenkins api, see examples using curl cli tool. also here's java api client example inspect.

permissions - Small business server 2011 - set user admin on x server without connecting to that server? -

is possible way (registry, powershell...) put user in group such "myserveradmingroup" , automatically give right permissions user specific server without having manually on server? let's have servers: "servera", "serverb" , "serverc". from sbs, want have groups "servera_admin", "serverb_admin" , "serverc_admin" , without having login 1 of servers, want set user group "servera_admin" , doing that, user admin on "servera". i want skip step manually set admin permissions connecting server. i can't find on this... thought did it, seems don't understand how works. tried this: go in small business server 2011. add new user -> "test_user". add new group -> call "test_group" -> added new user. add new user role -> call "test_role" -> added new group. i guess doing that, "test_user" permission of "test_role" b...

backbone.js - Backbonejs view binding conceptual feedback -

i ran article ( http://coenraets.org/blog/2012/01/backbone-js-lessons-learned-and-improved-sample-app/ ) , wondering if idea of binding , rendering views in router after instantiating them best practice. have been binding views , rendering them in view definition. currently how i've been setting , calling views: employeeview: employeeview = backbone.view.extend({ el: '#content', template:template, initialize: function () { this.collection.fetch({ reset: true }); this.collection.on('reset',this.render, this); }, render: function(){ this.el.innerhtml = mustache.to_html(this.template, { employee_list: this.collection.tojson()}); console.log('render called'); } my router: employeelist: function () { var c = new employeecollection new employeeview( { collection: c }); } it works fine. according article better practice following: employeeview = backbone.view.extend({ t...

Difference between adding instance methods with Active Concern and a regular ruby module? -

what difference between adding instance methods whith active concern , through normal ruby def keyword on module? module monsterconcern extend activesupport::concern included def engage_rage end def chew_bones end end end and module monsterconcern def engage_rage end def chew_bones end end as far know there no difference if thing interested in instance methods. the activesupport::concern advantage ability define class methods, , handle nasty module interdependencies better (related calling class methods in included block). you can read more here: http://api.rubyonrails.org/classes/activesupport/concern.html

c++ Templates to change constness of a function -

i interested in designing template interface const ness of function , return type changes depending on template parameter. have managed return type follows. template<typename t, bool canchange> struct changable{}; template<typename t> struct changable<t,true> { typedef t type; }; template<typename t> struct changable<t,false> { typedef const t type; }; template<typename t, bool canchange> struct data{ typedef typename changable<t,canchange>::type datatype; datatype m_data; //< makes const/non-const @ compile time. // function make return type const/non-const // @ compile time. datatype& getdataref(){ return m_data;} //however, seems me still need second function //with explicit "const", can't seem avoid. datatype& getdataref()const{return m_data;} }; can somehow avoid having 2 const/non-const functions here @ compile time using sfinae magic? std::enable_if...

javascript - Adding jQuery selector control to phantomJS headless browser -

i trying add jquery selector controls phantomjs headless browser testing purposes. is possible? to point have been overwriting check see if control exists , haven't made attempts manipulate values , test onchange events. the test wanting run this: //arrange //onchange results in values being stored in cookies $('#testcontrol').val(cookievalue).trigger('change'); //act var result = $.cookie(cookiename); //assert expect(result).tobe(cookievalue); the problem don't know how create $('#testcontrol') for creating dom elements in phantomjs/jasmine, following: var testcontrol = $('<input id="testcontrol"/>'); $(document.body).append(testcontrol); however, better define markup in html. fixture module of jasmine-jquery allows load html content used tests. overall workflow follows: in myfixture.html file: <div id="my-fixture"><input id="testcontrol"/></div> inside tes...

mysql - delete one row by Specific ID which the same is not present another table Column ID -

mysql> select *from add_member; +-----------+-------------+--------------+-------------------+ | member_id | member_name | member_phone | member_department | +-----------+-------------+--------------+-------------------+ | 12345 | kishore | 89482934 | it738 | | 12347 | ram | 783892389 | it721829 | | 12346 | vardhan | 902112 | ti5738 | mysql> select *from ownbook; +--------+----------+-----------+-------------+------------+----------- | bookid | bookname | member_id | member_name | | | +--------+----------+-----------+-------------+------------+------------+ | 1006 | physics | 12346 | ram | 2016-07-05 | 2016-07-20 | +--------+----------+-----------+-------------+------------+------------+ 1 row in set (0.00 sec) you can try this: delete add_member member_id not exists(select member_id ownbook) or can use not in like delete add_member memb...

java - Why does this exception not cause a runtime error? -

i have following code in practice question: public class test { static string s = ""; public static void m0(int a, int b) { s += a; m2(); m1(b); } public static void m1(int i) { s += i; } public static void m2() { throw new nullpointerexception("aa"); } public static void m() { m0(1, 2); m1(3); } public static void main(string args[]) { try { m(); } catch (exception e) { } system.out.println(s); } } at method m2, when nullpointerexception thrown, why not terminate thread expected? thought there not try catch block in same method, cause exception , halt program. as understand it, has reverted called method, m0, when thought thrown exception have halted program. end result program prints 1, value of s. everything have read far concerning exceptions doesn't explain logic, , can't work out myself, ...

Slow performance android project -

please i'm facing issue in android project, , still intermediate level. download plugin tool find bugs. called (findbugs). , pointing me performance problem i'm suffering from. app has receive data digital (adc 10bit pic controller) using bluetooth. worked fine except taking time execute , draw graph digital data. findbugs tool pointing to: string readmessage = new string(readbuf, 0, msg.arg1); and says cause application behaviour vary between platforms. can me that? thank much. you should use traceview ( http://developer.android.com/tools/help/traceview.html ) finding thread , method slows down app.

java - Eclipse no longer able to compile most of the project -

not sure happened. i'm on eclipse mars. friday, fine. today, throwing compiler problems numerous classes compiling fine on friday. every non-compiling class has following error right @ top package declaration: 'syntax error on token "package", assert expected'. , it's appeared on hundreds of files. still builds fine via ant. it's it's using scrappage compiler compilation? using eclipse mars , jdk7 on ubuntu 14.04. appreciated. i've checked compiler right 1 , set right on project. edit: tried reverting earlier install didn't work edit2: used fresh install of eclipse, had check out fresh copy vcs working. metadata file somewhere guess :( did try checking src directory in java build path of eclipse project. remember facing similar issue long time because of issue src dir.

Create Pandas Time Serie from multiple Time Series with Python -

i have multiple time series : date 2015-10-10 01:00:00 955.0 2015-10-11 01:00:00 702.0 2015-10-12 01:00:00 597.0 2015-10-13 01:00:00 516.0 2015-10-14 01:00:00 554.0 date 2015-10-10 02:00:00 972.0 2015-10-11 02:00:00 646.0 2015-10-12 02:00:00 529.0 2015-10-13 02:00:00 554.0 2015-10-14 02:00:00 540.2 date 2015-10-10 03:00:00 964.0 2015-10-11 03:00:00 707.0 2015-10-12 03:00:00 557.0 2015-10-13 03:00:00 515.0 2015-10-14 03:00:00 437.2 what want create ordred , unique time serie these time series have result : date 2015-10-10 00:00:00 622.0 2015-10-10 01:00:00 955.0 2015-10-10 02:00:00 972.0 2015-10-10 03:00:00 964.0 2015-10-10 04:00:00 914.0 ... 2015-10-11 00:00:00 923.0 2015-10-11 01:00:00 955.0 2015-10-11 02:00:00 646.0 you can use concat concatenate row-wise , call sort_index() on result achieve result want: pd.concat(list_of_series).sort_index()

select - SQL Server : case without a null return -

i have following sql server code: declare @n_count_pr int, @n_count_err int, @v_out_pr varchar(100); begin set @n_count_pr = (select count (*) table_pr) set @n_count_err = (select count (*) table_err) if (@n_count_err > 0 , @n_count_pr > 0) set @v_out_pr = 'output 1' else if (@n_count_err > 0 , @n_count_pr = 0) set @v_out_pr = 'output 2' print @v_out_pr end; it works fine, need different structure. i need simple select same thing. can me? in procedure above have only 2 outputs nothing else. if there other output other output 1 , output 2 should discarded. it's like: if = output 1 else if = b output 2 but don't have else, every other option i=c or = d, don't care. want discard options. if did want other options this: if (@n_count_err > 0 , @n_count_pr > 0) set @v_out_pr = 'output 1' else if (@n_count_err > 0 , @n_count_pr = 0) set @v_out_pr = 'output ...

angularjs - angular how to refresh or reload directive on external event -

i using angular 1.3 plunker code here http://plnkr.co/edit/j7tsfucnid11bzbeabbr?p=preview in code, have ngroute defines controller index page , implements fetch below. .config(['$stateprovider', '$urlrouterprovider', function($stateprovider, $urlrouterprovider) { $urlrouterprovider.otherwise('/'); $stateprovider .state('home', { url: '/', templateurl: '/assets/app/html/home.partial.html', controller: function($scope) { $scope.fetch = function(purchase) { console.log("fetch called, load data , show grid"); $scope.grid = {}; $scope.grid.isactive = true; //how refresh purchases directive here //it should pass , dates //based on purchases fetch backend data } } }) }]); i have directive purchase...

php - Booleon in objects (classes) -

this don't understand. if assign variable $bool value true , , later in code change false , variable $bool looses value? fyi: reassignment of values happening in function in class. class csvcheck { function booleonchange () { echo "<br>"; $bool = true; echo "1. assignment of booleon: " . $bool ."<br>"; $bool = false; echo "2. assignment of booleon: " .$bool . "<br>"; // value of $bool lost. why?? } } $csv = new csvcheck; $csv->booleonchange(); if code executed in browser, see this: assignment of booleon: 1 assignment of booleon: if remember correctly, php boolean false converted empty string rather value of 0 believe looking for. actually looked it, , seems confirm: php printed boolean value empty, why?

sql - EF6 code first - Identity is unique combinaison of two column in table -

good morning, i using ef6 code first , try achieve following : i have class/table fighter: public class fighter { [key] [databasegeneratedattribute(databasegeneratedoption.identity)] public int fighterid { get; set; } public string name { get; set; } } i want keep track of different number of wins between fighters created other class: fightresult public class fightresult { public virtual fighter fighter1 { get; set; } public virtual fighter fighter2{ get; set; } public uint wins1 { get; set; } public uint wins2 { get; set; } } i combinaisons of fighter1 , fighter2 unique. exemple let's entry exists: +----------+----------+-------+-------+ | fighter1 | fighter2 | wins1 | wins2 | +----------+----------+-------+-------+ | jon cena | yoda | 0 | 0 | +----------+----------+-------+-------+ i don't want able enter entry same fighters example these two: +----------+----------+-------+-------+ | fighter1 | fighter2 | wins...

jquery - Remove whitespace and line break from autocomplete's li element -

when focused on auto sugggestion has line break in it's renders whitespaces in input. in suggestion select shows fine. any solution? tried white-space: nowrap both on input , on li element , tried running function remove li whitespaces using replace(/<br\s?\/?>/, '') this how looks in console: and how input , suggestion looks like: this autocomplete code i've written: $(function() { $( "#searchpagequery" ).autocomplete({ source: getsuggestionssearchpage, autofocus: false, minlength: 2, select: function ( event, ui ) { window.location = ui.item.url; } }); }); function getsuggestionssearchpage ( request, response ) { var params = $("input:checked[name='labels']").serializearray(); var query = { name:"q", value:request.term }; params.push( query ) var params1 = jquery.param( params ); $.ajax({ datatype: "json", url: "@{autoc...

python - how to deal quotes_historical_yahoo date time? -

i try use matplotlib.finance download data yahoo finance. from matplotlib.finance import quotes_historical_yahoo datetime import date import pandas pd import numpy np %matplotlib inline today=date.today() start=(today.year-1,today.month,today.day) quotes=quotes_historical_yahoo('axp',start,today) df=pd.dataframe(quotes,columns=['date','open','high','low','close','vol']) df the result date open high low close vol 0 735536 87.376999 87.524947 88.264678 86.992340 5069300 1 735537 88.708520 88.718378 89.359479 88.146325 6848600 2 735540 89.083316 89.606057 89.961129 88.984686 3707900 i know first column should date, don't know how date time it. how deal column make "2011-01-01" ? i solve myself, key date.fromordinal() + date.strftime(x,'%y-%m-%d') today=date.today() start=(today.year-1,today.month,today.day) ...

ruby on rails - How to show all messages between current user and another user? -

i'm getting better @ using clauses in rails running problem. have follow model setup: class message < activerecord::base belongs_to :user belongs_to :recipient, class_name: 'user' end class createmessages < activerecord::migration def change create_table :messages |t| t.integer :user_id t.integer :recipient_id t.timestamps null: false end end end in controller i'm trying show list of messages user_id either current_user or @message.recipient or recipient_id current user or @message.recipient . means, want show messages between current user , user whether current user sent or received it. def show @message = message.find(params[:id]) @messages = message.all.where('user_id in (?) , recipient_id in (?)', @message.recipient_id, @message.recipient_id) end but above doesn't work or using or in statement. can't think out in head how accomplish this? your sql searches @messages = ...

php - Doctrine Query Builder : Result returning array of two times the same result -

i'm working on symfony project, using doctrine manage entities. i have table named user, containing few columns, , table named tag, containing foreign key user table manytoone relation based on user id, , single other column named value. in app, need find list of users, depending on 1 of tag row, , value of 1 of user's column. let's resume : select users user.value equals somevalue , tag.value equals anothervalue. as never used symfony nor doctrine before project, searched doctrine documentation , found query builder. so, did : edit : way doing kinda weird, modified , here result : public function findbytagandapp($tag, $app) { $em = $this->getentitymanager(); $qb = $em ->getrepository('apibundle:user') ->createquerybuilder('u') ->leftjoin('apibundle\entity\tag', 't') ->where('u.application = :app') ->andwhere('t.tag = :tag') ->setparam...

Jquery validate submits invalid forms -

i´m trying create basic validation of html form, i´m using jquery valate achieve this. main problem form submitted when of fields still invalid. second problem custom message want show aren´t appearing. here html: <head> <script src="jquery-2.1.1.min.js"></script> <script src="jquery-ui.min.js"></script> <script src="jquery.validate.min.js"></script> <script src="mine.js"></script> <meta charset="utf-8"> <title>test</title> </head> <body> <form id="formnewclient" class="form-horizontal" style="margin-right:30px;"> <h2>cliente nuevo</h2> <div class="form-group"> <label>nombre</label> <input id="inpclientname" name="inpclientname" type="text" class="form-control" required><span st...

javascript - Why would someone make an XHR to an URL generated by URL.createObjectURL? -

i trying understand example code libvorbis.js library. blob audio passed url.createobjecturl , url returned used in xmlhttprequest generates blob passed url.createobjecturl again, , last url used in download link. why xmlhttprequest necessary? can't use url first call url.createobjecturl in download link? according author: i did because encountered bug in chrome android wouldn't want play audio url generated encoded audio blob directly. xhr call workaround come @ moment. more: https://bugs.chromium.org/p/chromium/issues/detail?id=227476#c21 it looks since comment on feb 2, bug has been fixed of chrome 50.

What is the minimum duration between 2 exact alarm trigger for Android 5.0? -

i using alarmmanager.setexact triggering repeating alarm on api level 21 (lollypop) https://developer.android.com/reference/android/app/alarmmanager.html#setexact(int , long, android.app.pendingintent) but broadcast receiver not receiving pending intent consistently. is there restrictions on duration between 2 exact alarm trigger? after searching while found restriction apply setexactandallowwhileidle on api level 23. docs "under normal system operation, not dispatch these alarms more every minute (at point every such pending alarm dispatched); when in low-power idle modes duration may longer, such 15 minutes." also alarmmanager.setexact on api level 21 android 5.0 has bugs associated later fixed on api level 22, android 5.1 (lollipop_mr1)

java - how do i find where JAVA_OPTS data is stored? -

a centos 7 server has java 7 , tomcat 8 installed. need set permgen space, typing printenv on command line not include java_opts in list of environmental variables. typed ps list of running processes, , typed jmap -heap <pid> pid running java process, listed values maxpermsize , permsize among other values. how set new values these properties in way persist when system rebooted, etc.? hesitate create java_opts variable if server in question has place stores these persistent values. edit: as per @chrisrobak's suggestion, went searching tomcat conf files. there no /etc/tomcat directory, /etc has directories called /etc/java , /etc/.java , /etc/jvm , , /etc/jvm-common . also, tomcat conf follows: [root@myserver tomcat]# cd /opt/tomcat/conf [root@myserver conf]# ls -al total 280 drwxrwx---. 3 root root 4096 oct 30 20:02 . drwxr-xr-x. 14 root root 4096 oct 30 20:58 .. drwxrwx---. 7 root root 4096 oct 30 21:00 catalina -rwxrwx---. 1 root r...

google app engine - Load list of items in objectify -

i have question, , hashtag entities. there 1 many relationship between , question entities. using google cloud endpoints , problem begins here. in list method, return 20 question json. each question object in query have check if user liked question , fetch related hashtags belongs question. how can same operation key batch query. otherwise, ofy().load().type(like.class) .filter("questionref =", questionkey) .filter("accountref =", accountkey).first().now(); for each object. like entity @entity @cache public class { @id @getter protected long id; @index @load @apiresourceproperty(ignored = annotationboolean.true) private ref<account> accountref; @index @load @apiresourceproperty(ignored = annotationboolean.true) private ref<question> questionref; @index @getter protected date createdat; like() { } like(key<account> accountkey) { this.accountref = ref.create(accou...

html - rvest package read_html() function stops reading at "<" symbol -

i wondering if behavior intentional in rvest package. when rvest sees < character stops reading html. library(rvest) read_html("<html><title>under 30 years = < 30 years <title></html>") prints: [1] <head>\n <title>under 30 = </title>\n</head> if intentional, there workaround? yes, normal rvest because it's normal html. see w3schools html entities page. < , > reserved characters in html , literal values have written way, specific character entities. here entity table linked page, giving commonly used html characters , respective html entities. xml::readhtmltable("http://www.w3schools.com/html/html_entities.asp", = 2) # result description entity name entity number # 1 non-breaking space &nbsp; &#160; # 2 < less &lt; &#60; # 3 > greater &gt; &#62; # ...

java - Trust Only Certificates Signed by Specific CA on Android 6 -

dear community of awesomeness, i'm building secure app deals sensitive information. app communicates own restful api on ssl. don't want limit app specific certificate issued, rather trust certificates issued provider, e.g. comodo. way can extend , reissue certificate without having release app update. i found great resource getting this done here android 6 deprecated httpclient , switched httpsurlconnection . google has their own approach posted here . on implementation, however, noticed instead of throwing "not trusted" exception different certificate, forced usage of local ca cert not behavior intended. does have reference trusting specific ca using httpsurlconnection ? ok solved it, figured post solution in case else hits same problem. here code use json file using httpsurlconnection : (...) public static class getjsontask extends asynctask<void, integer, asyncresponse> { protected string jsondata; protected igetjsonliste...