How can I fix a sticky polarizing filter?

Question: I took a gamble and bought a used B+W Circular Polarizer off eBay. The filter looks great but the adjusting ring is a little bit sticky. Is there some way to lubricate this?
Comment: Are you sure it's a B+W? There are fakes that are of lesser quality. In any event, CPLs will degrade over time from wear and tear, poor handling, etc. I would be reluctant to try and lubricate as you could get the lubricant in between and it might damage the coatings.
Answer:
Use some Isopropyl alcohol with a cotton swab around the threads. This will help clean them and evaporates without residue. (Safer than water.)
Check the roundness of the filter. Perhaps it's sticking because it's out of round?
You can lubricate with a bit of silicone grease or lithium grease. Both are non-reactive. Only use a very little bit! Start with a quarter of what you think you might need. It's easy to add a little bit more but frustrating to clean up after over-application.
Answer: SEWING MACHINE OIL (get at fabric store like JoAnne Fabrics)
I have 3 B+W CPL filters (purchased from B&H so pretty sure not fakes) and after a few years all became stiff.  I sent one back to B+W and they replaced it for free but then a couple of years later it too was stiff.
What I finally did was to use a drop (no more) of sewing machine oil on the seam between the two moving parts.  This was a year ago and so far I've had no problem with stiffness or any negative impact on optics.
Hold the filter vertically and put no more than a drop on the seam between the two moving parts.  Then hold one side and turn the other, always going in the same direction, to distribute the oil around the entire trace where the two parts rub against each other.  You'll have to go around maybe 20 or more times to get the lubricant distributed all the way around.  Wipe off any excess oil from metal edges.  During entire process make sure that no oil gets on the glass surfaces
Answer: My B+W circular polarizer seized up while sitting in the box. Imagine. Being essentially useless I figured I'd risk putting a drop of oil on the seam between the two disks. I used as small a drop of 3 in 1 oil as I could, and immediately wiped off the excess. I turned the parts of the polarizer a few times and it's now like new. It worked perfectly. I was careful not to let any oil get down between the 2 glass discs.
Answer: I reached out to Schneider Optics that owns B+W, and here is the official response:
Kevin Cruse  wrote:
<code>Suggestions follow:

As the polarizer ring can not be taken apart, lubrication may help, but is
most likely temporary.  Exercise care for the following reasons:
> a syringe is needed to add the lubricant to the very small slot around the
  rotating ring, or, you can try to get a little fine machine oil between the
  holder using 1-2 drops over the tip of a pin, and then turn several times.
> there is a risk of getting lubricant on the filter glass, which can be
  difficult to clean.
> too much lubricant may also lead to oil reaching the lens.

We suggest the use of a fine machine oil, such as Starrett.
Schneider assumes no responsibility for results achieved.

BR, Kevin.

Kevin Cruse
Customer Service
Schneider Optics, Inc.
285 Oser Ave.
Hauppauge, NY 11788
</code>
Answer: What do you mean with sticky?
I had a Hoya HD circular polarizer that fell apart - I got it back together but it was too lose then and it was exchanged under warranty... so, a little bit on filter design.
Your filter consists of an outer as well as inner piece- these have both got a "grove", the inner piece on the outside, the other piece on the inside.
The connection between the inner an outer piece is made by a brass ring with a bit cut out - so you place the ring in the inner component, squeeze together gently and lower into the other ring, it will spring back and lock the pieces in place.
To keep the filter moving smoothly, the inner ring is lubricated - if you lose the grease, the filter will become loose and may for example incur sideways movement (this is what I ended up with on the Hoya when I got it back together.)
However because of the application of grease, there will be some stickyness in the system as well - on the other hand it keeps the filter in place and prevent accidental movement.
So, if your filter moves smoothly and is only a bit stiff to move, I would assume it is in perfect working condition.
If it does not move smoothly it could be dirt, dents etc.
Having said that: High end filters are actually a bit stiffer than cheaper filters when it comes to turning them.
Comment: Did you forget the part about cleaning? Otherwise, you're not answering the question.
Comment: 2nd Itai - I assume you (DetlevCM) down-voted my answer, then didnt actually answer it yourself.
Comment: @Itai Read again? I am saying that if it is just a bit stiff then it is normal. Given that "sticky" isn't defined more closely it can just be that the OP didn't expect the filter to be stiffer. And apart from cleaning the glass, there is no way you can clean that actual "turning mechanism" itself. If you wash out any grease you end up with a wobbly filter.
Comment: No I did not downvote... I thought you just skipped and could have added something about it. I normally downvote when I think an answer is providing wrong information. Nothing you said qualifies :)
Answer: I would give it a bath in distilled water (leave it in for a while), including turning it under water, this will remove any crud.
Normal tap water would be OK too.
see how it is after drying, if its still a bit sticky, a very small drop of machine oil would help.
Comment: I would not immerse any components in water if there can be water retained in them for a start. Add to that, the mechanism on the filter is greased - while water shouldn't wash it out, you don't want a grease/water emulsion.
Comment: I would disagree with the use of normal tap water.  The coatings on the circular polariser may be affected by tap water especially if it is "hard" water (ie, with higher chalk content).   I'd even be somewhat against distilled water as a circ/pl rotates and therefore has a mechanism that I wouldn't necessarily want water - even distilled - getting into.
Comment: the "mechanism" is purely metal-on-metal, even if there is plastic/rubber in there, its never going to be damaged by water, assuming its not mild steel (rust) which a retaining ring may be.

Tap water would be OK briefly, but not for a soak. As long as its dried out thoroughly after the soaking (would recommend an air duster to blow liquid out, and a warm rest for a few days.
Comment: That's why you let it dry out........................ AS I STATED......... Whoever down-voted my answer: lets see your answers then?????? HOW ARE YOU GOING TO GET RID OF INGRAINED DIRT WITHOUT IMMERSING THE MECHANISM IN CLEANING FLUID????????????


Has anyone implemented a javascript UI framework, using an OO/prototype based style for writing code?

Question: I'm specifically looking for a framework written using a coding style that is using a prototype based OO style (that is, an OO style that relies on cloning rather than subclassing when instantiating objects). Has/is anyone writing such a framework?
Answer: Use the dhtml library reference to find the source code for projects like dynapi or activewidgets, which were written prior to the current trends.


Detecting 220vac with optocoupler and microcontroller on lines that have capacitive coupling voltages

Question: I'm a hobbyist, trying to instrument my heating system so that I can control a three position valve. I have an ESP8266 integrated with a DRV8825 stepper motor controller, and a  no-name Chinese 220vac mains detection module with three independent channels. On the bench, everything works perfectly, and I can read the state of 220vac signals that I connect to the detection module, and drive the stepper motor appropriately. Unfortunately, when connected to the actual heating system, I find that the wires I wish to monitor (which run around my house before reaching the heating system) have capacitively coupled voltages on them (up to about 20vac) that cause the detection module to give false positive readings. Rerouting the wires to reduce the coupling voltages isn't possible (they're mostly buried in walls), so I'm looking for any suggestions on how to overcome those false positive readings in the detection module; I've reverse engineered the circuit of one channel in the detection module, see below, and would appreciate any help:
Comment: Can you add a dummy load so that the capacitive coupling does not matter?
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Answer: You need to reduce the sensitivity of the mains detection module. This can be done by attaching a resistor across C1.
If we assume that the zener is dropping the voltage to 5V and that the opto coupler is drawing 20ma a value of 1k will divert 5ma. Those assumptions may not be correct and you may need to experiment with the resistor value but it is a starting point.
Comment: Just a quick follow-up. This answer by @RoyC solved the problem perfectly. It transpires that a 6K2 ohm resistor is perfect for removing the false positives while still giving good registration of the true positives (so far, at least!). Many thanks for the assistance everyone!
Comment: Thanks Roy, that's exactly the kind of help I was hoping for. The voltage actually doesn't seem to be limited by the zener. I'm only seeing around 2.75vdc at the zener when the lines are in the off state, and 3.05vdc when there is 220vac applied to them. But I assume your method still stands - divert some current away from the optocoupler with a resistor until the false positives stop, but the real positives still register?
Comment: @RichardAppleby Assuming the LED and optoisolator are OK, the zener will be useless. But you also don't know which zener it is. Even if it is a 5V1 zener, it needs 5mA through it to reach 5.1V
Comment: Won't ``R4``, which is ``150K`` in series with one AC mains input wire, limit the available current through the diode bridge in the mains detection module to less than 20 mA?
Comment: I can at least confirm that the LED and optoisolator are apparently working :) The zener is an unknown, but I hope I can still use my measured voltages at the zener and apply ohms law to calculate resistances that will move current away from the optoisolator until it doesn't register the false positives...


Express spherical coordinates with different centers in terms of each other.

Question: Imagine that you have two spheres with a distance $R$ from one center to the other one. Now, it is well known how one would get the cartesian position vector of each point in sphere 1 by using spherical coordinates with the reference frame being the center of sphere 1. Now, I am looking for an expression that gives me a point written in spherical coordinates with reference point(center 1) in terms of spherical coordinates with reference point(center 2). In other words, I am looking for the relationship between the expression of a point in spherical coordinates with the reference center being the center of sphere number 1 in terms of spherical coordinates with reference to the center of sphere number 2
Comment: So, you can change spherical coordinates to Cartesian coordinates and reverse.  Can you change Cartesian coordinates relative to one centre to Cartesian coordinates relative to another centre, without rotation?
Comment: yeah, but this gives me just: $$r'\sin(\theta')\cos(\phi')=r\sin(\theta)\cos(\phi)+R,r'\sin(\theta')\sin(\phi')=r\sin(\theta)\sin(\phi), r'\cos(\theta')=r\cos(\theta).$$ How to proceed now? I think it is impossible to solve this
Answer: Let the origin of your first spherical coordinates be the origin of the first Cartesian system being used, and the origin of your second spherical coordinates be at $X_o, Y_o, Z_o$ in the same Cartesian system.
Use spherical polar coordinates, with $\phi$ being the azimuth angle in the $X-Y$ plane, and $\theta$ being the altitude angle measured from the $Z$-axis
Consider a point P, with coordinates $R_1,\phi_1, \theta_1$ in the first spherical coordinate system. Then point P has Cartesian coordinates in the first cartesian system  $X_1, Y_1, Z_1$ given by $$X_1=R_1\sin(\theta_1) \cos(\phi_1)$$ $$Y_1=R_1\sin(\theta_1)\sin(\phi_1)$$ $$Z_1=R_1\cos(\theta_1)$$
If we now consider a new Cartesian system parallel to the first and with origin at the origin of the second spherical system, the Cartesian coordinates of P in the second system would be$$X_2=X_1-X_0=R_1\sin(\theta_1) \cos(\phi_1)-X_0$$ $$Y_2=Y_1-Y_0=R_1\sin(\theta_1)\sin(\phi_1)-Y_0$$ $$Z_2=Z_1-Z_0=R_1\cos(\theta_1)-Z_0$$Finally, you can find the polar coordinates of P in the second spherical polar system, $R_2,\phi_2, \theta_2$:
$$R_2=\sqrt{X_2^2+Y_2^2+Z_2^2}$$ $$\phi_2=\arctan\frac{Y_2}{X_2}$$ $$\theta_2=\arccos\frac{Z_2}{R_2}$$


Can you Force grow Rhubarb in JULY?

Question: I picked all my Rhubarb in JULY, can I restart the plant to grow more leaves this year or will this kill the plant..?
Comment: It's better not to pick rhubarb after 21st of June (after the longest day), better let it grow for next year now.
Answer: I lived across the street from about a two acre rhubarb farm in northern IN. He would harvest it about 3 times into August. I think he said he stopped harvesting when the stores no longer wanted it because of low demand.
Answer: Rhubarb stops growing because of high temperature and/or lack of water. Unless you can control the temperature, attempting to extend the growing season probably won't work very well.
You can't continue to force it all the year round, because it needs a winter dormant period of at least 8 weeks at temperatures below 3C (37F).

Can you Force grow Rhubarb in JULY?


Are datasources other than Mongo available with Meteor?

Question: Can I use datasources other than Mongo with Meteor? If so, where can I find an example? I'm specifically looking for MySQL, Memcache, and/or Redis support.
Answer: At the moment, you'd have to build a 'driver' to attach any additional data sources to Meteor.
That said, they've defined a 'DDP' protocol, but if it's been documented, I haven't seen it on the web.
If you look at the existing code for the local_collection_driver, you may be able to get a sense of how to do it:

https://github.com/meteor/meteor/blob/master/packages/mongo-livedata/local_collection_driver.js
https://github.com/meteor/meteor/blob/master/packages/mongo-livedata/mongo_driver.js
Answer: In addition to DDP there is Meteor-SQL : https://github.com/drorm/meteor-sql
Which lets you connect to mysql databases quite nicely with meteor.
Answer: This is a DDP client written in python: Python DDP
I am going to be working with it in the next couple hours.
Over beers, I have heard that a spec for DDP is in the works.
Answer: Redis support is in development but already supports strings and hashes: https://groups.google.com/forum/#!topic/meteor-core/Jl5Jt739wdA


How to identify pinout of ATmega 2560 derivative board?

Question: My 3d printer, Creality Ender 4, has an ATmega 2560 chip based card, and I need to identify the number associated with a particular Pin.
I read, on the official Arduino website, a simple tutorial in which through a small led connected to two pins of the card, you wrote a code (sketch) that made it turn on, but you had to know the Pin number.
I would like to do this on my board, I unplug all cables (power supply, motors, etc.) and connect it to the PC via USB and from Arduino IDE, I execute the code, connecting the LED on the ground and on the signal (see image).
To identify the Pin number I thought I would go to exclusion, because I know all the PIN numers of the chip, until the LED lights up.
So I ask, is that correct? is there a chance of damaging the card? or is there a better method?
Thanks in advance
Comment: I'd suggest using a multimeter in continuity mode, on the **unpowered** board. Then check which MCU pin is connected to the pin you're looking at.
Comment: not correct because the microcontoller pins are not directly connected to peripheral plugs on the board ... yes, the board could be damaged ... it is better to obtain a schematic diagram or at least a table of pin functions
Comment: The 3dpinter/board manufacturer don't want give me the schematics, or just the number I need. On the internet there is very little info about the board...
Answer: Disconnect everything but the switch.
Run this:
<code>for each pin,
  set the pin to INPUT_PULLUP mode;
  do,
    read and print the pin number and pin state;
  until operator touches a key;
  read and discard the serial input;
end;
</code>
You do:

Each time a new pin number prints on the terminal,
toggle the switch a few times to confirm whether you are seeing the result of your actions.
If not, touch the spacebar to try the next pin #
else, you found it.


How can I get a two-display Radeon HD 3470 graphics setup working with Scientific Linux 6.5?

Question: I have Scientific Linux 6.5 (2.6.32-431.11.2.el6.x86_64) installed on a Dell OptiPlex 760 with a Radeon HD 3470 graphics card and two displays hooked up to it. I'm having difficulties setting resolutions appropriate for the displays and having the two displays not show the same screen. I am not an expert in Xorg configuration and I would appreciate some assistance in getting things working.
The PCI device listing (lspci | grep VGA) for the graphics card is as follows:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV620 PRO [Radeon HD 3470]

A more detailed listing (lspci -v -s $(lspci | awk '/VGA/{print $1}')) is as follows:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV620 PRO [Radeon HD 3470] (prog-if 00 [VGA controller])
    Subsystem: Dell Device 3243
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at d0000000 (64-bit, prefetchable) [size=256M]
    Memory at fe9f0000 (64-bit, non-prefetchable) [size=64K]
    I/O ports at dc00 [size=256]
    Expansion ROM at fea00000 [disabled] [size=128K]
    Capabilities: [50] Power Management version 3
    Capabilities: [58] Express Legacy Endpoint, MSI 00
    Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
    Kernel modules: radeon

The result of an xrandr query (xrandr -q) is as follows:
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 400, current 1280 x 1024, maximum 1280 x 1024
default connected 1280x1024+0+0 0mm x 0mm
   1280x1024       0.0*
   1152x864        0.0
   1024x768        0.0
   800x600         0.0
   640x480         0.0
   720x400         0.0

The modeline returned by the coordinated video timing utility cvt for the highest resolution capable by the main display (1680 x 1050) is as follows:
cvt 1680 1050
# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

If I try to use this with xrandr, I get the following:
xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
xrandr: Failed to get size of gamma for output default

The entire contents of the /etc/X11/xorg.conf file is as follows:
Section "Device"
    Identifier "Videocard0"
    Driver "vesa"
EndSection

I am not sure what to do next in order to get the appropriate resolutions set and to get the two displays working as two separate displays (as opposed to having the mirror behaviour).

UPDATE: I have attempted to install a driver for this graphics setup (fglrx64_p_i_c-188.8.131.52-1.x86_64.rpm), but have run into difficulties regarding undefined symbol noXfree86driextension. The ending contents of the file Xorg.0.log are as follows:
[    39.312] Initializing built-in extension XVideo
[    39.312] Initializing built-in extension XVideo-MotionCompensation
[    39.312] Initializing built-in extension SELinux
[    39.312] Initializing built-in extension XFree86-VidModeExtension
[    39.312] Initializing built-in extension XFree86-DGA
[    39.312] Initializing built-in extension XFree86-DRI
[    39.312] Initializing built-in extension DRI2
[    39.312] (II) "glx" will be loaded by default.
[    39.312] (II) LoadModule: "glx"
[    39.338] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[    39.358] (II) Module glx: vendor="Advanced Micro Devices, Inc."
[    39.358]     compiled for 6.9.0, module version = 1.0.0
[    39.365] Loading extension GLX
[    39.366] (II) LoadModule: "fglrx"
[    39.366] (II) Loading /usr/lib64/xorg/modules/drivers/fglrx_drv.so
[    39.520] (EE) Failed to load /usr/lib64/xorg/modules/drivers/fglrx_drv.so: /usr/lib64/xorg/modules/drivers/fglrx_drv.so: undefined symbol: noXFree86DRIExtension
[    39.520] (II) UnloadModule: "fglrx"
[    39.520] (II) Unloading fglrx
[    39.520] (EE) Failed to load module "fglrx" (loader failed, 7)
[    39.520] (EE) No drivers available.
[    39.520]
Fatal server error:
[    39.520] no screens found
[    39.520] (EE)
Please consult the Red Hat, Inc. support
     at https://www.redhat.com/apps/support/
 for help.
[    39.520] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    39.520] (EE)

Answer: AMD's proprietary driver is not supported on recent Linux Kernels like yours. It's best to get the open source radeon driver working. According to my research, the open source driver outperforms AMD's proprietary driver (a.k.a Catalyst/fglrx) and supports newer Kernel versions (read more).
I actually have the same  problem. See my question here: Getting radeon driver work
Comment: I had far better experience on recent Linux kernels with AMD cards.
Comment: @peterh This GPU is listed to be fully supported with the open source radeon driver. So it should work if we could get Linux to actually use this driver ...
Comment: @peterh If your AMD graphics card is working, which Kernel do you have? Do you have a `/etc/x11/xorg.conf` and if so, how does this file look like on your machine?
Comment: I tried it maybe a half year ago, with a then recent kernel. I can't remember the details. Maybe I had to download some ppa debs, too. Sorry I can't remember.
Comment: I just found something very interesting on [freebsd.org](https://wiki.freebsd.org/Graphics). >If you want to automatically load a video driver at boot time, we >recommend to do it from /etc/rc.conf:
>
>`kld_list="radeonkms"`


Max Memory setting AWS EC2

Question: we have move some SQL Server from Physical to AWS EC2 - my question is regarding Max Memory Setting fro SQL Server instance - I used to change the memory setting in Physical server giving some to OS and some to SQL Server but I am not sure for EC2 - do we have to use the same logic like 10-12% to OS and rest to SQL server in AWS Ec2  or we can keep it default .
Answer: If there is an OS you should leave some RAM for it.
EC2 is just a VM, so whatever you usually do for VM also applies for EC2.
Answer: If you are running on an instance that you manage the same rules would apply for memory as what you have been using on premises

Max Memory setting AWS EC2


Uv Unwrap not working

Question: After I unwrap in my current project file the texture never appears in rendered mode what could I be doing wrong? When I watch tutorials they unwrap and the texture automatically appears on the object you are working on.
Comment: Are you using Blender internal or Cycles? Can you edit your question and add images showing the UV/image editor and the material and texture setups on the properties panel?
Comment: Are you in *textured view* (Alt Z)? ([related](http://blender.stackexchange.com/questions/41778/images-that-i-mapped-to-an-object-wont-show-up-when-i-render-the-image))
Comment: when I check textured view the object is black and not what I have in the uv editor... I don't know what I am doing wrong I selected the image and unwrap the object yet nothing appears in rendered view or textured view.
Comment: In blender internal you have to switch display mode from multitexture to GLSL (under shading in in 3d-view) for the texture to appear in texture view. Don't know about cycles.
Comment: You need to create a material, then assign a texture to it that uses the UV mapping.
Answer: Mark out the seam on the mesh in the 3D View window.
Open a UV/Image Editor window.
Make sure the whole mesh is selected in the 3D view (press A key a couple of times if necessary).
Then select Unwrap (or press U while mouse is over 3D View).
You should then see the unwrapped model in the UV/Image editor window.

Uv Unwrap not working


Social Welfare Function (Pareto Efficiency)

Question: What is the Pareto efficiency compensation criterion?
Can you give me an example?
Answer: Pareto efficient compensation criterion is a criterion that allocates compensation such that it is impossible to reallocate resources such that one person can be made better off without making at least one other person worse off.
For example, if we have two people Joe and Paul who both start with 100kronas of income and we have 2 alternatives: Increase Joe's income by 10 by taking from Paul, or give both of them extra benefit of 10, then the second alternative is Pareto efficient but the first is not.


Person who is responsible for the political guests in the kingdom?

Question: I'm from Georgia, and I need help with a specific word. In one of the history books I found the word mestumre, and in a translation from Georgian it means a person who is responsible for the special guests or political guests of the royal court. I'm sure that the same position existed in European kingdoms. So the question is. what is the name of the person who is responsible for the "special" guests (royal, political, etc.)?
Answer: There are a number of different officials who might be responsible for handling different aspects of a visit to a monarch, but I believe you are referring to the court Master of Ceremonies.
In England (and later Britain and the UK), the position was Master of the Ceremonies, assisted by an Assistant Master of Ceremonies and by a Marshall of Ceremonies, responsible for the reception of visitors to the court; put more formally,

This Office was instituted by K. James I. for the more solemn and honourable reception of Ambassadors and Strangers of Quality, whom he introduces into the Presence.

Wikipedia has a list of office-holders from 1603.
I would caution, however, that a master of ceremonies would not be understood to be a court officer in the present day. For one thing, in 1920 the position was abolished and replaced with Marshal of the Diplomatic Corps, who administers relations between the sovereign and the heads of foreign diplomatic missions to the UK. For another, the term is now used for very different roles. An M.C. (or emcee) at a staged event is the main host and toastmaster, i.e. the person who opens and closes the event, introduces speakers or acts, and entertains the audience during interludes. And in hip-hop culture,  MC usually refers to a rap performer.
Comment: Thank you very much for your answer, this was useful for me.
Answer: Sometimes this person is called a protocol officer.
A WiseGeek webpage explains:

A protocol officer is someone employed by a government agency or major corporation in order to facilitate meetings, ensure proper etiquette for official engagements, and streamline interactions with dignitaries and other important people. The job typically involves some elements of event planning, but focuses more on personnel issues. A protocol officer's main job is to guide leaders, be they elected officials or corporate executives, away from etiquette or cultural mistakes .. In most places, protocol officers are best known for their work in top-level government institutions. Presidents, Prime Ministers, Senators and foreign diplomats are among those who hire protocol officers to help them forge important relationships without making embarrassing blunders.

The highest-ranking protocol officer for a company or nation may be called the chief of protocol:

The Chief of Protocol of Canada is considered the most senior protocol officer for high-level international visits to Canada and outgoing state, official and working visits, as well as for overall issues relating to the entitlements and special status granted to the foreign diplomatic community in Canada, which includes a number of international organizations.
Source: About Angela J. Bogdan, Chief of Protocol of Canada


Stop the Auto start Tomcat on startup in Ubuntu

Question: When I run ubuntu, the tomcat server I have installed runs automatically and I have to switch it off manually. I want tomcat not to start automatically on boot. How to disable tomcat's startup on boot?
Answer: From what you describe, it looks like you have Tomcat installed as a service.
Based on this assumption and assuming you have the appropriate persmissions:
Find the service name of tomcat:
service --status-all

Then disable the service:
systemctl disable <service>


improvements in the tour

Question: I would like to propose in the tour, to point out the importance of searching in the 'Search' for a question before asking it on SE. The questions come up time and again, an asked question or duplicate.
Also the search box  make it more prominent so people will see it better.
Comment: I asked a [relevant question](http://meta.music.stackexchange.com/questions/640/first-posts-problems) a while back
Comment: It was the tone of the writers that make me feel uncomfortable. That's why I asked this question. It is sometimes new people to the se, ask questions yes it's off topic , duplicate whatever. They get a barrage off topic, duplicate it chases away people or make them have a  bad taste.
Answer: To me, the search box is incredibly obvious, in the same place most sites have it, and in the same format. Also, when you post a question, the system does a pretty good dupe search anyway - but getting someone to accept that it is a dupe is another matter...
Changing it would be a Dev activity, so I can't speak to whether we will get any changes to the tour, however, if it doesn't get changed, there is something you and I can do to help new folks:

let them know about the search box if they missed it

If this is done in a welcome message, you can let them feel welcomed and educated as to how to ask in future.
Comment: Yes I understand that, but I don't like how people comment bordering command to out right nasty. We are still humans.
Comment: generally, most SE sites I frequent have people being polite and friendly. I didn't understand you calling out Neil earlier - he was not being rude. I'm guessing it's the difference between cultures that caused that issue.

improvements in the tour


Force required when there is Friction between Pulley and String?

Question: A massless rope is tossed over a wooden dowel of radius $r$ in order to lift a heavy object of weight $W$ off of the floor, as shown.
The coefficient of sliding friction between the rope and the dowel is $μ$. Show that the minimum down- ward pull on the rope necessary to lift the object is:
$F=We^{\pi μ}$
This was a question in Resnick Halliday Krane Ch-5. When I tried this problem, I was not able to make any progress whatsoever. Like I was not able to understand why the friction would act/how it would act as the rope is massless! So basically I still tried for a long time but I was not able to solve this.
So I looked at the solution, which unfortunately made no sense to me at all.
They somehow got the equation $\frac{dT}{T}=μ \cdot d\theta$ (where T=Tension).
Obviously I understand that once we set up this equation, the rest is trivial, as you just integrate this expression with the correct limits ($0$ to $\pi$ for $d\theta$ and $F_{down}$ to $W$ for $dT$). But I tried for a long time to understand how they got that equation but I absolutely do not understand it. Like I am not even sure how to begin with that.
This was the only problem in that chapter that I still don't understand the solution to (infact I had done this chapter 1 month back and I thought that if I try the problem again after some time, I might get it, but I tried it today and I still do not understand the solution). So I would be realllllly very grateful is someone could please explain the solution to this problem (or even give hints!), really anything would be appreciated.
Thanks!
Answer: The dowel exerts a friction force on the rope that reduces the tension as we go around it.  For example if the friction was high, someone could pull hard on the rope, but there would be a lower tension at the other side.

The $dT = T d\theta$  above is the normal contact force of the rope on the dowel, then if we include the $\mu$ we get the force that reduces the tension for that section, so $dT = \mu T d\theta$


Is it possible to use methods in java library or a java project snapshot in a protractor project?

Question: If I create database testing project using java and export to a snapshot(as a jar), can I use it in a protractor project?
Hoping to use in protractor project,
protractor,jasmine framework along with visual studio code
Hoping to use in database project,
java,testNG,JDBC,intellij Idea
I can't use same technology for both API and E2E testing. Therefore I want to use database testing project in both API and E2E testing.
I know how to do in API project.What I don't know is whether I can use snapshot in protractor project.
If I can do it, should I expose database related methods as just a public method or as an API?
Comment: Voting to close, because it is a software development question. Although you are talking about Protractor, in the end, the question talks about calling Java from Node/Javascript.
Answer: There is no way we can call Java methods/classes in Protractor, here is the reference link of discussion: https://stackoverflow.com/a/29985297/1976848.
But as in you Ques of using DB in protractor project, so you can use the same DB created for database testing project, checkout this reference Database connection with Protractor
 with this you can use snapshots in Protractor Project.
I hope this might help you!! let me know if it works.


Black and Decker 18V Battery

Question: I put my 18V Black and Decker Battery on the charger yesterday and the red light is still blinking. Is this normal?
Comment: Please provide more information: how old is the battery, what is the model number (so we can identify chemistry -- nicad, lithium ion, other), how long has it been since the last charge, was it "empty" after the last time you used it or did you recharge it then, do you have any other batteries to try on the charger, is the battery getting warm to the touch while on the charger, did you put it on the charger particularly hot/cold?
Comment: I agree with the questions in the previous comment, but it's also true that most batteries, even Lithium ion, can only take so many charge cycles, especially if they're deep discharge cycles where you run the battery all the way down then recharge it. But then technologies like NiCad (Nickel/Cadmium) are really susceptible to a memory effect where if you only partially discharge them before recharging, they'll only provide power for a short time before they MUST be recharged. Can you buy a new battery? It might just be worn out. ;-)
Answer: Two things. The battery is no longer charging or the battery charger no longer meters output from the charger circuit for a match with the battery voltage.
If you can borrow a charger you can check the battery charging capability. If not start with a new battery.

Black and Decker 18V Battery


Are Oracle PL/SQL arrays indexed from 0 or from 1?

Question: I have in front of me a piece of code like this:
FOR row IN 1..l_RowSet(1).count
LOOP
   l_a_variable := l_RowSet(1)(row);
END LOOP;

l_RowSet is an ApEx type -- apex_plugin_util.t_column_value_list -- defined thus:
type t_column_value_list  is table of wwv_flow_global.vc_arr2 index by pls_integer;

where wwv_flow_global.vc_arr2 is defined as
type vc_arr2 is table of varchar2(32767) index by binary_integer;

The vc_arr2 is passed back to my code from the apex_plugin_util.get_data function. The vc_arr2 is indexed by column number, not by row.
As best I can make out this means that the data is effectively stored in a 2D array, indexed by column and then by row.
When using the LOOP statement, would this be indexed from zero or from one? Because it seems to me that I ought to be able to make that LOOP redundant, ie:
l_a_variable := l_RowSet(1)(1);

But I'd need to know in advance whether to give 0 or 1 as the initial row.
I can't find a clear answer in the Oracle docs (unsurprisingly, "index" is a fairly widely-used term) and a look through SO doesn't show anybody else with the same question either.
Comment: PL/SQL doesn't have a concept named "array". It has two (or three, depending on what you choose to count in) data types similar to "array" (as "array" is defined for example in C or FORTRAN): the ASSOCIATIVE ARRAY and the VARRAY. (Or you may choose to count NESTED TABLE here as well). The types you are looking at are ASSOCIATIVE ARRAYS. However, the data type that is REALLY like "arrays" is VARRAY in PL/SQL. VARRAY indexing is from 1, rather than from 0. Associative arrays don't even have the concept of being indexed "from" something; they are just .. well... associative arrays.
Answer: An associative array isn't necessarily dense.  There may be an element at index 0, there may be an element at index -1, there may be an element at index 1.  Or you might have elements at indexes 17, 42, and 127.  The code you posted implies that the associative array is dense and that the indexes start at 1.
In the specific case of apex_plugin_util.get_data the collection should be dense and should start at 1.  If the loop is actually not doing anything other than what you posted, you could replace it by fetching the last element of l_RowSet(1), i.e.
l_a_variable := l_RowSet(1)(l_RowSet(1).count);

Comment: @JacquesChester - `apex_plugin_util.get_data` returns a collection of type `t_column_value_list` which is a multi-dimensional array.  Updated the question and removed the 1D/ 2D discussion from my answer.
Comment: Thanks. I've updated the question to better explain what get_data does. It *is* a 2D collection, by column then row. Given that PL/SQL arrays can be sparse I'll need to dig some more to see what it's returning to me "live".


How is z calculated in red shift observations?

Question: If z is calculated using the ratio between observable wavelength and emitted wavelength, how do we know the emitted wavelength of a star that is moving away from us? Wouldn't we have to be at a constant distance from the star to know that value?
Answer: The light emitted by stars passes through various gases, these gases absorb very specific wavelengths of light.  For example Hydrogen will absorb light at exactly 6563 Å.  So we know that the spectrum of light would have a dark line at 6563 Å if the galaxy wasn't moving away from us.
If the light is redshifted, this line also gets redshifted.  So if this line appears at 7830 Å, we can calculate the redshift.
Because gases absorb (and emit) light at particular known wavelengths, we do know emitted wavelength of the light.
Comment: @Giorgi Lagidze: No, that is not how Stack Exchange works (unless the intent is to prompt improvement of the answer). You need to consider the scary proposition of asking a new question. (It should also be one question at a time, unless they are very closely related (essentially one question).)
Comment: Thank you - makes sense! (Just googled to work out that Å is Angstroms https://en.wikipedia.org/wiki/Angstrom  - a way of representing very tiny lengths)
Comment: Hi James.  If you don't mind, I'd love to ask couple of questions.  Question 1 - at which step would light go through hydrogen ? you mean hydrogen gas that exists in a space(clouds of it -before forming the star from it) or you mean when fusion happens inside the core, energy (photon) is released and before it gets out of the surface, it gets scattered through other hydrogen atoms inside core.
Comment: Question 2: if the answer from question 1 is both, then in terms of fusion in the core, released photon could scatter between multiple times in different hydrogen atoms, wouldn't this redshift the wavelength even more or once light is gone through hydrogen atom one time, it doesn't matter how many times it goes through with it later, its wavelength spectrum will stay the same ?
Comment: Question 3: in the core, light would definately not only scatter hydrogen, but some other stuff as well before it would reach the outer shell and start moving to us. What if it scattered first through hydrogen and then helium after that it came to us ?
Comment: Question 4: https://physics.stackexchange.com/questions/760857/why-does-redshift-happen.
Comment: Question 5: https://astronomy.stackexchange.com/questions/53504/how-redshift-can-be-detected
Comment: Thank you in advance if you could help a little bit.
Comment: The [Lyman break](https://en.wikipedia.org/wiki/Lyman-break_galaxy) could [be covered](https://www.youtube.com/watch?v=2VVVADtXNBE&t=23m51s) as well.


What useful functionality do you get out of overriding the 'new' operator?

Question: What new kind of functionalities (for debugging or not) do you find helpful by overriding the new operator?
Answer: The main reason I've had to overload new has been for performance. One example is allocating a large number of small objects, which is often fairly slow with a general purpose allocator, but can often be improved a lot with a custom allocator.
Answer: There are many cases when overriding operator new must be done. As someone said, it's mainly for custom memory management.
The main example that I've personally dealt with was for embedded systems.
In an embedded system, dynamic memory allocation is usually a problem. Even if you have an embedded operating system that supports it, you have all sorts of issues you might have to deal with (for example, embedded systems often need to be more deterministic than their PC counterparts. Also, you might be working on a system that is supposed to be up for years at a time, in which case memory fragmentation is a real problem).
Because of this, embedded systems tend to disallow dynamic memory allocation completely.
Of course, in most software projects you need some form of dynamic memory, and in those cases you generally implement your own (i.e., have some kind of memory pool that all the threads can ask for memory from, etc).
To make C++ projects use this hand-rolled dynamic memory allocation in the easiest way, I've seen projects override operator new to use the project's allocation method.
Answer: Well, custom memory management and debugging. That's about it, and all you can get out of it too.
Answer: You might be developing a library that requires some extra stage in initializing certain objects, overloading allows you to do that without some clunky extra calls that the user would otherwise end up having to type.
Answer: If you're working with SSE / SIMD, you generally need your memory to be 4-word-aligned, so you might overload new for the relevant classes to use memalign() (whereas the default new is doing something equivalent to plain malloc()).


Gmail notification on lock screen does not show subject

Question: On my new Samsung Galaxy S9 running Android Oreo, new email notifications (Gmail app) do not show the email subject. This happens even if I just have a single email notification. If I unlock the phone and check the notification shade, it has all the required details.
I am wondering if there is a setting on Samsung phones that causes notification details to be hidden on the lock screen for the sake of privacy.
This was working fine on my Pixel.
Answer: Found it! The setting to change is here:
Open the Gmail app. Go to Settings > (Email address) > Manage Notifications > Lock screen > Show content
Answer: There should be an app setting (Settings > Apps > Gmail) to allow or disallow sensitive content on the lock screen.
There should also be a standard setting in Settings > Security to disallow sensitive notifications on the lock screen.
I am not very sure of how Samsung implements them. But should be there somewhere.


Looking to do a workflow, not sure where to start

Question: Essentially, I would like a hiring manager to go to Sharepoint and fill out a document. Once that is completed, the IT admin would need to be notified. Once the IT admin had done his duties, he would then click or submit something alerting the hiring manager of its completion. If possible, i would like to have each event timestamped. I am new to Sharepoint so go easy =)
Comment: Are you using SharePoint out of the box, SharePoint Designer, or some other tool?  Which version of SharePoint and/or your other tools are you using?
Comment: I am using Sharepoint Online but also downloaded Sharepoint Designer..
Answer: This is very possible. I have only worked with this in SharePoint 2010/2013 but it seem pretty simple. Example of an email workflow
I should be fairly simple to create the results you want. I would some if logic and a check to make sure each part is done. The initial email would send once created, I.T would do their duties, check it is finished, submit it and then it would email again.


Easiest Beat Tracking Algorithim

Question: I want a relatively easy to implement but relatively reliable algorithm for detecting beat locations in an audio file.What I am aiming to do is get the location of the closest beat to a particular time instant i.e if given current playtime, how can I get the location of next beat.Does anyone know of any algorithms that could help me solve this problem?
Comment: Some questions: Beat or not onsets? Do you want this to be online/causal or do you have access to the entire audio file?
Comment: I want the actual beat locations not just onsets and I don't need it be online because I have the entire audio file.
Comment: There are several algorithms implemented in http://aubio.org/, but I agree it would be nice to have a simple one explained if someone wanted to take the time to do that here.
Comment: Check "Beat Tracking by Dynamic Programming" by Dan Ellis. There are better algorithms - but it is quite simple and requires few parameter adjustments. With a few tweaks to the tempo detection function (while keeping the same dynamic programming format) you get close to the performance of the algorithm implemented in Sonic Visualizer. Aubio's beat tracker is designed to be causal so it is not as good.
Answer: The matlab codes that implemented D. Ellis's algorithm are on their website:
http://labrosa.ee.columbia.edu/projects/beattrack/
Answer: Essentia C++/Python library provides several beat tracking algorithms:
http://essentia.upf.edu/documentation/reference/std_RhythmExtractor2013.html
This is the algorithm publish in:
J.R. Zapata, M. Davies and E. Gómez, "Multi-feature beat tracker," IEEE/ACM Transactions on Audio, Speech and Language Processing. 22(4), pp. 816-825, 2014. http://dx.doi.org/10.1109/TASLP.2014.2305252
The Matlab implementation of the multifeature beat tracker is:
https://github.com/JoseRZapata/MultiFeatureBeatTracking
Answer: I have implemented BeatRoot by Simon Dixon and found it to be a simple yet efficient beat detector. I believe that there is sample Java code on the Web to demonstrate his algorithm.

Easiest Beat Tracking Algorithim


upgrading substrate node from Polkadot 0.9.28 to 0.9.40

Question: I have a substrate node of Polkadot 0.9.28.  It is customised to enable contracts, and I have enabled the contract and runtime pallets. The tutorial I worked on is no more available in substrate docs. I have updated my Ink version from 3 to 4. Now while working with the nodejs to deploy the contract on the chain I am facing issues. I have updated my @polkadot/api and @polkadot/api-contrat packages. I don't know why the development does not work. Hence I would like to update Polakdot to a new version while retaining the features of contract-pallet and runtime-pallet. Is there a way to update it?
Answer: There are three cases according to me in your case:

If you haven't done any changes in the contracts pallet or any other pallet than you are good to go with a runtime upgrade from 0.9.28 -> 0.9.40 using  the tutorial https://docs.substrate.io/maintain/runtime-upgrades/.
But if there are some changes in your contracts pallet than you need to apply those changes in 0.9.40 and do the runtime upgrade.
But if there are some breaking changes than you need to a storage migration with the runtime upgrade for that you can follow https://docs.substrate.io/reference/how-to-guides/storage-migrations/.

After identifying what you require for your case, you can once try it on development mode are make a private network replicating your scenario to test it out first.


How to get a receiving address from Bitcoin Wallet app?

Question: So, I'm trying to obtain my winnings from this online casino OZWIN CASINO, which is based out of Australia, and I'm located in the United States. Problem is that I've never used Bitcoin and I've just created an account using Bitcoin Wallet app. The casino is asking for my Bitcoin address so that they can send me my payment. Where do I obtain this address?
Answer:
Where do I obtain this address?

In the "Bitcoin Wallet" Android App 1 you get a new address by clicking "Request Coins" at the bottom left of the main page in the app.

The address is in that 2D barcode - specifically a QR-code. The above is an example, don't use it! You can copy the address to the clipboard using the copy icon at the top. You can then paste it into a message or use it some other way.
You can also get a list of addresses (with one marked as current address for receiving) by clicking the "Address book" icon at the top that looks like a label tag

This wallet is sometimes known as the Schildbach wallet because the official name is so generic and useless as a search term. There are many different Bitcoin wallets and many different Bitcoin wallet developers.


Is 极了 a result complement or a verb suffix?

Question: My guess: 极 is a result complement that has been grammaticalized in its -了 form to become a sort of suffix on its own. My reasoning for this guess: it was probably originally a result complement because it is clearly an adjective, as most result complements are. However, unlike most result complements it is almost always used with -了.
Comment: Note, "Result complements form verbal compounds that behave exactly the same as normal verbs. **The compound is formed by a verb plus another verb or an adjective**". Can you provide the example(s) in your head for clarity?
Comment: We use 极了 as a complement after an adjective.
Answer: 极 is an adverb
Example:

效果[极佳],速度[极快],力度[极强] (common form [adv + adj])

速度[快极],力度[强极] (uncommon form [adj + adv])

[好极],[惨极],[悶極]

[极了] is [adv + final particle]
Example:

好极了,速度快极了,力度强极了, 情況惨极了,真是悶极了
Comment: But adverbs don't go after a verb in Chinese, they go before it. If you said were to say "速度极快", then I would agree that 极 is being used as an adverb. But functionally, in its place after the verb, I feel that it is being used as a result complement.
Comment: But my examples are about adverbs that can be placed before or after an adjective. 强(adj)极(adv) = 极(adv) 强(adj); 快(adj)极(adv)= 极(adv)快(adj). I never mentioned the placement of adv +v
Comment: This is an interesting example of a rigid kind of thinking that gets in the way of useful analysis rather than aiding it. By your logic, I can say that "Google" is an English noun, "I will Google it" is a valid sentence, therefore nouns in English can take objects and be put in the future tense. Or, much more usefully (and correctly), I could recognize that the same word can be used as various parts of speech, and its usage is what determines its part of speech, not its form or its dictionary entry. If an adv. in Chinese goes before the verb, anything that goes after the verb is not an adverb.


Is it possible to do novel-scale writing on a Chromebook?

Question: I've been looking into Chromebooks for their portability and cost and was wondering what kind of writing tools, if any, exist on the platform that could be used to write larger projects without making one go insane.
Comment: I wrote my first book on my Chromebook and am working on my second!
Answer: That very much depends on what you need to write with.
If you need the likes of Scrivener then you are going to have some issues working efficiently on a Chromebook (I'm not sure what Chrome apps there are)
However, if you can adapt your writing style to what you have available you will find that there are many tools available.
Personally I have found that google docs to be a perfectly functional word processor for writing in. The ability to create a a metadata file with links etc works well enough.
Although I have recently stopped using even those, I have now moved over to using a basic text editor well not too basic and storing all of my files on a private github repository.
Remember that even in this modern world there are still a large number of authors who use a typewriter, or a pen and paper.
Its all about your approach and how you organise it. Maybe sidestepping the technology will let you focus more on what you're writing (I know it did for me)
Of course your mileage will vary...
Comment: Exactly. You can write fine using Google Docs, which integrates with ProWritingAid for easy cleanup. A Chromebook is probably the most affordable effective portable writing solution available right now. But you could never pull me off of Scrivener, and for that you'd need a to buy a MS Surface or used Mac notebook computer.
Comment: @Kitsune I do mostly write in text files, but I do love my Surface! Absolute perfect mix of tablet and laptop.
Comment: @MichaelB: Do you use any plugins for atom? It looks like a great platform but I've not used it much.
Comment: @user2859458 There's a wannabe developer in me that thinks it would make an excellent base to be an open source contender to scrivener! One day I might start coding it. Until then the only extension I use is word count. It is basically notepad with spellcheck for me.


How I can preconfigure the write mode of drive cache?

Question: journalctl -p err gives [sdX] Assuming drive cache: write through for each of my hard drives, where X is from a to f. These are normal hard drives, Ubuntu runs under VMWare. How I can preconfigure the write mode of drive cache so that Linux would not make any assumptions on that matter and would not display them as errors? I don't merely want to hide this error message or preventing Linux from sending it to screen. I would like to solve the cause of these errors, even though some people tell that these errors are normal.
Answer: The error message is emitted by the Linux kernel.  As of v5.0, it has no feature such as you ask for.  Therefore, the method to implement this would involve writing the necessary C code for the Linux kernel :-).
Relevant to that: if Linux recognizes the drive or controller model as having a specific "quirk", where it is not safe to make this assumption, then it still prints a message.  But in that case, it is not shown as an error.  See the source code quoted & linked below.
The safe assumption in terms of data integrity is surely "write back", not "write through".  I.e. it seems safer for Linux to send cache flushes when they are not needed, as opposed to the other way around :-).  I am not certain what disadvantage there would be, if Linux was changed to make the safer assumption.  However based on a quick web search, I think it might decrease performance for certain RAID controllers, which  both have a battery-backed cache, and fail to provide this caching information.

Commit b81478d82e38: [SCSI] set to WCE if usb cache quirk is present.
if (sdp->wce_default_on) {
    sd_printk(KERN_NOTICE, sdkp, "Assuming drive cache: write back\n");
    sdkp->WCE = 1;
} else {
    sd_printk(KERN_ERR, sdkp, "Assuming drive cache: write through\n");
    sdkp->WCE = 0;
}

Assuming your SCSI disks are being emulated by VMware, the ideal fix would be to use virtualization software which is better at emulating disks, and provides all the correct caching information without requiring assumptions :-).
A recent quote from one kernel developer, in the context of this error message: "it is quite unusual for a device to not implement the caching mode page".
Comment: Thank you very much for your answer! This error only happens on VMWare, not on Azure or KVM or HyperV or physical hardware. So it is VMWare to blame.


magento 2 - first order dicount

Question: Is there any way to give a customer coupon code for first order only ? ( in cause second order for customer can't use the coupon even if Its not use it in first order)
Answer: You can follow using customer segment for that refer this:
https://docs.magento.com/user-guide/marketing/price-rule-discount-first-purchase.html
You can create a customer segment and use it on the cart rule.
Also if you are using community edition you can still create a cart rule but need to add custom rule conditions you can refer this https://magently.com/blog/magento-2-custom-sales-rule-condition/ you can change logic with customer total order count
Comment: Thank you.
Unfortunately conditions not help enough to detected if this is a first order or second because i don't want customer to user discount in second order even if not using it in first order.

magento 2 - first order dicount


Export ArcMap Symbology to table, text or other format?

Question: In ArcMap how can I export a symbology style to table or text format such as .csv?
Comment: I am looking for the reverse methode. How to import labels from Excel in the Symbology?
Answer: I found a kludge courtesy of Sephe Fox on GeoNet, extract the definition from a legend graphic:

add a legend to your map document containing only that layer. Then,
  right click on the legend and convert to graphics. You will have to
  ungroup the legend and also each of the symbology types, but then you
  can select the boxes with just the text, by dragging a rectangle
  around all of them, and copy. You can then paste them as text into
  Excel, and each will be on a new row.

After you have everything in rows use Excel's "Data >> Text to Columns >> Delimiter '('" to split  Label (value) into separate fields and then Search & Replace ) with nothing.
It works but is cumbersome and not what I'd call a solution. Still if you're in bind this might let you keep going.

Another approach is mine the map's Service Definition Draft (File >> Share as service >> Save as service definition file >> Choose 'No connection') , unzip the archive, locate the .msd file, unzip that, find layer_name.xml, then in Excel Open as XML Table and scan for columns FieldName, String, Label.

(Note the RGB columns which might be useful for the related Saving a ArcMap layers RGB values into the attribute table question.)
There is an arcpy snippet in Getting layers from .msd using ArcPy? for getting to the layer file, and a more fully developed script at Using ArcPy to get layer symbology?. I've lost track of the original Q/A that led me to the idea of using a service definition.


Neyman pearson on discrete distribution

Question:

I have found the ratio of h1 to h0 and the ratio is increasing .So we should reject H0 for large values of x.How should i find the critical region for such type of questions.It seems to me the rejection region is P(x>k)=α.How i determine k .Thank you.
Comment: Try to type out your questions and add the `self-study` tag.
Comment: This similar question might help: https://stats.stackexchange.com/q/386092/119261.
Comment: It mights sounds silly . But what is the significance of finding liklihood ratio of null and alternative hypothesis.Why should't i directly reject null hypothesis for all values of P(x<k)=α
Comment: In answer to your previous Comment, you were asked to make $\alpha = 0.1.$ // Finally got a version of my answer that I think/hope will be helpful.
Answer: The problem in your Question is somewhat quirky. Possibly
that's on purpose to show you that likelihood ratio tests
do not always provide satisfactory results--especially when the distributions for $H_0$ and $H_1$ are too nearly alike.
I will return to this problem after looking at a likelihood ratio test that works more satisfactorily.
Consider a test of $H_0$ vs $H_1$ where discrete distributions on integers $0$ through $4$ are as shown
below, followed by the likelihood of the null distribution divided by the alternative distribution.
pdf.0; pdf.1; LR
[1] 0.410 0.410 0.153 0.025 0.002
[1] 0.008 0.076 0.264 0.412 0.240
[1] 51.250  5.395  0.580  0.061  0.008

We want a test with significance level not greater than
$0.1 = 10\%.$ If we reject for small values of the
likelihood ratio, then we can reject for LR < .1, which means rejecting for $X \ge 3.$
Then $$\alpha = P(\mathrm{Rej}|H_0) = P(X \ge 3|H_0)\\
= 0.025 + 0.002 = 0.025.$$ [If we tried to increase the
rejection region to include $X=3,$ then we would have $\alpha > 0.1.]$
It follows that the power of this test is
$$\pi = P(\mathrm{Rej}|H_1) = P(X \ge 3|H_1)\\
=0.412 + 0.240 = 0.662.$$
The figure below shows the two PDFs with $H_0$ in blue
and $H_1$ in brown. The rejection region is to the right
of the vertical dotted line. In the rejection region the blue bars (for $H_0)$ are relatively short and the red bars (for $H_1)$ are relatively tall. The distributions are sufficiently different that a reasonably useful
likelihood ratio test can be found.
plot(x-.02, pdf.0, type="h", lwd=2, col="blue")
 lines(x+.02, pdf.1, type="h", lwd=2, col="brown")
 abline(h=0, col="green2")
 abline(v = 2.5, lty="dotted")

Now, we turn to the problem in your Question.
Under $H_0$ the PDF is given by f.0 and
under $H_1$ by f.1 for values $X = 1,2,3,4,5.$
f.0 = c( .1, .1, .1, .1, .6)
f.1 = c(.05,.06,.08,.09,.72)
like.rat = f.0/f.1;  round(like.rat, 2)
[1] 2.00 1.67 1.25 1.11 0.83

If we reject for small values of the likelihood ratio
then we reject when $X = 4,$ so the significance level
is $P(X=4|f_0) = 0.1$ (as requested). We cannot put the
$X$-value with the smallest likelihood ratio into the
rejection region because that would give $\alpha > 0.1.$
Accordingly, the power is $P(X=4|f_1) = 0.09,$ disappointingly small for practical use.
A useful likelihood ratio test is not possible because
the distributions described by $f_0$ and $f_1$ are not
much different from one another, as shown in the figure below.

Notes: (1) The distributions in the first example are roughly modeled after $\mathsf{Binom}(4, 0.2)$ and
$\mathsf{Binom}(4, 0.7).$ Rounded to three places and altered to sum to exactly $1.$
(2) If you know about randomized tests, then you could reject
with probability $1/6$ only for $X = 5$ (perhaps with the roll of a fair die) to get $\alpha=0.1.$ In that case, the power would be $0.72/6 = 0.18,$ which is better than $0.09$ with the non-randomized test above, but still not large enough to be
considered useful.
References for randomized tests: Mood, Graybill, Boes: Intro. to the Theory of Statistics, 3e (1974), p404;
Bain & Englehardt, Intro. to Probability and Math. Statistics, 2e (1992), p411. [Productive searching online is difficult because of conflation with 'randomization' tests, a different topic.]
Comment: Isn't the usual definition of likelihood ratio $\frac{f_1}{f_0}$ instead of $\frac{f_0}{f_1}$ the way you have it? One advantage in this problem is that the usual ratio takes on values $0.5, 0.6, 0.8, 0.9, 1.2$ without needing to invoke `round(like.rat,2)`.

Neyman pearson on discrete distribution


How to "close" from view standard taxonomy page

Question: I made several taxonomy dictionaries and all of them have terms. I use terms for Views generations. But standart drupal functionalaty lets end-user to enter as URL: "site/dictionary name/term name" and get list of materials which were marked by this term.
How I can "close" this page? I do not want end-user to see my materials by this hack.
Comment: Go to the permissions page and remove the relevant permission from unauthorized users.
Comment: Unfortunatly, there is no such option.
Comment: You can always add this option using hook_menu_alter.
Answer: Luckily there is module for that: Disable Term Node Listings

By default, on taxonomy term pages, Drupal will display a list of nodes (teaser build mode) that are tagged with that term. Disable Term Node Listing allows you to selectively disable node listings on taxonomy term pages by vocabulary.
Disable term listings for a particular vocabulary by going to the edit page [/structure/taxonomy/[vocab_machine_name_here]/edit].
Comment: Unfortunatly, I can not find this toggle on taxonomy page. I have there only: name and description fields.
Comment: @user38998 Maybe a silly question, but did you install the module? Below the name and description fields on the /structure/taxonomy/[vocab_machine_name_here]/edit page there should be radio buttons available under the title 'Node listings'.
Answer: 1) In hook menu alter:
/**
 * Implements hook_menu_alter().
 */
function yourmodule_menu_alter(&$items) {
  $items['taxonomy/term/%taxonomy_term']['access callback'] = FALSE;
  $items['taxonomy/term/%taxonomy_term/feed']['access callback'] = FALSE;
}

2) If you use Panels module:

enable Taxonomy term template page
create variant with type HTTP response code
chose 403 of 404 Responce code


How do hydrogen bonds break the ionic bonds of a crystal lattice?

Question: In the case of water dissolving sodium chloride. I was under the impression that hydrogen bonds were much weaker than the ionic bonds in sodium chloride, so how do they overcome the ionic bond strength? Do the ions simply get swarmed with enough water molecules so that the combined dipole interaction forces break the ionic bond? Or is it possible that because the sodium chloride dissolution reaction is endothermic the hydrogen bonds on their own are not enough to break the ionic bonds so the reaction must draw energy from the surroundings to do so (the reaction must be entropically favorable to do so, right?)?
Comment: Ion-dipole interactions, not hydrogen bonds. Hydrogen bonds are between water molecules.
Answer: Your presumption that it is hydrogen bonding that breaks the ionic bonds is wrong. Forget H-bonds. It is true that they exist in both pure water and in a sodium chloride solution. Water molecules surround both the Na+ and Cl- ions. The interaction there is dipole-ion. Na-OH2 and Cl-HOH. As is obvious, only one of those involve an H atom. (note that the "-" I used is not intended to suggest either a covalent or an ionic bond, rather it is intended to show the electronic interaction between the two oppositely charged species (the Cl & Na ions have full integer charge, the H & O atoms have only partial opposite charge, mostly induced.) This question can be answered just by hand-waving about the thermodynamics: the energy of the solvated Na and Cl ions is less than that of those two ions in the crystal. So, on average, the ions will leave the crystal and enter the liquid (until their concentration is so high that equilibrium is established between the two phases). So, while it is true that HOH...Cl bond can be called a H-bond, thinking about it this way has no obvious advantage as far as I can see. The dipole-ion interactions that are occurring are indiscriminate. Each ion is surrounded by lots of (oriented) water molecules. To learn more see https://en.wikipedia.org/wiki/Solvation_shell and especially https://en.wikipedia.org/wiki/Solvation
Comment: You should be more concerned with formatting, IMO.


How to see the wireless speed of a MacBook

Question: I have a 13.3" MacBook (Black, OS 10.6) that is a previous generation (before the new aluminum 13" MacBook Pro). Besides doing a file transfer test, how can I verify that my MacBook is connecting at N speeds rather than G? In Windows you can tell using the popup from the Wireless icon, is there an equivalent for the Mac?
Answer: Since you are running 10.6 Snow Leopard, hold down the Option key and click on the wireless icon in the menu bar - you should see extra details about your wireless connections now.
Under "PHY Mode", if you are connected via N, you should see "802.11n". If it's "802.11g", then you are on the 54Mbps G mode, and so on, and so forth.
Also, you will see the rated speed under "Transmit Rate" - on a G network like mine, it will say "54". On an N network, it should (cannot confirm) say "540" or something.
Please take note that "Transmit Rate" is not equivalent to real transfer speeds - it is only the theoretical maximum. For wireless, the actual speeds are usually less than half of the rated speeds.
Comment: An 802.11n network can go up to 130Mbps (2.4Ghz) or 300Mbps (5Ghz)
Comment: Wiki states it can go up to 600 Mbit/s?

http://en.wikipedia.org/wiki/IEEE_802.11n#Data_rates

Not too sure about this too - there are so many conflicting info on the Net about 802.11n.


Changing foreign key meaning. How to handle?

Question: Lets say I have 2 tables:
Species

SpeciesId
SpeciesName

Animal

AnimalId
SpeciesId - foreign key

If you give the end-user ability to change SpeciesName, that means they can affect the species of all animals that reference the changed record (at least from user standpoint). This may be a bit of an extreme example, but how are situations like this usually handled? Put the responsibility on the end-user to know what they are doing? Disallow name change if it has been used before?
We are discussing this situation at work and I want to get input from some others. One of the solutions that was brought up was to remove the foreign key (e.g. put a text field for species in the Animal table). This doesn't seem right to me, because at what point do you draw the line of using foreign keys? To me it seems like more of a training issue to make sure admins understand the impact of the changes they make. I know it's an open-ended question and it may vary per scenario, but I'm just trying to get some general opinions.
Comment: Well, for one, Species.SpeciesName should be unique, so you shouldn't be able to use a name already in use anyway. Otherwise, your question isn't really answerable - since your real use case isn't an example already defined by science, it's tough for us to tell what frequency these name changes will have, what impact they'll have on the rest of the schema, or why having a text column would be any better if a name does in fact change.
Comment: One of the reasons you use a lookup table like this is so that name changes are not painful. In your alternate design, if you have 5000 animals that belong to one species, and you change the name of the species, you have to update 5000 rows (and potentially more than that depending on indexes). When you have the foreign key, the surrogate (SpeciesId) that is repeated over and over again never changes; only the *one* copy of the name in the FK table changes. Also, since most names will likely exceed 4 characters, you save a lot of space in the Animal table by using SpeciesId as well.
Comment: To alleviate some pain from changing values in reference tables you can implement change tracking to be able to tell who, when, and for what changed them and revert those changes if necessary.
Comment: Don't allow just anyone to update that field.  Trust those who are authorized to do it.
Answer:
Put the responsibility on the end-user to know what they are doing?

You need to decide what the end user is able to update. If your end user is a biologist that is well informed about the scientific names of the species, he should be able to update this information. Otherwise, maybe it's a good idea to prevent the user from modifying this column at all, or only if this particular species has any animal associated with it.

One of the solutions that was brought up was to remove the foreign key

Don't do that. You will lose the ability to join the information from these tables. Imagine your table Species has a column "Continent", indicating if the species is found on America, Africa, Europe, Asia, etc. If you use the foreign key, you can ask questions like "What are all the animals that belong to an american species?" This will be impossible if you remove the foreign key.
Answer: This is a design decision that you have to make. You need to determine what is more important from a business perspective. Do you value historical accuracy or efficiently updating the information?
In your example, I would put less emphasis on history for the following reasons.

Only the most recent convention is significant. Assume an animal moves from one genus to another, it really doesn't provide any value to know what the old and now invalid genus was.
All animals of the same species should have the same species ID. You get this for free with Foreign Keys. Assume a tiger was added prior to a species name change. Then a different tiger was added after the species name change. Both tigers still belong to the same species.
Querying the database by ID will be easier and more reliable than using a string let alone delving into the dirty business of string parsing. You don't need to worry about character encoding, capitalization, white space, punctuation, etc. Assume that you would like to retrieve all animals of one or more species.


How to rent an appartment in Germany from Abroad? Need help!

Question: Me and my husband are moving to Germany for his new job near Stuttgart. Currently we live in The Netherlands and have a big problem renting the apartment from abroad. Basicly nobody want's to rent us the apartment without viewing it first, even though my husband can provide a job contract and a contact person in his new company, who can confirm his employment and answer all questions. Unfortunately we can't come to Germany earlier to just look for apartments and our time to move is becoming very limited. What can we do in this situation? We need to move in in August and so far we have no place to stay and move our belongings. I checked some of the temporary accommodation agencies, but their prices and deposits are crazy!!! I really count on Your advice!
Comment: I am not sure about Stuttgart but usually you need the SCHUFA to rent an apartment in DE, witch you cannot have unless you're already living in Germany. Catch 22
Answer: I would suggest putting your belongings (assuming you have quite a lot of stuff to move) into storage, and staying in hotels for a short time until you find somewhere to rent. That gives you the flexibility to temporarily try out different areas in and around the city, as well as gauging such things as traffic, public transport, local facilities etc.
Once you are there, it should not take too long to find somewhere to stay, and while hotels are not known for being cheap, shouldn't some of the cost of this be borne by your husband's new employer anyway? He is relocating to another country for them, after all.
Comment: Thanks for the information, we decided to go with temporary place from airbnb and look for a permanent place once we're there. Thank you again! :)
Answer: It's very unlikely to rent an appartment from private landlord without meeting them in person. Renting a flat is a great risk for a landlord, once you do, you can terminate the contract only under very specific circumstances (tenant not paying one of them), while the tenant can terminate on will. Because of that, people don't want to rent appartments to complete strangers.
You have more chance with corporate landlords, but there are not many of them, and they are mostly specialized in renting rooms (Wohnen auf Zeit), often with lower standard, often you're not allowed to stamp your name on letterbox (which makes receiving letters difficult, and if the sender is not willing to send letter as C/A, impossible).
Comment: Thanks for the information, we decided to go with temporary place from airbnb and look for a permanent place once we're there. Thank you again! :)


Being an EEC member, what will Norway gain and lose if it decides to join the EU?

Question: Specifically, what rights does a non-EU member in the EEC not have? And what restrictions can it avoid being out of the EU but in the EEC?
Comment: The other question doesn't address what Norway would gain by entering the EU.
Comment: Weirdly it came up in the related links, but didn't come back in the search bar when trying to flag the duplicate. I had to use the threadID to link them.
Comment: @Relaxed: I agree, but to keep answers from duplicating material on the other page, it would be better if this question was edited to focus on the gains.
Comment: Do you actually mean Norway is a member of the EEA? Norway doesn't seem to have been a member of the EEC, while that org existed as such. ("The Norwegian people had finally rejected membership in a referendum on 25 September 1972"). And of course they later (1994) rejected EU membership as well.
Answer: What it would gain: A direct influence on EU policy (concretely that means a seat at the Council and a permanent representative but also a Commissioner, judges at the EU courts, EU civil servants, etc.) that it must implement anyway. Right now, Norway is effectively a rule taker.
What it would lose: Independent fisheries policy. There would probably be a few other adjustments, maybe some budget contributions and of course an apparent loss of sovereignty but the main thing is clearly the fisheries.
Comment: But, everything else being equal, Norway would pay more than that as it is richer and wouldn't enjoy a rebate, perhaps something like the €200/inhabitant paid by Denmark (so potentially between two and three times as much as now).
Comment: Is the size of the Norway payments the same as their EU contributions would be as a full member? The financial payments have been a big talking point throughout the Brexit period.
Comment: @Jontia I have been wondering myself. I am not aware of any professional simulation and it's difficult to work out exactly. I suspect it would pay more into the EU budget but it would also get more of this money back. Ultimately, I suspect they would pay quite a bit more (in net terms). As a back of the envelope calculation, taking the overall Norwegian contribution to the Norway and EEA grants for 2009-2014 works out to about €65 per year and per person. That compares to a net UK contribution of €113 per person for 2017.


Compact circuit with multiple PAM8403

Question: I'm building a 6 channel circuit with the PAM8403 (Filterless 3W Class-D Stereo audio amplifier) and was wondering if I could make things more compact by using less components. Is it possible to combine some capacitors between the amplifiers? Which ones and how would the values change? My power supply is 5V 500mA lithium battery and I'm using a combination of 3x PAM8403. Below is my schematic:
Comment: @Bimpelrekkie I was wondering if you have completed this 6 channel circuit and tested it. I was wondering if you could share your findings / schematic so that i could use it as well.
Answer: I would not share the capacitors that are in the signal path (connected to IN1, IN2) as combining them means that the inputs of the amplifiers are not AC coupled anymore so a DC offset from one amplifier can influence another amplifier.
I would also not share the capacitor on the VREF pin. Note that you have used 1 uF on VREF while in the datasheet 0.1 uF is used.
You could share some of the supply decoupling capacitors between 5 V and ground. I would give each amplifier chip it's "own" 2x 1 uF capacitor at the PVDD and PVDD1 pins. These 1 uF caps need to be close to the PVVD and PVVD1 pins of the IC so that current loops are small, this reduces EMI emissions. Also the ground connection needs to be as short as possible. The best solution is to use a ground plane.
The other capacitors of 10 uF and 1000 uF can be shared I think. The datasheet lists that you need 470 uF per amplifier IC, you could do that but you probably can get away with using one 1000uF or two 470 uF shared between all three amplifier ICs.
Do note that class D amplifiers like this one can be critical (sensitive) to the PCB layout due to the switching at the output. If possible look at some layout examples of similar chips (unfortunately the PAM8403's datasheet does not show an example layout) to see how it is done. When the layout is wrong you risk all kinds of nasty behavior like oscillations and noise.

Compact circuit with multiple PAM8403


Akka remote actors filter connections by IP

Question: I'm trying to add security to my remote actors. I've set untrusted-mode:
http://doc.akka.io/docs/akka/snapshot/scala/remoting.html
Is it possible to add IP filtering, to allow connection only from specific server? For example I have one master and 10 slaves, I want to allow only for my master (specific IP) to connect my slaves.
In open source everyone could just create a new instance of my master, and connect to my real slaves. How can make it secure?
Comment: Did you check akka-cluster?
Answer: Using IP filtering is not very secure as it's easy to fake an IP. Luckily Akka comes with secure transport support via SSL and secure cookie support.
A cookie is like an API key and will be required to establish the connection. SSL will guarantee eavesdropping is not possible to steal the secure cookie. See this doc for example.
I made a simple project that uses Akka remoting and SSL with secure cookie. Try it out here. Read how to setup SSL certificate storage and such here.


Python: Use input from another command

Question: I am wondering how can I manage input from another command from a python script.
Example:
$ cat myfile.txt | my_python_script.py
How can my script manage the input stream from the cat command ? How Can I get an input from this piped commands ?
... Thanks a lot.
Answer: An easy and quite versatile way to accomplish this is to use the fileinput module.
import fileinput

for line in fileinput.input()
    # do things with line

This way you can both use the script in a pipeline (as you need to right now) or give one or more files to the script as a parameter (think my_python_script.py input.txt input2.txt).
Answer: A good alternative to reading the standard input via sys.stdin.readlines()
: use the pipes module.

The pipes module defines a class to abstract the concept of a pipeline — a sequence of converters from one file to another. Because the module uses /bin/sh command lines, a POSIX or compatible shell for os.system() and os.popen() is required.

Here's a nice tutorial.

Python: Use input from another command


How would the Compton Effect be if an electron absorbs 100% of the energy of the incident photon?

Question: How can I prove that the relativistic energy and the impulse cannot be conserved if an electron, which is essentially free, absorbs all the energy of the incident photon?
Comment: Also http://physics.stackexchange.com/questions/231175/mathematical-proof-of-an-electron-cant-absorb-a-photon?lq=1 and http://physics.stackexchange.com/questions/81448/can-a-free-particle-absorb-emit-photons
Comment: It can't. Such an event would violate either energy or momentum conservation.
Answer:
Compton scattering discovered by Arthur Holly Compton, is the inelastic scattering of a photon by a charged particle, usually an electron

Here is the  compton scattering diagram

time goes from left to right.

A Feynman diagram representing the γe→γe process. In the classical limit, this is called Thomson scattering. The quantum version is called Compton scattering, and in the relativistic regime, the result is given by the Klein-Nishina formula.

You are asking whether all the momentum and energy can be absorbed by the outgoing electron. One can go to the limit where the frequency of the gamma approaches zero .Classically it is when two balls collide and all the momentum and energy are transferred to the second ball, and yes, it is allowed: the incident photon angle and the outgoing electron angle approach zero at the limit. A very soft gamma is necessary for angular momentum conservation .


Make numbered grid overlay with different colours showing the frequency of data in QGIS

Question: I would like to create a grid overlay. Each grid cell should be numbered and showing frequency of some data using different colours. The grid is over a shapefile of an area.
Comment: What have you tried and where did you get stuck
Comment: I made the grids but now am unable to have them numbered. i am training myself so these are things i have never done before
Answer:
Find Create polygon graticule algorithm in processing toolbox (you have to install SAGA GIS before see: Enabling SAGA in QGIS?). Set the Output extent, Division Width and Division Height on the Parameters panel. Output extent should be a bit larger than the extent of the point layer.

Each polygon will have three attributes: ID, ROW and COL in the new Rectangle graticule layer.
I suppose you have point data (if you have polygons generate centroid to work with points). From the vector menu choose Analysis Tools -> Count points in polygon

You get a new Count layer, which is a copy of the graticule layer but a new column (NUMPOINTS) is added to the attribute table with the number of point in each polygons.

Create a thematic map based on the NUMPOINTS column of the Count layer.

Customize the the number of classes, colors, etc.
Answer: Additionally I may suggest implementing the following workflow
Step 1. Create grid with Vector > Research Tools > Create Grid..., use the Point Extent as a Grid extent. For more details check the QGIS documentation.
Step 2. Apply one of the approaches described in these threads Calculating point layer values within polygon features in QGIS 2 or Updating field to give count of points in polygon using STIntersects?. The KISS principle will lead you to applying @TeddyTedTed's answer, e.g. 'Join attributes by location (summary)'
Step 3. Proceed with RMC > Symbology > Graduated, actually what @Zoltan defined as Step 3 in his answer.

References:

QGIS Tutorials and Tips | Performing Spatial Joins (QGIS3)
Comment: Thanks so much guys.
Comment: Always welcome. Please accept one of the answers as a valid one


How to filter SharePoint list column with username of the current user

Question: I need to pass the current user name in the filter for Contains condition - Whenever passing [Me] it gives error: Filter value is not a valid text string.
Comment: Is the PoC field a people picker?
Comment: @wjervis No, it is Single line of text auto generated from the Infopath field.
Answer: The List View filter value for the people or group field it takes [Me]. It works for Created By in your screenshot. If the PoC field is a text field there is no way you can pass the current user name.
You need to add a "Current User Filter" web part along with list view web part and connect both web parts.

Go to page where you have list view web part added.
Add "Current User Filter" web part under "Filters" section in the web parts gallery to the same page.
Click down arrow on web part and click "connection" and select your list.
And configure the connection.

Below MSDN article explains the complete steps
https://support.office.com/en-us/article/Connect-a-Filter-Web-Part-to-a-Data-View-Web-Part-bc10362e-afaa-42dc-b09e-ba8b1b83bb3c?ui=en-US&rs=en-US&ad=US#bms4
Answer: You can't do that out of the box, but it would be rather easy to write a javascript to take the logged in user from the _spPageContextInfo object and use that as a filter. But if you want non-code solution the answer from VenKat is better.


Lubuntu/LXDE - cannot open folder on desktop

Question: I'm running Lubuntu with LXDE. When I double-click on a folder on the desktop, it does not open. The read/write settings are correct. Any idea what I could do?
Comment: What exactly does it say, any kind of error window .
Comment: i have the same problem. and not for the first time. as the author of the question seems to have abandoned it and a new one will be a clone, I can but add more info here. Pcmanfm is in fact the issue here. Nautilus takes over the desktop against pcmanfm in Lubuntu in some cases. Any other problems with pcmanfm can entail the situation described here. After restarting pcmanfm or logout it disappears only to come back. PcmanFM has a certain instability. Reinstalling it would be a solution maybe... All serious problems with it I was able to solve only by reinstalling/upgrading the OS, until now
Comment: Ok so what version? Have you looked in launchpad? (the file-manager handling desktop icons is PCmanFM, the window manager is openbox) Have you updated from a previous version? -v
Comment: @turbo: i guess you're addressing me. what to look for in launchpad? i am in lubuntu 12.04, PCManFM 0.9.10. no updates. i blame nautilus for this, it has the habit of taking over the desktop. after uninstalling nautilus and restarting all ok for now.
Answer: Try uninstalling Nautilus if you have it installed and see if then it would work. Nautilus tends to take over the desktop sometimes in Lubuntu and Xubuntu, and even after recovering from this, certain problems like that reported may linger for some time.


My hip goes out of place within a matter of days after the Chiroproactor pops it back into place, is there any way I can pop it back myself?

Question: It is causing a lot of pain on my SI joint when the hip is out of place, Saturday I went to the Chrio and he popped it back in place, Sunday I noticed a huge improvement in my movement. By the end of the day Sunday, it was back out again. Now it's Monday and the pain is back, I'm sick of going into the office to get fixed and it only lasts a few days. Is there any technique for a self re-adjustment of the hip?
Comment: Is there a way you "can"? Sure. Should you go to the doctor instead? Absolutely. Talk to your doctor or chiropractor about why it keeps coming out of place and see what they suggest. If your chiropractor doesn't give you anything, talk to an actual medical doctor (M.D.) about it and see if they can find a better solution for you.
Comment: Ask your chiropractor about exercises to strengthen the appropriate muscles to address this issue.
Comment: @md5sum 'Sure.' do you know how?
Comment: This seems to be a medical question - treating an injury, rather than preventing a new one during an exercise.
Comment: For what it's worth, off-topic as it is, I have the same issues with my SI joints due to an old injury. I know the maneuver that the chiro is doing to you, which helps a lot. Look into something called a 'Trochanter Belt', which is a brace you wear low around your helps. At least in my case, when it gets bad, the belt helps keep everything in place while the swelling goes down in the joint, so everything stays 'in place' and doesn't wander. The joint isn't "out of place" in so much as swelling in the joint is hindering movement.
Comment: @StyxRiver thanks, I have a similar situation, I have a degenerative disc which causes the muscles to try and compensate and subsequently screwing up my SI joints
Answer: First off, I'm not a doctor, and you seriously should talk to yours to see if they can come up with a more permanent solution for you. However, depending on how badly out of place it is, you can sometimes put it back by sitting on the floor on your butt with your feet out, legs straight, then spread your legs apart. If it's badly out, this could fail and you could seriously injure yourself. If it's bad enough that this doesn't help, you could also have a friend help you do the Allis Maneuver.
In the Allis Maneuver, lay on your back, legs straight, and your friend should pull against your hip while pressing your pelvis down, rotating your leg up to a 90 degree angle with your back, knee bent at a 90 degree angle, then with a great deal of force pulling your leg up and pressing your pelvis down. This requires a great deal of force, and hurts really bad from what I understand. It is also very dangerous and you could end up (once again) seriously injuring yourself.
There is also the Stimson Maneuver, which would likely require 2 friends' assistance. I would advise very strongly against using any of the methods I've listed, and would urge you to go talk to your doctor. These maneuvers listed here could cause serious, permanent damage to your body.
Comment: If you can still walk, it likely isn't out of place. Talk to a real doctor (M.D.) and find out what's really going on.
Comment: Hmm, thanks. My chiropractor does a really simple move where I lay on my side and put my top arm over my head, and bend my top knee, then he just kind of crunches me. If I had a second person I could just have them learn that, but I want to do it by myself. I mean I can still walk around find, it's not like it's out of socket, it's just slightly misaligned or something. I asked the chiro if there was a way to do it myself and he just kind of brushed it off and said 'if there was I wouldn't have to have someone else adjust me' but I think it might be a marketing ploy.
Answer: I have a similar problem that was waking me up from sleep because of thepain, yet I could walk reasonably ok.  The Chiro popped it in place which brought some relief, but it lasted less than two days.
Doing a bit of research, I found that the best way for me to pop the hip back is actuall very simple.

Lie flat on your back with arms spread wide.  Legs stretched out straight.
Raise the leg with the popped/misaligned hip joint so that it is 90 deg to the floor.  (you can bend your leg at the knee if you desire)
Let the leg down slowly to the side until you hear/feel the joint pop back into place.
Initially I had to do this twice a day, now as the muscles have got stronger again, I need to do it only once or twice a week.

Simple and effective
Answer: If you will do some research, you will find that a Doctor of Chiropractic [DC] is highly trained in spinal manipulation - far more than a MD.  Self spinal manipulation can be very dangerous and cause serious injuries.  If you want to help your spinal condition, learn proper rehab exercises designed specifically for your condition by a DC or PT.  Counsult a DC who utilizes spinal imaging and works with other health care specialists to achieve the best correction for your problem.
God Bless, Sam
Answer: I've done a variety of sports and dancing over the years, and due to all this, my hips get misaligned and pop in and out very often. Although I can walk, it's often very painful to do so. This is what's going on with you, right?
There's a stretch my soccer team used which we call "opening and closing the gate." While standing, take the leg with the misaligned hip and raise the knee high, pushing out to the side as far as it will go (this is opening the gate). It should make a circular motion. Repeat a couple a times, then reverse the motion, going from outside-in (closing the gate).
As a martial artist, I use high kicks which follow the above mentioned circular path to do the same thing. I find that sticking my misaligned leg directly out to the side and stretching over it helps pop it back with the opening and closing the gate thing faster. Also, with opening the gate, you can leg your leg go down at the end of opening it, so your foot goes behind you. It tests pretty much all the movement of your hip, hopefully letting something move back in place.
You can also lay on a table (or bed, or whatever else that is sufficiently high off the ground) with your butt and lower back on the edge, your legs hanging off. Keeping your legs straight, let the injured one drop a little bit at a time until it clicks back into place. This option doesn't always work, and I admit that I found it by accident. This works really well if your hip was misaligned due to a split or similar movement.
Have you ever seen ballerinas grab their foot behind them and lift it above their head? You can try that too, which pulls the leg backward, stretching the hip and sometimes popping it back in. I suggest having a wall or sofa in front of you to lean on though, because with both hands on your leg you have to have amazing balance not to fall over.
You can also get on one knee, with the injured leg down, and rotate side to side. The farther back the downed knee is, the better the stretch -- but also the harder it is to rotate. Do this slow; quick movements can cause further injury.
I'm really sorry your hips are bothering you (and that I'm 2 years after this thread), but I hope all this helps you.
Note: I'm not claiming to give valid medical advice -- I'm just stating what has worked for me to realign my hips.
Answer: A chiropractor can do nothing for you other than pop it back in. I have this problem. You need to go to physical therapy and they can do different exercises for you which will help in time. My hip causes my lower back to hurt really bad and my leg on the side of my affected hip to have a throbbing pain. It hurts all the time and hurts more when I run or do any physical activity.
You also may have snapping hip syndrome which I was told I had. It causes you a lot of pain too and has similar pains but its where your tendons and muscles are too tight or too loose and your hip clicks over the group of muscles that run across your hip. I have been told that my hip pops in and out and wont stay in by physical therapists, but the DOC doctor said it was snapping hip syndrome.
So therefore, I do not know. I'm still getting physical therapy to find out what exactly is wrong and how to fix it. Either way it is hard to sleep and move and have a lot of back pain that comes with it. Check out snapping hip syndrome.
Answer: I have Sciatica and now my hip has popped out of place (been out about 4 months now since falling). I had a car wreck in 2008 and my hip was out of place then but I was able to work it back into place through working out and getting adjustments. However since I have fallen and popped it back out, I've been struggling to get it back into place so I can work out.
I have found that sleeping with a pillow helps and have looked up some physical therapy exercises on YouTube but just started using the techniques today. I have been told that stretching helps but honestly I can't afford to keep going to the chiropractor as after going to him for two months 3 times a week I'm still out of place.
I have stumbled across an exercise that pops my hip back in at least momentarily. Put a pillow in between your legs and bend down in the squat position keeping your legs together and pushing in with your legs slightly squeezing the pillow as your bending.
Comment: Note that this is a Q&A site and not a forum, check the [about] page to get an understanding how the site works. Currently I am not really sure if your answers really answers the question or is a question on its own.
Comment: Perhaps you would like to mention all the exercise suggested to you and explain them to make it clear for everyone.