Mostrando postagens com marcador navegadores. Mostrar todas as postagens
Mostrando postagens com marcador navegadores. Mostrar todas as postagens
quarta-feira, 8 de maio de 2013
Comparação entre navegadores
http://web-browsers.findthebest.com/saved_compare/Internet-Explorer-vs-Firefox-vs-Chrome-vs-Safari-vs-Opera
Converter HTML em PDF com iText
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package teste.pdf;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.PageSize;
import com.lowagie.text.html.simpleparser.HTMLWorker;
import com.lowagie.text.pdf.PdfWriter;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStream;
import java.io.StringReader;
/**
*
* @author smart
*/
public class ConverterHtmlEmPdf {
public static OutputStream convertHTMLtoPDF(BufferedReader html, OutputStream pdf) throws IOException, DocumentException {
String htmlContent = "";
try {
StringBuilder sb = new StringBuilder();
String line = html.readLine();
while (line != null) {
sb.append(line);
sb.append("\n");
line = html.readLine();
}
htmlContent = sb.toString();
} finally {
html.close();
}
Document doc = new Document(PageSize.A4);
PdfWriter.getInstance(doc, pdf);
doc.open();
HTMLWorker hw = new HTMLWorker(doc);
hw.parse(new StringReader(htmlContent));
doc.close();
return pdf;
}
public static void main(String[] args) throws IOException, DocumentException {
// String File_To_Convert = "/tmp/teste2.html";
String File_To_Convert = "/tmp/modelo3.html";
BufferedReader br = new BufferedReader(new FileReader(File_To_Convert));
String HTML_TO_PDF = "/tmp/MODELOTESTE.pdf";
OutputStream os = new FileOutputStream(HTML_TO_PDF);
convertHTMLtoPDF(br, os);
}
}
terça-feira, 13 de novembro de 2012
Recuperar o ip externo
Para recuperar via terminal
$curl -s http://meuip.datahouse.com.br/internas/ip.php | egrep '<span class="titulo-ip">.*<\/span>' -o
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1671 0 1671 0 0 4981 0 --:--:-- --:--:-- --:--:-- 6258
<span class="titulo-ip"> 189.19.180.248</span>
OU
$curl ifconfig.me
fonte : http://ip-api.com/json
segunda-feira, 5 de novembro de 2012
Teste de event Key Code Javascript
JavaScript Event KeyCode Test Page
Input:| onKeyDown | onKeyPress | onKeyUp | |
|---|---|---|---|
| event.keyCode | |||
| event.charCode | |||
| event.which |
Notable Gotchas
- Firefox and onKeyDown vs. onKeyPressed
- Firefox and keyCode vs. charCode
- Enter key and onKeyPress on Firefox vs. IE
fonte: http://www.asquare.net/javascript/tests/KeyCode.html
sexta-feira, 14 de setembro de 2012
Tag Object no lugar de um iframe
<!DOCTYPE html>
<html>
<body>
<object id="page" type="text/html"
data="http://www.google.com.br"
width="500" height="600">
<p>Oops! That didn't work...</p>
</object>
</body>
</html>
quarta-feira, 29 de agosto de 2012
Cronologia dos navegadores
Um site legal com uma boa cronologia dos navegadores
http://www.coolpicturegallery.net/2010/12/web-browsers-from-90s.html
http://www.coolpicturegallery.net/2010/12/web-browsers-from-90s.html
Assinar:
Postagens (Atom)