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
// This method demonstrates a pattern for making thread-safe | |
// calls on a Windows Forms control. | |
// | |
// If the calling thread is different from the thread that | |
// created the TextBox control, this method creates a | |
// SetTextCallback and calls itself asynchronously using the | |
// Invoke method. | |
// | |
// If the calling thread is the same as the thread that created |
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
// | |
// | |
// Ftp File Helper | |
// | |
// | |
//Funktionen: | |
//CheckConnection | |
//UploadFile | |
//GetFileList | |
//DownloadFile |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var process = Process.GetCurrentProcess(); | |
process.PriorityClass = ProcessPriorityClass.RealTime; | |
for (int i = 0; i < 8; i++) | |
{ | |
var thread = new Thread(() => | |
{ |
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
long rueckgabe = new Ping().Send(target).RoundtripTime; |
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
OpenFileDialog openFileDialog1 = new OpenFileDialog(); | |
openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"; | |
if (openFileDialog1.ShowDialog() == DialogResult.OK) | |
{ return (openFileDialog1.FileName.ToString()); } | |
else { return "Ungültiger Dateipfad !"; } |
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 Random _rnd = new Random(); | |
public static string Generate(string pattern) | |
{ | |
string text = string.Empty; | |
string[] array = new string[]{"a","e","i","o","u"}; | |
string[] array2 = new string[]{"b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"}; | |
string[] array3 = new string[]{"0","1","2","3","4","5","6","7","8","9"}; | |
char[] p = pattern.ToCharArray(); | |
for (int i = 0; i < p.Length; i++){if (p[i] == 'c'){text += array2[_rnd.Next(array2.Length)];}if (p[i] == 'v'){text += array[_rnd.Next(array.Length)];}if (p[i] == 'n'){text += array3[_rnd.Next(array3.Length)];}} | |
return text; |
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
/*Regex Tester: version=1.4.2.0 | |
---------------------------------------- | |
REGEX MODE: Match | |
REGEX OPTIONS: Singleline | |
INPUT REGEX: ^[\w-\._\+%]+@(?:[\w-]+\.)+[\w]{2,6}$ | |
INPUT FORMAT: | |
-----INPUT TEXT----------------------------------- | |
[email protected] | |
-----OUTPUT TEXT-----------------------------------*/ | |
string pattern = @"^[\w-\._\+%]+@(?:[\w-]+\.)+[\w]{2,6}$"; |
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 (StreamReader reader = new StreamReader(filePathLoadedData, true)) | |
{ | |
string line; | |
int counter = 1; | |
while ((line = reader.ReadLine()) != null) | |
{ | |
try | |
{ | |
string domain = "";string user = "";string pass = ""; | |
string[] readed;line = line.Remove(0, 6);string[] tmp_extracted_domain = line.Split(':'); |
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 BackgroundWorker[] Workers; | |
private int MaxWorkers = 10; | |
private Queue<string> Clients = new Queue<string>(); | |
private void _StartNewClient(BackgroundWorker bw) | |
{ | |
if (Clients.Count > 0) | |
{ | |
string md5nummer = Clients.Dequeue(); |
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
FOR /D %%i IN (%1) | |
DO "c:\Program Files (x86)\7-Zip\7z.exe" a "%%i.zip" "%%i\" |