BWPhotoContest : Theme #animals - First Entry
September 28, 2017#
#

#
#
Written by Coding Defined who lives and works in India building useful things. You should follow him on Twitter
#
#
 ______________ **Edit:** **When you are reading that, and you don't have made a comment then I have to tell you that it is too late. This Giveaway is closed. The winner will be announced very soon. But hey, keep in touch with me because in the future there will be more giveaways. It would a joy to see you there. :) So stay tuned!** ____________ Hey, guys, I hope you are doing all well. Today I want to make my first giveaway. The last days I was thinking about a giveaway or making a contest. I looked at many contests here how other people are doing it, and I also got some ideas for it. But maybe for the beginning a bit too complicated. So I wanted to make something simple, really simple. ____________ You know that there many celebration posts when someone reaches a new follower milestone. It didn't come in my mind to make also a giveaway for my followers, because like I said in my short series "Understand the Steemit Game," it's not about followers more about fans, the quality of your followers matters. But then I read an interesting Post here; I can't take my followers for granted. I know that but it was not present like it should be. It was a reminder for me. So I want to give something back with this giveaway.  What can you win? In total, 75 SBD is in my Pool. But not one person will win all. **There will be three winners!** Yes, three guys will get 25 SBD! _________ So what you have to do? Simple: ________ **1.) You have to be one of my followers. Like I said this is a giveaway for my followers.** **2.) Resteem this Post.** **3.) Write in the comment: "I am in!" Then I know that you want to join in this giveaway.** _________ Then I will put all names into a random generator. The first three names will win the SBD. Of course, I will mention the winners in a new Post. That's it :) simple isn't it? I hope you will enjoy it :) ___________ [](https://steemit.com/@modernpastor) **Thanks for reading.**
###
#
#
If you are in the Discord App you might have seen a lot of Bot around whether its Banjo, Tatsumaki etc. You might be wondering how these bots got there, the answer is to write an application and run it on your local server or a public server to make it active. In this post, we will learn how to create a discord bot using Node.js. ## Little about Node.js If you are not familiar with Node.js, then its very easy to get started with Node.js as there are so many articles out there on web to get you started. One such article I have written on my blog [Getting Started with Node.js](http://www.codingdefined.com/2016/03/getting-started-with-nodejs.html). Few paragraphs about Node.js taken from the post. >Node.js uses v8 javascript engine which is the same engine used by Chrome browser. It is event driven and has non-blocking standard libraries which means if you are doing any I/O bound operations, it will happen asynchronously. Node.js is not a framework neither it is a programming language, it is just a run time environment for developing server-side web applications. You can use Node.js for creating I/O bound applications, data streaming applications, single page applications etc, but it is not advisable to use Node.js for CPU intensive applications. >When we are discussing Node.js Basics then you should be familiar about NPM. NPM is a node package manager which handles and resolves dependencies. It makes easy for JavaScript developers to share and re-use code and it makes it easy to update the code that you're sharing. It is been called as an online repository for Node.js packages/modules. To install modules using npm you need to run below command npm install package_name. >Node.js is very easy to install. Installers can be downloaded from Node.js Download Page. In order to structure your program into different files, Node.js provides you with the simple module system. To use this module system you need to use require() which is used to imports the contents from another JavaScript file. To get started we need to install Node.js from [Nodejs.org](https://nodejs.org/en/download/). Once installed you can check the version of Node.js installed using command node -v in the Node.js Command Prompt.
Today evening I witnessed one of the beautiful sky out here in India. It was a time of sunset and along with the clouds it looked astonishing.
I have participated in (Coding challenge #2)(https://steemit.com/contest/@armandocat/coding-challenge-2-win-sbd-if-you-solve-the-problem) organized by @armandocat and here is my solution. The Coding Challenge Was >In a Linked list, each node has a value and a next node. Given a Linked list: >Write a function that reverse the linked list, using a recursive algorithm. Write a function that reverse the linked list, using a iterative algorithm. For instance: given A -> B -> C it returns C -> B ->A You don't have to clone the nodes, you must just work on their next properties. Since the Preferred Language was JavaScript, I have written in that. There is a starting code which you can get it from here https://pastebin.com/tHBtHZVF. The solution for Iterative Reversal of Linked List. Iterative Reversal means you can reverse each element one by one by using a loop. I have used while loop. ```javascript function reverseIterative(obj) { // Keeping the copy of obj locally and making original object as null var node = obj; obj = null; // Starting the while loop while(node) { // In Javascript you can get the next element in the linked list using .next // So keeping the next element as a local copy var nextNode = node.next; // In the next three lines we are just swapping the elements from Previous to Next node.next = obj; obj = node; node = nextNode; } // Once we get our object, send the object back return obj; } ``` The solution for Recursive Reversal of Linked List. Recursive meaning that the function will call itself. ```javascript function reverseRecursive(obj) { // We will check if the obj or obj.next is null or undefined, if it is just return it if (!obj || !obj.next) { return obj; } // Keeping a local copy of obj var nextNode = obj.next; // Calling the Recursive Function using the next node (Recursion) var currentNode = reverseRecursive(nextNode); //Now the resursion function will be called until the obj is not null. obj.next = null; nextNode.next = obj; // For each funtion call we will return the currentNode return currentNode; } ``` ##