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
package main | |
import "strconv" | |
import "fmt" | |
type Color string | |
type Make string | |
type Model string | |
const ( |
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
package main | |
import "fmt" | |
type Point struct {} | |
func (p *Point) Scale() { | |
fmt.Println("method") | |
} |
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
import java.util.*; | |
public class AscendingSortSpeed { | |
public static void main(String[] args) { | |
int[] data = new int[1_000_000_000]; // 1 BILLION INTS | |
for (int i = 0; i < data.length; i++) { | |
data[i] = i; | |
} | |
// Sort to ascending | |
long start = System.currentTimeMillis(); |
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
#denom = popular_usd_denom = [100_00, 50_00, 20_00, 10_00, 5_00, 1_00, 25, 10, 5, 1] | |
#denom = official_usd_denom = [100_00, 50_00, 20_00, 10_00, 5_00, 2_00, 1_00, 50, 25, 10, 5, 1] | |
#denom = power2_denom = [64_00, 32_00, 16_00, 8_00, 4_00, 2_00, 1_00, 32, 16, 8, 4, 2, 1] | |
denom = power3_denom = [27_00, 9_00, 3_00, 1_00, 27, 9, 3, 1] | |
#denom = power4_denom = [64_00, 16_00, 4_00, 1_00, 64, 16, 4, 1] | |
total_prices = 100_00 | |
needed = Array.new(total_prices, 0) | |
denom_count = denom.size |
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
package main | |
import ( | |
g "github.com/moovweb/gokogiri" | |
"github.com/moovweb/gokogiri/html" | |
. "io/ioutil" | |
"fmt" | |
"os" | |
"strconv" | |
) |
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
package main | |
import ( | |
g "github.com/moovweb/gokogiri" | |
. "io/ioutil" | |
_ "fmt" | |
"os" | |
) | |
func main() { |
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
##### Rails app: config/boot.rb Added by VaskoZ | |
@stats = {} | |
@tp = TracePoint.trace(:a_call) do |tp| | |
@stats[tp.defined_class] ||= {} | |
@stats[tp.defined_class][tp.method_id] ||= 0 | |
@stats[tp.defined_class][tp.method_id] += 1 | |
end | |
@tp.enable | |
##### End VaskoZ changes | |
# Set up gems listed in the Gemfile. |
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
class A { | |
void print() { | |
System.out.println(secret()); | |
} | |
String secret() { | |
return "A"; | |
} | |
static void staticPrint() { | |
System.out.println(staticSecret()); |
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
package main | |
import "fmt" | |
type A struct{} | |
type B struct { | |
A | |
} | |
func (a A) HiThere() { |
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
Puzzle Solved, here is the solution: | |
8 15 11 1 | 6 2 10 14 | 12 7 13 3 | 16 9 4 5 | | |
10 6 3 16 | 12 5 8 4 | 14 15 1 9 | 2 11 7 13 | | |
14 5 9 7 | 11 3 15 13 | 8 2 16 4 | 12 10 1 6 | | |
4 13 2 12 | 1 9 7 16 | 6 10 5 11 | 3 15 8 14 | | |
----------------------------------------------- | |
9 2 6 15 | 14 1 11 7 | 3 5 10 16 | 4 8 13 12 | | |
3 16 12 8 | 2 4 6 9 | 11 14 7 13 | 10 1 5 15 | | |
11 10 5 13 | 8 12 3 15 | 1 9 4 2 | 7 6 14 16 | | |
1 4 7 14 | 13 10 16 5 | 15 6 8 12 | 9 2 3 11 | |