Skip to content

Instantly share code, notes, and snippets.

View DanielAdeniji's full-sized avatar

Daniel Adeniji DanielAdeniji

View GitHub Profile
CREATE GLOBAL TEMPORARY TABLE friendBook
(
friendName VARCHAR2(100) NOT NULL
, dateMet DATE NOT NULL
)
ON COMMIT PRESERVE ROWS;
/*
Truncate Table
*/
struct Person
{
name: String
, age: u8
}
fn main()
{
// Create struct with field init shorthand
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
{
/*
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
}
@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
}
@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 / 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 / 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%"