Top10 Hardware OC Yarışması

occontest

Eğer Türkiye sınırları içerisindeyseniz ve overclocking meraklısıysanız tatmin edici ödüllerin olduğu bu yarışmaya katılmanızı öneririm. ;)

Items Per Page Plugin for ExtJS

It is a plugin to change dynamically the number of items displayed in a grid.

Plugin code:

/**
 * ExtJS component to display number of items per page
 *
 * @copyright       2009 Erhan Abay
 * @author          Erhan Abay
 * @version         $Revision$
 * @lastmodified    $Date$
 */
Ext.ux.PerPageField = Ext.extend(Object, {
	beforeText : '',
	afterText : 'items per page',
	constructor : function(config) {
		Ext.apply(this, config);
	},
	init : function(grid) {
		this.grid = grid;
		this.grid.on({
			render : function() {
				this.grid.bottomToolbar.add(['-', '-',
						this.beforeText, this.combo,
						this.afterText]);
			},
			scope : this
		});
		this.combo = new Ext.form.ComboBox({
			store : ['5', '10', '20', '50', '100', '200'],
			mode : 'local',
			triggerAction : 'all',
			width : 50,
			listClass : 'x-combo-list-small',
			maskRe : /^[0-9]$/,
			value : grid.bottomToolbar.pageSize,
			listeners : {
				'collapse' : function(f) {
					this.triggerEvent(f);
				},
				'specialkey' : function(f, e) {
					if (e.getKey() == e.ENTER) {
						this.triggerEvent(f);
					}
				},
				scope : this
			}
		});
	},
	triggerEvent : function(f) {
		var o = {
			start : 0
		};
		var v = parseInt(f.getRawValue());
		this.grid.store.baseParams = this.grid.store.baseParams || {};
		this.grid.store.baseParams['limit'] = v;
		this.grid.bottomToolbar.pageSize = v;
		this.grid.store.reload({
			params : o
		});
	}
});
Ext.preg('perpagefield', Ext.ux.PerPageField);

Usage:

var grid = new Ext.grid.GridPanel({
...
    plugins: [{
        ptype: 'perpagefield',
        beforeText: '',
        afterText: ''
    }],
...
});</pre>

Firefox localhost redirection solution

This applies to Windows 7 and Firefox 3.52. I don’t know it works on other versions.

If your Firefox redirects localhost to www.localhost.com and makes you crazy follow the steps:

  • Open C:\Windows\System32\drivers\etc\hosts and remove “#” from “127.0.0.1       localhost”. Don’t forget to open file with administrator rights otherwise you cannot save it. If  you can’t find the way, copy the file to desktop, edit and move to the original location.
  • Open network connection properties and disable IPv6network-properties
Page 4 of 14« First...23456...10...Last »