Samet Kilictas’s Blog

Tips

How to enable TCP connections to XServer?

by Samet Kilictas on Dec.07, 2009, under Linux, Tips, Ubuntu


sudo gedit /etc/gdm/gdm.schemas

find:

<schema>
<key>security/DisallowTCP</key>
<signature>b</signature>
<default>true</default>
</schema>

shift from true to false:

<schema>
<key>security/DisallowTCP</key>
<signature>b</signature>
<default>false</default>
</schema>

VN:F [1.0.6_327]
Rating: 0.0/10 (0 votes cast)
Leave a Comment :, , more...

LaTeX equations on web? Is that all you want?

by Samet Kilictas on Nov.10, 2009, under Tips

Yes dear readers! It is really cool to have latex equations on web. There is an undocumented future of Google Chart API. It is easy to use as much as API itself. For instance, you need to include the Schrödinger equation your web page. Let’s construct an url like this:

http://chart.apis.google.com/chart?cht=tx&chf=bg,s,FFFFFF00&chco=AACCFF&chl=i\hbar\frac{\partial}{\partial t} \Psi(\mathbf{r},\,t) = \hat H \Psi(\mathbf{r},t)

Put your code in the chl parameter. The chf parameter lets you specify a background color in RGBA, chco lets you set the foreground color in RGB. When you drop it in inside of an image tag you get this:

Put your code in the chl parameter. The chf parameter lets you specify a background color in RGBA, chco lets you set the foreground color in RGB. When you drop it in inside of an image tag you get this:

If you anticipate making 250,000 calls to the chart server a day, contact Google first at chart-api-notifications@google.com. There’s no limit to how much you can use it, but they reserve the right to turn you off.

VN:F [1.0.6_327]
Rating: 0.0/10 (0 votes cast)
Leave a Comment :, , , more...

Cannot load mysqli extension. Please check your PHP configuration

by Samet Kilictas on Aug.25, 2009, under PHP, Programming, Tips

Probably you are trying to access your phpmyadmin. You will get this error  if you have more then one “php.ini” file in your system. It is kinda conflicting. For instance i have wampserver2.0 and IIS7 together in my current system. I have activated IIS7 FastCgı method to use php on it. So it has one php.ini file at path of  “c:\wamp\….” and another one in “c:\Program Files\Php” . You can get a temporary solution if you rename your php.ini file which is in your “program files” path.

That is it.

VN:F [1.0.6_327]
Rating: 7.4/10 (7 votes cast)
5 Comments :, , , more...

How to install Nvidia Driver 180.29 on your ubuntu

by Samet Kilictas on Mar.06, 2009, under HowTo, Linux, Tips, Ubuntu

If you are using older drivers then 180.29 version you should* install new drivers so you will have better performence with 180.29 version. Don’t worry it is piece of cake to install it on your ubuntu.

Firstly, go on ( System->Administration->Software Sources ) then click on “Third-Party software” tab. Now you should see a button “+Add” shows on it.

deb http://ppa.launchpad.net/anders-kaseorg/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/anders-kaseorg/ppa/ubuntu intrepid main

As you see above there is two lines of address. You should add them one-by-one by clicking this “+Add” button. when you are done with that it is time to get PPA keys for this repository.

Now use there commands

cd ~/Desktop
gedit temp.key

(continue reading…)

VN:F [1.0.6_327]
Rating: 8.5/10 (6 votes cast)
3 Comments :, , , more...

CodeIgniter How to Pagination

by Samet Kilictas on Nov.12, 2008, under General, PHP, Tips

CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you’re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you’re tired of ponderously large and thoroughly undocumented frameworks.

CodeIgniter’s Pagination class is very easy to use, and it is 100% customizable, either dynamically or via stored preferences.

If you are not familiar with the term “pagination”, it refers to links that allows you to navigate from page to page, like this:

« First < 1 2 3 4 5 > Last »

function shownews()
{
if($this->userlib->logged_in())
//checking for security purposes
{
$this->load->library('pagination');
$per_page = 10;
// How many pages you want to show in each page
$total = $this->db->get('posts', $per_page, $this->uri->segment(3)); 

//Here is the most important part actually.
Basically $total variable determined which
rows you are going to show in the page

$config['base_url'] = base_url().'/index.php/admin/shownews';
$config['total_rows'] = $this->db->count_all('posts'); // Count total rows in the query
$config['per_page'] = $per_page;
$config['num_links'] = 6;
$this->pagination->initialize($config);
$data['posts'] = $total;
$this->load->view('admin_shownews', $data);
} else {
$this->load->view('admin_logineed');
}
}

After getting done with this configuration part of pagination class all you have to do is just initialize it like you are doing it in most of programming languages.

(continue reading…)

VN:F [1.0.6_327]
Rating: 6.3/10 (18 votes cast)
1 Comment :, , , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...