Posts

Solstice dates on iOS -

i'm in process of putting app makes use of suns position @ both summer , winter solstice. while there plenty of tables of data out there, i'm wondering if there standard ios components can used calculate or retrieve solstice dates without having embed , lookup data. taking advice comments, following implemented gregorian date hours , minutes julian date. - (nsdate *) datefromjuliandate:(double)juliandate { nscalendar *gregoriancalendar = [[nscalendar alloc] initwithcalendaridentifier:nsgregoriancalendar]; nsdate *gregoriandate; double datepart = floor(juliandate); double timepart = juliandate - datepart + 0.5; // next calendar day? if (timepart >= 1.0) { timepart = timepart - 1.0; datepart = datepart + 1; } double l = datepart + 68569; double n = floor (4 * l / 146097); l = floor(l) - floor((146097 * n + 3) / 4); int year = floor(4000 * (l + 1) / 1461001); l = l - (floor(1461 * year / 4)) + 31; int month = floor(80 * l / 24...

centos7 - Nginx doesn't redirect to index.php page of phpmyadmin -

i installed nginx, php-fpm , phpmyadmin. www folder. [root@vmi67073 etc]# ll /usr/share/nginx/html/ -rw-r--r-- 1 root root 3650 feb 13 18:45 404.html -rw-r--r-- 1 root root 3693 feb 13 18:45 50x.html drwxr-xr-x 3 root root 40 mar 17 06:14 myapp.eu -rw-r--r-- 1 root root 3700 feb 13 18:45 index.html lrwxrwxrwx 1 root root 22 mar 17 06:52 mysql -> /usr/share/phpmyadmin/ my nginx conf file location phpmyadmin under myapp.conf file looks this location /mysql { alias /usr/share/phpmyadmin; location ~ \.php$ { index index.php index.html index.htm; include fastcgi_params; fastcgi_param script_filename $request_filename; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; } } problem: if try access myapp.eu/mysql following error in nginx log 2016/03/17 09:21:01 [error] 2119#0: *28 directory index of "/usr/share/phpmyadmin/" forbidden, client...

windows - Zend - Couldnt load Zend/Application.php (failed to open stream)? -

i have structure below (i'm using zend 1.9.6): http://farm3.static.flickr.com/2605/4112306785_fc80d39833_o.gif (i'm sorry. i'm not enough reputation.) when run program, error: *warning: require_once(zend/application.php): failed open stream: no such file or directory in c:\xampp\htdocs\myzend\index.php on line 25 fatal error: require_once(): failed opening required 'zend/application.php' (include_path=';c:\xampp/application/modules/admin/models;.;c:\xampp\php\pear') in c:\xampp\htdocs\myzend\index.php on line 25* here index.php <?php date_default_timezone_set('asia/ho_chi_minh'); // define base path obtainable throughout whole application defined('base_path') || define('base_path', realpath(dirname(__file__) . '/../..')); // define path application directory defined('application_path') || define('application_path', base_path . '/application'); ...

java - Defining two same group names in regex -

string strr = "{msg=1234,returncode=123}"; pattern pat1 = pattern.compile("^\\{returncode=(?<returncode>\\d+)(,msg=(?<msg>.*))?\\}|(\\{msg=(?<msg2>.*),returncode=(?<returncode2>.+)\\})?$"); in fact, want define returncode in regex, compiler throws: named capturing group defined. how can solve it? maybe there easier way it. much string strr = "{msg=1234,returncode=123}"; pattern pat2 = pattern.compile("(?<key>\\w+)=(?<val>\\w+)"); matcher m = pat2.matcher(strr); while (m.find()) { if (m.group("key").equals("returncode")) { system.out.println(m.group("val")); // prints 123 } }

malware - Finding a PEiD database -

where can latest version of peid database? know 1 version available in github ( https://raw.githubusercontent.com/guelfoweb/peframe/5beta/peframe/signatures/userdb.txt ), more 1 year old , has approximately 4000 signatures. if you're looking database use in yara, there's yara-rules github page here has lot of preexisting rules , seems quite date. hope helps!

node.js - Post install after installing package? -

i've got scripts tag in package.json file: "scripts": { "postinstall": "<command>" } whenever i'm running npm install postinstall commands runs properly. if i'm passing arguments npm install command, example when installing new package: npm install <dependency> --save-dev . won't run postinstall command. is there way postinstall run if there arguments in npm install command? i think getting confused how packages work. package has it's own dependencies, post-installs , pre-installs. when install package this: npm install <dependency> this looks @ package want install , installs along it's dependencies, if package want install has preinstall or postinstall command, invokes them. only package , not yours. when npm install , installing your package, , therefore calls your package's postinstall command.

excel - VBA date double quotation mark gives triple quotation mark -

i have strange problem excel vba code. have date string column in csv spreadsheet wrap around in double quotation marks. wrote vba script in excel achieve this. however, everytime run script, date string output wrapped in 3 sets of double quotation marks instead of one. i this: """2015-11-11 00:00:00.40""",59845,-0.20375,3.447,2.0135,32.08286,12,32,11.6 instead of this: "2015-11-11 00:00:00.40",59845,-0.20375,3.447,2.0135,32.08286,12,32,11.6 where going wrong? have tried using char(34) , chr(34) represent " has not helped. here script: sub quotations() ' ' quotations macro ' ' dim strfile string strfile = dir("e:\copy\*.csv") ' create new workbook , assign variable dim wb workbook while len(strfile) > 0 set wb = workbooks.add windows("personal.xlsb").activate wb.activate activesheet.querytables.add(connection:= _ "text;e:\copy\...