How do I represent integer array as attribute of a class in Visual Studio 2010's UML class diagrams? I know hot to add normal integers, but I'm hoping that there is a way to do it other than adding [] to integer's name.
I'm new to UML, so I could be missing something obvious here.
Should I use Is ordered and Is unique?
I've got a method:
public native void doSomething(ByteBuffer in, ByteBuffer out);
Generated by javah C/C++ header of this method is:
JNIEXPORT void JNICALL Java__MyClass_doSomething (JNIEnv *, jobject, jobject, jobject, jint, jint);
How can I get a data array from jobject (that is a ByteBuffer instance) ?
I have a list of class names and methods that can only be read during runtime. Is it possible to create a class dynamically like that? I'm currently using C# 4.0.
Lets say there is a base class pointer which is pointing to a base class object:
baseclass *bptr;
bptr= new baseclass;
now if i do
bptr= new derived;
what is the problem here?
I have the following class:
class Seller
{
private string sellerName;
private decimal price;
}
~propreties for SellerName and Price goes here~
I also have a list of sellers:
list<Seller> s = new list<Seller>();
How can I get the maximum value of price out of all the sellers?
Thank you very much.
Hi
I have a table structure something like this
table Employees
EmployeeID
EmployeeLogin
EmployeeCustID
table Customers
CustomerID
CustomerName
What i would like is to map the structure above to one single class named:
Class Employee
EmployeeID
EmployeeLogin
EmployeeName
How do i do that with fluent nhibernate ?
I have a class like this
class someclass{
public function somemethod(){}
}
Now I have an array:
$somearray['someclass'] = new someclass();
$somearray['somemethod'] = 'somemethod';
How can I fire them, I tried the following:
$somearray['someclass']->$somearray['somemethod']();
usign this I get the following error:
Fatal error: Method name must be a string in ......................
Anyone have an idea on how to do this?
I've sometimes seen code like this:
class Something(object):
class Else(object):
def __init__(self):
pass
def __init__(self):
# Do something with self.Else...
pass
Is it a good idea to define classes inside related classes? Is this an acceptable way to group related code?
I have a Class A that when it is instantiated and saved for the first time or modified it will create an instance of Class B and save it also
I want them to be in the same transaction and I want it to be handled in the Model not a controller.
I know how to do this in a conteoller with the ‘transaction do’ block but how do I do it in the model?
Thanks
I have a base class that declares a grouping of objects. That grouping can be an array, List, Collection, that's up to me.
The derived classes of this base class are the ones that actually set the values of this multi-element field. What is the best way to expose this field to the derived classes?
i ve been tryin to find an soln to a question that i m unable to get for few days... the prob s that the data has to be taken from datagrid and should be passed to another class and in that class i have to store in database..
plz guyz
help me out
thanx in advance..
Bit of a dumb question, but I'm wondering what the accepted way of passing data from back to an overridden base method is in c#.
e.g. I guess I could do:
class A
{
int x;
public virtual void DoStuff() {
Console.WriteLine(x);
}
}
class B : A
{
public override void DoStuff() {
x = 1;
base.DoStuff();
}
}
But is there a better method that for example doesn't require the use of a member variable?
Hi,
ive configured local service under some app.
i wanna know how could i invoke methods on the activity, through the service while sending parameters to that method.
(the method exists in the activity)
thanks.
See following class:
function availItem(xs, s, m, l, xl) {
this.xs = xs;
this.s = s;
this.m = m;
this.l = l;
this.xl = xl;
}
How can I declare the above class using JSON? I think It should be in following manner but problem is to pass argument.
var availItem = {
xs : xs,
s : s,
m : m,
l : l,
xl : xl
}
Please advise me the difference between two ways of declaration of java constructor
public class A{
private static A instance = new A();
public static A getInstance() { return instance;
}
public static void main(String[] args) {
A a= A.getInstance();
}
}
AND
public class B{
public B(){};
public static void main(String[] args) {
B b= new B();
}
}
Thanks
Hello.
I like the VS option of Add Class that creates .cpp and .h file for me with a class template in it. But currently i am storing my source files in other folder than project file. Is there a way to to tell VS that i want to create those .cpp and .h files in a specific folder?
Is there a way to annotate an anonymous inner class in Java?
In this example could you add a class level annotation to Class2?
public void method1() {
add(new Class2() {
public void method3() {}
});
}
I'd like to access the stage of the main timeline from w/i a class that extends a movieclip. Basically, I have a button in the main timeline that makes a HUD appear. The HUD is an extended MovieClip class. When people click on a button in the HUD, I'd like to remove the object from the stage of the main MovieClip.
What would be an elegant way to implement the functionality of this nested class in F#?
private class Aliaser {
private int _count;
internal Aliaser() { }
internal string GetNextAlias() {
return "t" + (_count++).ToString();
}
}
This was my first attempt, but it feels like there should be a sexy one-liner for this:
let aliases = (Seq.initInfinite (sprintf "t%d")).GetEnumerator()
let getNextAlias() =
aliases.MoveNext() |> ignore
aliases.Current
I'm learning C# and I've made a recursive insert-method for a linked list:
public static int recursiveInsert(ref int value, ref MyLinkedList list) {
if (list == null)
return new MyLinkedList(value, null);
else {
list.next = recursiveInsert(ref int value, ref list.next);
return list;
}
}
How would you modify this method to make the recursive call look like this:
recursiveInsert(value, ref list.next)
instead of:
list.next = recursiveInsert(ref int value, ref list.next);
I have been looking around at different ways to connect to URLs and there seem to be a few.
My requirements are to do POST and GET queries on a URL and retrieve the result.
I have seen
URL class
DefaultHttpClient class
And there were some others in apache commons
which method is best?
hello.
Is it possible to specify alignment of parent class?
for example something like (which does not compiled):
template<size_t n>
class Vector : public boost::array<double,n> __attribute__ ((aligned(16)))
{
thanks