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 pyftpdlib.handlers import FTPHandler | |
from pyftpdlib.servers import ThreadedFTPServer | |
from pyftpdlib.authorizers import DummyAuthorizer | |
class FtpServer: | |
def start(self): | |
authorizer = DummyAuthorizer() | |
authorizer.add_user('user', '12345', 'C:\\..wathever...\\ftp-public', perm='elradfmwMT') | |
handler = FTPHandler | |
handler.authorizer = authorizer |
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
1.) download your desired jdk version --> https://jdk.java.net/archive/ | |
2.) unzip the and move the jdk folder on the desired place | |
3.) add java/bin/ folder to the PATH env.-variable permamently | |
- open powershell as admin !important | |
- $env:Path+=";C:\_YOUR-DESIRED-JAVA-PATH_\jdk-xx.xx.xx\bin" | |
- [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine) |
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
select elt(( FLOOR(1 + (RAND() * 26)) ),'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'); |
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
dim speachobject | |
set speachobject=createobject("sapi.spvoice") | |
speachobject.speak "corona" |
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 FloatingPointProblem { | |
public static void main(String []args) { | |
float f = 3.1f; | |
double d = 3.1; | |
System.out.println(Float.floatToRawIntBits(f) + "\n"); // 1078355558 | |
System.out.println(Double.doubleToRawLongBits(d) + "\n"); //4614162998222441677 | |
if (d == f) { | |
System.out.println("f == d"); |
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
#pragma once | |
#include <string> | |
#include "IMotoVehicle.h"; | |
using namespace std; | |
class Car: public IMotoVehicle { | |
int doors; | |
public: |
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
<?php | |
$email = '[email protected]'; // when email-domain-part contains umlauts, use the idn format: idn_to_ascii('your-email@example-äöü.com'); | |
$emailLength = mb_strlen($email); | |
$randomFactor = ''; | |
$encodedMail = ''; | |
for ($ix = 0; $ix < $emailLength; $ix++) { | |
$randomFactor .= rand(1, 9); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>fancybox</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css"> |
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
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class RegexExampleNumberOfHits { | |
public static void main(String[] args) { | |
String txt = "dfsd weqwe asdasdw und \nsch\nqschwexs xsdad\nschaber\n\reewwww dxddasdfsf\n\rsch\n\r dfsgfgd bieeewwwww"; | |
// word content | |
Matcher matchSentence = Pattern.compile("sch", Pattern.CASE_INSENSITIVE).matcher(txt); | |
int hits = 0; |
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
<?php | |
function getRandomPassword($passwordLength = 4) { | |
$alphabet = 'abcdefghijklmnopqrstuvwxyz'; | |
$characterCollection = array_merge(str_split($alphabet), str_split(strtoupper($alphabet)), str_split('1234567890'), str_split('!~@#-_+<>[]{}')); | |
$randomPassword = ''; | |
for($i = 0; $i < $passwordLength; $i++) { | |
$randomPassword .= $characterCollection[array_rand($characterCollection)]; | |
} |
NewerOlder