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
/// | |
/// Usage listBytes.Sort(new ByteListComparer()); | |
/// | |
public class ByteListComparer : IComparer<IList<byte>> | |
{ | |
public int Compare(IList<byte> x, IList<byte> y) | |
{ | |
int result; | |
for (int index = 0; index < Math.Min(x.Count, y.Count); index++) | |
{ |
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
# Copied from https://www.codeproject.com/Tips/5255878/A-Console-Progress-Bar-in-Csharp | |
using System; | |
namespace CU | |
{ | |
static class ConsoleUtility | |
{ | |
const char _block = '■'; | |
const string _back = "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\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.Collections.Generic; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
namespace CustomRenders | |
{ |
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
import groovy.io.FileType | |
def builds = [] | |
def versions = [] | |
def folder= "" // Define folder where to enumerate | |
def dir = new File(folder) | |
dir.eachFile (FileType.DIRECTORIES) { | |
if (!it.name.startsWith('_')) { | |
// Parse out version number | |
// format of folder is "2020-03-06 v 1.0.0.448 Daily" |
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
// Displays a Jira issue to select | |
import groovy.json.JsonSlurper | |
import hudson.model.* | |
import jenkins.model.* | |
import hudson.AbortException | |
def jiraRoot = "" | |
def jirauserName = "" | |
def jirapassword = "" | |
def searchAPI = "${jiraRoot}/rest/api/2/search?jql" // Use this base URL to perform a JQL search. Make sure to URL encode the search 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Data; | |
using System.Data.SqlClient; | |
namespace DatabaseProject | |
{ |
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 kCura.Relativity.Client.DTOs; | |
using DTOs = kCura.Relativity.Client.DTOs; | |
using Relativity.Services.ServiceProxy; |
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 void serviceInstaller1_AfterInstall(object sender, System.Configuration.Install.InstallEventArgs e) | |
{ | |
try | |
{ | |
RegistryKey servicesKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Services\"); | |
RegistryKey serviceKey = servicesKey.OpenSubKey(serviceInstaller1.ServiceName, true); | |
serviceKey.SetValue("ImagePath", (string)serviceKey.GetValue("ImagePath") + " dispatcher= " + Context.Parameters["dispatcher"]); | |
} | |
catch (System.Exception ex) | |
{ |
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.Data.SQLite; | |
using System.Text; | |
class SQLite { | |
static string connectionFormat = "Data Source={0};Version=3; FailIfMissing=True; Foreign Keys=True;"; | |
static public SQLiteResponse Select(string databasePath, string sql) { | |
string connectionString = String.Format(connectionFormat, databasePath); | |
SQLiteResponse sqliteResponse = new SQLiteResponse(); | |
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.Data.SqlClient; | |
using System.Text; | |
class MSSQLQuery | |
{ | |
#region Public Properties | |
public string Database | |
{ | |
get; | |
set; |
NewerOlder