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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Cytoscape.js Test</title> | |
<script src="build/cytoscape.umd.js"></script> | |
<style> | |
body { | |
margin: 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Edge types demo</title> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"> | |
<!-- For loading external data files --> | |
<script src="https://cdnjs.cloudflare.com/polyfill/v2/polyfill.min.js?features=Promise,fetch"></script> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Cytoscape.js Test</title> | |
<script src="build/cytoscape.min.js"></script> | |
<style> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Cytoscape.js Test</title> | |
<script src="build/cytoscape.umd.js"></script> | |
<style> | |
body { |
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
<!DOCTYPE> | |
<html> | |
<head> | |
<title>cytoscape-cola.js demo (compound)</title> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"> |
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
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 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
Sub Console() | |
Dim FolderPath As String | |
Dim Filename As String | |
Dim sheet As Worksheet | |
Application.ScreenUpdating = False | |
FolderPath = GetFolder & "\" |
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
<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 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
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 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 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 |
NewerOlder