Search Blog

Search duranek.blogspot.com

Sunday, April 25, 2010

Websitesine Favicon ekleme

A favicon (short for favorites icon), also known as a website icon, shortcut icon, url icon, or bookmark icon is a 16×16, 32×32 or 64×64 pixel square icon associated with a particular website or webpage.[1] A web designer can create such an icon and install it into a website (or webpage) by several means, and most graphical web browsers will then make use of it.

<"link" rel="icon" type="image/png" href="http://example.com/image.png">

buradan generate edebilirsin : http://www.favicon.cc/

Friday, April 16, 2010

MySQL IBatis te insertten sonra auto_increment key i dönmek



SELECT LAST_INSERT_ID() AS value

INSERT INTO
deploymenttree(name,devdeploymentid,proddeploymentid,parentId)
VALUES(
#name#,#devDeploymentId#,#prodDeploymentId#,#parentId# )

Mysql de commit li sistem

Tablolari InnoDB yap
SET AUTOCOMMIT=0 yap

Changing Table's storage engine MYSQL

ALTER TABLE t1 ENGINE=InnoDB;

MySQL Transaction Safe and Transaction Not Safe Tables

What are transaction-safe tables and not transaction-safe tables in MySQL?

I am newbie to MySQL. I want to know about Transaction-Safe Tables (TST) and Not Transaction-Safe Tables (NTST). Can you help me to explain, what are Transaction-Safe Tables and Not Transaction-Safe Tables in MySQL?
Answer No: 162

MySQL supports two different kinds of tables: Transaction-Safe Tables (InnoDB and BDB etc) and Not Transaction-Safe Tables (HEAP, MERGE, and MyISAM etc). MySQL also allows to combine Transaction-Safe Tables and Not Transaction-Safe Tables tables in the same database to get the best results. However, each kind of tables has its own advantages.
Advantages of Transaction-Safe Tables

1. Safer. Even if MySQL crashes or you get hardware problems, you can get your data back, either by automatic recovery or from a backup + the transaction log.
2. You can combine many statements and accept these all in one go with the COMMIT command.
3. You can execute ROLLBACK to ignore your changes (if you are not running in auto-commit mode).
4. If an update fails, all your changes will be restored.

Advantages of Not Transaction-Safe Tables

1. Much faster as there is no transaction overhead.
2. Will use less disk space as there is no overhead of transactions.
3. Will use less memory to perform updates.

With Not Transaction-Safe Tables: If an update fails, no change will be restored as changes that have taken place are permanent.

MYSQL de bir tablonun hangi storage engine i kullandigi

SELECT ENGINE
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'test'
AND TABLE_NAME = 'products'

mysqld ye autocommit=0 parametre geçmek

--init-connect='SET AUTOCOMMIT=0'

Thursday, April 15, 2010

Eclipse & Could not reserve enough space for object heap

Hi,

In our RCP it's vital to start jvm in the same process as eclipse.exe, so we used the feature of equinox launcher to specify location of the jvm.dll as -vm property value. It was working fine until we tried to increase maximum size heap to 1100m (-vmargs -Xmx1100m) on a machine with 2GB of Ram. When we try to start it like that, we get a splash screen for a sec and after that we get the dialog "JVM terminated. Exit code=-1....". In console window we see "Error occured during initialization of VM. Could not reserve enough space for object heap."
After trying different things, we finally tried to start java in different process by specifying location of java.exe as -vm parameter to eclipse.exe. In that case we were able to start our app with -Xmx1500m without any problem.
Could somebody, pls, explain to me what's going on and if it's possible to solve that problem. Is that a problem in how eclipse.exe is loadind jvm.dll or jvm.dll is not able to handle such situation?

Same happens with official 3.3 relise as well as with the latest 3.3.1.1.
Any info/advice on how to solve that problem would be appreciated.

Thanks in advance,
Viktor

--------

The problem is that the jvm requires a contiguous block of memory. When shared
libraries are loaded by the process, they are placed at their preferred base
address in our memory space. In particular, a windows library COMCTL32.DLL
which we need for graphics (ie splashscreen) has a preferred base address of
0x5D090000 which places it in the middle of the space, which shrinks the largest
block of memory available for -Xmx.

More memory is available when running java.exe because it does not load the same
libraries right away.

Libraries can be loaded at other locations if their preferred address is already
in use, but we don't currently have a way to force this to make more memory
available for -Xmx.

-Andrew