Search Results

Search found 21 results on 1 pages for 'honza'.

Page 1/1 | 1 

  • Learning to program in C (coming from Python)

    - by Honza Pokorny
    If this is the wrong place to ask this question, please let me know. I'm a Python programmer by occupation. I would love to learn C. Indeed, I have tried many times, but I always get discouraged. In Python, you write a few lines and the program does wonders. In C, I can't seem to be able to do anything useful. It seems to be very complicated to even connect to the Internet. Do you have any suggestions on what I can do to learn C? Are there are any good websites? Any cool projects? Thanks

    Read the article

  • When to decide to introduce interfaces (pure abstract base classes) in C++?

    - by Honza Brabec
    Assume that you are developing a functionality and are 90% sure that the implementation class will stay alone. If I was in this position in Java I would probably not use the interface right now to keep the things simple. In Java it is easy to refactor the code and extract the interface later. In C++ the refactoring is not always so easy. It may require replacing values with smart pointers (because of the introduction of polymorphism) and other non-trivial tasks. On the other hand I don't much like the idea of introducing virtual calls when I am 90% sure they won't be needed. After all speed is one of the reasons to prefer C++ over simpler languages.

    Read the article

  • Keyboard Layouts Plugin forgets settings, unable find workaround

    - by Honza Javorek
    I use Xubuntu. As everyone knows, Keyboard Layouts Plugin is very, very buggy and it still forgets my settings. It drives me crazy - I have to set them again and again every time I wake up or turn on my laptop. So I found a solution - put into my .bashrc this: setxkbmap -option '' -option grp:alt_shift_toggle cz,us -variant querty That should set my toggle to Alt+shift and my layouts to Czech QUERTY and plain US English as a second one. Voilà, that seems to work! I could use Keyboard Layouts Plugin only as an indicator, that's okay. However, it doesn't work well. The problem is that it ignores -variant setting. More or less. In Keyboard Layouts Plugin I actually see Czech QUERTY selected, but in reality my keyboard types QUERTZ. That's insane :-( Could anyone help, please?

    Read the article

  • HP 625 with an ATI HD4200 crashes when watching videos on websites

    - by Honza
    I have installed 11.10 on HP 625 (graphic card ATI/AMD Radeon HD4200), everything looks normal but if I see videos on websites (youtube, stream.cz, or similar), the whole Ubuntu crashes. I have installed Catalyst 11.11 from AMD sites (according to this http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide#Installing_Catalyst_Manually_.28from_AMD.2FATI.27s_site.29) but Ubuntu still crashes. Any idea how to solve this really annoying problem?

    Read the article

  • Is there a way how to customize my keyboard layout in Xubuntu in a graphical way (by clicking)?

    - by Honza Javorek
    Possible duplicate, but I really couldn't find a solution. I would like to adjust my US keyboard layout, e.g. to add possibility to type some special characters on combination of right Alt + another character, etc. Moreover, my arrow up is dead, so until I buy another keyboard, I'd like to use my right shift as my arrow up, ASAP. However, there seems to be no way how to edit my keyboard layout easily in Xubuntu :( I found no editor and I really don't want to spend years in some configuration files and terminal (not that I can't, but I really really don't want). KLE - the only editor I could find, but no installation guide, no package, no PPA, no idea how to make it working (and uninstallable if not needed one day) Editor in Ubuntu - apparently not present in Xubuntu I found several tutorials how to change the layout, but they all seems to be complicated and not easy to follow. I don't want to spend a weekend in terminal or so, I am looking for an app to launch, make some clicking, finish my work by hitting Save button and - done! Please, is there such solution? For humans?

    Read the article

  • ClickHandler on an existing element in GWT

    - by Honza Pokorny
    I have an HTML document. In that document, there is an element (like button, div, a) with an ID. I know I can use: Document.get().getElementById("id"); to find the required element in the HTML file. How can I add a Click handler to it? ClickHandlers only seem to be available on the Button class. Thanks

    Read the article

  • Create two separate windows in terminal

    - by Honza Pokorny
    Picture a terminal. There are two windows inside that terminal. One on top, one on bottom. The top one is much bigger. The top one receives asynchronous updates. The bottom one is for user input. It would work almost exactly the same as vim - the text editor. I'm writing this in Python. I'm guessing you would do this by using curses, but I'm not sure if it's possible.

    Read the article

  • Installing a Python program on Linux

    - by Honza Pokorny
    I wrote a Python program. I would like to add to it an installation script that will set up everything necessary - like desktop icon, entry in the menu, home directory file, etc. I'm working on Linux (ubuntu). When a Python program is installed, what needs to happen in general? I know that it probably depends on the nature of the program. Can you give me some general ideas? Or, point me in the right direction? I have no idea how to look for this on Google. Thanks

    Read the article

  • How to create contexts in shoulda macros

    - by Honza
    Asking this question again with smaller code sample: # this is a dummy shoulda macro that creates a context def self.macro_context context "macro" do yield end end # i am expecting this test to fail within the macro context context "some context" do macro_context do should "test" do fail end end end So what I would expect is to see: 1) Error: test: some context macro context should test. (TestClassName) But I am getting only this: So what I would expect is to see: 1) Error: test: some context should test. (TestClassName) Any idea what am I doing wrong?

    Read the article

  • Custom Classes Passed from Service to a UI threads via AIDL

    - by Honza Pokorny
    I have a service that regularly queries a web server for new messages. The service stores the new messages in an arrayList. These messages are implemented using a custom class, storing all kinds of metadata (strings and longs). An activity then connects to this service to retrieve those messages and display them to the user. I have an .aidl file that describes the interface that the service exposes. package com.example.package; interface MyInterface { List<Message> getMessages(); } The Message class extends the Parcelable class which should allow for the IPC transfer. The problem is this: Eclipse gives me an error saying that the type of List<Message> is unknown. Any imports are marked as invalid. Ideas? Thanks

    Read the article

  • How to get absolute paths after vpath matching in make?

    - by Honza
    I have a makefile that depending on some properties sets vpath and generates a list of source files into one variable. I need to run the makefile without compiling anything (the compilation is actually handled by a different makefile) and just see to which real files the filenames get matched depending on the vpath settings.

    Read the article

  • Creating a context in custom shoulda macro does not work.

    - by Honza
    I have a custom should macro in my test_helper.rb which looks like this. def self.should_require_login(actions = [:index]) if (actions.is_a? Symbol) actions = [actions] end context "without user" do actions.each do |action| should "redirect #{action.to_s} away" do get action assert_redirected_to login_path end end end if block_given? context "active user logged in" do setup do @user = Factory.create(:user) @user.register! @user.activate! login_as(@user) end yield end end end I would like to use it like this: should_require_login(:protected_action) do should "do something" do ... end end And I am expecting the "do something" test to run in the "active user logged in" context, but the test executes in the top context, like the "active user logged in" context never existed and I fail to see the reason why.

    Read the article

  • Custom Item in ListActivity on Android

    - by Honza Pokorny
    Hello everyone, I've spent hours reading through the SDK reference, googling and reading tutorials - but I still can't figure it out. I would like to know how to create a custom list item in the ListActivity widget on Android. Something similar to a Twitter client interface. Each list item has different types of text, possibly an icon, etc. Does anyone know of any resources that would help me understand the process of creating something like that? Any guidance would be appreciated. Thanks

    Read the article

  • When exactly is constructor of static local object called?

    - by Honza Bambas
    Say we have a code like this: Some class { Some() { // the ctor code } }; Some& globalFunction() { static Some gSome; return gSome; } When exactly 'the ctor code' is executed? As for normal static variables before main() or at the moment we first call to 'globalFunction()'? How is it on different platforms and different compilers (cl, gcc, ...) ? Thanks -hb-

    Read the article

  • Best programming aids for a quadriplegic programmer

    - by Peter Rowell
    Before you jump to conclusions, yes, this is programming related. It covers a situation that comes under the heading of, "There, but for the grace of God, go you or I." This is brand new territory for me so I'm asking for some serious help here. A young man, Honza Ripa, in a nearby town did the classic Dumb Thing two weeks after graduating from High School -- he dove into shallow water in the Russian River and had a C-4/C-5 break, sometimes called a Swimming Pool break. In a matter of seconds he went from an exceptional golfer and wrestler to a quadriplegic. (Read the story ... all of us should have been so lucky as to have a girlfriend like Brianna.) That was 10 months ago and he has regained only tiny amounts of control of his right index finger and a couple of other hand/foot motions, none of them fine-grained. His total control of his computer (currently running Win7, but we can change that as needed) is via voice command. Honza's not dumb. He had a 3.7 GPA with AP math and physics. The Problems: Since all of his input is via voice command, he is concerned that the predominance of special characters in programming will require vast amount of verbose commands. Does anyone know of any well done voice input system specifically designed for programmers? I'm thinking about something that might be modal--e.g. you say "Python input" and it goes into a macro mode for doing class definitions, etc. Given all of the RSI in programmer-land there's got to be something out there. What OS(es) does it run on? I am planning on teaching him Python, which is my preferred language for programming and teaching. Are there any applications / whatevers that are written in Python and would be a particularly good match for engaging him mentally while supporting his disability? One of his expressed interests is in stock investing, but that not might be a good starting point for a brand-new programmer. There are a lot of environments (Flash, JavaScript, etc) that are not particularly friendly to people with accessibility challenges. I vaguely remember (but cannot find) a research project that basically created an overlay system on top of a screen environment and then allowed macro command construction on top of the screen image. If we can get/train this system, we may be able to remove many hurdles to using the net. I am particularly interested in finding open source Python-based robotics and robotic prostheses projects so that he can simultaneously learn advanced programming concepts while learning to solve some of his own immediate problems. I've done a ton of googling on this, but I know there things I'm missing. I'm asking the SO community to step up to the plate here. I know this group has the answers, so let me hear them! Overwhelm me with the opportunities that any of us might have/need to still program after such a life-changing event.

    Read the article

  • A short but intense GCC Gathering in London

    - by user817571
    About one week ago I joined in London many long time GCC friends and acquaintances for a gathering organized by Google (in particular I guess should be thanked Diego and Ian). Only a weekend, and I wasn't able to attend on Sunday morning, but a very good occasion to raise some issues in a very relaxed way, in particular those at the border between areas of competence, which are the most difficult to discuss during the normal work days. If you are interested in a general overview and some notes this is a good link: http://gcc.gnu.org/wiki/GCCGathering2011 As you may easily guess, the third topic is mine, which I managed to have up quite early on Friday morning thanks to the votes of some good friends like Dodji (the ordering of the topics resulted from democratic voting on Friday evening!). I learned a lot from the discussion: for example that certainly the new C++11 'final' should be exploited largely in the c++ front-end; the various reasons why devirtualization can be quite trick (but I'm really confident that Martin and Honza are going to make a good progress also basing on a set of short testcases which I promised to collect); that, as explained by Ian, the gold linker already implements the nice --icf (Identical Code Folding) facility, which some friends of mine are definitely going to like (however, see: http://sourceware.org/bugzilla/show_bug.cgi?id=12919). I also enjoyed the observations made by Lawrence, where he remarked that in C+11 we are going to see more pointer iterations implicitly produced by the new range-based for-loop and we really want to make sure the loop optimizers are able to deal with those as well as loops explicitly using a counter. All in all, I really hope we are going to do it again!

    Read the article

  • VIM with iA Writer type formatting?

    - by Ambidex
    I've been Googling for a while now. I would like to have iA Writer-like (or a bit like StackExchange) formatting in Vim. Since I love the way it formats my texts, but I'm constantly pressing "w" to skip words because my experience with Vim. I would love to be able to have the same smart formatting in Vim. I did found a nice Vim plugin for getting Vim to toggle to big and clean font: https://github.com/honza/writer.vim But this still does not enable me to use the formatting: # Header 1 ## Header 2 *underline* **strong** etc... Besides all this above, I would not mind to have Vim like shortcuts in my iA writer app if it would not be possible to implement iA formatting in Vim. Edit: After a while of even more searching, I found out this type of formatting is called Markdown. I am starting to think there isn't really a good way to directly edit a Markdown file in Vim, because Vim is not able to make things display like that? I would really like to be able to use the movement shortcuts in combination of the nice formatting of Markdown and how it is displayed in iA Writer.

    Read the article

1