Posts

How to add a tag value to balloonTooltip in notifyIcon in C# winform? -

i have windows form application retrieve data web , show data in datagridview. when form minimized , new data have been fetched notifyicon tooltip appeared in screen , alert user. now want create feature: when user click on tooltip (balloon) form must become maximized , highlight row related balloon. there isn't tag or info holder balloon determinate row index or data identifier? how can customize balloon or send data accessible in balloon click event? add data on tag: object obj = mydata; notifyicon1.tag = obj; add event click notify icon: private void notifyicon1_click(object sender, eventargs e) { object obj = notifyicon1.tag; myobject myobject = (myobject) obj; showintaskbar = true; notifyicon1.visible = false; windowstate = formwindowstate.normal; (int x = 0; x < datagridview1.rows.count; x++) { if (datagridview1.rows[x].cells["idobject"].value.tostring() == myobject.idobject.tostring()) { ...

javascript - Parallel downloading of JS files in HTML -

i have html file looks this <html> <head> <script src="1.js"></script> <script src="2.js"></script> ... <script src="200.js"></script> </head> </html> 1.js contains 1 line window.performance.setresourcetimingbuffersize(250); by default, resource buffer size in chrome 150. but, when see resources using resource timing api, length of resources not 200. keeps varying randomly between 150 200. i know why happening. because, chrome tries download resources in parallel , hence, registers resources in resource timing api. the snippet in 1.js window.performance.setresourcetimingbuffersize(250); actually gets executed bit later. hence, more resources added resource timing buffer. but, not of them added. is there way stop parallel download of resources? download first resource first, let code execute , resume downloading of remaining resource...

SAPUI5: can not access `sortItemData` in the sap.m.P13nSortPanel at update event. -

i want collect sortitemdata in sap.m.p13nsortpanel object on update time. so wrote following function: _onupdatesortitem: function(oevent) { var parameters = oevent.getparameters(); var osortitemdata = oevent.getparameter("sortitemdata"); if (osortitemdata) { this._osorter[parameters.key] = { scolumnkey: osortitemdata.getcolumnkey(), soperation: osortitemdata.getoperation() }; } }, and bound onupdate handler. problem osortitemdata undefined while if use function onaddsortitem event works fine. after checking code of sap.m.p13nsortpanel fires event, assume did not bind sortitems aggregation. please have @ explored example well. there can see panel uses 2 aggregations, items , sortitems .

mapkit - Swift: How can I make less didupdatelocation calls -

i've come code prints address , postalcode of location. done in didupdatelocation function. the problem occur, every second address get's updated "didupdatelocation" function. because battery ineffecient, looking ways use interval couldn't find ways (also not on google en stackoverflow) on how this. can give me tips how can in swift? the answers of rajeshkumar , basir doesn't change battery power, delegate method still called same number of times per minute. if want have more efficient behavior, try change values of distancefilter, desiredaccuracy, , activitytype (you can find need here ) manager.distancefilter = 50 // distance changes want informed (in meters) manager.desiredaccuracy = 10 // biggest approximation tolerate (in meters) manager.activitytype = .automotivenavigation // .automotivenavigation stop updates when device not moving also if need location of user when changes significantly, can monitor significantlocationchanges, ca...

java - What is the -b+ sign in creating locale specific directories in android? -

according android documentation, to add support more locales, create additional directories inside res/. each directory's name should adhere following format: <resource type>-b+<language code>[+<country code>] for eg. myproject/ res/ values/ strings.xml values-b+es/ strings.xml mipmap/ country_flag.png mipmap-b+es+es/ country_flag.png can why symbol -b+ ? educational purpose.if doubt present kindly comment.will try fix question. thanks time. link:- https://developer.android.com/training/basics/supporting-devices/languages.html#createdirs

c# - After submitting a form, the value disappered -

Image
after submitted form, "only display" values disappeared, knows error? in view, use @html.textboxfor , use viewbag.staffid value "readonly" variable, if submit form error, viewbag.staffid value disappears <div class="form-group"> @html.labelfor(model => model.staffid, "staffid", htmlattributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> @html.textboxfor(model => model.staffid, new { @value = viewbag.staffid, @readonly = "readonly", @class = "form-control" }) @html.validationmessagefor(model => model.staffid, "", new { @class = "text-danger" }) </div> </div> <div class="form-group"> @html.labelfor(model => model.staffinfo.cname, htmlattributes: new { @class = "control-label col-md-2" }) ...

angularjs - Moving image display bar left or right with arrow buttons and javascript -

sorry small piece of code, trying scroll image bar left or right 2 arrow buttons in html. error showing "uncaught typeerror: cannot read property 'style' of null @ movingimage" please if can help, let me know. js: function movingimage(el, e) { var amount = +e.target.dataset.amount; el.style.left = (el.offsetleft + amount) + 'px'; } var div = document.getelementbyid("movingimage"); var buttons = document.queryselectorall('button'); [].slice.call(buttons).foreach(function (button) { button.onclick = movingimage.bind(this, div); }); html: <button data-amount="-100"><div class="arrow left small" ng-click="changecolour(index-1)" ng-src="{{colour.thumbmedia | smcmediaurl}}"></div></button> <button data-amount="100"><div class="arrow right small" ng-c...