Suppose we have the Java code:
Object arr = Array.newInstance(Array.class, 5);
Would that run? As a further note, what if we were to try something like this:
Object arr1 = Array.newInstance(Array.class, 2);
Object arr2 = Array.newInstance(String.class, 4);
Object arr3 = Array.newInstance(String.class, 4);
Array.set(arr1, 0, arr2);
Ar...
I've got a simple ASHX handler that returns an dynamically generated image; the image is generated from a custom created class, and an object belonging to this class is passed to the handler using Session (I'd rather avoid using QueryString).
The handler is used as the URL of an image on a ASP form which is very simple: a drop down list...
what I am trying to do is represented in my other question with code.
Basically I need to keep in memory a table of elements (structs), there's no fixed number of elements that can exist, but it is small, but I still can't use an array.
And I don't want to use a linked list of elements because I don't want to keep adding and deletin...
Hi folks
I'm trying to refactor a query that currently uses reflection:
var dbObjects = from d in collection
where d.GetType().GetProperty("Id").GetValue(d, null) == id
select d;
I would like to use dynamic typing to access the property Id on "d" without knowing what type "d" is at compile time.
Something like this:
var db...
It only plays in ear mic!
I use Remote IO to playback
OSStatus status; // Describe audio component AudioComponentDescription desc; desc.componentType = kAudioUnitType_Output; desc.componentSubType = kAudioUnitSubType_RemoteIO; desc.componentFlags = 0; desc.componentFlagsMask = 0; desc.componentManufacturer = kAudioUnitManufact...
Dynamic Linq is provided as a sample for VS2008, not as a "real" project (no official site, no support, no issue tracking, no new releases...).
So I was wondering, how reliable is it ? Is it suitable for production use ?
...
Problem
I have a SQL server that has a dynamic IP address. However I have a url e.g. 'mydynamic.com'
which is automatically updated to the current IP of the SQL server
Requirement
I need a script (vb/bat) that can take this URL and resolves the IP. Then take a config file and replace a placeholder with that IP. The idea is that the co...
For example is something like this possible in PHP?
class foo
{
public $something;
}
$class_name = "foo";
$f = new $class_name;
...
I'm using an array to store the names of other arrays which are dynamically generated elsewhere. I need to loop through the "names" array and access the contents of the "named" arrays. Something like this:
$names = array("one", "two", "three");
$one = array("a", "b", "c");
$two = array("c", "d", "e");
$three = array("f", "g", "h");
fore...
I have a need for allowing business rules to be defined in a commercial, shipping product with respect to data authorization rules. The rules need to be customizable in the field, and the customizations need to survive updates of the application. The system is C#/ASP.NET.
I've considered using a DSL for this, but it seemed like a lot ...
Currently I am trying to figure out how I can add dynamic query string parameters to my sitemap navigation menu. For example, the user chooses the source and edition he wants to work with. I have a simple sitemap that creates navigational links but the parameters the user chose need to be passed in the query string. The default map loo...
Following the guide from Microsoft,
http://msdn.microsoft.com/en-us/library/ee872121(VS.85).aspx , I am able to get my program to be able to make program able to resolve the dynamic libraries that are required in order for my program to work.
So I add a value with the full name and path to my executable, and add subkey to this entry (n...
Here's a bit of history first: Recently finished an application that allows me to upload images and store them in a directory, it also stores the information of that file in a database. Database stores the location, name and gives it an ID (auto_increment).
Okay, so what I'm doing now is allowing people to insert images into posts. Thro...
SOLVED: See my solution below!
using aspx with C# code behind.
I have the following code in a button in a item template in a gridview:
Enabled='<%# IIF(Eval("wrqst_need_ind") == "Y","TRUE","FALSE") %>'
I am getting the following error:
The name 'IIF' does not exist in the current context
What am I doing wrong? I get the same erro...
I have a table called "users" with following columns
userid,name,gender,department,managerid....
I wanted to do this query but was having 2 issues
1. <> in line 4 is is causing problem, which is due to to the XML. I need to use but was not able to get things going even after some permutations.
2. the check department = 'engineering' ...
I'm looking for a way to add properties to my already defined class at runtime, or better:
class Client
attr_accessor :login, :password
def initialize args = {}
self.login = args[:login]
self.password = args[:password]
end
end
But then, I have this hash
{:swift_bic=>"XXXX", :account_name=>"XXXX", :id=>"...
i'm attempting to cast an object's property as an actual property of another object.
here's my object variable:
var propObj:Object = {prop:"width", width:50};
now i want to assign the property of a sprite using that object's properties.
var sp:Sprite = new Sprite();
sp.(propObj.prop as Sprite.property) = propObj.width;
now, i'm no...
Hi everyone,
I was wondering if there's a way to use PHP (or any other server-side or even client-side [if possible] language) to obtain certain pieces of information from a different website (NOT a local file like the include 'nav.php'.
What I mean is that...Say I have a blog at www.blog.com and I have another website at www.mysite.co...
I'm looking for clever ways to build dynamic Java classes, that is classes where you can add/remove fields at runtime. Usage scenario: I have an editor where users should be able to add fields to the model at runtime or maybe even create the whole model at runtime.
Some design goals:
Type safe without casts if possible for custom code...
Instead of trying to trying to put my problem into words, here's some code that demonstrates what I want to do:
Class [] domains = { Integer.class, Double.class, String.class };
String [] stringValues = { "12", "31.4", "dog" };
Comparable [] comparableObjects = { null, null, null };
for (int i = 0; i < domains.length; i++) {
// Tri...