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
respond-below($width) | |
media = 'all and (max-width: %s)' % $width | |
@media media | |
{block} | |
respond-above($width) | |
media = 'all and (min-width: %s)' % $width | |
@media media | |
{block} |
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
SearchField = React.createClass | |
mixins: [ | |
InputMixin | |
InputValueMixin | |
] | |
... | |
.... | |
.... | |
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
define ['react' | |
'dom' | |
'underscore' | |
'ui/forms/text_field' | |
'ui/forms/field_set' | |
'ui/forms/textarea' | |
'ui/forms/select' | |
'ui/workflows/intro' | |
'ui/workflows/workflow_forms/fields' | |
'actions/workflow_templates'], (React |
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
define ['react' | |
'dom' | |
'underscore' | |
'actions/workflow_templates' | |
'ui/workflows/workflow_forms/field' | |
'ui/common/sortable_table' | |
'ui/forms/select'], ( | |
React | |
D | |
_ |
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 from 'react'; | |
const D = React.DOM | |
var Tabs = React.createClass({ | |
displayName: 'Tabs', | |
propTypes: { | |
tabActive: React.PropTypes.number, | |
onMount: React.PropTypes.func, | |
onBeforeChange: React.PropTypes.func, | |
onAfterChange: React.PropTypes.func, |
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
@ProgressBar = ProgressBar({ pending: file_export.completed_items, total: file_export.total_items }) | |
if @inProgress(file_export) | |
do poll = () => | |
setTimeout (=> | |
debugger | |
$.ajax( | |
url: '/api/v1/file_exports.json', | |
success: (data) => | |
@ProgressBar.setState({ pending: data.completed_items }) |
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
if @state.isReady | |
D.ul { className: 'list-table-body clearfix'}, [ | |
[ | |
_.map(exportResults, (file_export, index) => | |
D.ul { className: 'list-table-row with-action' }, [ | |
D.li { className: 'filename' }, file_export.file_name | |
D.li { className: 'export-progress' }, [ | |
@streamProgressBar(file_export) | |
] | |
if @inProgress(file_export) |
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 numbers = [20,-20, 0, 50, -50, 0]; | |
var len = numbers.length; | |
var count = 0; | |
var threeSum = function() { | |
for(var i = 0;i < len; i++) { | |
for(var j = i + 1;j < len; j++) { | |
for(var k = j + 1;k < len; k++) { | |
if (numbers[i] + numbers[j] + numbers[k] == 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
var list = [1,4,8,10,23,26,55,77,88]; | |
var binarySearch = function(key) { | |
var low = 0; | |
var high = list.length - 1; | |
while(low <= high) { | |
var mid = Math.floor(low + (high - low) / 2); | |
if (key < list[mid]) { |
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
class Node { | |
constructor(data) { | |
this.data = data; | |
this.previous = null; | |
} | |
} | |
class Stack { | |
constructor() { | |
this.top = null; |