Skip to content

Instantly share code, notes, and snippets.

View gautam1168's full-sized avatar

Gaurav Gautam gautam1168

  • Bengaluru, India
View GitHub Profile
@gautam1168
gautam1168 / add.c
Created February 6, 2023 18:28
Embedding javascript in C++ to measure ticks
typedef unsigned char uint8;
typedef unsigned int uint32;
typedef int int32;
typedef unsigned long long uint64;
int32
add(uint32 *NumbersToSum, int32 Count)
{
int32 Result = 0;
for (int32 i = 0; i < Count; i += 4)
@gautam1168
gautam1168 / angular.md
Created October 30, 2016 08:27
Angular2 notes

#Making components with svg When you need to put svg in templates there are some caveates. Look at this blog

@gautam1168
gautam1168 / Actors.md
Last active September 20, 2016 11:49
Akka with Scala

#What are actors Actors are classes that process messages. Akka provides Actor, that can be subclassed to create actors. All Actor subclasses must define a partial function named receive (defined using the case construct).

Actor objects are containers for State, Behavior, MailBox, Child Actors and Supervisor Strategy. All actors must minimize unnecessary interaction via locks or shared mutable states.

##Actor reference An actor object is always to be referenced using an Actor Reference object. These references can be passed around with impunity.

@gautam1168
gautam1168 / REST.md
Last active September 15, 2016 03:27
Networks

REST is a specification/constraint/guideline for web applications. An application that follows these guidelines is called restful. The guidelines are on wikipedia. In short, they are:

  1. Separation of concerns: Clients handle the UI and user state. Servers store and manage data.
  2. Stateless: Every request from client will have all information relating to user state. The server will not store any information relating to user state.
  3. Cachable: The responses from REST server are cacheble by the browser. If you don't clear cache stale responses will be used.
  4. Layered: The client cannot tell if it is connected to end server or intermediary.
  5. Code on demand: The server can send applets or client side scripts.
  6. Uniform interface: This one has subcategories and I don't understand what they mean.