Posts

maid - Move rule based on tags -

i have setup rule in hazel move files specific directories based on tags associated. switch these rules on maid instead. have example on how this? need if maid sees file specific tag runs script file them. script runs brett terpstra , called tagfiler.rb .

Java Garbage Collection Tuning - -XX:GCTimeLimit and -XX:GCHeapFreeLimit not working? -

in our gc logs, seeing sort of pattern extended periods of time (20+ minutes). here small snapshot of full gcs running during time: 2017-08-17t17:40:55.958-0500: 2263.468: [full gc [psyounggen: 200192k->200191k(272896k)] [paroldgen: 698843k->698835k(698880k)] 899035k->899026k(971776k) [pspermgen: 26732k->26732k(26880k)], 0.3358980 secs] [times: user=12.79 sys=0.03, real=0.33 secs] 2017-08-17t17:40:56.294-0500: 2263.805: [full gc [psyounggen: 200192k->200191k(272896k)] [paroldgen: 698835k->698835k(698880k)] 899027k->899027k(971776k) [pspermgen: 26732k->26732k(26880k)], 0.4146470 secs] [times: user=14.99 sys=0.04, real=0.42 secs] 2017-08-17t17:40:56.710-0500: 2264.220: [full gc [psyounggen: 200192k->200191k(272896k)] [paroldgen: 698835k->698835k(698880k)] 899027k->899027k(971776k) [pspermgen: 26732k->26732k(26880k)], 0.3549330 secs] [times: user=14.16 sys=0.03, real=0.35 secs] 2017-08-17t17:40:57.065-0500: 2264.576: [full gc [psyounggen: 2001...

selenium webdriver - unexpected error launching internet explorer.IELaunchURL() returned HRESULT 80070005("Access is denied) -

Image
not able launch ie browser through selenium. using ie11 along selenium 2.46. please note cannot check/uncheck settings of enabled protected mode in company because of security reasons. please find code below: public static void main(string[] args) throws interruptedexception { webdriver driver=null; desiredcapabilities capabilities = desiredcapabilities.internetexplorer(); capabilities.setcapability(internetexplorerdriver.introduce_flakiness_by_ignoring_security_domains, true); capabilities.setcapability("ignorezoomsetting", true); system.setproperty("webdriver.ie.driver","c:\\selenium\\iedriverserver_x64_2.46.0\\iedriverserver.exe"); driver = new internetexplorerdriver(); driver.get("https://www.google.com/"); }

javascript - React - dynamic properties from strings -

in test suit, trying generate components props dynamically, end components so: <button primary /> <button secondary /> currently, bit stuck: [ 'primary', 'secondary' ].foreach((buttontype) => { it(`should render '${buttontype}' button`, () => { const button = mount(<button {...buttontype}>click me</button>); // incorrect - not work // rest of test omitted }); }); any appreciated. you should replace cardtype buttontype in function parameter given foreach. then, should use following inside test: const dynamicprops = { [buttontype]: true }; <button {...dynamicprops} /> some elements have been omitted idea. when pass prop without explicit definition, mean someprop={true} , in above case have use primary or whatever property of object, value of true .

javascript - Timeout and redirect on click -

i'm triying redirect page few seconds after submit. i'm using javascript , angularjs. i've found examples, didn't work. here's 1 of them: vm.redirecttime = "1000"; vm.redirecturl = "destination url"; function redirect (){ settimeout("location.href = vm.redirecturl;", vm.redirecttime); } can me example, please? the idea after submit show ng-show success message (wich working), , 5 or 6 seconds later, redirect page. thanx in advance.

objective c - unexpected late AppDelegate method call time on iOS 11 -

i have built , run app on different version of iphone 7. same code executed [appdelegate applicationdidbecomeactive] called delay on ios 11 devices. i did couple tests , method delay reproducible. on ios 10, time elapses between -[uiapplicationdelegate application: didfinishlaunchingwithoptions:] , -[uiapplicationdelegate applicationdidbecomeactive:] around 300ms while on ios 11 around 1300ms i hope know has been added app lifecycle in ios 11.

objective c - iOS Save file to non-private directory -

right working on project uploads files system , wondering if possible save nsdata location not private. when save data right cooresponding url looks this: file:///private/var/mobile/containers/data/application/.../image.jpg but when files uiimagepicker url looks this: file:///var/mobile/containers/data/application/.../image.jpg how can (if possible) save data directory not under private? just reference code have move files far: - (nsurl *)movefiletotemporarymemory:(nsurl *)url { nserror *readingerror, *writingerror; nsstring *filename = url.lastpathcomponent; nsurl *tempurl = [[nsurl fileurlwithpath:nstemporarydirectory()] urlbyappendingpathcomponent:filename]; nsdata *data = [nsdata datawithcontentsofurl:url options:nsdatareadingmappedifsafe error:&readingerror]; [data writetourl:tempurl options:nsdatawritingatomic error:&writingerror]; return tempurl; } there's no difference -- /var symbolic link /private/var , both paths equivalent. ...