dynamic

PHP - dynamic menu with submenus

Hello, I've got a menu, that is something like this: <ul id="menu_cat"> <li><a class="cat1" href="#">category 1</a> <ul> <li><a class="cat2" href="#">category 2</a> <ul> <li><a class="cat3" href="#">category 3</a></li> <li><a class="cat3" href="#">category 3</a></li> <li><a class="...

Control Currently Click

Hi All, I've created some code that will dynamically generate a bunch of different LinkButtons. I've got each link button's onClick even pointing to: void LinkButton_Click(object sender, EventArgs e) { Response.Write("You clicked the link button"); } This runs fine, but now I when one of the LinkButtons is click I want t...

Calling a generic function with a type parameter determined at runtime

Hello, I have a question involving calling a class's generic method with a type parameter that is known at runtime. In specific, the code looks like so: FieldInfo[] dataFields = this.GetType().GetFields( BindingFlags.Public | BindingFlags.Instance ); // data is just a byte array used internally in DataStream DataStream ds = new DataS...

Objective C UIViewImage animation

Hi, Right now I'm able to do a simple animation using the code below. However, the below solution needs me to predefine the image names. How can I do something like NSArray.push("image1.png"); for example? Then assign the dynamic array as the animationImages? Thank you, Tee UIImageView* animationView = [[UIImageView alloc] initWithFra...

JS: Setting background-image with .click event is lagging 1 click behind the carousel image.

Hi, I have got the following code which reads the div.photo.active element's image src attribute, writes it to a variable which then should set it as the (tiling) background image of another div container. All of this works well however when clicking on the a.next and a.prev button to trigger the display:block & display:none states o...

Can generic parameters be specified when using dynamic variables?

Consider the following code: class Program { void Foo<T>() { } static void Main(string[] args) { dynamic p = new Program(); p.Foo(); } } Note surprisingly, the call to p.Foo() is not valid because the dynamic binder has no way of knowing what type to use for T. The specific failure is: "The type argument...

How to make Class.forName ignore lowercase/uppercase

For example when I have a class named; 'MonkeyBusiness' I know I can call it using Class.forName("MonkeyBusiness"); But when I call it using Class.forName("monkeyBusiness"); or Class.forName("monkeybusiness"); it gives me the exception; Exception in thread "main" java.lang.NoClassDefFoundError: monkeyBusiness (wrong name: ntx/gmd/se...

Mysql as a PHP DSO

I have a server that is running live (in process of turning it into a dev server but need some stuff off it first) so we don't want to recompile php to break anything. On the new server we have the dynamic extensions of mysql.so and mysqli.so I haven't been able to find anything about the details of building one myself, so copied them o...

How to center and scale SVG files inside another SVG file

I'm developing a program that generates svg files based on choices the user makes. One of these choises is to include another svg file centered on a specific point in the first one. The second file has an unknown aspect ratio and size, but it should be scaled to a specific max size either as height or width, and should be centered on one...

Hybrid static/dynamic Google Map

Ever noticed that when you go to maps.google.com and do a search (say, car wash), it renders a lot of results (represented by small circles) and a few prominent ones (seen as regular-size pins)? Notice how quickly it does this? From what I can tell from analyzing this in Firebug, much of this is generated on the server and sent to the ...

User defined xml transformation

I have some sample xml data, for ex: <?xml version="1.0" encoding="utf-8"?> <Account> <User> <FirstName>John</FirstName> <LastName>Doe</LastName> </User> <LoginDetails Sequence="1"> <LoginDate>01/01/09</LoginDate> <Status>Successful</Status> </LoginDetails> <LoginDetails Sequence="2"> <LoginDate>01/02/09</LoginDate> <Status>...

How to parse Web page with dynamic web content in java?

Hi i want to parse a HTML page which contains some values displayed.That values are updated at regular intervals.I have to get that value from a standalone java program.If i parse the HTML page with some HTML parser the source of that page is displayed instead of that value.i tried with NEkoHTML parser and JTidy parser but there are not...

Dynamic MySQL with local variables

How can I use dynamic SQL statements in MySQL database and without using session variables? Right now I have such a code (in MySQL stored procedure): (...) DECLARE TableName VARCHAR(32); SET @SelectedId = NULL; SET @s := CONCAT("SELECT Id INTO @SelectedId FROM ", TableName, " WHERE param=val LIMIT 1"); PREPARE stmt FROM @s; EXECUTE stm...

Persisting User Input for Dynamic Control in SharePoint Web Part

Edit at bottom with solution I've seen a similar question to this posted before and have tried the suggestions, but I must be missing something. My basic problem is this: I have a select box where the user can select a filter which may or may not have constraints built into it (requires the user to input further data so the filter know...

Get rid of NewApplication in a dynamic way?

Hi, I'm distributing two different versions of one product (like light and pro version). I don't know how to use the same MainMenu.xib if I can not change the placeholder NewApplication in a dynamic way. I would like to use the bundle name instead of "NewApplication". I hope there is an official way to do this without hacking. Thank yo...

How to add convenience class methods to a Singleton class in ruby

Let's say I have a singleton class like this: class Settings include Singleton def timeout # lazy-load timeout from config file, or whatever end end Now if I want to know what timeout to use I need to write something like: Settings.instance.timeout but I'd rather shorten that to Settings.timeout One obvious way to ma...

build oracle sql query dynamically from java application

How do I build oracle pl/sql query dynamically from a java application? The user will be presented with a bunch of columns that are present in different tables in the database. The user can select any set of column and the application should build the complete select query using only the tables that contain the selected columns. For exam...

Jquery Json dynamic variable name generation

I make a jquery .ajax call and I'm expecting a json result. The catch is, if there are say 5 authors, I'll get author_details_0, author_details_1, author_details_2, etc.... How can I dynamically construct the name of the variable to retrieve from json ? I don't know how many authors I'll get, there could be hundreds. $.ajax({ type: "POS...

Bake Flash swf using dynamic parameters on server-side?

For examples sake, lets say I have a Flash SWF on my web server. The SWF is quite simple, it just displays a text string in some font in the middle of the stage. The SWF takes certain parameters, one of which determines what text string is displayed. So if the parameter's value is "hello world!" the SWF would display the text "hello worl...

GZIP without using IIS ?

Hi Guys, I was wondering whether anyone knew of any ASP.NET compression modules that can use GZIP without relying on the IIS dynamic compression module ? We have some content which we want serve up as GZIPPED but we dont want to rely on IIS compression. Anyone have any ideas? ...