31 Mart 2011 Perşembe

ASSERT failure in QList::at: "index out of range"

ASSERT failure in QList::at: "index out of range"
\Qt\2010.05\qt\include/QtCore/../../src/corelib/tools/qlist.h, line 455

if you make mistake like this, you are going to get above error

void MainWindow::on_pushButton_clicked()
{
    QList <int> a;
    int i= a.at(5);
}

 

27 Mart 2011 Pazar

Debian 6 Windows 7 Dual Boot

First installation Windows 7,
After, Debian 6 installation.

OK, but where is my Windows 7?

-->os-prober(as su)
-->update-grub(as su)

it is there..

That's all right.. 









24 Mart 2011 Perşembe

ADO.NET and Windows DNA


http://www.c-sharpcorner.com/UploadFile/mahesh/ADO.NETFromWindowsDNAPerspective11302005001902AM/ADO.NETFromWindowsDNAPerspective.aspx

19 Mart 2011 Cumartesi

IIS and ASP.NET

1-Failed to access IIS metabase Error --> Registering ASP.NET on IIS after installing the .NET Framework(aspnet_regiis.exe -i)
2-Firewall

13 Mart 2011 Pazar

C# Binary Serialization

Serialization 


[Serializable]
    class MyClass
    {
            public void SaveClass(string path)
            {
                FileStream fs = new FileStream(path, FileMode.CreateNew);
                BinaryFormatter bf = new BinaryFormatter();
                bf.Serialize(fs, this);
             }
    }


Deserialization 



           public static MyClass GetMyClass(string path)
           {
               FileStream fs = new FileStream(path, FileMode.Open);
               BinaryFormatter bs = new BinaryFormatter();
               MyClass myClass=(MyClass)bs.Deserialize(fs);
               return myClass;
           }

C# PrintScreen

public Bitmap PrintScreen()
{
Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics gr = Graphics.FromImage(bmp);
gr.CopyFromScreen(0, 0, 0, 0, new Size(bmp.Width,bmp.Height));
return bmp;
}

Blogger DNS

208.67.220.220
208.67.222.222

10 Mart 2011 Perşembe

Assign a value to a static text in GUI MATLAB

set(handles.mytext,'String','MyString')

http://stackoverflow.com/questions/2924488/assign-a-value-to-a-static-text-in-gui-matlab 

7 Mart 2011 Pazartesi

C# virtual override

namespace sanal
{
class Temel
{
public virtual void yaz()
{
Console.WriteLine("temel");
}
}
class Tureyen:Temel
{
public override void yaz()
{
Console.WriteLine("Tureyen");
}
}
class Program
{
static void Main(string[] args)
{
Temel t = new Tureyen();

t.yaz();

Console.ReadKey();
}
}
}

C# casting

upcasting
downcasting
as, is keywords
http://www.c-sharpcorner.com/UploadFile/pcurnow/polymorphcasting06222007131659PM/polymorphcasting.aspx

C# singleton

class singleton
{
public static singleton instance;
static singleton()
{
instance = new singleton();
}
private singleton()
{
}
}