Re: Yeni Kodlar

1 view
Skip to first unread message
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

kasif

unread,
Oct 16, 2009, 11:18:20 AM10/16/09
to Dizgi projesi iletisim grubu
Lisans durumu ile ilgili düşüncemi daha önce şu adreste
http://groups.google.com/group/dizgi-projesi/browse_thread/thread/1d4fe65c9788cd76
belirtmiştim. Bunlara ek olarak lisans bilgisi içeren metinler kod
sayfasını dahada karışık yapmaktan başka bir işe yaramıyor bence,
üstelik eklediğin metin İngilizce, biz Türkçe bir sınıfı, Türkçe bir
ortamda (mesajlar, açıklamalr v.s.) geliştirmeye çalışıyoruz. Bence bu
durum biraz tuhaf oluyor.

ASCIIkucukHarf();
ASCIIbuyukHarf();

Bu ekledigin iki metot iyi olmuş ama bunları depoya atmadığın için
deneyemedim. Eğer depoya eklersen bende projeyi indirip deneyebilirim.
Ayrıca metotlara Türkçe desteğide eklemişsin çok güzel, umarım doğru
çalışır. Ben hala Türkçe karakterleri doğru bir şekilde kullanabilmek
için daha genel metodlar arıyorum. o sebeple bu ara projeye pek bir
şey ekleyemedim. Bu arada projeye geliştirici olarak katılacaklar için
bir rehber ekledim. Sende bir bak bakalım sence eklememiz gereken
başka şeyler var mı? Adresi : http://code.google.com/p/dizgi/wiki/gelistirici_rehberi


On 16 Ekim, 17:04, CrimeCoder <CrimeCo...@hotmail.com> wrote:
> son düzenleme tarihlerini güncellemeyi unutumuşum
>
> On 16 Ekim, 17:03, CrimeCoder <CrimeCo...@hotmail.com> wrote:
>
>
>
>
>
> > #ifndef DIZGICLASS_H
> > #define DIZGICLASS_H
>
> > // bu DizgiClass.h standart başlık dosyasıdır
>
> > /*
> > /*******************************************************************\
> >  Dosya Adı : dizgiclass.h                                           \
> >  Dosya Açıklaması : Dizgi Sınıfını barındırır.                      \
> >  Dizgi Sınıfı standart string işlemlerini ve                        \
> >  birkaç ekstradan işlemi Türkçe karakterleri destekleyerek yapar.   \
> >  Programlama : kasif - kas...@yahoo.com                             \
> >  Programlama : CrimeCoder - CrimeCo...@hotmail.com                  \
> >  Düzenleme : CrimeCoder - CrimeCo...@hotmail.com                    \
> >  Son Düzenlenme Tarihi : 7 Ekim 2009 14:32                          \
> > /*******************************************************************\
> > */
>
> > #include <iostream>,
>
> > #define Dizgi   dizgi
>
> > class dizgi
> > {
> >     friend std::ostream &operator<<(std::ostream &giden, const Dizgi
> > &dzg);
> >     friend std::istream &operator>>(std::istream &gelen, Dizgi &dzg);
>
> > private:
> >         int boy;                                        // nesneye
> > yüklenen dizginin boyu
> >         char * veri;                                    // nesneye
> > yüklenen dizginin göstergeçi
> >                 char *gecerli_yerel;                            // geçerli yerel
> > bilgisi
>
> >         void degistir(Dizgi &digeri);                   // hizmet
> > fonksyonu
>
> > public:
> >         Dizgi();                                        // varsayılan
> > kurucu
> >         Dizgi(const Dizgi &dzg);                        // kopya
> > kurucu
> >         Dizgi(char k, unsigned int adet);               // kurucu
> >         Dizgi(const char *str);                         // kurucu
> >         ~Dizgi();                                       // yıkıcı
>
> >         unsigned int boyu() const;                      // erişim
> > fonksyonu
>
> >         Dizgi &operator= (const Dizgi &digeri);         // atama
> > operatörü
> >         operator char* ();                              // çevirme
> > operatörü
> >         operator const char* () const;                  // çevirme
> > operatörü (const)
> >         char operator[] (int index) const;              // index
> > operatörü
> >         Dizgi operator+ (const Dizgi &dzg);             // toplam
> > operatörü
>
> >         int karsilastir(const Dizgi &dzg) const;        // üye
> > fonksyon
> >         Dizgi ekle(const char k, int index);            // üye
> > fonksyon
> >         Dizgi ekle(const Dizgi &dzg, int index);        // üye
> > fonksyon (aşırı yüklenmiş)
> >         Dizgi kopyala(int baslangic, int adet);         // üye
> > fonksyon
> >                 void ASCIIbuyukHarf();                          // üye fonksyon
> >                 void ASCIIkucukHarf();                          // üye fonksyon
>
> > };
>
> > /*
> > __________________________________________________
> > |   /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\   |
> > |   /   Copyright © 2009 kasif                \   |
> > |   /   Copyright © 2009 CrimeCoder           \   |
> > |   /   This header file distributed under    \   |
> > |   /   the terms of the GNU Lesser General   \   |
> > |   /   Public License.                       \   |
> > |   /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\   |
> > |-------------------------------------------------|
> > */
>
> > /*************************************************\
> >                  Please,read this!
> >                                  ----Oku şunu!----
> > __________________________________________________
> >                    GNU LESSER GENERAL PUBLIC LICENSE
> >                        Version 3, 29 June 2007
>
> >  Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
> >  Everyone is permitted to copy and distribute verbatim copies
> >  of this license document, but changing it is not allowed.
>
> >   This version of the GNU Lesser General Public License incorporates
> > the terms and conditions of version 3 of the GNU General Public
> > License, supplemented by the additional permissions listed below.
>
> >   0. Additional Definitions.
>
> >   As used herein, "this License" refers to version 3 of the GNU Lesser
> > General Public License, and the "GNU GPL" refers to version 3 of the
> > GNU
> > General Public License.
>
> >   "The Library" refers to a covered work governed by this License,
> > other than an Application or a Combined Work as defined below.
>
> >   An "Application" is any work that makes use of an interface provided
> > by the Library, but which is not otherwise based on the Library.
> > Defining a subclass of a class defined by the Library is deemed a mode
> > of using an interface provided by the Library.
>
> >   A "Combined Work" is a work produced by combining or linking an
> > Application with the Library.  The particular version of the Library
> > with which the Combined Work was made is also called the "Linked
> > Version".
>
> >   The "Minimal Corresponding Source" for a Combined Work means the
> > Corresponding Source for the Combined Work, excluding any source code
> > for portions of the Combined Work that, considered in isolation, are
> > based on the Application, and not on the Linked Version.
>
> >   The "Corresponding Application Code" for a Combined Work means the
> > object code and/or source code for the Application, including any data
> > and utility programs needed for reproducing the Combined Work from the
> > Application, but excluding the System Libraries of the Combined Work.
>
> >   1. Exception to Section 3 of the GNU GPL.
>
> >   You may convey a covered work under sections 3 and 4 of this License
> > without being bound by section 3 of the GNU GPL.
>
> >   2. Conveying Modified Versions.
>
> >   If you modify a copy of the Library, and, in your modifications, a
> > facility refers to a function or data to be supplied by an Application
> > that uses the facility (other than as an argument passed when the
> > facility is invoked), then you may convey a copy of the modified
> > version:
>
> >    a) under this License, provided that you make a good faith effort
> > to
> >    ensure that, in the event an Application does not supply the
> >    function or data, the facility still operates, and performs
> >    whatever part of its purpose remains meaningful, or
>
> >    b) under the GNU GPL, with none of the additional permissions of
> >    this License applicable to that copy.
>
> >   3. Object Code Incorporating Material from Library Header Files.
>
> >   The object code form of an Application may incorporate material from
> > a header file that is part of the Library.  You may convey such object
> > code under terms of your choice, provided that, if the incorporated
> > material is not limited to numerical parameters, data structure
> > layouts and accessors, or small macros, inline functions and templates
> > (ten or fewer lines in length), you do both of the following:
>
> >    a) Give prominent notice with each copy of the object code that the
> >    Library is used in it and that the Library and its use are
> >    covered by this License.
>
> >    b) Accompany the object code with a copy of the GNU GPL and this
> > license
> >    document.
>
> >   4. Combined Works.
>
> >   You may convey a Combined Work under terms of your choice that,
> > taken together, effectively do not restrict modification of the
> > portions of the Library contained in the Combined Work and reverse
> > engineering for debugging such modifications, if you also do each of
> > the following:
>
> >    a) Give prominent notice with each copy of the Combined Work that
> >    the Library is used in it and that the Library and its use are
> >    covered by this License.
>
> >    b) Accompany the Combined Work with a copy of the GNU GPL and this
> > license
> >    document.
>
> >    c) For a Combined Work that displays copyright notices during
> >    execution, include the copyright notice for the Library among
> >    these notices, as well as a reference directing the user to the
> >    copies of the GNU GPL and this license document.
>
> >    d) Do one of the following:
>
> >        0) Convey the Minimal Corresponding Source under the terms of
> > this
> >        License, and the Corresponding Application Code in a form
> >        suitable for, and under terms that permit, the user to
> >        recombine or relink the Application with a modified version of
> >        the Linked Version to produce a modified Combined Work, in the
> >        manner specified by section 6 of the GNU GPL for conveying
> >        Corresponding Source.
>
> >        1) Use a suitable shared library mechanism for linking with the
> >        Library.  A suitable mechanism is one that (a) uses at run time
> >        a copy of the Library already present on the user's computer
> >        system, and (b) will operate properly with a modified version
> >        of the Library that is interface-compatible with the Linked
> >        Version.
>
> >    e) Provide Installation Information, but only if you would
> > otherwise
> >    be required to provide such information under section 6 of the
> >    GNU GPL, and only to the extent that such information is
> >  
>
> ...
>
> tamamını oku »
Message has been deleted
Message has been deleted

kasif

unread,
Oct 17, 2009, 7:37:28 AM10/17/09
to Dizgi projesi iletisim grubu
"tr_TR" bildirimini karsilastir() metotunda kullandım. Doğruyu
söylemek gerekirse setlocale() işlevini tam olarak bilmiyorum ve zaten
bu fonksiyon aslında C++ 'a ait değilmiş, normalde bu bir C fonksiyonu
ve C++ için bunun benzeri locale sınıfıdır. Ancak hala tam olarak
kullanımını çözemediğim için kodları değiştiremedim. karsilastir()
metodu şimdiki haliylede başarıyla çalışıyor. Acaba sen metodu denedin
ve hata mı aldın? Hata neydi, benim denemelerimde ve yazdığım
testlerde bu metot sorunsuzca çalıştı, üstelik Türkçe karakterlerle
birlikte çalıştı, bence tekrar kontrol et ve hatayı bildir.

C++ 'da bir sınıf iki farklı dosya ile tanımlanır. Birincisi sınıf
için arayüz dosyası olan .h dosyasıdır. Bu dosya sınıf tanımları,
yapılar, sabitler gibi bilgileri içerir. İkinci dosya .cpp dosyasıdır
ve bu dosya üye fonksiyon tanımlarını içerir ve bu standarttır. Biz
tabi ki böyle yapmak zorunda değiliz ama bu iyi bir yazılım geliştirme
kuralıdır. Bunun yanında C veya C++ kodlarken #include ifadesi ile
eklediğin bir çok .h başlık dosyasıda bu temel mantığa dayanır. Yani
merak etme bizim .h ve .cpp dosyalarımızı kullanan kullanıcı zaten o
dosyalarla ilgilenmeyecek sadece dizgi.h dosyasını projesine ekleyecek
ve işlemlerine devam edecek. Sonuçta #include <dizgi.h> dediğin zaman
zaten kullanıcı dizgi sınıfının tüm özelliklerini kullanabilecek,
neden ek bir dosya daha tanımladın senin dosyanı eklemenin #include
<dizgi.h> eklenmesinden hiç bir farkı yok, sadece bizim işimizi biraz
daha karıştırıyor hepsi bu.

operator= metodundaki sıkıntı bellek tahsisatı yapılmadan kullanılmaya
çalışıldığı için hata veriyor. Kodu düzelttim ama şu sıralar Türkçe
karakterlerle uğraştığım için henüz depoya aktaramadım.



On 17 Ekim, 08:53, CrimeCoder <CrimeCo...@hotmail.com> wrote:
> = operatörünü ve degistir fonksyonunu tekrar gözden
> geçirmelisin.degistir fonksyonunu kullanmadım ama = operatörü o
> fonksyonu kullanıyor ve çalışırken run time hatası veriyor.hata "acces
> violation reading location".
>
> On 17 Ekim, 08:50, CrimeCoder <CrimeCo...@hotmail.com> wrote:
>
> > Haklısın.lisans, kodları çok uzatıyor.lisan sözleşmesi yerine bu
> > sözleşmenin bulunduğu sayfanın adresini koyacağım.Sayfayı şuan
> > inceliyorum.
>
> > Kodları incelerken bazı fonksyonlarda "tr_TR" local ine geçtiğini
> > gördüm.bu yöntem işe yaramaz çünkü dizginin içerisinde türkçe karakter
> > varsa fonksyon çağırılmadan önce atanmış demektir.bundan dolayı
> > karakter kodları gönderilirken türkçe karakterler için yanlış kod
> > gönderilecektir.Projemizin amaçlarının arasında türkçe karakterleri
> > desteklemek de var.bunun için dizgi sınıfı kurulurken türkçeye geçilip
> > yıkılırken eski local e geri dönülmeli.kodları denedim.sorunsuz
> > çalışıyorlar.
> > dizgi sınıfı tanımlamasını başka dosyada,fonksyon tanımlamalarını
> > başka dosyada yapmışssın.kullanan kişiye zorluk olması diye dizgi.h
> > diye bir dosya yaptım.sınıfı ve fonksyonları include ediyor.
>
> > On 16 Ekim, 18:18, kasif <kas...@yahoo.com> wrote:
>
> > > Lisans durumu ile ilgili düşüncemi daha önce şu adrestehttp://groups.google.com/group/dizgi-projesi/browse_thread/thread/1d4...
> ...
>
> tamamını oku »

kasif

unread,
Oct 23, 2009, 11:10:06 AM10/23/09
to Dizgi projesi iletisim grubu
CremeCoder, iki güzel fonksiyon yazdın ama hala projeye
eklenemediler :) Hadi şu SVN işini çözde projede senin
fonksiyonlarınıda görelim ve inceleyelim, güzel güzel duruyorlar
burada :)
> ...
>
> tamamını oku »

Murat ÇAKMAK

unread,
Nov 6, 2009, 8:00:24 AM11/6/09
to Dizgi projesi iletisim grubu
Merhaba Arkadaşlar,
söyleyeceklerim çok önemli değil.
İşlevsiz kod gördüm. Uyarmak istedim. Tabi bu kodlar programın
çalışmasına hata anlamında etki etmemktedir.

for (int x = 65; x <= 90; x++)
if (veri[i] == x)
veri[i] = x + 32;
else
veri[i] = veri[i];

Burada if deyiminin else bloğu işlevsizdir. veri[i] zaten veri[i]
olduğundan bir kez daha atamaya gerek yoktur.
Else bloğu işlevsizdir, kaldırılabilir.
İlk bakışta bunların önemi yok gibi gözükse de projeler büyüyünce hata
vermeyen yanlışlıklar - bug(böcek) - riskini arttırmaktadır.

Çalışmalarınızda başarılar.
İyi günler.
> ...
>
> tamamını oku »
Message has been deleted
Message has been deleted

kasif

unread,
Nov 7, 2009, 5:10:17 AM11/7/09
to Dizgi projesi iletisim grubu
Murat ilgilendiğin için öncelikle ben teşekkür ederim. Diğer taraftan
küçükte olsa hata hatadır ve düzeltilmesi gerekir. Bu bağlamda hatayı
gösterdiğin için saolasın ama o gösterdiğin hataları içeren kodlar
zaten depoya eklenmediler. O kodları CrimeCoder buradaki
konuşmalarımıza istinaden mesajına eklemiş.

Eğer kod gözden geçirmesi (Code Review) yaparak yardımcı olmak
istersen, bu beni çok mutlu eder ama bu işi yapmak için burada bulunan
mesajları kullanmak yerine depomuzda bulunan kod inceleme bölümünü
kullanırsan bu şekilde çok daha fazla yardımcı olmuş olursun.
Depo adresi : http://code.google.com/p/dizgi/
Reply all
Reply to author
Forward
0 new messages