Search Results

Search found 5718 results on 229 pages for 'apply'.

Page 14/229 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Does command/query separation apply to a method that creates an object and returns its ID?

    - by Gilles
    Let's pretend we have a service that calls a business process. This process will call on the data layer to create an object of type A in the database. Afterwards we need to call again on another class of the data layer to create an instance of type B in the database. We need to pass some information about A for a foreign key. In the first method we create an object (modify state) and return it's ID (query) in a single method. In the second method we have two methods, one (createA) for the save and the other (getId) for the query. public void FirstMethod(Info info) { var id = firstRepository.createA(info); secondRepository.createB(id); } public void SecondMethod(Info info) { firstRepository.createA(info); var key = firstRepository.getID(info); secondRepository.createB(key); } From my understanding the second method follows command query separation more fully. But I find it wasteful and counter-intuitive to query the database to get the object we have just created. How do you reconcile CQS with such a scenario? Does only the second method follow CQS and if so is it preferable to use it in this case?

    Read the article

  • How to apply a changelog file to packages in a PPA when building from recipe?

    - by rafalcieslak
    When my package gets build by launchpad using a recipe, it ignores the ./debian/changelog file I provide, and it generates a useless one, like following: harmonyseq (0.14~natty1) maverick; urgency=low * Auto build. -- Rafal Cieslak <[email protected]> Tue, 25 Jan 2011 16:56:57 +0000 It would be much better if launchpad stored the list of changes I prepared in the changelog file, rather than just putting there "Auto build". How do I force launchpad to use the list of changes from my changelog file, when building packages from a recipe?

    Read the article

  • How can I apply different actions to different parts of a 2D character?

    - by Praveen Sharath
    I am developing a 2D platform game in Java. The player has a gun in his hand every time. He needs to walk and shoot with the gun(arrow keys for walk and X key to shoot). The walk cycle takes 6 frames and i am able to import the sprite sheet and animate the sequence when I press arrow key. But i need to add the gun motion. The player holds the gun upwards and when X key is pressed he brings it straight and shoots. How to implement the walk + shoot action?

    Read the article

  • How does the GPL static vs. dynamic linking rule apply to interpreted languages?

    - by ekolis
    In my understanding, the GPL prohibits static linking from non-GPL code to GPL code, but permits dynamic linking from non-GPL code to GPL code. So which is it when the code in question is not linked at all because the code is written in an interpreted language (e.g. Perl)? It would seem to be too easy to exploit the rule if it was considered dynamic linking, but on the other hand, it would also seem to be impossible to legally reference GPL code from non-GPL code if it was considered static! Compiled languages at least have a distinction between static and dynamic linking, but when all "linking" is just running scripts, it's impossible to tell what the intent is without an explicit license! Or is my understanding of this issue incorrect, rendering the question moot? I've also heard of a "classpath exception" which involves dynamic linking; is that not part of the GPL but instead something that can be added on to it, so dynamic linking is only allowed when the license includes this exception?

    Read the article

  • How does copyrights apply to source code header files?

    - by Jim McKeeth
    It seems I heard that header files are not considered copyrightable since they can only be written one way (like a list of ingredients or facts). So a header file for a specific DLL will always look the same when written in a given programming language. Unfortunately I can't find any resources to back this up. So if a vendor provides an SDK with headers in one programming language, and then those headers are translated into another programming language by a third party. Does the 3rd party need permission from the vendor to provide the header translation? Who owns the copyright on the translation? Isn't it a derivative work still owned by the vendor, or is there no copyright, like a list of ingredients? Does this vary from jurisdiction to jurisdiction?

    Read the article

  • How to make a license apply to a whole library?

    - by Yannbane
    I'm creating a standard library for a programming language, and I'd like to license each and every single class or function in there under the MIT license, so they're completely FOSS. All of the files reside in a single directory. Would it be enough to put a LICENSE.txt file in the same directory, containing the MIT license? Do I need to say that the following license applies to all features of the library, or is the library itself considered to be a program?

    Read the article

  • Does the EU cookie law apply to an EU site that is hosted outside of the EU?

    - by mickburkejnr
    I have been reading up about this EU cookie law, and have also had in depth conversations with my girlfriend who is a solicitor/lawyer and with colleagues while building websites. While we are now working towards implementing a way to abide by the EU law, I have thought of something which no one really knows the answer to and has caused a few arguments. It's my understanding that any website in the EU must abide by these cookie laws, which is understandable. However, say if I were to have a .co.uk or .eu domain name pointing to a website which is hosted in America for example, do I still need to abide by the EU laws even though the website is hosted outside of the EU? One person I have asked has said that because the domain name is .co.uk or .eu (a European TLD) then the website is still accountable under EU law. Another person I have asked has said because the actual website is held outside of the EU, it doesn't actually have to bother with this law.

    Read the article

  • Is it recommended to apply the new said-great 200 line Linux kernel path to Ubuntu?

    - by takpar
    Hi, Nowadays I'm hearing a lot about the new ~200 line path to Linux kernel that is said makes sensible difference in performance. Now, do anyone has experience on applying this path on his Ubuntu kernel? I also saw an alternative way that claimed has a better result: wget http://launchpadlibrarian.net/59511828/cgroup_patch chmod +x cgroup_patch sudo ./cgroup_patch What do you think this is? Is this validated? I ask this question because I need more performance but I can't risk on stability.

    Read the article

  • Is it recommended to apply the new said-great 200 line Linux kernel patch?

    - by takpar
    Hi, Nowadays I'm hearing a lot about the new ~200 line path to Linux kernel that is said makes sensible difference in performance. Now, do anyone has experience on applying this path on his Ubuntu kernel? I also saw an alternative way that claimed has a better result: wget http://launchpadlibrarian.net/59511828/cgroup_patch chmod +x cgroup_patch sudo ./cgroup_patch What do you think this is? Is this validated? I ask this question because I need more performance but I can't risk on stability.

    Read the article

  • Desktop in Kubuntu lacks bars and quite everything after trying to apply Plymouth fix for proprietary drivers

    - by Michcioperz
    I'm running Kubuntu 13.10, my computer's graphics card is Nvidia GT 520. I tried to fix that Plymouth's problem with proprietary graphics driver using an old script I found on the internet (it was coded for Natty, now that I think about it I shouldn't have done it). I ran that script and rebooted my computer. First incorrect behaviour I noticed was that Plymouth only displayed its text splash only on 1/4th of the screen, though when I pressed Esc key the logs were displaying correctly. Main problem appeared when I logged in. All my desktop's windows lack menu bar, can't be closed with Alt-F4, and they don't appear on the task bar. I tried fixing it by reinstalling GRUB a few times, purging /etc/grub.d and /boot/grub, but only the text splash issue was fixed. How can I fix that?

    Read the article

  • Is there a way to apply a GPO to all but selective users? (SBS 2008)

    - by CandyCo
    I've created a GPO in SBS 2008 that deploys and updates software. Unfortunately, one of our VPN users lives out in the sticks and has severe latency, so the start up processes and updates time out and take an awfully long time, if they ever complete at all. I'd like to apply this GPO to all auth'd users except for him, without having to create a new custom user group. Any thoughts?

    Read the article

  • Is it possible to apply a Theme to Google Chrome when it's in "Application Mode"?

    - by lewen7er9
    I've applied the "brushed" theme (https://tools.google.com/chrome/intl/en/themes/theme%5Fbrushed.html) to my main google chrome browser windows without any problem. However none of the "application mode" shortcuts I created pick up this theme. For example, running chrome as follows does not pick up the "brushed" theme: chrome.exe --app=gmail.com I want to be able to apply themes to google chrome in application mode.

    Read the article

  • swap! alter and alike

    - by mekka
    Hello, I am having a problem understanding how these functions update the underlying ref, atom etc. The docs say: (apply f current-value-of-identity args) (def one (atom 0)) (swap! one inc) ;; => 1 So I am wondering how it got "expanded" to the apply form. It's not mentioned what exactly 'args' in the apply form is. Is it a sequence of arguments or are these separate values? Was it "expanded" to: (apply inc 0) ; obviously this wouldnt work, so that leaves only one possibility (apply inc 0 '()) (swap! one + 1 2 3) ;; #=> 7 Was it: (apply + 1 1 2 3 '()) ;or (apply + 1 [1 2 3]) (def two (atom [])) (swap! two conj 10 20) ;; #=> [10 20] Was it: (apply conj [] [10 20]) ;or (apply conj [] 10 20 '()) If I swap with a custom function like this: (def three (atom 0)) (swap! three (fn [current elem] (println (class elem))) 10) ;;#=> java.Lang.Integer Which means that the value '10' doesnt magically get changed into a seq '(10) and leads me to the conclusion, that it gets "expanded" to: (apply f current-value-of-identity arg1 arg2 arg3... '()) Is that a correct assumption and the docs are simply lacking a better description?

    Read the article

  • How to check if an apply-template filled variable is a string or (possibly) empty node in XSLT?

    - by calavera.info
    I need a test which would evaluate to true in two cases: There is a string inside which contains any non white space characters There is any node (which can be possibly empty) on a variable that is filled with apply-template call result. I tried test="normalize-space($var)" but this doesn't cover the empty tag possibility. I also tried simply this: test="$var" but this evaluate to true even for white space only strings. By the way "$var/*" produces an error "Expression ...something I don't remember... node-set" which is I think because of apply-template variable instantiation. Is there any (which means even multi level decision) solution for this? EDIT: I forgot to say that it's for XSLT 1.0 and preferably without any exslt extensions or similar.

    Read the article

  • Does the 80/20 rule of time management apply to developers?

    - by Dean
    Jeff's recent article linked to a time management example of the First Fit Decreasing algorithm, which talked about the Pareto principle (or, the 80/20 rule) of time management, that is, that 80% of the work we produce in 20% of our time. Now we've all heard the programmer quote: The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. But all jokes aside, it is often as if 20% of your code is to do what you want, and the other 80% is to handle exceptions... so does the 80/20 rule really apply to developers? Does anyone have any examples of why it does / does not apply to us?

    Read the article

  • How to apply coding methodologies and practices to non-coding work?

    - by Dan
    I can talk for hours about best-practice, source control, change management, feature tracking, development cycles and the lot, but most of what I've learnt or read seems to apply to nuts-and-bolts programming of compiled applications. You know, ASCII files that gets turned into 1s and 0s. How does one apply the same discipline and wisdom to working in environments that are point-and-click, config-centric. I'm thinking of CMSs and specifically, my current 9 to 5, SharePoint. Traditional practices of source control, dev-staging-production seem to break down since we're not working with code, and the live environment changes with user input. So to sum up a rather lengthy question, what works in a no-code environment?

    Read the article

  • R: How can I use apply on rows of a data.frame and get out $column_name?

    - by John
    I'm trying to access $a using the following example: df<-data.frame(a=c("x","x","y","y"),b=c(1,2,3,4)) > df a b 1 x 1 2 x 2 3 y 3 4 y 4 test_fun <- function (data.frame_in) { print (data.frame_in[1]) } I can now access $a if I use an index for the first column: apply(df, 1, test_fun) a "x" a "x" a "y" a "y" [1] "x" "x" "y" "y" But I cannot access column $a with the $ notation: error: "$ operator is invalid for atomic vectors" test_fun_2 <- function (data.frame_in) { print (data.frame_in$a) } >apply(df, 1, test_fun_2) Error in data.frame_in$a : $ operator is invalid for atomic vectors Is this not possible?

    Read the article

  • Usability: Save changes using "Apply" button or after every single change?

    - by mr.b
    I am interested in hearing opinions and experiences of fellow developers on topic of designing user interface, usability AND maintainability-wise. Common approach is to allow users to tweak options and after form gets "dirty", enable "Apply" button, and user has possibility to back out by pressing cancel. This is most common approach on Windows platform (I believe MS usability guidelines say to do so as well). Another way is to apply changes after every single change has been made to options. Example, user checks some checkbox, and change is applied. User changes value of some text box, and change is applied after box looses focus, etc. You get the point. This approach is most common on Mac OSX. Regardless of my personal opinion (which is that Apple is better at usability, but software I usually write targets Windows users), what do you people think?

    Read the article

  • Is it possible to apply inheritance to a Singleton class?

    - by Bragaadeesh
    Hi, Today I faced one question in interview. Is it possible to apply inheritance concept on Singleton Classes. I said since the constructor is private, we cannot extend that Singleton class (can someone please validate this). Next thing he asked me is to apply inheritance on that Singleton class. So, I made the Singleton's constructor as protected thinking that child's constructor also has be protected. But I was wrong the child can have a modifier either equal to or higher than that. So, I asked him to give a real world example on such a case. He was not able to give me one and said that I cant ask questions and wanted me to tell whether this scenario is possible or not. I went kind of blank. My question here is, Is this possible? Even if its possible, what is the use of it? What real world scenario would demand such a use. Thanks

    Read the article

  • how to get dynamically created elements width and apply style to that?

    - by 3gwebtrain
    Hi, I am creating an li element dynamically like this: $(data).find('slide').each(function(numSlide){ var slideLink = $(this).attr('link'); var slideimage = $(this).children('slideimage').text(); var slidedesc = $(this).children('slidedesc').text(); $('.slider ul').append('<li><a href="'+slideLink+'"><img src="'+root+"images/top-slider-image/"+slideimage+'" alt="welcome to Burger Davis Blog" /></a><div class="note">'+slidedesc+'</div></li>'); }) But I'd like to calculate the width of the li, and I need to apply some style to it -- how can I do that? If I add styles via the css method, it does not work for dynamically created elements... Please help me to get dynamic elements' width and how to apply styles into that? I know we can use the live function, but I can't get even by that..

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >