Search Results

Search found 13259 results on 531 pages for 'design'.

Page 157/531 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • Make a usable Join relationship with LINQ on top of a database CSV design error

    - by jdk
    I'm looking for a way to fix and/or abstract away a comma-separated values (CSV) list in a database field in order to reconstruct a usable relationship such that I can properly join the two tables below and query them using LINQ and its Join method. Following is a sample showing the Person table and CsvArticleIds field having a CSV value to represent a one-to-many association with Article records. TABLE [dbo].[Person] Id Name CsvArticleIds -- ---------- -------- 1 Joe "15,22" 5 Ed "22" 10 Arnie "8,15,22" ^^^(Of course a link table should have been created; nonetheless the relationship with articles is trapped inside that list of CSV values.) TABLE [dbo].[Article] Id Title -- ---------- 8 Beginning C# 15 A Historic look at Programming in the 90s 22 Gardening in January Additional Info the fix can be at any level: C#.NET or SQL Server something easy because I will be repeating the solution for many other CSV values in other tables. Elegant is nice too. not looking for efficiency because this is part of a one-time data migration task and can take as long as it wants to run.

    Read the article

  • A good UI design for rating in .Net

    - by Ben
    Hi, im trying to add a "rating" system to an existing form (i.e 1 star, 2 Star or poor, average,good,excellent etc). Does anyone know of a way to achieve this that is aesthetically pleasing with good UX either in .Net or a free 3rd party control? Thanks

    Read the article

  • [MacOS] Visio-like design software? [closed]

    - by OverTheRainbow
    Hello It's a software-related question but not development-related :-/ A friend of mine is looking for an equivalent on Macintosh to Visio or SmarDraw to draw plans for home improvements. I don't know anything about Macintosh, so would appreciate any feedback on good softwares for this type of applications. Thank you.

    Read the article

  • jframe adding own design jinternal frame error

    - by Van Minh
    I designed a title bar color on my JInternal frame. Then I took attempt to add it to my JFrame, but I cannot. Here is the code of my title bar: public class MyIFtitleBar extends BasicInternalFrameTitlePane { public MyIFtitleBar(JInternalFrame jif) { super(jif); } protected void paintTitleBackground(Graphics g){ g.setColor(Color.pink); g.fillRect(0, 0, getWidth(), getHeight()); } } Here is my JInternal frame. I tried running it in its psvm method, that worked! public class FitnessProg_Frame extends javax.swing.JInternalFrame { public FitnessProg_Frame() { initComponents(); this.setUI(new BasicInternalFrameUI(this){ @Override protected JComponent createNorthPane(JInternalFrame jif) { return new MyIFtitleBar(jif); } }); } @SuppressWarnings("unchecked") private void initComponents() { setBackground(new java.awt.Color(255, 255, 255)); setBorder(new javax.swing.border.MatteBorder(null)); setTitle("Fitness Progarm"); setPreferredSize(new java.awt.Dimension(507, 304)); pack(); } } But when I add it to my JFrame I get an error: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException Here is my JFrame code: public class NewJFrame extends javax.swing.JFrame { public NewJFrame() { initComponents(); FitnessProg_Frame ff = new FitnessProg_Frame(); ff.setVisible(true); mydes.add(ff); // this line made errors } @SuppressWarnings("unchecked") private void initComponents() { mydes = new javax.swing.JDesktopPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); javax.swing.GroupLayout mydesLayout = new javax.swing.GroupLayout(mydes); mydes.setLayout(mydesLayout); mydesLayout.setHorizontalGroup( mydesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE) ); mydesLayout.setVerticalGroup( mydesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 300, Short.MAX_VALUE) ); getContentPane().add(mydes, java.awt.BorderLayout.CENTER); pack(); } public static void main(String args[]) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new NewJFrame().setVisible(true); } }); } private javax.swing.JDesktopPane mydes; }

    Read the article

  • Initial Modelling/Design Activities on Agile Projects

    - by dalton
    When developing an application using agile techniques, what if any initial modelling/architecture activities do you do, and how do you capture that knowledge?? The closest thing I've seen so far is Scott Ambler's Initial Architecture Modelling, but was wondering what alternatives are used out there?

    Read the article

  • SlidingDrawer handle design issue

    - by bali182
    I would like to create a SlidingDrawer, which has a handle like this: Until now i tought my solution was ok, which was: 1.) I created a 9 patch: As you can see, the center part is not strechable, only the two sides (and the height, if needed). On most of the phones i got the desired result, shown above. 2.) Put it in this layout (just pseudo-code): <SlidingDrawer (fullscreen)> <Button as handle (full width, backround the 9patch)/> <LinearLayout as content /> </SlidingDrawer> However, i tested the app on my friend's new Galaxy S3, and the result was something like this: The part, which should be centered, was completely off one side. And i have no idea, why and it bugs me since then. My Question: Is this the prefered way (9 patch with full width) to acomplish the look i want? If not, could someone suggest me a better solution?

    Read the article

  • Better data-structure design

    - by Tempname
    Currently in my application I have a single table that is giving me a bit of trouble. The issue at hand is I have a value object that is mapped to this table. When the data is returned to me as an array of value objects, I have to then loop through this array and begin my recursion by matching the ParentID to parent ObjectID's. The column ParentID is either null (acts a parent) or it holds the value of an ObjectID. I know there has to be a better way to create this data structure so that I do not have to do recursive loops to match ParentID's with their ObjectID's. Any help with this is greatly appreciated. Here is the table in describe form: +----------------+------------------+------+-----+---------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +----------------+------------------+------+-----+---------------------+-----------------------------+ | ObjectID | int(11) unsigned | NO | PRI | NULL | auto_increment | | ObjectHeight | decimal(6,2) | NO | | NULL | | | ObjectWidth | decimal(6,2) | NO | | NULL | | | ObjectX | decimal(6,2) | NO | | NULL | | | ObjectY | decimal(6,2) | NO | | NULL | | | ObjectLabel | varchar(255) | NO | | NULL | | | TemplateID | int(11) unsigned | NO | MUL | NULL | | | ObjectTypeID | int(11) unsigned | NO | MUL | NULL | | | ParentID | int(11) unsigned | YES | MUL | NULL | | | CreationDate | datetime | YES | | 0000-00-00 00:00:00 | | | LastModifyDate | timestamp | YES | | NULL | on update CURRENT_TIMESTAMP | +----------------+------------------+------+-----+---------------------+-----------------------------+e

    Read the article

  • Rails: Design Pattern to Store Order of Relations

    - by ChrisInCambo
    Hi, I have four models: Customer, QueueRed, QueueBlue, QueueGreen. The Queue models have a one to many relationship with customers A customer must always be in a queue A customer can only be in one queue at a time A customer can change queues We must be able to find out the customers current position in their respective queue In an object model the queues would just have an array property containing customers, but ActiveRecord doesn't have arrays. In a DB I would probably create some extra tables just to handle the order of the stories in the queue. My question is what it the best way to model the relationship in ActiveRecord? Obviously there are many ways this could be done, but what is the best or the most in line with how ActiveRecord should be used? Cheers, Chris

    Read the article

  • Database Design Question: GUID + Natural Numbers

    - by Alan
    For a database I'm building, I've decided to use natural numbers as the primary key. I'm aware of the advantages that GUID's allow, but looking at the data, the bulk of row's data were GUID keys. I want to generate XML records from the database data, and one problem with natural numbers is that I don't want to expose my database key's to the outside world, and allow users to guess "keys." I believe GUID's solve this problem. So, I think the solution is to generate a sparse, unique iD derived from the natural ID (hopefully it would be 2-way), or just add an extra column in the database and store a guid (or some other multibyte id) The derived value is nicer because there is no storage penalty, but it would be easier to reverse and guess compared to a GUID. I'm (buy) curious as to what others on SO have done, and what insights they have.

    Read the article

  • SharePoint - Remote machine shows wrong design

    - by imsatasia
    Hi.! I am creating a SharePoint public website on SharePoint Server 2007. I've added my custom Master-page for Publishing site. When I see, Home page, on my local machine, in the content area of my page it shows me IMAGE on the right as I want to see. But, When I see that page on my remote machine It shows my IMAGE on the left, instead of right side. I'm using following layout: <div id="Content"> <div id="left"> </div> <div id="right"> **--->>>I've IMAGE over here..!!!!** </div> </div> Can Anyone help me how to resolve this problem. Thanks.

    Read the article

  • Database design: How should I add an information which can apply to several tables

    - by Stefan
    I am constructing a database System using Mysql, this will be an application of about 20 tables. The system contains information on farmers, we work with organic certification and need to record a lot of info for that. In my system, there are related parent-child tables for farmers, producing years and fields/areas - it's a simple representation of the real world in which farmers farm crops on their fields. I now need to add several status flags for each one of these levels: a farmer can be certified, or his field can be, or the specific year can be; each of these flags has several states and can occur a number of times. The obvious solution to this would be to add a child table to every one of these tables, and define the states there. What I wonder if there is an easier way to do this to avoid getting to many tables? Where/how would be best practise to keep that data?

    Read the article

  • Group by query design help

    - by Midhat
    Consider this data PK field1 field2 1 a b 2 a (null) 3 x y 4 x z 5 q w I need to get this data select all columns from all rows where field1 has count 1 i tried and finally settled for select * from mytable where field1 in (select field1 from mytable group by field1 having count(field1)>1 ) order by field1 but there has to be a better way than this

    Read the article

  • How can I design a custom control in Javascript (possibly using jQuery)

    - by Mathieu Pagé
    I'd like to create a custom control in javascript. The goal is to create a building block that has methods, properties and events and render into a div. An example of one such control would be a calendar. It would render into a div, it would have properties that would define how it's displayed and what date is selected or highlighted, it would have methods to change the current month or to select some date and it would raise events when a day is clicked or the current month is changed by a user input. I can think of lots of way to implement this and I'm not sure what is the best way. I seem to remember that it's a bad thing to augment a DOM elements with properties and method, so I ruled that out. A jQuery plugin seems like a good idea, however I'm not sure if it's appropriate to create a plugin for each and every method my control would have so I could then use it like : $('#control').method1(); $('#control').method2(); And if I do use jQuery, where do I store the private data of my control? Another idea I got was to create a new kind of object that would have a reference to a div in which it could render it's elements. So what is the prefered way to do this. If I can I would like to do this as a jQuery plugin, but I'd need guidlines on how to create methods and where to store private data. I've loked at Plugins/Authoring on jQuery website and it did not helped that much in this regard.

    Read the article

  • C++ design question, container of instances and pointers

    - by Tom
    Hi all, Im wondering something. I have class Polygon, which composes a vector of Line (another class here) class Polygon { std::vector<Line> lines; public: const_iterator begin() const; const_iterator end() const; } On the other hand, I have a function, that calculates a vector of pointers to lines, and based on those lines, should return a pointer to a Polygon. Polygon* foo(Polygon& p){ std::vector<Line> lines = bar (p.begin(),p.end()); return new Polygon(lines); } Here's the question: I can always add a Polygon (vector Is there a better way that dereferencing each element of the vector and assigning it to the existing vector container? //for line in vector<Line*> v //vcopy is an instance of vector<Line> vcopy.push_back(*(v.at(i)) I think not, but I dont really like that approach. Hopefully, I will be able to convince the author of the class to change it, but I cant base my coding right now to that fact (and i'm scared of a performance hit). Thanks in advance.

    Read the article

  • Design advices for quick navigation between view

    - by Thomas Joulin
    Usually, when a View requires a lot of bindings, or some UI Elements like a Bing Map, it takes a "while" to load (like between half a second and a second). I don't want a delay between a "tap" action (like tapping an element on a ListBox) and the navigation action (displaying a new page). I don't mind displaying the page progressively. For example, for a Bing Map, I don't mind displaying a black page with only a title, and a second later, having the Map appear. What are the best practices ? It could post a sample if i'm not clear enough

    Read the article

  • Processing a database queue across multiple threads - design advice

    - by rwmnau
    I have a SQL Server table full of orders that my program needs to "follow up" on (call a webservice to see if something has been done with them). My application is multi-threaded, and could have instances running on multiple servers. Currently, every so often (on a Threading timer), the process selects 100 rows, at random (ORDER BY NEWID()), from the list of "unconfirmed" orders and checks them, marking off any that come back successfully. The problem is that there's a lot of overlap between the threads, and between the different processes, and their's no guarantee that a new order will get checked any time soon. Also, some orders will never be "confirmed" and are dead, which means that they get in the way of orders that need to be confirmed, slowing the process down if I keep selecting them over and over. What I'd prefer is that all outstanding orders get checked, systematically. I can think of two easy ways do this: The application fetches one order to check at a time, passing in the last order it checked as a parameter, and SQL Server hands back the next order that's unconfirmed. More database calls, but this ensures that every order is checked in a reasonable timeframe. However, different servers may re-check the same order in succession, needlessly. The SQL Server keeps track of the last order it asked a process to check up on, maybe in a table, and gives a unique order to every request, incrementing its counter. This involves storing the last order somewhere in SQL, which I wanted to avoid, but it also ensures that threads won't needlessly check the same orders at the same time Are there any other ideas I'm missing? Does this even make sense? Let me know if I need some clarification.

    Read the article

  • best database design for city zip & state tables

    - by ryan a
    My application will need to reference addresses. Street info will be stored with my main objects but the rest needs to be stored seperately to reduce redundancy. How should I store/retrieve ZIPs, cities and states? Here are some of my ideas. single table solution (cant do relationships) [locations] locationID locationParent (FK for locationID - 0 for state entries) locationName (city, state) locationZIP two tables (with relationships, FK constraints, ref integrity) [state] stateID stateName [city] cityID stateID (FK for state.stateID) cityName zipCode three tables [state] stateID stateName [city] cityID stateID (FK for state.stateID) cityName [zip] zipID cityID (FK for city.cityID) zipName Then I read into ZIP codes amd how they are assigned. They aren't specifically related to cities. Some cities have more than one ZIP (ok will still work) but some ZIPs are in more than one city (oh snap) and some other ZIPs (very few) are in more than one state! Also some ZIPs are not even in the same state as the address they belong to at all. Seems ZIPs are made for carrier route identification and some remote places are best served by post offices in neighboring cities or states. Does anybody know of a good (not perfect) solution that takes this into consideration to minimize discrepencies as the database grows?

    Read the article

  • How to Design Programs: An Introduction to Programming and Computing -- teacher guide access

    - by user295683
    Hello -- I'm a biologist switching careers, and trying to learn programming as a result. I stumbled upon the aforementioned book on Amazon, which jived with my liberal arts background. Despite my great satisfaction with the didactic approach, I was frustrated to see that the answers to the exercises are restricted to teachers only. As I am pursuing this endeavor on my own, this restriction dramatically cripples the value of this book. My request to the author's website for access to the answers has not been answered, and I would desperately like to continue with this book. Anyone have any experience dealing with the book's website, or at the very least a torrent of the answers? Otherwise, I suspect I will be relegated to using JavaScript for everything! Thanks!

    Read the article

  • Best Automation Frame work design

    - by Vijay Prasath
    Using Nunit Frame work or Creating Visual studio Test Projects which one is the best way to save the time and effective automation? Now i am using selenium IDE to script the maximum parts in my application to reduce the time of execution(i feel ide execution is faster than test project execution) using gotoif, while, regexp ..etc and would go Selenium RC only for data driven methods and the events which have not been handled by IDE. Please suggest me Am i in the right way? because i am in the beginning stage on Automating my applications asking this Question for early correction is better.

    Read the article

  • Design for fastest page download

    - by mexxican
    I have a file with millions of URLs/IPs and have to write a program to download the pages really fast. The connection rate should be at least 6000/s and file download speed at least 2000 with avg. 15kb file size. The network bandwidth is 1 Gbps. My approach so far has been: Creating 600 socket threads with each having 60 sockets and using WSAEventSelect to wait for data to read. As soon as a file download is complete, add that memory address(of the downloaded file) to a pipeline( a simple vector ) and fire another request. When the total download is more than 50Mb among all socket threads, write all the files downloaded to the disk and free the memory. So far, this approach has been not very successful with the rate at which I could hit not shooting beyond 2900 connections/s and downloaded data rate even less. Can somebody suggest an alternative approach which could give me better stats. Also I am working windows server 2008 machine with 8 Gig of memory. Also, do we need to hack the kernel so as we could use more threads and memory. Currently I can create a max. of 1500 threads and memory usage not going beyond 2 gigs [ which technically should be much more as this is a 64-bit machine ]. And IOCP is out of question as I have no experience in that so far and have to fix this application today. Thanks Guys!

    Read the article

  • Hibernate - One design problem

    - by Yatendra Goel
    I am learning Hibernate from the tutorial on JBoss website. I have a confusion in a code example located here. There is a Cat class code at 4.1. A simple POJO example. This Cat class has a reference to his mother as private Cat mother; Q1. If the class has an identifier property as id, then wouldn't it be better to store the cat's mother's id instead of cat's mother object. means instead of private Cat mother; wouldn't it be better to have private long motherId; `

    Read the article

  • Design RESTful service with multiple ids

    - by Dustin Digmann
    I am designing a RESTful service. It is to list a set of data. The main problem is that the set does not have a reasonable, single identifier. Nor can the specific set be easily calculated within the knowledge of the system. As a result, it does not seem possible to have a GET /items/{identifier} service. I do have the id of each element being requested. My main issue is that it does not seem RESTful to list the ids in the URI (eg GET items/{id1},{id2},...,{idn} ). Right? I could see DELETE having a similar use case - remove multiple items in one request cycle. How would such a use case be satisfied while staying within the REST realm? Is that possible?

    Read the article

  • JPA + EJB + JSF: how can design complicated query

    - by Harry Pham
    I am using netbean 6.8 btw. Let say that I have 4 different tables: Company, Facility, Project, and Document. So the relationship is this. A company can have multiple facilities. A facility can have multiple projects, and a project can have multiple documents. Company: +companyNum: PK +facilityNum: FK Facility: +facilityNum: PK +projectNum: FK Project: +projectNum: PK +drawingNum: FK So when I create Entity Class From Database in netbean 6.8, I have 4 entity classes that named after the above 4 tables. So if I want to see all the Document in the database, then it is easy. In my SessionBean, I would do this: @PersistenceContext private EntityManager em; List<Document> documents = em.createNamedQuery("Document.findAll").getResultList(); However, that is not all what I need. Let say that I want to know all the Document from a particular Company, or all the Document from a particular Project from a particular Facility from a particular Company. I am very new to JPA + EJB + JSF as a whole. Please help me out.

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >