Reverse a string without using string functions
Printing reverse of any String without using any predefined function?
There aren't any new or popular questions. There are tons of questions in both of those tabs but the question count is 0 for both of those when I try to view them in the expanded view. Singular or plural verb form where subject includes a "parenthetical" element My question arises from , where OP asks whether he should use the singular or plural verb form after "the title, as well as the tone,"  As luck would have it, when I searched Google Books for , I found...        ...and...        At the risk of having this question closed as just peeving, I feel that the first one should have been plural "err", because without the commas it seems to me both "the title" and "the tone" have more or less equal status as "joint" subjects of the verb, making it plural.  On the other hand, I feel the commas in the second example effectively demote "the tone" to "parenthetical" status (the clause is almost incidental). Since this encourages us think of "the title" as the primary subject, it should have been singular "derives".  I'm no great fan of "grammatical rules", but it seems weird to me that the only two relevant examples for this specific wording should both (in opposite ways!) contradict my inclinations.  What's going on? How to redirect stderr and stdout to different files and also display in terminal? I want to see the output of a command in the terminal as if there was no redirection.  Also, stderr needs to be redirected to err.log and stdout needs to be redirected to stdout.log.  It would be nice to also have the exact copy of what is shown in terminal, i.e. errors printed as and when it occurs, in a separate file: stdouterr.log. I have found film reels some with tails of film others not. Is there a way of telling if they have been exposed/used in a camera? Film types are for 35mm and one Kodak Advantix. Scenario:   Create SymLink: C:\Data\workspaces --&gt; C:\Users\****\Documents\workspaces Navigate to C:\Data\Workspaces in explorer Click and drag the the path from the address bar onto "Quick Access" in the navigation pane.   Expected Result:   Clicking on the shortcut takes you to C:\Data\workspaces   Actual Result:   Clicking on the shortcut takes you to C:\Users\****\Documents\workspaces   How do you make it so that the shortcut points to the correct path. (the SymLink)  Command Used to create the SymLink:  mklink /D C:\Data\workspaces C:\Users\****\Documents\workspaces   Updated with pictures:  Please note the workspaces symlink inside C:\Data:    When I double-click on the symlink it works correctly. (note the address bar.    When i pin it to the Quick access bar, however, it uses the address that the symlink points to and NOT the symlink address. Given a string file path such as /foo/fizzbuzz.bar, how would I use bash to extract just the fizzbuzz portion of said string? Inheritance of static members in PHP In PHP, if a static attribute is defined in the parent class, it cannot be overridden in a child class. But I'm wondering if there's any way around this.   I'm trying to write a wrapper for someone else's (somewhat clunky) function. The function in question can be applied to lots of different data types but requires different flags and options for each. But 99% of the time, a default for each type would suffice.  It would be nice if this could be done with inheritance, without having to write new functions each time. For example:  class Foo {     public static $default = 'DEFAULT';      public static function doSomething ($param = FALSE ) {         $param = ($param === FALSE) ? self::$default : $param;         return $param;     } }  class Bar extends Foo {     public static $default = 'NEW DEFAULT FOR CHILD CLASS'; }  echo Foo::doSomething() . "\n";  // echoes 'DEFAULT'  echo Bar::doSomething() . "\n";  // echoes 'DEFAULT' not 'NEW DEFAULT FOR CHILD CLASS'  // because it references $default in the parent class :( Let $\{X_\alpha\}_{\alpha\in J}$ be a family of topological spaces and let $X=\prod_{\alpha\in J}X_\alpha$ be endowed with the product topology. Show that $X$ is path connected if and only if each $X_\alpha$ is path connected.  I know this is true if path coennected is changed by connection but I am very confused with this problem, I have tried to do the following:  $\Rightarrow $ let $x,y \in X_\alpha$ be then $(x_\alpha), (y_\alpha)\in \prod X_\alpha$ where $x_\alpha=x, y_\alpha=y$ and $x_\beta=0, y_\beta=0$ for any $\beta\neq\alpha$, and since P is path connected then there is continuous $f:[0,1]\rightarrow \prod X_\alpha$ such that $f(0)=(x_\alpha)$ and $f(1)=(y_\alpha)$, then if $\pi_\alpha:\prod X_\alpha \rightarrow X_\alpha$ is the projection, which is continuous, we have that $\pi_\alpha f:[0,1]\rightarrow X_\alpha$ is continuous and $\pi_\alpha (f(0))=x$ and $\pi_\alpha (f(1))=y$.  $\Leftarrow$ I do not know how to do this address, could someone help me please? Thank you very much. Calculating centroids of polygon using ArcPy? I am trying to calculate the centroids of a polygon and add the x- and y-coordinate to their respective fields:  arcpy.env.workspace = r"C:/..."  input_fc = "shapefiles/precincts_v.shp" arcpy.AddField_management(input_fc, "X", "DOUBLE") arcpy.AddField_management(input_fc, "Y", "DOUBLE")  arcpy.CalculateField_management(input_fc, "X", "!SHAPE.CENTROID@DECIMALDEGREES!.split()[0]", "PYTHON")  arcpy.CalculateField_management(input_fc, "Y", "!SHAPE.CENTROID@DECIMALDEGREES!.split()[1]", "PYTHON")    but I an invalid syntax error. Where is the mistake?  Edit: exact error message  Traceback (most recent call last):   File "C:\Users\mquentel\Dropbox\PLSS\CA voting data\Python\CONSTRUCT_merge_voting_and_census.py", line 17, in &lt;module&gt;     arcpy.CalculateField_management(input_fc, "X", "!SHAPE.CENTROID@DECIMALDEGREES!.split()[0]", "PYTHON")   File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\management.py", line 3360, in CalculateField     raise e ExecuteError: ERROR 000539: SyntaxError: invalid syntax (&lt;expression&gt;, line 1) Failed to execute (CalculateField). Why would spacetime curvature cause gravity? It is fine to say that for an object flying past a massive object, the spacetime is curved by the massive object, and so the object flying past follows the curved path of the geodesic, so it "appears" to be experiencing gravitational acceleration. Do we also say along with it, that the object flying past in reality exeriences NO attraction force towards the massive object? Is it just following the spacetime geodesic curve while experiencing NO attractive force?  Now come to the other issue: Supposing two objects are at rest relative to each other, ie they are not following any spacetime geodesic. Then why will they experience gravitational attraction towards each other? E.g. why will an apple fall to earth? Why won't it sit there in its original position high above the earth? How does the curvature of spacetime cause it to experience an attraction force towards the earth, and why would we need to exert a force in reverse direction to prevent it from falling? How does the curvature of spacetime cause this?  When the apple was detatched from the branch of the tree, it was stationary, so it did not have to follow any geodesic curve. So we cannot just say that it fell to earth because its geodesic curve passed through the earth. Why did the spacetime curvature cause it to start moving in the first place? Is it possible to make the -init method private in Objective-C? Recent reports claim that the gravitational waves detected by LIGO match up with the signal expected from two black holes merging as predicted by general relativity.  Additionally, the masses of both black holes were estimated. Questions:  How certain are we that the detected of gravitational waves are necessarily from two black holes merging?  Since supermassive black holes are typically at the center of a host galaxy, what happened to the galaxies that contained the two merging black holes?  For example, did their host galaxies merge?    Edit After reading the answers, I understand that the signals detected by LIGO are proof of the validity of gravitational wave generational artifacts as predicted by general relativity.  When additionally gravitational waves, caused by the merger of the supermassive black holes (those which ARE indeed located in the centers of the merging galaxies) will be detected, since mergers of galaxies could be observed by the methods independent of gravitational waves such as registering the fact of the quasar appearance (). Additional questions:  Could someone offer me the historical ASTRONOMY precedent when the second degree of inference (from the mathematical model, being associated with the theory of Physics) was accepted as the discovery of the astronomical object?  Could someone give a reference to trustable scientific publication, with the subject of study being discussion of requirements satisfying claim of astronomical discovery of an astronomical object?  Have independent scientific sources (outside of members of the LIGO team) analyzed methodology and results of the LIGO signal detection, and published their conclusions with regards of what was actually discovered? What is the size of this microcontroller? Having trouble reading a data sheet I am trying to find a small enough microcontroller for a project, but I am not familiar with the notation used to denote the sizes in this image:  What does that mean when it says 12,20/11,80 SQ and 7,50 TYP.  The image is from .  OR is this not where I find the physical dimensions? If these do not denote the physical dimensions of the part, then where in the datasheet is that written? How to remove the switch user account option in Unity 2D? We are looking for a way to permanently remove the Switch User Account function from our install of Ubuntu Unity. Note, this function appears when you right or left click on the user name in the upper right-hand corner. It then displays a list of 5-10 users that have logged in along with the option to Switch User Account. We know that we can do this by defaulting to gnome, but we would like the option of using Unity as well, but without the Switch User Account option.  We have already tried dconf-editor, gsettings and several other options to remove the users name list, Switch User Account option from appearing in the drop-down list. We know this can be done for one user at a time, but we are wanting to do this for all users on roughly 160 workstations.  Some options that we have already tried are:       This is a visual of what we are trying to remove: Writing a list to a file with Python I want to insert something into a STL list in C++, but I only have a reverse iterator. What is the usual way to accomplish this?  This works: (of course it does)  std::list&lt;int&gt; l; std::list&lt;int&gt;::iterator forward = l.begin(); l.insert(forward, 5);   This doesn't work: (what should I do instead?)  std::list&lt;int&gt; l; std::list&lt;int&gt;::reverse_iterator reverse = l.rbegin(); l.insert(reverse, 10); According to , the only restriction on self-deleting an answer is that you can't delete an answer that's been accepted.  But I've also heard of users getting in trouble for deleting (non-accepted) answers, and there's the CC-SA license to consider, so -- quite aside from what is technically possible -- my question is when it's permitted to delete your own answer.  Some cases to consider:   You now believe the answer is incorrect. Your answer is correct, but another answer covers the same territory better. You aren't satisfied with the quality/rigor of your answer, e.g. it's speculative and you didn't back it up (on a site that expects that). Something in the answer embarrasses you and you'd rather just make it go away. Your answer wasn't well-received by the community (whether that's "meh" or "make the rep bleeding stop please"). (I'm sure there are others; this isn't meant to be an exhaustive list.)   Does voting matter, either in absolute terms or in comparison to other answers?  For example, maybe it's ok to delete a lower-voted one but not the top-voted answer, or one with score > N??  There is a badge, Disciplined, for deleting your own post of score 3 or higher.  This tells me that it's sometimes ok to delete upvoted answers.  But I'm not sure how much policy we can infer from badges.  Could we have some clarification please? How to evaluate $\lim\limits_{n\to+\infty} \prod\limits_{k=1}^n (1+k/n^2)$? Can I wield just a shield and use magic? I play a wizard and while I am rarely hit due to being in the back I'm still paranoid I will get hit. So I was wondering if, after getting a feat to wield a shield, I can use that with one hand and use magic with the other? after upgrading to 19.04 the Grub menu have become hidden. It still works and I can boot to both Windows 10 and Ubuntu by blindly finding the entry and pressing enter. I have tried to edit the /etc/default/grub and running sudo update-grub afterward but no change. Here is how it looks now:  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2&gt; /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" GRUB_TIMEOUT_STYLE=menu GRUB_HIDDEN_TIMEOUT_QUIET=false  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"   I can't use either Shift or Esc to make it visible too. After pressing either of these, Grub doesn't work anymore and I need to turn my laptop off and on in order to boot.  Edit: Not sure if it helps or not, but I just realized that if I go to the BIOS when I exit BIOS the grub menu shows up with no problem. The next time I boot, the grub menu is invisible again.