My Bitcoin.com wallet is asking for a password to confirm send that was never established. So im screwed or file a class action for this?

Question:
Wtf is this. Password was never established so i cant send this or get it back. So who is the dummy(besides me) that creates something with no way to retrieve your funds? This is ridiculous
Answer: If you really never set a PIN, and obvious things like "0000" don't work, then this might be a bug in the app software.  You could report the bug at https://github.com/bitcoin-com/wallet/issues, and include full details about what you did.  They might have suggestions about what to do, but there may or may not be a workaround.
I suggest that you avoid expressing anger, frustration, or legal threats in your bug report.  The developers probably want to fix the bug, and they would rather work with people who seem motivated and cooperative.  If you seem like a difficult person to work with, they won't want to, and you can't force or intimidate them into doing so.
You could try deleting or resetting the app and restoring it using the 12-word recovery phrase that you created when you first installed the wallet.  It should also be possible to use the recovery phrase to access your coins from different wallet software.
If you didn't save the recovery phrase, or you have lost it, then you may have just learned an expensive lesson about the importance of backups.  Software bugs are just one of the many things that can go wrong when using Bitcoin; you can also lose or break your device, get coins stolen by malware, etc, etc.  These are the risks you take, and backups are one of the prudent ways to reduce those risks.  (Actually setting a PIN is another.)
As to whether you can sue, you'd have to consult a lawyer who knows about consumer law in your jurisdiction.  Personally, I doubt that you would be successful.  It's likely that the app's terms of use were carefully written by Bitcoin.com's lawyers to shield them from legal liability in case of software bugs.  In general, when you use free software, you should assume that it's at your own risk, and that nobody will compensate you if things go wrong.
Comment: I do have the recovery phrase all 12 of them. Still can't seem to get it. CryptoDave is on the case.
Answer: Don,t worry at all. That's what happened to me. All I had to do was deleting the app and reinstalling it again. After entering my user name and password (I had already logged in) I was allowed to set my pin. No further problems.


How do I "pin" a filter in the Inkscape interface?

Question: I would like to add the drop shadow filter to my toolbar for quick access.
Answer: Inkscape lets you overwrite many parts of its UI with special files in your config folder. However, it requires some technical know-how, is somewhat complicated and mostly undocumented, I think.
You will need to know the locations of some directories Inkscape looks in, so when I talk about the 'User config' folder for example, then check its path in the corresponding input box inside the preferences under 'System'.
First you need to find the name of the action that you want to make a button for. To do that, open the preferences, go to 'Interface → Command Palette' and enable the 'Show command line argument names' setting. You'll have to restart Inkscape for it to take effect. Now press ? to open the command-palette (depending on your keyboard layout, you may also need to hold Shift) and search for 'Drop Shadow'. There you should see a long reversed URL-like ID (you may have to scroll horizontally by holding Shift and using the scroll-wheel). You can click on it to copy it to the clipboard:

In your case it should be app.org.inkscape.effect.filter.ColorDropShadow.
Next, you need the original '.ui' files from the '/inkscape/ui' subdirectory inside the 'Inkscape data' folder. The one you want is probably toolbar-commands.ui. Copy this file over to the 'User UI' directory, keeping the name exactly the same. Depending on how you installed Inkscape (e.g. as an AppImage), you may need to keep Inkscape open to be able to access the 'Inkscape data' directory and its location may change whenever you restart Inkscape.
Now open the copied file in a text-editor (preferably one with XML syntax-highlighting). Scroll all the way down to the end. Here you can append new elements to the toolbar, by adding <child>-nodes before the </object></interface> closing-tags.
For a separator line for example simply copy and paste this from earlier in the file:
<child>
  <object class="GtkSeparatorToolItem">
    <property name="visible">True</property>
  </object>
</child>

To add a new button, insert this, but replace [ACTION-NAME] with the ID we wrote down earlier:
<child>
  <object class="GtkToolButton">
    <property name="action_name">[ACTION-NAME]</property>
    <property name="icon_name">inkscape-logo</property>
  </object>
</child>

You may notice that the other entries in that file have more properties, but they don't seem to be really needed, so I simplified it a bit.
You can change the icon by looking for one inside the '/inkscape/icons/hicolor/symbolic/actions' subdirectory in the 'Inkscape data' folder, copying the filename and inserting it as the icon name (replacing inkscape-logo above) without the '.svg' file extension (or '-symbolic' suffix). Also, it seems some actions (mostly extensions) can be called without opening its dialog by appending .noprefs to the ID.
Finally, save the file, restart Inkscape and your toolbar should now be customized:

Please note that this will overwrite any new buttons added to the toolbar in future versions of Inkscape or all other changes to that part of the UI when you upgrade. This could mean that, at best you could miss new functionality or at worst completely break Inkscape's UI. I recommend deleting the custom '.ui' file and repeating this process whenever you install a new version!
Answer: It's not possible to add a filter to the Tool bar. It's not a "tool".  Filters are SVG effects that are added to objects.
You can however open the Filter Editor (Filters > Filter Editor), and once you have applied an effect to an object, you can create or select another object and apply the same filter simply by ticking it in the Filter Editor.
For example, here I apply the same filter by just ticking it again

You can also click, drag and drop the Filter Editor tab (shown above) to dock it to the panels on the right hand side.
Comment: @Gugalcrom123 The list only includes the filters in the current document, however you can [set the default template](https://graphicdesign.stackexchange.com/a/157969) to add some common filters to all new documents.
Comment: So I can save multiple presets? This is even better.
Comment: Well yes, but only the actual filters you have used in the document will be saved in the document.  It won't keep them available for all documents. The suggestion by @Xrott to set up such a document as the default template is certainly one way to save them for future use.


Work done by magnetic field on current carrying conductor

Question: Suppose a wire of length L carrying a current I is kept in a uniform magnetic field B perpendicular to the current. The force on the wire will be IBL and work done by magnetic force when wire moves a distance d along the force will be IBLd. But magnetic force cannot do any work on a moving charged particle and hence total work done on all particles by magnetic force should be zero. Where does the work IBLd come from?
Answer: The work comes from the battery that is driving the current through the wire.
Even if the wire were stationary, the battery would be supplying work at a rate $I^{2}R$. But with the wire moving, the battery would need to be supplying extra work at a rate $\mathscr{E}I$ in order to overcome the emf generated by the moving wire.
Now, $\mathscr{E}$ is equal to the rate at which the wire cuts magnetic flux so $\mathscr{E}=BLv$ (in which $v=\frac{d}{t}$), so the extra rate of doing work has to be $\mathscr{E} I=BLvI=BLdI / t $. And this is equal to the rate of mechanical work done on the wire!
Comment: I've now posted another answer, in terms of the forces acting on a free electron. Maybe it will be more like what you're looking for.
Comment: I'd be interested to know exactly what more you're looking for.
Answer:
But magnetic force cannot do any work on a moving charged particle and hence total work done on all particles by magnetic force should be zero. Where does the work IBLd come from?

Sum of works of magnetic forces on each charged point particle in the wire  (assuming it is made of point particles) is indeed zero (this follows from the fact that magnetic force on point particle is always perpendicular to particle's velocity).
However, the macroscopic work $IBLd$ is not that sum; instead, it is work of a macroscopic force, acting on the whole wire. This macroscopic force is due to existence of current $I$ inside the wire, but it does not act on that current, it acts on the wire itself.
This macroscopic force is properly called motor force or motor action force, or ponderomotive force (also sometimes called the Laplace force). It is also common to call it simply magnetic force, due to its origin  - it appears due to presence of magnetic forces acting on the charge carriers. Unfortunately, it is also quite common to call it Lorentz force, but that is grossly incorrect. Lorentz force should refer only to force acting on a microscopic body such as the charge carrier.
The Laplace force acts on the body as a whole and it is not given by the Lorentz formula and it is not perpendicular to velocity of the body; hence it can, and often does work (electric motors).
It arises due to fact that charge carriers are confined to the wire, even while the Lorentz forces act on them; if there was no confinement, the Lorentz forces would make them curve their trajectory so as to escape from the wire on one side. This does not happen, as even slightest deviation of distribution of current inside the wire results in restoring force due to rest of the wire that keeps the charge carriers confined. By Newton's 3rd law, the charge carriers exert opposite force on the rest of the wire too - and sum of those is the Laplace force. Thus the Laplace force is internal force, acting from the charge carriers on the rest of the wire.
The work done by this force is thus work of internal forces in the wire, not work of the external magnetic field. The energy is funneled from the voltage source, through the EM field of the voltage source and the circuit, to the mechanical energy of the wire.
Comment: I am quite skeptical of this. I don't see that internal forces can do net work on a system. I am also not sure what specific internal forces are referred to
Comment: The nature of the internal forces is secondary. The point is, the internal forces can and do work. Consider familiar example: when you get out of bed, height of you center of gravity increases. Which forces did the work?
Comment: See also Philip Woods' second answer, the one with the hand drawn diagrams.
Comment: No work was done when you get out of bed (in ideal conditions). Your gravitational PE increased and your chemical PE decreased. No energy was transferred in or out, so no work was done. Sorry, but the idea of an internal force doing net work seems wrong and that example doesn't seem to change that at all
Comment: The internals forces mentioned in my answer are the forces between the charge carriers and the rest of the wire (lattice of atoms + non-conducting electrons). The work $ILBd$ is the work of these forces, acting on the rest of the wire.
Comment: > *"Your gravitational PE increased and your chemical PE decreased. No energy was transferred in or out, so no work was done."* The question, the answer and the bed example are talking about macroscopic mechanical work which can be expressed as $\mathbf F\cdot \Delta \mathbf r$. This work is non-zero and is done by internal forces. The fact that in the bed example, this work is accompanied by decrease of chemical reserve energy is true, but immaterial to the point being made. The ultimate source of the energy does not matter to the question "which force did the macroscopic work".
Comment: But it matters (for the bed example) that no work was done. We are probably going too long for comments, but suffice it to say I am still quite skeptical
Comment: > *"no work was done"* If the COM of the body got up, positive work on the body was done. If you disagree, we have a fundamental disagreement about high-school/freshman-level physics and I am not sure we can resolve it here.
Comment: This may help: in the bed example, compare two experiments: 1) a man gets up 2) a man gets up the same way and eats a piece of sugar with energy equal to the PE difference. Now, does the net work done on his head at the end of the whole process differ in these two experiments?
Comment: No, I am sure about this now from first principles. Internal forces cannot do work. A force is an interaction between two objects, when a force does work it transfers energy from one object to another. If a force is internal then all it can do is to redistribute energy from one part of the system to another. It cannot change the total energy of the system, so internal forces do no work on a system.
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/83851/discussion-between-dale-and-jan-lalinsky).
Answer: In the diagrams below, $v_{dr}$ is the mean drift velocity of the electron through the wire. Perhaps the diagrams say it all, but explanations follow.

When the wire is stationary (top diagrams) the magnetic Lorentz force (of magnitude $Bev_{dr}$) is to the right. The electron is restrained from being pushed out of the wire by a force from the wire that is essentially electrostatic. I've labelled its magnitude $F_{Lapl}$ because its Newton's third Law partner is the equal and opposite Laplace force that the electron exerts to the right on the wire. [The Laplace force is sometimes called the ponderomotive (!) force and, in the UK at least, the motor effect force.] For the stationary wire, $$F_{Lapl}=Bev_{dr}$$
In other words, in this case, the Laplace force is equal to the magnetic Lorentz force.
The lower diagrams show what happens when the wire is moving to the right at speed $v_w$. Note the new resultant velocity, and the new direction of magnetic Lorentz force, at right angles to the resultant velocity. I've shown the magnitudes of the vertical and horizontal components of this force.
The magnitude of the vertical force component is $Bev_w$, so this force component appears only when the wire is allowed to move at right angles to itself (thereby doing work); it gives rise to a back-emf. For $v_{dr}$ to be constant, this force component must be balanced by a force due to the electric field caused by the battery. I've (mis)labelled this force $eE_{batt}$. [I say "(mis)labelled" because $eE_{batt}$ is not the whole of the electric field force due to the battery; part of the force overcomes resistive forces (not shown) on the electron.] Thus$$eE_{batt}=Bev_w.$$
As with the stationary wire there is the force whose magnitude I've labelled $F_{Lapl}$, keeping the electron in the wire. If $v_w$ is constant,$$F_{Lapl}=Bev_{dr}.$$
This is exactly the same equation as for the stationary wire, but note that for the moving wire the Laplace force is not the same in magnitude or direction as the total magnetic Lorentz force, which is due to the total velocity of the electron!
Now for the energy aspect...
Power supplied to electron (not including that to do work against resistive forces) = $eE_{batt}v_{dr}=Bev_{w}\times v_{dr}$.
Work done per second by Laplace force = $F_{Lapl}\ v_w = Bev_{dr}\times v_w$.
So the work done by the Laplace force on the wire is equal to the work done by the force due to the battery, leaving no work to be done by the magnetic Lorentz force – just as it should be! [Although not strictly necessary, we could say that no net work is done by the Lorentz force, as the work done by the force of magnitude $eE_{batt}$ against the magnetic Lorentz force (vertical component) is equal to the work done by the magnetic Lorentz force (horizontal component) against the Newton's third law partner to the Laplace force!]
I believe that this resolves the paradox that the magnetic Lorentz force can do no work, yet work is done on/by the wire.
Footnote
The set-up is, in fact, a machine, producing a motor effect force in response to the force of (usually) different magnitude, $eE_{batt}$, in a different direction. It is comparable in its action to a smooth slope up which we pull a body of weight mg, by applying to it a force, $F_{sl}$, parallel to the slope. Here we have$$F_{sl}=mg \sin\theta$$while the vertical velocity component is related to the velocity parallel to the slope by$$v_{vert}=v_{sl} \sin\theta.$$Hence Power in = work done per second by $F_{sl}$ = $mg \sin\theta \times v_{sl}$
and Power out = work done per second lifting m = $mg \times v_{sl} \sin\theta.$
This machine relies upon the normal contact force, N, between the body and the slope to keep the body on the slope, yet $N$, like the magnetic Lorentz force, does no work.
Answer: What you have described is actually a dc motor with an input of electrical energy and an output of heat and mechanical energy.
A parallel rail version is often used to show the force on a current carrying conductor in a magnetic field.

If the applied voltage from an external source is $V$ and the resistance of the circuit is $R$ and there is a complete circuit then a current $I$ will flow through the circuit.
If yellow rod rolls along the rails at a speed $v$ then and emf $\mathcal E = BLv$ will be induced in the circuit.
For that circuit we can write $V- \mathcal E = IR$ and multiplying each side by $I$ and rearranging the equation gives $VI =  I^2R + \mathcal E I$.
This final equation can be interpreted as the electrical power supplied by the external source $VI$ is equal to the power dissipated as heat due to the resistance in the circuit $I^2R$ plus the mechanical power done by the system $\mathcal EI$.
In the case of the demonstration if the apparatus was large enough you could imagine that the rolling rod reaches a steady speed and the mechanical power is related to the work done against frictional forces.
The force which the wire exerts is $BIL$ and so the power delivered is $BILv = BLv \,\, I = \mathcal EI$.
With the standard "small" version of the apparatus what you see is the rod starting from rest and then accelerating when the current is switched on - the rod is gaining kinetic energy.
If you started to push the rod along the rails faster there might come a time when $\mathcal E > V$.
The current direction would then be reversed and the external source would be "charged".
The arrangement is then acting like an electrical generator.
Now you are doing the mechanical work which is converted into heat and electrical/chemical energy.
Comment: Would you be kind enough to tell me how you drew this rather nice diagram?
Comment: @PhilipWood My delay in replying is that I was not sure as to the origin of the diagram. I have looked for it on the Internet and could not find it and so the other alternative is that it was produced using [Corel Paintshop Pro 2018](https://www.amazon.co.uk/s/?ie=UTF8&keywords=corel+paintshop+pro+2018&index=aps&tag=googhydr-21&ref=pd_sl_22rt0gkbo1_e&adgrpid=53513581136&hvpone=&hvptwo=&hvadid=259044308878&hvpos=1t2&hvnetw=g&hvrand=6437315937712597492&hvqmt=e&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9045538&hvtargid=kwd-344456865279).
Comment: My concern is that there are two sized fonts used in the diagram and it might have been that I adapted a previous diagram to fit the question.  Even though my answer was posted in June I cannot actually remember drawing the diagram but at my advanced age that is nothing new. Overall I prefer to draw my diagrams on paper as you have, and then scan them in as it takes much longer to use a drawing package.
Comment: Thank you. I'll find out about Coral Paintshop. I use an old application called "Freehand". It is simple to use (or I'd never have mastered it), versatile and ideal for Physics and maths diagrams. Unfortunately, it's no longer supported (a long story) and works only on a computer with an obsolete operating system, so if I want a nice diagram I have to crank up an old computer, draw the diagram, print it and scan it into an up-to-date computer. Crazy!
Comment: @PhilipWood, is that obsolete operating systems 'Windows XP'? If so, it may be possible to install that system using the Virtualbox software on your main computer. Then you may use the old OS inside the modern OS on your main computer. It will take some work to set up, but it will save you from having to print and scan your diagrams.
Comment: Thank you for this kind suggestion. Unfortunately I'm a Macintosh user (with almost zero IT expertise). The drawing application works on an operating system known as 'Classic' (available up to Mac OS9, if I remember rightly…)


Copy Specific cells and paste in another sheet

Question: I have a column 'A'(About 10 rows) with a drop down option in cell. I want copy the data and paste in another sheet and here i want ignore a cell contains "Please Select" in column A. Please help me with VBA code to resolve this issue. Thanks in advance
Answer: Welcome @Arun Kumar
Manual approach might me easiest. Use a filter, selecting the "Text Filters" option and then "Does not equal" and type "Please select" in the form. Now copy and paste to the new spreadsheet.
If you really need to do this with VBA, I suggest you record the above with the "record a macro" option op the developer ribbon. This will generate the required VBA code which you can modify as required.
Comment: Thank you for the response. I am aware of manual work, but i need a VBA code solve the issue. What happens when record a macro my requirement doesn't work due i have to unselect specific word in autofilters.
Comment: Record a clear filter command with your macro, then a "does not equal filter" "any keyword here". Now inspect the code and replace that keyword will a cell reference. Your keyword is now a variable. You can type anything in the cell then run the macro. You can also make the cell a dropdown list (data > data validation) of all the available keywords using the UNIQUE function in Office 365.


I have been trying to identify the font shown in the picture without avail, and I would like some help

Question: While trying to find some Visual Studio Code-related settings, I stumbled upon an MS website which had the following snippet of code to show certain features of the VS Code. The font used in the snippet appears much more visually appealing than Courier New font that I currently use for my writing and development projects. I have tried all three well-known font identification websites (fontsquirrel, dafont, and fontfont), but I have not gotten a perfect match from them. I would greatly appreciate any help with the precise identification of the font.
Answer: So in cases like this, you are better off typing "visual studio default typeface" into your favorite search engine rather than blindly using font identification.
This is most likely going to be Consolas or Cascadia Code (or Cascadia Mono).
See, for example:
https://learn.microsoft.com/en-us/typography/font-list/consolas
https://learn.microsoft.com/en-us/windows/terminal/cascadia-code
Comment: If you were to make the line suggesting the font families the first line and make your suggestion on how to find fonts the second one, IMO, it would become the perfect answer. It actually is Consolas.


MySQL-python installation - wrong architecture - MacOS

Question: yesterday I've installed new version of python 2.7.5 via installer on MacOS
and unfortunately MySQL broke down. I got following error when starting
development server:

raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
  django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Volumes/Home/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg-tmp/_mysql.so, 2): no suitable image found.  Did find:
      /Volumes/Home/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg-tmp/_mysql.so: mach-o, but wrong architecture

OS:
Mac OS 10.7.3
Uname -a
Darwin Rafals-MacBook-Pro.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
Python
2.7.5
Do you have any idea how to solve this issue?
Answer: I think you'll need to update your MySQLdb module.
If you have setuptools installed you should be able to do with with the command:
<code>easy_install MySQL-python
</code>
If you don't have setup tools you can install it first:
https://pypi.python.org/pypi/setuptools#unix-based-systems-including-mac-os-x


How to run a batch file with user set for file access using icacls

Question: I am trying to run icacls utility for sharing files. But I have a set of users A, B, C and D only for whom I would need to provide access. One way of granting access is to write n lines for n users. Is there any easier way to provide access to all users. The number of users are around 50.
Answer: I always wonder why when there is a shared resource has been ignored groups. There is a shared resource - a group. After that, there is a group assembles resources (groups) and that it has any members. If we domain, great use OU, inter alia.
What are the benefits? For handling with the resources you do not subsequently change the level NTFS permissions. I only have a set of groups and users in groups. This is despite the large numbers of files in the shared resources makes instantaneous change permissions.


Email from new comments

Question: My blogs emails are working fine. I get all emails when new post and new register. But i dont recieve any emails when someone make a comment. Yes i cheked in admin settings. Any idea?
Answer: Have you tried:

deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
switching to the Twenty Eleven theme to rule out any theme-specific problems.
resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.
re-uploading the wp-admin and wp-includes folders from a fresh download of WordPress.

Tip from a thread in WordPress forums.
Comment: i will try them right now, but re uploading the admin and includes folders will my settings and entrys gone?
Comment: No, all your settings are saved within the database, and the site specific content are in wp-content. Make a backup of your hole setup and upload all files except wp-config.php and the folder wp-content
Comment: unfortunately i tried all of them but no success
Comment: this plugin solved my problem. http://wordpress.org/extend/plugins/comments-notifier/
Comment: Ok, thanks for the tip on comments notifier plugin

Email from new comments


dummy variables and cross section data

Question: I am building a linear regression model to analyze one cross-sectional dataset. In my dataset, there is one string variable called "firm_name", which includes 100 firms(name1, name2, name3....name100). I converted the 'firm_name' from string to numerical(the new variable's name is 'firm_id'), the values become 1, 2, 3 ....100 (name1 becomes 1, names 2 becomes 2, name3 becomes 3....name100 beocmes 100). I added firm_id dummy variables into regression by using i.firm_id to control the unobserved factors and got the parameter(Beta1)'s value of an interested variable(X1). Then, I reordered the value of firm_id (1 becomes 31, 2 becomes 32, 3 become 33,.... 70 becomes 100, and 71 becomes 1.... 100 becomes 30), I run the regression again with the firm_id dummy variables and got a new value of the parameter(Beta1) of the interested variable(X1). But I thought I should got a same value. Do you know why this happened? Thank you.
Comment: It may help to make your post a bit more clear, and maybe even provide some simulated toy example of your issue (which may also help you solve the problem). Additionally, the true solution will probably be a coding one, though I realize there may be some confusion about baseline changing meaning depending on dummies used, which has statistical merit.
Answer: You did not post any code, so it's not obvious what's wrong, but it's probably one of these three issues.

You forgot to properly code the firms as factors, and it may be reading them as numeric.

When you reordered, you maybe accidentally dropped some firms or somehow equated two to be the same.

(if the interested variable is also a categorical, or the intercept, or something similar) Whatever program you used, it is probably omitting the constant, and instead using the dummies, and so you have some issue with the baseline changing. Effects are relative, and by re-labeling firms, you're changing the baseline. To make this clear, suppose you have outcome $Y$ and dummies $W_1,W_2$ (suppose $W_1$ is dummy for male, and $W_2$ is dummy for female (you can replace them with firm1 and firm2 if you'd like). If you ran a linear regression by providing $(Y,W_1,W_2)$, most software will recognize multicollinearity of $W_1,W_2$ and a constant, so it will omit one. If $W_2$ is omitted, then you have $Y = a_1 + a_2W_1$, so the baseline is $W_1 = 0$. In contrast, if $W_1$ was omitted, you'd have $Y = a_1' + a_2'W_2$, so baseline is $W_2 = 0$, and so the interpretation of $a_1$ versus $a_1'$ is different, and thus affected.
Comment: Yes, I figured it out. Your answer is so helpful! I will provide working example in the future. Thank you very much again. :)
Comment: Thank you very much for your explanation. I greatly appreciate it.
Comment: @Amy hope you were able to figure it out! If so, feel free to accept the answer so it does not remain unanswered, or otherwise let us know if you're still running into problems, in which case providing a minimial working example could be quite helpful.

dummy variables and cross section data


How do I reset the audio system when audio can't be heard anymore

Question: Playing music on YouTube in Chrome did not output any sound. Playing video files with Quicktime and VLC didn't work. I noticed this problem before and it fixed itself after a restart. But I wondered if I could reset a process to get audio back.
Answer: Killing the coreaudiod process might work (it did for me). One way to restart it is to launch Activity Monitor, then View->All Processes, scrolling down to coreaudiod then clicking the big X button to force quit. It gets relaunched automatically.
Another option is at the command line:
sudo killall coreaudiod

After doing that and refreshing the Chrome tab - audio output works again on my macOS High Sierra 10.13.6. Source of idea.
Comment: How often did this work for you? Asking as my experience tells me that at least very often all applications using audio needed to be restarted as well? Please also add the versions of macOS you think this applies to.
Answer: I'm using a 3rd party USB audio device for which I need to do this about once a day - ymmv on an Apple-only structure.

Launch Audio MIDI Setup, from /Applications/Utilities.
Window menu > Show Audio Devices if it's not shown already
Select your regular output device on the left - the one with the speaker icon.
Click Output
Change the Format [either way] from 44,100 to 48,000 or vice versa. Wait 2 seconds, change it back.
Done.


How to get "The Stallman"?

Question: How do I get the The Stallman hat. It mentioned edit a community wiki post, but I edited some post which is bumped on the main page like the screenshot below and have not yet received that hat. Do I understand it wrongly? If so, where can I find the community wiki post?
Comment: You could just type "community wiki" in the search box, the faq appears first.
Comment: http://meta.stackexchange.com/questions/11740/what-are-community-wiki-posts
Comment: I know, I will get down vote for asking basic question, but honestly I don't know this.
Answer: That is not a community wiki post. That is just a post which has been bumped by the Community user. See this question for more information on Community Wiki posts. A community wiki post is a post that the author of an answer thinks should belong to the community and not to them. Questions can also be converted to Community Wiki but only by a mod or dev. The user who posted the Wiki post doesn't get any rep for upvotes or lose rep for downvotes. Anyone can change it given they have 100 rep. An example of a community wiki post is the formatting sandbox.
Comment: Correct now, though not complete - other things can make a post into CW but we won't get into this here. (already linked to the faq)
Comment: Your answer contains wrong and misleading information. Only moderator can mark a question as community wiki, ordinary users can mark only (their own) answers as CW.
Comment: @ShaWizDowArd You're right, I thought that I could mark my own questions as CW, apparently not.
Answer: Posts sporting the "Community" user for one reason or another are not the same as community wiki posts. You appear to have conflated these.
Also, doing stuff just for the hats is dubious. Just sayin'...
Comment: The post he edited wasn't owned by the community user, just edited by it. (either auto bump or anonymous approved edit)

How to get "The Stallman"?


Uniform distribution over the unit disk

Question: Suppose that $U_1$ and $U_2$ are independent, and identically and uniformly distributed over the unit disk, i.e., for $i = 1,2$, $U_i = (X_i, Y_i)$ and the joint density is
\begin{equation}
f_{(X_i,Y_i)}(x,y) = \frac{1}{\pi} \mathbb{1}_{\{(x,y):x^2+y^2 \leq 1\}}(x,y).
\end{equation}
I want to know how to compute the probability that the Euclidean distance between $U_1$ and $U_2$ is smaller than, say, $\frac{1}{2}$, that is, $\mathbb{P}(\sqrt{(X_1 - X_2)^2 + (Y_1 - Y_2)^2} < \frac{1}{2})$? I am trying to see if the polar coordinates would help. E.g., let $U_i = (R_i \cos \Theta_i, R_i\sin \Theta_i)$ and then relate the distance to the $R_i$. But would $R_i$ be uniform on $[0,1]$? Anyone has an idea? Thanks very much.
Comment: Yes, you must suppose $U_i  \sim U[0,1]$ and $\Theta_i\sim U[0,2\pi)$
Comment: You may find this recent, related question interesting about a similar problem in 3-dimensions. http://math.stackexchange.com/q/1599950/74357
Answer: We are computing the probability that two random points in the unit disk (here random means with respect to a uniform probability distribution) lie within a distance $\leq\frac{1}{2}$. We may assume without loss of generality that the first point lies on the segment joining the origin with the point $(1,0)$, with a probability density function supported on $[0,1]$ and given by $f(z)=2z$. If we assume to know the position of the first point, the second point lies within a distance $\leq\frac{1}{2}$ iff it belongs to the original disk and to a smaller disk. If $z\in[0,1]$ and $g(z)$ is the Lebesgue measure of the set:
$$ E(z) = \left\{(x,y): x^2+y^2\leq 1, (x-z)^2+y^2\leq\frac{1}{4}\right\}, $$
the wanted probability is just:
$$ P=\frac{1}{\pi}\int_{0}^{1} f(z)g(z)\,dz  = \frac{2}{\pi}\int_{0}^{1} z\cdot g(z)\,dz.$$
So the problem boils down to computing $g(z)$, that has a rather ugly closed form in terms of the $\arcsin$ function. Numerically,
$$ P\approx 19.728\%.$$

Uniform distribution over the unit disk


Missing Part of Speech? Gender Neutral third person pronoun

Question: Is there a gender neutral third person pronoun in English? Say I wanted to tell someone to "forward the email to him/her". Is there a word to replace "him/her" if the gender is unknown? Perhaps "them"?
Comment: "Them " would be correct.
Answer: There have been proposals for various gender-neutral pronouns put forward from time to time, but "they/them" has become the de facto standard gender-neutral pronoun. It can be used if the gender is unknown ("Each person should give their best"), if the gender wants to be kept undisclosed ("I have a meeting after work and I'm meeting them at the bar"), etc.


Office Web Apps Server unavailable externally

Question: We configured an office web apps farm and it works perfectly internally.  But it prompts external users to log into the office web apps servers.  The screenshot below is from the ULS log when I try to log in externally.  I see differences obviously, IsAuthenticated=False UserIdentityName = , and missing access token.  I just dont know what this means.  I've looked online but there is not much concerning these keywords and SharePoint.  Thanks.
Comment: I assume you have already published your office web apps url externally? Did you set it up to use SSL?
Answer: We finally figured out the problem.  The ASA rules were directing outside connections to the wrong internal IP.  Once we corrected the routes on the ASA, everything ran smoothly.  I guess the prompt appeared because that incorrect IP address from the ASA was not bound to the office web apps farm so the farm was asking who the unknown request was coming from.


"With pen and paper" <-- Why don't we need an article here?

Question: "I recommend trying it if you like writing with pen and paper". This is a sentence in a book. Why isn't there an "a" article before "pen" since pen is a countable noun? Is it just a style preference?
Comment: Article use is always tricky when an idiom is involved. [A Google search for "with pen and paper"](https://www.google.co.uk/search?q=%22with+pen+and+paper%22&rlz=1C1ASRM_enGB617GB618&oq=%22with+pen+and+paper%22&aqs=chrome..69i57j0l5.6039j0j8&sourceid=chrome&ie=UTF-8) shows that this would seem an acceptable  choice, though adding an 'a' is by no means wrong (and seems the more common choice here). I'd not normally include the article here.
Answer: This is an anwer that I posted on this similar question here:
Omission of the indefinite article to eliminate ambiguity

Bare Coordination
This phenomenon is one that is not at all well understood, and also one which is currently the subject of much academic research. It is an example of Bare Coordination. This is when coordinated noun phrases (NPs) which we would otherwise expect to take  a determiner of some description appear "bare" with no determiner or article at all. By coordinated, we mean that they appear in phrases using the coordinators and, or, but and so forth (some people call coordinators coordinating conjunctions). The reason that they seem to be able to appear like this is because they are in such coordinations.
Here are some more examples:

A black cat and a brown dog were fighting in the street. Cat and dog were equally filthy.
Are you man or mouse?
I had pen and paper ready to make notes.
Mother and child were said to be recovering well.
He appeared to be millionaire and homeless vagabond at the same time.
Nothing is so sacred as love between husband and wife.

Bare Coordination versus Bare Role NPs
Notice that these aren't bare role NP's which specify a unique role. Bare role NPs can occur freely as Predicative Complements without a determiner. The nouns in these coordinations cannot appear bare when not in a coordination:
Bare role NP

He was Managing Director at Boots.
Who's going to be Best Man?
We elected her treasurer.

Nouns from the Bare Coordinations

*He was millionaire. (ungrammatical)
*He used to be cat. (ungrammatical)
*Are you mouse? (ungrammatical)
*She was wife. (ungrammatical)

Notice as well that bare role NP's can only function as Predicative Complements. However, bare co-ordinations can appear freely in Subject or Object function:
Bare Coordination:

Father and son came to see me. (Subject)
We punished licensee and client together for the misdemeanour. (Direct Object)

Bare Role NP

*Chief executive was an arse. (Subject, ungrammatical)
*I punched Managing Director. (Object, ungrammatical)

Definiteness
Notice as well from the first group of examples, that it makes no difference whether the noun phrases are semantically definite or indefinite. In man or mouse both man and mouse are generic and don't refer to a or the man, or the mouse. In contrast, in Both husband and wife are recovering well, the husband and the wife are very specific, definite people. The fact that a noun phrase is in a bare coordination construction doesn't seem to depend on whether they are semantically definite or indefinite. Nobody knows why these bare noun phrases can occur in these coordinations. There is so much that we still don't know about language. Intriguing, isn't it!

Further reading
Here's a couple of articles on bare coordination:
 - Heycock and Zamparelli: Coordinated Bare Definites
 - Bare_coordination_the_semantic_shift
Comment: This is the third time you've posted a near-identical answer to duplicates. I was really impressed with this answer until I discovered this. Now I'm pretty disgusted.
Comment: It is, indeed, intriguing! Thank you! One question–I'm not sure where "he used to be cat" is coming from in your first list. Did you mean "Cat was filthy"?
Comment: [*Now there's no more oak oppression /
For they passed a noble law /
And the trees are all kept equal /
**By hatchet,
axe,
and saw.***](https://www.youtube.com/watch?v=JnC88xBPkkc)
Comment: @1006a Oops, I just realised why it was that sentence and not the other! Those examples are all showing uncoordinated bare NPs as (ungrammatical) predicative complements. But in *cat is filthy* the  NP *cat* is a subject, not a predicative complement, so I had to come up with a new example sentence.


iOS 7: in app purchase receipt validation and verification

Question: I am new to receipt validation in iOS. I have implemented in-app purchase successfully. Now I wish to include receipt validation part in this in-app puchase.
My in-app purchase is for 3 products. I want that before purchase of each single product in my app, receipt validation should be performed.
For this I followed the following link: official apple developer tutorial
I managed to get the receipt data, but I am puzzled as what to do after getting the receipt data. How do I send it back to apple server for verification and then start the in-app purchase process?
Following is my code:
<code>-(void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {

NSLog(@"transactions count : %d",transactions.count);

BOOL flgIsProductRestorable=NO;

for (SKPaymentTransaction *transaction in transactions) {
    switch (transaction.transactionState) {
        case SKPaymentTransactionStatePurchasing:
        {
            // show wait view here
            //statusLabel.text = @"Processing...";

            NSLog(@"Processing...");
        }
            break;

        case SKPaymentTransactionStatePurchased:
        {
            [[SKPaymentQueue defaultQueue] finishTransaction:transaction];
            [SVProgressHUD dismiss];
            // remove wait view and unlock feature 2
            //statusLabel.text = @"Done!";
            NSLog(@"Success : %@ = %@",transaction.payment.productIdentifier,transaction.transactionIdentifier);
            NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
            NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];
            NSLog(@"%@",receipt);

            NSError *error;
            NSDictionary *requestContents = @{
                                              @"receipt-data": [receipt base64EncodedStringWithOptions:0]
                                              };
            NSData *requestData = [NSJSONSerialization dataWithJSONObject:requestContents
                                                                  options:0
                                                                    error:&error];

            if (!requestData) { /* ... Handle error ... */ }

            // Create a POST request with the receipt data.
            NSURL *storeURL = [NSURL URLWithString:@"https://sand.itunes.apple.com/verifyReceipt"];
            NSMutableURLRequest *storeRequest = [NSMutableURLRequest requestWithURL:storeURL];
            [storeRequest setHTTPMethod:@"POST"];
            [storeRequest setHTTPBody:requestData];

            // Make a connection to the iTunes Store on a background queue.
            NSOperationQueue *queue = [[NSOperationQueue alloc] init];
            [NSURLConnection sendAsynchronousRequest:storeRequest queue:queue
                                   completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
                                       if (connectionError) {
                                           /* ... Handle error ... */
                                       } else {
                                           NSError *error;
                                           NSDictionary *jsonResponse = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
                                           NSLog(@"response : %@",jsonResponse);
                                           if (!jsonResponse) { /* ... Handle error ...*/ }
                                           /* ... Send a response back to the device ... */
                                       }
                                   }];

            [self WS_EbookDetail:transaction.transactionIdentifier];

        }...
</code>
I have just copy pasted the receipt retrieval code from the apple link I have given in this question.
What do I do next?
Comment: use swift store kit its easy https://github.com/bizz84/SwiftyStoreKit
Answer: Keep in mind Apple recommends that you securely send the receipt data to your server and then call their servers.  Calls to Apple's servers are not secure.
You can also do local receipt validation in your app. See Validating Receipts Locally for information on how to do this.
There is also a great WWDC video from 2014 "Preventing Unauthorized Purchases with Receipts" which goes into detail about implementing on device receipt validation.
Comment: can Apple reject an app if we remotely validate receipt from the local size (not using own server)?
Comment: I don't think own server is necessary these days since iOS9 now forces ATS


Is Earth an inertial reference frame?

Question: Is earth considered as inertial frame? I was confused because we learned about Coriolis effect. We know that earth spins therefore Coriolis effect should take place . But does it have minimal effect for motion of balls etc when they move with respect to the ground?
Comment: That the Earth's surface is not an inertial frame is nicely demonstrated by the [Foucault pendulum](https://en.wikipedia.org/wiki/Foucault_pendulum).
Comment: It depends on the physics problem you look at whether the Earth can be considered an inertial frame of reference or not.
Comment: To emphasize @jjack's point, it's notoriously hard work to get a Foucault pendulum to work properly because the non-inertial effects, while present, are very small.
Comment: you can calculate it's size, e.g, for a BMG 50 cal  (853 m/s muzzle velocity) shot at its max effective range (1,800m) and tell us.
Comment: This question seems synonymous with "Does the earth rotate (with respect to the rest of the universe)?"
Comment: Related: [Why and when can the Earth be considered an inertial reference frame](https://physics.stackexchange.com/q/665058/247642)
Answer: The surface of the Earth is not, rigorously speaking, an inertial frame of reference. Objects at rest relative to Earth's surface are actually subject to a series of inertial effects, like the ficticious forces (Coriolis, centrifugal etc.) because of Earth's rotation, precession and other kinds of acceleration.
When solving physics problems, however, we usually take the Earth frame as being inertial. This is because the inertial effects are minuscule for most of our day-to-day experiences and experiments. For example, objects in the Equator are the ones subject to the strongest centrifugal force and it is only about $3 \times10^{-3}$ or $0.3\%$ of their weight.
So for the most part, if an experiment is short enough and happens in a small enough region, the surface of Earth can indeed be approximated to an inertial frame of reference since the effects on the experiment's results are very, very tiny.
This of course has exceptions, as cited in njspeer's answer.
If however by "Earth" you mean the reference frame in Earth's center, it is an inertial frame according to General Relativity (GR), since observers in free fall are inertial in GR. The Earth actually does have some proper acceleration due to external forces such as radiation pressure, but these are also minuscule effects.
Comment: The earth is in free-fall, so its acceleration due to the sun's gravity (or the Milky Way's) does not cause the earth-centered frame to be non-inertial. (Except for even more miniscule effects, e.g. solar radiation pressure.)
Comment: I wasn't really sure about this. I mean, it would be considered inertial in GR, but I was using a more classical idea. I'm editing the post to address this issue. Thank you.
Answer: Because the earth is rotating, it is never strictly an inertial reference frame.  However, because the effects are small in many situations, it can often be approximated as one. When to use Coriolis forces will have to be determined on a case-by-case basis.  E.g. ballistic problems that cover large distances will most certainly require Coriolis-force corrections, and pendulums that swings for a long time would also require Coriolis-force corrections.  For a block sliding down an inclined plane, or a spring on a mass, or a vibrating string, you should not need to take it into consideration.
Answer: Mach would say that non-inertial effects are due to the relative motion between the earth and the rest of the universe.
See:• Assis, André K. T. Relational Mechanics and Implementation of Mach's Principle with Weber's Gravitational Force. Montréal: Apeiron, 2014.
Answer: I know it's being a little pedantic, but I would say "earth" is a thing, not a reference frame. You could define an inertial reference frame that contains the earth.
But suppose you mean a reference frame defined with reference to the earth: Z is perpendicular to the ground where you are standing, X and Y are parallel to the ground and perpendicular to each other.
If you stand at rest in this reference frame, you may notice you feel acceleration (gravity). It is therefore not an inertial reference frame.
Answer: The experiment utilising Newton's laws of motion is carried out in an inertial frame, which is defined as the observer's or, more accurately, the ground frame, which is more or less stationary with regard to the earth.
You can interpret it in this manner, if a stone is on the ground and a camera is pointed in the direction of the stone in the centre of the earth...In a hypothetical sense...You will notice that The Rock does not move with respect to camera frame.
Similarly, when both we, the observer, and the object that is in the experiment are in non-relative motion with respect to the earth.
Also, your condition of earth's Coriolis effect is true, in that it makes no major significant change in the outcome of the experiment.

Is Earth an inertial reference frame?


How to create a multi label text classification model for small dataset in production

Question: I have a multi-label text classification dataset which is very small around 80Kb, I am only going to receive a small amount of data for training from my client. But it is expected to build a high accuracy model for classifying each utterance into multiple targets based on the utterance. How should i prepare the dataset, which models would be best and how shall I aim for the highest accuracy
Answer: You could use a pre-trained model like Bert for feature extraction. Then use these features to train your own classifier using the data received.
Comment: thanks for the advice!


VPS host shows plain text "root" account password upon reinstall of unmanaged VM

Question: I recently started using a VPS hosting service, that offers unmanaged VPS. It allows me to reinstall the VM at any point in time, choosing from a number of OS ISO files (doesn't have to be the same OS as before). You are probably already familiar with this kind of service.
When I first created the VM instance I had to enter a desired username and password and, optionally, a public key, for SSH access.
The thing that worries me, is that, upon reinstalling (through a web-based management environment), it shows me this password of the "root" account (not really root, but the main sudo account, that I had to create for the VPS instance), in plain text. Perhaps as a reminder for me, because they figure I may have forgotten it, because I am reinstalling the VPS. However, the more I think about it: why not just let me enter a completely new password?
Now, since they offer SSH access with public key access, as well, I figured, perhaps they have some nifty way to encrypt my password with that (or perhaps some secure master key of theirs), such that they can decrypt my password and only show me the password in my web-browser, when I want to reinstall the VM. But something tell me that that's probably wishful thinking, at best, or simply not at all the case, at worst.
What's more, is that they also offer shell access through web-based consoles (xterm and noVNC), presumably using the same public key I had to enter upon purchasing the VPS instance. Which made me frown a bit, as well.
What do you make of all this? Is this common practice and still reasonably secure, or are my intuitions correct in that it is considered bad practice and not possibly secure, at all?
Answer: If somebody wants to access your virtual server via SSH, they need the server's IP address and your password. However, if there is no password in place, they could immediately set a password and misuse your server. You assume that you will log in earlier than an attacker.
However, if your VPS provider already set a password, then the attacker also needs to guess it. There shouldn't be a problem if you change your root password.
Comment: The thing is, and I apologize if I didn't make that clear enough in my question: it shows the same original password in the web-based environment, time and time again, when I want to reinstall a new image. So: I chose one "root" account name and password when I originally ordered the VPS instance and then it keeps using these exact same credentials as the "root" account, each time I reinstall the image. However, I just discovered I can always change the password right before installing a new image, as well as (and that's the take-away I got from your answer, which I clumsily overlooked)...
Comment: (Cont.) ...change it immediately after booting the new image. So thank you for that pointer.


What is the meaning of "good" in Luke 18:19?

Question: A rich man called Jesus as "Good Teacher". In reply Jesus told him "Why do you call me good?" further Jesus added, "No one is good but God alone". What does Jesus mean here. Is Jesus not good? Why does Jesus separate himself from God. If God is good, Jesus also must be good.
Answer: The word "good" in Luke 18:19 is Strong's Gr. 18, "ἀγαθός" or "agathos", and it means "describes what originates from God and is empowered by Him".
In the corollary of Mark 10:18 Thayer's Greek Lexicon has the definition under #2, "what is upright, honorable, and acceptable to God:" (1)
The context is the key to this question.  In this situation, Jesus was confronted by a man who was puffing himself up, and Jesus headed him off at the pass.  Jesus directed the man's attention to the Father who is God over all, the Most High, the Great I AM.  As Jesus was obedient in all things, He is the reflection of the Father, and His messenger.
For this same reason, when John questioned Jesus about immersing Him, Jesus told John it was for righteousness.

"15 And Jesus answering said unto him, Suffer it to be so now: for thus it becometh us to fulfil all righteousness. Then he suffered him.
16 And Jesus, when he was baptized, went up straightway out of the water: and, lo, the heavens were opened unto him, and he saw the Spirit of God descending like a dove, and lighting upon him:
17 And lo a voice from heaven, saying, This is my beloved Son, in whom I am well pleased."  (Matt. 3:15-17, KJV)

This incident with the wealthy man occurred during Christ's ministry, before His death on the cross.  Jesus still had to meet all righteousness, and be obedient in all things to fulfill all things (John 19:28, Acts 3:18) to be able to offer that righteousness that we might all partake of.
So, for righteousness sake, for obedience in all things, Jesus would not allow the man to believe another "man" to be good.  Psalms 14:1, 3; 53:1, 3; Micah 7:2 all lament that there is none that are good.  Confirmed again in Rom. 3:10:

"10 As it is written, There is none righteous, no, not one:"  (KJV)

After providing the answer, the man protests in vs. 21,

"And he said, All these have I kept from my youth up.  (KJV)

His answer showed that he believed himself to be good, but Jesus countered and told him the one thing that he still did not have - faith enough to follow Christ, to believe.  The man was putting his faith in his wealth and possessions, instead of in God, and the message that God's Son brought.
We may think that we can be good enough on our own, but that is false.  People may say, "I don't steal; I don't commit murder; I don't lie; I don't commit adultery," etc.  But it is not our goodness that saves us, because we have all sinned in one way or another and are all under condemnation / judgment.
There is only one definition of good that counts with God, and that is through His Son's obedience and righteousness.  We can never be good enough on our own. The wealthy man thought he had done everything he needed to do.  But he was not willing to give all of himself to Christ.

"...and come, take up the cross, and follow me."  (Mark 10:21, KJV)

Jesus was not separating Himself from God.  He was affirming that all righteousness is in God the Father, and that the Son was obedient to the Father, and doing the Father's will in all things.
Note 1) Strong's Gr. 18 - Biblehub
Comment: Gina - I cannot find your quoted (1st para above) meaning of "agathos" in any dictionary.  There are plenty of uses of this word that have nothing to do with God.
Comment: @Mac's - removed first part of the definition... as I can't remember where I originally read that.
Comment: I cannot find that definition - Strong's simply says: benefit, goods things
A primary word; "good" (in any sense, often as noun) -- benefit, good(-s, things), well.  Nothing (necessarily) to do with God.  Theologically that is correct but it is not innate in the word meaning.
Comment: Yes, I think the argument can be made for it being derived from other scriptures.  But, we will leave it with the formal definition.
Comment: One way to keep the meanings in mind is what they mean when they describe food.  If you say food is agathos, it means pure and unadulterated.  If you want to say food tastes good, you use kalos.
Comment: Note: everyone is kalos (beautiful).  Only God is agathos (pure).


Does "need protecting" have exactly the same meaning as "need to be protected"?

Question: For instance,when I say "the bear cubs need to be protected",can I also say "need protecting" instead of "need to be protected"?
Comment: This is a good question. I'd certainly prefer *protection* noun instead of *protecting*. But I observe that *protecting* is also used in such construction.
Comment: I guess you're trying to find out if there are any nuances of difference in meaning between those two forms of passive (concealed passive vs infinitival passive). That seems to be an interesting question. :)
Comment: @F.E That's exactly what I mean. I think there are delicate nuances between the two.
Answer:
The bear cubs need to be protected.
The bear cubs need protecting.
The bear cubs need protection.

They all are correct sentence, and bear the same meaning. But the form need protecting is less used than the other two forms.
The verb - need - has this construction. Need + verb-ing + something.
For example -

These trees need watering.

I hope I have answered your question.
Comment: @snailboat I think they are very slight difference. I think "needs to be protected" adds something more that the other two sentences doesn't. And that is the information that the protection has to be provided by someone else :) Please let us know the differences. Thank you.
Comment: +1, though I think it's technically possible to draw distinctions in meaning between these sentences, so there's probably room for someone to add another answer.

Does “need protecting” have exactly the same meaning as “need to be protected”？


Amplify Flutter: How to connect to existing GraphQL endpoint

Question: I'm implementing Amplify Flutter and want to connect it to our own custom GraphQL endpoint (i.e. non-AppSync). I am however having trouble getting it to work. The official documentation is not super-clear on this (at least not for those of us who are completely new to Amplify). What I have done:

In pubspec.yaml, I've added and installed the amplify_api package.
In main.dart, I've updated _configureAmplify() to add the AmplifyAPI() plugin.
In amplifyconfiguration.dart, I have manually added the following snippet:

"api": {
        "plugins": {
            "awsAPIPlugin": {
                "xxxxxAPI": {
                    "endpointType": "GraphQL",
                    "endpoint": "http://xxxxxxxx.eba-fmuh2afu.eu-north-1.elasticbeanstalk.com/query",
                    "region": "[REGION]",
                    "authorizationType": "AMAZON_COGNITO_USER_POOLS"
                }
            }
        }
    }

But I keep getting the error "There is no API configured for this plugin with matching endpoint type."  What am I doing wrong?  (Note: I presume that I don't have to add any "region" value if I'm pointing to our own custom GraphQL endpoint).
Answer: I was able to fix this issue by closing the app and uninstalling it, then run again and log in to start fetching API


Answer deleted without reason?

Question: This answer was deleted without any reason given even though OP agreed it's certainly an option, so what's the reason for deletion?
Comment: Thank you. I find the right spirit lacking as in other SE's and trying to get a reasoning for wrong doing is like talking to a wall.
Comment: Good question. I also wonder why, because the answer you gave was correct and your advice is probably the most sensible thing to do! Especially for drivers who are unsure about how a car functions.
Answer: It was deleted by a moderator because it's a low quality answer. A standard guidance is:

We're looking for long answers that provide some explanation and
  context. Don't just give a one-line answer; explain why your answer is
  right, ideally with citations. Answers that don't include explanations
  may be removed.
Comment: Where is that quote from? It would be good to have the source so I can link people to it.
Comment: @starsplusplus it's a template tag/comment mods can add to a question or answer.  For example, [this question has it added to remind people](http://workplace.stackexchange.com/questions/19469/how-can-i-best-calculate-a-salary-when-the-job-title-they-are-offering-me-doesn)
Answer: @Mark Mayo came had a conversation which was deleted
@Karlson came repeated what @Mark Mayo said and left
@Ankur Banerjee came again repeated the same things as above two

It was deleted by a moderator because it's a low quality answer. A standard guidance is:
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

So, I update my question with this A one line answer which was NOT deleted. ( Please note I just happen to across this just by coincidence I am not searching for one liner answers I dont have time for that)
I am taking it as a serious offense that my answer given has been called low quality by all three mentioned above.
I stand by my answer that calling the car rental company is the best thing to do. If the car rental agency doesnot provide with emergency number then what will you do if you are in middle of nowhere and car breakdown and I repeat playing with fuel is not a good idea.
If the mod @mindcorrosive other members had an issue with the answer then suitable approach was to comment on the answer and had given me a suitable chance to improve it.
This comment  from the moderator who handled the answer for another topic and see the difference in how both issues had been handled.

@user3470 I handled you first flag. You commented in the flag that the answer is useless and wrong. Even though I agree that the answer is not really great and definitively lacks detail, I can't tell if it's wrong and there I can't tell if it is useless. The community has to decide that by voting. Therefore I declined your flag, but marked it as helpful since the answer definitively has quality issues. –  RoflcoptrException♦ Nov 9 '13 at 17:30

I present the matter to other community members
Comment: I'm genuinely curious - not trying to argue or anything, but you presented to the community, three people told you they agreed with the original decision, and so you take 'serious offense' from this and present it to 'other community members'? Until what, the 29th person to respond agrees with you?
Comment: That's cool, but do consider that just maybe, if 100 people are disagreeing with you, just maybe - maybe, there might be a flaw in your working.  it *could* be the other way around as well, but Occam's Razor and all that.  Saying that, if we're in the same city at any point, I'll totally buy you a beer :)
Comment: @MarkMayo On the other hand, it's not the first person complaining about heavy-handed moderation on this site (as opposed, say, to letting things run their course 'organically' through voting) and that does not seem to have an effect either.
Comment: It may happen that hundred may not agree with one but at the end that one may prove right. But then as expected you are taking the matter out of context, no offense meant. I am not here to argue or prove myself right but I believe that a person should stand up if injustice is done to him/her. We are not enemies but I just happen to disagree with you all and It doesnt matter if hundreds disagree with me :) because I stand on solid ground. All this doesnot matter me as I never intended to be here beyond few days and maybe I will forget about it all until you bring up the matter over beer :D
Comment: In the end I will say crowd never makes history one person does. One of my favourite line (if I may) Everyone saw apples falling but it was newton who realised there significance and we got law of gravity
Comment: @MarkMayo Short and low quality are two totally different things.
Comment: [For beer requests](http://meta.travel.stackexchange.com/questions/1603/meet-other-travel-se-members)
Comment: @Annoyed sure, but by definition letting things run their course lets people in the community choose to flag something as low quality or spam or whatever the case may be, and the moderators then choose to agree/disagree.  You're never going to have 100% of the community happy with the moderators, or with the community for that matter.
Comment: @MarkMayo Since I wrote "run their course 'organically' *through voting*", it's obviously not the definition I had in mind. I don't think short answers or duplicate question need moderator action and I do think it's easier to accept a closed question after one day of voting and five or more votes than after a flag and moderator action.
Comment: Fair enough. But while you don't think short answers need mod attention, it's set up as part of the system to allow it because Stackexchange thinks it's something the system needs, I guess.  Maybe enough people don't care about short answers that they originally saw too much low-grade stuff around, so decided this was a better solution? I'm only guessing here,.
Comment: @kleineg different, yes, but they seem to correlate together well quite often here. Thus the mod message that Ankur posted above - for low quality ones, includes the mention of short.
Comment: @MarkMayo low quality or short, our first step is to comment on that answer so that community member is given a chance to *improve* their answer. We all are here to learn and giving a member a chance to improve is a great learning experience.
Comment: Short answers (one line) maybe sometimes more appropriate than big paragraphs, please donot forget that attention span of readers is not very long, many people searching for answers would prefer short to the point answers rather than *essay type* long answers which do not add any further value. Having said that we can always include explanation **if** explantion adds value to it and doesnot result in confusion to the reader. (Pratically *offline* I use short answers, I see more impact - its not rule it depends on lots of factors - not possible to list)
Comment: My experience here on SE is that low quality answers are **not** deleted *always* rather they are left as it is with downvotes as it reflects the *wrong answer* and that **also** is a great way of knowing of what **not to do**. Deleting an answer IMHO should be last resort. Specifically coming to the matter at hand I still stand firm, that, answer I gave was the most obvious and guessing as to which fuels goes in the car is **very dangerous**.

Answer deleted without reason?


iCloud Drive on Mac is taking up space on HD

Question: I am trying to clear space on my hard drive. I scan a lot of negatives that come in as super high res tiff files that take up a ton of space. I'm trying to move all of the negative scans to my iCloud Drive to clear space on my HD. But it's not clearing any space on my HD and seems to be taking even more space away from my HD. I've read that by optimizing iCloud it will keep recently opened files on my HD, and all of my negative scans have been opened within the last few months. Is it not possible to clear space on my HD by transferring the files to my iCloud? Is iCloud useless for making room on my HD? Here is a screen shot to show what's happening.
Thanks!
Comment: iCloud is a sync system meaning it's purpose is to give you access to your files from all devices signed -in with the same Apple ID.  As such, it will keep copies (low res) on your devices (except for the files indicated in 'Optimize Storage').  Are you trying to move these files to folders that you don't want synced to your devices?
Answer: You need to enable Optimize Mac Storage in iCloud Drive settings. After enabling this, you may have to speed it up by right clicking on large folders or files and clicking Remove Download.

Open System Preferences > iCloud and check the box labeled Optimize Mac Storage.
To speed the process, find a folder you wish to remove from your local storage and right click it. Choose "Remove Download."
Comment: Thanks for your quick response! I do already have the optimize Mac storage box checked. I can't find where I have the option to right click and 'Remove Download'. These folders have already moved out of my HD and no longer show up--so do you mean right click on the folders within the iCloud Drive? And again, I have looked for that option, to right click and remove download in the iCloud Drive folders.
Comment: Yeah, you want to open up iCloud Drive and find the file. I've attached a screenshot showing what I mean. This may not appear if the file in question hasn't finished uploading. Try confirming it appears on a file that has been uploaded (no cloud icons appear near the file)


How to know positive or negative phrase from qshere diagram?

Question: How to find out whether it is a positive or negative $\pi$ phrase between 00 and 11 from q-Sphere diagram?
Answer: As per @epelaaez's answer: the node color indicates the relative phase. However, there is a subtle point here.
As stated in this page, if you run this code snippet
Ψ = [8 / 17, 0, 0, 15j / 17]
plot_state_qsphere(Ψ, show_state_phases = True)

the result will be

You can see that $|11⟩$ is displayed with phase = $0$ although it has a phase greater than zero. On the other hand, $|00⟩$ is displayed with a phase while it does not have one! This is because plot_state_qsphere function removes the phase from the term with maximum probability, and normalizes the phases of other terms accordingly.
Answer: The phase corresponding to the color of state $|11\rangle$ is $e^{i \pi}= -1$. So, it is a negative phase.
Generally, you plug in whatever angle the color of the state corresponds to into $e
^{i \theta}$ to get the phase of the state.


Can I use GraphicsMagick with Craft CMS?

Question: Short question: Can I use GraphicsMagick with Craft CMS? If yes, how can it be configured? thanks
Answer: No, Craft only supports GD and Imagick, not Gmagick (which would be the PHP extension that interfaces with GraphicsMagick). The underlying PHP library, Imagine, actually does, so I guess it would be feasible to add support for it, but I suspect that there's not that huge a demand in the community. You could try submitting a feature request for it.


How to debug gears in the Bucket Wheel Excavator?

Question: My 8 year old is just finishing the Bucket Wheel Excavator. He turned the motor on and there is a significant clicking noise. It looks as though the top gear noted in the picture gets stuck. Not sure where the problem is as he build it all himself.
Answer: First of all, let's get some basic questions out of the way:

Do any of the functions work correctly in any directions? If only some functions fail to work, then we can narrow the search to those.
Is this clicking sound present with all functions? If only some functions click, then they must be the culprits.

The surefire way would be to follow the "chain" of mechanical parts from the motor along the gears and axles. As far as I can remember the gearbox is not that complicated or hidden that it would be easier to dismantle and rebuild than to peek inside (maybe after removing some of the decorative panels). So turn on the motor and see if the gears and axles leading to the selected function are moving. Of course if the selected function is working correctly, you can assume that specific chain is complete and correct, so no need to analyze.
Or just operate all functions for a while each and any gear that did not move during this time must be disconnected from the motor.
Another way would be to locate the source of the clicking sound and seeing if that area is built up according to the instructions, as it would be the prime suspect. My model has once experienced a problem with the three parallel grey universal joints connecting the top and bottom halves (which are assembled quite late in the process) where the insert of one of the joints came loose and was turning in its sleeve without transferring any motion but producing a clicking sound. So maybe check that too.


Can't install new OS on 2003 gateway desktop

Question: I'm trying to install Peppermint OS. I made a bootable cd which works for my other computer but I can't get this gateway to boot off it. I've tried everything I can think of in the BIOS (yes I've reordered the boot order and the default cd drive) I've tried both cd drives. Nothing works so far. It had windows xp but it won't boot (missing file in system/config or whatever). I don't if te hdd is shot maybe (a click click click noise is heard is when it boots off the hdd with about 1 second interval between clicks). If the hdd was shot I wouldn't think it'd effect booting off the cd though. Correct me if I'm mistaken. Anyways what it boils down to is I need suggestions on getting peppermint OS installed on this thing.
Comment: If both HDD and CD Roms are IDE drives, and both are on the same cable, then it's possible that a dead HDD will make accessing the CDROM impossible. Have you tried unplugging the HDD just in case ?
Comment: I did indeed this, but it turns out the hdd is fine. The cd drives are broken. I used an external cd drive and now all is well.
Answer: In order to install the latest version of Peppermint OS, Peppermint 4, The Official Peppermint User's Guide recommends that your computer should have at least 512MB RAM, preferably 1GB RAM. Your 2003 Gateway desktop probably has either 256MB or 512MB DDR RAM, so you can install Peppermint OS on your 2003 Gateway desktop, since The Official Peppermint User's Guide also says that the absolute minimum required specs required for installing Peppermint OS are only 192MB RAM. In my opinion you will be a lot happier with the results if your computer has at least 512MB RAM. In particular, your web browser may be slow and laggy without it, especially when you are watching a Flash video.
In order to make an Peppermint OS live USB for installing Peppermint, use the UNetbootin tool for creating live USB drives (Windows/Mac/Linux). The flash drive you use should be 1GB 2GB or larger and formatted as FAT32. UNetbootin will automatically format the USB flash drive as FAT32 if it is not already formatted to FAT32. In either case the formatting procedure will delete all of the files that are already on the flash drive.
It is very important to verify that the device that you are installing the Peppermint live USB to is indeed your flash drive, so that you don't overwrite any of your system or personal files which may make your operating system unbootable. In the picture below the name of the flash drive is /dev/sdb1 where /dev/sdb is the device name of the flash drive and the 1 after sdb means UNetbootin will install the Peppermint live USB on the first partition on that device.

The Peppermint live USB flash drive that you make this way will be bootable from PC computers. In order to enable your computer to boot from the USB flash drive, you must enter your BIOS menu by pressing one of these keys, usually: Del, F2 or F10 as soon as the motherboard splash screen appears when the computer is booting. In the BIOS menu, you need to change the boot order so that the USB flash drive, which is usually called USB-HDD in newer computers, is the first entry in the boot sequence, save your new BIOS settings and exit from the BIOS setup utility.
Reference: The Official Peppermint User's Guide: Chapter One - Download and Install
Comment: I have 2gb of ram surprisingly! And i actually tried this method first but the compute  hated this more lol.
Comment: With 2GB of RAM you should get good performance from your new Peppermint OS installation. In my experience Xubuntu gives good performance with only 1GB RAM, and your Peppermint OS is a more lightweight distribution than Xubuntu, to which it is otherwise similar.
Answer: It almost sounds to me like the disc you burned isn't bootable. If you have another machine available to you, put that disc in it and try to boot from it.  Alternatively, if you have your old Windows XP disc hanging around, pop that in and try to boot your Gateway from it. If the Windows XP disc boots just fine, but not the Peppermint OS disc, it may just be that the Peppermint disc was burned incorrectly.  When it doesn't boot from the CD drive, does it try to move right on to the hard drive?  If so, try disabling the hard drive as a boot device entirely in BIOS, so it doesn't have the option of moving onto that. Obviously, you'll have to reenable it later, but that will aid in troubleshooting it.
Comment: I did indeed try this right after I posted and its how I figured out the cd drives were broken. So Id one up your answer if I could lol.
Answer: Actually the issue turned out to be broken cd drives (the disc was fine as was the hdd). I used my external cd drive and it worked perfect and the OS installed.
Answer: We might need some more info on your setup, but anyways...
If you have that possibility, try booting from a usb flash drive.
And there is always the possibility to create a partition on your hard drive to boot and install off that. You can always nuke it, when you're done.


Best K in K-fold cross validation

Question: I'm using $k$-fold cross validation technique for generating train, test and validation indexes for a neural network. My sample size is 230~700. What is best $k$ for cross validation here. Now I'm using 10-fold cross validation but I think it is too high. What is your idea?
Comment: Have you tried K-K-fold cross validation to determine the best K?
Comment: I'm just kidding. It should just be enough to have confidence there's no uncertainty due to subsample choice. Traditional train-test validation is $k=1$, remember. $k$-fold "kicks in pretty quickly" as far as the $k$ is concerned, in my opinion. Double $k$-fold is not totally uncalled for if you HAVE to know, just do iterative split sample validation in your other $k$ to see how variable those model performance statistics are, but beware of small sample bias issues if you are getting very small $n$s there.
Comment: No. I used it to have more reliable model (accuracy,sensitivity and specificity) for my classification problem. + this is cost function of an optimization algorithm and i need more reliable average cost.
Comment: Oh. I didn't get that :-D . So what is your opinion for this sample size? Do you think 10-fold is good? + I'm using neural network and when I see the main page in MATLAB, In all neural network designs validation (maximum=6) is stopping the training.
Comment: Are you sure that's training? I think most software tends to feedback iterations in the backpropogation, not validation, 6 seems like the case for that. I haven't used matlab.

10fold is almost always fine regardless of sample size. If sample size *is* an issue, then you should be validating with a bootstrap instead!
Comment: Yes. The default early stopping of neural network toolbox sets to maximum 6 iterations. Thank you
Answer: Actually there is no straight answer to the choice of K in k-fold cross validation.
An higher k will give you more but smaller subsets on which run testing. An adopted choice is to select the K that gives you a testing set with the size of 15% of your total dataset.
However, other methods are also available; you may want to consider permutations or exahustive cross validation methods (more infos here).
Hope it helps.

Best K in K-fold cross validation


Mining and Bitcoin Wallet

Question: I have been mining for over 24 hours @ 97.3 Mhash/s. Shouldn't I have at least obtained .01 bitcoin by now? How do I verify the mining that I am doing is transferring into my Wallet?
Comment: Are you mining with a mining pool? I mined like 2 consecutive weeks with a MacBook Pro and had only 0.01 BTC by then. Mining with not-optimized hardware is really senseless.
Answer: If you are solo mining against your own bitcoin server, then for each hash your miner tries it either solves the block (and earns 50BTC [plus transaction fees], provided it doesn't get orphaned), or doesn't (and earns nothing).
If you're mining with a pool, then payment depends on the pool's payment system. If for example it is PPLNS (Pay Per Last N Shares) with a value of 500,000 for N, then you don't get paid anything unless a block is solved within the 500,000 "shares" mined following each share that you submit. Let us know the pool you're using (or the payment mechanism), and we will be able to provide some more info.
With 97.3Mhash/s, I'd (roughly) estimate you'd earn around 0.04 to 0.05BTC per 24hrs with a difficulty of 2,100,000 (approx the current difficulty).

Mining and Bitcoin Wallet


Rest mass of the photon

Question:
Why is the rest mass of the photon is taken to be zero?
If rest mass of the photon is non zero, then it leads to infinite energy of the photon (by $E=mc^2$ equation) and there is a violation of conservation of energy. Is this a reason?
Also, is there any thing called the relativistic mass of the photon?
Comment: What does it mean to have a rest mass if the object cannot be at rest?
Comment: what do you mean by infinite energy?
Comment: If the rest mass of the photon is non zero.By the relativistic mass expression, m = γm0, where γ = 1/Square root of√(1 − v^2/c^2) ,m shoots upto infinity leading to infinite final energy of the photon.
Answer: There's no infinite energy. If you substitute $\gamma mc^2$ with v $\to$ c, and m=0 at the same time, $E=0/0$ form which is an undefined quantity. Energy is not either zero or infinity from that expression. Forms like that means the formula breaks down and need some other formula that can evade that mess.
Do you know the expression $E^2 = (mc^2)^2 + (pc)^2$? Here, $m$ is the rest mass. If you use this, $E=pc$, for $m=0$.
Besides, using the concept of relativistic mass is not favorable as it is under a lot of scrutiny. There are questions on this website that answers this part of the question better. Using such a relativistic mass concept works out for a few types of problems, but provides false understanding as they predict "tangential" masses as such.
In response to the OP's comment, photons are responsible for the electromagnetism and is a fundamental force of nature. When we mean fundamental, it means that it cannot really be split into anything else. For example, the masses in protons and neutrons are due to binding energies of smaller particles that constitute them. The assumption here is that photons are elementary particles as such.
Comment: I gave that reasoning that if "rest mass of the photon" is non zero,then energy becomes infinite.I didnt use this reasoning for zero rest mass photon.I hope you read my question properly. Thank you.
Comment: OK. I have edited my answer.
Answer:
why is the rest mass of the photon is taken to be zero

A photon is 'special' in that there is no inertial reference frame (IRF) in which it is at rest.  In any IRF, a photon propagates with speed $c$ in vacuo.
Since a photon is not at rest in any IRF, one could reasonably argue that the notion of rest mass, the mass of a particle in the IRF in which is at rest, just isn't meaningful in the case of a photon.
I should point out now that the term of art is  invariant mass rather than rest mass.
The relativistic energy-momentum equation for a massive particle with invariant mass $m$ is
$$E^2 = (pc)^2 + (mc^2)^2$$
Importantly, in this equation we can zero the invariant mass and get, for a massless particle,
$$E = pc$$
which says that the energy and momentum are proportional for particles with zero invariant mass.  For further reading, start with Does light have mass.

If rest mass of the photon is non zero,then it leads to infinite
  energy of the photon (by E=mc^2 equation) and there is a violation of
  conservation of energy.

One cannot stipulate that a particle has a rest frame and that it moves with speed $c$ since $c$ is the invariant speed.  If you suppose that a photon has non-zero rest mass, then it has a rest frame and so cannot have speed $c$ in any IRF.
Answer: In physics there is a large collection of different particles, with different attributes. Some are massive, some are massless, and both cases are perfectly acceptable. Photons are observed to be massless, and as a consequence moving at the speed of light. To ask why photons are massless is not really in the realm of physics, and the answer is instead of philosophical or religious character.

Rest mass of the photon


Why is the [z] sound in Spanish so uncommon compared to other languages?

Question: Sorry if this is not a Latin question but there weren't any questions in other forums where I could edit. So since Latin is the closest language to Romance languages, I'll ask here. In most other Romance languages, the [z] sound is written either S or Z. In French, S represents [z] between vowels or when adjacent to a voiced consonant while it's written Z in most cases. In Italian, [z] is always written S between vowels or adjacent to a voiced consonant while Z is used for ts or dz. In Portuguese, [z] is most represented by Z while S is used for that sound before front vowels or adjacent to a voiced consonant and in some trans- words. In Romanian, Z is always [z] and S is always [s]. In Spanish however, S is always [s] and rarely [z] when adjacent to a voiced consonant. Z is used for [th] or [s], based on dialect.In most other Romance languages, the [z] sound is written either S or Z. Why is the [z] sound so uncommon in Spanish compared to other Romance languages? Question is, why is the [z] sound not commonly written S or Z in Spanish compared to other Romance languages?
Answer: Like Portuguese, French, or Italian, the Spanish language used to have /z/ (more narrowly, [z̺]) as the pronunciation of S between vowels in the middle of words (as in Old Spanish espeso [esˈpezo] 'spent'). This contrasted with /s/ (more narrowly, [s̺]) in the same position, which was written with the double letter SS (as in Old Spanish espesso [esˈpeso] 'thick'). (Old Spanish examples taken from Mackenzie, cited below).
However, between Old Spanish and modern Spanish the sound [z̺] was changed to [s̺], which is its voiceless counterpart. Because of this sound change, the spelling "SS" was considered unneeded and came to be replaced with the single letter "S". A similar change caused Old Spanish [ʒ] (spelled "J") to be replaced with [ʃ], and Old Spanish [z̻] (spelled "Z") to be replaced with [s̻]. The latter two pairs evolved into the modern Spanish sounds /x/ and /θ/, which is why modern Spanish uses the letters "J" and "Z" to represent /x/ and /θ/ respectively.
See §11 "Devoicing of the sibilants" in "History of Spanish Consonants", The Linguistics of Spanish, Ian Mackenzie, 1999–2022.
You might ask "why did Spanish replace [z̺, ʒ, z̻] with [s̺, ʃ, s̻]" but we generally cannot say why sound changes occurred in some languages but not in others.


Will (GKPeerPickerConnectionTypeOnline)Gamekit framework in Online Mode find peers over the internet or only in local Wifi network?

Question: In my iphone application i want to do peer to peer connections over the internet. So does GKPeerPickerConnectionTypeOnline in Gamekit framework support P2P over the internet or is it only for local Wifi Network.
Answer: Apple Documentation - GKPeerPickerController class suggests that type online is: "internet based", i.e. not only local Wifi.


Can't play .MP4 files on my android phone

Question: I have an LG l33l. I recently recorded a video on my computer using Bandicam, in the .mp4 file. I edit my videos on my phone, so as usual, i try to take the recorded .mp4 file and send it to my phone. (My phone is connected to my computer with a USB cord.) So I send it and it completely sends. I unhook my phone and go to play it on my phone. But when I do I get this error message "unsupported format" I dont know what to do from here. Please help. Sorry if my explanation was confusing, ask me any questions you need to answer my question.
Answer: Try with VLC for Android. If not playing, then your mp4 is not compliant. MP4 is like a nut which contains a video stream and an audio stream. Of one these are not compliant in your video. Encode in mp4 with AAC and AVC for audio/video to be compliant with all devices.


Cannot view the logfile?

Question: I am a beginner. I have managed to install Ubuntu 11.10 and am now satisfied that it seems to be running okay. It would help me learn more to be able to view the logfile but I cannot. What have I missed or what am I dping wrong (also I have no swap file just incase this maybe related). Any help appreciated please.
Answer: The system logs are restricted to root for security reasons.  Learn to use sudo.  (Or for a singleuser system where you're reasonably confident about security, you can change the permissions on the log files yourself.)

Cannot view the logfile?


.htaccess redirect doens't work correctly

Question: I'm using a .htaccess to get all documents from an old site to the new one. The old site doesn't support PHP or mod_rewrite. I tried the following code:
Redirect 301 / http://www.new.com/archive/

I requested " http://www.new.com/archive/index.html"
Which resulted into
http://www.new.com/archive/old.com/olddir/&&&/&&&/users/4/web/00/00/24/04/44/&&&/1/&&&/0/&&&/&&&/&&&/users/4/web/00/00/24/04/44/&&&/1/&&&/0/&&&/index.html

Is this possible to solve?
Answer: Kevin -
At first glance, it looks like something within your application is doing quite a few redirects.  The simple Redirect statement in your .htaccess shouldn't be creating the very long URL that you pasted above.
It may help you debug the issue if you use curl to test it:
$ curl -I olddomain.com | grep ^Location
Location: http://newdomain.com/archive/olddomain.com/

From there, just curl the URL that is returned and see where you're redirected then.  Take the next URL and curl it as well.  Keep going until you are able to debug the source of those redirects.