2.46: Borderline case. You have an interest in alternative explanations for historic events. You are certainly out of the mainstream, but it is still a free country, right?
i'm happy with that. it fits my self-declared agnosticism just fine.
.
2.46: Borderline case. You have an interest in alternative explanations for historic events. You are certainly out of the mainstream, but it is still a free country, right?
i'm happy with that. it fits my self-declared agnosticism just fine.
.
in most countries it will be unimaginable to put in the same ONE plane the most important persons in the country...
yes, that was terrible. condolences. :(
still, as tragic as it was, the same could have theoretically happened in America. the President and First Lady, some senior military and a handful of congressmen could all be on Air Force One. It wouldn't have incapacitated the government over here any more than it did for you there.
the end result is your tragedy was caused by human factors. We like to think our pilots are more competent and less likely to make that error, but on a bad day it could have happened to us.
The point system is stated in the Rules. Suggest you read them.
bah. reading rules is for wimps.
has it been officially canned?
just go interview at the place you want to work. when they say, "we'll get back with you", tell them you're showing up monday with your tools.
then show up monday with your tools. ask someone where the coffee pot is. locate an empty cube and hang up your photos.
.
yeah, seems like everything gives five points.
tell me something that doesnt give five points.
Can I earn a decent living as a Data Recovery Service from my CIS degree?
can you recover the data from my Hitachi Deathstar HDD that shit the bed?
no... I'm a student
if you're a masters candidate, then i think it's about time you get familiar with your university's library.
i can't imagine a university, even in a Second World country, that is unable or unwilling to make journals and standards documents accessible to students.
dude, you suck.
seriously, coming in here trying to wheedle your way into getting someone to steal the property of someone else, and then give it to you, just so you can continue to weasel your way to a dubious "masters degree" ?
WTF ever. I say, you work for some crappy software consulting gig, and they want you to steal a copy of it because they don't want to pay for it.
really, now go sit somewhere quiet and think about your life for a while.
and for those of you following along at home: The C Standard (as of 2005: C99, TC1, and TC2) confirms.
impressive.
what's the problem?
this function converts a numeric IP address into a "dotted decimal" string for human readability.
here's the specification:
http://www.opengroup.org/onlinepubs/000095399/functions/inet_ntop.html
and here's a more user friendly reference:
http://beej.us/guide/bgnet/output/html/multipage/inet_ntopman.html
i hate coming home all covered with bits.
Well, what does "%n" do in scanf()? I couldn't find any reference to it here. And it seems to not do anything in the code that's been posted in this thread either. But if I enter
HelloWorld 1 2
Then the string length is correct, for some odd reason.
Perhaps you should read the thread before replying? Tux4Life gave a beautifully detailed explanation just a few posts earlier, that even the most inexperienced newbie can understand.
and seriously, cplusplus.com is a nice reference to point new programmers to, just as a simplistic reference to get them started, but it clearly is not a definitive or complete specification. you should know this.
If only by virtue of your longevity, reputation, post and post-solved counts, newer programmers assume you are one of the top C/C++ "experts" on this site, and often take your words as literal truth. Whether you like it or not. So you should at least refrain from asking incredulous, noobtastic questions before doing some your own nominal investigation using credible sources. And quit with the silly sniping at Aia. Her tone may annoy you, but you should be more careful about posting C++ in a C forum, considering it's a major issue here.
the beauty about internships is they don't expect you to know a whole lot, and will teach you what to do.
i'd be pretty stoked if i were you. this is a great opportunity.
yeah, a non sequiter,... but ok, wat ever
i dont think so.
Note that the first group of octal numbers converts to the hex value 0xC3D4. in other words, your first two octets (8-bit values) are 0xC3 and 0xD4
if it were in the proper order, the very first octet would correctly indicate that the IP Version is "4" (or "6") those are the only possibilites. your packet says the IP Version is "C" (ie, 12). furthermore, the minimum valid IHL is 5. in your example the IHL is "3". both of these are invalid.
now look at the IP specification, and see for yourself how this does not make sense:
Internet Protocol
3. SPECIFICATION
3.1. Internet Header Format
A summary of the contents of the internet header follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| IHL |Type of Service| Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identification |Flags| Fragment Offset |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time to Live | Protocol | Header Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Example Internet Datagram Header
maybe he got his mod status revoked :P
okay, i think i missed somethign... you have to "Use ntohs or an equivalent function to convert the field from network byte order to the local byte order." this will probably solve my confusion. this will also be a key element of your assignment. you're expected to use the library functions not hand-crafted conversion routines.
.
what are the image compression algorithms ? how to implement a new image compression algorithms ? can u give some tips to develop the code?
ever heard of Google? it's pretty cool. you might like it.
this has only been solved about 100 times in the past year or two.
i think we're all tired of this one.
why dont you do a nominal search and find one of the many full solutions available?
that's not what i mean. i mean, where are you getting the version 4 (IPv4) and the Header Length info that is supposed to be in the first octet, according to the specification? i'm not quite seeing where this info is contained.
JC covered it pretty well.
but let me comment on your indentation. it's a pet peeve.
when you use a brace '{' to open a block of code, *EVERY* line after that is indented one level to the right, until another brace is found. at which point a closing brace '}' returns indentation of subsequent code back to the previous level (to the left), while another opening brace '{' indents the subsequent code one more level to the right
what you have here (not even counting the errors) is terrible style and makes it really hard to read , especially in large programs
double tableAverage(double a[], int num)
{
// Declarations
double avg = 0;
double total = 0;
while ( a != 0)
{
total += a;
avg = total/num;
}
return avg;
/* return 0.0; * doesn't really compute the average */
}
yeah, and don't forget to take your vitamins.
now as for printing an array, just use a loop:
for (i=0; i<NUM_ROWS; i++)
{
for(j=0; j<NUM_COLS, j++)
{
printf("%c", current_board[i][j]);
}
printf("\n");
}
so am i missing something? it's been 2 1/2 years since i worked with network packets.
can you tell me how are the first two octets (0xC3D4) being read?
.
thanks for the follow up. glad it works for you :)
Do you want all of Dave's threads to be closed?
of course not.
and i completely changed my mind about requesting this be closed. It was a misguided idea, a kneejerk reaction to the thought of spammers bumping this thread every couple weeks along with the assorted retards popping in and saying stupid shit.
but dave, i'm sure, would be more interested in keeping dialogue open. at any rate, this is a huge thread and even if it is bumped by dumbasses and spammers from time to time, it will keep his memory alive.
though i didn't agree with most of his politics, he was a class act. I only knew him from the forums, but i miss him.
.
i swear, you people are killin' me
:icon_tourettes:
:icon_nervousbreakdown:
ID3 are far more commonly used for music files than APE, but it depends on who tagged the file. theres no way to enforce which tag someone uses. so, you can just look for one tag type, or you can look for multiple.
depends on how versatile you want your program to be and how much extra work you want to do.
overall, it's not hard. just look for the IDE specific tags at the end of the file. or APE tags at the front.
either they are there, or they aren't.
you know how the tags are formatted and where they are located (generally) by their specifications. it's really pretty cut and dried.
.
okay, sorry man. you're right. i shouldn't have used the word "copy". you never said that.
let's start over, shall we? :)
so tell me what is your question at this point? where are you still stuck?
Yesterday, I saw Titanic again because I love to watch it again and again.
Its my favourite movie.
that's because you suck at life.
you can't print an int (or char) as a string ("%s")
in the future, don't bump 5 year old threads. start your own. and use [code] tags.
thanks.
um, don't be all thinskinned. this is still the internets, it's all just words and stuff.
so, for one thing, i didn't call you mindless. the act of copying code is mindless.
and when i said "this is your problem" sorry you mistook my intent. the accent is on "this", not on "your" ... as in "understanding the method" is "the problem that you need to solve" ... or, in other words, "here is your problem, now you need to solve it"
sorry if you felt snubbed. do i need to handle you wearing kid gloves? would it help if I added smiley faces? :)
now if you post a specific question (other than "how do i do this?) we can give you specific answers. is there something else you require?
:)
dude, don't try to mindlessly copy or convert code.
he didnt link the code, anyhow. he linked the method.
so you need understand the method. understand how to do it. not how to copy.
this is your problem.
.
To my utter disappointment, I open the message and it just turns out that someone wants to make my fantasies come true. Is this a common occurrence around DW or am I just lucky?
i get a new special girlfriend from the far east once every month or so.
i don't know how you're going to do a "startup" without incorporating some amount of "entrepreneur" -ism. i don't think industry professionals just create a new business without some amount of scrambling for funds and risk-taking.
but i'm not an entrepreneur, so don't ask me.
anyhow... i can make gamez! i can haz job plz? i miss the days of free lunches, stocked snack cabinets, and all-day foosball tournaments.
What you calling 'baiting' I call a harmless joke. If this is considered 'baiting' then I think you should remove a lot more posts all over the site. It isn't a big deal, just saying. Also consider how the OP fired right back and I took it in stride. But I can see that you haven't bothered to edit his comment, just mine.
stfu noob.
AAAAHHHHH!
this eff-ing thread sucks, shut up already about your cot dam pasta nobody gives a crap
yes, this means all of you
.
HAY GUISE!
I GoT An IDEA!!!
How B0ut iF We seT
cygwin=NODOSWARNING
MAYbe THaT WiLL worK???
Whattyathinkaboutthat?
my goodness, 5 days and 35 posts later, you could have had this program written, fully validated and distributed by now.
the text is most likely not formatted in any meaninful way and fscanf will be difficult if not impossible to use.
use fgets() to read the file line by line.
use strtok() to parse each element (or token) in the line by delimiting each element by the spaces (' ')
use strtol() to determine if element is an integer and convert it
CODING ERRORS:
CanCal = fopen("can.txt", "r+");
you havent closed the previously opened pointer to teh same file.
fprintf(CanCal, "%d ", &TD[i][j]);
you're printing the address not the value
printf("%d\t", &TD[i][j]);
ditto
fscanf( CanCal, "%d %d", &row, &col);
well, now that you've done this, your file pointer is halfway through your file. you go to read it again in your ROW and COL index loops, it picks up where you left off.
OTHER PROBLEMS:
include <conio.h>
deprecated, unportable crap library. you don't need getch() or clrscr(). get out of the habit of using this now.
include <iostream>
pointless C++ header unused in C code
void main()
is wrong. main returns a type "int"
so.... are new users not allowed to create tags?
um, search the filename string for a ".com" extension? yes?
and it's pretty clear that you're trying to make some sort of malicious software. not a virus, obviously, because you clearly don't have the talent, but some sort of disruptive program nonetheless.
and FTR, your defense is laughable. viruses aren't written in assembly, you silly person.
threads like this bring the lulz and keep me coming back. :)
i didn't know n00bs couldn't create tags... what's the threshold? and why don't we have the same thing for Code Snippets?
Actually, what I really want to see is some kind of minimum/threshold for allowing signature links.
.
okay, i'm suspicious about this example IP header. for instance, the first octet is supposed to contain the IP version (either 4 or 6) and the IP header length (at least 5, but probably not more than 8 or 10 or so...)
i dont see what appears to be a valid first octet anywhere in this code. I dont see what looks to be a "typical" valid IP destination or IP source address either, although this could be made up to be something unusual. i would have to see more about the assignment to understand if your instructor has constructed this IP packet in some sort of unusual manner, because it doesn't make much sense to me.
if you want to see what i'm seeing compile this code to convert the octal packet to a hexadecimal packet. if anything this will get you started.
/* This code is 'quick and dirty' and performs ZERO error checking.
It is not suitable for commercial or academic use.
it is only supplied here as a concept example */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv)
{
FILE *fp;
char string[80], *ptr, *doubleOctet;
int do_val;
fp = fopen(argv[1], "r");
while((fgets(string, sizeof(string), fp)) != NULL)
{
doubleOctet = strtok(string, " ");
printf("0x0000");
do {
do_val = strtol(doubleOctet, &ptr, 8);
printf("%04X ", do_val);
} while ((doubleOctet = strtok(NULL, " ")) != NULL);
printf("\n");
}
fclose(fp);
return 0;
}
I compile the code using gcc, then run the code by …