Search:

Type: Posts; User: MadCow108; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.11 seconds.

  1. Replies
    5
    Views
    315

    [SOLVED] Re: how float variable store in memory

    the wiki articles describes the common representation:
    http://en.wikipedia.org/wiki/Floating_point

    but how exactly its done depends on the platform, there are plenty variations.

    with gdb you...
  2. Re: [C++] Efficient symmetric sparse matrix storing

    seems like you want the dok (dictionary of keys) or lil (row based linked list) format and then convert it to a more efficient one when you are done building it for processing.
    there are plenty of...
  3. Replies
    2
    Views
    609

    Re: creating a temporary file in python3

    its better to be explicit about the encoding:

    a.write('hello temp world'.encode("UTF-8"))
    just casting to bytes will fail if the string does not only contain ascii (which it can in python3).
  4. Thread: RAM Speed

    by MadCow108
    Replies
    7
    Views
    677

    Re: RAM Speed

    _mm_prefetch will explicitly pull an adress range into the cache, _mm_stream will bypass caches.
    also note that memcpy needs cpu cycles, depending on the implementation single threaded copying can...
  5. [SOLVED] Re: Vim - use CtrlP with the same directory after opening a file ...

    see the help of ctrlp:
    g:ctrlp_root_markers for the root modes, most useful is probably the 'r' which will search for the root of a version control
    there is also g:ctrlp_root_markers to define own...
  6. Replies
    4
    Views
    596

    Re: Compile x64/i386 binaries

    you can use a VM but you don't need to.
    chroots have the same effect but without virtualization overhead.
  7. Replies
    4
    Views
    596

    Re: Compile x64/i386 binaries

    cross compiling between i386 and amd64 is best done from a amd64 system with a i386 chroot.
    you can cross compile directly via -m32 but its more error prone and can be difficult if the lbiraries you...
  8. Re: Similarity Comparison within words (Python)

    sklearn might be the best tool to tackle the problem.
    its already has a lot of components centered around text similarity analysis (which, is as already said, a complicated topic, I recommend you go...
  9. Re: Python subprocess to end script if error is returned

    or subprocess.check_call which will throw an exception on error
  10. Re: Problem on running C written in OPENMP in UBUNTU 12.04

    add -fopenmp to your gcc call
  11. Thread: eglibc?

    by MadCow108
    Replies
    7
    Views
    534

    Re: eglibc?

    can't help with the problem, but I can explain was eglibc is.

    eglibc is a fork of glibc. It was done because glibc developers were not so friendly towards embedded platforms and some developers...
  12. Re: Build Matplotlib 1.2.1 on Python 3.2, can't find Python.h?

    I forgot you still need tk8.5-dev for the python3 tkagg
    a python3 gtk backend is not available (py3 gtk exists but matplotlib 1.2.1 does not support it)
    a wx backend is not possible yet as (stable)...
  13. Re: Build Matplotlib 1.2.1 on Python 3.2, can't find Python.h?

    the problem is most likely just a missing python3-dev
    you don't get that from apt-get build-dep because the 12.04 package has no python3 support (it has in 13.04)


    should be sufficient to build...
  14. Re: Diff - Not outputting the expected difference between two text files

    this is still quite fast without needing an extra package

    sort -u b > tmpb; sort -u a | sort -m tmpb tmpb - | uniq -u > out
    it might outperform combine if you have enough cpu cores and a large...
  15. Re: Diff - Not outputting the expected difference between two text files

    so you want the complement of the two files? that can be done with sort and uniq:
    # lines in a but not in b
    sort b b a | uniq -u
  16. Re: Problem with concurrency on named pipes (threaded daemon)

    I forgot about how fifos work, yeah closing it is probably right then. the read should also work then.
    You may be better of using sockets if you want to serve multiple clients at the same time.
    ...
  17. Re: Problem with concurrency on named pipes (threaded daemon)

    the code is full of race conditions, so what you get as a result is pretty much undefined.
    you need to synchronize all global variables (or make them local) and make sure everything stays in scope...
  18. Re: [Python] Too repetitive... or maybe I'm too used to Lisp macros...

    how about:


    class MyClass(object):
    def add_attr(self, attr, n):
    new = getattr(self, attr, 0) + n
    setattr(self, attr, min(max(new, 0), 100)
  19. Thread: My RNG.

    by MadCow108
    Replies
    6
    Views
    637

    Re: My RNG.

    here is an interesting article about hardware random number generators and how they work in linux:
    http://lwn.net/Articles/525204/

    there are measures in place to ensure the generator is not...
  20. Replies
    10
    Views
    2,804

    Re: How to use gcc option -fwhole-program

    are you using the gold linker?
    adding fwhole-program is not necessary with that linker and its also discouraged to do so.
    newer documentation has the section removed from the manual (with bad...
  21. Replies
    3
    Views
    602

    Re: Find and replace in python 3.2?

    python is a little overkill for that, a simple sed -e "s/old/new/" file would do that too, also you should use update-manager -d or do-release-update for that

    but if you want to do it in python...
  22. Replies
    2
    Views
    273

    Re: Valgrind error report question

    --db-attach=yes and --track-origins=yes are two useful flags which might help

    also build your program with debugging information (-g) for better reports
  23. Replies
    5
    Views
    762

    Re: [C++] Memory/executable size question

    it is correct that enums are not preprocessed, they only represent integers which are (in x86 at least) directly representable in machine code, so no explicit load from memory is required and they...
  24. Replies
    9
    Views
    1,035

    Re: gcc -E main.c

    digging through the source to find what the numbers mean is a pointless waste of time. Why do you want to know what the numbers represent in gcc?

    its just an arbitrary representation of some...
  25. Replies
    9
    Views
    1,035

    Re: gcc -E main.c

    you probably have to look throught the gcc souce code to see what exactly it means, its not relevant for any purpose but writing compiler frontends.
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4