Barış Efe Yazıyor

Bir başka WordPress blogu.

Toplu dosya ismi değiştirme

$ ls
com.barisefe.argentinanewspapers-0.5-AD.ods com.barisefe.barisnewspapers-0.5-AD-SHOT06.png
com.barisefe.barisnewspapers-0.5-AD-ICON.png com.barisefe.barisnewspapers-0.5-AD-SHOT07.png
com.barisefe.barisnewspapers-0.5-AD-MAH.png com.barisefe.barisnewspapers-0.5-AD-SHOT10.png
com.barisefe.barisnewspapers-0.5-AD-SHOT01.png com.barisefe.barisnewspapers-0.5-AD-THUMB.png
com.barisefe.barisnewspapers-0.5-AD-SHOT02.png com.barisefe.barisnewspapers-AD-SHOT01.png
com.barisefe.barisnewspapers-0.5-AD-SHOT03.png com.barisefe.barisnewspapers-AD-SHOT08.png
com.barisefe.barisnewspapers-0.5-AD-SHOT04.png com.barisefe.barisnewspapers-AD-SHOT09.png
com.barisefe.barisnewspapers-0.5-AD-SHOT05.png org.freedictionary-2.3.1-AD.apk
$ rename -v ‘s/com.barisefe.barisnewspapers-(.*)\.png$/com.barisefe.hedenewspapers-$1\.png/’ *.png
com.barisefe.barisnewspapers-0.5-AD-ICON.png renamed as com.barisefe.hedenewspapers-0.5-AD-ICON.png
com.barisefe.barisnewspapers-0.5-AD-MAH.png renamed as com.barisefe.hedenewspapers-0.5-AD-MAH.png
com.barisefe.barisnewspapers-0.5-AD-SHOT01.png renamed as com.barisefe.hedenewspapers-0.5-AD-SHOT01.png
com.barisefe.barisnewspapers-0.5-AD-SHOT02.png renamed as com.barisefe.hedenewspapers-0.5-AD-SHOT02.png
com.barisefe.barisnewspapers-0.5-AD-SHOT03.png renamed as com.barisefe.hedenewspapers-0.5-AD-SHOT03.png
com.barisefe.barisnewspapers-0.5-AD-SHOT04.png renamed as com.barisefe.hedenewspapers-0.5-AD-SHOT04.png
com.barisefe.barisnewspapers-0.5-AD-SHOT05.png renamed as com.barisefe.hedenewspapers-0.5-AD-SHOT05.png
com.barisefe.barisnewspapers-0.5-AD-SHOT06.png renamed as com.barisefe.hedenewspapers-0.5-AD-SHOT06.png
com.barisefe.barisnewspapers-0.5-AD-SHOT07.png renamed as com.barisefe.hedenewspapers-0.5-AD-SHOT07.png
com.barisefe.barisnewspapers-0.5-AD-SHOT10.png renamed as com.barisefe.hedenewspapers-0.5-AD-SHOT10.png
com.barisefe.barisnewspapers-0.5-AD-THUMB.png renamed as com.barisefe.hedenewspapers-0.5-AD-THUMB.png
com.barisefe.barisnewspapers-AD-SHOT01.png renamed as com.barisefe.hedenewspapers-AD-SHOT01.png
com.barisefe.barisnewspapers-AD-SHOT08.png renamed as com.barisefe.hedenewspapers-AD-SHOT08.png
com.barisefe.barisnewspapers-AD-SHOT09.png renamed as com.barisefe.hedenewspapers-AD-SHOT09.png
$ ls
com.barisefe.argentinanewspapers-0.5-AD.ods com.barisefe.hedenewspapers-0.5-AD-SHOT06.png
com.barisefe.hedenewspapers-0.5-AD-ICON.png com.barisefe.hedenewspapers-0.5-AD-SHOT07.png
com.barisefe.hedenewspapers-0.5-AD-MAH.png com.barisefe.hedenewspapers-0.5-AD-SHOT10.png
com.barisefe.hedenewspapers-0.5-AD-SHOT01.png com.barisefe.hedenewspapers-0.5-AD-THUMB.png
com.barisefe.hedenewspapers-0.5-AD-SHOT02.png com.barisefe.hedenewspapers-AD-SHOT01.png
com.barisefe.hedenewspapers-0.5-AD-SHOT03.png com.barisefe.hedenewspapers-AD-SHOT08.png
com.barisefe.hedenewspapers-0.5-AD-SHOT04.png com.barisefe.hedenewspapers-AD-SHOT09.png
com.barisefe.hedenewspapers-0.5-AD-SHOT05.png org.freedictionary-2.3.1-AD.apk
$

Yorum yok

Android Webview ile orientation değişimi

Webview kullandığınız bir activityde orientation değişiminde
sayfayı yeniden yüklemeden aynı sayfanın yeni orientationda
yüklenmesini sağlamak için: 

Activity kodu içinde:

@Override
public void onConfigurationChanged(Configuration newConfig){        
    super.onConfigurationChanged(newConfig);
}

AndroidManifest.xml içinde de:

<activity android:name="..."
          android:label="@string/appName"
          android:configChanges="keyboardHidden|orientation"
yazılması gerekir.

Yorum yok

Android Projesine ant build ekleme

#android update project -p .

Yorum yok

Android telefonlarda network trafik gözlemleme

http://www.vbsteven.be/blog/android-debugging-inspectin-network-traffic-with-tcpdump/ adresinden ilgili adımlar gerçeklendikten sonra
#tcpdump-arm -efl -XX -s0
komutu ile GET / POST dataları gözlemlenebilir.

Extra bilgi: http://source.android.com/porting/tcpdump.html

Yorum yok

Android Emulator icin sdcard eklemek

#pwd
/home/gunebakan/.android/avd/adk-1.6.avd
#mksdcard 32M sdcard1.iso
#emulator -sdcard /home/gunebakan/.android/avd/adk-1.6.avd/sdcard1.iso -avd adk-1.6

Yorum yok

Fotograflarda Toplu olarak Tarih/Zaman Değiştirme

Fotograflardaki tarihleri 1 gün ileri almak için komut:
#jhead -ta+24:00 IMG_*.jpg

Yorum yok

Android emulatore Android Dev Phone 1 sistem image i yüklenerek Android Market uygulamasının çalıştırılması

http://developer.htc.com/adp.html#s3
adresinden ilgili “System Image” indirilir.

Benim ubuntu gnu/linux sistemim için
/home/gunebakan/.android/avd/adk-1.6.avd altına
system.img file ı kopyalanır…

Sistemde önceden kayıtlı android emulator konfigurasyonlarını listelemek için:

#android list avds
Available Android Virtual Devices:
Name: adk-2.0
Path: /home/gunebakan/.android/avd/adk-2.0.avd
Target: Android 2.0 (API level 5)
Skin: HVGA
———
Name: adk-1.6
Path: /home/gunebakan/.android/avd/adk-1.6.avd
Target: Android 1.6 (API level 4)
Skin: HVGA
———
Name: adk-2.1
Path: /home/gunebakan/.android/avd/adk-2.1.avd
Target: Android 2.1 (API level 7)
Skin: HVGA
———
Name: adk-1.5
Path: /home/gunebakan/.android/avd/adk-1.5.avd
Target: Android 1.5 (API level 3)
Skin: HVGA
———
Name: adk-2.0.1
Path: /home/gunebakan/.android/avd/adk-2.0.1.avd
Target: Android 2.0.1 (API level 6)
Skin: HVGA

Aşağıdaki komut çalıştırılarak android emulator başlatılır:
#emulator -wipe-data -avd adk-1.6

“Set up your Google account” skip deyip daha sonra “Home” button u ile ana ekrana geçin.
Ana ekranda market uygulaması görünecektir.
Kayıt olduktan sonra emulator yardımı ile market uygulamasını kullanabilirsiniz.

Yorum yok

MySQL’de process listesini gösterme

mysqladmin -u root -p processlist

Yorum yok

Linux ta yuksek size lı dosyalara gore sıralama

du -sk * | sort -nr | head -10

Yorum yok

Mysql cache optimizasyon

mysql> show variables like ‘query%’;
+——————————+———-+
| Variable_name | Value |
+——————————+———-+
| query_alloc_block_size | 8192 |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 16777216 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 8192 |
+——————————+———-+
7 rows in set (1.06 sec)

mysql> set global query_cache_size=50000000;
Query OK, 0 rows affected (1.56 sec)

mysql> show variables like ‘query%’;
+——————————+———-+
| Variable_name | Value |
+——————————+———-+
| query_alloc_block_size | 8192 |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 49999872 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 8192 |
+——————————+———-+
7 rows in set (0.00 sec)

Yorum yok

« Önceki SayfaSonraki Sayfa »