I tried to upload xml file using xmlhttprequest object on Javascript.
It works perfectly well on Firefox.
However, it fails on IE 8.
I tried several machines.
Same result......
any insights?
Hello,
I have the following:
Class 1 (Text, State, Level)
Class 2 (Text, State, Level, Ident)
Is there a way for me to cast an object of Class 2 into into Class 1, and not having to do the usual cast code (Text = c.Text, State = c.State etc.)? Possibly by identifying the property names of each class and copying the value over?
I want to map the Name column from the Child table into the Parent object. How do you do this (using Fluent NHibernate)?
public class Parent
{
public int Key { get; set; }
public string ChildName { get; set; }
}
Tables
+--------------+ +------------------+
| Parent | | Child |
+--------------+ +------------------+
| Key INT | +--->| Key INT |
| ChildKey INT |-----+ | Name VARCHAR(20) |
+--------------+ +------------------+
hey all
i am trying to aggregate form elements into object and then send it via ajax here is the code that i start using but i cant figure out how to do the rest
$('.jcart').live('submit', function() {
});
I'm trying to convert a dictionery into a json object, so that I can work with it in my front end.
sortFields = <%= SchrodersHtmlHelper.ToJson(ViewData["SortInfo"])%>;
However, I keep on getting "Expected expression" for this all the time and I'm clueless why. Could anyone explain to me what I'm doing wrong?
Edit: The conversion works fine, but I still get this issue in the front end, causing the browser to complain about it.
Possible Duplicate:
Can I add custom methods/attributes to built-in Python types?
In Ruby you can override any built-in object class with custom method, like this:
class String
def sayHello
return self+" is saying hello!"
end
end
puts 'JOHN'.downcase.sayHello # >>> 'john is saying hello!'
How can i do that in python? Is there a normally way or just hacks?
string a = "a";
string b = a;
string a = "c"
Why does string b still have the value "a" and not "c"?
As string is an object and not a stack value type, what's with this behaviour?
Thanks
My json object looks like:
User { ID: 234, name: 'john', ..);
I want to build a string of all the ID's.
How can I do this? is there a more elegant way than below?
var ids = '';
for(int x = 0; x < json.length; x++)
{
ids += json[x].Id + ",";
}
// strip trailing id
Hi
I am Serialing an object using
GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("string1",subobject1);
info.AddValue("string2",subobject2);
}
what will be stored in stream? do the strings also store?
I have an object (Contacts) which has two has_many relationships: Campaign and Company
When I am in the Campaign view, I want to add a Contact.
But without a Company_Id, Controller says cannot find company_id (which needs to be there if I add a Contact through the Company).
What should I do?
Hi,
I am looking for how to write a method that accepts some value and returns a proxy to that value where the underlying value can be retrieved with an accessor:
def p = toProxy(1)
assert p == 1
assert p * 2 == 2
assert p.underlying == 1
def p2 = toProxy(objWithMethodFoo)
p2.foo()
p2.underlying.foo()
I want to do this per object instance (not for all objects of some class) and without the need to use special 'use' constructs.
Doctrine Automatically creates indexes on columns that are used to define object relations,
For example
user: id, name
message: id, sender_id, receiver_id, message
if I define relationship between message and user in a way that message has one Sender and has one Receiver, doctrine will automatically index sender_id and receiver_id fields when I generate sql from model. I would like to disable index on sender, because I manually create index with sender_id and receiver id together. How can I disable auto generated index?
I am a rank beginner in C#. I am currently using this code:
objGraphics.Clear(SystemColors.Control);
What I want to do is Clear this object to black (or some other RGB color), and I'm stumped as to how to replace the SystemColors.Control with, preferably, an RGB color spec. I'd probably want to clear to black most of the time. Any help will be much appreciated!
Hi there,
I'm trying to find information on different ways to traverse an object tree in python.
I don't know much about the language in general yet, so any suggestions/techniques would be welcome.
Thanks so much
jml
Hi there, i run a C++ app from objective-c
I can successfully symbolicate my function names using Shark profiler but not with the Object Allocations instrument.à
In the detailed pane, i only see my C++ app name with the hexadecimal value for my C++ functions.
I tried to do a "File/Re-Symbolicate Document", selecting my app folder containing both my app and my Dsym file but nothing change.
Any clues?
My config:
xCode 3.2.2
iPhonoe SDK 3.2
Snowleopard (10.6.3)
Thx.
I have a dynamic sql query which contains more than one table joined. Normally I get this query to a datatable and use it. For now I want to get result of this query to a list object. Does anyone help me about this case?
This is regarding SQL server 2008 management studio..
I connect to different environment DB and every time I launch the Sql management console, I have to sign up every time to get those connections back in object explorer. Is there a way I could persist the connection so I don't have to login every time to different environments?
Do you know of any good doc on Excel PivotTables object model ?
I have read "Excel 2007 Programmers reference", googled a bit, and found small bits here and there, but nothing global, coherent and complete.
Preferably for version < 2007, so I keep upwards compatibility when developing.
Thanks !
Hi,
Every time when I change some values in form controls, I need to set a property of an object or vice versa. Instead of writing some methods for each control, I want a general solution for GUI elements. I do not use WPF but only C# 3.0.
Any suggestions?
Thanks.
Is there a way to print the layout of a C++ object using the g++ compiler or any other means.
A simplified example (assuming int takes 4 bytes)
class A{
int a;
};
class B:public A{
int b;
}
so the output would be
A -
0 4
+ a +
B-
0 4 8
+ A.a + b +
It would be useful to understand the layout of objects (in my case virtual machine code).
Thanks in advance.
Regards,
Zaheer
I've got a 'MyDataTable' class that inherits from System.Data.DataTable
I've implemented ISerializable in my class and have a 'Public Overrides Sub GetObjectData...'
But when I try to serialize the an object of 'MyDataTable' I get an error saying that 'MyDataTable' is not marked as serializable.
If I used a DataTable instead - my code serializes correctly.
If I add a serializable attribute to the 'MyDataTable' class - it serializes correctly, but I'm told that is unnecessary if I implement ISerializable.
Can someone point me in the right direction?
hi everyone, i have a collection of book object in a hashmap, the book has book_title, book_author, book_year_published, etc. i want to sort them based on the book_title which is a String, in both ascending and descending order, and display them on the screen. i wish someone can help me, i have been doing this for hours and still havent come up with a solution. thanks in advance
Hi,
I'm xml-serializing a object with a large number of properties and I have two properties with DateTime types. I'd like to format the dates for the serialized output. I don't really want to implement the ISerializable interface and overwrite the serialization for every property. Is there any other way to achieve this?
(I'm using C#, .NET 2)
Thanks.
Using the build and analyze of XCode I saw i have a memory leak in my code:
- (NSString *) doIt
{
NSString *var = [[NSString alloc] init];
return var;
}
This is of course a simplified snippet of my problem
where do i release the object?