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
| // See https://aka.ms/new-console-template for more information | |
| bool result=Contains(new uint[] { 1, 2, 3, 4, 5 }, 3); // true | |
| Console.WriteLine(result); | |
| //Contains(new uint[] { 1, 2, 3, 4, 5 }, -6); // false | |
| //Contains(new uint[] { 1, 2, -5, 4, 5 }, 6); // false | |
| int[] arr=new int[] { 1, 6, 3, 4, 5 }; | |
| //int[] arr=new int[] { 1, -6, 3, 4, 5 }; // throw exception | |
| //string []arr3= new string[] { "1", "2", "3", "4", "5" }; types are not numeric | |
| //ConvertAllMethod<string,uint>(arr3); // throw exception |
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 NanoidDotNet; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace nanoiddeneme | |
| { | |
| internal class Utils |
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
| //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 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
| <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 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 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 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
| <!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 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
| // 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 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
| 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 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
| 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 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 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 | |
| { |
NewerOlder