Posts

Featured post

java - HashSet is empty -

why hashset<circle> empty? latlng currentlocation = new latlng(mcurrentlocation.getlatitude(),mcurrentlocation.getlongitude()); googlemap googlemap = msupportmapfragment.getmap(); hashset<circle> circles = new hashset<>(); if (!circles.isempty()) { (circle circle : circles) { toast.maketext(getactivity(), "" + circles.size(), toast.length_short).show(); if (!circle.getcenter().equals(currentlocation)) { circle.remove(); circles.remove(circle); } } } log.d(tag_map, "" + circles.isempty() + " " + circles.size()); circle circle = googlemap.addcircle(new circleoptions() .radius(constant.radius) .strokecolor(color.parsecolor(constant.radius_color)) .strokewidth(constant.radius_border) .center(currentlocation)); circles.add(circle); i mean added circle object it. don&#

javascript - "TypeError: t.start is undefined", in fullcalendar.min.js while using on my website for google calender functionality -

i getting below error while using fullcalender on website... "typeerror: t.start undefined" , in fullcalendar.min.js while using on website google calender functionality typeerror: t.start undefined ... == t.allday && (t.allday = !(t.start.hastime() || t.end && t.end.hastime())), t... fullcal....min.js (line 713, col 44) my fullcalender js code is $('#calendar').fullcalendar({ header: { left: 'prev,next,today', center: 'title', right: 'month,basicweek,basicday' }, googlecalendarapikey: 'aizasya6cw8v_mpsgbqzta66cw0yvckug8le2uo', events: [ { googlecalendarid: 'ashish.raj189@gmail.com' }, ], }); }); could tell me should fix typeerror ? i using gcal.html library file of fullcalendar-2.3.1, downloaded http://fullcalendar.io

Why does Bruce Eckel says that only objects can be passed into a method in Java? -

here's quote bruce eckel's book "thinking in java": the method argument list specifies information pass method. might guess, information—like else in java—takes form of objects. so, must specify in argument list types of objects pass in , name use each one. i don't it. think can pass primitives method (e.g. int) , primitives aren't objects. example: public static int multiply(int x, int y){ return x * y; this method , there primitives in it, no objects @ all. the author doesn't only objects can passed methods. quote comes in context of chapter called "everything object" . aims highlight object-oriented aspect of language, includes section on primitives explains special case. nevertheless, method taking primitive types still correct implicitly covered "special case: primitive types" section.

Export (native) module documentation as Python source code -

to make python autocompletion possible, use jedi-vim parses python modules. script parses python modules , extracts interfaces , documentation strings them. gdb has python scripting interface , unfortunately not classes (for example gdb.breakpoint ) available through public interface (the interfaces provided under /usr/share/gdb/python/ ). other classes provided native c code in gdb . as workaround, export stub python script contains public properties, classes , functions including documentation (if available). i have tried execute inspect.getsource(gdb) in gdb shell ( python print(...) ), throws ioerror: not find class definition error. inspect module provides interfaces facilitate in code generation, perhaps there exists module or script purpose of code generation provide documentation? no existing application seems able generate code documentation attached. until now... hereby present pystubgen ( pystubgen @ pypi )! pystubgen generates python sour

HTML/CSS How to apply CSS to "a" with custom data attribute? -

i know how apply css custom data attributes in case doesn't seem work. don't want select class data-store attribute. html <a data-store="{&quot;dialoguri&quot;:&quot;\/messages\/compose\/dialog\/&quot;}" href="#"></a> css [data-store=" {&quot;dialoguri&quot;:&quot;\/messages\/compose\/dialog\/&quot;}"]{ position:fixed!important; bottom:0px!important; } but doesn't seem work. appreciated. the &quot; s see in html attribute character references double quotes. represented in css attribute selector literal double quotes, not html entities, since html entities pertain html only. since value contains double quotes, use single quotes delimit value in attribute selector don't have escape double quotes in value. the backslashes in attribute value need escaped, \ becomes \\ . there wayward leading space in attribute selector should removed. hence: [data-store='{"

angularjs - Showing an empty as first option in select tag -

my app showing empty select field first entry. have read other solution given , tried still not working. my controller code is: .controller('usercreatecontroller', function(user,profile,auth) { alert("hello"); var vm = this; vm.type = 'create'; profile.all() //this service fetch profiles shown in select field .success(function(data){ vm.profile = data; }); vm.userdata.profile = vm.profile[0]; //here have set default value select field and html page is: <label class="col-sm-2 control-label">profile</label> <div class="col-sm-8"> <select ng-model="user.userdata.profile" ng-options="person._id person.profilename person in user.profile"> </select> </div> hierarchy of vm.profile { "_id": 46, "profile": objectid("5516498e95b84548156db754"), "isactive": true, "password": "$2

javascript - xScale and yScale in Canvas -

Image
i have question regarding xscale , yscale when drawing column chart canvas, here code: <html> <head> <title>bar graph</title> <style>#canvas{background: #ffffff; box-shadow:5px 5px 5px #ccc; border:5px solid #eee; margin-bottom:10px;}</style> <script type="text/javascript"> var canvas ; var context ; var val_max; var val_min; var sections; var xscale; var yscale; var y; // values of each item on graph var itemname = [ "red", "blue", "green"]; var itemvalue = [ 12144,12179, 12144 ]; function init() { // intialize values each variables sections = 3; val_max = 13000; var stepsize = 1000; var columnsize = 50; var rowsize = 60; var margin = 10; var header = "counts" // canvas = document.getelementbyid("canvas"); context = canvas.getcontext("2d"); context.fillstyle = "#000000;" yscale = (canvas.height - columnsize - margin)/ 13000