V | E | V + E | Time | Space |
---|---|---|---|---|
100 | 100 | 200 | 2 | 301832 |
1000 | 1000 | 2000 | 5 | 346624 |
10000 | 15000 | 25000 | 22 | 788248 |
100000 | 150000 | 250000 | 118 | 5198408 |
500000 | 550000 | 1050000 | 1808 | 24797504 |
1000000 | 1100000 | 2100000 | 3624 | 49297504 |
2000000 | 2500000 | 4500000 | 9438 | 98298272 |
3000000 | 3000000 | 6000000 | 10022 | 147298544 |
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
#ifndef __BENEFICIARY_H__ | |
#define __BENEFICIARY_H__ | |
// Abstarct class | |
class Beneficiary { | |
public: | |
Beneficiary() { } | |
virtual int totalHelpRecieved() = 0; | |
virtual void addHelpRecieved(int value) = 0; |
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 poof.core; | |
import java.util.HashMap; | |
public class Directory extends FileSystemEntitiy { | |
/** | |
* | |
*/ | |
private static final long serialVersionUID = -1968533951935404039L; |
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
private static void run() | |
{ | |
ProcessStartInfo pstartInfo = new ProcessStartInfo(); | |
pstartInfo.FileName = @"C:\Program Files (x86)\Livestreamer\livestreamer.exe"; | |
pstartInfo.Arguments = "rtmp://eumedia1.livecoding.tv:1935/livecodingtv/kitty_cent?t=6812FAC8CF464F2D8340D7FCA92AA033 worst --stdout --stream-timeout 120"; | |
pstartInfo.UseShellExecute = false; | |
pstartInfo.RedirectStandardOutput = true; | |
Process p = new Process(); | |
p.StartInfo = pstartInfo; |
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] | |
name = "helloworldlib" | |
version = "0.1.0" | |
authors = ["ILUXONCHIK <iluxon4ik@hotmail.com>"] | |
[lib] | |
name = "helloworldlib" | |
crate-type = ["dylib"] |
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
#!/usr/bin/env python3 | |
import sys | |
from collections import defaultdict | |
def count_names(): | |
names = defaultdict(int) | |
for name in sys.stdin.readlines(): | |
name = name.strip() | |
names[name] += 1 | |
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
/* | |
Regex that checks if a number is prime in Swift 2. | |
From blog post "Demystifying The Regular Expression That Checks If A Number Is Prime" | |
at https://iluxonchik.github.io/regular-expression-check-if-number-is-prime/ | |
Submitted by Russel: https://disqus.com/by/disqus_527bF1C8Ck/ | |
*/ | |
func isPrime(n: Int) -> Bool { | |
do { | |
return try NSRegularExpression( |
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
05-16 09:08:31.636 26919-26919/pt.ulisboa.tecnico.cmov.locmess E/ActivityThread: Activity pt.ulisboa.tecnico.cmov.locmess.main.MainMenuActivity has leaked IntentReceiver pt.ulisboa.tecnico.cmov.locmess.WifiDirect.SimWifiP2pBroadcastReceiver@6ee446 that was originally registered here. Are you missing a call to unregisterReceiver()? | |
android.app.IntentReceiverLeaked: Activity pt.ulisboa.tecnico.cmov.locmess.main.MainMenuActivity has leaked IntentReceiver pt.ulisboa.tecnico.cmov.locmess.WifiDirect.SimWifiP2pBroadcastReceiver@6ee446 that was originally registered here. Are you missing a call to unregisterReceiver()? | |
at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:1159) | |
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:946) | |
I hereby claim:
- I am iluxonchik on github.
- I am iluxonchik (https://keybase.io/iluxonchik) on keybase.
- I have a public key ASA61SRDsPmx6oIBndQPesiolIoXVyCrLDBGd3SPXlCMZAo
To claim this, I am signing this object:
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
findWSS <- function(data) { | |
print(paste("[TRACER] Finding WSS..")) | |
start <- Sys.time() | |
wss <- (nrow(data)-1)*sum(apply(data,2,var)) | |
for (i in 2:length(unique(data))) { | |
wss[i] <- sum(kmeans(data, centers=i)$withinss) | |
} | |
plot(1:length(unique(data)), wss, type="b", xlab="Number of Clusters", ylab="Within groups sum of squares") |