Skip to content
Bryan C Guner edited this page May 2, 2021 · 3 revisions

Lambda Student Resource Hub

Disclaimer: this repo is 2GB as of this writing and growing fast.... download at your own discretion.... if you want to download it but don't have the space the icloud storage section located at the top of the deployed website contains the entire contents of this repo as well as bonus materials!

hi2

Table of contents

-build-log

demo

Lambda Resources Website

demo2

Loading Gif:

loading

Contents

  • Platforms
  • Programming Languages
  • Front-End Development
  • Back-End Development
  • Computer Science
  • Big Data
  • Theory
  • Books
  • Editors
  • Gaming
  • Development Environment
  • Entertainment
  • Databases
  • Media
  • Learn
  • Security
  • Content Management Systems
  • Hardware
  • Business
  • Work
  • Networking
  • Decentralized Systems
  • Higher Education
  • Events
  • Testing
  • Miscellaneous
  • Related

WEB DEV RESOURCES:


Platforms)

  • Node.js - Async non-blocking event-driven JavaScript runtime built on Chrome's V8 JavaScript engine.)
  • Frontend Development)
  • iOS - Mobile operating system for Apple phones and tablets.)
  • Android - Mobile operating system developed by Google.)
  • IoT & Hybrid Apps)
  • Electron - Cross-platform native desktop apps using JavaScript/HTML/CSS.)
  • Cordova - JavaScript API for hybrid apps.)
  • React Native - JavaScript framework for writing natively rendering mobile apps for iOS and Android.)
  • Xamarin - Mobile app development IDE, testing, and distribution.)
  • Linux)
    • Containers)
    • eBPF - Virtual machine that allows you to write more efficient and powerful tracing and monitoring for Linux systems.)
    • Arch-based Projects - Linux distributions and projects based on Arch Linux.)
  • macOS - Operating system for Apple's Mac computers.)
  • watchOS - Operating system for the Apple Watch.)
  • JVM)
  • Salesforce)
  • Amazon Web Services)
  • Windows)
  • IPFS - P2P hypermedia protocol.)
  • Fuse - Mobile development tools.)
  • Heroku - Cloud platform as a service.)
  • Raspberry Pi - Credit card-sized computer aimed at teaching kids programming, but capable of a lot more.)
  • Qt - Cross-platform GUI app framework.)
  • WebExtensions - Cross-browser extension system.)
  • RubyMotion - Write cross-platform native apps for iOS, Android, macOS, tvOS, and watchOS in Ruby.)
  • Smart TV - Create apps for different TV platforms.)
  • GNOME - Simple and distraction-free desktop environment for Linux.)
  • KDE - A free software community dedicated to creating an open and user-friendly computing experience.)
  • .NET)
    • Core)
    • Roslyn - Open-source compilers and code analysis APIs for C# and VB.NET languages.)
  • Amazon Alexa - Virtual home assistant.)
  • DigitalOcean - Cloud computing platform designed for developers.)
  • Flutter - Google's mobile SDK for building native iOS and Android apps from a single codebase written in Dart.)
  • Home Assistant - Open source home automation that puts local control and privacy first.)
  • IBM Cloud - Cloud platform for developers and companies.)
  • Firebase - App development platform built on Google Cloud Platform.)
  • Robot Operating System 2.0 - Set of software libraries and tools that help you build robot apps.)
  • Adafruit IO - Visualize and store data from any device.)
  • Cloudflare - CDN, DNS, DDoS protection, and security for your site.)
  • Actions on Google - Developer platform for Google Assistant.)
  • ESP - Low-cost microcontrollers with WiFi and broad IoT applications.)
  • Deno - A secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.)
  • DOS - Operating system for x86-based personal computers that was popular during the 1980s and early 1990s.)
  • Nix - Package manager for Linux and other Unix systems that makes package management reliable and reproducible.) )

Programming Languages)

)

  • JavaScript)
  • Swift - Apple's compiled programming language that is secure, modern, programmer-friendly, and fast.)
  • Python - General-purpose programming language designed for readability.)
    • Asyncio - Asynchronous I/O in Python 3.)
    • Scientific Audio - Scientific research in audio/music.)
    • CircuitPython - A version of Python for microcontrollers.)
    • Data Science - Data analysis and machine learning.)
    • Typing - Optional static typing for Python.)
    • MicroPython - A lean and efficient implementation of Python 3 for microcontrollers.)
  • Rust)
  • Haskell)
  • PureScript)
  • Go)
  • Scala)
    • Scala Native - Optimizing ahead-of-time compiler for Scala based on LLVM.)
  • Ruby)
  • Clojure)
  • ClojureScript)
  • Elixir)
  • Elm)
  • Erlang)
  • Julia - High-level dynamic programming language designed to address the needs of high-performance numerical analysis and computational science.)
  • Lua)
  • C)
  • C/C++ - General-purpose language with a bias toward system programming and embedded, resource-constrained software.)
  • R - Functional programming language and environment for statistical computing and graphics.)
  • D)
  • Common Lisp - Powerful dynamic multiparadigm language that facilitates iterative and interactive development.)
  • Perl)
  • Groovy)
  • Dart)
  • Java - Popular secure object-oriented language designed for flexibility to "write once, run anywhere".)
  • Kotlin)
  • OCaml)
  • ColdFusion)
  • Fortran)
  • PHP - Server-side scripting language.)
  • Pascal)
  • AutoHotkey)
  • AutoIt)
  • Crystal)
  • Frege - Haskell for the JVM.)
  • CMake - Build, test, and package software.)
  • ActionScript 3 - Object-oriented language targeting Adobe AIR.)
  • Eta - Functional programming language for the JVM.)
  • Idris - General purpose pure functional programming language with dependent types influenced by Haskell and ML.)
  • Ada/SPARK - Modern programming language designed for large, long-lived apps where reliability and efficiency are essential.)
  • Q# - Domain-specific programming language used for expressing quantum algorithms.)
  • Imba - Programming language inspired by Ruby and Python and compiles to performant JavaScript.)
  • Vala - Programming language designed to take full advantage of the GLib and GNOME ecosystems, while preserving the speed of C code.)
  • Coq - Formal language and environment for programming and specification which facilitates interactive development of machine-checked proofs.)
  • V - Simple, fast, safe, compiled language for developing maintainable software.) )

Front-End Development)

)

Back-End Development)

)

Computer Science)

)

Big Data)

)

  • Big Data)
  • Public Datasets)
  • Hadoop - Framework for distributed storage and processing of very large data sets.)
  • Data Engineering)
  • Streaming)
  • Apache Spark - Unified engine for large-scale data processing.)
  • Qlik - Business intelligence platform for data visualization, analytics, and reporting apps.)
  • Splunk - Platform for searching, monitoring, and analyzing structured and unstructured machine-generated big data in real-time.) )

Theory)

)

Books)

)

Editors)

)

Gaming)

)

Development Environment)

)

Entertainment)

)

Databases)

)

  • Database)
  • MySQL)
  • SQLAlchemy)
  • InfluxDB)
  • Neo4j)
  • MongoDB - NoSQL database.)
  • RethinkDB)
  • TinkerPop - Graph computing framework.)
  • PostgreSQL - Object-relational database.)
  • CouchDB - Document-oriented NoSQL database.)
  • HBase - Distributed, scalable, big data store.)
  • NoSQL Guides - Help on using non-relational, distributed, open-source, and horizontally scalable databases.)
  • Contexture - Abstracts queries/filters and results/aggregations from different backing data stores like ElasticSearch and MongoDB.)
  • Database Tools - Everything that makes working with databases easier.)
  • Grakn - Logical database to organize large and complex networks of data as one body of knowledge.) )

Media)

)

Learn)

)

Security)

)

Content Management Systems)

)

  • Umbraco)
  • Refinery CMS - Ruby on Rails CMS.)
  • Wagtail - Django CMS focused on flexibility and user experience.)
  • Textpattern - Lightweight PHP-based CMS.)
  • Drupal - Extensible PHP-based CMS.)
  • Craft CMS - Content-first CMS.)
  • Sitecore - .NET digital marketing platform that combines CMS with tools for managing multiple websites.)
  • Silverstripe CMS - PHP MVC framework that serves as a classic or headless CMS.) )

Hardware)

)

Business)

)

Work)

)

Networking)

)

Decentralized Systems)

)

  • Bitcoin - Bitcoin services and tools for software developers.)
  • Ripple - Open source distributed settlement network.)
  • Non-Financial Blockchain - Non-financial blockchain applications.)
  • Mastodon - Open source decentralized microblogging network.)
  • Ethereum - Distributed computing platform for smart contract development.)
  • Blockchain AI - Blockchain projects for artificial intelligence and machine learning.)
  • EOSIO - A decentralized operating system supporting industrial-scale apps.)
  • Corda - Open source blockchain platform designed for business.)
  • Waves - Open source blockchain platform and development toolset for Web 3.0 apps and decentralized solutions.)
  • Substrate - Framework for writing scalable, upgradeable blockchains in Rust.) )

Higher Education)

)

  • Computational Neuroscience - A multidisciplinary science which uses computational approaches to study the nervous system.)
  • Digital History - Computer-aided scientific investigation of history.)
  • Scientific Writing - Distraction-free scientific writing with Markdown, reStructuredText and Jupyter notebooks.) )

Events)

)

Testing)

)

  • Testing - Software testing.)
  • Visual Regression Testing - Ensures changes did not break the functionality or style.)
  • Selenium - Open-source browser automation framework and ecosystem.)
  • Appium - Test automation tool for apps.)
  • TAP - Test Anything Protocol.)
  • JMeter - Load testing and performance measurement tool.)
  • k6 - Open-source, developer-centric performance monitoring and load testing solution.)
  • Playwright - Node.js library to automate Chromium, Firefox and WebKit with a single API.)
  • Quality Assurance Roadmap - How to start & build a career in software testing.) )

Miscellaneous)

)

Related)

)


1-projects/Atomic-Design-Solution-master/dogs/

Table of Contents generated with DocToc

Hi 👋, I'm Bryan


Profile views



Refresh the page for a new joke!

-----------------------------------------------------

  bgoonz

bgoonz

trophy

Top Langs

Languages


                                                                                                                                                                                                                                        |

| Libraries |

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| Frameworks |

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

| Databases |

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

| Testing |

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

| Other |




|


➤ Current Projects:

ReadMe Card ReadMe Card ReadMe Card ReadMe Card

-----------------------------------------------------

Email

-----------------------------------------------------

Phone


➤ Connect with me:

emailfacebooktwitteryoutubeinstagrampinterestlinkedin mediumspotify

-----------------------------------------------------

Blog:

I write articles for:

  • CodeX

  • Analytics Vidhya

  • Star Gazers

  • JavaScript in Plain English

  • Geek Culture

  • Level Up Coding

  • Bryan C Guner's DEV Community Profile

![medium](./medium. PNG)

-----------------------------------------------------

About Me

-----------------------------------------------------

![skills](./skills. PNG)

-----------------------------------------------------

Awesome Made With Love

forthebadgeforthebadge

Website shields.ioAsk Me Anything !GitterPyPI license

MaintenanceAnalyticsOpen Source Love Bash Shell

GitHub followers

JavaScript

React Redux

HTML5 CSS3 Sass

Express NodejsPython Bootstrap

Docker MySQL PostgresQL Git Ruby Material-UI

Languages and Tools:

arduino aws azure babel bash bootstrap cplusplus css3 d3js docker elasticsearch ember express firebase gatsby gcp git heroku html5 javascript jekyll linux matlab mocha mongodb nextjs nodejs photoshop postgresql postman pug puppeteer python react reactnative typescript vagrant webpack xd zapier

A passionate Web Developer, Electrical Engineer, Musician & Producer

i really like music 🎧

What's the most useful business-related book you've ever read?

A Random Walk Down Wall Street

What's your favorite non-business book?

Hitchhiker's Guide To The Galaxy

If money were not an issue, what would you be doing right now?

Designing recording software/hardware and using it

What words of advice would you give your younger self?

Try harder and listen to your parents more (the latter bit of advice would be almost certain to fall on deaf ears lol)

What's the most creative thing you've ever done?

I built a platform that listens to a guitarist's performance and automatically triggers guitar effects at the appropriate time in the song.

Which founders or startups do you most admire?

Is it to basic to say Tesla... I know they're prevalent now but I've been an avid fan since as early as 2012.

What's your super power?

Having really good ideas and forgetting them moments later.

What's the best way for people to get in touch with you?

A text

What aspects of your work are you most passionate about?

Creating things that change my every day life.

What was the most impactful class you took in school?

Modern Physics... almost changed my major after that class... but at the end of the day engineering was a much more fiscally secure avenue.

What's something you wish you had done years earlier?

Learned to code ... and sing

What words of wisdom do you live by?

*Disclaimer: The following wisdom is very cliche ... but... "Be the change that you wish to see in the world."

― Mahatma Gandhi

🤖 My Programming Stats:

bgoonz's wakatime stats

![waka1](https://github.com/bgoonz/bgoonz/blob/master/langs. PNG)

![waka2](https://github.com/bgoonz/bgoonz/blob/master/waka. PNG)

See More

wakatime

github-resume

Resume

➤ Technical Skills­­­

Programming** Languages:** JavaScript ES-6, NodeJS, React, HTML5, CSS3, SCSS, Bash Shell, Excel, SQL, NoSQL, MATLAB, Python, C++
Databases: PostgreSQL, MongoDB
Cloud: Docker, AWS, Google App Engine, Netlify, Digital Ocean, Heroku, Azure Cloud Services
OS: Linux, Windows (WSL), IOS
Agile: GitHub, BitBucket, Jira, Confluence
IDEs: VSCode, Visual Studio, Atom, Code Blocks, Sublime Text 3, Brackets

-----------------------------------------------------

➤ Experience

Relational Concepts: Hallandale Beach, FL March 2020 - Present
Front End Web Developer
  • Responsible for front-end development for a custom real estate application which provides sophisticated and fully customizable filtering to allow investors and real estate professionals to narrow in on exact search targets.
  • Designed mock-up screens, wireframes, and workflows for intuitive user experience.
  • Migrated existing multi-page user experience into singular page interfaces using React components.
  • Participated in every stage of the design from conception through development and iterative improvement.
  • Produced user stories and internal documentation for future site development and maintenance.
  • Implemented modern frameworks including Bootstrap and Font-Awesome to give the site an aesthetic overhaul.
  • Managed all test deployments using a combination of Digital Ocean and Netlify.
  • Produced unit tests using a combination of Mocha and Chai.
  • Injected Google Analytics to capture pertinent usage data to produce an insightful dashboard experience.
Environment: JavaScript, JQuery, React, HTML5 & CSS, Bootstrap, DOJO, Google Cloud, Bash Script
Cembre: Edison, NJ Nov 2019 – Mar 2020
Product Development Engineer
  • Converted client' s product needs into technical specs to be sent to the development team in Italy.
  • Reorganized internal file server structure.
  • Conducted remote / in person system integration and product demonstrations.
  • Presided over internal and end user software trainings in addition to producing the corresponding documentation.
  • Served as the primary point of contact for troubleshooting railroad hardware and software in the North America.
Environment: Excel, AutoCAD, PowerPoint, Word

-----------------------------------------------------

➤ Education

**B. S. Electrical Engineering, TCNJ, ** Ewing NJ 2014 – 2019

Capstone Project – Team Lead

  • Successfully completed and delivered a platform to digitize a guitar signal and perform filtering before executing frequency & time domain analysis to track a current performance against prerecorded performance.
  • Implemented the Dynamic Time Warping algorithm in C++ and Python to autonomously activate or adjust guitar effect at multiple pre-designated section of performance.
Environment: C++, Python, MATLAB, PureData
My Projects
<tr>
  <th>Project Name</th>
  <th>Skills used</th>
  <th>Description</th>
</tr>
<tr>
  <td><a href='https://web-dev-resource-hub.netlify.app/'>Web-Dev-Resource-Hub (blog)</a></td>
  <td>Html, Css, javascript, Python, jQuery,  React,  FireBase,  AWS S3,  Netlify,  Heroku,  NodeJS,  PostgreSQL,  C++,  Web Audio API</td>
  <td>My blog site contains my resource sharing and blog site ... centered mostly on web development and just a bit of audio production / generally nerdy things I find interesting.</td>
</tr>
   <tr>
  <td><a href='https://project-showcase-bgoonz.netlify.app/'>Dynamic Guitar Effects Triggering Using A Modified Dynamic Time Warping Algorithm</a></td>
  <td>C, C++, Python, Java, Pure Data, Matlab</td>
  <td>Successfully completed and delivered a platform to digitize a guitar signal and perform filtering before executing frequency & time domain analysis to track a current performance against prerecorded performance.Implemented the Dynamic Time Warping algorithm in C++ and Python to autonomously activate or adjust guitar effect at multiple pre-designated section of performance.</td>
</tr>
<tr>
  <td><a href="https://trusting-dijkstra-4d3b17.netlify.app/">Data Structures & Algorithms Interactive Learning Site</a></td>
  <td>HTML, CSS, Javascript,  Python,  Java,  jQuery,  Repl.it-Database API</td>
  <td>A interactive and comprehensive guide and learning tool for DataStructures and Algorithms ... concentrated on JS but with some examples in Python,  C++ and Java as well</td>
</tr>
<tr>
  <td><a href='https://mihirbegmusic.netlify.app/'>MihirBeg.com</a></td>
  <td>Html, Css, Javascript,  Bootstrap,  FontAwesome,  jQuery</td>
  <td>A responsive and mobile friendly content promotion site for an Audio Engineer to engage with fans and potential clients</td>
</tr>
<tr>
  <td><a href='https://tetris42.netlify.app/'>Tetris-JS</a></td>
  <td>Html, Css, Javascript</td>
  <td>The classic game of tetris implemented in plain javascipt and styled with a retro-futureistic theme</td>
</tr>
<tr>
  <td><a href="https://githtmlpreview.netlify.app/">Git Html Preview Tool</a></td>
  <td>Git,  Javascript,  CSS3,  HTML5,  Bootstrap,  BitBucket</td>
  <td>Loads HTML using CORS proxy,  then process all links,  frames,  scripts and styles,  and load each of them using CORS proxy,  so they can be evaluated by the browser.</td>
</tr>
<tr>
  <td><a href='https://project-showcase-bgoonz.netlify.app/'>Mini Project Showcase</a></td>
  <td>HTML, HTML5, CSS, CSS3, Javascript, jQuery</td>
  <td>add songs and play music, it also uses to store data in  INDEXEDB Database by which we can play songs, if we not clear the catch then song will remain stored in database.</td>
</tr>



Portfolio:



hr-line


React Repo:

React Repo


Foo

---
hr-line

Edit magical-stallman-ov0d1

hr-line

➤ Codepens (mostly embeded animations)

-----------------------------------------------------

➤ Weekly-Quick-Snips:


Snippet of the Day:

replaceAll

the method string.replaceAll(search, replaceWith) replaces all appearances of search string with replaceWith.

const str = 'this is a JSsnippets example';

const updatedStr = str.replace('example', 'snippet'); // 'this is a  JSsnippets snippet'

The tricky part is that replace method replaces only the very first match of the substring we have passed:

    const str = 'this is a JSsnippets example and examples are great';

const updatedStr = str.replace('example', 'snippet'); //'this is a JSsnippets snippet and examples are great'

In order to go through this, we need to use a global regexp instead:

    const str = 'this is a JSsnippets example and examples are great';

const updatedStr = str.replace(/example/g, 'snippet'); //'this is a JSsnippets snippet and snippets are greatr'

but now we have new friend in town, replaceAll

const str = 'this is a JSsnippets example and examples are great';

const updatedStr = str.replaceAll('example', 'snippet'); //'this is a JSsnippets snippet and snippets are greatr'

Fibonacci in Python:

def fib_iter(n):
    if n == 0:
        return 0
    if n == 1:
        return 1
    p0 = 0
    p1 = 1
    for i in range(n-1):
        next_val = p0 + p1
        p0 = p1
        p1 = next_val
    return next_val
for i in range(10):
    print(f'{i}: {fib_iter(i)}')

Yesterday's Snippet of the day:


def quicksort(l):
    # One of our base cases is an empty list or list with one element
    if len(l) == 0 or len(l) == 1:
        return l
    # If we have a left list, a pivot point and a right list...
    # assigns the return values of the partition() function
    left, pivot, right = partition(l) 
    # Our sorted list looks like left + pivot + right, but sorted.
    # Pivot has to be in brackets to be a list, so python can concatenate all the elements to a single list
    return quicksort(left) + [pivot] + quicksort(right)

print(quicksort([]))

print(quicksort([1]))

print(quicksort([1,2]))

print(quicksort([2,1]))

print(quicksort([2,2]))

print(quicksort([5,3,9,4,8,1,7]))

print(quicksort([1,2,3,4,5,6,7]))

print(quicksort([9,8,7,6,5,4,3,2,1]))

See Older Snippets!

This Week's snippets:


will replace any spaces in file names with an underscore!

 for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done
  ## TAKING IT A STEP FURTHER:
 # Let's do it recursivley:
  function RecurseDirs ()
{
    oldIFS=$IFS
    IFS=$'\n'
    for f in "$@"
    do
  # YOUR CODE HERE!

[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/colored.png)]

   for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done
        if [[ -d "${f}" ]]; then
            cd "${f}"
            RecurseDirs $(ls -1 ".")
            cd ..
        fi
    done
    IFS=$oldIFS
}
RecurseDirs "./"
  

Copy to clipboard jQuerry

Language: Javascript/Jquery

In combination with the script tag : <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> , this snippet will add a copy to clipboard button to all of your embedded blocks.

$(document).ready(function() {
    $('code, pre').append('<span class="command-copy" ><i class="fa fa-clipboard" aria-hidden="true"></i></span>');

    $('code span.command-copy').click(function(e) {
        var text = $(this).parent().text().trim(); //.text();
        var copyHex = document.createElement('input');
        copyHex.value = text
        document.body.appendChild(copyHex);
        copyHex.select();
        document.execCommand('copy');
        console.log(copyHex.value)
        document.body.removeChild(copyHex);
    });

    $('pre span.command-copy').click(function(e) {
        var text = $(this).parent().text().trim();
        var copyHex = document.createElement('input');
        copyHex.value = text
        document.body.appendChild(copyHex);
        copyHex.select();
        document.execCommand('copy');
        console.log(copyHex.value)
        document.body.removeChild(copyHex);
    });
})

Append Files in PWD

//APPEND-DIR.js
const fs = require('fs');
let cat = require('child_process').execSync('cat *').toString('UTF-8');
fs.writeFile('output.md', cat, (err) => {
    if (err) throw err;
});

doesUserFrequentStarbucks.js

const isAppleDevice = /Mac|iPod|iPhone|iPad/.test(navigator.platform);
console.log(isAppleDevice);
// Result: will return true if user is on an Apple device

arr-intersection.js

/*
 function named intersection(firstArr) that takes in an array and
returns a function. 
When the function returned by intersection is invoked
passing in an array (secondArr) it returns a new array containing the elements
common to both firstArr and secondArr.
*/
function intersection(firstArr) {
    return (secondArr) => {
        let common = [];
        for (let i = 0; i < firstArr.length; i++) {
            let el = firstArr[i];
            if (secondArr.indexOf(el) > -1) {
                common.push(el);
            }
        }
        return common;
    };
}
let abc = intersection(["a", "b", "c"]); // returns a function
console.log(abc(["b", "d", "c"])); // returns [ 'b', 'c' ]

let fame = intersection(["f", "a", "m", "e"]); // returns a function
console.log(fame(["a", "f", "z", "b"])); // returns [ 'f', 'a' ]

arr-of-cum-partial-sums.js

/*
First is recurSum(arr, start) which returns the sum of the elements of arr from the index start till the very end.
Second is partrecurSum() that recursively concatenates the required sum into an array and when we reach the end of the array, it returns the concatenated array.
*/
//arr.length -1 = 5 
//                   arr   [    1,    7,    12,   6,    5,    10   ]
//                   ind   [    0     1     2     3     4      5   ]
//                              ↟                              ↟
//                            start                           end

function recurSum(arr, start = 0, sum = 0) {
    if (start < arr.length) {
        return recurSum(arr, start + 1, sum + arr[start]);
    };

    return sum;
}

function rPartSumsArr(arr, partSum = [], start = 0, end = arr.length - 1) {
    if (start <= end) {
        return rPartSumsArr(arr, partSum.concat(recurSum(arr, start)), ++start, end);
    };
    return partSum.reverse();
}

console.log('------------------------------------------------rPartSumArr------------------------------------------------')
console.log('rPartSumsArr(arr)=[ 1, 1, 5, 2, 6, 10 ]: ', rPartSumsArr(arr));
console.log('rPartSumsArr(arr1)=[ 1, 7, 12, 6, 5, 10 ]: ', rPartSumsArr(arr1));
console.log('------------------------------------------------rPartSumArr------------------------------------------------')
/*
------------------------------------------------rPartSumArr------------------------------------------------
rPartSumsArr(arr)=[ 1, 1, 5, 2, 6, 10 ]:  [ 10, 16, 18, 23, 24, 25 ]
rPartSumsArr(arr1)=[ 1, 7, 12, 6, 5, 10 ]:  [ 10, 15, 21, 33, 40, 41 ]
------------------------------------------------rPartSumArr------------------------------------------------
*/

camel2Kabab.js

function camelToKebab(value) {
    return value.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
}

camelCase.js

function camel(str) {
    return str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function(match, index) {
        if (+match === 0) return ""; // or if (/\s+/.test(match)) for white spaces
        return index === 0 ? match.toLowerCase() : match.toUpperCase();
    });
}

concatLinkedLists.js

function addTwoNumbers(l1, l2) {
    let result = new ListNode(0)
    let currentNode = result
    let carryOver = 0
    while (l1 != null || l2 != null) {
        let v1 = 0
        let v2 = 0
        if (l1 != null) v1 = l1.val
        if (l2 != null) v2 = l2.val

        let sum = v1 + v2 + carryOver
        carryOver = Math.floor(sum / 10)
        sum = sum % 10
        currentNode.next = new ListNode(sum)

        currentNode = currentNode.next
        if (l1 != null) l1 = l1.next
        if (l2 != null) l2 = l2.next
    }

    if (carryOver > 0) {
        currentNode.next = new ListNode(carryOver)
    }

    return result.next
};

fast-is-alpha-numeric.js

//Function to test if a character is alpha numeric that is faster than a regular
//expression in JavaScript

let isAlphaNumeric = (char) => {
    char = char.toString();
    let id = char.charCodeAt(0);
    if (
        !(id > 47 && id < 58) && // if not numeric(0-9)
        !(id > 64 && id < 91) && // if not letter(A-Z)
        !(id > 96 && id < 123) // if not letter(a-z)
    ) {
        return false;
    }
    return true;
};

console.log(isAlphaNumeric("A")); //true
console.log(isAlphaNumeric(2)); //true
console.log(isAlphaNumeric("z")); //true
console.log(isAlphaNumeric(" ")); //false
console.log(isAlphaNumeric("!")); //false

find-n-replace.js

function replaceWords(str, before, after) {
    if (/^[A-Z]/.test(before)) {
        after = after[0].toUpperCase() + after.substring(1)
    } else {
        after = after[0].toLowerCase() + after.substring(1)
    }
    return str.replace(before, after)
}
console.log(replaceWords("Let us go to the store", "store", "mall")) //"Let us go to the mall"
console.log(replaceWords("He is Sleeping on the couch", "Sleeping", "sitting")) //"He is Sitting on the couch"
console.log(replaceWords("His name is Tom", "Tom", "john"))
//"His name is John"

flatten-arr.js

/*Simple Function to flatten an array into a single layer */
const flatten = (array) =>
    array.reduce(
        (accum, ele) => accum.concat(Array.isArray(ele) ? flatten(ele) : ele),
        []
    );

isWeekDay.js

const isWeekday = (date) => date.getDay() % 6 !== 0;
console.log(isWeekday(new Date(2021, 0, 11)));
// Result: true (Monday)
console.log(isWeekday(new Date(2021, 0, 10)));
// Result: false (Sunday)

longest-common-prefix.js

function longestCommonPrefix(strs) {
    let prefix = ''
    if (strs.length === 0) return prefix
    for (let i = 0; i < strs[0].length; i++) {
        const character = strs[0][i]
        for (let j = 0; j < strs.length; j++) {
            if (strs[j][i] !== character) return prefix
        }
        prefix = prefix + character
    }
    return prefix
}

-----------------------------------------------------

➤ Github Gists

list-of-my-websites


daft

Clone this wiki locally