Difference between jquery.post and jquery.get?

Question: What is the difference between those two AJAX calls and why would I choose to use either when using the asp.net mvc framework?
Comment: The difference is the same as the difference between POST and GET methods in ASP.NET. You included asp.net-mvc tag in your question so I am assuming you have some experience with it.
Answer: One uses POST and one uses GET.
As far as what they're meant for - the only real technical difference (please correct this post if I'm wrong) is that GET has a much shorter limit to the query string. In practice, GET is meant for when fetching something from the server. A GET call should not cause side effects on the server. POST is when you intend to send something on the server and have it do something with it.
edit: the word I was looking for, to describe GET, is idempotent. You should be able to make the exact same GET call an unlimited number of times, and get the same result every time, with no consequence to the server (provided of course that no one else has changed the server's state.) But remember that there are no technical barriers preventing you from misusing either GET or POST.
Comment: A Get can cause side effects, it should just be idempotent. See http://en.wikipedia.org/wiki/Idempotent#In_computing. (Not causing side effects is 1 way to be idempotent, but not the only way).
Comment: Thank you! "Idempotent" was exactly the word I was looking for while writing that, I just couldn't remember it.
Answer: $.post and $.get are just wrappers for $.ajax with respective values for the type parameter. (Lines 4888 and 4913 in the source.)
In MVC, you can specify that a controller action only accept requests made using a certain HTTP request type (using the AcceptVerbs controller/action attribute).
If you were submitting a request to such an action, you would need to specify the request type, in which case you might find $.post or $.get a handy shortcut to $.ajax.
Answer: The one gotcha I've run into is that $.get calls are cached by IE, which is a problem given you're usually using Ajax to refresh data. If you want to use GET but don't want to be cached, you have to drop down to $.ajax and pass cache: false in the settings.
Answer: get is an HTTP GET call, and post is an HTTP POST.
See Wikipedia for more explanation.
Essentially, if you are including data (such as with a form submission), use post; otherwise if you are just loading a page, or you want to pass query string parameters, use get. (any data you pass to get will be passed as query string)
edit:
They are separated because the underlying XMLHttpRequest object (the fundamental AJAX object in browsers) requires specifying a method. In fact, even lower than that, when you request a webpage you have to either HTTP/1.0 GET or HTTP/1.0 POST (or the other request methods). If you are talking from a design point of view, as an alternative to passing a string into some sort of "load" method, I can't say what the software architects behind jQuery were thinking.
edit2:
Actually if you look at the latest jQuery documentation, get and post are listed under "shorthand methods" and equivalent methods are given. So, they are just for shortening your code and are synonymous to the ajax method.
Comment: I know how the normal ones work but in terms of Jquery, I dont get why they are seperate.
Answer: **GET** - Requests data from a specified resource
**POST** - Submits data to be processed to a specified resource

GET is basically used for just getting (retrieving) some data from the server. Note: The GET method may return cached data.
POST can also be used to get some data from the server. However, the POST method NEVER caches data, and is often used to send data along with the request.
Answer: You should always use POST when pushing change sets - there are security implications, I will leave all the hory details of that to research.
Comment: Hory, a new word, perhaps a portmanteau derived from hoary and gory.


What is the relationship between graduate coursework and research?

Question: I feel like after graduate students pass their qualifying exams, they still have a lot of learning to do before they're knowledgeable enough in a specific area to understand and work on the open questions in that area. But how do they get there? Do they just take advanced courses in the area of interest, or are they expected to read up on their research area outside of coursework? If the second, should they be doing this while they're still taking classes, or do they start doing this after they're done with their coursework?
Answer: It depends. My PhD supervisor got me involved from Day 1 in research projects in his lab. He was down on programs where things were much more serial (do the required classes, pass the qual, do a proposal, do the research, defend). His students all had some research tasks from the beginning. If the student was unprepared for the task, there were papers to read or book suggestions, etc. This worked really well for me, though it may have resulted in me being somewhat under-prepared for the quals the first time I took them! I eventually passed and graduated.
Some advisors and programs take a different approach. They really want the student to concentrate on nothing but getting through courses and the quals until they pass the quals. Then it's the proposal (if they require one). How one gets the knowledge to get from proposal to defense is up to the student and the advisor to work out. I didn't complete my coursework requirement until late in my program, so I used courses to close knowledge gaps where a relevant course was available. Where it wasn't, I worked through books and papers that I could find that helped.
Answer: Yes, you're right, "starting research" prior to an adequate basic education can result in huge wastes of time. But it also makes little sense to "wait a few years" until all the required coursework is done. And, yes, even then, one is not over-educated.
Seriously, I think (and recommend to my students) that they maintain several different threads. The two main ones are attention to standard core material and more advanced courses, while also trying to skip forward to read about current events. The trickier third thread is trying to back-fill from current events to "standard material", as needed.
Almost any choice of "single thread" seems misguided.
Comment: I'm in math department and this answer is closer to what I've heard from my (provisional) advisor. I think the answer to OP's question highly depends on the department.
Answer: While I totally agree with the other answers, I would like to point out that there is a third variety out there in the market as well, over and above the two major approaches to coursework already pointed out. At least to me, this appears to be a more evolved approach, but of course, neither one is flawless and universally applicable (i.e. a lot depends on individual cases).
The idea is - first figure out how much do you need to get started with proper research-level work. This would be difficult for the student to work out on his/her own, and definitely requires inputs from the adviser. Once this part has been marked out, this should be approached at full throttle, i.e. no actual research till this part is behind you. After this is done, and in parallel with the actual research work thus started, keep on expanding your sphere of knowledge. A good idea is devote a stipulated number of hours everyday, forcibly detaching yourself from the actual problem, and just reading around the part you people decided on as minimum. The more you know, the better prepared you will be for your research, but it is not sensible to wait indefinitely for the same to happen, especially since there are (typically) progress metrics also involved (or something like an end-semester presentation of the work done in that semester, etc.).
IMO, the advantage of this strategy is - you are not deferring research work unnecessarily, and also, not just hitting on a research-level problem without being in any position to do so. And with time, the situation certainly gets better and better.


How do I jump to the next search result in a different window?

Question: Sometimes I have two windows open and I search for a word that appears in both. Hitting n only cycles through the results in the active window.
It'd be really convenient to somehow jump to the next search result in all open windows.
Comment: Also recently discovered `:windo %s/pattern/replace/ge`, which searches & replaces in all windows
Comment: While not an answer to the question, you could the files you want to search to the arglist, and then `vim /pattern/ ##` for all the results in quickfix
Answer: You can use :vimgrep to do your search over the windows and use 'switchbuf' with a value of at least useopen.
execute 'vimgrep //j ' . join(map(range(1, winnr('$')), '"#".winbufnr(v:val)'), ' ')
set switchbuf+=useopen

Now you can use the quickfix list to jump between matches you searched via :cnext/:cprev (I suggest mapping these) or by using the quickfix window, :copen.
Personally, I can't really see myself using this kind of search. I typically need to search more files so I use :vimgrep or :grep (I use ripgrep as my 'grepprg'). I use my own :Cfilter command to grep/filter the quickfix list.
function! s:cfilter(list, bang, pat)
  let [bool, operator] = a:bang ? ['&&', '!~'] : ['||', '=~']
  let pat = a:pat =~ '^/.*/$' ? a:pat[1:-2] : a:pat
  let pat = pat == '' ? @/ : pat
  call call('set'.a:list.'list', [(filter(call('get'.a:list.'list', []), "bufname(v:val.bufnr) ".operator." pat ".bool." v:val.text ".operator." pat"))])
  echo 'Filtered list: '.(a:bang ? 'not ' : '').'matching '.a:pat.' ('.len(call('get'.a:list.'list', [])).' items)'
endfunction
command! -nargs=1 -bang Cfilter call <SID>cfilter('qf', <bang>0, <q-args>)
command! -nargs=1 -bang Lfilter call <SID>cfilter('loc', <bang>0, <q-args>)

:Cfilter foo will filter the list for only entries with foo and :Cfilter! foo will filter the list with only entries without foo.
For more helps see:
:h :vimgrep
:h :_#n
:h join()
:h map()
:h range()
:h winnr()
:h winbufnr()
:h v:val
:h :execute
:h 'swb'


Room temperature related question

Question: If two objects are +10C and -10C from room temperature, would they converge to the same temperature at the same time? Say, room temperature is 20C and object a) is at 30C and object b) is at 10C would they get at the same time to 20C?
Comment: Beware of the Mpemba effect. :)
Comment: There are way too many variables that you have left out to even begin to answer the question. What are the masses of the two objects?. What are their shapes? (surface area to mass ratio can effect heat transfer). What are their specific heats. What is the size of the room (how much air surrounds the objects). You are wording this like the room is a thermal reservoir whose temperature will not change when it exchanges heat with the objects. Are the masses suspended in the air only or in thermal contact with other objects? These are just to name a few.
Comment: You are correct Bob, the problem is that since I'm noob at physics I didn't even know that I didn't know about those details. Thanks for the suggestions, I will work them out asap.
Answer: The rate of heat transfer is approximately proportional to the difference in temperature between them. The heat transfer equation is an exponential one: $$T(t) = T_0 + (T_0 -T_{room})e^{-kt}$$ So, setting $T = T_{room}$, we see that they would reach room temperature at about the same time. However, this is a rough approximation that assumes that both objects and their environments are identical and that the temperature difference isn't too large.
Comment: They would never reach room temperature, but the absolute difference from room temperature will be equal for all $t$.
Comment: @Jasper: You're right, theoretically, they never reach equilibrium. But practically, yes.
Comment: Small remark: Also known as "Newton's law of cooling".
Answer:
If two objects are +10C and -10C from room temperature, would they
  converge to the same temperature at the same time?

Not necessarily.
For instance, if the objects are placed on a carpeted floor (presumably, with a low thermal conductivity), we may expect that the dominant cooling mechanism will be air convection.
Air convection should be more robust for the warm object, since warm air will rise and promote circulation, while cold air will tend to stay down and cause stagnation.
So, under these conditions, everything else the same, the warm object is likely to get to the room temperature sooner than the cold object.
Answer: The answer is that it depends. As worded, there are too many unknowns to assert that one will reach equilibrium (or near equilibrium) temperature quicker than the other. For instance, the $C_V$ dependence on temperature, which usually is an increasing function of $T$, will have an impact on the solution. Usually, it takes less energy to heat up a metal from $10°C$ to $20°C$ than the energy "released to the environment" for letting cooling an object from $30°C$ to $20°C$. But the difference is small. This difference might not be small at all at a few Celsius degrees above the absolute zero though.
Then there is another effect that will have an impact: the hotter object will lose more heat to the environment than the cooler one, due to Stefan-Boltzmann law. The larger the surface, the larger this effect will have an impact, making the cooling of the hotter object faster than the heating of the cooler object. Here, the higher the temperature, the stronger this effect will be. At room temperature the effect might be small, but at higher temperatures (near $1000°C$), it might be quite significant.
Lastly, as V.F. claims, there could be also an impact from convection, which may favor the hotter object to cool down faster than the colder one to heat up. But it depends on whether the objects are in vacuum, or air, or anything else, and their position in the box/room too. This could involve fluid mechanics and make the problem quite messy.

Room temperature related question


What is "moral goodness" according to Kant?

Question: "Immanuel Kant argues that mere conformity with the moral law is not sufficient for moral goodness." In this context what is the literal meaning of "moral goodness" in simple terms?
Comment: Can you provide the original reference source?
Answer: As far as I remember Kant wrote the "highest good" is honesty in:
KANT, I.  1781.  The canon of pure reason: section II: of the ideal of the highest good, as a determining ground of the ultimate end of pure reason.  (In Weigelt, M. ed. Immanuel Kant: critique of pure reason.  London: Penguin Classics, 2007)
Comment: If speaking of the highest good (which goes into the right direction), one can refer to the *Critique of Practical Reason* for the theoretical arguments (outright contradicting the first critique sometimes), and to the *Metaphysics of Morals* and *Religion*, maybe *Anthropology*, for the more practical aspects and especially how this is linked to his notion of *character*. Apart from that: Could you elaborate on the link between moral goodness and honesty? Sounds interesting!
Comment: The link is related to creativity and "the Creator". Honesties cause correspondence causes creativity and change.


How can I keep a rabbit cool?

Question: As pointed out in the question What temperature ranges are appropriate for a pet rabbit? temperatures above 85 °F (29 °C) are hazardous to rabbits.  How can I help my rabbit stay cool in warm temperatures?
Answer: Domestic rabbits, are from rabbits native to Europe (Spain and Portugal), they are crepuscular, being most active around dawn and dusk. In the wild, they tend to spend the heat of the day in relatively cool underground warrens. Temperatures above 85F (29C) can be life threatening to them.
Optimally a pet rabbit will be kept in an air conditioned home, but this is not always possible.  Options for supplemental cooling are:

An electric fan that provides a breeze that the rabbit can enter and leave at will
A bottle of frozen water that the bunny can snuggle up to (optional wrap in towel)
A ceramic tile (available from DIY stores) provides a cool place to lay when temperatures temporarily get high during the day
Ceramic tiles can be frozen and rotated in and out of the freezer for long hot spells.
Cool water dabbed or wiped on a rabbits ears will moisten the hair and the evaporation will help cool the rabbit

When we are camping with our rabbits, we generally leave them in the air conditioned camper, while we go out and have adventures during the heat of the day.
Often a rabbit presence is required at an educational or fund raising event, where air condition is not available.  Shade is important but is not enough when temp get high. In these cases we take a cooler with a few 1 liter sized frozen bottles. Some bunnies will snuggle next to them to stay cool, other bunnies dislike the condensation on the bottles.  For the rabbits that don't like being next to the bottle of ice, I moisten my fingers with water (often the cool condensation) and rub it on their ears to help them cool down.  A rabbits ears are a major part of their heat regulation system.
Answer: My rabbit is sensitive to heat, and sometimes I will wrap an ice pack up in a thin towel, and hold it against her ears.
Since a rabbit's ears are used to cool them off, this helps the process speed up.
Answer: I wish to point out some other options I came across for cooling off rabbits in extreme heat, while the webpage does not refer to rabbits as Pets directly it does discuss solutions to cooling off rabbits that I do not see mentioned here including using Misters (a very common practice for cooliing animals and humans here in Phoenix).  Also setup your hutches so they are under trees, this way there is no direct sunlight on the the hutch roofs radiating a high temperature.
Here is the web page with other thoughts on dealing with heat when raising rabbits.
Answer: Although my rabbit doesn't seem particularly troubled by heat, sometimes I place a freezer pack atop his cage. It provides a cool downdraft and dripping cool water.
He does not like to sit or snuggle a cold object. Anything that's cold enough to stay cool to the touch on a hot day, will be either freezing after a minute's snuggle, or doesn't have enough heat capacity to last long. Once a bunny's butt has been frozen once, he won't be very inclined to sit on the same device again.
Comment: Dripping water may not be a good idea. One of the primary causes of [head tilt is ear infection](http://rabbit.org/head-tilt-causes-and-treatment/).  To create a cool draft a fan might be a better option.
Comment: @JamesJenkins Thanks, I'll keep an eye out for water getting on/in his ears. I've mostly just noticed the wetness on his back though.
Comment: What kind of floor does the cage have? Sometimes when we are at off site events (outside but under a roof or canopy) I will put a frozen bottle down, the condensation will pool on the concrete and some rabbits will lay on that cool wet spot.  If that is an option for you it might be a safer choice.
Comment: @JamesJenkins Wire floor. Well, he's still young and his preferences still seem to be changing. We'll see.
Comment: Wire bottom cages always make me mention these two questions http://pets.stackexchange.com/questions/2677 & http://pets.stackexchange.com/questions/2769
Comment: @JamesJenkins Yeah, it's not his favorite place to be. He spends most of his time roaming indoors, flopped in a corner or in front of the window.

How can I keep a rabbit cool?


can't find linker symbol for virtual table for 'QAbstractItemViewPrivate' value

Question: I'm facing an issue while developing my code for an user interface. I'm using Qt 4.8 on a Linux distro deployed with Yocto.
Here a really simple snippet of my code:
<code>//  MyWidget.h
class MyWidget : public QWidget
{
    Q_OBJECT

public:
    MyWidget( QWidget* parent );
    ~MyWidget();

signals:
    void request_GoToNext( QString );           //!< Go to next panel

private slots:
    void onNext( QModelIndex index );

private:
    QTableView          *tableView;
    QStandardItemModel  *dataModel;
}

//  MyWidget.cpp
MyWidget::MyWidget( QWidget *parent ) : QWidget(parent)
{
    this->tableView = new QTableView(this);
    this->dataModel = new QStandardItemModel();

    // "Fill-in" data model with the list of files in a specific directory
    ...

    connect( this->tableView, SIGNAL(clicked(QModelIndex)), this, SLOT(onNext(QModelIndex)), Qt::UniqueConnection );
}

MyWidget::~MyWidget()
{
    disconnect( this->tableView, SIGNAL(clicked(QModelIndex)), this, SLOT(onNext(QModelIndex)) );

    this->dataModel->clear();

    delete this->tableView;
    delete this->dataModel;
}

void MyWidget::onNext( QModelIndex index )
{
    emit this->request_GoToNext( this->dataModel->item(index.row(), index.column())->text() );
}
</code>
Problem has its origin when emitting signal 'request_GoToNext', that makes the application crash or the debug stop due to segmentation fault.
What I can see is that, in QtCreator, the point where the application seems to fail is in the file qabstractitemview.cpp, more specific in this function:
<code>QStyleOptionViewItemV4 QAbstractItemViewPrivate::viewOptionsV4() const
{
    Q_Q(const QAbstractItemView);
    QStyleOptionViewItemV4 option = q->viewOptions();
    if (wrapItemText)
        option.features = QStyleOptionViewItemV2::WrapText;
    option.locale = q->locale();
    option.locale.setNumberOptions(QLocale::OmitGroupSeparator);
    option.widget = q;
    return option;
}
</code>
To me it sounds really strange.
After emitting the signal, the application should delete current panel and build another one: setting some 'qDebug' calls this seems to happen, deleting current panel (and its children) and creating a new one, but the application fails before showing the new panel.
It seems like the program "exits" the slot 'onNext' after having delete everything related to MyWidget.
Also, in teh Application Output of QtCreator I can read this message
can't find linker symbol for virtual table for 'QAbstractItemViewPrivate' value
NB - Observation
If I rewrite the code inside my slot in this way
<code> void MyWidget::onNext( QModelIndex index )
 {
     QObject::startTimer(1);
     emit this->request_GoToNext( this->dataModel->item(index.row(), index.column())->text() );
 }

 void MyWidget::timerEvent( QTimerEvent *event )
 {
     QObject::killeTimer( event->timerId() );

     emit this->request_GoToNext( this->dataModel->item(index.row(), index.column())->text() );
 }
</code>
Everything works fine! That's why it seems something related to "exit" slot call to me.
Many thanks for your help
Answer: After some other tests, I think I've found which is the issue and how to solve it.
Here a simplified snippet of my code, where there is a class Button used by a class Parent.
When button is clicked, it could cause a panel change, or raise a message, or do some other actions (not detailed beause not relevant to the question).
What I found is in slot onClicked of class Button: entering the first if, the program emits the signal request_GoToPrev, which cause the class Panel to delete current panel (and its childs, even compirsed the Button!) and raise a new one.
But after emitting the signal and do all actions required, the program "comes back" to the point when it has emitted the signal and continue the instruction execution: when it reaches the second if it creashes because this is no more consistent.
That's what it seems to be after my tests. Putting a return call just after the signal emission in the first if problem is solved.
<code>// HEADER: Button.h
class Button : public QPushButton
{
    Q_OBJECT

public:

    Button( QWidget *parent = 0 );
    ~Button();

signals:
    void request_GoToPrev();                    //!< Go to previous panel
    void request_GoToNext( QString );           //!< Go to next panel
    void signal_Error( int );                   //!< Error code

private slots:
    void onClicked();

private:
    typ_Button_tags *widgetTags;                //!< Pointer to the tags structure that defines the \ref Button widget
    typ_Shared      *privateCtx;                //!< Reference to runtime application structure
};

// C: Button.cpp
Button::Button( QWidget *parent )
    :
      QPushButton(parent)
{
    //  Do some settings, like: font, stylesheet, focus, size..
}

Button::~Button()
{
}

void Button::onClicked()
{
    //  Callback to be called when button clicked
    if( !this->widgetTags->callbackClick.isEmpty() )
    {
            emit this->request_GoToPrev();

            /*  !!! ATTENTION   !!!
             *
             *  Here the instruction return HAS to be written, otherwise the application crashes.
             *  In fact, when running, the signal 'request_GoToPrev' is sent, but the flow of the
             *  process should exit the call of this slot.
             *  Doing that, 'this' is no more consistent after having emitted the signal, so the
             *  application face a segmentation fault.
             */
            return;
    }

    //  Message box
    if( !this->widgetTags->msgText.isEmpty() )
    {
        //  Do some other actions on 'this'...
    }
}

// HEADER: Panel.h
class Panel : public QMainWindow
{
    Q_OBJECT

public:

    Panel( QWidget *parent = 0 );

private slots:
    void on_GoToNext(int index);
    void on_GoToPrevious();
    void on_Error(int errId);

private:
    Button *Btn;
};

// C: Panel.h
Panel::Panel( QWidget *parent )
    :
      QMainWindow(parent)
{
    //  Do some settings: font, stylesheet, focus, size...

    this->Btn = new Button( this );

        connect( this->Btn, SIGNAL(request_GoToPrev()), this, SLOT(on_GoToPrevious()), Qt::UniqueConnection );
    //  Do some actions to layout the button inside the panel
}

void Panel::on_GoToPrevious()
{
    //  Do some check...

    delete this->Btn;

    //  Do some actions...
}
</code>


The existence of free lunch

Question: Is there a free lunch or something beneficial but with zero price? Is air in an unpolluted area free lunch? If so, the sentence "there is always a tradeoff between benefit and cost" is not in general true. Is this correct?
Answer: The concept of a free lunch is a philosophical/political phrase (not an axiom or law in economics). It was popularized by Nobel Prize winning economist Milton Friendman
The concept depends too largely on how you define free to make a general statement about the concept. For example, while Oxygen is readily available for your consumption from the atmosphere at a cost of zero, Friedman argued there was always an opportunity cost involved (you could be breathing ultra-pure oxygen from an oxygen tank to avoid pollutants in the atmosphere that will give you cancer) so technically there is a cost.
Comment: Good point quoting the Friedman argument. I was thinking about opportunity cost but for some dumb reason, did not come up with an example that convinced myself.

The existence of free lunch


Is it okay to steal something from your thief?

Question: Is it okay to steal something similar, of what was stolen from you, from the thief? (If you couldn't find the original thing that was stolen from you.)
Ex. My neighbor stole my football and denied ever taking it, but my family witnessed him taking it. I never found it again so I couldn't take my football back, but would it be okay if I take one his regular footballs, just like mine but a bit smaller.
Comment: A wrongdoing does not justify or grant another wrongdoing. This logic of yours is twisted and beyond common sense.
Answer: Stealing from your thief (aside from recovering your own football) is not a good idea (Islamically, legally, or practically).  Theft is a sin---this is uncontested.  So the question is essentially whether or not this kind of "revenge theft" is permissible.
This fatwa indicates a lack of consensus on the matter:

Imam Haskafi (Allah have mercy on him) states:
"It will not be permitted for the rightful one to recover his right from other than the actual item that is owed to him. However, Imam Shafi'i has allowed this (to recover one's right even from other than the actual item that is owed) and his position is more facilitating."
Darul Iftaa

However, "revenge theft" goes against the spirit of Islam, where forgiveness and charity are central: But if you give [from your right as] charity, then it is better for you, if you only knew. (Qur'an 2:280).  Discussing petty theft:

It is best to forgive the person and forget the wrong, for the sake of Allah, seeking its reward with Him.
Qibla.com, sourced from IslamQA.org

Taking back your own football.
If you find your football, it's still legally your football (The thief does not legally own the stolen item..., IslamWeb).  Consequently, taking your own property back is not stealing.  IslamWeb describes a hadith:

Ahmad and Ibn Majah reported from Samurah that the Prophet (Sallallahu Alaihi wa Sallam) said: "If belongings of someone are stolen or lost and thereafter he finds the same belongings with another person, he (the real owner) is more entitled to take them. In this case, the purchaser will take the price back from the seller."

There might be some exceptions to this in modern law, e.g., a statute of limitations.  It also gets a bit messy if the thief goes on to sell the stolen goods: if you take your own property, the buyer might think you stole it from them.  There's also complications about not committing a crime (e.g. trespassing) in recovering your property.  See Law.SE.
Taking something other than your own football.
If you take something other than your football, then (by definition) you are taking something that is not yours.  It's very likely this will be viewed as theft.

Whoever claims something that does not belong to him; he is not one of us, so let him take his place in Hell.
Sunan Ibn Majah 2319 [grade: sahih]

Even if it were Islamically permissible, it's probably still legally theft, which is a crime: Muslims are generally obliged to abide by the laws of the land and the country they live in... (DarulIftaa.com).
Moreover, there's other risks: (a) How does one accurately appraise the value a used football? (b) What if your "revenge theft" results in "revenge revenge theft"?
Answer: Stealing is wrong according to Qur'aan and Hadith. The punishment for Stealing is cutting-off the thief's hand.
Taking same thing from the thief is only for body parts.
eg: If someone steal your kidney in the name of surgery, then the punishment for this stealing is taking one Kidney from the Thief. cutting his hand is not applicable for body parts. Like that. eye for an eye, tooth for a tooth..
but for a property or money this law wont fit.
I think you can forgive him.


Redirect page URL to home URL without using a plugin

Question: How do I redirect this page URL, http://localhost/wordpress_rnd/?page_id=2, to the home URL, http://localhost/wordpress_rnd/, without using any plugins?
Answer: The correct way to do this is using the template_redirect hook by adding a function to your functions.php:
function redirect_to_home() {
  if(!is_admin() && is_page('2')) {
    wp_redirect(home_url());
    exit();
  }
}
add_action('template_redirect', 'redirect_to_home');

Comment: could you tell me why do we have to use exit after     wp_redirect(home_url()); ?
Comment: Good question and I can't say for sure, but I know that [the official documentation example uses it](https://developer.wordpress.org/reference/functions/wp_redirect/), so I use it.
Answer: add_action( 'init', function() {
    if ( 0 === stripos( $_SERVER['REQUEST_URI'], '/page_id=2' ) ) {

       wp_redirect( home_url(), 301 );
       exit;

    }
}

Put this code in a mu-plugin or in your theme's functions.php file
Answer: Locate page.php (assuming you've created it already). After this line <?php get_header(); ?> add the following code:
<?php if(is_page('2')) {
    wp_redirect( home_url(), '302' );
} ?>

In the code above, is_page('2') is actually the ID of your page as  you've specified in your example.
Comment: This can do the job but I think it is better, depending on the exact situation, to do the redirection at server level, for example using .htaccess, so zero line of code is exectued and you don't waste resources.
Comment: @cybmeta valid point indeed :) Thanks for bringing it to my attention.
Comment: One more note. Use your code in an action hook, like `init` suggested by @paul in his answer, not in a template file as you suggested. If you switch to other theme, you loose the funtionality, that is why functinalities and look&feel (theme and template file) should be separated. I would edit the answer to add the action hook.
Comment: True as well. There's time one doesn't think about optimising the code but the focus is on getting the task at hand done faster :) This is was (in my opinion) one of those scenarios.

I do, however, really appreciate your input and it's really valuable - everyday I learn something new in here :)
Comment: Write your code in an action hook is as fast as write it in  a template file.
Comment: I was talking about the solutions as well. Sometimes, you just need to think fast and solve a quick job, sometimes you have to optimize a piece of code. Nonetheless, no code is bad, at least from my point of view.
Answer: WP_REDIRECT is the function that you need to use for redirecting in wordpress. It can be used like :
wp_redirect( $location, $status );
exit;
//$location is required parameter. It is used to give the target url to which page will get redirected.
//$status is optional. It is used to set status code. Default is 302

You can use this function to redirect users from one page to other. It should be placed in either functions.php or the template file which is being used to display the current page. Now to use it in your situation, simple place the following code at the bottom of your functions.php file
$redirectFromPageID = 2;  //Redirect from Page having ID of 2
$redirectTo = home_url(); //Redirect to Home URL

if( is_page( $redirectFromPageID ) ){
    wp_redirect( $redirectTo  );
    exit;
}


SPSA max_trials

Question: I'm using SPSA as an optimizer in VQE algorithm.
The code runs on ibmq-qasm-simulator.
I've set SPSA max_trials parameter to 500, but, when I run the code, it makes 1000 iterations.
I've tried with COBYLA optimizer too, and it makes correctly 500 iterations.
Does someone know why?
Thanks
Answer: For each trial SPSA evaluations the objective function twice for + and - some small delta. Hence its total calls to the objective function are twice the max trials number. COBYA makes one evaluation for each iteration, that is what it's behavior is. Other optimizers, that are gradient based, where it's using finite difference method, will make many calls, depending on the number of params, to compute the gradient at each  iteration. Oh, and SPSA, when it does calibration up front, will do a few more calls for this purpose.

SPSA max_trials


determine the closest points on the network?

Question: In ArcGIS, I have only a point layer relating to a hydrography network's pour points. Now I want to write code in VBA that selects a point from this layer, then highlight the closest points to this point. One of this points must be downstream of the desired point and another point must be upstream.
In this work, I must measure the distance between two points on the network, not a direct distance between two points. Also both points are related to a layer.
Also the program must be able to determine one of points in downstream and another points in upstream.
I don't know how to determine the closest points on the network.
Please help me again.
Comment: VBA will soon be deprecated.  I recommend using .NET instead.
Comment: Tanks,But I need to work in VBA,because it is part of my thesis.
Answer: Take a look at the VB6 custom Trace Upstream Task and also the TraceDownStream task.


Why does Walmart (SYMBOL:WMT) have its Q1 2015 end April 30 instead of March 30

Question: The Walmart 10-Q form covers the period for the three months ending April 30th while other companies post their first quarter reports for the three months ending March 30th. Why does Walmart end one month earlier than other companies? How are companies regulated in this regard?
Answer: A December fiscal year end, which gives a first quarter of three months ending March 30, aligns the fiscal and the tax year. This can be very convenient and in the United States is sometimes required. In addition, some regulated firms like banks are required to prepare documents on calendar quarters regardless of the month of their fiscal year end, and it is often cheaper and easier to have them be synchronized rather than close the books additionally for regulators.
Firms may be motivated to alter their fiscal years so that they can better serve their customers or investors. For example, some banks have a fiscal year end not in December so that customers needing to do financial transactions at the end of their year could do so without the bank simultaneously having to close their own books. For many years Morgan Stanley did this. Walmart may be doing this because December is the Christmas shopping season in the United States and management wants to focus on that critical shopping period without the distraction of accounting issues. Additionally, if some shopping comes in after the holiday (say if Hanukkah comes late or because of a rash of belated Festivus shopping), it might split a single shopping season into different fiscal years which could be undesirable for investors trying to compare retailer performance.
I don't want to lean too hard on any of these explanations for Walmart's timing. If I recall correctly from looking in Compustat a few years ago more than 80 percent of US listed firms have a December FYE and this didn't vary a huge amount across industries.
UPDATE:
I went into Compustat and I redid the table of retail, banking, and other firms showing the months of fiscal year end the last 12 months (8/2014-7/2015).
I was surprised to see that retail was indeed vastly (>20 times) more likely to have a January FYE than a typical publicly listed firm in 2015.  The results appear in the figure below.

Source: Compustat
This gives credence to the hypothesis that as a retailer with significant holiday sales, Walmart may have a January FYE to highlight those results.
Comment: This is a good answer, but incomplete— it might be worth adding a reference to explain that Walmart, being a large retailer that does significant has significant sales before and after Christmas, would benefit from closing its Q4 books at the end of January, rather than immediately after the holiday, both from a resources standpoint and to include a complete picture of holiday season sales.
Comment: I integrated your suggestions into my answer. Thanks for the feedback.
Answer: I offer the following reason why a business like Walmart may desire to have January end as its closing-date for the fiscal year: in anticipation of the high-season of Christmas, it is natural that inventories rise "abnormally", in order not to lose sales. Most probably Walmart has return-contracts with suppliers. So during January is when any products that did not fulfill forecasted sales are returned (especially for Christmas-specific products) in order to optimize inventories.
Optimizing the value of inventories is essential for a commercial company. Assume now that such optimization takes place during January, but the fiscal year closes on Decemeber 31: the optimization would never show in the official yearly Financial Statements. The company would have to include Notes saying things like "inventories may appear high, but during January we have returned... etc". But a note in the Financial Statement is never as strong as the magnitude appearing on the Balance Sheet itself. So the company, in order to allow for an actual management practice to show in the Financial Statements (and not in order to artificially embellish its financial picture), closes the year on January end.


Is sheathing required under a hybrid concrete tile roof?

Question: We have hybrid concrete tile roof that has concrete tiles attached to a dense foam backing.  The roofing was installed about 15 yrs ago.  In looking in the attic, I noticed there is not plywood or other sheathing under the roof tiles, just an underlayment.  Can this type of roofing system be installed without plywood or some decking?
Comment: As answered, it is not required for tile roofing. However, some structures require sheathing to distribute wind and seismic loads. Your house is apparently not one of these structures. Just because a building has tile roofing does not necessarily mean the building does not require sheathing, other factors may be at play. Just sayin'.
Answer: Its odd looking, but the batten support lets the tiles 'notch' into place.  You'll see the same support for clay tiles, also.
Because of the 'hanging' aspect of the tile, most locales only allow tile roofs for pitches between 4/12 and 6/12 (rise over run).  Lower pitches are possible, but then waterproof membranes are required.  In those cases, sheathing support for the membrane would be needed.
You don't mention it, but not using  sheathing is usually only done in warmer climates, where summer heat is the main problem.


How can I recreate this distortion effect from Midsommar?

Question: I want to create a distortion effect around someone's head, kind of like what a swirly bokeh would do.  There are two different shots that I could find that use this effect in the film 'Midsommar', one in which there is a swirly distorted effect around a head, and another where general swirls around the screen appear.  While it looks like a keyframed liquify effect from PhotoShop, I'm not sure if it can be recreated in after effects.  How can I do this?

https://giphy.com/gifs/a24-midsommar-QW3GavVLEeTa3Rpkx1
Answer: Without having seen the movie, it may be difficult to get it down exactly, but here is what I came up with.

Duplicate your layer twice, so that you have three copies.
On the top layer mask out the person.

Set the mask feather to around 30px.
Copy and paste the mask to the other two layers.
On the middle layer, set the mask feather to 60 and the mask expansion to 60. (can be adjusted to suit).
On the bottom layer, set the mask to subtract mode and add a 'Turbulent Displace' effect to the layer.
Adjust the size to suit (I chose 30) and you can keyframe the 'Amount' to have it animate on or off. I also added the expression 'time * 500' to the 'Evolution' property to add some movement.

Here is what mine ended up looking like:

Hope this is close to what you're after.
Comment: yes!  the keyframing is a bit fast/bouncey but I'm sure I can slow that down.  otherwise this is exactly what I needed
Answer: This is a desired look that stills photographers have been creating with Helios 44 lenses. It's quite possibly a native analogue effect see swirly bokeh.  To simulate the effect using the above using @clif's three layer solution. On the bottom layer with spherical distortion, radial focus blur, and some circular smearing increasing at the boundary of the image.
Ref:  https://live.staticflickr.com/967/27986297808_2f0f5ebaf2_b.jpg


How can I dynamically restrict pan extents on an image layer in OpenLayers 3?

Question: I have been sandboxing with OpenLayers 3 and thus far have been happy with the results.  I have used answers on this site to restrict my most zoomed out level from panning and to restrict the range of allowed zooming.
I have encountered the problem though that once a user zooms in I want the extent to be restricted to the original boundaries of the image and not to the new limits of the viewport, that is, you should still be able to pan to the edge of the original map, even zoomed in.
How can I adjust the extent correctly on zoom so that my users can pan on the zoomed map, but not on the unzoomed version?
<code>var extent = [0, 0, 700, 800];
var projection = new ol.proj.Projection({
  code: 'EPSG:4326',
  units: 'pixels',
  extent: extent
});
var map = new ol.Map({
    target: 'map',
    layers: [
new ol.layer.Image({
  source: new ol.source.ImageStatic({
    url: 'http://realmsofdespair.info/world-map.jpg',
    projection: projection,
    imageSize: [700, 800],
    imageExtent: extent
  })
})
    ],
      view: new ol.View({
minZoom: 2,
maxZoom: 5,
projection: projection,
center: ol.extent.getCenter(extent),
extent: [350, 400, 350, 400],
zoom: 2
</code>
})
      });
The above is my test code, forgive the crudeness of the model, I'm new to GIS in general and to OpenLayers in specific.
I realize that this example has the panning completely locked down, I suppose I've been looking for a per zoom level extent transformation or a javascript event, perhaps zoomend,  that can be called on zoom so that the extent can be rewritten.
I suppose I could be confusing my actual resolution with the mapunits, so that if I'm zoomed in 8x 1 pixel in the original picture is now 8 in the zoomed.  Eventually I plan to replace the jpg with a vector graphic, but this is a test of concept.
Answer: I save my center when start the map.
Then if user try to move the map on Zoom 0 i reset the view.
In your case if detect a zoom change you could change the extent
<code>//Init the first extent
    var extent = [-79.608, -1.1, -53.106, 13.721];
    extent = ol.extent.applyTransform(extent, ol.proj.getTransform("EPSG:4326", "EPSG:3857"));
    map.getView().fitExtent(extent, map.getSize());

//zoom 0
    var centerZoom = view.getCenter();

    view.on('change:center', function (evt) {
        var zoom = view.getZoom();
        var center = view.getCenter();

        txtCenter = '' + center;
        txtCenterZoom = '' + centerZoom;

//reset the center if user move it
        if (zoom == 0 && txtCenter != txtCenterZoom) {
            map.getView().fitExtent(extent, map.getSize());
        }
    });
</code>


How have Farallon plates's remnants stayed as they were inside the mantle?

Question:
Why hasn't the subduced Farallon Plate's materials been recycled? Why do they appear to be flowing in a molten state?
Comment: What makes you infer that they "appear to be flowing in a molten state"?
Answer: Rock is dense, is a good insulator, and usually has very high specific heat capacity; the crust is also kilometers thick. The combination of these qualities means that it takes a very long time, even geologically speaking, for crustal blocks to melt completely in the mantle. This is exacerbated by the fact that the mantle, especially the shallow layers close to the crust, is not actually much hotter than the melting point of most of the minerals in the rocks.
The reason that the crust is still visible in seismic wave variances while it moves in an apparently molten fashion is that even though it hasn't been completely melted it has been in the mantle long enough to reach a uniform high temperature, high enough to become plastic and flexible. So it still presents as a density anomaly because its not yet as molten as the material around it but it will flow, if slowly, because it is semi-molten, similar to the asthenosphere.


Can I expect samsung mhl adapter to work on my htc?

Question: Mine is HTC One X and I am going to buy a mhl to hdmi adapter in our local store. Can I expect samsung or other random mhl adapters to work on my HTC One X in case Stock adapters are out of stock or too expensive?
Answer: Generally its better to get one that matches the brand.  However it is the same technology so it MAY work.  Ask about the return policy to make sure you can return it in case it doesn't work.  You should be fine, though I cant say with 100% certainty.
Answer: Samsung has two types of MHL cable: an 11-pin one for their more recent phones, and a 5-pin one for their older phones. The 5-pin one is standard and will work on non-Samsung phones. The 11-pin one only works on newer Samsung phones.
Third-party manufacturers tend to also sell both kinds, so look at which phones the cable says it is for. If it says it's for Samsung Galaxy S4, or if it's Y-shaped with a second USB output, then it's an 11-pin one and won't work with your phone.
See my other answer on How does MHL work? to learn more about the difference.
Answer: Be careful - I've tried this this week and was unsuccessful. I bought a Samsung Galaxy S3/4/Note etc mhl cable thinking they were all the same and the micro USB is longer than normal. It wouldn't fit in my Nexus 7 or my HTC One X.
Comment: Thank you. I heard s3 have different mhl tevhnology unlike others. But htc adapters are pretty expensive.. :(
Answer: I would recommend not to use the one for Samsung on HTC One--I tried several times both for charging and for using MHL HDMI cable connecting to TV-- the micro USB for Samsung Galaxy S4 and S5 did not smoothly fit into HTC One though they all use micro USB and they all look the same.


Does an induction stove require flat bottomed vessels?

Question: Does an induction stove require flat bottomed vessels? What materials besides stainless steel works for an induction stove?
Answer: Most reputable sources say that curved surfaces such as woks don't work as well on induction stoves. They even make special tools and cooktops for inductively heating woks.  This phenomenum could be because of the angled surface or the extra distance from the cooktop, but it's probably both.  It's not that these surfaces are immune to induction heating, just that they aren't efficient.
Angled surfaces won't respond as well to induction stoves since the maximum amount of energy is generated in a surface when it's flat with respect to the stove.  (Magnetic induction is proportional to the cosine of the angle between loops, for those of you who want to know the physics).
Distance is probably the biggest factor.  Induction works at a small distance from the stove (there are numerous examples on the web of induction heaters working through newspapers or a magazine.)  However, the design of these cooktops makes it so the magnetic field that drives the heating dies off over a very short distance (For example, the Swiss Federal Office of Public Health determined when studying their effect on pacemakers that the field is negligible after 10 cm or 4 in).
As far as what materials work, usually cookware that's induction cooktop compatible has a curly icon on the box to indicate this.  Common compatible materials include magnetic stainless steels (not austenitic steels), iron, and carbon steel.  The article on induction cooking on Wikipedia has a great explanation on what cookware works for induction cooking and why.
There common rule of thumb is that if a magnet sticks to the bottom of a pot or pan, it's compatible with an induction stove. Surface resistance is a more scientific measure, but to get the  complete picture of why certain things do or don't work would require a college course in material electromagnetics. For a more detailed analysis, see the wikipedia page I linked. For most cookware these are only minor concerns compared to the magnet test, until you accidentally leave aluminum foil on an induction stove and it starts to melt.
It should be noted that cookware needs some inductive metal in it, but not all of it needs to be an inductive metal.  Some cookware designed for an inductive stove has an iron bottom with aluminum sides because aluminum conducts the heat better for more even cooking. Clad cookware with a mixture of the right metals works too.
Answer: While an induction stove does not require flat bottomed vessels, the heating effect will reduce quite rapidly once the material starts to curve. This may be what you need, depending on the recipe you are working with, and this is not unique to induction cooking, though the effect is more acutely felt than on traditional electric hobs.
As for materials, induction will work with any metal that can be affected by magnetism. The quick check is to bring a magnet with you when buying cookware; if it sticks to the bottom of the pan or pot you are looking at, the pan or pot will work on an induction oven.
Answer: Any vessel that you can stick a magnet to will work with induction. The material to be heated needs to be in contact with the surface, so a curved bottom like a true wok will not work because there will not be enough surface area in contact.
Comment: The last part of your answer is wrong. Induction does not require surface contact at all. You can put a wooden cutting board on the stove and a pan on top and it will work. However, I am not sure if a rounded bottom will work or not, or else I would have answered myself. All I remember from high school physics is that induction requires the induced current to be perpendicular to something, so a curved surface may deviate too much from what would be considered a perpendicular setting, or it may be alright. My guess is that it will work, but the heat will get weaker on the outer part.
Comment: The first part is only usually correct.  Aluminum foil, for example, will melt and ruin an inductive stove top despite being nonmagnetic because it's so thin.


Ceiling leaks When it Rains, Roof Looks Good

Question: My ceiling drips water sometimes when it rains (especially when it rains hard). It seems inconsistent though, so I think that it may have something to do with the angle at which the rain comes in. The leak is at the apex of my ceiling, so I know the leak must be just about directly above that spot on my ceiling. My roof is about 10 years into its life span, but it seems to be in good shape. I got on-top of my roof, but couldn't see anything wrong with the shingles near the spot that leaks. How should I proceed? Should I buy some more shingles and put them on top of the others at that same spot on my roof? Should I take up a bucket of water and see if I can reproduce the leak?
Comment: Not sure what you mean by "apex of my ceiling". Is it a cathedral ceiling?  You'd also be surprised at how far water will travel once it hits framing.
Comment: I have a one story home, and the ceiling is slanted just like the roof. The leak is at the highest point of my ceiling, so there isn't at a higher point on the roof where the water could be coming from.
Comment: So, you have a flat, sloped roof, with no ridge? Perhaps the problem is with the high edge of the roof. Note, though, that unless you can directly see the underside of the roof somehow (sounds like you don't have an attic) it's a bear to find out where water's coming from.
Comment: There is a ridge along the center of the roof. It's gently sloped in the front and the back. I'm adding pictures now. Hopefully that will make it more clear.
Comment: Looks like you have a leaky ridge vent.
Answer: Since the general vicinity of the leak is at the peak of the roof it definitely decreases the amount of time pinpointing the exact location. Depending on your roof pitch it is quite possible for rain to be blown under the roof shingles. The easiest why to repair the opening is with roof cement. Any brand that is petroleum based will work. And because you know the general location start by checking each shingle to see if it can be lifted from the one below it. Shingles have a adhesive strip that bonds it to the one below. If you locate one gently lift it enough to smear a tablespoonful of roof cement and press back into place. Also be on the look-out for roofing nails that have worked their way through the shingles. Although rare nail 'pops' do occur on roofs. It maybe easier to remove the nail than risk damaging the shingles by hammering it back. Apply cement if you do. Check the cap shingles on the ridge line. U.V rays will desiccate the asphalt to the point it becomes crumbly. Look for any splits on the shingles and 'thread-bare' ones that have lost their asphalt particles from erosion. Trowel cement just enough to do the job (too much may soften or melt the shingles in heat prone climates.
Comment: Thank you so much for your detailed answer. I'm going to get some roof cement and apply it as you directed tomorrow. When I was on the roof, I did notice that some shingles could be somewhat lifted up. You gave me some great pointers. Thanks! I'll wait until after tomorrow to accept your answer to give others time.
Comment: no problem. glad to help.


Ciel and Elizabeth after episode 12 of the second season?

Question: Do Elizabeth Midford and Ciel Phantomhive stay together even after Ciel turns into a demon in Season 2 episode 12?
Answer: At the end of that episode, it was shown that Ciel went to leave his mansion along with Sebastian. Sebastian then jumped off a cliff with Ciel on his arms. Considering this, it is very likely that Ciel didn't stay together with Elizabeth. He left her (dumped her, whatever you call that) to go with Sebastian, possibly to the underworld, considering the settings of the manga and anime.
Ciel left a card saying that he died to all his friends (Prince Soma, Undertaker, Greill Sutcliffe).

He was then seen princess carried by Sebastian in a flowery field and the sound effect suggests that they jumped of the cliff.
Answer: He never had a genuine emotional connection with her and they were never together in the first place, so it's not like he loves her and wants to stay by her side. He cared about her but it's clear he never intended to marry her, particularly as he knew he would die sooner than that. After getting turned into a demon, he decides to start an entirely new life. He gives Lizzy the last dance as a gift and that's it. Ciel never had romantic feelings for her, so I can't see why he would decide to return from hell, where he and Sebastian headed, to reunite with her. It'll be easier for her, too: they were always incompatible but now Ciel can't even die, so she'd be unable to have a normal life with him anyway.
Comment: Please include relevant sources/references.


Found startup or finish PhD?

Question: I'm on last year of my Ph.D. However, I got an offer from investors for my project and investor required to full-time work in a new company. Would it be an advantage or a disadvantage to have worked for a couple of years, when continuing Ph.D. again later?
Comment: If the startup takes too much time and/or goes too well maybe you won't want to / be able to finish.
Comment: This isn't a duplicate, but it might offer some insight: https://academia.stackexchange.com/q/114183/75368
Comment: Advantage or disadvantage for what? I presume you will be able to finish your PhD in any case, so you are perhaps talking about some next post-PhD stage, which isn't clear from your question.
Answer: Ultimately this is a personal decision, but I'll offer a few things to consider. Depending on your field and your specific research, taking time out might be a large set-back, or not. The world of research won't stand still while you are away and you might get pre-empted by a delay that might wind up to be longer than you first plan for.
Your advisor should also be able to give good advice on this as s/he likely knows the field and what are the prospects of returning smoothly. Your advisor might, also, be willing to wait for you, or not, so it is good to check.
Finally, what do you really want to do with your life? If it is to be an academic, primarily, think harder about finishing. If it is to be an entrepreneur, then the degree may not mean as much to you as taking advantage of the new opportunity. The industry experience might have some, but not likely a lot, of advantage in seeking an academic position later. Not a "slam dunk", anyway.
Finally, make sure that you understand what the conditions would be if you join up with these investors. Are you a full partner, or are you being used? Either is possible in the somewhat messy real world.
Answer: Try to have your cake and eat it too.  See if the completion of the Ph.D. can be accelerated (many people spend way too much time on their thesis...just jam that thing out).  Perhaps you can start part time with the startup or defer it (or even get some subtle influence to pull to completion because there is a job waiting).
I am not an academia lover (the converse), but I would be extremely hesitant about busting out of your Ph.D. a year from completion.  That is a lot to walk away from.  Wouldn't do it for a cushy industry job and for a startup (higher risk), it makes even less sense.  Get that Ph.D. done. How good the Ph.D. is, matters much less than if it is done (very digital, not analog). There will be other startups.  But it would be nice to have that degree done.

Found startup or finish PhD?


Sending multiple applications to many companies and leaving if I get a better opportunity

Question: After a little Google and five pages of this site's "leaving" tag, I still don't know if this is prudent: I've already sent out several applications and have not been called in for any interviews. Before I bury myself in any more, I want to know: there are one or two jobs on that stack that are most optimum. If I get called in for an interview for a preferred after having started some other job (these are all meager, entry-level positions, fitting for my first formal job), would it be bad practice, or even unethical, to go in for that interview without telling them of my other employment, and then discreetly quit the job as I begin the new one (the preferred job is completely unrelated to the other retail/service jobs, and not even in the same city)? Could any bad consequences arise if I do well to hide this? What are some things I need to watch out for to hide this (for example, not making my employment public on social media)?
Comment: What's your goal in hiding the fact that you are currently employed from an interviewer? Someone who already has a job is generally viewed as more desirable than someone who's unemployed, and will have greater leverage in negotiations. I can't think of a situation where pretending to be unemployed will improve your chances of getting the job.
Comment: Possible duplicate of [How do I coordinate the process of pursuing multiple job opportunities at the same time?](https://workplace.stackexchange.com/questions/111/how-do-i-coordinate-the-process-of-pursuing-multiple-job-opportunities-at-the-sa)
Comment: @NuclearWang Oh, I just wanted to hide that I *just* go onto a new job and I quit as soon as the pastures looked nicer. Let me guess: that's not good?
Comment: JohnnyApplesauce, Yes, you can do that (don't listen to the naysayers/downvoters). Retail/service jobs have huge turnover for that very reason. Another thing you could do are "gig economy" jobs like Uber or Postmates, or temporary/seasonal jobs. Just make sure that you have two different resumes. Because if your resume/degrees makes it look like you're overqualified for a retail job, you're not going to get a job offer for that retail job.
Comment: @NuclearWang Someone who has accepted a position a week ago is at the very bottom of the list for most potential employers. That person is willing to breach their contract with another company, so you expect them to be willing to breach their contract with you. Now in retail/service they usually don't care much about anything as long as you do the work, but there being employed elsewhere doesn't give you an advantage.
Answer: When considering these scenarios, the best policy in general is:

Don't lie. You don't have to tell the whole truth or disclose things that are unimportant, but you should never lie. If you're in an interview and they ask if you're currently employed, and you are, you should say yes.
Be ready to explain yourself. If you have ambitions and a roadmap for your own future, don't hide it - be happy to talk about it. If you've landed an entry level retail job, and you get called for an interview as a software developer intern in another city, it's a good story to be able to show that you wanted to be productive and have an income while you were working on your big-picture strategy to get in to software development. In other words, there's no need to hide your current job.
Make sure you're considering future implications of your decisions. If you are interested in a certain specific job, and you get an interview, by all means pursue it. However, if you're a year down the road and you realize that "pursuing your dream job" has caused you to jump ship every 6 weeks, you might want to rethink your overall strategy. No one likes a job hopper, because they're a risk for quitting after the investment in hiring has been made but before any real benefit has been realized.
Put things in context. People change jobs all the time, employers expect it. Especially in entry level service or retail positions. If you get a retail job at a clothing store in the mall, they're not going to hate you for quitting three months later because you finally landed your dream job as a software developer in another city. They may be a little disappointed, but they're not going to hunt you down and make your life difficult.

It sounds like you've got ambition and you're considering what your roadmap is to realize your plans. That's a good thing. Don't get bogged down in the details of what you do to make an income, as an entry level worker, in the meantime. And if you don't get called for that dream job, don't be afraid to rethink your strategy, consider why you didn't get called for it, and change plans to increase your chances the next time around.
Answer: I job hopped a lot. Like 6 two-year stints and one 8-year one. My advice to my younger self would be:
Apply to only one at a time. Take your time. Start from the most preferred one. If your are a great candidate, one of the preferred ones will get you. If not, it will just take one further down the list.
But the worse jobs are always the fastest to make you an offer, because they tend to be desperate. If you go one at a time, you can consider it in a relaxed fashion. You can simply state your demands as far as compensation and vacations go. You don't get into being pressured or into pointless salary competition.
Go slow, be patient. There's no rush.
Comment: You are so right. I went to twice for desperate. You better be careful to take it.


ArcMap change legend label for layers with graduated symbology without changing table of contents

Question: I want to change the title of a layer in a map legend, and I would ideally like to only change it in the legend without modifying it in the table of contents. If I have my symbology set to "Features - Single Symbol", I have an option of specifying a label appearing next to the symbol in the table of contents, which would change the label without affecting the layer title in the table of contents.
But I don't have a similar option for any of the other symbology options - "Categories", "Quantities", etc. I'm aware I could simply change the layer title in the table of contents and it would modify it in the legend. But I'm using a map document which is accessed by a few different users and lots of different layers with similar titles, and it's important for them to all stay the same to avoid confusion, so when I'm producing lots of different maps I have to frequently change the title and change it back, which is inconvenient.
Answer: You can convert your legend to graphic. You then lose all links with the map and the table of content, which is what you want but could be ennoying if you change the colors AFTER converting to graphic element.
In practice :
1) go as far as you want to make a nice "linked" symbology and insert your legend items.
2) right click on the legend > convert to graphic
3) right click on the graphic element > ungroup (until the text is alone)
4) modify your text
Answer: For Categorized symbology you could change the header (by default it's the field name use for symbologie) then in the legend properties choose to display only the header and not the layer name this way the layer name stays the same but the legend display whatever you want.
For Quantities symbology I dont have a solution as ArcMap doesn't seem to allow you to change the default header.
One work around could be to expend the layer title with additional information (for exemple going from "My layer name" to "My layer name - Symbology") this way the layer is still identifiable in the table of content and the legend has the information you want added....


Is it safe to handle soil with our bare hands?

Question: Is it 100% safe to handle the soil by bare hands? Would any toxic insect hide inside the soils?
Comment: Just put one of these on before gardening. https://www.gamut.com/p/dupont-encapsulated-suit-NjIyNTI2?gpid=622500&gclid=CK_Hq76ZytQCFdyKswodZ_sNPw&gclsrc=aw.ds&dclid=CPmr0L6ZytQCFdZcDAodRb8PRA
Answer:
Q. Is it 100% safe to handle the soil by bare hands?

No, nothing is 100% safe.
That said, I've always done gardening (from the earliest age), also when working indoors or outdoors, with bare-hands. I don't like wearing gloves, just a personal preference.
Though the above statement is not quite true, as I have worn gloves (and other safety equipment) when:

Working down manholes, etc.
Pulling thorny plants from a area to clear that space.

But "generally" speaking I do not wear gloves when gardening, I find they get in the way, I like to feel what I'm doing...
While out in the garden I will rinse my dirty-hands with cold water from the hose, as and when I feel they need a slight clean.
As soon as I go inside (to have a drink, something to eat, etc), I will wash my hands with warm, soapy water.

Q. Would any toxic insect hide inside the soils?

Yes, example:

Some ants can be very toxic and can cause a lot of pain if they bite a human.
Yellow Jacket wasps live under ground, and believe me you wouldn't want to go sticking your hand down into their nest. I did once (didn't know what Yellow Jacket wasps were back then), and 3 very! painful stings later I was running like a mad-man back into the house.

Of more concern in the garden would be things like:

Bacteria.
Microbes.
Animal urine and feces.

Personally in my own garden or a well maintained garden, I really wouldn't worry about such things, as long as common sense and good judgment prevails.
Comment: +1. Furthermore, if you annoyed wasps,  gloves won't help long. If you have a wound you should never touch anything foreign. See http://www.ncbi.nlm.nih.gov/pubmedhealth/PMH0001624/
Comment: Hmm, what sort of garden do you have down a manhole?
Answer: It depends on where you live. Toxic (poisonous / venomous) insects are more prevalent in some places than others.
Where I garden there's only one kind (that I can identify) of biting ant, ground wasps are not common, and there aren't any poisonous spiders or snakes.
In places like the southern US, fire ants are more common. Though I'm not sure how much protection gloves would provide against these or wasps -- the ants will climb right up your arm (or inside the glove) and bite you, and the wasps will fly up and get you where they can (or bite you through your clothes).

Is it 100% safe to handle the soil by bare hands?

No. But it's not 100% safe to walk out your front door in the morning either: there could be a rabid dog in your driveway. Neither is it 100% safe to stay in the house: a large meteorite could fall from the sky, crash through the roof, and crush you as you lounge on the couch.
I garden with bare hands, except when I know I'm going to be doing enough digging to give myself blisters, or when I have to pull out thorny blackberries.
Answer: Insects are rarely a problem. The only one I can think of that might bite in soil, would be ants.  Also avoid the blatantly obvious like digging into wasp/hornet/etc nests!
I think you are probably thinking of bacteria and other microbes. Generally you will be fine, no problems; but beware of animal (and human) urine and faces contaminating the soil. Also use gloves if you have cuts - this is how tetanus (a virus) spreads. Or just have your tetanus vaccination.
Comment: late-breaking minor nitpick (FYI): tetanus caused by bacteria, not virus
Answer: Harvest mites attack in the late summer in the UK. I learned this while trying to grade land. the garden was all soil and stone, and I ended up with welts on my legs and arms, they where super itchy and lasted for weeks. Turns out they sometimes infest gardens in the UK. They're part of the spider family Trombicula autumnalis.
So just watch out if it's late summer and you are digging a large amount of soil, wear socks tucked into trousers and not shorts like me, and don't sit on the bare soil. You can't see them.


Working with very large objects

Question: Hi so I was wondering I am thinking of making a space ship for my game but I would want it be rather large around 350m long and have versus floor so my question is , based on my understanding if I want to make that to scale in blender I would need to make it in separate parts ? or should I make it smaller and then enlarge it in my game engine ?
Comment: You could make that in Blender no problem even if you modelled it in millimeters. But I'd suggest a scale of 1 Blender unit = 1 meter, that is the standard in game engines like Unity.
Comment: You can change the clipping distance for the viewport and for cameras, so there is theoretically no limit to size.
Comment: Additionally to the suggestion offered by @NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ, there is a clipping adjustment in the camera settings of the object properties for lenses, shown in [this image](http://my.core.com/B9/E2/mjolnir/photos/Blender_Uploads/Blender_lens_clipping.jpg), with the setting location shown boxed in red, on the tab boxed in yellow..
Answer: There is no need to make it separate parts due to scale, but it is probably wise to break something like a spaceship into different parts (depending on the level of detail...more detail = more parts).
If your game engine is Unity (and most likely even if it isn't), you will want to use 1m = 1bu (blender unit) or switch to meters here:

As NoviceInDisguise mentioned in the comments, you may want to adjust the clipping distance in the 3D view if you are working with unusually large or small objects.
Comment: Besides changing the scale to metric you might also want to change the **Unit Scale** when dealing with very large objects, so that instead of working on meters you can deal with 10m, 100m or Km depending on your needs. It is also worth noting that besides the scale for the scene you can control the **scale for the viewport independently**, so that the floor grid accommodates your needs (the controls are on the display>Grid Floor>Scale) Also keep in mind that the clipping points for the scene and the camera are different controls.

Working with very large objects


Were the 8th and 9th of Teves once fasts?

Question: In slichos this morning I noticed a mention of the 8th and 9th of Teves also being fasts. Were these three days ever fasts all at once or were these fasts independently observed and replaced each time by the most recent tragedy until the 10th became the most recent fast for this time?
Comment: background on the 9th of Tevet http://frumheretic.blogspot.com/2009/01/fast-of-9th-of-tevet.html
Comment: and background on the 8th and the relationship of the 3 http://www.templeinstitute.org/three-days-septuagint.htm
Comment: The reason for the fast is that (saint) Peter died that day. He was considered a great Jewish man, because before him the Jewish people had been following JC because he said keep the torah and follow me. Peter decided that christians should stop keeping the Torah and therefore the Jewish people stopped being christians. This is mentioned in hagahos of Boruch Taam on the siman. Also in Rashi in the new mesivta gemoro AZ/.
Answer: The Behag lists a number of days where the custom is to fast because of various historical tragedies, including both 8 and 9 Tevet. While the Tur and Shulchan Arukh quote this list in OC 580, the Beit Yosef (16th century) and the Arukh haShulchan (19th century) there note that they've never heard of anyone fasting on the days on that list (and frankly, never have I).
I note many question the list's authority as some of the days it recommends fasting on are Rosh Chodesh (when fasting is generally forbidden).
Answer: I can't locate my source, but I remember learning that these three days were all fasts for especially pious people (they would fast three days in a row and eat at night.) Since we won't demand that of most people, we fast on the last day of the three to commemorate all three tragedies. So special people did, and perhaps still do, fast on all three days, but that has never been the norm for all Jews.


custom transformer winding

Question: I want to create a step-down transformer from 230V to 115V. This will give us 2:1 turns ratio. So this means 2 turns in primary for every 1 turn in secondary should work. But if the 230 Vac supply given to 2 turns of copper wire, it will burn the wire. So at minimum, how many turns in primary side are needed not to burn the wire. Please explain with maths.
Comment: The wire thickness on each side of the transformer must be enough to withstand the expected voltage and current. It is possible that the primary will need a thinner copper wire with better insulation, and the secondary will need a thicker copper wire with thinner insulation.

This calculator may help. http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/tracir2.html
Comment: You need to wind for Urms=4.44fNAB where f in your frequency in Hertz, N is number of turns, A is the cross section area of the core in m^2 and B is the flux density in Tesla. Aim for 0.8 Tesla.
Answer: Here's a sort of worked example.
2 primary turns will have a very low primary inductance. You could make a general case that a single turn has about 10 uH for an "average" sized silicon-steel laminated transformer. Inductance is proportional to turns squared so that means a primary inductance of 40 uH for 2 turns.
Clearly this will see a melt-down if 230 V RMS at 50 Hz is applied because the impedance is only 0.013 ohms.
So, maybe go to one-hundred turns. Now, the inductance is 0.1 henries and the reactance will be about 31 ohms. The magnetization current will be 230/31 = 7.3 amps.
Maybe the copper could cope with this but what about core saturation?
100 turns and 7.3 amps is a magneto motive force of 730 amp-turns. To get towards a figure for peak flux density, core dimensions need to be known. The important dimension is mean magnetic field length and, for a middling, general purpose power transformer that length might be 100mm.
Now we can calculate the H field. H = MMF/length = 730/0.1 = 7300 At/m.
But we need the permeability of silicon steel and this somewhere in the region of 5000 (relative to air) or 0.0063 in actual terms.
Therefore flux density will be 7300 x 0.0063 = 46 teslas RMS
Peak flux density is root 2 higher at 65 teslas.
Silicon steel starts to saturate at about 1 tesla so absolutely clearly having only 100 turns on the primary is still a recipe for melt-down: -

So, if you had 1000 turns, inductance would be 100 times greater and current would be 100 times smaller so MMF is modified to 730 x 10/100. The x10 bit is because the number of turns has increased from 100 to 1000 and the /100 is because the current has fallen by 1000 due to the inductance rising by 100 due to ten times more turns.
So, new MMF is 73 and therefore H = 730. B (RMS) is now much smaller at 4.6 teslas RMS. Saturation is still going to be problematic so more turns are needed in this example.
Can you see that increasing turns does have a useful effect of reducing flux density.

Please explain with maths

I'll do it my way.

custom transformer winding


Electric line to subpanel

Question: I'm running 2 100 amp 110 lines 35 yards from my well house main to a sub panel in my garage.  Do I need to run a ground wire and a neutral wire or can I just run one of them from the sub panel to a ground rod?
If I run the ground to a grounding rod, do I disconnect the green screw in the sub panel?
Comment: Are you sure you mean 100 watt?  A lightbulb doesnt usually require its own subpanel...perhaps you mean 100 amp?
Comment: What are you trying to achieve?
Answer: You'll have to run four conductors, two ungrounded (hot) conductors, one grounded (neutral), and one grounding (earth) conductor.
At the garage you'll have to install a grounding electrode (ground rod, etc.), and bond the panel and grounding conductor from the feeder to it.
You'll then have to isolate the grounded (neutral) bus bar and conductors, from the grounding bus bar, conductors, and panel.

Electric line to subpanel


Calculate the Z of a line intersection given the XY coordinates?

Question: I'm intersecting a line in 2D and I calculate the X,Y coordinates of the intersection point. What I need is the Z of the intersection point given the X,Y,Z of the line points, and the X,Y of the intersection. From what I understand of equations it should be a one-liner but I don't know enough math to get there.
Answer: You can use either the x or the y value of the intersection to compute the z-value (using x):
<code>t = (x - X1) / (X2 - X1)
z = Z1 + (Z2 - Z1) * t
</code>
Where x is the x-intersection. X1, X2 and Z1, Z2 are your known x and z-values, respectively, of the segment's endpoints.
Comment: I'd probably calculate 't' by checking that (X2-X1) is non-zero first, if it is you can use that, if it is zero though then switch to using the Y values. That'll ensure you don't run in to trouble on horizontal or vertical lines.
Comment: That's a good point--it's probably the problem of not actually being a line segment in that case, though, as OP's choosing the xy plane for some presumably meaningful reason. But that's just speculation on a vague description.


What are the immigration officers going to ask or require once I land in Hamburg?

Question: This is my first time travelling as an adult and alone. I am travelling from Panama. I already checked and I don't need a visa. What are the things that I will need? I will be visiting someone I met online, that's why I will be staying in a hotel for the first 4 days, and then depending on how things works, I will be staying with the person, or I will make another reservation for the time left. He already gave me his address, but I'm not sure if they will ask for something else.
Comment: first of all, do you know and trust this person?
they'll probably ask when will you leave, and saying that it depends on how it goes with this person is not a great answer.
Comment: @Kristell Thompson I've travelled extensively as a lone female and I'd be very wary of being in a foreign country (do you speak the language?) without knowing for sure where I'd be staying. Can you make a refundable reservation just in case? And I'd be making sure I had a daily 'check in back home' arrangement, and that I knew where the safe areas are in Hamburg.
Comment: @AndrewLazarus Totally, I have a credit card plus cash, also my return ticket! I don't plan on staying, have my whole life in Panama :) Just trying to do things right
Comment: Yes I have my return ticket. We've been talking for a time now, on video, calls, etc The point is that my reservation is not made for all of the days because I still don't know how things will work.
Comment: @Traveller Yes, I mean I I've been trying to find refundable reservations but haven't found any. I am doing this because I found the ticket really cheap and I bought it, but not because he forced me in any way as his plans to come here were in October and then I bought the ticket. He gave me his adress and I looked for the area and it's a normal area, also, my parents know all of the information, adresses and I will buy a SIM card to stay communicated. I know this may seem a bit complicated to understand for a lot of people but he has even talk to my parents via skype, & he is willing to help
Comment: @KristellThompson, go to a website where you can book hotels or hostels, (like booking.com or hostelworld,) and book one of their rooms or bed where they say you can cancel for free till the day you are expected to arrive. Just make sure you do cancel before you are expected, otherwise you will have to pay. Mostly you need a credit card for this but there are a few which do not ask for a card.
Comment: I think it's likely that the border police will ask nothing more than how long you are staying, which you can calculate from your return flight, but I would also have some proof of funds.
Comment: I also have reservations for different tours, I think the best option is to get a refundable accomodation and to cancel if I need to. Thanks @Willeke
Comment: Thanks! I think if I have a refundable reservation for all of the days they won't have any problems, is that right? @AndrewLazarus
Comment: You should have reasonable pocket money available. You don't need cash, but if not, you should show you have a credit/debit card with enough to get food.
Answer: Several points of advice.

While online dating is becoming much more common these days, you should realize that your situation has the potential of becoming a problem for you and an even greater likelihood of being seen as a problem by people like the immigration officials. (Notice how you wrote the neutral "person" and I immediately leapt to assumptions.)
Even if you are madly in love (especially if you are madly in love ...), do nothing to hurt your long-term chances of living together with your friend. Part of that means making credible plans to leave Germany after the planned end of your visit, and to come back later. Possibly for another brief visit, possibly after application for a residence permit.
You should have a clear idea where you can stay if things don't work out. That doesn't have to be a firm reservation in a hotel, you could also have the contact details (and price ranges) of several hostels for young tourists with you. They offer anything from single bedrooms to 12-bed dormitories at different prices. You should also know how to contact a battered women's shelter, they would be more competent to help you if there are problems in that regard.

So, with these things said:

You need a passport which is valid for more than 3 months, no older than 10 years, and contains biometric data.
As a visa-free national, you can arrive for tourism or business trips. Do not ever suggest that you might like to stay, or that you are not sure if you will actually take your planned return trip. (And that should be the truth and not just a lie. Leave again, let your friend visit you, see where it leads. See below.)
You have to have money or tickets for your return flight and money to cover your stay. There is no fixed rate for that, but something like like €50/day should be the absolute minimum. Also health insurance.
You can show your initial hotel reservation, and (honestly) say that you don't know where you'll go from there, that you have the contact details from several affordable hostels (see above).

I think the answer by Michael is wrong, and note how it was downvoted. You can get away with not volunteering information, but do not lie. One lie leads to the next, sooner or later one lie will be exposed, and then you will have a file that says you lied to an EU official.
I know several couples where a German partner married a partner from outside the EU. In each case it was a process that started with visits before it came to a residency permit and then to the marriage. That's the latest point where the authorities will ask if it is a sham marriage or a true one, and little lies at an earlier stage will come to hurt you.
Comment: totally loved your answer! it's the most complete! btw, I said "person" as I wasn't sure of telling people my personal life, but as I said before I've been talking to him quite a time now, and he has been trying to make things easier for me. In fact he told me the same about looking for refundable reservations, as we're both hoping this works out but at the same time we're both scared it doesn't. I don't plan on staying, have a credit card, cash and my return ticket, he also gave me his adress but I'll follow your advise about having a list of other places with the prices Thanks a lot!!
Answer: immigration in Germany don't ask as many questions as the US, but they will certainly ask you why you are travelling to Germany and what you are intending to do. The simplest answer is: "I'm visiting friends in Hamburg." If they ask where you know the people from (unlikely to be asked this), you are free to make a white lie and say: "German friends I met in Panama."
As for the private story, ignore the strange questions from other posters. In the days of the Internet there are much weirder ways to meet people.
Comment: Advocating deceit when entering a country is ill advised, and may backfire, resulting in an entry refusal. It also contravenes TSE policy, as does your disparagement of other users.
Comment: Do not lie.  That's far worse than feeling silly.  The Officers have heard much weirder, but still legal, things than visiting online friends.
Comment: @Giorgio The best option is to look for an refundable accomodation so I can cancel in case I won't use it
Comment: Repeat it: Do not lie. Especially pointless lies. Doesn't matter if you met someone in Panama or online, and is probably harder to believe.


Running Tails on windows

Question: so I downloaded tails onto a flash drive successfully(so I think), but then when I went to go run it on my computer, it doesn't show up. It's just my normal start screen and sign in to my computer. One video instructed me to press the delete key when stating it up, so I did that and it still didn't work. Another video tutorial instructed me to click on the F12 button a bunch of times when starting up. I did that and it still didn't work. Can someone help me? What did I do wrong?
Comment: Timing of the indicated key presses can be very critical: Sometimes it won't work if you press too early (it won't work if you press too late, of courcse), and sometime you'll have to repeat the key rapidly many times. Also with modern BIOS' "qucik start" technology, you have no time for such a key press. Maybe disable quick start in BIOS, too.
Comment: My Toshiba uses F12 and you must keep pressing the key until "choose your device boot" screen appears
Answer: Google your laptop model for the key needed for the boot menu. They can vary greatly depending on who made your laptop. For example, MSI laptop uses F11. My Thinkpad uses Enter and then F12. My desktop uses only F12.
If you have a very old computer, you may need to change the boot option in the BIOS. We can't tell you what that would be so you will need to research that on your own depending on that laptop itself.
Answer: Well, first of all you need to find out your Boot key or BBS menu key in your BIOS, it's usually showed at the boot process. Usually it's like F2, F8, F10, F11, F12 or basically a Del - just try them! After that - keep in mind that to achieve the fully available privacy you have to unplug your HDD/SSD before booting up - it will make your local data inaccessible even in case of a zero-day exploits

Running Tails on windows


Can I identify an LED's characteristics from the transistor used as its current limiter?

Question: I'm a total NOOB, but I am teaching myself electronics while in retirement. I want to change the color of the "Power ON" LED in my mod of an ATX-PSU, but I don't know the characteristics of the LED. Current to the LED is controlled by a Fairchild C1815 NPN transistor. Can I use the C1815 data sheet to ferret out the LED's numbers?
Comment: Not in more than the crudest sense.  You can probably learn as much from the physical size of the LED.  Different color LEDs have different forward voltages, so this may not be trivial.  If you just want an LED that is on when the computer is, perhaps you should pick one and calculate the appropriate current limiting resistor to power it from a spare drive cable or internal USB port header.
Comment: That's probably the easiest way to achieve my goal, and I have considered it, but I'm curious and I like challenges. Thanks.
Answer: Usually NOT.
That said: there is usually significant latitude when swapping one LED for another that has vaguely similar characteristics.  Most LEDs are supplied with a voltage source that is significantly higher than the LED forward voltage.  Changing the LED to a different color or package will most likely work just fine because a small change in the forward voltage won't affect the LED current noticeably.
Usually, that is.
The easiest way to tackle this project is to just do it and observe the results.
Comment: Thanks. Swapping with fingers crossed may be what I do, but I wanted to know if my thinking about that circuit was correct and if there were more precise ways to derive the needed LED short of measuring (see other answers), which still seems beyond my current knowledge.
Answer: The transistor will usually be used as a switch.  There should also be a resistor in series swith the LED which will limit the current.
You can determine the current used by the LED by measuring the voltage across that resistor, and its value - then calculate the current using Ohm's Law.
For common small LEDs, you can look at any distributor's website to find the "usual" maximum current and forward voltage rating for each colour of LED - but LEDs used as indicator lights are usually operated a much less than the maximum current - perhaps 5 - 10 mA where the Absolute Maximum current in a datasheet will be 25 - 30 mA.
Comment: I see the resistor, and have seen a circuit schematic that looks a lot like this one, but I was hoping for an easier (?) way than measuring the live board (I haven't done much yet with my multi-meter). I may end up swapping and hoping for the best. Thanks.
Answer:
Can I use the C1815 data sheet to ferret out the LED's numbers?

No you can't and you also need to (more than likely) know the value of the current limiting resistor used so the steps are: -
Measure the open circuit voltage (when supposedly on) and this means disconnecting the LED. Then measure the current flowing into the LED. And to be absolutely sure, you need to establish if the LED is being driven from a full-wave rectified supply that is current limited by the resistor because this makes a difference to how you choose the LED.
Of course you can just swap it out and hope for the best but where's the learning in that?
Comment: Thanks. I still uncertain of my multi-meter skills, and certainly with taking measurements on a live board. Also, determining if this is a full-wave rectified circuit is well beyond my knowledge, but I appreciate the heads up.