Programación

Cursos e información de la programación

Atajos de teclado NetBeans

0

Seguro que para los que usáis NetBeans estos atajos de teclado os van a venir de perlas:

Highlights of NetBeans IDE 7.0 Keyboard Shortcuts & Code Templates

Finding, Searching, and Replacing

Ctrl-F3 Search word at insert point
F3/Shift-F3 Find next/previous in file
Ctrl-F/H Find/Replace in file
Alt-F7 Find usages
Ctrl-Shift-F/H Find/replace in projects
Alt-Shift-U Find usages results
Alt-Shift-H Turn off search result highlights
Ctrl-R Rename
Ctrl-U, then U Convert selection to uppercase
Ctrl-U, then L Convert selection to lowercase
Ctrl-U, then S Toggle case of selection
Ctrl-Shift-V Paste formatted
Ctrl-I Jump to quick search field
Navigating through Source Code

Ctrl-O/Alt-Shift-O Go to type/file
Ctrl-Shift-T Go to JUnit test
Alt-O Go to source
Ctrl-B Go to declaration
Ctrl-G Go to line
Ctrl-Shift-M Toggle add/remove bookmark
Ctrl-ShiftPeriod/Comma
Next/previous bookmark
Ctrl-Period/CommaNext/previous usage/compile
error
Ctrl-Shift-1/2/3 Select in Projects/Files/Favorites
Ctrl-[ Move caret to matching bracket
Ctrl-K/Ctrl-Shift K Next/previous word match
Alt-Left/AltRight/Ctrl-Q
Go backward/forward/to last
edit
Alt Up/Down Next/previous marked
occurrence
Coding in Java
Alt-Insert Generate code
Ctrl-Shift-I Fix all class imports
Alt-Shift-I Fix selected class's import
Alt-Shift-F Format selection
Alt-Shift Left/
Right/Up/Down
Shift lines left/right/up/down
Ctrl-Shift-Up/D Copy lines up/down
Ctrl/Alt-F12 Inspect members/hierarchy
Ctrl-/ Add/remove comment lines
Ctrl-E Delete current line
Coding in C/C++
Alt-Shift-C Go to declaration
Ctrl-F9 Evaluate expression
Coding in Ruby
Ctrl-Shift-A Jump Rails action > view
Alt-ShiftPeriod/Comma
Select Next/Previous element
Ctrl-Shift-Space Show documentation
Ctrl-Shift-T Jump from test file to file
Compiling, Testing, and Running
F9 Compile package/ file
F11 Build main project
Shift-F11 Clean & build main project
Ctrl-Q Set request parameters
Ctrl-Shift-U Create JUnit test
Ctrl-F6/Alt-F6 Run JUnit test on file/project
F6/Shift-F6 Run main project/file
Opening and Toggling between Views
Ctrl-Tab (Ctrl-`) Toggle between open documents
Shift-Escape Maximize window (toggle)
Ctrl-F4/Ctrl-W Close currently selected window
Ctrl-Shift-F4 Close all windows
Shift-F10 Open contextual menu
Alt-Shift-D Undock window
Debugging
Ctrl-F5 Start debugging main project
Ctrl-Shift-F5 Start debugging current file
Ctrl-Shift-F6 Start debugging test for file
(JUnit)
Shift-F5/F5 Stop/Continue debugging session
F4 Run to cursor location in file
F7/F8 Step into/over
Ctrl-F7 Step out
Ctrl-Alt-Up Go to called method
Ctrl-Alt-Down Go to calling method
Ctrl-F9 Evaluate expression
Ctrl-F8 Toggle breakpoint
Ctrl-Shift-F8 New breakpoint
Ctrl-Shift-F7 New watch
When typing in the Source Editor, generate the text in
the right-column below by typing the abbreviation that is
listed in the left-column and then pressing Tab.
Java Editor Code Templates
En Enumeration
Ex Exception
Ob Object
Psf public static final
Psfb public static final boolean
Psfi public static final int
Psfs public static final String
St String
ab abstract Highlights of NetBeans IDE 7.0 Keyboard Shortcuts & Code Templates
as assert true;
bcom /**/
bo boolean
br break;
ca catch (
cl class
cn continue
db double
df default:
dowhile do {
} while (condition);
eq equals
ex extends
fa false
fcom //
fi final
fl float
forc
for (Iterator it = collection.iterator();
it.hasNext();) {
Object elem = (Object) it.next();
}
fore for (Object elem : iterable) {
}
fori for (int i = 0; i < arr.length; i++) {}
forl for (int i = 0; i < lst.size(); i++) {
Object object = lst.get(i); }
forst for (StringTokenizer st = new
StringTokenizer(""); st.hasMoreTokens();) }
forv for (int i = 0; i < vct.size(); i++) {
Object object = vct.elementAt(i);}
fy finally{ |}
ie interface
ifelse if (condition){}else {
}
iff if (exp) {}
im implements
inst if (exp instanceof Object) {
Object obj = (Object) exp;
iof instanceof
ir import
le length
na native
newo Object name = new Object(args);
pe protected
pr private
psf private static final
psfb private static final boolean
psfi private static final int
psfs private static final String
pst printStackTrace();
psvm public static void main(String[] args){
}
pu public
re return
runn Runnable runnable = new Runnable() {
public void run() {}};
serr System.err.println (“|”);
sh short
sout System.out.println (“|”);
soutv System.out.println(“Object = ” + Object);
st static
su super
sw switch (var) { case val: break;
default: throw new AssertionError();}
sy synchronized
tds Thread.dumpStack();
th throws
tr transient
trycatch try {}
catch (Exception e) {}
tw throw
twn throw new
vo volatile
wh while (
whileit while (it.hasNext()) {
Object elem = (Object) it.next();}
whilen while (en.hasMoreElements()) {
Object elem = (Object) en.nextElement();}
whilexp while (exp) {}
JSP Editor Code Templates
ag application.getAttribute(“|”)
ap application.putAttribute(“|”,)
ar application.removeAttribute(“|”)
cfgi config.getInitParameter(“|”)
jspf
jspg

jspi
jspp

jsps
jspu
oup out.print(“|”)
oupl out.println(“|”)
pcg pageContext.getAttribute(“|”)
pcgn pageContext.getAttributeNamesInScope(“|”)
pcgs pageContext.getAttributesScope(“|”)
pcr pageContext.removeAttribute(“|”)
pcs pageContext.setAttribute(“|”,)
pg
pga
pgb
pgc
pgerr
pgex
pgie
pgim
pgin
pgit
pgl
pgs
rg request.getParameter(“|”)
sg session.getAttribute(“|”)
sp session.setAttribute(“|”, )
sr session.removeAttribute(“|”)
tglb

Podéis descargar el pdf en este enlace.

La Biblia de PHP

0

Si queremos saber todo sobre PHP aquí os dejo esta biblia del PHP que creo que puede resultar muy útil e interesante a todo aquel que se quiera iniciar en la programación o quiera reforzar sus conocimientos: biblia del PHP

El lenguaje de programación de Google: GO

1

El lenguaje de programación de Google: GO.

[Tutorial] Cómo instalar Zend Optimizer en CentOS con Plesk y cualquier otro servidor Linux

13

Lo primero de todo explicaros que Zend Optimizer es un framework para acelerar la intepretación de php, además posee la capacidad de traducir scripts codificados con Zend Guard. Podriamos decir que Zend optimizer es indispensable para optimizar nuestro servidor apache y si eres administrador de sistemas o posees un servidor dedicado esta guia te será de mucha utilidad.

En pocas palabras, nos permite disminuir el tiempo de ejecución de los scripts entre un 20 y 50 por ciento con lo que optimizamos bastante el rendimiento de nuestro servidor.

Para instalarlo simplemente tenemos que seguir estos pasos:

Lo primero es descargar el archivo tar.gz desde el sitio oficial para ello ejecutaremos el siguiente comando desde la shell:

# wget http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz

Decir que depende de la arquitectura que estamos utilizando puede ser i386, 86x… para ello lo comprobamos y descargamos la que se adapte a nuestro servidor. Necesitaremos registrarnos en este caso.

Una vez descargado el archivo lo descomprimimos:

# tar -zxvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz

Ya hemos extraido los archivos asi es que podemos borrar el archivo tar.gz:

# rm -rf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz

Entramos en el directorio donde se encuentran los archivos de instalacion:

# cd ZendOptimizer-3.3.3-linux-glibc23-i386

Ejecutamos el archivo de instalacion:

# ./install.sh

Respondemos de forma adecuada a todas las preguntas que se nos hacen en el proceso de instalacion, lo cual supone aceptar todo, una vez finalizado el proceso nos dirigimos al directorio en el que se encuentra el archivo php.ini:

# cd /etc

Abrimos el archivo php.ini con un editor de texto por ejemplo vi:

# vi php.ini

Buscamos las lineas de configuracion de Zend Optimizer en el archivo php.ini, para ello escribimos el siguiente comando:

# /zend

Suele estar al final del fichero.

Debemos de encontrar las siguientes lineas al final del archivo:

zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

Una vez que las hemos localizado las copiamos al portapapeles y si es necesario a un archivo de texto para no perderlas, y pasamos al modo de insercion de texto en el editor vi pulsando la tecla i, una vez en el modo texto comentamos las lineas pasando a quedar estas en el archivo php.ini de la siguiente manera:

;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_optimizer.version=3.3.3
;zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

Salimos del modo texto pulsando la tecla escape y guardamos el archivo con el siguiente comando:

# :wq

Entramos en el directorio /etc/php.d:

# cd /etc/php.d

Usamos el editor de texto vi para crear un nuevo archivo:

# vi zend-optimizer.ini

Pegamos en el las lineas que anteriormente habiamos copiado del archivo php.ini en el archivo zend-optimizer.ini, para ello lo usual es si estas usando Putty pulsar el boton derecho del raton, lo cual hara que se pegue el contenido que tenemos copiado en el portapepeles, lueego guardamos el archivo:

# :wq

Reiniciamos apache:

# service httpd restart

Y comprobamos que tanto Ioncube como Zend Optimizer se hayan inicializado correctamente con php

# php -v

Si todo ha ido bien deberiamos de obtener algo como esto:

php -v
PHP 5.1.6 (cli) (built: Apr 7 2009 08:00:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with the ionCube PHP Loader v3.1.16, Copyright (c) 2002-2006, by ionCube Ltd., and
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Ir arriba