no root shell freely available sudoers policies

Question: I want to prevent users who need escalated privileges from obtaining any kind of a root shell. However since there are many ways to attain this, and many non root commands ( like those found in coreutils ) I'm wondering if there are any downloadable sudoers policies that provide restrictive access.
Comment: I genuinely don't understand what you're asking. Could you please clarify your question?
Comment: What is the difference between them having a shell and just using sudo to execute the commands?  You can give them access to only a certain command (or, I believe, a list), is that what you want?
Comment: The only safe `sudoers` is an empty `sudoers`. By default, assume that any command has a shell escape. Running a specific command with escalated privileges corresponds to exceptional needs, and you need to study each exception. I don't understand what you're after: a list of safe commands? That doesn't exist; the vast majority of safe commands are useless.
Comment: Are there any special programs that give you headaches?
Comment: I want to know if there are any downloadable policies that provide a list of common shell programs that do not provide a shell themselves so to speak. I'm basically looking for a preexisting security policy, though such a thing may not exist in any distributable form (outside of the default sample)
Answer: sudo
overview
sudo allows you to give users and groups super user privileges.  sudo's configuration file can be found at /etc/sudoers.  Typically, one edits the sudoers file using the command visudo.  By default on most distributions, either no user is given sudo privileges, or the first user created is given such privileges.  After that, users are typically created without sudo privileges.
flexibility
sudo allows you to give each user different settings, or even apply settings to groups of users.  For example, you could give the user admin or the group admins access to gain super user privileges.
You can also allow these users access to specific programs.  For example, you can give Bob sudo access to apt-get if you trust Bob to install packages and update packages on your system.
Your system most likely has a sudoers file, in which case you can open the file and see the examples provided.  I will show you an example here that might clear things up:
<code># Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) NOPASSWD:ALL
</code>
This gives any user in the group of sudo privileges to run any command anywhere without prompting for a password.  The user must first authenticate (ie: login), but once that happens, these users will have root access to the machine.
tl;dr
Most distributions give the initial user sudo access, but users created thereafter are not given such access.  You can verify this by viewing /etc/sudoers.  Simply make sure users have no access to sudo via sudoers file to ensure no user can gain root shell via sudo.
Answer: I'm not sure I understand the question. However, if you grant some user root permissions (through sudo or whatever) to execute a program and that this program happens to provide access to a shell with these same permissions, you can't do anything against it.
When you give some permissions to execute a specific program you have to trust the program for not messing up (except, of course, if you really trust the user).
Answer: Are you looking for something like this:
<code># Allow members of group sudo to execute any command
username  ALL = ALL, !/bin/sh, !/bin/bash, !/bin/tcsh, !/bin/csh, !/bin/ksh, !/bin/zsh, !/bin/su
</code>
Comment: You forgot shutdown, halt, mkfs, dd... IMO there is **no secure way** maintaining a blacklist of possible dangerous programs. Go with a whitelist instead and think very hard why you would want users to have root-privileges in the first place.
Comment: essentially, though more comprehensive
Comment: @xenoterracide: +1 for Alex. There is no secure way to maintain a blacklist. A user can always `cp /bin/sh ~/not_a_shell ; sudo ~/not_a_shell` or `sudo ex +':!/bin/sh'`. Rather than trying to make it impossible, provide a supported/approved way that will audit and make people justify any elevation to full root.
Comment: well this is why I was asking if there are any downloadable policies... obviously publicly audited tools/policies are more secure than me or someone just coming up with them myself.


OpenGL 1.1 fog performance on iPad

Question: is there a way to change per fragment fog to per vertex fog on iPad using OpenGL 1.1?
I have tried glHint(GL_FOG_HINT, GL_FASTEST) but the fps is still very low when using fog(fps is more than double without fog)
Answer: The iPad tends to be fill-rate bound.  It has a big screen and a GPU that's about the same speed as an iPhone 3GS.  So the per-fragment cost of the fog multiply can be significant.
The problem isn't the 'per fragment' issue (when I last checked, fog was per vertex on the ipad when running GLES 1.1) but that even a per-vertex attribute requires some small amount of fragment work.  There was also a bug at one point (I do not know if it was fixed) where the fixed function fog was slower than necessary.
If you think that fog fill rate is lower than it should be and you can't do without fog in some cases, you may want to consider a rewrite to GLES 2.0, which would let you provide your own hand-optimized shader.  We did this for our title and it was worth it fps-wise.

OpenGL 1.1 fog performance on iPad


Related list missing in Community until record is created

Question: We have a community that exposes standard salesforce functionality (Salesforce tabs with visualforce).  We have noticed that related lists do not appear to community users until at least one related record has been created.  This seems very strange as once a related list record is created the community user can create new, edit, and delete this related list record.  Issue here is that users cannot create related records until one exists..  Anyone know why this is happening or how to prevent?
Answer: This was due to the master record being locked in an approval process.  Once the parent record was unlocked the related list appeared.


How to filter a node reference field in content type form

Question: I have a node reference field (User groups) in my content type; i would like to apply a filter on that field to show only the Groups belonged to the current user.
How can i apply that filter in the content type insert/edit form?
Answer: I've written step by step instructions on how to do that.
Your setup will be a bit different since you don't use flags. "Step 3" describes how to use the "views reference" feature to show the referenced nodes on your node/add,edit page using views.


"weakness", "shortcoming", "demerit" and "defect"

Question: The four words"weakness", "shortcoming", "demerit" and "defect" are four words shared with the similar meanings. In the dictionary, "weakness" and "shortcoming" have more to do with one's characer, while "demerit" and "defect" are used in a general sense. However, in this sentence, "The ___in David's character has hindered him from advancing in his character." Why the correct answer was said to be "defect" rather than the other three?
Comment: The only one that sounds wrong would be 'demerit'. All the other 3 seem OK to me.
Comment: Suggested duplicate does not discuss the word "defect" which specifically needs to be discussed to answer this question.
Comment: It's still a duplicate. It is the same asker and the only difference is an addition of two words.
Answer: I would say that character defect is the most common term of those suggested.
You can also talk of character flaws, character weaknesses, or even character shortcomings - but certainly not character demerits.
Answer: The defect in David's character has hindered him from advancing in his character. This is the right sentence because, defect is the general form of imperfection, shortcoming and other words used to define incompleteness in ones character. Defect has hindered David from perfection.
Answer: In what way was "defect" said to be the correct answer?  Were the other three given as possible answers?  Or were you specifically asked to fill in an answer without being given this list of options?  If it was the latter, which answer did you give?
Any and all of these factors could be the reason that the answer given was 'wrong'...but if it is simply the word listed as 'the answer' in a book, it is also possible that the author of the question did not take synonyms into account, and only gave the one answer as a "correct" answer.
"Demerit" does not make quite as much sense, because a demerit is a factor given to someone, rather than inherent trait as the sentence suggests.  And "shortcoming" would require some other context to clarify what shortcoming is being referred to, and if it were then the sentence would have to start with "This" as in "This shortcoming", but it does not.  I could see "weakness" being correct, as well as "defect", but these subtle problems for the other two answers makes them lesser choices.
It's also possible you were asked to pick the "best" answer, which would mean the one that is accurate in most cases.  In this case, "defect" would cover as broad a range of uses as possible, given no other context to the sentence.
Answer: Kind of arbitrary, there. Perhaps his defect is a tendency to redundancy, since one's character hindering one's character is a bit of a tautology.
Seriously, this seems like a test question, and the test is about prepositions, not words. Look at the hole -  in David's...

The demerit in David's character has hindered him from advancing in his character.
-- Demerit is right out, because a demerit is based on actions, not nature, and character implies to nature.
The weakness in David's character has hindered him from advancing in his character.
The shortcoming in David's character has hindered him from advancing in his character.
-- Weakness and shortcoming need to be followed by 'of', not 'in' because they are non-specific and apply to the overall, not a specific aspect of the character. Therefore, they are of the character, not in it and are not correct here.
The defect in David's character has hindered him from advancing in his character.
-- Defect is a specific article, and therefore is part of the whole, and belongs with in.


Can Selenium automate iOS Safari webpage tests on a real iPhone?

Question: I want to automate a website on a real iPhone  with Selenium.  Is that possible or do I need Appium?  Ideally I will launch my tests from my Windows machine via RemoteWebDriver
edit: it looks like it might work in iOS 13
https://webkit.org/blog/9395/webdriver-is-coming-to-safari-in-ios-13/
Answer: Of course you can test with real devices (iPhone) but you need Appium (I suppose you don't want to spend amount of money for e.g. saucelabs)
We tested this in our company´s project furthermore let me say that for running iPhone you also need an Apple Mac.
Furthermore you will need:

Ecclipse
Appium
XCode
TestNG
...

There are some good tutorials: Toolsqa-Appium and Automated Testing Appium


How to convert a number with more decimal places to the number as it shows on the screen?

Question: I came across a situation where many results got many decimal places. For further calculations in my situation, I would just take the value as it shows on the screen and drop further digits. For example, I have aa = Pi/2 // N, which shows on my screen as 1.5708 while its actual value is 1.5707963267948966'. I would like to have a process that turns this value aa with many digits to its approximation bb which would be just 1.5708. I do not want to specify number of decimal places, but will take what appears on the screen (since other results may have a different number of decimal places). Also, this bb needs to be able for use towards further calculations, such that bb + 1 will give me 2.5708 exactly.
Comment: You should perhaps know that the number of digits displayed by default is determined by `Options[$FrontEnd, PrintPrecision]`, so you could just use `Round[]` along with that setting.
Answer: aa = Pi/2 // N;

bb = ToExpression[ToString[aa]]

1.5708

bb + 1

2.5708
Comment: I've long used the following which is similar to Chris's answer.
Answer:
I would like to have a process that turns this value aa with many
  digits to its approximation bb which would be just 1.5708

If you mean here a "manual process", then you can do a "copy as plainText" -> "Paste"

Compare with what happens with a normal Copy-> Paste (on Windows: Crtl-C -> Ctlr-V)
Comment: Sorry for the ambiguity, but I was looking for a function type of process. Thanks though.
Answer: I've long used the following which is similar to Chris Dengen's answer above. However the addition of NumberForm, InputForm and a parameter n make this a workhorse for me.
Why would I need this in Mathematica? One example. Suppose I do a model fit to data of lower precision and get back model parameters to 15 decimal points. No way. Using parameters in my model with that much precision conveys a lack of understanding on my part of the approximate nature of the model. And perhaps confuses the model user. So I convert the list of parameters using sigFig before embedding it in the model function that I deliver to a customer. (I have never understood why this isn't built-in to Mathematica.)
sigFig::usage = "sigFig[4.912238383] returns 4.91, sigFig[4.912238383,1] returns 5";

sigFig[x_, n_:3] :=
 ToExpression[ToString[NumberForm[x, n], InputForm]];

test = sigFig[4.91223, #] & /@ Range[1, 20];


How do I map a key on the A1048 109-key Keyboard to provide an "FN" button?

Question: I have an Apple A1048 109-key keyboard that I really like, except it does not have an FN button, which is a bit annoying.  Is there any way to remap one of the keys (I'm thinking the 'help' key) to function as an FN key?
Comment: What are you hoping the FN button would do?
Comment: I'm hoping it will do what the FN button always does -- act as a modifier so that FN1-FN12 have different behaviors, for instance, I can hold it down and press F3 to show the desktop instead of sending an F3 key
Comment: That isn't really an accurate statement "What it always does" -- prior to 2007, Apple keyboards didn't have a "fn" key, and while there are modifiers that could change what code the F3 key sends (like option or shift, for instance), fn to date isn't the same sort of modifier. I wish it weren't the case, but adding "fn" isn't the same as adding an option key or a command key.
Answer: You will not be able to do this.  The controller in the keyboard sends a keycode to the OS whenever a key is pressed.  That keycode is unique to every key on the keyboard... except for the Fn key.
The Fn key, modifies other keys on the keyboard, as does Shift, Alt, Ctrl, Option, etc... the only difference is that each of the latter modifiers is recognized by the OS.  In other words, the keyboard controller tells the OS that "shift" was pressed, at the same time as the "s" key.  The OS then iterprets that to mean the user wants a capital letter "s" or "S".
This is not the case with the Fn key.  The fact that it is pressed is captured by the keyboard controller and a separate, unique, keycode is sent when you press the next key.  For instance F1 sends a keycode, lets call that keycode "xyz"   When Fn and F1 are pressed at the same time, a different keycode is sent to the OS.
What you could do is discover what those keycodes are...the ones that are issued when you press Fn + F1-f13.  Then if you wern't using the function keys for their original purpose, you could map those to the new keycodes (the equivalent of pressing Fn+Fx) and go from there to get your volume keys and all the rest of the goodies that Apple hides up there.
Checkout this article form Wikipedia: http://en.wikipedia.org/wiki/Fn_key

Alternatively, the Keyboard settings pane of System Preferences will allow you switch whether you wanted a single keypress of any function key to send the keycode equivalent of Fn+Fx or simply Fx.   Perhaps you can use that checkbox to get what you want...  though I don't think it will work with your keyboard.  I think you need a newer keyboard to get this to work.
Answer: Many articles online claim that Fn key is fundamentally different and there is no way to remap another key to Fn. I blindly believed them. It is not true.
At least on Mac, you can install Karabiner-Elements, the powerful keyboard customizer for macOS. You can remap the key you desire, such as help or F16, to Fn.
Note: the help key on A1048 is actually a standard insert key. So choose insert in the From key dropdown menu, do not choose help. See attached picture below. Nonetheless, help is kind of a good name for a Fn modifier.
For A1048, the top right 4 keys: -vol, +vol, mute, eject, cannot be remapped. It seems Karabiner doesnot recognize these media keys (as in its Karabiner EventViewer).
Enjoy the new key! I believe this also applies to other non-Apple PC keyboards.
Comment: You can *only* do this if the Fn key sends a keycode to the OS.  See:https://apple.stackexchange.com/a/331519/119271  There is no standard for Fn key placement or function so it's different across makes, models, and manufacturers.  It's also not global across all Mac products either.  If the keyboard doesn't send the code, no app will be able to remap it.
Comment: @Allan, thanks for your input. And I just reproduced this with another cheap PC keyboard: Lenovo K4803 (SK-2085). Both K4803 and Apple A1048 do not have an `Fn` key, the are completely different "makes, models and manufacturers", and I am able to "map a key on the A1048 109-key Keyboard to provide an "FN" button", as the OP asked. I am using MBPr15 with macOS 10.15.4.


12.10 Black screen on boot after unplugging external monitor

Question: Here is my story:
1. I plugged an external VGA monitor to my laptor (Dell Vostro 3550) and configured dual display using System Settings/Displays. Everything worked well
2. I unplugged the external monitor, switched off my laptop and left my office
3. Being at home, when I turn on my laptop I get a blank screen on my LCD display. Ctrl+Alt+F1...F7 doesn't work. I assume that my primary display is still set to the external monitor, but I don't have any external monitor at home. How can I switch back to LCD?
Answer: A quick and dirty method

Boot into recovery
Select 'root'
Remount root partition as writable

mount -o remount,rw /

Backup, but remove your xorg.conf

mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

Reboot

Plan ahead
Do some research on Disper and see if it can ease your monitor woes once you've gotten back on your system.  You might find this post informative.
Comment: Today I tried plugging back the external monitor - it didn't help, both monitors were black. I have found out that this problem occurs only with 18.104.22.168 kernel. If I boot with the previous 188.8.131.52 kernel, all monitors work fine. Can it have anything to do with xorg.conf?
Comment: Actually, it sounds like your drivers haven't been re-compiled for your new kernel.  Have you installed your gfx drivers manually?  Are you using ATI, nVidia, or Intel?
Comment: I didn't instally any drivers - I'm using the ones shipped with Ubuntu. This laptop has a hybrid graphics. That's what `lspi | grep VGA` gives:
`00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Whistler [AMD Radeon HD 6600M Series]`
The boot behaviour is unpredictable. Sometimes have to use the old kernel, sometimes everything works fine with the new kernel.
Answer: I use Ubuntu 16. Before disconnecting the external monitor, you could go to display settings and manually turn off the external one. Then try to disconnect. Works for me.


Whats the difference between a Cloudpage and microsite in Salesforce Marketing cloud

Question: My understanding is a cloudpage is a way to create a webpage using html/css/js.
From what I can see a microsite is the same thing.
Is there a difference?
Comment: Nothing difference in current version of marketing cloud account doesn't contain microsite pages
Answer: So when you say Microsite, there are two versions of Microsites -- the Classic version or CloudPages Microsites. Both essentially just tie together landing pages/Cloud Pages in a site map.
The classic version of Microsites uses landing pages in classic content. CloudPages Microsites is the newer version.
Similar to Content Builder versus Classic Content, CloudPages uses a WYSIWYG editor within the tool
Answer: A microsite is a collection of one or more landing pages hosted in your account. Use a microsite to contain information beyond what you include in an email. For example, you can create a microsite to contain a lead-generation form, an opt-in subscriber form, or to direct subscribers to more information about a corporate initiative. A larger distinction is that allows to host landing pages in your designated account.


Random "start afresh" of Brownian Motion

Question: In the book "Brownian Motion and Stochastic Calculus" by Karatzas and Shreve I encountered Problem 6.1 which the authors refer to as "not be hard to show":
Let $\{B_t, \cal{F}_t;t\geq 0\}$ be a standard, one-dimensional Brownian motion. Give an example of a random time $S$ with $P[0\leq S<\infty]=1$, such that with $W_t:=B_{S+t}-B_S$, the process $W=\{W_t, \cal{F}^W_t;t\geq 0\}$ is not a Brownian motion.
Surely, if S being a stopping time $(W_t)_t$ would still be a Brownian motion. I tried out some distributions for $S$ but none of them gave a sufficient answer.
Most likely I am missing a crucial point here and appreciate any kind of help.
Answer: Let $S = \inf \{s\ge 0:B_{s+1}-B_s\ge 0\}$. Since $W_1\ge0$ almost surely, $W_t$ cannot be a Brownian motion.


Large-$N$ Yang Mills

Question: I've bumped into the study of the $SU(N)$ theory in the large-$N$ limit.
I'm wondering in which way the study of this Yang-Mills theory, can give contribution to QCD with gauge group $SU(3)$, i.e. $N=3$ Any suggestion?
Answer: Maybe I've figure out something about that.
QCD is an asymptotically free theory, so while for the high energy regime, consider the perturbative method, expanding around $g=0$, is perfectly consistent, for the low energy scales this approach becomes useless.
An attempt to manage this problem, is to consider an expansion in terms of the parameter $\frac{1}{N}$. Doing so the leading term is equal for every $SU(N)$  theory, and so for QCD, and this term is the only contribution in the large-$N$ case.
Answer: The large $N$ limit ('t Hooft) of QCD (or in general, theories where the gauge field is in the adjoint representation, matrix models) was introduced in 1974 as a hope to analytically understand QCD outside perturbative regime. The large $N$ QCD is also asymptotically free and captures some of the important features of SU(3). This large $N$ idea also gave rise to the concept of master field (or master orbit), but till date it has not been constructed for d=4 QCD. There does exist large $N$ exact analytical results in two dimensions QCD. It was hoped that by doing expansion in 1/N, one can know about QCD. Also note that there exists many different ways in which one can take this limit (Corrigan-Ramond, Veneziano).

Large-$N$ Yang Mills


Cannot convert type via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion

Question: In C#, if I have a parameter for a function where the parameter type is of an interface, how do a pass in an object that implements the interface.
Here is an example:
The parameter for a function is as follows:
List<ICustomRequired>

The list that I already have is as follows:
List<CustomObject> exampleList

CustomObject inherits from the ICustomRequired interface
What is the correct syntax to pass the exampleList as a parameter?
This is how I thought to do the above task:
exampleList as List<ICustomRequired>

However I am getting the following error:

Cannot convert type via a reference conversion, boxing conversion,
  unboxing conversion, wrapping conversion, or null type conversion

Thanks
Answer: You cannot cast a List of one type to a List of a different type.
And if you think about it, you would be glad that you can't. Imagine the havoc you could cause if it was possible:
 interface ICustomRequired
 {
 }

 class ImplementationOne : ICustomRequired
 {
 }

 class ImplementationTwo: ICustomRequired
 {
 }

 var listOne = new List<ImplementationOne>();
 var castReference = listOne as List<ICustomRequired>();
 // Because you did a cast, the two instances would point
 // to the same in-memory object

 // Now I can do this....
 castReference.Add(new ImplementationTwo());

 // listOne was constructed as a list of ImplementationOne objects,
 // but I just managed to insert an object of a different type

Note, however, that this line of code is legal:
 exampleList as IEnumerable<ICustomRequired>;

This would be safe, because IEnumerable does not provide you with any means to add new objects.
IEnumerable<T> is actually defined as IEnumerable<out t>, which means the type parameter is Covariant.
Are you able to change the parameter of the function to IEnumerable<ICustomRequired>?
Otherwise your only option will be to create a new List.
var newList = (exampleList as IEnumerable<ICustomRequired>).ToList();

or
var newList = exampleList.Cast<ICustomRequired>().ToList();

Answer: You can't do that, you have to convert list
exampleList.Cast<ICustomRequired>().ToList();

Answer: In additional to List.Cast, C#'s generics provide a good support for Covariance and contravariance. This example causes it to work in the way I think you originally intended.
public class Program
{
    public static void Main()
    {
         Foo(new List<Fim>());
    }

    public static void Foo<T>(List<T> bar) where T : IFim
    {
        throw new NotImplementedException();
    }

    public class IFim{}
    public class Fim : IFim{}
}


Network product (software and hardware) vendors independent from NSA in 2018

Question: Which vendors of network products like firewalls, routers, switches, VPN softwares and similar are likely to be free from backdoors, already built in surveillance capabilities, secretly broken encryption keys inserted by NSA? Is there an independent vendor that can say no to NSA cheating?
Comment: I propose to close the question. Given that you don't trust the vendors since they might have added secret backdoors you similarly should not trust any advice you get here about backdoor-free systems since these might be deliberately false to trick you into trusting specific vendors. Also, one vendor which might be "clean" today might be corrupted tomorrow.
Comment: I see: you actually trust both the vendors and this forum to not lie to you.  In this case I recommend that you figure out exactly what kind of use case you have, find out which products fit this use case and then ask the specific vendors about their relationship to the NSA. Because, at the end you need to have some problem solved and cannot just switch to a trusted vendor even though it doesn't provide solutions for your problem.
Comment: Even if a vendor is free from regulation, you have no idea if a shipment has been intercepted and the device altered. Plus you are assuming that some guys on a random web site aren't lying to you.
Comment: I do not agree. Few years ago on Allied Telesis presentation of their network devices, one of the main item in their portofolio was that their devices don't subject to NSA regulation. We all knew what the presenter ment.  Cisco for example, never said something similar. I emphasized that I need information for the year of 2018.
Answer: Open source software, like OpenVPN is likely to be free of back-doors. Other than that, depends on how paranoid you are, but it is possible for back-doors to be in everything.
While companies based in other countries may be able to say no, the NSA according to leaks had budget to pay them for cooperation. They could also make it hard for resisting companies to sell in the US, which is a huge market.
Note: As Steffen Ullrich mentioned, there may be hard to find back-doors in open software, such as careful choice of DH keys. To avoid these, you want to generate your own keys and parameters. Using your own will prevent any such back-door. You also don't want to use NIST curves for elyptic cryptography.
Comment: While it is more likely that open source software is free of obvious backdoors there might be backdoors which are less obvious. These could be for example the choice of specific DH keys which allow a NOBUS (Nobody but us) attack. See [How to Backdoor Diffie-Hellman](https://www.cryptologie.net/article/360/how-to-backdoor-diffie-hellman-quick-explanation/).
Comment: Additionally, there is no functional difference between a backdoor and a 0day with equivalent capabilities. And the NSA (or rather, contractors they hire) _do_ have 0days for OpenVPN and many other popular applications (at least in their default configuration).


Panels call custom function

Question: Is it possible to call custom code from a panel? My custom module has a function which returns some content. I wish to call this from my panel.
Answer: It is, but requires a bit of coding. You need to create a ctools content type plugin. I had the same issue a few months back, and found this to be a reasonably good guide for writing you r own content type:
http://shellmultimedia.com/articles/creating-content-type-ctools-panels-3
There are also a couple other options:

Expose the data your function is providing in a block. Blocks are automatically supported by panels.
You could (likely) use custom PHP in a panels pane. (highly discouraged)
Answer: Here's a hackier/quicker solution.
Create a custom content pane using the PHP input format for the content area. Call your function.
You will not have simple access to panels contexts (which you may not need anyway), and must have the PHP input format enabled (which can potentially cause security problems).
You have access to the args, etc so you can pull nid from arg(1) if it's a node panel for example.

Panels call custom function


Can't edit driven number value, see graph editor for the driver setup

Question: Good day. I get the error "Can't edit driven number value, see graph editor for the driver setup." I have a leg that I will bend. To make it look good, I decided to follow this video (https://youtu.be/CaHomz6gPWY?list=PLRNEtMVoxM681OU2OEl5FDH-6O8CLlP8X). But after I follow it step by step and install the driver, my value is reset to zero, the transformation is not applied, and this error also appears. If I uncheck "Does F-Curve contribute to result" in the drivers editor, then the transformation is applied, but the error keeps coming out and the shape keys do not work correctly. I created a new file from scratch, and used a regular cylinder, but the error appears anyway. Rotation of the model in Video happens to be set to X and in my model also rotation is set to X. What am I doing wrong?
Answer: So. I finally solved the problem by following this video  (https://www.youtube.com/watch?v=f3JWNIkwBZ8). To fix it, in the Driver window add  Modifier Generator and change Y in it from -1 to 1.


What is the difference between a Token Account and an Associated Token Account?

Question: The docs mention both 'Token Account' and an 'Associated Token Account'.
Are 'Token Account' and 'Associated Token Account' the same thing, or different?
What is the relationship between these two?
Answer: Thanks to Jordan Sexton for helping me out with this on the phone.
An 'Associated Token Account' refers to the address:
Addresses
  Pubkeys (on the curve)
  PDA (off the curve)
    ATA (PDA for storing tokens of a particular mint in a wallet)
    Any other PDA (for example, some data used by an on-chain program)

A 'Token Account' refers to the byte format
Byte format (ie, what's inside the account at an address)
Account contents
  Not token accounts
  Token accounts
    SPL Token
    SPL Token 22
    Any other token program

An 'associated token account' is a token account (byte format) that lives at an associated token account address (address).
Answer: Token Account: A Token Account is a regular Solana account that holds a specific type of token. It is similar to a regular Solana account but is specifically designed to hold tokens. Each token on the Solana blockchain has its own associated Token Account.
Associated Token Account: An Associated Token Account is a special type of account that is associated with a particular wallet or address. It is created using a program called the Token Program, which is responsible for managing token-related operations on the Solana blockchain.
Associated Token Accounts are automatically created when a user interacts with a token for the first time. They are linked to the user's main wallet or address and are used to hold and manage specific tokens associated with that wallet.
A wallet address can have 1 associated token account for 1 token and multiple token accounts for that token.
When a user transfers a token from 1 wallet to another, it uses associated token accounts, since it is uniquely identified for each token per wallet.
Example usage of Token Account:
If a user tries to stake a token from the wallet, the smart contract creates a token account for the staked token to lock in the token.
Comment: this isn't quite correct - each 'token' actually has a `Mint` account that stores things like mint authority. Both token accounts and associated token accounts store per-user token information, like balances.
Comment: how does Mint account comes into play when we are discussing Token & associated token account?


Been is confusing me HELP!

Question: I was watching tv series where police said "he could have been wearing gloves' I think he speculated the past event..but I really can't understand the reason behind using ing and been...because we usually speculate past thing something like that "they could have gone there" I want to know the meaning and you can give me more example like this
Comment: Do you mean as opposed to *...could have **worn** gloves*? Often it's just a stylistic choice.
Comment: It doesn't need a transitive verb. "I could have been working" is a very common construction. I am working, I was working, I have been working.
Comment: Quote marks in English are " and " .  Don't use ((( ))) to delimit quotes.  The ((( ))) has been used by various anti-semitic groups, that you probably don't want to be associated with. Please remember to spell correctly:  The correct spelling of I is never i.
Answer: Have + past participle => perfect (eg I have seen)
Be + present participle => continuous (eg I am wearing)
Put them together and you get
Have + past participle of be + present participle => perfect continuous (eg I have been wearing)
I have worn gloves usually means "On at least one occasion, not necessarily recently, I wore gloves" - the "present relevance" indicated by the perfect here means "These occasions occurred over a period extending up to the present (even if there didn't happen to be a recent occasion)".
I have been wearing gloves focuses on the wearing as a continuing event: it usually indicates a recent occasion.

Been is confusing me HELP!


Speed bigger than light?

Question: We know, according relativity theory, no information or matter  can travel with velocity bigger than light. However, consider the following situation: a completely empty water hose is hypothetically connected between the sun and the earth. After this, we turn on the water hose until it stay completely full,  next we turn off. When we turn on again here on the earth, the water will arrive instantly on the sun in order a person there, to receive instantly the information that the water hose was turned on here on the earth. This case, the information travel with velocity bigger than light, violating the relativity theory. How can this happen?
Comment: The water won't come out instantly. When you turn on the hose there will be a pressure wave which will travel through the water at the speed of sound and when that reaches the sun the water will come out.
Answer: First of all, you have completely ignored many properties of fluids such as compressibility, viscosity, etc. One can easily argue in the macro domain saying that there would be compression of water, there would be a pressure-density wave (technically, this disturbance is a sound wave propagating through the medium whose speed if of course limited to a very small quantity) which carry the energy and what not.
If you go a little deeper, there are forces which are responsible for pushing the water molecules. These forces are carried by particles called force carriers which are just packets of energy. But whatever the particle maybe, it must obey the laws of physics which means, it cannot go any faster than the speed of light. Hence, there would be a time lag before one would see the effect at the sun.
You can also argue that, the liquid is made up of atoms and all of the atoms in the liquid cannot all of a sudden start moving together. Every atom must tell the adjacent atom that "Hey! I am getting closer to you, We don't like each other! Move away" and hence something similar to a chain reaction takes place. The atom basically exerts an electromagnetic force to repel the atoms which get too close to it. This electromagnetic force is carried by photons, which is light and travels at the speed of light.
Answer: Water is compressible (and stretchable). Disturbance, in your case, some form of sound, travels at most as fast as sound in water. This is about million times slower than light. The same with steel rod.

Speed bigger than light?


PAB connection to public testnet or mainnet (Example/Tutorial)

Question: Does anyone know and want to share any information on how to connect PAB to public testnet (not simulator) or mainnet? Are there any examples/tutorials for it?
Answer: You have the best instruction here https://gist.github.com/mikekeke/883d56c38e0237444ac98ae5257e174f
Also after the setup on the above link, you can use this starter project generated from the Plutus starter template just updated to work with PAB on testnet https://github.com/invictusappscom/plutus-starter-pab-testnet Here main differences from https://github.com/input-output-hk/plutus-starter are that dependencies are updated and it is added plutus-pab.yaml configuration file. Also here instead of simulator it is using the real PAB https://github.com/invictusappscom/plutus-starter-pab-testnet/blob/main/pab/Main.hs
Another useful resources:

https://github.com/input-output-hk/plutus-apps/blob/main/plutus-pab/ARCHITECTURE.adoc
https://github.com/input-output-hk/plutus-apps/tree/main/plutus-pab/test-node
Comment: Do I have to run a full node to run the PAB in the testnet?
Comment: Yes, you need to have a running testnet node. Also, wallet server and chain-index connected to the node.


Intrinsic semiconductor having less conductivity than extrinsic conductor

Question: The question is quite simple.Why intrinsic semiconductor has less conductivity than extrinsic semiconductor? I want to know the exact doping concentration per atoms in extrinsic semiconductor relative to room temperature excited intrinsic ions.
Comment: I don't have actual data, but it is only obvious why extrinsic semiconductor has greater conductivity: they have charge carriers **in addition** to intrinsically generated charge carriers (holes and electrons).
Comment: Intrinsic Si populations are order 10$^{12}$ per cc. Doping levels are 10$^{15}$ to 10$^{20}$ per cc. See the difference?
Comment: @samjoe Thanks for your reply.I know about the number of charge carriers being more in extrinsic than in intrinsic.Its just that i want to know how many dopant atoms are injected per Si or Ge atoms.And how that differentiates from the number of electrons being free in intrinsic semiconductor,both at room temperature
Answer: Intrinsic semiconductors have a dissociated population (a bunch of
holes and electrons that separate due to temperature, and can
contribute to conduction until they recombine).   Because a high
population of holes and electrons would cause a very FAST
rate of recombination (faster than thermal generation occurs) , and a very low population of holes or
electrons would cause very SLOW recombination (slower than thermal
generation of pairs), it should be no surprise that
at equilibrium, the fractional population of holes $ n_p$ and electrons $n_e$,
is related by an equation
$$constant = n_p \times n_e = n_i^2$$
where the $n_i^2$ symbolizes the at-thermal-equilibrium
numbers of holes and also of electrons.
For intrinsic silicon, $$n_p = n_e = n_i$$
Doping generates a large number of (for instance) electrons, pushing $n_e$ up,
and by the equilibrium equation, forces $n_p$ down.   But, conduction
of electricity depends on the SUM of the holes and electrons.   If one
has  undoped material conduction is
$$K  \times (n_e + n_p)  = K \times 2 n_i$$
but for  $n_e = 100 \times n_i$ doped material, that conduction goes
up to $$ K \times (n_e + n_p) = K \times 100.01 \times n_i$$
That's the basics (but holes are less mobile than electrons and
the real conductivity is a messier formula).
All doped silicon has more charge carriers than if it were intrinsic (undoped).
The doping level is controllable over many orders of magnitude,
which allows a wide range of properties of near pure material.


Can a wallet allow you to receive Bitcoins from the same wallet you send them from?

Question: Can a wallet allow you to receive Bitcoins from the same wallet you send them from, and if so, why would there be some reason why this shouldn't be done.
Comment: Related: http://bitcoin.stackexchange.com/q/8191/153
Answer: Some wallets do allow you to receive coins to the same addr they are sent from. But generally this is not a good idea; your transactions could be more easily traced this way.
Comment: Why would that make tracing easier ?
Answer: You can send coins to any valid Bitcoin address, including one of your own. The only reason why this shouldn't be done is that one is paying the transaction fees to transfer money to their own addresses. On the other hand, it is not a bad idea if one of your addresses in a wallet is compromised, but then again that is a good reason to create a completely new wallet and transfer all the money there.
Comment: Wouldn't this be a good way to consolidate UTXO's?
Comment: Yes, spending a bunch/many/all of your UTXOs to another address in your own wallet is exactly what a consolidation transaction does.—If you have a new question, please start a new topic.
Answer: This is a fundamental way that wallets operate.  Your wallet is list of bitcoin addresses.  A typical transaction sends all of your money out of one of these addresses and back to a new one in your wallet, as well as to your recipient.
If you mean can an address receive coins it was sent, the answer is a resounding yes - that is exactly how satoshidice works, which at one point was the biggest mover of all bitcoin.
Comment: Note that while the original Bitcoin client would always spend all funds in every transaction, meanwhile wallets have gotten a lot more selective in funding transactions. See e.g. https://bitcoin.stackexchange.com/q/1077/5406


Can I trust a repo I am unfamiliar with to provide me a secure PHP 8.0 package?

Question: Throughout internet, I've only found references to add ondrej/php repository in order to upgrade to PHP-8 (on Ubuntu, if that matters). I am not familiar, either who is ondrej (sorry for that, maybe he is like "Linus in PHP world", but I am not veteran dev and don't know) and wanted to know, is that safe way to install PHP 8  and is that official repository?

update: Turned out there are ways compile official php (from github).
Comment: If you are not sure, then don't do it and accept whatever version of php is available for the version of Ubuntu you are using.  The PPA you're talking about says fairly [explicitly](https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa) that there are no guarantees of timely updates.  This is the cost of deviating from the standard packages.  Alternatively, you can download PHP from the [source](https://www.php.net/downloads.php) and learn how to install it for yourself.  That's the safest option if you really need version 8.
Comment: What version of ubuntu do you have installed?
Comment: I regard Ondrej Repo in Linux like Xampp or Wampp in Windows!
Answer: It is safe to install php from ondrej/php ppa.
WHO AM I?

I am a Debian Developer since year 2000, and I have been packaging PHP for Debian since PHP 5. That means the official packages in Debian and Ubuntu are either my work or they are based on my work. The PHP packages in my Ubuntu PPA and Debian DPA matches the official packages in Debian. Basically I am saying that you can't get any closer than that.

Askubuntu : @oerdnj

I am a Director of DNS Engineering at ISC, Debian Developer since 2000, Ubuntu Member since 2005, founding member of Ubuntu Česká Republika since 2004.

I (co-)maintain Apache2, PHP, MariaDB, Cyrus SASL, Cyrus IMAP, Berkeley DB and all things DNS in Debian and also have semi-official PPAs for those packages (PHP). I have been member of Debian GNOME GTK+ packaging team. (In other words I've seen things you people wouldn't believe. :-))

I am author of two apache modules (mod-vhost-ldap and mod-log-spread2) and I am co-author of Knot DNS, a fast authoritative-only DNS server, and now I work on BIND, the most used DNS server on the Internet.

I have expertise in routing, DNS, DNSSEC, Debian packaging and much more to list here :).

The developer is preparing a newcomer package debsuryorg-archive-keyring to automatically update the PGP key.
The apt-key list should print:
pub   rsa1024 2009-01-26 [SC]
      14AA 40EC 0831 7567 56D7  F66C 4F4E A0AA E526 7A6C
uid           [ unknown] Launchpad PPA for Ondřej Surý

twitter: Ondřej Surý
github:  Ondřej Surý
Installation instructions:
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.0

Comment: I would mention the fact that there is a PGP key that could be used to check that the PPA actually belongs to Ondřej Surý. Just because his name is on it, that doesn't mean it's him.
Answer: For the sake of completeness, I'll expand my comment into an answer and let you decide.
A PPA is a Personal Package Archive.  Someone has taken source code from another source and packaged it so that Ubuntu users can install them easily.
Your question of "trust" comes down to what are you worried about?  The fact is, any one can create an a PPA and have create a glowing homepage that looks perfect.  One thing to keep in mind is that whoever makes a PPA is usually a volunteer, much like those of us who read AskUbuntu.  So, there are no guarantees.  In fact, the one you mentioned is described in these installation instructions, which then refer to this PPA.  At this PPA, they have honestly said:
Disclaimer: there's no guarantee of timely updates in case of security
problems or other issues. If you want to use them in a security-or-
otherwise-critical environment (say, on a production server), you do
so at your own risk.

Does something like this pass or fail your definition of trust?  It seems everyone will have different definitions of trust.  In fact, what if I said "yes, you can trust that PPA!" -- but for what reason should you trust me?
My rule of thumb whether it is an Ubuntu PPA or some installation executable for Microsoft Windows is if I am concerned, I shouldn't download it.  In your case, your current version of PHP should be sufficient and I wonder if you "need" features in PHP-8 or do you just want the latest version for no reason?
If you still need PHP-8, then you can just download it and install it yourself.  This is the site where PHP resides.  Installation instructions for this source is available here.  This is the most trustworthy as you can get...
Comment: State-of-the-art answer ;)
Comment: "Disclaimer: there's no guarantee of timely updates [...]" "Does something like this pass or fail your definition of trust?" — That's tending towards earning my trust because here is a person who **a)** has recognised preemptively that timely updates are important for security **b)** knows their limits and don't try to promise (and plan) something that would expectably overstrain them **c)** recognizes that you, the user would want to know this **d)** is **transparent** enough to straight up tell you about this. — And then goes ahead and does impeccable work for years.
Comment: I'd argue that at this point in time pretty much nobody *needs* PHP8 as it's a very recent release.
Comment: "you just want the latest version for no reason?" — In professional php development context quite a few people tend to get pushed into a situation where they _have to_ rely on the `ondrej/php` PPA, because the [Symfony Framework](https://symfony.com/), including its omni-potent, omni-present components tends to depend on pretty recent php versions. So if the devs on Ubuntu don't want to fall behind (their team) and develop with an inferior Symfony version, lacking in fixes and features, they need to obtain the corresponding recent php.
Answer: Coming from a CentOS background...
Official repos of Ubuntu 20.04, for instance, have PHP 7.4.3 (with backported fixes). If you want anything higher than that, someone needs to compile it for you into a package. I tend to look for how well known the builder is. In the RHEL/CentOS world, that person is Remi Collet (a PHP contributor) who has a repo for his builds.
In the same way ondrej has a website. Not only does he seem well known, he works with other Ubuntu packagers and he seems to be this GitHub contributor.
TL;DR is it safe?
The fact that it's well known means it's less likely you're getting some corner build with either build problems or malicious code. There's no guarantees of course, but no company can guarantee you no malicious intrustion, but with a better known repo, it's less likely it will go unnoticed.
Comment: +1 ondrej is to be trusted!
Comment: he has one topic https://askubuntu.com/questions/766259/how-to-transition-ppa-users-from-one-ppa-to-another  :D :D
Answer: As ray points out, "any one can create an a PPA and have create a glowing homepage that looks perfect".
So lets try to validate the claims.
We can see who the maintainers of the Debian php packages are by looking at Debian's website. Ondřej Surý is indeed listed as one of the maintainers of the php packages in Debian. https://tracker.debian.org/pkg/php-defaults
Ondřej Surý is listed as a Debian Developer with gpg key 30B9 33D8 0FCE 3D98 1A2D  38FB 0C99 B70E F4FC BB07 on https://nm.debian.org/person/ondrej/
So the question becomes whether the Ondřej Surý who maintains the php packages in Debian is the same person who runs deb.sury.org.
One thing we can look at is the e-mail addresses associated with the GPG key. The primary email address on the gpg key mentioned above is "email@example.com", this to me is a strong indication that the sury.org domain is controlled by ondrej sury or at least his family.
The launchpad account and the sury.org domain have also been around a long time. The domain was registered in 2002, the launchpad account was created in 2005. The username on the launchpad account matches Ondřej Surý's Debian username.
In sumary I have a high level of confidence that the person behind that PPA is the same person who is maintaining the php packages in Debian.


Can we leave the Dubai airport during a long layover; do we need a visa?

Question: My friend and I have a 10 hour layover In Dubai. I was wondering could we visit Burj Khalifa in that time. Only problem is that we are arriving at the airport at 23.20h and it is on Monday. We don't want to go at the top of the building, only to see it. I was wondering if it's safe to walk at night, and do we have enough time for that? We are from Serbia, and I don't know if we need visa for that.
Comment: Note that the observation deck at the Burj Khalifa isn't open 24 hours a day. Looking at [their website](https://tickets.atthetop.ae/atthetop/Step0_BookingInfo.aspx) now, it seems the first entry time is at 10am and the last is at 11:45pm (this seems to depend on the day: it's 8:30am and 11pm for a day in a few weeks). [The Dubai Mall](https://thedubaimall.com/en/plan-your-visit/opening-hours) is open 10am-2am. So with your flight schedule, you'd be able to go see the Burj Khalifa from the outside, but would likely not be able to get to the observation deck or spend much time at the mall.
Answer: Although you are able to Transit Without Visa (TWOV) through Dubai, as a Serbian passport holder, you must obtain a visa to leave the airport during the layover.
You can use the Emirates tool to check your visa requirements. It does indicates that you need apply in advance for a visa, should you decide to leave the airport.
If you are travelling to or stopping in UAE with Emirates or Etihad, you can apply for your UAE visa through the website's Manage a booking tool after booking your flight.
Otherwise, you would have to apply for a visa at the Embassy of the United Arab Emirates in Belgrade.
Burj Khalifa and the Dubai Mall are about 15 km from the airport, 15-20 minutes by taxi.
As for safety, Dubai and the UAE rate very highly in this regard, by both residents and tourists, men and women.


Are there conjunctive facts and disjunctive facts?

Question: Facts are supposed to be the grounds for truths. However, consider a conjunctive statement like "Paris is in France and New York City is in the USA". What fact grounds that? Is there such a thing as a "conjunctive" fact? Also, a similar question can be asked for disjunctive statements. Anyway, I just want to know, have any philosophers talked about this, and if so, can I see some texts where this is discussed?
Comment: But what is the supposed issue with concatenating statements with "and" or "or"? Isn't the combination just grounded by the grounding of each component, with standard rules of logic for the combined fact?
Comment: Issue similar to that regarding ["negative" facts](https://www.rep.routledge.com/articles/thematic/negative-facts/v-1)
Comment: Philosophers do talk about this, see [SEP, The Inner Structure of Facts](https://plato.stanford.edu/entries/facts/#InneStruFact):"*There is, as we have seen, an issue as to whether facts are complex entities or not, and as to how (if at all) the various facts are composed and as to what composition means here... A substantialist may either deny or accept that there is an operation of conjunction on facts.*"
Answer: I don't see why it should be problematic to suppose that there are conjunctive and disjunctive facts. To some extent it will depend on exactly what you take a 'fact' to be. There are different theories of what constitutes a fact, but we may reasonably suppose that a fact is a true proposition or what grounds a true proposition.
Take the simple case of perception. If I see a red circle, I am perceiving the conjunction that the thing I see is red and it is circular. If I see a small furry animal bounding across a field, I may be unable to identify it exactly because of the distance or the short time that it remains visible, but I may be quite justified in believing disjunctively that it is either a rabbit or a hare. In both cases, a single observation grounds the conjunction or disjunction.
More generally, what counts as a conjunction or a disjunction depends on the resources of your language. Suppose Alice speaks a dialect that has words for 'brother' and 'sister' but no word for 'sibling'. For Alice, to say that someone has a brother is a simple proposition, but to say a person has a sibling can only be expressed disjunctively: they have a brother or a sister. Now suppose Bob speaks a dialect that has a word for 'sibling', but no words for 'brother' and 'sister'. For Bob, to say a person has a siblling is simple, but to say a person has a brother can only be expressed conjunctively as male sibling.
So, propositions are quite flexible as to their conjunctive and disjunctive structure. This suggests that it is a good idea to be flexible about what constitutes a fact and avoid extreme forms of logical atomism that suppose that there is some universe of completely independent facts.
Comment: There is a school of thought going back, at least, to Russell that grounding should have explanatory value, and "*even on the most fine-grained view of facts, it is not obvious why a linguistic property of 'φ' – such as its being disjunctive, conjunctive, existential or universal – should be of any relevance to the metaphysical question of why the fact that φ holds... There are serious reasons for being sceptical of Logicism... that logical form can be a guide to ground*" [Merlo, Disjunction and the logic of grounding](https://philpapers.org/archive/MERDAT.pdf).
Answer: Your question can be deflated in the following way. 'Conjunctive fact' is just another way of referring to 'two facts'. A disjunctive fact is just another was of referring to 'only two possibilities'. Neither poses any fundamental problem.


Separate texture in viewport

Question: Is there a way to assign a separate texture for specific 3D View?
Like if I have some texture in material node, but want to see UV checker in viewport without changing material itself.
Answer: Assigning separate materials to a view port is not possible ( as far I know )
Alternative:
With the Node Wrangler plugin you can press Ctrl + Shift + Click on a node, and it will change it to that specific node. So you can just add an image texture to your node an swap between them.

See: http://gregzaal.github.io/node-wrangler/ ( Emission Viewer )

Separate texture in viewport


MS SQL Server 2005 DB backup with partitioned tables to non-partitioned SQL Server 2012

Question: I have a database with several partitioned tables on MS SQL Server 2005 Enterprise, and I have to restore this DB on MS SQL Server 2012 Standard. Since Standard doesn't support partitioning - it's a bit complicated to restore all the data to the new server. I have to find a simplest and quickest solution.
My first idea is to remove partitions on 2005 DB, then make a backup and restore it on SQL Server 2012. But my database is large and to merge it's partitioned data takes couple of hours for just one table.
The quickest way, from my point of view, would be the data transfer from old to new DB, but it will probably also take too much time.
Please share your ideas - may be I'm not aware of some features in 2012 that might be helpful.
Answer: Community Wiki answer compiled from comments to the question†
Jon Seigel:

It isn't possible to restore a database that uses Enterprise edition
  features on an instance that doesn't support those features. You'll
  have to either remove partitioning and then use backup/restore, or
  export/import the data.

Kin

See this answer on another question that shows how to use bcp
  out and BULK INSERT in native mode to transfer the data quickly.

†Comments may be deleted and are not searchable.
Comment: BCP OUT and BULK INSERT are actually working faster then any of the insert-select queries on the same (!) database (on tables with more than 20 mln. rows). And I've tried different loops with different amount of rows inserted at once. So with bulk insert - it's MUCH more faster than anything else and it saved me really much time. Thank you, Kin, very much for the idea.


How to Force Closing of Registry Key Handles in Windows 7?

Question: This was an issue I experienced a lot more often in Windows XP.  I thought I would be rid of now, but I was wrong.  It appears some applications, specifically ones related to services, in our case Symantec Endpoint Protection, fails to properly release handles to the registry keys.  Obviously nothing new.  And no, I do not use BitLocker in this instance and I am pretty sure we have not enabled tamper protection (it is not a BIOS default and we are lazy like that).  It appears UPHClean might not be supported on Windows 7 at all.  Is there some other way to force registry handles to get shut off?
Answer: Warning: I do not recommend doing this!
But since you asked...
<code>Foreach($p In Get-Process)
{
    $Handles = \\live.sysinternals.com\Tools\handle.exe -p $p.ProcessName -a
    ForEach($h In $Handles)
    {
        If($h.Contains(": Key"))
        {
            \\live.sysinternals.com\Tools\handle.exe -c $h.Split(':')[0].Trim() -p $p.Id
        }
    }
}
</code>
That was written in Powershell 3, but it will also work in Powershell 2, which comes baked into Windows 7 out of the box.
But please don't just copy paste my script and run it. Think about the havoc it will wreak on your system if you go willy-nilly trying to close every registry handle on the system.  For instance, my first recommendation would be to scope this to only the process that is erroneously holding handles open.
Personally, I highly suspect that there is a better way of solving whatever problem you have than forcefully closing handles.  And the hostile attitude that you displayed toward Windows in the comments of @MattLyons answer leads me to believe that you may be out of your element and might be misunderstanding the problem. It may be more helpful to let us know the actual problem you're having. Forcefully closing handles might not be the best way to solve it.
But I can't resist the temptation of scripting something. It's like a disease.
Answer: Procexp can close handles. Use Find->Find Handle or DLL to find the one you want, click it (it will appear in a list in the bottom pane) and right click->close.
Comment: Not sure how that will programmatically during shutdown, but thanks. A while back, I though of just using though super-badass `handle` utility to solve that problem, but how it operates requires a lot of scripting to determine the right PID's to operate on.
Comment: Ah, _programmatically_ close the handles - thought the question seemed a little easy :) The `handle` tool would have been my next suggestion but I imagine one would indeed have to be quite the batch ninja to fix your problem in a script.
Comment: Tell me about it, hence I gave up.  Users are confined by Windows, admins roll their eyes and thank God Linux is an alternative for people who need fuctional computers on their own terms.  Haha.


Anonymity creates an environment full of bullies?

Question: The Stack Exchange websites has people anonymously up vote or down vote whether questions and answers are good or bad and everyone builds their reputation based on this alone. I saw a question on the mathematics board that was not off topic but, in the beginning, was being down voted due to either being too elementary or perceived as what I consider people to be saying as a "stupid question". Do you think that removing this shawl of anonymity would change the way people interact with each other on Stack Exchange? For better or For Worse?
Comment: This question is slightly off topic. If you were to ask "what is the effect of anonymity on online communities" and were asking specifically for psychological studies, then this would be the appropriate site. However, if you want to talk about StackExchange in particular, you should post this question on meta.stackexchange.com. If you wanted to talk about policy in general, there's a moderators stackexchange. So, if you could clarify your question it would be appreciated.
Comment: I was talking specifically about the psychology of Stack Exchange itself, which I think is on topic. It is a subset of online communities that interacts in a unique way. The comments I see on the boards here are generally snarky. I think it is dissatisfying for someone to get their question removed, if it is in earnest, because other people are being overly critical.
Answer: Of course it would change the way people interact with one another. Social and situational settings strongly affect behaviour.
It's funny you see it this way. One can argue that it's exactly the opposite! Like with parliamentary elections, anonymity means that people act based on their own beliefs without being swayed by social pressure.
What's more without anonymity, people may start keeping score, which will further bias the objectivity of the votes.
When it comes to services like Stack Exchange, the general idea is that the various opinions will eventually regress to the mean - so the majority has it. Sure, for this to happen you need quite a lot of votes, but my experience is that usually gross down/up votes are justified.
Comment: I completely see your point of view as well. I'm not saying everyone here is a troll or out to get noobs. However, for a sample to regress to the mean you have to have a large sample size. If your question garners little attention, then the trolls win.
Answer: I have had the same question a while back when I observed similar behavior in a forum on a language learning website (I know that the question here is specific about stack-overflow).
There were two things I noticed- One with regards to my own behavior. I started giving my votes without having to worry that I will offend or please someone.
-Two was that I have seen people downvote some of the questions which were relevant to the topic.. while some irrelevant content was upvoted.
So I believe the anonymity works both ways- good and bad.


Sunset moonrise what happens in between?

Question: Here in south London I have just seen that the sun will set at 16:45 hrs but the moonrise does not happen until 2hrs later 18:45 hrs what is happening in this two hour void, will it be too dark to see?
Comment: I know we're in lockdown and everything, but you could try looking out your window at 17:30 to see what it is like.  Testing out a theory by making observations is the basis of the scientific method.
Comment: When you say "will it be too dark to see?" do you mean will the moon be too dark to see, or are you asking about how dark it will be outside?
Comment: a bit presumptuous that everyone lives in a nice place with a window
Comment: It will be similar to a evening/night with no moon. It is not that clear what you are asking for...
Answer: The Moon rises approximately 50 minutes later every night. Simplistically, the new moon will rise and set roughly with the Sun, while the full moon will be opposite the Sun (as in, it will rise when the Sun sets, and set when the Sun rises). Look at the Moon the next night and it should be rising about 19:35 from the day mentioned in your question.
This +50 minute time is due to the Moon's orbit around Earth, which takes roughly 29 days.
Answer: Whether it is light enough to see will depend on the local streetlights and the lights coming from buildings, etc If you are in a city named South London there will be plenty of light.
The period shortly after sunset is called twilight because light from the sun below the horizon is still being reflected downwards, so it will take time for the sky to turn black.
And it is possible that someone could see well enough to walk around by starlight.  Decades ago I used to walk up a hill to watch the stars through binoculars.  So obviously there was enough light for me to see where I was going, light from the stars and maybe from nearby light sources in the neighborhood.
Anyway, if this place, South London, is a populated community, there should be enough light from various local sources to see where you are going.  And possibly the interval between sunset and moonrise might be the best time to look at the stars, if light pollution from the neighborhood doesn't make them invisible.
When I go to bed at night my bedroom is almost totally dark.  But if I wake up in the night  I can see much better in my bedroom, because my eyes have become dark-adapted while I slept.  So if you are in the dark your eyes should gradually adapt to seeing in the dark and you should start to see things better.


Incredibly High Fan Speed Reading

Question: I have a 2014 iMac 5K. I find that the fans seem to have two speeds - slow, or top speed. Using SSD Fan Control, the optical drive seems to sit around 1200 rpm on startup at 43 degrees, and hits 100% max rpm when I launch anything taxing on the CPU. The other fan is the Hard Disk fan, which sits at the same temp of 43, but permanently reads 65,535 rpm, no matter what. It hasn't changed once! What is the reason for this?
Answer: There's quite a few possible reasons why fan speeds vary, but as a starting point you're probably best to see whether a reset of the System Management Controller (SMS) changes things for you.
To reset the SMC on your iMac

Shut down your computer
Unplug it from power
Wait 15 seconds
Plug the power cord back in
Wait for an additional 5 seconds
Press the power button to turn it back on

Incredibly High Fan Speed Reading


2008 Toyota RAV4 won't shift out of park

Question: We installed a wiring kit to the rear lights so we could plug in lights for towing a trailer. After testing the lights with a trailer, the brake lights stopped working and then the car wouldn't shift out of park. We removed the kit and put all the wires back where they were originally, and still, the car won't shift out of park.
Answer: The issue was the brake light fuse burned out. This was frustrating us because there is a separate fuse labeled TAIL for the tail lights and a different fuse labeled STOP for the brake lights. Without Google, we wouldn't have thought about looking for the STOP fuse.
Once the fuse was replaced, the car would shift out of park. I guess we need to look into getting a different wiring kit brand or checking the trailer connection for any issues that caused the fuse to burn out.

NOTE: The fuses in the RAV4 are below the steering wheel. The size for the STOP fuse is 10A and was in slot number 9.
Comment: Thanks for the update. For future reference "tail light(s)" usually refers to the running lights aka parking lights so it makes sense it has separate fuses from the stop lights aka brake lights which is a different function.
Answer: I see 3 possibilities:

you made an error when connecting the "stop" wire.
the trailer kit (socket) has a fault on the stop pin.
The trailer you used for testing has a fault on the stop circuit (shorted wire or shorted bulb).

You may not need a new trailer connection kit, just need to find what was wrong.


Handling obvious troll/spam users?

Question: Since this user continues to exist, and I know other users have noticed the nonsensical answers they are spouting... how do we intend to handle this kind of abuse?
Comment: i think SE has a way to heuristically spot retal. down-votes. I know they can spot serial up-voting... I had someone go around once and up vote everything I've ever done. (It was not me in a ghost account! :) ...and SE spotted it fast and rolled it all back.
Comment: The biggest issue I see with this is retaliatory down-votes, and I can't imagine a way to ensure that this doesn't happen.
Comment: I found the troll; up until this point, it was just a sneaky suspicion. Great...
Comment: @RyanFoley, the site will flag (and remove?) "serial down voting" (and up) The biggest problem is with people seeing X's post and immediately down voting without ever reading it.
Answer: In the particular case you are referencing, the person actually could contribute to the community (and has a couple of times, even if they aren't "model" posts). Being optimistic, I was hoping they would respond more positively to some of the feedback they have received and we might see more content that helps to improve the community.
But things seem to be getting worse.
This puts me personally in a bit of a position as things stand for two reasons.

I see moderation here as working to provide support to the community as they decide it should be run. I am not here to set policy or make decisions about the community. While I have no hesitation at all with unilaterally making decisions when it is clearly of benefit to the community (i.e. removing an account created simply for spam, dealing with plagiarism, etc), I am hesitant to take action with an account that could provide value to the community. This is where being able to balancing my views against those of the other moderators can provide a check against possible abuse. Unfortunately, Craig is not as active and hasn't had time to respond to me in chat.
As the only active moderator, I took it upon myself to make sure to comment when answers were down voted in hopes this user could learn how the community operates and improve their contributions. Having been involved (and frustrated on several occasions), this is where I would normally ask another moderator to look at the situation and take the necessary actions, again to avoid the possibility of abuse (or at least the appearance of such abuse).

So, I have adopted a "don't feed the troll" stance, although I wish it could be otherwise. If I don't think the contributions are of quality, I will quietly down vote them, but I will no longer provide any comment.
Hopefully, Craig will be able to visit again soon and we can discuss in chat how to handle this situation. Worst case, hopefully we will have three active moderators once more once the elections are over.

Speaking of the moderator elections, I held off a couple days while making my decision to nominate myself. I had hoped that several more people would have stepped forward by now, but so far I am still the only one only one person has done so (thank you Ryan - who was probably typing his nomination as I typed this).
If you enjoy being part of this community, have the spare time and enough reputation, strongly consider helping the community by nominating yourself. It isn't a huge commitment and if you are stopping in nearly every day (and multiple times when possible), then you can help. There are only five days left till the nominations close.
Comment: The hard part here is that for me he isn't the typical obvious troll. His answers sometimes have some truth in them (though sometimes biased by personal opinions) and it's hard to start a discussion about these answers. I tried a couple of times, didn't really work, so I've taken Mike's strategy of silent downvoting as well. Even cost me my "access 'trusted user' tools" privileges ;-)
Comment: I'm around. ( clarification: I'm around *now* -- I was overseas for the month of May, so I've not been around. ) I think I can guess what problem user we're talking about. I'll be at my comp for the next few hours. Also, +1 for Mike's comment about "taking it on the chin" as a moderator; never feed the trolls.
Comment: I saw your comments, and the guidance for the user is appreciated (I have needed this kind of guidance before).  I also debated the nomination like you suggest, but I don't think i would be a good fit for that role. Thanks for the work that you do!
Comment: @cpt_fink, don't make your final decision yet. Simply by posting on meta puts you above the average user; multiple times, even more so. Flagging posts (which I know you have done), also above average. You clearly have an interest in strengthening the community, so you may be a better fit than you realize.
Comment: @ylearn If you have questions about how to handle misbehavior, you can *always* ask in TL.
Comment: @MikePennington, yes, thank you. However it isn't really a question about how to handle the situation, iit's more about knowing myself. I know I can have a tendancy to over-react when someone irritatees me (#1 above). While TL can help with that, that still leaves me with #2. Since I have been so directly involved, my personal instinct is to recuse myself...probably heavily influenced by my years married to an attorney. However, it is not a situationI can or will let linger foreve either.
Comment: TL can help with #2, although I never cared whether someone could trump up abuse complaints. You should worry about participating in real abuse; as a mod you may have to take it on the chin if someone trolls about just punishment. Just be sure you can make a good case (advice from a SE community mod or other elected mods on any site is adequate)
Comment: Quick question: what does TL stand for?
Comment: Recusing oneself is not about not being able to handle criticism, nor the willingingness or justification for making a decision. It is about avoiding the perception that the system isn't fair or biased against the indiviidual. @TeunVink, Teachers' Lounge (TL) is the chat room in which all members of the SE moderator community can take part.
Comment: @ylearn, it's precisely this concern about perceptions that I think you should disregard. You were selected for your judgment; if in your judgment the suspension is justified, then you empower the troll by rationalizing status quo.  BTW, you can also send a mod letter as a more official request to improve his contributions; this avoids having to suspend
Comment: @MikePennington, and this is one of those few points where we will have to agree to disagree. By your reasoning, judges are selected for their judgement as well, so they should never have to recuse themselves. It is not an indication that their (or my) judgement is wrong. Like I indicated above, this is my view primarily from my years of marriage to an attorney, but also life has provided negative experiences where someone should have recused themselves and chose not to do so.
Comment: @ylearn, This is a false dilemma.  Stack Exchange doesn't require you to recuse yourself for user discipline issues.  They ask you to check with other mods when you are not sure. Also see the last part of [Mad Scientist's answer](http://meta.skeptics.stackexchange.com/a/1308)
Comment: @MikePennington, I agree that SE does not have any such policy. However, and I may have not made this clear enough, this is my personal view on this type of situation. As for your link, I don't disagree with the bulk of that answer...but a few clarifications. Has this user "insulted a moderator to the extent that a suspension is warranted"? I don't see it, and to be fair, I believe you called him out as a troll and I called his behavior childish before he called me a troll. The last line mentions "suspensions being discussed internally before" which I haven't had the opportunity to do yet.

Handling obvious troll/spam users?


Dell error code 0141 - No drive detected

Question: Has anyone seen the error code 0141 and it isn't a failed hard drive? I'm guessing the motor or board failed on the drive, but I'd prefer if there is a chance the motherboard or  controller failed instead. The reason I'm asking is because I don't have a usb/sata adapter and am curious if there's even a need to get one.
Answer: I'm not sure about the error code, "drive not detected" could be a number of problems, including the controller.
You can try some troubleshooting by moving the drive to another controller/computer and seeing if it works. Or, put a known working drive in the failed system and see if it works.
If the drive doesn't work in another system (or a new drive works), you know it's the drive. If not, then bets should be on the controller or motherboard. This is, of course, assuming you have access to another system.

Also, have you tried reseating the drive and/or removing other drives (CD, floppy) attached?
Comment: It was the drive - the new one worked.
Answer: This occurred to me after a bad firmware update of the hard drive. It basically means the computer, for whatever reason, is not getting an answer back from the hard drive. It is more than likely its the drive, or the drives controller, and not the motherboard.
Answer: For future visitors:
I got the same error 3 days ago and the reason was that Windows 8.1 corrupted entire file system in my HDD in Dell Studio.
Condition:

Windows was not loading and computer kept restarting on boot.
Dell diagnostic clearly mentioned that HDD not found. Error: 0141

Resolution:
When I tried to use Ubuntu live DVD to see if other hardwares are working fine or not, I was able to see HDD partitions and all data in that so I formatted Windows partition with Fedora(because I was familiar with Fedora Linux installation) and then replaced Fedora with Windows 10 Tech Preview and it works like new. Now Dell diagnostic is also recognizing my laptop's HDD.
My suggestions:

Use any live Linux distro to boot your laptop and see if your HDD is available in that.
Otherwise use any Linux distro installation media and try to install it in your laptop. When the installer will ask for selection of partition or HDD then see if it has listed your HDD and partitions. Do not forget to delete and format existing Windows partition because until you format it you will keep getting errors.
Do not order new HDD without trying above suggestions because this way I saved my money, HDD and data all three. Installation of Fedora is easier than many other Linux distros.


What do the +-numbers at LHS of my question mean?

Question: To this my former question you requested that I should send screenshots. Here are three:
Comment: You're asking about the 0, -1, -1, 0, and 4?
Comment: yes. --- Regards
Answer: Those 0, -1, -1, 0, and 4 numbers next to your questions in that screenshot are the current scores for those questions: the upvotes minus the downvotes.
Voting is a central feature of the Stack Exchange system; users with the upvote and downvote privileges help sort good content above lower quality content so that the best answers to each question become apparent.
If you haven't yet, you'll want to take our tour to get an overview of Stack Exchange's model and then browse the sections of our Help Center to learn more about asking, answering, voting, and more!
Comment: Thanks. But the terms "upvote" and "downvote" are not contained in the intetnet dictionary English/German. Regards.
Comment: Sorry about that! How about "vote up" or "vote down"? That's the result from clicking one of the gray triangles next to a post's score. The top one points upwards (click it for an upvote); the one below the score points downwards and is for a downvote.


Combine Menus in mobile App

Question: I have an app with a bottom navigation bar that contains the 5 main features. Now I am increasing the number of features to 7. Is it okay to keep the 5 main features visible in the bottom bar, and to add a hamburger menu for the less important features and settings, legal info, user profile, ...? Or should I move everything into the hamburger menu?
Answer: By hiding the main features in the hamburger menu, you're making those features less visible.
To quote Don Norman notes in The Design of Everyday Things:

In each state of the system, the user must readily see and be able to
  do the allowable actions. The visibility acts as a suggestion
  reminding the user of the possibilities.

Instead, have a hamburger icon in your bottom navigation and show the less regularly used icons in there.
Facebook uses this exact method to ensure that all main navigation is accessible from a single menu (albeit with a modal to dig deeper):
Comment: I thought about adding the hamburger icon to the header (where the magnifying glass icon is in your screenshot). This would free one position in the bottom navigation bar. What are your thoughts on that?
Comment: Having navigation in two separate locations means there's twice as many places the user has to look for a certain navigation item. If you did opt for this method, put the navigation bar items in the hamburger too. And then your bottom navigation bar essentially becomes a shortcut bar.
Comment: On the other hand, the duplicates would make the hamburger menu longer or even scrollable (on very small devices). That's something that should be considered.

Combine Menus in mobile App


Degree of an irreducible polynomial over a field which has a Galois group isomorphic to $ Q_8 $

Question: Let $Q_8$ be the 8-element quaternion group. What is the minimum degree of an irreducible polynomial over a field which has a Galois group isomorphic to the $ Q_8 $ group?
Comment: I don't understand why this question has so many votees to close, honestly. Someone should gather Gerry's comments and write an answer.
Comment: Note that if $Q_8$ does not act transitively on $4$ elements, because $\mathbf S_4$ has no subgroup isomorphic to it. [Also relevant](http://math.stackexchange.com/questions/248224/galois-group-and-the-quaternion-group) is this example of degree 8.
Comment: Richard Dean showed $x^8 - 72 x^6 + 180 x^4 - 144 x^2 + 36$ has $Q_8$ as its Galois group. More information at http://en.wikipedia.org/wiki/Quaternion_group#Galois_group also starting page 67 of http://alg-geo.epfl.ch/travdipl/GaloisInverse.pdf
Comment: Another construction at http://projecteuclid.org/download/pdf_1/euclid.pja/1195512561 and another at http://feryll.blogspot.com/2013/10/quaternion-galois-group-14227.html
Comment: @Mariano, I don't know whether any of the sites I linked to have a proof that degree 8 is best possible, so I'm not sure that even taken together they constitute an answer.
Comment: @Mariano, I have posted an answer.
Answer: Let $f$ be an irreducible polynomial of degree $d$. Then its Galois group is a (transitive) subgroup of $S_d$, the symmetric group on $d$ letters. At this site, there is a proof that the quaternion group is not a subgroup of $S_d$ for $d<8$, so the answer to the question is, at least 8. But examples with degree 8 are given in the comments, so the minimal degree is 8.
Answer: Assume a monic polynomial $f(x) \in \mathbb Q[x]$ has Galois group $Q_8$, and its splitting field is L. Choose a root $\alpha$ of $f(x)$ and consider $\mathbb Q(\alpha)$, which must be Galois over $\mathbb Q$, as all subgroups of $Q_8$ are normal. Hence it contains every conjugation of $\alpha$ i.e the roots of $f$. Therefore it is just the splitting field L, so we have $8=[L:\mathbb Q]=[\mathbb Q(\alpha):\mathbb Q]=\operatorname{deg} f$.


Control electric plug remotely

Question: I have an electric water pump, which I want to control over the internet. Currently I know that smart plugs can be used but this requires me to be in the same WiFi network. Are there any smart plugs or ready made solutions where I can control the power switch remotely?
Comment: what kind of a water pump are you wanting to control?
Comment: In addition to WiFi, don't forget that you can use Ethernet over Power & control through your home's electrical wiring. This would be useful if the plug is somewhere remote and not reachable by your home WiFi.
Comment: websockets would be an easy way around the firewall issue you allude to
Answer: Some smart plugs can be controlled over the internet without having to be on the same network. D-Link Smart Plugs (http://us.dlink.com/products/connected-home/wi-fi-smart-plug/), for example, have a linked app that allows you to switch the plug on and off from anywhere as well as setting schedules. They can also be connected to things like the IFTTT system https://ifttt.com/ for more sophisticated control.
Comment: Note that D-Link have decided to brick a lot of their old smart plugs by disabling support in their app, so mine will have to go in the bin. Worth bearing in mind when buying any of these things.
Answer: The Belkin WeMo sockets can also be controlled remotely from the app.
Basically any socket with support for Alexa/Google Assistant will have cloud component to control them (because the smart assistants connect to a cloud end point to do the control). This means you can also use the Alexa/Google Home apps to control them remotely.

Control electric plug remotely


Are there any hidden downsides to wrapping an Akka ActorRef in a thin wrapper class?

Question: Being one for strong-typing and letting the compiler do the work (rather than "hoping" I remember), I'd like to use types other than just ActorRef for my akka-based library.
Is there any sort of penalty for doing this? Basically, the wrapper would just implement the same methods (tell, ask, etc...) and just forward it directly to the actor and hold the ActorRef so I can have a strongly-typed facade.
If anyone has any insights that would be great. I'm not familiar enough concurrent programming or the actors model to know if this is going to somehow slow things down.
Edit: Here's some code samples as requested below.
For example. Normally I'd do this in Akka.
val actor = context.actorOf(Props[Whatever])

At this point, it is typed as an ActorRef. And so everything in my code has to work with ActorRefs. Is there any downside to doing the following instead...
class Wrapper(props: Props)(implicit context: ActorContext) {
  val actor = context.actorOf(props)

  def ! (message: Any):Unit = {
    actor ! message
  }

  //insert a direct wrapper of other regular actor functions here.

}

Then, it would be called and behave exactly like an actor except I could strongly-type my design. Because each Wrapper would be typed with the enclosing class.
Does this have any downsides? I realize it isn't strictly necessary but leaving behind strong-typing is a bit bothersome.
For me, what came to mind is if this class is going to be running on some set thread and keep the akka actors underneath from behaving as asynchronously as they normally would (swapping out with many sharing a thread pool and so on)... as I am assuming that behavior only occurs for actors and so my class may be setting somewhere else and bottlenecking things.
Comment: I'd like to see a more detailed explication (code) of your concept. I suspect it's not really workable, at least not beyond very simple and highly restrictive cases.
Answer: I think you should look at Typed Actors.
Comment: Or typed channels - http://doc.akka.io/docs/akka/snapshot/scala/typed-channels.html


Prevent desktop icons and files from overlapping in Ubuntu 18.04

Question: I have Trash bin and Hard Drive icons on my desktop. Whenever I paste or download any file on desktop it overlaps over desktop icons. How can I prevent this behaviour?
Answer: Are you using Nemo or Nautilus as the desktop manager? I'm using Nemo, and I had similar problems each time I rebooted by PC. Existing icons on the desktop would overlap with the Trash icon. I found the solution online. Here's what you need to do. In the Terminal type:
<code>gsettings set org.nemo.desktop use-desktop-grid false
</code>
or alternatively, make the same change using the dconf editor.
See: This bug link for the solution (scroll to the very last entry). In case the link moves or gets deleted or does not open for any reason, I've pasted the relevant part below:

Found a solution for this issue. That is to disable 'use-desktop-grid'.
  Open dconf-editor and deselect org.nemo.desktop.use-desktop-grid
  or just run:
   gsettings set org.nemo.desktop use-desktop-grid false

If you're using Nautilus, perhaps you may be able to find an equivalent setting that you could change.
Good Luck.
Comment: Welcome to Ask Ubuntu!  *Excellent first answer!*  **+1**
Comment: After ~10 minutes of searching for "how to tell if I'm using Nautilus or Nemo"; could the title of this question be changed to "Prevent desktop icons and files from overlapping in Ubuntu 18.04 if using NEMO"? Or, does the above command

gsettings set org.nemo.desktop use-desktop-grid false

...work in Nautilus as well? I would rather not issue a command that could potentially render my entire system useless (again).

Apologies for not knowing how to format cleanly.


hook_load vs. hook_node_load?

Question: Can someone explain clearly the difference between hook_load and hook_node_load? hook_load says it is a "node-type-specific hook". What does that mean? hook_node_load actually has a types parameter.
Comment: One big note is that it is called last. As for definition I'm not sure I can do better than the linked page does under the `$types` parameter.
Answer: This paragraph in hook_node_load() docs page explains it in details:

This hook is invoked during node loading, which is handled by entity_load(), via classes NodeController and DrupalDefaultEntityController. After the node information is read from the database or the entity cache, hook_load() is invoked on the node's content type module, then field_attach_load_revision() or field_attach_load() is called, then hook_entity_load() is invoked on all implementing modules, and finally hook_node_load() is invoked on all implementing modules.

Here's the breakdown, from first to last call:

entity_load()
hook_load()
field_attach_load_revision() or field_attach_load()
hook_entity_load()
hook_node_load()

What this means to you is that using a different hook you will be able to modify values earlier or later. This matters if you're overriding value from another module for example. Otherwise, I think it's safe to use either.
Comment: In all of my Drupal work, I don't think I have ever used `hook_load()`; always the entity version (when I have one that works on multiple entity types) or the entity specific version (which is probably about 95% of the time).
Comment: @MPD We only implement `hook_node_load()` because `hook_load()` is invoked only for modules implementing a content type.
Comment: Thanks @MPD, same here. I've always used `hook_node_load()` instead.
Answer: Looking at the code of NodeController::attachLoad(), and a note in the documentation for hook_node_load(), I would say that hook_load() is only invoked for the modules implementing a content type.  In fact, the note in hook_node_load() documentation says the following. (Emphasis is mine.)

hook_load() is invoked on the node's content type module, then field_attach_load_revision() or field_attach_load() is called, then hook_entity_load() is invoked on all implementing modules, and finally hook_node_load() is invoked on all implementing modules.

Plus, the only code dealing with hook_load() implementations is the following one.
  // Call object type specific callbacks on each typed array of nodes.
  foreach ($typed_nodes as $node_type => $nodes_of_type) {
    if (node_hook($node_type, 'load')) {
      $function = node_type_get_base($node_type) . '_load';
      $function($nodes_of_type);
    }
  }

node_type_get_base() returns the node type base, which the function documentation describes as follows:

The base indicates which module implements this node type and is used to execute node-type-specific hooks.

It seems that in the Drupal 7 documentation, the term node-type-specific replaced what in the Drupal 6 documentation was described as used by node modules. See Drupal 6 hook_load(), Drupal 7 hook_validate(), and Drupal 6 hook_validate().
To be sure that is the only code invoking hook_load(), see DrupalDefaultEntityController::attachLoad(), called from NodeController::attachLoad(), since DrupalDefaultEntityController is the parent class of NodeController; apart from field-related hooks, its code only invokes hook_entity_load() and hook_TYPE_load() which, for node entities, is hook_node_load().
  // Attach fields.
  if ($this->entityInfo['fieldable']) {
    if ($revision_id) {
      field_attach_load_revision($this->entityType, $queried_entities);
    }
    else {
      field_attach_load($this->entityType, $queried_entities);
    }
  }

  // Call hook_entity_load().
  foreach (module_implements('entity_load') as $module) {
    $function = $module . '_entity_load';
    $function($queried_entities, $this->entityType);
  }
  // Call hook_TYPE_load(). The first argument for hook_TYPE_load() are
  // always the queried entities, followed by additional arguments set in
  // $this->hookLoadArguments.
  $args = array_merge(array($queried_entities), $this->hookLoadArguments);
  foreach (module_implements($this->entityInfo['load hook']) as $module) {
    call_user_func_array($module . '_' . $this->entityInfo['load hook'], $args);
  }

hook_load vs. hook_node_load?


press a key to boot up windows 7

Question: Hard disk crashed on sony vaio laptop, so I replaced it. fresh install of windows 7. every thing is ok, but when laptop is powered on, windows is starting shows up, and stops form a couple of minutes, and start again displaying the windows logo. normal boot up can continue when I press any key on keyboard. Can this be fixed. all drivers all installed.
Answer: When the laptop first boots up, right after BIOS hit F8 key. You will get a lot of boot options, select the option "Boot Windows Normally". That should fix it. If not then repeat and choose "Load Good Last Known Configuration".

press a key to boot up windows 7


Varnish with Wordpress

Question: I have moved my Wordpress site (a small blog) onto a hosting platform with Varnish at its front. Varnish, rightly, won't cache when cookies exist.
It looks like Wordpress starts the session, even if it doesn't need it. As such, it sets the PHPSESSID cookie, even though a var_dump() of $_SESSION is empty (when done at the end of index.php).
Is there a way to stop Wordpress doing this? Perhaps with an existing or, indeed, custom plugin?
EDIT: Looking at it again, does the session get used for anything useful on the frontend of the site? Posting a comment seems to set other cookies. Can I just exclude PHPSESSID from Varnish?
I know W3 Total Cache works with Varnish but it's a massive plugin and, despite spending a lot of time configuring it, performance was worse and things occasionally broke.
Answer: I gave it a punt and it seems to be OK. Below is my VCL. It basically unsets all cookies unless it's wp-admin. This will only work for a very simple site.
# Specific to my.website.com
if (bereq.http.host == "my.website.com") {
        # Strip all cookies (the only one should be PHPSESSID) if not admin
        if ( ! bereq.url ~ "^/wp-admin/") {
                unset beresp.http.Set-Cookie;
        }
}

Answer: We have a similar use-case to you, but we're running Varnish on a multi-site Wordpress site that runs four high-traffic news-sites.
Here's the relevant excerpts from our VCL file.
# WordPress - admin, uploads and preview.
if (req.url ~ "^/wp/" || req.url ~ "^/wp-(login|admin)" || req.url ~ "^/wp-content/uploads/" || req.url ~ "&preview=true") {
    return (pass);
} else
# Allow Editors to see an uncached version, and Users to see up-to-date comments.
if (req.http.host ~ "<our domain>" && req.http.Cookie ~ "wordpress_logged_in_") {
    return (pass);
} else
# Password protected posts.
if (req.http.Cookie ~ "wp-postpass_") {
    return (pass);
}
unset req.http.cookie;

(NB: This is Varnish 4 VCL syntax, which is subtly different to Varnish 3.)

Varnish with Wordpress