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
// 0 1 1 2 3 5 8 13 21 34 | |
function fibValue(index) { | |
let [prev, next] = [0, 1] | |
if (index < 2) { | |
return index | |
} | |
for (var x = 2; x < index; x++) { | |
const result = prev + next |
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
$(<file element name>).on('change',function(){ | |
var filename = $('#uploadname').val() | |
var data = new FormData() | |
var thisElement = $(this) | |
$.each(thisElement[0].files, function(i, file) { | |
data.append('file', file) | |
}) | |
$('.loadingOverlay').show() //TOTALLY OPTIONAL, Just an overlay element I call for the form. | |
$.ajax({ | |
xhr: function(){ //TOTALLY OPTIONAL, I just needed this for the progress bar display, you can use it or not. |
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
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
(function (global){ | |
/*! https://mths.be/punycode v1.3.2 by @mathias */ | |
;(function(root) { | |
/** Detect free variables */ | |
var freeExports = typeof exports == 'object' && exports && | |
!exports.nodeType && exports; | |
var freeModule = typeof module == 'object' && module && | |
!module.nodeType && module; |