I do not know if this is dangerous for comands that dispaly something in the terminal (I tried grep -r 'something' /somewhere & and it worked fine), but I would like to append to all my commands & automatically (it saves me typing C-z bg everytime I forget)?
Is there a way to do it for all comands? The only way I know would be with aliases in .bashrc, but this would be a bit too cumbersome...
Thanks very much.
User Profile
Collapse
-
automatically append & to all comands in terminal?
-
emacs question
I do not know if this is the right section for my question (or if even there is the right section for this), in case move it.
I'm using emacs in matlab-mode to edit (surprise :) ) matlab files. The comments begin with "%" and I defined them to be green. Now I would like to add another type of comment (for example beginning with "&" or "%&" and defined to be red) in order to make a difference between... -
Also, I do not know if
[code=cpp]
int my grade
[/code]
is allowed since it is made of 2 words... Shouldn't it be:
[code=cpp]
int my_grade
[/code] -
lol! I had the same problem a year ago, when I started on linux. It will work np with the comand ./Leave a comment:
-
How are the subgroup defined? Any possible combination of the elements of the int array or something else?
Why don't you post what you have come up with?...Leave a comment:
-
If you follow Sick0Fant's suggestion the for-if-else if etc. should work, I do not see the point though in saying:
[code=cpp]
else if (i<3 && i<6)
[/code]
Because if i is smaller than 3 it is always smaller than 6......Leave a comment:
-
I have used plenty of times (can't remember how many as most of you I guess) the function from a class and hence the scope resolution opearator...sho uld have seen it but I guess staying away a little while from coding can even make you forget the "obvious" stuff. Sorry, TheMan...Leave a comment:
-
I would try to use char arrays, but maybe this is stupid/non-efficient let's see what the experts say......Leave a comment:
-
I do not know the string library included so I do not know if string is a valid return type (I thought you can only use char)...but what seems to be missing in all cases is that you do not include the header in the test1.cpp file...Leave a comment:
-
I do not know if it is exists for general case. For the 2X2 matrix there is the gsl library. If you have matlab you can call matlab to invert the matrix from your c++ code......Leave a comment:
-
Instead of typing only "code" in brackets at the beginning of your code you type "code=c"... for example
Code:int i=0; for i= 0 ; i<4; i++ { std::cout<<'this should have no colors'<<endl; }
int i=0;
for (i= 0 ; i<4; i++)
{
std::cout<<'thi s should have colors'<<endl;
}
[/code]
In case quote...Leave a comment:
-
For your first question doesn't he use GSL_matrix? Isn't there the matrix defined this way? Try to search for gsl matrix on the net.
The second question works fine: just write a_{i,j}=b_{size-j-1,i} and make a few tries for i and j to convince that is right for example consider i=1=j so you see that input element is 55 (=b_{3-1-1,1}) exactly as the output a_{1,1}
For i=1 j=2 you get a_{1,2} =b_{0,1} and b_{0,1}=44
...Leave a comment:
-
It seems to me that if the program is compiled (without errors) you can run it everywhere (if there are no OS specific stuff in the code); I guess you need help with how to compile the programs you have written...
On linux usually the compilers are shipped with, but in case look for gcc...
In windows I do not know if there are free distributions, but I guess so, try to search on the net......Leave a comment:
-
Have you tried to modify lines 13 to 19 with something like int i=0? As someone pointed out in a post?Leave a comment:
-
-
You get the error because you wrote the line 30,31,32 the wrong way around. In C++ a=b is not the same as b=a, former says a takes the value of b the latter b takes the value of a.
What you want to do is to write m=j+k, etc. otherwise (as it is done now) you assign a non-defined value (m) to the sum j+k.
Hope this helps...Leave a comment:
-
Sorry for posting the code...
Majestic if you post how you think to do it there will be surely people who help you see if your idea works...Leave a comment:
-
What about making a while-for combination? i being the bulb where you start the iteration (i=2 first round, then i=3 etc) and n the bulb increased according to n where you have to switch. I would imagine it looks something like this
[code=c]
code removed
[/code]
But it won't work yet completely this way I guess, but it should help you get started......Leave a comment:
-
Just to let you know: probably no one will answer you if you don't put a code saying where you are stuck and also it goes against the rule of this site to do the homework (in case it is one) for other people...Leave a comment:
-
Well, you create an array of integers of say 10 elements with
Code:int a[10];
Code:a[3]=2;
I don't see why you need to delete an element, you just can give it another value (as long as it is not defined as constant). In case typing
Code:a[3]='\0';
Leave a comment:
No activity results to display
Show More
Leave a comment: