XML etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
XML etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

24 Ocak 2015 Cumartesi

Programlamaya Yeni Başlayanlar İçin Kitap Önerileri | Temel Programlama


Programlamaya yeni başlayanlar
için kitap önerileri


ALGORİTMA VE C# PROGRAMLAMA


Bu kitap programlamaya yeni başlayacakları da kapsayacak şekilde programlama ile ilgilenen günümüzün tercih edilen ve yaygın olarak kullanılan programlama dillerinden biri olan c# dilini öğrenmek isteyen. Bilgisayar programlama dersini alan tüm eğitim kurumları öğrencilerine yönelik sade ve anlaşılır bir dille yazılmıştır. 
Kitabı bitirdiğinizde programlama mantığını ve c# programlama dilini öğrenebileceksiniz.

Yazar: Erhan ARI




C/C++ VERİ YAPILARI VE ÇÖZÜMLÜ UYGULAMALAR


Bu kitap c ve c++ dilleri veri yapıları için vazgeçilmezlerden olan aktif bellek kullanımı göstericiler ve doğrudan bellek yönetimine destek sağlarlar. Bu nedenle c ve c++ veri yapıları öğre3nmek isteyenler için ideal bir kitaptır.


Yazar: Prof. Dr. Nejat YUMUŞAK 




ALGORİTMA GELİŞTİRME VE PROGRAMLAMAYA GİRİŞ



Kitapta farklı olanlara ait çok sayıda örnek problemin çözümüne ilişkin akış diyagramları çizilerek altı ayrı programlama dilinde (Basic, C, C++, Pascal, C#, Java) kodlanmış. okuyucuların konuyla ilgili bilgilerini geliştirmeleri için de bölüm sonlarına bol sayıda problemler eklenmiştir. 

Yazar: Dr. Fahri VATANSEVER





Kitap tanıtımı arada sırada yapacağım bloğumu takip etmeye devam edin teşekkür ederim.





21 Ocak 2015 Çarşamba

Syntax Nedir?





Syntax Nedir?



Syntax; 
Yazma Kuralı


[LocalizabilityAttribute(LocalizationCategory.Ignore)]
[UIPermissionAttribute(SecurityAction.InheritanceDemand, 
Window = UIPermissionWindow.AllWindows)]
public class Window : ContentControl


<Window>
  Content
</Window>



[LocalizabilityAttribute(LocalizationCategory::Ignore)]
[UIPermissionAttribute(SecurityAction::InheritanceDemand, 
Window = UIPermissionWindow::AllWindows)]
public ref class Window : public ContentControl



<Window>
  Content
</Window>





[<LocalizabilityAttribute(LocalizationCategory.Ignore)>]
[<UIPermissionAttribute(SecurityAction.InheritanceDemand, 
Window = UIPermissionWindow.AllWindows)>]
type Window =  
    class 
        inherit ContentControl 
    end




<Window>
  Content
</Window>




'Declaration
<LocalizabilityAttribute(LocalizationCategory.Ignore)> _
<UIPermissionAttribute(SecurityAction.InheritanceDemand, 
Window := UIPermissionWindow.AllWindows)> _
Public Class Window _
	Inherits ContentControl


<Window>
  Content
</Window>



















Vb.Net ListBox Oluşturma ve ListBox Kullanımı | ListBox Constructor



Vb.Net ListBox Oluşturmak | ListBox Constructor

'Declaration
Public Sub New




The following code example demonstrates how to create a ListBox control 
that displays multiple items in columns and can have more than one item 
selected in the control's list. The code for the example adds 50 items 
to the ListBox using the Add method of the ListBox::ObjectCollection 
class and then selects three items from the list using the SetSelected 
method. The code then displays values from the 
ListBox::SelectedObjectCollection collection, through the SelectedItems 
property, and the ListBox::SelectedIndexCollection, through the 
SelectedIndices property. This example requires that the code is located 
in and called from a Form



Private Sub button1_Click(sender As Object, e As System.EventArgs)
     ' Create an instance of the ListBox. 
     Dim listBox1 As New ListBox()
     ' Set the size and location of the ListBox.
     listBox1.Size = New System.Drawing.Size(200, 100)
     listBox1.Location = New System.Drawing.Point(10, 10)
     ' Add the ListBox to the form. 
     Me.Controls.Add(listBox1)
     ' Set the ListBox to display items in multiple columns.
     listBox1.MultiColumn = True 
     ' Set the selection mode to multiple and extended.
     listBox1.SelectionMode = SelectionMode.MultiExtended

     ' Shutdown the painting of the ListBox as items are added.
     listBox1.BeginUpdate()
     ' Loop through and add 50 items to the ListBox. 
     Dim x As Integer 
     For x = 1 To 50
         listBox1.Items.Add("Item " & x.ToString())
     Next x
     ' Allow the ListBox to repaint and display the new items.
     listBox1.EndUpdate()

     ' Select three items from the ListBox.
     listBox1.SetSelected(1, True)
     listBox1.SetSelected(3, True)
     listBox1.SetSelected(5, True)

     ' Display the second selected item in the ListBox to the console.
     System.Diagnostics.Debug.WriteLine(listBox1.SelectedItems(1).ToString())
     ' Display the index of the first selected item in the ListBox.
     System.Diagnostics.Debug.WriteLine(listBox1.SelectedIndices(0).ToString())
 End Sub



F# ListBox Oluşturma ve ListBox Kullanımı | ListBox Constructor




F# ListBox Oluşturmak | ListBox Constructor


new : unit -> ListBox


The following code example demonstrates how to create a ListBox control 
that displays multiple items in columns and can have more than one item 
selected in the control's list. The code for the example adds 50 items 
to the ListBox using the Add method of the ListBox.ObjectCollection class
and then selects three items from the list using the SetSelected method. 
The code then displays values from the ListBox.SelectedObjectCollection 
collection, through the SelectedItems property, and the 
ListBox.SelectedIndexCollection, through the SelectedIndices property. 
This example requires that the code is located in and called from a Form.








C# ListBox Oluşturma ve ListBox Kullanımı | ListBox Constructor




C# ListBox Oluşturmak | ListBox Constructor

public ListBox()


The following code example demonstrates how to create a ListBox control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the ListBox using the Add method of the ListBox.ObjectCollection class and then selects three items from the list using the SetSelected method. The code then displays values from the ListBox.SelectedObjectCollection collection, through the SelectedItems property, and the ListBox.SelectedIndexCollection, through the SelectedIndices property. This example requires that the code is located in and called from a Form.



private void button1_Click(object sender, System.EventArgs e)
{
   // Create an instance of the ListBox.
   ListBox listBox1 = new ListBox();
   // Set the size and location of the ListBox.
   listBox1.Size = new System.Drawing.Size(200, 100);
   listBox1.Location = new System.Drawing.Point(10,10);
   // Add the ListBox to the form. 
   this.Controls.Add(listBox1);
   // Set the ListBox to display items in multiple columns.
   listBox1.MultiColumn = true;
   // Set the selection mode to multiple and extended.
   listBox1.SelectionMode = SelectionMode.MultiExtended;

   // Shutdown the painting of the ListBox as items are added.
   listBox1.BeginUpdate();
   // Loop through and add 50 items to the ListBox. 
   for (int x = 1; x <= 50; x++)
   {
      listBox1.Items.Add("Item " + x.ToString());
   }
   // Allow the ListBox to repaint and display the new items.
   listBox1.EndUpdate();

   // Select three items from the ListBox.
   listBox1.SetSelected(1, true);
   listBox1.SetSelected(3, true);
   listBox1.SetSelected(5, true);

   // Display the second selected item in the ListBox to the console.
   System.Diagnostics.Debug.WriteLine(listBox1.SelectedItems[1].ToString());
   // Display the index of the first selected item in the ListBox.
   System.Diagnostics.Debug.WriteLine(listBox1.SelectedIndices[0].ToString());             
}


referance:
https://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.listbox(v=vs.110).aspx


Object reference not set to an instance of an object 5

Object reference not set to an instance of an object 5

Complete the catch function


It is time to supplement the use of the catch function to make the error message more attractive. Here is the code:
''' <summary>
''' crash test and how to improve your coding
''' </summary>
''' <remarks></remarks>
Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgsHandles MyBase.Load

    End Sub
    ''' <summary>
    ''' pressing button1 will crash he program
    ''' this crash is the typical crashing type for all beginners
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgsHandles Button1.Click
        Dim aString() As String 'declare and array only


        Try
            'a crash will occur and the code won't be able to handle it
            MsgBox(aString(0)) ' you do something with the array and and array is nothing

        Catch ex As Exception
            MsgBox(ex.StackTrace, MsgBoxStyle.Exclamation, ex.Message) 'add basic error message here
        End Try

       
    End Sub
End Class



Adding arguments to the function Msgbox, we enrich the MsgBox window. Here's what happens when you run the function and the program crashes:
catch MsgBox

Now all the functions that you create will have the function Try and catch function. Throughout your catch function, I recommend you use the StackTrace property with the small exclamation icon. Yes, a picture is worth a thousand words, do not forget.
This technique protection code is very simple and only take 4 lines! Use it.
If you like this post, leave a comment or share it.


Object reference not set to an instance of an object 4





Object reference not set to an instance of an object (part 4)

Complete the catch function


It is time to supplement the use of the catch function to make the error message more attractive. Here is the code:
''' <summary>
''' crash test and how to improve your coding
''' </summary>
''' <remarks></remarks>
Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgsHandles MyBase.Load

    End Sub
    ''' <summary>
    ''' pressing button1 will crash he program
    ''' this crash is the typical crashing type for all beginners
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgsHandles Button1.Click
        Dim aString() As String 'declare and array only


        Try
            'a crash will occur and the code won't be able to handle it
            MsgBox(aString(0)) ' you do something with the array and and array is nothing

        Catch ex As Exception
            MsgBox(ex.StackTrace, MsgBoxStyle.Exclamation, ex.Message) 'add basic error message here
        End Try

       
    End Sub
End Class



Adding arguments to the function Msgbox, we enrich the MsgBox window. Here's what happens when you run the function and the program crashes:
catch MsgBox

Now all the functions that you create will have the function Try and catch function. Throughout your catch function, I recommend you use the StackTrace property with the small exclamation icon. Yes, a picture is worth a thousand words, do not forget.
This technique protection code is very simple and only take 4 lines! Use it.
If you like this post, leave a comment or share it.


Object reference not set to an instance of an object 3

Object reference not set to an instance of an object 3

StackTrace Property


The use of the function catch in the function try is very important. It is so important because it allows the programmer to build programs faster. From my humble opinion, I've always found that too many programmers neglect error handling in their conceptions of computer code. The result is that development times are longer and of lower quality. Employers who submit projects must impose basic techniques for handling errors. Because time is money.

Today, I took the opportunity to change the function catch easily. This change will allow the programmer to better identify and quickly correct errors or stops programs. We will use the StackTrace property. Watch the following code:

''' <summary>
''' crash test and how to improve your coding
''' </summary>
''' <remarks></remarks>
Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgsHandles MyBase.Load

    End Sub
    ''' <summary>
    ''' pressing button1 will crash he program
    ''' this crash is the typical crashing type for all beginners
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgsHandles Button1.Click
        Dim aString() As String 'declare and array only


        Try
            'a crash will occur and the code won't be able to handle it
            MsgBox(aString(0)) ' you do something with the array and and array is nothing

        Catch ex As Exception
            MsgBox(ex.StackTrace) 'add basic error message here
        End Try

       
    End Sub
End Class


Others will write a custom phrase in the Msgbox. For example: "Error in function displays the table, please contact your Mr. XYZ."
In the two cases cited as an example, you will find cumbersome to identify where the error occurred. This is why the StackTrace property displays the function and the line of code where the error occurred.

When generating the error, the error message becomes much more explicit. (See image)
We immediately see the file, the function and the line of code where the error occurred.
So, you could line the line and directly infer the causes of the error message. Ends managements error complicated and customized for each of your many functions.
Eventually the error messages that mean nothing:




101 Adet Visual Basic ve C# Kod Örnekleri İndir

Developer Tools

101 Visual Basic and C# Code Samples

Language:  English            







Günün Fırsatı
isim isim isim isim isim isim