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 EventEmitter = require('events').EventEmitter; | |
| var util = require('util'); | |
| // create the class | |
| var MyClass = function () {} | |
| util.inherits(MyClass, EventEmitter); | |
| var obj = new MyClass(); | |
| //add the listeners | |
| obj.on('myevent',function(){ | |
| console.log('my event emit'); |
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
| module.exports = { | |
| english: function(){console.log('hello world');}, | |
| russian: function(){console.log('hola');}, | |
| bangla: function(){console.log('sagotom');} | |
| } |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using log4net; | |
| using log4net.Config; | |
| namespace LogForNetTest | |
| { |
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
| require 'tiny_tds' | |
| client = TinyTds::Client.new(:username => 'sa', :password => 'secret', :host => 'localhosts') | |
| client.execute("use testdb").do | |
| #following block gets all the table names of the database and prints name. | |
| result = client.execute("SELECT * FROM sys.Tables") | |
| result.each do |row| | |
| p row['name'] | |
| end |
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
| Keypress Command | |
| Ctrl + X Delete line | |
| Ctrl + ↩ Insert line after | |
| Ctrl + ⇧ + ↩ Insert line before | |
| Ctrl + ⇧ + ↑ Move line/selection up | |
| Ctrl + ⇧ + ↓ Move line/selection down | |
| Ctrl + L Select line - Repeat to select next lines | |
| Ctrl + D Select word - Repeat select others occurrences | |
| Ctrl + M Jump to closing parentheses Repeat to jump to opening parentheses | |
| Ctrl + ⇧ + M Select all contents of the current parentheses |
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
| body{ | |
| padding: 50px 10px; | |
| } | |
| img{ | |
| border: 10px solid #ccc; | |
| box-shadow: 0px 0px 1px #555; | |
| } | |
| img.grayscale{ | |
| filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ | |
| filter: gray; /* IE6-9 */ |
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
| public void GetEventLog(string source) | |
| { | |
| EventLog el = new EventLog(); | |
| el.Source = source; | |
| foreach (EventLogEntry item in el.Entries) | |
| { | |
| Console.WriteLine(item.Source+": "+item.Message); | |
| } |
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
| package test | |
| object TestSheet { | |
| println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet | |
| def sum(a:Int,b:Int):Int = { | |
| def sumF(acc:Int,a:Int,b:Int):Int = { | |
| if(a>b) acc | |
| else sumF(acc+a,a+1,b) | |
| } |
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
| using System; | |
| using System.ServiceProcess; | |
| public class MyService : System.ServiceProcess.ServiceBase | |
| { | |
| static void Main(string[] args) | |
| { | |
| MyService service = new MyService(); | |
| if (Environment.UserInteractive) |
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
| require 'tiny_tds' | |
| client = TinyTds::Client.new(:username => 'sa', :password => 'secret', :host => 'localhost') | |
| client.execute("use testdb").do | |
| result = client.execute("select * from person") | |
| result.each do |row| | |
| p row | |
| end |
OlderNewer