This file contains 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
function Get-DirectoryContent { | |
<# | |
.SYNOPSIS | |
Function to get directory content | |
.EXAMPLE | |
Get-DirectoryContent -Path "C:\" -HeaderName "poshserver.net" -RequestURL "http://poshserver.net" -SubfolderName "/" | |
This file contains 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
// Demo: http://jsfiddle.net/xuyp8qb5/ | |
// Note: You need Google Map API Key to run demo; bit.ly/2pBgToW | |
var latlng; | |
latlng = new google.maps.LatLng(40.730885, -73.997383); // New York, US | |
//latlng = new google.maps.LatLng(37.990849233935194, 23.738339349999933); // Athens, GR | |
//latlng = new google.maps.LatLng(48.8567, 2.3508); // Paris, FR | |
//latlng = new google.maps.LatLng(47.98247572667902, -102.49018710000001); // New Town, US | |
//latlng = new google.maps.LatLng(35.44448406385493, 50.99001635390618); // Parand, Tehran, IR | |
//latlng = new google.maps.LatLng(34.66431108560504, 50.89113940078118); // Saveh, Markazi, IR |
This file contains 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
' Source: http://www.iwebthereforeiam.com/iwebthereforeiam/2004/06/excel-vba-code-to-convert-coll.html | |
Function collectionToArray(c As Collection) As Variant() | |
Dim a() As Variant: ReDim a(0 To c.Count - 1) | |
Dim i As Integer | |
For i = 1 To c.Count | |
a(i - 1) = c.Item(i) | |
Next | |
collectionToArray = a | |
End Function |
This file contains 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
public List<T> Query<T>(string query) where T:new() | |
{ | |
List<T> res = new List<T>(); | |
MySqlCommand q = new MySqlCommand(query, this.db); | |
MySqlDataReader r = q.ExecuteReader(); | |
while (r.Read()) | |
{ | |
T t = new T(); | |
for (int inc = 0; inc < r.FieldCount; inc++) |
This file contains 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
New-Module -ScriptBlock { | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null | |
$form = New-Object System.Windows.Forms.Form | |
$grid = New-Object System.Windows.Forms.PropertyGrid | |
$grid.Dock = [System.Windows.Forms.DockStyle]::Fill | |
$button = New-Object System.Windows.Forms.Button | |
$button.Text = "OK" | |
$button.Dock = [System.Windows.Forms.DockStyle]::Bottom |