Force layout showing fully connected mesh network topology.
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
# The following is a challenge in Ruby which I thought would be quite easy, but... isn't. | |
# So the issue is user #1 (identified by his international phone number) invites his friend user #2 by SMS and tells us he invited his friend. Because the invititation is by SMS, the number might be local and might be international. Your challenge, should you choose to accept it, is to convert user #2's number to an international format, as follows: | |
# If user #2's number is already international, save it as is. If not, take user #1's country code (as parsed from his international number) and add that country code to user #2's number. (Take note adding a country-code is non-trivial; e.g. in Israel you remove the first '0' to do this properly, while in the US you don't.) | |
# You may use any external (Ruby) libs or gems for 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
x = 3.14; // This will not cause an error. | |
myFunction(); | |
function myFunction() { | |
"use strict"; | |
y = 3.14; // This will cause an error (y is not defined) | |
} |
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
id | parentId | name | size | department | totalorextract | total | pages | |
---|---|---|---|---|---|---|---|---|
ROOT | NULL | Pune Budget - Electricity Related | Pune Budget - Electricity Related | E | 3060146700 | |||
RE | ROOT | General > Revenue Expenditure | General > Revenue Expenditure | E | 945808250 | |||
CE | ROOT | General > Capital Expenditure | General > Capital Expenditure | E | 968020000 | |||
XE | ROOT | Water > Revenue Expenditure | Water > Revenue Expenditure | E | 1017366450 | |||
ZE | ROOT | Water > Capital Expenditure | Water > Capital Expenditure | E | 112552000 | |||
FE | ROOT | Khas_ Upanagare Vikas Nidhis | Khas_ Upanagare Vikas Nidhis | E | 16400000 | |||
RE_Other | RE | RE_Other | Revenue Expenditure | E | 248362250 | |||
CE_Other | CE | CE_Other | Capital Expenditures | E | 106960000 | |||
RE11 | RE_Other | Main supervision_ recovery etc. | Revenue Expenditure | E | 20910000 |
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
YUI({ filter: "raw" }).use('node', 'router', 'app', 'model', 'view', 'plugin', 'console', 'parallel',function (Y) { | |
// This AnchorPlugin is designed to be added to Node instances (the host will be a Node instance) | |
var ctxConsole = new Y.Console({ | |
logSource: Y.Global, | |
style: 'block', | |
newestOnTop: false, | |
width: "250px" | |
}).render("#Debug"); |
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
. | |
├── bookstore-0.0.1-SNAPSHOT | |
│ ├── META-INF | |
│ ├── WEB-INF | |
│ │ ├── classes | |
│ │ │ ├── banner.txt | |
│ │ │ ├── com | |
│ │ │ │ └── mycompany | |
│ │ │ │ └── myapp | |
│ │ │ │ ├── Application.class |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<computerstore> | |
<catalogcomputers id="1"> | |
<computer id="1"> | |
<title>Computer1</title> | |
<type>Desktop</type> | |
<amount>10</amount> | |
</computer> | |
<computer id="2"> | |
<title>Computer2</title> |
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
asd: | |
- foo<%= ENV['blah_blah'] %> | |
- bar |
Add ssh key to host in two line
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'
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
<html> | |
<head> | |
<title>Simple Node JS and Socket IO Chat</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script src="/socket.io/socket.io.js"></script> | |
<script> | |
var socket = io.connect('http://localhost:5432'); | |
// add a new chat message | |
socket.on('add_message', function (name, data) { |