No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
13 Posted Topics
[QUOTE=progcomputeach;1201749]For starters, mine is C#, closely followed by VB.NET[/QUOTE] I like J because it allows me to accomplish things quickly. It's somewhat exasperating to read the posts on this site from people requesting help with very simple problems which often seem to require pages of code to solve when it …
C and C++ are considered to be very portable but compiler differences can be significant. A language like perl or J is probably much more portable in practice for a wide range of programs across different OSs.
If you start adding examples, it quickly becomes apparent that there is a fair amount of repetitious code in the presentation of results which could be factored out. Also, you should probably show the negative case as well. So, if you have something like: [CODE] template<typename StartItr, typename EndItr, typename …
Try "eye" - [url]http://www.mathworks.com/access/helpdesk/help/techdoc/ref/eye.html[/url] . [QUOTE=flposjg;1194514]Hi guys, I'm taking an engineering class and i'm not familiar with Matlab at all. I've been trying to generate a square matrix from an input with a pattern. For example: 1 0 0 1 1 0 1 0 1 0 1 0 1 1 …
It sounds like you really have a 3-D array that should be 48x4x22. Is this the case?
This input file makes no sense based on what you described. I see the "5" at the beginning, then "2 A" - for 2 Adults? - then "1 C" - for 1 Child? - then "3 C" - for 3 Children? - we're already over five total. Nowhere do I …
Did this even compile? I ask because I had to add #include <iostream.h> at the top to get a compile, at which point it ran OK.
These seem rather elaborate in comparison to something like (in J): Pascal =: i. !/ i. See [url]http://www.jsoftware.com/jwiki/NYCJUG/Projects/Pascal[/url] or http://www.jsoftware.com/jwiki/Essays/Pascal's_Triangle for more.
The problem is that, apparently, what you really want is a permutation - it looks like you want only 10 random numbers between 1 and 10. There are any number of ways to do this. One is to go to jsoftware.com, download and install J, then type "1+10?10" in a …
Try J at jsoftware.com - it's interactive and the forum is very helpful.
Try summing the results of the equation - printing out a million things is absolutely useless - then dividing by 1e6 at the end of the loop. Better yet, use an array-based language to avoid finding a problem where there isn't any. [QUOTE=andyg55;551530]ok, instead i did a while loop like …
[QUOTE=snucho;538311]A computer has 256MB of memory. Each word in this computer is 16 bytes. How many bits are needed to address each word in memory?[/QUOTE] Assuming by 256MB you mean 2^28, you'd need 28 bits to address all the bytes; to address only words, you'd need (2^28)/16 = (2^28)/(2^4) = …
The End.
DevonMcC++