tgdwyer / tgdwyer.github.io Goto Github PK
View Code? Open in Web Editor NEWApps and Demos
License: MIT License
Apps and Demos
License: MIT License
Very small issue, but in the architecture image in Levels of Abstraction the sentence describing the address bus appears to trail off.
is this link incorrect? where is it supposed to take you
the one called higher order functions at the top of the functional javascript page
https://github.com/tgdwyer/tgdwyer.github.io/blob/master/_chapters/functionaljavascript.md#L19
In the Computation with Pure Functions section of Functional Javascript the names head
and rest
are used multiple times to refer to different things. They are used in cons
for list elements, they are used as names of the selector functions, and they are used within the definition of the selector functions.
I realise why they are all named similarly but I could forsee this maybe being confusing and hard to follow. Especially since cons lists can be hard to get your head around the first time you see them.
In Functional Javascript Method Chaining section TypeScript type annotations are used and the interface IListNode is referenced. These concepts aren't introduced until the next section, TypeScript Introduction.
I was reading through Levels of Abstraction
and the final sentence just trails off "They provide advantages..." should this sentence be deleted or are there actual advantages we want to highlight.
Hacktoberfest is an event which celebrates open source contributions. By adding the "hacktoberfest" topic/tag to this repository (as explained in more detail here) means that contributors are incentivised to open pull requests, due to potentially being eligible for a free t-shirt or planted tree sponsored by DigitalOcean.
This can push beginners to contribute, and get more experienced folks a reason to not put off contributions.
Full disclosure: I'm interested in a free t-shirt ๐
In section "Generic Types", at https://tgdwyer.github.io/typescript1/#generic-types
function binarySearch1(arr:number[], key:number): number {
function bs(start:number, end:number): number {
if(start > end) return -1;
const mid = Math.floor((start + end) / 2);
if(key > arr[mid]) return bs(mid + 1, end);
if(key < arr[mid]) return bs(start, mid - 1);
return mid;
}
return bs(0,arr.length);
}
const studentsById = [
{id: 123, name: "Harry Smith"},
{id: 125, name: "Cindy Wu"},
]
console.log(binarySearch1(studentsById,"125").name)
This produces the following compilation errors:
bs1.ts:17:27 - error TS2345: Argument of type '{ id: number; name: string; }[]' is not assignable to parameter of type 'number[]'.
Type '{ id: number; name: string; }' is not assignable to type 'number'.
17 console.log(binarySearch1(studentsById,"125").name)
~~~~~~~~~~~~
bs1.ts:17:47 - error TS2339: Property 'name' does not exist on type 'number'.
17 console.log(binarySearch1(studentsById,"125").name)
~~~~
Found 2 errors.
Similar error for the second example.
Furthermore, I am not sure if objects in javascript can be directly compared with <
and >
.
In TypeScript Introducion there is a line ''See here for some tutorials and deeper documentation."". I believe a link is missing here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.