web-development

What is Facebook's new Tornado framework?

Facebook just open-sourced a framework called Tornado. What is it? What does it help a site do? I believe Facebook uses a LAMP structure. Is it useful for smaller sites which are written under the LAMP stack? ...

render collection of partials as html in rails

I am using jQuery to do an ajax call to my controller, and everything is working perfectly, except I can't quite get the return value that I want. Let's say I have a collection of items, and I have the partial: /app/views/messages/_message.html.erb I am trying to render it as a big string of text/html like so: format.js { render_to_...

How to create my own recommendation engine?

i am intrested in recommendation engines these days and i wanna improve myself in this area.I am currently reading Programming Collective Intelligence (i think this is the best book about this subject) from OReilly (just started).But i dont have any ideas how to implement engine(what i mean by no idea dont know how to start).Lets say i h...

How to solve session fixed in asp.net ?

Right now I need to save content into Session object of an asp.net program, and I found when i save something into session object, asp.net will generate a cookie which contains ASP.NET_SessionId = "current session id". This will cause the session fixed security issue. Who can help me to solve this ? ...

ASP.NET: dynamicly generating HTML, how to?

I've been doing ASP.NET a little bit (on and off) over the last year, but I've never come upon this challenge: I'm building a website right now which is quite simple, mostly based in HTML and Javascript. However, on one page, I need to read an XML file off the server, parse it, create HTML from values contained in the XML file, and outpu...

Texts/codes to test for XSS attacks in my software/website

Hello, Firstly, I do not have any malicious intent out of this question. I would like to know what text to copy paste and test in my text areas and text boxes to see if they are stripped correctly. Currently I use something as limited as: <script> alert('xss'); </script> <a href="www.test.com" onclick="javascript:alert('xss');">test</...

Reporting Services Xhtml Engine

The html output of reporting services is horrendous. My understanding is that all reports are written in a common xml format so that they can be transformed into whatever medium is required (html, pdf etc). Hence, in theroy I could write my own engine to take the raw XML and output nice standards compliant, cross browser Xhtml. But I ...

Migrating from ASP.NET WebForms to ASP.NET MVC

I'm developing a web application for a company which I work for. My team started working on the app few months ago and the decision was to build it with ASP.NET WebForms. Now we've quite a lot of the code developed and we're wondering if ASP.NET WebForms was a good choice. Maybe we should migrate. Ok, but what's the first step? We don't ...

php Timestamp working logic

what is exactly happing when creating a Unix Timestamp from a given date. I want the step by step method to create timestamp. (not using php built in functions). EDIT: What is the specialty of this date :) January 1st 1970 00:00 h UTC ...

Tool to diff webpage semantic structure rather than content

Does anyone know of any tools that allow diff'ing between two web pages semantic markup rather than content? Cheers. ...

How do you replicate an array whilst keeping the same keys?

Ok. I've written a simple(ish) function to take an argument and return the same argument with the danger html characters replaced with their character entities. The function can take as an argument either a string, an array or a 2D array - 3d arrays or more are not supported. The function is as follows: public function html_safe($inp...

ASP.NET PopupControlExtender Problem

I am trying to create a popup which will be used to select a month/year for a textbox. I have kind of got it working but however when I try and read from the textbox when I Submit the form it returns an empty string. However visually on the page I can see the result in there when I click the Done button which can be seen in the screensho...

How do I determine what a website is built with if they rewrite their urls?

If a website rewrites their urls, what is the best way to figure out what technology/technologies they are using under the covers? ...

Accessing Facebook wall posts

Is there a way, via FQL or the Facebook API, to access the wall posts to a fan page (not a profile)? ...

DIY Form handling, PRG, Validation

I would like to implement form handling for web apps. I'd like to implement PRG (post-redirect-get), as I believe it is the way to go in form handling (plays very nicely with reload and back button). However, I'm seeing that it complicates validation. Basically, when you post, you have the form state (as post parameters). However, if yo...

How do you let people work on a project without exposing them to the whole code base?

Hi everyone! I'm Co-Founder and CTO of OnePage (http://myOnePage.com/joel). I'd be interested to hear your views and answers to this particular problem: I'm certain Yahoo! or Google don't expose their entire code to their developers! I was just wondering what method you use to restrict people from seeing the full code? In all projects ...

get the value of "onclick" with jQuery?

Is it possible to get the current value of the onClick attribute of an A tag via jQuery? For example, I have: <a href="http://www.google.com" id="google" onclick="alert('hello')">Click</a> I want to get the onclick code so I can store it for later use (as I'll be changing the onclick event for a little while). Is it possible to do s...

war file generated by Grails ignores dataSource URL

Grails version :1.1 Tomcat version: 5.5 The problem: The application doesn't use the URL data sources. It seems like - it is using some other data source- but it doesn't seem to be in memory DB- since I can see the data persisted between sessions. I have even tried giving a non -existant database name -and the application works fine...

What Amazon S3 .NET Library is most useful and efficient?

There are two main open source .net Amazon S3 libraries. Three Sharp LitS3 I am currently using LitS3 in our MVC demo project, but there is some criticism about it. Has anyone here used both libraries so they can give an objective point of view. Below some sample calls using LitS3: On demo controller: private S3Service s3 = n...

What's your perspective on Monopoly City Streets as a programmer/dba?

Monopoly City Streets is the latest MMORPG by Hasbro. If someone asks you to build a similar game, how would you go about it? What technology/language Hardware specs and scaling Database and its architecture Security or cheat prevention Other things... ...