Najam Sikander Awan
Recording my experiences and findings.
Recording my experiences and findings.
Aug 9th
I have been watching Mix11 videos about asp.net mvc3 and felt pretty excited to mingle with these latest bits but I didn’t wanted to limit myself to local environment I wanted to know what efforts are required if I am developing with latest stuff one limitation I had that my host always take ages to update server so I had support for .net3.5. I email them about this thing and in reply they told me either wait 6 months or pay $8. Since I was dying to test out EF code first I paid them and within one day my hosting is all updated and now I am running my incomplete demo online
.
Deployment was a little bit scarier as my hosting doesn’t come with any publishing/deployment server but if you have vs2010 sp1 then you are in safe hands all you have to do is to click on add deployable dependencies then build your solution and upload using your favorite ftp client.
This far I like MVC3.0 , Nuget and MVC Scaffolding but I am still learning how to scaffold many to many relations or at least leverage scaffolding and then tune it to have many to many relations.
Aug 9th
I have spent so much money to build a dream PC for gaming and my web development work I was happy thought it was my investment and will recover it in future while working on it. But this never happened I worked on it successfully installed macOSX on it and then ubuntu using Virtualbox to setup my Node.JS environment but very time I need it most something bad happen. Always the worse part is not booting up and I never had any guesses where is the problem possible guesses always include ram, power supply, graphic card, processor or the Holy Motherboard in my case its always either MB or ram.
Now again when I want to use my PC its not working. Some parts are in warranty and some are not lets see what happens next as I am convincing myself to lift this more then 10kg of weight to carry to computer market for diagnosis.
Thats pretty much it. Thank you for still reading my blog.
Love you,
NSA
May 7th
Previously I have told you about my ubuntu setup running via virtual box. I was happily working till ubuntu 11 launched and I decided to upgrade to version 11, after update vbox is not doing fullscreen worse part is compiz also not working. It seems may be driver for my ati hd 4890 not working properly.
Possible fixes that I can think includes:
$ freshly install ubuntu 11 using virtual box.
$ install ubuntu 10.10 again
If anyone knows any better solution please post.
Regards,
Najam sikander awan
Apr 2nd
Well for some experiments that involved git and curl I was coming across the windows problem I was trying to make my way using cygwin but after few stuck I always get stuck. Everyone’s recommended solution was using linux OS so I have download virtual box created a virtual machine and then installed ubuntu iso 10.10 32 bit. Now as I am trying to get some softwares like chrome and vim I got few errors in package manager saying something like waiting for jockey to end. Google comes to rescue in terminal I run following commands:
ps -e | grep jockey sudo kill process_id
Second big problem was I wanted full screen when using ubuntu solution that I found in some forum is following:
The nut of what you will be doing:
1. Install Ubuntu on VB.
2. After install and restart, go to the ‘Devices’ menu for VirtualBox.
3. Select ‘Install Guest Additions’.
4. Open Terminal in Ubuntu.
Type:
cd /media/cdrom0 (this puts you to the cdrom directory where you just mounted guest additions)
Press enter then type:
dir (this shows you what’s inside this directory.)
Press enter then type:
sudo sh ./VBoxLinuxAdditions-x86.run (this is what you would type if you have an x86 machine, typical. If you have an AMD use that one, and so forth.)
5. Wait for update to complete.
6. Once complete, shut down Ubuntu.
7. Restart VirtualBox
8. Boot up Ubuntu.
9. Once booted, press cmd+F for fullscreen or cmd+L for seamless.
Best,
Najam Sikander Awan
Dec 8th
I read this article http://bit.ly/16pqBm and find out the power of overflow that is when you set it to a value it creates a new block formatting context in simple word that means non floated element’s content will not flow around the floated element instead will get narrower.
PS. Width should not be mentioned for non floated content so it can get narrower.
Dec 6th
Few weeks back I came across a page that has multiple jquery versions referenced in it and I had no idea which jquery version is actually running. So after little bit of googling I find following solution.
//Returns "1.3.1" $().jquery; //Returns "1.3.1" jQuery.fn.jquery;
Dec 3rd
I was wondering how to count the rules of my style sheets after little googling i discovered two ways one is through vim and second is through a command line tool called grep.
If you are a vim user and your css file is loaded into vim in command mode enter following command
:%s/font-size//gn
output will be the number of type font-size is used in your css file.
for grep open your command line and enter
cat style.css | grep -c font-size
output will be the count of font-size occurrences in style.css.
you can use *.css as well for all the css files in current directory.
Other then these methods I am really interested to use a tool which will take a file and list all the rules along with their count in code.
Nov 1st
function flashswf(file, target, Width, Height, ID) {
var flashvars = {}
var params = {
//allowfullscreen:"true",
allowscriptaccess: "always",
wmode: "transparent",
menu: "false"
}
var attributes = {
id: ID,
name: ID
}
swfobject.embedSWF(file, target, Width, Height, "9.0.115", false, flashvars, params, attributes);
}
flashswf("/swf/total moistureiser.swf", "flashW", "704", "286", "homeFlash");
Sep 23rd
Hi,
I have been busy with facebook application development using IFrame and since I have asp.net background so instead of php I wanted to do this in asp.net their are few wrappers or sdk available for this like. After googling I have picked Facebook developer toolkit v3.01. After downloading the binaries I have created a asp.net web application project with 4.0 framework and simply added the reference of facebook.dll and facebook.web.dll.
In default.aspx code behind file we add the using statements for facebook dlls and inherit our page from facebook.web.CanvasIFrameBasePage and override the PreInit method for default page. Look at the snapshot of my default.aspx.cs for more understanding.
The hardest part was to configure my app with facebook and I also wanted to continue development using my development PC so that I don’t have to upload my code as code changes. So lets first dive into facebook app configurations.
From above snapshot you can see my application will run at at http://apps.facebook.com/fbnajam and the domain I am providing as Canvas URL is http://fbnajam.com. The www.fbnajam.com domain is not registered to anyone
I will map this domain to my local IP address (127.0.0.1) by editting hosts file.
Note in hosts file you can’t put port with ip address for example 127.0.0./:1259 will not work so in your hosts file you will only enter the mapping between your virtual domain and 127.0.0.1 after making the entry make sure you reboot your PC to commit your changes.
Final part is to edit your web.config file and put app settings section which will contain your faceboko app api key, facebook app secret key and facebook app callbak URL in my case that was fbnajam.com for more understanding please look at following snapshot.
Now if you press F5 to run your application it will open facebook page showing your app and you will see your your name.
After creating my first Facebook IFrame application I still want to use xFBML if supported need to test this application in my office. After doing some more experiments will update this post.