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
<?php | |
function array_delete(array &$array, $elements) { | |
//jeśli parametr $elements jest tablicą kluczy do usunięcia | |
if (is_array($elements)) { | |
//ile elementów do usunięcia | |
$toDelete = count($elements); | |
//ile usunięto poprawnie | |
$deleted = 0; | |
foreach ($elements as $index) { | |
if (unset($array[$index])) $deleted++; |
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
<?php | |
class Collection implements ArrayAccess, Iterator, Countable | |
{ | |
private $_data = array(); | |
private $_strict; | |
protected $_pointer = 0; | |
const SEPARATOR = ':'; | |
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
#!/bin/bash | |
a=$1 | |
b=$2 | |
c=$3 | |
istnieje=false | |
if [ $(($a+$b)) -gt $c ]; then | |
if [ $(($b+$c)) -gt $a ]; then |
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
#!/bin/bash | |
a=$1 | |
b=$2 | |
c=$3 | |
istnieje=true | |
if [ $(($a+$b)) -le $c ]; then | |
echo "Warunek $a + $b > $c nie jest spełniony!" |
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 <iomanip> | |
#include <cmath> | |
using namespace std; | |
struct BST_node | |
{ | |
int data; | |
BST_node * left, * right; |
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 <iomanip> | |
#include <cmath> | |
using namespace std; | |
template <typename T> | |
struct BST_node | |
{ | |
T data; |
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 <iomanip> | |
#include <cstring> | |
#include <sys/stat.h> | |
#include <pwd.h> | |
#include <grp.h> | |
#include <ctime> | |
using namespace std; |
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
#ifndef TIME_UTILITY_TPL_HPP | |
#define TIME_UTILITY_TPL_HPP | |
#include <string> | |
#include <sstream> | |
#include <chrono> | |
#include <ctime> | |
template <typename Clock, int BufSize> | |
std::string format_time(std::chrono::time_point<Clock> timepoint, std::string format, tm * (*func)(const time_t*)) | |
{ |
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 <cstdlib> | |
using namespace std; | |
int main(int argc, char ** argv) | |
{ | |
int n = 0; | |
int silnia = 1; | |
cout << "\tObliczanie silni" << endl; |
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 <cstdlib> | |
using namespace std; | |
int main(int argc, char ** argv) | |
{ | |
int n = 0; | |
int silnia = 1; | |
cout << "\tObliczanie silni" << endl; |
OlderNewer