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
echo off | |
REM Replace [[[USER]]] with your local user account name | |
REM Clean Libraries | |
del /Q /S "C:\Users\[[[USER]]]\Contacts\*.*" > nul | |
del /Q /S "C:\Users\[[[USER]]]\Downloads\*.*" > nul | |
del /Q /S "C:\Users\[[[USER]]]\Music\*.*" > nul | |
del /Q /S "C:\Users\[[[USER]]]\Pictures\*.*" > nul | |
del /Q /S "C:\Users\[[[USER]]]\Videos\*.*" > nul |
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
cls | |
# Change the current directory to the System folder | |
cd C:\Windows\System32\ | |
# Display all executable files along with their file description | |
get-childitem * -include *.exe | foreach-object { | |
"{0}, {1}" -f $_.Name, | |
[System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileDescription } |
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
cls | |
$N = 5; | |
# -------------------------------------------------------------------------------- | |
# | |
# FUNCTION NAME: GenerateSet | |
# | |
# DESCRIPTION: Generates a set of N random integers between -9 and 9 | |
# | |
# -------------------------------------------------------------------------------- |
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 System; | |
using System.Collections; | |
namespace BitArrayExample { | |
class Program { | |
static void Main(string[] args) { | |
bool le = BitConverter.IsLittleEndian; | |
if ( le ) { |
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 System; | |
namespace BitTwiddling { | |
class Program { | |
// Compute the minimum of two integers without branching | |
static int Min(int x, int y) { | |
return y + ( ( x - y ) & ( ( x - y ) >> ( sizeof( int ) * 8 - 1 ) ) ); | |
} | |
// Compute the maximum of two integers without branching |
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 System; | |
namespace DelegateExample { | |
class Program { | |
// Declares a delegate for the methods | |
public delegate String myMethodDelegate(); | |
// Defines an instance and static method | |
public class myMethodsClass { |
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 System; | |
using System.Collections.Generic; | |
namespace GenericList { | |
class Program { | |
static void Main(string[] args) { | |
// int is the type argument | |
GenericList<int> list = new GenericList<int>(); | |
for ( int x = 0 ; x < 10 ; x++ ) { |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace GenericListEnumerator { | |
class Program { | |
public class Domain { |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace GenericQueue { | |
class Program { | |
static void Main(string[] args) { | |
// Creates and initializes a new Queue<string>. |
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 System; | |
using System.Collections.Generic; | |
namespace GenericQueueEnumerator { | |
class Program { | |
static void Main(string[] args) { | |
// Initialize a new instance of Queue<string> | |
Queue<string> myQ = new Queue<string>(); |
OlderNewer