Skip to content

Instantly share code, notes, and snippets.

View DanielAdeniji's full-sized avatar

Daniel Adeniji DanielAdeniji

View GitHub Profile
@DanielAdeniji
DanielAdeniji / person.txt
Last active June 8, 2022 22:13
person.txt
john smith jsmith@nobody.com los angeles CA 90001
larry summers lsummers@treasury.gov new york-city NY 10001
twilla jacobs tjacobs@cincy.com cincinnati OH 45201
andy johnson ajohnson@yahoo.com miami FL 33101
tanya wilson twilson@gmail.com philadephia PA 19019
@DanielAdeniji
DanielAdeniji / TransactSQLFormatFunction.sql
Created June 16, 2022 15:19
Using Transact SQL Format Function
set nocount on
go
declare @tblPerson table
(
[id] int not null
identity(1,1)
, [name] varchar(200) not null
@DanielAdeniji
DanielAdeniji / DOSBatch.getDrive.cmd
Created July 9, 2022 18:53
DOS - Batch - Get Drive Letter
@echo off
rem Get current drive letter in CMD
rem https://stackoverflow.com/questions/21069787/get-current-drive-letter-in-cmd
setlocal
rem get contextual information
set "_contextualDrive=%cd:~0,2%"
@DanielAdeniji
DanielAdeniji / TransactSQLStringSplitJackAndJill.sql
Created September 11, 2022 02:53
Transact SQL - String Split - Jack and Jill
declare @rhyme varchar(8000)
declare @CHAR_SEPARATOR char(1)
set @rhyme
= 'Jack and Gill went up the hill '
+ 'To fetch a pail of water '
+ 'Jack fell down and broke his crown '
+ 'And Gill came tumbling after.'
set @CHAR_SEPARATOR = ' '
@DanielAdeniji
DanielAdeniji / stringNumberofWordsUsingExtensionMethod.cs
Last active November 14, 2022 18:37
Microsoft - .Net - C# - Get Number of Words Using Extension Classes
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Collections.Generic;
using nsStringExtensions;
enum methodType
{
@DanielAdeniji
DanielAdeniji / rustdatastructurestructprintdebug.failure.rs
Last active November 26, 2022 05:31
Rust - Data Structure - Struct - Print
/*
Specify that structure implements the Debug trait
i.e. we will be able to print structure contents by using {:?} specifier in our print statements
*/
//#[derive(Debug)]
struct Person
{
name: String
, age: u8
}
/*
Specify that structure implements the Debug trait
i.e. we will be able to print structure contents by using {:?} specifier in our print statements
*/
//#[derive(Debug)]
struct Person
{
name: String
, age: u8
}
/*
Specify that structure implements the Debug trait
i.e. we will be able to print structure contents by using {:?} specifier in our print statements
*/
#[derive(Debug)]
struct Person
{
name: String
, age: u8
}
/*
Specify that structure implements the Debug trait
i.e. we will be able to print structure contents by using {:?} specifier in our print statements
*/
#[derive(Debug)]
struct Person
{
name: String
, age: u8
}
use std::fmt::{self, Formatter, Display};
/*
Specify that structure implements the Debug trait
i.e. we will be able to print structure contents by using {:?} specifier in our print statements
*/
//#[derive(Debug)]
struct Person
{