How can I generate a class diagram and other related modeling diagrams from source code ?
I am open to any tool (Eclipse plug-in etc) but does Netbeans has a plugin for it too?
I have an object, 'Response' that has a property called 'submitter'. Submitters can be one of several different classes including Student, Teacher, etc...
I would like to be able to execute a criteria query where I select only responses submitted by teachers - so this means putting a class restriction on an associated entity. Any ideas on this? I'd like to stay away from direct SQL or HQL.
For example,
val list = List(1,2,3)
list match{
case a:::b =>
case _ =>
}
you can match head and tail of a List using :::' or tokens of ParseResult using~'. What should I do to create class that can be matched like preceding classes?
Hi,
I have the following member of class foo.
foo &foo::bar()
{
return this;
}
But I am getting compiler errors. What stupid thing am I doing wrong?
Compiler error (gcc): error: invalid initialization of non-const reference of type 'foo&' from a temporary of type 'foo* const'
What's the best way of parsing the folowing rss feed item into a C# class.
<item>
<fh:FlightHistory FlightHistoryId="189895136" >
<fh:Airline AirlineCode="EI" Name="Aer Lingus" />
</fh:FlightHistory>
</item>
Please provide scenarios/conditions those fail during deserialization when a class & serialized object have same serialVersionUID?
I'm looking scenarios like following
1) If a data type of an instance variable is changed then deserialization will fail
Could you please provide all such scenarios. I couldn't find such scenarios list anywhere in the internet.
Thanks
How can I convert a Class to byte array in C#. This is a managed one so the following code is failing
int objsize = System.Runtime.InteropServices.Marshal.SizeOf(objTimeSeries3D);
byte[] arr = new byte[objsize];
IntPtr buff = System.Runtime.InteropServices.Marshal.AllocHGlobal(objsize);
System.Runtime.InteropServices.Marshal.StructureToPtr(objTimeSeries3D, buff, true);
System.Runtime.InteropServices.Marshal.Copy(buff, arr, 0, objsize);
System.Runtime.InteropServices.Marshal.FreeHGlobal(buff);
Thanks
Hello,
gcc 4.4.1 c89
I have the following code and I get a warning:
unless class storage specifier in empty declaration
static enum states
{
ACTIVE,
RUNNING,
STOPPED,
IDLE
}
However, if i remove the static keyword I don't get that warning.
I am compiling with the following flags:
-Wall -Wextra
Many thanks for any suggestions,
in java you can create an object directly after the property field like this:
but it seems not working for php:
class Test {
public $object = new Object();
}
you have to create it in the __construct() and assign it to the property?
thanks
This compiles well for me - However other people on a different thread are saying that protected classes cannot be declared in c# at top level
Is that the case?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
protected class CsvReader
{
}
}
How do we populate\retrieve information from\into multiple forms in same action class in Struts2 ? With ModelDriven approach, action is tied to one form. With ScopedModelDriven interceptor jsp becomes dirty as one has to write model.property to access form properties. Is there a better way of doing it?
Hi, I'm relative new to C++ and my background is in Java. I have to port some code from Java to C++ and some doubts came up relative to the Object Java's class. So, if I want to port this:
void Algorithm::setInputParameter(std::string name, Object object) { ..... }
I believe I should use void* type or templates right? I don't know what's the "standard" procedure to accomplish it.
Thanks
I need to loop through some elements in the page and then, for each one, if it had a class beginning with, for example, "C", do something.
$('#dialog li').each(function(){
if ($(this).hasClass("^C")){
//do something
}
}
It may sound silly, but what selector/method should I use on the if clause?
Thanks in advance.
I am having some trouble getting this simple code to work:
class CreateUserView
{
public:
CreateUserView(void);
~CreateUserView(void);
UserController* controller;
void showView();
string name;
string lastname;
string address;
string email;
string dateOfBirth;
};
All i need is to set these attributes in the implementation with getline().
CreateUserView::CreateUserView(void)
{
}
void CreateUserView::showView()
{
cout << endl << " New User" << endl;
cout << "--------------------------" << endl;
cout << " Name\t\t: ";
getline(cin, name);
cout << " Lastname\t: ";
getline(cin, lastname);
cout << " Email\t\t: ";
getline(cin, email);
cout << " ===============================" << endl;
cout << " 1. SAVE 2.CHANGE 3.CANCEL" << endl;
cout << " ===============================" << endl;
cout << " choice: ";
int choice;
cin >> choice;
cin.ignore();
controller->createUser_choice(choice);
}
I keep getting this "Access violation reading location" error at this line:
getline(cin, name);
what's the best way of assigning a value to an std::string attribute of a class?
even name = "whatever" is throwing that error!!
thanks
I have a C# function that does some processing and needs to return figures about what it has processed, success, failure, etc.
Can anyone tell me if there are any standard framework classes that will handle this (for example, number of records processed, number successful, failed, etc) ?
Alternatively, can anyone say how they usually handle this? Is the best way to create a class, or to use out parameters?
hi there,
i just wanted to know if there is some kind of a class to use the multitouch features of android 2.1, or do i always have to measure the distance between to touch-events and calculate the zoom-level on my own??
Thanks,
chris
Hi,
I want to exclude certain fields in the init function of a modelform depending on a parameter passed in, how do I do this? I know I can add exclude fields using the meta class of a model form but I need this to be dynamic depending on the variable passed in.
Thanks
I am trying to create new object of other class in a for loop. like
for(int i =0;i<10;i++){
Computer p1=new Computer(10,20);
}
and when I try anywhere to reach p1.someAction(); it say you must declare p1. But if I declare it on top of program how can I create again in loop? I also try only Computer p1; but it gave exeption ..
Hi,
I want to find an element by class name. I know it will appear in a particular parent div, so rather than search the entire dom, I'd like to search only the particular div. I am trying this, but does not seem to be the correct syntax:
var element = $("#parentDiv").(".myClassNameOfInterest");
what's the right way to do that?
Thanks
I am getting JSON response,now i need to construct a table using this response.The table may be contain more than one record and i know one way of doing this is using Jstl tags but not JSON response.Here is my jsp code
<div id="divHideAllergies" class="clone">
<div class="copy">
<div class="col-md-12">
<div class="portlet box carrot ">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-medkit"></i> Allergies
</div>
</div>
<div class="portlet-body form">
<div class="form-body">
<div class="form-group">
<label class="control-label col-md-3">Allergy Type:</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-medkit"></i></span>
<select class="form-control" id="allergy_type">
<option selected value="">--Select One--</option>
<option value="Drug">Drug</option>
<option value="Environmental">Environmental</option <option value="Food">Food</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Allergic to:</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-medkit"></i></span>
<input type="text" class="form-control" name="first name" id="allergy_to"/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Hello,
To get the type of a class called myClass I do this
Type myType = (typeof(myClass))
How about, instead of having myClass, I've rather the instanceOfMyClass? How do I get the type?
Let's say I've this
Contact contact = new Contact();
If I want to know which type is contact, how do I do it
Thanks for helping
What's the main point behind putting variables and method signatures inside ApplicationDelegate.h in Objective-C ? By doing this, all those methods and variables are seen by another view controller classes? Is that the point?
And also: is there only one application delegate class inside each project?
How to make reference from xml-comment of UpdateChanged to Long1 field ?
public sealed class SystemConfiguration
{
public long Long1;
/// <summary>
/// Make reference to Long1
/// </summary>
public bool UpdateChanged;
}