Hello. Because i have a big project i must generate the UML for this...Writing UML for 300 classes is overkill...
So is there any solution to generate the diagrams for me ? I am using Netbeans....
Thank you for reading
I am working on a large C++ project in Visual Studio 2008, and there are a lot of files with unnecessary #include's. Sometimes the #include's are just artifacts and everything will compile fine with them removed, and in other cases classes could be forward declared and the #include could be moved to the .cpp file. Are there any good tools for detecting both of these cases?
How come App_Code is not a choices in the Add ASP.NET Folder submenu in the VS solution explorer? I realize you can create one yourself manually by just renaming a New Folder, but what is the rational here? Is this not where you are supposed to put "utility" or "service layer" type classes?
On a MVC project side note. I do like the fact that there is a reference to System.Configuration out-of-the-box unlike the default ASP.NET Web Form Projects.
Is there any way to query GAE datastore with filter similar to SQL LIKE statement? For example, if a class has a string field, and I want to find all classes that have some specific keyword in that string, how can I do that?
It looks like JDOQL's matches() don't work... Am I missing something?
Any comments, links or code fragments are welcome
Not sure if many people are familiar with Scaffolding Extensions for Ruby, but I've looked through their docs, forums, and even the source code of the Heroku test site, and not found an answer.
I made a basic Sinatra app and followed right from the RDoc's instructions:
require 'scaffolding_extensions'
require 'sinatra/base'
class Thingy < Sinatra::Base
scaffold_all_models
end
gives
undefined method 'scaffold_all_models' for Thingy:Class (NoMethodError)
and I know Scaffolding Extensions is loadable because I can successfully set some config variables in its classes.
So I've been looking at code from various parts of the Android git, but when I try to load and compile many of them (camera, media player, etc) they reference classes and parts of the SDK that just aren't available even with my SDK version updated to 2.2. (for example the bitmap config option inNativeAlloc)
Is there a reason that these are not in the SDK given out to developers?
I believe back when we were on Win2K, Windows Search would search through Jar files to locate specific classes but this doesn't appear to work in XP. Does anyone know how to enable this in XP?
Note, to do the search in Win2K we just entered *.jar for the files and "ClassABC" for the search text string and the search would return any jar files containing class files where the title contained "ClassABC".
In .NET System.Object.GetHashCode method is use in a lot of places throughout the .NET base class libraries. Especially when finding items in a collection fast or to determine equality. Is there a standard algorithm/ best practise on how to implement the GetHashCode override for my custom classes so I don't degrate performance?
I have these classes.
class Author{
Person person
}
class Person{
String lastName
String firstName
String middleName
}
I'd like to query Person and Author.
def persons = Person.findAllByLastNameiLike("${a}")
but it seems I can't do
def authors = Author.findAllByPerson(persons)
Any ideas how I'd do this?
How do I determine the type of a class that is related to another class at runtime?
I have figured out a solution, the only problem is that I ended up having to use a define that has to be used in all of the derived classes.
Is there a simpler way to do this that doesn't need the define or a copy paste?
Things to note: both the class and the related class will always have their respective base class, the different classes can share a related class, and as in the example I would like the control class to own the view.
#include <iostream>
#include <string>
class model;
class view {
public:
view( model *m ) {}
virtual std::string display() {
return "view";
}
};
#define RELATED_CLASS(RELATED)\
typedef RELATED relatedType;\
virtual relatedType*createRelated(){\
return new relatedType(this);}
class model {
public:
RELATED_CLASS(view)
model() {}
};
class otherView : public view {
public:
otherView( model *m ) : view(m) {}
std::string display() {
return "otherView";
}
};
class otherModel : public model {
public:
RELATED_CLASS(otherView)
otherModel() {}
};
class control {
public:
control( model *m ) : m_(m),
v_( m->createRelated() ) {}
~control() { delete v_; }
std::string display() {
return v_->display();
}
model *m_;
view *v_;
};
int main( void ) {
model m;
otherModel om;
model *pm = &om;
control c1( &m );
control c2( &om );
control c3( pm );
std::cout << c1.display() << std::endl;
std::cout << c2.display() << std::endl;
std::cout << c3.display() << std::endl;
}
Trying to make a controller helper to have similar functionality in some controllers using the preDispatch method.
Error:
Fatal error: Class 'Helper_Action_Test' not found in /var/www/zend.dev/application/Bootstrap.php on line 9`
Application layout
/Application
/Helpers
**/Actions** this is where i will save the classes
/Views
/modules
/configs
/layouts
/Bootstrap.php
In the Bootstrap I have added:
protected function _initActionHelpers(){
Zend_Controller_Action_HelperBroker::addHelper(new Helper_Action_Test());
}
In the helper file I have:
class Helper_Action_Test extends Zend_Controller_Action_Helper_Abstract{
public function preDispatch() {
echo 'Test';
}
}
Any ideas?
If I have a class with a method I want protected and internal. I want that only derived classes in the assembly would be able to call it.
Since protected internal means protected or internal, you have to make a choice. What do you choose in this case - protected or internal?
I need to have an autocomplete functionality using jquery, and I've encountered ZendX_JQuery which has such functionality available.
However, I've noticed that the entire ZendX_JQuery classes, are a bit old (the default jquery version is 1.3.2, and jquery ui 1.7.1). (see http://framework.zend.com/svn/framework/extras/branches/release-1.10/library/ZendX/JQuery.php)
Should I use that instead of my own written code to include the jquery library and etc., and should I use the ZendX_JQuery_View_Helper_AutoComplete class for such functionality ?
I like using sentry classes in c++, but I seem to have a mental affliction that results in repeatedly writing bugs like the following:
{
MySentryClass(arg);
// ... other code
}
Needless to say, this fails because the sentry dies immediately after creation, rather than at the end of the scope, as intended. Is there some way to prevent MySentryClass from being instantiated as a temporary, so that the above code either fails to compile, or at least aborts with an error message at runtime?
Hello, I have a system with 3 layers and I am using LINQ-to-SQL to persist.
I want to validate if the description field of my object is empty. I am using partial classes and the method OnValidate(). If the field is empty, it throws an exception.
Is this correct?
What do I do after the exception to not close the form, letting the user continue working?
Thank you very much
Sorry for my poor english
I need to be able to change the style of a control when a property and data value are true. For example, my bound data has an IsDirty property. I would like to change the background color of my control when IsDirty is true AND the control is selected. I found the MultiTrigger and MultiDataTrigger classes...but in this case I need to somehow trigger on data and property. How can I do this?
I have compiled and jarred the various projects in my Java application, generating serialVersionUIDs automatically through Eclipse for all my classes derived from Serializable.
I read the answers to this question, and verified that serialVersionUids are all private static final long.
Nevertheless, I get an error like this when I try to run:
java.io.InvalidClassException: com.acme.product.Widget; local class
incompatible: stream classdesc serialVersionUID = 5226096973188250357, local
class serialVersionUID = -5432967318654384362
What am I missing?
I'm unable to find the .NET FCL built-in concept of precedence to leverage while constructing Expression Trees. Ref System.Linq.Expressions Namespace. Is this something that must be handled manually in code, or is it somehow implicit and I'm not recognizing it, maybe through helper methods or classes?
I want to apply it to math operations to ensure 3 + 5 * 10 results in 53 instead of 80.
I am trying to reduce the memory footprint of my application. JVisualVM heap dumps report that the objects taking up the most space are:
char[]
byte[]
int[]
Which isn't particularly helpful. How can I track these objects back to the parent classes that are holding them?
Thanks
I recently asked a question regarding the resolution of dependencies between Unit of Work and Data Mapper classes: http://stackoverflow.com/questions/3012657/dependency-injection-and-unit-of-work-pattern - (which was answered by Gabor de Mooij - thx)
In PoEAA, Martin Fowler suggests using Separated Interface to manage these dependencies. My question is simple - is it actually possible to implement this pattern in PHP, or is it specific to Java interfaces? I've searched high and low and it's hard to find references to this pattern anywhere outside of PoEAA.
Assume an abstract model like this:
public abstract class MyClass : BaseEntity
{
[UIHint("File")]
public long? DocumentFileId { get; set; }
}
The problem is Cannot resolve template 'File', while there is File.cshtml in View editor templates.
The point is, if I don't define MyClass as an abstract class, error will be solved.
My question is, why editor template can not resolve in abstract classes, and how can I handle it?
Is there a tool or methodology (other than trial and error) I can use to find unused image files? How about CSS declarations for ID's and Classes that don't even exist in the site?
It seems like there might be a way to just spider the site, profile it, and see which images and styles are never loaded.
How hard is it to do? I have a text with about 600 characters, multiple lines. Now I want to copy that text to the clipboard using the UIPasteboard classes. What would I need to implement?
Hi,
say there is an xml file, which not created by me, with a known schema (for example, rss).
how would you parse it with C#? would you do that manually by XDocument etc, or would you use XMLSerializer and create a correspond class? or would you use Visual Studio tools to generate classes using a dtd file (that you'll write).
what do you think the most aesthetic, easy, not error-prone way?