tag:blogger.com,1999:blog-45422754469049008462024-03-07T22:25:28.724-08:00Web-development with Shpetim IslamiTutorials, Snippets, Tips & Tricks for HTML, CSS, PHP & MySql etc...Shpetim Islamihttp://www.blogger.com/profile/13212717813379268896noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-4542275446904900846.post-65964049871008564902011-04-04T08:26:00.000-07:002011-04-04T08:27:40.132-07:00Recommanded web sites for web developmentHere I would like to show you guys some of the blogs / web sites that I often visit for web design inspiration, tips & tricks, news, tutorials, reviews etc...<br />
<br />
first of all I would like to start with this web site:<a href="http://www.blogger.com/%20http://stackoverflow.com/"> http://stackoverflow.com/</a><br />
its a Q&A web site which is very helpful for the problems that you get on the development process, you can ask anything you want and you will get an answer very fast and good, I am really amazed what people to do help others!<br />
<br />
this: <a href="http://www.smashingmagazine.com/">http://www.smashingmagazine.com</a><br />
here you can find content from all those good blogs that are on internet! it collects good articles, really PRO!<br />
<br />
For php programmers:<a href="http://www.blogger.com/%20http://www.phpclasses.org/"> http://www.phpclasses.org/</a><br />
Here you can find really good open source classes that you can use for your projects, you can find anything you want if you want to spent some time then just try this and you will like it ;)<br />
<br />
In general:<a href="http://www.blogger.com/%20http://roshanbh.com.np"> http://roshanbh.com.np</a>/<br />
this is a really good blog but sadly its not being updated since 2009! but the articles and posts that you will find for programming are the best on the NET.<br />
<br />
Advanced PHP:<a href="http://www.blogger.com/%20http://shiflett.org/"> http://shiflett.org/</a><br />
Begginers PHP & other programming languages: <a href="http://www.developphp.com/">http://www.developphp.com/</a><br />
<br />
Here I told you some of the web sites that I visit mostly..Shpetim Islamihttp://www.blogger.com/profile/13212717813379268896noreply@blogger.com0tag:blogger.com,1999:blog-4542275446904900846.post-80944535187125966382011-03-03T05:06:00.000-08:002011-03-04T03:29:31.415-08:00Fast Version Control with GIT for total beginners [part 2]Ok in this tutorial we are going to continue to talk about GIT in depth.<br />
<br />
Ok now if you know from the first tutorial we use the command <i>git add </i>and then the name of the file which we want to track. But if you want to add all the files in the project you can do it by using this simple command:<br />
<i style="background-color: #cccccc;">git add .</i><br />
<br />
and as you know you can use branches its like a name of the version you want to work for example you can make one branch and call it version 1 then after a month you make a new branch and call it version two.<br />
to switch to a different branch or to master branch you can use the following command:<br />
<br />
<i style="background-color: #cccccc;">git checkout </i><span style="background-color: #cccccc;">[here you need to write the name of the branch you want to switch to]</span><br />
<br />
<span style="background-color: #cccccc;">for example: </span><i style="background-color: #cccccc;">git checkout version2</i><br />
<i style="background-color: #cccccc;"> </i><br />
<span style="background-color: #cccccc;"><span style="background-color: #f3f3f3;">so if you have a folder called <b>Web_project</b></span></span><span style="background-color: #cccccc;"><span style="background-color: white;"> and</span></span><span style="background-color: #cccccc;"><span style="background-color: white;"> you</span></span><span style="background-color: #cccccc;"><span style="background-color: white;"> navigate to it and type in </span></span><i><span style="background-color: #cccccc;"><span style="background-color: white;">git branch </span></span></i><span style="background-color: #cccccc;"><span style="background-color: white;">and you will see a tree of your branches, for example if you have two branches it will be like this: </span></span><br />
<div style="background-color: #cccccc;">version1</div><span style="background-color: #cccccc;">*version2 </span><br />
<div style="background-color: white;"><br />
</div><div style="background-color: white;">the asteriks (*) means that you are currently working on the branch with the name version2, if you want to switch to version1 then you will type</div><div style="background-color: white;"><i style="background-color: #cccccc;">git checkout version1</i></div><div style="background-color: white;"><i> </i> </div><div style="background-color: white;">And finally you can work on the version1 or you can switch to version2 the same way.<br />
If you want to transfer all your changes from the branch version2 to version1 (or master branch) then you can do it by using the command:<br />
<span style="background-color: #cccccc;"><i>git merge </i>[the branch that you want to transfer here]</span> <br />
for example while you are on the version1 branch: <i style="background-color: #cccccc;">git merge version2</i> <br />
Now everything you have been working on version2 will be transfered to version1 and they will be identical.<br />
You can use this for a master branch which you know its stable and doesnt have any bugs and you have another branch where you add more features to it, and then after you finish your job in the branch for more features you test it and if you think its all ok then you merge it to the master or stable version.<br />
<div style="color: red;"><br />
</div><div style="color: red;"><b>[This was was part 2 of GIT for total beginners and there is a lot more what GIT can do! stay tuned for upcoming parts...]</b></div></div>Shpetim Islamihttp://www.blogger.com/profile/13212717813379268896noreply@blogger.com0tag:blogger.com,1999:blog-4542275446904900846.post-64320974827811942512011-02-28T04:38:00.000-08:002011-03-03T04:59:19.315-08:00Quick tip: how to make one single cross-browser stylesheetI would like to share with you my oppinion about making cross-browser web site's.<br />
Hmmm... well as you know a lot of people use 2 stylesheet documents, one for Firefox and one for Internet Explorer. <br />
I personaly dont use two stylesheets but I use one stylesheet for all of browsers and I manage to make it look the same in all browsers. Right now I haven't faced a problem that I couldnt solve to look the same in IE and FF!<br />
I could be wrong about this but until now this method is working great for me, all I do is I test the web site for almost every line of CSS I wrote and if it doesnt look the same then I find the problem and then I solve it and finally in the end line by line I have one stylesheet for all browsers. <br />
All you have to do is to find the difference between IE and FF how they display the codes and find solution which fits both of them...<br />
Element reseting works too, but I have used it in one project and I didnt like it!<br />
By the way try to find the difference, solve them and there you are with one stylesheet.Shpetim Islamihttp://www.blogger.com/profile/13212717813379268896noreply@blogger.com0tag:blogger.com,1999:blog-4542275446904900846.post-24988000992772425352011-02-23T13:43:00.000-08:002011-02-24T11:35:37.152-08:00Fast Version Control with GIT for total beginnersThe first thing that you need before start programming anything you need to use GIT. maybe its problem for those who don't like to use commands but if you learn to use GIT you will find it very useful.<br />
<br />
The purpose of GIT is to keep a sort of backup for the code that you write and everytime you change it Git keeps everything on track! so if you write new code or you want to experiment with your existing project then you can do all this without worrying that you will mess things up, because you can restore back the project as it was before thanks to GIT.<br />
<br />
There are other version control programms the most powerful and the fastes programm is GIT.<br />
<br />
Lets start using it!<br />
<br />
First of all you need to install GIT, if you have a Linux OS then do it this way:<br />
<i>sudo apt-get install git-core</i><br />
<br />
or if you have Windows OS then you can download it by following this link:<br />
<a href="http://code.google.com/p/msysgit">http://code.google.com/p/msysgit</a><br />
<br />
First thing you need to do after you install GIT is to register your self to GIT by typing this commands:<br />
<pre class="terminal"> </pre><pre class="terminal" style="background-color: #cccccc;"><b><i>git config --global user.name</i> "username goes here"
<i>git config --global user.email</i> "your email goes here"</b></pre><pre class="terminal" style="background-color: #cccccc;">for example:<i> </i></pre><pre class="terminal" style="background-color: #cccccc;"><b><i>git config --global user.name</i> <i>"Shpetim Islami"</i></b></pre><pre class="terminal" style="background-color: #cccccc;"><b><i>git config --global user.email</i> <i>"Shpetim.islami@gmail.com"</i> </b></pre><pre class="terminal"></pre><pre class="terminal"></pre>then make a new Repository, and you can do this by typing this commands:<br />
<br />
<div style="background-color: #cccccc;"><b>cd</b> <b>[with this command you need to navigate to the folder where your project is or where you want to start the new project]</b></div><br />
for example if you have xampp installed: <i> </i><br />
<div style="background-color: #cccccc;"><b><i>cd C:</i></b> </div><div style="background-color: #cccccc;"><b><i>cd xampp</i></b></div><div style="background-color: #cccccc;"><b><i>cd htdocs</i></b></div><div style="background-color: #cccccc;"><b><i>cd </i>[here the name of the folder where your project is]</b></div><br />
and now you will be in the folder where your project is, and now you need to initiate a new repository by typing the following command:<br />
<br />
<div style="background-color: #cccccc;"><b><i>git init</i></b></div><br />
and now you will need to create a branch (a branch is somehow a version of your project, for each version of your project you can have branch), you make new branch by typing this:<br />
<br />
<div style="background-color: #cccccc;"><b><i>git branch</i> [here you should write the name of the branch, you choose it doesnt metter]</b></div><div style="background-color: #cccccc;"></div><div style="background-color: #cccccc;">for example: <b><i>git branch version1</i></b></div><br />
You can choose which files to track by doing this:<br />
<br />
<div style="background-color: #cccccc;"><i>git add </i>[the file name goes here]</div><div style="background-color: #cccccc;"></div><div style="background-color: #cccccc;">for example: <i>git add index.php</i></div><br />
If you want to see all the files in the project just type in:<br />
<br />
<div style="background-color: #cccccc;"><b><i>git status</i></b></div><br />
then you will see a tree of all files in your project folder.<br />
Ok, now maybe you will write some codes, make your work... NOW WHAT?<br />
well... now you have to the same steps by opening the Git (I assume you have closed GIT before) and navigate to your project with the <i>cd </i>command, then <i>git status </i>and you then git will show you the files that you have modified, deleted or added new ones. Now to save your work you need to make commit to your changes, you can do this by entering this in your command prompt(shell/terminal):<br />
<br />
<div style="background-color: #cccccc;"><b><i>git commit -am </i>'here you can put an message anything you want'</b></div><div style="background-color: #cccccc;">for example: <b><i>git commit -am 'fixed the problem with the navigation' </i></b></div><br />
and now you can go and relax or continue with your work, and now you know that if you make any mistake you can restore back the code (we will talk about this later on..)<i>.</i><br />
If you have made a lot of commits for some project and you want to see the history and everything you have done from the beggining then all you have to do is type in:<br />
<i> </i><br />
<div style="background-color: #cccccc;"><b><i>gitk</i></b></div><i><br />
</i><br />
and new window will pop up and there you will see everything you need or want to know (I think this doesnt need more explination)<br />
<br />
<br />
<br />
<div style="color: red;"><b>[This was was part 1 of GIT for total beginners and there is a lot more what GIT can do! stay tuned for upcoming parts...]</b></div><i> </i><br />
<i><br />
</i><br />
<i><br />
</i><br />
<i><br />
</i>Shpetim Islamihttp://www.blogger.com/profile/13212717813379268896noreply@blogger.com0