Skip to content

Instantly share code, notes, and snippets.

View mirzaevolution's full-sized avatar
🎯
Focusing

Mirza Ghulam Rasyid mirzaevolution

🎯
Focusing
View GitHub Profile
--Select the DB you wish the db login & user to be applied for
USE HelloWebDB
GO
--Create the login
CREATE LOGIN appuser_admin
WITH PASSWORD = '@Underworld30'
GO
--Create user for login
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
public class TaskParallelAsyncSample
{
//Method untuk reverse text. Method ini hanyalah sample untuk demo task dengan nilai kembalian
private string ReverseText(string jobName, int sleepTime, string text)
{
Console.WriteLine($">> {jobName} has started the job");
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
public class TaskParallelSample
{
//Ini adalah method fiksi yang diibaratkan workload yang akan dipanggil oleh invoker
//Method ini mendemokan proses kerja yang lama
private void ExecJob(string jobName, int sleepTime)
{
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace GarudaAPICore.Helpers
{
public class BatchProcess<T>
{
using System;
using System.IO;
using YoutubeExplode;
using YoutubeExplode.Models;
using YoutubeExplode.Models.MediaStreams;
namespace YoutubeDownloader
{
class Program
{
static async void Start(string id)
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using MirzaCryptoHelpers.Common;
using MirzaCryptoHelpers.Hashings;
using MirzaCryptoHelpers.SymmetricCryptos;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace JsonCollection
{
using System;
using System.Net;
using System.Text.RegularExpressions;
public class IPAddressInvoke
{
//Secara default sourceUrl akan mengarah ke http://whatismyip.host/
//Tetapi bisa di-modify karena nilai tersebut hanyalah default parameter.
//Method dibawah menggunakan teknik Asynchronous sehingga apabila return timenya
//lama tidak akan membuat program hang
public async Task<string> GetExternalIPAddress(string sourceUrl = "http://whatismyip.host/")
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
public class IOTraversalHelper
{
public event Action<string> OnLogError;
public IEnumerable<string> TraverseFiles(string path)
{
Queue<string> directories = new Queue<string>();
using System;
using System.IO;
using System.Xml.Serialization;
namespace XmlserializerTest
{
[Serializable] //Attribute yang menandakan bahwa kelas bisa di serialize
public class Employee
{
public Guid ID { get; set; } = Guid.NewGuid();
public string FirstName { get; set; }