Why not creat more words for philosophy?

Question: I often get the impression that philosophy is about replacing words (concepts) with others. If that's the case, then why not create more words, more concepts?
Comment: The question seems to imply that philosophy is already creating more words. In that context, it makes no sense to ask "why not create more words".
Comment: Kant discusses this very matter somewhere in the first Critique. His justification for using already-current words is obscure, and since he uses *combinations* of words that hardly anyone ever thought of before, perhaps he missed his own point. I myself have found that neologisms can be useful when marking out relatively specific functions/objects, but that more general terms are better expressed using more established wordings. And then there are the joke names (philosophers and set theorists are actually pretty good at those kinds of jokes, it has turned out).
Answer: I think your question is an excellent one. Many of the questions you will find on this site arise because philosophers use equivocal language. A word such as 'exist' for example, has many shades of meaning, and confusing them leads to no end of questions such as 'does a perfect circle exist?' and so on. Perhaps if we used entirely new words- rather than introducing additional meanings for words that are already over-worked- we might reduce the scope for muddled thinking.
Comment: we condemn ourselves... it's such a shame
Answer: Philosophers do indeed create lots of words and concepts. Here are some, and there are many more.
Proposition, argument, validity, entailment, satisfaction, reference, valuation, model, inference, identity, axiom, theory, interpretation, a priori, categorical, speech act, nominalism, libertarian, dualism, monism, conventionalism, essence, accident, idealism, realism, nominalism, phenomenon, noumenon, analytic, percept, skepticism, abstraction, praxis, holism, imperative, behaviourism, sense data, physicalism, naturalism, disposition, ontology, essentialism, determinism, positivism, reduction, supervenience, teleology, synthesis, empiricism, utilitarianism, altruism, relativism, atomism, compatibilism, functionalism, dialetheism, fallibilism, reductionism, qualia, representation, maxim, atomism, dialectic, emergence, intentionality, contingency, semiotics, token.
Bear in mind that philosophers are trying to make sense of the world about them, so it is necessary to relate what they are saying to the ordinary use of language. Philosophical language cannot float entirely free of ordinary words, or else it would be impossible to understand it.
Also, there is no point introducing new terms without good reason. A good piece of terminology should have explanatory value and make a distinction where a real difference exists and avoid making a distinction where no difference exists.
Comment: An excellent answer. I would give it multiple upvotes if I could.


In Wsop, paying taxes depend on what?

Question: When I'm looking for WSOP 2012 results payout structure, why some players paid taxes and some of them doesn't? Is their goverment getting this money from them? Is it about being illegal in their country?
Comment: Poor merson, **3.7M** tax.
Answer: These are due to IRS regulations, and it isn't taxes paid, just withheld. The players must declare this money as income, less any deductions, to the IRS and then they can have the difference returned to them. For professional players, if they had losses and expenses to offset some of these winnings, they might get quite a lot of it back - even all of it. That's between them and their accountant and the IRS, the casino is just required to withhold that money.
Some countries have tax treaties with the United States and there is no withholding. That is why some players show no tax - but they still have to declare these winnings in their home country and pay taxes there, the casino just isn't required to withhold anything.
Comment: In a number of countries, as long as playing poker isn't your profession, you don't have to pay taxes on it.  The US is not one of these, obviously.
Comment: @wilfra Thanks! I guess it's the long arm of the law of world governments. Seems insane to me. It also means that the EV of playing the WSOP main event is negative even for top-level players, unless they live in a country that taxes gambling winnings very lightly: seeing as most of your EV in big-field tournaments comes from the times you win top prizes, I'd guess that the fact that these prizes are taxed totally kills everyone's EV.
Comment: @jacob - right, and if you are from one of those countries you can get this withholding returned to you as well, you just need documentation from your country etc.
Comment: @wilfra Are you absolutely sure that there are witholdings for non-Americans? I would guess that no part of the prize are withheld from non-Americans, tax treaty or no tax treaty: the countries those players come from have no legal standing and no legal power over US casinos.
Comment: @mobiusdumpling i'm absolutely sure as of a few years ago, but I haven't played the WSOP recently so it's possible things have changed.
Answer: many western and western friendly countries have a tax treaty with The USA for gambling winnings,if you are from a country with this treaty, you do not have to pay the taxes to uncle Sam, but you may have a tax liability in your own country. But I do not know if these wins are reported to your country of origin. it may be the case the are, if you receive, a WG form. It should be noted that his applies to any gambling wins rather it be poker or a slot payout.at the wsop one year I was sweating s friend of mine in the 1500 hold-em event, she placed high enough to win 800,  tasking a loss, the TD, wanted to issue a WG and withhold. I helped her out by telling the TD, that her country, had a tax treaty and they could not withhold, he went in the office then paid her the full amount she had coming. with Americans, if you win at a casino above certain threshold, you most produce a SS# are they are required to withhold or if you are protected by a tax trreaty you must produce a passport
. but in US and other countries, you can be found guilty of tax evasion, I have heard at least one WSOP event winner has met such a fate. If you win pay your taxes, even if you are a cash game grinder, it will at least increase your social security benefit.
remember the WSOP is a worldwide televised event, so there is a high likelihood, the tax man in your country would discover if you won big and likely look to see that you paid taxes. if you have tax issues, look up R&B tax services. they are an accountant firm that specialize in gaming taxes.
just to note if you win in a country with the treaty, you pay taxes in your home country. I tseems tempting to just ignore the tax liability, but dont, it could mean nothing but trouble for you.

In Wsop, paying taxes depend on what?


Can light travel faster?

Question: I'm on Earth. Joel is on a planet orbiting near a black-hole's horizon. Every year on Joel's planet is equivalent to 10000 years on Earth due to the gravity of the BH. The two planets are 10000 light-years apart. I send a message to Joel via light. 10000 years later Joel got the message, but only 1 year for Joel, because of the time difference. The distance between the two planets and maximum speed of light is the same for both of us. Therefore it should take 10000 years for both of us. Why Joel got the message so fast?
Comment: The speed of light in a vacuum is.
Comment: The speed of light is not constant when there is gravitational field present
Comment: @Rogelio, does it get faster than 299,792,458 m/s?
Comment: Sorry for the wrong title, updated.
Comment: I believe wormhole is a solution to Einstein's equation and you may need to collect some hypothetical exotic matters for it to work. Speed of light is the same no matter the observers, see relativity written by same guy that give you wormhole and I wouldn't recommend you to have a vacation at P which is close to B.
Comment: @user6760, I'm on Earth, Joel is on P. I send a message to Joel. I have to wait 10000 years for the message to get to Joel, but Joel waits only 1 year. No worm-wholes involved. The distance between Earth and P is the same as well as the maximum speed of light for me and Joel. How Joel got the message so fast?
Comment: TACHYONIC ANTITELEPHONE!!!!!!!!!
Comment: ...if you have a negative mass, then, according to c(1-r/R)=v, where r= the Schwarzschild radius, R= the distance from the mass, yes!
Comment: I think that you are playing with the idea that in region of the planet where the escape velocity is near to speed of light so that light signal will take 10000 years to leave the planet... sorry I do not know if such a scenario is possible.
Comment: Either way all incoming and outgoing protons will travel at the same speed , matter tells space how to bend and space tell light how to move. Cheers drink on me.
Answer: While it's often stated that the speed of light is a constant, this is an oversimplification. It's more precise to say that light follows a path called a null geodesic.
Suppose we are using some coordinate system $(t, x, y, z)$ to measure the positions of spacetime points. If we observe the light to move an infinitesimal distance in space $dx, dy, dz$ in an infinitesimal time $dt$. Then the proper distance moved by the light is given by:
$$ ds^2 = g_{\alpha\beta}x^\alpha x^\beta \tag{1} $$
where $g$ is the metric tensor. When we say light follows a null geodesic we mean that equation (1) will always give the result $ds = 0$. The proper distance $ds$ is an invarient i.e. all observers will agree on its value.
In special relativity the metric tensor takes a simple form, and equation (1) becomes:
$$ ds^2 = -c^2dt^2 + dx^2 + dy^2 + dz^2 \tag{2} $$
Remember that for light $ds = 0$, so if we put this into equation (2) and rearrange it we get:
$$ c^2 = \frac{dx^2 + dy^2 + dz^2}{dt^2} $$
But if you recall Pythagoras' theorem, $dx^2 + dy^2 + dz^2$ is just equal to the total (coordinate) distance moved squared, $dr^2$, so our equation becomes:
$$ c = \frac{dr}{dt} $$
And this just defines a velocity $dr/dt$ for the light, and it tells us that velocity is always equal to $c$. This is the origin of the claim that the velocity of light is the constant $c$.
However in general relativity the metric $g$ is more complicated. For example, for a static black hole the metric (in polar coordinates this time) is the Schwarzschild metric:
$$ ds^2 = -\left(1-\frac{2GM}{r c^2}\right)c^2dt^2 + \left(1-\frac{2GM}{r c^2}\right)^{-1}dr^2 + r^2 d\Omega^2 \tag{3} $$
Even though this looks a lot more complicated, we can calculate the speed of light in the same way by setting $ds = 0$. We'll make the additional simplifaction that the light is moving in a radial direction so $d\Omega = 0$. In that case we get:
$$ 0 = -\left(1-\frac{2GM}{r c^2}\right)c^2dt^2 + \left(1-\frac{2GM}{r c^2}\right)^{-1}dr^2 $$
And this rearranges to:
$$ \frac{dr}{dt} = \left(1-\frac{2GM}{r c^2}\right)c $$
So in this case the speed of light is not $c$. In fact it's less than $c$ for any value of $r$ less then infinity.
The speed of light I've calculated here is the speed as observed by an observer far from the black hole, and it's always lower than $c$. However if you were hovering just outside the event hole you'd observe the speed of light to be less than $c$ everywhere nearer the black hole than you, but faster than $c$ everywhere farther from the black hole than you. That's why in the situation you describe light can travel faster than $c$.
However it's important to state that if you make a local measurement of the speed of light i.e. measure it at your position then the speed you measure will always be $c$. This is an important principle in general relativity. No matter how curved the spacetime, in your immediate vicinity it is always (approximately) flat and special relativity applies.
Comment: Oh, I really appreciate the effort. Never thought someone give me such a long answer, and sorry that I'm not able to understand it solely.
When you say faster than $c$, do you mean faster than the local $c$?
Comment: The local speed is always $c$, i.e. 299,792,458 m/s, so I mean faster than 299,792,458 m/s.
Comment: How much local is local?
Comment: @Paul: that would need to be a new question.
Comment: Yeh,okey.But I have another question,light doesnt really travel at faster than the speed of light ,we just observe it to be going faster  than 'c' otherwise that would mean information travelling faster?right?
Comment: @Paul: In general relativity the question *but what really happens* arises quite frequently, and it has no answer. All we can ask about is the behaviour of light in our coordinate syste i.e. the time measured by our (local) clocks and the lengths measured by our (local) rulers. In these coordinates light really can travel faster than $c$. Note that the term *observe* doesn't mean *see* i.e. can we actually see light travelling faster than $c$ with our eyes (or proxies such as telescopes and cameras). Observation is strictly the assigning of events to spacetime coordinates.
Answer: Common misconception: the speed of light in a vacuum is constant. It's not proper to say "speed of light"- because, the speed of light can be slowed in a gravitational field. Heck, traveling at v=0.8c, there could be a light beam that gets slowed to 0.75c=v because of gravity- voila! You're traveling faster than light!!!!
I always like to think that since c is a peculiarly chosen max speed, it is more like the information loading speed of spacetime. It 'predicts' one planck length each planck time...
So, yes, in response to what you most likely meant, the speed of light in a vacuum is a constant, as far as we know. 299792458 m/s. My favorite number.

Can light travel faster?


Wil I habe Problems with VirtualMachine?

Question: I have a question: will I have problems installing Nix or Haskell on an Ubuntu VirtualMachine over Win11? Will I have problems with Plutus in the future? Would it be better to install Ubuntu only on one PC? Thank you.
Comment: This question might not have a correct answer and is really not related to the topic we discuss here. In general I can tell you that yes is possible to set up virtual box on a windows 11 machine and so you can visualizer an Ubuntu instance to use fot your learning.
Comment: Ok, Thank you...
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Answer: Installing the required toolset in an Ubuntu VM is perfectly fine and quite documented. In fact, it is the method used by many, as it isolates the environment from the host avoiding problems in certain cases. You can check this recent thread for more details:
Plutus environment set up: pro and cons
Be aware that in any case, your Win11 host, a vm on it, a cloud vm, or even another computer, will need a minimum of 8GB of free RAM and around 35GB of free disk space dedicated to the environment.
Cheers!


Kompozer not in the repo?

Question: Why is Kompozer no longer in the repositories? Can any one suggest a new alternative (other than BlueFish) ?
Comment: Related: http://askubuntu.com/questions/204704/where-do-i-look-for-the-reason-for-removing-a-package-from-the-ubuntu-repositori
Comment: @A.S. I had asked that question just to know the reason for it. :)
Comment: I searched before asking but found no thing.
Answer: Kompozer was removed from the repository as it is no longer being maintained by its maintainer in the upstream(Debian).
References:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690251
http://packages.qa.debian.org/k/kompozer.html

As for your second question,
a suitable alternative for it would be Bluegriffon.
This is what it looks like:

To install it do the following steps:

Download the installer.
Right click on the Installer file. Pick the "Permissions" tab and
check the Allow executing file as program checkbox. (For security
reasons, most files aren't executable by default.)
Double-click on the installer file, and the GUI to install BlueGriffon will start.

About Bluegriffon, from its website:

BlueGriffon is a new WYSIWYG content editor for the World Wide Web.
  Powered by Gecko, the rendering engine of Firefox, it's a modern and
  robust solution to edit Web pages in conformance to the latest Web
  Standards.

Partially reference: https://askubuntu.com/a/136849/11932
The latest bluegriffon can also be installed from the getdeb repository, by doing the following steps:
wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -

sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu precise-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'

sudo apt-get update && sudo apt-get install bluegriffon

Courtesy: http://www.sourceslist.eu/software-tramite-repository/how-to-install-bluegriffon-editor-wysiwyg-on-ubuntu-12-04-from-ppa/
Answer: Kompozer packages are removed from Quantal version but still you can download install the binaries or from source.
Here is the binaries/source link
Make sure you install the dependencies before installing the Kompozer .deb file
Other Alternative for Kompozer is aptana-studio but you cannot find this package in ubuntu repository. You need to download them from official website
Answer: The KompoZer packages have been removed due to lack of maintenance (the packages can not be built from source with the 12.10 tool chain).
I suggest Amaya and the NVU/KompoZer fork Bluegriffon.  Unfortunately, neither is in the repositories.
Answer: This question seems old, but here is an alternative solution to install Kompozer. It worked for me:
STEP 1:
Download this:
http://launchpadlibrarian.net/102977...buntu2_all.deb
Once it downloads, click on it, should open Ubuntu software center, click install.
STEP 2:
Download from here:
https://launchpad.net/ubuntu/quantal/+package/kompozer
You'll see a list of options based on hardware. I downloaded the i386 because I have an intel processor. Which is this file:
http://launchpadlibrarian.net/102977...untu2_i386.deb
Once that is downloaded, same thing - click it, opens in software center, then install.
It will then install as any other and you should be good to go.
Ref: http://ubuntuforums.org/showpost.php?p=12360288&postcount=13
Comment: The links provided for launchpadlibrarian.com are dead/giving 404 errors
Comment: @maggotbrain, Sorry, I copied the answer from the reference mentioned. It worked at the time!
Comment: @maggotbrain, here is another solution that works, so far:
`wget http://archive.ubuntu.com/ubuntu/pool/universe/k/kompozer/kompozer_0.8~b3.dfsg.1-0.1ubuntu2_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/k/kompozer/kompozer-data_0.8~b3.dfsg.1-0.1ubuntu2_all.deb`
Comment: Add that as an answer please, or edit yours.
Answer: Here is another solution that I just found:

Unfortunately Kompozer isn't available from the Ubuntu 13.04
repositories, therefore you have to install it as follows:
cd ~/Downloads

wget http://archive.ubuntu.com/ubuntu/pool/universe/k/kompozer/kompozer_0.8~b3.dfsg.1-0.1ubuntu2_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/k/kompozer/kompozer-data_0.8~b3.dfsg.1-0.1ubuntu2_all.deb

sudo dpkg -i kompozer*.deb

source: http://www.howtoforge.com/the-perfect-desktop-ubuntu-13.04-raring-ringtail-p4

Kompozer not in the repo?


Why Sitecore habitat is not following best practice to use datasource everywhere

Question: Sitecore best practice says to use datasource but habitat doesn't seem to follow this. At many places in habitat, content is in the item, instead of linked through datasource. Can someone explain me if there are any reasons behind this or best practise for this has not not been followed in habitat. Thanks
Comment: List some specific examples, please.
Answer: As we don't (yet) know which example you have in mind, I'll give my general opinion: although it is best practice to use datasources, it might not be best practice to use them for everything. Your content editors could go completely crazy if they need to quickly publish a news article and they need to create 5 datasources and a content item to achieve that (Sitecore will seem overwhelming to lots of people if you do that). Best practice is actually to think about your content architecture and create something that enables your content editors to work fluently and give them and the marketers the ability to do their (marketing) job - meaning let them personalize, test, etc.. renderings where needed.
Even in SXA not all components use a datasource. The title of the page is picked from the item itself. This does not mean you need to do that always, but in many cases it might be a good idea. Talk to the customer, the editors and the marketers that will administer the site and decide based on that information how the content should be structured (so they can do their job and the site is still performing well) and how and where to use renderings with datasources.
ps: sometimes it can also be a good idea to let an editor assign a datasource optionally (take the current item if no datasource was set).
Comment: If your component needs to be personalized, datasources are a must. Do be aware though that you might not want to confuse visitors with a primary navigation that changes all the time ;)
Comment: Well that is answered in the linked post. As long as the individual components make no assumptions beyond their assigned template (and only rely in the Interface Base Template) - having an actual datasource set is optional.
Comment: IMO that is always best practice and the way IA in Sitecore is intended. http://sitecore.stackexchange.com/questions/1864/when-to-store-content-on-the-context-item-vs-a-renderings-datasource-item
Comment: I see your point and do agree that using datasources should always be the first thought, but I don't think it should be "carved in stone" as a must everywhere. But this discussion makes this question actually a duplicate of the one you are linking to, not?
Comment: Thanks Gatogordo for the answer. By the way i was referring site logo and primary navigation items which are not linked through datasource in habitat. Actually I was thinking from personalisation point of view for primary navigation.


Name of this Italian pastry?

Question: Yesterday I bought this pastry filled with pistachio cream at Ponte di Castelvecchio in Verona, Italy. While it was very delicious, I forgot its name. Can somebody help?
Comment: Is there a cake under the cream? And was it served very cold, almost frozen?
Comment: No, the cream was "uniform". And no, it was not served cold.
Comment: Craves a taste of this!
Answer: I don't think these have a specific name, but it's possible to take a guess what they are made of.
The container is a "cialda", a thin waffle. Here is a recipe with pictures, basically it's done with a waffle iron with shallow ridges.
The cup is also lined with dark chocolate - the rough appearance suggests this was made in the shop and not bought already made.
What is inside is the hardest to guess, but I think it's likely some pistachio-flavoured "crema pasticcera", pastry cream. Likely milk (possibly also cream), sugar, pistachio paste, egg yolks, rice and corn starch.
The topping is made of crushed nuts, I'd say pistachios but the picture is too small to be sure.
Comment: Plus 1. I mention that based on the shape and size one can refer to them as "tartelletta", tough mainly tartellette are mini cakes and not waffle like.
Answer: Those are pastries for when you're not able to make real pastries.
They're made with industrial pre-made ingredients. They taste good, but you can find better things.
Source: I'm italian.
Comment: No name, a generic "pasta" or "pasticcino" (pastry) is often used.
Comment: but is there a name for it?  (and it makes sense ... the chocolate on the waffle to keep the wet ingredient from soaking it is often done for ice cream items that get held for some time)

Name of this Italian pastry?


Android service with always on GPS

Question: I've created an android app that is so far working quite well. It contains a local service which is responsible for getting the users location every couple of minutes and relaying that via UDP to a collection server which is in turned displayed on a web application map.
The app needs to be constantly running unless the user explicitly signs out of the application. Currently, it seems the OS is shutting down the service and restarting it as needed. I can see this because normally it would report its location consistently every 2 minutes. Instead, there are gaps in these intervals.
So I'm looking for some advice on how I can write a service which (at the battery's expense unfortunately) can stay running always and pool the location service just enough to send accurate fixes at a 2 minute interval.
I have a well working code base so far, so if demonstrating where I currently am with code would help, don't hesitate to ask.
Thanks in advance to those that lend a hand.
Answer: Your best bet is to use the AlarmManager to wake up every two minutes, do some processing and quickly go back to sleep.
If you think you're hardcore, you could even use a wake lock, but that will keep the phone's CPU turned on persistently without mercy. You don't want that.

Android service with always on GPS


How can I add a custom "Date" field as a field in a view?

Question: I created a custom Content Type called "Event". In it, I use a custom "Date" field (from the Date module). When I try to create a View that displays all of the Events sorted by their Date, I can do this. However, when I try to add a field for "Date" so that I can display it in the output, "Date" is not shown in the list of fields. Is this because not all content types have a "Date" field? How can I get around this?
Comment: So you have a view that shows multiple content types and you wish to display a custom date field only on content of type event?  Or do you have a view of events that you want to display your custom date field on?
Comment: Do you have the date_views module enabled?
Comment: I have a problem with this too. Pre-existing content type with a date field and the field refuses to come up as an option. Seems to be working for some people so there must be something triggering this as a bug. My date is stored in ISO format, not sure if this would make a difference.
Answer: I'm not sure why you're having trouble.  I just did this and it worked.  Here's what I did.

Add a "Date" field (widget: select list) to Content Type A.
Create a view that shows items of Content Type A.
Click Add next to Fields and search for the label for my "Date" field.

You should try looking through/searching your list of fields again.  It should be there.  (Even when a view is filtered to a specific content type, the Views module will often allow you to select fields that are not associated with that content type.)


Problem creating a scrollable content area with height defined in percentage

Question: We are creating a web page with header, content and footer. The header and footer should be visible at all time and the content should be scrollable. The container div has a fixed width but no fixed height. I solved the problem of keeping the footer at the end by using css sticky footer (http://ryanfait.com/sticky-footer/) The content area is divided into two parts (content1 and content2) and has a flexible scrollable div.
The problem is, the height of the content area is not absolutely defined (i.e. 100%).
We would like that when the data in either content1 or content2 exceeds the screen size that it automatically overflows into its own independent scrollable bar and the header and footer remain visible.
We would like to avoid using iframe. Is there any way, we can do it with javascript (jquery or  others)? We are highly inspired from goole docs home page.
Any help would be highly appreciated.
Choesang :)
Answer: Hey Choesang, redsquare, here is another way you can do it without putting anything off the screen.
First find the height of the viewport that you have to work with, we'll call this 'viewportHeight'.  If the content of your header and footer are already set, they will have a height.  Calculate their heights and add them together, we will call this 'usedHeight'.  The height you have left in which to put the contents is: remainingHeight = viewportHeight - usedHeight;
If you set the css property on your content container to be height=remainingHeight and overflow-y = auto, your content will always take up at least the minimum content height, and if there is too much content it will force a scroll bar to appear.
We are going to use the Prototype library to help us, but we could just as easily use jQuery or even write the code to calculate the heights ourselves.
Notice in the body I am setting the height to 100%, as well as the padding to 0, and the margin to 0.  Most browsers put a 10px padding around the body and this will cause your footer to show up off the screen in the process I am showing.

header text

content text

footer text

Comment: you'll prolly want to add a window resize listener so you can keep the content height correct if the viewport size changes.
Answer: Before you show the content you could append it to a div that is positioned off screen. Then take the height of the content and work out depending on the size of the clients viewport if it needs to be scrollable.
Then take the content out of the off screen div and append to your main div with the height specified for the viewport and overflow:auto.


I have a dynamic xpath which is based on 4 values, if I am using OR condition the xpath looks huge, any other way to handle this?

Question:     _OPTION_1 = "Average"
    _OPTION_2 = "M"
    _OPTION_3 = "Casual"
    _OPTION_4 = "D"

    _WIDTH_VALUE_XPATH = f"//mat-option/span[contains(text(),'{_OPTION_1}')] | //mat-option/span[contains(text(),'{_OPTION_2}')] | //mat-option/span[contains(text(),'{_OPTION_3}')] | //mat-option/span[contains(text(),'{_OPTION_4}')]"

Answer: You can use //mat-option/span[condition1 or condition2 or condition3]
With XPath 2.0 or higher you could also use
//mat-option/span[matches(., 'aaa|bbb|ccc')]
But sadly the developers of Selenium are still stuck on XPath 1.0.
Are you sure you want "text()" here rather than "."? With text(), the text must all be in one text node: no intervening comments or element tags allowed.
Comment: Can we try something with regular expression here? And yes I am sure with text() but I will do consider using. as it will make the XPath Robust.
Comment: @AshishAhuja regex is not supported in xpath
Comment: @PDHide what you mean is, regex is not supported in XPath 1.0. Regular expressions have been supported in XPath since 2007, but a lot of people (including Selenium users) are still using the older version.
Comment: @MichaelKay xpath 2 is not supported in browser , browser still supports only xpath 1.0 so is selenium . So its not what selenium users thinks but thats the only option we have unfortunately
Comment: Selenium could support XPath 2.0 or 3.1 if it chose to, even though there's no native support in the browser.
Answer: https://developer.mozilla.org/en-US/docs/Web/XPath/Functions
Browser supports only XPATH version 1.0 and matches is an XPATH 2.0 method, and so you can use only xpath 1.0 in selenium. The above linked document shows the supported XPATH methods.
so in your case
//mat-option/span[text()="someting" or text()="something" and so on ]
//mat-option/span[contains(text(),"someting") or contains(text(),"someting") and so on]
//mat-option/span[contains(string(),"someting") or contains(string(),"someting") and so on]


Earth visited by an enormous creature

Question: I'm trying to remember the author and title of a short story about the Earth in the far future which is visited by an enormous creature (maybe like a continent sized salamander) which devastates the world but is worshipped by the people. It returns periodically with earth-shattering consequences. Any ideas?
Comment: 1960's at the very latest.
Comment: NSFW the Perry Bible Fellowship comics has a strip "Earth Disorder" where an enormous creature visits Earth and causes much destruction: http://pbfcomics.com/96
Comment: This question does not have an accepted answer and should **be reopened**.
Answer: I believe that might be Brian Aldiss's "Heresies of the Huge God". The story is from the journals of a priest of the Huge God, a giant, many-legged, lizard shaped creature which arrives on Earth (it's described as looking like a gecko on a globe) and causes massive destruction, stomping mountains flat, disrupting the weather and so on. The people worship it, but heretics pray for it to leave. It does at the end of the story, but as it jumps off its weight knocks Earth out of orbit and the people start praying for it to return.
Originally published in 1966, I read it collected in "Man In His Time" ISBN: 0-02-030225-8 [978-0-02-030225-4] and here's a list of other places it was collected: https://www.isfdb.org/cgi-bin/title.cgi?52433. You can check it out here and see if it's the same story, although it is terribly formatted it's the only link I could find to the text: http://docs4.chomikuj.pl/2271392519,PL,0,0,Brian-W-Aldiss---Heresies-of-the-Huge-God-(txt).txt
Comment: +1, this is almost certainly it, and one of my favourite Aldiss shorts.

Earth visited by an enormous creature


Office 365 development API like Google Docs?

Question: Is there a Office 365 development API like Google Docs? I was searching web but I was unable to find.
Answer: There's an API for the Exchange part of Office 365. Lync also has an API. You can also managed Sharepoint sites via the Client Object Model, web services or WebDAV APIs for uploading and downloading files
However I don't believe there's anything for manipulating documents online outside of using WebDav to push to a sharepoint site.
Comment: Blowdart's answer is right for now unfortunately, but I am hoping to get some answers on their forum here: http://community.office365.com/en-us/f/154/p/7521/30580.aspx
Answer: For anyone who's still coming across this page: There is now Office 365 APIs in preview covering the Files, Mail, Calendar and Contacts APIs. Visit http://msdn.microsoft.com/en-us/library/office/dn605892(v=office.15).aspx for more information
Answer: SharePoint 2010 introduced the Client Side Object Model and a REST API for working with list data.  SharePoint 2013 builds on top of that with the app model, enabling a broader support for CSOM and REST using OAuth for app authorization that enables you to build apps (including working with documents, among many other features of SharePoint in O365).  You can find more information at:
http://dev.office.com
There is a new Office 365 API that was announced recently at the SharePoint Conference that broadens this support further to enable client applications to call those services as well.
http://msdn.microsoft.com/en-us/library/office/dn605892(v=office.15).aspx
Answer: Simple answer: not yet.  Office 365 does have a developer guide on Sharepoint - http://www.microsoft.com/download/en/details.aspx?id=17069  .
But it appears their API is not the same as Google Docs because it is still early.
Comment: Being closed source doesn't exclude an API (there is an SDK for Office and has been for years). Nor is Office = Office 365, which the question addresses. And of course Google Docs is proprietary and closed source too.
Comment: The question isn't asking if the Office 365 API is the same as the Google Docs API. It is asking if Office 365 has publicly accessible API documentation, the Google docs has publicly accessible API documentation. He's wondering, because he searched for Office 365 API documentation, but couldn't find any.


What about the Prime Directive with Capellan?

Question: In Star Trek TOS 2x11, Friday's Child.
The Capellan are just ten tribes without knowledge of bows... They don't explain how McCoy was involved with them. Why does Starfleet agree to trade with the Capellan regarding to the Prime Directive?
Comment: There are a number of TOS occasions where less-developed civilizations are caught up in Federation / Klingon power politics and imperial competition.  Once the Klingons were in contact with a given species, perhaps the Prime Directive was either regarded as moot or was winked at, in the way international treaty requirements and the laws of individual states were compromised during the Cold War.
Comment: Sounds like a great opportunity to make some money selling them bows, as long as Starfleet can wait for them to invent money.
Comment: could be that some mining crew (lots of mining happening back in TOS days) discovered the topaline on Capella and established contact (ie - not Starfleet, so contact had already been made) which opened the door for McCoy to visit for a few months earlier in his career and then for the Enterprise to come and try to establish a mining agreement. There's no indication in Cushman's 'These are the Voyages' that the Prime Directive was considered in the writing
Comment: ...there are non-canon comics that address that it was an apparent violation
Comment: Once the Klingons have "contacted" the inhabitants of a planet, natural development is halted.  The prime directive no longer applies, as it is intended to prevent interference in the normal development of a planet's inhabitants society.  "Contacted" in quotes 'cause Klingons don't just drop by and say hello.  Once they've "contacted" you, you are theirs.
Comment: @JRE - they didn't know Klingons were actually on the planet until they got there "we've discovered a Klingon agent has preceded us to the planet." Remember, McCoy had already spent months there some years prior (and had offered medical tech, which was rejected)
Answer: The official novelisation (based on an earlier version of the script) hand-waves this. The Prime Directive doesn't apply because the inhabitants are human, in fact a lost colony of Earth.

"Chief Akaar, I trust you will bear with me for a long explanation. The Federation has hundreds of colonies which are mining operations, and research projects, on planets and asteroids that normally could not maintain our life forms. As your own legends hint, you yourselves are descendants of an Earth colony. Those colonists named your planet after an asteroid in Earth's own solar system, a five-hundred-mile ball of rock that was the first asteroid to be colonized-though it hasn't even an atmosphere."
Answer: Remember at the time of TOS, there were disputed territories, not a Neutral Zone with the Klingons.  If the Klingons had no equivalent to the Prime Directive, then there's little point in the Federation enforcing theirs on those worlds.
Errand of Mercy, Friday's Child, and A Private Little War are all examples.
Note how in A Private Little War, it was the recommendation of Kirk's previous survey that the planet be left alone, not the Prime Directive.
If non-interference leads to subjugation by a brutal dictatorship (which the Klingons were shown to be in Errand of Mercy), then which is the moral choice?
Comment: Is this answer based purely on your own reasoning, or is there canon evidence that Starfleet didn't think the Prime Directive applied on Capellan? If you know of such evidence, you could improve your answer by editing it to cite that evidence.
Answer: There is no problem with the Prime Directive.
McCoy had been with a medical team from the Federation, offering medical assistance to the Ten Tribes, at an earlier date than "Friday's Child".
Obviously the Prime Directive was not in full force at the time when that medical tream visited.  That means that Federaton and stafleet knew that the Capellans had been contacted by someone before the medical team visited, and knew about life on other worlds, and thus the parts of the Prime Directive about informing people about other worlds no longer applied to the Capellans.
Possibly Capella IV had been conquered by the Klingons or the Romulans and had been liberated by the Federation during a war with the Klingons or the Romulans.  Maybe a planet had conquered the Capellans and then had to grant independence to Capella IV when it joined the Federation.
Only the parts of the Prime Directive about not interfering with the natural development of Capellan society should have applied to Capella IV.
Of course any dealings with the Capellans could be considered interfering, to a greater or lesser degree, in the natural development of their world.  Possibly Capella IV was in the Prime directive category of planets where peaceful contacts and trade, possibly leading to unplanned changes in their social development, were allowed, but no deliberate attempts to change their society or forceful interference were permitted.
Or maybe the Prime Directive was bent a bit to negotiate with the Capellans because the need for topaline was so great.  Necessity is often used as an excuse to ignore rules and ethics.
To me the big problem with negotiating with the Ten Tribes of Capella IV is the idea that they rule all of Capella IV.  A planet large enough to be habitable for humans would be vast. It is hard to believe than ten tribes can be the entire population of intelligent beings on a such a vast planet.
Maybe the word translated as tribes should have been translated as nations, or warrior hordes, or cultures, or something else which implies numbers larger than those of tribes, which implies no more than a few thousand people per tribe.
It seems extremely improbable that the Ten Tribes can rule the entire land area of Capella IV if their only mode of transportation is walking.
If they can send messages and orders by horseback then they could operate a vast empire like the Roman, Achaemenid, Chinese, Mughal, etc. empires.  But if walking or sometimes running is the fastest way to send information and orders, the High Teer of the Ten Tribes should only be able to rule for a few hundred miles in any direction from his capital.
Possibly the capital of the Ten Tribes is a vast tent city and army encampment constantly on the move from place to place to reminde everyone the High Teer is their ruler.  Much like the capital of the King of Kings of Ethiopia was a moving tent city during the Middle Ages and until the city of Gondar was founded in about 1600.  So it would be plausible for the High Teer to rule a land as large as Ethiopia was about 1500, which was a lot smaller than modern Ethiopia if I remember correctly, so maybe about 500,000 square kilometers or 200,000 square miles.
If the Ten Tribes were horse riding nomads, and their lands happen to be bordered on every side by the lands of sedentary civilized peoples, then maybe when the first High Teer united the Ten Tribes they could have conquered the civilized lands bordering their land one by one, much like the Mongols after Genghis Khan united them.  And if those civilized lands bordering the ten tribes reached to the edges of a continent that was smaller than Eurasia, they might rule that entire continent.  And if that continent was the only landmass occubpied by Capellans, the Ten Tribes would rule all of the Capellans and the High Teer would be ruler of all the Capellans of every tribe and culture.
But if walking or running is the fastest way to send orders or information, the High Teer would probably be limited to ruling a much smaller area than the Mongol Empire at its height.
It is true that the Inca Empire stretched for over 3,000 miles from north to south using runners for communications, but it was rather thin in an east-west direction.
Its area is listed as 2,000,000 square kilometers or 770,000 square miles in 1527, which is quite respectable, but only one twelfth, or 0.0833 of the size of the Mongol Empire, and only 1.48 percent of the world.
https://en.wikipedia.org/wiki/List_of_largest_empires[1]
My best guess is that the Capellans originated on a small continent or large island with large low areas and relatively small highlands.  During the glacial periods, the large flat low areas are above sea level, and there are large areas for the Capellans to occupy. During interglacial periods the sea levels are higher and the lowlands are flooded and the Capellans can only live in the small area of the highlands.  TOS happens during an interglacial period when the Capellans are restricted to living in the small highland area.  And the Capellans have never developed water craft capable of reaching islands or other land masses, and so have never settled other lands on Capella IV.
And apparently the inhabited highland area is small enough to sometimes be united by a culture which doesn't have riding animals, and so it should be no larger than the Inca Emire (2,000,000 square kilometers or 770,000 square miles) and possibly much smaller.
And today I wonder whether the Ten Tribes do rule all of Capella IV. Possibly, repeat possibly, the Ten Tribes don't rule all of Capella IV, but topaline is only found in their territory.  Negotiating with them to mine topaline would be the equivalent of aliens from other space negotiating with a country on Earth such as Russia or Liechtenstein for mining rights for something only found in that country. Except that in the case of Capella IV theee woudln't be any United Nations or other internaitnal organizations or treaty allies or whatever to demand a share in the deal.
As far as I know there is no rule that would force the Federation to negotiate with people for the right to mine on land thosee people don't own or rule.  If that was the rule the Federation would have to negotiate with everynoe in the universe to mine anything anywhere.
Comment: Your answers is too long (I read it entirely) and based only on speculations.
You first sentence is: "There is no problem with the Prime Directive." while it's, at least, ambiguous.
It would be nice to know how McCoy was involved in this medical assistance. I think it could explain the contradiction with the Prime Directive.


People Posting Pointless Pictures

Question: I get annoyed with people putting unnecessary images in their questions and answers, but I wonder if there is any rational objection to the practice, or is it just irrational prejudice on my part? Is there anything wrong with posting a useless image, aside from making me waste my precious time scrolling past the picture so I can read the post?
Comment: -1 question has no pictures
Comment: Is there a particular post that has irked you?
Comment: @randal'thor Perhaps a time to mention we could link to [how to thumbnail uploaded images](http://meta.stackexchange.com/a/108821/287266) in some FAQ post.
Comment: @CreationEdge Good idea. Maybe post it as a suggestion on the FAQ proposals thread?
Comment: I'd say posting a tangential image shouldn't be any different from putting in tangential text. If you put in tangential text, you'll waste a bit of the reader's time - and, if you put too much of it in without something excellent to offset it, the post may be closed for length/quality reasons. Or it will be edited out. And, unless you're funny, you'll get downvotes. But there is no hard rule forbidding any text that isn't necessary. I think there's no reason why images should be treated differently.
Answer: (I've expanded this answer quite a bit from its original version.  Even though the Question is a duplicate, I thought a more complete answer covering the current status of including images would be useful.)
I don't think much has changed since an earlier version of this question was asked 4 years ago:

images that illustrate exactly what's being said in the text are useful, even if there are a lot of them (e.g. "Batman wore such-and-such armour in this situation.")
images that are large and require a lot of scrolling to go past are distracting
unrelated or barely-related images in posts are distracting and many people (myself among them) find them annoying
there's a wide range of opinion as to what's related or not

How bad is the problem?
Not bad at all, IMO.
I spent some time looking at questions with images in them (search for imgur urls) and I didn't find too many that I thought were pointless:

looking just at questions, there are about 50 per month that have imgur links
even though I'm "prejudiced" against images, I'd say at least 50% of them are clearly relevant, and another 20%-30% are probably useful - I didn't think they were totally relevant, but I had to agree they were at least useful to illustrate something in the question
most of the images I thought weren't relevant were from relatively new users who probably just haven't developed a good sense yet of what's relevant or not

So overall I think at most 10% of images that get posted aren't relevant and could be edited out.
What to do about it
There are a few options:

Don't do anything, it's not actually that big a problem.
Edit posts and remove links to irrelevant images.  If editing old questions, limit edits to one or two at a time so they don't overwhelm the front page.
If the images are hosted on stack.imgur, it's easy to edit a question to convert large images to thumbnails:

If the image URL is: https://i.stack.imgur.com/MGbrX.png
You can add an m or a t to the end of the filename to make the image a thumbnail.
This: https://i.stack.imgur.com/MGbrXm.png makes the largest dimension 320 pixels.
And this: https://i.stack.imgur.com/MGbrXt.png makes it a thumbnail with 160 pixels max.
I think this is the how you do an "m" thumbnail with a link to the original picture:
[![picture whose claim I am skeptical of][1]][2]

  [1]: https://i.stack.imgur.com/wa5kLm.png
  [2]: https://i.stack.imgur.com/wa5kL.png

More details on thumbnails on meta.StackExchange.
Again, if editing old questions, only do a couple at a time.
Fair use
This has gotten to be a bit long, so I'll just mention that one of the answers to the earlier question has some good comments on fair use.

People Posting Pointless Pictures


Does standing to lift weights work your legs

Question: If I'm standing to do upper body work, am I also working my legs (specifically calves)? Thank you.
Comment: Visit https://stackoverflow.com/help/merging-accounts to find help on merging the accounts so that you will be able to accept an answer once a correct one is posted.
Comment: this is the OP (with a real account).This is a lovely and very complete answer, but sadly anything that uses my calves deliberately hurts. My physical therapist has ruled out any of the traditional approaches to tendonitis and is pursuing a theory that the tendonitis is being caused by my tight calves, which in turn is being caused by something tight farther up the chain. The idea now is to avoid straining the calf muscles while I work on the problem area. I wish I could take your advice. In the meantime, I am just trying to find ways to exercise that won't make things worse.
Answer: The lower body muscles will be very slightly active in order to maintain balance in any standing exercise, however the calf muscles are very strong and the calf loading involved in a standing upper body exercise will be negligible compared to the loading that would occur in a deliberate calf exercise.
In short, it's almost certainly fine, but if trying to avoid calf loading due to injury, just use pain as a guide. If and only if a standing exercise causes you calf or heel pain, then try to find a seated substitute exercise instead.
Answer: In a way, you work them isometrically if you can maintain a good "form".
If you want to train legs, you should perform exercises that specifically target them and involves concentric and eccentric contraction. In the case of calves, you can do exercises like calves raises or even squats with tip toe at the bottom or top of your squat.
(https://i.stack.imgur.com/7yRQX.jpg)
Comment: I see. Then you can try sitting down. You should resolve your Achilles issue and not avoid it. Calves raises is a good way to load your tendon again. Loading them can allow you to regain pliability of the tendon and remove the scar tissue.  You can check out Alfredson Protocol.
Comment: Actually, I'm hoping to avoid using them, as I have achilles tendon problems and I'm trying to find ways to exercise that won't exacerbate the problem.


Tree symbol style set?

Question: I am looking for a set of 2d tree symbols style for a landscape plan.  I got an old one trees.avi that I can't import to 10.0.
Can anybody link me to one?
Answer: There is a nice ESRI blog post on building your own vector tree symbols.  I personally use these for this same purposes and they look great.  There are also some instructions on randomizing tree sizes here.
Answer: To provide a more recent option to look into, I would suggest Preset layers and to check out the list of Supported tree genus types
;

Preset layers are one way to add data to a map or scene. When you add a preset layer, you choose the type of layer you want, and then you navigate to a corresponding dataset. Preset layers are well suited for sharing across the platform. Some preset layers also include a streamlined set of symbology properties.

You could also check in the symbol selector Searching for symbols
Answer: You could also use font symbol, standard arcgis installation come with lot of symbol font, including some with tree.
The "ESRI US Forestry 2" for exemple but you cpould also look for other free font on the web.
Be careful, if you share your mxd or export to pdf or illustrator format you will need to check that the people you share with have the font on their machine or the symbol will not correctly be displayed

Tree symbol style set?


adding and removing css classes on href

Question: I have a page with 2 links on it.
The page URL is example.com/all
Now the 2 links on the page, one goes to example.com/all/list and the other to example.com/all/map
What I want is when the user lands on example.com/all, class for the href link needs to be 'current'
When I click on example/all/map the map link needs to have the class 'current' and the list/all link needs it removing.
When I click on all/list after clicking on all/map, the current class needs to be on the all/list link and removed from the all/map
If that makes sense?
Similar to a toggle.
Comment: Are these links to a page separate from the original page or are you dynamically replacing content on the original page with new content when the link is clicked?
Answer: this can be done at the server side.
You need to set the current link on the page.
like if you have static html page then this can be done as
page : example.com/all/list
 All
Map

page : example.com/all/map
 All
Map

I don't know much about PHP but you can also set this in PHP by checking the current page url.
Answer: Here's a helper I use in PHP:
<?php
function current_class_if( $condition ) {
  return $condition ? 'class="current"' : '';
}
?>

Then in the page logic:
<?php
$page = 'list';
?>

<a href="example.com/all/list" <?= current_class_if($page=='list') ?>> All
<a href="example.com/all/map"  <?= current_class_if($page=='map') ?>> Map

adding and removing css classes on href


Using relay to switch power supply

Question: In my project I use 240 W switching power supply. Due to energy saving and some safety reasons, I don't want this PSU to be on permanently. I'd like to use relay to switch it on and off. However, this PSU has a significant inrush current - 40A/230VAC. Do I have to take some special precautions regarding the inrush current? I mean, do I have to choose a relay able to withstand 40A peak current (which would be quite expensive), or is there some other way how to handle this?
Answer: Conservative engineering practices, and my own "school of hard knocks" experience say that you have to size the relay for the inrush current, because even a brief surge can weld the contacts, in which case the relay is stuck on and could lead to a bad safety problem.  But don't decide by looking at the brief ratings in a catalog. Look at the data sheet and see if there is an inrush rating that is higher than the continuous duty rating.  Motor starting contactors are an extreme example of this. They have contact materials that resist welding, and their ratings reflect this.
Another approach that you see in large power supplies is a separate set of contacts, in series with a power resistor, that are closed for a second or so before the main relay closes, to more gradually charge the filter capacitors. Sometimes referred to as a "soft start" circuit.
Answer: If your PSU draws 40A constantly, you should use a relay that is rate at least for 40A permanent, not peak.
Good engineering practice is to use choose one from a higher bucket, 63A in this case, or better, match the relay to the fuse installed in this circuit.
Comment: 40A is just a peak current of the PSU. Constantly it draws 2.5A. I'm just a bit worried about the peak inrush current on the startup of the PSU.
Comment: http://electronics.stackexchange.com/questions/16581/how-do-relay-contacts-survive-inrush-current
Answer: Use a large relay such as a T90-style relay.  You want large contacts that don't weld easily and the T90 series relays handle inrush current quite well.
The particular relay of that type that we use is the American Zettler AZ2150 (form C) and AZ2150A (form A).  The "A" variant is indeed beefy and would handle your power supply quite handily.
The T90-style relay was invented by Potter Brumfield but many other manufacturers have copied that form factor and construction techniques.   That includes American Zettler, Omron, NAIS, others.
Answer: Sometimes what's done in order to minimize the problems of contact bounce and inrush current through relay contacts is to connect a TRIAC in parallel with the relay contacts.
In operation the TRIAC is turned on first in order to soak up the inrush surge and then, when the circuit has stabilized, the relay is turned on and the TRIAC turned off.

Using relay to switch power supply


How to update to OpenOffice.org 3.3?

Question: OpenOffice.org 3.3 is released. As the past shows, official 10.10 repos are unlikely to update to 3.3. How do I best update to 3.3?
Answer: Even though you are asking specifically for OO, I will suggest you to use LibreOffice 3.3 which is based on OpenOffice 3.3 and backed by Google, Canonical and others.
You can install by following these instructions:

How to install LibreOffice? (replacing OpenOffice.org)

Ubuntu has already started testing it in daily builds of Natty.
Comment: he asked for OOo and you have not given how to install OOo.
Answer: Firstly let me tell you that ubuntu does NOT use Openoffice.org it use GO-OO and it has been discontinued and joined libreoffice.

Go-oo shares much of its goals and philosophy with The Document Foundation's LibreOffice project, we're therefore supporting LibreOffice since it's inception, and are in the process of merging most of our patches over, as well as migrating to Document Foundation infrastructure. Going forward, the Go-oo project will be discontinued in favor of LibreOffice.

So upgrading to OOo will result in a serious loss of functionality that's why I recommend libreoffice(You Can install by Applications -> software Center -> Edit(menu) -> software sources -> Other Software (tab) -> Add then paste (without quotes) 'ppa:libreoffice/ppa'then reload when prompted and install libreoffice and libreoffice-gnome from the software center .
If you still want to use vanila Openoffice.org you could download the .deb from here and install them manually after uninstalling all the openoffice packages from Synaptic.
Comment: Ubuntu will use LibreOffice in 11.04. The GO-OO patches are AFAIK part of that, but the official name is LibreOffice.
Comment: "and it has been discontinued and joined libreoffice."

How to update to OpenOffice.org 3.3?


How to write the Sorting on a Singly Linked List in C

Question:
I have a question. I hope everybody help me.
I'm learning Data Structures in C. I have a homework but I can't find a solution to solve it.My teacher wants me write 11 sorts.
In singly linked list i has installed 6 sorts:Interchange Sort, Bubble Sort, Selection Sort, Quick Sort, Merge Sort and Radix Sort.
So i need everybody help me write 5 sorts: Insertion Sort, Binary Insertion Sort, Shaker Sort, Heap Sort, Shell Sort. If it can't use in singly linked list,can you tell me why it can't use?
I really need your help. Please answer to help me.Thank you very very very much!!!!!
Comment: Wut?  This place isn't homework help, show us what you've written and we can help you find problems but there needs to be some sort of body of work.  I'm betting your school has a CS help center, and I would assume you wouldn't go to them and say "write this for me" so please don't expect us to.
Comment: Haha!!! This is not a freelance coding hub to help you cheat on your homework. See if your school has some tutors or a help center if you honestly need help.
Comment: As mentioned this is not a "freelance coding hub". This is a Questions & Answers website. If you have a specific question about some programming related stuff you can explain what you don't understand and what exactly do you need help with (_even without a body of work_), if the question is legit and clear enough that is fine.
Answer: http://en.wikipedia.org/wiki/Sorting_algorithm
This will give you various sorting algorithms, and when you select most of the algorithms wikipedia will have some pseudo code for that algorithm.  It's a really good exercise to translate pseudo code into the native language that you're writing it in (in this case C); I still do it when I'm learning a new language since implementing sorting algorithms usually gives you a good handle on the basics of that language.
From a more mothering/lecturing point, you won't have an easier time in your later classes if all you end up doing is getting your code from other people, you need to solve it yourself, plain and simple.
From the list of one's you have done quick and merge sort are probably the hardest, if you have those written (and actually wrote them) the rest should be fairly easy.
Comment: I don't have a ideal to write it because i tried but it didn't success. I wrote sorting in array but i can't cover to singly linked list. I'm sorry because i write "write it for me". I am not good at English. I just want to help me find way to solve it. :(.Thanks for your comment.
Comment: @user2957264 same thing applies, code is code, it's the same across all languages, and not getting it on your first try doesn't mean give up and ask people to essentially write it for you (that's what it's being percieved as here) you have no code to present so there's nothing we at this board can do to help.  If you would create a question with "I've written this sorting algorithm and it isn't working, what am I doing wrong" that would be more appropriate.
Comment: I just want to know a idea to write it. I think about it more than 2 days and write it many times but i cant find problem to fix. I will learn more. Thanks for your help.
Comment: @user2957264 good luck, and come back here when you've got some code written up, people here are much more friendly then =D
Comment: Yup, i will try. Because this is a first time i post question here, i can't clearly express my question. :D. Sorry about this. :)


What server architecture is appropriate for a multiplayer online game?

Question: For an online, multiplayer roleplaying game that should be able to support at least 1000 players per server instance, what sort of architecture should I use? I'd like to use Java or PHP as the server programming language (I know PHP is probably a poor choice). What sort of operating system, and server specs would I need for such a system?
Comment: HTML-based wouldn't need refreshes either. AJAX :-)
Comment: The big question is how much traffic are you expecting from these 1000 players? Is the software browser based or it's own app? Browser based games usually require more load due to the nature of playing (refreshing the page multiple times per minute).
Comment: it would be a browser based java applet. thanks for asking :)
Comment: so its unlikely that it would need refreshes
Answer: Best known example is EVE Online, which uses Stackless Python. They have written they own server.
Their architecture described:

http://highscalability.com/eve-online-architecture
http://www.massively.com/2008/09/28/eve-evolved-eve-onlines-server-model/
http://www.slideshare.net/Arbow/stackless-python-in-eve

Generally I recommend reading highscalability.com, specially the real world examples.
Comment: It's worth noting Eve's architecture is somewhat unusual in the MMO world: it has a single persistent world for 300,000+ users. But it's good reading, not the least because the other MMOs don't talk much about how their stuff works.
Comment: Actually they are providing the illusion of a single persistent world.  Individual star systems or clusters of them are handled by each server and when you hit the gates you are passed over to a different server.  Basically old school zoneing.  Their design is what makes it work since its not a huge bottle neck like other MMOs where 90% of your players are in 10% of your zones but instead the players are spread so each server only handles a few players.
Comment: CCP the developers of EVE have chosen not to shard the world (that is have multple unrelated servers), there is one world (two if you count China) and something you buy in one solar system can be transfered to another trivially. This is opposed to the Everquest or WoW model where each virtual world is independant of others you can not trivially transfer goods or characters between them, generally the shareded model has much lower player counts for any one virtual world - however it can be scaled by adding further virtual worlds. The number of servers the VW runs on is irrelevant.
Answer: Since you're already doing Java, you might want to take a look at Sun's DarkStar project:
I don't know any commercial games using it (I believe it's still in development).
Comment: lol                  .
Comment: For Darkstar, there is also a programming-related question on StackOverflow: http://stackoverflow.com/questions/20034/


make ground 4 gauge wire from several twisted 12 gauge solid copper wires

Question: Can I make a 10 foot long single 4 gauge grounding wire from several twisted 12 gauge solid copper wires?
Comment: .... for "several" = 7.
Comment: But an electrical inspector may not approve.
Comment: Is it worth the hassle when you can get 10' of 4 awg thhn for <$10?
Answer: #4 has a area of 41,742 CM (Circular Mils).
#12 has a area of 6,529 CM.
As Dave Tweed says in the comments, you need 7 (6.39) connected in parallel.
Parallel conductors are permitted by electrical codes for phase, neutral or ground for #1/0 and larger.  Each conductor must be same length, material, insulation, area and termination.  The parallel conductor rule is set up for currents > 250A.
As Peter Bennett says, an electrical inspector will probably take exception to this because #4 is readily available.
Comment: I think he's talking about field fabricating a single stranded conductor here, not multiple parallel conductors, and I have NFC how an inspector would deal with *that* considering that bare copper wire typically doesn't receive a listing in and of itself...
Comment: Conveniently, 7 is also the proper bundle size for a minimal stranded cable (one in the middle and 6 around it.) The next step is 19 (7 like that, 12 more around them.) So if you do a half decent job, there are going to be few clues indeed - and little reason to look for any clues in the first place. Just do a "workmanlike job" and you should be free and clear.
Comment: @ThreePhaseEel  Aside from the question, I make no assumptions.  We have no idea of the location, application, duration or certification.
Answer:
Can I make a 10 foot long single 4 gauge grounding wire from several twisted 12 gauge solid copper wires?

Yes


iPhone 8 purchased through AT&T change to T-Mobile

Question: I was able to purchase an iPhone 8 through my company with AT&T being the carrier.  I have since left the company and would like to use the phone with a T-Mobile plan.  When I put the T-Mobile SIM card in I receive the message Not Unlocked for that Network.  Any suggestions on how to make this work or can I use the phone w/AT&T only?
Answer: Your original provider Controls the network lock status.

https://www.att.com/deviceunlock/

Procedures differ per other providers, but for you, start at AT&T to check your lock status or request it be changed.
Comment: Network locks are often removable after the locked-to lcarrier (here, AT&T) has been paid for the purchase of the phone. How long that takes would depend on what sort of purchase your previous company made when it obtained the phone from AT&T.
Answer: If I do not misunderstood your question, you're looking for a way to un-"simlock" your phone. There are many ways to do this:

Make sure to check if you're sim-locked for a given period, or forever.
Call AT&T provider and explain them the problem to normally get the network unlocked. It can differ with each provider.
(NOT RECOMMENDED!) Try to google something like "unsimlock jailbreak ios" + your ios version to check if you can't just do it this way, if the provider does not answer or solve your problem...

Hope you solve your problem!
Léo
Comment: I certainly wouldn't recommend jailbreaking!
Comment: Sure ! Editing my message, sorry!


IE7, floated element, content wrapping, bug?

Question: I am hoping someone has experienced something similar to this and can point me in the right direction as it is driving me nuts.
I have the following code set up (I'm sorry I can't supply a test link) and it displays great in FF, Chrome, IE8 but in IE7 and IE6 I am experiencing a weird float/wrapping issue.
It appears, for no apparent reason, the h1 tag and h2 tag, although no width is set, is being wrapped.

a long title with background behind text

a longer sub title that also has a background behind text.

which is displaying like:
a long title with background
behind text
and
a longer sub title that also has a
background behind text.
If I remove the float, the background color spans the entire width (which I don't want) but the text no longer wraps.
Anyone have any ideas?
::edit::
Here is some additional information/screenshots.
The following graphic shows the two displays. the top is how it shows in IE6, IE7, and IE8 using Document Mode: IE7 Standards.
The bottom is FireFox, IE8 normal mode, Chrome
http://awesomescreenshot.com/0a4en0paa
In my troubleshooting I have determined that the line that wraps is influenced by the line above it. Example: if the crumb is long, the title will have a short wrap, if the crumb is small, the title may not wrap at all.
If I make the  display:inline the title will display correctly but the sub title will wrap based on the length of the title. Also making it an inline element ruins the padding around the text.
Actual code:

this / is / a bread / crumb / trail / which seems to influence the following item's width

Title of the page which should span the width

sub title which should behave the same way and span the availble width

CSS:
#hero { position:relative; z-index:0; color:#fff; width:100%; min-width:1024px; margin:0 0; overflow:hidden; height:238px; background:url(images/bg-hero-default.jpg) center top no-repeat }
#hero .panel-content {  width:978px; min-width: 978px; margin:0 auto; padding:35px 23px 0; position:relative; }
#hero p { float:left; font-size:1.5em; line-height:1.6em; padding:0 5px; margin:0 0 5px; }
#hero h1 { float:left; clear:both; font-size:4em; padding:0 5px 3px; margin: 0 0 3px; color:#fff; line-height:1em; }
#hero h2 { float:left; clear:both; font-size:2em;  padding:0 5px 3px; margin:0 0 3px; }

Comment: Hi @Joe Rizzo perhaps you can recreate it on the www.jsfiddle.net site? So we can see what you mean.
Comment: Can you double check your HTML? You have no closing `` or ``.
Comment: added some additional info with actual code and not example.
Comment: Could you describe what kind of behaviour you're expecting? as it is, your question doesn't give enough elements to me, to understand it
Answer: add a white-space:nowrap; to your hx declaration
#hero h1 {float:left; clear:both; font-size:4em; padding:0 5px 3px; margin: 0 0 3px; color:#fff; line-height:1em;white-space:nowrap; }
#hero h2 {float:left; clear:both; font-size:2em;  padding:0 5px 3px; margin:0 0 3px;white-space:nowrap; }

work for me in ie8, ie7 mode.
Comment: That was my first thought but there will be instances were the content will be long enough to need a wrap and I can't add s in to force it.


Seal a Universal Tub Spout

Question: Trying to replace the bath tub spout for a front-end threaded connection, I found a "Universal" tub spout (and in fact could not find a front-end-threaded-only tub spout at the local hardware store). This spout fits just fine and installed fairly easily. However, wanting to seal the connection, this style of spout has a gap in the bottom for the "set screw" that a slip-on connection would use.

How should I go about sealing the spout? How do people with spouts that use a set screw seal their connections? Though they would serve no other purpose, I could add set screw and its mounting apparatus if it would help with the seal.
Comment: Not a plumber, so just a comment: You would caulk around the top, but leave this open at the bottom so that any water that _does_ get in there can get back out.
Answer: Even when installed using a set screw, the hole on the bottom is not sealed.  Because its on the bottom, any water that splashes in will just drain out, and the amount of water that can enter the hole is limited to just that - a small splash. Unless your kid is sitting there and pumping water into the hole with a water gun, leaving it open is standard and shouldn't cause a problem.
If anything you can caulk around the pipe coming out of the wall before installing the spout, but don't worry about the hole under the spout.

Seal a Universal Tub Spout


Does my previous time with a residency permit for work in Germany count towards permanent residency?

Question: I held a residence permit for work in Germany for a period of a bit more than 2 years, during which I was employed for a period of approx. 1.5 years, then I became self-employed for approx 6 months. I then switched to a Student visa to complete my Bachelor's degree, and have been working as a working student ever since. All in all I will complete 5 years in Germany in January 2022. My question is, will the time that I already spent as a worker in the country before becoming a student count towards permanent residency?
Comment: being a student counts as half-time, i.e. 4 years as student = 2 years as employee
Comment: thank you for sharing this insight. With the new laws that came into effect in November 2023, can you please share what applies now?
Answer: Yes, the time of work before you become a student will be taken into account. It is not about working several months/years in a row; it is the total sum of months/years you have paid into the social security system what is important. So a gap of beeing a student isnt a problem. Having graduaded in Germany will shorten the time down to 2 years to become eligable for permanent residency.


Can I remove this HVAC damper?

Question: Is is possible to remove this damper? It looks like there are special kind of screws about an inch above but I'm not sure how those would come out. If I can't be remove could it be cut out? I have an oscillating tool so I thought maybe there would be an attachment made for HVAC.
Comment: I am not sure why a standard round grill won't fit. We put dampers in to control air flow and balance rooms. taking it out may be a mistake. The screws that attach the damper to the duct are about 4" up I can see 1 at about 9 o'clock position, , as jack mentions those in your photo are rivets.
Comment: It's hard to see in my picture but in the bottom one you can see it's almost against the sidewall. A round grill won't fit because the sidewall is too close. If there was a square grill that would fit in there then that would work. The previous owner had a round grill on it that they cut part of it off to make it fit. Needless to say that didn't look very good. It would be nice to have the damper feature but this is in our master bathroom so we've always left it wide open to try and keep it comfortable in there.
Answer: Those are rivets and you normally have to drill or grind them out. You can probably get in there with a rotary tool like a Dremel with a grinding wheel on it. If not, get a hack saw and just cut the bracket on each side to remove the internal parts and leave the rivets there. Is there a particular reason you want to remove it?
Comment: The vent is too close to the wall so a circular cover doesn't fit on it. I was going to get the damper off then maybe just throw a sidewall grill over the top for the time being until it gets moved.

Can I remove this HVAC damper?


jQuery: query a $.get() returned string

Question: How can i query a string i get via $.get? for example, i want form google only the body html:
$.get("www.google.com", function(data){
var body = $("body", data).html(); //This doesnt work
});

Is it even possible?
thanks
Comment: you might wanna try to add `http://` to that get, though...
Answer: Nope, jQuery can't directly access the DOM of a page that was loaded via an XmlHttpRequest.  In order to do this, you would have to use an HTML parser written in JavaScript, like the one that John Resig wrote.  It's still a much harder task than you were probably expecting though.
Answer: One thing is that this wont work because you need a HTML parser. The other is that unless you are doing this on www.google.com this wont work because of the same origin policy. There are ways to circumvent this, most popular is JSONP, but this can be done manually as well, without using the jsonp method defined by jQuery.
Edit:
If you don't want to go through the problems of getting content from a different domain in your JavaScript, an alternative method would be to use your server be it, PHP, .NET ect to fetch the remote page and then return it the the JavaScript using AJAX. This will ofcause be a little more time consuming than doing it directly in the js, as you are doing 2 requests instead of one. However, depending on your server tools, you might have an easier time parsing the html instead of doing that in the js, so you more easily can get the stuff you want to your page.
Comment: i need to load a remote file (an .aspx with some querystrings) and need the body html of it. what other way is there to do this?

jQuery: query a $.get() returned string


Changing pluralization

Question: Can anyone give me an example of a sentence or phrase in which it is possible to change which words are pluralized yet is still makes sense?
Answer: You could use a noun which is its own plural:

The sheep is happy.
The sheep are happy.

Or you could use the subjunctive, which in English is the same for singular and plural nouns:

If I were concrete, you'd walk all over me.
If they were concrete, you'd walk all over them.

Or you could just change the direct object's plurality, and thus not need to worry about subject-verb agreement.

I love the cat.
I love the cats.
Comment: Hmmm...OK, then perhaps I didn't understand the question. @Christine, can you please clarify?
Answer: Interesting question. Although the meanings could alter slightly, how about:
The peaks of the mountain are majestic.
 vs.
The peak of the mountains is majestic.
Of course, the verb has to change here. Say we're talking the Himalayas. There are multiple connected mountains, but whether using singular or plural doesn't alter the meaning of the mountain range known as the Himalayas. The same is true of the peaks. Although there is an apex, to use "peak" could also mean the series of extremely high elevations that surround the apex. "The peak of the mountain" (both singular) would definitively label the apex.
Comment: Thanks guys.  This was for a project for work and needed to prove this point but my brain would not cooperate with an example!

Changing pluralization


How good are external video cards?

Question: I remember a while back people started talking about external video cards for laptops and such and now I rarely hear anything about them. So do they work or is it just unlikely that it could actually give a performance boost to computer games?
Comment: A lot of people think that Intel's Light Peak/Thunderbolt is going to open the door to external video cards that are on par with internal ones.
Answer: External video cards work well for text, basic graphics, etc.  They are OK for largely static content.  You could probably get away with web HD video (720p 12 frames/second).
However, they are not good for high resolution video, or gaming - the bandwidth on the USB port is not high enough even if you only have the video card connected to the USB host controller and nothing else.
So for business, programming, web surfing, email, etc applications they are great.  Gaming, HD video, or other high performance visual use - no.
I fully expect, however, that with USB 3 we'll start to see performance video cards showing up for USB that can actually do real work.  Still won't be able to fully compete with PCIx, but will be suitable for full HD, and most casual gaming (WoW, for instance, but fast twitch FPS gamers will notice the additional lag).
-Adam
Comment: I definitely wouldn't recommend it, and I highly doubt you'd get more performance out of that than your integrated graphics chip.
Comment: I do play WoW and although WoW is definitely not power house as far as gaming goes, they did upgrade the graphics in Lich King do you still think it will work ok for it?
Comment: It'll need to be low resolution (1280x1024 max, probably) and turn off many of the video options, but it will run.  Running through the larger cities with hundreds of character models, however, will be noticeably slow and perhaps frustrating.
Answer: a promising announce regarding this technology was made by AMD in 2008
The technology is called XGP. The idea is to have an external box that you can connect to your laptop in order to boost its graphic performances when needed.
In my opinion the idea was great because you can use the box only when needed (at home/office) and save battery/energy in the other cases and maintain your mobility
Unfortunately there is only one product I know that implements this technology and it is the AMILO GraphicBooster equipped with a very nice ATI HD 3870
A good review for AMILO SA3650 + Graphic Booster can be found on Guru3d.
I hope we will have more solutions in the future.
Comment: If I read the article right then the external card only works on specific type of laptop too :(
Answer: Vidock 2 is probably the best solution on getting boosted graphics on a notebook atm (express card slot) but you also have to use a external monitor and performance is still lackluster.
more info here
I hope the tech gets somewhere... I would like to just have one laptop (the portable ones not desktop replacements) that can do it all and get rid of my gaming rig.
Answer: The few external graphics cards that exist for laptops are not high performance graphics cards so this is still an unsolved problem. I would like one myself so I could use three monitors at work.
Answer: The problem is you never get enough bandwidth with an external video card. Normal videocards use PCI-X 16 interfaces, to talk with the memory controller of the mother board or the processor directly. PCI allows a bandwith of 32gbit/s, where USB 2.0 only does a lousy 480mbit/s. That's a factor 60 speed difference.
So expect an external videocard to perform like a VPN client window. Good enough for some tool palettes, or watching a mailbox, but not much else.

How good are external video cards?


What special moves count as items?

Question: After reading this question (and seeing the part about how items are not effected by stale moves), I wondered what moves and attacks count as item. Some of them are obvious, like Richter's Holy Fire or Peach's Turnip, but what are the extent of what the game considers as items?
Comment: How are you defining a "special move counting as an item?" Would Robin's tomes that fall after usage count? Even though they're not part of the special, they're directly produced by them.
Answer: Here is a list of all characters with moves that will generate an item that other players can grab. I tested all of them in training mode. Unless noted otherwise, none of these will stale:

Mecha-Koopa - Bowser Jr. Down Special
Banana - Diddy Kong Down Special
Crown - King K. Rool Side Special

This move will stale when used as a special boomerang-style. While it's possible to pick up and throw if you don't get it back, unfortunately K. Rool can't pick up the crown himself to use as a projectile, he just places it back on his head.

Bomb - Link/Toon Link/Young Link Down Special
Metal Blade - Mega Man Neutral Special
Bonus Fruit - Pacman Neutral Special
Turnip - Peach/Daisy Down Special
Gyro - Rob Down Special
Tome/Levin Sword - Robin Specials/Aerials

Depending on OP's definition of "special move counting as an item"

Holy Fire/Aura - Simon/Ricther Down Special
Grenade - Snake Neutral Special
Wario Bike - Wario Neutral Special

Throwing the bike will never stale, but riding it into people will.

That's all the items that I was able to find, but if I've missed any you think might work, let me know and I can test them out!
Comment: I think you hit everything, but [here is a video of Isabelle/Villager pocketable moves](https://youtu.be/GCitb4pdUWA). The ones that go into her hands instead of being thrown immediately are items.

What special moves count as items?


Isomophism between two irrational rotations

Question: Define two dynamical systems $([0,1), \mathbb{B}_1, \mathbb{L}, T_1(x)=x+\alpha_1\mod 1)$ and  $([0,1), \mathbb{B}_2, \mathbb{L}, T_2(x)=x+\alpha_2\mod 1)$, where $\alpha_1,\alpha_2 $ are two irrational numbers, $\mathbb{L}$ is the Lebesgue measure and $\mathbb{B}_i$ are the sigma algebras. Now if these two systems are isomorphic, then what the relationship between $\alpha_1$ and $\alpha_2 $? I do  know that the irrational rotation is isomorphic to the Sturmian orbit dynamical systems.
Comment: $\alpha_1=\pm\alpha_2$: look at eigenfunctions.
Comment: Doug/Anthony, I suppose the criterion for Kakutani equivalence of the rotations is that $\alpha_1$ and $\alpha_2$ be in the same orbit under the action of SL(2,Z) (as fractional linear transformations)?
Comment: @David No, unless you put restrictions on the inducing set, any two irrational rotations are Kakutani equivalent. If you confine yourself to inducing on intervals, then I believe something like being in the same $SL(2,\mathbb{Z})$ orbit is true.
Answer: The first major classification result in ergodic theory was found by Halmos and von Neumann in 1942 (Operator methods in classical mechanics II, Ann. of
Math. (2) 43 (1942), 332–350.). They showed that for ergodic rotations of compact abelian groups, spacial isomorphism (i.e. measure-theoretic isomorphism) is the same as spectral isomorphism (i.e. unitary equivalence of the associated operators). For irrational rotations $\alpha_1$ and $\alpha_2$ of the circle, this amounts  saying that the subgroups generated by $\alpha_1$ and $\alpha_2$ are equal. From this it is easy to deduce that $\alpha_1 = \pm \alpha_2$. This is simply an expanded version of Anthony's initial answer.
Comment: By the famous Discrete spectrum theorem two dynamical systems with discrete spectrum are measure theoretically isomorphic iff they have the same group of eigenvalues. Luckily, the irrational rotation has discrete spectrum. The point spectrum of $T_1$ is $\{\alpha_1^k:k\in \mathbb{Z}\}$, similarly, the point spectrum of $T_2$ is $\{\alpha_2^k:k\in \mathbb{Z}\}$. Hence if $T_1$ and $T_2$ are isomorphic  if and only if these two group are the same. Hence if and only if $\alpha_1=\alpha_2$. But I cannot understand why  $\alpha_2=-\alpha_1$.
Comment: It looks like you're confusing the additive circle with the multiplicative circle; let's use the additive version, since that is how your original question is phrased. The second to last sentence in your comment isn't correct: both $\alpha$ and $-\alpha$ generate the same subgroup. As Anthony points out, the map $t\mapsto -t$ conjugates rotation by $\alpha$ to rotation by $-\alpha$.
Answer: Answered by the all-knowing Wikipedia (who stole from the even more all-knowing H. Poincare).
Comment: I'm not sure this answers the question. I was assuming measure-theoretically isomorphic. Even if you want topologically conjugate, +$\alpha$ and $-\alpha$ are conjugate by flipping [ wiki might have screwed up on this one ].
Comment: @AnthonyQuas Don't $\pm \alpha$ give the same rotation number? As for the notion of isomorphism, I have no idea what the OP meant, but the "usual" dynamics definition was the first on my list of what he might have meant...
Comment: No. $+\alpha$ gives the rotation number $\alpha$; and $-\alpha$ gives the rotation number $-\alpha$. Also the fact that the OP mentions measures and $\sigma$-algs and uses the word isomorphic suggests to me that we're talking about measure-theoretic isomorphism.
Comment: @AnthonyQuas Fair points - I was just reading the Wiki as talking about the modulus of the rotation number.


What weather improves which types?

Question: Since the last update, different real life weather types have an influence on the attack and spawn rate of certain types. For example, rain will boosts water types, so what other combinations are there?
Answer: The following weather types are implemented, with all possible types being present exactly once:

Fog Dark, Ghost
Clear/Sun Grass, Ground, Fire
Snow Ice, Steel
Rain Water, Bug, Electric
Wind Dragon, Flying,Psychic
Partly Cloudy Normal, Rock
Cloudy Fairy, Fighting, Poison

Your current weather is shown in the lower right, above the nearby Pokémon view.
Comment: For completeness: There's also "Extreme", which boosts nothing and comes with a warning not to go outside.
Comment: There's also Cloudy which boosts Fairy, Fighting and Poison types.

What weather improves which types?


How do I format a query to fetch an aggregate root with just related ids

Question: Let's say I have the following object in my domain.
<code>    [TableName("work_space")]
    public class WorkSpace
    {
        public long Id { get; set; }

        [Column(Name="owner_id")]
        public long OwnerId { get; set; }

        public string Name { get; set; }

        public string Description { get; set; }

        public IEnumerable<int> OrgIds { get; set; }

        public IEnumerable<int> SettingIds { get; set; }

        public IEnumerable<int> UserIds { get; set; }

        public IEnumerable<long> WorkViewIds { get; set; }
    }
</code>
This is one way to fetch the data that I need.
<code>SELECT ws.*, wsu.user_id as UserId, wss.setting_id as SettingId, wso.org_id as OrgId, wv.id as WorkViewId
FROM work_space ws
LEFT OUTER JOIN work_space_user wsu ON ws.id = wsu.work_space_id
LEFT OUTER JOIN work_space_setting wss ON ws.id = wss.work_space_id
LEFT OUTER JOIN work_space_org wso ON ws.id = wso.work_space_id
LEFT OUTER JOIN work_view wv ON ws.id = wv.work_space_id
WHERE ws.id = @0
</code>
How is this usually done in NPoco?  Would I use a multi Result set fetch? Some sort of Fetch one to Many?  Do I flag my ID collections as Result or Ignore Columns?  I'm just not finding any examples like this in the docs.
Answer: This is the most intuitive way to do this I have found to do this so far.  It works ok for a single entity, but when I want to fetch collections of them, I'm having n+1 problems as go back to the database for each object in the collection to fetch the relations.
<code>    public WorkSpace GetWorkSpace(int id)
    {
        using (Database db = DbFactory.VSurveyDbFactory.GetDatabase())
        {
            WorkSpace workspace = db.SingleById<WorkSpace>(id);

            StringBuilder sqlBuilder = new StringBuilder();
            sqlBuilder.Append(@"SELECT * FROM work_space_user WHERE work_space_id = @0;");
            sqlBuilder.Append(@"SELECT * FROM work_space_setting WHERE work_space_id = @0;");
            sqlBuilder.Append(@"SELECT * FROM work_space_org WHERE work_space_id = @0;");
            sqlBuilder.Append(@"SELECT * FROM work_view WHERE work_space_id = @0;");

            Tuple<List<int>, List<int>, List<int>, List<long>> results = db.FetchMultiple<int, int, int, long>(sqlBuilder.ToString(), id);

            workspace.UserIds = results.Item1;
            workspace.SettingIds = results.Item2;
            workspace.OrgIds = results.Item3;
            workspace.WorkViewIds = results.Item4;

            return workspace;
        }
    }
</code>


Finding the domain of $f(x) = \frac{2}{4-\sqrt{9-x^2}}$.

Question: Finding the domain of $f(x) = \frac{2}{4-\sqrt{9-x^2}}$, how can I deal with the denominator, I have to take into account 2 things:
1- the denominator not equal zero.
2-the value under the square root must be greater than or equal to zero.
Could anyone help me please?
Comment: The domain of that $f(x)$ is whatever you say it is.  It could be empty or all real numbers or a bitfield.  What you are probably intending to ask is "which real numbers, when $f$ is applied to them, also result in a real number?"
Comment: Um..... the denominator can't be equal to zero, and the value under the square root must be greater than or equal to zero.  What possible *more* help could you possibly need?
Comment: thank you so much @fleablood I do not need anymore help.
Answer: You are correct (if $f$ is  a real-valued function). So you need both of those conditions to hold (if the function is real-valued).
The conditions are
$$4-\sqrt{9-x^2} \neq 0$$
and
$$9-x^2 \geq 0.$$
Can you go from here?
(Note that the domain is just the set of numbers that are inputted into the function. This can be chosen freely, so I think you wanted the domain such that $f$ is real-valued)
Comment: yes I wanted the domain such that f is real-valued, but I do not know exactly what to do after taking into account the two conditions mentioned, How can I combine these 2 conditions?
Comment: If you solve the two conditions for $x$, you get
$$x^2 \neq -7$$
and
$$x^2 \leq 9 \implies -3\leq x\leq 3.$$.

If $f$ is real-valued, then the first condition tells us that you have to take real values of $x$.
The second condition tells us that $-3\leq x\leq 3$.
Combining them you get the domain of $x$ to be
the real numbers $x$ such that $-3\leq x \leq 3$.


How do I get all logs for all time for a given contract using web3?

Question: This answer worked when filter.get was not deprecated, but now I am not sure how to do the same thing with subscribe - web3.eth.subscribe hears new events and acts on them after I create the subscription, but I am not sure how to get old events.
Answer: Try this (tested with web3.js v1.2.1):
async function getPastLogs(address, fromBlock, toBlock) {
    if (fromBlock <= toBlock) {
        try {
            const options = {
                address  : address,
                fromBlock: fromBlock,
                toBlock  : toBlock
            };
            return await web3.eth.getPastLogs(options);
        }
        catch (error) {
            const midBlock = (fromBlock + toBlock) >> 1;
            const arr1 = await getPastLogs(address, fromBlock, midBlock);
            const arr2 = await getPastLogs(address, midBlock + 1, toBlock);
            return [...arr1, ...arr2];
        }
    }
    return [];
}

...

const latest = await web3.eth.getBlock("latest");
const logs = await getPastLogs(yourContractAddress, 1, latest);

You can further optimize this by replacing 1 with your contract creation block number.
See more on function web3.eth.getPastLogs here.
Comment: Thanks, I was able to get an old log doing this - but do you know if it only gives the most recent transaction's event? If I process several transactions (that all emit events) it only ever returns one event (this is doing `logs = await web3.eth.getPastLogs({fromBlock: 0, toBlock: latest})`
Comment: This might also be a ganache issue as I only see the most recent log in the ganache UI


Light Hyperoxia

Question: Imagine you're in some lowland way below sea level were the oxygen partial pressure is higher than at sea level but still lower than the 0.5atm limit. Would their be any effect that isn't deadly or harming even if you stay there for weeks but very uncomfortable like the light hypoxia when you're at 3000m and can't do any effort without fainting ?
Answer: Well you can imagine anything. But earth's atmosphere has a pretty consistent composition. The largest variation would be much higher humidity at lower altitudes because of lower temperatures at high altitude.

Light Hyperoxia


Highlight panel error

Question: Can I have a formula and master-detail field inside highlight Panel on Page Layout? I have a master-detail and a formula field inside highlight panel on page layout. But Package installation fails due to this highlight panel. Any thoughts?
Comment: Can you provide the error your seeing during installation please.
Comment: Your requested install failed. Please try this again.

None of the data or setup information in your salesforce.com organization should have been affected by this error.

If this error persists, contact salesforce.com Support through your normal channel.
Comment: After this I contacted salesforce and they told me that there is a problem in Highlight Panel.
Comment: @doga BTW: If you update your question with the additional data, it is more obvious to other readers.
Comment: Got it fixed. If you add any field to highlight panel then it has to be there on page-layout.
Comment: Aha good old dependency checking falling through the cracks. Have Salesforce confirmed from your case a bug has been raised for this?
Answer: I would encourage you to keep pressing Salesforce for more information, there will be an internal fault message relating to this, that they should be able to share in sanitised way or at least give you more information than you have apparently been given.  In the meantime here are some thoughts from our experience on dealing with this rather vague message.

Consider what changes you made last to the package and back them out, one at a time. If you find the one that breaks it you can a) consider making this a post install step for the end user b) give Salesforce more information about the cause
Manually check the dependencies of the component your adding, there has been bugs in the platform in the past where it does not bring in all the dependent components. For example check the other fields the formula field uses are included in the package as well.
Try installing your package into other orgs with and without any previous versions of your package installed. Does the behaviour change?
Check the dependencies of your package (View Dependencies button when viewing the package contents) against those in the target org your installing into. Again sometimes the platform does not give appropriate errors if these are not met.

Highlight panel error