Approximation diameter 2-dimensional space

Question: If I have a set A constituded by $n$ 2-dimensional points, how can I find a $\sqrt{2}$-approximation diameter of A, that is the maximum Euclidean distance between any two points in A, in linear time?
Can you help me with this?
Comment: I bet you can compute something like this using a kd-tree.
Comment: Have you tried the internet or wikipedia :-)
Comment: I actually don't even know what a kd-tree is. Can you explain?
Comment: I read about the kd-tree but didn't understood how to apply this to my problem...
Comment: A kd-tree puts points into buckets. If you can find the distance of the two buckets furthest apart, you have an approximation for the furthest distance between points.
Answer: Due to admitting the $\sqrt{2}$-approximate, you could probably live with an $L^2_1$ (L1-metric in 2 dimensions) approximation of the problem, which upper bounds the Euclidean distance. Then, I would point you to an approach based on metric embedding following Bourgain's theorem. The idea is based on transforming the problem onto a different domain using an isometric embedding, where it is much simpler to solve the problem. It is remarkable how easy one could formulate solutions to certain problems this way, such as maximum Manhattan distance between two points ($L_1$-diameter).
Let us begin by embedding the space into a space of dimension $2^d$.
Consider $x\in L^d_1$, where $d=2$ for 2D case and $\|x\|_1=\sum_i |x_i|=\sum_i sgn(x_i)\cdot x_i \geq \sum_i y_i \cdot x_i$ for all $y\in \{-1,+1\}^d$. Therefore:
$$
\|x\|_1 = max\{ \langle x,y \rangle \}.
$$
It is obvious that the suggested isometric mapping is $f_y:X \rightarrow \mathbb{R}$ for each vector $y \in \{-1,1\}^2$ with $f_y(z)=\{ \langle z,y \rangle \}$. In the final map, all coordinates are concatenated together resulting in $2^d$.
We then solve the transformed problem in which every coordinate can be iteratively max-ed. See section 2.1.1 in here.
$$
\begin{align}
\max_{u,v,\in S} (u-v) &= \max_{u,v,\in S} \max_{i=1}^{2^d} |u_i-v_i|\\
&= \max_{i=1}^{2^d} \text{furthest point along $\text{i}^{\text{th}}$ coordinate}
\end{align}
$$
As a result, the complexity is $O(2^d N)$ with constant $d$, which is linear in $N$.
Here is a simple pseudocode (thanks to umut's implementation):
d = 2;
n = 1000;
X = 10*rand(d,n);
L = zeros(d,2^d);
for i = 1:size(L,2)
    L(:,i) = bitget((i-1),d:-1:1);
end
L(L ==0) = -1;
Y = X'*L;
diam = max(max(Y)-min(Y))

Note that you could precompute L and store for future use. For $n=1000$, this just takes 3.5ms in MATLAB whereas a naive computation would easily exceed half a second.


American English pronunciation: basically or "basicly"?

Question: Does the final "a" drop out in words like "basically", "logically", etc, or should I pronounce it?
Comment: The `a` is usually completely elided, though rarely,  some American speakers might use a schwa.
Answer: I've lived in the United States my entire life. In my experience, native speakers always pronounce these words as basicly and logicly. The pronunciation basical-ly sounds distinctly foreign; in fact, in my experience, I think that the pronunciation basical-ly is the most common pronunciation mistake that I ever hear.
In slow and careful speech, I could imagine someone saying logical-ly, but the pronunciation logicly seems more common even then.
The spellings of -al, -ly, and -ally are frustratingly inconsistent. In the following list, each word is presented as adjective - standard spelling of adverb - phonetic spelling of adverb:

public - publicly - publicly
basic - basically - basicly
logical - logically - logicly
internal - internally - internally
Comment: Many people, when speaking in formal or stressful situations, or when they feel the need to be especially clear (or forceful, or persuasive), may adopt pronunciation which errs on the side of sounding out all nominal syllables of a word, even if it's not the accepted pronunciation. I think you'd categorize this as a kind of hypercorrection. But of course, if it happens often enough, then it becomes an accepted pronunciation.
Answer: They are all correct, but the pronunciations 'basicly' and 'logicly' are far more common.


Preimage of Subsets of $X_i$ in Infinite Cartesian Product

Question: I ask this question only to have a clarification about the consequences of Halmos' definition of Infinite Cartesian Product. Let $\{X_i\}_{i\in A}$ be an indexed family of subsets of a given set $X$.
As you know $\displaystyle\prod_{\substack{i\in A}}X_i$ is defined to be the set of all functions with domain $A$ and codomain $\displaystyle\bigcup_{\substack{i\in A}}X_i$ such that $f(i)\in X_i ,\forall i\in A$. Now, let $\pi_i$ be the generic projection map and let $E\subseteq X_i$: how can $\pi_i^{-1}(E)$ be equal to $\displaystyle\prod_{\substack{j\in A}}E_j$ with $E_j=E$ if $j=i$ and $E_j=X_j$ otherwise? I mean, the codomain is relevant in this definition...
Comment: I assume the $f$ is actually meant to be $\pi_i$.
Comment: The result seems natural enough to me. What problem are you having with it?
Comment: As the domain of f is A,  $f^{-1}(E)$ is a subset of A.
Comment: What is the final $f$ in $f^{-1}[E]$?
Comment: It was $\pi_i$ indeed, thanks for noticing!
Answer: I agree with the definition of the Cartesian product, that's completely standard (a set of functions $f$ from the index set $I$ such that $f(i) \in X_i$ for all $i \in I$). The codomain is "relevant" in the sense that it allows us to justify this as a set (from the axioms): a function is a subset of a product $A \times B$ (defined as sets of ordered pairs, e.g. with Kuratowski's definition $(a,b) := \{\{a\},\{a,b\}\}$ etc.) where $A$ and $B$ are already given to be sets. In this case we want $A = I$ (a set) and as $B$ we choose $\bigcup_i X_i$ (a set by the union axiom), because we already "know" that all values of $f$'s in the Cartesian product we want to define are going to be in this union. So this way we can garantuee from the pairs/union/comprehension etc. axioms that $\prod_i X_i$ is going to be a well-defined set. But "really" it's just some collection of ordered pairs fulfilling some conditions. I give these conditions at the end in more formal terms.
The projection $\pi_j: \prod_{i \in I} X_i \to X_j$, for any fixed $j \in I$ is defined as $\pi_j(f) = f(j)$, which indeed is in $X_j$ by definition.
If $E$ is a subset of $X_j$, then consider what it means to be some $f$ in $\pi_j^{-1}[E]$: $f \in \prod_{i \in I} X_i$ so it is a function defined on $I$ with $f(i) \in X_i$ for all $i$ and $\pi_j(f) \in E$ forces the only extra restriction that in fact $f(j) \in E$. But these are also exactly the conditions for a function on $I$ to be in $\prod_{i \in I} E_i$ where all $E_i = X_i$ except $E_j=E$. They're the same conditions on $f$ as a set of ordered pairs. Hence that we can say
$$\pi_j^{-1}[E] = \prod_{i \in I} E_i \text{ where all } E_i \text{ (except } E_j = E \text{) equal } X_i$$
So to recap a set $f$ is in $\prod_{i \in I} X_i$ iff

$\forall x \in f: \exists i \in I: \exists p: x= (i,p)$.
$\forall i \in I: \exists p: (i,p) \in f$.
$\forall i \in I: \forall p,p': ((i,p) \in f \land (i,p') \in f) \implies p=p'$. (the last equality is equality of sets, so really $p=p'$ should be $\forall x: x \in p \leftrightarrow x \in p'$)
$\forall i \in I: \exists x \in X_i: (i,x) \in f$.
Comment: Functions in $\displaystyle\prod_{\substack{i\in A}}X_i$ have $\displaystyle\bigcup_{\substack{i\in A}}X_i$ as codomain; functions in $\displaystyle\prod_{\substack{i\in A}}E_i$ have $\displaystyle\bigcup_{\substack{i\in A}}E_i$ as codomain. How this can be formally contained in the first one? It's just fussiness, I got all of the definitions, the concepts behind, just that missing point
Comment: @DanieleLee A function is a set of pairs; its domain and codomain can be inferred from the set.
Comment: I got it! Thanks Henno! :)
Comment: @DanieleLee glad to be able to help!
Answer: It's ${\bf\pi_i}^{-1}(E)$ that is $\prod_jE_j$ with $E_j=X_j$ if $j\ne i$ and $E_i=E$.


ant debug is not working

Question: I have downloaded "Ant" to D:Windows folder.set the ANT_HOME environment variable as "D:\Windows\apache-ant-1.7.0".I have added it as both syatem variable and user variable. But when i open the command prompt and run the command "ant -versions" it is displaying error message as "ant is not recoganised as an internal or external command,operable program or batch file".Is there any error in installing Ant?Do i need to add bin to ANT_HOME?Please help me.
Answer: ANT_HOME - used for detect what of many location should be used by environment
To use ant from command line you have set PATH variable. Edit existing one (system for example) and append to the end with ; separator location of ant.
BTW since ANT_HOME is already set you can use extended syntax for set PATH:
PATH=c:\windows......;%ANT_HOME%

Answer: Add like this
Add ANT_HOME environment variable
ANT_HOME = "D:\Windows\apache-ant-1.7.0"

edit environment PATH variable to %ANT_HOME%/bin folder
PATH = ...maybe-other-entries...;%ANT_HOME%\bin;...maybe-other-entries...

ant debug is not working


Can the Arduino Due be used as a serial to USB converter?

Question: The Arduino due exclusively runs on 3.3V, so I am wondering if this can be used as a USB to serial converter just like the Arduino Uno could, or do you need to do level shifting?? Will I ruin the board if I just hook up RX and TX to a 5v device?
Answer: Yes it will work as a USB to serial device, however the serial will be at 3.3V not 5V. It'll still be serial though.
For it to send data to a 5V device, depending on the device, it might work.  3.3V is often around the "high" threshold for an input pin on a 5V device, but check the datasheet for the 5V device to be sure.
For receiving data the 5V will be above the 3.3V supply voltage of the main SAM3X chip, so should be avoided. As with most Atmel datasheets, actually finding the information you want is almost impossible, and I haven't found if there is a maximum "over voltage input current" or not, so to be on the safe side a full level shifting voltage divider should be used on the RX pin.
Comment: According to the datasheet 'Absolute Maximum Ratings' on page 1378 (where you'd look for things like these...) Voltage on Input Pins with Respect to Ground (except VBUS)...............-0.3V to +4.0V. No idea what you mean with "over voltage input current" but I'm not surprised it isn't in the datasheet.
Comment: Well, I said s***w it, and went ahead and tried it. Everything actually worked just fine! I was able to communicate with a serial device with putty and send and receive commands. I probably am going over recommended voltage, but I have not fried my Arduino (checked Rx and Tx with 3.3v device afterwards), so I guess it's fine.
Comment: The "over voltage input current" is basically the current rating of the ESD diodes on the input pin. I fyou know that you can get away with just a series resistor on the RX pin to protect it. I would advocate at least having a series resistor if you are reticent to make a voltage divider. 1K would most likely give enough protection.


Not able to open database file in SQLite manager plugin for eclipse?

Question: I downloaded the jar file and placed it in <code>/plugins</code> directory. Restarted eclipse as asked for eclipse to load new plugin. Opened file explorer and navigated to /package.name/databases/file.db but not able to open it in the plugin. It appears unclickable. What to do here? Check screenshot.
Comment: whats the name of the plugin ?
Comment: http://www.coderzheaven.com/2011/04/18/sqlitemanager-plugin-for-eclipse/
Answer: From the emulator unistall the app.
Then in the code, when you create the database, name it with extension.
For e.g. if your database name is MyDB, then write it as MyDB.db
This will enable the Open File Icon on sqlite manager on eclipse.
Comment: As @V A mentions, if the database file does not finish with the .db extension, the ICON for opening with SQLite browser wont be enabled.
Answer: As from your Screenshot it is clear that your database doesn't have an extension currently.
Therefore it is not allowing to open the database file but if you can see here
You can delete the database from here using the "-" option delete both the database and .journal file.
Add .db extension where you are creating the ordersManager database and run the application again.(Remeber to create the database)
when you will again come to DDMS to see your database and click on ordersManager.db file the icon which i have circled will become enabled then click on it and you will be able to read data.
Also you can pull the database from device and use something like SQLLiteBrowser
Answer: Here are thr few useful links :
1) Link 1
2) Link 2
The mistake that you are doing is that you didn't mention the ".db" extension with your db name. Delete your previous db and name a new db with .db extention i.e. "Sample.db" try it i hope it will solve your problem.
Answer: You have to mark the database like you did in your screenshot but then you have to click the database icon in the top
also its better to place the plugin in the dropin folder because you haven't loaded it by a url
Answer: Try this download SQLite3 manager from this http://sqlitemanager.en.softonic.com/ . And install it.And pull your database (i.e. file.db ) from DDMS to now location and try to open it with using Sqlite3 manager.
And you will be able to see your database contents.
I think this is what you want.
Answer: Try this..

Download the Android Sqlite Manager here.
Add it to your eclipse > dropins Directory.
Restart eclipse and go to DDMS.
Select .db file in DDMS Perspective
click Sqlite Manger icon.

Now you're able to open the .db file.


Best Way to Convert Clojure Source to Java Source Automatically

Question: I want to take working Clojure source code files (.clj) and convert them into the equivalent java source code files (.java) automatically. I'm wondering what the best way to do this is or if it is even possible. The converted java source code would need to be acceptable enough.
Comment: Have a look at: http://georgejahad.com/clojure/clojureDecompiled.html
Comment: It's definitely *possible*, because Clojure compiles to JVM bytecode, and there are bytecode-to-Java decompilers. But one suspects and hopes there's a more direct route that will produce dramatically higher-quality code...
Comment: note that you may end up depending on the clojure runtime library anyway.
Comment: It might be possible with a lot of effort, but I'd strongly recommend against the idea - auto translated code is generally horrible and unmaintainable by humans. It will be even worse in Clojure->Java because Clojure has a lot of constructs that are not easy to express in Java (macros? eval?). You have been warned!
Comment: Yes, I mean is it possible to produce the Java source with any readability.
Answer: Your best bet, as others have pointed out, would be to use a bytecode decompiler. You'll still need the clojure classes though. But, more importantly, if your goal is to generate Java code that needs to be handled by Java programmers, it is very unlikely that you'll succeed.
Clojure is not just "java with a different syntax". Its language constructs are so different from java that many things that are idiomatic Clojure will look very foreign in Java.
Even if your Java code would look more or less readable, your Java developers would get incredibly frustrated. They'd essentially still need to program Lisp but use Java syntax and very strange constructs: It'll be a mess.
If you're looking to use Clojure in a team of Java developers, I'd try to develop and package your Clojure code as a jar with a well defined java API. The Java developers would be happy, because it's just another java library, and you'll be happy because you'll write proper Clojure code.
Answer: I would try generating .class file from .clj and then decompiling it to .java with a decompiler e.g. JAD.
Comment: Also keep in mind that the decompiled code will depend on Clojures classes. So you will not get "pure" Java code. It's probably the best solution though.
Answer: The Clojure debugging toolkit is an excellent tool for digging into compiled Clojure code and it demonstrates some of the ways Clojure's classes differ from classes produced from java source.
It would be difficult for instance to write java code to represent Clojures closures for instance (though it's possible)
Clojure produces byte codes that cannot be produced by compiling any java program, so a general solution is not possible. Specifically Clojure nulls out arguments (in the calling frame) before making recursive calls. Since you are starting from source and not .class files you should be able to get close enough provided you don't try to guarantee that the java code will produce the exact same behavior. Clojure prevents some memory leaks in recursion that will be really hard to avoid in the equivalent java code.
"The purpose of this code is to null out the arguments to prevent 'holding the head' in case of a recursive function call. " from George Jahad's talk on decompiling clojure classes. http://georgejahad.com/clojure/clojureDecompiled.html
Answer: I am not intimately familiar with Clojure but note that you in general can read in a Lisp program and treat it as a datastructure, which is most likely better than handling the compiled Clojure code as this strongly depends on the Clojure runtime.
If this is for your own programs then you can probably live with a very small subset of full Clojure and that can you probably handle yourself with a small program generator.


Rooting Linux via mysql

Question: I have a CentOS 5.6 x86 installed. I have full access to mysql but it seems I have forgotten Linux root password. How I can access the root via MySQL? Is it even possible?
Update: MySQL Version is 5.0.77
Answer: I am not a MySQL expert but I don't believe that MySQL allows you to execute arbitrary (shell) commands.
Furthermore MySQL would have to run as root which I hope it doesn't.
So in order to achieve that you would probably need two exploits: One hacking MySQL itself and giving you shell access and another for becoming root: a local root exploit (privilege escalation). You probably don't want to do either of them.
You can easily reset the password by booting the system with the kernel parameter init=/bin/bash or by booting from another medium (CD/DVD/USB), chrooting into the installed system and call passwd there.
But the whole story seems strange to me. Who does not have SSH access with keys instead of a password?

Rooting Linux via mysql


Wall mounting hose reels and wall cracks

Question: I am considering getting some hose reels mounted onto our brick veneer home. However have been advised by family that the bricks might fracture etc and that it is better to just leave it on a trolley. Has anyone ever had such trouble? Thank you.
Comment: I would think that cracking in the brick would be because of poor installation rather than use...
Answer: Veneer bricks crack easily even using a masonry bit but the real question is what is behind the brick?  A hose reel could easily weigh fifty pounds, particularly if there was still water in the hose when you hung it up.  In this case you should not rely on the brick veneer to carry the load.
Possible solutions depend on what is behind the brick.

If it is concrete then a hammer drill with a masonry bit and Tapcon screws should do the job. An overkill solution would be attach the hose reel to a one or two foot length of two by four and then attach the wood to what is behind the brick.  By using a larger attachment point you spread out the stress and can use more fasteners.
if the brick veneer is mortared onto some tar paper with plywood sheathing behind that then you need to find where the joists are. Use a hammer drill with a masonry bit to drill through the brick and attach the hose reel to one or more joists using outdoor grade screws.  You could also use a two by four as mentioned above.

I will grant that this is more work and effort than might be required by some. My motto is "What I put up,stays up".


Save File Dialog boxes in VB WPF

Question: In Windows Forms it seems there are precreated dialog boxes for opening and saving files.
That is greyed out in the WPF toolbox.
Is there an easy way to create such a dialog box using WPF?
Answer: Yes, but you have to add a reference to Microsoft.Win32 and use the OpenFileDialog class which will initiate the same OS dialog you'd get from Winforms...
var ofdXlsDataSource = new OpenFileDialog
{
    CheckPathExists = true,
    CheckFileExists = true,
    Multiselect = false,
    Filter = "Excel documents (*.xlsx)|*.xlsx",
    RestoreDirectory = true
};

if (ofdXlsDataSource.ShowDialog() == true)
{
    ...
}

Answer: Have a look at OOkii Dialogs, it's a free library that supports a large range of "standard" and custom dialogs designed for both Winforms and WPF.

Save File Dialog boxes in VB WPF


Entity Framework migration and product versioning

Question: Scenario:
I'm using EF6 with one of our software product (network base web application) and we've different versions of products installed on customer machines. All customers have support period of x months so they are running on different versions of product and their respective databases are on different EF migrations.
I have a few other colleagues helping me with support of the product and they regularly deal with support phone calls from customer for different versions of product.
Problem:
Product only supports upgrading EF database and downgrading is not supported due to data loss concerns. So when we need to support an older version we use an internal tool to up/down-grade EF database. Problem is my colleagues are not aware about which database migration goes with what version of our product.
So my question: is there a way to attach our product version to migration history row?
What I've considered so far:

Embed product version in the name of the migration.
This is doable but I need to train other devs to make sure to include product version in the migration.
Create an empty migration with each major release of the product.
This one has the same issue as approach 1. I can automate this into the product release script but that involves too much effort and not to mention possible issues.

What I want:
I'm planing to attach product version with migration itself. Meaning, I want to add a new column to the MigrationHistory table which will hold this information (will be deriving my new class from HistoryRow).
What I'm not sure about is, how to intercept database migration template so that I can embed product version (assembly version) to the migration and I don't have to remember to do it manually.
I'm sure one of you must have feel this pain and possibly there is a better solution out there. Any ideas/suggestions?
Comment: Not 100% clear, but if your issue is you need to upgrade from multiple old versions to current version EF handles that. Generate an idempotent script of all migrations which checks the __MIgrationHistory to see which ones have not been applied.
Comment: My issue is with downgrading. I wan't to intercept migration creation process, so that I can embed value for my custom column when migration is created.
Answer: You can customize the Migrations History table by implementing and registering a custom subclass of HistoryContext.  Then you have all the interception methods for a normal DbContext: SaveChanges, ValidateEntity, etc.
But I don't think this really helps.  You don't actually care when the Migration is applied, which is what the HistoryContext will tell you.  You care when the Migration was created relative to your releases.
There is, in fact, nothing in your source that will tell you this.  You can't know what release a change will end up in when you make it.
I think your idea to "Create an empty migration with each major release of the product." is the right one.  In that empty migration you can add code to update some table that stores the name of the release.


Broken smd component

Question: I broke what looks to be either a diode, capacitor or resistor on the board of my pi 4B they are related to the hdmi output i guess and I want to try and replace the surface mounted component(all four highlited components are broken). I know the chances are pretty slim, but I cannot try without knowing what I need to get.
Comment: all four of them
Comment: this is the picture of a healthy board i have
Comment: in the broken one they're all ripped off
Comment: check the schematic diagram and the mechanical drawings to determine which components are those
Comment: (1) You don't need to use SMDs. You can just use through hole replacements; (2) Ref: https://raspberrypi.stackexchange.com/questions/104596/rpi3b-micro-usb-connector-got-15v-power-is-it-dead-can-i-save-it/104614#104614. Good luck.
Answer: Welcome! Start with the understanding that without experience it will probably never work again. Purchase some resistors, they are less then $2.00 per thousand 0805. Get a value and size you will use. While you are waiting for them to come in and the other needed parts, also get some flux and SMD soldering paste. You will need a hot air gun for SMD rework, SS tweezers, cotton sticks and isopropyl alcohol, I use 91%. I have a soft brush and normally rinse my boards with very hot water add some liquid soap and scrub, rinse and air dry, they come out nice and clean. If that does not work you probably used rosin core and the alcohol will work for that. Now get some junk/scrap boards with SMD parts on them. In your free time watch several videos on SMD repair etc so you are familiar with it. You may even find another tool or so you may want. Now remove and replace parts on the practice boards, when you are comfortable take your time and go after the real thing. Good luck and let us know how you make out.
Answer: Yes you face some problems as there's probably less point in trying to replace those chips if you don't know what values the missing ones were (unless you have the ones that got knocked off in a bag somewhere?) Apart from the black chip resistor the rest are chip capacitors however that doesn't really help you much without their values.
If you were able to obtain another pi board of the same spec and revision to get the missing values your course of action and tools required would be as follows.
Tools: fine tipped (preferably temperature controlled) soldering iron. Fine gauge flux cored solder wire. (Depending on the age of your assembly I suspect the solder will be No-clean but no reason technically why you can't use tin/lead rosin cored solder wire for a repair to a lead-free assembly.) If you are going to use lead-free make sure the iron you buy is capable of reaching the higher temperature of lead-free solder and that you use the correct flux. If you use rosin flux you may want to buy a flux cleaner aerosol and stiff bristled pencil brush but not essential, and a decent pair of stainless steel tweezers. (Worth spending £20 plus for one pair tweezers. Cheap is crap is worthless)
No reason at all why you can't hand solder chip components using flux cored solder wire, but unless you have a calibrated temp controlled iron it is preferable to avoid direct contact between chips (capacitors in particular) and the soldering iron tip, so tin the pads lightly before placing the chip. Melt a bit more solder onto the outer end of first pad then use tweezers to offer the chip such that the chip termination is up against or directly sitting on the bump of solder. Hold the chip there, making sure the other end remains flat on the other pad, then place the iron tip onto the solder bump away from the chip. Meaning keep a gap between iron tip and chip. As you melt the solder watch for the solder to fuse between solder on pad and tinned chip termination.  Now touch the iron tip onto the outer end of the other pad and melt solder wire onto the pad and it will flow toward the still to be soldered chip termination, ensuring no direct contact between chip and iron.
Ok this all sounds difficult but it isn't really and after a couple of tries with surplus chips you'll be fine. (I've done loads over many years it's no big thing, you don't have to go down the more expensive solder paste and reflow route for repairs / rework and you can still maintain IPC soldering standards.)
If you can get a duplicate pi you can read the resistor value with your eyes but you need to de-solder each cap, measure it with a multimeter and re-solder.
I should add that the smaller the chips the smaller the PCB pads for those chips, which means the net adhesion between the pad (and chips soldered onto them) and the PCB laminate is not strong. So when your chips were knocked off were the pads pulled off too? Have good look as a couple of those chips look like 0603 so very vulnerable to pad delamination.
Good luck
Nick
Comment: Please structure your answer into chapters, as it is now its just a BIG text blob.

Broken smd component


Will a titanium piercing tarnish if submerged in sulfur water (hot spring)?

Question: I have tried to research whether titanium piercings will tarnish if one submerges in sulfur hot springs. Will titanium piercings react to the sulfur water?
Comment: I understand OP is new to the site so I would like to point to the elephant in the room. Your question received downvotes because of one of the reasons mentioned on this page: https://chemistry.stackexchange.com/help/how-to-ask
Comment: No.$\ce{~~~~~}$
Answer: Neither Hydrogen sulfide nor sulfur dioxide will corrode titanium at ambient temperatures.
Comment: We are not actually addressing the properties of pure titanium, but an alloy thereof.
Comment: Grades 1 to 4 are considered to be unalloyed.. they have increasing levels of oxygen , nitrogen and similar interstitials that have little affect on corrosion resistance; They are increasingly stronger with less ductility. Jewelry would logically be made of them. Grade 2 is most common , difficult to imagine a jewelry producer going to the expense of other grades . And of course Grade 5 would need to be heat-treated - way beyond a jewelers skill.
Comment: Wikipedia is good but they do have some poor listings. The one for Inconel is very misleading.
Comment: Actually, per my edited answer, a source marketing such rings, clearly recommends rinsing off the ring after normal seawater exposure, which suggests an electrochemical promoted corrosion issue here, especially in a highly salty mineral bath (also with a sulfur presence).
Answer: The question actually relates to Titanium piercings. Per Wikipedia on the topic of Body Piercing Materials, to quote:

Titanium body jewelry is often manufactured in either commercially pure grades 1 to 4, grade 5 TI6AL4V alloy or grade 23 Ti6AL4V ELI alloy.

where the keyword is "alloy".
So, rephrasing the question, could a Titanium-based alloy be subject to electrochemical corrosion in the presence of hydrogen sulfide?
My answer is a possible yes, and I suspect the person asking the question has already confirmed this via direct observation.
This article: Corrosion characterization of titanium alloys by electrochemical techniques appears to confirm potential corrosion issues in even a lab constructed physiological solution.
I suspect, aqueous $\ce{H2S}$, would be even more problematic, and likely could result in visible electrochemical based corrosion.
[EDIT] Did find an interesting suggestion on how to care for your Titanium jewelry, particularly rings here, to quote:

You should also rinse the salt off of your ring after swimming in the ocean.

So, on the question as to "whether titanium piercings will tarnish if one submerges in sulfur hot spring", a source marketing such rings, recommends rinsing off your ring after exposure to a salt-rich solution. Note, salt is well known to generally promote electrochemical based corrosion and, not even further considering a sulfur presence, there appears to be a potential issue here (else it would not be recommended!).


Are priests being "cancelled" by Bishops all over America?

Question: In an interview with Dr. Taylor Marshall, Fr. James Altman says that bishops censuring hundreds of priests from their parishes for speaking out against political issues.  Is there evidence that many priests, besides him, have had their faculties removed or been removed from their parishes in the last year or two?
Comment: @Lucian if a few hundred spoke in these ways, and those few hundred were removed, that would seem relevant to me.
Comment: @ken either or, just some canonical penalty for speaking out against the current evil.  Fr. Altman, for example, has been limited to what he can do as a priest, he hasn't been moved to another parish.  I think it's relevant because it seems to have a chilling effect on priests who would otherwise be likely to preach the Gospel properly.
Comment: I really doubt that there are many priests who have had their faculties removed for speaking out against political issues. In most cases a priest would be reprimanded in order to force him to stop doing so, prior to being disciplined in such a manner.
Comment: There seem to be about [35,000 priests in the US](http://en.wikipedia.org/wiki/Priest_shortage_in_the_Catholic_Church#North_America); not sure how removing a few hundreds would be relevant.
Comment: @KenGraham "removed from their parishes" doesn't necessarily entail loss of faculties. For example, in Indiana last year a priest was removed for a statement he made but his faculties weren't generally removed. He was later assigned to a new parish
Comment: @eques Peter mentions **"removal of faculties"** in his post.
Comment: @KenGraham OP may not be clear that removing faculties and removing from a parish are not identical things. It would be helpful if that were clarified
Comment: @eques tis' true, you may take my golden catholicism badge.
Answer: Are priests being "cancelled" by Bishops all over America?
The term cancelled is a very dubious term to be employed here.
There are other issues involved here, other than Covid-19. Other priests have been subject to suspension, but there are no numbers to support that hundreds have been suspended for political reasons all over the United States within the last two years.
In the interview with Dr. Taylor Marshall,  Fr. James Altman had been cancelled as a priest. However the term is truly murky at best.
The best term to be employed here would be suspension as an ecclesiastical punishment.

Penal Remedies and penances
Can. 1339 §1. An ordinary, personally or through another, can warn a person who is in the proximate occasion of committing a delict or upon whom, after investigation, grave suspicion of having committed a delict has fallen.
§2. He can also rebuke a person whose behavior causes scandal or a grave disturbance of order, in a manner accommodated to the special conditions of the person and the deed.
§3. The warning or rebuke must always be established at least by some document which is to be kept in the secret archive of the curia.
Can. 1340 §1. A penance, which can be imposed in the external forum, is the performance of some work of religion, piety, or charity.
§2. A public penance is never to be imposed for an occult transgression.
§3. According to his own prudent judgment, an ordinary can add penances to the penal remedy of warning or rebuke.

Fr. James Altman, thus is under suspension.

Fr. James Altman, a rogue Wisconsin priest who flouted COVID-19 protocols at the height of the pandemic, derided liberals as "left-wing fascist Nazis" and warned that Catholics who support the Democratic Party could "face the fires of hell," has been removed as pastor of his parish and restricted from ministry.
According to a new decree issued by La Crosse Bishop William Callahan, Altman is only allowed to celebrate Mass in private and is barred from preaching. He has also been instructed to take a 30-day spiritual retreat to "give him the possibility to spiritually heal and recharge and address the issues that caused the issuance of this decree."
The latest developments come less than two months after Altman announced that he would fight a request by Callahan to resign as pastor of St. James the Less Catholic Church where he has served since 2017.
The priest turned conservative firebrand has made national headlines for his controversial and incendiary remarks in recent months. Altman earlier told his parishioners that the bishop had labeled him as "divisive and ineffective" and in response, he raised nearly $700,000 through online crowdfunding campaigns in support of his appeal efforts.
Nicholas Cafardi, a civil and canon lawyer and a professor and former dean at Duquesne University School of Law, had previously told NCR that under the church's canon law, a pastor has particular rights and responsibilities and in order to be removed, the bishop must have a proper cause and follow a particular process.
"The cause here is for disturbing ecclesiastical communion," Cafardi said, noting that Altman has the option to appeal the bishop's decision to the Vatican's Congregation for the Clergy.
The La Crosse diocese did not immediately respond to an NCR query as to whether a new administrator has been named to Altman's former parish.
Despite the efforts of Callahan to limit the priest's public ministry, Altman has received the backing of Bishop Joseph Strickland of Tyler, Texas, who has repeatedly praised Altman's ministry and endorsed his viral video claiming faithful Catholics cannot be Democrats.
"Fr. James Altman is in trouble for speaking the truth," Strickland wrote on Twitter on May 24. "He inspires many to keep the faith during these dark days. Let us pray for him."
Both Strickland and Altman have flouted COVID-19 protocols and voiced opposition to vaccines, while both the Vatican and the U.S. bishops' conference have made repeated efforts to encourage Catholics to get vaccinated. - Wisconsin bishop restricts ministry of firebrand priest Fr. James Altman

Fr. James Altman has not lost his status as a priest in good standing or lost his of clerical state whatsoever. Nor has he been defrocked.
It is true that he is no longer pastor of St. James Parish. Perhaps, this is what is meant by their use of the term "cancelled". Generally, speaking pastors do not remain longer in a particular parish for more than 10 years nowadays. Priests get transferred to other parishes all the time, so that is not a big issue. Fr. Altman may still say mass, but only in private. I have personally known of some priests being disciplined in similar ways, but it is extremely rear. Usually, the issues involved get cleared up easily. Fr. Altman being so popular will make it that much more difficult for him.
Back in the days of the Cure of Ars, priests were commonly pastors of a particular parish church for much longer and often for life.
As for the them saying that as your question assumes "bishops [are] censuring hundreds of priests from their parishes for speaking out against political issues," can not be supported.
I find that there is little evidence that many priests, besides him, have had their faculties removed or been removed from their parishes in the last year or two!
If hundreds of priests are being censored and having their faculties removed does not add up. There are 196 dioceses in the US. That means in general more priests are being disciplined than there are dioceses. That would make new!

The Catholic Church in the United States has a total of 196 particular churches — consisting of 32 territorial archdioceses, 144 territorial dioceses, the Archdiocese for the Military Services, USA (serving members of the US Armed Forces and Diplomatic Corps, and those in facilities of the Veterans Administration and their dependents), and the Personal Ordinariate of the Chair of Saint Peter (serving Catholics who were formerly Anglicans) within the Latin Church; and two archeparchies and 16 eparchies in the Eastern Catholic Churches — in the 50 U.S. states and the US Virgin Islands. - List of Catholic dioceses in the United States

Please keep in mind that with Fr. James Altman has the right of appeal to Rome. That is has privilege. Remember also that his platform contradicts Pope Francis and the U.S. bishops' conference by encouraging Catholics not to accept the Covid-19 vaccine. Both the Vatican and the U.S. bishops' conference have made repeated efforts to encourage Catholics to get vaccinated.
Comment: https://www.catholicworldreport.com/2020/07/09/indiana-priests-suspension-after-black-lives-matter-letter-divides-catholics/  and Fr. Z was apparently kicked out of my diocese https://wdtprs.com/2021/07/d-richmond-another-cancelled-priest/  (although I've seen him around a bit).   Covid put all these priests on youtube in the first place, I don't think they were asking for notoriety.
Comment: Also, there's no Covid in Wisconsin.
Comment: "Remember also that his platform contradicts Pope Francis and the U.S. bishops' conference by encouraging Catholics not to accept the Covid-19 vaccine." Which HE is entitled to do. Things which are not dogma or for that matter long-held doctrine can absolutely be disputed.
Comment: @eques True, but he is creating much confusion and notoriety. This is only one of the issues that are in question here. This is really only a secondary issue in response to the actual question: **Are priests being "cancelled" by Bishops all over America?**
Comment: I can't agree. The episcopacy has created far more confusion by not teaching things which are clear and insisting on things as though they were clear (E.g. the vaccine, immigration, capital punishment, etc)
Comment: but most of your answer is an extended commentary on the specific situation, not an actual answer on whether "hundreds" are canceled.
Comment: @eques You are are free to disagree! Pax!
Comment: Priests, like all Christians, are obligated to tell the truth. If they are spreading lies then they should be disciplined, whether or not their lies contradict church doctrine.


Subspaces of finite dimensional Hilbert spaces

Question: This might be a trivial question but please point out exactly where my reasoning is incorrect. Is every subspace of $\mathbb{R}^n$ closed since $\mathbb{R}^n$ with the dot product is a finite dimensional Hilbert space and all subspaces of finite dimensional Hilbert spaces are closed?
Comment: It's not incorrect, but you need much less than Hilbert. Every finite-dimensional subspace of a Hausdorff topological vector space is closed.
Comment: @Alex Hausdorff is necessary. Otherwise $\{0\}$ is a finite-dimensional but not closed subspace.
Comment: Do you need the TVS to be Hausdorff? Does it not follow for all topological vector spaces?
Comment: I don't understand your '$\{0\}$ example' above, could you expand on that? Why would $\{0\}$ not be closed if assuming that TVS is the only requirement and why is that a problem?
Comment: @Alex Let $X$ be the real line with the trivial topology: the only open sets are $\varnothing$ and $X$. This is a TVS. The set $\{0\} $ is a zero-dimensional subspace of $X$ which is not closed. If you don't like zero-dimensional example, consider $\mathbb R$ as a subspace of $\mathbb R^2$, again with the trivial topology.
Comment: Thanks for response. Would I be right then in stating the following: If I have vector space $V$ which is isomorphic to a euclidean space of finite dimension and I consider the subset $\{ u \in V: \Vert u \Vert \leq M\} \subset V$ for some constant $M > 0$, then can I conclude that this subset is closed? and therefore also compact since it is obviously bounded?
Answer: The statement in the comment is correct.
The reasoning in the question is also correct on the technical level, but I can't really tell how adequate it is in the context where you'll put it. Generally, by the time people learn what a Hilbert space is, they already know how to prove that a linear subspace of $\mathbb R^n$  is closed (because they know enough linear algebra to represent such a subspace by a system of linear equations, i.e., as the kernel of a linear operator).
What I'm saying is: a person who actually needs  an explanation of why  a linear subspace of $\mathbb R^n$ is closed is unlikely to be satisfied with yours.
Comment: Okay I have not followed traditional course of studying functional analysis but am instead trying to learn independently. Okay but just to be clear my question was referring to any subset of $\mathbb{R}^{n}$ which is endowed with the subspace topology, not just linear subspaces of $\mathbb{R}^{n}$. Does the result I stated in my initial question only apply to linear subspaces?
Comment: @Moses So you're asking if every subset of $\mathbb R^n$ is closed? Does the interval $(0,1)$ look like a closed subset of $\mathbb R$ to you?


Can Protection Fighting Style Be Used After The Roll?

Question: Protection Fighting Style says that you can use your reaction to impose disadvantage on certain attacks, but it doesn't specify the timing.  Does this mean that you can wait until the d20 has been rolled, and then impose disadvantage afterwards?
Answer: No.
Advantage or disadvantage is a state that is determined when you roll the d20. It's not something you can impose after you see the roll.
The big problem here isn't with a normal roll, although I do believe that it would make this a somewhat overpowered feature. The big problem is how you deal with a roll that has advantage. If you impose disadvantage after you see the result of a roll that was rolled with advantage, which d20 roll do you take away?
Add to this the fact that it's pretty clear that advantage/disadvantage has to be determined when you roll the d20, and I think you've got a clear cut case to say no, this reaction has to be used when you're targeted, not when you know the die result.
Comment: All 3 of those have a much more significant cost than this (1 is a L1 spell, a valuable low level resource, the other two are feats, which aren't available at L1 unless you're a variant human). Defensive Duelist is the only one that doesn't consume additional resources, and it only adds proficiency (at low levels worse than disadvantage, at high levels better). Basically, as a L1 ability with no resource cost, yeah it *could* be a bit OP.


Would a self-signed certificate impact my site for search engines?

Question: Would a self-signed certificate impact my site for search engines? By that I mean, do robots refuse to index sites with self-signed certificates?
Comment: It will certainly put off visitors, anyway.  You can get a free SSL certificate with no problem.  All major browsers accept them.
Comment: How often has a search engine lead you to a page with a self-signed certificate? If you were building a search engine, would you want it to have links that people couldn't safely use?
Answer: Google says they use "many things" to determine page rank.  I think it is a quite reasonable leap to believe they also use certificate authenticity.
If so, because a self signed certificate is not as trusted, this would probably hurt your page ranking.  I'm guessing significantly hurt it.
Furthermore, even if I was able to find your page in Google, it is likely that TrendMicro (my preferred virus software) would by default block it when I tried to view it, putting up a big red notice, "This is a dangerous page".

Also it might be worth noting that not all well known CA signed SSL certificates are the same.
One free cert for example isn't verified as much:

"90.) Why are Class 1 certificates free? ... Since Class 1
  certificates are domain and/or email validated only and the process is
  performed mostly by electronic and automatic means, StartCom doesn't
  apply any fees for this type of certification." (1)

And my credit card processing company says:

"You should buy an SSL certificate from a good certificate provider.
  We recommend DigiCert — their certificates have very wide acceptance
  (and in particular should work well on mobile browsers, where many
  other certificate providers fall short). NameCheap is another good
  option. They have slightly lower acceptance but their basic
  certificates cost $10 to $20."  (2)

It is interesting to note this StartSSL's FAQ page is NOT served by https, while Stripe's help is.
That being said, I use a self signed certificate for development and testing, which I think is the only appropriate place to use this type of certificate.
[Edit: I previously said that I thought the free certificates could not be used for credit card validation.  I am now not 100% sure of this one way or another.  It seems that free certificates may work some of the time, but not all of the time.]
Comment: Couple of things - www.startssl.com/?app=1 (which is the StartSSL Free page) states "Because the checks are performed mostly by electronic means, they require only MINIMAL HUMAN INTERVENTION from our side."  (Emphasis mine) Indeed I have had a query on a free cert issued by them, so I know they are looking at it. Its not just me, of-course - There are articles about how Eddie (Owner of StartSSL) foiled hackers because he manually looks at certs - see http://archive.is/Chwsn
Comment: This is incorrect.  The free StartSSL cert is verified to the same level (in fact to a higher level) then many other certs - at least the guy behind it actually looks at it before issuing the cert rather then it being a totally automated process.  Browser acceptance is similar as well.   There is, of-course a difference in credibility between a cheap cert and an EV cert.
Comment: @Davidgo: The StartSSL web site does not say one way or another if the process is automated or not for the free certificates.  But let's not put common sense aside.  If you were in the business of giving out something free and you could automate it would you?  I believe it is probably automated.  I got a free certificate there for s/mime and the process _seemed_ automated to me.  I could be wrong.
Comment: Point noted.  Thanks for the back and forth on this.  I may well try a free cert when renewal time comes in another month.
Answer: Using an HTTPS-only version of your site is not going to hurt your ranking, as long as during the switch (assuming you switched from a previous non-HTTPS) you apply all the necessary redirects.
However, I do not recommend using a self-signed certificate for a production website. There are essentially two reasons:

The first one, is that users will notice a big red warning trying to load your site telling them that the certificate is not signed by a certificate authority and should not be trusted.

This is not definitely a good image for your website.
The second is essentially connected with the first. Because the certificate is not trusted, clients may refuse to connect to it. Clients include user browsers, but also crawlers and you may experience an impact on your visibility.

You should use a self-signed certificate only for testing. Purchase a trusted certificate for production.
Certificates today are very cheap, especially standard domain validated certificates.
Comment: Even if Google doesn't specifically have a ranking signal for self signed certificates, Google will notice that users get scared away by that warning message.  Anything that causes users to return to Google and look for your competition is going to lower your rankings.
Answer: I don't think anyone will definitively answer the question as it falls into the "Black Art" of SEO.
A reasonably conservative and educated guess though - probably not a good idea - even for regular HTTPS with a correct secure certificate Matt Cutts (Googles SEO authority) is unsure, and the comments were not positive - and this was with everything done right - although I do note its quite an old comment.
Logically though, having a self-signed SSL cert can only make things worse, as it does not have the credibility (and presumably not the level inbound links one would otherwise get).
Comment: That video is 3 years ago. Nowadays using HTTPs is a very common practice.


What's the constant coefficient of the Coppersmith-Winograd algorithm?

Question: Every source I can find just says "too big to be practical."
Comment: Someone has definitely computed an upper bound on the leading constant for the number of arithmetic ops, but I do not remember who (it was submitted  to a conference years ago) and I am not sure the writeup was ever made public... I will check. My recollection is that it was < 10^(500)...
Comment: I'm not sure anyone ever computed it. By the way, what constant are you looking for ? The constant for the number of multiplications ? Arithmetic operations ? Etc.
Comment: Arithmetic operations I suppose. Just to get some idea what the order of magnitude would be for CW and similar algorithms.
Comment: @RyanWilliams No luck?
Answer: I don't know the exact answer, but here are some relevant quotes regarding fast matrix multiplication in general:
(This quote is about an earlier method with $O(N^{2.77})$ complexity. $m^{*}(3^s|F)$ is the number of scalar multiplications required to multiply two $3^s \times 3^s$ matrices, excluding multiplications involved in constructing linear combinations of matrix entries.)

The last step is the crucial point with respect to all practical
applications of the method. Of course, we can assume that $F$ is
infinite and use Lemma 2.6, which gives the better bound $m^{*}(3^s|F) \leq (1 + 2s)21^s$, but even then the minimal value of $s$
for which this becomes smaller than the trivial bound $27^s$ is $s = 14$,
and $3^{14} = 4,782,969$. The same will apply for all other bounds given
in this paper.

Schönhage, A., Partial and total matrix multiplication, SIAM J. Comput. 10, 434-455 (1981).

Actually, there are two groups of algorithms that support an exponent
lower than Strassen's value of 2.81. The first group consists of
algorithms that use various advanced techniques and support exponents
from 2.38 to 2.775. [...]
If we restrict our study to the
multiplication of $N \times N$ matrices for $N < 10^{20}$, the only competition
for Strassen's algorithm comes from a second group of algorithms.
[...] These algorithms support exponents $\omega$ of about 2.775. Since the
crossover value of $N$ for which such algorithms improve on Strassen's
is as low as 20, these algorithms are good candidates for being of
practical value when compared to Strassen's and classical algorithms
for MM [matrix multiplication].

Laderman, Julian; Pan, Victor; Sha, Xuan-He, On practical algorithms for accelerated matrix multiplication, Linear Algebra Appl. 162-164, 557-588 (1992).

All known algorithms supporting matrix multiplication exponents below
2.7733, however, suffer from the curse of recursion: they involve very long recursive processes, whose each recursive step squares the input
size, and so these algorithms supersede the classical matrix
multiplication only for inputs of astronomical sizes, being far above
the level of any imaginable practical interest. The design and the
study of these algorithms was widely advertised and generously
supported, but made no impact on real world computations for matrix
multiplication or any other problem of Mathematics and Computational
Mathematics. As of 2017 the record bound $\omega < 2.7734$ of [114] for
feasible matrix multiplication of dimensions $n$ of at most 1 000 000
000 has remained unbeaten since 1982.

Pan, Victor Ya., Fast matrix multiplication and its algebraic neighbourhood, Sb. Math. 208, No. 11, 1661-1704 (2017); translation from Mat. Sb. 208, No. 11, 90-138 (2017).
So everything below $O(N^{\approx 2.8})$ is really impractical.
(off-topic) Actually, even Strassen's algorithm has little practical importance. It gives only $O((\mathrm{number\ of\ operations})^{0.023})$ increase in the maximum matrix size that you can afford given limited computational resources. For large-scale linear algebra, better options are available, such as preconditioned iterative linear solvers or Monte Carlo matrix multiplication.


Calculating equation of motion from action

Question: Suppose my action integral is $$S=\int d^4x(\nabla \times A)^2$$ and $\delta S$ gives $$\delta S =\int d^4x [2(\nabla \times A).(\nabla \times \delta A)]$$
I would like to calculate the coefficient of $\delta A$ from this action integral. But I am stuck. How can I separate the $\delta A$ from the term like this?
Comment: It might be useful to use index notation $(\nabla\times A)_i = \epsilon_{ijk}\partial_j A_k$ and integration by  parts.
Answer: Let's do what  Heidar says and write it with indices, and identify the Lagrangian.
$$
L=\frac{1}{2}(\vec{\nabla}\times \vec{A})^2 = \frac{1}{2}\epsilon_{ijk}\partial_j A_k \epsilon_{ilm}\partial_l A_m
$$
where, if you haven't heard of it yet, you pretend there is a summation symbol for each repeated index.  Then since there are no bare $A_i$ sitting by themselves, only $\partial_i A_j$s the only part of Lagrange's equations that will contribute are
$$
\partial_q \frac{\partial L}{\partial (\partial_q A_p)}
$$
which we set equal to zero following the equations.  Then
$$
\frac{\partial L}{\partial (\partial_q A_p)}=\frac{1}{2}(\epsilon_{ijk}\delta_{jq}\delta_{kp}\epsilon_{ilm}\partial_l A_m+\epsilon_{ijk}\partial_j A_k \epsilon_{ilm}\delta_{lq}\delta_{mp})
$$
using
$$
\frac{\partial (\partial_i A_j)}{\partial (\partial_q A_p)}=\delta_{iq}\delta_{jp}.
$$
Then we have
$$
\partial_q \frac{\partial L}{\partial (\partial_q A_p)}=\partial_q(\epsilon_{iqp}\epsilon_{ijk}\partial_i A_j) = \partial_q ((\delta_{qj}\delta_{pk}-\delta_{qk}\delta_{pj})\partial_{i} A_j)=\partial_q (\partial_q A_p - \partial_p A_q)=0
$$
where i used the contracted epsilon identity and changed the repeated indices as i needed them in order to combine terms.  Hope this helps.
EDIT:
Well, I'll still try and help out, hopefully I don't make anything any worse.
$$
\delta S = \int d^3 x \frac{1}{2}\epsilon_{ijk}\epsilon_{ilm}\delta(\partial_j A_k)\partial_l A_m+\int d^3 x\frac{1}{2}\epsilon_{ijk}\epsilon_{ilm}\partial_j A_k \delta(\partial_l A_m)
$$
Now with the variations $\delta$ we can interchange the order of $\partial$ and $\delta$
$$
\delta(\partial_i A_j)=\partial_i (\delta A_k)
$$
So with the two terms multiplied above we get
$$
\partial_j( \delta A_k)\partial_l A_m=\partial_j (\delta A_k \partial_l A_m)-\delta A_k \partial_j \partial_l A_m
$$
from the product rule.  This helps isolate the variation of the field.  Please (everyone) let me know if this is still confusing and/or wrong.  Hope this helps.
Comment: Sorry, your $=0$ at the very end is extremely confusing because it seems you are claiming that the previous expression is identically zero. It's surely not. Obviously, in general, the contribution is proportional to $\nabla\times B$. It would be pretty bad if if the (spatial) Maxwell term gave zero to the Maxwell equations. ;-) You shouldn't write it's zero because there are other terms in the equations from other terms in the action such as $j\cdot A$ and $(\partial_t A)^2$.
Comment: hmmm... but given the lagrangian from OP, are Lagrange's equations not what I wrote down in the last line?  Certainly you are right if the lagrangian is more complicated.
Comment: Actually I have to agree with Lubos Motl because there are other terms with it in the main Lagrangian. I have already tried the procedure you have described. That causes some problem. So one of my advisor asked me to try the path integral, separate the coefficient of the terms and that might leads to the equation of motion we want.
Comment: well my bad then, I thought you wanted the EOM assuming that was the whole action integral. sorry.


How to share only source with SVN in Eclipse?

Question: I want to share the source code of my project through SVN, but I can only share the entire project. How can I share only the source and/or specific folders within the project?
Answer: Right-click on the folders you don't want to put under SVN, and choose "Add to SVN ignore". Commit. The SVN will always ignore this folder.


Is there a way to make a file that would run a terminal command when you click it?

Question: Is there a way to make a file that would run a terminal command when you click it? Similar to a .bat extension in windows?
Answer: Open your text editor, and type the following line: #! /bin/bash. Leave an empty line and start typing your commands. Save the file, the extension doesn't matter.

Go to the file in your file manager, right-click it, open the properties dialog, go to the permissions tab in the dialog, check the "Allow execution of this file", and click the close button. Now you can double-click the file and choose to run it in a terminal window.
Comment: Byzanz ;) If you watch closely you can see me minimizing a terminal window with `byzanz-record` at the beginning of the animation.
Comment: +1, those animated gifs are pretty slick and make for a very good answer.
Comment: out of curiosity.. what did u use to record and post it to animate like that?
Comment: byzanz cool !!!!
Comment: hello i just follow your step but when i double-click the file it only open the getedit editor please help
Answer: In Linux those are called scripts of more accurately shell scripts.
Linux does not care what extension the file, it will look at the file's permissions to find if the file is set as executable and will run it if so.
You can create a script with any favorite text editor, just open one up and start scripting, you can use any shell interpreter you want being the normal used ones bash and sh.
Normally you start your scripts by declaring which command interpreter you want to use, #!/bin/bash for bash and #!/bin/sh for sh. After you have done so you can start typing commands in to the script lines just as you do on Windows with batch scripts.
After you have done editing, save your file and make it executable.
You can either open a terminal and type chmod 755 foo (where foo is your script name) or right click on the file you just created and on the permissions tab click in the Make the file executable.
When you are done you can double click on the file and your file manager should try to run it or ask if you want to run it. As an alternative you can also invoke your script in a terminal changing dir to where your script is and invoking it with ./foo.
A good start to learn Linux shell scripting is LinuxCommand.org, they teach you what you need, how to do it and have a lot of good examples on scripts that you can have a look at.
Answer: If it is a simple, one-line command, you can create a .desktop file, for example for a straightforward copy command like (in its simpelest form):
[Desktop Entry]
Name=Simple Copy
Exec=/bin/bash -c 'cp <source> <destination>'
Type=Application

Put the command between quotes, save the file with a .desktop extension, make it executable and run it by double-click.

You can make a .desktop file more complicated, add options, keywords, set an icon etc.
See this link.


Can i see only of my debug logs in salesforce?

Question: In my org there are tons of users. When i want to see my debug logs, i see thousands of debug logs which is not relevant for me, what should i do to check only of mine logs?
Comment: Generally speaking, the more details, the better. If you've tried to research this issue or work around it already, sharing your research and results will generally lead to your question being better received. That said, I don't think there's a ton of information out there on this specific topic. Are you able to execute queries (logs are stored in the `ApexLog` object, and it is queryable)? Is it possible for you to otherwise reduce the number of users being logged at any given point in time? The "thousands of logs" bit makes it sound like there is a lot of noise that can be eliminated.
Comment: If you want to use the UI to view the logs, you can just create a new view and set the Requested By First Name and Requested By Last Name as your name.  That should filter only your requested debug logs.
Answer: Yes you can see only your debug log. For this, you have to set your debug log in debug log

For more details you can read here : https://help.salesforce.com/articleView?id=code_add_users_debug_log.htm&type=5
Comment: Begging for upvotes and accepts is seen as rude behavior here, and I'd discourage you from making similar comments in the future.
Comment: This answer does not seem to adequately address the question at hand. OP (**O**riginal **P**oster of the question) is already seeing many debug logs and is trying to isolate their own. The issue is not with setting up a debug log of their own. As such, I've downvoted this answer.


Wordpress: wpdb->insert VERSUS wpdb->prepare(wpdb->query("INSERT

Question: I am wondering if wordpress' insert function also adds slashes to data. If it doesn't it would seem that the prepare query method would be better to prevent against SQL injection. I tried looking the issue up in there codex/api; however, it seems undocumented.
Thanks!
Answer: This question is a little old and the codex may have been updated since it was asked.  Both wpdb->insert() and wpdb->prepare() provide the same level of safety regarding SQL escaping of input data.
The codex states that the both the column and data values provided to the insert method should be raw, not SQL escaped.
I also took a quick look at the source to confirm.  The implementation for the insert method uses wpdb->prepare().
Comment: +1. No longer doing wordpress stuff; however, this answer rocks. I remember not knowing what prepare did at all or why all the examples were using it.
Answer: Wordpress uses ezSQL to query the database. Technically, it is not an abstraction layer but it does take away some of the boilerplate code. ezSQL has a function escape so I assume that Wordpress would always call the escape function before executing a query. But to be certain you would have to take a look at the source code.
This is how you escape a string in Wordpress:
$safe_string = $wpdb->escape($unsafe_string);


Is Possible to use 2 different master page for single SP Site?

Question: I have scenario like need to add 2 master pages for same site. And need to give the permission like one master page let say masterPageA will be act as anonymous When user have required permission they can see the another master page i.e masterPageB. Is it possible in SP?
Answer: That may be possible if you develop (I mean: C#, Visual Studio, etc.) a custom module.
More precisely, you would develop an HTTP module. It would check the current status of the request (authenticated or not), and switch the master page on the fly from the PreInit event. See for instance http://ranaictiu-technicalblog.blogspot.com/2009/10/sharepoint-dynamically-change-master.html (section "Develop a HttpModule to attach PreInit event handler").
Comment: I would stress the "may be" part and strongly advice against trying this at home :-)


How to hold frame in video render

Question: The cube is not moving for the first 30 frames so I want to render only 1 frame of those and then hold the rest 29 frames and then the cube will start moving after frame 60 to frame 90
Comment: So you want the cube to stay still from frame 1 to 60 then it moves from frame 60 to 90? It's not clear what you want... Also, what do you mean by "video render"?
Comment: I want it to stay still from frame 30 to 60, I use 30 as the starting point so if I bake physics they have some time to drop, and I don't know how to say video render any clearer.
Answer: First, hopefully you are rendering to an image sequence instead of to mp4, that is the recommended practice for several reasons.

Render the first "hold" image and save as a png.
Render frames 60-90, or the "motion" in your scene to image sequence (0060.png - 0090.png)
Open a new instance of Blender in Video Editing mode.
Add your single "hold" image to the timeline with Add -> Image/Sequence.  You can grab the ends of the clip on the timeline to extend or shorten the number of frames it will be shown.
Use Add -> Image/Sequence again to add frames 60-90 all at once, which will add it to the timeline as an image sequence with one image per frame.

Use the timeline to arrange things to your liking.

Then render this timeline to mp4 using the Output panel.

How to hold frame in video render


Change behaviour of Date at 00:00

Question: Is there a way to change how Date works when saving dates with the time in 00:00:00? I have a calendar view, and I would like to avoid having events showing as all-day when the are saved with a time of 00:00. Is this possible? I have a content type that cousd either start at 00:00 or end at 00:00, but those are not all day events.
Answer: You could (a) try changing the granularity of the date field in your content type (b) override the theme function. (ref)

Change behaviour of Date at 00:00


How do layer-2 bridges and protocols earn revenue?

Question: Everytime I've used a bridge like Polygon and Aztec, all they charge are gas fee transactions to make the transfers and lock-up conversions between layer 1 and layer 2. Bridges therefore are nothing more than smart contracts. Where do these protocols get their revenue as a business then?
Answer: At the moment, none of the bridges collects fees because it is s a loss-leading tactic to take market share. They are most VC funded have treasuries so that they can afford losses for a long time.
When you have amassed a sufficient amount of users, you can turn on the fees. See Uniswap v3 as an example.
Comment: So neither Polygon bridge nor Aztec Connect earn revenue, despite having high traffic? Can't find any information.
Comment: As those are third-party commercial products, it's better you ask the author of those products because they are the only ones that can give answers about their current and planned fee models. If you cannot find information they have support staff whose job is to answer your question.
Answer:
through transaction fees. When users make transactions on a layer-2 network, they often have to pay a small fee in order to cover the costs of running the network and incentivize network participants to process the transaction. These fees can be collected by the protocol or bridge and used to generate revenue.
layer-2 bridges and protocols can earn revenue is through staking. Many layer-2 networks use a staking model, where users can earn rewards by locking up their assets and participating in the network's consensus process. These rewards can be distributed to the protocol or bridge as a form of revenue.
just like the answer you accepted, some layer-2 networks may also earn revenue through grants, investments, or other forms of funding from third parties. This can provide additional resources for the protocol or bridge to continue developing and improving the network.
Comment: What are some layer-2 networks that use a staking model


How to check if string is a namespace

Question: I have a string and I want to check if it represents a proper namespace, eg. System.IO is ok, but System.Lol is not.
I guess some reflection should be used, but I can't figure this out.
Any thoughts?
Answer: Try this approach:
using System.CodeDom.Compiler;
using System.Linq;

class NamespaceTester : IDisposable
{
    private CodeDomProvider provider = CodeDomProvider.CreateProvider("c#");
    private CompilerParameters settings = new CompilerParameters();
    private CompilerResults results;

    public bool Test(string[] namespaces)
    {
        results = provider.CompileAssemblyFromSource(
            settings,
            namespaces.Select(n => String.Format("using {0};", n)).ToArray());
        return results.Errors
            .OfType<CompilerError>()
            .Any(e => String.Equals(
                e.ErrorText,
                "CS0234",
                StringComparison.Ordinal));
    }

    public void Dispose()
    {
        if (results != null)
        {
            System.IO.File.Delete(results.CompiledAssembly.Location);
        }
    }
}

where CS0234 is:

The type or namespace name 'name' does
  not exist in the class or namespace
  'scope' (are you missing an assembly
  reference?)

Custom references adding:
settings.ReferencedAssemblies.Add("Foobar.dll")

Usage:
public static void Main(string[] args)
{
    using (var tester = new NamespaceTester())
    {
        var success = tester.Test(new[] {
            "System.IO",
            "System.LOL"
        });
    }
}

Answer: Your question "How to check if string is a namespace" is only valid when you consider where you are checking for namespaces.
Namespaces are prefixes to class names, and classes are scoped to an assembly. To check whether a namespace exists, you need to decide which assemblies you are prepared to look through to find the existence of the namespace.
Once you have decided which assemblies you are prepared to look through, you can iterate through them for the existence of a particular namespace like so:
public bool NamespaceExists(IEnumerable<Assembly> assemblies, string ns)
{
    foreach(Assembly assembly in assemblies)
    {
        if(assembly.GetTypes().Any(type => type.Namespace == ns))
            return true;
    }

    return false;
}

Comment: `return assemblies.SelectMany(a => a.GetTypes()).Any(t => t.Namespace == ns)`
Comment: Oh, so picky! I'm pretty sure the answer is legible without, but an edit is yours. :)
Comment: Btw, you can't use reserved keyword `namespace` as a variable name ;)
Comment: Just for the sake of correctness, you should @-ize the namespace parameter, namespace is a C# keyword :)
Answer: Could you do this?
Assembly asm = Assembly.GetExecutingAssembly();
List<string> namespaceList = new List<string>();

foreach (Type type in asm.GetTypes())
{
    namespaceList.Add(type.Namespace);
}

Then just check to see if the string is in the list?
(Be warned, this isn't tested code!)
Answer: The CLR doesn't really have a concept of "namespaces": they're really little more than a naming convention. So there is no API to "list namespaces" or "get namespaces" or even "get all types in this namespace".
The best you could do is loop through all loaded assemblies, then loop through all exported types in each of those assemblies and check whether the given string is a "prefix" on any of those type names. I imagine this solution wouldn't be the fastest in the world, but it wouldn't be totally unworkable, either.
Answer: There is no reflection on namespaces. The namespaces define full type name. So what you need to do is:

Enumerate all types (you do not specify the source set, let's say .NET Framework, then you need to include all the default .NET assemblies (look at those referenced by VS when you create a project), or your custom assembly, then types in the assembly).
Look for Namespace property on the given type

What you need to use:
Assembly.Load method
Assembly.GetTypes method
Type.Namespace property

How to check if string is a namespace


How to activate the password prompt on Linux Mint Cinnamon lock screen?

Question: I am using Linux Mint 17 Cinnamon. When I lock the screen it shows a dimmed version of my desktop background and the time. So when I want to unlock it, I usually move the mouse and the prompt for entering the password appears. However, sometimes it appears rather slowly and today it didn't appear at all. I saw my mouse moving, but no matter how much I moved the mouse, clicked and typed the password prompt wouldn't appear. I thought this might have to do with the fact that I use an external screen with my laptop lid closed, but after I opened the lid nothing changed and I was still not able to unlock it. Finally, I restarted. So my questions: is this is a known issue with Mint and is there a particular way to call the password prompt?
Answer: Sometimes if your PC goes off to sleep, it takes time to resume. Check your power options.
Comment: When the problem occurs I can actively move the mouse over the lock screen of my __laptop__, so I am sure it is awake.


How do I sign an apk with a private key I made with GPG?

Question: Is this even possible? I have a key-pair that I already made with GPG but I just can't find a way to sign it with that key. I don't really want to make a new key with keytool or whatever just for this; I'd rather use the key I have now. Anybody know how I could do this? Thanks in advance.
Comment: http://thialfihar.org/projects/apg/

https://guardianproject.info/2012/03/15/adventures-in-porting-gnupg-2-1-x-to-android/
Answer: I very much doubt that GPG generates keys that could be used by jarsigner.  It might be possible to write a converter to do this, but it would be far less work to just bite the bullet and generate a new key.  The command to do this is simply
keytool -genkey -alias mynickname -validity 20000 -keystore ~/.android/my-keystore

(p.s. make a backup of the key and make very sure you don't forget either the keystore password or the key password. There are far too many sad stories of people who've put apps on the market and then forgotten or lost the password.)
Comment: Is there any way to sign using gpg instead of jarsigner then? Or is that just nonsense. Sorry I'm new to this signing and certificate stuff.
Comment: I think you pretty much need to use jarsigner.  I doubt that gpg knows  the protocol for signing a jar file.
Answer: I just wanna manage the OpenPGP keys only too. So here is my way.
openpgp2ssh
First install it from monkeysphere.
sudo apt install monkeysphere

Note: openpgp2ssh works only if the secret key is not password-protected and RSA keys. So it might be necessary to remove the protection.
Now, export the PGP key and hand it over to openpgp2ssh:
gpg --list-keys # show your keys with keyid.
gpg --export-secret-subkeys your@email | openpgp2ssh $SubKeyId > id_rsa
openssl rsa -in id_rsa -outform pem > key.pem
openssl req -new -key key.pem -out request.pem
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt

Answer: You do need to sign with jarsigner.  But jarsigner is actually a little more flexible than you'd think.  If you already have a signing key you want to use then you can export it out of gpg and import it into a java keystore then sign that way.  If you want to attempt to do that you can try keytool but it's far easier to get Keytool Explorer  because keytool has a lot of options.
Jarsigner is actually pretty flexible.  This Document describes a process by which you can create your own providers.  I'm surprised there isn't already one that uses the GPG keystores already.  There is a way to do it with a Yubikey which is the only reason I am aware of all of this - my signing keys are safely locked away in my yubikey where even I can't get them (yes I have a secure backup somewhere).


Difference between "normal key" and "extended key" in cardano-cli address key-gen

Question: With cardano-cli address key-gen, what is the difference between a normal key (obtained with --normal-key) and an extended key (obtained with --extended-key)?
Answer: I'll preface with the note that cardano-cli is a legacy project from the Byron era prior to the restructuring of cardano-sl into the modern infrastructure used today. You likely want to use the cardano-address if you can. The Adrestia repo keeps track of the official tools, libraries, and APIs as well as their support for the various eras.
To give a short explanation, the way key generation in Cardano works is as follows:

You create a Recovery or Seed Phrase. This is a deterministic seed that then derives your extended private key. This is the famous 24 word phrase that you store. It derives your xprv key but it does not represent it. This means if you do not have a seed phrase, you can not get one and you'll have to create a new wallet to get it.

You create the Extended Private Key. This is the root key from which all other keys are derived (including the extended public key). This key can either be created from scratch or derived from a seed phrase. If you want your key to be loadable into Daedalus/Yoroi without poking around in the internals and manually editing the SQLite database, you need to start from a seed phrase.

You derive Child Private Keys. These are various keys that serve specific purposes. Examples include the delegation(staking) keys, the various stake pool keys, and spending keys. As the protocol grows, there'll be more of these keys however as long as you have your extended private key or seed phrase, you'll be able to gain access to those with little to no action required.

You derive whatever else from the Child Private Keys. This is where you would derive addresses, stake pool certificates, etc. This is essentially all handled by the node itself and you don't really have to worry about much of this stuff unless you are doing something specific.

So in summary, the seed phrase is the "seed" that creates everything else (and is easy to store/remember), the extended key is your "master key", and the normal key (now called a spending key) derives from the extended key and lets you spend your funds.
Also note that the terminology differs a bit between eras. Byron used a rather different key system so you should generally avoid using it unless you absolutely have to. Icarus established the basis for modern key derivation in the Cardano ecosystem and Shelley has extended upon that (with staking related keys).
Comment: The Adrestia repo README lists `cardano-wallet` among other tools so you seem to be implying that `cardano-cli` is deprecated and that I should use `cardano-wallet` instead. I'm trying to mint some native tokens, which I know how to do with `cardano-cli`. Is minting supported by newer tools like `cardano-wallet`? A cursory inspection of the `cardano-wallet` help reveals no minting functionality. If `cardano-cli` is the only way to mint native tokens, then I'm missing the bridge between how `cardano-cli` manages keys and addresses and how the newer tools (e.g. cardano-address) do it.
Comment: I'll report back after I do a bit of research first. From my understanding `cardano-cli` kinda supports Shelley and Mary. I think the development of native assets started on `cardano-cli` and is still being ported over to `cardano-wallet`. It is ultimately just metadata Tx which `cardano-wallet` supports. From what I can tell atm it looks like if you want to mint native assets with `cardano-wallet`, you can do it but it's a manual process. The fields and validation seem to exist in the backend but there doesn't seem to be a cli interface other than the metadata interface exposed at the moment.


The greatest rotation inertia of a system?

Question: Consider this scenario: There are $n$ tiny balls (tiny means we can fix several balls in one place) with mass $m_1,m_2,...$ fixed in a stick which we may ignore the mass of the stick. Now we rotate the system(stick and balls) around the center of mass. I feel like the greatest rotation inertia will be achieved when half the mass of balls is at one point of the stick while the other half is at the opposite point of the stick. But I don't know how to prove it mathematically?
Comment: @MoziburUllah: But the OP did not say "*rigorous* mathematics". And your condition "if the physical intuition is correct" massively limits the scope and relevance of your comment. Math can help confirm or disconfirm our physical intuition; it can help elicit implicit conditions/assumptions needed for the conclusion to hold; it can help communicate the result in a convincing way to those who don't (yet) share our physical intuition; and it can help extend the result to situations that we *don't* (yet) have physical intuition for.
Comment: Why bother proving it mathematically, if the physical intuition is correct? After all, if we had to wait for rigorous mathematics, we would not have classical mechanics until three centuries after calculus had been invented. Proof comes in various flavours in physics as well as maths.
Comment: Is it always possible to divide $n$ different masses into two halves?
Comment: @Righter Yes, you're right.
Answer: If there are $n$ balls, the total mass of all the balls is $m$ and the length of the stick is $L$
An arrangement such as $A$ wouldn't be maximum as we need the moment of inertia and it depends on $m_id^2$ and the $d_i$ could be greater by going to arrangement $B$
If we moved a proportion of the mass $km$ from one end of $B$ to make $C$, the COM is now a distance $kL$ from one end and $(1-k)L$  from the other.

The moment of inertia for $B$ is $$\frac{mL^2}{4}\tag1$$
For $C$ it's $(kL)^2(1-k)m+((1-k)L)^2km$ and that simplifies to $$k(1-k)mL^2\tag2$$
Expression 2) is only greater than 1) if $$k(1-k)\gt \frac{1}{4}\tag3$$
$$4k^2-4k+1 \lt0\tag4$$
$$(2k-1)^2\lt0\tag5$$
That's not possible, although we can get $0$ if $k=1/2$.
So changing the proportion of the mass at the ends of $B$ can't increase the moment of inertia.  If some of the mass was moved from one end of $B$ to a place not at the other end of the rod, that wouldn't help, so arrangement $B$ gives the maximum moment of inertia.
Comment: The $k-1$ expressions on the diagrams should have been $1-k$
Comment: Thanks for the answer. I'm mainly confused about the arrangement $A$. Let's build arrangement $A$ from arrangement $C$.To be more concrete, suppose there is one tiny mass run from the left of the stick to the right of the center of mass(we may call it $O$ hereafter) of the stick while not reaching the right end. This case is not obvious, and I'm mainly confused with this.
Comment: @ Sherlock, yes it's not obvious, but from the main answer moving just one mass from the left to the far right would have a lower moment of inertia than  $B$.  Also moving one from the far left to a point not all the way to the right would be even lower as it's like moving all the way to the right with a smaller stick, so it would have to end up lower than $B$.  $A$ would definitely be lower than $B$ as the $\sum m_i r_i^2$ would be lower as for many of the masses the $r_i$ are lower than $B$ and the COM is in the middle for both cases.


While in a OSX, How can I "alt+tab" in The Cave ? (full-screen)

Question: I tried ⌘tab  / alttab / esc (that only opens the menu).
It's hard to check the internet (friends/work/emails/etc) while in full screen and needing to save and exit every time.
Running on OSX Mountain Lion.
Comment: possible duplicate of [How do I "alt-tab" out of full-screen games on Mac OS X Lion?](http://gaming.stackexchange.com/questions/40949/how-do-i-alt-tab-out-of-full-screen-games-on-mac-os-x-lion)
Answer: Cmd + Tab mostly works here on 10.11.6. Obviously it's been quite a while, but have you tried it again yet or figured out a way?
The issue is that it can't switch back to the app without clicking on it in the Dock -- Cmd + Tab brings the app's name back to the menu as it's focused, but the window does not reappear as it should. Clicking on it in the Dock works though, as with most apps that have this problem.
The Mac OS X equivalent of Alt + Tab is Cmd + Tab; Alt + Tab is useless, and Cmd + Esc` too.
Another option is to use Mission Control: Three-finger swipe up or press Ctrl + ↑, then click another app to switch to it (based on El Capitan/10.11.6 -- may be slightly different back on Mountain Lion)
Some apps also support using Cmd + F or Cmd + Ctrl+ F (the OS standard) to switch to/from full screen mode, and other shortcuts like Cmd + M to minimize the window, but this game does not seem to.
Another important shortcut on Mac is Cmd + Option + Esc, which is similar to Windows Task Manager, but only in the sense that it lets you Force Close any open apps easily -- Activity Monitor is the real Mac equivalent of Task Manager. Cmd + Option + Esc will often take the focus away from a fullscreen app and leave you at the desktop (it does for The Cave), but some apps are automatically force-closed when this keyboard shortcut is used, most notably almost anything running full-screen through Wine.
The shortcuts for any apps that support Mac's native menubar style should be easily found by clicking an option in the menubar and looking at the side where it lists a keyboard shortcut for an option if there is one -- you can also hold Shift or Option to reveal non-default shortcuts in some of the menus. This game only has the menu by the app's own name where About & Quit are the most useful options though. Not all apps/games do support the native menubar style though, and because of that it's not easy to find some shortcuts.


No html5 option in netflix

Question: I have recently signed up with netflix and have followed procedures in updating chrome and set up user agent switcher but when I try to change playback settings in netflix to html5 the setting is not available.
Comment: Could you describe how "the setting is not available"? Does it give you any errors?
Answer: The Google Chrome browser supports Netflix natively now, no need to do anything to it.

No html5 option in netflix


What kind of charger do I need to get for my Galaxy Tab?

Question: I have a older Galaxy Tab 1 I'm assuming because all it says on the back is Galaxy Tab Samsung. And I need to know what kind of charger I need to ask for when I go and purchase one or order offline so if anyone knows the exact name or what ever I'd appreciate the feedback thanks.
Comment: If memory serves, it's a 28-pin. Looks like an old apple charger port, but is a bit smaller?
Answer: The original Galaxy Tab (GT-P1000) is a 7-inch device with one very distinguishing feature - the capacitive keys below the screen.

If this is indeed the one you have, you will need to find a charger or a USB cable with this flat connector on one end:

Given its age, it's quite cheap - sells for < $5 in my region. Usually just vaguely searching would give you reasonable results. You can just grab a cable and pair it with any modern USB charging adapter too.


Who were the believers who came before us? (4:26)

Question: In 4:26 it states that "Allah explains and guides you in the traditions of those believers who came before you, and to forgive you" Allah is the Knower, the Wise.

could someone please explain what is meant by "believers who came before you"?
Answer: Asalaam Alaikum
to really understand the context and concept of a verse in quran, sometimes we have to read more than just the verse. as quran is the best interpreter of quran, the preceding verses or the verses that follow will explain it more. other times it's the whole surah that gives us the understanding, thats the miracle of quran.

UNDERSTANDING THE VERSE
to understand this verse, let us look at the surah from the beginning. from the very first verse in surah An-Nisa we come across command after command from Allah azzawajjal. topics ranging from the rights of orphans, marriage, inheritance and adultery. so much intricate instructions and details regarding such complex matters in life are mentioned in just a space of a few verses.
and right after mentioning all these instructions and commands, Allah azzawajjal mentions the purpose of these instructions ;

Allah wants to make clear to you [the lawful from the unlawful] and guide you to the [good] practices of those before you and to accept your repentance. And Allah is Knowing and Wise. [4:26] (sahih international)

another translation of the verse;

Allah wishes to make clear (what is lawful and what is unlawful) to you, and to show you the ways of those before you, and accept your repentance, and Allah is AllKnower, AllWise.  [4:26] (mohsin khan)

( the reason why i have mentioned two translations of the verse is because i have not come across any translation that says 'believers who came before you', as that word believers is not there in the verse, the arabic word used in the verse is translated to english as before you(qablikum 4:26:9) but this verse is obviously referring to believers who came before us because Allah azzawajjal wants to guide/show us their way )
we can see that Allah azzawajjal is showing us the ways of those who came before us and guiding us in the ways of those who came before us. in this life we want to follow those who are better than us. therefore, in deen we study the ways of the prophets 'alayhim salaam and their righteous companions. it is a favor of Allah azzawajjal upon us that He wants to guide us to that which is the best, by showing us the ways of the righteous and telling us what He is pleased with. not only does He want to guide us but He is also willing to accept our repentance if we repent.

FROM THE WORKS OF TAFSIR

it is mentioned in the tafsir of ibn kathir ;

(And to show you the ways of those before you,) meaning their righteous ways and how to adhere to the commandments that He likes and is pleased with.

from tafsir al-jalalayn ;

God desires to make clear to you, the laws of your religion and what is in your best interests, and to guide you in the ways, the paths, of those, prophets, before you, in the way of what is lawful and what is unlawful, so that you might follow them, and to turn [in forgiveness] towards you, bringing you back from the disobedience which you practiced, to obedience to Him; God is Knowing, of you, Wise, in what He has ordained for you.

from tafsir of maududi ;

Allah desires to make clear to you and guide you to the ways that were followed by the righteous people before you, and to turn to you mercifully; for He is All-Knowing, All-Wise.

for furthure clarity it is eloborated in tafsir of maududi regarding the way/practices of those who came before us,

The "way" refer to all those instructions that have been given from the beginning of the Surah to this point, and to those already given in Al-Baqarah about cultural and social problems. Allah is telling the believers that it is His bounty that He is taking them out of the ways of "ignorance" and guiding them to the moral ways of good people, that have always been followed by the Prophets of every age and their pious followers.

(note: the arabic word sunan(4:26:6) used in the verse is translated as '(to)ways' in english.)

CONCLUSION
from this we can understand that the phrase those before you in this verse is referring to the people who obeyed Allah azzawajjal to their best of ability. prophets (A.S), the righty guided caliphs (R.A), the companions (R.A), the best two generations and basically all the righteous men and women whom with all sincerity followed Allah azzawajjal's instructions and the commands.

may Allah the mighty and sublime grant us mercy and guide us to the straight path.
Allah knows best


Leaning ladder problem

Question: Could anyone explain the case of a ladder leaning on a smooth floor and against a rough wall? It's not clear how there is a vertical frictional force at the wall despite having zero normal reaction there
Comment: If the ladder is leaning against a rough wall, there will be a normal reaction at that point.
Comment: Floor friction is required for equilibrium
Comment: @JoelBrennan  It is not possible for the ladder to be in equilibrium with wall friction only. Wall friction requires a normal force on the wall, i.e., a horizontal force. In order to have equilibrium in the horizontal direction, the floor needs to exert and equal and opposite horizontal force. The only available horizontal force is static friction.
Comment: but how is the horizontal equilibrium satisfied for the ladder then since there are no other horizontal forces(because the floor is smooth)
Comment: @BobD but since there must be floor friction, doesn't this contradict that the floor is smooth (which we are assuming)? So either I'm missing something, or one must conclude that it is not possible for a ladder to be in equilibrium propped up against rough wall on a smooth floor...
Comment: @BobD Thanks that clears everything up!
Answer: As discussed below, a normal reaction force by the wall is required for rotational static equilibrium. Given a normal reaction force is needed, it follows that an equal and opposite floor friction force is needed for horizontal equilibrium.
Let's say the reaction force normal to the wall was zero. If the force normal to the wall were zero then the static friction force at the wall would  also have to be zero. In which case  the wall would exert no force on the ladder and it can be removed . Clearly without the wall the ladder would fall because there would be a net counterclockwise torque about the point of contact with the floor due to the weight of the ladder and load.
Although floor friction is needed for equilibrium wall friction is not. In fact, if there is both wall and floor friction the problem becomes statically indeterminate, meaning the equations for static equilibrium are insufficient for the number of unknowns. Additional equations of deformation are required.
Hope this helps.

Leaning ladder problem