[Solved] how to sum the array time [closed]

$totalTimeSecs = 0; foreach ($array as $l1) { // Loop outer array foreach ($l1 as $l2) { // Loop inner arrays if (isset($l2[‘jQuery’][‘length’])) { // Check this item has a length list($hours,$mins,$secs) = explode(‘:’,$l2[‘jQuery’][‘length’]); // Split into H:m:s $totalTimeSecs += (int) ltrim($secs,’0′); // Add seconds to total $totalTimeSecs += ((int) ltrim($mins,’0′)) * 60; // Add … Read more

[Solved] Is there any way where x return y not 1? [closed]

The assignment expression evaluates the right hand side and assigns the resulting value to the left hand side. Evaluating a variable (e.g. shippingProviders) results in the value the variable has (“somthing”). There is no way to get the name of a variable at runtime. If you use the variable shippingProviders, then there is nothing that … Read more

[Solved] PHP timestamp convert to javascript?

You just need to convert client time to server time zone. Use Date.prototype.getUTCHours and etc methods. Also you can use Date.prototype.getTimezoneOffset() to check the time zone difference and notify use if day changed, for example: <script> var t3=<?php echo $t3; ?>; function update_clock3(){ var now = new Date(Number(t3)); var year = now.getUTCFullYear(); var month = … Read more

[Solved] batch script delete .ost bigger than 50 GB

Ok, I found the solution: WMIC to rescue!!!! Do a wmic query and put into a variable: for /f “tokens=2 delims==” %%f in (‘wmic datafile where “path=”\\Users\\%username%\\AppData\\Local\\Microsoft\\Outlook\\” and Extension=’ost’ and FileSize>’48318382080′” get Name /value ^| find “=”‘) do set “file=%%f” solved batch script delete .ost bigger than 50 GB

[Solved] Math.random() *100 verses Math.random(100) [closed]

Math.random() exists. Math.random(int) does not exist. You may be getting that mixed up with the Random class constructor, which takes a long as a seed value, meaning your results will be pseudorandom and by consequence, repeatable. If you wanted a number between 0 and 99 I actually would recommend that you use Random. You can … Read more