Is there a way for a property to access its own name and type at runtime using reflection? I want to access this info without hard coding the name or index of the property in the class.
Simple Example Code:
Private ReadOnly Property MyProperyName() As String
Get
Console.WriteLine((Get Current Property Info).Type.ToString)
Console.WriteLine((Get Current Property Info).Name)
Return ""
End Get
End Property
Expected output:
System.String
MyPropertyName
It has to be self contained, some sort of Erlang runtime library, and the BEAM files. This is so that anyone can run the program with one click, by running a .exe off a network drive, without having to install Erlang or anything else.
I am looking into internationalizing a Flex application I am working on and I am curious if there are any best practices or recommendations for doing so.
Googling for such information results in a handful of small articles and blog posts, each about doing it differently, and the advantages and disadvantages are not exactly clear.
Edited to narrow scope:
Need to support only two languages (en_CA and fr_CA)
Need to be able to switch at runtime
When I call GetProperties() on a type, the properties are ordered as they are written in the source code. This is very handy but my question is, if this is a guaranteed behavior or may this change depending on the runtime version and the environment. Does anyone know something about that?
Runtime.getRuntime().exec("C:\mysql\bin\mysqldump -u root -pmypassword Databasename -r C:/backup.sql");
I am using this code to create back up from my sql. but It creates the empty file in the path.Because it is waiting in the command prompt to get the password. How can i give password to it
Using command prompt directly when i press enter after typing, it asks password.After giving password,It creates the backup.Give me any solution for this
Thanks in advance
After executing this code:
var runtime = IronRuby.Ruby.CreateRuntime();
var engine = IronRuby.Ruby.CreateEngine();
var scrope = engine.CreateScope();
engine.ExecuteFile("libtest.rb");
How can I get all the methods of a ruby class in c# code?
I'm using a list of siteMapProviders in my web.config file.
To retrieve these values in code, I need to specify the names in strings.
Understandably, these is always a mismatch at runtime.
Is there a way to return a strongly typed enum vlaues of these?
Hi All,
I am using <script> inside the body tag.
<script type="text/javascript" language="javascript">
$('#audioVolume').text($('#audioVolume').text(Math.round((document.mediaPlayer.Volume + 2000) / 10) + "%"));
</script>
Error: Microsoft JScript runtime error: 'undefined' is null or not an object.
Need: I want to access the html elements in <script inside the body tag.
I would like to create a C# program that creates an MSI based on a number of parameters. For example, based on user settings, certain files would be included, or runtime parameters set.
Can anyone point me towards any documentation that might help, or give me an idea where I might start with something like this?
Hi all,
I've a scenario where my java program has to continuously communicate with the database table, example my java program has to get the data of my table when new rows are added to it at runtime. There should be continuous communication between my program and database.
if the table has 10 rows initially and 2 rows are added by the user, it must detect this and return the rows.
My program shouldn't use AJAX and timers.
Please Help.
Java's jar file format builds off of the zip file format, and supports compression of the class files inside it. When and how does the JVM decide which class files to uncompress and pull out of the jars on its classpath? Is the process dynamic and done at runtime as classes are needed, or are they all uncompressed up front before the program actually runs?
How do you reload an application's configuration? Or, what are good strategies for managing dynamic application configuration?
For example, let's say I had log levels and I wanted to change them at runtime. Also, let's assume this is one of many such options. Does it make sense to have a "configuration server" that holds configuration state for other parts of the application to query? Do people do that or did I just make it up?
For example, the website URL and other stuff that wants to be linked at runtime with the app? I find that info.plist is a good place for that. But maybe it is not allowed or causes trouble...?
What ways do I have in .net to run code from string?
Console.WriteLine("1 + 2 * 3"); // results is 7.
What other options do we have?
C# - Compile the code on runtime?
IronRuby / IronPython?
F#?
(The target browser is IE8)
I have a div that contains a list of elements floated left. The elements width can change at runtime. I'd like to make it so that if they longer fit in the div it just gets cut off and doesn't wrap to a new line.
We always say that method overloading is static polymorphism and overriding is runtime polymorphism. What exactly do we mean by static here? Is the call to a method resolved on compiling the code? So whats the difference between normal method call and calling a final method? Which one is linked at compile time?
Hi. Sorry about the vocabulary question, but I'm writing my master thesis and it's a pain to repeat "frameworks that support dynamic class creation" again and again. Is there a term for that?
Some clarification: I mean that you can create a class at runtime, i.e., dynamically. For example, .NET supports this with the System.Reflection namespace.
Thanks :)
In C++, Is it possible to enumerate over an enum (either runtime or compile time (preferred)) and call functions/generate code for each iteration?
Sample use case:
enum abc
{
start
a,
b,
c,
end
}
for each (__enum__member__ in abc)
{
function_call(__enum__member__);
}
Plausible duplicates:
C++: Iterate through an enum
Enum in C++ like Enum in Ada?
Hi, I just encounter a strange problem:
var a:ClassA = new ClassA;
var b:ClassA = a;
The program keeps running sometime, the a = null, b = null.
The program is a complex one, I am sure that no part will touch a, and b. My question is, will the runtime(garbage collector) to collect the memory of "a" and then assign a and b to null?
I am confused, thanks!
Why java 1.4 compiler does not complain about a third party library compiled with 1.5 compiler ? The problem is encountered at runtime UnsupportedClassVersionError .
In runtime, I want to retrieve the expire time info about some items in memcached. I didn't find any related interface on memcached. Can I do this? something like:
mc.get_expire_time('key')
Thank you
I was psyched about the possibility of using SQLite as a database solution during development so that I could focus on writing the code first and dynamically generating the db at runtime using NHibernate's ShemaExport functionality. However, I'm running into a few issues, not the least of which is that it seems that SQLite requires me to use Int64 for my primary keys (vs, say, Int32 or Guid). Is there any way around this?
My goal is pretty simple actually but since there are multiple (and seemingly complex ways to do this) I wonder what I need to do... So I have certain runtime libraries (ADF libraries in particular) that are needed to be added to every project. This parent pom file will just have JAR dependencies in it. How can I use this pom file from a child pom file?
I have a winform in witch I have a custom LongPanel with textboxes.
In order to validate an eventually edited textbox when the user click somewhere out of textBoxY I use the following code:
Private Sub LongPanel_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs) _
Handles MyBase.MouseClick
_AttachedPanel.Select()
End Sub
In runtime application freezes at the "Select" line... I receive infinite panel Leave events... any idea why?