mysql variables: what is max connections and how to change

Avatar de mohamd galal mohamedmgalalm

The number of connections permitted is controlled by the max_connections system variable. The default value is 151 to improve performance when MySQL is used with the Apache Web server. (Previously, the default was 100.)

To check the current max connection  value

show variables like "max_connections";

Ver la entrada original 131 palabras más

Firefox Marketplace Apps for Linux Desktop

See active TCP connections

Avatar de crcokCRC OK

See active TCP connections:

  • netstat -n -A inet -t

Ver la entrada original

Funciones de ordenación de Arrays – PHP Tips

Cuando empece a programar, uno de los ejercicios que teníamos que hacer era la ordenación por el método burbuja, el cual ahora mismo no recuerdo como se hacía, creo que se basaba en ir recorriendo la lista e ir almacenando el valor superior, luego este se volcada en otra lista, y no se qué más. Hoy en día los lenguajes de programación ya disponen de funciones que nos ordenan el array con solo invocarlas.
En PHP la mas conocida es short() la cual nos ordena el array en base a su valor de menor a mayor, pero hay que tener cuidado, ya que no mantiene el valor de las claves, y las renombra por unas numéricas. La función inversa de short() es rshort().
Si queremos ordenar y que nos mantenga el valor de las claves usaremos asort o arsort

Si lo que queremos es ordenar un array en base a sus claves usaremos ksort o su inversa que es krsort

Más información y funciones de ordenación de arrays http://www.php.net/manual/es/array.sorting.php

Set Default File Association in Ubuntu Unity for Applications Not Listed in «Open With»

Avatar de mutoulardatainfer

Source: http://askubuntu.com/questions/369967/how-do-i-set-the-default-file-association-in-ubuntu-13-10-nautilus-files-with-un

One can use «mimeopen -d file» to invoke an application to open a file in the command line. Afterwards the used application will be the default application associated with the file type, even from the Nautilus.

Example: Set nano as the default program to open *.txt files:

$ mimeopen -d file.txt

Please choose a default application for files of type text/plain

1) notepad (wine-extension-txt)
2) gedit (gedit)
3) GNU Emacs 23 (emacs23)
4) Other…

use application # 4

use command: nano

Opening «useful.txt» with nano (text/plain)

Ver la entrada original

Terminal Console Essentials

10 reasons why WordPress is a better starting point for a project than you thought, even though you’re an advanced PHP developer

Avatar de Gabriel KoenGabriel's Blog

I didn’t quite mean to make this a «top 10» list, but it did work out to 10 items, and it’s indeed a list.

UPDATE: I didn’t make a few points clear originally, so let me add some context here.

The impetus for writing this post was of 3 weekend projects that never got off the ground because I got bogged down with the setup. I was familiar with the framework I was using, it gave me all the tools I needed to get the project going, and as I started building my functionality I started realizing I needed X, Y and Z to keep going. So I grabbed packages (some I was familiar with, others less so, but all were modular and would fit right in with the framework I was using) and spent a bunch more time getting them connected and playing nice with each other, realizing I…

Ver la entrada original 677 palabras más

PHP Lesson : Data Types, Constant Value, and Casting Variable

Avatar de NoefzoLearn PHP & ASP.Net

Hello everyone 😀

Chapter 3 Part 1,
Our material for this post are data types, constant value, and how to casting a variable.

Since we know that PHP variable is very flexible and can become any data types, we still need to know which data types it will be.
Constant value, sometimes we need to define a constant value like Phi = 3.1415926535, it will be useful using a constant value than a normal variable. Casting variable, even though I’d write that variable in PHP will be indicates as String, sometimes we will need to cast it into other data types.

Anyway, let’s begin our material 😀

Ver la entrada original 522 palabras más