Tipejos como ese están gobernando en casi todo el mundo, y todavía hay tarados que les llaman "genios", como si comportarse como un miserable fuera pura genialidad.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
texto = "Hola mundo *ESTO ES RARO* estoy ......"
apertura = instr(texto, "*")
if apertura > 0
frase = mid(texto, apertura, instr(apertura + 1, texto, "*")) <-- Puede que sea.
frase = mid(texto, apertura, apertura + instr(apertura + 1, texto, "*")) <-- Puede que sea.
String linea;
linea = br.readLine();
while (linea != null){
contenido.append(linea);
linea = br.readLine();
System.out.println("Dentro del bucle");
}
System.out.println("Fuera del bucle"); <--- ¿pasa por acá?
StringBuilder contenido = new StringBuilder();
try {
BufferedReader br = new BufferedReader(new FileReader(fichero));
try {
String linea;
while ((linea = br.readLine()) != null){
contenido.append(linea);
System.out.println("Dentro del bucle");
}
if (null !=br){
br.close();
}
/*System.out.println(contenido);
//Añado el contendo recogidos de los JTextField al StringBuilder "contenido"
String field = alias+"\n"+usuario+":"+clave+":"+host+":"+puerto+":"+nombrebd;
contenido.append(field);
System.out.println(contenido);
//Cambia el contenido de un archivo de texto en su totalidad.. sobreescribiendo el texto existente
BufferedWriter output = new BufferedWriter(new FileWriter("C:\\prueba.txt"));
try {
output.write(contenido.toString());
}finally {
output.close();
}*/
}
catch (Exception ex){ // <-- No finally
System.out.println(ex);
br.close();
}
}
catch (Exception ex){
System.out.println(ex);
}
// Esta función funciona perfectamente.
void decodeRes(Bitmap[] bmp, int w, int h, String code){
Bitmap tmpLoad;
for(int i = 0; i < bmp.length; i++){
tmpLoad = BitmapFactory.decodeResource(getResources(), getResources().getIdentifier(code + i, "raw", context.getPackageName()));
bmp[i] = Bitmap.createScaledBitmap(tmpLoad, w, h, true);
}
}
// He aquí el problema:
void decodeRes(Bitmap bmp, int w, int h, String code){
Bitmap tmpLoad;
tmpLoad = BitmapFactory.decodeResource(getResources(), getResources().getIdentifier(code, "raw", context.getPackageName()));
bmp = Bitmap.createScaledBitmap(tmpLoad, w, h, true);
System.out.println(bmp.getWidth()); //<----- Todo correcto, imprime el ancho del bitmap.
}
// {...}, código, código...
Bitmap unPatito;
decodeRes(unPatito, 24, 24, "patito0");
System.out.println(unPatito.getWidth()); //<------ Null pointer exception!
void decodeRes(Bitmap bmp, int w, int h, String code){
Bitmap tmpLoad;
tmpLoad = BitmapFactory.decodeResource(getResources(), getResources().getIdentifier(code, "raw", context.getPackageName()));
unPatito = Bitmap.createScaledBitmap(tmpLoad, w, h, true); //<----- Escribiendo la variable directamente sí funciona.
}
Citary por la falla que comentas es muy dificil que estos se dañen