Search Results

Search found 6569 results on 263 pages for 'specification pattern'.

Page 153/263 | < Previous Page | 149 150 151 152 153 154 155 156 157 158 159 160  | Next Page >

  • UML and Documenting Simple Diagrams

    - by Jason
    As part of a rewrite of an old Java application into C#, I'm writing an actual Software Design Specification. A problem I run into is when a method is too simple to bother with a Sequence Diagram (it doesn't interact with other objects). As an example, I have a simple POJO called Item, containing the following method: public String getCategoryKey() { StringBuffer value = new StringBuffer("s-"); value.append(this.getModelID()); value.append("-c"); return value; } The purpose and the algorithm for the method needs to be documented. However, a sequence diagram is overkill. How would others document it? (I take no credit/blame for the given method, it's very old code and the author "forgot" to put their name in the Javadoc).

    Read the article

  • Tilde not recognised in XML public identifier

    - by phantom-99w
    Hi everyone I found an interesting bug and wanted to know you think. Brief background: I've written a custom DTD and an example XML file (both UTF-8). I have now implemented a SAX parser in Java which I want to test. I got a SAXException complaining "An invalid XML character (Unicode: 0x7e) was found in the public identifier". Now, the URL of my DTD does contain a tilde character (unicode 0x7e). If I move the DTD file to another URL which does not contain a tilde, then my example XML file parses without causing a SAXException. So I have a work-around for this problem, but I am interested to know: why does this happen? Is this a bug? If so, is it with UTF-8, Java (1.6.0_18 x86), Windows (Server 2008 R2 x86_64) or what? Or is this one of those little obscure nuances of the XML 1.0 specification?

    Read the article

  • Dynamically generating high performance functions in clojure

    - by mikera
    I'm trying to use Clojure to dynamically generate functions that can be applied to large volumes of data - i.e. a requirement is that the functions be compiled to bytecode in order to execute fast, but their specification is not known until run time. e.g. suppose I specify functions with a simple DSL like: (def my-spec [:add [:multiply 2 :param0] 3]) I would like to create a function compile-spec such that: (compile-spec my-spec) Would return a compiled function of one parameter x that returns 2x+3. What is the best way to do this in Clojure?

    Read the article

  • Fastest way to get an Excel Range of Rows

    - by gayan
    In a VSTO C# project I want to get a range of rows from a set of row indexes. The row indexes can be for example like "7,8,9,12,14". Then I want the range "7:9,12,14" rows. I now do this: Range rng1 = sheet.get_Range("A7:A9,A12,A14", Type.Missing); rng1 = rng1.EntireRow; But it's a bit inefficient due to string handling in range specification. sheet.Rows["7:9"] works but I can't give this sheet.Rows["7:9,12,14"] // Fails

    Read the article

  • jquery plugins for truncating long text string by container width/height

    - by ShiVik
    Hello all As the title says, I want to truncate user-input text string based on the width and height of a designated container. My specification is to truncate the string, display some message like Read More at the end and when user clicks on it, the text slides down. UPDATE: Ah! Forgot one thing. It should handle multi-byte characters as well. Can somebody throw some light on what options do I have? jQuery plugins or some nifty jquery snippet? Thanks and Regards

    Read the article

  • Sql Trigger Trouble

    - by SImon
    Hey guys i cant get this trigger to work, ive worked on it for an hour or so and cant see to figure out where im going wrong, any help would be appreciated CREATE OR REPLACE TRIGGER allergy BEFORE INSERT ON DECLARE med VARCHAR2(20); BEGIN SELECT v.medication RCD.specify INTO med FROM visit v, relcondetails RCD WHERE :new.medication = v.medication AND RCD.specifiy = 'allergies'; IF med = allergies THEN RAISE_APPLICATION_ERROR(-20000, 'Patient Is alergic to this medication'); END IF; END allergy; When put into oracle ERROR at line 6: ORA-04079: invalid trigger specification

    Read the article

  • How To Collapse Just One Field in Django Admin?

    - by Apreche
    The django admin allows you to specify fieldsets. You properly structure a tuple that groups different fields together. You can also specify classes for certain groups of fields. One of those classes is collapse, which will hide the field under a collapsable area. This is good for hiding rarely used or advanced fields to keep the UI clean. However, I have a situation where I want to hide just one lonesome field on many different apps. This will be a lot of typing to create a full fieldset specification in every admin.py file just to put one field into the collapsed area. It also creates a difficult maintenance situation because I will have to edit the fieldset every time I edit the associated model. I can easily exclude the field entirely using the exclude option. I want something similar for collapse. Is this possible?

    Read the article

  • [SEO] sitemap.xml What is the precision of the priority field?

    - by Christoph
    Unfortunately the specification does not tell anything about precision. The xml scheme definition states that it is of the type xsd:decimal: <xsd:restriction base="xsd:decimal"> <xsd:minInclusive value="0.0"/> <xsd:maxInclusive value="1.0"/> </xsd:restriction> I have a sitemap generator that uses up to 10 positions after decimal point. Where often only the last few positions differ. These numbers are perfectly right according to the xsd, but yet i found some pages(3,4) that state that only 0.0, 0.1, 0.2, .., 1.0 are valid values. How will the search engines react to such a sitemap? Will some just round the value? I know that it is unlikely that someone can provide an answer to that question, unless he works for that search engine, but i think experiences will also do.

    Read the article

  • handling Javascript actions in PDF with Java

    - by Stroboskop
    I'm trying to make PDF forms (aka AcroForms) editable in Java. So far i got the GUI editing and printing working using Bruno Lowagie's iText and Sun's pdf-renderer. But now i'm close to scrapping it all, because after switching from try & error to reading the PDF specification, i realized that it's all worthless unless i can make the multitude of possible JavaScript actions work as well. I don't think iText can do that. So in short: are there any Java libraries that do proper form handling including actions? Or maybe even a Java GUI component to edit form data?

    Read the article

  • Where can I find "reference barcodes" to verify barcode library output?

    - by mjustin
    This question is not about 'best' barcode library recommendation, we use various products on different platforms, and need a simple way to verify if a given barcode is correct (according to its specification). There are some free online bar code generators in the Internet, and I found many differences between their output and our library output regarding graphics and text field below the code. Now I am not sure which one is wrong, and before filing bug report I want to make sure how the correct barcode should look like. We mainly need Code128 and UCC/EAN-128 with A/B/C subcodes. Which resource would you suggest?

    Read the article

  • Is there a way to make XmlDocument parsing less strict

    - by Istrebitel
    I am making a program that will store its data in an XML file. When people write XML they can make subtle mistakes, like ending a comment with - so it looks like <!-- comment ---> or adding a </>inside an attribute. Naturally, the XML still can be read all right, but trying to input this text into XmlDocument will give a syntax error (and it wont be parsed). Is there a way to make XmlDocument less strict and make it ignore violations of the standard that do not make the document unparseable? For example, its clear that <!-- comment ---> is still a comment even though it contains - at the end which is against the standard specification).

    Read the article

  • C++ Beginner - Best way to read 3 consecutive values from the command line?

    - by Francisco P.
    Hello everyone, I am writing a text-based Scrabble implementation for a college project. The specification states that the user's position input must be read from single line, like this: Coordinates of the word's first letter and orientation (<A – P> <1 – 15> <H ou V>): G 5 H G 5 H is the user's input for that particular example. The order, as shown, must be char int char. What is the best way to read the user's input? cin >> row >> column >> orientation will cause crashes if the user screws up. A getline and a subsequent string parser are a valid solution, but represent a bit of work. Is there another, better, way to do this, that I am missing? Thanks for your time!

    Read the article

  • C++ shared libraries

    - by saminny
    Hi, I am trying to get my head around the way shared libraries work in the c++ unix environment. I understand we only need header files and no shared libraries specification when compiling code. But if I want to create an executable or shared library from my compiled files, do I need to specify shared library dependencies (those are dynamic)? And do the paths of shared libraries need to match the path at runtime loading? I am using Linux 2.6.18-164.11.1.el5 #1 SMP x86_64 GNU/Linux I am having a problem where my code is not able to pick up a library at runtime. I have tried setting LD_LIBRARY_PATH and PATH. But at runtime when I run the executable, I get the following error: Error: librc.so: cannot open shared object file: No such file or directory Sam

    Read the article

  • Does TCP actually define 'TCP server' and 'TCP clients'? [closed]

    - by mjn
    In the Wikipedia article, TCP communication is explained using the terms 'client' and 'server'. It also uses the word 'peers'. But TCP actually does not define "TCP clients" and "TCP servers" - In the RFC 675 document (SPECIFICATION OF INTERNET TRANSMISSION CONTROL PROGRAM), the word "client" never appears. The RFC explains that TCP is used to connect processes over ports (sockets), and that 'A pair of sockets form a CONNECTION which can be used to carry data in either direction [i.e. full duplex]. Calling the originating party the "client" seems to be common practice. But this client/server communication model is not always applicable to TCP communication. For example take peer-to-peer networks. Calling all processes which open a socket (and wait for incoming connections from peers) "TCP servers", sounds wrong to me. I would not call my uncle's telephone device a "Telephony server" if I dial his phone number and he picks up.

    Read the article

  • Facebook access token: server-side vs client-side flows

    - by alexey
    Facebook docs: Facebook Platform supports two different OAuth 2.0 flows for user login: server-side (known as the authentication code flow in the specification) and client-side (known as the implicit flow). The server-side flow is used whenever you need to call the Graph API from your web server. The client-side flow is used when you need to make calls to the Graph API from a client, such as JavaScript running in a Web browser or from a native mobile or desktop app. What is the difference between access tokens taken by these flows? It seems like they length differ. Can we use server-side flow token on a client? And otherwise, can we use client-side flow token on a server?

    Read the article

  • Architect desperately wants to use SOAP over JMS

    - by Aerosteak
    Hello, I have used JMS in the past to build application and it works great. Now I work with Architects that would love to use the Spec : SOAP over Java Message Service 1.0. This spec seams overly complicated. I do not see many implementation (Beside the vendors pushing for the spec). Does anyone here is using this specification in a production environment? What is your main benefit of using this spec? Link: http://www.w3.org/TR/2009/CR-soapjms-20090604/

    Read the article

  • __FILE__ In .h what does it resolve to

    - by Pablitorun
    Is there a specification on how the FILE macro will be expanded if it is in a .h? So if I #define MYFILE __FILE__ in foo.h and foo.c #includes "foo.h" void main(){ printf("%s",MYFILE); .... does this output foo.h or foo.c? (Yes I realize this is a stupid example) Sorry for what should be a simple question. The documentation on the web seems conflicting. For what it is worth VS2008 comes back as foo.c which is what I would expect....I think. I am just trying to confirm if this is defined behavior.

    Read the article

  • How can I fix Grails error: "No domain class found for name PrivacyOptions. Please try again and e

    - by ?????
    I'm just getting started with Groovy/Grails. I added a new domain controller to my project, and generate-controller doesn't like it. There are other indications something's wrong: If I run the app no table is actually created in the database for this. I've reduced the DomainController to one String field and no constraints, just to make sure there wasn't something wrong with my specification. I also tried renaming it, just in case there was something about the original name (Privacy) that conflicted with something. I'm sure I have the correct name, and that the file is called PrivacyOptions.groovy and inside the class is also called PrivacyOptions. Here's the error: Running script /opt/local/grails/scripts/GenerateController.groovy Environment set to development Domain class not found in grails-app/domain, trying hibernate mapped classes... No domain class found for name PrivacyOptions. Please try again and enter a valid domain class name

    Read the article

  • beginner Linq syntax and EF4 question

    - by user564577
    Question With the following linq code snip I get a list of clients with address filtered by the specifications but the form of the entities returned is not what i had expected. The data is 1 client with 2 addresses and 1 client with 1 address. The query returns 3 rows of clients each with 1 address Client 1 = Address1 Client 1 = Address2 Client 2 = Address3 var query = from t1 in context.Clients.Where(specification.SatisfiedBy()).Include("ClientAddresses") join t2 in context.ClientAddresses.Where(spec.SatisfiedBy()) on t1.ClientKey equals t2.ClientKey select t1; My expectation was a little more like a list with only two clients in it, one client with a collection of two addresses and one client with a collection of one address. Client 1 = Address1 / Address2 Client 2 = Address3 What am I missing??? Thanks!

    Read the article

  • Erlang: configuring cover via rebar

    - by exterm
    My project is using a websocket server. Only for testing purposes, I also have an erlang websocket client implementation which resides in the test/ folder along with the tests. Now, when I run the tests via rebar with {cover_enabled, true} in my rebar.config, I also get coverage reported for the modules of the websocket client. I don't want this in my reports. Cover documentation says I should create a cover specification file containing {excl_mods, [websocket_client]}. But how do I convince rebar to use this file? Cover documentation: http://www.erlang.org/doc/apps/common_test/cover_chapter.html http://www.erlang.org/doc/man/cover.html rebar: https://github.com/basho/rebar

    Read the article

  • I need a simple slideshow for images of different sizes

    - by Darryl Young
    I'm looking for a very basic slideshow which displays images of various sizes. For example, the first image could be a standard 800x600 but the next might be a taller portrait image and so on. The slideshow doesn't need to have any controls. The specification just states that the page will be black and in the centre there'll be the area where images will display. As far as I know, it will be very simple like this - www.jeffcutter.net. I'm limited on time here so I'm not able to look into writing a custom one or anything like that. I just need to get some images displaying like in the example. Thanks in advance, it's much appreciated. Have a great weekend! Regards.

    Read the article

  • Spring 3, Java EE 6

    - by arg20
    I'm learning Java EE 6. I've seen how much progress it has achieved in this release of the umbrella specification. EJBs 3.1 are far easier and more lightweight than previous versions, and CDI is amazing. I'm not familiar with Spring, but I often read that it offered some neat features that the Java EE stack didn't. Yet I also read now that JEE has caught up, and can now fully compete with Spring. I know that choosing from both depends on many factors, but if we only focus on features, say the latest trends etc. Which one has the leading edge?. Can Spring 3 offer some assets The JAVA EE 6 stack can't? Also, what about Seam framework? From what I read it's like java ee 6 but with some additions?

    Read the article

  • Through Java, make a call to Javascript functions on networked device?

    - by stjowa
    I am doing device monitoring on a networked system. I need to know how to make Javascript calls on that device via its IP address to get certain status information (this device's status is only available through Javascript APIs, not SNMP, etc). I am working in Java. ADDED: The specific device is an Amino set-top-box. It has what it calls JMACX: JavaScript Media Access Control Extensions API specification. It allows you within an HTML document to use that API to get MUCH information about the device (cpu usage, channel info, remote-control options, etc.). I need to get this information within a Java program for specific monitoring purposes. Perhaps possible with HTTP requests? Any input would be greatly appreciated. Thanks, Steve

    Read the article

  • What are the differences between struct and class in C++

    - by palm3D
    This question was already asked in the context of C#/.Net. Now I'd like to learn the differences between a struct and a class in (unmanaged) C++. Please discuss the technical differences as well as reasons for choosing one or the other in OO design. I'll start with an obvious difference: If you don't specify public: or private:, members of a struct are public by default; members of a class are private by default. I'm sure there are other differences to be found in the obscure corners of the C++ specification.

    Read the article

  • Why doesn't the C++ default destructor destroy my objects?

    - by Oszkar
    The C++ specification says the default destructor deletes all non-static members. Nevertheless, I can't manage to achieve that. I have this: class N { public: ~N() { std::cout << "Destroying object of type N"; } }; class M { public: M() { n = new N; } // ~M() { //this should happen by default // delete n; // } private: N* n; }; Then this should print the given message, but it doesn't: M* m = new M(); delete m; //this should invoke the default destructor

    Read the article

< Previous Page | 149 150 151 152 153 154 155 156 157 158 159 160  | Next Page >