TRUNCATE TABLE table_name RESTART IDENTITY;
Yarınlar yorgun ve bezgin kimselere değil, rahatını terk edebilen gayretli insanlara aittir.
31 Ocak 2017 Salı
11 Ocak 2017 Çarşamba
How to convert djvu files to pdf on Ubuntu ?
We need "ddjvu" command to convert the files. The following command converts your djvu files into pdf quickly:
Enjoy!
ddjvu -format=pdf -quality=80 file.djvu output.pdfIf you want to see the flow, you can add "-verbose" to end of the above code.
Enjoy!
14 Aralık 2016 Çarşamba
Ubuntu server prevent serving .git directory
Add the followings into /etc/apache2/apache2.conf file
<Directorymatch "^/.*/\.git/">
Order deny,allow
Deny from all
</Directorymatch>
30 Kasım 2016 Çarşamba
Postgresql 9.* remote access
First find pg_hba.conf and postgresql.conf files in your terminal with
and then add the following line to pg_hba.conf
locate pg_hba.conf
and then add the following line to pg_hba.conf
host all all 0.0.0.0/0 md5.After this, open postgresql.conf file and change the line
#listen_addresses='localhost'with
listen_addresses='*'.Finally, just restart postgresql service with
sudo service postgresql restart.Enjoy!
5 Ekim 2016 Çarşamba
How to fix /usr/bin/env: node: No such file or directory error
If you get this error while installing NodeJS, your Linux distro (like Ubuntu) probably uses "nodejs" instead of "node". For solution of the problem, make a symlink and it should work:
Enjoy!
ln -s /usr/bin/nodejs /usr/bin/node
Enjoy!
30 Aralık 2015 Çarşamba
How can I redirect the user from one page to another using jQuery?
You can use the following code to redirect.
// similar behavior as an HTTP redirect
window.location.replace("http://cahitkome.blogspot.com");
// similar behavior as clicking on a link
window.location.href = "http://cahitkome.blogspot.com";
window.location.replace("http://cahitkome.blogspot.com");
// similar behavior as clicking on a link
window.location.href = "http://cahitkome.blogspot.com";
14 Aralık 2015 Pazartesi
Mysql truncate foreign key constrained table
You can't TRUNCATE a table that has Foreign Key constraints applied on it (TRUNCATE is not the same as DELETE). If you want to do this action, following code will solve your problem.
Good luck!
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE table1;
SET FOREIGN_KEY_CHECKS = 1;
TRUNCATE table1;
SET FOREIGN_KEY_CHECKS = 1;
Good luck!
Etiketler:
constrained table,
foreign key,
mysql,
truncate
Kaydol:
Kayıtlar (Atom)