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
//Nice Url Builder for Dotnet. | |
using Flurl; | |
using System.Text; | |
string GetWeatherOfCityUrl(string cityName){ | |
var weather = "https://wttr.in" | |
.AppendPathSegment(cityName) | |
.SetQueryParams(new | |
{ |
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
<html> | |
<head> | |
<title>Splida.js Examples</title> | |
<!--https://splidejs.com--> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.3/dist/css/splide.min.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.3/dist/css/themes/splide-skyblue.min.css"> | |
<script src="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.3/dist/js/splide.min.js"></script> | |
</head> | |
<body> | |
<h1>Hello World</h1> |
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 Speed(){ | |
public void Main(){ | |
Example example=new Example(); | |
example.SpeedValueChanged += delegate (int speed) | |
{ | |
Console.WriteLine("Speed changed: " + speed); | |
}; | |
example.SpeedValueChanged += (int speed)=> |
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> Deneme</title> | |
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" /> | |
<script defer src="https://pyscript.net/alpha/pyscript.js"></script> | |
</head> | |
<body> | |
<h1>Evet</h1> | |
<div id="main_img"></div> |
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
// See https://aka.ms/new-console-template for more information | |
int ?nullable = null; | |
//var a = (int)(nullable + nullable); NUllable object must have a value | |
nullable = 44; | |
var a = (int)(nullable + nullable); //Work fine but it's error prone. |
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
async static Task SpeechSynthesis3(SpeechConfig speechConfig) | |
{ | |
speechConfig.SpeechSynthesisLanguage = "tr-TR"; | |
//speechConfig.SpeechSynthesisVoiceName = "tr-TR-EmelNeural"; | |
var audioConfig=AudioConfig.FromWavFileOutput("uretilen.wav"); | |
using var synthesizer = new SpeechSynthesizer(speechConfig,audioConfig); | |
while (true) | |
{ | |
string speech = Console.ReadLine(); | |
if (speech.ToLower().Contains("sentezi kapat")) break; |
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
async static Task SpeechSynthesis(SpeechConfig speechConfig) | |
{ | |
speechConfig.SpeechSynthesisLanguage = "tr-TR"; | |
speechConfig.SpeechSynthesisVoiceName = "tr-TR-EmelNeural"; | |
using var synthesizer = new SpeechSynthesizer(speechConfig); | |
while (true) | |
{ | |
string speech = Console.ReadLine(); | |
if (speech.ToLower().Contains("sentezi kapat")) break; | |
await synthesizer.SpeakTextAsync(speech); |
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
using Microsoft.CognitiveServices.Speech; | |
using Microsoft.CognitiveServices.Speech.Audio; | |
using NAudio.CoreAudioApi; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Threading.Tasks; | |
class Program | |
{ |
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 string PasswordCleaning(string pass) | |
{ | |
pass=pass.Replace("+", "%2b"); | |
pass = pass.Replace("&", "%26"); | |
pass= pass.Replace("=", "%3D"); | |
pass = pass.Replace("?", "%3F"); | |
pass = pass.Replace(":", "%3A"); | |
pass = pass.Replace(";", "%3B"); | |
pass = pass.Replace("$", "%24"); | |
pass = pass.Replace("@", "%40"); |
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
def shiftcipher_decryptor(cipher_text,shift_amount=3): | |
return shiftcipher_encryptor(cipher_text,-shift_amount) | |
def shiftcipher_encryptor(plain_text,shift_amount=3): | |
shifted=[] | |
for p in plain_text: | |
shifted_chr=chr(ord(p)+shift_amount) | |
shifted.append(shifted_chr) | |
return "".join(shifted) |
NewerOlder