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 <cmath> | |
#include <SFML/Graphics.hpp> | |
void CenterOrigin(sf::Sprite* sprite) { | |
sf::FloatRect bounds = sprite->getLocalBounds(); | |
sprite->setOrigin( | |
std::floor( bounds.left + bounds.width / 2.0f ), | |
std::floor( bounds.top + bounds.height / 2.0f ) |
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> | |
template<typename T> | |
class EvilClass { | |
public: | |
virtual void DoSomething( T param ) { | |
std::cout << "I've done something\n"; | |
} | |
}; |
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
:AppRunner: Total Panda3D disk space used: 0 MB | |
:util: Reading /home/montreal/Grimfang Studios/The Traveling Fox/The Traveling Fox.prc | |
:02-16-2016 22:47:31 ShowBase: Default graphics pipe is glxGraphicsPipe (OpenGL). | |
:02-16-2016 22:47:31 ShowBase: Successfully opened window of type glxGraphicsWindow (OpenGL) | |
:02-16-2016 22:47:31 ShowBase: __dev__ == False | |
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave | |
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear | |
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe | |
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side | |
ALSA lib pcm_route.c:942:(snd_pcm_route_determine_ttable) Invalid slave channel: FL |
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 <stack> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
enum operation_type |
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
>>> v = [] | |
>>> v.append(Vector((3,0,0))) | |
>>> v.append(Vector((0,3,0))) | |
>>> v.append(Vector((0,0,3))) | |
>>> | |
>>> f = [[0,1,2]] | |
>>> m = D.meshes.new("mm") | |
>>> m.from_pydata(v, [], f) | |
>>> o = D.objects.new("mm", m) | |
>>> C.scene.objects.link(o) |
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 <algorithm> | |
#include <ctime> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <vector> | |
#include "fft.h" |
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
--------------------------- | |
Schonhage Stassen Algorithm | |
Testing on trivial cases | |
--------------------------- | |
1. 100 | |
Time elapsed: 0.074 ms | |
2. 123 | |
Time elapsed: 0.071 ms |
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
4 8 6 1 88 | |
4 64 8 42 1 | |
5 0 -5 8 4 | |
8 5 55 45 88 | |
algebraic complement of the element0 0 | |
error, there is no such element | |
4 8 6 1 88 | |
4 64 8 42 1 | |
5 0 -5 8 4 | |
8 5 55 45 88 |
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
struct Point { | |
Point() { | |
x = 0; | |
y = 0; | |
} | |
Point(double new_x, double new_y) { | |
x = new_x; | |
y = new_y; | |
} | |
double x, 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
INSERT INTO nay_computatuon(n_computation, d_computation, n_tariff, n_info_hot, n_info_cold, n_pay, n_sum_hot, n_sum_cold, n_client, n_total, n_debt, n_difference_hot, n_difference_cold) | |
VALUES ( | |
SELECT DISTINCT nay_computation.d_computation, 21 AS n_tariff, ( | |
SELECT round(avg(n_info_hot), 0) | |
FROM nay_computation | |
) AS info_hot,( | |
SELECT round(avg(n_info_cold), 0) | |
FROM nay_computation | |
) AS info_cold, ( | |
SELECT round(avg(n_pay),0) |