Name of a Solved Enigma?

Question: I'm looking for the word that means "solved enigma", does anyone know it?
I don't know how the word will be used, I'm reading it from a dictionary.
Thanks
Comment: "Revelation"  ... ?
Comment: "Revelation" sounds like exactly what I'm going through...
Comment: "*known fact*"?  I.e., You might say, "That is an enigma" but after you've figured it out, it just becomes "a known fact".
Answer: It depends on the enigma:
If you find out how the tooth-brush got onto the bird-table it's an explanation
If you find out why potatoes grow best in acid /peat soils, it's a discovery.
If you know what @Graffitto knows it's a revelation.
And if you catch a glimpse of the meaning of life it's an epiphany.
In this answer, if you will forgive me, there are no ready-made dictionary links, because without the discovery process there is no revelation.
Answer: According to Thamy Pogrebinschi, Karl Marx conceived of a solved enigma "(aufgelöste Rätsel)" as an enigma that

knows itself to be the solution for itself. It is  a  concept  that  contains simultaneously in itself an enigma and the  solution to decipher it.

Thamy goes on to explain that

As  the  solved  enigma  of  every  constitution,  Marxian  democracy  presents itself  as  the  answer  to  the  problems  arisen  by  the  modern  political forms.

(From "Democracy against Law: A Marxian Standpoint", presented at the Proceedings of the American Political Science Association 2007 Annual Meeting.)
This is perhaps a more enigmatic answer than you might want, but the upshot is that a solved enigma may be called

Marxian democracy.

Equally, though, whatever you call any enigma wandering around that

knows itself to be a solution for itself

will be what a solved enigma is called. It gets metaphysical when you consider that part of the contention of this definition is that political systems are capable of knowledge. Beyond political systems (I speculate), the only candidates for such enigmas are human. Thus, a solved enigma might well be called 'Bill', or 'Sue', or even 'hey, you!'.
Another, perhaps authoritative, take on the puzzle of the mystery of what the solved enigma is called is a term ascribed (perhaps out of a second-language confusion?) to "arrogant intellectuals":

The result is that the State, which is the only employer, becomes omnipotent and transforms the direct producers into "slaves of bureaucracy".
Today, this truth, after the global failure of the Marxist-Leninist Communism, is almost obvious. But, when Rizzi explained this idea in its innumerable articles, he obtained only commentaries full of arrogance by our intellectuals, who were blind and deaf as regards reality, and arrogantly convinced that the economical collectivism was "the solved enigma of history".

(From the Bruno Rizzi website, in an entry titled "A TALENTED AUTODIDACT AT WAR WITH THE 'BUREAUSAURS'", by LUCIANO PELLICANI, Feb. 16, 1990.)
Here we see (clearly?) that "arrogant intellectuals" call a solved enigma

economical collectivism.

A gentler, more expansive and less demanding term for the solved enigma is

filled in gap.

This hopeful, uncomplicated appellation is offered by Cal Svensson in "The construction of poetic meaning ☆: A developmental study of symbolic and non-symbolic strategies in the interpretation of contemporary poetry" (Poetics, Volume 16, Issue 6, December 1987, Pages 471–503):

The solved enigma or filled in gap is possible to conceive of as the answer to a question addressed to the literary work by the reader (cf. Prince (1982: 103)).

These, then, are what a solved enigma is called:

Marxian democracy;
economical collectivism;
filled in gap.

However, you might want to accept the implicit advice of Lévi-Strauss offered via Francisco Vaz da Silva in Metamorphosis: The dynamics of symbolism in European fairy tales:

Vaz da Silva brings together what, on the surface of consciousness and  of stories, should  be kept apart—as with incest, as phrased by Lévi-Strauss and quoted by our author: "like the solved enigma, incest unites terms that ought to remain separate."

(From 'Francisco Vaz da Silva in Metamorphosis: The dynamics of symbolism in   European fairy tales, "International Folkloristics" 1, prefaced by Alan Dundes, New York, Peter Lang, 2002', E.L.O. 9-10 (2003-4) – Notas e Recensões, Isabel Cardigos.)
Answer: A solved enigma is no longer an enigma, it is a former enigma, because once solved it ceases to be one.

Name of a Solved Enigma?


Do cursed investigators in the herald variant repeatedly fall unconscious?

Question: In the Herald variant of Curse of the Dark Pharaoh, cursed investigators lose stamina every upkeep. If they reach zero and become unconscious, do they wake at St. Mary's Hospital only to keep falling unconscious unless someone sends a blessing their way? Do they lose the curse when becoming unconscious? I didn't see any reference to losing or retaining blessed/cursed status but surely there is some means to keep investigators from being caught in this loop
Answer: Since an investigator gets to roll to see if they lose a Cursed or Blessed status on the upkeep after losing their stamina, they won't get stuck in an infinite loop.  If a person is worried about not being able to do anything because of their curse, they can use their Encounter at St. Mary's to simply heal one.  Their health will go from 1 to 2, then back to 1 next round.  At least with that, the person can make one move and go somewhere to do SOMETHING, rather then being bed-ridden.  There are ways around it, but I guess the solution really would be "don't get cursed".
Comment: So once the investigator has 1 stamina at the start of an upkeep, they really have no way to make any moves until that 1 is rolled to release the curse as they repeatedly lose and regain 1 stamina. That, or, more dependably with such a small sample of rolls, someone else either sends a blessing their way or goes to St. Mary's Hospital to explicitly heal them. Do I have that right?
Comment: Look my answer over again.  I changed it a bit to show a solution to the problem.
Comment: Thanks. Your original answer made me realize that, but your edit does make it even more evident.


How to update the title of audio file through its attachment metadata

Question: I am trying to programmatically update some metadata of audio file attached to a post. I have been able to update the artist and album properties of the audio file but title doesn't stick. I can go through media library and edit the title and it works but not through backend. Can you please assist? Here's how I do so now:
<code>              $meta = wp_get_attachment_metadata( $attachment->ID, false);

              $meta = array (
             'artist' => $mainArtist,
                     'title' => $TitleAndFeaturedArtist,
             'album' => ' ',
                            );

                    wp_update_attachment_metadata( $attachment->ID, $meta);
</code>
The artist and album gets updated but not title. Title seems to be coming from the iD3 tag but through media library in wordpress, you can edit and set yours. I am trying to avoid manually processing over 2000 files. There has to be a way :(
Please help. Any suggestions or alternative would help
Answer: I figured this out. It's because the title isn't part of the attachment metadata technically. The audio attachment itself is stored in the database as a post with a post type of attachement and applicable mime type. To update the title of the audio is to update the post title


PHP-GD: Dealing with Unicode characters

Question: I am developing a web service that renders characters using the PHP GD extension, using a user-selected TTF font.
This works fine in ASCII-land, but there are a few problems:

The string to be rendered comes in as UTF-8. I would like to limit the list of user-selectable fonts to be only those which can render the string properly, as some fonts only have glyphs for ASCII characters, ISO 8601, etc.
In the case where some decorative characters are included, it would be fine to render the majority of characters in the selected font and render the decorative characters in Arial (or whatever font contains the extended glyphs).

It does not seem like PHP-GD has support for querying the font metadata sufficiently to figure out if a character can be rendered in a given font. What is a good way to get font metrics into PHP? Is there a command-line utility that can dump in XML or other parsable format?
Comment: Just get yourself a unicode font.
Answer: PHP-Cairo built against Pango and fontconfig should have enough brains to do font substitution when appropriate.
Answer: If you don't have a unicode font, you'll need to try something like
<code> <?php
$trans = new Latin1UTF8();

$mixed = "MIXED TEXT INPUT";

print "Original: ".$mixed;
print "Latin1:   ".$trans->mixed_to_latin1($mixed);
print "UTF-8:    ".$trans->mixed_to_utf8($mixed);

class Latin1UTF8 {

    private $latin1_to_utf8;
    private $utf8_to_latin1;
    public function __construct() {
        for($i=32; $i<=255; $i++) {
            $this->latin1_to_utf8[chr($i)] = utf8_encode(chr($i));
            $this->utf8_to_latin1[utf8_encode(chr($i))] = chr($i);
        }
    }

    public function mixed_to_latin1($text) {
        foreach( $this->utf8_to_latin1 as $key => $val ) {
            $text = str_replace($key, $val, $text);
        }
        return $text;
    }

    public function mixed_to_utf8($text) {
        return utf8_encode($this->mixed_to_latin1($text));
    }
}
?>
</code>
Taken from http://php.net/manual/en/function.utf8-decode.php
If the mixed and utf-8 characters are equal then you can use it.  If not, then you can't.
Answer: You can try to use pdf_info_font() from pdflib extension. Good example is there: http://www.pdflib.com/pdflib-cookbook/fonts/font-metrics-info/php-font-metrics-info/
Answer: I ended up using the TTX utility to dump font metrics. I could then inspect the resulting .ttx files and look at the character->glyph map. I did this manually, but automatic parsing of the XML files is possible.
An example GNU Makefile which generates the .ttx files from a set of TrueType fonts in the same directory:
<code>all: fontmetrics

fontmetrics: $(patsubst %.ttf,%.ttx,$(wildcard *.ttf))
.PHONY: fontmetrics

clean:
    rm -f *.ttx

%.ttx: %.ttf
    ttx -t cmap $<
</code>

PHP-GD: Dealing with Unicode characters


Distributed Scalable Decision Trees

Question: Are there any good sources that explain how decision trees can be implemented in a scalable way on a distributed computing system.  Where in a given source is this explained?
Answer: Apache Spark can do it, using the new MLLib library. Here's a presentation, and here are some benchmarks. Bindings are available for python, scala, and java.
Answer: You should read the paper from Google on PLANET, which was their distributed MapReduce-based implementation of random decision forests: http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/36296.pdf
You may or may not like the architecture but there are a number of interesting ideas about scaling up here.

Distributed Scalable Decision Trees


Could a "disco ball" be a good geometry for trapped ion quantum computers?

Question: It seems to me that a good geometry for an ion trap quantum computer would be to constrain the ions to lie on the surface of a sphere. Their mutual repulsion would space them out evenly. If the ions were positively charged, a negative charge at the center of the sphere could put them all in a "spherical well potential". The force on each ion would be the outward radial force of the sphere substrate on the ion plus the inward radial force produced by the Coulomb force between the ion and the central charge. One could achieve full connectivity between the qubits by putting them all in the same energy level of that spherical well potential. For each ion, one could place a microlaser at the same polar angles but at a slightly larger radius than the ion. This way, one could address each ion separately.
Answer: Very interesting concept! I'm not a trapped ion expert, but few concerns that immediately come to my mind to think through are two-qubit gates, small spatial perturbations cascading, and practicality.
Two-qubit gates on trapped ion systems are typically implemented by exciting a vibrational mode between the two qubits. Isolated two qubits from the others vibrationally seems difficult, especially if they're all supposed to "press" on each other electromagnetically to maintain the spherical arrangement.
Second, I'd be worried that one ion shifting slightly due to laser pressure or some other small perturbation would bump its neighbor and cause the entire trapped ion structure to shift slightly as that vibration is absorbed.
Third, aligning all the microlasers with the ion sphere could be difficult if they like to shift. Additionally, there's the problem of how stable the configuration is. If you're trying to keep it all floating in vacuum (which is desirable for your qubit coherence) and only use E/M fields to constrain the atom positions, designing and implementing those fields in 3 spatial dimensions would be practically challenging.
Answer: Visually this looks cool, but there are two big reasons this kind of geometry isn't feasible. These reasons hold true even if you could somehow figure out an ion trap that gives you a perfect spherical potential that locks all ions in place.

Despite appearances, this geometry doesn't offer higher qubit connectivity than a simple linear chain.

The spherical geometry is probably the worst possible geometry to do qubit readout.

Now in more detail. The way trapped ions get their connectivity is by carefully exciting vibrational normal modes (phonons) so that only the two ions you care move and undergo a two qubit gate. This applies equally to both ions in a linear chain or in a sphere, so there is no connectivity benefit for a sphere, since both the sphere and linear chain have the exact same number of vibrational modes.
More detrimentally, the sphere does not allow you to read out your qubits properly. The way readout is done via shining resonant laser light so that only ions in the bright state fluoresce, and the image of the ions is collected on a camera. However, in the spherical case you would have a blurry photo since the sphere would be larger than the depth of field of the optics/laser. Moreover, when one qubit is read out in this spherical geometry, its emitted fluorescent light has a very high probability of hitting another ion and accidentally reading it out as well (i.e. large crosstalk). So single ion readout (and quantum error correction!) are near impossible in this geometry without crosstalk. For comparison, the linear geometry has none of these problems and is very easy to read out with low crosstalk.
Nonetheless you are on the right track, in principle circular ion traps (not spherical) are a good idea and there are people in the field exploring that.

Could a “disco ball” be a good geometry for trapped ion quantum computers?


StackExchange API for people search on StackOverflow

Question: I was trying to search people in StackOverflow using the StackExchange APIs. Is there a way to search people by the tags they have associated with there profile. Like LinkedIn API allows searching for "Java Programming" giving back people in 1st 2nd degree connection with Java or Programming in there profile.
Answer: You can give it try..

/tags/{tags}/topusers
/tags/{tags}/top-answerers
/tags/{tags}/top-askers

Not sure if API endpoint still available with V2.2.


switch to x server window using alt tab program switcher

Question: For x server (Cygwin X server hosted on windows platform) the alt-tab program switcher does not work. The x server window (in my case gvim) does not show up in the list of windows when using alt-tab. Although the window is present in the taskbar at the bottom of the screen. Any help is highly appreciated.
Answer: If you start XWin with the -keyhook option, alt-tab will work. See the XWin(1) manpage. You can do this by creating the file /etc/X11/xinit/xserverrc with the following contents:
exec X :0 -keyhook


Strategies for nice vectors

Question: I'm investigating about possible strategies to get nice vectors, discarding bold fonts. To make it simple, I'm not very happy with traditional ways of writing vectors with arrows. Please compare $\overrightarrow{OM}$, $\overrightarrow{M}$, $\vec{OM}$ and $\vec{M}$. My preference goes to the $\vec{M}$ command which is not suited for longer names like $\vec{OM}$ and I do not like \overrightarrow. I would be interested in possibles ways to overcome these problems. Thank you
Comment: One thought is that `$\vec{M}$` and `$\vec{OM}$` are pretty different things: the first is the vector called 'M', the second the (nameless) vector from point O to point M (as you of course know).  You'd want those to be formatted in very different ways, so the fact that `$\vec{OM}$` doesn't work is neither surprising nor undesirable.
Comment: I think you are right but sometimes, you still need something like $\vec{OM}$ and none of the existing solutions look fine to me.
Answer: The esvect package allows to choose between several vector arrows:

Width (according to the argument) and size (according to the context, normal, subscripts, subsubscripts) are automatically calculated.
Comment: I stop using TeX's way of denoting vectors and \renewcommand\vec{\mathbold}. This is the case where everybody else is assuming bold letters the standard format for vectors.
Comment: but how do you make the difference between a vector written in a basis and a vector as an object? (same difference as a tensor and its respective matrix in a specific basis?)
Answer: Just be sure to use your own newcommand as a wrapper, so that you can then make any changes you like.  I recently changed the textbook I wrote for my class from bold-face notation to over-arrow notation.  (I did this because the students preferred it.  If, this year, the students prefer bold-face, I can go back to that in a jiffy.)
Comment: this is a very good advice. Most of latex works should be thought this way.
Answer: This has long been a bugbear for me as well. While boldface is standard in my field, and good enough for almost all of my work, there have always been occasions when I wished for extensible and well-placed harpoons as well.
Prompted by your question, I've looked once more, and found a potential solution: I submit for your approval the harpoon package.
Comment: this package seems a bit old.

Strategies for nice vectors


Aquamacs and IDLWAVE

Question: I've just installed the new Aquamacs 2.0 in my Mac Os X 10.6.3 and I'm
an happy user of IDLWAVE on Aquamacs for programming in IDL.
Unfortunately I run into a problem which I can't understand.
I used in my configuration file to put the following
    (setq idlwave-surround-by-blank t)
for the beautiful space around operator.
This used to work till
Aquamacs 2.0 preview b3 (third beta release)
from that on, it stops to work and every time I type an operator (the
same for '=' '<' '>' etc) I got the following message
<code>Debugger entered--Lisp error: (void-variable idlwave-expand-equal)
  (lambda nil (interactive) (self-insert-command 1) idlwave-expand- equal -1 -1)()
  call-interactively((lambda nil (interactive) (self-insert-command 1)
idlwave-expand-equal -1 -1) nil nil)
</code>
Any help is welcommed
Answer: There was a bug introduced in Emacs 23.2.  Try a newer version of the package or move to a version of Emacs based on 23.3 or 23.1.

Aquamacs and IDLWAVE


Can't hold left button on touchpad and drag in 12.04 and no right click

Question: After updating to 12.04, I cannot use the mouse buttons.  I have a work around to be able to drag with the touchpad alone, also to use the touchpad for right click.  I would however like to use the actual buttons to drag and drop and actually right click.  I have an Acer Aspire S3 series laptop. Does anyone know why this may be happening and how I can fix it?
Answer: This is the fix for right click on a touchpad with no buttons i.e. a clickpad!!
create a folder:
/etc/X11/xorg.conf.d/

the create a file called 51.synaptics.conf
open gedit in root and save the file in the above folder with the following text in the file:
Section "InputClass"
Identifier "Default clickpad buttons"
MatchDriver "synaptics"
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
EndSection

log out and then log back in again and you will have right click
if you do not have a clickpad and have actual buttons see what your touchpad is capable off:
xinput -list (to find the name of your touchpad)

then:
xinput list-props "SynPS/2 Synaptics TouchPad" | grep Capabilities

you should see some output like this:
Synaptics Capabillities (295):  1, 0, 0, 1, 1, 1, 1

the numbers mean the following:
(1) device has a physical left button
(0) device does not have a physical middle button
(0) device does not have a physical right button
(1) device does support two-finger detection
(1) device does support three-finger detection
(1) device can configure vertical resolution
(1) device can configure horizontal resolution

if I was you I would take a look at the my comment and follow the link, this should help solve your problem.
Comment: https://wiki.archlinux.org/index.php/Touchpad_Synaptics
Comment: I do have hard buttons.  when I pull up the xinput, the device is actually "ETPS/2 Elantech Touchpad" and it pulls up as 1,0,1,1,1,1,1.  When I click the right button, it gives the same effect as a left click.
Comment: if you have an acer aspire S3 then you have what is called in linux terms as a clickpad. see if clickpad is enabled by using the "synclient -l" command. if its set to Clickpad = 0, then it is not recognising that you have a clickpad. Change this by issuing the following command: synclient Clickpad=1. to make it permanent you can add the command to the startup applications.
Comment: outside of the above you could try the following: sudo modprobe -r psmouse && sudo modprobe psmouse proto=imps. then to make it permanent: sudo gedit /etc/modprobe.d/options then add options psmouse proto=imps. once you have done this save the file and then issue the following command: sudo update-grub: http://www.linlap.com/wiki/acer+aspire+s3
Comment: Note: i would always recommend using man synaptics and synclient to configure your touchpad as you have more flexibility for control and adjutsments.
Answer: If your touchpad is not recognised as a clickpad [linux term for a touchpad with soft button areas] you can use the following 51.synaptics.conf file:
Section "InputClass"
Identifier "Default clickpad buttons"
MatchDriver "synaptics"
Option "ClickPad"         "true"
Option "EmulateMidButtonTime" "0"
Option "SoftButtonAreas"  "50% 0 82% 0 0 0 0 0"
EndSection

Comment: This finally worked for me!


Error is .htaccess - Redirects not working and its very strange

Question: My site has just recently launched a bunch of new product pages, replacing the old ones.
Here is an example of a redirect I want. One going from the old page...redirecting to the new page. I checked Google webmaster and said that there was a not found error for the second link.
Redirect 301 /it-infrastructure.html http://www.example.com/managed-enterprise-services.html

Redirect 301 /it-infrastructure http://www.example.com/managed-enterprise-services.html

So the .html one is redirecting fine...but the one without the .html extension is not. BUT...what's strange is that I have a bunch of redirects from the past that don't use the html ext and work fine, such as:
Redirect 301 /broadsoft-web-portal http://www.example.com/broadsoft-web-portal.html

and
Redirect 301 /business-voip http://www.example.com/business-voip.html

Anyone have any idea why this isn't working?
Comment: Is there a reason you have spaces between the `//` and `www` in your last two Redirect lines?
Answer: Add to your .htaccess this line
Options -MultiViews


mCustom neo4django relationship with properties dont remove objects

Question: Am using neo4j 1.9.4, django 1.5 and neo4django 1.8 (recently cloned from github).
I have this:
FRIENDSHIP_REQUESTS_RELATIONS_TYPE = 'wants_to_be_friend_of'
sended_friendship_requests = models.Relationship('self', rel_type=FRIENDSHIP_REQUESTS_RELATIONS_TYPE, related_single=True)

And in a piece of code inside a method on the same model class:
self.node.relationships.create(self.FRIENDSHIP_REQUESTS_RELATIONS_TYPE, target_profile.node, status = self.NEW, created_at=timezone.now(), msg=msg)

The only thing a little "rare" here is the access to neo4j-rest-client for supply the properties on relationships like Matt Luongo suggest in his answer here
Then when i try:
 profile.sended_friendship_requests.remove(self)

Nothing happens. No erros, no warnings, but the relationships remains the same. Personaly i dont think this is related to these because the version of neo4django that i am using have fixed it. I suspect i will have to access neo4j-rest-client again in orden to delete the relationship but am new in almost all these tecnologies and dont know how to proceed.
I had been tracing the remove method inside RelationshipInstance class from /usr/local/lib/python2.7/dist-packages/neo4django-0.1.8-py2.7.egg/neo4django/db/models/relationships.py and everything goes perfect. The method is running completly in the way i assume had designed but then i wonder what could be happen here. At the end the method just do this:
...
    self._removed.append(candidate_rels.pop(0))
...
self._remove_from_cache(obj)

Apparently this is all you need to remove a relationship but for me it is not working. I am needing some help here!
Answer: Newbie mistake. Solved adding:
    profile.save()
Shame on me!


Passing through security at US airport with a brand new laptop

Question: If I am passing through US airport security with a brand new unopened laptop box.  Will I have to take it out of the box or will letting it ride as a box be sufficient?
Comment: Depends on the TSA officer running the scanner.
Comment: This (undated) article http://traveltips.usatoday.com/can-electronic-equipment-plane-102238.html says that you should be prepared to demonstrate to a TSA that your laptop can be powered up. [In passing, note that flights **to** to the US from some destinations have this requirement as well]. Some brand new machines may take some time to boot/prepare and I suppose in extreme cases might not be directly bootable.
Answer: Unfortunately, it will depend on the screeners at your lane that day.
The point of removing the laptop and/or checkpoint friendly bags is to separate the laptop from other clutter in the bag.  Original packaging is easy for the machine to see through so if the screener is satisfied, they may let it pass.
For the lowest probability of the original packaging being opened, put it in checked baggage.
Answer: The official page has this to say:

Starting Aug. 16, 2008 TSA began to allow laptops to remain in bags meeting "checkpoint friendly" guidelines.

I copied the criterias and numbered them:

Your laptop bag has a designated laptop-only section that you can lay flat on the X-ray belt
There are no metal snaps, zippers or buckles inside, underneath or on-top of the laptop-only section
There are no pockets on the inside or outside of the laptop-only section
There is nothing in the laptop compartment other than the laptop
You have completely unfolded your bag so that there is nothing above or below the laptop-only section, allowing the bag to lie flat on the X-ray belt

Only 2. is surely OK the rest is at least debatable.
Especially 5. can be problematic: if your box is like
with the charger on top of the laptop, that's a violation of the rules. It also can look like this:

which can possibly be sold as adhering these rules if the foamed part of the box is a "designated laptop-only section".
Ultimately, however:

If a Transportation Security Officer finds that the bag does not present a clear and distinct image of the laptop separate from the rest of the bag, the laptop must be screened separately.

So it's possible if the box gives them a nice look they will let it pass. However, at the end of the day:

Given TSA's use of random screening protocols, TSA reserves the right to re-screen any bag or laptop regardless of the design of the bag.

You can never know. This is the TSA.
Answer: You'll definitely have to take it out since they're scanning it through but I think you can send it in the checked in baggage without opening it.
Comment: I've had new unopened electronics in my checked and carryon luggage and it was not opened. You just have to take it out and put it in a separate bin.
Comment: Do you have any references to this?  I know what the rules say, but they are intended more for the electronics that are already "in use"
Answer: I've done it, but before the era of laptops-out.  Had they wanted it opened I would have had no problem with that--I was intending to open it anyway.  I had told my machine to synchronize a bunch of stuff onto the laptop and woke up to find a major electronic failure of some kind.  I spent as much time as I could burning relevant stuff to CDs, then stopped by the electronics store on the way to the airport, grabbed the most likely looking prospect and the memory to upgrade it and headed on to the airport.  Once we were at the gate I unpacked the laptop and put it in my laptop bag.


PIC processors - assembly vs. C?

Question: I have heard that earlier PICs that are quite tiny are to be programmed using assembly and not C. Later PICs had hardware instructions to make them easy to be programmed via C language. However, I am not sure what this means.
Comment: Early PICs had a stack that was only 3 addresses deep. That would be problematic for C  code.
Comment: Your title is inconsistent with the text of your question.  Could you edit your title for accuracy and brevity, please?
Comment: Pretty much all the 8-bit PICs have a machine architecture that is a poor fit to C -- a truly ANSI compliant C compiler, used with code written good portable style, compiles code that is slow and bulky compared to the "almost C" implementations that I've used on the PIC.  The biggest bummers were the Harvard architecture (which puts constants and variables in fundamentally different memory spaces) and, on some chips, the weird stack limitations.  It's lovely for itty bitty programs in assembly, though.
Comment: So which PICs are the ones that must be programmed in assembly only, does C compatibility start with PIC10?
Comment: Early PIC's like the 17C756 that I used for years were often programmed in assembler, with a custom version of 'C' available. Often custom versions of C had little or no stack management or floating-point math.
Comment: To this day any PIC MPU can be programmed in assembler or C, but now with a megabyte of flash memory or more, C is much faster, plus being able to import driver libraries.
Comment: I wouldn't want to try programming the 16F series in C.
Comment: Since small PICs cost quite little today, I guess no one uses the PICs that are so tiny that we must write assembly code to be able to run them efficiently? I mean why even bother to get them? A microcontroller costing few tens of cents can be quite powerful in this age.
Comment: There's not much reason to use such limited cores today. Main reason why people still use PIC is unwillingness to learn new things. Current consumption, cost, DIP packages... all of these arguments went obsolete over 10 years ago. You can get a Cortex M that draws way less mA/MIPS for the same price as a PIC. Some are even available in THR DIP for those hobbyists who can neither solder nor afford a $10 eval board...
Answer: Define earlier.
The 16F series is from the earlier days (20 years ago?) Back then we would write MP-ASM and C code, then I found a C++ compiler for it too.
It all depends on what you are writing and how efficient the compiler is for it.  The Hi-Tech C compiler, which I believe Microchip purchased (the whole company), was pretty darned efficient, and made really small hex files.
True, you can make smaller code by hand writing assembly, but then how long do you want to spend writing code vs. making the project as a whole?
Comment: Plus: Writing C is usually easier to "reason about", i.e. when reading through it, you're more likely to spot logical errors in "business logic" (might be different for things like setting up hardware control registers). "Reasoning about your code" is what is necessary to write better software, in the end.
Comment: 20 years ago? I have a PIC 16 series datasheet from about 1983, when they were still a General Instruments product.
Comment: @BrianDrummond Ha! Well we can all date ourselves. I think I was in about 3rd grade then. :)
Comment: Since small PICs cost quite little, I guess no one uses the PICs that are so tiny that we must write assembly code to be able to run them efficiently?
Answer: Your title does not quite agree with the text, so I'll refer to the text.
It was possible to use a cross compiler even on the earliest PICs, but there were significant compromises in the C you could write and in the generated code. Hitech C (now owned by Microchip) supported even the tiniest PIC, as does XC8. The paged memory, limited stack and so on made it difficult to write much in the way of serious C. There are usually ways around some of the limitations but it's typically an unpleasant choice. Particularly when you have only 16 bytes of RAM total and only 256 words of program memory total (PIC10F200).
They added registers and some instructions to better support C, such as the ability to read constants from program memory.
I would put it a bit differently, you could either write, at most, a fairly trivial program in C for the tiniest micro (perhaps with a lot of head scratching to try to work around the compiler limitations) or you could use it as it was intended, in assembler and do some fairly interesting and complex things (though the lack of interrupts in the smaller PICs was a pain).
Later micros such PIC24 series were designed with the compiler requirements in mind so that emitted code could be reasonably efficient and come closer to standard C.
Comment: Since small PICs cost quite little, I guess no one uses the PICs that are so tiny that we must write assembly code to be able to run them efficiently?
Comment: Billions and billions of small PICs and their brethren from suppliers such as Elan, Holtek and many others are sold each year for appliances, automotive, power tools and so on. The work it takes the programmers or engineers is a negligible consideration if they can save a few pennies per unit.
Answer:
Later PICs had hardware instructions to make them easy to be
programmed via C language. However, I am not sure what this means.

Early PICs had limited memory and were quite slow so the code had to be small, efficient, and not waste precious RAM. It is possible to get close to assembler efficiency with a well-tuned C compiler by using various tricks, but with a small program it's often easier to just write it in assembler. With larger programs the advantages of C  come to the fore (source code more compact and easier to read, more portable, better type checking, less chance of making silly errors etc.).
However early PICs also had hardware limitations that made it difficult for C compilers to produce good code, including:-

Strictly 8 bit operation. The default integer size in C is normally at least 16 bits. Using 16 bit integers wasted precious RAM and dramatically slowed down processing. C's poor handling of integer overflow can make working in 8 bits tricky.

No user stack. The stack on early PICs was only used for storing return addresses
and could not be accessed by program code. This made local variables and re-entrant functions harder to implement and less efficient.

Very small return stack. Some early PICs only had a 2 level stack. This severely limited the ability to nest subroutines.

Limitation on code placement. Some PICs could only call subroutines in even 256 byte ROM pages (eg. on PIC12C508 all subroutines have to be placed in the first 256 bytes of ROM).

No interrupts. Some PICs had to do everything by polling, so cycle counting was the norm for getting accurate timing. This is not compatible with C, which cannot guarantee that code will use any specific number of cycles.

Inefficient access to data in ROM. The 'Table Read' instruction reads a data byte by doing a 'computed goto' to a 'RET N' instruction that returns the immediate data byte embedded in the instruction. This is slow, wastes ROM space and cannot cross a 256 byte page boundary.

Paged RAM and I/O register access. PIC12/16 chips often have several banks because there is not enough memory space for linear addressing. The compiler may not be able to determine which bank is currently selected at run time, so has to insert more bank switching instructions than might be necessary with carefully crafted machine code.
Comment: Since small PICs cost quite little, I guess no one uses the PICs that are so tiny that we must write assembly code to be able to run them efficiently?
Comment: The smallest PICs (eg. PIC10F322 in SOT23-6) still are worth programming in assembly code. Even larger chips sometimes need asm for best efficiency. I used an ATmega1284 as a ROM emulator that needed the entire 16k RAM for data. Programed it in asm with all variables stored in registers and no stack, and it had just enough speed to do the job. This replaced a more expensive design that used several chips, so it was worth the effort.
Answer: I've never heard that (and it doesn't sound like it makes sense to me - every turing-complete instruction set can be a target of C), but what I guess is that:
C is a language that uses functions that you can call, and return from. To enable that, many architectures use what is called a stack, ie. kind of a pile of memory on which every function can put their "working scrapbook" on top, and when it returns, it just "walks back" the height of the stack.
This can be very elegantly be used if your hardware has a special stack pointer register.
Another thing (I don't know whether that is the case for any of the multiple PIC instruction sets) is adding hardware "call the function at address X" instructions, which inherently saves the position from which we jumped into the function (typically on top of the stack), and another "return" instruction, which jumps back to the saved location.
Again, neither is strictly necessary for a machine to be a target for C! For example, WASI (the instruction set/ABI for the WASM virtual machine that allows your browser to run bytecode instead of just JavaScript) doesn't have a "proper" stack. And C is definitely among the languages you can run on that.
However, if you don't have a hardware stack, and only very few registers, and limited RAM, then you're getting into trouble very quickly, because you simply always need to hold on to more data than you can. You might not be able to fit a C program that software-builds all the needed functionality into the program memory of one of the smallest PICs, either.
Comment: Since small PICs cost quite little, I guess no one uses the PICs that are so tiny that we must write assembly code to be able to run them efficiently?
Answer: There are the older pics then the pic32 which is completely unrelated and is a mips core.  Naturally MIPS C compilers exist.  The older pics had C compilers as well, but the instruction sets are not very C friendly, and compiled code has some bulk to it (in general).  End of the day it is up to you but a C compiler for the older pic12's etc never made sense to me, the best optimizer in the world would still be inefficient and the platform is so limited.
Or you can certainly take the path of compile first then hand tune the asm where desired/needed.

PIC processors - assembly vs. C?


Trying to install Emacs in one directory in Ubuntu

Question: I am absolutely new to Linux ans Ubuntu. I am switching to Linux because I really want to use all the features in Emacs, Win version has many non-working features. However, I cannot figure out how to install the newest Emacs release into a single directory such as $Home/Emacs so that I can access the init, the .el files, etc. directly. I like everything in one place. Is this possible in Ubuntu? I have tried several installation instructions but it does not create a single directory nor does it give me a quick launch icon I can use. Any help appreciated!
Answer: The best option is to install emacs from the package manager. It might not be the very latest one, but it will be close (in 16.10 it is version 24.5). If you open the terminal and then run the following command emacs will be installed
<code>sudo apt install emacs
</code>
All of the init files will be in ~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el (where ~/ stands for the home directory i.e. $HOME/)
https://www.emacswiki.org/emacs/InitFile
This is the standard way to install programs on linux. Configuration files for a lot of programs are stored in ~/. You will have the best experience if you install emacs, and any other programs you want that are available via this method, using the package manager apt.


RDP logout using bat file

Question: Using Windows 7. When I RDP to a PC I'd like to be able to logout of the session without the screen reverting to a Ctrl+Alt+Del Login screen.
The PC's in question are kiosks running Chrome in full screen 'Kiosk Mode'. So it's important they revert back to the normal browser home page.
I have successfully managed to do logout by creating a .bat file in C:\bat called rdp_logout.bat. The contents of this .bat file are below;
tscon.exe 2 /dest:console
EXIT

I then created a shortcut on my desktop to this .bat file (send to > desktop). I changed the permissions of the .bat file to run as administrator. When I want to logout of the 'Kiosk' I do the following;

Open the browser in Kiosk Mode
WinKey+R
Input "cmd"
Enter

This opens the command prompt (on top of) the browser with the following displayed;
C:\Users\Administrator
I then type;
cd Desktop
"rdp_logout.bat - Shortcut.lnk"
This does run, and logs me out. However whenever I RDP to the same PC immediately afterwards, the command prompt window is still showing 'on top' of the browser.
What do I need to change in order to hide the command window after the .bat files has ran?
Comment: Don't open a command prompt, just press windows + R and run this directly: %userprofile%\desktop\rdp_logout.bat
Answer: Try this.
Timeout 2
taskill /f /cmd.exe

to the end of you .bat
This will Kill the window to kill itself after you log out. The Pause is so it does not kill it before your logout command runs.
Answer: You don't have to create bat file, just:

Win+R
paste your command: tscon.exe 2 /dest:console
hit enter

RDP logout using bat file


GLM to normal distribution?

Question: I have a dataset with four variables: Body temperature (dependent variable), air temperature, substrate temperature, precipitation and relative humidity (independent variables). To test whether my independent variables affect body temperature, I thought about using a GLM, but I'm uncertain whether this would be the most appropriate procedure, since body temperature has a normal distribution. Would this really be a barrier to using a GLM in this situation? Would a Mixed Model be more appropriate?
Comment: If you have an identity link and Gaussian family, there's no reason to use GLM instead of ordinary multiple regression; you gain nothing. If you have some other link there's (clearly) a point to a GLM. However, examining the distribution of the response is pointless since the assumptions don't relate to the marginal distribution of the response; that might look like anything. Further, looking at your data to choose your assumptions for the same data you checked impacts the properties of your inferences. What about the situation made you consider a mixed model?
Comment: In no sense is a Gaussian identity link GLM "more elegant"; it's *exactly the same model as multiple linear regression*. I don't understand your comment about normal distributions in relation to a mixed model.
Comment: I thought about using a Mixed Model, once maybe in this case there might not be a restriction to study a dependent variable with normal distribution. I did consider using an ordinary multiple regression, but I got the impression that a GLM would be a more "elegant" solution.
Comment: Sorry for my confusion, I see it doesn't really make sense to relate normal distributions and Mixed Models the way I was thinking. But now I've come to understand more clearly with @Robert Long's explanation! =)
Answer: There seems to be some confusion.
A generalised linear model is indicated when the response variable is a count (or otherwise discreet variable), or if it is continuous, when the conditional distribution of the response (that is, conditional on the covariates), follows a non-normal distribution. A common example is where the response assumes values only within a interval - eg, probabilities, which are bounded by [0, 1] are commonly modelled using beta regression, since the beta distribution is defined on the interval [0, 1]. In general, for a generalised linear model we have:
$$
\text{link}\bigg(\mathbb E\big[Y\vert X\big]\bigg) = X\beta
$$
where $X$ is the model matrix of fixed effects and $\beta$ is the parameter vector.
So, if the link function is the identity function, and the response distribution is the normal distribution, this is exactly the same as multivariable linear regression:
$$
\mathbb E \big[Y\vert X\big] = X\beta
$$
In your case, you appear to have a continuous response, so unless there is some underlying thoery that suggests a GLM such as a gamma model is indicated, I would start with a multivariable linear regression. In R, we would have:
lm(body_temp ~ air_temp + substrate_temp + precip + rel_hum, data = mydata)

[Of course you may want to allow for nonlinearities by fitting interactions and/or nonlinear terms, as indicated by the underlying theory]
A mixed model is also mentioned. This would be indicated when there are repeated measures, or some other kind of clustering, when observation within one cluster are more similar to each other than observations within different clusters. In such a situation we often fit random intercepts to account for this. A model with fixed effects, and random effects, is known as a mixed model.

GLM to normal distribution?


T, T+1, T+2 trading modes

Question: Why are there different settlements modes T, T+1, T+2? why can't everything be settlement "today" T0? I understand what the difference is, but I don't understand why people did this and in what situations one mode can be useful, unlike others?
Answer: The differences in settlement cycles between the various asset classes exist mainly due to historical reasons.
The trading, clearing, and settlement of stocks, bonds, futures, options, and other derivatives has evolved fairly independently over several decades.
You may remember that settlement for stocks was shortened from T+3 to T+2 in 2017. So why can't it be done on T+0? Mainly because of the necessary checks and balances to make sure it's done correctly, which can't be done faster currently.

Q: If the industry managed a move to shortened settlement from T+5 to T+3, and then T+3 to T+2, why can't the industry likewise make a move to T+1 or T+0?

MM: Today, DTC and NSCC can process trades with shortened settlements based on client request. Although DTCC's current infrastructure supports T+1 and limited T+0 settlement cycles, market behavior, legacy infrastructure and operational processes at client firms make it difficult to accelerate further without a lengthy coordinated industry effort. Forcing a wholesale move by the industry would not be easy, that's why we're exploring this digital accelerated settlement service as an optional service. It could introduce optimized settlement processes and accelerate settlement to T+0, while retaining the core benefits of DTC's centralized netting and risk management. One important key thing to note is that this service would not force operational or technical change, nor would it cause fragmentation the clearance and settlement ecosystem.

https://www.tradersmagazine.com/departments/clearing/moving-settlement-processes-to-t0/
Comment: What are the general costs if all trades take place instantly online?
Comment: @RoyalGoose this is a fairly broad question that needs to be addressed separately. Suffice it to say that just because something can be done instantaneously online doesn't mean it happens magically or is cheap, as it still involves a lot of people and IT infrastructure. Online shopping would be another example.
Answer: I believe you're thinking about the "settle" date.
When you actually "get the money".
Say we absolutely agree contractually that you will sell me a house for $x, and we do that today at 11:13AM.
The deal is done and legally binding.
However it will only be "settled" - so, you will literally have the money in your account, and I will be in the house - in perhaps three days.
Similarly, any trade whatsoever you do on the markets, will take some time to "settle" (usually about 2 days).
(There is no relationship at all to futures or options.  Note that if you happen to make a trade involving futures or options (or bonds or anything else), that trade also will take a day or two to settle.)
It's fully explained in many articles, here's a clear one: https://www.investopedia.com/ask/answers/what-do-t1-t2-and-t3-mean/
Comment: Options and treasuries settle in T=1.  It's kind of self evident that if they could settle equities  in T+0 or T+1  then they would already  be doing so.
Comment: Thanks for the answer. I roughly understand what is at stake, I am wondering why this division exists. Why can't all settlements be done today (T0)?
Comment: @RoyalGoose I believe simply because for the same reason it literally takes time for a check to clear.  I mean the money has to be transferred around between a few different banks and accounts.
Comment: You could ask that question separately.

T, T+1, T+2 trading modes


Could a heated coil with a sail to catch the hot air,(in theory) produce enough or any thrust to lift a drone? in the way a hot air balloon works

Question: This is an approach I am thinking of for an alternative to ion propulsion for making silent drones.
Comment: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
Answer: In theory, but a sail will be far less efficient than a balloon. A hot air balloon works because the hot air in the balloon is less dense than the surrounding air, making the balloon buoyant. As long as there is a density difference, the balloon rises.
Using a sail instead of a balloon uses the updraft of the rising heated air, but then just throws away most of the benefit by letting the heated air escape. You'd be better off containing the heated air and continuing to benefit from the density difference, rather than getting a one-time impulse. By using a sail instead of a balloon, the heated air is still rising in the same way, it's just not carrying you along with it for the most part. It's a bit like winding up a rubber band helicopter propeller, and then just letting go of it shortly after takeoff - you expended energy to make something rise, but then aren't actually using it to lift your payload.
Comment: A heated coil would be limited by the battery. Since it is joule heating hypothetically you could pretty efficiently convert the energy of a battery to heat, but batteries compared to burning fuel have limited energy density.   Gasoline for example has about 100 times the energy density of a lithium battery. But as @Nuclear Hoagie points out, once you are buoyant it might help. Although you would probably be at the mercy of the wind.


VNC to Linux from MAC OSx up/down arrow keys not working

Question: up/down array keys are not being sent to VNC from my MAC OS. left/right arrow keys are fine.
Answer: Inside Ubuntu settings, go to hardware/keyboard. Open up the keyboard icon. It will contain Shortcuts. Disable shortcuts under the section Windows... there is a super up and super down. disable then and the arrow keys will map to either usual role.


How to add a shortcut to an individual iBook file to the iPad home screen?

Question: I'm currently in the process of creating an iBook for use within my company. Some of the people who will be using it aren't particularly tech-savvy, so I want to make it as easy as possible for them to access the iBook directly from the home screen of their iPads. I don't want them to have to worry about navigating into the iBooks app at all. Is there any way to save the individual iBook file directly to the home screen?
Answer:
Host your epub somewhere, preferable direct link to open the epub itself. Eg. https://epub-samples.googlecode.com/files/mymedia_lite-20130621.epub
From the address bar, select the Share icon and add it to Home Screen, rename it to your epub name.

When they open the URL, they'll see options to open epub in supported app, with Open in iBooks on the right button.
The first time they open the epub, it'll be imported to iBooks, open them in iBooks. After that, choosing the same option will open the same epub, preventing duplicate.
Answer: You're mostly correct but the problem is that the home screen Web Clip (aka bookmark) will forever point to the URL. The user will always get asked whether they want to open in iBooks so it's a bit of a clunky solution if you ask me.
If it were me, I'd be considering the following options:

Deploy the content using an MDM like Airwatch, specifically its Content Locker feature. It also manages updates to content very well.
Publish your content online (in HTML) and deploy the icon pointing to your URL as a Web Clip app.
Publish your content officially as an iBook using Apple Xcode. Pretty high end solution though and will require an Apple developer account.


100% line height text in scaleable div

Question: I need to create a menu inside of a div that scales with the browser window. The text size adjusts depending on the size of the window (using fittext.js) and the outer DIV is always 15% of the height of the window. Since 100% line height doesn't work, what other options are there.
Also while I'm here what could be done to make the text links span 100% of the width of the containing DIV? (equal spacing between so the links cover the entire div)
jQuery options are fine if needed.
Here is a fiddle I made with an example of my code
HTML source

Welcome
About
Work
Contact

CSS source
#navigation {
width: 80%;
height: 15%;
position: fixed;
top: 5%;
left: 10%;
background: #ccc;
}
.nav_button {
height: 100%;
width: 20%;
position: relative;
display: inline-block;
text-align: center;
line-height: 100%;
}

Answer: $btn = $('.nav_button');
$btn.css('line-height', $btn.height() + 'px');

Works fine in your example :)
Comment: Thank for the tip
I edited that a bit to work with my site. I could be off with the script I made, but It seems to work

`function lineheight() {
 var nav = $('#navigation').height();
 $('.nav_button').css({
        'line-height': nav + 'px'
    });
}
lineheight ();
$(window).resize(lineheight);`
Comment: I'm afraid your definition of the resize event won't work... try this:
$(window).resize(function(){ lineheight(); });

100% line height text in scaleable div


How much do you get for publishing an article in the newspaper?

Question: It's for a story I was writing, and in the story, there's a section of the newspaper in which people can submit stories/poems/essays to, and good ones were chosen to get published on the newspaper. These people could get money for getting their work chosen and published. But I don't know how much they should get (how to calculate it? Like for example, 10 cents per word?), and do they just get paid, or do they need to sign a contract or something?
Comment: If you're considering a real newspaper, that actually offers this, they'll often make their rates available. Have you checked their submission guidelines? If this doesn't work, or you're using a fictional newspaper, just look into rates in general and base it off that.
Comment: You should ask the newspaper.
Comment: they don't have time to mind a nonimportant person  like me.
Answer: AFAIK, people usually don't get paid for that sort of thing.  It's like a letter to the editor.  The reward is getting your story/poem/essay in the paper.  The small amount of money that somebody would get paid for a one-time short submission isn't worth the newspaper's bother.
But, if it's a weekly contest, then the newspaper might want to increase interest by having a small monetary reward also.  However, whatever amount you choose could easily sound silly in 10 years, and would probably not translate well to other countries.  So, I'd suggest that your story's newspaper offer something to the winners like a one-month subscription, or a basket of groceries (sponsored by the page's advertiser, a local grocery store).
Note: This question seems familiar.
Answer: Freelancers (writers who aren't employees but get paid for writing assigned articles) get paid differently than contest winners, when a publication has solicited entries from the public.
Freelancers can get $1 or more a word from large publications for articles of 500 to 2,500 words, as a rough example; I've been paid that for articles requiring a week or more of reporting and writing.
Contest-type awards are usually less. In today's media market, a publication might pay a nominal amount -- $100, maybe $250 -- for things like poems and short essays. A big, national publication might pay more to winners of a high-profile contest, like $1 or $5 or $10 thousand even. But that would be for a big contest -- and very good writing.
The award for getting something published could also be nothing, or a token prize, like a framed copy of the article, a 1-year subscription or a gift card for $25. The pay would essentially be whatever the publication thinks it needs to offer to get enough good submissions.


"cosa sono i vantaggi" why "cosa" instead of "cose"

Question: As stated in the title, the question "What are the advantages" is translated into "cosa sono i vantaggi" even though "cosa" is singular for "things" and the plural should be "cose", as far as I am aware of.
Comment: Who translates that question like this? An Italian would say *Quali sono i vantaggi?* (if you are asking what the advantages are of a particular situation). With *(che) cosa sono i vantaggi?* you'd be asking about the notion itself of "*vantaggi*", as if you never heard of it.
Comment: Thanks, that makes things clear. There are two transkations. Tge default is :quali sono i vantaggi, while che cosa i vantaggi is an acceptable answer. Your comment makes it clear the difference between the two.
Answer: Cosa is (or, better, is used as) an interrogative pronoun, so it doesn't agree with the subject of the sentence in which it appears. So we say Cos'è un carciofo? ("What is an artichoke?"), Cos'è una penna? ("What is a pen?"), Cosa sono le Erinni? ("What are Erinyes?"), and so on.
Actually, the complete expression would be che cosa (literally, something like "which thing"). So one asks, more or less, "which thing is an artichoke?" and the like, independently of the gender of the thing asked about.
However, if you already know what a pen is, but are asking which out of a jumble of pencils, markers, and other similar stationery items is the pen, in Italian you'll ask qual è la penna?
For more about che, cosa, and che cosa, see a previous question.


How can I tell if the tub spout is screwed on or soldered behind the wall?

Question: How can I tell if the tub spout  copper tubing is screwed on or soldered behind the wall?
I removed the tub spout and now have a threaded copper pipe that is too short for the new spout. I would like to replace this spout with a longer threaded 1/2 pipe.
The pipe above, the shower arm, was threaded and easy to remove. The tub spout is covered with tile and I can't see in the hole to tell if it's threaded. Here are some pictures.  The one with the hole is from the shower arm. I am assuming the tub spout can be unscrewed, but don't want to damage the pipe if I am wrong.
Comment: Pics are not present.
Comment: Pic didn't take, but can you cut the existing and extend it? Or is it a brass nipple?
Comment: If you use pliers and gently try to turn you will know
Answer: Since the picture isn't here, yet:
If the pipe itself is thick-walled & threaded, it's likely red brass (not actually copper) and it will be threaded on the other end. Those pipes are the wrong size for soldered fittings.
If the pipe is thin-walled and has a threaded adapter soldered to the end, it's going to be soldered inside the wall.
Answer: Carefully examine the copper tube sticking out.
Are there any plier marks on it? If yes, then you know it was screwed in.
Not for faint hearted, use pliers and very gently try to turn the pipe. Mark it with marker to notice if it is turing.


Effect of positive inflation shock on the exchange rate

Question: How does a positive inflation shock affect the exchange rate? Does the exchange rate appreciate or depreciate? I am looking for an intuitive explanation.
Comment: It depreciates.
Answer: Before intuition. let's determine the outcome. By the Uncovered Interest Rate Parity
$$ i_t  = i^*_t - [s^e_{t+1 | t} - s_t] \tag{1}$$
where $i_t$ is domestic nominal interest rate, $i^*_t$ is "foreign" nominal interest rate, and $[s^e_{t+1} - s_t]$ is expected appreciation of domestic currency in percentage terms ($s$ is the natural logarithm of "foreign currency per unit of domestic currency" exchange rate).
The "Fisher equation" for the relation between real and nominal interest rate in expected inflation is
$$i_t = r_t + \pi^e_{t+1|t} \tag{2}$$
where  $r_t$ is domestic real interest rate, and $\pi^e_{t+1}$ is expected domestic inflation. Putting $(1)$ and $(2)$ side-by side we have
$$r_t + \pi^e_{t+1|t} = i^*_t - [s^e_{t+1|t} - s_t]$$
Assuming that there are no real effects by an inflation shock, and that the international economy couldn't care less (so also $i^*_t$ remains unaffected), using the change operator we have
$$\Delta \pi^e_{t+1|t} = \Delta (s_t-s^e_{t+1|t}) \tag{3}$$
where now the right-hand side represents "change in expected depreciation" of the domestic currency (note that the right hand side may be algebraically negative in which case it is "negative depreciation" = appreciation).
Now, it is reasonable to argue that expectations for tomorrow will take into account what happens today. Moreover, usually current inflation shocks either affect in the same direction expectations about future inflation, or not at all.
So an inflation shock happens in period $t$ which increases the left-hand side of $(3)$. Then so must also increase its right-hand: a domestic positive inflation shock increases expected depreciation of the domestic currency. In other words it creates expectation of currency devaluation. The currency may still be expected to appreciate, but less than before the inflation shock.
Mathematically this can come about in different ways but realistically one should expect that what will happen is that $s^e_{t+1|t}$ will go down, i.e. that the domestic currency will be expected to devalue.
The main intuition behind this comes if one realizes that, for the people abroad, domestic currency is just another product, that has a price. If due to inflation this "product" is worth less (because now it can buy less of utility-enhancing or productive goods), this should be reflected in its price, which is the domestic exchange rate $s$ (price of domestic currency measured in units of foreign currency), which should get lower.
This is the rationale also behind the closely linked "purchasing power parity". Of course, this is a highly stylized analysis and all sorts of real-world imperfections and rigidities will affect what will actually happen. But the tendency is the one described above.
Comment: I have posted another question here if you are willing to take a look: https://economics.stackexchange.com/questions/54999/solving-first-order-conditions-to-this-social-planners-problem
Answer: An inflation shock takes a few years to dissipate. In the short term, nominal exchange rates don't respond much to inflation shocks. In other words, short-run purchasing power parity doesn't hold.
In the long run, the higher inflation currency should, and more often than not actually does, depreciate.


If black absorbs light, then why did Africans evolve black skin? Wouldn't that make the heat worse?

Question: Wouldn't it have been more adaptive to develop light skin and so reflect incoming light?
Answer: First, I think you have things backwards.  Africans came first: lighter skin is an evolutionary adaption to living in more northerly climates.
Second, evolution works with what it has, not necessarily what's best.  Mammals had the genes for melanin production long, long before hominids came on the scene, so it's fairly easy to apply selection to increase or decrease melanin production in a population.  The classic example is the British peppered moth: https://en.wikipedia.org/wiki/Peppered_moth_evolution  (Note: I'm not clear whether the moth pigment is melanin or something else, but the principle holds.)
For a white blocking pigment (or transparent to visible light - think sunscreen) or a reflective skin to be evolved, we'd have to wait around until some mutation happened that would allow the body to produce the right sort of chemical.  AFAIK, mammals don't actually produce white pigments: white fur is due to the scattering of light in the absence of pigment.  (Just as snow is white.)  So animals in sunny climes might evolve white fur, but that makes the animal conspicuous.
Answer: Check out this page on skin color adaptation —

Nature has selected for people with darker skin in tropical latitudes, especially in nonforested regions, where ultraviolet radiation from the sun is usually the most intense.  Melanin acts as a protective biological shield against ultraviolet radiation.  By doing this, it helps to prevent sunburn damage that could result in DNA changes and, subsequently, several kinds of malignant skin cancers.


Upload and attach a file to an account or opportunity

Question: So I was wondering how I can attach a file to an account. Basically what we do is sell a product online that requires an agreement. When they buy the product, we generate a pdf of the agreement and mail it to them. What I would like to do is upload the pdf agreement and attach it to the corresponding opportunity or account. I am pretty sure this can be accomplished, but I don't see much documentation on it. I am using php and the API to create everything. Any one have any ideas?
Answer: You can just create an Attachment on the Account. It should work the same way as creating an object in Salesforce.
Some important considerations:

The API sends and receives the binary file attachment data encoded as a base64Binary data type. Prior to creating a record, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary (this conversion is usually handled for you by the SOAP client).
The create call restricts these files to a maximum size of 5 MB. For a file attached to a Solution, the limit is 1.5MB. The maximum email attachment size is 3 MB.
Comment: This worked perfectly for what I was trying to achieve. Thanks for the advice!
Answer: I would recommend using chatter files related to the record rather than attachments as chatter files have a number of features that attachments lack.
To upload a file and relate it to a record you use a feeditem with the following required fields.
<code>ContentData: base64 encoded file
ContentFileName: file name
ParentId: account/opportunity ID
Type: 'ContentPost'
</code>
Answer: I would like to recommend ready to use Salesforce Appexchange Native App Cloud Drop in order to store any number and size of files that can be associated with any salesforce object. Cloud Drop is one of a smart and excellent native app available which integrated Salesforce with Rackspace. Please check the following link for more information:
https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003IzEDEA0
Thanks
Anchal Garg
Comment: Can you explain the benefits of this over the default attachements, and how this can be API integrated ? Else this is pretty much advertising which usually gets removed.
Comment: Samuel ,As you know their are several limitation of salesforce default attachment : 1. Max size of attachment that can be associated with a particular sfdc record is 5 MB 2. Also the size of the uploaded file count against the salesforce file storage space (which seems to be costly if user needs to attach large no. of file.) So, A good solution for this issue would be use third party api(Rest) for saving file content there and making a record for that in salesforce for fetching the content of file .CloudDrop app is using same logic for uploading and downloading of the file to Rackspace server.


Errors when creating a TextElement from ArcObjects

Question: I am attempting to add some text in the layout view of ArcMap.   I'm using the following line for the TextElement that I've found online from numerous places including ArcObjects Library Reference.  Being new to ArcObjects, I'm not sure if I'm doing something wrong or if there is something else going on that I'm unaware of.
ITextElement textElement = new TextElementClass();

I'm receiving the following errors:
The type TextElementClass has no constructors defined
Interop type TextElementClass cannot be embedded.

Full Code:
protected override void OnClick()
    {
        IMxDocument mxDoc = ArcMap.Application.Document as IMxDocument;
        IMap map = mxDoc.FocusMap;
        IActiveView activeView = map as IActiveView;
        IPageLayout pageLayout = activeView as IPageLayout;

        if (activeView is IPageLayout)
        {
            IGraphicsContainer graphContainer = pageLayout as IGraphicsContainer;
            ITextElement textElement = new TextElementClass();
            textElement.Text = "Test";
            IElement element = textElement as IElement;
        }
        else
        {
            MessageBox.Show("This tool only functions in layout view");
        }
        activeView.Refresh();
    }

Comment: I'm using "ITextElement pTextElement = new TextElementClass();" without issue, so it must be somehow related to the config, license or assemblies.
Answer: Make sure that all the ESRI interop assemblies (ESRI.ArcGIS.*) your project references have the "Embed Interop Types" flag set to false.
You can do this by selecting the reference in the Visual Studio Solution Explorer window and changing the flag in the Properties window.


How do companies register ICO ticker

Question: For example Did bitcoin have to register "BTC" as their ticker if thats what they call it,the three letter symbol
Answer: For ERC-20 tokens, there's an optional symbol variable that can be defined in the token's contract.
The act of defining this is perhaps orthogonal to it being registered on, and displayed by, any particular site or exchange, but I imagine many sites will read these values directly from the token's contract.
Note that these aren't limited to 3 letters, as per "Is there length limits on Token Symbols?".
(Also see: What happens if a token symbol has four letters?)
Running the counting script from one of those previous answers again, for fun, gives:
Asset symbols of length 1: 3
Asset symbols of length 2: 41
Asset symbols of length 3: 924
Asset symbols of length 4: 387
Asset symbols of length 5: 151
Asset symbols of length 6: 17
Asset symbols of length 7: 4
Asset symbols of length 8: 3
Asset symbols of length 9: 1

So most symbols are 3 characters long. This is all assets, not just ERC-20 tokens. Data is from CoinMarketCap.
Answer: First, they do not "register" a ticker. There is no copyright on the ticker "BTC" or "ETH".
This has become standard because it is called like this in Satoshi and Vitalik original whitepaper.
When creating an ERC20 token with Ethereum for example, it is good practice to specify a name and a symbol for your token.
Taken from the official token documentation:
contract TokenERC20 {
    // Public variables of the token
    string public name;
    string public symbol;
    uint8 public decimals = 18;
    // 18 decimals is the strongly suggested default, avoid changing it
    uint256 public totalSupply;
As it is in your on interest to avoid confusion for your future investors,  you need to take a name that will not be confused with another existing coin, but nothing stop me from calling my new token "BTC".
Most of the ICO creators aim to deliver their coin on exchanges platform. Those are centralized, hence you need to register or ask them specifically to label your coin as "XXX". Exchanges will not accept a new coin that has the same name as an other,  as it would be too confusing for their user and for them.
So no, you have no limitation when naming your coin, but it is in everyone best interest to give it an unused or distinctive name.
Comment: Shaun Ferns, please, mark this answer as correct if you agree.
Answer: Ethereum is a decentralized network. There is no centralized registration authority for ticker symbols.
Some places you can register your ticker

Parity wallet
EtherScan
MetaMask
MyEtherWallet
Various exchanges
Comment: You can not register anything in Blockchain. Ticker (symbol) is optional parameter, nothing more. The only thing, which distinguish particular token is ADDRESS.

How do companies register ICO ticker


How to find false negative rate when there are multiple alternate Hypothesis?

Question: I am testing for  zero Pearson correlation and my null hypothesis is  $\rho=0$. It is easy to find Type 1 error or rejection of Null hypothesis and hence the false positive rate.
However, my alternate hypothesis is $\rho \neq 0$. How to find Type 2 error or the false negative rate, when I have multiple alternate hypotheses? Am I clear in my question? Please throw me some in sights. Thanks
Answer: 1 - Probability of type 2 error is power. So talking about type 2 error is same as talking about power. The power is calculated at fixed alternate hypothesis. For the fixed sample size, you can select several fixed alternative hypotheses, and calculate the power. Then draw a plot with hypotheses on x-axis and power on y-axis, you will get a power curve. In your case, you can take $\phi = 0.0 \text { to 1 by } 0.05$ 21 alternative hypotheses, and calculate 21 powers, then get the power curve. Here is example of power curve. http://www.stat.wisc.edu/~st571-1/HW10.pdf
For your question:  How to find Type 2 error or the false negative rate, when I have multiple alternate hypotheses? The answer is you need take the alternative hypothesis one by one, and calculate the power one by one. Given there are infinite number of alternative hypotheses, the power curve is needed.


Well-defined map from $G/N$ to $G$ that is a homomorphsim?

Question: Let $G$ be a group, and let $N$ be a normal subgroup of $G$. I know that the natural projection homomorphism is a surjective homomorphism from $G$ onto $G/N$. If I choose a particular representative, say $xN$ and map every element in the coset $xN$ of $N$ in $G$ to $x$, will I get a "well-defined" homomorphism from $G$ to $G$ with kernel $N$. (Obviously this map is not onto, unless $N$ is trivial.)
Comment: When $G\approx N\times H$, then yes, there is a map. Basically, whenever there is, in any coset, a _distinguished_ representative, you may be in luck.
Comment: The [theorem of Schur-Zassenhaus](https://en.wikipedia.org/wiki/Schur%E2%80%93Zassenhaus_theorem) is a classic result giving a sufficient condition for such a homomorphism to exist: when the order $|N|$ of the normal subgroup $N$ is *coprime* to its index $|G/N|$.
Answer: $N$ need not be the identity subgroup. There is another important situation where this occurs:
Suppose $G = HN$, where $N \lhd G$, and $H \cap N = \{e\}$.
Then $G/N = HN/N \cong H/(H \cap N) \cong H$.
In this situation, for any $g \in G$, we have a unique representation $g = hn$, for some $h \in H$, and $n \in N$, so we can define:
$\phi: G/N \to G$ by $\phi(gN) = \phi(hnN) = \phi(hN) = h$ (verify this is well-defined!).
Note that if $\pi: G \to G/N$ is the map $g \mapsto gN$, we have:
$\pi \circ \phi = \text{id}_{G/N}$. With such a happy state of affairs, $G$ is said to be right-split (over $N$), or: the semi-direct product of $N$ by $H$. In the special case that $H \lhd G$ as well, we obtain the direct product, as mentioned in an earlier comment.
Note that if we take $N = \{e\}$, which is always normal in $G$, we get the situation described by Eoin, which admittedly is not very interesting.
Comment: In this construction one can replace the complement $H$ of $N$ by any of its conjugates (but not all possible complements have to be conjugated).
Answer: The answer is no; the reason is that, in general, you can't define a group homomorphism from $G/N$ to $G$ sending $xN$ to $x$. Consider the following example: $G=\{\pm1,\pm{i},\pm{j},\pm{k}\}$, the quaternion group, and $N=\{\pm1,\pm{i}\}$. Thus $G/N=\{1N,jN\}$, and you send $jN$ (of order 2) to $j$ (of order 4), a contradiction.
On the other hand, you may send $jN$ in $G/N$, to $-1$, in $G$, the only element of $G$ of order 2; in this case you have a group endomorphism $f$ of $G$ sending $j$ to $-1$, and $i$ to 1. Hence $\mathrm{Ker}(f)=\{\pm1,\pm{i}\}=N$; so a related interesting question could be: Is every normal subgroup $N$ of a group $G$ the kernel of an endomorphism?
Comment: Additionally: If you take $N=\{\pm 1\}$ then $G$ does not even have any subgroup isomorphic to $G/N$.
Comment: Perfect, you are right! Which is interesting is that $G$ is not a non-trivial semidirect product!
Answer: No if $N$ anything other than just the identity. In that case you would have two distinct elements of $G$ such that $g_1 N=g_2 N$ and you would thus have $f(g_1 N)=f(g_2 N)=g_1=g_2$, a contradiction.
However, and I'm not sure if this bares any relevance to you, but in the proof of the first isomorphism theorem, we see that if $N$ is the kernel of a surjective homomorphism $\phi: G\to \bar G$, then there is an isomorphism $\pi:G/N\to \bar G$ defined by $\pi (gN)=\phi(g)$ for all $gN\in G/N$.


Issue building Libtorch Rust Projects

Question: Apologies if this isn't the best place to post this.
I'm trying to learn how to do Pytorch in Rust. Have previous experience with Libtorch in C++ and Pytorch in Python. I'm running into issues setting up the installation, and am unsure of why.
I first tried downloading current Libtorch, and then attempting to link against it.  am using these Rust bindings https://github.com/LaurentMazare/tch-rs .
I added the following to my .bashrc file:
     export LIBTORCH=/home/me/libtorch/
     export LIBTORCH_INCLUDE=/home/me/libtorch/
     export LIBTORCH_LIB=/home/me/libtorch/

I then added the dependency to my Cargo.toml, and cargo build works
However, cargo run results in
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/torch_test`
target/debug/torch_test: error while loading shared libraries: libtorch_cpu.so: cannot open shared object file: No such file or directory

Upon looking under the /home/me/libtorch/lib/ there is indeed a libtorch_cpu.so file.
Any idea why its failing? I'm rather frustrated because I'm very eager to try a Rust ML project idea, but can't.
I also have Pytorch installed, and tried doing (in .bashrc)
export LIBTORCH_USE_PYTORCH=1

so it would use the Pytorch install instead of the manually downloaded Libtorch files, but puzzlingly, it gives the same error? Either it's only ever looking into the Python libraries or linking is generally messed up.
Updated my Fedora installation, conda and other dependencies etc. Have the latest cargo installed.
Adding /home/me/libtorch/lib/ to LD_LIBRARY_PATH variable did do something, but now I get the error
target/debug/torch_test: symbol lookup error: target/debug/torch_test: undefined symbol: _ZN3c106detail23torchInternalAssertFailEPKcS2_jS2_RKSs

Comment: cargo build is only building the rust wrapper. If libtorch is not installed in your system. It will not affect build. However cargo run will look for the actual libtorch library, which is not found. Can try unsetting the `LIBTORCH` environment variable and installing the rust package fresh. This will download the libtorch library and build it.
Answer: Solved, thanks to a comment on Reddit and browsing Pytorch forums.
Solution was to:

Modify LD_LIBRARY_PATH as the README for the project says at the bottom.
Switch to the non-ABI version of Libtorch. I use the ABI version for other C++ projects, but here the non-ABI version was needed. Using the ABI version would lead to successful linking, but then produce undefined symbol errors.

Issue building Libtorch Rust Projects


What does CDM mean?

Question: What does CDM mean? I've got it as buff on my equipment, but there is no reference as far as I know in the game to it. There is nothing in the list on Wikipedia that fits either (assuming I can't increase the Cold Dark Matter).
Comment: i assume it could be mean Critical DaMage. But it would be nice if someone find a valid source to a valid answer
Comment: @Serverfrog Well, it does fit. And there is no other relic that increases the critical damage, while it is a stat that can be increased in other rpgs.
Answer: I found here on Google Docs a big text where stand many things about the game. Another Source is this which is a thread on the official Forum.
And I found what CDM is.
CDM is Critical Damage according the Following list i found on this guide
<code>Gold relics (advance crafted)
Helmet:  = +7% P.RES
Ring:     = M.RED +7
Belt:      = +10% RSL
Boots:    = 8% Dodge
Gloves:  =  10% crit
Amulet  =  7% M.RES
Chest    =  8% armor
Pants    =  P.RES red 7
Weapon =  3% dmg
Offhand= 8% hit

Blue Relics (smelted/found)
Helmet:  = +0.2% hp regen a round in combat
Ring:     = +10% more gold
Belt:      = +5% hp
Boots:    = +5% xp
Gloves:  =  7% Critical damage CDM
Amulet  =  3% drop rate
Chest    =  2% CC (crowd control aka stuns/freeze so on)
Pants    = 2% attacker damage return
Weapon =  2% absorb (life steal)
Offhand= +8 true damage
</code>

What does CDM mean?


Durga Mata is the power of both the Sat and Asat?

Question: The word of Durga Saptashati is that Durga Mata is the power of both the Sat(Real) and the A-sat (non-existent).
But the unreal does not exist. So how she is power of unreal?
Comment: She is everything and anything. Real = Her, Unreal = Her Maya.
Answer: Unreal means "Maya" and maya does exist.

"maayaa.n tu prakR^iti.n vidyaanmaayina.n cha maheshvaram.h | tasyavayavabhuutaistu vyaapta.n sarvamida.n jagat.h |" (Swetasvatara Upanishad 4:10) "Know then Prakriti (nature) is Mâyâ (art/illusion), and the Maheshwara the Mâyin (maker); the whole world is filled with what are his members (forms)".

Maa Durga as the Shakti of Sat.:

अहं पञ्चभूतान्यपञ्चभूतानि । अहमखिलं जगत् । वेदोऽहमवेदोऽहम् । विद्याहमविद्याहम् । अजाहमनजाहम् । अधश्चोर्ध्वं च तिर्यक्चाहम् । अहं रुद्रेभिर्वसुभिश्चराम्यहमादित्यैरुत विश्वदेवैः । अहं मित्रावरुणावुभौ बिभर्म्यहमिन्द्राग्नी अहमश्विनावुभौ । अहं सोमं त्वष्टारं पूषणं भगं दधाम्यहम् । विष्णुमुरुक्रमं ब्रह्माणमुत प्रजापतिं दधामि । अहं दधामि द्रविणं हविष्मते सुप्राव्ये यजमानाय सुन्वते॥३-६॥
3-6. I am the five elements as also what is different from them. I am the entire world. I am the Veda as well as what is different from it. I am the unborn; I am the born. Below and above and around am I. I move with Rudras and Vasus, with Adityas and Visvedevas. Mitra and Varuna, Indra and Agni, I support, and the two Asvins. I uphold Soma, Tvastir, Pusan and Bhaga, The wide-stepping Vishnu, Brahma, Prajapati. To the zealous sacrificer offering oblation And pressing the Soma-juice do I grant wealth; I am the state, the Bringer of Wealth; Above it all, place I its protector. (Devi Upanishad).

As Maa Durga liberates the atman from this sansara of maya, she is also the shakti of A-Sat.:

"prapadye sharaNa.n devii.n du.ndurge durita.n hara | taa.n durgaa.n durgamaa.n devii.n duraachaaravighaatiniim.h | namaami bhavabhiito.aha.n sa.nsaaraarNavataariNiim.h |" (Devi Upanishad 1:28) "Beyond Her is nothing; renowned is she as Durga; feared of life,I bow to Durga, Bulwark against all sins; the Pilot who Steers me across the sea of worldly life".

I hope this clarifies your queries.


Rule-based Territory assignments are being created when there are no territory rules

Question: In an existing instance, we have a territory hierarchy with no rules, just manual assignments. Since the Summer '13 release we are seeing AccountShare records with RowCause of 'Territory' which indicates a rule-based assignment. Additionally, we are unable to delete these records
The following code produces an INVALID_CROSS_REFERENCE_KEY error, even though all of the related records exist. While the error originates in a larger piece of code, I've extracted the following to reproduce the problem. The instance has Territory Management enabled and the code was working prior to the :Summer '13 update.
<code>for (AccountShare s : [Select Id, UserOrGroupId, RowCause, IsDeleted From AccountShare Where AccountId = '001U0000006UFZE']) {
    if (s.RowCause == 'Territory') {
        System.debug(s.Id + ': ' + s.RowCause + ' - IsDelted: ' + s.IsDeleted);
        for (Group g : [Select RelatedId From Group Where Id = :s.UserOrGroupId]) {
            System.debug('Territory is ' + g.RelatedId);
            for (Territory t : [Select Name From Territory Where Id = :g.RelatedId]) {
                System.debug('Territory is ' + t.Name);
            }
        }
        try {
            delete s;
        } catch (Exception ex) {
            System.debug('Deletion failed: ' + ex.getMessage());
        }
    }
}
</code>

USER_DEBUG [13]|DEBUG|Deletion failed: Delete failed. First exception
  on row 0 with id 00rU0000004yvbMIAQ; first error:
  INVALID_CROSS_REFERENCE_KEY, id does not exist: []
Answer: Abrar, here (http://sforcecloud.blogspot.fr/2013/05/territory-management-in-apex.html) seems to assert that it is not possible to delete Territory AccountShares with APEX (DML).


What is meant by "secret" in the Guhyagarbha tantra?

Question: I am starting to explore Luminous Essence: A Guide to the Guhyagarbha Tantra, where in the first section on the "title", says:

All phenomena of saṃsāra and nirvāṇa are inseparable with the enlightened state; they dwell primordially as the eternal wheel
of adornment of enlightened body, speech, and mind. Th is is what is meant
by the term secret. It is referred to as such because those who are obscured and
unfit to receive these teachings do not realize this, although it is genuinely
realized by the profound wisdom mind of the victorious ones. It is secret in
the sense that the three bodies go unrecognized due to the veils of temporary
obscurations, though they are present within. Moreover, the profound views
that reveal this presence are not known through one's own power, nor are
they pointed out by another, and, even if they are, they are hard to realize. In
this way, they are hidden. Furthermore, unless this special view, meditation,
and conduct are concealed from those who are unfit to receive these teachings, the seal of secrecy will be broken and they will be misconstrued. Therefore, it is not taught to such individuals and must be concealed. In this way,
it is secret, both in the sense of being unseen and concealed.

(bold added by me)
What are they saying exactly here? Why must it be concealed exactly? What is at risk?
To me it sounds like they are saying, trying to describe the teachings of this Tantra to someone who is not ready or capable of hearing it will just make it even harder for them to understand its meaning, because they will not realize what you are saying and it will harden them in their own stance in disbelief of the teachings. So it is better to just keep it a secret and let them discover it for themselves.
I could be way off, I know very little about Tibetan Buddhism so far, but I would like to explore what they are saying and not sure the full impact of what they mean when they talk about "the secret".
Answer: It's all right there in the text in plain sight:

All phenomena of saṃsāra and nirvāṇa are inseparable with the enlightened state.

If you don't understand it, that's a sure sign that you need more study and practice.
If I were to explain it to you in a way that would "reveal the secret", all I would achieve is you going astray to the lower worlds.


Residue Theorem and Homologous to zero

Question: This is a very basic question and I couldn't find it posted yet but here it goes;
The Residue Theorem states that if $f:G\to \mathbb{C}$ is analytic on $G$- a region and $f$ has isolated singularities $b_1,...,b_k$ and $\gamma$ is homologous to 0, then $$\displaystyle\int_{\gamma}f=2\pi i\sum_1^kn(\gamma;b_s)\mathrm{Res}(f;b_s).$$
To my understanding, if $\gamma$ "wraps" around an isolated singularity, $b_i$, (say 1 time), then $\gamma$ would not be homologous to 0 since $n(\gamma;b_i)=1$ in this case ($b_i\in \mathbb{C}-G$). I think I need a better picture of the situation in this case. Thank you for your help!
Answer: To be homologous to zero, means we can deform the closed curve $\gamma$ to a point while staying in the region.

Pretend $H$ is a singularity. Then $C_2$ can't be shrunk to a point instead it can be shrunk only to the boundary of $H$. If we shrink $C_2$ to a point (homologous to zero), we leave the region $K$. However, $C_1$ encircles no deleted neighborhoods or singularities so $C_1$ is homologous to zero.
Now the winding number is simply the number of times you circle the singularity.

Cauchy theorem states:
If $f(z)$ is analytic in $\Omega$, then
$$
\int_{\gamma}f(z)dz = 0\tag{1}
$$
for every cycle $\gamma$ which is homologous to zero in $\Omega$.
Residue theorem:
Let $f(z)$ be analytic except for isolated singularities $z_i$ in a region $\Omega$. Then
$$
\frac{1}{2i\pi}\int_{\gamma}f(z)dz = \sum_in(\gamma,i)\operatorname{Res}\{f(z);z_i\}\tag{2}
$$
for any cycle $\gamma$ which is homologous to zero in $\Omega$ and does not pass through and of the points $z_i$.
If every path in the residue theorem was homologous to zero, then equation $(1)$ would be equation $(2)$ and every integral you face would be zero. The winding number around the singularities will be $\pm 1$ depending on the direction of travel. If the curve is similar to $C_1$ in the image above, it is homologous to zero and we have equation $(1)$.
Comment: This answer confuses homologous with homotopic!
Comment: So in this picture, $C_2$ is not homologous to 0? Then for the Residue Theorem we couldn't use a curve such as $C_2$ but can only consider curves that are either $C_1$ or curves that wrap around $H$ in such a way so that the winding number is 0, correct?
Comment: Can you deform $C_2$ to a point while staying in $K$? You can use the residue theorem when the contour is around a singularity. The residue theorem is $$\int_Cf(z)dz=2\pi i\sum\text{Res}$$ if there are no singularities the curve is homologous to zero so the right hand side is zero.
Comment: Well in this picture the answer is no, you can't deform $C_2$ to a single point and still stay in $K$.
Comment: So this was my question; we don't consider such curves as $C_2$ for the residue theorem because it does not satisfy the hypothesis. Correct?
Comment: This is the heart of my question I think. If $C_2$ is NOT homologous to 0, then it does not satisfy the hypothesis because in order to use the Residue Theorem, we need a curve that is homologous to 0. I apologize if I'm being stupid here...
Answer: Your idea is mistaken. The fact that a curve has nonzero winding number around a single point gives no information about it being nullhomolgous. Rather, you want the following

A curve $\gamma$ in an open set $G$ of the plane is nullhomologous in $G$ if and only if $W(\gamma,z)=0$ for every $z\notin G$.

You can state the residue theorem as follows

Let $G$ be a region and $f:G\to \Bbb C$ be analytic except possibly at a finite set $A\subset G$. Let $\gamma:[0,1]\to G$ be a curve nullhomologous in $G$. Then $$\frac{1}{2\pi i}\int_\gamma f=\sum_{z\in A}W(\gamma,z)R(f,z)$$
Comment: I think I'm a little confused here. In this example $f=\frac{1}{z^2}$ and so is analytic on $\mathbb{C}-\{0\}$. Then if our contour is just the unit circle traversed once around this point, shouldn't the winding number be 1?
Comment: @user23793 I had a typo, sorry. We're not calculating winding numbers *alone*, but also residues. The formula is $$\sum R(f,z)W(\gamma,z)$$ over certain points $z$. In this case $W(\gamma,0)=1$ but $R(f,0)=0$. At any rate, I have updated my answer to address your misconception.
Comment: In your definition of being homologous to zero, if there is a point outside of $G $ that isn't so that the winding number is zero, then wouldn't that mean the the curve does not meet the hypothesis of the RT?
Comment: @PedroTamaroff: Are you familiar with a version of the theorem that allows the set $A$ to be discrete (i.e. in particular infinite)? How would one show that a for closed curve which is nullhomologous only a finite number of elements of $A$ have a nonzero winding number?
Comment: @el_tenedor Informally, note that the region determined by the curve is compact, so the set $A$ can only meet it in finitely many points, else it will accumulate.

Residue Theorem and Homologous to zero


In a finite field there exists an irreducible polynomial of degree at least $n$ for $n \in \mathbb{N}$

Question: This question already has an answer here, but I'm looking for a solution that doesn't use field extensions. It's relatively easy to find a polynomial without zeros for every $n$ but as far as I know this doesn't imply that the polynomial is irreducible (maybe in a finite field it does?). Thank you for your answers.
Answer: Hint use Euclid's idea: consider $1+p_1\cdots p_k$ where the $p_i$ are all irreducibles of degree $< n$
Comment: @InsertNameHere It's not clear how your question is related to the above answer. Do you understand the answer?  There are many prior answers that discuss formal vs. functional polynomials, e.g. [here.](https://math.stackexchange.com/a/25030/242)
Comment: If two polynomials have different values for every element in the field, does this imply they can't be the same polynomial? If so the answer follows quickly.
Comment: OK, never mind, don't have an answer.
Answer: Let $F$ be a finite field of characteristic $p$ and let $n\in\Bbb{N}$. Let $k$ be an integer coprime to $p$. Then the polynomial $x^k+1$ is separable over $F$, so it is a product of distinct irreducible factors. For any degree $d$ there are only finitely many (irreducible) polynomials of degree $d$ with coefficients in $F$, so for sufficiently large values of $k$ it must have an irreducible factor of degree $n$.


Rear drum brakes will not release

Question: I have a 2010 GMC Canyon. When you first start up and put the vehicle in gear the breaks will not release.if you accelerate then it will pop and release. This will happen the first two or three times you start but gets better as the vehicle warms up. I also noticed that it started happening when it got colder outside. this week it has warmed up to 73 and it had all but stopped. As soon as it got cold again it started back. I have ordered new cylinders for the rear and am planning to put them on this weekend. Not sure if it will help but it sounds like they are sticking out maybe. Anyone have any ideas before I try that?
Comment: do you regularly use the park brake? Is it the park brake or the service brake that is sticking?
Answer: It may be that your brake shoes are too close to the contact area. Does your handbrake click at least 4 times before it grips tight? If not, then you can adjust the shoes to allow more clicks on the handbrake. Metal contracts slightly when it's cold, so this may in fact be the case.
Another thing that usually happens is that the mechanism within the brakes rusts. I've had great success spraying mine with brake cleaner, then WD40 and finally applying some grease to the moving parts (obviously not ON the actual contact areas). You may want to have a look at how the handbrake cable operates the rear brakes and make sure they release properly. Again, some brake cleaner, WD40 and grease will help.
Answer: The rear brake adjusment on most vehicles includes a bi-metal, heat sensitive arrangement which prevents the brakes being adjusted once they become hot operationally. You need to make sure this arrangement on your vehicle is working properly. The way it works is that when the brakes are cold the brakes are able to adjust up. When the brakes are hot, the drum expands to a greater diameter which would allow the brakes to over adjust whilst hot. The bi-metal arrangement will prevent over adjustment whilst the brakes are hot. If the bi-metal is not working, the brakes will over adjust whilst hot and when the brake drums cool and contract they will bind onto the shoes.

Rear drum brakes will not release


Should my headphones literally be vibrating from bass?

Question: I'm doing some work in Logic, and right now I'm messing around with some bass. I've gotten to a point where my headphones actually vibrate somewhat, like a tiny massage on the sides of my head.. Is that harmful toward me or the headphones?
Answer: In general, you should be very careful how loud you listen to music, both through headphones and through speakers, so you do not damage your hearing.  You should be listening at the lowest level that still allows you to hear what you need to.  Listening at higher volumes for short periods will allow you to better hear the nuances of the music, but should be kept to an absolute minimum.
If the headphones are vibrating with the bass, they are probably really good at reproducing the lower frequencies.  If you are not hearing any distortion, you are probably not damaging the headphones, but it is still possible that the excess vibrations will cause damage over time.
In general, when in doubt, turn it down a bit.
Comment: This is a good answer, but I have an image in my head of a little old man with headphones, screaming "get off my lawn!" Old-style, "hi-fi" headphones.