web-development

I need get the IP address

I need get the IP address for the user cross the proxy using PHP... any suggestion ? ...

Security framework for java with object granularity

I am looking for a security framework for Java web application with Object granularity. What it means is that I don't just want to filter by urls or by roles, but by specific user ownership of domain objects inside the system. For example, if there is a Message object that has a Sender user and a Receiver user I would like to be able ...

Store static data in an array, or in a database?

We always have some static data which can be stored in a file as an array or stored in a database table in our web based project. So which one should be preferred? In my opinion, arrays have some advantages: More flexible (it can be any structure, which specifies a really complex relation) Better performance (it will be loaded in memo...

Do we need cache for an array?

Hi All: Since we're developing a web-based project using django. we cache the db operation to make a better performance. But I'm wondering whether we need cache the array. the code sample like this: ABigArray = { "1" : { "name" : "xx", "gender" "xxx", ... }, "2" : { ... }, ... } class Items: de...

How to test java code?

I've recently starting learning java web development and I want to learn/understand: What constitutes good java test good? For example, if there is back-end java code that validates user input from a form and then inserts into a db table, what should the respective test code look like? How do testing frameworks like TestNG, JUnit, etc....

CSS: Safari on Mac doesn't adhere to my Submit Button style

I have applied the following CSS to a FORM submit button: font:normal 15px helvetica,arial,sans-serif; padding:6px; On Windows, regardless of the browser (IE/Firefox/Chrome), this increase the FORM submit button and give the button spacing padding of 6px. However, on OS X (Mac), the form submit button is not stylized at all. Meaning,...

Downloading a file over https in IE8, using ASP.NET

I'm trying to make it possible for the user to download an Excel spreadsheet from our site, by having a button that redirect through this: Response.Redirect(string.Format("../excel/ExcelForm.aspx?pathName=&fileNameDisplay={0}&fileNameUnique={1}", "spreadsheet.xls", fileName)); The aspx page just sends back the file through the Respons...

Will Visual Studio 2010 support HTML 5?

Since Visual Studio 2010 is slated for release in March of 2010 and HTML 5 is now starting to be used even more widely, I would like to know if Visual Studio will ship with HTML 5 templates, standard controls and support for the more common markup? A definition for support of HTML 5 would be that any new version of Visual Studio should ...

CSS: How to increase the size of a OSX submit button

How do I increase the native FORM submit button size for OSX-Safari? I want to keep the native look of a FORM submit button for it's respective operating system while also enlarging the size of the submit button. (Meaning, no use of images, custom borders etc..) Using the following CSS: input.submitbutton {font-size:150%;} On Window...

Domains and cookie accessibility

If I am hitting www.foo.com and am writing some cookies there, will I have access to those cookies if I hit the same code base from www2.foo.com? Or does the cross-domain cookie security come into play with sub-domains as well? ...

How do I package a custom TrueType font with a web site so the browsers will render it?

I'm developing a website for someone but they want (insist) that the title be in a non-standard font. (The customer is always right.) I have the TrueType (.ttf) font but how do I bundle this with the website so that it uses it? I tried putting it in the Images folder and tried to access it with the style sheet: font-family:URL(Images/...

How are Models (in MVC) and DAOs supposed to interact?

How are models and DAOs supposed to interact? I'm in the process of putting together a simple login module and I'm unsure where to put the "business logic." If I put the logic with the data in the model, how would I access the logic? Currently, I have: A controller that receives form data A model that is a simple reflection of...

Web site resolution fix for all resolution in Javascript

I am using template where java script file has been used for fix resolution for all resolution. But I don't know javascript and if I make any changes in tempalate so resolution doesnt work. var ElementMaxHeight = function() { this.initialize.apply(this, arguments); } ElementMaxHeight.prototype = { initialize: f...

What questions should a JavaScript programmer be able to answer?

Suppose a company is going to hire JavaScript coders. I wonder what question should this company use to properly evaluate them. Even though general programming skills are more important than technology-specifics, they need to be tested on what they are going to work with. How would you do that? How would you test if they have the proper...

What are good priciples for creating a scalable website?

What are good priciples for creating a scalable website predominantly C#? What design patterns are more common for a C# based website? Links to good books or articles are welcome. ...

How to avoid scientific notation for large numbers in javascript?

Javascript converts a large INT to scientific notation when the number becomes large. How can I prevent this from happening? Thanks! ...

Looking for a very simple spam-prevention class/function for ASP Classic

I am looking for a very simple solution to prevent (or reduce) form spamming. I've got quite a few ASP classic applications that contain contact us/miscellaneous forms here and there that generate emails. Few of them have been caught by spam bots and are being abused. I need very simple solution(s) to reduce spam if not eliminate it. Aud...

How to update some part of the webpage?

I would like to update (change the content) some part of the webpage without updating the whole page (without refreshing the page). Of course first thing you would write as an answer will be "Ajax!!!", but I know that search engines will not be able to get the content of that part if I do with Ajax. So is there any method or workaround ...

How can I set the body color of a web page to the current width and height of the monitor?

In the CSS for my web site, I have specfied the height as 800px, width as 1050px and the background-color to blue for the body tag. The entire application (width and height) should be this size. But if the current application is viewed on a monitor whose dimensions are larger (EG, 1440x900), we see white space towards the left and rig...

Paging: Storing Search Results

What's the proper way to deal with a web page that returns results of a search that could have differing results from one moment to another? I.e. returning the query the first time could contain different results from when the user clicks on page 2, and running the query again. How do most people deal with this scenario? Generally I'm...