Modular reusable code + code examples.
By the awesome community.
Complex Algorithms used by professionals to eliminate failure
easy. No more crashes 👌
Fetch subreddit posts using Dart IO
0 Dart 55
This function returns a Future that eventually resolves to a List of JSON objects. Each JSON object represents a Reddit POST. Here's a quick example usage:
Read HttpClientResponse into a String
0 Dart 55
Simply pass it the HttpClientResponse you get from request.close() and it'd return a Future that eventually resolves to a String. (maybe use await here) This requires a few obvious stuff:
Example HTTP GET request using Dart IO lib
0 Dart 46
This is a minimalistic example of how you can use HttpClient to send an HTTP GET request and read back the response. As you've already guessed, you can do .post instead of .get for a POST request.…
Simple example on WebSocket connection and data rountrip
0 Dart 57
This is a very minimalistic example of using WebSockets in Dart. Note that this uses dart:io and not dart:html, since this code isn't intended to run in a browser or anything.
Random Number Generator Based on Internet Speed
This was made for a Programming Challenges Telegram group. Don't take this seriously.Never use this anywhere.Don't hate me.
Convert binary to decimals
This converts a string of a binary number to a decimal, unsigned integer.
Get Maximum Call Stack Size
It works by exhausting the stack. It's stupid but it works.
Webpack Example Plugin to Write Files
i am only posting this to meme on overcoder but it does have good use case, put it in your plugins part of your webpack config and you can make your html file generate with proper file names if you…
Check if two circles touch or intersect given center and radius
This is an efficient implementation that checks whether two circles, given their radiuses and centers touch/intersect or not. For example, it returns true for all these types of circles: While it…
Example Discord bot with JDA
1 Java 248
This is an example Discord bot built with JDA Java library. You can drop the code in an Example.java file, put a correct API_TOKEN (which you'd get from here), and then compile with JDA added to the…
Get word meaning from Urban Dictionary
This gets the definition of a thing from Urban Dictionary thing. You can use something other than axios but Promises ftw.
Get a random GIF from GIPHY
This function gets a random GIF from GIPHY and returns its URL. You need to sign up as dev for GIPHY and get an API key beforehand. You can getGIF(tags) to add some tags, and you can also use…