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
Sub MailMergeFromFile() | |
Dim hf As Integer: hf = FreeFile | |
Dim lines() As String, i As Long | |
Open "c:\users.txt" For Input As #hf | |
lines = Split(Input$(LOF(hf), #hf), vbNewLine) | |
Close #hf | |
For i = 0 To UBound(lines) | |
' MsgBox "Line" & i & "=" & lines(i) |
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
SELECT * FROM sys.objects WHERE name like '%tbl%' |
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; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
using System.Linq; | |
using System.IO; | |
using System.Threading.Tasks; | |
namespace TestTPL | |
{ |
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
namespace System | |
{ | |
public static class DateTimeExt | |
{ | |
public static DateTime ToUnspecified(this DateTime dt) | |
{ | |
return DateTime.SpecifyKind(dt, DateTimeKind.Unspecified); | |
} | |
} | |
} |
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
void Main() | |
{ | |
Console.WriteLine(GetCode("A")); | |
Console.WriteLine(GetCode("Z")); | |
Console.WriteLine(GetCode("AA")); | |
Console.WriteLine(GetCode("AZ")); | |
Console.WriteLine(GetCode("AAA")); | |
} | |
// Define other methods and classes here |
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.Configuration; | |
using System.Reflection; | |
using System.ServiceModel; | |
using log4net; | |
namespace Bobby.Chopra | |
{ | |
static class SomeService |
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
$today = [System.DateTime]::Today.ToString("yyyyMMdd") | |
Import-Csv -Header Column1,Column2 -Delim ',' 'C:\sample.csv' | | |
ForEach { | |
New-Object psobject -Property @{Date=$today;Col1=$_.Column1; Col2=$_.Column2} | |
} | Select-Object Date,Col1,Col2 | Export-Csv -NoTypeInformation 'C:\sample.csv' |
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.Data; | |
using System.Linq; | |
using System.Reflection; | |
namespace ConsoleApplication | |
{ | |
public static class DataTableUtil | |
{ |
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
// DO THIS | |
using (var filestream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) | |
using (var reader = new StreamReader(filestream)) | |
{ | |
records = reader.ReadToEnd(); | |
reader.Close(); | |
} |
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
[ | |
{ | |
"pmu":"Capital Markets", | |
"list":[ | |
{ | |
"fund":"AAA", | |
"strategy":"US Capital Markets" | |
}, | |
{ | |
"fund":"BBB", |