Posts

Showing posts from May, 2017

Ruby package ranking by category

If you wanted to see what other Ruby gems community is using, be sure to check out this link. It has gems downloads by category :)


https://www.ruby-toolbox.com/

Installing 2.3.3 Ruby + Rails without tears

Image
To install Ruby 2.3.3, you have to install DevKit.

For 32-bit system follow instructions below :-
a) install Ruby 2.3.3 

b) download and unzip DevKit

c) Fire up your command prompt, make sure Ruby is in your PATH. Go to the folder that you unzip DevKit, Execute the following command : - ruby dk.rb init and ruby dk.rb install

d) From the command line, type gem install rails



You're done! :)



For 64-bit, please following instruction below:
a) Download Ruby from here.

b) Download and unzip DevKit.

c) Fire up your command prompt, make sure Ruby is in your PATH. Go to the folder that you unzip DevKit, Execute the following command : - ruby dk.rb init and ruby dk.rb install

d) From the command line, type gem install rails



Some typescript key takeaways

1. A module can only have a single default export. Yes only one. Please don't try to use multiple. There is no workaround.

2. You can export a class / interface like this :-

export = ZipCodeValidator;

3. And import it using 

import zip = require("./ZiCodeValidator");

4. Optional loading

Yes, you can define optional loading but Typescripts does this for you automatically. In nodejs, require.js or system.js, you might have to do it manually.

5. Working with other javascript libraries

This gotta sounds catchy...

6. Generator functions

You can have multiple yield statement like so.

function* generateIt()
{
   yield 1;

  yield 2;

  yield 3;

}

var myvar = generateIt()

To pass a value to your generator function.

let myfunc  = generateIt();
myfunc.next().value;   // return 1










docker remove all process

Best command of the day


docker stop $(docker ps -a -q) docker rm $(docker ps -a -q)

Using R studio with TensorFlow

Check out this link if you're interested to learn more about tensorflow with R studio.

https://rstudio.github.io/tensorflow/

To install it, just type the following command

install.packages('tensorflow')

It also comes with a cool tutorial on MNIST (a tutorial for digit recognition)


Writing your WAMP Server and client in .net using WampSharp

Image
WAMP server basically allows you to use RPC and web socket to talk to your client. Yeap, you can use standard HTTP like GET/POST as long as you defined those on the server.

All rite just to keep things sweet and simple, let see how a simple server code looks like :-





Client code looks like this :-




Run both code on a separate C# console app, and you will get something like below :-