Archive for the ‘Uncategorized’ Category

Error control ”of type ‘GridView’ must be placed inside a form tag with runat=server

Go here

No Comments


Difference between Dual, Quad Core, i3, i5 and i7

If you’re in the market to buy a PC and you’re looking for the best value for money, you’ve likely asked yourself: “what’s the difference between Dual and Quad Core and what about i3, i5, and i7?”
This guide offers a basic explanation of these five types of processors and will help you determine the best for your needs.
Before we go much further, I should make it clear that comparing Quad Core with i7 is not as simple as it sounds as they are not completely comparable. You’ll see why as you read on.
This guide will answer the following questions:
  • What is a processor?
  • What is a core?
  • What is a multi-core processor?
  • Why do I need multiple cores?
  • How many cores do i3, i5, and i7′s have?
  • Do I need a Dual/Quad core or an i3/i5/i7?

What is a Processor?

The Processor or Central Processing Unit (CPU) component of your PC that carries out instructions given to it by your Operating System (Windows.) Think of the processor as a brain that receives instructions and messages (i.e. “HOT HOT HOT Burning!!!”) and sends out instructions to other hardware (i.e. “Arm: lift hand” or “mouth: open; vocal chords: scream”.)

What is a Core?

A standard processor has one core (single-core.) Single core processors only process one instruction at a time (although they do use pipelines internally, which allow several instructions to be processed together; however, they are still run one at a time.)

What is a Multi-Core Processor?

A multi-core processor is composed of two or more independent cores, each capable of processing individual instructions. A dual-core processor contains two cores, a quad-core processor contains four cores, and a hexa-core processor contains six cores.

Why do I Need Multiple Cores?

Multiple cores can be used to run two programs side by side and when an intensive program is running (AV Scan, Video conversion, CD ripping etc.) you can utilize another core to run your browser to check your email etc.

Multiple cores really shine when you’re using a program that can utilize more than one core (called Parallelization) to improve the program’s efficiency. Programs such as graphic software, games etc. can run multiple instructions at the same time and deliver faster, smoother results.

So if you use CPU-intensive software, multiple cores will likely provide a better experience when using your PC. If you use your PC to check emails and watch the occasional video, you really don’t need a multi-core processor.

How many cores do i3, i5, and i7′s have?

  • A Dual-core processor has two cores.
  • A Quad-core processor has four cores.
  • An i3 processor has 2 cores.
  • An i5 processor has 2 or 4 cores (depending on the model you have.)
  • An i7 processor has 2, 4 or 6 cores (depending on the model you have.)

Do I need a Dual/Quad core or an i3/i5/i7?

The reason you’re reading this guide is to find out which type of processor you need. I want to give a simple answer and, if you have more to add, please let us know in the comments. As with all computer hardware, the type of processor you need depends on your needs, for how long you want your computer to stay current, and your budget.

Here’s a very simple breakdown of what you should look to buy depending on your computing needs. All suggestions assume you are buying a pre-built PC (so you don’t have to worry about motherboard and RAM specs and so you don’t have to worry about upgrade compatibility.)

If you:

  • Browse the internet, check email, and play the occasional flash game (like Farmville): Get asingle core netbook or desktop (and don’t spend more than $350 USD.)
  • Do your word processing, spreadsheets etc. on your PC, listen to music often, and watch movies, get a dual core or i3.
  • Play the occasional game and are happy with lower resolution and lower quality graphics (my suggestion assumes the graphics processor on the pre-built PC will be well-matched for the processor suggestions), watch HD movies etc., get a dual core or i5.
  • If you do graphic publishing, music creation, programming (and compilation), watch HD movies, and like to play visually appealing games, get a Quad corei5, or i7.
  • If you like to have the very best hardware and play the most graphically intense games, get an i7 Extreme.

 

This post explains the difference between the Intel Core i3, Core i5 and the Core i7 processors.

Intel Core i3

Codenamed: Clarkdale (Westmere)
Fabrication: 32 nm
Instruction set: X86, X86-64, MMX, SSE 4.2
Socket: LGA 1156
Bus: Direct Media Interface
RAM: DDR3
Chipset Support: P55, H55, H57, Q57

Intel Core i5

Codenamed: Lynnfield (Nehalem), Clarkdale (Westmere)
Fabrication: 45 nm, 32 nm
Instruction set: X86, X86-64, MMX, SSE 4.2
Socket: LGA 1156
Bus: Direct Media Interface
RAM: DDR3
Chipset Support: P55, H55, H57, Q57

Intel Core i7

Codenamed: Bloomfield (Nehalem)
Fabrication: 45 nm
Instruction set: X86, X86-64, MMX, SSE 4.2
Socket: LGA 1366
Bus: Quick Path Interconnect
RAM: DDR3
Chipset Support: X58
Intel has classified the Core processor range into Core i3, Core i5 and Core i7. Both the cost and the performance goes on increasing as you move from Core i3 to Core i7.

Intel Core i3

The Core i3 processors are dual core processors based on the Clarkdale (Westmere) architecture. They have a 32 nm fabrication and work with LGA 1156 socket motherboards. Direct Media Interface (DMI) replaces FSB in the Core i3 processors, unlike the faster Quick Path Interconnect in the Core i7 processors. They have clock speeds ranging from 2.93 to 3.06 GHz. They have 2×256 KB L2 cache and 4 MB L3 cache. They are compatible with these chipsets – P55, H55, H57, Q57. They don’t support Turbo Boost (dynamic overclocking) unlike the Core i5 and Core i7. They also have an Integrated graphics processor. They also have Hyperthreading support.

Intel Core i5

There are two types in Core i5 – Dual core and Quad Core. The dualcore Intel Core i5 processors are similar to the Core i3s while the quadcore Core i5s are much closer to the Core i7 in terms of features.

DualCore Core i5 Processors – They are based on the Clarkdale (Westmere) architecture like the Core i3. They also have a 32 nm fabrication and work with LGA 1156 socket motherboards. Direct Media Interface (DMI) replaces FSB in the Core i5 dualcore processors. They have clock speeds ranging from 3.2 to 3.6 GHz. They have 2×256 KB L2 cache and 4 MB L3 cache. They are compatible with these chipsets – P55, H55, H57, Q57. They support Turbo Boost (dynamic overclocking). They also have an Integrated graphics processor and also include Turbo Boost (dynamic overclocking). They also have Hyperthreading support.

QuadCore Core i5 Processors – They are based on the Lynnfield (Nehalem) architecture similar to the Core i7. They have a 45 nm fabrication and work with LGA 1156 socket motherboards. Direct Media Interface (DMI) replaces FSB in the Core i5 quadcore processors. There are 2 processors with clock speeds of 2.4 and 2.66 GHz. They have 4×256 KB L2 cache and 8 MB L3 cache. They are compatible with these chipsets – P55, H55, H57, Q57. They do support Turbo Boost (dynamic overclocking). However they don’t support Hyperthreading and don’t have a Integrated Graphics Processor.

Intel Core i7

They are the most powerful of the lot. They are based on the Bloomfield (Nehalem) architecture. They have a 45 nm fabrication and work with LGA 1366 socket motherboards. They have Quick Path Interconnect (QPI) which is faster than both DMI in Core i3/i5 and FSB. They are native quad cores which offer the best performance. They have 4×256 KB L2 cache and 8 MB L3 cache. They are compatible with the X58 chipset. They support Turbo Boost (dynamic overclocking) and Hyperthreading (8 virtual cores). However they don’t have an Integrated Graphics Processor.

All the three – Core i3, Core i5 and Core i7 comes with Smart Cache (cache sharing between two cores) and support hardware virtualization.

Source

More Reference

, , , ,

No Comments


How to Convert String to UIColor


NSString *stringColor = @”redColor”;

SEL *selColor = NSSelectorFromString(stringColor);

UIColor *color = nil;

if ( [UIColor respondsToSelector:selColor] == YES) {

color = [UIColor performSelector:selColor];

}

, ,

1 Comment


How to concatenate string using Objective-c


NSString *t = [NSString stringWithFormat:@"%@ %@ %d", @"firstname", @"Lastname", 1];

, , , ,

No Comments


How to Extract SQL EXPRESS Installer

To extract the sql express edition use,

1. Goto Command prompt

2. navigate to the sqlexpr32.exe

3. Type sqlexpr32.exe /x

,

No Comments


Error exporting data to UTF8 in SQL Server DTS

Error 0x00470d4: Data Flow Task 1: The code page on input column “COLUMN_NAME” (111) is 1252 and is required to be 65001.
(SQL Server Import and Export Wizard)

Usually this error appears when the table has a data type of VARCHAR, what you need to do is to change it NVARCHAR.

, , ,

1 Comment


How to Create Line Number

This article demonstrates how to add line numbers to a rich text box control. This is done by adding a picture box control on the left side of the rich text box control. When the appropriate events happen on the Form or on the RichTextBox control we call a method that paints the line numbers on the PictureBox control. This approach is more accurate and efficient than other approaches I’ve seen where another textbox control was used for printing the line numbers. The PictureBox will only print the line numbers that are currently visible in the RichTextBox control.
During the process of constructing this code sample, I initially based it on the code sample provided in the article http://www.codeproject.com/cs/miscctrl/numberedtextbox.asp and enhanced it by doing the following:

  1. Replace the Label control for numbering with a PictureBox
  2. I fixed the scrolling problem with that implementation due to the fact that RichTextBox uses smooth scrolling (scrolling with the scrollbar scrolls the text in pixels, not in lines), as a result sometimes the first line may be displayed in half, at which case the line numbering should address it.

Here is the code for printing the line numbers. Note that we have a RichTextBox control
called MyRichTextBox and a PictureBox control called MyPictureBox. The method gets one
argument which is the Graphics of the PictureBox control.
This is the method DrawRichTextBoxLineNumbers:

  1. Private Sub DrawRichTextBoxLineNumbers(ByRef g As Graphics)
  2.  
  3. 'Calculate font heigth as the difference in Y coordinate
  4.  
  5. 'between line 2 and line 1
  6.  
  7. 'Note that the RichTextBox text must have at least two lines.
  8.  
  9. '  So the initial Text property of the RichTextBox
  10.  
  11. '  should not be an empty string. It could be something
  12.  
  13. '  like vbcrlf & vbcrlf & vbcrlf
  14.  
  15. With MyRichTextBox
  16.  
  17. Dim font_height As Single
  18.  
  19. font_height = .GetPositionFromCharIndex(.GetFirstCharIndexFromLine(2)).Y _
  20.  
  21. - .GetPositionFromCharIndex(.GetFirstCharIndexFromLine(1)).Y
  22.  
  23. If font_height = 0 Then Exit Sub
  24.  
  25. 'Get the first line index and location
  26.  
  27. Dim first_index As Integer
  28.  
  29. Dim first_line As Integer
  30.  
  31. Dim first_line_y As Integer
  32.  
  33. first_index = .GetCharIndexFromPosition(New _
  34.  
  35. Point(0, g.VisibleClipBounds.Y + font_height / 3))
  36.  
  37. first_line = .GetLineFromCharIndex(first_index)
  38.  
  39. first_line_y = .GetPositionFromCharIndex(first_index).Y
  40.  
  41. 'Print on the PictureBox the visible line numbers of the RichTextBox
  42.  
  43. g.Clear(Control.DefaultBackColor)
  44.  
  45. Dim i As Integer = first_line
  46.  
  47. Dim y As Single
  48.  
  49. Do While y < g.VisibleClipBounds.Y + g.VisibleClipBounds.Height
  50.  
  51. y = first_line_y + 2 + font_height * (i - first_line - 1)
  52.  
  53. g.DrawString((i).ToString, .Font, Brushes.DarkBlue, MyPictureBox.Width _
  54.  
  55. - g.MeasureString((i).ToString, .Font).Width, y)
  56.  
  57. i += 1
  58.  
  59. Loop
  60.  
  61. 'Debug.WriteLine("Finished: " & firstLine + 1 & " " & i – 1)
  62.  
  63. End With
  64.  
  65. End Sub
  66.  
  67. Private Sub r_Resize(ByVal sender As Object, ByVal e As System.EventArgs) _Handles MyRichTextBox.Resize
  68. DrawRichTextBoxLineNumbers(Me.MyPictureBox.CreateGraphics)
  69. MyPictureBox.Invalidate()
  70.  
  71. End Sub
  72.  
  73. Private Sub r_VScroll(ByVal sender As Object, ByVal e As System.EventArgs) _
  74. Handles MyRichTextBox.VScroll
  75. DrawRichTextBoxLineNumbers(Me.MyPictureBox.CreateGraphics)
  76. MyPictureBox.Invalidate()
  77. End Sub
  78.  
  79. Private Sub p_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) _
  80. Handles MyPictureBox.Paint
  81. DrawRichTextBoxLineNumbers(e.Graphics)
  82. End Sub
  83.  
  84. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
  85.  
  86. Handles MyBase.Load
  87.  
  88. MyRichTextBox.Text = vbCrLf & vbCrLf & vbCrLf
  89.  
  90. End Sub

Source: Line Numbering of RichTextBox in .NET 2.0

No Comments


How to Load Bitmap into the Picturebox

mports System
Imports System.Collections
Imports System.Data
Imports System.IO
Imports System.Xml.Serialization
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Text
Imports System.Drawing.Printing

Private sub LoadBitmapImage()
Me.PictureBox1.Image = New System.Drawing.Bitmap(“c:\mypic.bmp”)
End Sub

, ,

No Comments


MDI – Close All Forms

Private Sub CloseAll()

For Each f As Form In Me.MdiChildren
f.close()
Next
End Form

, , ,

No Comments


How to lock folder

If you want to lock your folder. Follow the simple instruction, let’s say you want to lock the folder SEXY folder.

1. Open Notepad and type the following

ren SEXY SEXY.{21EC2020-3AEA-1069-A2DD-08002B30309D}

Save the text file as lock.bat in the same level of SEXY folder.

2. Open another new Notepad and type the following

ren SEXY.{21EC2020-3AEA-1069-A2DD-08002B30309D}

3.  Save the text file as unlock.bat in the same drive.

How to use:

1.  To lock the pics folder, simply click the lock.bat and it will transform into control panel icon which is inaccessible.
2. To unlock the folder click the unlock.bat file. Thus the folder will be unlocked and the contents are accessible.

For more tips & tricks visit: http://techytonic.blogspot.com/2008/03/lock-folder-using-notepad.html

,

No Comments



SetPageWidth