Aklımda Kalası Kelimeler

* давайте работать вместе
* Zarf ve Mazruf, Zerafet(xHoyratlık) ile aynı kökten(za-ra-fe) gelir
* Bedesten
* Suç subuta ermiştir - Suç sabit olmuştur
static etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
static etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

22 Ağustos 2011 Pazartesi

Okunacaklar

http://encosia.com/why-do-aspnet-ajax-page-methods-have-to-be-static/
http://www.sitepoint.com/ajax-jquery/
http://www.west-wind.com/presentations/jquery/jquerypart2.aspx


First Ajax Steps with jQuery
One of the most obvious client side features of any Javascript client library is the ability to make AJAX calls to the server. jQuery includes a host of Ajax functions that make it easy to retrieve content from a Url starting with the low level and do-everything $.ajax() function plus a number of others that are simpler and more focused to specific tasks. Here’s a list of some of the functions available:

$.ajax(opt)
This the low level Ajax function with many, many options that lets you create just about any kind of Ajax request. If you need full control over requests or you want to create a generic component that calls back to the server (like the WCF/ASMX client proxy I’ll discuss later) you’ll want to use this function. For now check out the documentation on the multitude of options available.

$(sel).load(url,data,callback)
The .load() function is the only Ajax function that works off a jQuery selector. It calls a URL on the server and loads the result as content into selected element(s). It’s a very quick and easy way to load Html fragments and inject them into the document if your result is HTML. An optional callback can be provided to be notified with the server result text when the callback completes which is useful if you want to visually adjust the retrieved content – like applying an effect to visually cue the user to an update. Note this function is heavily overloaded: If no URL is specified .load() acts as a load event handler that fires when an element has loaded its data (ie. an image or script).

$.get(url,callback),$.post(url,data,callback)
These functions are simple helpers that provide basic get and post operations to the server. You specify a URL and a callback which is called with the HTTP response from the server. $.post() also allows you to pass either formatted POST buffer string or an object the properties of which are turned into POST encoded key value pairs.

$.getJSON(url,data,callback)
Similar to $.post(), but expects the result to be JSON which is automatically deserialized into a Javascript value and passed to the callback as a parameter. While this function is handy for simple JSON results there are two things to watch out for: Dates are not parsed since there’s no date literal in Javascript, so whatever the server returns will be used (typically a string). $.getJSON() also doesn’t support JSON POST data – only POST encoded variables. This function is useful for simple JSON results returned from arbitrary services, but not usable for calling WCF or ASMX ASP.NET services since they expect JSON POST input. More on this later in the article.

.getJSON() also supports cross domain JSONP callbacks. If you specify a query string parameter of callback=? you can force the result to be routed to the callback you specify in the parameter list.

$.getScript(url,callback)
This function loads script code from the server and executes it once downloaded if no callback is specified. If specified the optional handler is fired instead and passed the Javascript, plus the current ajax request. This can be useful for JSONP cross domain callbacks where you have no control over the parameters used.

Global Ajax Events
There also a number of global Ajax events that you can take advantage of all of which take callbacks as parameters: ajaxCallback(), ajaxError(), ajaxSend(), ajaxStart(),ajaxStop(),ajaxSuccess(). These are useful for setting up global handlers that can centrally manage Ajax requests. You’re not likely to need these much unless you build components that need to know status of requests.

IEnumerable IEnumerator


http://stackoverflow.com/questions/619564/what-is-the-difference-between-ienumerator-and-ienumerable
http://codebetter.com/davidhayden/2005/03/08/implementing-ienumerable-and-ienumerator-on-your-custom-objects/
http://stackoverflow.com/questions/2635818/ienumerable-ienumerator
http://stackoverflow.com/questions/4844660/differences-between-iqueryable-list-ienumerator
http://stackoverflow.com/search?q=List+to+IEnumerator

20 Ekim 2010 Çarşamba

Javascript sınıflarına statik metot tanımlanması

Önceki yazılarımın birinde sınıf tanımı v.s. anlatmıştım. Burada da javascript sınıfın içine statik metot yazmayı eklemiş olayım:

function Sinif(){
this.YeniMetot = function(){ };
}



ya da


function Sinif(){ }

Sinif.prototype.YeniMetot = function(){ }


idi. Şimdi bu iki tanımda güzel ve aynı anlama geliyor.

Peki sınıfa bağlı yani bir sınıf örneği(nesne) oluşturmadan erişilebilen metot(statik metot) tanımlayalım.

function Sinif(){ }

Sinif.prototype.YeniMetot = function(){ }

Sinif.IsteStatikMetot = function(){ }


19 Mart 2010 Cuma

Javascript'te static ve dinamik sınıflardan nesne yaratılması


--------------------------------------------------------------------------- STATIC
function ToDo(){

}

ToDo.Liste = function(){

}

***** Kullanımı ******
var toDo = new ToDo();

// Çünkü Liste fonksiyonu ToDo sınıfından olacak nesneye bağlı değil, 
// ToDo içindeki STATIC olan Liste sınıfına bağlıdır 
var liste = new ToDo.Liste(); 

--------------------------------------------------------------------------- DYNAMIC
function ToDo(){

  this.Liste = function(){  //public bir sınıf ya da fonksiyon olarak çağırılabilir

  }

}

***** Kullanımı ******
var toDo = new ToDo();
var liste = new toDo.Liste();

13 Eylül 2009 Pazar

Java da static kavramı



/**
static degisken ve metod lara C# tan farkli olarak JAVA da, siniftan türetilmis objelerden(örneklerden, nesnelerden)
erisilebilir.
*/

public class Cem
{
static String yazi;

public Cem()
{
yazi = "yazzzzz";
}

public static void main(String[] args)
{
yaz("sininftan: " + Cem.yazi);

Cem ornek = new Cem();
yaz("ornekten: " + ornek.yazi);

Cem.yaz("statik metoda C# tan eristigimiz gibi eriselim");
ornek.yaz("statik metoda örnekten de erisebiliyorum");
}

public static void yaz(String s)
{
//System.out.println("dd");
System.out.println(s);
}
}