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 keypress = require('keypress'); | |
// make `process.stdin` begin emitting "keypress" events | |
keypress(process.stdin); | |
// listen for the "keypress" event | |
process.stdin.on('keypress', function (ch, key) { | |
// console.log('got "keypress"', key); | |
if(key && key.name == 'right'){ |
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 Arch; if (!Arch) Arch = {}; // set up custom namespace 'Arch' | |
Arch.AjaxPagination = function(paginationContainer, storiesContainer, filtersContainer) { | |
// Only html5 browsers can use ajax pagination. We don't want no stinkin' hashbang URLs. | |
if (!history.pushState) { | |
return; | |
} | |
this.$paginationContainer = $(paginationContainer); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 { Component } from "react" | |
import './Table.css'; | |
class TableComponent extends Component{ | |
render(){ | |
return( | |
<div> | |
<table> | |
<tr> | |
<th>Company</th> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
runByFeatures(features) { | |
if (features.type !== "Feature") return undefined; | |
let polygon = turf.polygon(features.geometry.coordinates); | |
const unitsOption = {units: 'kilometers'}; | |
let polyline, length, bbox, percentage1, percentage2, fraction, point1, point2, bearing; | |
let point1a, point1b, point2a, point2b, line1, line2; | |
let largest, diagonalLength; | |
polyline = turf.polygonToLineString(polygon); |
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
with open("model_dictionary.json",'w') as f: | |
json.dump(model_dict,f) | |
f.close() | |
with open("company_dictionary.json",'w')as f: | |
json.dump(company_dict,f) | |
f.close() | |
with open("fuelType_dictionary.json",'w') as f: | |
json.dump(fueltype_dict,f) | |
f.close() | |
with open("transmission_dictionary.json",'w')as f: |
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
number = int(input()) | |
counter =0 | |
while number > 0: | |
number = number//10 | |
print(number) | |
counter +=1 | |
print("number of digits :",counter) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
function exponentialBackoff(i, dt) { | |
const f = j => j >= 0 ? Math.exp(j/3)*dt : 0 | |
const ret = f(i)-f(i-1) | |
if(ret < dt) { | |
return dt | |
} else { | |
return ret | |
} | |
} |
OlderNewer