- Open Local Security Policy Editor (on the Start screen type "secpol" and click it).
- From the menu on the left, expand "Local Policy".
- Under the expanded "Local Policy" heading, select "Security Options".
- On the panel on the right find "User Account Control: Run all administrators in Admin Approval Mode", open this setting and change the value to Disabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # running tabula | |
| def tabula(jarfile, coordinate, pathFile) : | |
| output = self.launchWithoutConsole('java', ['-jar', str(jarfile), '-p', 'all', '-a', str(coordinate), str(pathFile)]) | |
| return output | |
| # Subprocess without console (PyInstaller) | |
| def launchWithoutConsole(command, args): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # check a list for float type value | |
| def checkListFloat(self, arList, isfloat = False) : | |
| result = [] | |
| for _i in arList: | |
| if self.checkFLoat(_i) : | |
| result.append([int(float(_i))]) | |
| else : | |
| res = re.sub('[^\d\.,]', '', _i) | |
| if res : | |
| result.append([res]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>name</key> | |
| <string>Zeus</string> | |
| <key>settings</key> | |
| <array> | |
| <dict> | |
| <key>settings</key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ------------------------------------------ | |
| // converts a string with a stret address | |
| // into a couple of lat, long coordinates. | |
| // ------------------------------------------ | |
| public function getLatLong($address){ | |
| if (!is_string($address))die("All Addresses must be passed as a string"); | |
| $_url = sprintf('http://maps.google.com/maps?output=js&q=%s',rawurlencode($address)); | |
| $_result = false; | |
| if($_result = file_get_contents($_url)) { | |
| if(strpos($_result,'errortips') > 1 || strpos($_result,'Did you mean:') !== false) return false; |
simple ordering lat long MySQL
SELECT
*,
6371 * ASIN(
SQRT(
POWER( SIN( ( '-8.637420' - sample.lat ) * pi( ) / 180 / 2 ), 2 ) + COS( '-8.637420' * pi( ) / 180 ) * COS( sample.lat * pi( ) / 180 ) * POWER( SIN( ( '115.253001' - sample.lng ) * pi( ) / 180 / 2 ), 2 )
)
) AS distance
FROM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ```php | |
| $array=[ | |
| ['day'=>'11','movements'=>'1'], | |
| ['day'=>'11','movements'=>'1'], | |
| ['day'=>'11','movements'=>'1'], | |
| ['day'=>'12','movements'=>'1'], | |
| ['day'=>'12','movements'=>'1'], | |
| ['day'=>'12','movements'=>'1'] | |
| ]; | |
| foreach($array as $row){ // iterate all rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function in_array_r($needle, $haystack, $strict = false) { | |
| foreach ($haystack as $item) { | |
| if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) { | |
| return true; | |
| } | |
| } | |
| return false; | |
| } | |
| // sample |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| public class PercentRounder | |
| { | |
| public class PercentInfo | |
| { | |
| public int Index; | |
| public int Percent; |
