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
var fileName = process.argv[2];
if (!fileName) {
console.error('No file input!');
return;
}
var Iconv = require('iconv').Iconv;
var fs = require('fs');
if (x == 2)
{
auto y = new List<int>();
}
// latwo taki blok zamienić na fragment, który wykonuje się zawsze,
// poprzez zakomentowanie tylko jednej linijki:
var isPrime = (function () {
var regexp = /^1?$|^(11+?)\1+$/;
return function isPrime(num) {
return !(regexp.test(Array(num + 1).join('1')));
}
}());

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).
@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
#
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;
; Michal Miszczyszyn
; program posiadajacy procedure konwertujaca float do double
; na pewno duzo mozna poprawic...
.686
.model flat
public _float2double
.code
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,
/*
*
* Works nicely with the following styles:
* textarea {
* resize: none;
* transition: height 0.1s;
* }
*
* Usage: <textarea autoexpand></textarea>
*/
import { iterator } from "std:iteration";
const iterable = {
*[iterator]() {
yield 1;
yield 2;
yield 3;
}
}