Implementing Django choices in models is not very sophisticated. While writing models you expect that you might be looking neat fields that are used to store data. But when you introduce choices in Django it becomes cumbersome. Django choices are written as tuples inside tuples. A simple example of such thing can be the fancy animal problem.
Testing is one of the basic and most important things that are needed to be done. Also, it is one of the most important developmental phases. I have already discussed testing in one of my earlier posts. In that post, I talked about the way in which we can write tests for models. Today I am going to talk about using FactoryBoy for testing Django application.
Today we are going to talk about the installation process of nginx which is used as a server and is known for the providing better services in the production environment. I have been using apache2 from a long time. Recently, I got the opportunity to use nginx for one of my recent project. Before starting I want to say that I was already using apache2 for any service I was providing and using on my local services. If you already have apache2 installed and you want to run nginx then you have to stop the apache2 two service otherwise you will receive the error like:
Many times we out of knowledge give extra sensitive information to files and directories and send them into Git. Git being the version control system saves everything into the system. So if you add a password to a file which you can’t really change in the future, Git will store the password forever. This way the hackers can take down your system.
This is the first time I am posting on this blog. All the posts before this date have been exported from WordPress so you will find some mistakes in them. But I am sure from now onward, this is the new home for all my blog posts. I am very new to the Jekyll but I will like to learn it as fast as possible.
Not in the mood of writing much today so will probably leave the link which I found useful and will definitely help us if we want to know more about logging.
You must have heard about the term test-driven-development if you are into the developmental works. It is the development in which you write tests before writing the logic. That means first you write the stuff that can break the code and then you write the real code that doesn’t break which is unbreakable from that point of view.
Today I was working on another branch to write the code that can fill the database. I scanned some code and saved copied the results to open them in clean JSON format because I wanted to iterate over the results. I used the online the following JSON parser.
The heading itself is a bit confusing. So, let’s try to break it down by taking the example of what we wanted to achieve with this.
Finally, we were on the stage to build the main module of the project i.e. the module to get the URL’s from the users and return the scan results. As the first part, we are picking whatever is present at the URL, scanning the retrieved thing and showing the results.
Let’s talk about everything as it happened in the history. It was the time when UNIX was being built. ASCII came into the existence at that time. More such features were used before that but they are not being used now so talking about them is not valid anymore.
It has been a few days since I have been working on the GSoC project. Although I haven’t been able to write about all the things going on that side. From now on probably I will talk about it more often. Yesterday I managed to upload the code on our local experimental server and show the results to the mentor. Thank god, it didn’t break( I haven’t written any code to handle the errors) and everything worked as expected. Next thing is to attach celery so that the actions happens in the background. Now both celery thing and the server are for the other day. Today I will be talking about subprocess, a module of python that we are going to use for running bash commands.
From a few days, we are working on a problem which is related to reaching two machines that are connected to different networks. This post is the update to the earlier post in which we talked about the installation of TightVNC. In that post, we have talked about the problem that we are facing in lot detail. You can read it if you want to.
Last few days were well spent with the C++ library boost. It was a great learning experience. I was introduced to the one of best-kept code and some new coding paradigms. Along with that it was the first time I was coding with the new standards of C++11 and C++14.
So in this post, we will be talking about the process of changing the commit messages that are already pushed into the remote. But, before talking about changing those messages we must know about the basics commands of GitHub. Please refer to this post, if you have less knowledge about the Git.
GitHub repository : https://github.com/singh1114/automatingPresentations/
I am trying to sort the messages that I am receiving when I used the getHistory function in the Message Archiving. But till now I haven’t found a success.
Welcome back guys,
I have tried both converse.js and candy for creating a chat application on the browser for some use. Both of them provide very good functionality. Both converse.js and candy are based on XMPP client and pull data from the ejabberd server and render it on the screen on the browser.
Yesterday I was talking to a friend and he told me that he has some work that he needs to complete by the following night. He asked me for the help and I decided to help as my exam was postponed. He said that he had a .csv file( comma separated values) and want to shift the whole data into postgresql database.
What is PHP?
Long time ago browser developers recognized that we need to store the data produced during a user session so that we can refer to that data in the future. The user actions can lead to some calculations and after doing this cumbersome calculations we don’t want to do the calculations again and again.
In this post I am going to talk about one of important aspect in programming i.e. handling keyboard events. Now being important doesn’t mean that it is difficult but I have to admit that I haven’t tried it from the day I had started programming. Now I was working with one of my friend and she wanted me to do it for her. I found the task interesting as I haven’t done it earlier.
Another problem was encountered while working on the python web framework, Django. But this time the problem was more of the language oriented rather than being framework oriented. As I am not a python programmer so I never knew these basic things. So, first of all I was getting an error, whose statement went like this :
Hello everyone, I am back with one more exciting post. In this post we are going to discuss something great. This is something that I always wanted to learn but waiting for someone who can force me search through the Google and create the desired results.
Virtual environment is made when you want to run different version on single system. In this example I am going to setup a virtualenv for installing django 1.9. This is because the default version of python in the ubuntu system is 2.7(approx.) and the django is in the version 1.7. And the python is very important in the case of Ubuntu graphics. (If you want to test this try to remove python from your system and get ready to waste 2-3 hours of your time trying to figure out what happened. You might have to install Ubuntu again).
Doxygen is a tool to create a documentation for your program/project written in the languages like C, C++, Java, python and so on. It reads the well formatted and special doxygen comments to create the required documentation. This documentation is very important for the new developers who want to help in the development of the project. Documentation is one of the main pillar of an open-source project.
Some time ago sir hosted a hackathon to make some progress to enhance the ebook software that he was using on his website. Everyone was given a specific task on that day. My task was to read the script and make some changes in the script. But some reason we had to drop that idea. So I decided to start building something new instead.
This is a post which discusses the one of the most important requirement of software development phase i.e. documentation.
I love the amount of freedom given to you as a user when you work on a system with Ubuntu installed on it. So, I was not having sudo powers for the installing meteor on the server, So I asked one of the server admin(Mandeep) to do it for me. He told me that I don’t need to be signed as a root admin. I was not sure about it as their was a error when I was running the command to install meteor.
Today I finally completed my to-do app using meteor framework. There are some discrepancies in the security which will be removed soon.
Sometimes we want to share html code on the browser for example today I wanted to give a presentation. This presentation was made with the help of reveal.js. Now reveal.js uses html to make presentations. There was some html code that I wanted to show on the browser. I searched on the web and found pre and code tag along with blockquote to show html on browser but it wasn’t working as it was taking some of the html tags in the code and executing them.
As we all know that meteor can only be used to create a single page web apps. Still there are many instances when one want to work with different URL’s on a web applications.
Media queries are used to tell the browser about the various breaking points in the website so that we can give a different css styling for all those breaking points. This type of CSS is used to make the website responsive. Breaking points are the widths at which the design breaks or is damaged.
So I was trying to create a Merge sort program using JS. Before trying to make the program we first have to understand what is the concept of merge Sort. To get a good example I went to wikipedia where I found very interesting GIF which explained the the basics of Merge sort.
LaTex, I had never heard about this term before doing this project, but when I came to know about it’s features and found it excellent.LaTex is a document markup language and document preparation system for the TEX typesetting program. Within the typesetting system, its name is styled as LaTex.
Git is the open source distributed version control system that facilitates GitHub activities on your laptop or desktop. The commonly used Git command line instructions are:-
Before talking about the training I want to tell about the various things that I am using while writing about them.
First of all I would like to link to the presentation which you can check. This presentation will let you more about the MathJax.
The next task which was easy and was done in short interval of time was the installation of SageMath and biber. I followed the instructions given in the readme file and used the commands one by one was able to install them.
Installing LaTex was a fairly easy task to accomplish but was very time consuming because of the slow speed of the internet. It took me more then five hours to install this software into the system. The command used was :
I was given a new task to run and use DesignAids on my system.
So, I was asked to make a presentation in reveal.js.
So, first framework that I came across was Meteor.js
I have made some improvements as suggested by the other GD members during my presentation of my projection project.
About the Entry task