Do you want me to turn Ad Block back on and go back into lurk mode?
I didn't think so. Straighten up and fly right or you won't get anything useful from me.
Huh? I don't see ads.
Oh, wait. I've always been using adblock. My patience ran out ages ago -- only a geek-laden chat about Emacs could possibly pull me out of my shell -- the shame!
How do I say "yes, I know I'm at the end of the line, but keep moving anyway"?
I think that's the crux of your question, the kill-rectangle thing is a sideline (the correct way is a regexp replace, but I guess you know that).
I don't know if there's a general way to do this. I think it's a feature a 'line' means something specific in Emacs. You can't simply place your edit cursor at any position, there has to be text preceding the cursor.
To solve your specific problem consider a suggestion by another member of the forum regexp-align, for the dollar symbol (the regexp indicating the end of the line).
Item 1: short
Item 2: long text here
Item 3: foo
First, move your cursor to the first colon, then select the region to the end of "foo" as before. Now do regexp-align and enter a dollar sign as the regular expression to align (end of line). This will now align all the end of lines by adding white space (usually tabs) in that region. Since Emacs still remembers the region (including the added whitespace) now do kill-rectangle and boom, job done! I feel dirty now!
As to the general problem. Perhaps the only way I think is to change Emacs so it silently inserts spaces as you move character by character past the end of a line removing them as you move back. This could be nasty though as it could insert spaces without you being aware of them. Of course there's probably a lisp add-on to do this!
Bottom line, "if you want to get there, don't start from here"!
very useful and extremely simple. Assuming [M] means "Meta-key".
[M]/ Will attempt to complete the current word. This is done working backwards from the edit point and can look in other buffers.
If (for example) you are editing a LaTeX document and you wish to cross reference an existing figure with label \label{f:my-figure} entering the following:
\ref{f:[M]/ will repeatedly try to match everything starting with f: , namely all the existing figure labels.
Likewise if referencing a citation in a BibTeX file that is open in another buffer, \cite{startofkey[M]/ works a treat!
Incremental search is also wonderful. When correcting text from (say) a hard-copy simply do [M]S and start typing the first few words of the sentence before the edit point. Magically Emacs will take you there.
This is also very useful for moving around in documents. Simply enter "??" or some other simple placemarker move around, then do [M]S?? and you'll fly back to where you were.
For formatting "paragraphs" [M]Q is the way forward. Quite simply no other editor I have come across has a better understanding of the 'right' behaviour for this.
If you have some text that looks like this (n.b. _ indicates space)
____Some text that is on a line that we wish to wrap around so that the new line starts aligned to the first line. Ordinarily there is no sensible way of doing this bar tab stops, however if you 'do a meta q' it will magically align this paragraph.
Then after a [M]q (fill-paragraph) you will get
____Some text that is on a line that we wish to wrap around so that
____the new line starts aligned to the first line. Ordinarilly there
____is no sensible way of doing this bar tab stops, however if you 'do
____a meta q' it will magically align this paragraph.
So that the paragraph is left aligned to the first line.
Finally, as others have said regexp replace and various other packages (e.g. AucTeX) are unparalleled!
Actually no, it is not "ok" to do this, even during war it's potentially a violation of the Geneva convention. In a nutshell it's fine to kill your enemy but not to deliberately target them with weapons designed to cause permanent disability.
There is a gray area however where so-called "Dazzlers" can be used, however it's really one for the lawyers.
Obviously it depends a great deal on the laser, however high power lasers are now becoming cheap and available. Anything ~3B or higher - even at a distance of a few hundred meters in a fast moving vehicle does present a very real hazard to vision.
There is nothing magical about biometrics, at the end of the day it is still a regular old password comprised of 1s and 0s
Except that you can't change the password when it's compromised.
..blast, I didn't finish...
That said, your cynicism and scepticism, while a little presumptuous, is entirely healthy. Too many people accept things at face value!
". You say that you think he is a Professor, well so was Ward Churchill (who is a complete crackpot) until earlier this year. What evidence do you have to support your assertion that he's a complete crackpot? Why his standing in the community of course. In the case of this guy that "standing" is rather minimal.
You say that you think he is a Professor Merely to point out that if the reporter can't get a basic detail like that correct they should not be relied upon to convey subtle and complex science in an accurate manner.
...least some of his papers, doesn't tell me a thing.
...what evidence is there that he has standing in the community of physicists That seems somewhat circular. To publish in journals such as PRL, you need to convince a group of your peers of the novelty of your work. If you manage to do this consistently over a length of time you gain reputation and their respect. In the end it's all like a web of trust. There is no "authority" to whom you can turn for an ultimate judgment, merely your peers and collective reputations (such as journals) that have been built up over many decades or centuries.
That doesn't make these people infallible of course but it does mean that their opinion of something they have been studying for ~20 years carries more weight than that of some random idiot - or journalist.
who is Dr Andy Albrecht I think he's a Professor now, no that I would expect "New Scientist" to get a silly thing like "the details" right.
why should I think that he is any more likely than Jack Thompson to recognize By looking at his research background and standing in the community.
As an aside he was a lecturer here at Imperial for some time (Cosmology course), sadly he was tempted back over the pond.
According to this video at YouTube you'll need to find a couple of kids to fix it for you. Cute, but that's not my point. I've no doubt the children will be smart enough to repair them, but what with? Unless there's a trickle of spare parts they will only be able to cannibalise a limited number of units before the whole exercise falls apart.
However, under NO circumstances let any UK PC World staff touch it:-) Absolutely. I'd take an untrained five-year-old in preference to PC World any day of the week; at least children have the potential for abstract thought!
I have not seen much discussion of how these units will be maintained - certainly no official policy. Without sustained long-term support in the way of replacement parts I suspect this will be another project that pulls its punches. What happens once the media frenzy dies away and the technology sponsors decide there's little PR merit in just supplying spare parts?
I understand your frustration at there not being a "standard" package to solve EM (or scalar wave) problems -- I have ranted about this quietly on my own for a while. One would think that with the equations of Maxwell nearly 150 years old there should be some pretty standard solver techniques out there that would have been packaged up by now covering practically everything. The problem is - while it's easy to write down the equations and (naieve) methods of solving them the nitty-gritty of it all is both important and far more tricky than meets the eye! Each problem domain has its own issues and idiosyncrasy's. Likewise if you are interested in some quantaties more than others (e.g. far field / near field) that can drastically change your approach. Ultimately to have any chance of success you must approximate and the art of the approximation you choose is what matters. As the saying goes "If you want to go there, I wouldn't start from here".
If you are trying to carry out some sort of electrically large scattering problem through inhomogeneous anisotropic materials - you are in for a tough ride. Unless you can approximate things away furiously you will soon find the problem computationally intractable.
It sounds to me as though you really need to get a feel for the basics before embarking on anything too heavy. Time spent in reconnaissance is rarely wasted. Once you have an intuitive idea of how things work you will probably better understand the problem - hence be able to pick an appropriate solver.
A good general starting point in my opinion (particularly in the scalar case) is the use of pseudospectral methods. These will allow you to describe the field propagating through materials in a reasonably tractable manner - they are not too much effort to understand, reasonably quick thanks to the magic of FFTW and surprisingly robust.
I suspect your problem breaks down into three distinct domains:
Getting the excitation field to the interaction region
Modelling the (potentially complicated) interaction of the field with the surface
Getting the field back from the interaction region to the detector.
Since the excitation is presumably beam-like, a pseudospectral technique (particularly one with coordinate scaling) will probably help with 1) and 3). With finite difference techniques you must model the field step-by-step through space. With FFT methods you can jump from one plane to the other - this can be orders of magnitude faster than finite difference.
How you manage 2 is the tricky part! The detail of this will depend strongly on what the material interaction is (e.g. will a scalar approximation suffice). I highly recommend you read Weng Cho Chew, Waves and Fields in Inhomogeneous Media for some pointers. Other things to look into:
Green's function techniques (see, e.g. Martin et. al. for an accessible start point).
...it's not science, it's a crackpot theory that fits the definition quite well...
While I entirely agree with your sentiment, you probably mean "...a crackpot hypothesis...".
A theory is something that already explains current observations and allows one to predict new observations. Judging by the review his Magnum Opus presumably satisfies neither of these points.
Mockery aside, you are quite right - "traditional" British teeth are terrible! That's partly the point of the link I gave you. Traditionally, you would get "functional" dentistry on the NHS - if your teeth work correctly then that was good enough. If you'd like them whitened and straight - if there was not good medical reason - then you would have to go private. Result - a nation of nasty gnashers and alternative alliteration.
Since we're getting all "cross cultural" it's arsehole by the way;-)
But hey, Michael Moore is telling us that socialized health care is the way to go, and now here you are telling me that people are flying from Britain to Hungary just to get dental work?...
Well, it's actually quite complicated. NHS dentistry changed quite a while ago. While we do have the NHS (National Health Service), which is supposed to provide health care free at the point of delivery it can be quite difficult to find an NHS dentist. Likewise NHS dentists themselves are a bit of a grey area. If you are truely bored this explains what they cover. Of course if you need work not directly covered you need to go private, hence the health tourism.
A dentist cannot be outsourced to another country - people will always need dental work done, and it will have to be done locally...
Here's a fine example of international dentistry between the UK and Hungary. Of course, being an American you probably view London to Budapest as "local".
I look forward to the day when I can look at a file and read its size in megabits. Finally, it will all make sense.
Agreed. That's something the networking people seem to have sorted out. It would also mean disk manufacturers could make a near order of magnitude increase in the "numbers" they put on the box overnight.
Now that would be a great scam:
1TB, could become 8Tb, then after a respectful delay.... 8TB and still pretend to mean the same thing.
Here's hoping quantum computing doesn't make a sudden arrival - otherwise people may start using qbits and confusion would really reign!;-)
The magic Lisp incantation is mentioned deep in TFM,
Especially for one-button mice, the multiple button feature can be emulated by setting mac-emulate-three-button-mouse to t or reverse. If set to t (reverse, respectively), pressing the mouse button with the key is recognized as the second (third) button, and that with the key is recognized as the third (second) button.
It strikes me as quite bizarre that it's not set to this by default on a Mac which conventionally has just one button mice, particularly as this corresponds to the convention under the X11 server, but it now works.
Any idea how to emulate a middle mouse button click with Carbon Emacs? If something's running under X11 it's easy (Ctrl|Alt|Apple)+Trackpad Click, but I can't figure it out for Carbon Emacs. It's a pain when using things like flyspell, since one can't simply middle click and choose the appropriate word. Using a three button USB mouse works fine, so I just need to figure it out for the trackpad.
There's a discussion here. I assume that the problem must be quite subtle.
Like the UK government, which has banned protests in parts of London unless you have a license for your free speech?
As a consequence of this the comedian Mark Thomas organised mass lone demonstrations, setting the world record for the number of political demonstrations in 24 hours. Unfortunately his original broadcast on the BBC is no longer available on their listen again facility (keep on the lookout for a rebroadcast - it was really very funny.
Following is a brief synopsis of his broadcast, for those with a mischievous sense of humour. I may have some of the details wrong, but you'll get the main thrust of it!
A law is passed (SOCPA) to restrict protest outside Parliament, with the presumed intention of removing the thorn in their side Brian Haw
There are even more nasty problems that could occur if down the line they decide that the maximum number could be very large and forget to change the types of the counter, consider the following, where we are "good" and use "typedefs".
#include <iostream>
/** * A warning to all on mixing short and long. */ int main(void) { typedef short counter_type; typedef long limit_type;
limit_type max_counts=65537; counter_type i=0; std::cout << "max_counts=" << max_counts << std::endl; for (i=0; i<max_counts; ++i) { if (i%128 == 0) std::cout << i << std::endl; } // You should never get here, unless you have a funny definition of short and long std::cout << "i=" << i << std::endl; return 0; }
Do you (or other people out there) make use of compile time asserts, or numerical traits to avoid this type of problem? Failing that do you have any solid tricks to avoid the above, apart from the obvious e.g. making sure the types of counters and limits are the same?
A common problem I see with C++ is that you can do things in a very solid manner (e.g. type_traits, algorithm for_each) however at the potential expense of obfuscation - there's something comforting in a simple for loop... maybe that's just me.
You're really trying my patience, Slashdot.
Do you want me to turn Ad Block back on and go back into lurk mode?
I didn't think so. Straighten up and fly right or you won't get anything useful from me.
Huh? I don't see ads.
Oh, wait. I've always been using adblock. My patience ran out ages ago -- only a geek-laden chat about Emacs could possibly pull me out of my shell -- the shame!
How do I say "yes, I know I'm at the end of the line, but keep moving anyway"?
I think that's the crux of your question, the kill-rectangle thing is a sideline (the correct way is a regexp replace, but I guess you know that).
I don't know if there's a general way to do this. I think it's a feature a 'line' means something specific in Emacs. You can't simply place your edit cursor at any position, there has to be text preceding the cursor.
To solve your specific problem consider a suggestion by another member of the forum regexp-align, for the dollar symbol (the regexp indicating the end of the line).
Item 1: short
Item 2: long text here
Item 3: foo
First, move your cursor to the first colon, then select the region to the end of "foo" as before. Now do regexp-align and enter a dollar sign as the regular expression to align (end of line). This will now align all the end of lines by adding white space (usually tabs) in that region. Since Emacs still remembers the region (including the added whitespace) now do kill-rectangle and boom, job done! I feel dirty now!
As to the general problem. Perhaps the only way I think is to change Emacs so it silently inserts spaces as you move character by character past the end of a line removing them as you move back. This could be nasty though as it could insert spaces without you being aware of them. Of course there's probably a lisp add-on to do this!
Bottom line, "if you want to get there, don't start from here"!
[M]/ Will attempt to complete the current word. This is done working backwards from the edit point and can look in other buffers.
If (for example) you are editing a LaTeX document and you wish to cross reference an existing figure with label \label{f:my-figure} entering the following:
\ref{f:[M]/ will repeatedly try to match everything starting with f: , namely all the existing figure labels.
Likewise if referencing a citation in a BibTeX file that is open in another buffer, \cite{startofkey[M]/ works a treat!
Incremental search is also wonderful. When correcting text from (say) a hard-copy simply do [M]S and start typing the first few words of the sentence before the edit point. Magically Emacs will take you there.
This is also very useful for moving around in documents. Simply enter "??" or some other simple placemarker move around, then do [M]S?? and you'll fly back to where you were.
For formatting "paragraphs" [M]Q is the way forward. Quite simply no other editor I have come across has a better understanding of the 'right' behaviour for this.
If you have some text that looks like this (n.b. _ indicates space)
____Some text that is on a line that we wish to wrap around so that the new line starts aligned to the first line. Ordinarily there is no sensible way of doing this bar tab stops, however if you 'do a meta q' it will magically align this paragraph.
Then after a [M]q (fill-paragraph) you will get
____Some text that is on a line that we wish to wrap around so that
____the new line starts aligned to the first line. Ordinarilly there
____is no sensible way of doing this bar tab stops, however if you 'do
____a meta q' it will magically align this paragraph.
So that the paragraph is left aligned to the first line. Finally, as others have said regexp replace and various other packages (e.g. AucTeX) are unparalleled!
Actually no, it is not "ok" to do this, even during war it's potentially a violation of the Geneva convention. In a nutshell it's fine to kill your enemy but not to deliberately target them with weapons designed to cause permanent disability.
There is a gray area however where so-called "Dazzlers" can be used, however it's really one for the lawyers.
Obviously it depends a great deal on the laser, however high power lasers are now becoming cheap and available. Anything ~3B or higher - even at a distance of a few hundred meters in a fast moving vehicle does present a very real hazard to vision.
All the Chinese are doing is showing off their products - maybe the US will want some new subs, get 'em cheap from China!
Yes I am being facetious.
Except that you can't change the password when it's compromised.
..blast, I didn't finish... That said, your cynicism and scepticism, while a little presumptuous, is entirely healthy. Too many people accept things at face value! ". You say that you think he is a Professor, well so was Ward Churchill (who is a complete crackpot) until earlier this year. What evidence do you have to support your assertion that he's a complete crackpot? Why his standing in the community of course. In the case of this guy that "standing" is rather minimal. You say that you think he is a Professor Merely to point out that if the reporter can't get a basic detail like that correct they should not be relied upon to convey subtle and complex science in an accurate manner.
...least some of his papers, doesn't tell me a thing.
...what evidence is there that he has standing in the community of physicists That seems somewhat circular. To publish in journals such as PRL, you need to convince a group of your peers of the novelty of your work. If you manage to do this consistently over a length of time you gain reputation and their respect. In the end it's all like a web of trust. There is no "authority" to whom you can turn for an ultimate judgment, merely your peers and collective reputations (such as journals) that have been built up over many decades or centuries.That doesn't make these people infallible of course but it does mean that their opinion of something they have been studying for ~20 years carries more weight than that of some random idiot - or journalist.
That said, your cynicism and scepticism, while a little presumptuous, is entirely healthy. Too many people accept things at face value!
As an aside he was a lecturer here at Imperial for some time (Cosmology course), sadly he was tempted back over the pond.
I'm a dreadful cynic and I hope I'm wrong...
It's worse, much worse. Burning coal releases copious quantities of radioactive isotopes into the air.
You might like to give my Yet Another Rsync Backup Utility a try. It's very simple, but also very reliable as well.
If you are trying to carry out some sort of electrically large scattering problem through inhomogeneous anisotropic materials - you are in for a tough ride. Unless you can approximate things away furiously you will soon find the problem computationally intractable.
It sounds to me as though you really need to get a feel for the basics before embarking on anything too heavy. Time spent in reconnaissance is rarely wasted. Once you have an intuitive idea of how things work you will probably better understand the problem - hence be able to pick an appropriate solver.
A good general starting point in my opinion (particularly in the scalar case) is the use of pseudospectral methods. These will allow you to describe the field propagating through materials in a reasonably tractable manner - they are not too much effort to understand, reasonably quick thanks to the magic of FFTW and surprisingly robust.
I suspect your problem breaks down into three distinct domains:
Since the excitation is presumably beam-like, a pseudospectral technique (particularly one with coordinate scaling) will probably help with 1) and 3). With finite difference techniques you must model the field step-by-step through space. With FFT methods you can jump from one plane to the other - this can be orders of magnitude faster than finite difference.
How you manage 2 is the tricky part! The detail of this will depend strongly on what the material interaction is (e.g. will a scalar approximation suffice). I highly recommend you read Weng Cho Chew, Waves and Fields in Inhomogeneous Media for some pointers. Other things to look into:
A
...it's not science, it's a crackpot theory that fits the definition quite well...While I entirely agree with your sentiment, you probably mean "...a crackpot hypothesis...".
A theory is something that already explains current observations and allows one to predict new observations. Judging by the review his Magnum Opus presumably satisfies neither of these points.
I was actually going to mention that myself.
;-)
Mockery aside, you are quite right - "traditional" British teeth are terrible! That's partly the point of the link I gave you. Traditionally, you would get "functional" dentistry on the NHS - if your teeth work correctly then that was good enough. If you'd like them whitened and straight - if there was not good medical reason - then you would have to go private. Result - a nation of nasty gnashers and alternative alliteration.
Since we're getting all "cross cultural" it's arsehole by the way
Well, it's actually quite complicated. NHS dentistry changed quite a while ago. While we do have the NHS (National Health Service), which is supposed to provide health care free at the point of delivery it can be quite difficult to find an NHS dentist. Likewise NHS dentists themselves are a bit of a grey area. If you are truely bored this explains what they cover. Of course if you need work not directly covered you need to go private, hence the health tourism.
I don't know who to believe!Don't believe anything you read, even this!
Here's a fine example of international dentistry between the UK and Hungary. Of course, being an American you probably view London to Budapest as "local".
I'd love to moderate this up as "Funny", but I can't.
Agreed. That's something the networking people seem to have sorted out. It would also mean disk manufacturers could make a near order of magnitude increase in the "numbers" they put on the box overnight.
Now that would be a great scam:
1TB, could become 8Tb, then after a respectful delay.... 8TB and still pretend to mean the same thing.
Here's hoping quantum computing doesn't make a sudden arrival - otherwise people may start using qbits and confusion would really reign! ;-)
There's a discussion here. I assume that the problem must be quite subtle.
For the Mac users out there BibDesk is fantastic.
As a consequence of this the comedian Mark Thomas organised mass lone demonstrations, setting the world record for the number of political demonstrations in 24 hours. Unfortunately his original broadcast on the BBC is no longer available on their listen again facility (keep on the lookout for a rebroadcast - it was really very funny.
Details can be found on his web page about the demonstration zone and applying for a permit.
Following is a brief synopsis of his broadcast, for those with a mischievous sense of humour. I may have some of the details wrong, but you'll get the main thrust of it!
Apologies, this is all "code",
// You should never get here, unless you have a funny definition of short and long
Considering
for (short i = 0; i < MAX_NUM_ALIENS; i++)
(N.B. corrected case of "i")
There are even more nasty problems that could occur if down the line they decide that the maximum number could be very large and forget to change the types of the counter, consider the following, where we are "good" and use "typedefs".
#include <iostream>
/**
* A warning to all on mixing short and long.
*/
int main(void) {
typedef short counter_type;
typedef long limit_type;
limit_type max_counts=65537;
counter_type i=0;
std::cout << "max_counts=" << max_counts << std::endl;
for (i=0; i<max_counts; ++i) {
if (i%128 == 0) std::cout << i << std::endl;
}
std::cout << "i=" << i << std::endl;
return 0;
}
Do you (or other people out there) make use of compile time asserts, or numerical traits to avoid this type of problem? Failing that do you have any solid tricks to avoid the above, apart from the obvious e.g. making sure the types of counters and limits are the same?
A common problem I see with C++ is that you can do things in a very solid manner (e.g. type_traits, algorithm for_each) however at the potential expense of obfuscation - there's something comforting in a simple for loop... maybe that's just me.
Any comments?