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
static void CreateFileAssociations() | |
{ | |
/***********************************/ | |
/**** Key1: Create ".cy" entry ****/ | |
/***********************************/ | |
Microsoft.Win32.RegistryKey key1 = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software", true); | |
key1.CreateSubKey("Classes"); | |
key1 = key1.OpenSubKey("Classes", true); |
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 DTE _dte; | |
private NAME(Package package) | |
{ | |
// ... | |
_dte = (DTE) ServiceProvider.GetService(typeof(DTE)); | |
// ... | |
} | |
private static string GetDocumentText(Document document) |
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 <Windows.h> | |
inline BOOL WindowTransparency(HWND hwnd, BYTE bAlpha) | |
{ | |
SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED); | |
SetLayeredWindowAttributes(hwnd, RGB(255, 255, 255), bAlpha, 2); | |
return true; | |
} | |
inline VOID SetTransparency(int transparency) |
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
stages: | |
- build | |
job: | |
stage: build | |
script: | |
- echo "Release build..." | |
- C:\Qt\5.7\mingw53_32\bin\qtenv2_gitlab.bat | |
tags: | |
except: |
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
HashMap<String,String> morseCodes = new HashMap<String,String>() {{ | |
put("A", ".-"); | |
put("B", "-..."); | |
put("C", "-.-."); | |
put("D", "-.."); | |
put("E", "."); | |
put("F", "..-."); | |
put("G", "--."); | |
put("H", "...."); | |
put("I", ".."); |
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 object ExecuteMethod(string asm, string stype, string smethod, BindingFlags flags, object[] arguments) | |
{ | |
Assembly assembly = Assembly.LoadFile(asm); | |
Type type = assembly.GetType(stype); | |
MethodInfo method = type.GetMethod(smethod, flags); | |
return method.Invoke(null, arguments); | |
// Usage: (int)ExecuteMethod("test.dll", "Namespace.Class", "CalculateTwoInts", BindingFlags.Static | BindingFlags.Public, new object[] {1,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
private static List<string[]> GetReferences(ModuleDef module) | |
{ | |
var typeSet = new HashSet<string>(); | |
foreach (var type in module.Types) | |
{ | |
typeSet.Add(type.Name); | |
} | |
var refs = (from type in module.Types from method in type.Methods where method.HasBody from instruction in method.Body.Instructions where instruction.OpCode == OpCodes.Call from set in typeSet where type.Name != set where instruction.Operand.ToString().Contains(set) select new string[] {type.Name, set}).ToList(); | |
return refs.GroupBy(strArr => string.Join("|", strArr)) | |
.Select(g => g.First()) |
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 spans = document.getElementsByTagName('SPAN'); | |
var names = []; | |
for(var i = 0; i < spans.length; i++) { | |
if(spans[i].className.indexOf('glyphicon') !== -1) { | |
names.push(spans[i].className.split(' ').pop()); | |
} | |
} |
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 svg = document.getElementsByTagName('LI'); | |
var names = []; | |
for(var i = 0; i < svg.length; i++) { | |
names.push(svg[i].getAttribute('data-name')); | |
} |
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 devIcons = document.getElementsByClassName('devicons'); | |
var icons = []; | |
for(var i = 0; i < devIcons.length; i++) { | |
if(i%5 === 0) { | |
icons.push(devIcons[i].className.split(' ').pop()); | |
} | |
} |
OlderNewer