creation

Creating/modifying images in JavaScript

Is it possible to dynamically create and modify images on a per pixel level in JavaScript (on client side)? Or has this to be done with server based languaged, such as PHP? My use case is as follows: The user opens webpage and loads locally stored image A preview of the image is displayed The user can modify the image with a set of s...

Creating a file inside a folder that doesn't exist yet in php

I want my php script to create an output file in a folder based on the date. The way I'm doing this is that its supposed to get the foldername/filename from a text file outputted by another program which I am unable to edit. So the file its grabbing the data from looks like this: data/newfolder/10302008/log_for_Today.txt | 24234234...

C# Excel footer problem

I am creating a C# windows application to create an Excel 2003 sheet. There is a requirement to add to the footer: Page 1 of 4. I currently have it so it puts "Page: &[Page] of &[Pages]" into the footer of the excel sheet. When I open up the created document and look at the footer I see "Page: Page] of Pages]" I can click on the tex...

Is this a suitable case in which using dynamic function creation would be justified?

I'm currently developing a tutorial site for teaching the fundamentals of Web development (HTML, CSS, and JavaScript, for starters). I'd like a setup where I could give in-depth coverage of all sorts of topics and then provide a basic sandbox environment where the user could write code which solves the question asked at the end of each t...

Controlling object creation

I have a class whose object must be created on the heap. Is there any better way of doing this other than this: class A { public: static A* createInstance(); //Allocate using new and return static void deleteInstance(A*); //Free the memory using delete private: //Constructor and destructor are private so that the object can not b...

Java how to: Generic Array creation

Due to the implementation of Java Generics you can't have code like this. How can I implement this while maintaining type safety? public class GenSet<E> { private E a[]; public GenSet() { a = new E[INITIAL_ARRAY_LENGTH]; } } I saw a solution on the java forums that goes like this: import java.lang.refl...

how to create a com dll using visual studio 2008.

how to create a com dll using visual studio 2008.what are the custome settings needed for creating dll. that dll should be used in microsoft navision(ERP PACKAGE). ...

flex Actual CreationComplete event

Which event should I use if I want to make sure all the nested components inside a component have been created? Creationcomplete doesn't seem to work this way. ...

Fowler Data Mapper Object Creation

I have been utilizing the Fowler patterns for domain models with a Data Mapper and have run into some confusion on how to implement the creation portion of CRUD. I can't utilize existing ORM technologies as the underlying data sources are custom systems. The area that’s troubling me is how to call the underling ORM when I need to create ...

Creating XML document in jQuery environment

Have referred to JQuery docs where they mention this piece of code. var xmlDocument = [create xml document]; $.ajax({ url: "page.php", processData: false, data: xmlDocument, success: handleResponse }); but i am trying to make the same request in Adobe AIR environment its giving a parse error. Is there any specific way of crea...

Is this Factory Method creation pattern?

I have been using factory method creation pattern for awhile now. I was just recently told that this: public static class ScheduleTypeFactory { public static IScheduleItem GetScheduleItem(ScheduleTypeEnum scheduleType) { IScheduleItem scheduleItem = null; switch (scheduleType) { case Schedule...

Dynamic two or more levels sub-menu generation in vb6

Friends, Tell me how to generate more than 1 levels of sub-menu in VB6 at runtime? Explain in brief? Any specific controls are there? But i dont want to use external controls! ...

How to catch file creation and the responsible caller

Hi, We are using a third part library to render 3d. In this library there is a "memory tracker" functionality that keeps track of all memory the library has allocated and freed during execution. This is a nice feature, since it helps by determining e.g. memory leaks. By calling a certain function in this library a log file is generated...

JVM, Java, Multithreading, Object Creation

i am encountering a weird scenario, Is there a possibility of JVM re-using an already created object when we are initializing a new one and the object count is JVm is very high? abc a = new abc(); a.setAttribute("aaaa"); ......... a...is no longer being used...and has not yet been garbage collected by the JVM. There are multiple threads...

CopyTo() to a directory that doesn't yet exist

I want to copy the file c:\a1\b2\c3\foo.txt to d:\a1\b2\c3\foo.txt. The subdirectories don't exist on the D drive, and if I try to do a direct CopyTo() I'll get an IO exception. I haven't been able to find any built-in c# function that does the dirty work of creating the missing directories. So I wrote this: FileInfo file = new FileInf...

How can I create an object whose derived class is specified implicitly by the creation properties?

I'm looking for a pattern for the following. (I'm working in Perl, but I don't think the language matters particularly). With a parent class Foo, and children Bar, Baz, Bazza. One of the methods for constructing a Foo is by parsing a string, and part of that string will implicitly specify which class is to be created. So for example i...

hash vs specific parameters

I am in the process of writing a small javascript library to make form creation/validation easier. This is mostly an excuse to get better with javascript. I am debating about how to take in user input for form element creation. I am looking at two approaches. One is to take in a few pre-determined parameters such as id, label, value Th...

Sorting SPARQL results by date

Is there a way to sort the results by creation date? Example query which must be sortet: SELECT * WHERE {?s ?p ?o} limit 200 ...

How to force Flex validation when a container is displayed

I have a Flex 3 app with a view in a viewstack, and that view must only be created when requested. I have declared validators for each of the controls on the view and I have created a method called checkAllValid() which runs Validator.validateAll(). This works great when I'm actually using the controls (using the change or focusOut event...

iPhone Dev - NSString Creation

I'm really confused with NSStrings. Like when should I do NSString *aString = @"Hello"; of should it be: NSString *aString = [[NSString alloc] initWithString:@"Hello"]; But then its different when you're assigning a value to an NSString property isn't it? Can someone clear this up for me? Thanks!! ...