matlab:
1:10
Type: Posts; User: twomers
matlab:
1:10
you have already received some excellent advice in this thread from some excellent
advice givers (pleonasm not necessarily not unintended).
i guess this question is to everybody, and not just...
Inseem to remember that your webpage used to WOBBLE before
i've always considered you to by my c-mommy. :)
I use Python for visualisation all the time.
Python + the matplotlib library is a fairly standard approach that j use all the time.
most interesting machine learning methods require varying degrees of sophistication: from linear algebra matrix inversion, as many matrix/tensor decomposition techniques as you can think of are the...
neither c nor c++ are the languages you want for this if you don't want to use extra tools or libraries.
ok. now you've gotta cheer me up! :)
Hah. Neither dead nor rich fortunately.
Life's good. I haven't done a whole bunch of C recently. I do data science research, so the languages I've been using have been at a much higher level of...
Oh yeah? What was it that got their butts rustled?
how's this place holding up?
i hope to c tomorrow too.
You can use any integral type for bitwise operations. You can use unsigned ints, for example, and on a 64-bit machine you have 64 bits that you can play around with.
To use fewer than 8, or 32,...
Back-of-the-brain calculation, but a couple of hundred million records on a 64-bit machine will require about 12GB of memory. Can you support this? Will your table change?
Maybe you should test that all of the variables are of the same type, i.e something like.
int main( void ) {
char *code;
int j = 0;
char *codes[3] = { "abc", "123", "a12" };
for...
char *pch;
char string[50];
char first[10], second[10], third[10];
strcpy( string, "this is me" );
printf( "%s\n", string );
pch = strtok( string, " " );
strcpy( first, pch );
pch...
Consider strtok.
isalpha - C++ Reference
isdigit - C++ Reference
You're probably over-complicating it too... this semi-pseudo code is a more direct route to the issue
const int len = sizeof codes /sizeof *codes;
int main( void ) {
int i = 0;
do {...
In line 55 a DialingCodeType (int) is being compared to a CountryNameType (char*). You'll need to look into atoi or similar functions to compare the two.
It's going to be easier to do an scanf(...
Use a for loop:
int checkMatch() {
int i = 0;
for ( i=0; i<sizeof codes/sizeof *codes; i++ ) {
if ( strcmp( codes[i].country, code ) == 0 ) {
// as before
return i;
...
Well, what is bad practise? Here, it's doing thing that you don't need to do. Adding irrelevant redundency, swapping between std::string and char* unnecessarily. You can use the STL and perform this...
Well, you need to allocate a buffer big enough for this to work. The following code doesn't work. Try it:
char *test = "testing";
char *test2 = (char*)realloc( test, 30 ); // You should get...
It looks like it should work to me from what I see here. Can you paste more code so that we can try to replicate the issue more fully?
Is it a runtime error, or compilation error? For example,...
That line of code is equivalent to:
strcpy( &concat[strlen(s1)], s2 );
Does it make sense now? It copies the string s2 to the concat buffer at the strlen(s1)th position of that buffer, which...
std::string has a c_str() member which returns a const char *. So the second parameter to your memcpy function should probably be file[i].c_str();.
I would question the need to convert the thing...