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> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <math.h> | |
int qpow(int base, int p){ | |
if (p == 0) return 1; | |
int value = base; | |
for (; p > 1; --p) value *= base; | |
return value; |
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> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <math.h> | |
int qpow(int base, int p){ | |
if (p == 0) return 1; | |
int value = base; | |
for (; p > 1; --p) value *= base; | |
return value; |
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
/** Class representing a 2D vector. (X, Y)*/ | |
export default class Vector2 { | |
constructor(X = 0, Y = 0) { | |
this.X = X | |
this.Y = Y | |
} | |
/** Returns new Vector2 rotated by given angle (in radians) and any point. | |
* @param {Number} rad Angle of rotation given in radians. | |
* @param {Vector2} vector2 Point against which rotation is performed. | |
* @returns {Vector2} |
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
using System; | |
using System.Data; | |
using System.Windows.Forms; | |
namespace Calculator { | |
public partial class Calculator : Form { | |
public Calculator() { | |
InitializeComponent(); | |
KeyPreview = 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
[{ | |
"ID": 1, | |
"Country": "Italy", | |
"Animals": [{ | |
"species": "dog", | |
"name": "Bailey", | |
"age": "5" | |
}, { | |
"species": "dog", | |
"name": "Charlie", |
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
/** Celem funkcji addLanding jest dodanie klas(y) w mom臋cie gdy obiekt staje si臋 widzialny na stronie. | |
* @param {String} selector Selektor element贸w. | |
* @param {String|Array<String>} className Klasa lub klasy kt贸re maj膮 by膰 dodane gdy element staje si臋 widoczny. | |
* @param {Number=} offset Ile pikseli elementu musi by膰 widoczne, domy艣lnie 20. | |
* @returns {void} | |
*/ | |
const addLanding = (selector, className, offset = 20) => { | |
if (!selector) throw "Podaj selektor w innym wypadku u偶ywanie tej funkcji nei ma sensu." | |
if (!className) throw "Podaj nazw臋 klasy w innym wypadku u偶ywanie tej funkcji nei ma sensu." | |
const found = document.querySelectorAll(selector) |
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
/** Class representing a 2D vector. (X, Y)*/ | |
export default class Vector2 { | |
constructor(X = 0, Y = 0) { | |
this.X = X | |
this.Y = Y | |
} | |
/** Returns new Vector2 rotated by given angle (in radians) and any point. | |
* @param {Number} rad Angle of rotation given in radians. | |
* @param {Vector2} vector2 Point against which rotation is performed. |
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
var fs = require("fs"); // const | |
var qs = require("querystring"); // const | |
console.log("Start API"); // unikaj console.log贸w w API tego b臋d膮 u偶ywac ludzie i na tej zadzadnie tworzy膰 interfejsy ty im niczego nie narzucaj tylko wa偶ne informacje typu b艂臋dy mog膮 by膰 wy艣wietlane | |
// proponowa艂 bym 偶eby modu艂 zwraca艂 funkcje tworz膮c膮 serwer albo odrazu utworzony serwer co艣 jak express | |
module.exports = function (req, res) { | |
return { | |
res: res, // mozna zapisac wtedy tylko res | |
req: req, // req: req ==== req nie trzeba tyle pisa膰 | |
ViewLang: function (static, page) { // mozna zapisac poprostu ViewLang(static, page) | |
var data = fs.readdir(static, function (err, files) { // mo偶e fat arrow ? (err, files) => {} |
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> | |
using namespace std; | |
void join(char tab1[], char tab2[], char out[]) { | |
int i = 0, // indesk w tablisy out | |
i1 = 0, // indeks w tablicy 1 | |
i2 = 0; // indeks w tablicy 2 |