Pages

May 31, 2011

How to install Code::Blocks GCC Compiler / C Compiler / OpenSource Cross Platform C++ compiler Correctly in your machine(windows) / computer / pc

How to install Code::Blocks GCC Compiler / C Compiler / OpenSource Cross Platform C++ compiler  Correctly in your machine(windows) / computer / pc


 Open Source Cross Platform IDE for C++ / Code Blocks / C Compiler

Many of us downloaded the code blocks (codeblocks-10.05-setup.exe) 23 MB version which doesn't have any compilers , consequently all default installation doesn't give you the correct result that you have been expecting.

The correct version you should download codeblocks-10.05mingw-setup.exe which is approximately 73 MB  and has GCC compilers ; which will give you the correct result that you have been expecting for.


Code Block C Compiler (light-weight) Installation Settings :

First Screen After Installing Code::Blocks
Click on that radio button and hit ok.
After Configuration First look of the Code::Blocks IDE
Making the Editor better - Font Size , Fonts etc...


see now you have better fonts and looks than before.

Now you can run your c++ or c codes from the Built Menu item.


Suppose you had installed that correct version but still your code isn't compiling , now what should you do?

Goto [Settings] -> [ Compiler and Debugger ]

You should check and follow below images to configure your code blocks compiler.


Select those options as shown.
Select as shown and hit ok.




Seo Texts:
Code :: Blocks , C Compilers Problem , Code :: Blocks Installation Process Step by Step , GCC Complier Problems , C++ Cross Platform Free IDE

May 27, 2011

Interview Questions: What is the difference between unique-key and primary-key in database (Oracle , Microsoft SQL Server, Access , MySQL etc)

Interview Questions: What is the difference between unique-key and primary-key in database (Oracle , Microsoft SQL Server, Access , MySQL etc...)

This is a mature question , I myself had faced this question in an interview but couldn't describe all the points but I was able to describe the main key point of this question "What is the difference between unique-key and primary-key in database".


The main key points of this question( "What is the difference between unique-key and primary-key in database") is below number 1,2.


1) Unique key (UK) can be null but Primary key can't be null.
2) Primary key (PK) can be referenced to other Data-tables as a Foreign(FK) but 

Unique key (UK) can't play this role.

3) We can have multiple unique keys(UK) in a table but in the case of Primary key (PK) there should be only one.
4) And also a primary key creates a cluster-index by default but unique key creates a non-cluster-index by default.


More Explanation: 
Primary Key is a combination of Unique and NOT NULL Constraints so it can’t have duplicate values or any null values.
Moreover in Oracle Databases,  UNIQUE Key Columns can have any number of NULL values, however in MS SQL Server/ Microsoft-Access can only have one NULL value in  their unique key column.

What is Foreign Key:

Related links in What is the difference between unique-key and primary-key:

SEO Labels:

Uniquekey and primarykey Difference

What is the difference between unique-key and primary-key

Interview Questions: What is the difference between unique-key and primary-key , 

Foreign ,Key, Primary ,Key, Unique, Key

May 19, 2011

Alim Ul Karim's Blog: Database First Approach / DB First Approach / MVC3

Alim Ul Karim's Blog: How to Create Database First in ASP.NET MVC3/MVC 3...: "If you are new in ASP . NET MVC / MVC3 or in EntityFramework ( EF ) you should look for some articles before read this topic. If you ar..."

Alim Ul Karim's Blog: How to Create Database First in ASP.NET MVC3/MVC 3...

Alim Ul Karim's Blog: How to Create Database First in ASP.NET MVC3/MVC 3...: "If you are new in ASP . NET MVC / MVC3 or in EntityFramework ( EF ) you should look for some articles before read this topic. If you ar..."

How to Create Database First in ASP.NET MVC3/MVC 3 using Entity Framework (EntityFramework - EF 4.1/EF4.1) 4.1

If you are new in ASP.NET MVC /MVC3 or in EntityFramework (EF) you should look for some articles before read this topic. If you are a beginner or apprentice then , I suggest you to watch Scott Hanselman's MVC-101 video , it will help you to learn about new ASP.NETMVC3 from beginner to advanced (if MVC2 is already known to you ,  MVC3 will not be a new path or unknown to you , basic structure remain same as MVC2).


The reason behind I am writing this topic because I haven't found any good resource to start my project as Database First in MVC using Entity Framework 4.1 (EF 4.1). In Entity Framework 4.1 coders,database designers, model designers can do what they want first, if you like to code then code first (there are lots of examples over the internet  about - code first in EF 4.1 few of them are linked in my article), if like to create model first then do it first and so on.
In this topic, I will write less and help you via images because  it's a fast and easy way to learn. So let's begin to work.


I have created a new ASP.NET 4 MVC3 HTML5 based Internet application, attached a database first as shown in the image , I recommend you to download the source and investigate yourself.
Project First Appearence - Database DB First Approach ASP.NET 4 MVC3
BlogContent DataTable Data
Taxonomy Data
ContentType Table Data
Existing Database , table relationships schema - Database DB First approach


Creating ADO.NET ENTITY Data Model From a Existing Database - Database First Approch


Generate Entity Data Model From Existing Database - DB - Database DB First approach 

Creating ConnectionString from Exiting Database - Database First approach


Entity Data Model Edmx file view


 right click on the white surface in the entity data model of Blog Database.

DBContext Generate From Entity Data Model

Creating Repository , Model and Database Table Class from the Entity Data Model, Click on 'ok' twice
Now Build your project and then do as below.
After Creating Repository, Model and DBContext from Wizard


Controller Wizard to Create V-View, C- Controller
V-View and C- Controller has been created with Read,Write, Delete, Details View ability

Created a Link for the Blog Content Controller

Preview of the Project

Code : http://www.mediafire.com/download/4oai056o5h3enlr/WebApplication3.7z


Download the Source File:
  1. Direct Link: Blog OpenSource Project - Database First Approch - ASP.NET MVC3 HTML5 Project
  2. Mediafire Link: Blog OpenSource Project - Database First Approch - ASP.NET MVC3 HTML5 Project
Related Videos of Scott Hanselman, Steve Sanderson , download High WMV for best quality experience:
  1. Scaffolding – ASP.NET, NuGet, Entity Framework Code First and More
  2. DevDays Keynote + MVC-101 + Nuget : Depth
  3. NuGet In Depth: Empowering Open Source on the .NET Platform

Author Related Links:
SEO Labels:

DB First Approch / Database First Approch / Create Database First then model then code / First effort Database - DB ASP.NET MVC 3/ MVC3 / EntityFramework Database First / EF 4.1 / EF4.1 Database First approch / EF 4.1 Database(DB) First Approch .

May 3, 2011

Adobe Flash CS3,CS4,CS5 (ActionScript 3.0 AS3) - Video/MovieClip/MC/Movie Clip - FLV/SWF - sound/audio volume decreasing or increasing or mute or reduce code. -- How to sound off in a flash movieclip as3


Adobe Flash CS3,CS4,CS5 (ActionScript 3.0 AS3) - Video/MovieClip/MC/Movie Clip - FLV/SWF - sound/audio volume decreasing or increasing or mute or reduce code.


Over the Internet, I had searched a lot and found few articles that suggested me to add soundclips as an external object and then control or reduce it(volume/sound) but what if  I have a video.swf or flv which contains sound/audio in my library or in the stage and I want to reduce or increase it's volume/sound.After , searching for 5 hours I was bored but finally found the solution  and now I want to share it with everyone.


So no more talk , just read the code and you will have the idea how to do it.


Code:
//Suppose I have a movieclip/mc/movie clip named 'video' which contains audio and video entity 
// we are writting as3/actionscript 3.0 coding , follow as below.


//Mute Volume/Sound
video.soundTransform = new SoundTransform(0);  //maybe it won't work in AS2/ActionScript 2.0...works in as3



//Full Volume/Sound
video.soundTransform  = new SoundTransform(1);  //maybe it won't work in AS2/ActionScript 2.0...works in as3


//Half Volume/Sound
video.soundTransform = new SoundTransform(.5);  //maybe it won't work in AS2/ActionScript 2.0...works in as3




SEO Tags:


Flash ,

Flash Sound off ,

Flash Sound Reduce from Original ,

Flash Sound Reduce in a movieclip ,

Flash AS3 Sound Reduce in a movieclip ,

Flash AS3 Sound Reduce in a movieclip ,

Flash AS3 Sound Mute in a movieclip ,

Flash AS3 Sound Mute in a flv file ,

Flash AS3 Sound Reduce in a movieclip ,

Flash AS3 Sound Reduce in a flv file ,

Flash AS3 Sound Reduce in a movie file ,

Flash AS3 Sound Sound off flv file ,

Flash AS3 Sound SoundOff in movieclip ,

Soundoff




Adobe Flash CS3,CS4,CS5 (ActionScript 3.0 AS3) - Send Data (SendData) to a URL or PHP or ASP Page as Post or Get Method Example

Adobe Flash CS3,CS4,CS5 (ActionScript 3.0 AS3) - Send Data (SendData) to a URL or PHP or ASP Page as Post or Get Method Example
by using this method we can send email to our clients.


Tested on Flash ActionScript 3.0(AS3) - 

function send_data_to_url():void
{
var url_var:URLVariables = new URLVariables();
url_var.email = "auk.junk@live.com";

 url_var.first_name      = "Alim";
 url_var.middle_name   = "Ul";
 url_var.last_name           = "Karim"; //Alim Blog
 url_var.blog             = "Blog";
 //add as much as you want.
 trace(url_var);

sendData("example.php",url_var); //or use asp page url

}

function sendData(url:String, _vars:URLVariables):void
{
var request:URLRequest = new URLRequest(url);
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
request.data = _vars;
request.method = URLRequestMethod.POST; //Set Get Method if you want
loader.addEventListener(Event.COMPLETE, handleComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
loader.load(request);

}
function handleComplete(event:Event):void
{
var loader:URLLoader = URLLoader(event.target); // send request complete , you can do   what ever you want
}
function onIOError(event:IOErrorEvent):void
{
//a.text = "Error loading URL."; // print error in a textfield
}


Tags:

Flash ActionScript,

SendData,

to url,

ASP ,

PHP,AS3