Search:

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

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    10
    Views
    1,095

    [SOLVED] Re: loop indices in C array

    not meaning to be picky and at the risk of confusing the op, but afaik in c the order of execution of statements separated by commas is not defined.


    ----edit----

    oh, hang on, it appears i'm...
  2. Replies
    46
    Views
    7,404

    Re: Beginners Programming Challenge 15

    I'm afraid i've never looked at haskell, but as a fan of stateless programming i should really do so at some stage. People who use it often say it's the bee's knees.
  3. Replies
    46
    Views
    7,404

    Re: Beginners Programming Challenge 15

    Cool :) lots of entries :)

    but none of them from a true beginner :( maybe the problem is too difficult :(

    i'll have a look at them later on today :)
  4. Re: Why been great in math does not necessarily make you a great programmer ?

    Yeah, it's silly syntax which could so easily have been different. In other computer languages it is different too. For example


    # in c
    x=x+1;

    ; in scheme
    (set! x (+ x 1))

    #in c
  5. Re: The bloat we've seen...

    i think my main problem with oop is that it's rather difficult to extract combinational how-to knowledge without making arbitrary decisions.

    an example.

    let's say we have a frying pan and an...
  6. Replies
    62
    Views
    6,777

    Re: Beginner Programming Challenge 14

    okay, here it is: http://ubuntuforums.org/showthread.php?p=9723093

    let me know if i've made a mistake or it's unclear or whatever :)
  7. Replies
    46
    Views
    7,404

    Beginners Programming Challenge 15

    Welcome to the Beginner Programming Challenge 15! woot! (i wonder if you spell it like that).

    Well, i was trying to find something useful that you could actually use in a building block for a...
  8. Re: The Advantages(Criticism?) of Object Oriented Programming/Design

    no, i'm not sure we think like that. unless you allow multiple inheritance and prototyping.

    an example: think of something green. immediately you have a whole hierarchy of green things in your...
  9. Re: Please share your programming technic with us

    ah, the feynman problem solving algorithm :)
  10. Re: (php) Generate 4 random numbers that add up to 100?

    Ferrat gave a good answer on the last page. something like this should do it:



    n1=random()
    n2=random()
    n2=random()
    n4=random()
    weight=100/(n1+n2+n3+n4)
    r1=round(n1*weight)
  11. Replies
    62
    Views
    6,777

    Re: Beginner Programming Challenge 14

    oh, sorry. the next programming challenge will be up soon :)
  12. Replies
    22
    Views
    2,502

    Re: Universal ordinal numbers.

    declining is more than that. for example in german:

    the second star wars film was made in 1982
    der zweite (second, male nominative strongly declined) "krieg der sterne"-film wurde 1982 gedreht
    ...
  13. Replies
    22
    Views
    2,502

    Re: Universal ordinal numbers.

    in a number of languages you have the problem that ordinal numbers decline. this would make the task even more convoluted.
  14. Replies
    21
    Views
    736

    Re: Writing files in PHP and security

    in php:


    <?php

    $fp=fopen("myfile.txt", "x");

    ?>

    will create a file and fail, if the file already exists.
  15. Re: Can someone explain to me how to write a program.

    don't worry about writing your own language for now.

    i'd say that programming nowadays consists of 2 things:
    1/ what you want to do and
    2/ expressing that in a particular language.

    both of...
  16. Replies
    15
    Views
    1,730

    Re: Serious alternatives to PHP

    thinking about php some more, it does have a few interesting reflection shortcuts, which make programming with it a bit easier.

    you can do something like this, for example:



    class MyClass {...
  17. Replies
    15
    Views
    1,730

    Re: Serious alternatives to PHP

    for ruby it's called eruby: http://en.wikipedia.org/wiki/ERuby
    you have to install the eruby package.
    for python it's called python server pages or just psp, you just have to install mod_python...
  18. Replies
    62
    Views
    6,777

    Re: Beginner Programming Challenge 14

    i don't know ruby, but does this actually work as intended? or does x get overwritten in the line


    x = a*x + b*y

    so the result of


    y = c*x + d*y
  19. Replies
    62
    Views
    6,777

    Re: Beginner Programming Challenge 14

    okay, i've now checked it with valgrind and freed all the mallocs :)



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <math.h>

    #define RAD_PER_DEG (M_PI/180)
  20. Replies
    62
    Views
    6,777

    Re: Beginner Programming Challenge 14

    hello again :)

    here's a shortish solution in C. it's been a while since i've done any C programming, and i haven't freed every malloc, so it's a bit of a work in progress.



    #include...
  21. Replies
    49
    Views
    9,333

    Re: Assembly Language - int $0x80

    just to complicate matters further i think i should point out that one school of thought says that a compiler like the gnu compiler collection takes an input in various formats (c, c++, fortran...
  22. Replies
    8
    Views
    329

    [SOLVED] Re: sed help

    one thing worth noting is that the command separator for sed doesn't have to be a '/', so you could instead write it like this:


    sed 's:\(<caption\)[^<]*\(</caption>\):\1\2:g' file.xml >...
  23. Replies
    62
    Views
    6,777

    Re: Beginner Programming Challenge 14

    a small correction. consider the point [-1, 1], which lies on the line y=-x, and so would not be affected by a reflection through y=-1x. multiplied by a scale of -1 this point becomes [1, -1].

    a...
  24. Replies
    62
    Views
    6,777

    Re: Beginner Programming Challenge 14

    i'm quite happy to take nes's entry as a comment. as dv has pointed out, it isn't quite trivial to get it running on an ubuntu system. but it does contain lots of very interesting ideas, for example...
  25. Replies
    9
    Views
    425

    Re: Linked list problem

    well, there are different ways to sort lists. one of the easiest ways would be like this in pseudocode:



    function sortOneItem(aList, start) {
    positionOfLowestItem=start
    for(i=(start+1);...
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4