I have a java.io.Reader as the return type of my method. But i have Object type of an instance which i get from Database. So how can I convert this to Reader type and return?
need help
thanks.
Apparently this does not work.
WHY ???????
I don't want to do all this just to call my function:
Dim x as new Object()
x.Method()
WHY do I have to do this in 2 lines when I can in one. This is really pissing me off.
When using Excel Interop libraries from .NET, I can find a Range object representing the cell offset from Range X by calling something like.
Range Y = X.Range[2,3];
But what should I do to perform the inverse operation, ie: I have two Range objects, A and B, and I would like to find out by how many rows/columns B is offset from A.
Does anyone know the easiest way to do this? Is there a library function?
Thanks.
Hi All,
How does jvm know what class an object is an instance of at runtime. I know we can use the getClass method to get the class name but how does the getClass method work?
Thx,
Praveen.
Hi,
If there is a tool for analyzing memory leaks in a c++ COM Object, please provide a link here
If no such tool exist, what would be the best way to handle memory leaks ?
Thank You
Hi, does anyone know if it is possible to cast a generic type with a certain type parameter (e.g. Bar) to the same generic type with the type parameter being a base type of Bar (such as object in my case). And, if it is possible, how would it be done?
What I want to do is have a collection of Foo but be able to add Foos with more specific type arguments.
Thanks
Is there any difference between Convert.ToString Method and Object.ToString() in C#.net other than the how these handle null value.
There could be some difference between the two in the Globalization Perspective.
Hi,
I want to move 500 table from Database to other with their data and constraints all the tables have column who has default value, I used SSIS using "Transfer SQL Server Object Task" and I choose to copy all tables, copy data and primary keys, it copies the table except the default bindings
I tried in SQL Server 2008 CopyAllDRIObjects Property but still the same result.
How can I copy all tables from database to other with their data and maintaining their constraints.
Hi,
Can any one tell me which one is better in "Session Facade Class" and "Single ton Object" design patterns in ASP.Net? Also, please state the scenarions where specific design pattern is advisable to use.
Thanks
Rupa
In javascript on a browser, I can do this to see if an object is DOM-related:
obj instanceof Node
How do I accomplish this with google desktop? Node is undefined, and this doesn't work either:
obj instanceof basicElement
How do I create a cache for a struct pointer object in Objective-C? Is there any third party component for caching objects as Java and .NET have?
I have the following struct:
typedef struct _news {
references
char *headline;
char *story_url;
} news;
I have a double pointer for the above struct in an interface class. I would like to cache it for some time using Objective-C.
Hallo all.
I got a javascript object with some propeties let's say
function Animal() {
this.id;
this.name;
I need to call id function in a dynamic way to get and set its value: something like this
Animal animal = new Animal();
var propertyName = "id";
animal.+propertyName = "name";
Is there an elegant way to do it? With jQuery?
Kind regards
Massimo
Hi,
If there is a tool for analyzing memory leaks in a c++ COM Object, please provide a link here
If no such tool exist, what would be the best way to handle memory leaks ?
Thank You
Hi there,
Is there a way to retrieve tables, including alias tables, and columns, including alias columns, from an Apache Torque Criteria object reliably?
I understand that there is methods like: getSelectedColumns, getAsColumns(), getJoins(), etc., but for examples, getJoins() will just return a list of joined tables strings in free text, where one has to use regular expression to extract the needed joined table information out of it.
Thanks in advance!
David
Does anyone have a good resource on implementing a shared object pool strategy for a limited resource in vein of Sql connection pooling? (ie would be implemented fully that it is thread safe)
I have this code:
CardView *aCardView = [self prendiCartaDalMazzo];
[aCardView removeFromSuperview];
[self.mieCarte addSubview:aCardView];
when i try to add aCardView as as subview of mieCarte then i get this error:
objc[4800]: FREED(id): message superview sent to freed object=0x393f130
Program received signal: “EXC_BAD_INSTRUCTION”.
Thanks at all can help.
I have the following Python 2.6 program and YAML definition (using PyYAML):
import yaml
x = yaml.load(
"""
product:
name : 'Product X'
sku : 123
features :
- size : '10x30cm'
weight : '10kg'
"""
)
print type(x)
print x
Which results in the following output:
<type 'dict'>
{'product': {'sku': 123, 'name': 'Product X', 'features': [{'weight': '10kg', 'size': '10x30cm'}]}}
It is possible to create a strongly typed object from x?
I would like to the following:
print x.features(0).size
I am aware that it is possible to create and instance from an existent class, but that is not what I want for this particular scenario.
I have a Java Map (out of Strings and Ints) object that I want to save to a database.
Is there a standard way to go about this task?
Is there a way to compress the Map to take less space on the harddrive?
The following code executes fine in Firefox and Chrome, but gives an error:
'null' is null or not an object
when executed in Internet Explorer.
if (xmlhttp.responseXML != null)
{
var xmlDoc = xmlhttp.responseXML.documentElement ;
var ResultNodes = xmlDoc.getElementsByTagName ("Result") ; <---- error here
if (ResultNodes != null)
{
(I would have thought the line after the one indicated would be more likely to return the error but the debugger says the run-time error is at the line indicated)
Any ideas why?
Hi.
Should we use de java.util.Date object in java?
It has so many Deprecated methods that is a little anoying to have to use a complex method to something that should be so simples.
I am using something stupid to emulate getDate() like:
public static int toDayMonth (Date dt)
{
DateFormat df = new SimpleDateFormat("dd");
String day = df.format(dt);
return Integer.parseInt(day);
}
It has to be better way...
If i use thread like this:
void foo()
{
new Thread().Start();
}
since the Thread object is not referenced, will it be disposed by GC before the designated work is done?
I'm writing application for code generation and I would like to use object explorer control such as the one in visual studio, so I can manually design my objects.
How can I do that?
Hi everyone,
can I convert a string to a html object?
like:
string s = '<div id="myDiv"></div>';
var htmlObject = s.toHtmlObject;
so that i can later on get it by id and do some changing in its style
var ho = document.getElementById("myDiv").style.marginTop = something;
Thanx a million in advance,
Lina