Posts

Featured post

java - Limit RAM usage Eclipse -

this question has answer here: setting memory of java programs runs eclipse 2 answers i'm writing java program using eclipse ide (kepler service release 1) causing jvm hog more memory needs. don't run out of ram fan ramps up. i'd experiment limiting jvm's seemingly godlike power on system memory. apparently there way start jvm switch limit amount of ram allow program consume. know there setting in eclipse.ini file ide itself. want limit ram usage java program when start in dev/debug mode. know how might accomplished? set vm arguments specific run configuration can found at run → run configurations → arguments tab → vm arguments you can -xms512

php - regex find input value -

the string is: <input type="hidden" name="billing[address_id]" value="34543" id="billing:address_id" /> how can input value string? tried code: preg_match('/<input type="hidden" name="billing[address_id]" value="(.*?)" id="billing:address_id" \/>/mis', $html, $results); your regex correct.. escape [ , ] @ address_id. preg_match('/<input type="hidden" name="billing\[address_id\]" value="(.*?)" id="billing:address_id" \/>/mis', $html, $results);

.htaccess - Mod_rewrite, first rule works perfectly, second rule does not -

i have 2 mod_rewrite rules, defining category , product . products displayed in categories, , clicking on product comes product page: this works: http://www.example.com/ele/electricalgoods/ takes code value "ele" , uses rewrite call /view_category.php?cat=ele . works perfectly, using following mod_rewrite: rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^([^/]*)/([^/]*)/([^/]*)$ /show_category.php?catcode=$1&page=$3 [nc] (this includes further "folder" pages in category view such http://www.example.com/ele/electricalgoods/3/ ) however, underneath in htaccess file want have similar rewrite so: http://www.example.com/product/el063/earphones/ rewrites to: /view_product.php?prodid=el063 i did this htaccess code: rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^product/([^/]*)/([^/]*)$ /show_product.php?prodid=$1 [nc,l] but somehow doesn't work expected, want pro

php - No input file specified while using Nginx -

i create server recently, , use nginx web server. i did : service nginx force-reload reloading nginx configuration nginx [ ok ] then service nginx status nginx running knowing site running, when go it. see no input file specified. wired ??? here have in /etc/nginx/sites-available/default server { listen 80 default_server; server_name default; root /default/public; can please me fix ? i fix problem assign document root correct path : root /home/forge/default/public; if see no input file specified. , make sure set root correct path.

ftp - Website offline viewing/editing -

i went end ftp website , downloaded c drive. question show in browser normal address different beginning, ex. file:///c:/folder/www.websitename.com or type in access pages? need heavy lifting on , don't want site while live. dev site redirects main site , can't find in htaccess file reroutes i'm gonna try way. thanks! the path this: file:///c:/folder/filename.html you can open file in browser by: opening file menu in browser. if editing in tool notepad++, there should option launch page you're editing in browser. (in notepad++ it's under "run" menu) go file in windows explorer/finder, right click file, select "open with", , pick browser want see page in.

linux - Should I always use GAWK over AWK? -

i see features of awk included in gawk, besides using system doesn't have gawk installed, there ever reason should use awk versus gawk? awk have better performance on gawk? awk can refer many things. there's awk -the-standard , , there's many different implementations, 1 of gawk . not using implementation-specific features means you'll have high(er) chance code run unchanged on other implementations of awk -the-language. gawk , being 1 implementation of awk -the-language, claims conform awk -the-standard, while adding features. $ man awk … description gawk gnu project's implementation of awk programming language. conforms definition of language in posix 1003.1 standard. version in turn based on description in awk programming language, aho, kernighan, , weinberger. gawk provides additional features found in current version of brian kernighan's awk , number of gnu-specific extensions. … as speed, using gawk &quo

Drupal 7 Date module All day otpion -

i using drupal 7 date module. have enabled , created date field date, time , day option in content type. created node of content type, set date 04/25/2015, checked day option , saved node. after saving node can see date field value being saved 04/24/2015 00:00:00 in database. expecting saved 04/24/2015 23:59:59. can 1 please me how achieve this? in advance good morning. should modify submitted info after submision of form. have @ hook_node_presave() , hook lets alter node before inserted database. hope helps.