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
--[[ lvim is the global options object Linters should be filled in as strings with either a global executable or a path to an executable | |
]] | |
-- require('swenv.api').get_current_venv() | |
-- general | |
lvim.log.level = "warn" | |
lvim.format_on_save.enabled = true | |
lvim.builtin.theme.name = "tokyonight" | |
lvim.colorscheme = "onedark" | |
lvim.builtin.terminal.size = 15 |
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 UnityEditor; | |
using UnityEngine; | |
public sealed class ExampleClass : EditorWindow | |
{ | |
private static readonly string[] mList = | |
{ | |
"AboutWIndowLicenseLabel" , | |
"AC LeftArrow" , | |
"AC RightArrow" , |
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
LWin::LCtrl | |
; Remap cmd+Tab to Alt+Tab | |
; Media keys | |
RWin & F7::SendInput {Media_Prev} | |
RWin & F8::SendInput {Media_Play_Pause} | |
RWin & F9::SendInput {Media_Next} | |
RWin & F10::SendInput {Volume_Mute} | |
RWin & F11::SendInput {Volume_Down} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
SELECT table_schema "Data Base Name", | |
sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB", | |
sum( data_free )/ 1024 / 1024 "Free Space in MB" | |
FROM information_schema.TABLES | |
GROUP BY table_schema ; |
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 static Task<string> downloadUrl(string url) | |
{ | |
return new Task<string>(() => | |
{ | |
Task<string> task; | |
using (WebClient wc = new WebClient()) | |
{ | |
Console.WriteLine("Start downloading"); | |
task = wc.DownloadStringTaskAsync(url); |
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 System.Diagnostics; | |
using System.Text.RegularExpressions; | |
namespace StringTest | |
{ |
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 tag Regex | |
// with attribute | |
<(\/?\w+)((?:\s+[\w:-]+\s*=?\s*([\"\']?).*?\3)*\s*)\/?> | |
// without attribute | |
<(\/?\w+)(?:\s+[\w:-]+\s*=?\s*([\"\']?).*?\2)*\s*\/?> | |
<\/?(\w+)((\s+[\w:-]+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)\/?> |
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
vector<vector<int> > Solution::permute(vector<int> &A) { | |
vector<vector<int> > listOfPermutations; | |
vector<int> B; | |
// get the first permutation | |
sort(A.begin(), A.end()); | |
// add the first permutation in the list | |
listOfPermutations.push_back(A); | |
int n = A.size(); |
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
/* | |
* main.c | |
* | |
* Created on: May 22, 2015 | |
* Author: khanh | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> |
NewerOlder