Daily Archives

Articles indexed Tuesday September 4 2012

Page 11/18 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Configuration data: single-row table vs. name-value-pair table

    - by Heinzi
    Let's say you write an application that can be configured by the user. For storing this "configuration data" into a database, two patterns are commonly used. The single-row table CompanyName | StartFullScreen | RefreshSeconds | ... ---------------+-------------------+------------------+-------- ACME Inc. | true | 20 | ... The name-value-pair table ConfigOption | Value -----------------+------------- CompanyName | ACME Inc. StartFullScreen | true (or 1, or Y, ...) RefreshSeconds | 20 ... | ... I've seen both options in the wild, and both have obvious advantages and disadvantages, for example: The single-row tables limits the number of configuration options you can have (since the number of columns in a row is usually limited). Every additional configuration option requires a DB schema change. In a name-value-pair table everything is "stringly typed" (you have to encode/decode your Boolean/Date/etc. parameters). (many more) Is there some consensus within the development community about which option is preferable?

    Read the article

  • Figuring a max repetitive sub-tree in an object tree

    - by bonomo
    I am trying to solve a problem of finding a max repetitive sub-tree in an object tree. By the object tree I mean a tree where each leaf and node has a name. Each leaf has a type and a value of that type associated with that leaf. Each node has a set of leaves / nodes in certain order. Given an object tree that - we know - has a repetitive sub-tree in it. By repetitive I mean 2 or more sub-trees that are similar in everything (names/types/order of sub-elements) but the values of leaves. No nodes/leaves can be shared between sub-trees. Problem is to identify these sub-trees of the max height. I know that the exhaustive search can do the trick. I am rather looking for more efficient approach.

    Read the article

  • licensing a ' Sharepoint bug-Fix' to reserve it

    - by Remon
    My friend recently finished hes personal work on a project that fixes a known bug in sharepoint 2010, the guy spent significant time\effort to reach this point He consulted me on how to license this fix and asked if this possible and is it accepted for a such type of solutions! actually I don't have any experiences in this matter especially that he is willing to start selling the fix and don't want to be lost in the market P.S.: hes current location is U.A.E TIA.

    Read the article

  • Plug-in based software design

    - by gekod
    I'm a software developer who is willing to improve his software design skills. I think software should not only work but have a solid and elegant design too to be reusable and extensive to later purposes. Now I'm in search of some help figuring out good practices for specific problems. Actually, I'm trying to find out how to design a piece of software that would be extensible via plug-ins. The questions I have are the following: Should plug-ins be able to access each others functionality? This would bring dependencies I guess. What should the main application offer to the plug-ins if I want to let's say develop a multimedia software which would play videos and music but which could later on get functionality added over plug-ins that would let's say be able to read video status (time, bps, ...) and display it. Would this mean that the player itself would have to be part of the main program and offer services to plug-ins to get such information or would there be a way to develop the player as a plug-in also but offer in some way the possibility to other plug-ins to interact with it? As you see, my questions are mainly for learning purposes as I strive to improve my software development skills. I hope to find help here and apologize if something is wrong with my question.

    Read the article

  • Does Azure only support ASP.NET MVC applications and if so how should I adapt my design?

    - by RPK
    I am writing a small ASP.NET Web Application. My worries are that I want to keep the architecture same giving me the option to install it on an Intranet or on a Cloud Platform. I am not using MVC but lately learned that Azure only supports ASP.NET MVC applications. I want to know whether ASP.NET Web Forms application work on Azure/AppHarbor or not. Do I need to convert this application to MVC if Web Forms is not supported? Will the same application run on Intranet as well?

    Read the article

  • Critique of the IO monad being viewed as a state monad operating on the world

    - by Petr Pudlák
    The IO monad in Haskell is often explained as a state monad where the state is the world. So a value of type IO a monad is viewed as something like worldState -> (a, worldState). Some time ago I read an article (or a blog/mailing list post) that criticized this view and gave several reasons why it's not correct. But I cannot remember neither the article nor the reasons. Anybody knows? Edit: The article seems lost, so let's start gathering various arguments here. I'm starting a bounty to make things more interesting.

    Read the article

  • Does this BSD-like license achieve what I want it to?

    - by Joseph Szymborski
    I was wondering if this license is: self defeating just a clone of an existing, better established license practical any more "corporate-friendly" than the GPL too vague/open ended and finally, if there is a better license that achieves a similar effect? I wanted a license that would (in simple terms) be as flexible/simple as the "Simplified BSD" license (which is essentially the MIT license) allow anyone to make modifications as long as I'm attributed require that I get a notification that such a derived work exists require that I have access to the source code and be given license to use the code not oblige the author of the derivative work to have to release the source code to the general public not oblige the author of the derivative work to license the derivative work under a specific license Here is the proposed license, which is just the simplified BSD with a couple of additional clauses (all of which are bolded). Copyright (c) (year), (author) (email) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. The copyright holder(s) must be notified of any redistributions of source code. The copyright holder(s) must be notified of any redistributions in binary form The copyright holder(s) must be granted access to the source code and/or the binary form of any redistribution upon the copyright holder's request. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    Read the article

  • Better use on the name of variables

    - by Cuartico
    I have a method that looks like this: Public Function NormalizeStreetAddress(country As Namespace.Country, streetAddress As Namespace.StreetAddress) _ As Namespace.StreetAddress Dim _streetAddress As New Namespace.StreetAddress = streetAddress If My.Settings.Streeteable = True Then Dim _AddressCustom As New Namespace.AddressCustom _streetAddress = _AddressCustom.NormalizeStreetAddress(country, streetAddress) End If Return _streetAddress End Function I receive a streetAddress object, but inside the method I need to use another streetAddress object which I called _streetAddress — is that following the standard? A friend of mine told me that object names such as _yourNameObject are for global variables, but I can't find info about this and I want to make this method more readable.

    Read the article

  • Handling Errors In PHP When Using MVC

    - by James Jeffery
    I've been using Codeigniter a lot recently, but one thing that gets on my nerves is handling errors and displaying them to the user. I've never been good at handling errors without it getting messy. My main concern is when returning errors to the user. Is it good practice to use exceptions and throw/catch exceptions rather than returning 0 or 1 from functions and then using if/else to handle the errors. Thus, making it easier to inform the user about the issue. I tend to go away from exceptions. My Java tutor at university some years ago told me "exceptions shouldn't be used in production code it's more for debugging". I get the feeling he was lying. But, an example, I have code that adds a user to a database. During the process more than 1 thing could go wrong, such as a database issue, a duplicate entry, a server issue, etc. When an issue happens during registration the user needs to know about it. What's the best way to handle errors in PHP, keeping in mind that I'm using an MVC framework.

    Read the article

  • Is "PHP and MySQL Web Development, 4th ed." an outdated book to learn from?

    - by ForeverLearnNeverMaster
    I want to get into web stuff, and thought of going with PHP+MySQL. I have experience in C#, C++, desktop graphics, but no web stuff besides HTML, CSS which I started learning 2 months ago. On SO PHP-book question, the highest rated book is "PHP Objects, Patterns and Practice". However, I'm not sure if it's a book to start PHP with... or is it? Most of the books mentioned in that SO question seem to be for those who already know PHP. I considered "PHP & MySQL Web Development, 4th Ed.", but someone mentioned that "it uses the mysql_* functions which are almost deprecated." Help?

    Read the article

  • How do you explain to an "agile" team that they still need to plan the software they write?

    - by user23157
    This week at work I got agiled yet again. Having gone through the standard agile, TDD, shared ownership, ad hoc development methodology of never planning anything beyond a few user stories on a piece of card, verbally chewing the cud over the technicallities of a 3rd party integration ad nauseam without ever doing any real thinking or due dilligence and architecturally coupling all production code to the first test that comes into anyone's head for the past few months we reach the end of a release cycle and lo and behold the main externally visible feature that we have been developing is too slow to use, buggy, becoming labyrinthinly complex and completely inflexible. During this process "spikes" were done but never documented and not a single architectural design was ever produced (there was no FS, so what the hell eh, if you don't know what you are developing, how can you plan or research it?) - the project passed from pair to pair, each of whom only ever focused on a single user story at a time and well the result was inevitable. To resolve this I went off the radar, went (the dreaded) waterfall, planned, coded and basically didn't swap off the pair and tried as much as I could to work alone - focusing on solid architecture and specifications rather than unit tests which will come later once everything is pinned down. The code is now much better and is actually totally usable, flexible and fast. Certain people seem to have really resented me doing this and have gone out of their way to sabotage my efforts (possibly unconsciously) because it goes against the holy process of agile. So how do you, as a developer, explain to the team that it is not "un-agile" to plan their work, and how do you fit planning into the agile process? (I'm not talking about the IPM; I'm talking about sitting down with a problem and sketching out an end-to-end design that says how a problem should be solved in sufficient detail that anyone who works on the problem knows what architecture and patterns they should be using and where the new code should integrate into existing code)

    Read the article

  • Desktop switcher appears to be broken for quick double-switches

    - by Jon Blackburn
    I'm wondering if anyone else has seen this. I have three virtual desktops aligned in a horizontal row. In the middle desktop I have only a single application window. I have keyboard shortcuts mapping to navigate between the desktops. Obviously, I never use the up/down arrows because I only have one row of workspaces. Here's the problem, which only started to happen after I installed 12.04.1: When I rapidly hit to go from workspace 1 to workspace 3, the window on workspace 2 gets moved to workspace 1. I have checked using both Unity and Gnome3, and the behavior is the same under both. If I change back to the default workspace setup (a 2x2 grid of desktops) things seem to settle down (i.e., no wandering windows). Not every type of application window behaves the same way. I couldn't get a Chrome browser to jump from 2 to 1, but both Terminal and Terminator exhibit the behavior. Any thoughts? Better workarounds? Thanks in advance.

    Read the article

  • When selecting Bookmarks in Chromium causes force close

    - by pst007x
    Chromium or Google Chrome in Ubuntu 12.04, selecting Bookmarks from the drop down menu causes Chromium/Chrome to close. Terminal: pst007x@pst007x-Serval-Professional:~$ google-chrome ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream [466:466:24874766730:ERROR:gles2_cmd_decoder.cc(4932)] GL ERROR :GL_INVALID_VALUE : glDeleteProgram: unknown program ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream [466:466:24877302452:ERROR:gles2_cmd_decoder.cc(4932)] GL ERROR :GL_INVALID_VALUE : glDeleteProgram: unknown program [466:466:24878889327:ERROR:gl_context_glx.cc(163)] Couldn't make context current with X drawable. [466:466:24878999015:ERROR:x11_util.cc(1273)] X Error detected: serial 150, error_code 146 (GLXBadDrawable), request_code 135, minor_code 5 (Unknown) Aborted I have deleted my profile, I have installed the latest Chromium/Chrome and tried BETA and UNSTABLE releases. It seems to be an issue with my Ubuntu installation. Any ideas? Thanks Current Chromium Version: 23.01246.0r153452-Oubuntu1 (precise) Current Chrome Version: 21.0.1180.89-r154005 (Stable) pst007x@pst007x-Serval-Professional:~$ lsb_release -a LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch Distributor ID: Ubuntu Description: Ubuntu 12.04.1 LTS Release: 12.04 Codename: precise pst007x@pst007x-Serval-Professional:~$

    Read the article

  • Wine , macbook pro 5.5, nvidia 9400 and Diablo 3

    - by Jeff Labonte
    I'm using a Macbook pro 5.5 to play Diablo 3 on Ubuntu 12.04LTS 64bit! On Mac OS X it works like a charm but on Ubuntu I'm having some trouble! I have made my research to see what's going wrong! On wine or a VM my graphic has 128mb and on Linux it has 512mb and on Mac OS X 256mb.... well I guess that the graphic card is sharing his memory with the ram! but I've got lags when I play the game! what can I do to have better performances!

    Read the article

  • Upgrading only several packages, ou packages from one source

    - by Cédric Girard
    we use Deb/apt system to deploy PHP softwares (around 200 + libraries with dependencies). We have a build server, scripts, and a private repository. It's ok and run fine but we want to update ours packages very often, and update Ubuntu packages only when our adminsys have time to handle them. How can we do? The only solution I see for now is to iterate on package list and do a apt-get install $packagename. Not very easy or even resilient. Another idea?

    Read the article

  • xubuntu install on p4

    - by adi
    Hello i am thinking of installing xubuntu on a dell gx260 pentium 4 pc with: 1.8GHz processor 64mb integrated video card(had other but it died on me) 1GB of RAM Ive installed lubuntu but im not enjoying it since i can not make shortcuts of partitions or folders on desktop for faster usability(i dont want them on my bar, want them on desktop) also the buggs i seen on it made me reconsider of using lubuntu:mplayer not working, no video was working,chromium outdated etc and i dont want to stay all day to find solutions over the internet. And seen on internet from xubuntu that theyve had shortcuts for theyre partitions on desktop, and is more attractive.(can some1 tell me if with xubuntu u can make shortcuts on desktop, i mean the shortcuts remain after reboot) 1 more thing to add:at installing lubuntu when it asked me where to install it only showed me the entire hard drive(i have 3 partitions on it) and made me select the size of the lubuntu partition from 1 that the installer wanted.(from local disk D: from windows xp view),need to mention that i have windows xp on the machine which is on local C:, kept my downloads on local D:, and other stuff on E:. I want an ubuntu distro which would work fine especially for internet purpose. Can someone lend me a hand on this?

    Read the article

  • Keyboard problems on Acer Laptop

    - by artfulrobot
    The key map on my Acer Aspire 5750 keyboard has gone awry since I had the keyboard replaced (because of physical fault with one of the keys). The new keyboard looks identical, but now Ubuntu seems a little confused about which (function) buttons are which. So previously Fn+left/right were, as marked on the keys, brightness up and down; Fn+up/down were volume. It all worked as advertised! But now Page Dn (which is marked as Page Dn or Back a track with Fn) is turning the volume up, and the others fn+arrow keys don't work at all. Is there a way I can see what's happening or get it to re-map my keys? Thanks.

    Read the article

  • How do I get write access to ubuntu files from Windows?

    - by Steven
    I'm running Ubuntu 11.10 on my Virtual Machine as a web server. I've mounted the W:/ drive in Win 7 to my /www folder in Ubuntu. I can read the files, but I'm not able to write to the files. In Samba, I have created the following user: <www-data> = "<www-data>" And given guest ok for the www folder: [www] comment = Ubuntu WWW area path = /var/www browsable = yes guest ok = yes read only = no create mask = 0755 ;directory mask = 0775 force user = www-data force group = www-data I've also run sudo chmod -R 755 www to make ensure correct rw access. What am I missing in order to get write access to my ubuntu files from Windows?

    Read the article

  • how do you find a file's location?

    - by home-directory
    Noob here. OK, I 1 Open the Dash. 2 Type "file". An app appears, called "files", icon looks like ta 2-drawer file cabinet. I click that, the app opens 3: I click the "Search button". I type the file name in the box and hit Enter. 4: The program thinks for a while, then displays a result. Great! the program found the file I was ilooking for! IT knows where myfile.foo is, BUT I DON'T! IT DOESN'T F%*%#ING SAY WHERE IT IS!!!! How do I find out where it is, please? I hate to say this, but is there an app that works like Windows Explorer (but doesn't crash every 2 minutes)?

    Read the article

  • apt-get issue after upgrading to 12.04

    - by user83906
    I have recently upgraded my cluster from 11.10 to 12.04. After the upgrade, I am having trouble running apt-get on the cluster nodes. I can ssh between the nodes (client-to-client; client-to-head; client-to-external etc.). However, sudo apt-get update produces the following errors: Ign http://us.archive.ubuntu.com precise InRelease Ign http://security.ubuntu.com precise-security InRelease Ign http://www.openfoam.org maverick InRelease Ign http://us.archive.ubuntu.com precise-updates InRelease Err http://security.ubuntu.com precise-security Release.gpg Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname) Err http://www.openfoam.org maverick Release.gpg Something wicked happened resolving 'www.openfoam.org:http' (-5 - No address associated with hostname) Ign http://us.archive.ubuntu.com precise-backports InRelease Ign http://www.openfoam.org maverick Release Ign http://security.ubuntu.com precise-security Release Err http://us.archive.ubuntu.com precise Release.gpg Something wicked happened resolving 'us.archive.ubuntu.com:http' (-5 - No address associated with hostname) Ign http://security.ubuntu.com precise-security/main Sources/DiffIndex Err http://us.archive.ubuntu.com precise-updates Release.gpg Something wicked happened resolving 'us.archive.ubuntu.com:http' (-5 - No address associated with hostname) Ign http://security.ubuntu.com precise-security/restricted Sources/DiffIndex 15% [Connecting to us.archive.ubuntu.com] [Connecting to security.ubuntu.com] [Connecting to www.openfoam.org] On the headnode, I have in /etc/network/iterfaces: auto eth0 iface eth0 inet static address 192.168.0.1/24 On the client nodes, I have /etc/network/iterfaces: auto eth0 iface eth0 inet static address 192.168.0.101 netmask 255.255.255.0 gateway 192.168.0.1 Please advise.

    Read the article

  • vgaswitcheroo - switch GPU based on load?

    - by Primož Kralj
    Is it possible to make vgaswitcheroo switch between GPU based on load? For example, when computer would be in idle it would turn off discrete and use only integrated; when enough load would accumulate on it it would automatically turn on discrete graphics and disable integrated. My second question is whether there is any GUI applet or something that I could use to manually switch between GPUs - instead of manually echoing in switch file? Edit: I found answer to last question at https://help.ubuntu.com/community/HybridGraphics

    Read the article

  • How can I use GPRename's regex feature to reinsert the matched-group into the 'replace'?

    - by David Thomas
    I've been using GPRename to batch-rename files; this is rather more efficient than individually correcting each file, but still seems to be less efficient than it might be, primarily because either I don't understand the regex syntax used, or because the regex implementation is incomplete1 Given a list of files of the following syntax: (01) - title of file1.avi (02) - title of file2.avi (03) - title of file3.avi I attempted to use the 'replace' (with the regex option selected, the case-sensitive option deselected): (\(\d{2}\)) The preview then shows (given that I've specified no 'replace with' option as yet): title of file1.avi title of file2.avi title of file3.avi Which is great, clearly the regex is identifying the correct group (the (01)). Now, what I was hoping to do (using the JavaScript syntax) in the 'replace with' option is use: $1 (I also tried using '$1', \1 and '\1') This was just to check that I could access the matched group, and it seems I can't, the matched group is, as I suppose might be expected, replaced with the literal replacement string. So, my question: is it possible to match a particular group of characters, in this case the numbers within the brackets, and then insert those into the replacement string? Therefore: (01) title of file1.avi (02) title of file2.avi (03) title of file3.avi Becomes: 01 title of file1.avi 02 title of file2.avi 03 title of file3.avi I absolutely suspect the former, personally.

    Read the article

  • Installation of Office 2007

    - by Edwin Otwori
    The installation process was successful but i get error messages when opening any application. The instructions i followed were from here.How do i go about it. I am using Ubuntu 10.04. The error message i get is Unhandled exception: assertion failed in 32-bit code (0x6b02b832). Register dump: CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b EIP:6b02b832 ESP:0033e6e4 EBP:0033e6f0 EFLAGS:00200202( - -- I - - - ) EAX:00000000 EBX:00000f0b ECX:00000f0b EDX:00000006 ESI:6828ba9e EDI:682aeff4 Stack dump: 0x0033e6e4: 68184651 682aeff4 0033e810 0033e818 0x0033e6f4: 68187a82 00000006 0033e790 00000000 0x0033e704: 0001ee00 682b0450 00000090 682b03c0 0x0033e714: 682aeff4 682b03c0 0000008a 0033e738 0x0033e724: 681c9a9d 0033e800 682aeff4 682aeff4 0x0033e734: 0000008b 0033e800 681b9da8 7db7b0d8 Backtrace: =>0 0x6b02b832 GLIBC_2+0x832() in ld-linux.so.2 (0x0033e6f0) 1 0x68187a82 abort+0x181() in libc.so.6 (0x0033e818) 2 0x6817d718 __assert_fail+0xf7() in libc.so.6 (0x0033e860) 3 0x712fec66 in riched20 (+0xec65) (0x0033e930) 4 0x71310688 in riched20 (+0x20687) (0x0033e9e0) 5 0x7130bee1 in riched20 (+0x1bee0) (0x0033eaa0) 6 0x7130c21c in riched20 (+0x1c21b) (0x0033ead0) 7 0x6d3b9a9a WINPROC_wrapper+0x19() in user32 (0x0033eb00)

    Read the article

  • Cannot install apt-fast

    - by Ronald
    During installation of apt-fast the screen looped and after a while I closed the window. How can I fix it? sudo dpkg --configure -a Setting up apt-fast (1.7.2-1~precise1) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing apt-fast (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: apt-fast

    Read the article

  • Playing Blu-ray using VLC

    - by Kevin
    I've been searching for a way to play Blu-ray using VLC on Ubuntu 12.04 64bit and all of them tell me that I've to somehow rip the disk into .mkv format then play it. But today, I found a page with directions on how to play Blu-rays directly on VLC. I've already finished downloading and pasting the files it told me to do, But it didn't work for me. Then I found a page where someone had tried it and it worked for them. Does anyone know how they got it to work? The page with the directions. The page where it worked. I also found this Does anyone know what it is talking about? I've already downloaded lxBDplayer, but I encountered a problem when installing the lcbdaacs plugins. Are there any other ways to install the lxbdaacs plugin?

    Read the article

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