jueves, 27 de septiembre de 2007

El bug de multiplicación de Excel 2007

El bug de multiplicación de Excel 2007

Al parecer, en Excel 2007, multiplicar 850 × 77,1 da como resultado 100.000 (en vez de 65.535 que es lo correcto). Sucede con otras multiplicaciones similares. Y debe ser un bug porque en la lista de features no viene indicado.

Es un fallo llamativo, que recuerda a aquel clásico bug del Pentium de 1994 que obligó a reemplazar millones de procesadores, algunos de los cuales acabaron convertidos en llaveros de regalo. Por suerte para Microsoft, le costará menos arreglar este problema.

(Vía The J-Walk Blog

Mario 64 en 4 minutos que cerdo

viernes, 24 de agosto de 2007

Suspender e Hibernar en ubuntu feisty 7.04 en dell inspiron 1501

After upgrading to Feisty, my new favorite feature suspend-to-disk (aka hibernate) was broken badly; basically, the resume would never be found, so it’d act as if it had a corrupted swap partition and unmounted disks. A lot of people share my grief, suspend is a notoriously tricky thing to nail down because of bad drivers, companies who won’t cooperate with kernel developers, and the fact that software suspend itself is tricky business.

However, after a ton of investigation, it appears there is another solution to the standard one shipped with Ubuntu in µswsusp, which is a different method of suspending to disk. It turns out after some research, that the kernel method works for some people and µswsusp works better for others. If you’re having trouble with the former, here we go (this is written for Feisty Fawn, but most of the stuff works for Edgy):
How to try uswsusp

Before we set it to be the default, we want to try it out to make sure that it works for your laptop. First, make sure you’re running Feisty Fawn, then from the terminal type:
Code Sample:

sudo apt-get install uswsusp
sudo s2disk ## CAUTION: make sure data is saved for this test!
Making uswsusp the default in Ubuntu

If it worked, hurrah! Now, to make this the default way to hibernate/suspend the computer (including the logout dialog, and GNOME Power Manager) involves some hackery but it’s not too bad, and it’s not likely to cause any problems. Download these two files:

* hal-system-power-hibernate-linux
* hal-system-power-suspend-linux

Then run the following command in the Terminal:
Code Sample:

sudo cp hal-system-* /usr/lib/hal/scripts/linux/
sudo chmod 755 /usr/lib/hal/scripts/linux/*

Note that for Edgy, the scripts are named differently and are in /usr/share/hal/scripts
Technical details of what that does

When HAL is given the command to shutdown by gnome-panel or by g-p-m, it ends up executing these scripts, which end up going through a list of files trying to find some command to shut the machine down. The first command it usually finds is pmi, which invokes the kernel hibernate code. My file rearranges the priority so that s2disk/s2ram is called instead (and also corrects a dumb bug where it had the wrong path coded in the file). Since most all userspace requests now go through HAL to shut the machine down, this has the convenient effect of fixing hibernate for everything. Yahtzee!

Update: It appears bcm43xx (Broadcom Wireless driver) and uswsusp really don’t get along; use ndiswrapper instead. I also switched to the native ati driver instead of fglrx, but the latter still might work, I haven’t tried it.

domingo, 12 de agosto de 2007

Compiz Fusion en Feisty Fawn con Ati

Compiz Fusion in Feisty with Xgl

This is the guide everyone has been waiting for, this not only works for the Dell Inspiron 1501 but works for any computer running an ATI card using Xgl.

Check ATI Driver
In a terminal type:
fglrxinfo

You should see this output in your terminal window:
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON XPRESS Series
OpenGL version string: 2.0.6334 (8.34.8)

If you get something different make sure you enable the proprietary ATI driver via the Restricted Driver Manager. You can find it in the top left menu bar under System>Administration>Restricted Drivers.
(This is what you get when using the Dell Inspiron 1501, other users can check for enabled 3D by using the command glxgears, you should see spinning gears)

Install Xgl
In a terminal type:
sudo apt-get install xserver-xgl

Setting Up XGL
In a terminal type:
sudo gedit /usr/local/bin/startxgl.sh

and this to the file:
#!/bin/sh
Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &
DISPLAY=:1
cookie="$(xauth -i nextract - :0 | cut -d ' ' -f 9)"
xauth -i add :1 . "$cookie"
exec dbus-launch --exit-with-session gnome-session
save and close file

Then make the xgl script executable by entering this into a terminal:
sudo chmod a+x /usr/local/bin/startxgl.sh

Creating a XGL Login
Make the script, by typing this into a terminal:
sudo gedit /usr/share/xsessions/xgl.desktop

add this text to the file:
[Desktop Entry]
Encoding=UTF-8
Name=Xgl
Comment=Start an Xgl Session
Exec=/usr/local/bin/startxgl.sh
Icon=
Type=Application
save and close file

Remove Compiz & Desktop Effects
sudo apt-get remove compiz-core desktop-effects

If you have Beryl Installed Remove Beryl Too
In a terminal type:
sudo apt-get remove beryl-ubuntu beryl-manager emerald

If you want to use emerald as your decorator for Compiz Fusion do not remove the emerald package.

Add the Compiz Fusion Repository
In a terminal type:
sudo gedit /etc/apt/sources.list

Add this to the end of your your source list:
deb http://download.tuxfamily.org/3v1deb feisty eyecandy
deb-src http://download.tuxfamily.org/3v1deb feisty eyecandy
save and close file

Add the tuxfamily Repository Key
In a terminal type:
sudo wget http://download.tuxfamily.org/3v1deb/DD800CD9.gpg -O- | sudo apt-key add -

Update Your System
In a terminal type:
sudo apt-get update

Install Compiz Fusion
In a terminal type:
sudo apt-get install compiz compizconfig-settings-manager compiz-plugins compiz-gnome compiz-fusion-plugins-extra libcompizconfig-backend-gconf

Now you just have to log off, log into your Xgl session and run Compiz Fusion.

To run Compiz Fusion:
compiz --replace

To run the Compiz Setting Manager:
ccsm

I find Compiz Fusion to be faster and more responsive then Beryl. I don't use Beryl's window manger, Emerald. If you want to use emerald with Compiz Fusion, it's as easy as sudo apt-get emerald and to launch it's emerald --replace. I didn't mention it in my guide because I prefer Compiz's gtk-window-decorator, and don't want to put up with the hassle of people asking my questions about software I don't use.

Troubleshooting
Q: Compiz Fusion doesn't load/work?
A: Make sure you are you logged onto your Xgl session. Select it at startup from sessions.

Q: I don't have windows decorations?
A: Did you run ccsm (compiz setting manager) and enable Window Decorations

Q: I don't have a cube?
A: Did you run ccsm (compiz setting manager) and enable 3D cube

Hope you guys like the guide.
redDEADresolve

jueves, 26 de julio de 2007

Instalar Casius Alquiler Casius Contable Ubuntu 7.04 Feisty Fawn

Bueno este post solo le interesa a las personas relacionadas con DCC Ingeniería,

Bueno lo primero que debemos hacer es descargarnos todos los paquetes necesarios, entre ellos estas apache2, mysql-server, postgresql-8.2, php5, phpmyadmin, phppgadmin

para esto hacemos lo siguiente:

abrimos una terminal y en esta tecleamos:

sudo apt-get update

luego

sudo apt-get install apache2 php5 php5-gd php5-pgsql php5-mysql postgresql-8.2 mysql-server phpmyadmin phppgadmin pgadmin3

al hacer esto descargamos los paquetes, como tenemos linux estos se instalan y se configuran automaticamente

primero, configuramos apache con nuestros parametros.

tecleamos en la terminal

cd /etc/apache2/

sudo gedit apache2.conf

esto nos abre un editor para cambiar el archivo apache2.conf
Buscamos
### Section 1: Global Environment
y colocamos abajo

ServerName localhost

luego buscamos
#AddDefaultCharset ISO-8859-1

y quitamos el # debe quedar asi

AddDefaultCharset ISO-8859-1

guardamos y cerramos
ahora vamos a configurar el php.ini

tecleamos

cd /etc/php5/apache2/

sudo gedit php.ini

buscamos Resource Limits

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)

cambiamos los parametros a

max_execution_time = 30000 ; Maximum execution time of each script, in seconds
max_input_time = 60000 ; Maximum amount of time each script may spend parsing request data
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)

ahora buscamos

register_globals = Off

y lo cambiamos por

register_globals = On

guardamos y cerramos

ahora podemos reiniciar nuestro servidor apache de la siguiente manera

cd /etc/init.d

sudo ./apache2 restart


ahora vamos a configurar postgresql

para eso primero editamos el archivo pg_hba.conf

cd /etc/postgresql/8.2/main/

sudo gedit pg_hba.conf

lo que esta asi

# Database administrative login by UNIX sockets
local all postgres ident sameuser

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all ident sameuser
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5

lo dejamos asi

# Database administrative login by UNIX sockets
local all postgres ident sameuser

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all ident sameuser
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 192.168.1.0/24 trust
# IPv6 local connections:
host all all ::1/128 md5

ojo con la ip de el centro ya que si nuestra red tiene otra ip entonces ahi va la ip de nuestra red.

guardamos y cerramos

ahora editamos postgres.conf

sudo gedit postgresql.conf

buscamos listen_addresses

debe estar asi
#listen_addresses
lo dejamos
listen_addresses = '*'

buscamos log_destination

y lo dejamos

log_destination = 'syslog'

luego buscamos

datestyle = 'iso, dmy'

y lo dejamos

datestyle = 'sql, european'

guardamos y cerramos

ya tenemos configurados nuestros motores de bases de datos ahora vamos a subir los script de la base

para subir la base de POSTGRES hacemos lo siguiente

sudo su
su – postgres
psql
CREATE USER casius password dcccas SUPERUSER CREATEROLE CREATEDB;
CREATE database cuadros_contable ENCODING 'latin1' Owner casius;
\q
psql cuadros_contable
CREATE LANGUAGE plpgsql
\q
psql -f Direccion_dearchivo_sql cuadros_contable

ahora ya tenemos nuestra base de contabilidad lista

vamos por la de mysql

mysql -u root

create database cuadros;

source archivo.sql
exit

listo ahora solo nos falta copiar los archivos fuentes a la carpeta del apache
los copiamos en /var/www

ahora ya podemos entrar a la aplicación por

http://localhost/CuadrosyCollazos/

cualquier duda me llaman al celular

miércoles, 11 de julio de 2007

sumar dias a una fecha en postgres

Para sumar unos dias o unuos segundos o cualquier espacio de tiempo a una fecha hnmos d trabajar con los tiposs d datos DATE e INTERVAL. Yo hago un cast de ambos de la siguiene manera. Te pongo dos ejmplos:
SELECT CURRENT_TIMESTAMP + CAST('7 days' AS INTERVAL);

Sin embargo observo que tambien funciona el siguiente código, sin hacer un casting sobre la cadena '7 days' :
SELECT CURRENT_TIMESTAMP + '7 days';

Para tu caso sería:

SELECT CAST('2004/10/13' AS DATE) + CAST('7 days' AS INTERVAL);

en este último caso sólo puedes omitir el segundo CAST, ya qu el primero lo toma como una cadena y no como una fecha.

jueves, 5 de julio de 2007

Fuentes

Bueno para que no halla problemas con los derechos de autor de los post colocados aca. y ademas es por principios el agradecer a las personas que dedicaron su tiempo a cacharear y probar cargandose sus sistemas para que no nos pase a nostros lo novatones la mayoria de estos post se encuentra desde su fuente original

mis fuentes son:

http://ubuntu1501.blogspot.com

http://dballester.blogspot.com/2007/04/oracle-xe-en-ubuntu-edgy-amd64-em64t.html
http://www.ubuntu-es.com

gracias a sus usuarios y los propietarios de estas guias tan utiles