-
CTRL + A
— Move to the beginning of the line -
CTRL + E
— Move to the end of the line -
CTRL + [left arrow]
— Move one word backward (on some systems this is ALT + B) -
CTRL + [right arrow]
— Move one word forward (on some systems this is ALT + F) -
CTRL + U
— (bash) Clear the characters on the line before the current cursor position -
CTRL + U
—(zsh) If you're using the zsh, this will clear the entire line -
CTRL + K
— Clear the characters on the line after the current cursor position -
ESC + [backspace]
— Delete the word in front of the cursor
This file contains 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
namespace Cs.Core.Core | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
// 참고 : https://www.geeksforgeeks.org/lru-cache-implementation/ | |
public sealed class LruCache<TKey, TElement> | |
{ | |
private readonly LinkedList<(TKey Key, TElement Value)> timeline = new LinkedList<(TKey, TElement)>(); |
This file contains 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
namespace Utility | |
{ | |
using System; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
public static class PropertySelector | |
{ | |
public static PropertyInfo GetPropertyInfo<T>(this T obj, Expression<Func<T, object>> selector) | |
{ |
This file contains 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 "TypeList.h" | |
// from : https://functionalcpp.wordpress.com/2013/08/05/function-traits/ | |
template<class F> | |
struct function_traits; | |
// function pointer | |
template<class R, class... Args> | |
struct function_traits<R(*)(Args...)> : public function_traits<R(Args...)> { |
This file contains 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 "StdAfx.h" | |
#include "HttpClient.h" | |
namespace AsioHttp | |
{ | |
using boost::asio::ip::tcp; | |
class Client::ClientImpl | |
{ |
This file contains 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
// from http://msdn.microsoft.com/en-us/library/ff650316.aspx | |
public sealed class Singleton | |
{ | |
private static readonly Singleton instance = new Singleton(); | |
private Singleton(){} | |
public static Singleton Instance | |
{ |
This file contains 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 class Solution | |
{ | |
//internal class SolutionParser | |
//Name: Microsoft.Build.Construction.SolutionParser | |
//Assembly: Microsoft.Build, Version=4.0.0.0 | |
static readonly Type s_SolutionParser; | |
static readonly PropertyInfo s_SolutionParser_solutionReader; | |
static readonly MethodInfo s_SolutionParser_parseSolution; | |
static readonly PropertyInfo s_SolutionParser_projects; |
This file contains 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 <fstream> | |
#include <iostream> | |
#include <string> | |
#include <locale> | |
#include <codecvt> | |
... | |
// Write file in UTF-8 | |
std::wofstream wof; | |
wof.imbue(std::locale(std::locale::empty(), new std::codecvt_utf8<wchar_t,0x10ffff,std::generate_header>)); |
This file contains 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 <stdio.h> | |
#include <io.h> | |
#include <fcntl.h> | |
int APIENTRY WinMain(HINSTANCE hInstance, | |
HINSTANCE hPrevInstance, | |
LPSTR lpCmdLine, | |
int nCmdShow) | |
{ | |
AllocConsole(); |
This file contains 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
function asyncMap( list, fn, cb_ ) { | |
var n = list.length | |
, result = [] | |
, errState = null; | |
function cb (er, data) { | |
if (errState) return; | |
if (er) return cb_(errState = er); | |
results.push(data); | |
if (--n === 0) // 모든 리스트 처리 완료시 |
NewerOlder