Posts

java - Want to use properties file for storing and for reading hashmap -

i have codes , corresponding states it. i want read properties file data. not reading if populate data file. hence have supply externally using file writer. if populate data , read give error as: file not found exception i want data when letter in key asked. when write m, want data key starting m. eg m - mh:maharashtra,mn-manipur,ml=meghalaya,... my code far: public class codeproperties { public static void main(string[] args) { createcodeprop(); map<string, string> props = loadcode(); printconsole(props); } // write new properties file in java private static void createcode() { properties p = new properties(); p.setproperty("mh", "maharashtra"); p.setproperty("sk", "sikkim"); p.setproperty("mp", "madhya pradesh"); p.setproperty("mn", "manipur "); p.setproperty("ml", "meghalaya"...

javascript - Can’t seem to grab ID and pass it to inner function -

i’m trying id of element on click, , pass animate function inner function. i can id can’t seem pass inner function. $("a").on("click",function() { var id = '#' + $(this).attr('id').substring(2); $('html, body').animate({ // console.log(id); not visible ?! scrolltop: $(id).offset().top }, 2000); });

c# - Pass variable from event handler to another method -

i working on .net application gets message serial port (arduino) received event handler. unable pass message stored event handler method. event handler receives data looking this: private static void messagereceivedhandler(object sender, serialdatareceivedeventargs e) { serialport serialport = (serialport)sender; string received_data = serialport.readexisting(); // pass received_data method } i want received_data variable passed method named getmessage() . method execute operations using received data returned. getmessage() called class, these operations can not implemented in event handler. edit : sorry, missed important point here. want received_data available in getmessage without getting parameter. because class needs access getmessage without (out output_data) parameter. public bool getmessage(out output_data) { bool success = true; // part not understand how implement string input_data = received_data; try{ // operations input_da...

Angular 4 dynamic routerlink server/localhost not responding. Works when routerlink is static -

i attempting create dynamic navigation menu based on navigation menu service , navigation menu component. first prototyped navigation menu make sure worked when component html hardcoded. code looks this: <nav> <md-list> <md-list-item routerlinkactive="link-active"> <a [routerlink]="['/users']"> <md-icon>people</md-icon><span *ngif="navigationmenuservice.getstatus() == navigationmenuservice.navigationmenustatuses.iconsandlabels">users</span> </a> </md-list-item> <md-list-item routerlinkactive="link-active"> <a [routerlink]="['/patients']"> <md-icon>hotel</md-icon><span *ngif="navigationmenuservice.getstatus() == navigationmenuservice.navigationmenustatuses.iconsandlabels">patients</span> </a> </md-list-item> <md-list-i...

xamarin.forms - Slow startup of xamarin app -

we developing cross platform app on pcl, time being using android devices testing. our concern taking 6 8 seconds (depending on device test it) start app, slow. after placing few breakpoints saw timing consumed pretty evenly. did notice particular parts took longer: 1s before reaching oncreate() on mainactivity (there's splash screen before has 1 image , background color) 1s on base.oncreate(bundle); 1s on global::xamarin.forms.forms.init(this, bundle); 1.5s on page mainpage = new logscreen(); (creating main page set main navigation page). this common problem while using xamarin.forms there many threads related specially one: https://forums.xamarin.com/discussion/93178/lets-talk-performance/p6 the news xamarin team working on it. here tips can improve it: https://blog.xamarin.com/5-ways-boost-xamarin-forms-app-startup-time/

vba - Why won't this loop to add CustomDocumentProperties work? -

i'm trying add few custom document properties folder of word documents. i know loop works fine, because used same loop different code modify , update pre-existing custom document properties. the code add custom document properties works, tested running in it's own macro single document, worked fine. since loop works , code within loop works, can't figure out what's wrong it. here's code: sub add_custom_docproperties() dim file dim path string dim filepath variant filepath = inputbox("please enter filepath files want update.", "input filepath", "copy filepath here...") select case strptr(response) case 0 endednotification = msgbox("the macro has been ended.", , "notification") exit sub case else end select path = filepath & "\" file = dir(path & "*.*") 'application.screenupdating = false while file <> "" documents.open filename:=path & file ...

ios - Unable to install IBMMobileFirstPlatformFoundation 7.1 using cocoapods -

we trying configure our native ios app mfp 7.1 using cocoapods. however, when define ibmmobilefirstplatformfoundation in our podfile , try pod install , getting below error: [!] error installing ibmmobilefirstplatformfoundation [!] /usr/bin/git clone https://hub.jazz.net/git/imflocalsdk/imf-client-sdks /var/folders/94/h6b7y6wx5k1dc_4q2xj5_8hw0000gn/t/d20170911-59452-jm2y5r --template= --single-branch --depth 1 --branch ibmmobilefirstplatformfoundation_7.1.11 cloning '/var/folders/94/h6b7y6wx5k1dc_4q2xj5_8hw0000gn/t/d20170911-59452-jm2y5r'... fatal: remote branch ibmmobilefirstplatformfoundation_7.1.11 not found in upstream origin we have followed below doc couldn't work. adding ibm mobilefirst platform foundation ios sdk new application cocoapods podfile: # platform :ios, '10.0' target 'test' use_frameworks! pod 'alamofire', '4.5.0' pod 'alamofireobjectmapper', '4.1.0' pod 'datepickercell', ...