30 Kasım 2016 Çarşamba

Postgresql 9.* remote access

First find pg_hba.conf and postgresql.conf files in your terminal with

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:

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";

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.

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE table1;
SET FOREIGN_KEY_CHECKS = 1;

Good luck!

20 Eylül 2015 Pazar

Serious sam 3: fatal error cannot set display mode hatası (error)


I had an "fatal error cannot set display mode error" error while installing Serious Sam 3 on Windows 7. The solution is so simple. You can download the Directx web installer from https://support.microsoft.com/tr-tr/kb/179113 and then restart the computer. Enjoy it !

Windows 7 üzerine Serious sam 3 kurarken "fatal error cannot set display mode error" hatası aldım. Sorunun çözümü gayet basit. https://support.microsoft.com/tr-tr/kb/179113 adresinden Directx web kurulumunu indirin kurun ve bilgisayarınızı yeniden başlatın. İyi eğlenceler.

12 Ağustos 2015 Çarşamba

Ubuntu Texlive + Texstudio Kurulumu


Ubuntu makine üzerinde çalışıyorsanız ve latex ile çalışmanız gerekiyorsa kesinlikle bunun için biçilmiş kaftan olan Texstudio editörüdür. Texlive motoru ile kullanıldığında hızlı ve sorunsuz çalışan ikiliyi bilgisayarınıza kurmak için terminalı açıp aşağıdaki komutları girmeniz yeterlidir.

sudo apt-get install texlive & sudo apt-get install texstudio

Texlive'in full sürümü için ise

sudo apt-get install texlive-full

komutunu kullanmanız yeterli olacaktır.

8 Ağustos 2015 Cumartesi

Örnek başlangıç LaTeX şablonu

Makale ya da rapor yazmaya başlamadan önce çalışmalarınıza hızlıca başlayabileceğiniz Türkçe karakter destekli örnek LaTeX şablonu.

\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\title{Örnek \LaTeX{} Şablonu}
\author{Yazar adı}
\maketitle
\begin{abstract}
Özet alanı.
\end{abstract}
\section{Giriş}
İçerik alanı. Denklem eklemek için,
\begin{equation}
\label{ornek_denklem}
\alpha = \sqrt{ \beta }
\end{equation}
\subsection{Alt başlık}
Alt başlık alanı \cite{cite1}.
\section{Sonuç}Sonuç alanı
\begin{thebibliography}{}
\bibitem{cite1} Yazar adları, Yayın adı, Dergi Adı, Sayı, Yılı, Sayfa aralıkları.
\end{thebibliography}
\end{document}