26 Kasım 2011, 23:57
Symfony 2 is great but it’s not well documented yet and there is no documentation about cookie handling as well. After a few code digging I’ve found the solution. As we know, basically, cookies are just HTTP headers and you can get them from requests or send with responses. Symfony\Component\HttpFoundation\Response class has a public property named [...]
21 Eylül 2011, 23:01
Twig: {{ app.request.attributes.get(‘_route’) }} Php: $app->getRequest()->attributes->get(‘_route’) Controller: $this->container->get(‘request’)->attributes->get(‘_route’)
21 Eylül 2011, 22:37
var myArray = ['foo', 'bar']; var elementIndex = myArray.indexOf(‘bar’); // Finding index of the element we want to remove if (elementIndex != -1) { myArray.splice(elementIndex, 1); } console.log(myArray);
30 Eylül 2007, 13:27
Günlüğe yazmayalı oldukça uzun zaman olmuş…Gerek işlerin yoğunluğu, gerekse mevsimin yaz olması nedeniyle günlüğe yazı yazmak pek aklıma gelmedi açıkçası. Bugün bir web uygulamasında smarty ile ilgili birşeyle uğraşırken smarty’nin yeri geldiğinde ne kadar faydalı bir yapı olabileceğini bir kere daha anladım. Neyse fazla uzatmayacağım. Smarty Modifiers sayesinde Php dahili (?) fonksiyonlarını doğrudan Smarty Modifiers [...]
17 Haziran 2007, 13:09
Şuradaki adresten winamp ekolayzır ayar dosyası indirilir. Daha sonra arşiv yöneticisi*[1] ile açılır. Arşivin içinden çıkan eq.preset dosyası xmms ya da audacious programlarından hangisini kullanıyorsanız onun ayar klasörünün*[2] içine kopyalanır. Program yeniden başlatılır ve winamp ekolayzır ayarları arık kullanılabilir durumdadır. *[1] Komut satırından: gunzip -c winamp_presets.gz > eq.preset*[2] Xmms için home dizini altında .xmms , [...]
13 Mart 2007, 00:45
I think Python is looking this package under the /usr/lib/mozilla directory. If you have no mozilla browser installed on your system (my system is FC6) and your application (for ex. listen, exaile) needs libgtkembedmoz.so library you probably will get this error. For the fix this problem: First create named as /etc/ld.so.conf.d/mozilla.conf And put the firefox [...]
15 Şubat 2007, 21:33
Mysql’de ip adreslerini saklamak icin varolan bir veri tipi yok malesef.Web uygulamalarımda kullanmak için watchdog tarzında bir ortam geliştirmeye başladım bugün.Ip adreslerini mantıklı bir şekilde saklamak ve daha sonra kolayca ulaşabilmek için kullanılan yöntemleri merak ettim.Google’da birkaç aramadan sonra buldugum birkaç ipucunu buraya yazayım istedim. mysql’de unsigned int(11) tipinde bir alan acip php’nin ip2long fonksiyonu [...]
15 Şubat 2007, 17:30
If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered(), and session_unregister().
11 Ocak 2007, 02:06
Download Sun’s Java Software Development Kit Version 5.0 Update 9 Open new terminal Run These commands $ su – $ cd downloaded_java_sdk_dir/ $ chmod +x jdk-1_5_0_09-linux-i586-rpm.bin $ ./jdk-1_5_0_09-linux-i586-rpm.bin Install java-1.5.0-sun-compat package via yum $ yum –enablerepo=jpackage-generic-nonfree install java-1.5.0-sun-compat For activate Java plugin in your Firefox $ ln -s /usr/java/jdk1.5.0_09/jre/plugin/i386/ns7/libjavaplugin_oji.so /your_mozilla_plugin_dir[1*] [1*] For example : /usr/lib/mozilla/plugins/ [...]
29 Aralık 2006, 12:35
The problem is… $ tar -zxvf file.tar.gz/bin/gtar: This does not look like a tar archive/bin/gtar: Skipping to next header/bin/gtar: Archive contains obsolescent base-64 headers/bin/gtar: Error exit delayed from previous errors …and the solution $ gzip -d file.tar.gz$ tar -xf file.tar