Search Results

Search found 12688 results on 508 pages for 'swift language'.

Page 113/508 | < Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >

  • Three customer addresses in one table or in separate tables?

    - by DR
    In my application I have a Customer class and an Address class. The Customer class has three instances of the Address class: customerAddress, deliveryAddress, invoiceAddress. Whats the best way to reflect this structure in a database? The straightforward way would be a customer table and a separate address table. A more denormalized way would be just a customer table with columns for every address (Example for "street": customer_street, delivery_street, invoice_street) What are your experiences with that? Are there any advantages and disadvantages of these approaches?

    Read the article

  • Doubt in Conditional inclusion

    - by Philando Gullible
    This is actually extracted from my module (Pre-processor in C) The conditional expression could contain any C operator except for the assignment operators,increment, and decrement operators. I am not sure if I am getting this statement or not since I tried using this and it worked.Also for other manipulation a probable work around would be to simply declare macro or function inside the conditional expression,something like this to be precise. Also I don't understand what is the rationale behind this rule. Could somebody explain? Thanks

    Read the article

  • How Does Modulus Divison Work

    - by NSWOA
    I don't really understand how modulus division works. I was calculating 27 % 16 and wound up with 11 and I don't understand why. I can't seem to find an explanation in layman's terms online. Can someone elaborate on a very high level as to what's going on here? EDIT: Thanks for all your answers. You guys are incredibly quick. It all makes sense now.

    Read the article

  • Anyone plotting SO via code_swarm?

    - by Tim Post
    Is anyone working on something to render individual questions, or SO as a whole with codeswarm? If so, can you post a link to your work that transforms SO questions into revisions that codeswarm can understand (i.e. svn?) It would be really, really cool to see SO played (as a whole) via codeswarm, so I hope to not only ask if anyone is working it, but see if anyone is interested in trying to accomplish it. Augmenting that, will database dumps be made available? EDIT: Database dumps have since been made available :) Enough with user voice, is anyone doing it? If so, what VCS did you mock?

    Read the article

  • Data structure name: combination array/linked list

    - by me_and
    I have come up with a data structure that combines some of the advantages of linked lists with some of the advantages of fixed-size arrays. It seems very obvious to me, and so I'd expect someone to have thought of it and named it already. Does anyone know what this is called: Take a small fixed-size array. If the number of elements you want to put in your array is greater than the size of the array, add a new array and whatever pointers you like between the old and the new. Thus you have: Static array ————————————————————————— |1|2|3|4|5|6|7|8|9|a|b|c| ————————————————————————— Linked list ———— ———— ———— ———— ———— |1|*->|2|*->|3|*->|4|*->|5|*->NULL ———— ———— ———— ———— ———— My thing: ———————————— ———————————— |1|2|3|4|5|*->|6|7|8|9|a|*->NULL ———————————— ————————————

    Read the article

  • Poll: What is stopping you from switching (from Java) to Scala ?

    - by Lukasz Lew
    What would make you to switch to Scala ? If you are negative on the switching to Scala, please state the reason as well (or upvote). As with all StackOverflow Poll type Q&As, please make certain your answer is NOT listed already before adding a new answer If it already exists, vote that one up so we see what the most popular answer is, rather than duplicating an existing entry. If you see a duplicate, vote it down. If you have interesting or additional information to add, use a comment or edit the original entry rather than creating a duplicate.

    Read the article

  • How to define a ternary operator in Scala which preserves leading tokens?

    - by Alex R
    I'm writing a code generator which produces Scala output. I need to emulate a ternary operator in such a way that the tokens leading up to '?' remain intact. e.g. convert the expression c ? p : q to c something. The simple if(c) p else q fails my criteria, as it requires putting if( before c. My first attempt (still using c/p/q as above) is c match { case(true) = p; case _ = q } another option I found was: class ternary(val g: Boolean = Any) { def |: (b:Boolean) = g(b) } implicit def autoTernary (g: Boolean = Any): ternary = new ternary(g) which allows me to write: c |: { b: Boolean = if(b) p else q } I like the overall look of the second option, but is there a way to make it less verbose? Thanks

    Read the article

  • Can you /should you learn SEO techniques

    - by Mark
    I know very little about Search engine optimization however from discussions with other I am now unsure where to start. Are there any books or do these date so quickly that they are obsolete? Do all website give you mis-information or are there any reliable sources? Is it just a case of trial and error and in turn experience? Is it event worth learning the techniques as search engines change their algorithms so regularly? I wonder if it just better to spend the time to ensure you have a regularly updated will written web site with quality content, site map, quality links etc..

    Read the article

  • Does '[ab]+' equal '(a|b)+' in python re module?

    - by user1477871
    I think pat1 = '[ab]' and pat2 = 'a|b' have the same function in Python(python2.7, windows) 're' module as a regular expression pattern. But I am confused with '[ab]+' and '(a|b)+', do they have the same function, if not plz explain details. ''' Created on 2012-9-4 @author: melo ''' import re pat1 = '(a|b)+' pat2 = '[ab]+' text = '22ababbbaa33aaa44b55bb66abaa77babab88' m1 = re.search(pat1, text) m2 = re.search(pat2, text) print 'search with pat1:', m1.group() print 'search with pat2:', m2.group() m11 = re.split(pat1, text) m22 = re.split(pat2, text) print 'split with pat1:', m11 print 'split with pat2:', m22 m111 = re.findall(pat1, text) m222 = re.findall(pat2, text) print 'findall with pat1:', m111 print 'findall with pat2:', m222 output as below: search with pat1: ababbbaa search with pat2: ababbbaa split with pat1: ['22', 'a', '33', 'a', '44', 'b', '55', 'b', '66', 'a', '77', 'b', '88'] split with pat2: ['22', '33', '44', '55', '66', '77', '88'] findall with pat1: ['a', 'a', 'b', 'b', 'a', 'b'] findall with pat2: ['ababbbaa', 'aaa', 'b', 'bb', 'abaa', 'babab'] why are 'pat1' and 'pat2' different and what's their difference? what kind of strings can 'pat1' actually match?

    Read the article

  • How does Undo work?

    - by dontWatchMyProfile
    How does undo work? Does it copy all the managed objects every time any of the values change? Or does it only copy the actual changes together with an information which objects were affected? Is that heavy or lightweight?

    Read the article

  • name of class that manipulates the entities

    - by cyberguest
    hi, i have a general question regarding naming convention. if I separate the data and operations into two separate classes. one has the data elements (entity), the other class manipulates the entity class. what do we usually call that class that manipulates the entity class? (the entity I am referring to has nothing to do with any kind of entity framework) manager? controller? operator? manipulator? thanks in advance

    Read the article

  • Do you leave historical code commented out in classes that you update?

    - by 18Rabbit
    When you need to obsolete a section of code (say either the business rules changed, or the old system has been reworked to use a new framework or something) do you delete it from the file or do you comment it out and then put in the new functionality? If you comment it out, do you leave a note stating why it was removed and what it was originally intended to do? I ask mainly because I've done a lot of contract work for different places over the years and sometimes it's like excavating a tomb to find the actual code that is still being used. Why comment it out and leave it in the file if source control has a record of what used to be there? If you comment out a method do you also comment out/delete any methods that were exclusively used by that method? What do you think the best practices for this should be?

    Read the article

  • Which regex flavors support captures (as opposed to capturing groups)?

    - by Tim Pietzcker
    As I just learned from this question, .NET regexes can access individual matches within a repeated capturing group. I. e., if I apply a regex like \b(\w+\s*)+ to a string of words, only the last word will be stored in \1 or Match.Groups(1).Value, but using Match.Groups(1).Captures I get access to all the individual matches the regex iterated over. Are there other regex flavors that support this besides .NET?

    Read the article

  • Number of the different elements in an array.

    - by AB
    Is it possible to compute the number of the different elements in an array in linear time and constant space? Let us say it's an array of long integers, and you can not allocate an array of length sizeof(long). P.S. Not homework, just curious. I've got a book that sort of implies that it is possible.

    Read the article

  • Private vs. Public members in practice (how important is encapsulation?)

    - by Asmor
    One of the biggest advantages of object-oriented programming is encapsulation, and one of the "truths" we've (or, at least, I've) been taught is that members should always be made private and made available via accessor and mutator methods, thus ensuring the ability to verify and validate the changes. I'm curious, though, how important this really is in practice. In particular, if you've got a more complicated member (such as a collection), it can be very tempting to just make it public rather than make a bunch of methods to get the collection's keys, add/remove items from the collection, etc. Do you follow the rule in general? Does your answer change depending on whether it's code written for yourself vs. to be used by others? Are there more subtle reasons I'm missing for this obfuscation?

    Read the article

< Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >