Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <cstdlib>
using namespace std;
class Rectangle{
public:
double x,y;
double getArea(){
return x * y;
@BraynStorm
BraynStorm / Zadacha1
Created December 16, 2014 10:48
Zadacha1_Razdel2Test
#include <iostream>
#include <cstdlib>
using namespace std;
class LinearEquasion{
private:
double a,b;
public:
LinearEquasion(){
cout << "Vuvedi a,b: ";
@BraynStorm
BraynStorm / reactor_bot.js
Last active August 29, 2015 14:15
Bot for http://br.sidoh.org/ reactor simulator.
// How much RF/t does the reactor have to make to pass the test basically
var requestedEstimateRFPerTick = 0;
var cellType = [
{ character: 'C', name: 'Gelid Cryotheum'},
{ character: 'E', name: 'Liquid Ender'},
{ character: 'X', name: 'Control Rod' }
];
local reactor;
local turbines = {};
local monitor;
local optimalRPM = 1840
local maxEnergyInBufferAllowed = 900000
local currentRodsLevel = 50
local numOfTurbines = 0
local hotFluidUsed = 0
local maxFuelUsage = 0
local maxCasingTempAllowed = 400
local reactor = peripheral.wrap("right")
local RF_T = 0
local bufferLastSec = 0
while true do
RF_T = (reactor.getEnergyStored() - bufferLastSec)/20
print("Energy Change: "..RF_T.." RF/t")
if reactor.getActive() == true and reactor.getEnergyStored() > 7000000 then
reactor.setActive(false)
end
@BraynStorm
BraynStorm / chatSpam
Last active August 29, 2015 14:18 — forked from anonymous/chatSpam
(function (){
})();
@BraynStorm
BraynStorm / cleverbot.js
Last active August 29, 2015 14:18
CleverBot "API"
function runCleverbot(msg){
$("#stimulus").val(msg).keyup();
setTimeout(function (){
console.log($(".bot").parent().find(":last-child"));
},3000);
}
@BraynStorm
BraynStorm / zadacha1.cpp
Created June 5, 2015 08:42
Bojidar_PK2_zad1.cpp
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <string>
#include <cmath>
using namespace std;
int main(){
ofstream file("zad_1.txt");
@BraynStorm
BraynStorm / zadacha2.cpp
Created June 5, 2015 08:43
Bojidar_PK2_zad2.cpp
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <string>
#include <cmath>
using namespace std;
int main(){
ifstream file("zad_1.txt");
string data = "";
for(int i = 0; i < 5 * 2; i++){
@BraynStorm
BraynStorm / PT3_Razdel 4_ZAD2.cpp
Created June 16, 2015 10:33
Bojidar Stoqnov - PT4 Zadacha 2
#include <iostream>
using namespace std;
class Rect{
public:
double a,b;
Rect(){