1,684 Posted Topics

Member Avatar for coolman2006
Member Avatar for indienick
0
706
Member Avatar for Shon05

[QUOTE=Shon05]Is anyone familiar with lisp programming? If so can you please respond back. I have a program due and it deals with lisp type checking! I would really appreciate it. ;)[/QUOTE] I am.

Member Avatar for indienick
0
488
Member Avatar for Mushy-pea

You could say you have an irrational number, but what you really have is a pseudo-random sequence of bytes, that you're using to xor to the bytes of your plaintext. This is called a synchronous stream cipher. And if you're capable of sending beforehand a one time pad that tells …

Member Avatar for Rashakil Fol
0
64
Member Avatar for unclepauly

Well, you'd have to have a pointer to the top of the map, so that'd be 7*4 for the pointers, but of course that depends on what you formally define the 'map' to be in terms of calculating memory usage. And there's also the fact that your memory manager will …

Member Avatar for unclepauly
0
91
Member Avatar for unclepauly

[QUOTE=unclepauly;295336]heres a question: i understand that array insertion is carried out in constant time - O(1) - but if the array is 2D (n*n), then would this still hold true if i wanted to insert the same value into each array?[/quote] Now what do you mean, saying array insertion is …

Member Avatar for unclepauly
0
125
Member Avatar for The Dude

1. Sam I am. 2. I do not like to eat green eggs and ham. 3. Reading that book was the first time I realized that names were not unique. 4. Reading [url]http://qntm.org/[/url] was the first time I realized that it is possible to find a person who has the …

Member Avatar for cecil.vera
0
714
Member Avatar for Jessehk
Member Avatar for vicky_dev

[QUOTE=WaltP;288533]It can't.[/QUOTE] It's proven that in any Turing-complete language you can create a program that writes its own code as output.

Member Avatar for SpS
0
307
Member Avatar for arh

That doesn't sound like research to me... arh, how about you write a compiler? Make a compiler for the Scheme programming language. Write the compiler in Scheme, too. Think about what optimizations you can make. Especially when it comes to dealing with call-with-current-continuation. Oh, and have the target language be …

Member Avatar for Rashakil Fol
0
147
Member Avatar for mattyd
Member Avatar for Narue
0
210
Member Avatar for sofianos

Also, more portable, since you're not making assumptions about character set.

Member Avatar for Rashakil Fol
0
5K
Member Avatar for gabriel_wadley

What happens when you compute fact(13)? The number is too large to be represented by a long (which has range up to 2^31-1, approximately 4 billion). That messes up the computations at that point.

Member Avatar for Nick Evan
0
84
Member Avatar for matrimforever

Output the characters in a loop. Keep track of the previous character you've output. If it was a space, then if the current character is a space, don't output it.

Member Avatar for bala24
0
208
Member Avatar for Mushy-pea

That, of course, depends on what university you go to. Some schools offer bioinformatics majors. I don't think any have CS students deal with quantum computing as any big thing -- that field is just undeveloped so far.

Member Avatar for Rashakil Fol
0
111
Member Avatar for TylerSBreton

No, you can do it without a pointer (or by using a pointer that would be there already, like the stack pointer). When you call a function with the C calling convention, you push the last argument, the second-to-last argument, the third-to-last argument, ..., and finally the first argument onto …

Member Avatar for mathematician
0
185
Member Avatar for kihtmaine

It depends what they are teaching in the discrete math class, because there's a few parts to the subject. You've got graph theory: that's good to have knowledge for, for some algorithms, or in designing data structures. You've got basic modular arithmetic: I find myself using my experience with modular …

Member Avatar for Rashakil Fol
0
107
Member Avatar for nhm919

This is not a place where people do work for you. You need to explain why you are unable to do this yourself, and then people might be able to give you information that would make you able to do this yourself.

Member Avatar for nhm919
0
143
Member Avatar for sweety engineer

There are so many better ways you could spend your effort 'helping' children than turning down the job. If you want to do the most amount of good in the world, the right way is to find the most efficient use of money you can (maybe the most efficient charity …

Member Avatar for ~s.o.s~
0
259
Member Avatar for The Dude

I think they end up reporting these stories just because they love using the phrase 'bus plunge'.

Member Avatar for Rashakil Fol
0
41
Member Avatar for belhifet
Member Avatar for srinivasdama

srinivasdama: Note that 1/4 + 1/16 + 1/64 + 1/256 + ... is equal to 1/3. You can multiply an integer by 1/4, 1/16, and other powers of 2 with the >> operator.

Member Avatar for Rashakil Fol
0
98
Member Avatar for orlox

You're using XML to preprocess [i]TeX[/i] files! TeX! There's already a way to preprocess TeX files; the TeX language itself! It has features for that! Why would you use this? Seriously. Also, you have several problems: First, you're using XML. That makes things harder. Second, what's with the 'print' element? …

Member Avatar for orlox
0
92
Member Avatar for mero

You 'read many books about c++'? Have you actually written anything in the language? You could try making a program that scans people's written words and makes fun of them for not being able to put sentences together.

Member Avatar for BiGPrO
0
116
Member Avatar for stupidenator
Member Avatar for blancanyc69
Member Avatar for Nick Evan
0
103
Member Avatar for Mushy-pea

[QUOTE=Mushy-pea;276655]Hello everyone. I recently came accross the concept of Turing completeness (in languages). I was wondering, is there a general method for determining if a language is Turing complete? Or is it one of those intuitive things where you just have to look at it for a while and go …

Member Avatar for Rashakil Fol
0
91
Member Avatar for vijizzle

Who cares? Both ways are perfectly fine. If you want your cars to be smart enough to understand direction strings, that works as well as having them be dumb. You've got to put the intelligence somewhere.

Member Avatar for Rashakil Fol
0
73
Member Avatar for nanodano
Member Avatar for astrojith

It has to do with the C++ standard. The standard says, "use int", so that's what you should use. The reason you should use int is, void main is not necessarily accepted by every compiler.

Member Avatar for chunkmartinez
0
496
Member Avatar for yneng21

Why would you need help? Specifically, what don't you know how to do? More specifically, if somebody asked you to run a program manually, on paper, would you not know how to do it? You should know how to do that... If so, then you should be able to write …

Member Avatar for WaltP
0
96
Member Avatar for Cerberus

Look at the source code for some free, open source editors out there and see what they do. I'd imagine I'd make a mini-language for describing source code colorization and then use that to colorize source code.

Member Avatar for Cerberus
0
131
Member Avatar for jread

[QUOTE=server_crash]The best language for a beginner, in my opinion, is Java. I haven't seen a language yet that displays all the concepts of OO in such a friendly and understanding manner.[/QUOTE] I don't understand this OO-mindedness that people have. Learning CS isn't about learning how to think in an object-oriented …

Member Avatar for Mushy-pea
0
327
Member Avatar for Serg_zone

The best way to verify the correctness of your answers is to try a few example values for your parameters and see what happens. See if you can notice a pattern. For example, if I were given the code [inlinecode]for (i = 0; i < 2 * n; ++i) { …

Member Avatar for AnonCSAddict
0
136
Member Avatar for jado
Member Avatar for ~s.o.s~

I do not know what you mean by 'scripting language,' so I'll take it to mean 'a language with garbage collection, rapid development, and general ease of use.' [QUOTE=~s.o.s~;246756]PERL, Python, LUA, PHP etc.[/QUOTE] Perl is a good language for short programs that need to chop text around, and it's a …

Member Avatar for ~s.o.s~
0
402
Member Avatar for Rashakil Fol

What's the coolest programming language? And why? Oh boy this should be fun :->

Member Avatar for Anonymusius
0
693
Member Avatar for indianscorpion2

I'm sure it's perfectly fine to - use i and j without having declared them first, - use the mystical !! binary operator, - fill values of 1 into the triangle where values of 1 do not belong, - print the contents of your datastructure without putting spaces in between …

Member Avatar for Nick Evan
0
563
Member Avatar for Ghost

Many operating systems' source code are freely available. They certainly are not written in HTML, though...

Member Avatar for Ancient Dragon
0
364
Member Avatar for Mushy-pea

[QUOTE=Mushy-pea;267519]C and C++ should be abandoned (or substancially modified) as the default languages used for the writing of native executables and operating systems.[/quote] The Linspire team has already abandoned C and C++ and use Haskell as their preferred language for core OS development. That doesn't mean the kernel shouldn't be …

Member Avatar for Rashakil Fol
0
87
Member Avatar for iblair

You can pass command line arguments by changing @ARGV. It is best to make a local copy. For example, inc.pl: [CODE]#!/usr/bin/perl use strict; # just for kicks for my $item (@ARGV) { print "$item\n"; # print what we think are our command line args! }[/CODE] tmp.pl: [CODE]#!/usr/bin/perl use strict; # …

Member Avatar for KevinADC
0
571
Member Avatar for amen
Member Avatar for 001

[QUOTE=001]Thanks Comatose, It worked , but I still experience problems with the output when there are errors in the program. It justs spits out the output and its difficult to read. What do i do. 001[/QUOTE] You could show us what you mean by pasting the difficult to read output …

Member Avatar for MattEvans
0
683
Member Avatar for missg82

What? Why are you having problems? I think it would be helpful if you told us what course you're taking, and what expectations they have of you. Is this an intro compsci class? It sounds like it's not. You said in the other thread that you're a masters student in …

Member Avatar for Rashakil Fol
0
137
Member Avatar for disc

operator() lets your values look like functions. For example [code]struct greeter { std::string greeting_text; int operator()(const std::string& greetee) { std::cout << greeting_text << ", " << greetee << "!" << std::endl; return 12345; } }; // later: greeter alien_greet, programmer_greet; alien_greet.greeting_text = "Greetings"; programmer_greet.greeting_text = "Hello"; int x; x = …

Member Avatar for disc
0
166
Member Avatar for Ghost

Heck, it's even legal to download material protected by copyright law... if you have the author's permission. For example, I just downloaded J_Search's post.

Member Avatar for iguana_nirvana1
0
771
Member Avatar for upside10
Member Avatar for upside10
0
127
Member Avatar for The Dude
Member Avatar for xyfay
0
160
Member Avatar for zac_haryy

You can use % 10 to find the units digit of a number. For example, n % 10 gives the units digit of n. You can then use / 10 to divide an integer by ten. For example, n / 10 divides n by ten. So, 1697 % 10 simplifies …

Member Avatar for ~s.o.s~
0
101
Member Avatar for v2hack
Member Avatar for v2hack
0
54
Member Avatar for dhaya

The End.