This file contains 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
import React, { Component } from 'react'; | |
import { select, geoMercator, geoPath, zoom, json } from 'd3'; | |
class WorldMap extends Component { | |
componentDidMount() { | |
this.drawMap(); | |
window.addEventListener('resize', this.handleResize); | |
} | |
componentWillUnmount() { |
This file contains 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
Sub Console() | |
Dim FolderPath As String | |
Dim Filename As String | |
Dim sheet As Worksheet | |
Application.ScreenUpdating = False | |
FolderPath = GetFolder & "\" |
This file contains 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
<div class="col-md-6 col-sm-6 col-xs-12"> | |
<select | |
ng-change="changeCluster(1)" | |
ng-options="s.cluster_id as s.cluster_title for s in parentLevel" | |
ng-model="currentCluster.co_sub_cluster"> | |
</select> | |
</div> | |
<div class="col-md-6 col-sm-6 col-xs-12"> | |
<div class="clearfix"> |
This file contains 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
RewriteEngine on | |
# Rewrite /foo/bar to /foo/bar.php | |
RewriteRule ^([^.?]+)$ %{REQUEST_URI}.php [L] | |
# Return 404 if original request is /foo/bar.php | |
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$" | |
RewriteRule .* - [L,R=404] | |
# NOTE! FOR APACHE ON WINDOWS: Add [NC] to RewriteCond like this: |
This file contains 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 goal = 25; | |
var numbers = [21, 34, 12, 52, 43]; | |
var closest = numbers.reduce(function(prev, cur){ | |
return (Math.abs(cur-goal) < Math.abs(prev-goal)) ? cur : prev; | |
}); | |
console.log(closest); // output: 21 |
This file contains 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> | |
.circular { | |
width: 150px; | |
height: 150px; | |
border-radius: 50%; | |
position: relative; | |
overflow: hidden; | |
margin: 0 auto; | |
} | |
.circular img { |
This file contains 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
<input jqdaterangepicker type="text" class="form-control" ng-model="daterange" ng-change="onDateRangeChange()" /> | |
<input | |
jqdatepicker | |
type="text" | |
name="dueStartDate" | |
datetime="dd-MM-yyyy" | |
data-date-format="dd-mm-yyyy" | |
class="form-control" | |
placeholder="Due Date (From)" | |
ng-model="selectedEdit.field" /> |
This file contains 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
<html> | |
<form ng-submit="SubmitAssignment()" enctype="multipart/form-data"> | |
<div class="form-group"> | |
<label class="control-label">Upload File</label> | |
<input type="file" file-model="myFile" /> | |
</div> | |
<button class="btn btn-info" type="submit">Submit</button> | |
</form> |
This file contains 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
<div class="info"> | |
Showing {{entryLimit*(currentPage-1)+1}} to {{entryLimit*(currentPage-1)+entryLimit}} of {{totalItems}} entries | |
</div> | |
<div ng-repeat="data in filtered = (activity) | startFrom:(currentPage-1)*entryLimit | limitTo:entryLimit"> | |
<td>{{entryLimit *(currentPage-1)+$index+1}}</td> | |
</div> | |
<div | |
pagination |
This file contains 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
SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) | |
* cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin(radians(lat)) ) ) AS distance | |
FROM markers | |
HAVING distance < 25 | |
ORDER BY distance | |
LIMIT 0 , 20; |
NewerOlder