Hello friends,
I have been moved from here to my personal site – TechiePark.com. Do visit for more information…
Hello friends,
I have been moved from here to my personal site – TechiePark.com. Do visit for more information…
In file /etc/ssh/sshd_config,
use
ListenAddress 192.168.0.1
to make sshd listen to only that address.
Basically this message comes when the outlook storage capacity is full
Outlook, It can’t hold one more message.
You can’t delete because the message is only going to another folder inside the file cabinet.
Can’t send – no space to hold the message.
Super easy fix is -
In any folder, deleted, sent, inbox click on a message you want to delete. Start from the deleted folder. You have already deleted it once
Using…. shift+delete… get rid of the messages. This method blows it out of Outlook completely. If you click on a message and holding the shift key down you can highlight many messages and get rid of them.
After you get rid of about 30 messages you have enough room for the delete key to work.
Keep dumping the deleted items folder as you are working in sent or the inbox.
You’ll get your Outlook Program working back to normal. 1.8 GB is the capacity of default outlook storage
I have already posted sshd problem. This problem is also related to this only. I googled lot about this problem but no solution. So i tried adding pop3: ipaddress: ALLOW in hosts.allow. Bingo it worked.
Hello friends i faced this problem before 2 days.. To solve this problem you have to see hosts.deny and hosts.allow files under /etc/. So you have to add your ISP or Local ip address in hosts.allow files as
sshd sshd1 sshd2 : ipaddress : ALLOW
and in hosts.deny ALL:ALL so that other hosts are not allowed.
create an archive(tar/rar/zip) etc file of the important files which has to be hidden.
then get an jpg image of your interest under which you want to hide the files.
then execute the following COPY command
> copy /b mysecretfiles.zip secretimage.jpg
b : represents the BINARY mode
it will create a file secretimage.jpg (image file should be there in path)
if u click on that it will be opened in ur default picture viewer
Delete those important files as we are having those in the hidden secretimage
To retrive the contents then open(extract) the file with the zip software that is present
Create a XMLHTTPRequest Object that uses the POST method.
var http = new XMLHttpRequest();
Now we open a connection using the GET method.
var url = "get_data.php";
var params = "lorem=ipsum&name=binny";
http.open("GET“, url+”?”+params, true);
http.onreadystatechange = function() {
//Call a function when the state changes.
if(http.readyState == 4 && http.status == 200) {
alert(http.responseText);}}
http.send(null);
I really hope that this much is clear for you
We are going to make some modifications so POST method will be used when sending the request…
var url = "get_data.php";
var params = "lorem=ipsum&name=binny";
http.open("POST“, url, true);
//Send the proper header information along with the request
http.setRequestHeader(”Content-type”, “application/x-www-form-urlencoded”);
http.setRequestHeader(”Content-length”, params.length);
http.setRequestHeader(”Connection”, “close”);
http.onreadystatechange = function() {
//Call a function when the state changes.
if(http.readyState == 4 && http.status == 200) {
alert(http.responseText);}}
http.send(params);
The first change(and the most obvious one) is that I changed the first argument of the open function from GET to POST. Also notice the difference in the second argument – in the GET method, we send the parameters along with the url separated by a ‘?’ character…
http.open("GET",url+”?”+params, true);
But in the POST method we will use just the url as the second argument. We will send the parameters later.
http.open("POST", url, true);
Some http headers must be set along with any POST request. So we set them in these lines…
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
With the above lines we are basically saying that the data send is in the format of a form submission. We also give the length of the parameters we are sending.
http.onreadystatechange = function() {
//Call a function when the state changes.
if(http.readyState == 4 && http.status == 200) {
alert(http.responseText);}}
We set a handler for the ‘ready state’ change event. This is the same handler we used for the GET method. You can use the http.responseText here – insert into a div using innerHTML(AHAH), eval it(JSON) or anything else.
http.send(params);
Now that you have installed the Apache Jakarta Commons FileUpload library, you can start writing the code. First, we have to make sure the HTTP request is encoded in multipart format. This can be done using the static method isMultipartContent() of the ServletFileUpload class of the org.apache.commons.fileupload.servlet package:
if (ServletFileUpload.isMultipartContent(request)){
// Parse the HTTP request…
}
In the above Java code snippet, request is a javax.servlet.http.HttpServletRequest object that encapsulates the HTTP request. It should be very familiar to you if you know Java Servlet or JSP.
Second, we will parse the form data contained in the HTTP request. Parsing the form data is very straightforward with the Apache Jakarta Commons FileUpload library:
ServletFileUpload servletFileUpload = new ServletFileUpload(new DiskFileItemFactory());
List fileItemsList = servletFileUpload.parseRequest(request);
(In the above Java code snippet, DiskFileItemFactory is a class contained in the org.apache.commons.fileupload.disk package and List is an interface contained in the java.util package.)
If everything works fine, fileItemsList will contain a list of file items that are instances of FileItem of the org.apache.commons.fileupload package. A file item may contain an uploaded file or a simple name-value pair of a form field. (More details about FileItem will be provided later.)
By default, the ServletFileUpload instance created by the above Java code uses the following values when parsing the HTTP request:
If you do not like the default settings, you can change them using the methods setSizeThreshold() and setRespository() of the DiskFileItemFactory class and the setSizeMax() method of the ServletFileUpload class, like this:
DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();
diskFileItemFactory.setSizeThreshold(40960); /* the unit is bytes */
File repositoryPath = new File(”/temp”);
diskFileItemFactory.setRepository(repositoryPath);
ServletFileUpload servletFileUpload = new ServletFileUpload(diskFileItemFactory);
servletFileUpload.setSizeMax(81920); /* the unit is bytes */
(In the above Java code snippet, File is a class of the java.io package.)
If the size of the HTTP request body exceeds the maximum you set, the SizeLimitExceededException exception (fully qualified name: org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException) will be thrown when you call the parseRequest() method:
try {
List fileItemsList = servletFileUpload.parseRequest(request);
/* Process file items… */
}
catch (SizeLimitExceededException ex) {
/* The size of the HTTP request body exceeds the limit */
}
Third, we will iterate through the file items and process each of them. The isFormField() method of the FileItem interface is used to determine whether a file item contains a simple name-value pair of a form field or an uploaded file:
Iterator it = fileItemsList.iterator();
while (it.hasNext()){
FileItem fileItem = (FileItem)it.next();
if (fileItem.isFormField()){
/* The file item contains a simple name-value pair of a form field */
}
else{
/* The file item contains an uploaded file */
}
}
(In the above Java code snippet, Iterator is an interface in the java.util package and FileItem is an interface in the org.apache.commons.fileupload package.)
If a file item contains a simple name-value pair of an ordinary form field, we can retrieve its name and value using the getFieldName() method and the getString() method respectively:
String name = fileItem.getFieldName();
String value = fileItem.getString();
For example, suppose there is a text field in an HTML/XHTML form:
If a file item contains an uploaded file, we can use a number of methods to obtain some information about the uploaded file before we decide what to do with it:
/* Get the name attribute value of the element. */
String fieldName = fileItem.getFieldName();
/* Get the size of the uploaded file in bytes. */
long fileSize = fileItem.getSize();
String fileName = fileItem.getName();
String contentType = fileItem.getContentType();
In some situations, you just want to store the uploaded file in the file system without concerning what the uploaded file contains. The FileItem interface provides a method called write() that helps us perform this easily:
File saveTo = new File(”/upload_files/myFile.txt”);
fileItem.write(saveTo);
f you do not want to save the uploaded file directly but to process it, the get() and getInputStream() methods can help you. The get() method returns the uploaded file as an array of the byte data type:
byte[] fileData = fileItem.get();
However, if the uploaded file is large in size, you will not want to load the whole file into memory. The getInputStream() method can help you in this case. It returns the uploaded file as a stream:
InputStream fileStream = fileItem.getInputStream();
(InputStream is a class of the java.io package.)
function imageResize($width, $height, $target) {
//takes the larger size of the width and height and applies the
formula accordingly…this is so this script will work
dynamically with any size image
if ($width > $height) {
$percentage = ($target / $width);
} else {
$percentage = ($target / $height);
}
//gets the new value and applies the percentage, then rounds the value
$width = round($width * $percentage);
$height = round($height * $percentage);
//returns the new sizes in html image tag format…this is so you
can plug this function inside an image tag and just get the
return “width=\”$width\” height=\”$height\””;
}
?>
The Function in Action
//get the image size of the picture and load it into an array
$mysock = getimagesize(”images/sock001.jpg”);
?>
<!—using a standard html image tag, where you would have the
width and height, insert your new imageResize() function with
the correct attributes –>
<img src=”images/sock001.jpg” >