on-the-fly

JQuery - making code execute for each new DOM object instantiated

I'm wondering if this is possible in JQuery. I have some Javascript code that creates DOM objects on the fly, in response to user actions. Some of those DOM objects are in a specific structure - the container always has the same "class" attribute. What I'd like to do is, every time a new instance of a DOM object with class "X" is creat...

Js write with no blank page

hey I know I may seem like a complete fool for asking this question but I truly have never known and nothing I find helps me. I have this string generated using javascript and I want to append it to my existing web page on the fly. I've used document.write(); or just document.getElementbyId('').append(); and I just can't get it to append...

Load assembly and change source, is it possible and how?

I'm writing .NET On-the-Fly compiler for CLR scripting and want to implement next idea: there is a template file with C# code, I want to read it, create an assembly, load it and amplify source on-the-fly. How can I do that? ...

Operator as and generic classes

I'm writing .NET On-the-Fly compiler for CLR scripting and want execution method make generic acceptable: object Execute() { return type.InvokeMember(..); } T Execute<T>() { return Execute() as T; /* doesn't work: The type parameter 'T' cannot be used with the 'as' operator because it does not have a class type constraint nor a...

javascript and php on the fly calendar

I have the code for a javascript calendar and it works perfectly as it creates it when the page loads. However I was wondering if it's possible to add events to it. I found a plugin (jQuery) that enables the user to hover over a td with class "event" and an event will be displayed. So since this calendar will not be used by me but by som...

How do I transparently compress/decompress a file as a program writes to/reads from it?

I have a program that reads and writes very large text files. However, because of the format of these files (they are ASCII representations of what should have been binary data), these files are actually very easily compressed. For example, some of these files are over 10GB in size, but gzip achieves 95% compression. I can't modify th...

Defining a class while a Java application is running.

In Java, is it possible to create a class definition on the fly while an application is running, and then create an object of that class? For example, a running application would read in a text file that contains a list of class members to include in the new class. The application would then define a class definition based on the list o...

consecutive <li> classes

I have trouble finding an expression to automatically generate a new 'class' like the following: <ul> <li class="img1">link</li> <li class="img2">link</li> <li class="img3">link etc...</li> </ul> This is nested in 2 tabs for 'most read' / 'latest comments'. The different classes are so that I can make a different bullet (number) usin...

Third party library to convert image into pdf and eps format on the fly?

I have an upcoming .NET project that would require conversion from image (bitmap) into .pdf and .eps format. We would prefer to use third party library tool to do this rather than spending the time to reinvent the wheel. Here is the basic requirement: Preferrably a pure .NET library (we might put this converter code in Silverlight appl...

JQuery live or something similar with .change() ?

I want to do this: http://docs.jquery.com/Events/live#typefn Only .live() doesn't support the change event- any ideas for work arounds? Need to bind a function to some on-the-fly DOM elements, but not until change. ...

php create file and send as attachment without actually creating the file

I know how to read a file on the server and attach it to an email in PHP, but I wanted to know if I could attach a file that is created by my script but not created on the server (kinda like a temp file). So create file in memory and attach it to email. Bonus: might need to create multiple files as well, would this be too much for the...

jQuery: <IMG/> element on-the-fly

Here is the problematic part of my code, run inside .each(function(){ }); $('img','<div>'+ed.selection.getContent({format: 'html'})+'</div>').each(function(){ $img=$('<img/>').attr('src',$(this).attr('src')); alert($('<p>'+$img+'</p>').html()); if ($(this).attr('height').length>0){ $img.attr('height',$(this).attr('height'))...

testing Java code generated during another test

I want to build a "toJavaCode()" on my model that would generated the required Java source code to generate that model (never mind the reasons or if it should or shouldn't be done, nor the compatibility issues that may occur). I'm at a loss at how to test this. I'm using maven, but generate-sources won't really work for me since my serv...

Catalog entries: Updated html files or on-the-fly from database?

I've got a database site that will serve approximately 1,200 primary entries at launch, with the prospect of adding ~100 new entries per year. Each entry would be composed of ~20 basic values from the database, as well as a calculated average rating, and a variable amount of user comments. The rating and comments output would have to be...

Creating subdomains on the fly

When one signs up for Blogger or WordPress, one gets very own subdomain that works instantly. How can do like that given I have my own VPS/VDS/Dedicated server? ...

Serving Images with on-the-fly resize

Hello, my company has recently started to get problems with the image handling for our websites. We have several websites (adult entertainment) that display images like dvd covers, snapshots and similar. We have about 100'000 movies and for each movie we have an average of 30 snapshots + covers. Almost every image has an additional vers...

Microsoft DBMS on-the-fly aggregation

Some time ago i was reading an article about new MS DBMS technology. It's some kind of OLAP but on the fly. This technology can bind to data flows and then provide a real time aggregation. So the question is "what is it's name?". I need such a technology now but can't remember it's name... Or maybe there are some similar technologies? ...

Embedding a Bitmap in ASP.NET's WebResource

I am generating a System.Drawing.Bitmap on the fly in an ASP.NET Custom Web Server Control, and then I want to serve this bitmap as part of the WebResource, because I do not want to save it on the hosting computer. Is there a way to instruct ASP.NET to serve the generated System.Drawing.Bitmap as part of it's WebResource? (therefore mak...

Adding new functionality to an application using on-the-fly class generation

Is it possible to generate subclasses at runtime or while an application is running? If so, how is this achieved and what precautions should be taken to prevent a rogue object wreaking havoc inside an application? Edit: Title modified from "Class generation on the fly". ...

On-the-fly thumbnails PHP

I came up with this: <?php $dir = $_GET['dir']; header('Content-type: image/jpeg'); $create = imagecreatetruecolor(150, 150); $img = imagecreatefromjpeg($dir); imagecopyresampled($create, $img, 0, 0, 0, 0, 150, 150, 150, 150); imagejpeg($create, null, 100); ?> It works by accessing: http://domain.com/image.php?dir=thisi...