Saturday, January 27, 2007

How Do I Figure Out My Shoe Width

Fixed problem rendering images in Internet Explorer

a long time since I used Internet Explorer. I decided to upgrade to version 7 on my laptop (Windows XP), to try it a bit and I was surprised that the images were bad, pixelated, especially when using the zoom to 100%.

Inverstigando, I discovered that the problem is due to a "feature" that includes the browser called "Internet Explorer Scaling, which is what it does is resize the images without improving the resolution when using high screen resolutions, such as me (1680x1050).

Actually, for me this is more a bug than a feature, because in practice all I get is that the images look bad. I hope all the "features" not as "smart" like this.

The solution is to change a registry value, specifically UseHR value that can be put to zero.

by running regedit, and is located at: HKEY_CURRENT_USER


-
Software - Microsoft

- Internet explorer

- Main

- USEHR

then restart your browser and voila, problem solved.

Tuesday, January 23, 2007

Can Flash From Camera Damage Baby's Eyes?

Use Firefox web page editor Málaga

recently
reading some news on the Internet I discovered a new use to the Firefox browser and is able to change their normal mode of operation and turn it into a web page editor.

To do this, simply visit the page you want to edit, and once loaded you have to type the following into the address bar (all on the same line), pressing Enter at the end:

javascript: document.body.contentEditable = 'true'; document.designMode = 'on'; void 0

Once done, see what we can delete images, comment text, etc ...

Usefulness? I know not every one will find you, but to me it is a characteristic course curious.

Wednesday, January 17, 2007

Savings Bond Interest Calulator

IPF Firewall and FTPD passive mode (Settings) on ipfilter

IPFIREWALL And FTPD PASSIVE MODE (SET)


There are two types of ftp server,

ACTIVE FTP client server


control port 21 <--------- cualquier puerto > 1024 port 20 (data port) --------> any port> 1024

The configuration IPFIREWALL for this type of FTP server would be: # ftp

21 pass in quick from 200.87.105.195/32 to
port = 21 keep state # ftp
data pass in quick from and Stock
to port = 20 keep state

PASSIVE FTP client server

control port 21 1024 <--------- cualquier puerto > ANY port
> 1024 (data port) 1024
<--------- cualquier puerto > IPFIREWALL
The configuration for this type of FTP server would be:

# ftp 21
pass in quick from 200.87.105.195/32 to
port = 21 keep state # ftp

data pass in quick from any to 15001 port 15500 keep state <>

The instruction "keep state" is to tell the filter that you can create a new connection if it had previously created a connection with the customer.

Tuesday, January 16, 2007

Will I Go On My Due Date With Ivf Pregnancy

Activation solaris 10 file

ipfilter 4.0.2
Instructions to enable the packet filter on solaris 10


ipfilter and comes bundled with the Solaris distribution 10, so it's a matter of setup and use.
particularly recommend to use "webmin" for these configuration tasks, as it facilitates these tasks greatly.
1. It must determine the interface on which to act ipfilter, for this use the following instructions:

# ifconfig-a lo0

: flags = 2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask FF000000 nge0:
flags = 1000843 mtu 1500 index 2 inet fffffff8 netmask xxx.xxx.xxx.xxx broadcast xxx.xxx.xxx.xxx ether 0: aa: aa: aa: aa: aa
"As lo0 is the loopback, we take the network card as nge0 by So attached is the file / etc / ipf / pfil.ap, which is as follows: (all who are with # are disability)

# IP Filter setup pfil autopush

# # See the autopush(1M) manpage for more information.
#
# Format of the entries in this file is:
#

#major minor lastminor modules #iprb -1 0 pfil#elxl -1 0 pfil

#e1000g -1 0 pfil
#bge -1 0 pfil
#nf -1 0 pfil
#fa -1 0 pfil
#ci -1 0 pfil
#el -1 0 pfil
#ipdptp -1 0 pfil
#lane -1 0 pfil
# dnet -1 0 pfil
# pcelx -1 0 pfil
# SPWR -1 0 -1 0 pfil pfilnge
nge -1 0 pfil
3.Se must restart the system.
# reebot

4.For test filtering, edit the file / etc / ipf / ipf.conf and place:

block in all block out all
-These instructions block all traffic input and output.
5. To enable the filter to use:

# ipf-E
# ipf-Fa-f / etc / ipf / ipf.conf

6.For disable filtering of the above rules, you must create a file "ipf.not", empty, and run:

# ipf-Fa-f / etc / ipf / ipf.not
****** **** END

I hope this contribution will be helpful ...


Where To Buy Tire Chains In Vancouver

Lee getResource ()

This example shows how to read a text file using "getResource ()."
For those already used getResource and collided with the problem by showing the path they came out something like this:
/ c: / Program% 20Files / ...
The idea to be taken into account is that the addresses "URL" does not contain spaces, so are stream replaces the character "% 20", this will repair the path using replaceAll ("% 20", "")
.

Note: The example shown here reads the file "getTextResource.java" and it shows.
I hope and will be useful.


import java.io. *;
import java.net .*;

/ *

* * @ author Oscar Hurtado Morato

* * /
getTextResource {public class public
getTextResource () {
}
public static void main(String[] arg) {
try{
getTextResource ex=new getTextResource();
ex.leeArchivo();
}
catch(Exception e){
e.printStackTrace();
}
}
public void leeArchivo()throws IOException {
URL url=this.getClass().getResource("getTextResource.java");
String path=url.getPath();
path=path.replaceAll("%20"," ");
System.out.println(path);
/ / read the file
BufferedReader br = new BufferedReader (new FileReader (path));
thisLine String = "";
retDoc String = "";
while ((thisLine = br.readLine ())! = null) {
thisLine retDoc = retDoc + + "\\ n";}

System.out.println (retDoc)

}}

Friday, January 12, 2007

New Revlon Foundation 2010

Errors Installing Apache 2 on solaris 10

APACHE 2 ON SOLARIS 10.


[alert] (22) Invalid argument: setgid: unable to set group id to Group 4294967295 If this error occurs, enter the configuration file "httpd.conf" and change the line Group # -1 "to" Group nobody ", then re-start apache.

Rapadura What Can You Sub



code Here I go to "dowload" of a file that is on the server to the client.
hope and serve them.
1. Create an html page with the name of
"download. html ", in the following directory .. / webapps / project name
/ jsp / examples
Eye:
project name refers to the name "You" put your project (located in "webapps"). If, for example, this was called "test1", then the path would be as follows: ... webapps \\ test1 \\ jsp \\ examples

Containing the following code:



\u0026lt;% @ page contentType = "text / html"% >

\u0026lt;html> \u0026lt;head> \u0026lt;title> jspQuery \u0026lt;/ title> \u0026lt;/ head>
&lt;body&gt;
&lt;form action="/nombre proyecto/servlet/ejemplos.Download"&gt;
&lt;p&gt;&lt;font color="#FFFFFF" size="1"
face="Verdana, Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;
&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;
&lt;input type="submit" value="Download" name="dato"
&gt;
&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
\u0026lt;/ Form>
\u0026lt;/ body>
\u0026lt;/ html>



2. Create a file under the name:
"Download.java" at the following address: \\ webapps \\
name project \\ WEB-INF \\ classes \\ examples contain the following code:




/ * * Download.java


* * Created on Jan 12, 2006, 04:00 PM
*/
package ejemplos;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
/**
*
* @author Oscar Hurtado Morato
* @version 1.0
*/
public class DownloadError extends HttpServlet {
/** Initializes the servlet.
*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
/** Destroys the servlet.
*/
public void destroy() {
}
protected void processRequest(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
//Aqui placed the path and name of the file to be upload
String filePath = "c: /";
String fileName = "test.txt";
fileToDownload = new FileInputStream FileInputStream (filePath);
response.getOutputStream ServletOutputStream out = ( )
response.setContentType ("application / zip");
response.setHeader ("Content-Disposition", "attachment; filename =" + fileName);
response.setContentLength (fileToDownload.available ());
int c ;
while ((c = fileToDownload.read ())! = -1) {
out.write (c);}

out.flush ();
out.close ();
fileToDownload.close ();

} protected void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException
,
java.io.IOException {processRequest (request, response);}

protected void doPost (HttpServletRequest request, HttpServletResponse response
)
throws ServletException, java.io.IOException {processRequest
( request, response);
}}



3. End

Mountains By Biffy Clyro Piano Scores

Servlet File Download File Upload Servlet

Here I go a very simple piece of code that serves to raise (to upload) a file from the client to the server machine. I hope they serve.

Steps:


1. It must obtain the following jars (download them from jakarta site) - commons-fileupload-1.1.1.jar
- commons-io-1.2.jar


2. Unzip the jars and place them in:
... webapps \\ project name
\\ WEB-INF \\ lib This code containing the jars, will be made available for your project.


Eye: project name refers to the name "You" put to your project (located in "webapps").
If for example this was called "test1", then the path would be as follows: ... webapps \\ test1
\\ WEB-INF \\ lib



3. Create in: ... webapps \\
project name \\ jsp \\ examples
the following HTML page, under the name of "uploadFile.html"




\u0026lt;HTML>
\u0026lt;HEAD>

\u0026lt;TITLE> \u0026lt;/ TITLE>

\u0026lt;/ HEAD>

\u0026lt;BODY>

\u0026lt;center>
\u0026lt;form method = "POST" enctype = 'multipart / form-data'
action = "/ bexsys / servlet / ejemplos.UpFichero">

Select file to send to the server \u0026lt;br>
\u0026lt;input type = "file"
name = "file "> \u0026lt;input type="submit"
value="Upload">

\u0026lt;/ form>

\u0026lt;/ center>

\u0026lt;/ BODY>

\u0026lt;/ HTML>






4. Now create the servlet: Believe in the following directory: ... webapps \\

name project \\ WEB-INF \\ classes \\ examples under the name "UploadFichero.java"



package examples;

/* * UploadFichero.java *
* Created on January 12, 2007, 9:00 AM
*/


import java.io.*; import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.commons.fileupload.*;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import java.util.*;

/*
*
* @author Oscar Hurtado Morato
*
*
*/

public class UpFichero extends HttpServlet {


protected void processRequest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {boolean ok =
getNSaveFile (request);
response.setContentType ("text / html");
PrintWriter out = response.getWriter ();
out.println

(""); out.println (""); out.println (""); out.println ("");


out.println (""); if (ok) {
out. println ("The file transfer was successful.");}


else {out.println ("file transfer failed.");}


out.println (""); out.println (" ");
out.close ();}

Public boolean
getNSaveFile (HttpServletRequest request) {try {

/ / Check that it is a multipart request (which is this sending a file) boolean
isMultipart = ServletFileUpload.isMultipartContent (request);
System.out.println ("Is multipart = "+ isMultipart) DiskFileItemFactory
DiskFileItemFactory factory = new ();
/ / maximum size that will be stored in memory
factory.setSizeThreshold (4096);
/ / if you exceed the previous size, it will go away temporarily keeping in the direction sgte
factory.setRepository (new File ("d :/")); ServletFileUpload
ServletFileUpload upload = new (factory);
/ / maximum allowable size (if jumps to the catch exceeds)
upload.setSizeMax (10000000);
List fileItems = upload.parseRequest (request);
/ / get the file sent fileItems.iterator
Iterator i = ();
FileItem fi = (FileItem) i. next ();
/ / saves the file sent to the local server
/ / path and file name of the destination (the server)
String path = "c: /";
String fileName = "nuevo.txt"
fi.write (new File (path, fileName));

} catch (Exception e) {
System.out.println (e.getMessage ());
e.printStackTrace ();
return false;}

return true;}


/ * * Handles the HTTP


POST method. * @ param request servlet request * @ param response
servlet response * / protected void
doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
processRequest (request, response);
}}




5. Note that the file uploaded, will be saved on the hard "c: \\" under the name "test.txt". 6. End