I have a web app where the user needs to upload a .zip file. On the server-side, I am checking the mime type of the uploaded file, to make sure it is application/x-zip-compressed or application/zip.
This worked fine for me on Firefox and IE. However, when a coworker tested it, it failed for him on Firefox (sent mime type was something...
In multiple courses, books, and jobs, I have seen text fields defined as VARCHAR(255) as kind of the default for "shortish" text. Is there any good reason that a length of 255 is chosen so often, other than being a nice round number? Is it a holdout from some time in the past when there was a good reason (whether or not it applies toda...
Just looking for some general information on how the Google Analytics javascript code placed on the bottom of each page authenicates a website.
Obviously there is a tracking code which is paired to the domain name but is there more to it than that? Is it checking anything else to make sure its secure and not open to misuse?
...
Hi,
I wonder how virtualization software such as VirtualBox or VMWare Workstation works? How can they create a virtual environment that is taken as a separate computer by operating systems? I'm almost sure the answer to this question is very deep, but I'd be well satisfied with basic theory =)
Thanks in advance!
...
When I write a program and tell it int c=5, it puts the value 5 into a little bit of it's memory, but how does it remember which one? The only way I could think of would be to have another bit of memory to tell it, but then it would have to remember where it kept that as well, so how does it remember where everything is?
...
I was downloading a 200MB file yesterday with FlashGet in the statistics it showed that it was using the HTTP1.1 protocol.
I was under the impression that HTTP is a request-response protocol and most generally used for web pages weighing a few KiB...I don't quite understand how it can download MB's or GB's of data and that too simultaneo...
/html/body/input[@id='query' and @name='query' and @value='Search Text']
...
When I run my program I get this error nullPointerException: null.
import model.*;
import java.awt.*;
import java.awt.event.*;
import java.text.*;
import javax.swing.*;
public class ButtonPanel extends JPanel implements View
{
private Prison prison;
private LeftInputPanel leftInput;
private DaysPanel days;
private MonthsPanel months;
...
I recently used Wikipedia's function "What links here" (which is found under the "Toolbox" element in any entry's left menu) and it got me started wondering how this function actually works.
I'm guessing that searching through all the article entries after links isn't very effective, so are all the links stored in a separate database? If...
When I rename a variable using ReSharper 4.5 (VS2008), the rename is performed inline (I specify the new variable name in the editor itself) or via a prompt (a popup window where I specify the new variable name).
I'm hoping someone can tell me what determines which approach is used?
...
There are many programs out there that will allow you to pack a few files together and generate an executable that has the necessary code to extract them. Somehow, those files are residing inside the executable. I am interested in doing the same thing; how is this done?
FYI, I'm interested primarily in Windows .exe files, if it makes a ...
I am trying to figure out how the Swing based Hello World application works. This is the code I have:
import java.awt.*;
import javax.swing.*;
public class HelloWorldSwing extends JFrame {
JTextArea m_resultArea = new JTextArea(6, 30);
//====================================================== constructor
publi...
I know that we cant use assignment operator in if statements in java as we use in any other few languages.
that is
int a;
if(a = 1) { }
will give a compilation error.
but the following code works fine, how?
boolean b;
if(b = true) { }
EDIT : Is this the exception to rule that a...
I'm interested in literature (articles on internet, in magazines, books, podcasts - I don't really mind anything) that describes how PHP works internally, about its gotchas and perhaps some advanced functions. Is there anything like this out there? I tried to search on Google, but majority of articles were about starting with PHP and its...
I was just thinking to myself "How exactly is a PHP script executed?" I thought it was parsed first for syntax errors etc, and then interpreted and executed.
However, I don't know why I believe that is correct. I'm probably wrong.
So, how exactly is a PHP file interpreted and executed? What stages does this involve? How do included fil...
For anyone not familiar with Verizon's SongID program, it is a free application downloadable through Verizon's VCast network. It listens to a song for 10 seconds at any point during the song and then sends this data to some all-knowing algorithmic beast that chews it up and sends you back all the ID3 tags (artist, album, song, etc...)
...
Given
public enum Title {
MR("Mr."), MRS("Mrs."), MS("Ms.");
private final String title;
private Title(String t) {
title = t;
}
public String format(String last, String first) {
return title + "" + first + "" + last;
}
}
public static void main(String[] args){
System.out.println(Title.MR.format("Doe","John"));
}
Doe...
Hello
i just wander how does the parents control sites do problematically the
web filtering and the url blocking in there applications ?
the question is because i need to build something similar
...
I have debugged through JavaScript using Firebug more than hundred times without worrying about whats happening there.
I want to know how exactly a Firebug handles JavaScript/DOM debugging.
Say I set a break point on some statement inside a method and start debugging. I want to know what's going on in there?
...
Hey everyone,
I've been trying to figure out what computer field I want to go into later on in life. College is just around the corner for me and I've considered looking into Computer Engineering, Software Engineering, etc.
Lately, I've been looking into computer security systems and exploitations of such (purely for educational purpos...