Turn off screensaver while openmoko app is running

Question: In openmoko (stable hybrid release, SHR), how do you programatically turn-off the screensaver (the dimmed/blank screen after a few seconds of inactivity) just while your app is running?
Answer: In X, you can run
xset s off

to turn off the screensaver. Similarly gnome/freedesktop exposes a DBUS API to control and inhibit screensaver mode. I don't know if OpenMoko supports the freedesktop spec, but if it does you should be able to use DBUS directly. You can see how Totem does it here.
Answer: FSORaw is a wrapper that you can use externally to claim resources like the display. This will prevent screen blanking. But if it is your own application I would recommend claiming the same display resources within your software.
more about fsoraw and resources
Answer: It is possible to do that through the D-BUS API of freesmartphone, it is also possible to prevent suspends.
mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy CPU auto
mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy Display auto

Replace auto with enabled or disabled.
You can find the documentation for this D-BUS method at http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Usage.html;hb=HEAD#GetResourcePolicy


How to raise a plant that's in a too deep flower bed?

Question: We just added a retaining wall to our front flower bed.  We have azaleas in the rear of the flower bed just in front of a porch.  About 1 foot in front of the azaleas, the ground is lower and the retaining wall is about 16" high. If I place my hosta in the existing dirt, it is way too low and you can't even see it over the retaining wall from the road. It would take a dump truck full of dirt to fill in the entire flower bed.  Is there any way to put the hosta in a container possibly raised up on brick to make the plant higher?
Comment: Photos would be very helpful... but you can put your hosta in a pot on anything you like (a stack of bricks or whatever) if you just want  it to be seen.But it might not be a long term solution, depending where you are
Answer: Are your Azaleas sitting any deeper than they were before the wall?  What kind of wall did you install?  These plants are acid loving plants.  Concrete causes the pH to be raised.  Mortar?
You need to send a picture or two.  Azaleas are very shallow rooted and putting any more soil over their roots might just kill them.  Same with mulch.  Hostas do well in pots.  Until the winter.
Where do you live?  If you have plants in pots out of doors and you have winters your potted plants have roots exposed to the cold temperatures which could kill them.  Otherwise, hostas will do far better planted in the larger body of garden soil before winter sets in.
Where do you live?  Please send a picture of your wall.  How was it installed?  A foundation hopefully or concrete or compacted gravel and drain pipe behind and at the foot of this wall behind this wall to drain the water away from behind the wall?  How wide is this bed behind this 16" wall?  (perfect to add 2 more inches of a concrete 'cap' for your wall to sit on and sit pots on and use as a table for dinner ware)...


What do we call a person who is really smooth at talking?

Question: Some people are really good at conversations and they can run a conversation perfectly without having to reach for words. They always find the right words to say in any situation and as a result, people enjoy their conversations. What is that person called in English?
Comment: *Fluent*? *Eloquent*?
Comment: @WS2: OP said nothing about erudition. He did,  however,  use the words "good at conversations" and "people enjoy their conversations." The "right" words don't have to be esoteric.
Comment: Try *raconteur*.
Comment: @Robusto I would suggest that *raconteurs* are more noted for their enthusiasm at spilling a yarn, and not necessarily for their erudition. I once had a Polish landlord who kept his lodgers enthralled with stories of his escape from Poland to join the British army in Italy during WW2. (He'd been at Monte Cassino.) But his tales were made even more entertaining by his quaint application of English grammar.
Answer: "articulate" is an adjective for those who can express themselves easily, clearly and effectively.

articulate (adj) expressing oneself readily, clearly, and effectively
Answer: I'd call that person a "smooth talker", or maybe "silver tongued" or just "slick"...
Smooth talker synonyms — Power Thesaurus
Another word for smooth talking — Word Hippo
Answer: Not looking very far, you simply call such a person "a smooth talking man/boy/women/girl/…".

A smooth-talking man talks very confidently in a way that is likely to persuade people,…

Both the spellings "smooth-talking" and "smooth talking" are found.
Answer: Answering the question in the title only- smooth at talking, I would have answered a raconteur.
From Merriam-Webster: :  one who excels in telling anecdotes :  storyteller
However, extending that to smoothness in dialogue, there are several excellent suggestions above.
And as the OP has highlighted "enjoyment of the conversation," which is not likely to result solely from optimal word choices, but also from the art of delivery, I would say the description that fits is either
a most articulate raconteur, or eloquent conversationalist.
Comment: +1 to both Decapitated Soul and Centaurus as I borrowed their answers to flesh out my own.
Answer: A wordsmith
word·smith /ˈwərdˌsmiTH/ (noun): a skilled user of words.
Comment: You need to cite the source of your definition.


access salesforce community

Question: If I created Salesforce community, can I and other people (with license company community) access to community like employee (not contact, from standard login), Is it possible to disable standard access to original salesforce (not community) and allow access only to community?
Comment: As long as they are Internal user you can't restrict them. You can disable their user and create new community user for them.
Answer: Not as an internal user, you would have to specifically create community user accounts for them and disable the Salesforce accounts.
Depending on your use case for Salesforce this can be a good way to keep licencing costs controlled as the community licences are cheaper than full SFDC licences.

access salesforce community


mod_wsgi and zeromq error (python)

Question: I am trying to make a search engine, running on the web. So I used mod_wsgi to get the query from the webpage by python. Then, I used zeromq to send the query to C++ searching program.
But the problem is, it seems zeromq and mod_wsgi does not work together.
It is definitely true that python can import zmq (I tested it) but when it runs on the web, it shows error message that (actually an error log from apache)
File "D:/wsgi_app/wsgi_app.py", line 2, in <module>, referer: http://localhost/
         import zmq, referer: http://localhost/

File "D:\\util\\Python27\\lib\\site-packages\\zmq\\__init__.py", line 35, in <module>, referer: http://localhost/
         from zmq.utils import initthreads # initialize threads, referer: http://localhost/

ImportError: DLL load failed: \xc1\xf6\xc1\xa4\xb5\xc8 \xb8\xf0\xb5\xe2\xc0\xbb \xc3\xa3\xc0\xbb \xbc\xf6 \xbe\xf8\xbd\xc0\xb4\xcf\xb4\xd9., referer: http://localhost/

I have no idea why wsgi cannot import zmq. By the way the source below is complete python code
from cgi import parse_qs, escape
import zmq
def application( # It accepts two arguments:
      # environ points to a dictionary containing CGI like environment variables
      # which is filled by the server for each received request from the client
      environ,
      # start_response is a callback function supplied by the server
      # which will be used to send the HTTP status and headers to the server
      start_response):

    # get a query from the webpage :)
   data = parse_qs(environ['QUERY_STRING'])

   query = data.get('query', [''])[0]
   query = escape(query) #prevent script injection

   context = zmq.Context()
   socket = context.socket(zmq.REQ)
   socket.connect ("tcp://localhost:5555") #connect to C++ search server database
   socket.send (query)

   # build the response body possibly using the environ dictionary
   response_body = 'The request method was %s' % environ['REQUEST_METHOD']

   # HTTP response code and message
   status = '200 OK'

   # These are HTTP headers expected by the client.
   # They must be wrapped as a list of tupled pairs:
   # [(Header name, Header value)].
   response_headers = [('Content-Type', 'text/plain'),
                       ('Content-Length', str(len(response_body)))]

   # Send them to the server using the supplied function
   start_response(status, response_headers)

   # Return the response body.
   # Notice it is wrapped in a list although it could be any iterable.
   return [response_body]

Answer: In your wsgi script, explicitly add the location of your dependencies:
import site
site.addsitedir(path_to_zeromq)

Comment: import site
site.addsitedir("D:\\util\\Python27\\Lib\\site-packages\\zmq")

I did like above
Comment: Drop the zmq from the end of the path you're using

mod_wsgi and zeromq error (python)


Installing rpm packages in manjaro

Question: I have installed manjaro distro on my computer but I'm unable to install any .rpm packages and from my  researches you can only install packages using pacman and AUR.What I'm asking is that is there any way to install rpm packages on manjaro considering it is derived from Arch linux?
Answer: It is in the AUR depository. Download the Arch Linux package yay, then, not as root, use yay rather than pacman, and run
yay google-chrome

then type "1" when that option appears, and you'll have it. I just installed it this week on Arch.
Answer: Not directly.
Arch (and any based ditros on it) does not rely on RPM [1] format, that's is in fact developed and used by Red Hat derivates.
There are some cases (e.g. this one [2]) in which a RPM package is used to install an application on Arch (and derivates) systems, but prior to do this, the RPM is extracted and handled/converted in the Arch flavour.
Comment: So there aren't any package for arch systems like .deb or rpm for offline installiation?Then how would you go about installing google chrome for example which is not the official repository or any other programm for that matter?I have installed the  rpm app through pacman but you have to install every single dependencies yourself which is very inconvinient compared to what I'm used to in debian based systemes.I used to be have fedora and was quite easy to use. Isn't it possible to just install the required packegs used in redhat systems in manjaro ?Thank you for your time :)
Comment: Sure, pacman standard package format is `.pkg.tar.zst`, in fact you can install any package from official repositories by downloading the package e.g. for gedit app [https://www.archlinux.org/packages/extra/x86_64/gedit/download/]. Anyway, it looks like you are a bit confused, so I suggest you *in primis* to give a read of the ArchLinux wiki, starting from FAQ [https://wiki.archlinux.org/index.php/Frequently_asked_questions]

Installing rpm packages in manjaro


What is the standard 120V light bulb screw base in the US?

Question: I know that standard incandescent bulbs in the US use Edison screw bases, but I'm not sure which designation / number is the one which is used for prolific non-candelabra 120 volt fixtures.
Comment: The US uses a 120V system, not 110.
Answer: The US 120 volt screw base is an E26. The 'E' indicates an Edison screw base and 26 is the diameter in millimeters.
Source: Wikipedia (footnote 3)

In 120-volt North America and 100-volt Japan, the standard size for general-purpose lamps is E26
Answer: For those who like to do things the hard way, it is also 7004-21A-2 (From IEC Standard sheet 60061-1 (of course)
The E26 is the 'standard' for 110 Volt systems and the E27 is the standard for 220 Volt systems. (The E27 being IEC 7004-21)
Comment: Really? There's only 1mm difference in diameter? That may well be the explanation for why standard light bulbs sold in the U.S, for several years now, have often had such a miserable, "tight" fit in lampholders!
Comment: In the UK, they (E27, E14) are often just called ES (Edison Screw) or SES (Small Edison Screw) - in contrast to BC (Bayonet Cap) and SBC (Small Bayonet Cap).
Comment: @kreemoweet: I'd guess E26 is 1" and E27 is 1 1/16". *"The metric system is the tool of the devil! My car gets forty rods to the hogshead and that's the way I likes it."* - Thomas Edison :-).
Comment: Furlongs per fortnight as always been my unit speed. I did learn recently about the unit of property measure, the 'chain' there being 10 square chains in an acre. (Which makes each chain a furlong, of course)


Circuit Symbols

Question: I am trying to design a circuit in Multisim and I am stuck on identifying the part circled in red. What in the hell is that? My initial thought was that it was a component that tells the Sensor circuit the charge percentage of the potentiometer  Thanks :)
Answer: A "voltage reference" is a device that provides a precise voltage to be used as a calibration source, in this example the + input of the op-amp (adjustable in this case using a potentiometer).
When a potentiometer is included, it is usually a precision one with 10 or 20 turns, and a test point would be provided on the wiper lead to measure the voltage with a digital voltmeter as the pot is adjusted.
References are different from power supply rails (e.g. 5v or 3.3v) in that the voltage is more tightly controlled, and is not subject to the spikes that usually show up on voltage rails.  They usually have a limited output current, such as 10 ma..
Here is an example of a family of voltage references that includes a 10v source with a 0.1% accuracy.  Note some of the values look odd, such as 2.048v and 4.096v; these are designed to provide a voltage reference for devices like a DAC, which may have 11 or 12 bits, and thus map directly so 1 bit equals 0.1 mV.
Comment: @user3178205 To add to what tcrosley said, for your simulation you can simply connect that to a DC source of 10V.  The simulator's sources are modeled as fairly ideal :)
Answer: The left part of the circuit is a voltage comparitor, it compares the two voltages (sensor and reference) and outputs whichever is higher. The reference voltage will be a base voltage that the output of the op amp will not go below. If the sensor input requires a higher than base voltage then it will rise above the reference voltage.
This is a common setup in motor drive circuits because they often need a current booster such as a TIP120 (old, but just an example) to provide enough current to run the motors.

Circuit Symbols


When will GTK improvements land in Maverick?

Question: I want to see CSD(Client Side Decorations),Windicators and RGBA.
Comment: No,it is not from upstream but from Canonical and it introduces the above mentioned features.It is completely related to Ubuntu 10.10 Development release.
Comment: This seems to me quite off-topic here. Please instead file a bug on launchpad specifying which release of GTK you would like to see in Ubuntu.
Answer: It will land in Maverick when it is ready. No sooner, no later.
Comment: Brilliant answer!


Re: WWI, is the term "Allies" a retronym?

Question: Were Allies of WWI called "Allies" at the time (in English), or is that a term we started applying later?  Did they just refer to themselves as the (Triple) Entente?
Answer: Yes, at the start of the war. No, by the end.
It's an interesting question because the "Allies" were the "Entente Cordiale" of the UK and France and later the "Triple Entente" when Russia joined. They were formed to counter the "Triple Alliance" of Germany, Austria-Hungary, and Italy.
At the start of the war, yes, using the term "Allies" would be an anachronism. They were "the Entente". But by the end of the war, the coalition fighting the Central Powers were referred to as "the Allied Powers" in part because the Triple Alliance collapsed (Italy remained neutral and then declared war on Austria-Hungary) and there were just so many nations fighting the Central Powers most of whom were not members of the Entente.
The Great War YouTube channel, which I highly recommend, covers this a bit in an Out of the Trenches episode The Trench Coat - Entente or Allies?

The term "alliance" was very deeply embedded into the 19th century. Nowadays it's been replaced by the word "collation". There was the Dual Alliance, the Franco-Russian Alliance, there was even an Austro-Serbian Alliance.
At the time of The Great War allies fought allies, you're right, but in hindsight, mostly from a popular standpoint, it was easier to distinguish the two sides. Since the Triple Alliance broke up and the Triple Entente drew in more and more and more countries to their cause it was easier to simplify the term.

One example is that the United States was not technically an "ally" but rather an "associated power" who declared war on Germany for violating their neutrality. They wished to avoid "foreign entanglements" and so did not want to get involved in a European alliance.
The countries fighting the Central Powers are referred to in treaties as "The Allied Powers" or "The Allied and Associated Powers". For example there are...

"Treaty of Peace between the Allied and Associated Powers and Germany" (aka the Treaty of Versailles)
"Treaty of Peace between the Allied Powers and Austria"
"The Treaty of Peace Between the Allied Powers and the Ottoman Empire" of 1920.
"Treaty between the Principal Allied and Associated Powers and Bulgaria and Protocol"
"Treaty of Peace between the Allied and Associated Powers and Hungary"
Comment: Cool, thank you much!  I do remember reading on the WP Allies_of_World_War_I page that the Treaty of Sèvres 'defined the Principal Allied Powers', I just still wasn't sure about the term.  I'm going to watch that video and subscribe to that YT channel.
Answer: I would say that it was a retronym. Before the war, it was Triple Alliance of Germany, Austria-Hungary and Italy against the Triple Entente of Britain, France and Russia. Italy deserted the Triple Alliance at the beginning of the war, and later joined the Entente, which made it four against two. It would have been four against four if you only count two more later joiners, Bulgaria and the Ottoman Empire on the German side, which became the "Central Powers."
But a bunch of smaller nations, Belgium, Luxembourg, Serbia, Montenegro, Romania, Greece, Japan, and ultimately the United States, aligned with the Entente, when they were attacked by, or went to war with one or more of the Central Powers.
Because it was a case of four against "everyone else,"  the "everyone else" became known as the "Allies." (The U.S. became an "Associated Power" rather than a full Ally, because it declared war on only Germany and Austria-Hungary, remaining technically neutral against Bulgaria and the Ottoman Empire.)
Comment: The countries of the British Empire in 1914 did not have independent foreign policies, and when Britain declared war they too were automatically at war. However, by the time you get to 1939it was a different matter and the white settler countries had by that time acquired "dominion status", and were independent of Britain. Nonetheless when Britain declared war on Germany in September 1939, each of Canada, Australia and New Zealand all declared war the same day - and South Africa fairly shortly thereafter.
Comment: @WS2" OK removed the reference to the "Commonwealth countries. Thanks for your help.
Comment: A brief search on the [British Newspaper archive](https://www.britishnewspaperarchive.co.uk/search/results/1914-01-01/1914-12-31?basicsearch=%22the%20allies%22&phrasesearch=the%20allies&exactsearch=true&retrievecountrycounts=false&sortorder=score) shows that the term "_The Allies_" was already in fairly widespread use from August / September 1914.


Kuala Lumpur Layover KLIA2 from Thailand to India flight

Question: I am an Indian Citizen travelling to Thailand. On my way back I have 12 hrs of layover (with same airline & PNR) in Kuala Lumpur. Needed to check if I can step out of the airport? If yes, then what are requirements in terms of visa/travel pass?
Answer: For Malaysia, if you want to leave the airport, you will need a visa
From TIMATIC :

Passengers transiting through Kuala Lumpur (KUL) with a confirmed onward ticket for a flight to a third country within 24 hours. They
must:

arrive at and depart from the same terminal, and
stay in the international transit area of the airport, and
have documents required for the next destination.

But you qualify for an e-visa as an Indian national.
For an RM 105 fee (around 25USD at the time of posting) and reported 6 days for processing, but with reports of it being extremely unreliable, make sure to get it early


Best way to raise reputation without spamming questions?

Question: I would like to be able to post a photo to my question, how can I work to raise my reputation so I can do this?
Answer: Just upload the images to a site like imgur and provide links in your post. Someone with more reputation will edit them in. Taking the time to write you question well should get you a couple of upvotes, and with it the necessary reputation for next time :)
Note that there is also a reputation based limit on the number of links you can have in one post, if you need to you can create a imgur "album" or put a few extra links in comments. Again, writing a good question in the first place should easily boost you over the limits.
Comment: or in a comment, isn't there limits on links in posts?
Comment: I actually thought of this and did it moments before you posted it. Thanks!
Comment: @Mateo I believe there is a limit of 2 links, yes. That should lift after a couple of upvotes as well. Good point.


The true dimension of Dirac field

Question: In natural units with $\hbar=1$ and $c=1$, as we know, the energy
dimension of the Dirac field $\psi(x)$ in QED is $\frac{3}{2}$.
But in cgs units, what is the true dimension of the Dirac field $\psi(x)$
in terms of cm, g and s? It seems that only the energy dimension of
the Dirac field $\psi(x)$ is physical, is it true?
Answer: The Lagrangian for Dirac's equation is
$$
\mathcal L=-mc^2\psi^2+\cdots \tag{1}
$$
As we know that $H\sim\mathrm d^3\boldsymbol x\ \mathcal L$ has units of energy, we conclude that
$$
\psi^2\sim x^{-3}\tag{2}
$$
and therefore $\psi$ has units of $[\mathrm{length}]^{-3/2}$. If you use a different convention for $\mathcal L$ instead of $(1)$ you'll get a different result.
Comment: @RenhongFang yes, exactly :-)
Comment: So if we use different conventions as follows,
\begin{eqnarray*}
\mathcal{L} & = & -mc^{2}\psi+\cdots\\
\mathcal{L} & = & -m\psi+\cdots\\
\mathcal{L} & = & -mc^{2}\hbar^{3}\psi+\cdots
\end{eqnarray*}

then $\psi$ may have different dimensions (up to some orders of $\hbar$
and $c$). These different dimensions of $\psi$ may not influence
physical observables. Is this right?
Comment: @RenhongFang anyway, if you think that my post was useful and fully answers to your question, it would be nice for you to click on the accept button (tick mark) so that the question gets the "answered" status.
Comment: I am just a fresh, and thanks you for reminding me of this :-)

The true dimension of Dirac field


Friction on a body

Question: Consider a cuboidal block kept on a table with friction coefficient $\mu$. When calculating the friction, we use $f= \mu n$ where $n=mg$ for a horizontal table. But a pressure due to the atmosphere exists whose net effect is a downward force of magnitude $PA$ where $A$ is the surface area of the upper surface. Why isn't this included in calculating the normal reaction force and hence the friction?
Comment: Sometimes you must. Try sliding a pot over a hot ceramic stove and you see that the heat creates a low pressure area under the pot making it stick (i.e. increasing friction).
Comment: Hi @user117913. Have I answered your inquiry, or do you have any more confusions. If so, please explicate them so I, or someone more qualified (there are lots)  can help.
Answer: First of all, unless you have sealed the cube, there is technically air under the cube as well, and using the equations of buoyancy you can determine that the effects of air pressure is in fact dependent on the hieght of the cube ($PA = \rho g h A$ is a common approximation). Now, for most cubes in consideration, air pressure is an insignificant effect compared with gravitation, but as you can see, with items like paper with large surface areas and small masses air pressure becomes significant. With a cube, the mass is such that the gravitational force is much larger than the air pressure, so air pressure can be ignored. In reality, when dealing with friction we ignore many small effects because we are using approximate models. Air resistance is one of them.

Friction on a body


Use of VAR when taking corner kicks

Question: Why doesn't the VAR get used at corner kicks, very often the ball is outside the semi circle, should a team score from the corner kick, should it be allowed
Comment: I highly doubt that players at the level where VAR is available are being allowed to place the ball outside the corner arc.
Answer: For a corner kick the ball does not have to be within the arc of the corner. The ball simply has to break the plane of the arc for it to be in a valid position. So it can be outside the arc, and 1mm of the ball overhanging the white line of the arc and it will be valid placement. See here.
The reason I believe why VAR would not be used for this because it is a very minute offence should be ball not be breaking the plane of the arc. If VAR was used corner kicks, it would then have to be used for the EXACT placement for free kicks and goal kicks also (where the same rule for breaking the plane of the line applies).
So yes, the goal should be allowed to stand.
Comment: If a goal is scored as the result of an offence by the attacking team, it would absolutely incorrect for VAR not to request OFR on the placement. Free kicks don't have any such requirement for an exact placement on a field marking; goal kicks cannot score goals and are outside the VAR protocol anyway.
Comment: If any part of the ball is directly above any part of the arc, the ball is inside the arc by definition. Saying it's "outside the arc" while also "breaking the plane of the arc" does not make sense.
Comment: @Nij Goal kicks can absolutely score goals. VAR should only be used when there is a "clear and obvious error". Depending on the circumstances of the ball placement at the corner, you're right VAR may get involved. As far as I'm aware, VAR has never been involved with the issue above so until that happens I guess we won't know the true answer.
Comment: If the ball is outside of the corner arc and does not touch it, it's a clear rule violation. If the ball was clearly outside this should be reviewed by the VAR if a goal was scored.
Comment: @dly The ball is allowed to be outside the corner arc, as long as the ball breaks the plane of the arc.
Comment: that's what I mean by touching it
Answer: Yes, It would be allowed. Why VAR isn't used for that is in my own idea not to add to time wasting. And they are professionals so.
Comment: Allowing a goal to be awarded after it was clearly outside the corner arc would be entirely within the remit of VAR, and it would be absolutely incorrect to not use it, especially "not to add to time wasting".

Use of VAR when taking corner kicks


Do in-kind security transfers from a US broker to another US broker keep track of the cost bases and holding periods?

Question: If the specific US brokers matter, securities would move from Fidelity to Charles Schwab.
Answer: It is technically possible through the DTCC's CBRS or manually. Whether your brokerages support that - you'll have to ask them. Most major brokerages should be able to support the automated reporting (especially if they already use the ACATS for the account transfer itself).
Comment: If they don't support it for purchases after about 2011-2015 (depending on type) they're breaking the law. This requirement was enacted during the great recession in 2008/9, but implemented in phases presumably to reduce burden. I remember several years when my 1099 package included a long explanation about 'changes to basis [and term] reporting effective this year'. My brokers' webites, and _some_ of their statements, designate 'covered' and 'uncovered' (before 2011-ish) holdings.
Comment: @dave_thompson_085 that's right. I believe both CBRS and ACATS are legally (or, at least, regulatory) required, but I couldn't find any actual reference to any such law so I didn't put it in the answer.


MacBook Air 2013 with circle slash while trying to install Mojave

Question: I've always been a Linux and Windows user, but I bought this used MacBook Air to mess with. I figured a fresh install was best for it so I erased the primary drive in disk utility and got a known-working Mojave installer from work to reinstall Mojave. However, I get about 2/3rds of the way to the loading screen before it goes to circle-slash. I reset SMC, PRAM 3-4 times, and also reformatted the SSD to no avail; always hangs on the same step. Anyone know what might be the issue?
Comment: Not an answer to your question about *why* it doesn't work but you could try internet recovery and then upgrade to Mojave.
Comment: That means it has been used on multiple other Macs to install Mojave. @lx07, that worked to get Mountain Lion 10.8.5 on there, but when I try to install High Sierra or El Capitan on the App Store, I get a warning that my OS is too old to use the App Store. When trying Mojave, it tells me it won't run on my machine... I'm confused. Isn't Apple supposed to be easier than this?
Answer: Updater didn't find a previous OS X install.

Technical requirements:

OS X 10.8 or later
2 GB of memory
15 GB of available storage to perform upgrade
Some features require an Apple ID
Some features require internet access

Mac Hardware requirements:

MacBook: Early-2015 or newer
MacBook Pro: Mid-2012 or newer
MacBook Air: Mid-2012 or newer
Mac Mini: Late-2012 or newer
iMac: Late-2012 or newer
iMac Pro: Late-2017 or newer
Mac Pro: Late-2013 or newer, mid-2010 and mid-2012 models with recommended Metal-capable GPU

What caught my attention was the
requirement for OS X 10.8 or later. Which (to me) indicates that a previous Mac OS X version needs to already be installed.
So if I were you, I'd probably get my hands on a copy of Mountain Lion, and install that first. Then attempt to install Mojave from there.
While you indicate yours is 2013, if it does turn out to be matter of your hardware being too old. Do note, that the OS Installer has a white, or blacklist that it consults to determine whether the hardware is an actual candidate for install/upgrade. I used to know where this file (.kext) was
located. But have since forgotten. A search on the internet should quickly reveal the location of the .kext file. Good sources for this information are in Hackintosh venues. :)
In case you didn't already know, and are interested. You can easily make a (USB stick) installer in the following fashion:
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

where /Volumes/MyVolume should point to your USB stick (formatted with a GUID Partition Map and Mac OS Extended (Journaled) )
Good luck!
Comment: Thanks mate. I know for a fact though that I have used this exact method that I'm using now on Macs that I have wiped clean to reinstall the OS with no issue at all. Some of those Macs even dated back to 2013, but primarily were on newer ones. The system before had Mojave installed but it had an admin password on it, hence why I had to reinstall Mojave.


turning a local directory into a svn repo

Question: I found this tutorial : http://masstransmit.com/garage_blog/create-svn-existing-project/
But Im stuck in step 3
What I did was this :

svnadmin create /root/cinnamon-for-crux
svn import /root/cinnamon file:///root/cinnamon-for-crux

Now step 3 schould be according to the tutorial: svn co /root/cinnamon-for-crux.
but then I get a message wrong arguments.
Anyone who can tell me how I can make this work so cinnamon-for-crux will be a svn repo with all the data and the contents of cinnamon in it?
Edit 1: So svn co file:///cinnamon-for-crux schould work
Edit 2: If I did the command from edit 1 svn co file://cinnamon-for-crux I see these error messages:
svn: E1800001: Unable to connect to a repo at url 'file:///cinnamon-for-crux'
svn : E1800001 : Unable to open a ra-local session to URL
svn: E1800001: Unable to open repo at url 'file:///cinnamon-for-crux

Edit 3: it works. Can anyone tell me what the command is to upload the local tree to my page on googlecode ?
Comment: Do you get `svn: E205000: Error parsing arguments` by chance? Error messages **are** important, always quote them properly.
Comment: `/cinnamon-for-crux` != `/root/cinnamon-for-crux`
Answer: Repository paths are always URLs. You need to use file:///root/cinnamon-for-crux.


transfer rate faster than the NIC suggests

Question: i followed this thread to get the information on reading NIC speeds.
How do I verify the speed of my NIC?
i am using ethtool to verify the speed of my NIC as discussed the thread.
<code>:~ # ethtool eth0
    Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: off
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000007 (7)
                           drv probe link
    Link detected: yes

:~ # dmesg |grep eth0
[    5.347423] e1000 0000:02:00.0: eth0: (PCI:66MHz:32-bit) 00:50:56:8b:26:0e
[    5.347533] e1000 0000:02:00.0: eth0: Intel(R) PRO/1000 Network Connection
[   43.467863] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[3656340.307349] e1000: eth0 NIC Link is Down
[3656340.312386] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[30612796.474526] device eth0 entered promiscuous mode
[30612946.780348] device eth0 left promiscuous mode
</code>
i know that, this is a virtual machine and the NIC should be simulating a 1000Mbs speed. That makes 128MB for 1 second and this should be my bottleneck, for every NFS related transfer which is made over this host. (is this correct so far?)
I mounted a Netapp NFS share to this host and started writing a file. It is a network share, so the speed should be limited by the bottleneck created by the NIC.
<code>> time ; dd if=/dev/zero of=/test/1GB_file bs=1GB count=1
1.032u 27.065s 7:08:35.06 0.1%  0+0k 203632+27343968io 43pf+0w
1+0 records in
1+0 records out
1000000000 bytes (1.0 GB) copied, 3.92766 s, 255 MB/s
</code>
i repeated the dd command on and on, and it was always around 250MB/s. A way higher than 128MB/s == 1000Mbps.
What am i missing? Why is this number higher than the network bandwidth?
Answer: In a VM, the NIC speed is not a real limit. If the host can push 2000Mb/s in to a guest, then so be it.


measure theory for dummies

Question: Is there a book with simplest examples one can ever imagine? For example: "Lets say we have "tree" "apple" "1" . . ." What is sigma algebra of this set, what is sigma algebra generated by something in this set, what is borel sigma algebra etc. It would be awesome if book covered main topics in measure theory that are important to probability and stochastic processes. Do such books exist?
For Aduh: Books i have read on measure theory use notation like this below. I want author instead  to explain intuition in simple way.
Comment: No matter how good the author, measure theory can only be simplified so much before it ceases to be measure theory. Countable additivity $$\mu\left(\bigcup_{k=1}^\infty E_k\right) = \sum_{k=1}^\infty \mu(E_k)$$ is part of the definition of a measure, so if you aren't willing to learn some set notation, then you can't go very far unless you only consider very simple examples.
Comment: Measure theory for third graders ?
Comment: If you restrict attention to positive measures on finite sets, then up to some fairly simple modifications you would be studying finite probability spaces.  This does help give a basic intuition and might be taught in high school/gymnasium or in college as "discrete mathematics".
Answer: Every textbook on measure theory that I've looked at has plenty of simple examples of the kind you mention (not with trees and apples, but simple nonetheless). What do you find lacking in the texts you've read?
Regarding your example $A:= \{\text{tree,apple,1}  \}$, it's a mistake to ask what is the sigma algebra of this set (I hope I understand your question correctly here). There exist multiple sigma algebras of members of $A$: $\{ \emptyset, A \}$ is one, the power set of $A$ is another. Again, any of the standard references should make this very clear.
When I started learning about Lebesgue measure and integration, I found Taylor's General Theory of Functions and Integration very helpful (and still do). It moves slowly and gives lots of examples. It also has a Dover edition and so is very affordable.
If you're interested in an introductory text on measure-theoretic probability, I can recommend Rosenthal's A First Look at Rigorous Probability Theory. I would not consider this a textbook in measure theory proper, but it explains and makes use of the basic measure-theoretic concepts needed for probability and the exercises are not too difficult.
Addendum. I will stick with my original recommendations in light of your edit. You should keep in mind that, in learning mathematics, part of your job as a reader is to think of intuitive explanations and simple examples of the new concepts that are introduced. That's how one learns. Reading math is an active affair; you have to struggle with examples and exercises until the concepts become familiar. No matter how clear and simple your author may be, you'll never learn math by just passively absorbing a textbook.
Comment: I have edited my post
Answer: Personally, I do not know of a book that simple. With that being said, Terrence Tao's An Introduction to Measure Theory is quite approachable and readable as an introduction to Measure Theory, assuming you have the prerequisite background.
More particularly, if you want simple examples, focus first on the Lebesgue Theory. It is more geometric and a bit less abstract, but it provides a firm base for the pursuit of abstract Measure Theory later.

measure theory for dummies


Is this CMOS circuit supposed to be an OR or an XOR?

Question: Since it has three NANDs and two NORs I guess it is an XOR, but doing the truth table I'm getting an OR expression. What's going on?
Comment: Isn't demonstrated effort required? Related: *[Closing homework questions with an attempt](https://electronics.meta.stackexchange.com/questions/6159)*, *[Closing homework with no attempt as off-topic](https://electronics.meta.stackexchange.com/questions/5667)*, and *[What does the community think about homework answers?](https://electronics.meta.stackexchange.com/questions/7400)*.
Comment: From [a comment](https://electronics.stackexchange.com/questions/299127/operating-region-for-nmos-transistor-can-someone-check-my-work#comment687989_299127): *"...this is not a free design house, homework-writing service or an on-line technical encyclopedia, copied out to you on demand. People will help you take the next step if your questions shows that you've done as much as you possibly could on your own - which your post doesn't, I'm afraid. Please either revise your question showing your work and findings so far"*
Comment: There are three NANDs and two inverters. No NORs.
Answer: First, I "markup" your circuit drawing with logical element regions (two inverters, three NANDs):

Then redraw it as digital circuits are drawn:

simulate this circuit – Schematic created using CircuitLab
and calculate the output:
NANDA outputs \$\overline{A · \overline{B}}\$
NANDB outputs \$\overline{\overline{A} · B}\$
NAND_OUT outputs \$\overline{\left(\overline{A · \overline{B}}\right) · \left(\overline{\overline{A} · B}\right)} = \overline{\left(\overline{A} + B\right) · \left(A + \overline{B}\right)} = \overline{\overline{A} · \overline{B} + A · B} = {A⊕B}\$
Answer: I would print out that picture four times, one for each input combination, and go through each one crossing out or shorting transistor source-drains as I go. That way you have a history of your work and the possibility to catch previous mistakes you made. When I did it I used Windows Snippet and doodled directly on-screen in snippet.
I can tell you that I get:

S = 0 for AB = 00
S = 0 for AB = 11
S = 1 for AB = 10

Too lazy to do the last one but it took faster than I thought it would once you get into it so if I didn't make mistakes it can't be an OR and is probably an XOR. I would guess S = 1 for AB = 01 given the symmetry of the circuit which would make it an XOR but you shouldn't really make assumptions like that because your eyes might be missing something.
Make sure you are paying attention to the dots when wires crossover which let you know whether they are actually connected or not. I'm guessing this is probably what is happening plus you rushing through it. Go slow.
Answer: V.V.T's answer shows a neat approach to determine the behaviour of a logic circuit step by step even suitable for more complex circuits.
Anyway, for a simple circuit like the one at hand, featuring three NAND gates and two inverters, I would focus at those states that depend only on one input, particularly those of the NAND gates connected to the inputs:

when the input \$A = 0\$, the output at the connected NAND gate must be \$1\$, independent from its other input;
the same is true for the NAND gate at the other input when input \$B = 0\$;
so the NAND gate at the output has got both inputs set to \$1\$ and therefore it returns \$S = 0\$; we have now determined what happens when \$A = B = 0\$, namely \$S = 0\$;
now let us follow the path from input \$A\$ over the inverter to the NAND gate at input \$B\$: say \$A = 1\$, the inverter returns \$0\$, leading to the output state of \$1\$ at the NAND gate at input \$B\$, independent from the actual state of \$B\$;
the same is true for the NAND gate at the other input when input \$B = 0\$;
so the NAND gate at the output has again got both inputs set to \$1\$ and therefore it returns \$S = 0\$; we have now determined what happens when \$A = B = 1\$, namely \$S = 0\$;
now let us take a look at the NAND gate at input \$A\$ and what input values are needed for its output to become \$0\$, which is the case when its inputs are both set to \$1\$, which is in turn achieved when we set \$A = 1\$ and, because of an inverter, \$B = 0\$;
when the NAND gate at input \$A\$ returns \$0\$, the NAND gate at the output will return \$S = 1\$;
finally, due to the symmetry of the circuit, the inputs \$A\$ and \$B\$ are interchangeable, so we have now already derived the full truth table;

So yes, it is an XOR gate:
 A | B || S
---+---++---
 0 | 0 || 0
 0 | 1 || 1
 1 | 0 || 1
 1 | 1 || 0


Is it safe to delete system logs?

Question: I'm using DaisyDisk to clean my hard drive and it is showing nearly 8GB of files in /private/var/log/asl. Are those files safe to delete?
Comment: Logs do get cleaned automatically usually, so it might be worthwhile to have a look at the timestamps of the logs. If they are more than 2-3 weeks old, the cleanup doesn't seem to be working (which would probably lead to a new question...).
Comment: Wow, 8GB of logs!?
Answer: Yes, you can safely delete log files. In the case of an application needing to write a new entry and the file not being found, it will be re-created automatically.
Just bear in mind that these ASL (Apple System Log) files may contain some useful information to trace or debug any issues you could be experimenting with your computer, which, of course, will be lost with the deletion of the files.
So, in case you might want to take a look at these files before deleting them, you could use the syslog command as follows: syslog -f /private/var/log/asl/nameOfTheFile.asl

Is it safe to delete system logs?


Why are my new roof shingles showing these lighter patches in cool weather?

Question:
New roof shows patches of lighter shingles. Is it heat loss? Installation error?
Comment: Changes in insulation beneath...
Comment: Without knowing what your "cool weather" consists of, it looks like frost patches.
Comment: It was about 35 degrees out this morning. The frost patches were not there previous to the new roof and they only cover those 10 areas. Not on any neighbors' homes either. -thank you
Answer: The roof area that has the lighter color is insulated closer to the roof than the other areas. Insulation is keeping the frost from melting in the lighter areas. The stripes you see between the patches are the location of the rafters, which do not insulate as well.
Answer: Uneven drying
Once we got a large batch of stone, and I asked the contractor "why'd you get two colors?"  He looked at the angry clouds and told me he would take care of it right away.  Sure enough, five minutes into the rainstorm, he had already swiched the light ones out to the darker gray.   I told him I liked the lighter gray and he said "check back in a day".  The guy is a miracle worker.   I'll ask if he does roofs.
Seriously, you're looking at an area of the roof that is dryer than the rest.   Or it may have a crust of frost moreso than the rest of the roof.
Parts of the roof dry/melt at different rates because of differences in what's under the roof.  While this can be a "canary in a coal mine" warning of a problem, it may also just be normal.  Canaries in coal mines also die for other reasons.


How to join the Free Worlds?

Question: I would like to join the Free Worlds, but I don't know how. Tried shooting down Navy ships, they became angry to me of course, but the Free Worlds didn't invited me to join. I really want to be part of this story.
Answer: After 60 game days the southern militias and citizens formed the Free Worlds declared independence from the Republic, go to Free Worlds space (like the Rim) and visit the spaceports often. Sooner or later you will be given the choice of doing karate or putting your hands in the air. Choose the latter and don't ever try to do karate (if you tried to do the karate move, don't worry, visit the spaceport again and you will be given another one, but not from Katya). You will be given a mission for the Free Worlds. Just accept more and more missions for them. Those missions may be passenger transports, escorting ships, or bounties if you have a high enough combat rating. Note that you're not yet part of the Free Worlds. Only when you helped them enough and when you found the source of the terrorist attack you will be invited to join the Free Worlds. I advise you to buy a strong warship first before joining, otherwise you will have trouble with the combat missions (especially the "Liberate Kornephoros" mission). I used an Osprey with atomic engines before joining.

How to join the Free Worlds?


How to open a browser from terminal

Question: Can anyone tell me how to open a browser from the Terminal on a Mac?
Answer: Just enter
open "http://www.google.com"

And it'll open it in your default browser
Comment: open -a "Firefox" "http://www.superuser.com" will open the link in any other application you specify.
Answer: To have your OS X machine open the default browser to a specific page, you just have to type:
open http://example.com/

Simple as pie.  The open command was introduced way back on the NeXT operating system, and in its modern incarnation, uses LaunchServices to determine the appropriate application to open the given file or URL.
Answer: I just use
open -a safari

to open a browser (safari as an e.g. here).

The open -a stand for "opens with the specified application". It is case-insensitive, so you can open Finder like
open -a finder

etc.
Answer: If you just want to open the browser, without a URL, use open with just the browser name:

open /Applications/Safari.app
open /Applications/Firefox.app

etc.
You can use open to open any application by name.
Answer: If the default application for opening HTML files has been changed to a text editor, open test.html would  open the file in the editor.
You could open it in the default browser with open test.html -a "$(VERSIONER_PERL_PREFER_32_BIT=true perl -MMac::InternetConfig -le 'print +(GetICHelper "http")[1]')".

How to open a browser from terminal


How to view the change log?

Question: I'm a beginner linux user and as my first linux os I chose elementary and I think its great. But everyday since I installed it(couple of days ago) I get an update for 'Operating System Updates'. Even though it is good to see the distro getting better and better, I can't find a way to see the change log. Is there any way to see it or its not implemented yet?
Answer: There isn't a changelog to view really. Elementary has been posting frequent Development Updates on their blogs detailing the more major recent changes. You can find those at http://blog.elementary.io

How to view the change log?


Products formed upon pyrolysis of alkanes

Question: What sort of products will be formed when we subject a higher alkane (say decane) to pyrolysis by heating at 773-973 K in the presence of $\ce{H2/Ni}$? I know that lower aliphatic alkanes and alkenes will be products that will be formed but will other products such as aliphatic alkynes and saturated and unsaturated cyclic compounds be formed (say cyclopropane and cyclopropene)?
Comment: I think you're talking about [hydrocracking](https://en.wikipedia.org/wiki/Cracking_(chemistry)#Hydrocracking).
Comment: Pyrolysis of alcanes is often carried out with heavy hydrocarbons from kerosene or higher fraction of petroleum and mineral oils. It produces a mixture of lighter alkenes and alkanes. Alkynes are not produced significantly. But with $\ce{H2/Ni}$, aliphatic alkenes are reduced to alkanes. The proportion of aromatic compounds is about $10$% in petroleum. No cyclopropane ou cyclobutane are obtained by pyrolysis of petroleum.
Comment: @Maurice Oh yeah I completely ignored the fact that we were using H2/Ni so any alkynes or alkenes would be reduced to alkanes, I just thought it was some sort of reagent that is necessary to use. BTW are any non aromatic or anti-aromatic cyclic compounds formed upon pyrolysis of petroleum or is it just aromatic compounds?
Comment: Does it not basically vary from compound to compound? I've studied in my 11th year about two different large-sized alkenes and we were expected to remember those two as where the chain broke was quite random and had no logic
Comment: I would like to send an image of my book too but the comments section won't help
Answer: Pyrolysis of alkanes (cracking) involves breaking of $\ce{C-C}$ and $\ce{C-H}$ bonds to form free radicals. These radicals join to form smaller alkanes. So, there is higher chance of forming straight alkanes rather than unsaturated alkynes. But still there are chances of forming alkynes (where the alkenes undergo dehydrogenation) which are considered undesirable impurities in the cracking process.

In the last stage of cracking, the alkanes can undergo cycloaddition and aromatization to form cycloalkanes/cycloalkenes and benzene.
Ref.: Gholami, Zahra & Gholami, Fatemeh & Tišler, Zdeněk & Vakili, Mohammadtaghi. (2021). A Review on the Production of Light Olefins Using Steam Cracking of Hydrocarbons. Energies. 14. 8190. DOI: 10.3390/en14238190
My other answer: Is reforming and isomerization the same thing?
Comment: Did you see my comment?^ It appears to be hydrocracking - much different results.


How to connect to VMware behind NAT, from another LAN located machine?

Question: I have a LAN with 2 PC, one of the PC is a vmware workstation host. I installed a virtual machine behind NAT. (I do not want Bridge.) I set the port forwarding (22 SSH) in the vmware virtual network editor.
I can ssh into the virtual machine from the host, but can not from the another machine. (openssh is installed). My guess is the PC does not know the route. How to solve this problem?
Comment: Add a route? The method depends on the OS...
Comment: I am not good at adding route. Where to add it. In the PC or in the router. I can SSH between the 2 PC both are Ubuntu. Based on the the trace route I should add in the router, because it leaves the LAN network after the LAN gateway. Can you explain it why?
Comment: The host and VM share the same visibile IP address... If the host has a service on port 22, the guest cannot use it as well. You need to do splir port forwarding, maybe 8022 on visible side and 22 on private side, or change the port you are using for ssh entirely on the guest.
Comment: I managed to change the ssh port on the virtual machine and I could connect from the host successfully, but still no luck with the other PC. I put in the routing table of the router a new route dest: 192.168.108.138  mask 255.255.255.255 GW:vm_host_pc. The traceroute stopped at the GW and nothing...
Answer: Last advice: I imitated your setup in both VirtualBox & VMware Workstation and I can connect to VM from PC1(192.168.1.11) & PC2(192.168.1.12) using 192.168.1.12:8022, NAT port forwarding host port 8022 guest port 22, VM IP in VBox 10.0.2.15, VMware 192.168.2.11. No route was added.
Answer: First check that your firewall is not blocking the port.
Next set up port forwarding in your router.
I see in your comment above that you've put 255.255.255.255 as the gwateway - that wont work. Put the gateway to something like 255.255.255.0, if the other pc is in the same subne. It will work if machine 1 has eg. IP 172.25.68.4 and machine 2 172.25.68.44, but not if machine 2 has IP 172.25.69.4 - than you'd need to set a subent mask of 255.255.0.0
Comment: Hi and93hil. I have a simple home network with 2 pc and a router. PC1 192.168.137.100 PC2 192.168.137.105. And PC2 has a virtual machine behind NAT. VPC 192.168.108.138. I used the 255.255.255.255 because I gave a the specific dest VIP. I still not understand this subnet thing, but I would like to force the PC1 to search the VPC under the PC2. According the the traceroute from PC1 toward VPC it search the VPC outside the LAN.
Comment: either give your virtual PC a IP adress 192.168.137.xxx or set the subnet to 255.255.0.0
Comment: Can you explain , why will see the other net, if I set the mask for. 255.255.0.0 The number of host will increase, so will see the router every IP after 192.168.x.x, but what if if I have more network?
Comment: that's how subnet masks work. alternative is that you create a route to the other net with your router /switch.
Comment: Finally I managed to reach the VM behind NAT. I used the port forwarding solution. Still a bit strange to use the VM host IP to reach the VM guest. This link was useful: http://ask.xmodulo.com/access-nat-guest-from-host-virtualbox.html


Theoretical block prediction

Question: Theoretically speaking:
I take a random hash as a previous hash and compute whole block of hashes.
I'll wait for work on some mining pool until by some miracle this hash will be generated.
Would I get whole bounty if I upload this block straightaway?
Answer: What you are asking is: can I create valid blocks (with only a coinbase transaction to and address of my choice) with a previous block hash that I chose at random that will be made valid if another block occurs with that hash.
Sure you can. Note that there are 2^256 hashes. The chance of finding one at random that will equal the hash of a to-be-discovered block are very very small. You would most probably just be wasting computing power/electricity/time.
Also: Note that you could spend the same amount of computing power at guessing the private keys of other users. Finding hits there would have the possibility of getting more than the block reward.
Answer: If you did this your uploaded block would be invalid, because the previous hash doesn't match the hash of the tallest block in the chain. Your broadcasted block would be rejected and you would have wasted the work done to produce a new block.
Answer: No, because if this were possible, bitcoin would be fundamentally broken, making bounties impossible. The whole point of the mining process is to demonstrate that the hashing power was performed after the transactions were committed. Were that demonstration invalid, bitcoin transactions could not be secure and thus there could be no bounties for mining.
Among the many things that would stop you are the fact that mining pool work units are more than just a has and the fact that who gets the reward is not determined by who uploads the block.
Answer: The hash you are waiting for is one of 2256 values.
But I'm only going to use 295, which is 39,614,081,257,132,168,796,771,975,168
(because that is the biggest 2N value I could find quickly)
Blocks are generated about every 10 minutes, so it would take about 396,140,812,571,321,687,967,719,751,680 minutes for all hashes to be generated.
That many minutes is approximately 75,369,256,577,496,515 MILLION Years.
Or, around 75 million, billion years.
Don't worry: You can expect your hash to come up in approximately 1/2 that time.
So you only have to wait 37 million-billion years.
(hint: The age of the universe is about 13 billion)
And remember, I did this math with
295.
2256 is much, much, much, much bigger.
Do you still think this is something to worry about?

Theoretical block prediction


What are the fastest opensource tools to calculate soundscape indices?

Question: Soundscape indices are being used to summarize, present, and compare patterns of biological diversity.  With ever-larger datasets, we need more and more efficient tools for calculating these indices.  Has anyone performed benchmarks for script-based tools to extract soundscape indices?
Answer: PAMGuide is a great place to start. It is only looking at the soundscape, not biological diversity.  But PAMGuide is widely used by researchers and regulatory bodies. Output formats include R, Python, and Matlab.
Recently, as part of the JOMOPANS project, Ward et al., 2021 put out a set of standards. These standards are being applied to other soundscape measurements in the EU. You can apply these standards to your own soundscape analysis code.
References
Ward, J., Wang, L., Robinson, S., & Harris, P. (2021). Standard for Data Processing of Measured Data. Report of the EU INTERREG Joint Monitoring Programme for Ambient Noise North Sea (Jomopans).
Answer: PAMGuard (www.pamguard.org) has a number of noise modules including an ANSI standard Noise band Filter modules which can calculate octave or third octave noise levels. This allows users to quickly process large multi channel datasets, visualise and export results without any coding.
Quick Tutorial
Open PAMGuard and add a Sound Acquisition, Noise Band Monitor, Database and Binary Storage modules (use File -> Add Modules to add new modules). If this is in air then select File -> Sound Medium -> Air Open Sound Acquisition settings in the Settings menu, select Audio File or Multiple files in the drop down menu, click Browse and select a folder of wav files. Next open the noise settings (Settings -> Noise Band Monitor)

The settings dialog for the noise band monitor in PAMGuard
Go to File-> Database and create a new database. Next go to File-> Binary Store -> Storage Options and select a folder to save PAMGaurd binary files to. In File -> Storage Options you can now save noise band measurment either in the database or binary files. The database is human readbale but the binary files allow easier exporting of the data into MATLAB or R.
You are now all set up so press the red button and PAMGuard will churn through all the files. You now have three options for viewing the results.

Open PAMGuard viewer mode and browse through the data. A summary of the noise data is shown in the Datagram tab. Right click on the noise datagram and select center data here - then move to the Noise Band Monitor tab to visualise the data at in more detail and at finer temporal scale.

The noise display allows users to scroll through noise band measurment results fand/or visualise results during real time operation

Open the .sqlite database e.g. using SQLite studio and manually export results to a spreadsheet. Note you will need to have specified that noise measurments should be saved to the database in File->Storage Options

Export noise band measurments using either R or MATLAB. A handy library for MATLAB which also plots noise data is here. Instruction for using the R-PAMGuard library are here.

*A few days of noise data from a duty cycled recorder imported and plotted in MATLAB using the PAMGuard datagram library - see

https://github.com/macster110/pamguarddatagram/blob/master/example_scripts/loaddatagram_noise_test.m

for example code*
The flexibility of PAMGuard (i.e. the large number of signal processing and detection/classification/localisation modules) means it can be very useful for large scale soundscape analysis. Check out this paper on Greenland soundscapes which used PAMGuard as the primary analysis tool.
Ladegaard, M., Macaulay, J., Simon, M. et al. Soundscape and ambient noise levels of the Arctic waters around Greenland. Sci Rep 11, 23360 (2021). https://doi.org/10.1038/s41598-021-02255-6
Comment: This really isn't answering the original question, which is focused on the speed of index calculation. Providing some benchmark numbers or relative rankings would greatly improve this.
Answer: I use R (tuneR/seewave/soundecology packages) and yes, Kaleidoscope (that is not open source) is way faster. However it does give you access to the common indices only. I can say that depending on how you code in R, the process can be largely sped up. I recommend using parallel calculation, for example using the parallel package. Here is an example in R:
library(parallel)

ListPathToWave<-list.files("MydirectoryWhereMyWavesArePath")
RepTemporary<-"MyTemporaryDirectoryPath"

no_cores<-detectCores()-1
cl<-makeCluster(no_cores)

parLapply(cl, ListPathToWave, function(x) {
    library(tuneR)
    library(seewave)
    ObjectWave<-readWave(x)
    Index<-ACI(ObjectWave)
    save(Index,file=paste(RepTemporary,"/",basename(x),".Rdata",sep=""))
})
stopCluster(cl)

Comment: can you please provide a link to the Kaleidoscope software?
Comment: @chloe it's here: https://www.wildlifeacoustics.com/products/kaleidoscope-pro. Unfortunately, it is a paid piece of software.
Answer: I've used both R-based tools (built around Seewave / tuneR / soundecology) and Wildlife Acoustics' Kaleidoscope Pro software to calculate indices, and as much as it disappoints me to say it, Kaleidoscope is faster by an order of magnitude or more (I don't have exact numbers at this point but I can try to run some benchmarks some time next week). It's certainly possible that a better R developer than me could make some efficiency improvements, possibly significant improvements, to the code I'm using right now but the results I've seen suggest that any hypothetical open-source tool that's fast to calculate these indices would want to be written in a lower-level compiled language compared to R or Python.
Comment: The power of Java. :)  R will never be as fast as software developed in Java or a similar OOB language. Python *might*. However, what you lose in speed you make up for in the ability to customize.
Comment: I'd definitely agree with that sentiment. I think this might also be an opening for some friendly developer to build an open-source tool for index calculation in Java, C, etc. Potentially even one that could be called from a CLI so that you can wrap calls to it in your R or Python scripts.
Answer: I've been using the relevant R packages, Soundecology and Seewave for the last couple of years to quantify acoustic data, primarily over time-series domains. Typically, I usually examine one acoustic index as a variable (against time), but some acoustic indices perform well in correlation with each other - such as ACI (acoustic complexity) and BI (bioacoustic index) and can be modelled in given instances. However, as with anything in bioacoustics, context is critical.
Something that I would also strongly suggest is taking the time to design a good exploratory data science workflow. Something that I had to reckon with early on was the process of importing lots of data and subsequently tidying up the structure of the outputted dataframe, fixing dates and so forth. This might seem slightly rote, but setting up a smooth process in R makes a huge difference!
As user971889 mentioned, the Python skikit-maad looks very impressive, with a much larger suite of acoustic index algorithms for the user to implement. I've been meaning to explore this package, but I haven't yet found the time at present.
Answer: For MATLAB users, Triton software can be useful for soundscape metric analyses. There is an add-on package called the Soundscape Metrics Remora that can be used to calculate various parameters. The links provided will take you to the Github Wiki pages for these tools, which have great step-through guides about installing/using Triton and the associated soundscape package. Hope this helps!
Answer: If you're using Python scikit-maad is a pretty good option! https://scikit-maad.github.io/
Comment: scikit-maad has AMAZING documentation too. Even a Python newbie like myself got it going without too much pain
Comment: Do you know how this compares to the PAM2Py option (PAMGuide adaptation for Python)? siplab.fct.ualg.pt/proj/jonas/pam2py.shtml
Answer: For Python there is: OpenSoundscape, scikit-maad, and Acoustic_Indices.
For R there is: soundecology (plus see this tutorial), seewave
I agree with previous comments that Kaleidoscope Pro's soundscape calculations are fast & the interface is very easy to work with, but it is obviously expensive as others have pointed out. They do have short-term free trials for the software if you wanted to try it out and see if it would be worth it for you to invest in buying a subscription.
I believe ARBIMON is also building in soundscape index calculations into their platform now.
Answer: I have used Kaleidoscope Pro to calculate acoustic indices and this is a very user friendly software. I have also use packages within R that work well too.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Does the SQL Server 2008 search problem affect SharePoint search?

Question: Does anyone know if the problems that have been affecting Stack Overflow with regards to SQL Server 2008 Full Text Search performance have implications for the search in SharePoint? As far as I understand it SharePoint search uses SQL Server full text search.
Comment: http://blog.stackoverflow.com/2008/11/sql-2008-full-text-search-problems/
Comment: Can you link to some articles on the problem that is occuring?
Answer: SharePoint 2007 has its own search database, to store items such as search scopes and other things.
The actual search index does not use full text search, but stores it's information inside a file based index.
So any search queries run on SharePoint will not cause the issue.
Search crawling of a site is another story, the implementation of which I am not completely sure of. However, most SharePoint sites are not subject to the same transactional throughput that a site such as StackOverflow are hit with.
Morevoer, if a SharePoint site was used to host data as transactional as StackOverflow, very serious performance issues would likely result.
So search in SharePoint 2007 is not going to have the same issue as StackOverflow.
I would not completely rule out some performance hits while a search crawl is running with a SQL 2008 back end, but with decent scheduling and sub 100gig databases, issue should not be noticed by users.
Answer: I'm not aware of any problem with SQL Server under 2008, but I'm sure it won't affect SharePoint 2007.
Since 2007, SharePoint search no longer user SQL Search.
If you're running SharePoint 2003, I'm not sure SQL 2008 is supported.


Is there a philosophy of poorness?

Question: This is something that attracted my attention several times, but I never heard of anyone who wrote about a philosophy of poorness, I guess Marx would be the nearest I've heard of, are there other ones who wrote about it?
Comment: [Pierre-Joseph Proudhon](http://en.wikipedia.org/wiki/Pierre-Joseph_Proudhon). "Marx wrote _The Poverty of Philosophy_ as a refutation of Proudhon's [_The Philosophy of Poverty_](http://www.marxists.org/reference/subject/economics/proudhon/philosophy/index.htm)."
Answer: I think what you are looking for is a lot older: the ancient greek school of cynicism and maybe even that of the stoics (for they at least preach independence of everything).
To quote from their wiki:

Thus a Cynic has no property and rejects all conventional values of money, fame, power or reputation.
They sought to free themselves from conventions; become self-sufficient; and live only in accordance with nature. They rejected any conventional notions of happiness involving money, power, or fame, to lead entirely virtuous, and thus happy, lives.
Answer: It depends on your concept of poorness. Under a certain point of view, I can understand "philosophy of poorness" as the free-willed act of opening hand of your material possessions, except of all those things strictly needed for survival. Thoreau's "Walden" comes to my mind now.
EDIT: For the commenter below :)
I'm still reading it. In general, Thoreau writes about his experience while living for 2 years or so at the borders of the Walden lake, in Concord, Massachusetts, USA, not as a hermit, but as a free man who could attend to his need with the work of his hands only - cultivating his food, building his own house, etc. Whatever money he needed he would get it working as a hourly-paid farm worker on the neighborhood. This money was necessary as he couldn't make everything he needed.
On other book that Thoreau wrote, he stated that he sign a document where he manifested his wishes of "not being considered as part of the people who were attended by the state in his needs, although still being an American citizen", which was accepted and recognized by the local authority.
The later parts of the book are of more philosophical content, which I'm still digesting. After this experience he would conclude that a simpler and more productive life was possible in modern times; that so much were spent and wasted based on pride and vanity that the essential was lost.
So, in whatever this relates to a philosophy of poorness, I guess that's it: the understanding that living in "poorer" conditions may lead to a better experience as living beings.
Comment: Awesome. :) By the way, his location was actually in the state of *Massachusetts*, in Concord! I grew up literally down the street, only 11m away (see [here](http://goo.gl/maps/kMSuh)). :D
Comment: Well, that's awesome :) I hope to go visit this place at least once in my life :)
Comment: @stoicfury I was very impressed by that. Until I saw that your m stands for minute, not meter. :)
Comment: @Gugg - haha, well... close enough :P
Answer: Jacque Ranciere wrote The Philosopher and his Poor. He mediates on the relationship between the Philosopher which does not belong to the Poor and the Poor themselves; and the fascination that the Poor have exerted on his thought from Antiquity to the present day; of course this is as true for Western Philosophy as well as Philosophy done elsewhere - say Buddhistic or Islamic.
It seems like a good place to start but I can't comment critically as I haven't read the book myself.
I do think that one should make a distinction between the Poor and the Ascetic which are more about the cultivation of other virtues rather than riches - Buddhists, stoics, cynics etc.
The Poor that you mention seems to be more akin to the proletariat of Marx.
Answer: Your question raises some interesting issues about philosophy itself. It may be that "poverty" is not an issue that can be framed philosophically, at least not in the traditional sense.
Marx was certainly trained philosophically and was one of the great thinkers of his age. But were his major works philosophy per se? In "Thesis on Feurerbach" Marx famously rejects the "armchair" philosophy of those who merely describe the world, rather than seeking to change it.
"Das Kapital" and his other mature works engaged primarily with the British political-economists and French socialists, adopting the methods but not the issues of German idealism. He did not explicitly concern himself with ontology or epistemology, and appeared to accept an almost naive naturalism. Given his task and intent he really could not do otherwise. He was thus arguably one of the first post-philosophers who might be better described as a critical theorist, economist, or sociologist.
The point is this. Philosophy tends to seed and shed disciplines. Theology, psychology, and physics, notably. Thus, Newton, Adam Smith, Marx, Freud, Weber, Einstein, Adorno, Kuhn, and so on, pursue their aims in ways that are no longer readily departmentalized as "philosophy." Why not? While philosophy can deal with any issue, it tends to universalize. It adopts a general stance with respect to metaphysical questions that transcend specific cultures, times, and places. And many, including Marx and Ranciere, have criticized it for precisely this recumbent detachment.
While "poverty" might appear universal, as a subject of theology, for example, the structure, meaning, and analysis of poverty is really relative to particular social conditions. Marx and Engels illustrate this most brilliantly in their emphasis on history, "praxis," and analysis of modernity, explicitly "standing Hegel on his feet." (I believe Marx said "head" but should have said "feet.") Many subsequent Marxists, from Lenin to the Frankfurt School, may know their Aristotle, Kant, and Hegel, but take the label "philosophical" almost as an insult, an accusation of pipe-puffing disengagement.
Most serious engagements with "poverty" implicitly treat it as a problem to be analyzed and solved, which ontology, epistemology, and even, to some extent, morals in the universal or theological sense, are not equipped to do. The issue is thus claimed by some of the more defined subfields seeded by philosophy: political theory, legal theory, sociology, economics, theology. The analytical tradition, in particular, explicitly avoided "value" issues, and addressing social concerns like poverty was only lately returned to analytical respectability by Rawls, Singer, Sen, and others.
There are no fixed boundaries. But in certain historical respects, philosophy proper is an unapologetically "armchair" pursuit. It can do its work without data, news, or experiment. When it finally rouses itself to the laboratory, law courts, or barricades, it no longer calls itself philosophy.
Answer: " I guess Marx would be the nearest " .. He wrote pretty extensively on this very thing. You cannot ( I believe ) write on the philosophy of "poorness" without mentioning its antithesis "rich" . Das Kapital being the convergence of the ideas of capitalism between the two groups. Poverty can only be measured based on its difference to wealth or "richness" . Although you are not specific in this question of your meaning or relationship to "poor" I am only guessing that it is of economical in nature, by the mere fact that you mentioned Marx.
Unless you mean "poor" in every sense, which would lead to regression and I guess the study of negativity.
Economically though Marx outlines in Das Kapital "contradictory character of the economic value of the commodity (cell-unit) of a capitalist society" which is basically about a recession and inevitable actions of those who are poor and the use of mass poverty by the bourgeoisie into order to create the illusion of greater power and the decreasing of wages to create larger wealth as the top dogs fight for position.
This is very apparent in today's society where the writings of Marx are very real. Where bankers who make millions of dollars every year even in years where their very actions cause the destruction of countries, still get million dollar bonus and multi billion dollar payouts, all on the backs of the poor. It's basically monetary disparate, aided by the governments in the knowledge of the mental disparity of the masses during such radical economic transitions.
In democracy, outlined by the Greeks and the founding fathers of America and to a degree Plato's republic, the majority tends to be lead by a small minority in decisions of the communities and countries for the benefit of everyone

"Democracy is a form of government in which all eligible citizens have
an equal say in the decisions that affect their lives"

Yet today in this so called free democracy that American seems to have to export to every country for fear of complete world instability by communism and the infringement of the basic human rights of freedom ( god forbid you tell them about the hypocrisy of Guantanamo bay and the inherent flaw of rationality, in freeing countries with war ) we have less power then ever before. By the people, for the people is not so anymore. And governments the world over have inherited this inceptual illusion of democracy where politicians are backed by multi-trillion dollar multi nationals , making decisions based on the good of those organizations no matter the cost to the environment or the greater population, who inevitably become ( like in the matrix ) a battery to further power the machine that is capitalism. Feeding the 1% that walk this world like giants at the expense and destruction of human life and morality. This is basically existentialism gone completely retarded and the ramifications as such are the billions of humans struggling each day just to make ends meet. Played on like puppets by the price of oil.
Not for one second do they seem to see the amazing creative potential of the whole of societies working together through their differences to create and produce in accordance with the laws of nature. Capitalism might not be our destruction but it will be the driving force to a pool of lost potential and the stagnation of the whole, with regards to humanity.
Philosophy tending towards ethics could also be taken with regard to "poorness", with the likes of Peter Singer, John Rawls and Nigel Dower.
Comment: I dont feel like this is a good answer, the bad grammar being the least problem. It is too personal, too much rant and solely your opinion based upon your bad experience and leftist newspaper articles, or so it seems.
Comment: I thought it would be fair to explain my downvote, which i gave so noone would scroll down here and read neither your answer nor my comment.
Comment: I am glad you took the time to reply though to express your opinion. Hopefully, god willing, others will scroll down and read your opinionated reply before they read that long piece rant pile of leftist rubbish.

Is there a philosophy of poorness?


What is the policy here on homework?

Question: I am not a student, but I know other avenues have had problems in the past with students trying to get others to do their work for them. I am sure most of the people on this site right now would not give a student the code they need to complete the assignment, but would help them out so that they can do the assignment themselves. What is the official policy on this though?
Comment: This question should have been closed as a duplicate of [this post](https://meta.stackexchange.com/questions/10811/homework-on-stackoverflow), but it can't now, as it was migrated to Meta Stack Overflow.
Answer: I spend a lot of time on other programming forums and it seems most people agree with the policy "no homework solutions; nudges welcome".
Basically, if the student posts the entire assignment then asks for a solution, it's the same thing as a non-student posting, "My boss wants a blog engine in two months.  It has to be in PHP and work just like Wordpress.  Please email me the codes at ..."  It's going to get ignored or maybe ridiculed.
However, I've seen plenty of students post in a form like: "Here's the assignment.  I've done these parts posts sample code.  I'm having a little bit of trouble with some task.  The documentation says something but it's really not clicking.  I tried sample code but for some reason unexpected results happen.  Could someone tell me what I'm doing wrong?"
I like to answer these kinds of questions, and the fun is answering them in a way that leads the student to the answer without writing any of the code for them.  The student here is really trying, and got halfway by himself before getting in too deep.  Gentle nudges are awesome to struggling students; it's when you write the assignment for them that things go wrong.
(late edit): For particularly difficult problems, I personally like to show the student a full solution to a similar but different problem.  For example, it's easiest to explain sorting algorithms with actual code.  If the student's problem is sorting names in a particular order, I might post a solution for sorting integers.  You'd be surprised how many people can't go from one to the other, since it requires more effort than a copy and paste.
Comment: Slick answer, I had to say it! This is the exact same attitude that people should try to adopt when replying to a student that tried hard! Because, giving them the solution won't help them.
Comment: Good answer, but this applies to hardware answers as well as software answers. Show me your schematic!
Answer: My policy is that if I suspect you are being lazy, I will not help you.
Answer: My personal policy - I'll provide tips and pointers, but I'm not going to write a line of code for your homework.
Answer: Homework, business work, or hobby work, we're all here to help each other... within reason.
Answer: My two cents...I agree with the others, and I have seen this come up in other places where there seems to be a bias and distrust against students, which is understandable I think, but it raises a few questions when considering such a "policy"...
1) How do you know it's a student asking for a homework assignment?  Granted, in some cases, it could be obvious, but some assignments (like a database course) could easily be seen as a real-world problem.
2) If a student is asking for help on a specific problem (very specific), what makes them any different than any of us?  They are asking for help on something just like we are.  Aren't we just trying to learn too?  Solve a problem too?  There will always be short-cut takers out there who just copy/paste code and don't take care to learn, but whose to say some pros are any different!!??
3) Can't one argue that if a student is reaching out to the net and using resources like StackOverflow,that they are "acting" as pros?  Seems to me that's more real-world than when I was in college and the Internet was just a little toddler.
4) How do you measure intent in these cases?
Again, I agree with the others, a case-by-case assessment is sensible, but it's an interesting question :)  Cheers.
Answer: I would answer someone if they had a specific question where it showed that they have done some work themselves and were just stuck on something.
For example, if someone said "I've got a homework problem I'm working on and I've done X and Y but now I'm not sure how to handle Z" then I'd be likely to answer.
If someone shows up saying "My homework is to solve X problem, someone please give me the solution" then I would ignore them and give them a down vote.
Answer: I've asked beginner questions myself (and there is not that much difference between a beginner question and a homework question really), and my own personal policy is: As long as it's a specific question, I'll be willing to answer it.
So stuff like "Here is the assignment, it needs to do X, Y, Z" is ignored by me, but if the person specifically asks something about X, I have no problem answering.
At the end of the day, I don't care if it's homework or if it's business code and I don't care if it's beginner or pro level. I care if it is a real and specific question. Because in order to ask a specific question, the author already needed to have some understanding about the task.
Answer: This is something that will have to happen on a question to question basis.  If it looks like a homework question then decide if your going to answer it or not, I don't think that there is an 'Official Policy' for this nor do I think there should/will be one.
Answer: If they are legitimate programming questions, for homework or not, then I have no problem with it. If what is being asked is for others to do the work for you, whether for homework or not, then those are not cool.
Answer: If the question is an interesting one in its own right, and I think that my answer will be beneficial to the community at large, then I don't really care about the motives of the questioner.
Answer: That it's not our responsibility to babysit everybody who visits the website.  If the person comes here thinking they're doing themselves justice, then they deserve to get beaten with a silly stick when they can't figure out why they're not feeling any improvement in their studies.
Answer: You mean like... how to solve Fizz Buzz?
Answer: I noticed that there were alot of concept and many more beginner questions being answered when school started about 2 weeks ago (around here, at least).
I would like to think that questions pertaining to homework would be pretty easy to sniff out. For example, if someone asked "How to concatenate Strings in Java" I would be inclined to think that they had gotten here from google and would likely take our code on blind faith. Questions like that do not lend themselves to 'pointers' or 'tips' per se.
However, if someone was working on (for example, a previous homework of mine) writing their own malloc, and wanted to know how to bump up the pointers for each successive call, that would be fairly easy to give 'pointers' and 'tips' on.

What is the policy here on homework?


Is it correct to say imbued in the following sentence?

Question: Can I just say
I am imbued to see this show - such as - I am inspired to see that ?
Answer: No.  Something that imbues can do so with qualities or feelings, but not actions.

The cool weather imbued him with a refreshing feeling.
The color imbued a sad mood to the painting.
The cool weather inspired him to hurry.
The color inspired him to buy a shirt of the same color.
Comment: I would not say "The color imbued a sad mood to the painting" "Imbue" means fill, permeate, influence, soak in, or color or dye, often metaphorically. Soak or moisten is , i think, the original meaning See https://www.merriam-webster.com/dictionary/imbue and https://www.collinsdictionary.com/us/dictionary/english/imbue
Comment: @DavidSiegel Your provided definition directly supports the ("often [metaphorical]") use of the word *imbued* in the sentence you question. It makes complete sense to me.


Sample values from a grid by points in RQGIS

Question: I need to sample values from a grid by points. In RSGA, there is a function called "pick.from.saga.grid" to sample raster data set using points. Is there something similar in RQGIS?
Answer: If you have a look at the source code of pick.from.saga.grid, you will realize that it is an independent R function. That means the function does not use SAGA in the background but instead uses an interpolation algorithm in R (nearest neighbour, ordinary kriging) to extract grid values to points.
So far, RQGIS only provides an interface to QGIS without offering additional R-specific geospatial processing capabilities. If needed, this could change in the future. However, since the pick.from.saga.grid-function already exists, I rather would not duplicate it in RQGIS.


import error using djangorestframework with django-nonrel

Question: I'm working on a Django-nonrel project using Django-rest-framework and I've run into the following error after following the instructions in the Token Authorization section of their Authorization API Guide:
<code>ImportError: No module named rest_framework.authtoken
</code>
Normally I would just assume that this is something to do with my PYTHONPATH but I don't think that's exactly what the problem is because I can import this framework from both IDLE and the project's shell run using manage.py, the latter both with and without a virtual environment. Within the virtual environment I have installed django and djangorestframework, which should be the only requiremnets for the project thus far.
I had thought that it might have been a Python versioning problem but given that I can import the package directly from the project's shell (running under the virtual env) I'm kind of at a loss since theoretically running manage.py from the same virtual environment should result in the same context for locating libraries.
I've spent a long time searching around trying to fix this issue but to no avail. Any suggestions? I'm happy to provide any additional information as needed!
Answer: A few things to check:

Are you sure you are using the directory one level above rest_framework in your PYTHONPATH?
Did you restart your shell after installation?
Take a look at VirtualEnv PYTHONPATH setup. Did you try setting the PYTHONPATH for virtualenv explicitly?


Differential Privacy with Outliers

Question: To use the Laplace mechanism, we have to get the global sensitivity of a query function. What do we do in the case where there is one huge outlier(or multiple outliers) in the dataset such that the global sensitivity gets too large and noise added results in query outputs that do not make sense anymore. In which case can we use the local sensitivity. Any ideas, papers, references will be appreciated.
Answer: There's really very little that can be done in this sort of situation. The noise is only parameterised by $\Delta f/\epsilon$ where $\Delta f$ precisely represents how much the function changes when such an outlier is added or removed from a queried set and $\epsilon$ precisely quantifies how hard it is for an adversary to detect a change. Your options are essentially one or more of the following

make it easier for outliers to be identified (by increasing $\epsilon$);
purge your data of outliers (thereby reducing $\Delta f$ by changing the permissible subsets, but putting data integrity into question);
change your query function to something smoother so that the effect of outliers is less extreme (reducing $\Delta f$ by changing the function, but potentially losing some of the information that is captured).

All of these have drawbacks.
Answer: The following procedure will work:

Take a transformation of the original data that
Apply noise to the transformed data. The simplest transformation is the rank-normal transformation: Take $x$, map it to the empirical CDF at that point, and then take the probit to map the uniformly-distributed ranks to a normally-distributed dataset.
Apply Laplacian noise as usual to the outlier-free dataset.
Apply the inverse of the transforms above to arrive back in the original space.

Differential Privacy with Outliers


Is there any way to connect directly to a SharePoint database?

Question: A list inside our Intranet SharePoint has reached the 5000 items limit threshold. We followed the Microsoft recommendation on how to overcome this limit adding indexed columns combined with filters as described here. Now, the issue is solved and I'm wondering if there's any way to download all the items from the list without filters. Datasheet view allows to download all the data without filters but I'm not sure if this datasheet view is going to collapse some day. Does anyone know how to connect directly to the entire's list data?
Answer: Instead of trying to do anything with the database, check out the daily time window, which is a setting that allows you to configure a time of day where list thresholds are ignored. No, don't set this for 24 hours a day, as the list threshold is an important aspect for keeping the farm healthy.
Comment: Thanks, but... What if we need to have the whole data available 24x7?
Comment: Perhaps I've misunderstood the requirements? With indexes and views, users should have access to browse through all items. But you need to actually download all the current files at any time of day? What, specifically, do you mean by download? But other options include using excel/powerpivot to connect to the list, or SSRS to create a report. You can also go the coding route and access the data via REST or CSOM.
Comment: There's an excel report which needs to be fed by all the items on a list. Actually, I'm downloading all the items available through Datasheet View, and exporting it to a different Excel file. My default view (All Items) does not allow me to download all the items because is filtered to avoid limit threshold. Would you be so kind to guide me on how to access the data via REST or CSOM?
Comment: Let's try an easier way first. If you have excel 2016, try the following from excel: data tab --> get data--> from other sources --> sharepoint list.
Comment: Unfortunately, my Office version is 2013. But, I've seen that I can download PowerQuery for Office 2013 and install it to connect to the SharePoint list. Is this Power Query add-in licensed? I was able to accomplish what I was looking for with this add-in. Thanks @Mike2500
Comment: No additional licensing to use it! Glad it worked for you!
Answer: If you see the list with Auditor or Admin account, the default threshold limit is 20,000 you can download the data or export to excel.


Topological characterisation for a (closed irreducible) hyperbolic 3-manifold

Question: Is there a topological characterisation of what a (closed irreducible) hyperbolic 3-manifold is? I don't know any Riemannian geometry and still want to understand what an exceptional Dehn surgery is. For definition of a hyperbolic knot we can avoid the real understanding of what a hyperbolic manifold is by simply saying that it is not an unknot, not a torus knot and not a satellite. Is there a similar characterisation for hyperbolic 3-manifolds? Cameron Gordon's Park City lecture notes seem to suggest that such a criterion would be that the manifold is simple. But I couldn't find a clear statement of this. If there is such a criterion, a reference for a survey discussing these things would be very desirable(and in general, is there a survey - suitable for early stage PhD students - about the 3-manifold topology after Perelman?). Thanks!
Comment: The criterion for knots you refer to is Perelman's geometrization theorem, and this applies to all 3-manifolds. There are many surveys.  A pre-Perelman classic is Scott's article *The geometries of 3-manifolds* (Bulletin of the LMS).  Thurston's book 'The geometry and topology of 3-manifolds' is also accessible to an early stage postgraduate.  Post-Perelman works are rarer, but you could try arXiv:1205.0202v3 (apologies for the shameless self-advertisement).  Everyone else will have their favourites.
Comment: (Slight correction: the result for knots follows from the geometrization theorem for Haken 3-manifolds, which was proved by Thurston.  Of course, you need Perelman to deal with non-Haken 3-manifolds.)
Answer: A clear statement is the following:

A compact 3-manifold $M$ is hyperbolic if and only if it has infinite fundamental group and does not contain any essential surface with $\chi \geqslant 0$.

You may remember that by saying that $M$ is hyperbolic unless there is some clear obstruction, and the obstrucion is $\pi_1$ finite or the existence of some surface with $\chi \geqslant 0$. This statement is pretty general and works for any compact 3-manifold with any kind of (possibly empty) boundary, using the appropriate notions of "hyperbolic" and "essential".

 Hyperbolic  means that, after removing tori and Klein bottles from $\partial M$, the manifold admits a complete finite-volume metric with constant curvature $-1$ and with geodesic boundary.
 Essential  means that the surface is immersed in $M$ with a map that is $\pi_1$-injective and not homotopic to some map whose image is in some component of $\partial M$. In addition, a 2-sphere that does not bound a 3-disc is essential.

More concretely, an orientable manifold $M$ is hyperbolic unless one of the following obstructions occurs:

$\pi_1(M)$ is finite,
$M$ contains a 2-sphere which does not bound a 3-disc (hence $M$ is reducible)
$M$ contains an essential 2-disc (hence $M$ is $\partial$-reducible)
$M$ contains an essential 2-torus whose $\pi_1$ injects but which is not $\partial$-parallel. Note that the 2-torus may be immersed and not embedded: this occurs precisely in the small Seifert spaces
$M$ contains an essential annulus (for instance in $\Sigma \times [0,1]$ for any surface $\Sigma$)

This characterization implies the one for knots that you mentioned, in virtue of the following:

every knot complement has infinite $\pi_1(M)$ and is irreducible,
a knot complement contains an essential 2-disc if and only if it is trivial,
a knot complement contains an essential annulus or torus if and only if it is not prime, a torus knot, or a satellite.
Comment: Thanks! That's exactly what I was looking for!

Just to confirm, so a compact 3-manifold is not hyperbolic if either it contains an embedded essential surface of non-negative Euler charasteristic or it is a Small Seifert Fibred space? By SSFS do you mean base surface $S^2$ with at most 3 exceptional fibres or do you also include the $P^2$ with at most one exceptional fibre as well?

Do you know a text that I could cite making this statement?
Comment: the sentence you wrote is true if you define a SSFS as a 3-manifold that has a Seifert fibration on S^2 with at most 3 singular fibers: such a "weak" notion of SSFS includes everything that has finite pi_1, and everything which contains "immersed tori" but not embedded ones.
Comment: A manifold fibering over P^2 with one singular fiber also fibers over S^2 with three singular fibers. This is due to the fact that the orientable fibration over the Mobius strip also fibers over the disc with two singular points of order 2. You can find this in the book of Matveev and Fomenko, with lots of pictures.

Concerning the general statement, I suppose that some of the surveys of Cameron Gordon should contain it. See also the paper of Boileau-Porti on orbifolds: http://mat.uab.es/~porti/main.pdf