March 29, 2011

How to add a custom NS record to a domain/subdomain in dns-diy.net

- How to add a custom NS to DNSDIY
- How to add a custom NS to dns-diy.net
- Adding Custom NS at dns-diy.net
- Adding Custom NS at OnlineNIC domain

DNS Records:
We have many different type of DNS records and most of these record types are not commonly used. By the way you need to know a little about these
- NS: is name server which specifies a name server for the domain.
- CNAME: Sets an alias for a host name. Like "docs >> CNAME >> ghs.google.com. >> 0 >> 3600" in here means: forward docs.domain.com to custom google document server in behind scene.
- A: Maps a host name to an IP address
- MX: is Mail eXchanger.
- TXT: it's strictly informational.

Solution:
- Login to dns-diy.net in here or any domain control panel
- Find a custom DNS Records Zone (its first page which comes after login)
- Add a new record with
host: 
type: NS
data: ns.yourhost.com
priority: 0
ttl: 3600
- Click update and wait for minutes for works ;-)
DNS-DIY Zone Edit

Test:
If you'd like to check the status of your DNS records for web publishing, you can perform a free nslookup. Here's how:
- Google NS lookup [link].
- Select a search result from top of list.
- Type your domain address in to the field.
- Click Submit, or Lookup.

March 20, 2011

How to fix a row in Excel

How do you fix a row in Excel?
How do you freeze a row in Excel?
How do you fix a column in Excel?
How to fix a row in Excel when you move that one stays fixed?
How fixed column/row in Microsoft Office Excel?

Solution
1- Select Row/Column
2- Select View in ribbon

3- Select Freeze Panes from Window Section
4- Enjoy :-D

March 18, 2011

database does not have a valid owner

Error:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.
------------------------------
BUTTONS:
OK
------------------------------

Solution:
1. Right Click on your database, choose properties
2. Goto the Files
3. Change the owner textbox to "sa"
4. Press OK
5. Enjoy

March 16, 2011

Unmanaged C++ in C#

Questions
- Using Unmanaged C++ Dynamic Library (DLL) in .NET Applications
- Using DllImport for read a unmanaged dll
- How to Create DLL in Visual Studio 2008 in Visual C++ for Using in C#
- Call an Unmanaged DLL from .Net Windows Application
- Call an Unmanaged Visual C++ code from Managed Code like C# or other .NET

Solution
I have received a request from my friend, He wanted to have a solution with an unmanaged library (DLL) as core and a windows form application in C# as an interface. You can find a very simple solution with 2 languages, here.

- Microsoft Visual C++ 2010 (Unmanaged, Dll)
- Microsoft Visual C# 2010 (Managed, Windows Form)

ClassLibrary.h
// ClassLibrary.h
#define DllExport _declspec(dllexport)
extern "C" DllExport int Sum(int, int);
extern "C" DllExport wchar_t getChar(void);
extern "C" DllExport wchar_t* getString(void);

#pragma once
int Sum(int, int);
wchar_t getChar(void);
wchar_t* getString(void);

ClassLibrary.cpp
#include "stdafx.h"
#include "ClassLibrary.h"

int Sum(int a, int b){return a + b;}
wchar_t getChar(){return L'ن';}
wchar_t* getString(){return L"امیرمهدی خادم آستانه";}

part of Form1.cs
[DllImport("c:\\ClassLibrary.dll", CharSet = CharSet.Unicode)]
[return : MarshalAs(UnmanagedType.I4)]
public static extern Int32 Sum(Int32 a, Int32 b);

[DllImport("c:\\ClassLibrary.dll", CharSet = CharSet.Unicode)]
public static extern char getChar();

[DllImport("c:\\ClassLibrary.dll", CharSet = CharSet.Unicode)]
public static extern String getString();

Download
[1] Unmanaged C++ in C# Solution (both of VC and C# projects) download