Daily Archives

Articles indexed Thursday October 18 2012

Page 16/17 | < Previous Page | 12 13 14 15 16 17  | Next Page >

  • C++11 support for higher-order list functions

    - by Giorgio
    Most functional programming languages (e.g. Common Lisp, Scheme / Racket, Clojure, Haskell, Scala, Ocaml, SML) support some common higher-order functions on lists, such as map, filter, takeWhile, dropWhile, foldl, foldr (see e.g. Common Lisp, Scheme / Racket, Clojure side-by-side reference sheet, the Haskell, Scala, OCaml, and the SML documentation.) Does C++11 have equivalent standard methods or functions on lists? For example, consider the following Haskell snippet: let xs = [1, 2, 3, 4, 5] let ys = map (\x -> x * x) xs How can I express the second expression in modern standard C++? std::list<int> xs = ... // Initialize the list in some way. std::list<int> ys = ??? // How to translate the Haskell expression? What about the other higher-order functions mentioned above? Can they be directly expressed in C++?

    Read the article

  • Developing web sites that imitate desktop apps. How to fight that paradigm? [closed]

    - by user1598390
    Supposse there's a company where web sites/apps are designed to resemble desktop apps. They struggle to add: Splash screens Drop-down menus Tab-pages Pages that don't grow downward with content, context is inside scrollable area so page is of a fixed size, as if resembling the one-screen limitation of desktop apps. Modal windows, pop-ups, etc. Tree views Absolutely no access to content unless you login-first, even with non-sensitive content. After splash screen desapears, you are presented with a login screen. No links - just simulated buttons. Fixed page-size. Cannot open a linked in other tab Print button that prints directly ( not showing printable page so the user can't print via the browser's print command ) Progress bars for loading content even when the browser indicates it with its own animation Fonts and color amulate a desktop app made with Visual Basic, PowerBuilder etc. Every app seems almost as if were made in Visual Basic. They reject this elements: Breadcrumbs Good old underlined links Generated/dynamic navigation, usage-based suggestions Ability to open links in multiple tabs Pagination Printable pages Ability to produce a URL you can save or share that links to an item, like when you send someone the link to an especific StackExchange question. The only URL is the main one. Back button To achieve this, tons of javascript code is needed. Lots and lots of Javascript and Ajax code for things not related with the business but with the necessity to hide/show that button, refresh this listbox, grey-out that label, etc. The coplexity generated by forcing one paradigm into another means most lines of code are dedicated to maintain the illusion of a desktop app. What is the best way to change this mindset, and make them embrace the web, and start producing modern, web apps instead of desktop imitations ? EDIT: These sites are intranet sites. Users hate these apps. They constantly whine about them, but they have to use them to do their daily work. These sites are in-house solutions, the end-users have no choice but to use them. They are a "captive audience". Also, substitution will not happen because of high costs. But at least if that mindset is changed, new developments would be more web-like.

    Read the article

  • Numerous Unexpected Obstacles Ruining any Project Plans

    - by Libor
    I am working as software developer and struggling with this problem time and time again for almost thirteen years. There seems not to be any way out of the following problem. And it happens with small projects as well. For example, I plan to write an extension for Microsoft Visual Studio. I dowload learning materials, get some book on the topic and allocate time for learning and development. However, during the development, many seemingly trivial problems arise, for example: Why the script refuses to delete the file? Why Visual Studio does not register the extension? (after two days) OK, it registers it, but now it got broken. How to fix it? each of these "small" obstacles usually take 1-5 days to resolve and the project finally consumes several times more man-hours than planned. Maybe it happens only because I am working on Microsoft platform and many of their Frameworks and architectures are bit confusing and badly documented. I would like to have most problems resolved by finding answer in a book or official documentation (MSDN), but the only answer I usually find is on some weird forum or personal blog googled after desperately searching for any relevant information on the topic. Do you have the same struggles? Do you have techniques on how to prevent these problems? I was thinking of simply multiplying projected time for a given project by some factor, but this does not help. Some projects get done briskly and some take months and the guiding factor here are these small "glitches" which take programmers whole weeks to resolve. I have to admit that lots of these obstacles demoralizes me and drains me of focus and joy of work (who likes to get back to work when he have to resolve some stupid registry problem or weird framework bug instead of doing creative work?) After the project is finally done, I am feeling like dying from thousand cuts.

    Read the article

  • Why use other number bases when programming

    - by JMD
    My coworkers and I have been bending our minds to figuring out why anyone would go out of their way to program numbers in a base other than base 10. I suggested that perhaps you could optimize longer equations by putting the variables in the correct base you are working with (for instance, if you have only sets of 5 of something with no remainders you could use base 5), but I'm not sure if that's true. Any thoughts?

    Read the article

  • Can an internally developed fast evolving, agile, short sprint web application lend itself to offshoring?

    - by Gavin Howden
    I have recently been set a target to achieve readiness to successfully manage and deliver results through the usage of offshore teams on our mainline development project within 12 months. Our mainline is a multi-thousand user highly available web application, and various related SAAS components delivered through the above mentioned web application. We work agile on the mainline with a rapid 1 week sprint using continuous integration. Our delivery platform is a bespoke php framework, although we have some .net services and components in the mix. My view is: an offshore team could work if we either ship out an entire isolated project for offshore development, or we specify a component for our system in huge detail up front. But we don't currently work like that, and it will conflict with the in-house method, and unless the off-shore is working within our team, with our development/deployment chain it could be an integration nightmare. So my question is, given we have a closed source bespoke framework (Private IP) which we train our developers to use, and we work agile minimising documentation, maximising communication and responding to rapidly changing requirements, and much of the quality control is via team skills building and peer review, how can I make off-shoring work on our main line development?

    Read the article

  • Why use other bases when programming [closed]

    - by JMD
    Possible Duplicate: Why use other number bases when programming My coworkers and I have been bending our minds to figuring out why anyone would go out of their way to program numbers in a base other than base 10. I suggested that perhaps you could optimize longer equations by putting the variables in the correct base you are working with (for instance, if you have only sets of 5 of something with no remainders you could use base 5), but I'm not sure if that's true. Any thoughts?

    Read the article

  • How do you tell if advice from a senior developer is bad?

    - by learnjourney
    Recently, I started my first job as a junior developer and I have a more senior developer in charge of mentoring me in this small company. However, there are several times when he would give me advice on things that I just couldn't agree with (it goes against what I learned in several good books on the topic written by the experts, questions I asked on some Q&A sites also agree with me) and given our busy schedule, we probably have no time for long debates. So far, I have been trying to avoid the issue by listening to him, raising a counterpoint based on what I've learned as current good practices. He raises his original point again (most of the time he will say best practice, more maintainable but just didn't go further), I take a note (since he didn't raise a new point to counter my counterpoint), think about it and research at home, but don't make any changes (I'm still not convinced). But recently, he approached me yet again, saw my code and asked me why haven't I changed it to his suggestion. This is the 3rd time in 2--3 weeks. As a junior developer, I know that I should respect him, but at the same time I just can't agree with some of his advice. Yet I'm being pressured to make changes that I think will make the project worse. Of course as an inexperienced developer, I could be wrong and his way might be better, it may be 1 of those exception cases. My question is: what can I do to better judge if a senior developer's advice is good, bad or maybe it's (good but outdated in today context)? And if it is bad/outdated, what tactics can I use to not implement it his way despite his 'pressures' while maintaining the fact that I respect him as a senior?

    Read the article

  • What is missing and should be added to Code Complete 3rd Edition? [closed]

    - by Peter Turner
    It's been quite a few years since Code Complete was published. I really love the book, I keep it in the bathroom at the office and read a little out of it once or twice a day. What developments in computer software... development need to be added to Code Complete 3e, and for the sake of reductionism, what should be removed to make room for them? Is it necessary even possible to call Code Complete Code Complete if it doesn't have language features that even Delphi has like anonymous methods and generics? Also, what languages would be more appropriate than C++ to use for a majority of code examples?

    Read the article

  • Option Button in Keyboard Layout > Input Sources is not pressable

    - by user98647
    I would like to set the Caps-lock key as a Compose key, which you do, as far as I remember, by pressing the Options Button in Keyboard Layout Input Sources and then enabling the appropriate option there. That Button is not pressable though since I switched to 12.10. It did work in previous releases of Ubuntu. gnome-control-center puts out these errors, when I click on Keyboard Layout: (gnome-control-center:3645): common-cc-panel-WARNING **: Could not find current language '?\u0003C!\u007f' in the treeview (gnome-control-center:3645): common-cc-panel-WARNING **: locale '"en_US.UTF-8"' isn't valid I'm not sure if the errors are related though, maybe they are related to the "interface switching to chinese bug" which seems surprisingly widespread: Language changed to Chinese, how do I change it back? Language Support has an unwanted Chinese language option Nautilus Folders Turned Chinese Desktop 12.04 gnome/cairo suddenly in Chinese Unwanted Chinese language got set in system settings I cannot set my system back to English from Chinese Language Gnome-classic language turned into Chinese, how do I change it back to English? Strange display language in gnome shell I'm not sure they are related to this bug, but I just wanted to mention it, maybe it helps!

    Read the article

  • How to fix the "Unable to calculate upgrade" issue when upgrading from 12.04 to 12.10?

    - by Vagrant232
    I've been trying to upgrade to 12.10 ever since it was released today but I keep meeting this error: "An unresolvable problem occurred while calculating the upgrade: E:Unable to correct problems, you have held broken packages. This can be caused by: * Upgrading to a pre-release version of Ubuntu * Running the current pre-release version of Ubuntu * Unofficial software packages not provided by Ubuntu" I've tried updating all the currently installed software, removing all the extra PPAs, downgrading the files installed from xorg edgers' ppa but I haven't been able to solve the problem.

    Read the article

  • ubuntu 12.10 can't find java, but it's exists!

    - by William
    I installed ZendStudio 5.5.1 on Ubuntu 12.04 and it runs well , no problem. Today, I download Ubuntu 12.10 and intalled it on my / but keep the /home partition. And now, I can't run the ZendStudio any more, it gives me this error: strings: '/lib/libc.so.6': No such file ./ZDE: 1714: exec: /home/william/Zend/ZendStudio-5.5.1/jre/bin/java: not found But the java file exist! What's wrong? Thanks!

    Read the article

  • Where is my ram?

    - by gsedej
    I have 2GB installed on my machine running Ubuntu 12.04. After some time of use, I see much of my RAM used. The RAM does not free enough even though I closed all my programs. I included 2 screenshots. First is "Gnome system monitor" (all process) and second is "htop" (with sudo), both sorted by memory usage. From both you see, that it's not possible that all running apps takes together 1GB of memory. First 7 biggest programs sum 250, but others are much smaller (all can't sum even 100MB). The cache is 300MB (yellow ||| on htop) and is not included in 1GB used. Also 260MB is already on swap. (which actually makes 1,3GB of used memory) If i start Firefox (or Chrome) with many tabs, it has only 1GB available and not potentially 1,5 GB (assume 0,5GB is for system). When I need more ram, swapping happens. So where is my ram? Which program is using it? How can i free it, to be available for e.g. Firefox? Gnome system monitor htop

    Read the article

  • Unity Gwibber lens doesn't work 12.10

    - by sayth
    Is there something Specific I am needing to do to get the unity Gwibber/Social lens to work. I have gone into system settings and added google account, twitter account and facebook account. When I go to the lens however nothing is displayed at all its blank. I search any term including my name and it states nothing to display. So it remains blank. If I start gwibber itself it has found and does see my accounts new messages and posts. Any hints on what to try?

    Read the article

  • when i load ubuntu i get the log on screen, but even with correct password i cant log on.. have looged in several times before successfully!

    - by mybox
    I have been using ubuntu 12.04 for a few months now. but have now come across a problem that i cant get past. I am stuck at the log on screen= i enter my password but i get a black screen flases up and the log on prompt reappears!!! tried using terminal prompts and i actually have loggin it- but not according to the main log onm screen. I cant get my desktop active as the log on prompt is there. when i put a wrong password in i get an invalid password message- with the correct password the log on screen just reappears!!!please help.

    Read the article

  • Dell Vostro 2420 upgrade to 12.04.1 no wifi

    - by Kane
    I have installed 12.04 on a dell vostro 2420 (previously 11.10) and wifi is gone now but wired network remains. I've reviewed the other questions and tried some stuff but no luck yet. The following is the process so far so hopefully someone can help: After installing 12.04 using the additional drivers utility did not bring up any proprietary drivers and using synaptic on installation then reinstallation of bcmwl-kernel-source and b43-fwcutter does not help bring up any drivers either (tried rebooting after as well) I have made sure in the bios that the wlan is turned on, and it appears the laptop does not have a wireless hardware switch, only the keyboard function shortcut which turns bluetooth on and off on the taskbar but there is no lightup of the wireless function on the laptop itself. Dell does not appear to have any drivers for ubuntu and google does not appear to be much help :( Thanks in advance!

    Read the article

  • Unable to create an Ubuntu 12.10 USB stick on OS X

    - by Hex Bob-Omb
    I'm following the instructions to create a bootable Ubuntu 12.10 USB stick on OS X found here. I can do step 3 and hdiutil appears to work fine, but when I go to mount the resulting ubuntu.img file I get the same "no mountable file systems" error that I get when I try and open the ubuntu.iso file. No correctly sized volumes show up in diskutil list either. Any ideas? Using the most recent ubuntu-12.10-desktop-amd64.iso on Mountain Lion 10.8.2.

    Read the article

  • How to move packages from the live image to a pool on the disc?

    - by int_ua
    Currently I'm using UCK and trying to make Edubuntu 12.04.1 DVD launch installer on 256Mb RAM: How to install Edubuntu on a system with low memory (256 Mb)? I was reading release notes for 12.10 and noticed that Language packs have now been moved off from the live image to a pool on the disc. How can I move other packages correctly so they would be available to the live system and for installation without network access?

    Read the article

  • Touchpad not working on an Acer One 725

    - by big-marc
    I installed ubuntu on a usb drive on a acer one 725, and cannot seem to be able to make the touchpad work....here is what i have xinpbig-marc@Big-Marc:~$ xinput --list ? Virtual core pointer id=2 [master pointer (3)] ? ? Virtual core XTEST pointer id=4 [slave pointer (2)] ? ? Logitech USB Optical Mouse id=10 [slave pointer (2)] ? ? ETPS/2 Elantech Touchpad id=13 [slave pointer (2)] any can help me out....

    Read the article

  • How can I fix my keyboard layout?

    - by Scott Severance
    For a long time, I've had my keyboard configured to use the layout currently known as "English (international AltGr dead keys)." I like this layout because without any modifier keys, it's identical to the US English keyboard, but when I hold Right Alt I can get accented letters and other characters not available on a standard US English keyboard. In Oneiric, however, the layout is messed up. Right Alt+N produces "ñ" as expected. And another method works: Right Alt+`, E produces "è", also as expected. But there's no way to type "é", which is probably the accented letter I type the most. I expect Right Alt+A, E to do the trick. But instead of a dead key for the acute accent, it uses a method for combining characters to create the hybrid "´e". This hybrid looks like the proper "é" in some settings, but it isn't the same character and doesn't always work. (For example, in the text input box as I type this, it looks the same as the proper character, but when displayed on the site for all so see, it looks very wrong--at least on my machine.) Ditto for all other characters with an acute accent, though some are available directly as pre-composed characters: For example, Right Alt+I yields "í". How can I change the acute accent on the A key to a proper dead key? Perhaps the more general version of this is: How can I tweak my keyboard layout? Update I just tested this on my other machine, also running Oneiric, but upgraded from previous versions. I have no problems with the second machine. The problem machine was a fresh install of Oneiric, but I kept my old $HOME when I did the fresh install. Clarification Even if an answer doesn't address my specific examples, I would still accept it if it provided enough detail for me to find the layout and tweak it according to my needs. Major Update After working through the information gained through Jim C's and Chascon's helpful replies, I've learned something new: The problem isn't with the layout itself, but with the fact that the selected layout isn't being applied. When I look at the definition in /usr/share/X11/xkb/symbols/us of the layout I've been running for a long time, I found that the definition doesn't match what I get when I type. In addition, the keyboard layout dialog that's supposed to show the current layout looks different from the way the layout is defined in the file I mentioned, and matches what actually happens when I type. Following Jim C's suggestion, I created a new layout in /usr/share/X11/xkb/symbols/us containing some modifications to the layout I want. I can select my layout from the keyboard properties, and I can use in on the console following Chascon's post, but the layout I get when typing is unchanged. Apparently, there's a different layout defined somewhere that's overriding what I've set. Where is that layout hiding? This problem occurs in Unity (3D and 2D), but I was able to get the correct layout set in Xfce. In case it's relevant, this problem has occurred since I installed Oneiric fresh on this machine (though I preserved my $HOME). I don't recall whether this problem occurred before the reinstall. Also, in case it's relevant, I also run iBus so I can type Korean. I have a few difficulties with iBus, but I doubt they're related.

    Read the article

  • Hosted News Carousel

    - by user19240
    I'm trying to add a news carousel on my OneHub site. I know there are quite a few plugins that I can use, but I'm looking for a ready-to-use hosted solution where people can log-on and manage the content, and I can simply include as an iFrame widget on our OneHub site. We would prefer to use Expression Engine, since we're using this on some of our other websites. It looks like Expression Engine + JQuery Cycle Rotator might be an option, not sure how easily I can get this onto OneHub though... WordPress has a carousel plugin as well that I'll explore. Anyhow, while I'm trying out these options, I figured I would put a question out there for any thoughts or advice, other solutions, etc. Any help would be greatly appreciated! Thanks, Alan

    Read the article

  • Googlebot can't access my site when crawling from rootdomain

    - by PéCé
    I can't explain why I get this message for my rootdomain result in Google : trocmalin.com/ A description for this result is not available because of this site's robots.txt – learn more. Here is my site specifics : vide-greniers.trocmalin.com is the site address www.trocmalin.com redirects (301) to vide-greniers.trocmalin.com trocmalin.com redirects (301) to vide-greniers.trocmalin.com too... User-agent: * Disallow: /orga/ User-agent: * Disallow: /sitemap-update Google results for vide-greniers.trocmalin.com are well rendered, as well as sub pages allowed for bots. But the result for my rootdomain (trocmalin.com) gives this message... Can you help me ?

    Read the article

  • How do I implement Unreal-like object serialization?

    - by MrWiggels
    Recently, I've been working on the core of my engine, and as I'm moving forward I find myself developing throwaway code to read files and simple data into the engine. This got me thinking about how I should implement a file management system. After a bit of googleing I came across the Unreal Package format, and boy does it look like the perfect one. I think it's good because the way how it allows you to separate different assets into different packages and allow something like a level to reference the different packages. I was just wondering, is this possible with C#? Because the built-in serialization API in .NET does not seem to support any form of this, only reading and writing to a single file.

    Read the article

  • Confusion about Rotation matrices from Euler Angles

    - by xEnOn
    I am trying to learn more about Euler Angles so as to help myself in understanding how I can control my camera better in the game. I came across the following formula that converts Euler Angles to rotation matrices: In the equation, I could see that the first matrix from the left is the rotation matrix about x-axis, the second is about y-axis and the third is about z-axis. From my understanding about ordinary matrix transformations, the later transformation is always applied to the right hand side. And if I'm right about this, then the above equation should have a rotation order starting from rotating about z-axis, y-axis, then finally x-axis. But, from the symbols it seems that the rotation order start rotating about x-axis, then y-axis, then finally z-axis. What should the actual order of the rotation be? Also, I am confuse about if the input vector, in this case, would be a row vector on the left, or a column vector on the right?

    Read the article

  • How do I properly center Nifty GUI elements on screen?

    - by Jason Crosby
    I am new to JME3 game engine but I know Android XML GUI layouts pretty good. I have a simple layout here and I cant figure out what is wrong. Here is my XML code: <?xml version="1.0" encoding="UTF-8"?> <nifty xmlns="http://nifty-gui.sourceforge.net/nifty-1.3.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nifty-gui.sourceforge.net/nifty-1.3.xsd http://nifty-gui.sourceforge.net/nifty-1.3.xsd"> <useControls filename="nifty-default-controls.xml" /> <useStyles filename="nifty-default-styles.xml" /> <screen id="start" controller="com.jasoncrosby.game.farkle.gui.MenuScreenGui"> <layer id="layer" backgroundColor="#66CD00" childLayout="center"> <panel id="panel" align="center" valign="center" childLayout="center" visibleToMouse="true"> <image filename="Textures/wood_floor.png" height="95%" width="95%"/> <panel id="panel" align="center" valign="center" childLayout="center" visibleToMouse="true"> <text text="test" font="Interface/Fonts/Eraser.fnt"></text> </panel> </panel> </layer> </screen> Everything works well until I get to displaying the text. I have tried different alignments and tried moving the text into different panels but no matter what I do the text is never in the center of the screen. It's always in the upper left corner, so far I can only see the lower right part of the text. How can I center the text element in the center of the screen?

    Read the article

< Previous Page | 12 13 14 15 16 17  | Next Page >