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 | |
| if (!empty($_GET['location'])){ | |
| /** | |
| * Here we build the url we'll be using to access the google maps api | |
| */ | |
| $maps_url = 'https://'. | |
| 'maps.googleapis.com/'. | |
| 'maps/api/geocode/json'. | |
| '?address=' . urlencode($_GET['location']); | |
| $maps_json = file_get_contents($maps_url); |
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
| <style type="text/css"> | |
| .typed-cursor{ | |
| opacity: 1; | |
| -webkit-animation: blink 0.7s infinite; | |
| -moz-animation: blink 0.7s infinite; | |
| animation: blink 0.7s infinite; | |
| } | |
| @keyframes blink{ | |
| 0% { opacity:1; } | |
| 50% { opacity:0; } |
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 | |
| //Get the q parameter from URL | |
| $q=$_GET["q"]; | |
| $hint=""; | |
| $link = mysql_connect('pcmu-seb99', 'Support5000', 'bob'); | |
| if (!$link) | |
| { | |
| die('Could not connect: '.mysql_error()); | |
| } |
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
| var startTime = "05:01:20"; | |
| var endTime = "09:00:00"; | |
| var regExp = /(\d{1,2})\:(\d{1,2})\:(\d{1,2})/; | |
| if(parseInt(endTime .replace(regExp, "$1$2$3")) > parseInt(startTime .replace(regExp, "$1$2$3"))){ | |
| alert("End time is greater"); | |
| } |
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
| Works fine for me, here's a test I just did here: | |
| Route::get('test', function() { | |
| $user = User::where('email','myemail@domain.com')->first(); | |
| Form::model($user); | |
| $user->notify_rate = true; | |
| echo e(Form::checkbox('notify_rate')); |
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
| This example definitely worked for me. | |
| // Javascript | |
| <script type="text/javascript"> | |
| $(function(){ | |
| $("#auto").keyup(function(){ | |
| $("#auto").autocomplete({ | |
| source:"{{URL('getdata')}}", | |
| minLength: 3 |
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
| You can use the microtime function for this. From the documentation: | |
| microtime — Return current Unix timestamp with microseconds | |
| Example usage: | |
| $start = microtime(true); | |
| while (...) { | |
| } | |
| $time_elapsed_secs = microtime(true) - $start; |
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
| allData.getJson().then(function(json) { | |
| // success, do something with the json | |
| }, function(reason) { // failure, .getJson() had some kind of error | |
| alert('Sorry, unable to retrieve data from the server.') | |
| console.error(reason); | |
| }); |
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
| var monitorControllers = angular.module('monitorControllers', []); | |
| monitorControllers.controller('MonitorCtrl', function($scope, $http){ | |
| $http.get('data/messages.json').success(function(data, status) { | |
| $scope.status = status; | |
| $scope.messages = data; | |
| }).error(function(data, status) { | |
| $scope.messages = data || "Request failed"; | |
| $scope.status = status; |
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
| To use this function, create a conversion formula, as in the following example: | |
| #Start Excel and press ALT+F11 to start the Visual Basic Editor. | |
| #On the Insert menu, click Module. | |
| #Enter the sample code for the Convert_Decimal custom function described above into the module sheet. | |
| #Press ALT+F11 to return to excel. | |
| #In cell A1 type the following formula: | |
| =Convert_Decimal("10° 27' 36""") | |
| or | |
| =Convert_Degree(A1) |
OlderNewer