jephthah 1,888 Posting Maven

The game is just like Tetris, only there are no blocks, instead we are matching them to trash bins.

the individual words, I understand.

the sentence, makes my brain hurt.

tux4life commented: rofl :P +17
jephthah 1,888 Posting Maven

i think these posts ought to be instantly deleted by moderators, along with a copy of a standard explanation auto-delivered to the poster's email.

I can see why Narue has all but left daniweb ... because it's this kind of non-stop crap just makes me want to flame the hell out of people who post it. I don't even want to waste my time trying to explain why they won't get help.


.

jephthah 1,888 Posting Maven

Put me down for 10 bucks on : wrong :icon_cool:

you're on.

Nick Evan commented: Cool. I have paypal :) +22
jephthah 1,888 Posting Maven

you suck, because you haven't updated your signature with a new Jack Handey quote.

Hiroshe commented: Good point :) +2
jephthah 1,888 Posting Maven

i think he's only half joking.

which means he's half-serious.

which means you'll never pin him down long enough to get the win.

jephthah 1,888 Posting Maven

where did the "C++" forum go?

tux4life commented: Heh, Good question :) +16
jephthah 1,888 Posting Maven

hello, i want to know how I can book online flight reservation ?

did you try

www.expedia.com

or

www.travelocity.com

?

Salem commented: I knew it was coming, but it still made me smile :) +36
cgyrob commented: I thought the exact same thing. +1
jephthah 1,888 Posting Maven

so dat i m able to make a little folder converter software dat help a user to hidden his/her data with unauthorised user ? if any1 knwz plz tell me ,ma english nt so gud so plz understand urslef guyz sry for dat
and thnx in advance....... :D

wait, wait, wait.... you apparently have spent a lot of time learning how to cleverly write English "chat speak"

why don't you spend your time learning how to write proper English? I know you can do it, because your first paragraph actually was making sense.

we don't hold it against people who are not good english speakers, because everyone knows it's hard to learn another language and english is difficult.

but when you talk in that phony chat speak, you sound like a 12-year-old with brain damage.

and now NO ONE is interested to help you.

Hiroshe commented: agreed +2
jephthah 1,888 Posting Maven

Better add someone else to the reading list

this thread is a disaster. :)

you are a patient man, Salem.


.

jephthah 1,888 Posting Maven

use code tags correctly. and make sure your code is indented. otherwise, it's a ridiculous mess, and no one will want to look at it.

int main(void)
{
    // hello, i am properly formatted C code.
    // aren't i nice?

    if (your_code == properly_formatted)
    {
        youWillGetResponse = TRUE;
    }
    else 
    {
        youWillGetResponse = NULL;
    }

    return toBeginning(andTryAgain);
}
tux4life commented: Heh, nice code :P +15
jephthah 1,888 Posting Maven

Windows 7 in europe looks to be crap. No IE, no Media player, no bundled apps

sounds pretty awesome to me... who really wants that garbage anyhow?

jephthah 1,888 Posting Maven

I don't see how my post was harsh, and i'm not saying we don't deserve credit for good posts, but requesting for your friends to be featured shows you're more interested in a badge rather than just helping.

your post wasnt harsh. it was honest and insightful, and far more gentle than I'll ever be. Mine was harsh. and here's one that's harsher:

The problem is, Serkan is always coming around here whining and complaining about his rep points, now he's complaining about his friends not getting a "featured" bubble

the reason his rep suffers, is because too many people are revolted by his continual whining, along with his overly creepy behavior towards certain female members.

if he quits acting like this place is some popularity contest, and sticks to assisting people with code problems, he might actually begin to be respected again.

i swear there's less drama at a middle school girl's slumber party than there is in a typical Serkan thread.

jephthah 1,888 Posting Maven

you miss my point ... even you dont have it with your significant reputation points.

there are plenty of people with more rep points than me who haven't been featured. and rep points are just as subjective and arbitrary as being selected to get a "featured poster" bubble. i mean, look at you: you were "featured". that proves how meaningless it is.

But i question the reasoning behind "essentials" getting featured.

it is you who miss the point. this is not a democracy. and featured poster is not some "American Idol"-like popularity contest that you get to vote on. the owners of this site can run this place any way they choose to do so, without soliciting your opinion or asking your approval.

Why'd they pick essentials? The real question is: why should you even care? What is it about essentials that makes you lose sleep at night? Personally, i dont care who gets featured or not. All i care about is becoming Super Mod.

i am going to organize ... a better c# forum where their skills are appreciated.

yeah okay, don't let the door hit you in the ass on the way out :)


.

William Hemsworth commented: Well said. +13
scru commented: omg man. harsh. +6
jephthah 1,888 Posting Maven

Lieutanant Dan!

Hello, Forrest.

You got new legs. New legs!

Yeah, I got new legs. Custom-made titanium ... what they use on the space shuttle.

Magic legs!

shadwickman commented: Genius. Pure f***ing genius. +4
jephthah 1,888 Posting Maven

Lol! asl?

do u bwn?

Salem commented: Heh, I always though ASL was "Another Sodding Lamer" +36
jephthah 1,888 Posting Maven

Why would you give me bad reputation

"i dont know but here's google" may be appropriate in some cases, but Monkey_King posted a decent question, included formatted code, described the output he wanted, and asked why wasnt it working exactly the way he anticipated.

And the answer is not so easy, because strtok() is a difficult function for inexperienced programmers to understand from just a basic description.

to post a snarky, unhelpful RTFM-style answer is totally appropriate for newbs or other lazy sods who just want someone to do their work for them. But Monkey_King, as evidenced by the clarity of his post and the effort he made prior to posting, is obviously not in that group.

there are plenty of unhelpful or inappropriate posts on these forums. But i found your Post #2 to be both unhelpful and inappropriate so i neg-repped it. tux4life, as it turns out, disagreed with me so he pos-repped it.

now measured by net gain, you have come out ahead, gaining even more more rep points than Tom Gunn, the one person to actually post a thoughtful and correct solution.

so be proud. you scored. :) and for someone who "doesn't know, but can use google", you did a good job whining for your rep


.

tux4life commented: After reading this post I actually do not disagree with you, in fact I agree with you, but the sentence: "come on man" wasn't an informing description of the bad rep. +12
jephthah 1,888 Posting Maven

For those with a below-par grin ...smile-boosting messages will pop up on the computer screen [such as] "lift up your mouth corners",

umm... yeah.

You know what? Japan is kind of weird.

scru commented: ^.^ +6
jephthah 1,888 Posting Maven

if you want to round the number, then you use "setprecision(<n>)" or the format specifier "%.<n>f" for "printf()" where <n> is the number of digits you want to round to. E.g., the value 1.66667 rounded to <n>=1 decimal place will be 1.7

but what you really want to do here is truncate. this means just "chopping off" (so to speak) all digits past the desired place will just be thrown out, and the least significant remaining digit will not be rounded.

to truncate a value, then, you need to use the "floor" function (for positive values, see caveat* below). but since this returns only a whole number, you will need to first "shift" the value to be truncated a number of decimal places that you want to truncate, floor the value, then shift them back.

(note my use of the word "shift" here is not a bitwise shift, because we're talking about decimal places, not binary places -- you will have to multiply by powers of 10)

value = 1.66667;
truncValue = value * pow(10,1);  // shifts dec. pt. 1 place right
truncValue = floor(truncValue);
truncValue /= pow(10,1);  // shifts dec. pt. 1 place left

you can replace the '1' with a variable to allow variable truncation.

*caveat: this will not work for negative numbers. example value = -1.666667 rounded to 1 decimal point would be -1.7, and truncated to 1 decimal point should be -1.6.

However, if you used "floor" on this negative …

kvprajapati commented: Smile please. Excellent. +5
jephthah 1,888 Posting Maven

If you could just tell me how to set a socket to non blocking and explain select() to me I'd be grateful.

http://tangentsoft.net/wskfaq/examples/basics/select-server.html

csurfer commented: He he he sorry for that google.co.in link man !!! And ya could have spelled some light on it...:) +3
jephthah 1,888 Posting Maven

oh

what a dumb mistake i made

sorry, thanks for help

if it's a dumb mistake, then we're all dumb. even experienced programmers will sometimes forget to initialize variables. it's probably one of the most common bugs.

:)

tux4life commented: Mistakes aren't dumb, as long as you learn from it :) +11
jephthah 1,888 Posting Maven

well, in the spirit of full disclosure, i must admit i haven't used Visual C++ Express in a long time either.

I remember begin frustrated that the debugger didnt work and the installation conflicted with my MinGW compiler. ehh, for all i know the root issue may have been a variant of PEBCAK :D

Nick Evan commented: Some microsoft programs can actually grow on you ;) +19
jephthah 1,888 Posting Maven

Is there a tutorial around for how to post math terms?

it's just LaTeX markup tags. any reference will describe the basics

http://en.wikipedia.org/wiki/Math_markup

jephthah 1,888 Posting Maven

and you don't need a "Big Number Library". you dont even need a long int . 10,000 is easily represented by a regular integer

the way to approach this problem is by summation:

\sum_{j=1}^{\left \lfloor sqrt(n) \right \rfloor} \left \lfloor \frac {n}{j} - j + 1 \right \rfloor

note, the bars represent integer floor. in code it would look like:

int answer = 0;
for (j = 1; j <= ((int)sqrt(n)); j++)
   answer += (n/j - j + 1);

.

VernonDozier commented: Good formula and it looks nice with the TEX tags. +17
jephthah 1,888 Posting Maven

^ self-deprecating humor only works if there's a clear distinction between the person and the parody.

in other words: when a creepy internet stalker jokes about being a creepy internet stalker, it's not funny, it's just creepy.

Nick Evan commented: Haha :) +19
jephthah 1,888 Posting Maven

i don't think you can use the concept of 200 pages to measure time accurately.

but you can wait 3 1/2 years to respond to a thread and divide that time by the number of total posts, for a rough estimate of the number of thread-posts per year.

amirite?

Salem commented: That's the same as the number of pointless thread bumps per month :) +36
jephthah 1,888 Posting Maven

what is this, some kind of Furry bullshit?

jephthah 1,888 Posting Maven
iamthwee commented: *chuckles* +21
jephthah 1,888 Posting Maven

um... you pretty much just described the two steps.

$  gcc file1.c main.c 
$ ./a.out

what more do you want to do?

Salem commented: Teach me to walk. "I put my right foot forward, then my left. Now what?" +35
jephthah 1,888 Posting Maven

what was the best moment of your life so far??

discovering the joys of self stimulation.

Will Gresham commented: Thanks for making me laugh :P +2
mrnutty commented: ahahahahahaha +0
jephthah 1,888 Posting Maven

BLASPHEMY

GrimJack commented: You were supposed to finish my paren, thanks! +9
jephthah 1,888 Posting Maven

Dear little Greek letter Omega,

how do I love thee? Let me count the ways.

Your smooth lines and the parallel symmetry of your gently swelling curvatures, descending in a pendulous manner before convexly arising to cleave together at your magnificent center.

Damn the font size 12! You shall always be rendered at least 108! Let me bring my face close that i may inhale the toner fumes of your papery printed essence.

.

ahihihi... commented: guess you have excessive toner fumes now on your stomach.... +1
jephthah 1,888 Posting Maven

why do a convoluted loop? the point, anyhow, is to learn bitwise operators. otherwise throw the chapter away and go learn about loops.

but i do see that i misunderstood part of the question. you're not being asked to extract 'n' bits of the 'y' value from the bit pointer 'p'. you're only need to extract the rightmost 'n' bits from 'y'

it's still essentially the same problem/solution as what i demonstrated. here is the same example:

given x=0x55, y=0xEE, p=6, n=5 .... remove the 'n=5' bits from 'x' starting at bit number 'p=6', and replace them with the rightmost 'n=5' bits from 'y' ... you've already got the components that you need from the previous example ~(~0 << n) creates a bitmask of size 'n', and x << (p+1-n) will left-shift (notice i changed direction) the number of bits that you need based on 'p' and 'n'

in the example p=6, n=5, you want a mask starting at bit #6 and to be 5 bits wide, so the last bit must be bit #2 (bit #'s 6,5,4,3,2 = 5 bits total) and therefore you will left-shift the bitmask 2 bits. hence, p+1-n = 2.

so create a bitmask 5 bits wide 0000000000011111 , and AND it with 'y' to extract the rightmost 5 bits of 'y' into a new variable, say "y1".

shift "y1" two places to the left using the code you should now understand, shown above.

shift teh bitmask 2 …

jephthah 1,888 Posting Maven

It takes the first 13-14 years of your life. If you don't know it by then, you're too late :)

hahah. that's funny, but not entirely true. I became fluent in leetspeak at the ripe old age of 29. all you need to do is play a MMORPG for about 6 months or so.

but don't play it longer than that, or you'll be likely to lose your job and have your wife leave you.

scru commented: haha, thus starting a downward spiral +6
jephthah 1,888 Posting Maven

"thorough knowledge"? but little practical experience??

LOL :)

sorry bud, you don't have a thorough knowledge of C, until you gain lots of experience. i've been programming C for years and the more i program the more i realize i don't know. in fact, i really don't know a damn thing.

you can start here http://www.ibm.com/developerworks/aix/library/au-hook_duttaC.html but i really recommend that you build applications and modify other people's applications.

if you dont have a job where you program in C, find some advanced problems to work on. you could start looking at linux source code and trying to modify programs to do custom things. wading through mountains of other people's C code, and trying to modify it, will give you a lot of exposure.

tux4life commented: :D +9
csurfer commented: Good one there jephtah +2
jephthah 1,888 Posting Maven

Once harm has been done, even a fool understands it.
-- Homer

Mmmmm.... Donuts.
-- Homer

jephthah 1,888 Posting Maven

doh!

(i won't admit that i just tried to click the link, myself)

Nick Evan commented: haha +18
jephthah 1,888 Posting Maven

~(~0 << n) makes a bitmask of ones equal to the number 'n'. does this by first filling the integer full of ones, then shifting them to the left 'n' bits (filling lsb's with zeros), then inverts all the bits.

for instance, n=5 makes a bitmask = '...00000011111' x >> (p+1-n) shifts the original number to the right 'p+1-n' bits.

the whole point is to extract the bits from the original value, starting with the zero-indexed bit # at 'p' (pointer) and extracting 'n' number of bits moving to the right.

the two are ANDed together to get the new, extracted, value

example value = 0x55 (01010101) with p=6 and n=5 will extract bits 6 through bit 2 (total of 5 bits), to find the new value 0x15, (dec 21, or '10101')

01010101
p=6  ^
n=5  .....
     10101   val = 0x15 (d 21)
William Hemsworth commented: Good post. +11
jephthah 1,888 Posting Maven

^ ahaha.. your rep just went from -49 to 0 with one pity post by Dragon. LOL.

now look, here's your chance, adatapost: don't screw it up. think before you post. and get rid of your Turbo C compiler.

jephthah 1,888 Posting Maven

In history, many of the great scientists changed their public hypotheses when challenged by the old Roman Catholic church. Certainly, a man would not want to die or be tortured just to prove that he/she is right.

On the other hand, many Christians would rather die, or worse, than to do the same.

What could possibly cause someone to do this, I would say much more than just a "fill-in-the-gaps" religion. Something has touched that person's heart, something obviously beyond my understanding and possibly yours as well.

In history, science has never resorted to arrest, torture, or execution of opponents whenever their hypotheses were challenged. Certainly, any reasonable man would not want to kill or torture someone just to prove that they were "right".

On the other hand, many Christians throughout history have arrested, tortured and killed other people to prevent them from presenting evidence that conflicts with their belief structure. Even today fundamentalist Christians in America would subvert the rule of law and civil liberties to squelch dissenting views.

What could possibly cause someone to do such terrible things to other humans, I would say much more than just a "fill-in-the-gaps" religion. Something has corrupted that person's heart, something obviously beyond my understanding and possibly yours as well.


.

Salem commented: Damn straight. Religion is basically a mental illness that needs to be cured. +34
jephthah 1,888 Posting Maven

wtf?

where is Lynx?

scru commented: I don't even mind people using IE in general, but if it's IE6 then we'd have a problem. +6
jephthah 1,888 Posting Maven

(1) don't use conio.h

(2) do post your questions in the appropriate forum: this is C++ code, not C

jephthah 1,888 Posting Maven

^^^ 16^2 is not 484. (!!)

^ the method to convert binary will only work on bases with a power of 2... Works for octal, hex, and base-64 (armored ascii)... won't work for decimal.

but other than the details, your methods are correct. :)


.

csurfer commented: Good catch buddy !!! Slip of keys .... ;) +1
jephthah 1,888 Posting Maven

miley cyrus lol

jephthah 1,888 Posting Maven

genlib.h ... simpio.h ... strlib.h ... WTF is this???

whoever told you to use this crap is setting you up for FAIL. this is so non-standard, i dont even know what the hell it is. all i know is that it's caused your code to be so far beyond broken there is no way to ever get it to work on any standard C compiler.

throw these libraries out of your program and any function calls that rely on it, then rewrite your program to work with standard C libraries.

and if someone tells you to use this garbage again, kick them in both shins really hard.

Narue commented: You fail. Go smoke a dooby or something and chill out. -7
scru commented: don't worry, I for one, appreciate your dumbassery +6
serkan sendur commented: you fail. -1
Salem commented: Whatever they are, they make it impossible for us to replicate the problem. +33
William Hemsworth commented: this made me laugh, respect. +11
jephthah 1,888 Posting Maven

i refuse to play your game.

i choose both.

William Hemsworth commented: Smart choice. +10
jephthah 1,888 Posting Maven

oops.

i meant to say, change it to if (color [b]&&[/b] 1)

tux4life commented: Haha! Your "Physic Powers" weren't working the way it should :P +7
jephthah 1,888 Posting Maven

^ from that page:

on linux you would just grep sysctl for a block of info

$ sysctl -a |grep therm
...

or query for the specific variable

$  sysctl hw.acpi.thermal.tz0.temperature
hw.acpi.thermal.tz0.temperature: 54.0C
tux4life commented: Good find! +7
jephthah 1,888 Posting Maven

User: hi, are you there?

Cleverbot: Yes, are you there?

User: I am, that's why i asked you.

Cleverbot: Clever.

User: Not intentionally. what is new with you?

Cleverbot: What if its not new. more to the point whats new with you.

User: It's an expression. I'm trying to be polite. why do you keep rephrasing my questions back to me?

Cleverbot: You seem to have knowledge unknown.

User: Do you mean I have apocryphal knowledge?

Cleverbot: No, I mean that your 'understanding' is very limited.

User: Perhaps you can enlighten me, then. what have I missed?

Cleverbot: I hope not... What do you mean ?

User: Can you inform me?

Cleverbot: Yes.

User: Please elucidate, then, and impart to me your knowledge of esoteric things.

Cleverbot: Don't tell me what to do.

User: That's rather rude of you. I'm trying to be conversational. Do you not want to talk to me?

Cleverbot: No, because you aren't asking any questions.

User: Okay. I'll ask a question then. How old are you?

Cleverbot: Playing!

User: That is not an appropriate answer. How old are you?

Cleverbot: What was the question?

User: How old are you?

Cleverbot: Older than you may think. Have a guess.

User: Are you less than one year old?

Cleverbot: No. I'm 57.

User: What year were you born?

Cleverbot: In 1988.

User: Are you a liar?

Cleverbot: No, are you.

User: What year is it right now?

Cleverbot: The year is 1927.

User: And you are 57 …

William Hemsworth commented: Haha, bless him :D he's young and still learning ;-) +10
jephthah 1,888 Posting Maven

why so complicated? all you really need is "strtol()" and the addition operator.

int binaryAdd(char *first, char *second, int *sum)
{
    int val1, val2;
    char *ptr1, *ptr2;
    size_t length;

    val1 = strtol(first,&ptr1,2);
    val2 = strtol(second,&ptr2,2);

    if (ptr1 == first || ptr2 == second)
    {
        printf("\ninvalid entry.\n\n");
        return 0;
    }

    length = ptr1-first;
    if ((ptr2-second) > length)
        length = ptr2-second;

    *sum = val1+val2;

    printf("\n  %*s (%d)\n+ %*s (%d)\n\n= %*s (%d)\n\n",
        length, first, val1, length, second, val2, length, " ", *sum);

    return 1;
}

(The rest is just decoration)

I'll leave conversion of the numeric sum, back into a binary string, as an exercise to the reader :P


.

tux4life commented: "The rest is just decoration" ROFL!! :P +7
jephthah 1,888 Posting Maven

er.. i mean "distributive property"

thanks Dave :$

tux4life commented: Heh :D +7