Is there any way to cleanup JavaScript code?
I want to enable users to post arbitrary JS but i want to filter some of it out, like eval and document.write. Do you know of any tool that can do this?
I noticed while doing system testing that a feature of our app had been removed. It looks like at some point, an older version of a file was checked into SVN that was missing a property. This specific file was generated from the Core Data model, and sure enough, the latest version of the model in SVN is missing the same attribute. I need to find…
I've got my computer set up in Japanese (hey, it's good language practice), and everything is all fine and dandy... except javac. It displays localized error messages out to the console, but they're in Shift-JIS, not UTF8:
$ javac this-file-doesnt-exist.java
javac: ?t?@?C??????????????: this-file-doesnt-exist.java
?g????: javac <options>…
Hi all,
In Classic ASP, shouldn't a subroutine in global.asa be available to all .asp pages in the session? For some reason I am having trouble calling the sub. Before I look at whether something specific to my application is causing the problem I wanted to make sure I understood properly.
global.asa:
<SCRIPT LANGUAGE="VBScript"…
In my HTML 5 + Javascript application, we can drag, re size and rotate image in Html 5 canvas. But after doing rotation, re sizing is not working. (I think it i related to finding dx,dy,not sure). Please help me to fix the code given below. Thanks in advance.
<!doctype html>
<html>
<head>
<style>
#canvas{
…
What's the idiomatic way to do maximumBy (higher order function taking a comparison function for the test), on a list of lists, where the comparison we want to make is the sum of the list, in Python?
Here's a Haskell implementation and example output:
> maximumBy (compare `on` sum) [[1,2,3],[4,5,6],[1,3,5]]
> [4,5,6]
Hi,
I'm trying to use Lucene to query a domain that has the following structure
Student 1-------* Attendance *---------1 Course
The data in the domain is summarised below
Course.name Attendance.mandatory Student.name
-------------------------------------------------
cooking N Bob
art Y …
Does anyone know how to change the subnet mask and the DHCP enabled flag on Windows XP / Vista / 7 from a C++ program?
The Windows API has a GetAdaptersInfo() routine which will give you that information, but I need the counterpart SetAdaptersInfo() which doesn't seem to exist. I've looked all over MSDN and the web and don't see…
I try to pragrammatically run applications such as notepad.exe and Calc.exe with the following codes. I can see the application is activated in Process Exprorer but the application UI does not appear on the screen. I got this info inside the process p - "Process must exit before requested information can be determined" and the…
I'm building a php based application for a client to enter in addresses for their customers' buildings. They'd like the ability to view the location on a map (either as individuals or grouped in a city search).
What I'm trying to accomplish is a lookup once the address is entered into a form that populates the database, so…
Apologies if this has been answered, but I could not find a similar question:
I am developing a webpart for MOSS 2007. I am using WSPBuilder to built a visual webpart (ascx) and everything works fine, but the development/debug cycle is just painfully slow, so I'd like to know if it is possible (without being too painful)…
Has anyone ever had an incidence of downloading software from a genuine site, where an MD5 or SHA series hash for the download is also supplied and then discovered that the hash calculated from the downloaded artifact doesn't match the published hash?
I understand the theory but am curious how prevalent the problem is.…
I'm watching CXF service traffic using DonsProxy, and the CXF client sends an HTTP header "SoapCompressed":
HttpHeadSubscriber starting...
Sender is CLIENT at 127.0.0.1:2680
Packet ID:0-1
POST /yada/yada HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SoapCompressed: true
Accept-Encoding: gzip,gzip;q=1.0, identity;…
I've used emacs for decades and always wondered, but kept on coding, if there was a way to type in something, them move the cursor and insert the same text, like the VI . command.
Instead what I do is to type the text, set the mark, backup, copy the region, go to the next spot (often just C-n, down one line) and…
Hi,
The Grails manual shows this example of dependency injecting domain classes:
class Book {
def bookService
def buyBook() {
bookService.buyBook(this)
}
}
However, I tried this out, and bookService is null. My guess is that the dependency injection happens when an object is loaded…
I'm using the totemticker jQuery plugin, but need to be able to stop it programatically. It doesn't seem to provide this feature, so I had a look at the source code to see if I could add it myself.
It seems that all I need to do is figure out how to call
base.stop_interval()
However, I can't seem to make…
I recently answered a question with an attempt at writing a quicksort function in scala, I'd seen something like the code below written somewhere.
def qsort(l: List[Int]): List[Int] = {
l match {
case Nil => Nil
case pivot::tail => qsort(tail.filter(_ < pivot)) ::: pivot ::…
How to .NET package JavaScript/bookmarklet as Interner Explorer 8/9 Plugin?
I have recently finished writing JavaScript code for a browser addon, which basically (once the JS is included) runs on page-load, for given domains it then checks for certain elements in the DOM and adds new relevant…
I'm researching a way to build an n-tierd sync solution. From the WebSharingAppDemo-CEProviderEndToEnd sample it seems almost feasable however for some reason, the app will only sync if the client has a live SQL db connection. Can some one explain what I'm missing and how to sync without…
Hi,
My project has a fairly deep graph of Maven modules. The root POM has the following plugin configured
<plugins>
<plugin>
<groupId>org.jvnet</groupId>
<artifactId>animal-sniffer</artifactId>
…
Hope the title says it all... I'm wondering if it's possible in any existing lightbox to pop up a look similar to the mac dashboard where multiple divs could be "on" in the front with the main webpage with a gray overlay.
Basically something where a user…