Skip to main content

Posts

Showing posts with the label tricks

See More of C

Why more of c ? Function Pointers Search and Sort Multi-Threaded Programming Time Functions Random Numbers String Conversion Process Creation and System commands execution DataBase Handling CGI Scripting More Links Why digging more of C ? Being a high level language and the features C support there is not a need to ask why should we learn more about C. C programs are relatively faster than most of other high level languages like python or java. That may be because C programs are compiled first or may be because C libraries and fucntions are more hardware oriented. But whatever is the reason, C programs are way better. I can show you an example of it to you. There is a program which corrects the spelling of a mis-spelled word like it changes "somethinh" to "something". Now here is the comparison between the programs written in C and than that written in python Property Program i...

Learn Git & Github - 4

Lesson 1 Lesson 2 Lesson 3 Lesson 4 Git Tree Navigation And Management: Lesson-4 Topics How to change remote repository Commit navigation in git How to jump to a specific commit How to create a branch from a speicific commit How to edit a specific commit How to merge commits How to delete commits How to pick/move commits from one branch to other Changing Remote Repository In the previous lesson , we learned how to make commits. If totally followed the lesson then i am sure you world have made some commits also. Now change your working directory to your project directory. Check you are on master and Use git pull origin master to update your master. Since Now, we were syncing our local repository with our forked repository. But what we need is to keep updated with the original project repository. So we need to add the url of original project as our main remote repository. We can do so by typing git remote add main https:...

Learn Git & Github - 3

Lesson 1 Lesson 2 Lesson 3 Lesson 4 Git Commands: Lesson-3 Topics What we learned in previous lesson Git Terminology Git Commands for project development What we learned in Previous Lesson In the previous lesson , we learned about github and how can we use it along with git to create an open source project(A project which is free to use and distribute). We set up our project on github and cloned it in our machine to modify it locally(On our machine only). Now either you have cloned fork of an existing project or your own project, the development process is nearly the same. I'll point out the difference wherever applicable. Git Terminology In first lesson, we talked about 3 most occuring terms of git which are branch, commit and head. Now Lets talk about some more terms which are associated with git Index : Index is the current state of the project for git. If you have changed some files then you will have to add them to git index so that git can tr...

Learn Git & Github - 2

Lesson 1 Lesson 2 Lesson 3 Lesson 4 Learn Github: Lesson-2 Topics Difference between Git and Github Geting started with github Work on existing github project Creating a new project on github Difference between git and github In the first lesson we learned how git works, Now we will see what is github. People often get confused between git and github. These two are entirely different things providing the same functionality. The major difference between git and github is that git works on your machine and github is a cloud service. You can see github as a cloud version of github where an entire team can work on a project. So there is not a point of choosing either one of them. You use git only if you have a project on which you are working alone and then you use github along with git if you are handling a team project. Its not mandatory to have a team to use github. If you want to share your code to people then you can push/upload it to gi...

Learn Git & Github

Lesson 1 Lesson 2 Lesson 3 Lesson 4 Learn Git : Lesson 1 Why Git or any VCS Image from git-scm Version control system is a software which maintains the records of changes done to a project and also the states of the project which you can switch anytime. As a programmer, it sometimes happens to me when i write a piece of code and it works but when i try to optimize it then it gets broken. Also i could not be able to traceback the changes and get my working code back. If this happens to you also then you might undo tens of times to get back the previous code. But what will you do if your project contains multiple files with hundred lines of code in each file. If you now brong some changes to more than one file then its not easily possible to get back the working code. Here comes the importance of a version control system. In a VCS, you can save the current state and continue to work on a different state but it doesn't mean that vcs creates a copy of the current state....

How to fix Ubuntu brightness problem

How to play with Ubuntu brightness Fix the fixed brightness If you have faced the problem of fixed brightness of ubuntu then you are at the right place because after searching so much, i have finally found the solutions. Yeah you are right, solutions..! There are so many causes to this problem thats why i have listed the possible solutions.You can try each and every solution and do a reboot after applying solution. Solutions Run this code in the terminal. xrandr --output LVDS1 --brightness 0.5 (It will not change the brightness but only the contrast. Also there is no need to reboot) Editing Grub Configuration Run this command sudo gedit /etc/default/grub . It will open the grub file. Change this code B_CMDLINE_LINUX_DEFAULT="quiet splash" to B_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor" OR (try the first one then second if first didn't work) Change this code B_CMDLINE_LINUX_DEFAULT="quiet splash" to B_CMDLINE_LINUX_DEFAUL...

Cordova viewport problem solved

Include the viewport settings in Cordova If you are facing the auto zooming problem of cordova then go read on the full article. Cordova actually ignores the viewport meta tag which causes the pixel density problem. So we need to tell cordova that viewport tag is equally important as other tags. To do this, we need to add some code to a file which is specify in the article. Corodva messes with pixels If you are using the latest cordova version or creating the cordova app for latest android versions then you may have faced the zoom malfunctioning.I also faced it when creating an app. Many of you may have already searched the web and found the answer of changing the meta tag attributes to get it working. But adding target-densitydpi=medium-dpi does not solve the problem for latest android versions. It may work for gingerbread but not for kitkat and others. So the final solution which i found was one of the stackexchange answer but rarely found. So i am gonna two things here, i ...