Comandos Windows
Buscar archivos ocultos generados por equipo Mac (ocultos y comienzan por ._)dir /s /ah ._*/s para una búsqueda recursiva. /ah para archivos ocultos. Para eliminar los ficheros:
del /s /ah ._*
dir /s /ah ._*/s para una búsqueda recursiva. /ah para archivos ocultos. Para eliminar los ficheros:
del /s /ah ._*
REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\UpgradeExperienceIndicators" /v UpgEx | findstr UpgEx if "%errorlevel%" == "0" GOTO RunGWX reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Appraiser" /v UtcOnetimeSend /t REG_DWORD /d 1 /f schtasks /run /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" :CompatCheckRunning schtasks /query /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" schtasks /query /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" | findstr Ready if NOT "%errorlevel%" == "1" ping localhost >nul &goto :CompatCheckRunning :RunGWX schtasks /run /TN "\Microsoft\Windows\Setup\gwx\refreshgwxconfig"Nota, muestro el código con la modificación sugerida por otro usuario para evitar el bucle infinito.
dism /online /get-packages | findstr 2976978 dism /online /get-packages | findstr 2919355 dism /online /get-packages | findstr 3035583Si se muestra un mensaje tipo
Package Identity : Package_for_KB3035583~31bf3856ad364e35~amd64~~6.3.1.29 con el id de la actualización a comprobar será la confirmación de tener aplicada la actualización en nuestro SO.
Para configurar las opciones de privacidad seguir el artículo de Gizmondo Todo lo que hay que desactivar en Windows 10 para proteger tu privacidad.
Revisar los programas que se ejecutan al inicio. Con Regedit o con Administrador de tareas -> Inicio.
Revisar programas instalados que no necesitamos. Configuración -> Sistema -> Aplicaciones. Ejemplos: Deportes, Descargar Skype (perdona si ya tengo Skype instalado.. U_U), Obtener Office, .. Otros como XBox, aunque nos sean inútiles (según Microsoft nos permite lanzar juegos de la tienda de Microsoft, utilizar streaming con una consola XBox y ver logros) no nos permite desintalar.
Revisar aplicaciones a las que se permite la ejecución en segundo plano. Configuración -> Privacidad -> Aplicaciones en segundo plano.
%systemroot%\system32\cmd.exe /c "start %cd%RECYCLER\e621ca05.exe &&%systemroot%\explorer.exe %cd%GNI Zeus AM - entornos
C:\Usuarios\[user]\AppData\Roaming\*****.exe Reconocible por el icono de la vaquita con su móvil.
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\****.exe (regedit) para que no se inicie con Windows.
del *.lnk attrib /d /s –r –h –s *.*
set serveroutput on;
DECLARE
match_count integer;
v_search_string varchar2(100) := 'Civilization... solo un turno más';
BEGIN
FOR t IN (SELECT owner, table_name, column_name
FROM all_tab_columns
WHERE owner = USER and DATA_TYPE = 'VARCHAR2' and DATA_LENGTH >= 37
) LOOP
EXECUTE IMMEDIATE
'SELECT COUNT(*) FROM '||t.owner || '.' || t.table_name||
' WHERE '||t.column_name||' = :1'
INTO match_count
USING v_search_string;
IF match_count > 0 THEN
dbms_output.put_line( t.owner || '.' || t.table_name ||' '||t.column_name||' '||match_count );
END IF;
END LOOP;
dbms_output.put_line('Fin');
END;
/
ListlistResult; [...] // Sorting the result list by campo1.id Collections.sort(listResult, new Comparator () { @Override public int compare(final TipoDto object1, final TipoDto object2) { return object1.getCampo1().getId().compareTo(object2.getCampo1().getId()); } });
package configuration;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Locale;
import java.util.ResourceBundle;
public class ConfigurationLoader {
private static final String MAGPIES = "magpies";
private static final String PATH= "path";
public Configuration loadConfiguration() throws IOException {
final ResourceBundle rb = getResourceBundle();
final Configuration config = new Configuration();
config.setMagpies(Integer.valueOf(rb.getString(MAGPIES)));
config.setPath(rb.getString(PATH));
return config;
}
private ResourceBundle getResourceBundle() throws IOException {
final URL[] urls = {new File(".").toURI().toURL()};
final ClassLoader loader = new URLClassLoader(urls);
return ResourceBundle.getBundle("general", Locale.getDefault(), loader);
}
}
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> .. <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
public class CharacterEncodingFilter implements Filter {
@Override
public void init(FilterConfig chain) throws ServletException { }
@Override
public void destroy() { }
@Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
request.setCharacterEncoding("UTF-8");
chain.doFilter(request, response);
}
}
Para registrarlo en el wmb.xml
<filter> <filter-name>characterEncodingFilter</filter-name> <filter-class>Utiles.CharacterEncodingFilter</filter-class> </filter>
ServletMultipartRequest parser = new ServletMultipartRequest(request,
trewa.servlet.upload.MultipartRequest.MAX_READ_BYTES, 101, null);
Enumeration<String> e = parser.getFileParameterNames();
String name = e.nextElement();
InputStream in = parser.getFileContents(name);
String strD_MIME = parser.getContentType(name);
String strD_NOMBRE_ARCHIVO = new String((parser.getBaseFilename(name))
.getBytes("iso-8859-1"), "UTF-8");
String nombreFichero = URLEncoder.encode(rs.getString("INFDOC_NOMBRE_FICHERO"), "UTF-8").replace("+", "%20");
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment; filename=" + nombreFichero);
String characterEncoding = wrapper.getCharacterEncoding();
String wrappedContentType = wrapper.getContentType();
// charset is already specified (see #921811)
if (wrappedContentType != null && wrappedContentType.indexOf("charset") > -1) {
characterEncoding = StringUtils.substringAfter(wrappedContentType, "charset=");
}
+ //the target encoding is already specified in contentType :
+ if( contentType.indexOf("charset") > -1) {
+ characterEncoding=StringUtils.substringAfter(contentType, "charset=");
+ contentType = contentType.substring(0, contentType.indexOf(';')).trim();
+ }
//$NON-NLS-1$
if (characterEncoding != null && contentType.indexOf("charset") == -1) {
contentType += "; charset=" + characterEncoding; //$NON-NLS-1$
}
Añadidas dos nuevas clases en displaytag.src.main.java.org.displaytag.export
import java.io.IOException;
import java.io.Writer;
import javax.servlet.jsp.JspException;
import org.apache.commons.lang.StringUtils;
public class ExcelCSVView extends CsvView {
public String getRowEnd() {
return "\r\n"; //Windows end of line
}
public String getCellEnd() {
return ";"; //Excel default cell separator (for french)
}
public String getMimeType() {
return "text/csv; charset=cp1252"; //uses the Windows Latin-1 superset encoding
}
protected String escapeColumnValue(Object value) {
String stringValue = StringUtils.trim(value.toString());
if (!StringUtils.containsNone(stringValue, new char[]{'\n', ';' })) {
//double '"' as escape sequence for included quote symbols
return "\"" + StringUtils.replace(stringValue, "\"", "\"\"") + "\"";
}
return stringValue;
}
}
/**
* Licensed under the Artistic License; you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://displaytag.sourceforge.net/license.html
*
* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
package org.displaytag.export;
import org.apache.commons.lang.StringUtils;
import org.displaytag.model.TableModel;
/**
* Export view for excel exporting.
* @author Fabrizio Giustina
* @version $Revision$ ($Author$)
*/
public class ExcelExcelView extends BaseExportView {
/**
* @see org.displaytag.export.BaseExportView#setParameters(TableModel, boolean, boolean, boolean)
*/
public void setParameters(TableModel tableModel, boolean exportFullList,
boolean includeHeader, boolean decorateValues) {
super.setParameters(tableModel, exportFullList, includeHeader, decorateValues);
}
/**
* @see org.displaytag.export.ExportView#getMimeType()
* @return "application/vnd.ms-excel"
*/
public String getMimeType() {
return "text/csv; charset=cp1252"; //$NON-NLS-1$
}
/**
* @see org.displaytag.export.BaseExportView#getRowEnd()
*/
protected String getRowEnd() {
return "\n"; //$NON-NLS-1$
}
/**
* @see org.displaytag.export.BaseExportView#getCellEnd()
*/
protected String getCellEnd() {
return "\t"; //$NON-NLS-1$
}
/**
* @see org.displaytag.export.BaseExportView#getAlwaysAppendCellEnd()
* @return false
*/
protected boolean getAlwaysAppendCellEnd() {
return false;
}
/**
* @see org.displaytag.export.BaseExportView#getAlwaysAppendRowEnd()
* @return false
*/
protected boolean getAlwaysAppendRowEnd() {
return false;
}
/**
* Escaping for excel format.
* <ul>
* <li>Quotes inside quoted strings are escaped with a double quote</li>
* <li>Fields are surrounded by " (should be optional, but sometimes you get a "Sylk error"
* without those)</li> </ul>
* @see org.displaytag.export.BaseExportView#escapeColumnValue(java.lang.Object)
*/
protected String escapeColumnValue(Object value) {
if (value != null) {
// quotes around fields are needed to avoid occasional "Sylk format invalid" messages from excel
return "\"" //$NON-NLS-1$
+ StringUtils.replace(StringUtils.trim(value.toString()), "\"", "\"\"") //$NON-NLS-1$ //$NON-NLS-2$
+ "\""; //$NON-NLS-1$
}
return null;
}
}
export.csv.class=org.displaytag.export.ExcelCSVView export.excel.class=org.displaytag.export.ExcelExcelView
Select id from tabla;
Select wm_concat(id) from tabla;
DECLARE
idNuevoConcepto NUMBER;
BEGIN
dbms_output.put_line('Comienzo ejecución');
idNuevoConcepto := 916;
for reg in (Select idest from estadosfinancieros
where fecha >= '1/1/2008') loop
Insert into importes_estados_financieros
(ief_id, ief_importe, ief_ef_id, ief_idest) values
(imp_estados_financieros_s1.nextval,
0, idNuevoConcepto, reg.idest);
end loop;
dbms_output.put_line('Finalizando');
END;
Notepad++ es una excelente herramienta de apoyo para tratar texto. Muy en línea con Ultraedit no sabría decir cual es mejor, yo estoy acostumbrado al camaleon. Dispone de muchas opciones, voy a comentar dos que particularmente me han sido muy útiles.