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
------------------------------ Environment ------------------------------- | |
ALLUSERSPROFILE | |
APPDATA | |
AppsRoot | |
CommonProgramFiles | |
CommonProgramFiles(x86) | |
CommonProgramW6432 | |
COMPUTERNAME | |
ComSpec |
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
private string _name; | |
public string Name | |
{ | |
get { return _name; } | |
set | |
{ | |
if(!String.IsNullOrEmpty(value)) | |
{ | |
_name = value; |
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.Diagnostics; | |
namespace TwoSum | |
{ | |
internal class Program | |
{ | |
public static Tuple<int, int> TwoSum(int[] numbers, int target) | |
{ | |
var lengthOfNumbers = numbers.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
#include <iostream> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
/* | |
Input: numbers={2, 7, 11, 15}, target=9 | |
Output: index1=1, index2=2 | |
*/ | |
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
#include <iostream> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
/* | |
Input: numbers={2, 7, 11, 15}, target=9 | |
Output: index1=1, index2=2 | |
*/ |
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
/* | |
Given a positive integer, return its corresponding column title as appear in an Excel sheet. | |
For example: | |
1 -> A | |
2 -> B | |
3 -> C | |
... | |
26 -> Z |
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 System.Threading.Tasks; | |
using HtmlAgilityPack; | |
namespace ConsoleTester | |
{ | |
class Program |
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
// display your IP address, useful when launching VMs | |
echo 'Your IP:' | |
ip addr show dev eth0 | sed -nr 's/.*inet ([^ ]+).*/\1/p' | cut -f1 -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
package main | |
import ( | |
"fmt"; | |
) | |
func loopit(phrase string, repeat int)(string){ | |
var outputphrase string = ""; |
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
IDENTIFICATION DIVISION. | |
PROGRAM-ID. HELLO-WORLD. | |
PROCEDURE DIVISION. | |
DISPLAY 'Hello world!'. | |
STOP RUN. |