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
#include <boost/shared_ptr.hpp> | |
#include <boost/make_shared.hpp> | |
#include <boost/thread.hpp> | |
#include <boost/bind.hpp> | |
#include <boost/asio.hpp> | |
#include <boost/move/move.hpp> | |
#include <iostream> | |
#include <unistd.h> | |
namespace asio = boost::asio; |
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
#include <iostream> | |
#include <algorithm> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
string str; | |
getline(cin, str); |
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
#include <iostream> | |
#include <math.h> | |
#include <conio.h> | |
#include <iomanip> | |
#include <fstream> | |
#include <stdlib.h> | |
using namespace std; | |
double f(double x, double y) | |
{ |
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
DOMAINS | |
nflight=integer | |
time=real | |
destination=symbol | |
chast=symbol | |
PREDICATES | |
nondeterm flight(integer,real,symbol,symbol) | |
CLAUSES | |
flight(10000,7.30,"Moskow","every day"). | |
flight(1005,9.30,"Paris","in one day"). |
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
#include "stdafx.h" | |
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
double func(double x) | |
{ | |
return pow(x,3.0)-0.2*x*x+0.5*x-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
#include <ctime> | |
#include <cstdlib> | |
#include <iostream> | |
#include <string> | |
#include <stack> | |
bool isOpenBracket(char symbol) { | |
return symbol == '(' || symbol == '{' || symbol == '['; | |
} |
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
Test |
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
#include <iostream> | |
#include <cstdio> | |
#include <fstream> | |
#include <vector> | |
#include <conio.h> | |
int main() | |
{ | |
// prepare file | |
std::ofstream("d:/test.txt") << 1 << ' ' << 2 << '\n'; | |
std::FILE* f; |
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
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <algorithm> | |
#include <string> | |
#include <conio.h> | |
using namespace std; | |
int main(int argc, char *argv[]) { |
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
void SummonColorballs(uint8 quantity) | |
{ | |
// ToCCommonLoc[1]: {563.672974f, 139.571f, 393.837006f, 0} | |
float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f; | |
float y = y0; | |
for (uint8 i = 0; i < quantity; i++) | |
{ | |
float x = float(urand(uint32(x0 - r), uint32(x0 + r))); | |
if (urand(0, 1)) | |
y = y0 + sqrt(pow(r, 2) - pow((x-x0), 2)); |
NewerOlder