How to reset the oil life percentage in my Honda car

Question: My Honda car showed oil life of 15%. I changed the oil, but the oil life indicator is still at 15%. How do I reset the oil life indicator on my Honda automobile?
Comment: Please edit your post with more details. We would like to see Year/Make/Model and a direct question. As-is, this isn't a question and might get flagged for closure.
Comment: As @HariGanti  said, you need to include year and model. These are critical to properly answering your question. I have flagged it as "too broad" since you have not updated these details yet. Please do so rapidly so that we can help you.
Comment: Do you have a question or would you simply like to share? The oil life monitor on your vehicle probably does not directly measure the remaining oil life, but simply counts down from 100 based on data like miles traveled & engine revolutions. The oil life monitor will need to be reset to restore the remaining oil life to 100%. The procedure for this depends on the model & year of your vehicle. If you specify which car you drive we might be able to help you with that.
Answer: This will work for most 2006 - 2011 Honda automobiles:

Turn the key to the "on" position (be sure to not start the vehicle)
Press the Select/Reset knob used to access the odometer and trip
readings until it displays the oil life percentage
Press and hold the knob until the oil life percentage begins to
blink
Release the knob
Depress the knob again until the oil life percentage resets to 100%

You did not specify what model and year, so if this doesn't work, you should check your owner's manual for specific instructions.
Comment: A variation on that is, if it comes up with a flashing menu twist the knob to select the upper option and then press the button again.
Comment: For a 2010 Honda Fit, the procedure is as CharlieRB says, but in the manual there's additional detail that is useful: for step 3, you hold the knob for about 10 seconds; for step 5, you press and hold again, this time for about 5 seconds.


Public Wi-Fi connection difficulty

Question: My iPhone 5 will not connect to some public Wi-Fi connections. I have found that if I turn off cellular data it will usually connect. It is as if the two are competing. Anyone know why this happens or how to fix?
Comment: It will do what you asked. As long both are on it will choose the better connection. The only way around it is to turn off cellular data to force it to use WiFi.
Answer: If the iPhone decides that the cellular data connection will provide a better connection quality, it will choose that connection over a poor Wi-Fi connection. However, given no other choice (because you've turned off cellular data) the iPhone will attempt to maintain the poor connection over Wi-Fi.
There is no way around this other than to improve the Wi-Fi connection or to disable cellular data manually.

Public Wi-Fi connection difficulty


Scoring metric for recommendation system

Question: I'm working on a project that involves building a news recommendation system. I've come as far as quantifying user interaction with different articles  on the site into user's affinity towards atopic using a bayesian function. I also have quantified the recent articles using LDA into the proportion an article talk about each topic.
my users topic-affinity for a user x looks like this(target-x):
<code> user_id  interest-topic-0  interest-topic-1  interest-topic-2  interest-topic-3  interest-topic-4  interest-topic-5  interest-topic-6  interest-topic-7  interest-topic-8  interest-topic-9
       0            0.0257            0.2956            0.0386            0.0643            0.1285            0.0000               0.0            0.0257            0.0386            0.1671
</code>
My quantified articles looks something like this(vectors-v):
<code>post_id   topic-0   topic-1   topic-2   topic-3   topic-4   topic-5   topic-6  topic-7  topic-8   topic-9
      x  0.055048  0.000000  0.742544  0.032286  0.059630  0.000000  0.000000  0.01173      0.0  0.095441
      y  0.000000  0.051172  0.000000  0.000000  0.158314  0.042632  0.022281  0.00000      0.0  0.720676
      z  0.028615  0.000000  0.020919  0.000000  0.000000  0.018940  0.882862  0.00000      0.0  0.046078
</code>
The shape of target will always be (10,)
The shape of vectors will always be (num_articles, 10)
Both vectors do not follow the same distribution.
Now I'm trying to figure out the best way to recommend articles from vectors v, for a target user x, given x and v. I've tried distance similarity functions like cosine similarity to find the distance between vectors. The results are satisfactory but I'm looking for a better function/metric to pick out top n recommendations for a user.
Answer: Other ways to measure real-valued vector distances:

Euclidean distance
Manhattan distance
Higher order Minkowski distance
Chebyshev distance

Beyond just trying different distance metrics, you can try re-framing the problem or using A/B testing to see which recommendations are most empirically useful for users.


Audrio Studio can not invoke virtual device

Question: When I try to invoke a virtual device created through the Android Studio AVD manager, I always get the error message "Emulator: Process finished with exit code -1073741701 (0xC000007B)".  Not sure what does this mean.
Answer: in my case Avast had deleted my Emulator files. You can check your virus vault for quarantined files.
The files I was looking for where at: "ANDROID_SDK_FOLDER"/emulator/qemu/
To find out where your ANDROID_SDK_FOLDER is, you can enter AndroidStudio, File, Project Structure, SDK Location. There you will find it.
There you should have two folders: "windows-x86_64" and "windows-x86", each one with six ".exe" files inside.
If you happen to find missing files or folders, like I did, try to recover them from antivirus vault, if it fails try to copy both folders from another computer, and if it fails again try to uninstall AndroidStudio and reinstalling.
If it was AntiVirus related, do white-list the whole SDK folder in your antivirus program before running the emulater, otherwise it will get deleted again.
Hope it helps!
Best regards,
    Federico.


Fully unwrap a view

Question: In Oracle, is there an easy way to fully unwrap a view? eg: If I have a view which is made up of selects on more views, is there some way to unwrap it to just select directly on real tables?
Answer:
Get the query text of your view.
SELECT text FROM dba_views
WHERE owner = 'the-owner' AND view_name = 'the-view-name';

Parse.  Search for view names within the query text.
Get the query text for each view name found.  (see item 1.)
Replace each view name in the query with the related query text.
Do this recursively until there are no more views found.

Easy?
EDIT:  The above instructions do not do everything required.  Thinking about this a little more it gets hairy, grows legs, and maybe another arm.  Finding column names, and column names that might be elaborate functions and subqueries.  Bringing it all back together with the joins and clauses.  The resulting query might look very ugly.
Somewhere within Oracle there may be something that is actually unwrapping a view.  I don't know.  I am glad I didn't use views that much in Oracle.
Answer: The concept of in-line views can be used to do this.  Suppose you have these 2 views:
create or replace view london_dept as
select * from dept
where loc = 'LONDON';

and
create or replace view london_mgr as
select * from emp
where job='MANAGER'
and deptno in (select deptno from london_dept);

In the second view's SQL, the reference to view london_dept can be replaced by an in-line view using the SQL from the london_dept view definition as follows:
select * from emp
where job='MANAGER'
and deptno in (select deptno from (select * from dept
where loc = 'LONDON'));

Of course, you can now see that is overly verbose and could be simplified to:
select * from emp
where job='MANAGER'
and deptno in (select deptno from dept where loc = 'LONDON');

Finally, some advice from Tom Kyte on the advantages and disadvantages of creating views of views
Answer: Up until Oracle 12.1 the correct answer is no, there is no easy way. Now, in 12.1 there is DBMS_UTILITY.EXPAND_SQL_TEXT : Expand SQL References to Views in Oracle Database 12c Release 1 (12.1) does exactly this. See the documentation of dbms_utility

Fully unwrap a view


wrong answer in calculating the principal value of integral using complex analysis

Question: I have read the answer to this question and it has helped a lot but for$\int_{-\infty}^{\infty}\frac{1}{x-2}dx$, I get the wrong answer.
I used this contour
\begin{align}
P.V\int_{-\infty}^{\infty}\frac{1}{x-2}dx&=\int_{C\ \cup P\ \cup L_1\cup L_2}^{}\frac{1}{z-2}dz-\int_{C}^{}\frac{1}{z-2}dz-\int_{P}^{}\frac{1}{z-2}dz\\
&=0-0-(-i\pi)=i\pi
\end{align}
As you can see the answer is wrong because it's complex even though it's the result of a real integral.
And I suppose that we can't be using $P.V=\text{Re}(i\pi)$ because there's no $\cos(ax)$ in the numerator.
Comment: Btw using complex to find this PV seems silly. What is $\int_{2-R}^{2-\delta}+\int_{2+\delta}^{2+R}$?
Comment: You seem to be assuming that $\int_C\to0$ as the radius tends to $\infty$. Just because it works that way in the examples you've seen doesn;t mean it works here - how did you _show_ $\int_C\to0$???
Comment: @DavidC.Ullrich Yes I guess you're right, I probably have to use some other lemma to determine the value of the integral, and yes it's much easier to find the PV but I just wanted to learn the method with different examples.
Answer: Your problem comes from the fact that the integral over $C$ is wrong.  It not zero.
Suppose that $C$ were a semicircle given by $z-2=100\exp(i\theta), 0\le\theta\le\pi$.  You evaluate the integral over this path, what do you get?  Can you see that the result will be independent of the radius of the large semicircle?


Extreme sexual urges, can masturbation be allowed

Question: Salam, I would like to ask if masturbation is actually haram, because in the Quran 23.5-7- Allah says "And those who guard their chastity (i.e. private parts, from illegal sexual acts). Except from their wives or (the captives and slaves) that their right hands possess, - for them, they are free from blame. But whoever seeks beyond that, then those are the transgressors." According to me, this verse tells us that we should not show our private parts to anyone except our spouses and slave-girls. If it does mean that we cannot show it to anyone except them, it means even we cannot even see our own private parts, which almost everyone does. Also, to say something is haram it has to be explicitly mentioned in the Quran. All the Hadith like the one where the Prophet Muhammad (SAW) said that whoever masturbates, is cursed, has a weak authenticity. I have not done masturbation for almost a month, which is making my urges run wild, please help.
Comment: The majority of scholars considered masturbation haram. But There are a few scholars who allowed it if it is an absolute last resort and the only thing between one and zina. But however it doesn't mean that you can watch pornography. Watch this fatwa for more info

 https://youtu.be/1DtNKU25ejY
Comment: Brother Yusha, I said I quit watching pornography, thank you
Comment: I have extreme sexual urges currently which I am unable to control, I can't control it in any other way, please help.
Comment: As I said that majority scholars considered masturbation as haram. And you can try to control it by fasting, and lowering your gaze and etc. But if you can't really control it, and you have tried all of that. And you fear that you might commit zina fornication then according to some scholars, masturbation can be done
Answer: Masturbation is haram in Islam. The verse clearly says that you can have sexual pleasure from your wives and slaves. It doesn't mean you can't see your private part that's not haram. You have to guard your private part from others except wives and slaves. You can't have self pleasure from it. Most scholars said it is haram.
Jazakallah Khairan


Windows to Steam OS

Question: I am considering moving my computer from Windows to Steam OS. If I do, will i have to reinstall all of my games to then play them on Steam OS? Thanks.
Comment: Yes. Think of it as a separate computer sharing the same hardware.
Answer: Yes.  SteamOS is built on top of Linux rather than Windows, so a download of the correct version of any Steam software would be required.
Answer: Yes, As previously stated SteamOS is built on Linux and would require the Linux version of the game, but given your question you may want to check how many of your games have Linux versions, moving over to SteamOS could limit which games you could install and run. Unless you are using a program such as WINE.

Windows to Steam OS


Open-circuit alternator

Question: Is it dangerous to run a permanent magnet alternator open-circuited? No current can flow so is all the power dissipated as heat? Is there even power generated in the inductive coils?
Answer: Since power is current multiplied by voltage, and no current is flowing, it is not power dissipation you need to worry about.
Voltage will be generated, but it shouldn't cause a problem.
Comment: Hi @evildemonic, thanks for responding. What is your source for this? Did you read it in a textbook or experience it from working with PM alternators, or are you just referencing basic circuits theory?
Comment: This is from basic electronics theory and general experience with motors and alternators of all types.  A voltage will be produced, but actual power will not be generated.
Comment: I heard from someone else, who also has some experience with motors and alternators, that after enough time running open-circuit it will overheat. So I don't think I can come to a conclusion one way or another before testing it myself.

Open-circuit alternator


If I install Windows7 RC, will I need to repave later?

Question: I'm thinking of installing Windows7 RC. I'm wondering if the auto-updates along with a production licencense will be sufficient to convert the RC to the RTM. Or will I have to reinstall?
Comment: And will the 1-yr license work in such a case?
Answer: Windows 7 RC will expire June 2010.  So you will be able to continue to use it until then.  You may be able to upgrade it to the full version, but most likely they will recommend a fresh install.
They recommended a reinstall when moving from the Beta to the RC, but they provided a work around.  Most likely they will provide a work around at RTM, if not you can probably find a way.
Additionally, nothing beats that fresh installed OS feeling.  Reinstalling after 12 months of use is probably a good plan anyway.
Comment: I've used the workaround to upgrade my development workstation from the beta to the RC. I will nuke-and-pave when the RTM comes out, but I wasn't prepared to do it on my workhorse machine when RTM is probably only 3 to 4 months away. I will say that I am starting to see some cracks and it will definitely be worth doing that clean install when the time comes.
Comment: Add to that the frequent recommendations by Paul Thurott on Windows weekly to the effect of "you may be able to upgrade, but you're going to want to do a clean install"
Comment: If you reinstall the RTM copy, do you get 12 months? Or is the 12 month trial only for the RC?
Comment: It isn't a flexible 12 months from date of install.  There is a hard deactivation date of June 2010 for the RC.  I imagine the RTM will have different license behavior.
Answer: Based on the release blog, you will need to reinstall.
Specifically:

In both cases, you'll need to rebuild your test PC to replace the operating system and reinstall all your programs and data.
Answer: there's nothing better than a clean and fresh windows install
Comment: ...but then you come out the other end fresh and reinvigorated, with expanded knowledge of where your data is and what your dependencies are.
Comment: ... and then spending 2 days re-installing and re-configuring all of your apps, and another two weeks in frustration that all the minor helpers and settings you're so used to are not there.


How many words should be taken as features in a ML problem?

Question: I would like to ask you how many words should be taken as features in a ML program.
For example, if I have 30000 distinct words to make a vocabulary, what would a good number be?
I am currently removing stopwords, words with a few characters, numbers; applying lemmatisation; removing punctuation; analysing word frequency to keep the top 50 words.
However I do not know if out of 30000 distinct words, 50 would be too low.
What would be a good way to determine how many to keep or select?
Comment: This depends entirely on the amount of data that you have and the downstream applications. Common machine translation systems today, for instance, use a vocabulary of 30,000 subword units. 50 seems tremendously low—but let cross-validation be the way that you figure it out.
Answer: It depends on many factors: number of instances, number of classes, token/type ratio, etc. A common basic technique in order to avoid having too many words is to discard the ones which appear rarely, for example by discarding all the words which appear in less than 3 documents. Selecting only the top $N$ most frequent words is unusual, even though it's a similar idea. There is a risk to end up mostly with words which appear frequently and don't have a good discriminative power.
The proper way to determine an optimal threshold, for example the minimum frequency $N$, is to run a training/testing experiment for every value of $N$ and select the value corresponding to maximum performance. Note that this experiment should use a validation set different from the final test set in order to avoid data leakage.


Why can't I buy stocks during the beginning of an IPO at 9:30am?

Question: I just noticed that I could not buy stocks of an IPO during the beginning to the trade at 9:30am. I tried NYSE:AMWL this morning. I can only buy the stock of an IPO several hours later. Does anyone know why? Why does this happen? Is this the same for every IPO?
Comment: Is the IPO really at 9.30 am? If not mistaken, not all IPOs start at 9.30 am.
Comment: I think it started at 9:30am, but I can be wrong.
Answer: In the US, IPOs tend to start trading at the open but due to dotting the I-s and crossing the T-s, sometimes they get delayed.
IOW, it can begin trading when the SEC gives its final approval and the underwriters and their specialists have matched buyers and sellers.
In the case of AMWL, it began trading at 12:54 PM EST.
Comment: I did a lot of IPOs during the internet craze of the late 90's.  In general, IPOs were a reward to their clients, especially the good ones.  Though not easy, it was possible to get on the cold call lists if you did enough IPOs, kind of like those who get comped at Vegas.  In recent years I have seen IPOs available at discount brokers but being 20 years removed from this, I have nothing to offer regarding current availability, size and quality.
Comment: "Dotting the I-s and crossing the T-s" means "getting all of your ducks in a row" :->).  OK, enough idioms.  When all requirements are met by the underwriters and they are ready to "hit the ground running" :-) , the IPO opens.  I looked up Time and Sales to see the time trading opened. In hindsight I realize that I assumed  that my broker's data is timely. In this case, it was since there's a news story on the web stating 12:54 PM.
Comment: Sorry that I am still new to stock trading. What do you mean "dotting the I-s and crossing the T-s"? Also, how do you find out AMWL start trading at 12:54?
Comment: @JerryZhang It's just an [idiom in English](https://en.m.wiktionary.org/wiki/dot_the_i%27s_and_cross_the_t%27s).
Comment: Got you. Thanks
Comment: So, the best and most reliable way is to find the underwriters and buy from them, right? But usually the underwriters have many requirements regarding my funds, such as enough money deposited in the underwriters, right?


Mac keeps booting into disk utilities

Question: my mac kept getting stuck on the apple logo when booting up so I went into recovery mode and formatted the disk and installed OS X again. But for some reason it is not booting normally when I switch it on it boots automatically into disk utilities??
Comment: Will it boot to the regular drive if you select it at boot time by holding the opt/alt key? If so, then System Prefs > Startup Disk [unlock] > Select your regular disk, Restart...
Answer: When you say "boots automatically into disk utilities" do you see this screen?

If so, try closing the window by either pressing the Command and Q keys simultaneously or by clicking the red button in the top left corner of the window. It should prompt you to either shut down, restart, or select a startup disk. Choose to select a startup disk, then chose "Macintosh HD" (unless when you erased your disk and installed OS X again you replaced Macintosh HD with another name, in which case you should select that disk instead). Then click "Restart".

Mac keeps booting into disk utilities


Is data on RAM memory recoverable?

Question: Imagine you're working on your computer and suddenly the electricity goes out is there a way to recover the data lost in this case?
Answer: Yes, but you probably don't have the equipment required to extract it. A residual charge will remain on the capacitors within the memory itself, but it's so small that extremely sensitive equipment is required to detect it, much less read it.
Read this page, section 7.
Comment: also, if you've switched the computer back on again you've possibly/probably overwritten everything anyway.
Comment: Unfortunately I don't know exactly what equipment it would require. You can write the memory chips off though, since you'd have to scrape away the casing to get at the memory cells.
Comment: Invest in battery backup, save yourself the trouble...
Comment: wow it's interesting so it can be recovered.what kind of equipment do you mean may you please name if possible?
Comment: If you freeze the memory before or after cutting the power it will retain its charge for much longer
Comment: Also check out http://blogs.zdnet.com/security/?p=900
Answer: No; RAM only holds information as long as there is power flowing to the memory.  If power is interrupted, the information in memory is lost.
As Shevek said, autosave can help, but in this case the information is saved to the hard drive, not to RAM.
Answer: The only solution is to use an Uninterruptible power supply (or battery backed power supply):

An uninterruptible power supply, also
  uninterruptible power source, UPS or
  battery/flywheel backup, is an
  electrical apparatus that provides
  emergency power to a load when the
  input power source, typically the
  utility mains, fails. A UPS differs
  from an auxiliary or emergency power
  system or standby generator in that it
  will provide instantaneous or
  near-instantaneous protection from
  input power interruptions by means of
  one or more attached batteries and
  associated electronic circuitry for
  low power users. The on-battery
  runtime of most uninterruptible power
  sources is relatively short—5–15
  minutes being typical for smaller
  units—but sufficient to allow time to
  bring an auxiliary power source on
  line, or to properly shut down the
  protected equipment.

A UPS will also protect you from power surges, which is the opposite danger of having too much electricity ...
Answer: If you mean the main memory of your computer then no, it is not recoverable after power failure
Random-access memory
Some applications have some form of autosave feature which may at intervals save a version of open documents etc.
Comment: it may be technically possible, but the average user is not going to have the equipment or resources to do so
Comment: Microsoft Word for example will save a back-up copy of your documents every 5 minutes (or whatever interval is configured) in a temporary file. If you have a crash then when you relaunch Word it should detect the presence of the temp file and recover changes up till the last autosave.
Comment: may you please say what do you exactly mean by application autosave feature?
Comment: I got it now thanks but lgacio vazquez-abrams says ram is recoverable how do you explain that?
Answer:

Imagine you're working on your computer and suddenly the electricity goes out.
  Is there a way to recover the data lost in this case?

In most cases: No.
In the current generation of computers the working data is stored in DRAMs.
The working of a DRAM can be described as a leaky bucket with water. If it is mostly full then the bucket represents a 1. If it is mostly empty it represents a 0.
Now these buckets are leaky and stand on a floor with a layer of water in it. If you fill it to the brim with water then it will slowly leak out. Of you empty it then some water may leak into it.
To 'fix' this the buckets are checked every so often. Simply imagine someone walking past buckets of water. It they contain a little bit of water (a 0) they are completely emptied. If they are mostly full (a 1 then they are topped up.
This is a volatile state which gets stopped as soon as your computer looses power.
If you have very specialized equipment then you might be able to quickly cool down the DRAM chips (e.g. by spraying liquid nitrogen on them cooling the DRAM chips to 77 K (−196 °C, −321 °F). That will buy you some time to move the chips to dedicated equipment to read their contents.
As a private user you probably neither have this equipment, nor the skip to use the resulting raw information. And the time to do this gets ever smaller with decreasing DRAM size (think of smaller buckets and larger holes).

The practical way to recover is to recover the information from a non-volatile medium. E.g. via an auto-recovery feature which periodically saves you changes to disk.

If the program has no such feature or if loosing even a the information between the last auto-save and the current state is not an option then you only have to choices:

Buy an UPS, thus preventing power loss?And replace the UPS battery every few years).
Or store the data in a distributed cluster (each on their own power). E.g. database which replicate their data from a single MASTER database to a SLAVE database.
Answer: Restarting or rebooting with power on overwrites the data, unless some device is disabled to make the BIOS stop during POST . If you intend to read the latent data from system memory , remember that any program you run to do this on the computer is loaded into memory and overwrites the data. Ordinarilly RAM content disappears almost immediately when power is shut off. How long is a question for forensic examination. http://citp.princeton.edu/pub/coldboot.pdf
Ask the particular manufacturer if they have such specifications.
Comment: This doesn't add anything to the answers already in place from more than four years ago.

Is data on RAM memory recoverable?


21 speed front gears go 1 to 2 to 3 and 3 to 1, but not 3 to 2

Question: My front gears can move up just fine, but to go from 3 to 2 I have to go 3 all the way down to 1 then up to 2 for the chain to engage. Doesn't even seem to try on 3 to 2.
Comment: Follow this guide http://www.parktool.com/blog/repair-help/front-derailleur-adjustment
Answer: This is often caused by either too much friction in the derailleur cables or the derailleur being sticky because they weren't lubricated. The derailleur is trying to pull itself down from 3 to 2 but isn't strong enough until you change to 1, which is when there's enough tension to bring it all the way down to 1.
You have to either reduce the friction in the spring or in the cable.

Clean your derailleur with a degreaser and relube with a good oil.
Then try to lubricate your cables (unless you have teflon inner cables, which are only found on more expensive / newer bikes) with a dry graphite or teflon lube.
If that doesn't work, I'd replace your front derailleur cables. The cable housing and inner  is about 10-15 eurodollars and you might be able to do it yourself. The only special tools you need are hex wrenches, Allen keys, or a screwdriver for the derailleur, cable cutter for the inner derailleur cable, and neednose pliers to crimp the cable ferrule.

Or you can ask your shop to do it. Should be only 0.5 hours labor.


What is writing to my hosts file?

Question: I've got an odd situation where I'm emptying out my hosts file but when I ping something that used to have an entry in the hosts file the hosts file gets populated with the entries that I've just removed.
The entries are particular to various servers on the network so they're not just random IP addresses. However, since some of the IP addresses have been changed, so the entries are no longer valid, but I can't just remove them and rely on the internal DNS on the network.
What could be updating the hosts file?
Edit: So it seems that running ipconfig /flushdns is what's adding the entries back in. I've not come across this before.
Edit2: should have pointed out earlier, this is on a windows box
Edit3: It looks like it's svchost.exe that's doing it. See this here screenshot:
Answer: Windows Security Essentials and other anti virus software will fix your hosts file. Including removing references to their ad servers that you try and block. and reverting changes on the grounds your text editor is malware. Had it happen less than an hour ago in windows 8.
Comment: Did it just happen in the background or when you flushed the dns?
Comment: after I made the save to the hosts file, in my mind instantly.
Comment: Do you know if there's any way of stopping this from happening?
Comment: disable security essentials and either disable AV or exclude that file/folder from the AV
Answer: It could be any process with root access. You could write a small script which periodically checks which files are using the /etc/hosts file:
#!/bin/bash
while true
do
  fuser /etc/hosts >> /tmp/hosts_monitoring
  sleep 0.1
done

Run it for a few minutes and check the /tmp/hosts_monitoring. It'll tell you which process id has written to the file.
Comment: Sorry, should have specified that it's a windows box
Answer: You need to download a program like Process Monitor
You can then see what is accesing the file

Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity. It combines the features of two legacy Sysinternals utilities, Filemon and Regmon, and adds an extensive list of enhancements including rich and non-destructive filtering, comprehensive event properties such session IDs and user names, reliable process information, full thread stacks with integrated symbol support for each operation, simultaneous logging to a file, and much more. Its uniquely powerful features will make Process Monitor a core utility in your system troubleshooting and malware hunting toolkit.

http://technet.microsoft.com/en-gb/sysinternals/bb896645.aspx
Comment: svchost.exe is the only thing that seems to be touching it (see screenshot)
Comment: Perhaps expand the answer, showing how to set up the filters?

What is writing to my hosts file?


Where did the phrase "bring to the table" originate?

Question: I couldn't find where the phrase "bring to the table" originated. Please share your thoughts and any information you have.
Comment: Please show your research and the context in which you found the phrase used.
Comment: @Heartspring (1) My usual practice is to look for such etymologies in the Phrase Finder and Etymon. I couldn't find answers there. (2) As OP is <<1k, I didn't CV.
Comment: Even a 'no help at [reasonable resource]' is valid. One such resource being [Phrase Finder](https://www.phrases.org.uk/bulletin_board/19/messages/640.html?utm_content=cmp-true). [LearningEnglish](https://learningenglish.voanews.com/a/words-and-their-stories-tables/3499294.html#:~:text=This%20saying%20comes%20from%20a,person%20in%20the%20same%20position.) includes the expression, but not its etymology.
Comment: @EdwinAshworth - sure, but googling the question's title brings up several relevant, easily understandable results. (In other words, do you not think that this is general reference?)
Answer: There is an earlier occurrence of this expression that dates from at least 1898, well before the period of the end of the 20th century, when it begins to be acknowledged as having the meaning "to contribute" (see this answer). Its meaning is more literal, apparently to be construed as "to carry on with sth while being sitted around a table"; it is not clear whether it is still used in contemporary English as  there is but one instance in the literature collected by Google Books.

(Good Housekeeping - Volume 26 - 1898) …reads this paper, or if the mother details for the benefit of the rest of the family all the little vexations to which she has been subjected during the day, then the children will bring to the table their petty quarrels with each other or with their school fellows.
Comment: @TinfoilHat In my opinion, the petty quarrels *are* literal; what is not literal is to "bring them to the table": they are taken up anew in a gathering of people that is metonymically represented by the table around which  it is held. This image is more literal because, instead of  a representing a discussion (abstract concept) the table represents a gathering of person (concrete).
Comment: Good research LPH. Thank you!
Comment: Yes that would be a literal table. But is the OP looking for the etymology of the idiom that means *contribute*?
Comment: "Tinfoil Hat But it's not a fully literal usage.
Comment: @EdwinAshworth — True, the petty quarrels aren't literal, but the book and the table are. And neither suggests a "useful contribution."
Answer: The origin is not clear, but the following websites suggests it probably refers to gambling:

This refers to the initial amount of money that a gambler brings to a card game and which other players have a chance to win. Bringing "a lot" to the table means that your contribution has the potential to enrich everybody else. Similarly, to "leave something on the table" refers to departing a card game when there's still the potential to win additional money.

[Geoffrey James; Inc {#7}]
As a set phrase, bring to the table appears to have become  popular  from the '80s.
Comment: Great research Gio. Thank you very much.
Answer: If you mean bring to the table in sense of contribute, see the OED:

table, n.
PHRASES
P9. to bring (something) to the table: to contribute (something worthwhile, useful, or valuable) to a discussion, project, etc.

Here are the earliest and latest examples provided:

1914     Times 20 Mar. 15/5     Reece can
do exquisitely delicate things and bring to the table a virtuosity
which words cannot overpraise. 2002     N.Y.
Times Bk. Rev. 10 Feb. 7/1     Sheppard brought to the
table not only an agile intelligence..but athleticism and physical
courage.

Source: Oxford English Dictionary (login required)
Answer: The earliest match for "bring to the table" in a literal sense that an Elephind search of multiple newspaper databases finds is from "Recipes, &c.: Excellent Recipes," in the Sunbury [Pennsylvania] American (January 2, 1864):

DRAWING TEA. The following method is highly recommended, as bringing out, at the proper time, the full flavor of the tea—"pour tepid or cold water enough on the tea to cover it ; place it on the stove hearth, top of a teakettle or any place where it will be warm, but not enough so as to cause the aroma to escape in steam. Let it remain about half an hour, then pour on boiling water and bring to the table.

There are also several early instances (often framed negatively) of the longer expression "fit to bring to the table." For example, from "A Minister's Rebuke," in the [Indianapolis, Indiana] Daily State Sentinel (October 7, 1869):

"There, gentlemen, is a bit of pie. I wish I could have made you something better; but it was not to be. Nothing went right with them. They [two beautiful apple pies] are not really fit to eat—not fit to bring to the table; but I have no other. I am sorry—very sorry."

An early instance involving a person that someone has elected to "bring to the table" appears in Mrs. A.D.T. Whitney, "Belinda Bree: The Boston Seamstress, and Her New Hampshire Neice," in the [Portland, Oregon] New Northwest (September 12, 1873):

Poor "Aunt Blin" overheard one man ask his wife in her dress-room before dinner: "Why if she must have a stitching woman in the house, she couldn't find a more comfortable one to look at; somebody a little bright and cheerful to bring to the table, instead of that old callariper?"

The first instance of "bring to the table" involving something other than a physical object and conveying the figurative sense "contribute to the gathering" occurs in an untitled item in the Springfield [Ohio] Globe-Republic (April 17, 1885), reprinted from the Christian Union:

It is not enough that at the table nobody should be glum and silent, and nobody disobliging and cross. Neither is it quite enough that everybody has come to their place with suitable freshening of face, hands, hair and dress. The growing lad, with his hungry appetite, sometimes claims that mother is over fastidious when she insists on a nice toilet for the dinner table and is resolute that traces of out-door work shall be removed, but he will thank her for her care in years to come. So, too, will his wife; for mother should never forget that it is she who must train her boy to be a good husband, considerate and thoughtful in little things. We ought to bring to the table some pleasant topic about which to talk. Not occurrences in the neighborhood merely, although a kindly interest in our neighbors and sincere pleasure in their good fortune, is not gossip, nor reprehensible.

And soon after, in Dio Lewis, "Good Humor and Good Digestion" in the [Monmouth, Illinois] Evening Gazette (February 19, 1886):

The influence of a quiet, social temper upon the stomach is one of the curious facts about digestion. Blessed are the story-tellers, for they help us digest our dinners. A good story-teller, if his stories are clean, is a godsend. His best services are rendered at the table. Those of as who can not tell a good story can bring to the table the funny papers.

And finally, an instance in which the table is not a dinner table but (in this case) a city council table, from "Municipal Elections" in the Portland [Victoria] Guardian (August 6, 1890):

With regard to the re-elected councillors, the policy they have adopted at the table speaks for them as live members and gentlemen anxious to advance the welfare of the Borough, even though at times their ideas as to how this may best be accomplished diverge a little. Mr. Brown, however, is new to Portland municipal affairs, though he has had experience as a councillor in another town. He will bring to the table, we believe, solid business ideas, and a progressive spirit tempered by inherent Scotch caution. We do not anticipate that the ratepayers will have reason to regret allowing Cr. Brown to be returned unopposed to the Borough Council of Portland.

To my ear, this sounds very modern and clearly prefigures instances in which writers or speakers talk in a purely metaphorical sense about someone "bringing [certain talents or perspective] to the table" when there is no table at all, but rather a football field, a Zoom call, or a court of law.


What type of fields existed in early universe?

Question: In quantum field theory we associate field to every particle. So how many elementary fields exits in nature? Why are fields associated to particles different from fields associated to fundamental forces? And if fields are fundamental and existed since universe formed, why are we trying to develop other theories?
Answer: Fields are a general concept in physics, aiding in describing forces and their interactions in classical physics, and interactions in quantum physics.

A field can be classified as a scalar field, a vector field, a spinor field or a tensor field according to whether the represented physical quantity is a scalar, a vector, a spinor, or a tensor, respectively. A field has a unique tensorial character in every point where it is defined: i.e. a field cannot be a scalar field somewhere and a vector field somewhere else. For example, the Newtonian gravitational field is a vector field: specifying its value at a point in spacetime requires three numbers, the components of the gravitational field vector at that point. Moreover, within each category (scalar, vector, tensor), a field can be either a classical field or a quantum field, depending on whether it is characterized by numbers or quantum operators respectively.

Quantum field theory is based on quantum mechanics. The standard model fields , each particle in the axiomatic table assumed to be a field, mathematically is represented by the free particle wave function of the corresponding equations (dirac for fermions, klein gordon for for spin0, maxwell quantized for photons .... . Creation and annihilation operators operating on these fields can be used to model   particle interactions. The Feynman diagrams are the tool for writing the integrals that have to be caluclated in order to get real numbers, crossection and decays ...

So how many elementary fields exits in nature?

as many as the current standard model  table has. If/when this is modified by new data, there will be correspondingly more fields. Each extension of the standard model fills the universe ( hypothetically, it is just mathematical models) with new fields.

why is field associated to particles different from field associated to fundamental forces?

The three fundamental forces of the standard model, are also characterized by particles and their fields, photon for electromagnetic, W and Z for weak, gluon for strong. When/if gravity is quantized a new model becomes standard there is also the graviton.

And if fields are fundamental that they existed since universe formed.

The current standard model for the universe, the Big Bang , has an inflaton field in the beginning of it.

why are we trying for other theories? is Quantum field theory not correct or complete?

Quantum field theory is a mathematical tool used in all models. It is not a theory. The models are the theory, and these still are changing because there are open questions in the present standard models both for the particles and the universe.
Comment: Does the current standard model of the Universe really include the inflaton? I thought inflationary cosmology was still speculative.
Comment: @SolenodonParadoxus it depends on your definition of standard in a field with many speculations. That is the model found in wikipedia and hyperphysics, for example
Answer: The fundamental fields of the Standard Model are the various quarks (up, down, ..), leptons (electron, electron neutrino, mu, ..), gauge bosons and the Higgs boson, where the matter fields differ from the force fields by their statistics - gauge bosons are, well, bosonic, like the Higgs field, whereas matter fields are fermionic. It is not plausible that these fields existed literally 'since the universe formed': QFT is not complete as it does not include gravity, and it seems to be impossible to extend it in a naive way to make it do so.
Hence, it seems that the Standard Model fields should arise as some low-energy limit to a more fundamental theory of everything, which does include gravity. Which theory this should be is a matter of active research, although many think it is probably string theory.
Comment: This answer should probably mention [spontaneous symmetry breaking](https://en.m.wikipedia.org/wiki/Spontaneous_symmetry_breaking) and its connection to the fundamental fields.


Loading Session Applications

Question: How does Ubuntu Load previously opened applications on startup? (I want to code and modify that functionality present in the system preferences manually )
Answer: Ubuntu doesn't "load previously opened applications on start-up" out-of-the-box.
Try this: open the terminal by pressing Ctrl+Alt+T log off and log on again: the terminal doesn't open automatically and if it does on your system, you have an application installed that does that for you. (but I wouldn't know which: check your system settings.
If your question is "How should I add applications to the autostart", then please edit your question to make this clearer and then you have two possibilities:
Using the GUI
Go to the dash, type Startup Applications and any application you want opened at login.
Using the command line
Have a look here for the file locations of these commands.  You can then add those programmatically.

Loading Session Applications


Java Swing - how to update GUI Objects ie. JTextField value from sub class in same package

Question: I have a GUI designed in Swing with all of the Components laid out.  For example I have a JComboBox with a JList and a JTextField,
When I select a different item from the JComboBox I am trying to use a ListSelectionListener to call a method in a subclass to update the JTextField based on the choice,
How would I go about doing that properly?  How do I call the subclass and then from the subclass update the GUI object's value?
Answer: public class Parent {

    private void init() {
        // ...
        combo.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Object selected = combo.getSelectedItem();
                textField.setText(getTextBasedOnSelection(selected));
            }
        });
        // ...
    }

    /**
     * Returns the text to display when the given object is selected.
     * Subclasses may override this method to display what they want
     */
    protected String getTextBasedOnSelection(Object selected) {
        return selected.toString();
    }
    // ...
}

Answer: I hope I get your problem right. You have a View Component with several subviews and you want to update one because of the changes done inside the other one.
Therefore you write an action listener for your combobox in the main View:
comboBox.addActionListener(new ActionListener(){

            @Override
            public void actionPerformed(ActionEvent arg0) {
                textField.setText(comboBox.getSelectedItem());
            }

        });

Answer: Instead of inter-connecting components directly, I recommend to apply the Mediator pattern:
Create a subclass of JPanel (e.g. XyzPane) where you put all your components in. This class becomes the Mediator. It

listens for events of its components
updates the components as needed
fires its own events, if needed (this allows it to be a part of a parent Mediator: grouping components in Panes and then nesting the Panes)
Comment: @trashgod: thanks for the link. But maybe I didn't mean the Mediator pattern in the strict sense as shown in the Wikipedia example. Rather like the example shown by Anthea or JB Nizet: the comboBox and the textField are not directly connected, only indirectly via a listener registered by the parent.


Do gate agents really seat young children away from their parents in United Basic Economy?

Question: According to United, for Basic Economy fares:

Seats will be assigned prior to boarding. Customers traveling
  together, including families, will not be able to sit together.

My husband and I plan to travel this summer with our 7-year-old daughter between San Francisco and Austin (3-and-a-half hours each way). If we buy Basic Economy tickets, will they really seat our child away from both of her parents? (I have no problem with being seated separately from my husband, as long as my daughter is with one of us.)
To clarify, I understand the letter of the policy. I would like to know how it is applied.
Update
I ended up buying the more expensive tickets for me and my daughter, booking an aisle and a window seat, and I got the cheaper seat for my husband. That way, at least one of us will be with our daughter. Most likely, the person in the middle seat between me and my daughter would be happy to trade with me or her, so we are next to each other, or with my husband, which would put the three of us together, but I would not pressure them to do so.
Since posting, I found these related questions:

How old does a child need to be to sit separately from parents when flying? (Aer Lingus international flight)
Being separated from one's young children on a flight (Thomson, United Kingdom)
Comment: You say you understand the policy yet your asking about how it applied shows you don't understand the policy--that they will **not** lift a finger to seat your family together.  Also, you should have paid the extra for him, also--as it is he's on a separate ticket.  Harmless so long as everything works fine, problematic if something goes wrong.  If the plane is overbooked they might take you two and leave him behind.
Comment: @LorenPechtel I do regret only reserving seats for me and my daughter, not my husband too. I was so appalled by United's policy (which was new to me) that  I was thinking more about gaming the system rather than what was best overall. In the future, I'll keep my travel to less miserable airlines, pay the decency surcharge when I have to take United, and support regulation of airlines.
Comment: No, you are not describing a problem with Basic Economy.  Rather, you are describing a problem caused by people who won't respect the rules.  It says families will not be allowed to sit together, you come here asking if they really mean that.  Sitting your young child away from you should simply get you deboarded.
Comment: Why do you think you would have an aisle seat to trade?  Basic Economy is going to give you the bottom of the barrel--almost certainly middle seats.  You are trying to get something (sitting together) that Basic Economy explicitly does not provide.  If you care about sitting together you pay the extra for standard economy, you don't wave the parent card.
Comment: @WGroleau The problem is that Basic Economy explicitly states you don't get to sit together.  If the mother buys the tickets anyway figuring the airline can't split them up that's trying to exploit the system.  Too bad.
Comment: @WGroleau I guess it's the wrong word--I'm saying that if they show up and expect the airline to seat them together anyway don't let them fly.
Comment: @LorenPechtel I disagree with you that asking about policy application means I don't understand the policy. Not all policies are uniformly applied.

Interesting point about risks of separate tickets. I hadn't thought of that. Thank you.
Comment: @LorenPechtel You may have missed or misunderstood my update.: I did *not* buy basic economy for me and my daughter: I paid for full economy with assigned aisle and window seats.Never have I suggested that anyone should trade seats with me because I am a parent; another respondent suggested that. I agree it would be inappropriate. You and I are on the same side.
Comment: I don't think United is being indecent with their Basic Economy offering--they make it very clear what it entails.  If all you want is a bare-bones seat there's nothing wrong with it.  I do agree that United leaves a lot to be desired these days but this is not an example of it.
Comment: @LorenPechtel I consider it indecent because it pits passengers against each other. Someone who paid full price for a window/aisle seat may be forced to either sit next to someone else's young child or trade for a middle seat. Some of this anger shows in the comments that have been left for this post (some of which have been flagged and removed.) Of course, I don't expect everyone to agree with me.
Comment: @LorenPechtel: You're saying that if UA doesn't seat child with mother they should then kick the mother off the plane?  I suspect you meant something else.
Comment: @LorenPechtel: But your last sentence is still unexplained: "Sitting your young child away from you should simply get you deboarded."  Who (parent or airline) is "Sitting your young child away from you"?  And why should that get the parent deboarded?
Comment: Perhaps UA should have specified a minimum age for Basic Economy, but as it is they are leaving it to the parent's judgement. If your child is old enough, responsible enough, and confident enough flying to sit with strangers, you can use Basic Economy. If not, don't use it.
Answer: There's no guarantee that will happen, as the new low fare, Basic Economy, is explicit that, for price, you relinquish some options that other, higher priced fares have, including seat selection.
The carrier will assign unoccupied seats and won't ask other passengers to move to accommodate those travelling together.
Among the other fare restrictions, United forewarns customers (added emphasis mine):

We're introducing a new fare option, called Basic Economy, which is available on select routes and in addition to standard United Economy® fares. Created for our customers who may be more price-sensitive, these lower-priced fares provide most of the same inflight services and amenities that are available with standard Economy — such as food and beverages, United Wi-FiSM and inflight entertainment — but with some important restrictions that you'll want to be sure to review carefully before booking:
Seat selection and upgrades are not available
When you choose a Basic Economy ticket, your seat will be automatically assigned prior to boarding, and you won't be able to change your seat once it's been assigned. You will not be eligible to purchase Economy Plus® seating or receive Economy Plus subscription benefits. MileagePlus members, including Premier® members, cannot use complimentary, earned or mileage upgrades.
Group and family seating is not available
Please note that customers traveling in a group, including families, will not be able to sit together.
Comment: It sounds rather like a scheme for selling middle seats. That would result in groups being broken up, with no leverage for trading to bring them together.
Answer: It states right there:

Seats will be assigned prior to boarding. Customers traveling
  together, including families, will not be able to sit together.

However, I do think that most people are willing to trade seats so that your daughter can sit with one of you guys - assuming this person also has a Basic Economy seat.
Comment: Do _not_ rely on people trading seats! It's entitled to do so. If you want to sit with your kid, for heaven's sake, buy the right fare.
Comment: The wording almost suggests "Customers traveling together *will be prevented* from sitting together." That might be intentional - for example to break up groups of people looking for cheap travel who might be badly behaved - and/or over-fuelled with alcohol before boarding!
Comment: @EllenSpertus If i would sit in an aisle seat, and would have to trade with a middle seat, i would never trade, no matter who sits next to me. So if you want to trade, make sure that the other one gets at least the same or a better seat.
Comment: @chx I think anyone seated next to someone else's young child would be happy to trade, but I take your point.
Comment: Don't expect people to help you.  You're likely to end up with middle seats.  Nobody is going to want to trade for them.  You chose the basic economy fare, live with the results.
Comment: Yes, I understand the rule. I'm wondering how it is applied. It's hard to imagine they'd really put a 3yo, for instance, away from a parent. I just don't know where they draw the line.
Comment: Well, you can always ask the agent and I'm sure they can make some changes for situations like this. I don't know how the computer "picks" the seats, so I can't really answer on where they draw the line.
Comment: @dunni Let's not forget that if you ask after they have already put their luggage in the overhead bin, they will likely neither want to move further back in the plane nor move forward and have to wait for everyone to deplane before being able to get their bags.
Comment: People will be reluctant to trade a window or aisle seat for a middle seat.  Also, people sometimes pick specific rows or sides of the aircraft for specific reasons (e.g. being on the left side flying into DCA from the North affords a spectacular view of Washington; being on the left side flying into SAN affords a spectacular view of downtown San Diego).  If you want a specific seat, book the class that permits it and reserve a seat.
Answer: I wrote to United Airlines, I got an answer, so I've got the answer to this question.
That is: no, gate agents do not seat young children away from their parents in United Basic Economy, parents choose to do it.

Basically reading this:

Seats will be assigned prior to boarding. Customers traveling
  together, including families, will not be able to sit together.

I nowhere got the feeling that they were willingly separating families and group. And this being USA, where you get class actions for sneezing to the left instead of to the right, it's difficult to imagine a company doing this. I thought that maybe it was mostly a matter of bad phrasing, as the sentence as written gave me the impression that they are just stating a matter of fact, not threatening people. And by reading the FAQ is even more obvious, by the way.

Anyway, this is United answer:

Dear Mr. Bertozzi:
Thank you for contacting United.com Web Support.
Sorry for the confusion with the Basic Economy seating. When
  purchasing Basic Economy fares, there is no guarantee that families
  will be seated together. At the time that Basic Economy seats are
  being issue, if there are seats together, then we will be able to seat
  parties together. But, in the event that there are no longer 2 or more
  seats together when it is time to issue Basic Economy seats, then
  parties of 2 or more will not be able to be seated together. With
  Basic Economy seating it basically comes down to what seats are left
  after the regular economy seating has been seated.
Hope this helps.
Thank you for using united.com.
Regards,
Michelle Hunt
United.com Web Support

So, the point is as simple as: you can pay for a normal ticket and choose your seat, or choose the discounted ticket and risk having your children sit beside a stranger on the other side of the plane, because those were the last available seats. You choose it, it has nothing to do with gate agents and airline companies.
Answer: In other countries such as the UK, it's seen as a pragmatic safety benefit to seat young children next to a parent/guardian. Some form of this safety precaution is supposed to be enacted in the US this year after this act from 2016:

(d) Family Seating.--Not later than 1 year after the date
       of the enactment of this Act, the Secretary shall review and,
       if appropriate, establish a policy directing all air carriers
       to ensure that, if a family is traveling on a reservation
       with a child under the age of 13, that child is able to sit
       in a seat adjacent to the seat of an accompanying family
       member over the age of 13, to the maximum extent practicable,
       at no additional cost.

I haven't been able to locate a follow-up to this so am not sure where it stands at the moment.
Comment: "To the maximum extent practicable" means that it is unenforceable.  Any competent management can come up with an explanation why something isn't "practicable."
Comment: The act was [signed into law](https://www.congress.gov/bill/114th-congress/house-bill/636/all-actions?q=%7B%22search%22%3A%5B%22PL114-190%22%5D%7D&r=1&overview=closed#tabs) on July 15, 2016.  I cannot find anything to suggest that a corresponding policy has been established yet.
Comment: I agree with @WGroleau's observation. That said, there are limits, and it might still make sense for a concerned traveler to file a complaint with the FAA pointing out the discrepancy between federal law and United's stated policy. (Sorry for the delayed reaction...the SE server decided to bump the Q&A, and I decided to take a look :) )


What does this line of shell script do?

Question: ls "${VMX_DIR}" | grep -q delta > /dev/null 2>&1;
It lists the files in VMX_DIR and then pipes them into grep but what is it doing?
Answer: It's checking to see whether there is a file or path containing delta in ${VMX_DIR} then returns the result via the exit code of grep since grep will return with a normal exit code of 0 if it finds a match, and failure code of 1 if it doesn't. It's useful in bash conditionals.
Here's what it's doing statement by statement:

ls "${VMX_DIR}"

Lists the contents of the directory stored in the path ${VMX_DIR}

| grep -q delta

Pipe the results to grep, searching the results of the directory listing for delta ignoring any output to stout.

> /dev/null 2>&1;

Redirects stdout to /dev/null so it will not be printed. The 2>&1 tells bash to redirect stderr to stdout (which is now going to /dev/null). The semicolon just terminates the line.
Answer: From the grep man page:
   -q, --quiet, --silent
          Quiet;  do  not write anything to standard output.  Exit immedi-
          ately with zero status if any match is found, even if  an  error
          was detected.  Also see the -s or --no-messages option.

Basically this is looking to see if there is a filename containing delta and returning true if there is or false if there isn't.  What it's actually doing with that truth value is anyone's guess from that little snippet you have there.
Answer: The last part redirects standard output and standard error to /dev/null - I.e., any output of the grep command (errors, warnings, or matches) is dropped. This kind of command can be useful to do a simple check with no output - The $? variable will be zero or non-zero depending on whether the grep succeeded or not.
You could simplify this code by replacing > /dev/null 2>&1 with &>/dev/null, which in this case will do the same thing: Redirect all output streams to /dev/null.
See I/O Redirection for details.
Answer: It seems like it is meant to just detect if the word 'delta' is in the list, in which case it will return 0, otherwise it will return 1.
So, based on the return value, you know if delta was there or not.

What does this line of shell script do?


Installshield template?

Question: In our company we regularly create MSI's with Installshield(latest).
These setups adhere to a set of rules and name schemes so they work with our deployment system and autobuilds etc.
Is there a way to eliminate the repetitive overhead of going through all the boilerplate stuff (setting the company meta data, basic folder structures, a few events, including some default helper files etc) for each setup?
Answer: Take a look at the InstallShield Automation interface.  What I did was:

Abstract all my components out into WiX Merge Modules ( could be IS merge modules though ).
Create a base InstallShield project ( Common.ISM )
Create XML files to describe my feature tree and product configurations
Create Build Automation to reflect the XML and invoke the Automation Interface to "Emit" my installer source.
Build the Product Config in the ISM.

This gave me a great deal of code reuse but it's not trivial to set up this type of system.  However it scales very well and the advantages are huge if you have the right business needs.
Comment: definitely going to check this with our autobuild specialst. Indeed doesn't seem very easy, but could save us a lot of work and trouble.
Comment: Checkout http://blog.iswix.com/2010/06/improving-installshield-product.html   I have a great deal of experience in this area and could help you design your system based on your needs.
Answer: There are two ways you can do this:

Save the ism file in xml format (there is a setting for this in the project settings). Then in run time, push the desired values with a new application that could be written (which will edit the XML file using DOM or so...)
Use InstallShield Automation interface. This can be done using VBScript. You may check this link: InstallShield Automation Interface
Comment: Making raw edits to the ISM's XML is a real pain due to it's DTD format. Personally I use the IS Automation Interface first but it only has about 75%-80% coverage. I save the project in Binary format and then use Windows Installer Queries to manipulate the table data when needed. Also I use C#  NAnt/MSBuild tasks and I make it all data driven through XML. For example when I want to create a new feature, instead of writing a VBScript to call ISWiProject.AddFeature() I write an XML file with a Feature Element and then C# code that uses LINQ queries to read the Feature Element and call AddFeature

Installshield template?


Why is the observable Universe larger than its age would suggest?

Question: The age of the Universe is estimated at 13.8 billion years, and current theory states nothing can exceed the speed of light, which can lead to the incorrect conclusion that the universe can't have a radius of more than 13.8 billion light years.
Wikipedia deals with this misconception as follows:

This reasoning would only make sense if the flat, static Minkowski spacetime conception under special relativity were correct. In the real Universe, spacetime is curved in a way that corresponds to the expansion of space, as evidenced by Hubble's law. Distances obtained as the speed of light multiplied by a cosmological time interval have no direct physical significance. → Ned Wright, "Why the Light Travel Time Distance should not be used in Press Releases"

That doesn't clear the matter up for me, and having no science or maths background beyond high school, further reading into Hubble's law isn't helping much either.
One layman's explanation I've seen offers explanation that the Universe itself isn't bound by the same laws as things within it. That would make sense – insofar as these things can – but the above quote ("Distances obtained as the speed of light multiplied by a cosmological time interval have no direct physical significance") seems more general than that.
Can anyone offer (or direct me to) a good layman's explanation?
Comment: you might want to look at the comments in this question? http://astronomy.stackexchange.com/q/2150/1227
Comment: A duplicate of this question: [How can the universe be expanding faster than speed of light?](https://astronomy.stackexchange.com/q/23105/698)
Answer: The easiest explanation for why the maximum distance one can see is not simply the product of the speed of light with the age of the universe is because the universe is non-static.
Different things (i.e. matter vs. dark energy) have different effects on the coordinates of the universe, and their influence can change with time.
A good starting point in all of this is to analyze the Hubble parameter, which gives us the Hubble constant at any point in the past or in the future given that we can measure what the universe is currently made of:
$$ H(a) = H_{0} \sqrt{\frac{\Omega_{m,0}}{a^{3}} + \frac{\Omega_{\gamma,0}}{a^{4}} + \frac{\Omega_{k,0}}{a^{2}} + \Omega_{\Lambda,0}} $$
where the subscripts $m$, $\gamma$, $k$, and $\Lambda$ on $\Omega$ refer to the density parameters of matter (dark and baryonic), radiation (photons, and other relativistic particles), curvature (this only comes into play if the universe globally deviates from being spatially flat; evidence indicates that it is consistent with being flat), and lastly dark energy (which as you'll notice remains a constant regardless of how the dynamics of the universe play out). I should also point out that the $0$ subscript notation means as measured today.
The $a$ in the above Hubble parameter is called the scale factor, which is equal to 1 today and zero at the beginning of the universe. Why do the various components scale differently with $a$? Well, it all depends upon what happens when you increase the size of a box containing the stuff inside. If you have a kilogram of matter inside of a cube 1 meter on a side, and you increase each side to 2 meters, what happens to the density of matter inside of this new cube? It decreases by a factor of 8 (or $2^{3}$). For radiation, you get a similar decrease of $a^{3}$ in number density of particles within it, and also an additional factor of $a$ because of the stretching of its wavelength with the size of the box, giving us $a^{4}$. The density of dark energy remains constant in this same type of thought experiment.
Because different components act differently as the coordinates of the universe change, there are corresponding eras in the universe's history where each component dominates the overall dynamics. It's quite simple to figure out, too. At small scale factor (very early on), the most important component was radiation. The Hubble parameter early on could be very closely approximated by the following expression:
$$H(a) = H_{0} \frac{\sqrt{\Omega_{\gamma,0}}}{a^{2}}$$
At around:
$$ \frac{\Omega_{m,0}}{a^{3}} = \frac{\Omega_{\gamma,0}}{a^{4}} $$
$$ a = \frac{\Omega_{\gamma,0}}{\Omega_{m,0}}  $$
we have matter-radiation equality, and from this point onward we now have matter dominating the dynamics of the universe. This can be done once more for matter-dark energy, in which one would find that we are now living in the dark energy dominated phase of the universe. One prediction of living in a phase like this is an acceleration of the coordinates of universe - something which has been confirmed (see: 2011 Nobel Prize in Physics).
So you see, it would a bit more complicating to find the distance to the cosmological horizon than just multiplying the speed of light by the age of the universe. In fact, if you'd like to find this distance (formally known as the comoving distance to the cosmic horizon), you would have to perform the following integral:
$$ D_{h} = \frac{c}{H_{0}} \int_{0}^{z_{e}} \frac{\mathrm{d}z}{\sqrt{\Omega_{m,0}(1+z)^{3} + \Omega_{\Lambda}}} $$
where the emission redshift $z_{e}$ is usually taken to be $\sim 1100$, the surface of last scatter. It turns out this is the true horizon we have as observers. Curvature is usually set to zero since our most successful model indicates a flat (or very nearly flat) universe, and radiation is unimportant here since it dominates at a higher redshift. I would also like to point out that this relationship is derived from the Friedmann–Lemaître–Robertson–Walker metric, a metric which includes curvature and expansion. This is something that the Minkowski metric lacks.
Comment: Thank you for such a detailed and considered answer. You might've overlooked the "layman" element of the question - at least, the mathematics goes a long way over _my_ head - but I appreciate that there's probably a limit to how much a layman _can_ understand about such things.
Comment: Hmm - my apologies. I thought this would be a digestible chunk of cosmology. The real point I wanted to make is that it's an integral rather than a simple product between the age of the universe and the speed of light. Because different things act differently with expansion, you get "phases" that the universe goes through. The rate of expansion changes depending on which phase it happens to be in. Feel free to keep posting questions - I (and others) would be happy to try to make things as understandable as possible.
Comment: @astromax +1 for the pretty formulas though.
Answer: In short: things can not move faster that light by theirselves, but they can move faster than light due to universal expansion. The more far away, the faster they go away.
Answer: I was just thinking about that and here is my layman's explanation. Imagine you're tracing two dots on a crumpled piece of paper, the dots are moving, but as they are moving, so is the paper getting 'uncrumpled', the actual distance between the dots will be more than the sum of distances they have travelled.
Answer: I love Ned Wright's cosmology tutorial and I highly recommend it, but that statement by him is at the least very misleading. Superluminal recession speeds plainly can't be related to spacetime curvature because they don't vanish in the limit of zero curvature (zero energy density or zero $G$).
The real reason that distances can be larger than $c$ times the current cosmological time is that the clocks that we use to measure cosmological time are not at relative rest, like the clocks in inertial coordinate systems, but are moving radially away from each other, making cosmological coordinates more like polar coordinates. If we have a family of uniformly distributed clocks, and we define $t$ to be the reading on the nearest clock and $x$ to be (the number of clocks between that one and the origin) × (the separation between adjacent clocks when they both read the same time), then $Δx/Δt\le c$ is a true statement if those clocks are at relative rest, but not if they're moving outward from a common origin point. In the latter case, there turns out to be no upper limit on $Δx/Δt$, even in special relativity.
In the special-relativistic case, you can think of this as being due to time dilation. If you look at two clocks with respect to inertial center-of-velocity coordinates, they move in opposite directions at some speed $v$. After an inertial coordinate time $t$, they're an inertial coordinate distance $2vt$ apart, but the elapsed time they've recorded is smaller than $t$ by a factor of $γ=1/\sqrt{1-v^2/c^2}$. Since $γ{\to}\infty$ as $v{\to}c$, the ratio of the coordinate distance to the elapsed times on the clocks also goes to infinity as $v{\to}c$.
In special relativity, there's a tendency to think of inertial coordinate times as the "real" times and readings on clocks as somehow distorted by time dilation, but that's really just a human prejudice. The universe doesn't care about coordinate systems, and it only "cares" about reference frames if they're actually instantiated by physical objects. There are no naturally occurring inertial reference frames at large scales in the real world, but there is a naturally occurring radial reference frame, given by the averaged motion of matter on large scales, or by the crossing points of wavefronts from the cosmic microwave background. The most natural coordinate system for the universe – and the one actually used by cosmologists – is based on that naturally occurring frame, and, as Ned Wright said, when you define distances and times in that way, the distance/time ratio $c$ has no special significance.
(Actually, all three of Ned Wright's sentences are correct. The trouble is that when you take them together, they seem to imply that superluminal expansion is related to spacetime curvature, and that isn't correct.)
Comment: The link you give doesn't work for me. Is there a different one?
Comment: @DHalsey The site was down; it's back up now.
Answer: The completely unscientific explanation...
Imagine the universe to be a balloon.
Two bodies start close to each other but on opposite surfaces. The expansion of the balloon takes them away from each other at equal speed and such a rate that the light from one at its starting point takes almost the entire history of the universe to reach the other. The distance between the two NOW is not twice the age of the universe - because you cannot travel "through" the balloon - but must instead go round the surface of the balloon... 13.8 * PI billion light years = 43 billion light years.
Not strictly correct, but at least avoids too much worrying about astrophysics and cosmology!
Comment: Also, why would you want to avoid "_worrying about astrophysics and cosmology_" on a site for astrophysics and cosmology?
Comment: The fact that the ratio between the radius of the observable Universe in Glyr, and the age of the Universe in Gyr, is close to $\pi$, is purely coincidental, and is not even correct to 1 decimal (it's roughly 3.354). The ratio varies with time.
Comment: I think this answer deserves more love. It captures an important feature of the real answer, which is that distance/time is larger than you expect because the distances and times are defined by (a curved-spacetime analogue of) polar coordinates, not Cartesian coordinates.
Comment: Observable universe diameter is around 93 billion light-years so that's not enough https://en.wikipedia.org/wiki/Observable_universe


Download YouTube Videos from Mobile?

Question: Is it possible to download YouTube Videos on my New Samsung Galaxy Y android phone and have it stored in my SD card?
Comment: For the record this is against YouTube's TOS.
Comment: Apparently, it will be something soon (or already) available in India (http://www.livemint.com/Consumer/fMBN3yFAzQ7ok1sHj8JQTI/Google-to-make-YouTube-videos-available-offline-soon-in-Indi.html)
Comment: I dont have enough rep to answer. Most flexible way is to use youtube-dl through termux.
Answer: Yes. You can take either of the following two approaches:

Use tubemate. With this app you can browse YouTube and download the video just like you would download from websites like keepvid.com.
The latest version of YouTube allows the videos that you opened or YouTube thinks you'll watch or have added to watch later queue to be downloaded in background so that you can watch it later. Read here. -> The preload option is no longer available in the official youtube app since version 5.6, see google support note here

For the first time, YouTube will start downloading videos it thinks you might want to watch, whenever you're plugged in and on Wi-fi.
That's great news for commuters, for example, who can now watch videos when outside their mobile coverage zone (or without paying for costly video downloads over 3G).
YouTube, careful to draw a distinction between this and total downloading of its vids (which breaks its terms of service), is careful to point out that you'll still need to be online for the first second when you press play.
Answer: I used to use Tubemate. It has many options, one of which is the ability to  download the audio part alone so that you can also just listen to the video rather than watch it.
I later implemented a YouTube downloader script in my browser app. It has a flaw though - new videos loaded in the same page will not update the download link.
With the desktop browser disguise option and a Greasemonkey script, it might be possible to make it work in a mobile device as well.
Comment: you implemented Greasemonkey support in mobile browser?
Answer: It's 2020 and I use NewPipe (it can be downloaded here or here). You can use it to download Youtube videos and to:

Customize your download:

Set title
Choose between video or audio download
Download subtitles
Select the most suitable file format
Download the resolution you need

Disclaimer: I am just a user of the app.

Download YouTube Videos from Mobile?


Were natural resources a primary reason for invading Romania during the middle ages-present?

Question: When I was in school in Romania I remember my history teacher saying that historically Romania has seen a lot of invaders (referring mainly from the middle ages-present) because it used to have a lot of natural resources. To what extent is this true? I know that Hitler used to get a part of his oil from a city in Romania called Constanta, and right now there is a controversy in Romania because a Canadian firm wants to purchase the rights to a very large gold mine. But historically was Romania invaded for its natural resources? If not, then for what reasons? (I realize that this last question is VERY general, so I don't mind a VERY general answer, such as "usually to expand territory") Thanks.
Answer: A full answer would have to do a detailed comparison of resources and relative numbers of invasions across time and territories, which is a bit much, or else track down the motivations of leaders for each particular war, which someone might offer here. Let me get at your question in two ways: 1) What resources were there, and how were they exploited by various states that controlled the territory 2) Why might your teacher have used that particular explanation, and put this into the context of a particular historiography.
For this, let me focus on two sources, cited below in form [Source:Page Number]:

Vlad Georgescu, The Romanians: a History
Lucian Boia, History and Myth in Romanian Consciousness

Since it is best to be careful when we transport modern nation-states into the distant past where they did not exist, by "Romania," let us clarify this to refer to the various kingdoms, provinces, and other territories in history which had some form of political control that overlaps with the current borders of that state. These include the Dacian provinces in the Roman Empire, and at various times, Hungary, Transylvania, Wallachia, Moldavia, the Ottoman Empire, Austria, Russia, etc.
The Important Resources
Under Roman control, the resources of the region were "skillfully exploited" [1:7] by the empire. It was an important producer of grain, the gold mines of the Bihor mountains were particularly important, along with lead, copper, silver, iron and salt mines.
Grain, that is, the agricultural wealth of the region continues to be important, but with the many conflicts, the plains of Wallachia and Moldavia were depopulated and did not return to intensive agriculture until after 1829. [1:21] The agricultural sector suffers in general under many conflicts, the power structure that prevents the development of agriculture, and poor harvests in general. [1:82]
Instead, animal husbandry, especially cattle and hide exports, become important in Wallachia and Moldavia in particular and dominate from the 15th to 18th centuries. Oil comes into play in the 15th century in Moldavia and 16th century in Wallachia [1:24] but is not really a major part of the economy until the 20th century (when, as you mentioned, it is a key resource during WWII), though increases significantly after 1859. [1:125]
When Ottoman pressures come to bear on the region, especially on Wallachia and Moldavia, the major extraction from the region is not resources but paid tribute, and later, when they are more fully incorporated into the empire, and during the "Phanariot" period in the 18th century, through direct taxation, make serious and important contributions to the Ottoman war machine. Beyond tributes, the Ottomans extracted other resources, especially grain, cattle, lumber, and saltpeter. [1:77]
Mining doesn't come up that often though, and in 18th century, some efforts to take advantage of copper, mercury and gold mining are abandoned and mining "usually limited to salt" [1:82]
After the establishment of an independent Romania in mid-19th century, however, it grows again to be an important bread basket and by 1913 is the 4th largest wheat exporter in the world [1:125] and in the interwar period up to 1940 becomes the 5th largest agricultural exporter in the world. [1:198]
Overall, the early importance in mining for the Romans, and the importance in grain supplies for both Romans and later rulers were likely a draw, but, as with any territory invaded, the extraction of surpluses in the form of taxation would have been significant, but it would require a much more detailed comparison with other states to determine the relative attractiveness of these territories.
Of course, besides the obvious tribute/taxation and resources, the region is also probably invaded as much as it was, because it happened to be on the way to something more important, especially in the context of the major Habsburg vs. Ottoman and Russia vs. Ottoman conflicts. In fact, Moldavia and Wallachia both actively tried to pursue their own autonomy by portraying themselves, in diplomatic communications to various neighbors, as useful buffer states in 1774, 1783, 1787, 1791, 1807, and 1829. [1:76]
The Historical Narrative
The portrayal of a Romania that is a frequently invaded territory is common to many, but not all nationalist historiographies but the "natural resources" argument may have something to do with preemptively foreclosing other explanations and passing on the idea of stable set of territory which "naturally" belongs to the Romanian nation. Since Romanian nationalism predominantly is based on an ethno-linguistic conception of a language and ethnic group with a common origin (except for some occasional "greater Romania" narratives that pop up over the past 150 years) this means that legitimate claim on territory is predominantly based on a people, language, religion, etc. wherever they are. Perhaps the most interesting recent thing I have seen written on this is:
Holly Case, Between States: The Transylvanian Question and the European Idea During World War II
Which looks at the way the "lost" territory of Transylvania plays between Hungarian and Romanian nationalism in the context of two allies of Germany in WWII. There is a fascinating "battle of the maps," for example, where the predominant map feature is not resources or historical claims, but colorful depictions of demographics. By focusing on claims of where the Romanian people are and how that is to be defined, the claims to territory move beyond historical legitimacy to claims or some other measure, which is true for a lot of 20th century struggles over territorial control, especially around or immediately after WWI. Since Hungary etc. can't justify, your teacher might argue, the argument on the basis on people (though they indeed did, as Case's book shows), they must have just been after the natural resources of the mountainous territories of Transylvania - for example.
Lucian Boia suggests another hint, but it depends on when your teacher was telling you this. Pre-1989? Or after? Boia suggests that around 1993, with publication of The Plot Against Romania (focusing on 1940-1947) and Dan Zamfirescu's War Against the Romanian People there is an increasing theme in historiography to describe "plots" against Romania throughout its history where Romania's neighbors were, Poland-partition style, trying to tear the nation apart and gobble up its various parts. [2:175-178] Perhaps your teacher, if we are talking 1990s here, was influenced by this trend.
Answer: I believe Romania's chief misfortune during the Middle Ages was to be right next to Eurasian Steppe, in an era when settled communities really had no military answer to the expert horse archers that steppe country naturally incubated.

Another view (for as long as the link lasts)

To make matters worse, right on the other side of Romania is the Hungarian Plain (or Alföld), which was also perfect territory for those same pastoralists. One can imagine that in the middle in their way was not a fun place to be.
So in a way, yes Romania did contain valuable "resources", if you count good pasture land as a resource where militarily potent pastoralists are concerned.
Comment: While that is very true up until about 1300, after that the area was dominated by powers big enough to keep in check the steppe invaders (Hungarian and Polish kingdoms, the Ottomans, Russia), and bring the stability which was a necessary condition for the very creation of the Romanian states. I think I'll post an answer to this old question.
Comment: @cipricus - Yeah,  post-gunpowder, as CMcE put it, the power gradient on the Steppe swung the other way.
Answer: The statement that the Romanian area was "invaded" many times is hard to contradict. All territories have been more or less "invaded", but taking a look at this area of Europe we cannot avoid the impression that here we are dealing with a higher scale of the phenomenon.
The general impression comes from the reasons stated in another answer which brings forth the fact that the Eurasian Steppe that starts east of Romania was a highway for invasions by migratory peoples since antiquity. It's not that Romanian polities were attacked by armies coming from that highway of invasions, but that they couldn't even exist before that highway was cut off by modern medieval powers.
The original "Indo-Europeans" came on the same route probably, followed by Sarmatians, Scythians, then Huns, Goths and all the other "invaders" of the post-Roman and early medieval Europe.
We know of the Dacian kingdom and of its "invasion" by the Roman empire, which plays a big role in the Romanian narrative discussed in the question above. But that narrative largely ignores the fact that Dacia was mostly an unstable area, only exceptionally and for short periods unified or pacified. It was permanently under pressure from the east, and most of the time the origin of invasions into the Roman empire by multiple peoples more or less "migratory" and more or less allied or mixed with the "Dacians". Stopping those invasions was one of the main reasons why the Romans invaded Dacia.
Interestingly for our topic, one of the other main reasons of the Roman conquest of Dacia (meaning mainly Transylvania) was indeed natural resources, especially the gold of the Transylvanian mountains.
The other main reason was the power of the Dacian state (the only independent kingdom in Europe other than the Romans at that time). But that power depended on the cooperation with the peoples of the steppe and on the integration of those peoples (and of those peoples' cultural and especially military structures) within the Dacian power-structure. This is characteristic for the eastern European states: like the Goths in western Europe, some migratory peoples have created powerful kingdoms in eastern Europe. And of these some have become a bulwark against new invasions from the east, like Bulgarians and Hungarians.
It is the Hungarian kingdom that decisively put a stop to the Mongol threat from the east, and thus stabilized the region enough that the first Romanian larger polities emerged in the 14th century. (That's something which the patriotic narrative is happy to ignore.  Instead it puts forward the fact that in this process the Hungarians had themselves "invaded" those very territories - beside the fact that they were "invaders" in the first place etc...)
The peoples of the steppe do not count for much in the invasions of Romanian lands after 1300, and the power-struggle between larger adversaries that crossed their interests on that area becomes the main factor of instability and "invasion": since their political beginnings (and up until the present, given that Moldavia is still separated between two states across spheres of influence, and that part of its territory is occupied by Russian troupes)  Wallachia and Moldavia found themselves at the frontiers of conflict between much more powerful states which periodically invaded the territory: first Hungary and the Mongol (until c 1400), then Hungary, Poland and the Ottomans (until Mohacs, 1526), then Russia, Austria, and the Ottoman (until the Crimean War that pushed those war frontiers to the east and led to Romanian independence in the 19th century).

How much resources counted in all this? Not decisively, anyway, but they counted of course, as they always do.
Hungarian king's occupation of Transylvania had something  to do with the same gold that the Romans coveted, but the political reasons were far more important (not to mention the fact that Transylvania was not "Romanian" when the Hungarians invaded it). The Ottoman exploited the two principalities as much as they could, but there was not much to exploit in the first place and the ottoman capacity to exploit economically was limited: here too, the reason for repeated military interventions were political - part of an expansionist logic and the resulting wars with the other powers -, not economical.
Once the Romanian states became vassal the Ottoman became interested in stability, but that was hard to get for the aforementioned motives. Interestingly enough - and contrary to the patriotic narrative - Ottoman political and economic pressure forced centralization of the state (especially) in Wallachia and the development of fiscal and economical institutions which weren't there before (as Marian Coman shows) and would serve exploitation of resources. Later they became a sort of "fiscal farms" which the Ottoman were trying to develop and stabilize. But the exploitation was an effect, not a cause of the initial "invasion".
Romania was invaded again during WW1 and WW2, but it must be noted that in WW1 it attacked and "invaded" Transylvania first, before being overwhelmed and occupied by Germany, while in WW2 it went east along with the invading Germans up to Stalingrad, before being occupied by the USSR.
It has to be emphasized though that Romanian alliance with Hitler's Germany was the result of a political and territorial "invasion" through the Ribbentrop-Molotov pact, which resulted in the brutal bullying of Romania into the Nazi camp. A main purpose of Nazi policy concerning Romania was access to Romanian oil - and against that access were directed the US and UK raids against Romania.

As a summary answer to the question "Were natural resources a primary reason for invading Romania":
Mostly NO.
No, or not especially, because although invasion and occupation is bound to involve exploitation of resources, in most cases that was not the primary reason in the case of Romanian area, excepting the case of migratory invaders from the steppe who moved and "invaded" as a matter of course for cultural as well as economic reasons (they lacked many resources which they were used to steal from others). But those powerful warriors have bothered more the Dacians and Romans than Romanians because they were mostly neutralized before the Romanian principalities could emerge.
YES, partially, in two cases:

the Roman invasion of Dacia had gold as one of the main reasons, although the ancient techniques allowed exploitation only up until 215. (But Dacia is not "Romania".)

Hitler's "expansion" towards Romania (the territorial loss suffered by Romania through the Ribbentrop-Molotov pact) was related to access to Romanian oil. But that was not really an invasion, the oil was paid, and Romania was supposed to get territorial compensation to the east.

Even in these two cases exploitation of natural resources is subordinated to other causes. Geopolitical reasons of war actions on Romanian lands far outmatch the economic ones.


Motor choice for quietest (mechanical and electrical) operation

Question: Which types of motor are the most quiet from a mechanical and electrical point of view? To avoid quiet, but weak, suggestions, the motor needs to be capable of about 70 Nm of torque and speed range from 600 to 2400 rpm.
Comment: This sounds a lot like a product recomendation, which is against the rules of this website. If I am incorrect, let me know, and edit the question so it is more obvious you are not seeking a product recomendation. Try to be more specific in your questioning. Good luck, and welcome to EE SE!
Comment: I would first look at servo motors and induction motors. The drive units for these are not electrically quiet, but they can be acoustically quiet if the carrier frequency is 20kHz or above. You will have to work on filtering and shielding etc to keep the electric noise under control. Fans for the drive unit and possibly the motor will probably be the largest source of acoustic noise (assuming you can find one with a high carrier frequency).
Answer: Have you considered a hydraulic motor?
Have the pump power unit remote in another room for example, which keeps that vibration separate.
The speed is achievable and can be finely controlled.
There won't be any electromagnetic interference produced which seems to be one of your important parameters (electrical noise).
Comment: Is 2400 RPM achievable?
Comment: @mkeith Yes, some do 5000rpm, check out this for examples of what you might need : https://www.boschrexroth.com/en/us/products/product-groups/industrial-hydraulics/motors/axial-piston-motors/fixed-motors
Answer: You can either use asynchronous motor or synchronous motor
Asynchronous motors is quiet compared to synchronous but their speed highly depends on load and frequency .
Synchronous make little bit more noise because it has brushes to make magnetic poles but you can adjust the speed by lowering the DC current in magnetic poles


I have a 2009 Chevy impala and when you put it in drive the car moved about 5 feet then when I push on the gas the engine revs like it's in neutral

Question: Do I need a new Engine? It has an automatic transmission do I need new transmission? Is it a valve or belt ? Please help
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: Because the motor starts and runs, you don't need a new engine. ("Valve" or "belt" sound like engine parts. They're working fine, and don't need replacement.)
There is, however, a problem with the transmission. It may be low on transmission fluid, or need some other service. It may be beyond servicing and require replacement. Given your level of mechanical knowledge, I'd take the car to a transmission shop. If the car doesn't move under its own power, then you'll have to have it towed.
Comment: Thank you very much I do have a small transmission leak but I also added 4 art of transmission fluid but still not wanting to stay in drive mode if I  turn the car off and let it sit for about 15 seconds then turn it back on most of the time I'll be able to drive about 5 to 10 feet but then it goes back into the neutral mode to where the engines revving when I push on the gas I appreciate your answer thank you

I have a 2009 Chevy impala and when you put it in drive the car moved about 5 feet then when I push on the gas the engine revs like it’s in neutral