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
#ODB Files Location | |
$binFolder = "C:\Projects\.net 2.0\build\bin" | |
$gacFolder = "%SYSTEMROOT%\Assembly\GAC_MSIL" | |
set-location $binFolder | |
$pdbfiles = get-childitem | where {$_.name.EndsWith("pdb")} | |
foreach ($pdb in $pdbfiles) | |
{ | |
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
/ Convert IPv4 range into CIDR | |
func iPv4RangeToCIDRRange(ipStart string, ipEnd string) (cidrs []string, err error) { | |
cidr2mask := []uint32{ | |
0x00000000, 0x80000000, 0xC0000000, | |
0xE0000000, 0xF0000000, 0xF8000000, | |
0xFC000000, 0xFE000000, 0xFF000000, | |
0xFF800000, 0xFFC00000, 0xFFE00000, | |
0xFFF00000, 0xFFF80000, 0xFFFC0000, | |
0xFFFE0000, 0xFFFF0000, 0xFFFF8000, |
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
// Convert CIDR to IPv4 range | |
func CIDRRangeToIPv4Range(cidrs []string) (ipStart string, ipEnd string, err error) { | |
var ip uint32 // ip address | |
var ipS uint32 // Start IP address range | |
var ipE uint32 // End IP address range | |
for _, CIDR := range cidrs { |
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
// Following implemetation of Stack tie each element to it parent | |
type stackElement struct { | |
data interface{} | |
next *stackElement | |
} | |
type Stack struct { | |
Size int32 | |
head *stackElement |
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
package Helpers | |
import ( | |
"testing" | |
) | |
type Node struct { | |
data interface{} | |
prev *Node | |
} |
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
b := []byte("9856743210") | |
fmt.Println("Before:", string(b)) | |
sort.Slice(b, func(i, j int) bool { | |
return b[i] < b[j] | |
}) | |
fmt.Println("After:", string(b)) |
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
package Helpers | |
type Queue struct { | |
q []int32 | |
} | |
func (q *Queue) push(v int32) { | |
q.q = append(q.q, v) | |
} |
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
package DataStuctures | |
import ( | |
"testing" | |
) | |
type MinHeap struct { | |
heap []int32 | |
} |
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
package DataStuctures | |
import ( | |
"testing" | |
) | |
type MaxHeap struct { | |
heap []int | |
} |
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
package Google | |
import "testing" | |
// Find max number of connected colors in grid | |
// https://proglib.io/p/google-interview-task/?fbclid=IwAR2PXn_XqXQx97U3FLSFssVfDa1-m2P-T3yAJELEJoOWpNfcQjfyesOegpY | |
type si struct { | |
r int | |
c int |
OlderNewer