Search Results

Search found 838 results on 34 pages for 'organize'.

Page 3/34 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • how to organize country data?

    - by fayer
    how do i organize country data (countries, states and cities etc) in mysql? cause every country has 3 tables: countries, states and cities. should i have each country in separate set of tables or should i have them all in these 3 tables? if i have all of them in same tables, im afraid that the amount of rows will be huge cause i tend to have a lot of countries! what is best practice for this?

    Read the article

  • Organize address cache

    - by Orsol
    Hi, I need to organize cache in mySql database for address - coordinates. What is the best practice to store address? Do i need to compress address string or use it as is? edit: Ok, let's I reassert my question. How to store long (up to 512) string in database if I need to search by exactly this string in future.

    Read the article

  • Video/films organizing software for mac

    - by tig
    I am looking for application that will help me organize movies, clips and other videos I have. I tell it a folder to watch, and then I can mark every video there as watched/unwatched, set rating, add description, tag it. And possibility to open with preferred video player (for me — VLC). Option to get all info from imdb or other source will be very good. yFlicks would be a good one, but it uses quicktime, so it doesn't like any non standard codec and container (for example mkv), it doesn't work well on Snow Leopard. Any suggestions?

    Read the article

  • How to organize a large number of objects

    - by shane
    We have a large number of documents and metadata (xml files) associated with these documents. What is the best way to organize them? Currently we put them into a series of nested folders: /repository/category/date(when they were loaded into our db)/document_number.pdf and .xml We use the path as a unique identifier for the document in our system. This is more versatile than putting them all in a single flat folder. also it is independent from our database/application, so we can reload them in case of failure. Yet, it introduces some limitations. for example we can't move the files once they've been placed in this structure, also it takes work to put them this way. What is the best practice? How websites such as Scribd deal with this problem?

    Read the article

  • The best way to organize WPF projects

    - by Mike
    Hello everybody, I've started recently to develop a new software in WPF, and I still don't know which is the best way to organize the application, to be more productive with Visual Studio and Expression Blend. I noticed 2 annoying things I'd like to solve: I'm using Code Contracts in my projects, and when I run my project with Expression Blend, it launches the static analysis of the code. How can I stop that? Which configuration of the project does Blend use by default? I've tried to disable Code Contracts in a new configuration. It works in VS as the static analysis is not launched, but it has no effects in Blend. I've thinked about splitting the Windows Application in 2 parts: the first one containing the views of the WPF (app.exe) and the second one being the core of the project, with the logic code (app.core.dll), and I would just open the former project in Blend. Any thoughts about that? Thanks in advance Mike

    Read the article

  • organize using directives, re-run tests?

    - by Sarah Vessels
    Before making a commit, I prefer to run all hundred-something unit tests in my C# Solution, since they only take a couple minutes to run. However, if I've already run them all, all is well, and then I decide to organize the using directives in my Solution, is it really necessary to re-run the unit tests? I have a macro that goes through all files in the Solution and runs Visual Studio's 'Remove and Sort' command on each. In my understanding, so long as all projects still build after using directives are changed around, things should be fine at runtime, too. Is this correct thinking?

    Read the article

  • How to organize a ASP.NET MVC solution (DDD)

    - by vandalo
    Hello everyone. I am trying to start a new project (asp.net MVC) and I would like to apply some DDD rules I've learned in these last few months. I don't know how to organize my solution though. I would like to use Nhibernate but I don't want to use Fluent Nhibernate cause it must be something like an experiment. I've seen some examples where people keep everything in the same project. Some others tend to create a different project for everything. Do you think I should differentiate the model and the repository or put it in the same project? If someone has some links to articles etc it would be appreciated. thanks Alberto

    Read the article

  • Rails: Helpers and Models - where to organize code

    - by Sam
    More and more I'm putting all of my code in models and helpers concerning MVC. However, sometimes I'm not sure where to organize code. Should it go into the model or should it go into a helper. What are the benefits of each. Is one faster or are they the same. I've heard something about all models getting cached so it seems then like that would be a better place to put most of my code. For example here is a scenario that works in a model or in helper: def status if self.purchased "Purcahsed" elsif self.confirmed "Confirmed" elsif self.reserved "Reserved" else "Pending" end end I don't need to save this status as in the database because there are boolean fields for purchased, and confirmed, and reserved. So why put this in a model or why put it into a helper? So I'm not sure of the best practice or benefits gained on putting code into a model or into helper if it can be in both.

    Read the article

  • how to organize javascripts using rails and jquery

    - by VP
    Hi, i'm working in a big and rich rails web application using tons of javascript. I would like to know if anybody has a tip to organize the javascripts. Today i'm generating a new file named controller.js and adding it to my views using content_for. The problem is, some files are becoming big and sometimes, i need a function from one controller in another, so then in the end, i add a products.js to a details controller just to keep DRY. Is that solution good? Any other tip? I think the same pattern can be applied as well to css files?

    Read the article

  • XNA how to organize code with game components (managers)

    - by Johannes
    XNA If I have a button class, and I have a buttonManager class that manages what buttons to be drawn to the screen depending on what the current game state is (main menu, in game, etc), how do I organize my code so that when I click on a button, it takes the user to a different screen. (ex. options menu, ingame). To be more specific, if I were to put the check to see if the user clicks on the button within the buttonManager how would I have the game switch and run the actual game (which is in an entire different class)? Main gameclass buttonManager game component (adds buttons) Button class

    Read the article

  • How to organize architecture WPF project?

    - by Dmitriy
    Hello! In my WPF project i want to have only one Window - MainWindow and UserControls as working part. I have some little different applications in one, and want to make navigation on top of my MainWindow as buttons. And little applications as UserControl. In MainWindow - grid with Big Empty Zone - which use to keep and run work. But, i want to navigate to other userControl from another. (probably do not understand :() How organize architecture WPF project that: one main window and many usercontrols which places in mainwindow and replace each other in turn. and there is the possibility of navigating from another usercontrol to another. May be it's MVVM, but i don't understand how this pattern can help me.

    Read the article

  • Organize routes in Node.js

    - by NilColor
    Hello! I start to look at Node.js. Aslo I'm using Express. And I have a question - how can I organize web application routes? All examples just put all this app.get/post/put() handlers in app.js and it works just fine. This is good but if I have something more than simple HW Blog? Is it possible to do something like this: var app = express.createServer(); app.get( '/module-a/*', require('./module-a').urls ); app.get( '/module-b/*', require('./module-b').urls ); and // file: module-a.js urls.get('/:id', function(req, res){...}); // <- assuming this is handler for /module-a/1 In other words - I'd like something like Django's URLConf but in Node.js.

    Read the article

  • How to organize Windows Phone code base to target both 7.x and 8 platforms

    - by ljubomir
    I took over a Windows Phone project which was previously targeting WP 7.1 platform, and with the recent announcement of the new platform it should target WP 8 as well. My VS 2010 solution consists on several projects (Data access, Model, Tests and WP7 client app) and i am wandering on how to include support for WP8. I have to note that the code-base is not compatible with WP8, due to usage of Toolkit controls and other 3rd party libraries targeted for WP7.1 specifically. Also there is another problem with the Visual Studio versions - WP7.1 can work with VS 2010, but WP8 requires VS 2012. Should i move the whole code-base to VS 2012? Any good advice on how to organize code-base in a most meaningful way in order to avoid duplication and possible painful maintenance? I am thinking between one solution - multiple projects vs. multiple solutions - reusable projects approach. Code duplication (like two separate folders/solutions) should be the least possible approach (fallback).

    Read the article

  • Object Design: How to Organize/Structure a "Collection Class"

    - by CrimsonX
    I'm currently struggling to understand how I should organize/structure a class which I have already created. The class does the following: As its input in the constructor, it takes a collection of logs In the constructor it validates and filters the logs through a series of algorithms implementing my business logic After all filtering and validation is complete, it returns a collection (a List) of the valid and filtered logs which can be presented to the user graphically in a UI. Here is some simplified code describing what I'm doing: class FilteredCollection { public FilteredCollection( SpecialArray<MyLog> myLog) { // validate inputs // filter and validate logs in collection // in end, FilteredLogs is ready for access } Public List<MyLog> FilteredLogs{ get; private set;} } However, in order to access this collection, I have to do the following: var filteredCollection = new FilteredCollection( secialArrayInput ); //Example of accessing data filteredCollection.FilteredLogs[5].MyLogData; Other key pieces of input: I foresee only one of these filtered collections existing in the application (therefore should I make it a static class? Or perhaps a singleton?) Testability and flexibility in creation of the object is important (Perhaps therefore I should keep this an instanced class for testability?) I'd prefer to simplify the dereferencing of the logs if at all possible, as the actual variable names are quite long and it takes some 60-80 characters to just get to the actual data. My attempt in keeping this class simple is that the only purpose of the class is to create this collection of validated data. I know that there may be no "perfect" solution here, but I'm really trying to improve my skills with this design and I would greatly appreciate advice to do that. Thanks in advance.

    Read the article

  • Automatically Organize Tags in Tax/Folksonomy

    - by Rob Wilkerson
    I'm working on a process that will perform natural language processing (NLP) on one--and potentially several--of our content rich sites. What I'd like to do once the NLP is complete is to automatically organize the output (generally a set of terms that you might think of as tags given the prevalence of that metaphor) into some kind of standard or generally accepted organizational structure. In a perfect world, I'd really like this to be crowd sourced under the folksonomy concept (as opposed to a taxonomy) since the ultimate goal is to target/appeal to real people rather than "domain experts", but I'm open to ideas and best practices. For the obvious purpose of scalability, I'd like to automate the population of this tax/folksonomy so that "some guy" in the team/organization isn't responsible for looking at a bunch of words (with or without context) and arbitrarily fleshing out the contextual components of the tree. I have a few ideas for doing this that require some research to establish viability, but I have exactly zero practical experience with this sort of thing so the ideas really just boil down to stuff I made up that might perform some role in accomplishing the task. Imagining that others have vastly more experience with this sort of thing, I'm hoping that I can stand on your shoulders. Thanks for your thoughts and insights.

    Read the article

  • How should I organize my Java GUI?

    - by Spencer
    I'm creating a game in Java for fun and I'm trying to decide how to organize my classes for the GUI. So far, all the classes with only the swing components and layout (no logic) are in a package called "ui". I now need to add listeners (i.e. ActionListener) to components (i.e. button). The listeners need to communicate with the Game class. Currently I have: Game.java - creates the frame add panels to it import javax.swing.; import ui.; public class Game { private JFrame frame; Main main; Rules rules; Game() { rules = new Rules(); frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); main = new Main(); frame.setContentPane(main.getContentPane()); show(); } void show() { frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } public static void main(String[] args) { new Game(); } } Rules.java - game logic ui package - all classes create new panels to be swapped out with the main frame's content pane Main.java (Main Menu) - creates a panel with components Where do I now place the functionality for the Main class? In the game class? Separate class? Or is the whole organization wrong? Thanks

    Read the article

  • How would you organize this Javascript?

    - by Anurag
    How do you usually organize complex web applications that are extremely rich on the client side. I have created a contrived example to indicate the kind of mess it's easy to get into if things are not managed well for big apps. Feel free to modify/extend this example as you wish - http://jsfiddle.net/NHyLC/1/ The example basically mirrors part of the comment posting on SO, and follows the following rules: Must have 15 characters minimum, after multiple spaces are trimmed out to one. If Add Comment is clicked, but the size is less than 15 after removing multiple spaces, then show a popup with the error. Indicate amount of characters remaining and summarize with color coding. Gray indicates a small comment, brown indicates a medium comment, orange a large comment, and red a comment overflow. One comment can only be submitted every 15 seconds. If comment is submitted too soon, show a popup with appropriate error message. A couple of issues I noticed with this example. This should ideally be a widget or some sort of packaged functionality. Things like a comment per 15 seconds, and minimum 15 character comment belong to some application wide policies rather than being embedded inside each widget. Too many hard-coded values. No code organization. Model, Views, Controllers are all bundled together. Not that MVC is the only approach for organizing rich client side web applications, but there is none in this example. How would you go about cleaning this up? Applying a little MVC/MVP along the way? Here's some of the relevant functions, but it will make more sense if you saw the entire code on jsfiddle: /** * Handle comment change. * Update character count. * Indicate progress */ function handleCommentUpdate(comment) { var status = $('.comment-status'); status.text(getStatusText(comment)); status.removeClass('mild spicy hot sizzling'); status.addClass(getStatusClass(comment)); } /** * Is the comment valid for submission */ function commentSubmittable(comment) { var notTooSoon = !isTooSoon(); var notEmpty = !isEmpty(comment); var hasEnoughCharacters = !isTooShort(comment); return notTooSoon && notEmpty && hasEnoughCharacters; } // submit comment $('.add-comment').click(function() { var comment = $('.comment-box').val(); // submit comment, fake ajax call if(commentSubmittable(comment)) { .. } // show a popup if comment is mostly spaces if(isTooShort(comment)) { if(comment.length < 15) { // blink status message } else { popup("Comment must be at least 15 characters in length."); } } // show a popup is comment submitted too soon else if(isTooSoon()) { popup("Only 1 comment allowed per 15 seconds."); } });

    Read the article

  • How to organize Python modules for PyPI to support 2.x and 3.x

    - by Craig McQueen
    I have a Python module that I would like to upload to PyPI. So far, it is working for Python 2.x. It shouldn't be too hard to write a version for 3.x now. But, after following guidelines for making modules in these places: Distributing Python Modules The Hitchhiker’s Guide to Packaging it's not clear to me how to support multiple source distributions for different versions of Python, and it's not clear if/how PyPI could support it. I envisage I would have separate code for: 2.x 2.6 (maybe, as a special case to use the new buffer API) 3.x How is it possible to set up a Python module in PyPI so that someone can do: easy_install modulename and it will install the right thing whether the user is using 2.x or 3.x?

    Read the article

  • How to organize Python modules for PyPI to support 2.x and 3.x

    - by Craig McQueen
    I have a Python module that I would like to upload to PyPI. So far, it is working for Python 2.x. It shouldn't be too hard to write a version for 3.x now. But, after following guidelines for making modules in these places: Distributing Python Modules The Hitchhiker’s Guide to Packaging it's not clear to me how to support multiple source distributions for different versions of Python, and it's not clear if/how PyPI could support it. I envisage I would have separate code for: 2.x 2.6 (maybe, as a special case to use the new buffer API) 3.x How is it possible to set up a Python module in PyPI so that someone can do: easy_install modulename and it will install the right thing whether the user is using 2.x or 3.x?

    Read the article

  • How to organize modules for PyPI to support 2.x and 3.x

    - by Craig McQueen
    I have a Python module that I would like to upload to PyPI. So far, it is working for Python 2.x. It shouldn't be too hard to write a version for 3.x now. But, after following guidelines for making modules in these places: Distributing Python Modules The Hitchhiker’s Guide to Packaging it's not clear to me how to support multiple source distributions for different versions of Python, and it's not clear if/how PyPI could support it. I envisage I would have separate code for: 2.x 2.6 (maybe, as a special case to use the new buffer API) 3.x How is it possible to set up a Python module in PyPI so that someone can do: easy_install modulename and it will install the right thing whether the user is using 2.x or 3.x?

    Read the article

  • How do I correctly organize output into columns?

    - by wrongusername
    The first thing that comes to my mind is to do a bunch of \t's, but that would cause words to be misaligned if any word is longer than any other word by a few characters. For example, I would like to have something like: Name Last Name Middle initial Bob Jones M Joe ReallyLongLastName T Instead, by including only "\t"'s in my cout statement I can only manage to get Name Last Name Middle initial Bob Jones M Joe ReallyLongLastName T or Name Last Name Middle initial Bob Jones M Joe ReallyLongLastName T What else would I need to do?

    Read the article

  • Best way to organize MATLAB classes?

    - by jjkparker
    MATLAB has two ways of organizing classes: @-directories: @ClassName\ ClassName.m Method1.m Method2.m Single files: ClassName.m: classdef ClassName methods % all methods included here end end The first style existed before the new classdef syntax, but seems to be a more structured way of doing things. The second style (everything in a single file) is new. Which method do you use, and why?

    Read the article

  • How should i organize authority code?

    - by acidzombie24
    I have users that fall into the following Not logged in Not Verified Verified Moderator Admin All code that only admin and moderators can access (like banning) is in ModeratorUser which inherits from verified which inherits from BaseUser. Some pages are accessible to all users such as public profiles. If a user is logged in he can leave a comment. To check this i use if (IsVerifiedUser). Now here is the problem. To avoid problems if a user is banned he is not recognized as a verified user. However in the rare case i need to know if he is verified i can use usertype & Verified. Should i not be doing this? I have a bunch of code in my VerifiedUser class and find i am moving tons of it to BaseUser. Is this something i help because a not logged in user can access the page? Should i handle the ban user in a different way and allow IsVerifiedUser to be true even if the user is banned?

    Read the article

  • What's the standard way to organize the contents of Java packages -- specifically the location of in

    - by RenderIn
    I suppose this could go for many OO languages. I'm building my domain objects and am not sure where the best place is for the interfaces & abstract classes. If I have a pets package with various implementations of the APet abstract class: should it live side-by-side with them or in the parent package? How about interfaces? It seems like they almost have to live above the implementations in the parent package, since there could potentially be other subpackages which implement it, while there seems to be a stronger correlation between one abstract class and a subpackage. e.g. com.foo com.foo.IConsumer (interface) com.foo.APet (abstract) com.foo.pets.Dog extends APet implements IConsumer OR com.foo com.foo.IConsumer (interface) com.foo.pets.APet (abstract) com.foo.pets.Dog extends APet implements IConsumer or something else?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >