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
#include<iostream> | |
int fibo(int i) { | |
if (i == 1) return 0; | |
if (i == 2) return 1; | |
return fibo(i-1) + fibo(i-2); | |
} | |
// int main(int argc, char *argv[]) { | |
int 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
public class Fibo { | |
static int fibo(int i) { | |
if (i == 1) return 0; | |
if (i == 2) return 1; | |
return fibo(i-1) + fibo(i-2); | |
} | |
public static void main(String[] args) { | |
for (int i=1; i<31; i++) { | |
System.out.println(fibo(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
<?php | |
function fibo($i) { | |
if ($i == 1) return 0; | |
if ($i == 2) return 1; | |
return fibo($i-1) + fibo($i-2); | |
} | |
for ($i=1; $i<31; $i++) { | |
print(fibo($i)."<br>"); | |
// echo(fibo($i)."<br>"); |
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
function fibo(i) { | |
if (i == 1) return 0; | |
if (i == 2) return 1; | |
return fibo(i-1) + fibo(i-2); | |
} | |
for (var i=1; i<31; i++) { | |
document.write(fibo(i) + "<br>"); | |
} |
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 sys | |
import re | |
import requests | |
from bs4 import BeautifulSoup | |
def as_int(tpl): | |
ls = list(tpl) | |
for j in range(len(ls)): | |
if isinstance(ls[j], tuple): |
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
#include <opencv2/opencv.hpp> | |
using namespace std; | |
using namespace cv; | |
int main() { | |
VideoCapture cap(0); | |
if (!cap.isOpened()) { | |
return -1; | |
} |
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
<!DOCTYPE html> | |
<!-- @lb1-sot --> | |
<meta charset="UTF-8"> | |
<style> | |
body { | |
margin: 0 auto; | |
} | |
</style> | |
<div style="text-align: center;"> |
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 hypermedia.net.*; | |
UDP udp; | |
void setup() { | |
udp = new UDP(this, 12345); | |
udp.setBuffer(128); | |
udp.setReceiveHandler("recv"); | |
udp.listen(true); | |
} |
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 hypermedia.net.*; | |
UDP udp; | |
void setup() { | |
udp = new UDP(this, 31416, "127.0.0.1"); | |
udp.setReceiveHandler("recv"); | |
udp.listen(true); | |
} | |
void draw() { |
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
public class Main { | |
public static void main(String[] args) { | |
Pair<Double, Integer> pair = new Pair<>(100d, 100); | |
} | |
static class Pair<L extends Number, R> { | |
private L left; | |
private R right; | |
public Pair(L left, R right) { |