Okhelp.cz

Recepty, články, nápady, programování. Dříve dum-zahrada, finance, internet a know-how.okhelp.cz Pro lepší výsledky hledání používejte i diakritiku.

SQLite explorer download


AD MOB

Best of SQLite explorer and admin download for SQLite 2.x and SQLite 3.x in separated folders.

Download Explorers SQLite 2.x and SQLite 3.x in separated folders

397LW NO topic_id




AD

Další témata ....(Topics)


145

Compressing converting a bitmap to PNG format Android example | compressing-converting-a-bitmap-to-png-format-android-example



public class MainActivity extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(new SampleView(this));
	}

	private static Bitmap codec(Bitmap src, Bitmap.CompressFormat format,
			int quality) {
		ByteArrayOutputStream os = new ByteArrayOutputStream();
		src.compress(format, quality, os);

		byte[] array = os.toByteArray();
		return BitmapFactory.decodeByteArray(array, 0, array.length);
	}

	private static class SampleView extends View {

		// CONSTRUCTOR
		public SampleView(Context context) {
			super(context);
			setFocusable(true);

		}
		@Override
		protected void onDraw(Canvas canvas) {
			Paint paint = new Paint();
			
			canvas.drawColor(Color.YELLOW);
            
        
			Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.flower_blue);
             
			Bitmap bPNGcompress = codec(bmp, Bitmap.CompressFormat.PNG, 0);

		   int h = bmp.getHeight();
           
           canvas.drawBitmap(bmp, 10,10, paint);
           canvas.drawBitmap(bPNGcompress, 10,10 + h + 10, paint);
           
		}

	}
}

394

CSS circle style html | css-circle-style-html



      create div with class with name e.g. circle

      create in styleSheet.css class circle



html code

 <div class="circle" id="">3</div>


css code

.circle {
 border-radius: 50%;
    width: 50px;
    height: 50px;
    background: yellow;
    position: absolute;
    display: block;
    border: 6px solid blue;
    font-size: 50px;
    text-align: center;
}






3




















317

Unable to execute dex: Multiple dex files define Eclipse Android | unable-to-execute-dex-multiple-dex-files-define-eclipse-android


Try each step separately:


  1. Restart Eclipse

  2. Clean project and rebuild

  3. Create a new project and try it if the problem persists, if no move copy project to other folder, delete project from workspace , create new project same name and copy java, xml etc. files to new project

  4. Close Eclipse, backup folder c:\Users\myName\workspace\.metadata and delete it. Restart Eclipse try again import project to workspace


  5. Re-installing the Android Developer Tools


  6. Re-installing Eclipse - rename old folder with Android to Android_old, create new folder C:\Program Files\Android and copy new Eclipse with sdk into new folder


  7. Created a new project importing from the file system


  8. Created a new project from subversion



79

ArrayList Collections Add new Item Sort Find Item Java example | arraylist-collection-sort-add-java-example


How add item to ArrayList, sort ArrayList, search find index of item in ArrayList, min(), max() Java basic example.

import java.util.ArrayList;
import java.util.Collections;

public class MainClass {
	public static void main(String[] arg) {
		String[] arrayOfString = {"nothing", "Hello", "people"
				, "bye-bye", "hello", "world!", "End" };
		   ArrayList<String> arrayList = new ArrayList<String>();
            for(String s: arrayOfString)
		     arrayList.add(s);

		    Collections.sort(arrayList);
		    // foreach
		    for (String str: arrayList)
		      System.out.println(str);
		    
		    Object objMin = Collections.min(arrayList);
		    System.out.println("Min is: " + objMin);
		    
		    Object objMax = Collections.max(arrayList);
		    System.out.println("Max is: " + objMax);
		    
		    int index = Collections.binarySearch(arrayList, "people");
		    System.out.println("Index of people is: " + index);
		    
		  }

		
	
}
/*
End
Hello
bye-bye
hello
nothing
people
world!
Min is: End
Max is: world!
Index of people is: 5
*/
91

Class File Editor - Source not found - Change Attached Source - Eclipse | class-file-editor-source-not-found-change-attached-source-eclipse


The source attachment does not contain the source for the file TextWatcher.class.
You can change the source attachment by clicking Change Attached Source below:

You have to add JDK src.zip path to dialog as on image below.
[caption id="attachment_1091" align="alignleft" width="282" caption="class file editor source not found Eclipse warning"][/caption]



Or go to Project > Properties > Java Build Path > Libraries
Expand JRE System Library. Expand rt.jar.
Select Source attachment and double click or Edit.
Type path the source code file (External File…) and press OK.

[caption id="attachment_1094" align="alignleft" width="300" caption="Java project build path"][/caption]



Or type path in Java JRE definition



[caption id="attachment_1105" align="alignleft" width="300" caption="Java JRE deifiniton path in Eclipse"][/caption]

How open String.class or others keywords definition with Eclipse.



Now if mouse move about keywords String or F3 on keywords and press button in yellow field will opened String.class
Java Eclipse intellisense




Java-string-class-image


Editace: 2011-09-26 20:51:10
Počet článků v kategorii: 397
Url:sqlite-explorer-download

AD
11 Share
Share
Tweet