Search:

Type: Posts; User: olbas

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,257

    terminal emulator issue - FreeBSD

    OS: FreeBSD 5.2.1
    X: 4.3.0_14

    Hey, I'm having trouble diagnosing the issue I'm experiencing, could someone please point me in the right direction.

    I'm trying to display the following...
  2. Thread: Window

    by olbas
    Replies
    4
    Views
    1,115

    Assuming it's being ran in Windows, open up a...

    Assuming it's being ran in Windows, open up a shell, navigate to the directory you're saving the executeable in and run the program through that session.....

    just to save typing the user input...
  3. Replies
    2
    Views
    983

    expand(int s[]) 3-3 knr

    I'm having trouble with the code below. Basically copying s[i] into a int temp_one variable if it meets the criteria set in the loops found in expand. I was hoping that I could rely on the ASCII...
  4. Thread: nested for loops

    by olbas
    Replies
    2
    Views
    1,707

    for(a=0;a

    for(a=0;a<4;a++)
    {
    for(b=0;b<4;b++)
    {
    if((array[a][b]) != 0)
    {


    // if neighbour is anchor or active acquire and...
  5. Thread: Menuet OS

    by olbas
    Replies
    1
    Views
    1,425

    A very nice OS! Piece o' pie to run from floppy....

    A very nice OS! Piece o' pie to run from floppy. got some very nice applications to, idea for learning ASM I would thing. Which I have to learn to a small degree due to stacks, so I think I might...
  6. Thread: New Theme

    by olbas
    Replies
    160
    Views
    13,389

    On the User CP/Edit signature page, the Smilies...

    On the User CP/Edit signature page, the Smilies and tag strings are overlapping the cream(i think) box surrounding this text input box.
  7. Replies
    17
    Views
    8,328

    Ahh I get that now, (a >> b) right shifts the...

    Ahh I get that now, (a >> b) right shifts the left-most 1-bit n places and returns the value. It doesn't shift all 1-bits.

    This is why people use loops to feed test values and not just a single...
  8. Replies
    11
    Views
    1,422

    Instead of subtracting the current time from the...

    Instead of subtracting the current time from the past time, I used difftime(x,y), which gave me the same result, but seems alot smarter :)

    Calling the program by time is more accurate than...
  9. Replies
    11
    Views
    1,422

    To go with what Prelude mentioned, I'm using bsd,...

    To go with what Prelude mentioned, I'm using bsd, so no win32 here.

    Also, welcome :) Thanks for the alternate method though :)
  10. Replies
    11
    Views
    1,422

    Thanks to you both. Firstly, Thantos thank you...

    Thanks to you both.
    Firstly, Thantos thank you for the code, I chose a different method to calculate the seconds, for anything mroet han seconds, I could always choose to perform the mathematics...
  11. Replies
    11
    Views
    1,422

    Timing a function

    Exercise 2-9 in the knr book asks for a rewrite of an example function, with my version being faster.
    I have written one, and by code alone, I deem it faster.
    My question is, how can I test the...
  12. Replies
    17
    Views
    8,328

    Exercise: Given answer: unsigned...

    Exercise:


    Given answer:


    unsigned rightrot(unsigned x, unsigned n)
    {
    while (n > 0) {
    if ((x & 1) == 1)
  13. Replies
    17
    Views
    8,328

    ok this drove me freakin insane, so i hope i can...

    ok this drove me freakin insane, so i hope i can understand and implement this PITA.

    x ^ (~(~0 << n) << p)
    x = 1234 1234
    n = 8
    p = 16
    ~0 = FFFF FFFF

    Step 1: (~0 << n) = FFFF FF00
    Step...
  14. Replies
    17
    Views
    8,328

    There's a new method :) And it does seem more...

    There's a new method :) And it does seem more conveniant, and also more helpful with keeping each number base in my head.

    sizeof and limits.h haven't been introduced yet, though I am familiar with...
  15. Replies
    17
    Views
    8,328

    Thanks for the last note, specifically because I...

    Thanks for the last note, specifically because I was aware of it, though I was lazy with an explanation, never a good thing, so thanks for bringing this to my attention :)

    In response to your...
  16. Replies
    17
    Views
    8,328

    Well, I struggled (still) with the task. I picked...

    Well, I struggled (still) with the task. I picked the answer off the site, and its below.


    And I've been breaking it up to try and understand.

    (~0 << (p+1))
    complement any 0, and left shift...
  17. Thread: gdb

    by olbas
    Replies
    12
    Views
    885

    You might find lint to be helpful when trying to...

    You might find lint to be helpful when trying to work a bug out.
    Directly from the man page:


    By the time I'm done with lint, there's barely a reason to turn to gdb.
  18. Replies
    13
    Views
    5,497

    Isn't it better to use extra sets of curlies when...

    Isn't it better to use extra sets of curlies when using a multidimensional array. It helps you to keep track of which values are assigned to which array.

    Example:


    int New_Array[2][3] = { { 1,...
  19. Replies
    17
    Views
    8,328

    I see now! Thank you for answering such a lame...

    I see now! Thank you for answering such a lame question :) Appreciated.
  20. Replies
    17
    Views
    8,328

    Bitwise setbits function (knr 2-6)

    /* getbits: get n bits from position p */
    unsigned getbits(unsigned x, int p, int n)
    {
    return (x >> (p+1 -n)) & ~(0 << n);
    }


    This is the example in knr, which is what I have to presumeably...
  21. Thread: 0123456789

    by olbas
    Replies
    25
    Views
    2,664

    Umm will it increase by 3204 each time?

    Umm will it increase by 3204 each time?
  22. Replies
    22
    Views
    6,740

    Very helpful thread! Thanks for the added...

    Very helpful thread! Thanks for the added information.

    Great explanation from Deckard!
    </reincarnation>
  23. Replies
    2
    Views
    2,413

    I thought it should of done, but it just replaced...

    I thought it should of done, but it just replaced every single letter, regardless of input. I've tried it again though (after another little rest) and it's working.

    In regards to the website, I...
  24. Replies
    2
    Views
    2,413

    Ex. 2-4 KnR (2nd ed.) loop && array handling

    Heyyy, I'm on exercise 2-4 in k&r 2nd ed.
    (Its getting kinda funky but I'm keeping with)

    Ex: Write an alternate version of squeeze(s 1, s2) that deletes each character in s1 that matches any...
  25. Thread: 2-d arrays

    by olbas
    Replies
    6
    Views
    1,036

    Learnt something new, ty. :)

    Learnt something new, ty. :)
Results 1 to 25 of 35
Page 1 of 2 1 2