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 com.cmdapp; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: Andrew | |
* Date: 10/1/13 | |
* Time: 5:02 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
public enum Commands { |
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 com.producer; | |
import java.util.Random; | |
public class Application { | |
public static void main(String[] args) { | |
FIFOBuffer<String> fifoBuffer = new FIFOBuffer<>(10); | |
Consumer<String> stringConsumer; |
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
//Java pass-by-value | |
public void foo(Dog d) { | |
d.getName().equals("Max"); // true | |
d = new Dog("Fifi"); | |
d.getName().equals("Fifi"); // true | |
} | |
Dog aDog = new Dog("Max"); | |
foo(aDog); | |
aDog.getName().equals("Max"); // 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
#include "Wifi.h" | |
#include "Arduino.h" | |
//Wifi beallitas | |
void Wifi::init() { | |
char buf[256]; | |
Serial1.begin(9600); | |
Serial1.setTimeout(250); | |
Serial.println("WIFI: Command mode ON"); |
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
module shr_4( | |
input clk, | |
input ce, | |
input rst, | |
output [3:0] out | |
); | |
reg [3:0] shr; | |
assign out = shr; |
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
module rategen( | |
input clk, | |
input rst, | |
output cy | |
); | |
reg [25:0] cntr; | |
assign cy = (cntr == 4); | |
//assign cy = (cntr == 49999999); |
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
//Process started | |
reg started; | |
////////////// | |
// States | |
// 0: load | |
// 1: start bit | |
// 2..8: data | |
// 9: parity bit | |
// 10..11: stop bits |
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> | |
#include <thread> | |
#include <ctime> | |
using namespace std; | |
void calc(unsigned long iterations) { | |
unsigned long n = 0; | |
for (unsigned long i = 0; i < iterations; i++) { | |
n = n + n * (i % 5); |
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 <stdio.h> | |
/* The struct of the rectangles */ | |
typedef struct { | |
float x; | |
float y; | |
float width; | |
float height; | |
char* fill; |
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
[{id:1,name:'Bulbasaur'}, | |
{id:2,name:'Ivysaur'}, | |
{id:3,name:'Venusaur'}, | |
{id:4,name:'Charmander'}, | |
{id:5,name:'Charmeleon'}, | |
{id:6,name:'Charizard'}, | |
{id:7,name:'Squirtle'}, | |
{id:8,name:'Wartortle'}, | |
{id:9,name:'Blastoise'}, | |
{id:10,name:'Caterpie'}, |