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 java.util.ArrayList; | |
import java.util.PriorityQueue; | |
import java.util.Scanner; | |
import java.util.Stack; | |
public class Acyclicity { | |
private static int acyclic(ArrayList<Integer>[] adj) { | |
//write your code here | |
boolean[] visited = new boolean[adj.length]; |
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
// Advanced Problem: Checking Whether Any Intersection in a City is Reachable from Any Other | |
//Task. Compute the number of strongly connected components of a given directed graph with n vertices and m edges. | |
// Input Format. A graph is given in the standard format. | |
// Constraints. 1 ≤ n ≤ 10 4 , 0 ≤ m ≤ 10 4 . | |
// Output Format. Output the number of strongly connected components. | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Scanner; | |
import java.util.Stack; |
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
@media (min-width: 723px) { | |
.center-box { | |
width: 360px !important; | |
margin-left: 10%; | |
} | |
.center-box-header { | |
position: fixed; | |
top: 0.8rem; |
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
<table> | |
<tbody> | |
<tr selectab-tr="pickRow()"> | |
<td>some data</td> | |
<td>some data</td> | |
<td class="none-selectable"> | |
<a href="someurl">Click this link will not execute pickRow() function</a> | |
</td> | |
</tr> | |
</tbody> |
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
{ | |
preCompile: function(src, context) { | |
var match = src.match(/<example>[\s\S]+?<\/example>/mg); | |
if(match && match.length > 0) { | |
match.forEach(function(example) { | |
var subMatch = example.match(/<file\s*name=".+?">[\s\S]+?<\/file>/mg); | |
var group, newExample = example, | |
htmlContent, | |
appName = 'example' + exampleCount + 'App', | |
htmlFileName, |
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
/** | |
* filter the event target for the nya-bs-option element. | |
* Use this method with event delegate. (attach a event handler on an parent element and listen the special children elements) | |
* @param target event.target node | |
* @param parent {object} the parent, where the event handler attached. | |
* @return the filtered target or null if no element satisfied the selector. | |
*/ | |
var filterTarget = function(target, parent) { | |
var elem = target, | |
className; |
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 create a custom config for a mod create a file with the same name | |
## as the jar file and append ".conf", for craftbukkit this would be | |
## "craftbukkit.jar.conf". | |
## The following config is an example that lists all possible options, | |
## without actually changing anything (it remaps the commands on | |
## themselves) | |
## | |
## General configuration. If this contains a setting called "file" the | |
## [commands], [start] and [parse_*] sections will be loaded from this | |
## other file |
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
.cm-s-monokai-webstorm.CodeMirror { | |
background-color: #272822; | |
color: #F8F8F2; | |
-webkit-font-smoothing: subpixel-antialiased; | |
} | |
.cm-s-monokai-webstorm.CodeMirror div.CodeMirror-cursor { | |
border-left: 1px solid #f8f8f0; | |
z-index: 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
/** | |
* Wrap redis client using kriskowal/q promise | |
*/ | |
var redis = require('redis'); | |
var redisClient = redis.createClient(); | |
var Multi = redis.Multi; | |
var Q = require('q'); | |
var _ = require('underscore'); | |
var object = function(o) { |
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
#!/bin/bash | |
for man in 1 3 5 7; do | |
ln -sf /usr/local/lib/node_modules/npm/man/man${man}/* /usr/local/share/man/man${man} | |
done | |
ln -sf /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm | |
npm update npm -g |
NewerOlder