Kayıtlar

Android loading screen

Start Activity class package com.gsm.androidproject; import android.app.Activity; import android.content.Intent; import android.database.sqlite.SQLiteDatabase; import android.os.AsyncTask; import android.os.Bundle; import android.widget.ProgressBar; import android.widget.TextView; public class StartActivity extends Activity {     //private Thread thread;     private TextView dbCreatedInfo;     private TextView loadingText;     private ProgressBar bar ;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_start_layout);         /*         dbCreatedInfo =  (TextView) findViewById(R.id.dbLoadLabel);         bar = (ProgressBar) findViewById(R.id.pr...

Scroll on RelativeLayout on Android

< ScrollView xmlns : android = "http://schemas.android.com/apk/res/android" android : fillViewport = "true" android : padding = "10px" android : layout_height = "fill_parent" android : layout_width = "fill_parent" > < RelativeLayout android : id = "@+id/scrollable_places" android : layout_height = "wrap_content" android : layout_width = "wrap_content" > </ RelativeLayout > </ ScrollView >

Turn off resize textarea

CSS to disable resizing The CSS to disable resizing for all textareas looks like this: textarea { resize : none ; } You could instead just assign it to a single textarea by name (where the textarea HTML is ): textarea [ name = foo ] { resize : none ; } Or by id (where the textarea HTML is ): #foo { resize : none ; }

How to view the SQLite database on your Android Emulator

Resim
How to view the SQLite database on your Android Emulator This tutorial will show you how to open a SQLite datbase from your Android emulator. This requires Eclipse and the Android plugin. If you don't have them, follow this tutorial . This also requires a SQLite viewer. I used SQLite Database Browser . Step 1 With Eclipse open and your emulator running select the DDMS perspective by clicking on the Window -> Open Perspective -> DDMS menu option. Step 1 Step 2 Select the emulator you have currently have running.  Click the File Explorer tab Find the data folder. Step 2 Step 3 Follow the filepath to the application you want /data/data/your.app.namespace/dbname.db Click the Pull a file from the device button and save the database file on your computer. Step 3 Step 4 Open the SQLite Database Viewer and click Open Database.  Open the file and you can browse the data and view the schema! Step 4 This can reall...

Dynamic SQL Scripts

SqlConnection sql =new SqlConnection("Server=(local); User id=sa; Password=sa; Database=Friends"); sql.Open(); string sadsoyad="koray",smeslek=" bilgisayar",yer="......",mail= "i@",tel="2143234"; string sdogum="12.12.1987"; string id=textBox1.Text; Dataset1 dataSet1=new Dataset1(); string sorgu="UPDATE "; string tabloAd=dataSet1.Tables[1]. TableName; string set1=" SET"; string where=" WHERE "; string update=" adSoyad='"+sadsoyad+"',meslek= '"+smeslek+"',dogumTarihi='"+ sdogum+"',yasadigiYer='"+yer+" ',eMail='"+mail+"',telefon='"+ tel+"' "; string edilecek=" adSoyad='"+sadsoyad+"' "; sorgu+=tabloAd; sorgu+=set1; sorgu+=update; sorgu+=where; sorgu+=edilecek; textBox2.Text=sorgu ; SqlCommand komut=new SqlCommand(sorgu,sql); komut.ExecuteNonQuer...

Set span width

spans default to inline style, which you can't specify the width of. display : inline - block ; would be a good way, except IE doesn't support it

Parsing a URL

Sample - 1 import java.net.*; import java.io.*; public class ParseURL { public static void main(String[] args) throws Exception { URL aURL = new URL("http://example.com:80/docs/books/tutorial" + "/index.html?name=networking#DOWNLOADING"); System.out.println("protocol = " + aURL.getProtocol()); System.out.println("authority = " + aURL.getAuthority()); System.out.println("host = " + aURL.getHost()); System.out.println("port = " + aURL.getPort()); System.out.println("path = " + aURL.getPath()); System.out.println("query = " + aURL.getQuery()); System.out.println("filename = " + aURL.getFile()); System.out.println("ref = " + aURL.getRef()); } } Here is the output displayed by the program: protocol = http authority = example.com:80 host = example.com port = 80 path = /docs/boo...