Please before you think that I'm asking the same N% Question read it first and please pay Attention to it.  I'm working on a project where I have more functions which returns double and it may be possible that some of them are the same which is a good thing in my project and if is true then I need a double comparison to see if are equal.  I know that doing an equality comparison if( x == y ) is not a smart thing and we don't need to speak why, but we can check for < or > which is the part of this Question.  Does the language (standard) guarantee this, that the comparison < and > are 100%?  If yes then, the following program can be used:  #include <stdio.h>  int main(void){     double x = 3.14;     double y = 3.14;      if( x < y || x > y){         /* Are not Equal */     }else{         /* Are Equal, foo() will be called here\n" */         foo(x, y);     } }   Does foo(x, y); get executed? BecauseX and Y should be equal here.  EDIT: This question doesn't seek a way to compare two double, it is only the fact that should I use, or should I don't use < > instead of ==

What would be the most efficient way to compare two double or two float values?  Simply doing this is not correct:  bool CompareDoubles1 (double A, double B) {    return A == B; }   But something like:  bool CompareDoubles2 (double A, double B)  {    diff = A - B;    return (diff < EPSILON) && (-diff < EPSILON); }   Seems to waste processing.  Does anyone know a smarter float comparer?


Do the Britons (British people) say both?  And, I've found it from the book that said:  "Have got to" is more informal than "have to", so do Britons say this:   I have to get a great score than last exam. (AE/BrE) is this common in BrE? I have got to get a great score than last exam. (BrE) is usually used in speaking. I gotta get a great score than last exam. (Informal AE).   So, the question is which is more preferred in BrE, in spoken and written BrE?

native BrE speaker !  I am confused to use have and have got in the sentence. Do you (BrE speaker) use both "have got" and "have" in writing and speaking ?  ex.   A. I have a / I have to.  B. I don't have a / I don't have to.  c. Do I have a ? / do I have to ?  a. I have got a / I've got to.  b. I haven't got a / I haven't got to  c. Have I got a ? / have I got to ?  And, could I use " have got" In modal verb ?  ex.  a I could have (got) a  car /to go  b. I may have ( got) a car/to go  with to  a. Is it normal for her to have (got) to beat her child ?  b. My mum wants to have (got) a child.  with never   a. He never has (got) to pick / he never has (got) a red boat.  B. I am going to have (got) a child / to go  continous  a. I am having (got) to go / a car.  b. I am not having (got) to go / a car.  c. Am I having (got) to go / a car ?  Do you use have got in past form ? A. I had a car / I had to go. B. I didn't have a car / I didn't have to go. C. Did I have a car ? / did I have to go ?  please, help me , I am really confused with these , and I'll wait for your help, thanks !


These codes seem the same on paper but their outcomes show they are different codes under the hood. Is it because of scope within the loop? The output shows on the first example any alteration of the first dictionary changes the second dictionary as well. The second example allows for individual dictionary contents alteration without changing the other dictionary which is also of the same name at creation. new_person = {'haircolor':'blonde'} new_person = {'haircolor':'blonde'}  people = [new_person,new_person]  people[0]['haircolor'] = 'brunette'  print(people)  #######################################  people = []  for num in range(2):     new_person = {'haircolor':'blonde'}     people.append(new_person)  people[0]['haircolor'] = 'brunette'  print(people)

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


The Question consist of three parts   What are the differences between them  When to use adduser or useradd and why there is more than one command for the same purpose

What is the difference between the commands adduser and useradd on Ubuntu?


I've been looking for some time on the Internet, for software or some system in order to  draw magnetic fields based on the geometry of a magnet. Is there a specific software for this? I hope this won't be a silly idea but how will be the geometry of the magnetic field of a Moebius strip? Or other shapes?

Is there easily-available* software to simulate coils, solenoids, and other magnetic and electromagnetic devices?  I'd like to play around with some design ideas, such as Halbach arrays, but physics simulators like SketchyPhysics don't seem to have the laws of electromagnetism implemented.  (*"Easily-available" means "not cost prohibitive.")


I would like to know who has asked the most number of questions and how many they asked.

Where can I view the user who has asked the most questions? Kind of like the leaderboard for most answers.


Are the values within a confidence interval those that do not significantly differ from the point estimate? Or, put differently, how do we interpret the values contained in a CI given that the CI is just about the coverage rate? EDIT: Notice that this question is not about the formal equivalence of the t-statistic and the CI (i.e., CI's as significance tests) but how to interpret the values contained in an observed interval.

It is well known that confidence intervals and testing statistical hypothesis are strongly related. My questions is focused on comparison of means for two groups based on a numerical variable. Let's assume that such hypothesis is tested using t-test. On the other side, one can compute confidence intervals for means of both groups. Is there any relation between overlapping of confidence intervals and the rejection of the null hypothesis that means are equal (in favor of the alternative that means differ - two-sided test)? For example, a test could reject the null hypothesis iff the confidence intervals do not overlap.


need help on this Example to select first 5 items from the below list nums = [10, 20, 30, 40, 50, 60, 70, 80, 90] nums[:5] output = [10, 20, 30, 40, 50]  If I want my output like below. Expected output = [10,20,60,70,90] Please let me know how to achieve this. I am trying something like this nums[:1,5:6,8] nums[0,1,5,6,8]

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Evaluating the function $S(a) = \sum_{n=0}^{\infty} a^n \binom{2n}{n}$.   The first thing that I noticed is that $S(a)$ converges when $a \in [-\frac{1}{4}, \frac{1}{4})$ because $$   \binom{2n}{n} \sim \frac{4^n}{\sqrt{\pi n}}. $$  However, this does not help me actually find $S(a)$. Furthermore, various strategies such as telescoping and DuSS (differentiation under the summation sign) have been foiled by the pesky binomial coefficient. If we switch to the Gamma function, DuSS is possible but extremely messy. I'm wondering what approach I should utilize in order to find an expression for $S(a)$ in terms of elementary functions.

I'd like to determine the function corresponding to the following power series: $$x + \sum_{n=1}^\infty (-1)^n\frac{1\cdot3\cdot5\cdots(2n-1)}{2\cdot4\cdot6\cdots2n} \frac{x^{2n+1}}{2n+1}, $$ where $|x|<1$.


I have been having some trouble with this script that I created. Ideally, I would like to query between to a layer file and feature class to find certain features in the class withing a certain distance from the layer file.  Then take certain attributes from those selections and store them in a python dictionary which will be converted into a JSON format and uploaded as a geoprocessing service.  I have excluded the remaining code because this bulk is what seems to be dis-functioning.  As a standalone script, it works fine and gives me the information intended. As a service -- here is the error received     import arcpy import sys, os import json   arcpy.env.overwriteOutput = True segid = arcpy.GetParameter(0)                                                                                connection1 = r'Database Connections\DDOTLRS as LRSVIEWER.sde' connection2 = r"Database Connections\Connection to DDOTGIS as DDOTEDITOR.sde" supports = os.path.join(connection2, 'TOA.Supports')                                                                                def getFeatureOIDsNearSeg(selectthesefeatures = None, segid = None , distance=150):     '''  Function to spatially query for features within a certain distance of a street segment.     user has option to provide distance '''                                                                                streetsegs = os.path.join(connection1,'Ddotlrs.RH.LRSE_StreetSegment')                         streetsegs_lyr = "streetsegs_lyr"                                                                   selectthesefeatures_lyr = "selectthesefeatures_lyr"   try:     arcpy.MakeFeatureLayer_management(streetsegs, streetsegs_lyr, "STREETSEGID = " + str(segid)) #only selecting this block street seg ID except ValueError:     print "Error.  Cannot find this StreetSeg ID.  Check ID or source (currently set to {0})".format(segid)  try:     arcpy.SelectLayerByLocation_management(in_layer=selectthesefeatures_lyr,                                            overlap_type="WITHIN_A_DISTANCE",                                            select_features=streetsegs_lyr,                                            search_distance=str(distance) + " FEET",                                            selection_type="NEW_SELECTION")     #need to find out what was selected...     selectthesefeatures_lyr_sel_desc = arcpy.Describe(selectthesefeatures_lyr)     selectthesefeatures_lyr_sel_FIDS = selectthesefeatures_lyr_sel_desc.FIDset.split(";")     selectthesefeatures_selected = ','.join(map(str, selectthesefeatures_lyr_sel_FIDS)) #capture all the IDs for the selected supports     OIDs = "OBJECTID in ( " + selectthesefeatures_selected + ")"     return OIDs except ValueError:     print "Error.  Problem selecting supports along this segment {0}.".format(segid) return OIDs

I am publishing a geoprocessing service on ArcGIS Server v10.3.0 that updates data on an ArcSDE Enterprise Geodatabase.  I have the following at the beginning of my script:  arcpy.env.workspace = "Database Connections/TestDatabase@hq-gissql01.sde"   As discussed at , when I publish the script as a geoprocessing service, that line gets changed to:  arcpy.env.workspace = arcpy.env.packageWorkspace   This is all well and good, but arcpy.env.packageWorkspace is simply the v101 folder for this geoprocessing task. It is not the actual .SDE connection file. I can confirm that the .SDE connection file does get moved to the v101 folder, but arcpy.env.packageWorkspace is simply a file path to the v101 folder--not that file.  Because of this, when I call arcpy.ListFeatureClasses() or arcpy.ListDatasets(), an empty list gets returned. From what I can tell this is because the workspace is set to a folder on the server's file system, and not an .SDE file.  How are .py files being re-written when they are published as geoprocessing services? What is the proper syntax to use when setting the workspace so that the published version of the script references an .SDE file and not simply a file folder?


i'm new to php password hashing since i'm also a beginner in php coding. I was able to make a simple login form, it requires a username and password. This password will then be saved to a database by Inserting into table using $_POST['password']. However i read that this is unsafe because its a plain text, you need to hash it.   I tried researching about password hashing in php. i found several write-ups but most of it are not clear for a beginner like me. Though i got some basic ideas but can't think on how to implement it.  Some of my questions: 1. How do I hash the password inputted by the user? 2. Once it is hashed, how do i pass it and save it to my database? 3. Is the password will then be saved as a hash (not plain text) in my database? if so, do i need to extend field length in my database to accommodate long hash passwords?  Those are some of my queries which is obviously from a beginner. I hope someone would enlighten me or show me where to start. I prefer basics so that I can comprehend.   Thank you very much!  EDIT: ok found some answers on the link provided. Thanks for tagging it as duplicate and i'm sorry for that. cheers!!

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


Is it possible to send an email to a newly created community user for them to reset their password and once successfully reset and logged-in they will be redirected to a particular community link. I would like to achieve this using APEX. Flow:  They receive mail with newly created username and link to reset password. They click on it,resets the password successfully and logs in. Redirected to custom link that looks something like this 'https://companycommunity.com/s/custompage?para1=abc&param2=efg' . This link will have different parameters for different customers.  From what I researched I can use Site.createPortalUser(user, accountId, password, sendEmailConfirmation) and System.resetpassword() can help but I cannot find a way to make the link redirect after logging in. Thanks for the help.

I have set up a Customer Community with Self-Registration. I am having users register without setting a password. They receive the "Welcome Email" after self-registration.  The email has a link for the user to set their password.  After they set their password, the user is redirected to a Visualforce Page- how do I set this to an Experience Builder Page? I am not using Visualforce pages for my community.  The page that is being displayed is set in Administration -> Sites & Domains -> Custom URLs, then click the field under "Site Label" with Site Type = "Community" (Note clicking this when Type = Site.com Community returns a bad URL...  Now "Active Site Homepage" is a Visualforce Page, and that is all that's selectable (Not sure how this influences Experience Builder Page, however, removing access to certain Visualforce Pages under the related list: Site Visualforce Pages removes access to Experience Builder Pages for no documented reason?  For reference:


Can a Bard use Glyph of Warding even though they do not "prepare" spells?   In looking at the reasonable boundaries of using Glyph of Warding in the game, I came across a dilemma in the wording of the spell when it comes to classes that do not have "prepared spells", but have "known spells instead.   Glyph of Warding says that "you can store a prepared spell", however this wording becomes an issue when interpreting whether a Bard can or cannot use this spell.   A bard does not per se "prepare" their spells. Yet, the spell is listed in the Bard Spells section in the Player's Handbook (p.207). Hrumpf! It is listed as a Bard spell which normally suggest that it is intended to be used by a Bard as part of their magical repertoire, but the wording needs clarification.   So, for the purposes of interpreting the wording in Glyph of Warding, can we equate "prepared spell" with "known spell", which would mean the Bard can actually use this spell?      Spell Glyph. You can store a prepared spell of 3rd level or lower in the glyph by casting it as part of creating the glyph. The spell   must target a single creature or an area. The spell being stored has   no immediate effect when cast in this way. When the glyph is   triggered, the stored spell is cast. If the spell has a target, it   targets the creature that triggered the glyph. If the spell affects an   area, the area is centered on that creature. If the spell summons   hostile creatures or creates harmful objects or traps, they appear as   close as possible to the intruder and attack it. If the spell requires   concentration, it lasts until the end of its full duration.  (PHB   p.245)   Special thanks to BBeast for kindly mentioning this issue in his answer to:

If you read the description of the "Spell Glyph" option of the  spell, it says you cast a spell that you have prepared into the glyph. Bards can learn this spell, but they don't prepare spells; they learn them.  Can a bard cast a spell that has been learned (rather then prepared) into a Glyph of Warding?


I know that $A_5$ is simple. But how do I tell which even conjugacy classes of $S_5$ split into two conjugacy classes of alternating permutations. When we know that $A_5$ is normal and normal subgroup is a disjoint union of conjugacy classes.

Suppose $n$ is a non negative integer $\geq 4$ and $\sigma\in S_n$ a permutation. Conjugacy classes in $S_n$ are completley determined by the cycle structure of $\sigma$. If we let the alternating group $A_n$.act on $S_n$ by conjugation, the orbits coincide with the conjugacy classes in $S_n$ except for those (even) permutations whose cycle structure is composed of even cycles (which corresponds to cycles of uneven length) of distinct order (fixed points are treated as cycles of length $1$.) See   For instance a $3$-cycle in $A_4$ has cycle structure $[3,1]$ which fits the bill, and a $5$-cycle in $A_5$ or $A_6$ works too, since the cycle structure is $[5]$ and $[5,1]$ respectively. On the other hand, a $3$-cycle in $A_5$ will does not satisfy the criteria as it has cycle structure $[3,1,1]$ with two fixed points.  In this case, the conjugacy class of $\sigma$ inside $S_n$ splits in $2$ orbits of the conjugation action of $A_n$, and if $\tau$ is any odd permutation, for instance $(12)$, then we have $$\mathrm{Conj}_{S_n}(\sigma)=\mathcal{O}(\sigma)\coprod\mathcal{O}(\tau\sigma\tau^{-1})$$  My question is How can we differentiate between the two orbits? Does it have geometric meaning?    I can see that this information can be useful when looking at representations of the alternating groups, since there are as many irreducible representations as conjugacy classes. As for some geometric interpretation, I ask because there is one for the three cycles in $A_4$. If $S_4$ is understood as the group of symmetries of a regular tetrahedron, then $A_4$ is the subgroup of direct symmetries, and a $3$-cycle corresponds to a rotation of angle $\frac{2\pi}{3}$ or $\frac{4\pi}{3}$ with axis passing through one of the vertices. Conjugacy classes inside $A_n$ preserve the angle, and that's how we can tell them apart. In this case the computations are so simple we don't really need this picture, but I think it is a nice way to understand the fact $3$-cycles in are not all conjugate inside $A_4$...


I have just installed Ubuntu 18.04 LTS and I am unable to manually install GNOME shell extensions downloaded from the official  using the gnome-tweak tool as the option for installing new shell extension is missing in gnome-tweak-tool(which was there in previous versions).   I have installed both gnome-tweak-tool and gnome-shell-extensions by running the following commands,  sudo apt install gnome-tweak-tool sudo apt install gnome-shell-extensions   Is the ordinary procedure has changed in Ubuntu 18.04 LTS? If so, could anyone please specify the new procedures to be followed?

How do I install GNOME Shell extensions?  Is it possible to update, remove and manage the extensions?


Bit new to Java-script so let me explain my problem. I have implemented pagination using Django and using Infinitescroll.js for pagination in Front-end.  Now I want to attach an click-event listener to elements of a class on the page. I can do.  $(".class").on("click",    function(){   alert("1234") });   First page of Pagination is working fine. But for next page the listener is not getting attached. I tried keeping above js in $(document).ready but still it's not working. How can I add listeners to new elements of the same class that are being loaded after pagination. Do I need to put the above code in callback function of the infinitescroll.js?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I'm unsure when a subject is considered plural, and when not.  Especially here:     Williams aim to win at the next race.   Here, Williams is a team, and I have always through this is considered plural, but I'm seeing different uses all over the place. What's the rule there?

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


I love to shoot raw.  I have a desktop with a 20 inch LG HD LED Monitor, and most of my  post-processing is done using DPP (Digital Photo Professional). I also have an HP Compaq 15-s001TU Notebook.  I prefer viewing some of my best photographs on my HP Compaq Notebook, but the photographs look brighter, with richer color and with dynamic contrast in my HP notebook. I also calibrated the brightness/contrast setting with the desktop but it didn't help much.  Why is that?  Is there any solution for this?

I have a pair of pretty nice monitors (HP ZR30w) which I calibrated with a pretty good calibrator (i1-Pro) and after I calibrated both they still show colors every so slightly differently.  My left monitor has a little more magenta color to it in photos.  Is monitor calibration only ment to get things 'close'?  Other people in the office have experienced similar issues with their pairs of monitors, both HP ZR30w and Dell 3007WFP-HC monitors.  If I can't even get colors to match between my two exact same monitors connected to the same computer I have little confidence that colors on my monitors will look the same on somebody else's calibrated monitor :p


I am having a steps in Jenkins pipeline to read my test passing result and fail the  Stage if rate lower than 95%. Here's the code  sh ''' #!/bin/bash -xe                 PASS= `cat index.txt | grep % | tr -d " " | cut -d: -f2 | cut -d% -f1`                 if [[ "$PASS" -ge 95 ]]                 then                     exit 0                 else                     exit 1                 fi             '''   But it constantly gives me an error  16:01:00 + cat index.txt 16:01:00 + grep % 16:01:00 + cut -d% -f1 16:01:00 + tr -d   16:01:00 + cut -d: -f2 16:01:00 + PASS= 100 16:01:00 /home/xxxx/script.sh: 100: not found   What's happened? Anyone could help? Thanks

What is the difference between below variables assignments?   var=23 var =23 var= 23 var = 23   Is there any difference in space around the assignment operator?


I have just installed Ubuntu 16.04. The problem is that it cannot find a way to get a wireless connection. In All Settings > Network I see only Wired and Network proxy, so I guess Ubuntu does not recognize any wireless card or at least does not have the right drivers to use it properly.  Here is some information from the terminal:  sudo lshw -class network:   *-network DISABLED           description: Wireless interface               product: Wireless 7265                    vendor: Intel Corporation               physical id: 0                    bus info: pci@0000:01:00.0            logical name: wlo1            version: 61            width: 64 bits            clock: 33MHz            capabilities: pm msi pciexpress bus_master cap_list            configuration: broadcast=yes driver=iwlwifi <   driverversion=4.8.0-36-generic firmware=22.361476.0 latency=0 link=no multicast=yes wireless=IEEE 802.11           resources: irq:281 memory:b1100000-b1101fff   UPDATE  $ rfkill list all  0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 2: acer-wireless: Wireless LAN     Soft blocked: yes     Hard blocked: no   It works perfectly if I tether with USB, but it doesn't recognize any wifi connection. I have probably missed something.

I use a Asus laptop with dual-boot Ubuntu and Windows 8.1  Wifi is on but I am not able to detect Wifi networks.  When I run :  lspci -knn | grep Net -A3; rfkill list   This is what happens:    I get  acer-wireless: Wireless LAN     Soft blocked: yes


I have successive hooks to an action which are passed an associative array like: do_action($array)  I am trying to update the values in this array in the multiple add_action calls, however each add_action is getting a copy of the passed array, not a reference.  How do I pass a reference? I am using PHP 5.

I am having trouble wrapping my head around these two functions. I understand do_action() but I don't see clearly when  would be useful. Couldn't we pass an array to do_action() as well?


At least Shadow of Chernobyl mixes heavily accented English with Cyrillic speech. I would much rather play in Russian or Ukrainian (whichever can be considered as the original language track) with full English subtitles, like I did with the Metro series.  I don't remember if the game world was ever fully localized (signs, book covers, written words on walls, etc.), but I prefer the Cyrillic alphabet even if no translation can be provided (without mods).

I am Russian myself, and I have, obviously, played S.T.A.L.K.E.R. series in Russian language (the original one). However, I want to share this game with some of my friends who don't speak Russian at all, and I have found out that this game is awfully translated.    It is dubbed in English, not subtitled. IMO, this English dub is of very bad quality, I like the original much more.  At the same time, some lines are not dubbed (and hence not translated at all!), so an English-speaking player wouldn't understand what goes on. I did a quick Google search, it did not yield anything.    I liked that Source games where you could easily turn subtitles on, reading stuff in any language you want, but listening to it as it was originally done.  Any option to do the same with S.T.A.L.K.E.R. series, particularly "Call of Pripyat", so I can reliably advise the game for my non-Russian friends?


I have installed node using sudo apt-get install node.  linux@linux:~$ node -v linux@linux:~$  linux@linux:~$ npm -v 1.3.10 linux@linux:~$    I also download node from  but, I don't find the full installation manual.

I noticed over at the  website that node is currently at v 0.12.0.  Can someone let me know how to install the latest version of node together with npm (terminal commands please)?


In order to combine "nationally" and "top-ranked" would the resulting qualifier be written as "nationally-top-ranked" or "nationally top-ranked"?  Edit: I do not immediately see the applicability of , because that particular question does not address the case of having more than three adjectives that, when written two at a time (two at-a-time?) would be hyphenated (e.g., nationally-ranked, top-ranked).

Some compound words are written without hyphens (nonaggression, nonbeliever), some with hyphens (well-intentioned), and others with spaces (post office).  Is there a rule or good guide as to which option should be used?


$$\int2\sin x\cos x\mathrm dx$$                                                                             $1$:Consider $2\sin x\cos x=\sin(2x)$  Then the integration is $-\frac12\cos(2x)$  $2$: Consider  $2\sin x\cos x=\frac{\mathrm d}{\mathrm dx}\sin^2(x)$ Then the integration is $\sin^2(x)$  If it is true then  $-\frac12\cos(2x)=\sin^2(x)$  then  $-\frac12(1+2\sin^2(x))=\sin^2(x)$,$-\frac12=\sin^2{x}$, $-\frac12=1$

Assume we have:  $$ \int (\cos{x} + \sin{x}\cos{x}) \, dx$$  Two ways to do it:  Use $$\sin{x}\cos{x} = \frac{ \sin{2x} }{2} $$ Then $$ \int \left(\cos{x} + \frac{\sin{2x}}{2} \right) \, dx = \sin{x} - \frac{ \cos{2x} }{ 4 } + C. $$ The other way, just see that $ u = \sin(x), du = \cos(x)dx $, $$ \int ( \cos{x} + \sin{x}\cos{x}) \, dx = \sin{x} + \frac{\sin^2{x}}{2} + C. $$  Now the part I don't see fully is, why aren't these results completely equal?  Taking the 2nd result, \begin{align} \sin{x} + \frac{\sin^2{x}}{2} &= \sin{x} + \frac{1}{2} \, \left( \frac{1 - \cos{2x}}{2} \right) \\ &= \sin{x} + \frac{1}{4} - \frac{\cos{2x}}{4}. \end{align}  So you have to absorb $\frac{1}{4}$ into $C$ for them to be equal.  Shouldn't they be equal straight away?


Is there a word for explaining/acknowledging any other stances or opinions on a topic while still stating your own, and even using the other sides to support the validity of your own opinion? The closest I've gotten so far is "dialectic", but even that doesn't seem quite right. I'm writing an essay in which I compare the usage of this device in a collection of nonfiction articles. I need a literary term describing this that I can refer easily to in writing.  An example sentence would be     After carefully reviewing the provided nonfiction texts, I have ranked the three that I believe exhibit the best usage of _______, or the act of acknowledging multiple stances on an issue rather than just the author’s stance.   The tag says single-word requests, but if you have an accurate multiple-word term for it then that's fine too.

This feeling can often be paralyzing in that you see valid points on either side; makes you not able to choose a side.  Seeing can also be understanding, supporting, taking active part in.  I'm looking for words that don't imply a "Janus"/traitor tone or the ambivalence tone, but the (property of the) process that precedes the paralyzing feeling and whose property is more reminiscent of walking a mile in another man's shoes.  Tag says single-word but multi-word adjectives can be okay. I usually shy away from just adding -y to make adjectives.  Sorry for the vague wording, I'll happily take suggestions on how to word this better. Thanks! :)  Usage: "And above all, I hope __ will become the preferred method to prepare for debate, to: ..."  It's a two-sided process of analysis involving attacks and reconciliations of attacks.  I was hoping for an established academic term for this, but perhaps none exist. I will embrace an inventive new word for this! This is a paper for peer review, so the meaning should be apparent to academics.


1) Let $G=\mathrm{Aut}(\mathbb {Z}_4\times\mathbb {Z}_2)$. Show that $|G|\leq8$ and then $G \cong D_4$.      2) Show that $\mathrm{Aut}(S_3\times \mathbb {Z}_3) \cong S_3\times\mathbb {Z}_2$.   At the moment I was able to do the first part of the first problem. I noticed that $\mathbb {Z}_4\times\mathbb {Z}_2$ has two generators, $(1,0),(0,1)$, so an automorphism $ϕ$ will be fixed if I choose their images. Both $(1,0)$ and $(0,1)$ have order $4$, and I can see that there are only $4$ elements of order $4$, so I only have $4$ elements that can be their images. Because of this facts I have $4$ possibilities for $ϕ((1,0))$, but only $2$ for $ϕ((0,1))$, because it can't be an element of order $4$ that is in the subgroup generated by $ϕ((1,0))$. So $|G|=8$. Is it correct?

How can I compute $\mathrm{Aut}(\mathbb{Z}/4\mathbb{Z}\times\mathbb{Z}/6\mathbb{Z})$?  If $\varphi$ is one of this automorphism then $\varphi((1,0))=(1,0),(1,3),(3,3),(3,0)$ and $\varphi((0,1))=(0,1),(0,5),(2,1),(2,5)$.  So it seems to me that this groups contains 16 elements, am i right? And if I'm right there is a way to understand to which group of cardinality 16 this is isomorphic to?  EDIT: $\mathbb{Z}/4\mathbb{Z}\times\mathbb{Z}/6\mathbb{Z}\cong\mathbb{Z}/8\mathbb{Z}\times\mathbb{Z}/3\mathbb{Z}$. And $\mathbb{Z}/8\mathbb{Z}$ and $\mathbb{Z}/3\mathbb{Z}$ are characteristic (am I right?), so $\mathrm{Aut}(\mathbb{Z}/8\mathbb{Z}\times\mathbb{Z}/3\mathbb{Z})\cong\mathrm{Aut}(\mathbb{Z}/8\mathbb{Z})\times\mathrm{Aut}(\mathbb{Z}/3\mathbb{Z})\cong\mathbb{Z}/8\mathbb{Z}^*\times\mathbb{Z}/3\mathbb{Z}^*$ and this group has cardinality 8, right? Where is my mistake?


Is Space time curvature responsible for gravity or Gravity responsible for the curvature in space-time.

I don't know how to ask this more clearly than in the title.


Can you help me with my problems? i want to make a bootable usb image of a ubuntu system. point is, i want to use a USB (witch you normaly can install ubuntu from) to boot from with some special applications i need. i know you can use a ubuntu stick and click on "try ubuntu" to work from it. only  problem is: you can install some apps to use it. but everytime you power off the pc you need to reinstall it. i want to change or use a backup to make a usable usb like a hirens boot to change the image, so i can use all the tools i need without reinstalling it every single time. i've been stuck for some months now. can anybody help? im not much of a programmer, although im learning it. anybody have an idea or who can help me to achieve my goal. Also i already used squashfs files to edit it, but im not reallly understanding what i have to change. you can mount en unsquash the filesystem. and edit that, but it havent been succesfull for me. it didnt work everytime i tried just to be clear again, goal: create my own bootable ubuntu from an USB, with special application/tools of my or your (if anybody else wanna use it) needs. I hope you guys/gals can help me. S. Stratmann

After considerable review of the options, I tried and failed to create a usable live Ubuntu USB with persistent storage using what seemed like "best practice" instructions at  I suspect I'm one step away from a full solution, but I need help.  I reviewed answers on AskUbuntu and other places before starting, including many responses by @C.S.Cameron and @sudodus. Answers for OS versions earlier than 18.04 are now of uncertain value for running 18.04 or later due to various issues. Hence I opted to follow the comprehensive and recent instructions at the URL above.   After following the instructions, I seem to have a USB drive formatted by mkusb as predicted. When I attempt to boot, the BIOS/UEFI process identifies the USB stick as a possible boot location, but when I select it for booting and proceed, I am returned to the same screen for choosing a boot location. For some reason, the USB stick is rejected as a viable boot option. I have tried the process 3-4 times using 2 iso images (18.04LTS and 19.10) and 2 USB sticks (Sandisk Extreme 64GB and Sandisk Cruzer Facet 16GB). Below are links to two screenshots of GParted analysis of the resulting USB sticks.


In hypothesis tests, we typically have that the null/alternative hypothesis are typically defined as $H_0 : \mu = \mu_0$ and $H_1: \mu \neq \mu_0$ for a two-tailed test or $H_0 : \mu \geq \mu_0$ and $H_1: \mu < \mu_0$ for a one-tailed test, for some population parameter $\mu$. My question is if there is a difference in power for testing instead $H_0 : \mu \neq \mu_0$ and $H_1: \mu = \mu_0$ for a two-tailed test or $H_0 : \mu < \mu_0$ and $H_1: \mu \geq \mu_0$ for a one-tailed test. Essentially, I fail to see why there is always an equality at a point value within the null. I have read that it is because the conditions stated under the null are of more interest to us, or that the distribution induced under the null is easier to compute. Does anyone have any idea what is the main reason an equality sign is usually included in the null?

Using the inference of mean as an example, the null and alternative hypothesis could be  $$H_0: \mu \le 0 \Leftrightarrow H_1: \mu > 0$$  It is often argued that this makes the calculation of the $p$-value (or critical region) easier, but from my understanding the $p$-value is $P(\bar{X} > 0|H_0) \stackrel{\color{red}{?}}{=} \sup_{\theta \in H_0} P(\bar{X} > 0 | \theta )$. Since I'm taking its supremum, the $p$-value doesn't change regardless of whether the equality sign is included. The same result goes for the critical region. However, I'm not sure if my understanding is correct, and my doubt is marked with a red question mark above.  Anyway, I wonder if it's correct (I know that would be unconventional, though) to write  $$H_0: \mu < 0 \Leftrightarrow H_1: \mu \ge 0$$  If that's OK, what about its $p$-value and critical region? If that's not OK, I would be really surprised, because in that way we are changing the question ("Is $\mu$ less than or equal to zero?") to something different ("Is $\mu$ less than zero?")


When I reset my password and tried to log in, it won't log in. It is just saying invalid username or password.

We just got a new laptop (ASUS) though we did have a mac.  We are trying to log onto Mojang to download Minecraft and it keeps saying, "The username and password are not recognized."   We have done all the usual procedures; we have reset the password, we are using the email, not the username to sign in, and it looks like the minecraft login servers are working etc. etc.  We quit Minecraft on the old computer and shut off that computer thinking that was the issue.   Still, we can't get onto Mojang.  We are accessing mincraft through firefox and trying to download it to the new computer but we can't get into the account to do that!  What in the world could be the issue?


My phone was stolen and I called but they obvioulsy had taken out the sim.They've logged out all my google accounts,twitter,facebook,viber and I'm thinking that  they did a factory reset!Is there anyway I can track my phone?It was a sony xperia m

I assume any reasonable thief will wipe the phone as soon as possible, thus removing any tracking apps and user accounts.  I there a method to track the phone any way?  A possible method is to use a tracking app (and it's configuration) that's embedded in a custom ROM.


I tried asking this in the Unix & Linux stackexchange, but this may be a better place.  I have been trying to install some Gnome extensions from the site https://extensions.gnome.org. I get the dialogue asking if I want to install, but after I select yes, it fails silently. This is the behavior using either Firefox or Chromium. I have checked to make sure the Gnome Shell Integration plugin is installed and enabled for both Chromium and Firefox.  My operating system in Ubuntu 12.10, and my version of Gnome is 3.6.3.1. I have made sure (using sudo apt-get update) that everything is up-to-date. I have tried restarting, but to no avail. What am I doing wrong, and how do I fix this (or what is a good workaround)?  NOTE: I have the gnome-tweak-tool installed, and it does not show any extensions as installed. There is nothing happening after I confirm that I want to to download the extension.  EDIT: Extensions are now working. I do not know why. Maybe it was restarting. I will mark the below answer as accepted because it gives good information that may help others. I would suggested to anyone in my position just making sure everything is up-to-date, restarting, and then checking every so often to see if it is working.

I am running Ubuntu GNOME and would like to know how exactly I can install, uninstall, upgrade, deactivate, and activate GNOME Shell Extensions.


Heroes such as Superman and Cyclops can produce lasers from their eyes (typically red). But I'm wondering what exactly do they see when their abilities are active. My guesses are:   A black void/complete whiteness (unlikely as they wouldn't be able to aim). They don't actually see the lasers produced, but they feel their effect and can thus easily focus it. A colorful overlay with the laser's color overlaps the entirety of their view.   So far I've not found evidence to support any of these. In fact I can't seem to find any medium where we have a character project beams from their eyes in first person.  EDIT: Just to clarify why this is different than the question exclusively regarding Superman's vision. Superman's ability is officially called "heat vision", and there's an implication that it's not even visible to other people, but is drawn simply to show readers. This is usually how it's depicted in older comics, and the only reason I'm even mentioning Superman in my post is because in modern comics he projects full red lasers, including in the movie, which are definitely visible to the naked eye.

I've always wanted to know if he can see while he's using his heat vision, and if he can, what does it look like, is everything red, does his vision spectrum change?   Have we ever seen through his eyes while he was using his heat vision?


Could you help me with this question? I have some difficulties to answer it. The question is from the PIC24FJ128GC010 family datasheet and after some research I just know the meaning of the different values :  IRNG value means that the internal  currentsource must be set for 5.5 μA PVCFG (Converter Voltage Reference Configuration for ADREF+ bits) is on VREF+ NVCFG0 (Converter Voltage Reference Configuration for ADREF- bit) is on AVSS  Maybe we should use this formula : Tdie = 710 mV – Vdiode / 1.8 (indicates on the datasheet) But I don't know how to make the conversion result.

Could you help me with this question? I have some difficulties to answer it. The question is from the PIC24FJ128GC010 family datasheet and after some research I just know the meaning of the different values :  SDGAIN value is that the S/D Gain Control bits equal to 2. SDREFP ( S/D Positive Reference Source Select bit) is on SVref+ pin. SDREFN (S/D Negative Reference Source Select bit) is on SVSS pin.  EDIT : The reference voltage source pin is VREF+, so we need to know this voltage. And the answer that can be eliminated is the one that mentions SVDD. But I still don't know how to make the conversion result.


This is the contents of my crontab file:  0 0,6,12,18 * * * cd /var/www/app/current && backup perform --trigger db_backup --config_file config/backup.rb --data-path db --log-path log --tmp-path tmp >> /var/www/app/current/log/cron.log 2>&1  0 3 * * * cd /var/www/app/current && RAILS_ENV=production bundle exec rake runs:populate --silent >> /var/www/app/current/log/cron.log 2>&1  59 23 * * * cd /var/www/app/current && RAILS_ENV=production bundle exec rake runs:log --silent >> /var/www/app/current/log/cron.log 2>&1   If I run any of these manually as the owner of the crontab they work fine, but the cron.log file simply contains:  /bin/sh: bundle: not found /bin/sh: backup: not found /bin/sh: bundle: not found   I tried wrapping each one in the following (as default by the  which I'm using to manage my cron file) bash -l -c '...' but then I get the same as above except for bash bash: bundle: command not found

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


One of the Facebook apps I wanted to install had a list of permissions it asked to have grante. One of the permissions is my list of friends, which I refused. It seems the list is public.  How do I make it private?

I don't want the entire world to see who I am friends with on Facebook.  How do I control who can see my list of friends?


How to compile quickly without continously having to type the whole story of -wall -werror and all those other flags. I know how to use them, but it is a little bit of annoying if I have to type it again and again. Maybe this is asked before, but I couldn't find it.

I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But as far as I know this is a temporary alias and it lives until you close the terminal.  As it is explained  to save alias permanently I need to execute ~/.bash_aliases or ~/.bashrc commands in terminal and add my alias there. But when I execute ~/.bashrc I get following error message :  bash: /home/bakhtiyor/.bashrc: Permission denied   When I run ~/.bash_aliases I get another error message like this:  bash: /home/bakhtiyor/.bash_aliases: File or directory doesn't exist.   What is the actual problem and how can I solve it?


I have a system with Linux Mint and Windows 10 installed on it. My Windows 10 side has the boot drive on a 60gb partition of a 120gb SSD, with the data drive on a 1TB HDD (this has all my data on it). My Mint side also has the boot drive on a 60gb partition of a 120gb SSD, with the /home partition on a different 1TB HDD (the data on this one can be deleted). I need to replace Mint with Ubuntu, but I want to make sure I don't overwrite my data on Windows 10 data drive. Last time I did this  I guessed and picked the wrong one and lost some files, and I don't want that to happen again. Is there a way I can differentiate between the two hard drives?

I am using xubuntu 14.04. I need to know the manufacturer name of the internal hard drive or similar information.   For example when using windows we can see the manufacturer information of the hard drives and other devices in the device manager. Is something similar available in Ubuntu for hard drives ?


This is a hypothetical question, but I am assuming that if there is a research field out there that has not been discovered, it will, in theory, be possible for an article to be written without containing any references.  The reason I ask this question is because I see that a good number of published articles seem to cite other works just to cite them and less often is it the case that the cited works add anything to the paper.

I (an undergrad) and 2 other profs from my department have been working on something and we were thinking of submitting our work to a conference (a pretty well known one) this week. The fact is there is no related work that has been done on the problem we are solving and therefore there is no paper which we can cite as a starting point for our work. The only existing things that we make use of are trivial definitions from mathematics (like Riemann Integral) and also definitions that are pretty well known in my area (CS). So again, we do not think there is a need to cite any particular papers for that.   Now my question as stated was - is it acceptable to have a paper with no references? Or do you think we should just mention some papers (we never had to use them) where those definitions were actually proposed?  PS: I'm sure some of you might suggest me to ask those profs. But quite frankly none of them have much experience as far as publishing papers is concerned. So it would be great if some one could give me a good advice and help me out.   Edit: Thanks everyone for the answers. Of course somewhere a little sarcastic and ridiculing, but I can understand since this is a little weird. Actually yes, I had the notion that a paper wasn't worth citing unless I use some results from it (say an algo or some theorem). But I guess that isn't the only reason why I should be referencing as many seem to suggest here. The fact is we had seen quite a few survey papers before we started this out and I was under the impression that there wasn't a need to cite them since anyone could find them. But now, things are bit more clear and I guess I should cite them and I will :)


When I closely look at the side of one of my fingers with one eye, I see:    From a closer distance, it somewhat looks like this:    The white-gray lines (in fact their color is also cream) are much narrower in reality (I can very hardly see the second one). I have doubt whether this is the result of a diffraction (my eye pupil playing the role of a small hole or slit) or the result of some sort of parallax caused by the diameter of the pupil (which is about 6mm).  Things get more complicated when I hold two of my fingers close to each other, then I see:    With a closer look, it's like:    In fact only the middle line can be seen properly if the fingers aren't close enough to my eye. Some say that this is the result of interference (the space between fingers playing the role of a narrow slit); but it seems like this has something to do with the lines of each finger (photo #1) like the lines of each finger somehow add up, like in the photo below for the diffracted light of two stars:

If you take a close look at one of your fingers with one eye, it’s like your finger has an atmosphere with several layers(!):    Now get two of your fingers so close that their atmospheres touch, you see a bridge connecting them that gets wider the more the atmospheres pass through each other


I tried to read this article, but i didn't understand:   Can someone give an easy example with numbers to see how intersection points of lines in 3D-Space are calculated?  Lets say, there is a line described as two vectors for the start and end position:  Line1Start = (-1, 0, -1) Line1End =   (1, 0, 1)  Line2Start = (-1, 0, 1) Line2End = (1, 0, -1)  I know that on a cartesian coordinate system, the intersection point would be at (0, 0, 0). How is the formula applied in my case?

Given two lines joining A,B and C, D in 3D how do I figure out if they intersect, where they intersect and the ratio along AB at which the intersection happens?  I can quite hapilly work out the equation for the lines in different forms. I'm guessing that you need to change them to parametric form, equate the equations and do some algebra manipulation


I have two PC with putty in each an do login to same host. In first case I have nice color files and dirs:    While second PC has only black&white view:    How to make second putty colorful?

I'm currently using Debian 7 Wheezy, and I've noticed that the colors palette on terminal (which might be useful to identify among a large set of files and folders) are not enabled once I log as root.  Same, I've noticed the tab completion doesn't work the same in this situation.  How can I configure these issues?


I have created a quiz in javascript and I am using HTML forms to present it. I have verifed all of the users answers with if statements and if they get it either right or wrong a prompt box pops up to ask if they want to try again. When they say yes the quiz starts again but when they say no nothing happens and I would like it to automatically redirect itself to my homepage. Does anyone know how to do that? My website is not on a server it needs to be able to run off a CD or a USB.

How can I redirect the user from one page to another using jQuery or pure JavaScript?


How to show that for any real numbers $\{a_n\}$ if $a_n\to 0$, then $\frac{a_1+\dots+a_n} {n}\to 0$.  I am a beginner to learn real analysis. Can any one give some suggestion?  Thank you!

I have this problem I'm working on. Hints are much appreciated (I don't want complete proof):  In a normed vector space, if $ x_n \longrightarrow x $ then  $ z_n = \frac{x_1 + \dots +x_n}{n} \longrightarrow x $   I've been trying adding and subtracting inside the norm... but I don't seem to get anywhere.  Thanks!


By the definition of a group, "A group is a set combined with a binary operation".  By this definition, would a non-empty set constitute as being a group? By virtue of the definition of what a group is, a non-empty should constitute as being a group.  Can someone confirm?

I know that a set G with a binary operation $*$ is a group, if:   $a*b\in G$, for all $a, b \in G$. $*$ is associative:   $$(a*b)*c=a*(b*c) \\ \text{for all }a, b, c\in G.$$   An identity element $e \in G$ exists, such that   $$a*e = e*a = a\\ \text{for all }a\in G.$$   For all elements $a \in G$, there exists an $a^{-1} \in G$, such that:   $$a*a^{-1} = a^{-1}*a=e.$$  Can I use that to show that the empty set is a group?


I am reading two columns of values out of a .csv file a line at a time, which yields a list of row entries made up of two strings (something like ['cat1', 'dog1'])  When I iterate over all the rows I extracted I try to put all the "cats" in one list and "dogs" in another, kind of like this:  for row in csv_file_entries:     catlist.extend(row[0])     doglist.extend(row[1])   I expect doglist to be:   ['dog1', 'dog2', 'dog3', 'dog4', ..., dogN]  but instead I get   ['d', 'o', 'g', '1', ' ', 'c', 'a', 't', '1', ' ', ...] ETC  I suspect when I find out why the characters are the list elements instead of the strings I will also figure out why the cats and dogs are in the same list, even though the row elements 0 are dogs and row elements 1 are cats.  My actual code, with silly debug statements is below:  # get csv file containing digitized EOT data # first column is day of year, second is EOT minutes # taken from US Naval Obs site and digitized with web digitizer program fname = 'C:\\time_calculator\\EOT.csv' dtzd_DOY = dtzd_EOT = [] print("tarrtart", dtzd_DOY) with open(fname, 'rt') as csvfile:     eot_entries = csv.reader(csvfile, delimiter=',') #    print(eot_entries)     print("pooooty", dtzd_DOY, dtzd_EOT)     for row in eot_entries:         print(row, row[0], row[1])         thisDOY = row[0]         thisEOT = row[1]         print(thisDOY)         print(thisEOT) #        thisEOT = "heychittyfgfgfttrgrtfgrt"         dtzd_DOY.extend(thisDOY)         dtzd_EOT.extend(thisEOT) print(dtzd_DOY, dtzd_EOT)   This is my first question, so don't feel bad about correcting my form.

What's the difference between the list methods append() and extend()?


First, I would like to know if I can install the Cinnamon DE without messing up Ubuntu GNOME.   Second, I would like to know how to install the Cinnamon DE.  Lastly, I would like to know how I would access Cinnamon after installing.

I have read that there is a new Gnome-2 like interface called Cinnamon produced by the Linux Mint developers.  Is this available for Ubuntu users - and if so how do I install it?


Is there a particular term for making a statement while explicitly denying ownership of the statement? Sometimes this is followed up by an appeal to another party to validate the truth of the statement. We've probably heard this a lot recently. For example:  "I'm not saying she's a crook..."

Topical example:  'There was a scuffle outside the local pub. There appears to be no connection with religious extremists.'  ...but now you're wondering if there was. It's a nasty tactic used to raise fear and doubt - deliberately calling attention to something by explicitly denying it.  What's the term for this?


My question is about the 'general force' of gravity derived on this article (assuming the external shell theorem, Newton's three laws and that gravitational forces are central apply no torque, as evidenced by Kepler's second law). I have been trying to understand the mathematical proof of this to no avail. My attempt involved plugging a general $F(s)$ instead of $\frac{GMm}{s^2}$ in the proof shown below and equating the total force to $F(s)$, but I don't think this yields anything very useful because I need to solve  $$\int_{r-R}^{R+r} (r^2-R^2 +s^2) f(s)\ ds = 4r^2Rf(r)$$  for the function $f(s)$ and I'm not sure if this can actually be done. (The variable values are the same as defined in the link below, although $R-r$ and $R+r$ may be swapped for any positive constants). If we obtain the correct solution however, $f(s)=\frac{1}{s^2} + ks$, where $k$ is any positive constant.    I don't really follow the equation (4) given in the citation below either, which supposedly proves this fact:   Any heuristic explanation or approach to this proof would be helpful

The shell theorem states that a spherically symmetric body $S$ of mass $m$ has a gravitational field identical to that of a point particle $P$ of mass $m$ located at the center of $S$.  We can ask the converse question: suppose there is a force $F$ between masses $M$ and $m$, separated by a distance $r$ of the form $$F = M m f ( r )$$  such that any spherically symmetric body affects external bodies as if its mass were concentrated at its center. Then what form can the function $f$ take?  According to Wikipedia: , the general solution is   $$f(r)=a/r^2+br$$  where $a$ and $b$ are constants.   I attempted to demonstrate this. Replacing the gravitational force with the general force $F=Mmf(r)$ in the calculations to prove the shell theorem, I got that for all distances $r \ge R > 0$, $f$ satisfies:  $$\int_{r-R}^{R+r} (r^2-R^2 +s^2) f(s)\ ds = 4r^2Rf(r).$$  We can take the second derivative of both sides with respect to $r$ to get rid of the integral (we'll need to differentiate inside the integral), and we get the following nasty differential equation:  $$2Rrf''(r)+6Rf'(r)=f'(r+R)(r+R)+2f(r+R)-f'(r-R)(r-R)-2f(r-R).$$  I don't think this really helps. We can easily verify that $f=ar^2+br$ is a solution of this equation, so I didn't make any mistakes thus far (note the equation is linear so it suffices to check it for $f=r$ and $f=1/r^2$).  So how can we demonstrate the result?


I've started to do some reviews this week. Since then I observed that sometimes without doing anything the I'm Done button was available. I had this bug quite regularly, maybe in every second audit.  If this occurs it is quite obvious that an audit is occurring and one should do anything. Either upvoting for good posts or flagging/downvoting for bad contributions. Clicking I'm Done fails the audit.  See for example:

I was recently presented with  of an accepted answer that looked fine to me. Without any action on my side, the "I'm done" button was available. I assumed this was due to the answer being accepted (I haven't encountered this situation before) and I considered it worth clicking.     Fail.   So there are basically two bugs here:   the "I'm done" button shouldn't have been available since I didn't do anything Since I didn't downvote, flag or comment, the audit shouldn't have failed


I have this unknown item in my Login Items  How can i view what this is? Not looking to remove just want to know what exact it is

In my Login Items on Mac OS 10.11.3 I see an item called "Documents". The Kind is specified as "unknown" and there is a yellow warning sign at the end of the line.   No further information is shown when I hover or click the warning sign or the item. I checked the loginwindow.plist, but couldn't see anything relating to the item in question.  I don't want to .   Does anyone know what this item is supposed to do and how I could further inquire what is wrong with it?


I can't boot Windows XP after installing Ubuntu 12.04 and what is worst is that I don't have the Windows XP installation CD.  kathy@kathy-HP-Compaq:~$ sudo fdisk -l [sudo] password for kathy:   Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xc51bc51b     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *          63    41957999    20978968+   7  HPFS/NTFS/exFAT /dev/sda2        41958061   156301311    57171625+   f  W95 Ext'd (LBA) /dev/sda5        41958063   101887679    29964808+   7  HPFS/NTFS/exFAT /dev/sda6       154224640   156301311     1038336   82  Linux swap / Solaris /dev/sda7       101888000   154222591    26167296   83  Linux  Partition table entries are not in disk order  Disk /dev/mapper/cryptswap1: 1063 MB, 1063256064 bytes 255 heads, 63 sectors/track, 129 cylinders, total 2076672 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x693811c2  Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table   please teach me how to do this things cuz i got limited knowledge in computer teach me like u teach your little sister.

I installed Ubuntu and after the installation, i can't boot to XP. When i choose XP from the Grub menu, I got black screen for like 30 sec, and then it returns to the Grub menu.  Thanks!


Sometimes a figure I want to place at the bottom of a page is placed on the next page regardless of the available space. I, finally, did some testing and realized that the height of a figure may not be more than 25% of the \textheight for it to be placed at the bottom. And, at least in my tests, it may not exceed 65% of the \textheight to be placed at the top. UPDATE: As described by the comments and the linked explanation of the placing algorithm in most cases adding ! to the positioning parameters should solve the problem. Following a working example with bottom positioning and a page of follow-up text: \documentclass{article} \usepackage{graphicx} \usepackage{lipsum} \begin{document}  Some text here.  \begin{figure}[!b]% \includegraphics[draft, height=0.40\textheight, width=0.6\columnwidth]{example-image}% \centering \caption{Relaxing constraints with !, this figure (40\% textheight)      will be placed at the bottom, too.}% \label{}% \end{figure}  \lipsum[1-5]  \end{document}   However, in my original document, the text and figure is followed by a minipage which does not fit into the same page and needs to be placed on the next page (in fact, it is a rather lengthy lstlisting which I don't want to break up). Adding such a minipage to the above code yields strange behavior. The figure is placed on the first page but not at the bottom. Instead it seems to behave as if the h positioning has been used: \documentclass{article} \usepackage{graphicx} \usepackage{lipsum} \begin{document}  Some text here.  \begin{figure}[!b]% \includegraphics[draft, height=0.40\textheight, width=0.6\columnwidth]{example-image}% \centering \caption{Relaxing constraints with !, this figure (40\% textheight)      will be placed at the bottom, too.}% \end{figure}  \begin{minipage}{\linewidth} \lipsum[1-5] \end{minipage}  \end{document}   The same behavior can be observed when I add the text without a minipage but trigger a pagebreak before the lipsum. I assume minipage may introduce a pagebreak or equivalent if it doesn't fit onto a page. Last but not least, a clearpage before the minipage solves the problem and places the figure at the bottom while, as far as I understand the algorithm, a figure may only be placed on subsequent pages when the layouter reaches a clearpage: \documentclass{article} \usepackage{graphicx} \usepackage{lipsum} \begin{document}  Some text here.  \begin{figure}[!b]% \includegraphics[draft, height=0.40\textheight, width=0.6\columnwidth]{example-image}% \centering \caption{Relaxing constraints with !, this figure (40\% textheight)      will be placed at the bottom, too.}% \label{}% \end{figure}  \clearpage \begin{minipage}{\linewidth} \lipsum[1-5] \end{minipage}  \end{document}   I love such corner cases as I constantly seem to run into them in every aspect of my life. Maybe someone can explain what happens here and how to deal with the situation in a way which does not fall back on you ten pages later in the document ;) Best wishes, Stefan

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


In total how many blood types are there?  And why do people normally know only 8 of them? (A+, B+ , AB+ and O+ and Rh- counterparts)

Human blood groups are of 4 types with negative and positive of each types . But according to  there are some other types too:     A+,A-,B+,B-,O+,O-,AB+,AB-,A1+,A1-,A2+,A2-,A1B+,A1B-,A2B+,A2B-   I'm going to make software for blood donation, where I need to put a dropdown list of actual blood types. I had intended to use:   [ Select Blood Group V ] [ O Negative           ] [ O Positive           ] [ A Negative           ] [ A Positive           ] [ B Negative           ] [ B Positive           ] [ AB Negative          ] [ AB Positive          ]   But now I am uncertain whether this is appropriate. What is the most suitable list of blood types for donors?


As, set of real numbers make group under multiplication but why we ignore zero in multiplicative groups.We can use zero as a counter example to disproof that its inverse doesn't lie in the set??

$\mathbb R^*$ refers to $\mathbb R$ without zero.  Please explain the statement "$\mathbb R$  is not a group under multiplication, it is a group under addition." in the . Basically:   Why is multiplicative group $(\mathbb R^*, ×)$ a group? Why is $(\mathbb R, ×)$ not group? Why are $(\mathbb R^*, +)$ and $(\mathbb R, +)$ groups?


So I will probably be screwed blued and tattooed for many reasons,  wrong forum,  nebulous question, etc. ,but aside from all available definitions what is the latest thinking on "what IS energy "

Some physical quantities like position, velocity, momentum and force, have precise definition even on basic textbooks, however energy is a little confusing for me. My point here is: using our intuition we know what momentum should be and also we know that defining it as $p = mv$ is a good definition. Also, based on Newton's law we can intuit and define what forces are.  However, when it comes to  many textbooks become a little "circular". They first try to define work, and after some arguments they just give a formula $W = F\cdot r$ without motivating or giving intuition about this definition. Then they say that work is variation of energy and they never give a formal definition of energy. I've heard that "energy is a number that remains unchanged after any process that a system undergoes", however I think that this is not so good for three reasons: first because momentum is also conserved, so it fits this definition and it's not energy, second because recently I've heard that on general relativity there's a loss of some conservation laws and third because conservation of energy can be derived as consequence of other definitions.  So, how energy is defined formally in a way that fits both classical and modern physics without falling into circular arguments?


So I have to come up with a code that outputs a report, and I have to enclose this while loop within another while loop, one that will ask the user if he wants to continue inputting info. As long as the user responds "Y", continue asking for required inputs and print the report. Once the user answers "N", then stop further processing.  I just finished the loop that generates the report, but I don't know how to enclose this loop with another loop with the above requirement.  My current code for the report is like this:  while (bookVal > salvageVal){     //read in stuff      yearlyDepr = bookVal * (ddRate / 100);     accDepr = accDepr + yearlyDepr;     bookVal = bookVal - yearlyDepr;     year++;      if (bookVal < salvageVal){         yearlyDepr = (bookVal + yearlyDepr) - salvageVal;         accDepr = purchPrice - salvageVal;         bookVal = salvageVal;      }     System.out.printf("%d %,18.0f %,18.0f %,18.0f%n" , year, yearlyDepr, accDepr, bookVal); }   I tried putting a "read in for Y or N" at the end of this loop and set another while loop on top of it with something like: while (answer == 'Y'), but that just scews up everything...Some help would be nice, thanks!

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I used the following command /give @p diamond_axe 1 0 {Can Destroy:oak}   And it said   missing '}' line 1, Column 2.   There are no columns though? Why won't it work?

This question was recently split into different questions for each workaround. See   meta posts for more information.   Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like: give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"emerald",Count:5b},sell:{id:"diamond_sword"}}]}} summon tnt ~ ~ ~ {Fuse:20s}


I've been trying to use the tool HT-WPS-BREAKER on Ubuntu 20.04, I run it as it should be, then I select the second choice which is Attack automatically with Airodump-ng. (WEP/WPS{WPA/WPA2}) but after that, I keep getting the following error HT-WB.sh: line 724: ifconfig: command not found  I've tried googling the problem but yet I've found no solution.

I've just installed Ubuntu 18.04 and selected "minimal install". I then tried to run ifconfig in the terminal and got the following message  -bash: ifconfig: command not found   How come the  is not installed by default any more?


A folder has a huge number of files; each pair of files has the same name but  different extensions (.obj and .mtl). I want to make a folder for each pair of files with the same name, then move each pair of files into its matching folder. File names always have letters; some also have underscores and numbers.  What I need to do is: A) Read a file name B) Make a subdirectory with the same name as the preceding file C) Move the pair of files matching the filename into the matching subdirectory D) Repeat for the next file    Example: Files: Big_Column1.obj , Big_Column1.mtl To be moved into subdirectory: Big_Column1

I need to move files by reading their names. I have to move system generated files and the names include a time stamp. I need to move the files by reading the file name by month.  If the file name contains 201601*.txt, then move to 2016/January directory. If the file name contains 201602*.txt then move to 2016/February directory etc.


Let $f$ be a differentiable function on an interval containing zero. If $$\lim_{x\to0}f'(x)=l$$   then is it true that $f'(0)=l$.   If $f'$ is a continuous function, then of course it is true. But what if $f'$ is not continuous? Is it still true? I think not, but I am not able to find some example. Any suggestions?

Let $f$ be a real-valued function continuous on $[a,b]$ and differentiable on $(a,b)$. Suppose that $\lim_{x\rightarrow a}f'(x)$ exists. Then, prove that $f$ is differentiable at $a$ and $f'(a)=\lim_{x\rightarrow a}f'(x)$.    It seems like an easy example, but a little bit tricky. I'm not sure which theorems should be used in here.    ==============================================================  Using @David Mitra's advice and @Pete L. Clark's notes I tried to solve this proof. I want to know my proof is correct or not.  By MVT, for $h>0$ and $c_h \in (a,a+h)$ $$\frac{f(a+h)-f(a)}{h}=f'(c_h)$$ and $\lim_{h \rightarrow 0^+}c_h=a$.    Then $$\lim_{h \rightarrow 0^+}\frac{f(a+h)-f(a)}{h}=\lim_{h \rightarrow 0^+}f'(c_h)=\lim_{h \rightarrow 0^+}f'(a)$$   But that's enough? I think I should show something more, but don't know what it is.


I have upgraded to Ubuntu 16.04 from 15.10 (x64 version) and now I am unable to run FileZilla.  There is some hard drive activity and then nothing.  When I open a terminal and type "Filezilla" I get the following error:   Reading locale option from /home/james/.filezilla/filezilla.xml (filezilla:5532): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed (filezilla:5532): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed (filezilla:5532): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed (filezilla:5532): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed (filezilla:5532): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed (filezilla:5532): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed (filezilla:5532): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed Segmentation fault (core dumped)   I have checked my system log and it has this line:  May  2 21:56:55 JamesPC kernel: [ 3133.290205] filezilla[5532]: segfault at 140 ip 00007f8a3152dbc6 sp 00007ffda52e17e0 error 4 in libwx_gtk2u_core-3.0.so.0.2.0[7f8a3102d000+5f9000]

I cannot start FileZilla. When I do it, nothing happen. I tried uninstalling and then reinstalling it, but no help. I am using Ubuntu 16.04.  If I start it from the command line, I see the following:  Reading locale option from /home/superuser/.config/filezilla/filezilla.xml  (filezilla:16389): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed (filezilla:16389): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed (filezilla:16389): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed (filezilla:16389): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed (filezilla:16389): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed (filezilla:16389): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'height >= -1' failed (filezilla:16389): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion 'width >= -1' failed Program segmentation fault ( core dumped )


Need help in installing 2 plugins   GStreamer ffmpeg video plugin  Codecs to play mpeg, divx, mpeg4, ac3, wmv and asf files GStreamer plugins for mms, wavpack, quicktime,musepack Codecs to play   Need to manually download these plugins and install

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


How do I generate GUID in apex class in salesforce in the following format mentioned(16 bytes or 128 bits)?  BA8D6569-9208-4DBB-9357-A4500838101E  Any suggestions will be appreciated. Thanks in advance

What is the best way to generate a GUID/UUID from Apex code (such as a trigger)? Preferably in the following format:     nnnnnnnn-nnnn-nnnn-nnnnnnnnnnnnnnnnn   Example:     13219ec0-3a81-44c5-a300-de14b7d0235f


Let $Q = (i,j,k)$ be the quaternion ring with multiplication defined by: $$ij = k, \quad jk = i, \quad i^2 = j^2 = k^2 = −1$$ and addition defined as a formal vector space over $\mathbb R$ with basis: $1, i, j, k.$  Show that $x^2 + 1$ has an infinite number of roots in Q.  My approach:   Let $a, b, c$ be real numbers satisfying $a^2 + b^2 + c^2 = 1$ and let $x = ai + bj + ck$. Then $$ x^2 = (ai + bj + ck)(ai + bj + ck) = -(a^2 + b^2 + c^2) = -1. $$  I'm not quite sure this approach is true in $\mathbb Q$, (I saw this approach was used when $x \in \mathbb H$)

Possible Duplicate:          Coudl someone explain me the following: Why should $x^2+1=0$ have uncountable infinite many solutions $x\in\mathbb H$?  In my opinion it has only 4 solutions, namely $i^2=j^2=k^2=ijk=-1$ ?


What are some of the best missions to do on Grand Theft Auto Online, like which missions will give you the most money/rp

Everything in the online world is expensive, well the best things are. We all want the luxurious apartment with 10 cars garage and the best weapons but to achieve that, we need money. Which missions or activities give the most cash ?


I have been using Google Analytics for some time and unfortunately it hides the searches that have led users to click into my site.  Is there any reliable source where I could check the daily searches where my site has been printed and, if possible, clicked by users?

We have set up GA on several websites to gather information about traffic to the site. We know about the organic keywords that are displayed under the Acquisition section of the traffic report. But we have been asked to find a way to display "not provided" keywords typed in by the end user in our Google Analytics report.  Is it possible to accomplish this?


My question is a generic one, so i am sure someone will flag it, but i am hoping i can receive some helpful directions. I have 2 salesforce org - Org1, Org2. I build a rest API in Org2. Now i need to access it from Org1. My integration concepts are weak and there is so much stuff that i do not know where to start, given that i cant spend 6 months learning authentication before delivering my work. From what i understand, there are 2 ways for this connection to work -  Where a user from Org1 gets authenticated into Org2 as himself. Which means he will have a user account in both orgs. Someone told me that there is a way to set up connected app to achieve this, and we will need to use JWT to achieve this. Is that correct? Where all users from Org1 gets authenticated in as a common API user set up in Org2. And that API user will have proper access. Again, someone told me that there is a way to set that up in connected app. I will google more into it I have also noticed that community users (who technically dont even have an account in an org) gets authenticated as portal users. Not sure if that is any different from above 2.  Does above 3 categories summarize all the possible ways to connect Org1 to Org2 when accessing rest api inside Org2? I just need brief summary of how many ways can it be done, and some directions on what topics to read for it. Most people just say - "read about OAuth - . I understand that is a good advice, but for a newbie who needs to start working on stories right away, it will take me forever before i can deliver anything. So looking for some advices on quick summary and ways to quick start some implementation, then i will grasp concepts as i go on with implementation steps. SO far i know how to write classes that expose methods as rest apis. I know connected apps perform the task of OAuth. It gets confusing for me when i see some code using JWT, some discussions on cross-org, basic auth, etc etc. Information is scattered. It seems like unending pool of "things i dont know or dont even know what i am missing". So i figured i will start with a simple use case of Org1 users trying to access rest resource in Org2. Any guidance on how many ways to achieve it (authentication part) and what is the path to do that, would be greatly appreciated. I would start by reading those specific topics and implement it.

I am trying to integrate one Salesforce org to other org by using Oauth setup, I wanted to use  use consumer key and consumer secret key in my REST class to connect with the org, after connection part completion, I want to access Get(), Put(), Post(), etc. Including the ability to set Oauth and Authorization headers needed for Salesforce Rest API calls.  Actually I'm new in REST implementation so can you please explain me by using code samples.


Please take a look at this image   Is there's anyway I can add another field called "Font Awesome Icon" for the user to write the icon class and the output should be like this:

Is it possible to add a custom field to menu items?  What I want to do is be able to add a field for 'French Navigation Label' and a 'French Title Attribute' in the wp menu interface.


Where exactly is the $PATH variable stored? I am changing the /etc/environment file with my desired path. Then I am doing echo $PATH and the old version is showed.

How do I add a directory to the $PATH in Ubuntu and make the changes permanent?


Usually, when I edit templates, I can just press Tab and I can edit the text. Suddenly, when I press Tab, this happens:

I converted text to mesh now i want to convert mesh to text, how  i can do it?


I lie in the bed feeling sorry for myself and start to feel guilty. I could have been nicer to Ellie. I never even kissed her goodbye. Michael never kissed me goodbye either but then again, he doesn't love and he doesn't care about me.  Source: Catherine Barry: "The Twenty-Eights Day". In Irish Girls About Town, 2004, p. 45.   I would like to ask for the explanation for the usage of the word "never" in that sentence. The context is as follows: The sentece is comment of the narrator of one short story on one particular event that occured some hours in the past. Just one morning she did not kiss her child goodbye. The word "never" indicats after all the present perfect which in this case would mean that she has never kissed her child goodbye.   P. S. There could be raised an objection that this is an duplicate of a question that was resolved here: . But I do not think so. I understand the usage of "never" in a sentence like this: "I lived in Europe in the 90s, but the entire time I never visited Italy". I think that my sentence – given the context – tells that the narrator did not kiss her daughter goodbye just in one particular morning. And that is the reason why she feels ashamed. So this behaviour was an exception from the rule. Normally – when she does not suffer from the mental instability – she kissed her goodbye. Just exactly from this reason I am puzzled by the usage of "never" in that sentence.

In my English classes, I was taught that never should not be used with past forms, only with present perfect forms; this is also what I read in a grammar book I bought some years ago. (I bought the book in the USA; I guess the book is about American English grammar, but I don't have any reason to believe there is any difference between American, and British English in this case.)  Is it correct to use never with the past tense?     I never said that.        I have never said that.


Find the radius of convergence: $$\sum_{n=0}^\infty z^{n!}$$ I suppose that this serie behaves in a similar way that $\sum_{n=0}^\infty z^{n}$ , so I have that it converges when $|z| < 1 $. Could someone explain me if this approach is correct and give me a more rigorous proof? Thanks in advance

Does anyone know how to find the radius of convergence of the series $\sum\ z^{n!}$, where $z$ is a complex number?  I tried to use the definition: $$\frac{1}{R}=\limsup\left|\frac{a_{n+1}}{a_{n}}\right|$$ but I wasn't successful.


it is possible to know when user has internet connection and when no. I've tried this:  window.addEventListener('online', () => {   // some stuff }, false);  window.addEventListener('offline', () => {   // some stuff }, false);   as well have tried window.navigator.online.  All above things works fine just when go to network tab from developer tools and disable/enable it, but it doesn't work when you go and disable WiFi or turn off the router for example.  It is possible somehow to subscribe to this network changes in js?  Many thanks!

How to detect the Internet connection is offline in JavaScript?


I'd like to know what's the most publicly installed or widely used Linux system performance monitoring software that is available and compatible with Ubuntu 64 bit ?  I've installed Nagios in place for availability report but for the monitoring performance of more than 10 it is impractical to open SSH console running top for each server.  what I'd like to monitor is: 1. Disk space issue. 2. Resource hog. 3. Failed root / sudo login attempt. 4. anything else here ?  any kind of suggestion would be greatly appreciated.  Thanks.

For a more comprehensive list of monitoring tools and their features, check out .   As the question states, what are the most commonly used tools used for this task and what are their strengths and weaknesses?


Reading about virtual functions, I have come across the following concept: "C++ non virtual function calls are resolved at compile time with static binding, while virtual function calls are resolved at runtime with dynamic binding."  My questions are: 1)Would it have a large effect on performance then, if we had a large number of virtual function calls in our program, since they are evaluated at runtime? Or is it not that relevant in modern machines?  2)Is that number dependent on the stack?

In my class design, I use abstract classes and virtual functions extensively. I had a  feeling that virtual functions affects the performance. Is this true? But I think this performance difference is not noticeable and looks like I am doing premature optimization. Right?


Someone has left____ wet towels on the bathroom floor. his or her or their

Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase?  Each student should save his questions until the end. Each student should save her questions until the end.


I am wondering if its possible to use a base class as parameter in function but when calling the function passing a derived class?  In .h file  class parent {     virtual void foo(); }  class child_a: parent {     void foo(); }  class child_b: parent {     void foo(); }   in main.cpp  void bar(parent p) {      // Doing things }  int main() {     child_a a;     bar(a);     return 0; }   Or do i have to use overloaded functions? it there another way to do it?

Someone mentioned it in the IRC as the slicing problem.


I have modified the DEFAULT_RUNLEVEL from 2 (graphical interface) to 1 in rc-sysinit.conf, to install drivers for GPU. After choosing either default or recovery mode, I see just black screen. Any ideas, what went wrong and how to get into text interface or at least revert the changes?  Any help will be much appreciated. I am running Ubuntu 12.04 as a second system.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I work with a legacy code and when I include some headers on linux I have to undef appropriate macros, for example: #pragma push_macro("align") #undef align  #include <memory>  #pragma pop_macro("align")  I would like to create a macro which expands to the above code and can be used this way: include_(memory, align)  I can use _Pragma instead of #pragma inside #definebut what about with #undef and #include ? Is it possible to create such macro ?

Is there a way to define a macro that contains a #include directive in its body?  If I just put the "#include", it gives the error  C2162: "expected macro formal parameter"   since here I am not using # to concatenate strings. If I use "\# include",  then I receive the following two errors:  error C2017: illegal escape sequence error C2121: '#' : invalid character : possibly the result of a macro expansion   Any help?


How to prove that such inequality holds for some metric space E? I tried $\sqrt{a+b}\leq \sqrt{a} + \sqrt{b}$ and triangle rule, but I still cannot prove it. Is it possible? I thinks that yes, because it's a part of exercise proving that $d(x,y)=\sqrt{d_E(x_1, y_1)^2 + d_E(x_2, y_2)^2}$ is metric. (Here $d_E(x_1,y_1) = |x_1-y_1|$.) \begin{align*}     \sqrt{d_E(x_1, y_1)^2 + d_E(x_2, y_2)^2}         &\leq \sqrt{d_E(x_1, z_1)^2 + d_E(x_2, z_2)^2}             + \sqrt{d_E(z_1, y_1)^2 + d_E(z_2, y_2)^2}\\ \end{align*} How to prove it?

I'm currently stuck on an exercise where I need to show that if $(M,d)$ and $(N,\rho)$ are metric spaces, then $d_2((a,x),(b,y)) := \sqrt{d(a,b)^2 + \rho(x,y)^2}$ defines a metric on $M\times N$. I've already shown that the basic criteria of a metric are met, but I still need to show that the triangle ineqaulity holds.  I've tried using the triangle inequality on $d$ and $\rho$ and estimating the square root with $\sqrt{a^2+b^2}\leq a+b$, but regardless of which order I've used them in, I seem to overestimate my target. I thought maybe I somehow need to use Cauchy-Schwarz, but I don't know how.


I am using SharePoint 2010 and I have custom list with four columns FirstName, LastName, CompletedDate, Checked. CompletedDate is today's date every time. I have a content editor Web Part on the page and list above the web part. Whenever the CompletedDate value is equal to today it should make the web part to hide. Can some one help me on how to approach this through Jquery. Thanks in advance.

I am using SharePoint 2010 and my scenario is I have created an InfoPath form and form link is being set up in Content Editor WebPart to directly open to submit a form for the first time. Everything working fine, now I am in need to hide the link once a form is submitted on the page.   Can any one suggest me how to approach on this or if anyone has snippets that would resolve my problem.  Thanks in advance.


Can I wear two hat simultaneously like this?

I've searched all over meta and found  for wearing multiple hats that was . But today I saw  profile.     Is there really a way to wear two hats or is this something out the ordinary?


This:   dots=$(printf "%0.s." {1..10})  prints this:  .......... .  I'd like to know how to get printf in Bash to print .s up to a specific column position, let's say 30, where the start column will vary.   For example:   Add dots ....................  Add dots dots ...............  Add dots dots dots ..........

I'd like to output hello world over 20 characters.  printf "%-20s :\n\n" 'hello world!!'  # Actual output hello world!!        :  # Wanted output hello world!!========:   However, I don't want to complete with spaces but with "=" instead. How do I do that?


I have done some searching, but didn't find the answer  The code:  char b = 'b'; char c = 'c'; char a[5] = ""; a[0] = b, c;   What last line means? The b, c part?  Thank you all


The  has the following description:     Edit 500 posts (excluding own or deleted posts and tag edits).   (emphasis mine). This is unclear to me. Does "tag edits" refer to edits that only modify a question's tags, or edits to tag wikis and excerpts?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


this is what I tried doing:   EditText text_ans1 = (EditText)findViewById(R.id.ans_one);  String ans1 = text_ans1.getText().toString();  if(ans1=="abc")

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Just noticed a change in the homepage view, making the reputation of the users both black and bold:        I find it too distracting. Can it please be changed? If the purpose is to make the score stick out, just having it black and not bold is enough:        Can this please be changed?

It seems a couple minutes ago, a change was applied to the styling of the homepage, with users' rep scores now being much darker (and standing out more):        Compare with the former light grey colouring (image courtesy of ):        Is this intentional? If so, why? It highlights something that's not really relevant, in my opinion.


One of my friends who don't have a fast Internet connection asked me if I could install El Capitan (which is the highest version of OS X that his iMac supports) and I said sure.  Today I went to App Store to install El Capitan, just for it to download so that I can make a bootable USB for him, and couldn't find it in App Store.  Then after a bit of searching I've found  and it opened in App Store:    However, when I click the get button, it redirects me to Software Update in my System Preferences and says that it's not available:    Previously, clicking Get button just downloaded an installer into my Applications folder where I could easily create a bootable USB.  How can I make bootable El Capitan installer USB in Mojave?

Sometimes it's hard to search for older versions of macOS & OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac?


In my maths schoolbook there is this property for independent events:     p(A|B) = p(A)      p(B|A) = p(B)   But I can't imagine how this is possible. How would you draw a Venn diagram that follows this property?

From my recent experience in probability, it feels as though independence is something we "discover" from the system via the equation:   $$P(A)*P(B)=P(A\cap B)$$  Could one ever conclude independence from the "system" by intuition? Is it wise to conclude independence for events that are "seemingly" independent? What would be some interesting examples where this would fail.


For an amusing (and valid but unrelated) reason I want to do the following:  class Head(type, tuple):     pass   But this results in   TypeError: multiple bases have instance lay-out conflict   (on python3.3 and python2.7)  Any way around this?  For the curious I want to create something that behaves like Mathematica expression (Derivative[1][g][x] being g'(x)). I know there are other ways, but for educational purposes I insist on this one.

I got the following class :  class ConstraintFailureSet(dict, Exception) :     """         Container for constraint failures. It act as a constraint failure itself         but can contain other constraint failures that can be accessed with a dict syntax.     """      def __init__(self, **failures) :         dict.__init__(self, failures)         Exception.__init__(self)  print isinstance(ConstraintFailureSet(), Exception) True raise ConstraintFailureSet() TypeError: exceptions must be classes, instances, or strings (deprecated), not ConstraintFailureSet   What the heck ?  And the worst is that I can't try super() since Exception are old based class...  EDIT : And, yes, I've tried to switch the order of inheritance / init.  EDIT2 : I am using CPython 2.4 on Ubuntu8.10. You newer know is this kind of infos is usefull ;-). Anyway, this little riddle has shut the mouth of 3 of my collegues. You'd be my best-friend-of-the day...


In previous Ubuntus (GNOME, not unity) I could add "--incognito" to the end of the executable file command of Chrome to make Incognito default.  I cannot find an executable file for Chrome in 12.04. How do I make Incognito default for Chrome in 12.04?

I would like to be able to open Chromium in incognito mode automatically. I'm new to Linux and I love it so far but I haven't yet found a way to do this. I'm using Ubuntu 14.04.


I am encountering a weird problem. I was trying to compare two 128 bits strings and I believe every char of them match each other(and I tested comparing String.chartAt(#) several times) but when I do  if (String 1== String 2) .. else .. It went to else clause. Why is that?


I have worked here for five years.   I had worked here for five years.   I worked here for five years.   Which one is gramatically correct. Does the first sentence mean that he worked here and is still working? And the 2nd and 3rd indicate something happened in past. And when to use these. Is there any difference between these two?

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I am trying to install the MinionPro package. I followed the instructions on CTAN and tried running the test:  \documentclass{article} \usepackage{MinionPro}  \begin{document}  test  \end{document}   I don't get any output, only an error message:     name = MinionPro-Regular-Base-aa, rootname =   MinionPro-Regular-Base-aa, pointsize = mktexmf: empty or non-existent   rootfile!      Cannot find font MinionPro-Regular-Base-aa in map file(s).   I'm at wit's end. Do you know what might be behind this error? Thanks!

This question and answer is a response to a request from Joseph Wright.   Why shouldn't I use getnonfreefonts to install additional fonts? Why shouldn't I use updmap when installing or removing fonts?     Background  There are a number of questions on the site concerning problems caused by people installing additional fonts and using updmap to update the 'map' files on which TeX depends.  One common cause of these problems is the use of getnonfreefonts.  Other causes are the use of other font installation scripts or executing updmap directly.