Search Results

Search found 33736 results on 1350 pages for 'project structure'.

Page 9/1350 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to Open Any Folder as a Project in the NetBeans Platform

    - by Geertjan
    Typically, as described in the NetBeans Project Type Tutorial, you'll define a project type based on the presence of a file (e.g., "project.xml" or "customer.txt" or something like that) in a folder. I.e., if the file is there, then its parent, i.e., the folder that contains the file, is a project and should be opened in your application. However, in some scenarios (as with the HTML5 project type introduced in NetBeans IDE 7.3), the user should be able to open absolutely any folder at all into the application. How to create a project type that is that liberal? Here you go, the only condition that needs to be true is that the selected item in the "Open Project" dialog is a folder, as defined in the "isProject" method below. Nothing else. That's it. If you select a folder, it will be opened in your application, displaying absolutely everything as-is (since below there's no ProjectLogicalView defined): import java.beans.PropertyChangeListener; import java.io.IOException; import javax.swing.Icon; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectInformation; import org.netbeans.spi.project.ProjectFactory; import org.netbeans.spi.project.ProjectState; import org.openide.filesystems.FileObject; import org.openide.loaders.DataFolder; import org.openide.loaders.DataObjectNotFoundException; import org.openide.nodes.FilterNode; import org.openide.util.Exceptions; import org.openide.util.ImageUtilities; import org.openide.util.Lookup; import org.openide.util.lookup.Lookups; import org.openide.util.lookup.ServiceProvider; @ServiceProvider(service = ProjectFactory.class) public class FolderProjectFactory implements ProjectFactory { @Override public boolean isProject(FileObject projectDirectory) { return DataFolder.findFolder(projectDirectory) != null; } @Override public Project loadProject(FileObject dir, ProjectState state) throws IOException { return isProject(dir) ? new FolderProject(dir) : null; } @Override public void saveProject(Project prjct) throws IOException, ClassCastException { // leave unimplemented for the moment } private class FolderProject implements Project { private final FileObject projectDir; private Lookup lkp; private FolderProject(FileObject dir) { this.projectDir = dir; } @Override public FileObject getProjectDirectory() { return projectDir; } @Override public Lookup getLookup() { if (lkp == null) { lkp = Lookups.fixed(new Object[]{ new Info(), }); } return lkp; } private final class Info implements ProjectInformation { @Override public Icon getIcon() { Icon icon = null; try { icon = ImageUtilities.image2Icon( new FilterNode(DataFolder.find( getProjectDirectory()).getNodeDelegate()).getIcon(1)); } catch (DataObjectNotFoundException ex) { Exceptions.printStackTrace(ex); } return icon; } @Override public String getName() { return getProjectDirectory().getName(); } @Override public String getDisplayName() { return getName(); } @Override public void addPropertyChangeListener(PropertyChangeListener pcl) { //do nothing, won't change } @Override public void removePropertyChangeListener(PropertyChangeListener pcl) { //do nothing, won't change } @Override public Project getProject() { return FolderProject.this; } } } } Even the ProjectInformation implementation really isn't needed at all, since it provides nothing more than the icon in the "Open Project" dialog, the rest (i.e., the display name in the "Open Project" dialog) is provided by default regardless of whether you have a ProjectInformation implementation or not.

    Read the article

  • Project Time Tracker

    - by Geertjan
    Based on yesterday's blog entry, let's do something semi useful and display, in the project popup, which is available when you right-click a project in the Projects window, the time since the last change was made anywhere in the project, i.e., we can listen recursively to any changes done within a project and then update the popup with the newly acquired information, dynamically: import java.awt.event.ActionEvent; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collection; import java.util.List; import javax.swing.AbstractAction; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectUtils; import org.openide.awt.ActionID; import org.openide.awt.ActionReference; import org.openide.awt.ActionRegistration; import org.openide.awt.StatusDisplayer; import org.openide.filesystems.FileAttributeEvent; import org.openide.filesystems.FileChangeListener; import org.openide.filesystems.FileEvent; import org.openide.filesystems.FileRenameEvent; import org.openide.util.Lookup; import org.openide.util.LookupEvent; import org.openide.util.LookupListener; import org.openide.util.Utilities; import org.openide.util.WeakListeners; @ActionID( category = "Demo", id = "org.ptt.TrackProjectSelectionAction") @ActionRegistration( lazy = false, displayName = "NOT-USED") @ActionReference( path = "Projects/Actions", position = 0) public final class TrackProjectSelectionAction extends AbstractAction implements LookupListener, FileChangeListener { private Lookup.Result<Project> projects; private Project context; private Long startTime; private Long changedTime; private DateFormat formatter; private List<Project> timedProjects; public TrackProjectSelectionAction() { putValue("popupText", "Timer"); formatter = new SimpleDateFormat("HH:mm:ss"); timedProjects = new ArrayList<Project>(); projects = Utilities.actionsGlobalContext().lookupResult(Project.class); projects.addLookupListener( WeakListeners.create(LookupListener.class, this, projects)); resultChanged(new LookupEvent(projects)); } @Override public void resultChanged(LookupEvent le) { Collection<? extends Project> allProjects = projects.allInstances(); if (allProjects.size() == 1) { Project currentProject = allProjects.iterator().next(); if (!timedProjects.contains(currentProject)) { String currentProjectName = ProjectUtils.getInformation(currentProject).getDisplayName(); putValue("popupText", "Start Timer for Project: " + currentProjectName); StatusDisplayer.getDefault().setStatusText( "Current Project: " + currentProjectName); timedProjects.add(currentProject); context = currentProject; } } } @Override public void actionPerformed(ActionEvent e) { refresh(); } protected void refresh() { startTime = System.currentTimeMillis(); String formattedStartTime = formatter.format(startTime); putValue("popupText", "Timer started: " + formattedStartTime + " (" + ProjectUtils.getInformation(context).getDisplayName() + ")"); } @Override public void fileChanged(FileEvent fe) { changedTime = System.currentTimeMillis(); formatter = new SimpleDateFormat("mm:ss"); String formattedLapse = formatter.format(changedTime - startTime); putValue("popupText", "Time since last change: " + formattedLapse + " (" + ProjectUtils.getInformation(context).getDisplayName() + ")"); startTime = changedTime; } @Override public void fileFolderCreated(FileEvent fe) {} @Override public void fileDataCreated(FileEvent fe) {} @Override public void fileDeleted(FileEvent fe) {} @Override public void fileRenamed(FileRenameEvent fre) {} @Override public void fileAttributeChanged(FileAttributeEvent fae) {} } Some more work needs to be done to complete the above, i.e., for each project you somehow need to maintain the start time and last change and redisplay that whenever the user right-clicks the project.

    Read the article

  • Linux distro structure

    - by A.Rashad
    It seems either I am not looking in the right places or documentation is scarce. Where to find an illustration of a typical Linux distro? Something to say that this is a kernel, these are the components, this is X11, GNOME, these are the components, etc. I have been deciphering documents assuming you know what all these things are, and it seems I am missing something.

    Read the article

  • How to structure applications as multiple projects an name the packages in Java

    - by lostiniceland
    Hello Everyone I would like to know how you set up your projects in Java For example, in my current work-project, a six year old J2EE app with approximately 2 million LoC, we only have one project in Eclipse. The package structure is split into tiers and then domains, so it follows guidelines from Sun/Oracle. A huge ant-script is building different jars out of this one source-folder Personally I think it would be better to have multiple projects, at least for each tier. Recently I was playing around with a projects-structure like this: Domainproject (contains only annotated pojos, needed by all other projects) Datalayer (only persistence) Businesslogic (services) Presenter View This way, it should be easier to exchange components and when using a build tool like Maven I can have everything in a repository so when only working on the frontend I can get the rest as a dependecy in my classpath. Does this makes sense to you? Do you use different approaches and how do they look like? Furthermore I am struggeling how to name my packages/projects correctly. Right now, the above project-structure reflects in the names of the packages, eg. de.myapp.view and it continues with some technical subfolders like internal or interfaces. What I am missing here, and I dont know how to do this properly, is the distinction to a certain domain. When the project gets bigger it would be nice to recognise a particular domain but also the technical details to navigate more easily within the project. This leads to my second question: how do you name your projects and packages?

    Read the article

  • In what package should a "Settings" class be?

    - by Tom
    I've in the middle of building an application but found myself too easily creating new packages without keeping the project's structure in mind. Now, I'm trying to redo the whole project structure on paper first. I am using a Settings class with public properties, accessed as settings for several other classes around the project. Now, since this Settings class applies for the whole project, I am unsure if it should be packaged and if so, in what kind of package should it exist? Or should it be in the root (the default package) with the main application class? I've been thinking about putting it in my utils package, then again I don't think it really is an utlity. Any strategies on how to decide on such package structure for example for a Settings class?

    Read the article

  • In what package should a "Settings" class be placed?

    - by Tom
    I'm in the middle of building an application but found myself too easily creating new packages without keeping the project's structure in mind. Now, I'm trying to redo the whole project structure on paper first. I am using a Settings class with public properties, accessed as settings for several other classes around the project. Now, since this Settings class applies for the whole project, I am unsure if it should be packaged and if so, in what kind of package should it exist? Or should it be in the root (the default package) with the main application class? I've been thinking about putting it in my utils package, then again I don't think it really is an utlity. Any strategies on how to decide on such package structure for example for a Settings class?

    Read the article

  • Xcode custom project template creates only references to files

    - by user315374
    Hi, I tried to create a custom project template for setting up unit testing. The problem is that when i create a new project based on this template it creates references to the template files : When i edit a file, it changes my template files instead of my actual project files ! When i delete my template, files from my actual project becomes red ! The project template is in : /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates/Application/Test-based Application Reading some question on stack overflow i tried to install my template project in /Library/Application Support/Developer/Shared/Xcode/Project Templates But i cannot see my template when i create a new project. Can anybody help ? Thanks, Vincent

    Read the article

  • How to merge VB.NET WEB Project with C#.NET MVC project

    - by Thushara Perera
    Hi All, I've got an existing asp.net project written in vb.net need to merge into C# ASP.NET MVC 1.0 application. I couldn't find a good article on this. I have successfully created a sample project and merge it. It works successfully. But when merge it into my real project it does not work. I've used C#.csproj project file and deleted VB project file. for the merging i could find a good article this link successful on sample project not with the real project. good one: http://www.packtpub.com/article/mixing-asp.net-webforms-and-asp.net-mvc how it is possible to merge VB Default.aspx, C# Default.aspx and VB Global.asax, C# Global.asax. Can I used VB.vbproj file insted of csproj Thanks Thushara Perera

    Read the article

  • Adding gwt project to existing java servlet 3 project

    - by Michael
    I have a standalone gwt project with RPC built with Maven. I also have java servlet 3.0 project. Both the servlet and gwt projects have war packaging but I want to have only one war file so I changed the packaging of the gwt project to jar and included it in my servlet project. Now I have a problem understanding how to wire everything together. Do I need to migrate gwt project's web.xml into the main project web.xml file ? How do I redirect to my gwt project entry index.html ? Thanks.

    Read the article

  • How to compare two structure strings in C++

    - by Arvandor
    Ok, so this week in class we're working with arrays. I've got an assignment that wanted me to create a structure for an employee containing an employee ID, first name, last name, and wages. Then it has me ask users for input for 5 different employees all stored in an array of this structure, then ask them for a search field type, then a search value. Lastly, display all the information for all positive search results. I'm still new, so I'm sure it isn't a terribly elegant program, but what I'm trying to do now is figure out how to compare a user entered string with the string stored in the structure... I'll try to give all the pertinent code below. struct employee { int empid, string firstname, string lastname, float wage }; employee emparray[] = {}; employee value[] = {}; //Code for populating emparray and structure, then determine search field etc. cout << "Enter a search value: "; cin >> value.lastname; for(i = 0; i < 5; i++) { if(strcmp(value.lastname.c_str, emparray[i].lastname.c_str) == 0) { output(); } } Which... I thought would work, but it's giving me the following error.. Error 1 error C3867: 'std::basic_string<_Elem,_Traits,_Alloc>::c_str': function call missing argument list; use '&std::basic_string<_Elem,_Traits,_Alloc>::c_str' to create a pointer to member d:\myfile Any thoughts on what's going on? Is there a way to compare two .name notated strings without totally revamping the program? IF you want to drill me on best practices, please feel free, but also please try to solve my particular problem.

    Read the article

  • As a game developer, which data structure use for develop the game? [duplicate]

    - by Rizwanabbasi
    This question already has an answer here: When should vector/list be used? 5 answers We are developing a game for bank robbery. The game plots a bank robbery. Lots of people witness that robbery. Our game will load the lists of suspected offenders while the players (witnesses) will have to identify the offenders of this robbery. Game should load list of offenders to identify the one as quickly as possible. Admin can add/remove offenders in the lists and two or more lists of offenders can also be merged into one (to show it to the player). As a game developer, which data structure we should use for develop the game? Justify your selection with solid arguments. Remember the most critical requirement is that the list should load super fast.

    Read the article

  • Which data structure you will use to for a witness list?

    - by mateen
    I'm making a game where the plot is a bank robbery. Lots of people witness that robbery. The game will load a list of suspects, while the players (witnesses) will have to identify the suspects of this robbery. The game should load a list of suspects to identify the one as quickly as possible. Admin can add/remove suspects in the lists and two or more lists of suspects can also be merged into one (to show it to the player). The question is which data structure will be suitable to develop the lists?

    Read the article

  • Are there any additional considerations to make when designing a site structure if you plan to use persistent connection technologies?

    - by Psytronic
    As the title states, I'm thinking of making a simple-card-game based website, using persistent connection technology (Something like signalR) for the actual game part of it. I've never planned a site to use this technology, and wondering for those who have, are there any additional things that need to be taken into consideration for the site structure? I'm planning on using the asp MVC framework for the whole thing, and starting off with some simple game (e.g. card based Rock/Paper/Scissors) for proof of concept (to see if I can get it working how I think it would in my head).

    Read the article

  • Whats a good structure to save and retrieve locations of images?

    - by Goot
    I got a java-ee application, where I collect informations about movies. Im my backend I provide data like the name, description, genre and a random uuid. I also got lots of related files, which are stored on a file server. Including some screenshots, the dvd or bluRay cover and video trailers. My current approach is: When saving the files to the fileserver, I retrieve the movies random uuid (which is the primary key btw.). I then rename the files screenshot_[UUID]_1, screenshot_[UUID]_2 ... etc. Now, there are lots of other ways to handle this, like saving all filenames in a database or creating a dir structure on the fileserver for every uuid and, e.g., return all images in the "[uuid]/screenshots" folder via REST. I expect about 30k requests a day, so the service has to be pretty performant. Whats the best way to solve this?

    Read the article

  • What data-structure/algorithm will allow me to send a list of key/value dictionaries using the least amount of bits?

    - by user12365
    I have server objects that have corresponding client objects. The data to be kept in sync is inside the server object's key/value dictionary. To keep the client objects in sync with the sever objects, I want the server to send the key/value dictionary every frame for each object. What data-structure/algorithm will allow me to send a list of key/value dictionaries using the least amount of bits? Bonus constraint 1: For each type of object, the values of some keys change more often than others. Bonus constraint 2: Memory usage on the server side is relatively expensive.

    Read the article

  • Emacs recursive project search

    - by hekevintran
    I am switching to Emacs from TextMate. One feature of TextMate that I would really like to have in Emacs is the "Find in Project" search box that uses fuzzy matching. Emacs sort of has this with ido, but ido does not search recursively through child directories. It searches only within one directory. Is there a way to give ido a root directory and to search everything under it? Update: The questions below pertain to find-file-in-project.el from Michal Marczyk's answer. If anything in this message sounds obvious it's because I have used Emacs for less than one week. :-) As I understand it, project-local-variables lets me define things in a .emacs-project file that I keep in my project root. How do I point find-file-in-project to my project root? I am not familiar with regex syntax in Emacs Lisp. The default value for ffip-regexp is: ".*\\.\\(rb\\|js\\|css\\|yml\\|yaml\\|rhtml\\|erb\\|html\\|el\\)" I presume that I can just switch the extensions to the ones appropriate for my project. Could you explain the ffip-find-options? From the file: (defvar ffip-find-options "" "Extra options to pass to `find' when using find-file-in-project. Use this to exclude portions of your project: \"-not -regex \\".vendor.\\"\"") What does this mean exactly and how do I use it to exclude files/directories? Could you share an example .emacs-project file?

    Read the article

  • Data Structure Behind Amazon S3s Keys (Filtering Data Structure)

    - by dimo414
    I'd like to implement a data structure similar to the lookup functionality of Amazon S3. For those of you who don't know what I'm taking about, Amazon S3 stores all files at the root, but allows you to look up groups of files by common prefixes in their names, therefore replicating the power of a directory tree without the complexity of it. The catch is, both lookup and filter operations are O(1) (or close enough that even on very large buckets - S3's disk equivalents - both operations might as well be O(1))). So in short, I'm looking for a data structure that functions like a hash map, with the added benefit of efficient (at the very least not O(n)) filtering. The best I can come up with is extending HashMap so that it also contains a (sorted) list of contents, and doing a binary search for the range that matches the prefix, and returning that set. This seems slow to me, but I can't think of any other way to do it. Does anyone know either how Amazon does it, or a better way to implement this data structure?

    Read the article

  • I am looking for an graduation project idea for bacelor of computer engineering [closed]

    - by project idea
    I am interested in computer graphics and I have developed many hobby projects, mostly 2D and 3D games/scenes in directX and openGL, But for a grad project, proffesors wont allow games. I browsed many similar questions here and I am convinced project should be something I am really interested in as I will give considerable time to it. But apart from games I am not able to decide on the topic. I am also open to ideas on social apps and android.

    Read the article

  • Build one to throw away vs Second-system effect

    - by m3th0dman
    One one hand there is an advice that says "Build one to throw away". Only after finishing a software system and seeing the end product we realize what went wrong in the design phase and understand how we should have really done it. On the other hand there is the "second-system effect" which says that the second system of the same kind that is designed is usually worse than the first one; there are many features that did not fit in the first project and were pushed into the second version usually leading to overly complex and overly engineered. Isn't here some contradiction between these principles? What is the correct view over the problems and where is the border between these two? I believe that these "good practices" are were firstly promoted in the seminal book The Mythical Man-Month by Fred Brooks. I know that some of these issues are solved by Agile methodologies, but deep down, the problem is still the principles still stand; for example we would not make important design changes 3 sprints before going live.

    Read the article

  • When does a Project Manager start in a project?

    - by johndoucette
    From a colleague of mine… “As a project manager, when do you typically like to get initially involved in the project? Is it better for the PM to be rolled on during the project kick-off, the first week, or is it better to roll-on the second week when things settle down?” My textbook answer is “the Project Manager is responsible for the successful completion and delivery of the expected outcome of the project through the following major tasks;” 1.    Identifying requirements 2.    Establishing clear and achievable objectives 3.    Balancing the competing demands for quality, scope, time, and cost 4.    Adapting the specifications, plans, and approach to the different concerns and expectations of the various stakeholders However; My colleague is often a lead technical consultant coming into a project alone to help a client solve a complex problem. As Magenic consultants, we all possess many of the “project managing” skills I talked about above and tend to be responsible for item #1 and #2 as well as the actual architecture/design tasks early in a project. When the real development begins and there is no PM involved, the project will quickly get harder to execute unless items #3 & #4 are assigned to a Project Manager. In software development, the concept of context switching between coding and other administrative activities is the hardest skill perfect. In my experience, I have rarely been introduced to someone who has mastered this skill. This is the limbo I was in when I was asked to become a PM -- while still developing. “Put down the code” was not only a profound statement, but looking back – a necessary one. Unless you are lucky to have found that one developer who is a superman, asking your developers (internal corporate or consultant) to perform #3 and #4 tasks, will surely take more time, allow opportunity for more scope, and eventually cost more. Project Managers are crucial to the overall success of a project, and I prefer them to start by taking ownership of delivery on day one.

    Read the article

  • send c++ structure to msmq message

    - by Gobalakrishnan
    C++ Code: typedef struct { char cfiller[7]; short MsgCode; char cfiller1[11]; short MsgLength; char cfiller2[2]; }Message ; I want to send the above structure as a msmq message I am able to send string to msmq but it is giving error to send the above structure. thank you

    Read the article

  • Coldfusion - taking a Serialized String and converting it to a Structure

    - by nobosh
    I have the following serialized string from a nested sortable list: ul[0][id]=main1&ul[0][children][0][id]=child2&ul[0][children][0][class]=&ul[1][id]=main3&ul[2][id]=main4&ul[3][id]=main5 I want to be able to record this in the database, and think I need a structure to do this. What's the best way to turn this into a structure, so I can sort it in the database, and easily render the list on the page in the future. Thanks,B

    Read the article

  • How to concentrate on one project at a time. Divide and Conquer doesn't work for me [closed]

    - by refhat
    Possible Duplicate: Tips for staying focused and motivated on a project I have serious issues on concentrating on one project at a time. I cant even follow the Divide and Conquer Approach. Once I start a project, I try to get the things done as neatly as possible but very soon I end up messing so many components of it. I try to do divide and conquer, but my approach doesn't work smoothly, and then I then wonder here and there in other projects. Sometimes I try spending so many hours for some trivial issues, which in-fact are not even issues. How do I avoid this jargon and be a smooth developer and have a nice workflow around my projects. I tend to loose my concentration on the current project and wonder in another project.

    Read the article

  • How to learn programming for a medium scale project form a beginner? [closed]

    - by Lin Xiangyu
    I study programming by myself.I have learn servel programming languages. but I never write a project more than 1000 lines. I know the best way to improve programming skills is practise. The problem is many books, just talk about the programming language, or talk about build a project from a high level. Fews of books will teach how to build a middle scale project. For example, I want to build a simple HTTP Server(Nor like Apache or just a simple listenr to a port), a Markdown Parser, or a download tools just like emule or wget. I don't know what to do. I may found peaces of code in the web, or found familiar project in the Github. I don't know how to read the code. I want to some tutorial that can told me how to build the project step by step, teacher me how to write thousands lines of code. Any suggest?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >