Skip to main content

Posts

Showing posts from March, 2018

Difference between Macro and Function

In this post, we are going to understand difference between macro and function. But before getting started, I want to explain little bit about macro and function to you in an easy way. What is a function? A function can be stated as a group of statements that performs some kind of task. In every C program, you’ll notice at least one function that is main() function. The execution of the program starts from there only. You can divide your code into smaller functions for reducing the size of the body of main() function. Now let us see the syntax of a function. return_type function_name(parameter){ //body of the function } What is a macro? Macros are used to define symbolic constants. It is a preprocessor directive, which means it replaces itself with the value which is given to it. Let us understand it with an example. #include <stdio.h> #define X 3 //macro definition int main(){ int x = 10; printf("%d\n", x + X); //here the value of 'X&

Python Convert String to Integer

In this tutorial you’ll see two ways to convert string to integer in python. As we know we don’t have to declare the datatype while declaring variables in Python. As python will assign a datatype according to our data stored in the variable. But when we’re working with GUI (graphical user interface) then the value fetched from a textbox will be a string by default and or we’re taking value from user using raw_input() method (in Python 2.x) and input() method (in Python 3.x), then that value will also be a string by default. To change that string into a int type variable, we can use two different methods as given below. Let’s say our program is: #program to add two numbers in python 3 number1 = input("enter number 1:") number2 = input("enter number 2:") sum = number1 + number2 print("sum = " + sum) Output:  enter number 1:  40 enter number 2:  50 sum  = 4050 A s we can see in above program the input() method returns a string that’s why the resul

7 Best Github Alternatives in 2018

Here you will get list of some best github alternatives that provide private and public repository. Being into software development we very often find ourselves in the need to host our code to any website. For the purpose, masses are blindly following one single medium for this, Github. It can not be denied that Github users have their choice to use either Git or Subversion for version control. Also there is a facility of unlimited public code repository for all users of Github. One more fascinating feature of Github is that allows to create ‘organizations’, which at its own is a normal account but at least one user account is required to be listed as the owner of the organization. Apart from providing desktop apps for Windows and OSX, Github also provides the facility to its users and organizations to host one website and unlimited project pages for free on the Github’s website. The typical domain for the hosted websites look something like username.github.io and address of the

5 Best Python IDEs for Windows/Mac/Linux

Here you will get list of best python ides for windows, mac and linux operating system. Most of us think that Almost all the basic programs in any programming languages can be written using a text editor and can be run by command line then why we need to use an IDE (Integrated development environment)? Let’s suppose you are writing a program. First you’ll need a text-editor like notepad, gedit, notepad++, vim editor or sublime etc. To run it we need to use command line then the command line will compile your source code and check whether there is any error or not. We have to write the code accurately. If any error occurs then again we have to debug the code. Writing a code using a text-editor is a time-taking task and you’ve to remember all the methods or properties given by the particular language. On other hand an IDE (Integrated Development Environment) is a software that contains all of the necessary needs to make programs at one place just like a code editor, build automation t

Best Books for Machine Learning and Artificial Intelligence

Here you will get list of best books for Machine Learning and Artificial Intelligence that are useful for beginners and intermediates. Hope you all are doing good. We are again here in front you all with another successive post on Machine Learning. We almost have covered the theoretical portion of the course and will be doing the hands-on practical soon. We all know that there are plenty of resources on the internet that we can use to study and learn almost anything. But again availability of the contents in such a humongous amount haunts the learners that where to start their journey and very often a learner ends up confused and irritated. Great scholars suggest reading books, ain’t they? So why don’t we take the easier path? While the internet is full of plenty of choices that seem very confusing for a novice, we would suggest to start the journey with conventional steps, of course books. Again you guys do not really worry or need to wander here and there in search of books neither

Difference between while and do while Loop

Here you will get to know about difference between while and do while loop. Both while and do while loops are used to execute set of statements multiple times. But there are some differences between them in terms of syntax and working that I have discussed below. Difference between while and do while Loop while loop syntax while(condition){ loop body; } do while loop syntax do{ loop body; }while(condition); while loop do while loop It is entry controlled loop. That means condition is checked at the start of loop body. It is exit controlled loop. That means condition is checked at the end of loop body. Loop body is not executed if condition is false. Loop body is executed once even if condition is false. Generally not used for making menu driven programs. Generally used for making menu driven programs. The post Difference between while and do while Loop appeared first on The Crazy Programmer . from The Crazy Programmer https://www.thecraz

A multi-player server-side GameBoy Emulator written in .NET Core and Angular

One of the great joys of sharing and discovering code online is when you stumble upon something so truly epic, so amazing, that you have to dig in. Head over to https://github.com/axle-h/Retro.Net and ask yourself why this GitHub project has only 20 stars? Alex Haslehurst has created some retro hardware libraries in open source .NET Core with an Angular Front End! Translation? A multiplayer server-side Game Boy emulator. Epic. You can run it in minutes with docker run -p 2500:2500 alexhaslehurst/server-side-gameboy Then just browse to http://localhost:2500 and play Tetris on the original GameBoy! I love this for a number of reasons. First, I love his perspective: Please check out my GameBoy emulator written in .NET Core; Retro.Net . Yes, a GameBoy emulator written in .NET Core. Why? Why not. I plan to do a few write-ups about my experience with this project. Firstly: why it was a bad idea. Emulation on .NET Emulating the GameBoy CPU on .NET The biggest issue one h

Difference between Deep Learning and Machine Learning

Here you will learn about difference between deep learning and machine learning. We already are aware of the term and in brief that Deep Learning is the subset of a wider domain called Machine Learning . If talking combined of Machine Learning and Deep Learning we can think of how Netflix is able to predict and recommend shows to watch based on your taste and how Facebook is able to recognize the face in the pictures you upload. Also as Machine Learning is the superset of Deep Learning, Artificial Intelligence is the superset of Machine Learning. So, instead of using these terms interchangeably we should be able to distinguish between them. Deep Learning is being used by Google in its image and voice recognition algorithms, by Amazon to predict and recommend what a customer wants next and by MIT researchers to predict the future . Before moving further let us quickly get a brief intro of what Deep Learning actually do so as to maintain its existence. It is quite clear that it wil

Running ASP.NET Core on GoDaddy's cheapest shared Linux Hosting - Don't Try This At Home

First, a disclaimer. Don't do this. I did this to test a theory and to prove a point. ASP.NET Core and the .NET Core that it runs on are open source and run pretty much anywhere. I wanted to see if I could run an ASP.NET Core site on GoDaddy's cheapest hosting ($3, although it scales to $8) that basically supports only PHP. It's not a full Linux VM. It's locked-down and limited. You don't have root. You are missing most tools you'd expect you'd have. BUT. I wanted to see if I could get ASP.NET Core running on it anyway. Maybe if I do, they (and other inexpensive hosts) will talk to the .NET team, learn that ASP.NET Core is open source and could easily run on their existing infrastructure. AGAIN: Don't do this. It's hacky. It's silly. But it's hella cool. IMHO. Also, big thanks to Tomas Weinfurt for his help! First, I went to GoDaddy and signed up for their cheap hosting. Again, not a VM, but their shared one. I also registered superc