Skip to content

Instantly share code, notes, and snippets.

View typeofweb's full-sized avatar
🛒
https://yournextstore.com

Michał Miszczyszyn typeofweb

🛒
https://yournextstore.com
View GitHub Profile
#include <iostream>
#include <vector>
#include <bitset>
using std::cout;
using std::vector;
using std::bitset;
void generator_lin (unsigned a, unsigned c, unsigned m, unsigned x0) {
vector <unsigned> przedzialy (10, 0);
<?
/*
Template Name: XML Template
*/
$qry = $wpdb->get_results("
SELECT SUBSTR(
CONCAT(
REPLACE(
REPLACE(
REPLACE(
@typeofweb
typeofweb / mn4.cpp
Last active December 17, 2015 00:29 — forked from anonymous/mn4.cpp
#include <iostream>
#include <vector>
using std::cout;
using std::cin;
template <class T>
struct Fun {
const T operator()(T x) { // funkcja
//return -5*x*x*x+8*x*x+3*x-1;
import { iterator } from "std:iteration";
const iterable = {
*[iterator]() {
yield 1;
yield 2;
yield 3;
}
}
/*
*
* Works nicely with the following styles:
* textarea {
* resize: none;
* transition: height 0.1s;
* }
*
* Usage: <textarea autoexpand></textarea>
*/
angular.module('ngDebounce', [])
.factory('$debounce', ['$rootScope', '$browser', '$q', '$exceptionHandler',
function($rootScope, $browser, $q, $exceptionHandler) {
var deferreds = {},
methods = {},
uuid = 0;
function debounce(fn, delay, invokeApply) {
var deferred = $q.defer(),
promise = deferred.promise,
; Michal Miszczyszyn
; program posiadajacy procedure konwertujaca float do double
; na pewno duzo mozna poprawic...
.686
.model flat
public _float2double
.code
function getProperty (prop, obj) {
var p;
var o = obj;
var props = prop.split('.');
while (props.length) {
p = props.shift();
o = o[p];
if (typeof o === 'undefined') {
break;
@typeofweb
typeofweb / labpki.sh
Last active August 29, 2015 13:57 — forked from bananu7/labpki.sh
#####################
# Hasla:
# CA : cakey
# klient : klientkey
# paczka : lab142
#####################
#############################
# RECZNE ZMIANY W KONFIGU
#

Write a program in your favourite programming language to compute the sum of the first N even numbers in the Fibonacci sequence, then display the sum of its digits.

E.g.: Where N = 5, the answer is 17, since:

  1. The Fibonacci sequence is 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, ...;
  2. The first 5 even numbers are 0, 2, 8, 34, and 144;
  3. The sum of these numbers is 188;
  4. The sum of the digits of this answer is 17 (1 + 8 + 8).