Posts

php - .htaccess Issue : 404 for index -

this .htaccess file in sub-folder ... <ifmodule mod_rewrite.c> rewriteengine on rewriterule ^index\.php$ - [l] rewriterule (.*) ./index.php?id=$1 [l] </ifmodule> i want mydomain.com/sub-folder/string processed index.php mydomain.com/sub-folder/?id=string but getting 404... not sure why. root .htaccess # begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress keep root .htaccess as: # begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^(index\.php|sub-folder(/.*)?)$ - [l,nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . index.php [l] </ifmodule> # end wordpress and keep in /sub-folder/.htaccess : <ifmodule mod_rewrite.c> rewriteengine on rewritebase /sub-folder/ rewrite...

java - JAVAC Error with Path Change to jdk\bin -

problem still exists path change jdk67/bin. microsoft windows [version 6.1.7601] copyright (c) 2009 microsoft corporation. rights reserved. c:\users\dell>java -version java version "1.7.0_67" java(tm) se runtime environment (build 1.7.0_67-b01) java hotspot(tm) client vm (build 24.65-b04, mixed mode, sharing) c:\users\dell>javac 'javac' not recognized internal or external command, operable program or batch file. c:\users\dell>echo %path% c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\wind owspowershell\v1.0\;c:\ant194\bin;c:\maven323\bin;c:\java\jdk67\bin;c:\ruby200\b in c:\users\dell>javac 'javac' not recognized internal or external command, operable program or batch file. c:\users\dell> please let me know. this may you, 1.copy path upto 'bin' (eg:-c:\program files\java\jdk1.7.0_07\bin) 2.go properties of 'my computer' 3.select 'advanced system settings' ...

batch file - How to run a remote task using user name and password when password contains a '€' character? -

i'm trying run task on remote server using jenkins. i'm using command line: schtasks /run /s <remote server> /u <user> /p <password> /tn <task name> this worked fine new customer has '€' character inside password , can't figure out how pass cmd line correctly. it's being replaced '?' because standard cmd font doesn't support th € sign. inside cmd console can solve problem changing dafault font "lucida console" can't in jenkins or make batch-script use font. most services/server require authentication user name , password not allow characters code value greater decimal 127 because results in problems one. the euro sign has code value 20ac (hexadecimal, 8364 decimal) in unicode table. but in code page windows-1252 western european , north american countries euro sign has code value 80 (hexadecimal, 128 decimal). in code page windows-1251 cyrillic text euro sign has code value 88 (hexadecima...

python - Filtering another filter object -

i trying generate prime endlessly,by filtering out composite numbers. using list store , test primes makes whole thing slow, tried use generators. from itertools import count def chk(it,num): in it: if i%num: yield(i) genstore = [count(2)] primestore = [] while 1: prime = next(genstore[-1]) primestore.append(prime) genstore.append(chk(genstore[-1],num)) it works quite well, generating primes, until hit maximum recursion depth. found ifilter (or filter in python 3). documentation of python standard library : make iterator filters elements iterable returning predicate true. if predicate none, return items true. equivalent to: def ifilter(predicate, iterable): # ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9 if predicate none: predicate = bool x in iterable: if predicate(x): yield x so following: from itertools import count genstore = [count(2)] primestore = [] while 1: prime = next(ge...

Static methods added in interfaces in java 1.8 -

as know in java 1.8 static methods allowed in interfaces , have seen answers static methods defined in interface jdk 1 8 why did need so not satisfied. furthermore think may cause problems : public interface myinterface{ public static void mymethod(); } class myclass{ myinterface.mymethod(); // since mymethod static huge error waiting here ? } but still think there way out of since added by professionals , can please explain how oracle solves issue , need add ? thank in adavance. have not used java 1.8 never knew static methods in java needs defined not declared , thought of interfaces pure abstract class think that's why idea of defining method seemed strange me . thank ! . talking "what need add" static methods: quoting http://www.informit.com/articles/article.aspx?p=2191423 before java 8 made possible declare static methods in interfaces, common practice place these methods in companion utility classes. exampl...

java - /_ah/queue/__deferred__ in App Engine Logs -

i have app engine application uses google cloud sql, , page in application doing database operation; whenever page accessed, not able perform database operations. when go console, see /_ah/queue/__deferred__ . i able run application without issues on localhost code has no errors, however, there issue cloud sql after deploying it. note : have not used queues anywhere in code. what actual cause for /_ah/queue/__deferred__ to appear in app engine logs? i had similar issue. i've found that in 1 of filters opening session each incomming connection: httprequest.getsession(true); //or 1 below - both opens valid http session httprequest.getsession(); and appengine-web.xml configured store session asynchronously <sessions-enabled>true</sessions-enabled> <async-session-persistence enabled="true"/> this has resulted in creating lot of tasks in default queue , each 1 of them tried store empty session. avoid this, make sure opening sess...

ios - how to add done button on uidatepicker -

uidatepicker *datepicker = [[uidatepicker alloc]init]; [datepicker setdate:[nsdate date]]; [datepicker addtarget:self action:@selector(updatetextfield:) forcontrolevents:uicontroleventvaluechanged]; [txt_time setinputview:datepicker]; uibarbuttonitem *barbutton=[[uibarbuttonitem alloc]initwithtitle:@"done" style:uibarbuttonitemstylebordered target:self action:@selector(addordeleterows)]; how add done button on top of uidatepicker when press on textfield uidatepicker show after enter date done button show.after clicked on done button uidatepicker should hide of answer on stackoverflow how add done button date picker, one: display uidatepicker in uiactionsheet when tapping on uitextfield helpful. achieves desired result minimum code , custom configuration.