Search Results

Search found 5366 results on 215 pages for 'fully qualified naming'.

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

  • Naming conventions for newtype deconstructors (destructors?)

    - by Petr Pudlák
    Looking into Haskell's standard library we can see: newtype StateT s m a = StateT { runStateT :: s -> m (a, s) } newtype WrappedMonad m a = WrapMonad { unwrapMonad :: m a } newtype Sum a = Sum { getSum :: a } Apparently, there (at least) 3 different prefixes used to unwrap a value inside a newtype: un-, run- and get-. (Moreover run- and get- capitalizes the next letter while un- doesn't.) This seems confusing. Are there any reasons for that, or is that just a historical thing? If I design my own newtype, what prefix should I use and why?

    Read the article

  • Mahout - Clustering - "naming" the cluster elements

    - by Mark Bramnik
    I'm doing some research and I'm playing with Apache Mahout 0.6 My purpose is to build a system which will name different categories of documents based on user input. The documents are not known in advance and I don't know also which categories do I have while collecting these documents. But I do know, that all the documents in the model should belong to one of the predefined categories. For example: Lets say I've collected a N documents, that belong to 3 different groups : Politics Madonna (pop-star) Science fiction I don't know what document belongs to what category, but I know that each one of my N documents belongs to one of those categories (e.g. there are no documents about, say basketball among these N docs) So, I came up with the following idea: Apply mahout clustering (for example k-mean with k=3 on these documents) This should divide the N documents to 3 groups. This should be kind of my model to learn with. I still don't know which document really belongs to which group, but at least the documents are clustered now by group Ask the user to find any document in the web that should be about 'Madonna' (I can't show to the user none of my N documents, its a restriction). Then I want to measure 'similarity' of this document and each one of 3 groups. I expect to see that the measurement for similarity between user_doc and documents in Madonna group in the model will be higher than the similarity between the user_doc and documents about politics. I've managed to produce the cluster of documents using 'Mahout in Action' book. But I don't understand how should I use Mahout to measure similarity between the 'ready' cluster group of document and one given document. I thought about rerunning the cluster with k=3 for N+1 documents with the same centroids (in terms of k-mean clustering) and see whether where the new document falls, but maybe there is any other way to do that? Is it possible to do with Mahout or my idea is conceptually wrong? (example in terms of Mahout API would be really good) Thanks a lot and sorry for a long question (couldn't describe it better) Any help is highly appreciated P.S. This is not a home-work project :)

    Read the article

  • Google Chrome Add-on Naming

    - by Valentina Tatya
    Can add-ons have registered names in Google Chrome add-ons? I created a Youtube add-on and would like to add the Youtube term in my add-on name to better gain attention from users. I want to use it in the purpose of "fair use". Mozilla Add-ons are loose in restrictions about names but I see that there are not many add-ons containing Youtube or Facebook inside Chrome Market. Does that mean Chrome editors do not allow Registered terms inside the add-on names and should this be avoided?

    Read the article

  • Naming the implementation version of an interface function

    - by bolov
    When I need to write an implementation version of an interface function, I put the implementation function within a impl namespace, but with the same name as the interface function. Is this a bad practice? (the same name part, the namespace part I am confident it’s more than OK). For me, who I write the code, there is no confusion between the two, but I want to make sure this isn’t confusing for someone else. One other option would be to append impl suffix to the function name, but since it is already in a separate namespace named impl it seems redundant. Is there an idiomatic way to do this? E.g.: namespace n { namespace impl { // implementation function (hidden from users) // same name, is it ok? void foo() { // ... //sometimes it needs to call recursively or to call overloads of the interface version: foo(); // calls the implementation version. Is this confusing? n::foo(); // calls the interface version. Is this confusing? // ... } // namespace impl // interface function (exposed to users) void foo() { impl::foo(); } } // namespace n

    Read the article

  • Schema qualified tables with SQLAlchemy, SQLite and Postgresql?

    - by Chris Reid
    I have a Pylons project and a SQLAlchemy model that implements schema qualified tables: class Hockey(Base): __tablename__ = "hockey" __table_args__ = {'schema':'winter'} hockey_id = sa.Column(sa.types.Integer, sa.Sequence('score_id_seq', optional=True), primary_key=True) baseball_id = sa.Column(sa.types.Integer, sa.ForeignKey('summer.baseball.baseball_id')) This code works great with Postgresql but fails when using SQLite on table and foreign key names (due to SQLite's lack of schema support) sqlalchemy.exc.OperationalError: (OperationalError) unknown database "winter" 'PRAGMA "winter".table_info("hockey")' () I'd like to continue using SQLite for dev and testing. Is there a way of have this fail gracefully on SQLite?

    Read the article

  • Getting the Assembly Qualified Name of a class in Visual Studio

    - by Alex Marshall
    Hello, I'm writing a customized reflective library for some specialized custom domain logic, and that library is going to use XML configuration files that will dynamically resolve System.Type objects at runtime. However, when writing the XML configuration files, it's a bit of a pain to write the types because they need to be fully qualified assembly names for Type.GetType() to resolve them. Is there a way to find out the AssemblyQualifiedName of an object in Visual Studio without resorting to writing a program to print them out to a file or standard out or anything like that ?

    Read the article

  • Default vs Impl when implementing interfaces in Java

    - by Gary Rowe
    After reading Should package names be singular or plural? it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces. Let's assume that you have a interface Order that is intended to be implemented in a variety of ways but there is only the initial implementation when the project is first created. Do you go for DefaultOrder or OrderImpl or some other variant to avoid the false dichotomy? And what do you do when more implementations come along? And most important... why?

    Read the article

  • How do early version numbers work for new products?

    - by Lord Torgamus
    I'm currently writing a small desktop application for a friend, but I'm doing it primarily as a learning experience for myself. In the spirit of getting educated and doing things The Right Way, I want to have version numbers for this app. My research brought up these related results What "version naming convention" do you use? How do you version your files (Version Numbers) Forked a project, where do my version numbers start? but none of them address numbering of alphas, betas, release candidates, &c. What are the conventions for version numbers below 1.0? I know they can go on for some time; for example, PuTTY has been around for at least a decade and is still only at version beta 0.60.

    Read the article

  • How to name an subclass that add a minor, detailed thing?

    - by Louis Rhys
    What is the most concise (yet descriptive) way of naming a subclass that only add a specific minor thing to the parent? I encountered this case a lot in WPF, where sometime I have to add a small functionality to an out-of-the-box control for specific cases. Example: TreeView doesn't change the SelectedItem on right-click, but I have to make one that does in my application. Some possible names are TreeViewThatChangesSelectedItemOnRightClick (way too wordy and maybe difficult to read because there is so many words concantenated together) TreeView_SelectedItemChangesOnRightClick (slightly more readable, but still too wordy and the underscore also breaks the normal convention for class names) TreeViewThatChangesSIOnRC (non-obvious acronym), ExtendedTreeView (more concise, but doesn't describe what it is doing. Besides, I already found a class called this in the library, that I don't want to use/modify in my application). LouisTreeView, MyTreeView, etc. (doesn't describe what it is doing). It seems that I can't find a name which sounds right. What do you do in situation like this?

    Read the article

  • [YYYY].[MM].[DD].[hh][mm] vs. [major].[minor].[revision] [closed]

    - by ef2011
    Possible Duplicate: What “version naming convention” do you use? I am currently debating between the traditional versioning convention [major].[minor].[revision] and my own, almost whimsical, [YYYY].[MM].[DD].[hh][mm] for a new project I am starting. I understand that [major].[minor].[revision] is probably the most popular versioning method on the planet and it is indeed pretty straightforward and reasonable, except that determining which changes merit the label "major", "minor" or even "revision" could be... subjective. A versioning system based on a timestamp is purely non-subjective and guarantees uniqueness. Which one would you choose for your project and why?

    Read the article

  • User defined type for healthcare / Medical Records variable name prefixes?

    - by Peter Turner
    I was reading Code Complete regarding variable naming in trying to find an answer to this question and stumbled on a table of commonly accepted prefixes for programming word processor software. Well, I'm not a word processor software programmer, but if I was, I'd be happy to use those user defined types. Since I'm a programmer for a smallish healthcare ISV, and have no contact with the larger community of healthcare software programmers (other than the neglected and forsaken HealthCareIT.SE where I never had the chance to ask this question). I want to know if there is a coding convention for medical records. Like Patient = pnt and Chart = chrt and Medication = med or mdctn or whatever. I'm not talking full on hungarian notation, but just a standard that would fit in code complete in place of that wonderful chart of word processor UDT's which are of so little use to me.

    Read the article

  • Should I limit my type name suffix vocabulary when using OOP?

    - by Den
    My co-workers tend to think that it is better to limit non-domain type suffixes to a small fixed set of OOP-pattern inspired words, e.g.: *Service *Repository *Factory *Manager *Provider I believe there is no reason to not extend that set with more names, e.g. (some "translation" to the previous vocabulary is given in brackets): *Distributor (= *DistributionManager or *SendingService) *Generator *Browser (= *ReadonlyRepositoryService) *Processor *Manipulator (= *StateMachineManager) *Enricher (= *EnrichmentService) (*) denotes some domain word, e.g. "Order", "Student", "Item" etc. The domain is probably not complex enough to use specialized approaches such as DDD which could drive the naming.

    Read the article

  • PetStore 2.0 - java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/Pet

    - by Harry Pham
    I download PetStore 2.0 from https://blueprints.dev.java.net/servlets/ProjectDocumentList?folderID=5315&expandFolder=5315&folderID=0. I tried to build them in netbean 6.8 and I got this error SEVERE: Exception while preparing the app java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/PetstoreDB' in SerialContext [Root exception is javax.naming.NameNotFoundException: PetstoreDB not found] Seems like it cant find 'jdbc/PetStoreDB'. So I went back to the website and it look like I have to build the database via Ant script. So at the PetStore home directory, I run this command ant setup ant run And I got the same error when I try ant run [exec] Deprecated syntax, instead use: [exec] asadmin --port 4848 --host localhost --passwordfile /Users/KingdomHeart/.asadminpass --user admin deploy [options] ... [exec] com.sun.enterprise.admin.cli.CommandException: remote failure: Exception while preparing the app : java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/PetstoreDB' in SerialContext [Root exception is javax.naming.NameNotFoundException: PetstoreDB not found] [exec] [exec] [exec] Command deploy failed. Any idea what happen?

    Read the article

  • CORBA Naming Service returns incorrect location of a registered object

    - by dave-keiture
    Hi experts, I have a simple setup with several objects registered at orbd. Remote client initializes connection to the ORB and tries to resolve a reference to the Naming Serice (IDL:omg.org/CosNaming/NamingContextExt:1.0). So far it's all fine - ORB returns giop.iiop.host/giop.iiop.port pair. When reference to the Naming Service is resolved, client tries to resolve_str() one of the registered objects. This time, Naming Service returns completely different pair giop.iiop.host/giop.iiop.port for the object (not the host/port of a Naming Service) - I don't know anything about them. When client tries to call a method on a resolved object, it fails, as the host/port pair is not configured in the firewall. Could you please explain, why it's happening? Thanks in advance!

    Read the article

  • Exception: Need to specify class name in environment or system property: java.naming.factory.initial

    - by DanDan
    When i run a JMS related application, i am encountering the following exception error. javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial We are using Sun Application Server 9.1 Any idea what are we missing? I already tried adding the following but result still the same Properties env = new Properties(); env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory"); Context ctx = new InitialContext(env);

    Read the article

  • How do you avoid name similarities between your classes and the native ones?

    - by Oscar
    I just ran into an "interesting problem", which I would like your opinion about: I am developing a system and for many reasons (meaning: abstraction, technology independence, etc) we create our own types for exchanging information. For instance: if there is a method which is called SendEmail and is invoked by the business logic, it way have a parameter of type OurCompany.EMailMessage, which is an object which is completely technology independent and contains only "business relevant data" (for instance, no information abut head encoding). Inside the SendEmail function, we get this information from our EMailMEssage object and create a MailMessage (this one is technolgy specific) object so it can be sent over the network. As you can already notice, our class has a very similar name to the "native" language class. The problem is: this is exactly what they are, email messages, so it is hard to find another meaningful name for them. Do you have this problem often? How do you manage it? Edit: @mgkrebbs just commented about using fully qualified names. This is our current approach, but a little bit too verbose, IMHO. I would like something cleaner, if possible.

    Read the article

  • f# naming conventions.. WTF??!!

    - by Peter Goras
    let w t f = have I missed something? do all value names in F# have to be a single char? preferably x? and do all method names have to abbreviated to a cryptic four chars?? we've had it rammed down our throats for years about descriptive variable/method names in other languages but now this doesnt apply to F#? or it is some coding 'style' bollox? Learning from code examples is hard enough with type inference. why make it harder?

    Read the article

  • Parse M3U file locations to fully qualified paths

    - by Guy
    I would like to parse the file location information in an M3U playlist into fully qualified paths. The possible formats in M3U files seem to be: c:\mydir\songs\tune.mp3 \songs\tune.mp3 ..\songs\tune.mp3 For the first example, just leave it alone. For the second add the directory that the playlist resides in so it would become c:\playlists\songs\tune.mp3 and the same for the third case so it would also become: c:\playlists\songs\tune.mp3. I'm using vb under VS2008 and I can't find a way to recognise each of the potential location formats in the M3U file. System.IO.Path offers no solution that I can find. I've searched extensively for terms like "convert relative path to absolute" but no luck. Any advice appreciated. Thanks.

    Read the article

  • How do you deal with naming conventions for rails partials?

    - by DJTripleThreat
    For example, I might have an partial something like: <div> <%= f.label :some_field %><br/> <%= f.text_field :some_field %> </div> which works for edit AND new actions. I also will have one like: <div> <%=h some_field %> </div> for the show action. So you would think that all your partials go under one directory like shared or something. The problem that I see with this is that both of these would cause a conflict since they are essentially the same partial but for different actions so what I do is: <!-- for edit and new actions --> <%= render "shared_edit/some_partial" ... %> <!-- for show action --> <%= render "shared_show/some_partial" ... %> How do you handle this? Is a good idea or even possible to maybe combine all of these actions into one partial and render different parts by determining what the current action is?

    Read the article

  • What are some Maven project naming conventions for web application module?

    - by Jared Pearson
    When creating a project with the webapp archetype in Maven, they subtly advise not putting any Java source in the webapp project by not including the "src/main/java" folder. What do you name your Maven projects? project-webapp for the project that contains the JSP, CSS, Images, etc. project for the project that contains domain specific entities ? for the project that contains the web application files like Servlets, Listeners, etc. My first inclination would be to use "webapp" for the project containing the web application files (Servlets/Listeners), however the archetype uses "webapp" to convey the JSP/CSS/Images project and would cause confusion to other developers.

    Read the article

  • What is a good naming convention to differentiate a class name from a property in C#?

    - by Andy Stampor
    I run into this frequently enough that I thought I'd see what others had to say about it. Using the StyleCop conventions, I find that I often have a property name that is hard to make different than the class name it is accessing. For example: public class ProjectManager { // Stuff here } public class OtherClass { private ProjectManager ProjectManager { get; set; } } It compiles and runs, but seems like it would be an easy way to confuse things, even with the use of "this".

    Read the article

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