Update , but there appears to be no documentation out there. The change in flag weight caused by each flagging still missing. TL;DR: Flag weight is not very clear. Just telling the user how many flags got approved/rejected would increase the flagging behavior. Additionally, flag feedback could improve this even more. Question:  is shown on a User's profile as a number between 0 and 750, each user starts with 100. The problem is that after reaching 500, flag weight increases in a sub-linear fashion, and it becomes hard to tell how many flags were considered to be correct or incorrect. I find it easy to remember "I am at 250" and when I come back, discover "I am at 280", so I had 3 flags approved. Nowadays, "I am at 576.3529". When I view my profile tomorrow, I'll be at 577.1285 or something, but I won't know how many flags got approved, denied or were ignored.  Would "10 flags approved, 3 flags denied, 2 flags pending" not provide more useful information? Even if it's just a pop-up box (StackExchange seems to use span-title for that). Additionally, being able to see what flags were denied would provide feedback to the user that is flagging in a way not desired by the moderator(s), and improve the flagging quality.  Maybe we can click on the flag weight to see a page with all our flags, the status (approved/denied/pending), the moderator that reviewed the flag, and maybe a comment the moderator left to explain why the flag was denied?


Is the exchange of momentum between two interacting objects always the same?

The rule is that the total momentum of an isolated system is constant.   I am interested in one question. If you imagine a closed system, there will be two planets, for example: Earth and Mars. They will be attracting equally F(earth)=F(mars). At any time between two objects will be the same exchange of momentum, and the total momentum will be constant. This example is okay for me.  Then i will add a third planet to the system, such as Venus. I will line up the planets in a straight line. 1-Mars, 2-Earth, 3-Venus. And i will say that that Mars attracts the Earth with a force of 3F, and the Earth attracts the Mars force 2F, Venus attracts the Earth force 3F, And the Earth attracts Venus force 2F. (considered in a small period of time)   In that system, the momentum will be conserved. I read that the planets must attract each other equally, but what prevents them from attracting exactly as I drew? Perhaps they are hindered by Newton's third law? That is, if you combine the law of conservation of momentum and Newton's third law, than must be between two interacting objects the same exchange of momentum at any period of time (gravitational or electro-magnetic, however any forces) ? Do I understand everything correctly?   This question arose when I imagined how atoms interact with each other by electromagnetic forces, the principle with planets is a bit like atoms.


Workflow job of pasting a URL in a hyperlink field, how to have the name/description appear instead of long url?

Follow up to my previous Workflow thread that now works.  When the workflow 'updates the item in current item' and pastes the url correctly (long, complete url) I would like to have the 'description' showing up and not the  long URL, by description I mean the below. the field it is inserting is Encoded Absolute URL


I know this is a duplicate but I can't understand any of the duplicates.     $\lim_{n \rightarrow \infty} a_n = A$, how to prove if $\lim_{n \rightarrow \infty}a_n=A$, then $\lim_{n \rightarrow \infty}\frac{a_1+...+a_n}{n}=A$?   If $a_n=A$ for all $n$, it would be easy, right? Now what if $A-\epsilon < a_n < A+\epsilon$ for all $n$? You could get that $|\frac{1}{n}\sum_{k=1}^n a_k - A | < \epsilon$. If the limit exists, it is similarly bounded. To avoid saying "if the limit exists", take the limsup, which always exists, and say $|\limsup \frac{1}{n}\sum_{k=1}^n a_k - A | < \epsilon$.  So here's the problem. You only have $|a_n-A|< \epsilon$ for $n \geq N$. What to do? Split it into two cases and work the rest from there: $$\frac{1}{n}\sum_{k=1}^n a_k = \frac{1}{n}\sum_{k=1}^N a_k + \frac{1}{n}\sum_{k=N+1}^n a_k.$$  I know that for large enough k the terms go to zero but what about the terms that are 1 to N? I can't figure out why.


Dynamic thruster balancing of space ship

The space ships in my game a meant to be player-built with an arbitrary amount of thrusters attached anywhere with any rotation. I currently have some dirty code to rotate the ship to a given angle (accelerating and decelerating).   Here's an example of a symmetrical ship facing where the red line points, being told to rotate left.    However, as you would imagine, depending on where the player has put the thrusters, sometimes undesired linear forces are affecting the ship. In this case, the ship starts moving forward.  I'm elaborating on whether it's possible to find the maximum thrust a thruster can apply to cause no linear velocity. (In the above case that would be none since there's nothing to counteract the forces from the rear thrusters, and the front ones kill eachother).  What I've come up with so far is a formula to determinate the "turn efficiency" e.g. how much rotation is caused in relation to linear movement.  a - position vector to thruster a b - position vector to thruster b v1 - force from thruster a v2 - force from thruster b  efficiencyDelta = a.cross(v1) / |v1|  -  ( a.cross(v1) + b.cross(v2) ) / |v1 + v2|  , basically "a.cross(v1 * t) / |v1|" is supposed to be the turn efficiency. And then we subtract it by the turn efficiency of the thrusters combined, to see if firing the new thruster is worth it.  Problem arises when I realize that thrusters aren't surposed to be on/off, but can vary their thrust from 0 to 1. And how to go about when the player wants the ship to go forward. Ofcourse, there would need to be a balance of how much to rotate/move.  I'm no rocket scientist so I'm hoping there's someone who can tell me if it's even possible to calculate the throttle of each thruster this way and give me a push in the right direction.  Thank you for taking the time! / Kim


what is the meaning these below mentioned 5 thats?

The teacher said that that that that that boy used was wrong. Please, briefly explain above stated sentence.


Find all solutions to $x^9 \equiv 25 \pmod {29}$   I referred to a table of indices in the back of my book for help but am still a bit confused, any help/hints are greatly appreciated.


Unable to understand the syntax of the command find

The find command seems to differ from other Unix commands.  Why is there the empty curly brackets and a backward flash at the end of the following command?  find * -perm 777 -exec chmod 770 {} \;   I found one reason for the curly brackets but not for the backward flash.   The curly brackets are apparently for the path     Same as -exec, except that ``{}'' is   replaced with as many pathnames as   possible for each invocation of   utility


Interaction with descent of the dragons and dragon tempest

Let's say I have 4 creatures on the battlefield, and the  enchantment out as well.  If I use  and replace all 4 of my creatures, how does this interact with dragon tempest?  1) 4 damage dealt to target controller or target creature (enchantment interprets all 4 dragons being placed as one event).  2) 10 damage dealt to target controller or target creature (enchantment triggers for each time dragon enters battlefield (1 dmg, 2 dmg, 3 dmg, 4 dmg)).  3) Something else entirely!  Thanks


I layered a gradient over a photo and masked it to create a fade. When I save the file as a PDF and place the file in an email the image doesn't show the fade. I've saved it every way I can think of as a high quality print, press quality, et. I've played around with the compatibility, checked and unchecked the options available. No change, the fade still, well, fades. Any ideas?


Uncommited work pending when callout in @Queuable,

I am working with callout to external API as well as HttpCalloutMock in test cases.  I still have the same issue from months   You have uncommitted work pending, Please commit or rollback.   I am fully aware that DML and callout need to be separated in transactions but there is not any official workaround about this.  E.g.:   @isTest public static void Test_01() {  Test.setMock(HttpCalloutMock, MyMock.class);  Account account = new Account(Name = 'a');  insert account;  // Do my Http callout with the JSON.serialize(account) }   In this example, the account HAS to be created before sending data on the external server. I already tried to put this insertion in a separated function without success.  My conclusion is that you CANNOT update or insert before a (synchronous..) Http Callout, that seems ridiculous for me as much as the request "please commit" that is totally impossible in Apex.  As another example I have a Queueable class as this:  public class QueueJ extends Queueable {   public Queue_Rec__c queueRecord {get;set;}   public QueueJ() { this.queueRecord = new Queue_Rec__c( Name = 'a' ); insert this.queueRecord; }   public void execute(QueueableContext context) {     // Sensitive part     this.queueRecord.processing__c = true;     update this.queueRecord;     // Will throw an error       HttpResponse response = MyCalloutProvider.send('GET', 'url', 'uri', '{"my":"body"}');     this.queueRecord.Processing__c = false;     this.queueRecord.Response__c   = response.getBody();      update this.queueRecord; // Will not crash.   }   public void processing() {     this.queueRecord.processing__c = true;     update this.queueRecord;   } }   In this quick example, if I leave the "sensitive part" and I do  System.enqueueJob(new QueueJ());   It will crash. But if I remove the "sensitive part" and I do  QueueJ j = new QueueJ(); j.processing(); System.enqueueJob(j);   it works perfectly. How can you justify this wrong/right behaviour ? It is always coinfliping to make DML and callout in the same flow.  Any suggestions?


Disabled submit button on form vs allow submit then show errors?

We have a few different forms as part of a web-based medical application. These forms have quite a few fields - 10-20 depending on the form. Each has at least 5 or so required fields. We currently disable the save button until those required fields are all completed.  We've been debating whether it's a better user experience to make the submit button enabled by default and then display an error message (and highlight missing required fields) if the submit button is clicked before all required fields are filled out.  Any research or sound opinions on what might be better? We're leaning towards the latter approach since our forms are pretty long -- allowing them to submit then find errors might be more efficient than the cognitive load of searching through the form to see why the button isn't enabled.


Am I likely to struggle in a high-ranked PhD program, if I struggled to get GPA of 3.5 in my master's?

I want to be realistic whether I am a material who can complete PhD at top universities such as Stanford, Princeton, Berkeley or Caltech. Grad school courses were hard. I scored 3.5 GPA in my specialization for MS with thesis. My overall GPA was 3.42.  Whether I will get in these universities or not, that is different question. My concern is: If I get into one of these universities, say because of other achievements like research, LOR, SOP etc., it will be harder to maintain this GPA at these universities. Given the fact that U of Michigan has its Electrical Engineering Grad program is ranked 6th in US.  Any suggestions? Reason I want to apply to these universities is because of my area of research.   Course directly related to my research: I have A-, A. Closely related to area of research, but in my specialization: I have B+, A-, B+, B.  I do not want to talk lot about my MS thesis, because I want to focus more on rigor of the course and qualifying exam at these universities.


ServerSocket Not Accepting Upon Conversion to SSLSocket(Null Pointer Exception)

I've been trying to convert a Client/Server model I made in Java using sockets to SSL. After generating my PKCS12 file containing the server's root and intermediate files, I used System.setProperty to change the trust and keystores in the client and server files to the PKCS file. I'm not really sure if that's what your meant to do. I also made the changes to my sockets, using an SSLSocketFactory to create the necessary sockets.  Here is the Code Below. Client:  `public class Client  {     private SSLSocket client_socket;     private DataOutputStream output_stream;     private FileReader reader;     private BufferedReader buffer_reader; public Client(String address, int port) {     System.setProperty("javax.net.ssl.keyStore", "wa.p12");     System.setProperty("javax.net.ssl.keyStorePassword", "namihana");     System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");     System.setProperty("javax.net.ssl.trustStore", "wa.p12");     System.setProperty("javax.net.ssl.trustStorePassword", "namihana");     System.setProperty("javax.net.ssl.TrustStoreType", "PKCS12"); //  System.setProperty("javax.net.ssl.trustStoreType", "PKCS12");     Security.addProvider(new Provider());      try     {     SSLSocketFactory ssf =  (SSLSocketFactory) SSLSocketFactory.getDefault();     client_socket = (SSLSocket) ssf.createSocket("127.0.0.1", 8072);     client_socket.startHandshake();   public class Server {     public Socket socket_2;     public SSLServerSocket server_socket;     public InputStreamReader input_stream;     private BufferedReader buffer_reader;     private DataOutputStream output_sender;     private PrintWriter output_writer;      private boolean result;     private char[] multichoice_answers;   Server:  public Server(int port)         {             System.setProperty("javax.net.ssl.keyStore", "wa.p12");             System.setProperty("javax.net.ssl.keyStorePassword", "namihana");             System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");             System.setProperty("javax.net.ssl.trustStore", "wa.p12");             System.setProperty("javax.net.ssl.trustStorePassword", "namihana");             System.setProperty("javax.net.ssl.TrustStoreType", "PKCS12");              multichoice_answers = new char[30];              multichoice_answers[0] = 'A';              multichoice_answers[1] = 'A';              multichoice_answers[2] = 'D';               multichoice_answers[3] = 'C';              multichoice_answers[4] = 'C';              multichoice_answers[5] = 'C';              multichoice_answers[6] = 'D';              multichoice_answers[7] = 'B';              multichoice_answers[8] = 'D';              multichoice_answers[9] = 'B';              multichoice_answers[10] = 'C';              multichoice_answers[11] = 'D';              multichoice_answers[12] = 'A';              multichoice_answers[13] = 'D';              multichoice_answers[14] = 'C';              try         {             SSLServerSocketFactory ssf =  (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();             SSLServerSocket server_socket =  (SSLServerSocket) ssf.createServerSocket(port);              System.out.println("Server_socket made");             Security.addProvider(new Provider());              //server_socket.setSoTimeout(100000);          }         catch(Exception e)         {             e.printStackTrace();         }      }       public void receive()     {         try         {              System.out.println("Server connected2");                 socket_2 =   server_socket.accept();


run ubuntu 18.04 as OS for android phone

I'm talking about the OS made for PC. what would happened if I install it on android phone? will it figure out the hardware or is it a guarantee way to kill a phone?  checking if anyone tried before I sacrifice my old phone. this is not a duplicate with ubuntu touch or supported devices! this sticking a laptop OS to phone without source customization


python regex preserve specified special characters only

I've been looking for a way to isolate special characters in a regex expression, but I only seem to find the exact opposite of what I'm looking for. So basically I want to is something along the lines of this:  import re str = "I only want characters from the pattern below to appear in a list ()[]' including quotations"  pattern = """(){}[]"'-""" result = re.findall(pattern, str)   What I expect from this is:  print(result) #["(", ")", "[", "]", "'"]   Edit: thank you to whomever answered then deleted their comment with this regex that solved my problem:  pattern = r"""[(){}\[\]"'\-]"""


While using INDEX and REGEXEXTRACT, how can I return a blank cell instead of 0

While using INDEX and REGEXEXTRACT, how can I change this formula to return a blank cell (instead of 0) when all of the cells in that section are blank?


How to enable ipv6 support in linux system

I am trying to enable ipv6 support to my linux system. Im trying to modify /proc/sys/net/ipv6/conf/all/disable_ipv6 this file but system is not allowing to do so.


System freezes after logging in after one failed attempt

If I enter my password correct first time, I login as normal.  If I enter my password wrong, it says invalid password. If I attempt to enter the correct password now then the screen freezes and doesn't go to dock as normal. I must restart using a physical button or shutdown to get out. Login works normally after restart, assuming I get it right first time.  EDIT:  After entering a wrong password, if I click cancel and then go back to my user to login, it works fine.


Trying to assign a random ID to an object

Im kind of new in Java so I will highly appreciate your help! I am developing an app that allows users to register air crafts information (as many as they need). However, the app needs to assign a random ID to each of the air crafts registered by the user in the following  A-LLLL-NNNN-2018, where:   A is a static value. LLLL is a random series of letters. NNNN is a random series of numbers.    I was thinking of using a random array including the alphabet but I'm not really sure how the to do the string of the ID, Any help will be highly appreciated!  The difference of my questions versus the other questions is that in my case, I need to assign each ID randomly created to the objects I have created and the format has to be specifically as described above.


Stacktrace information preserving paths of original source

I am using C#.net for application development.  To log and debug exceptions, I use the stacktrace.  I executed my application on another machine, but when errors occur it refers to the path of my development machine.  Ex:   D:\Projects\xyz.CS line no :12 _Error_message_here.   Why does it trace to the path on my development machine path even though I am running the application on another machine?


I have the same behavior in 2 SQL Servers where Stolen Server Memory and Database Cache Memory counters are decreasing (Db Cache) and increasing (Stolen Memory) in a linear way. The amount of memory decreased from Db Cache Memory is almost the same amount of memory increased in Stolen Memory. Has anyone seeing this behavior before? Is it an expected behavior?   Both server's configuration:   SQL Server 2012 ENTERPRISE with SP3 32GB memory   Thanks for the attention


Is there a way to change effective process name in Python?

Can I change effective process name of a Python script? I want to show a different name instead of the real name of the process when I get the system process list. In C I can set  strcpy(argv[0],"othername");   But in Python   argv[0] = "othername"   doesn't seem to work. When i get process list (with ps ax in my linux box) the real name doesn't change. I prefer a portable solution (or else one solution for posix and another for windows environments), if it exists.  Thanks in advance


Short story from the 80s - Character has to read instead of having brain programed

I had a collection of Science-Fiction short stories back in the 80s. There was one story set in the future where everyone went through a programming process that would "teach" them how to perform the necessary skills for specific careers. The main character's brain is not programmable and is sent to a home with others with the same problem. Once there, the character decides to learn the skills required by reading.  The collection had a version of Enemy Mine.  I would love to find that story and use it in class.


A variation of Viète's formula -- an infinite product of nested radicals

expresses an infinite product of nested radicals in terms of $\pi$.   Let $$a_1=\sqrt2,\quad a_n=\sqrt{2+a_{n-1}}.$$ Note that $\lim\limits_{n\to\infty}a_n=2.$ Then $$\prod_{n=1}^\infty\frac{a_n}2=\frac{\sqrt2}2\times\frac{\sqrt{2+\sqrt2}}2\times\frac{\sqrt{2+\sqrt{2+\sqrt2}}}2\times\dots=\frac2\pi.$$ Let's consider a variation of this problem. Let $$b_1=\sqrt1=1,\quad b_n=\sqrt{1+b_{n-1}}.$$ It's easy to see that $\lim\limits_{n\to\infty}b_n=\phi,$ where $\phi=(1+\sqrt5)/2$ is the golden ratio.   Is it possible to find a closed form for this infinite product? $$\begin{align} P&=\prod_{n=1}^\infty\frac{b_n}\phi=\frac{\sqrt1}\phi\times\frac{\sqrt{1+\sqrt1}}\phi\times\frac{\sqrt{1+\sqrt{1+\sqrt1}}}\phi\times\dots\\ &\approx0.5094909728475357551307361756807565841868\dots \end{align}$$ Or, at least, to find alternative representations and establish some of its properties: is it irrational? is it transcendental?


Is it possible to select a face in the UV editor and find it in the 3D View?

I have a mesh which i have Smart UV projected , and i have many loose UV faces . I would like to know if i am able to select a face in the UV/Image editor , And make it select the face on the 3D mesh. Is this possible?   I cannot select every face on my 3D mesh to find the correct face in the UV , That is very time consuming and confusing. Thank you.


InDesign: Re-Link text frames to master page

I need to ask for your help again ;)  I am working at a 200-page-Document for our high school graduation, which is going to be printed as a book and contains a page for each student with a photo and a short text about him. After I created these ~135 pages by hand, I need to insert a few pages for students who sent their texts later. I used a master page which contained next to graphical elements a text frame for the students' text, I edited that text frame on each page by creating a copy with ctrl+shift+click.  But when inserting a single page somewhere, each left page after that page gets a right page and each right page gets a left page. Every object (except the text frame) changes it's position regarding the master page left / right site, , but since the text frame is rotated -6,25° on left pages and 6,25° on right pages, the text frame keeps its original rotation and is now rotated -6,25° on right pages and 6,25° on left pages (see screenshots).  page 16 and 17 before inserting a page:   page 16 and 17 after inserting a page after page 15:   page 18 and 19 after inserting a page after page 15:  and so on...  How can I get InDesign to understand that these textframes belong to their master frames and should be flipped as well when the pages change from left to right? Any help is much appreciated, since I don't want to edit each of these text frames by hand. Thanks in advance!


'unresolved external symbol' then trying to access 'static set'

I know that unresolved external symbol means that compiler can't find definition.  I got this error     Severity  Code    Description Project File    Line   Error   LNK2001 unresolved external symbol "private: static class std::set,class std::allocator > VirtualWorld::vWords" (?vWords@VirtualWorld@@0V?$set@HU?$less@H@std@@V?$allocator@H@2@@std@@A) ConsoleApplication11    c:\Users\Laptop\documents\visual studio 2015\Projects\ConsoleApplication11\ConsoleApplication11\Source.obj  1   with this code below (this code is fragments, but it's still generates this error)  #include <set>   #ifndef _TYPE_ID #define _TYPE_ID typedef unsigned int Id; #endif  #ifndef _CLASS_VIRTUALWORLD #define _CLASS_VIRTUALWORLD  class VirtualWorld { private:     static Id freeCounter;     static std::set<Id> vWorlds;     bool holding;     Id virtualWorldId;      static Id hold();     static void release(const Id & i); public:     VirtualWorld();     ~VirtualWorld();      Id getInstance();     void forceRelease(); }; #endif   int main() {      VirtualWorld virWorld;     return 0; }  Id VirtualWorld::freeCounter = 1;  Id VirtualWorld::hold() {     std::set<Id>::iterator iter = vWorlds.lower_bound(freeCounter);     while (iter != vWorlds.end() && *iter == freeCounter)     {         ++iter;         ++freeCounter;     }     return freeCounter++; }  void VirtualWorld::release(const Id & i) {     vWorlds.erase(i);     freeCounter = 1; }  VirtualWorld::VirtualWorld() : holding(false) { }  VirtualWorld::~VirtualWorld() {     if (holding) {         release(virtualWorldId);     } }  Id VirtualWorld::getInstance() {     if (!holding) {         virtualWorldId = hold();         holding = true;     }     return virtualWorldId; }  void VirtualWorld::forceRelease() {     if (holding) {         release(virtualWorldId);         holding = false;     } }   I researched that I'm getting this error then trying to access vWorlds in hold() and release(int) functions. Why I'm getting this error and what should I change ?


Why can moderators review more than 40 close votes?

Today a moderator :    But the daily limit is 40. Is it just moderators who can do this? And why are they allowed to review 20 more?  I have checked , but it does not mention anything about reviewing more tasks.  Or is Bill special ;).


Proving that this function is a homeomorphism into $\Bbb R^n$

From Rotman's Algebraic Topology:  For each $n \ge 1$, $\Bbb R P^n$ is obtained from $\Bbb R P^n$ by attaching an $n$-cell, moreover, there is a disjoint union $$\Bbb RP^n = e^0 \cup \dots \cup e^n$$, where $e^n$ is an $n$-cell.  Partial proof:  If $x = (x_1, \dots, x_{n+1}) \in S^{n}$, denote its equivalence class in $\Bbb RP^n$ by $[x] = [x_1, \dots, x_{n+1}]$.  Define $e = \{[x] \in \Bbb R P^n : x_{n+1} \neq 0\}$.  The complement $Y$ of $e$ in $\Bbb R P^n$ is just $\Bbb RP^{n-1}$.  Also, $e$ is an $n$-cell, for $e \cong \Bbb R^n$ via $g : [x] \mapsto (x_{n+1}^{-1}x_1, \dots, x_{n+1}^{-1}x_n)$.  Why is $g$ a homeomorphism?  I'm having a hard time finding a way to show this.  Anyone have any ideas?


I have printed an image with my ink jet printer, an now I want to add some foil on it, for this I need to print on top of it with a toner, however when I put the image on my laser printer it is never printing on the desired areas, there's always misalignment of 0.5/1 cm.. how can I fix this ? is there any printer that can print ink and toner at same time ? or is there any other solution to add toner ? I tried the toner pen but it wasn't a good, the best results are from a laser printer. I don't wanna do the toner on another paper and then cut it and pasted to my original paper... I want to do both on same paper. any solution ?


How to deal with tantrums in an 8-year-old child?

We have three boys aged 4, 8 and 10. The youngest and eldest seem to be fine and no issues, but the middle child is quite willful and having tantrums. It's like he never quite grew out of the terrible twos. Small things the other two have no issue with can upset him and set off a terrible tantrum. He seems to have trouble co-operating with others and getting into rows with other children and teachers.  How should we deal with tantrums at this age? How do we help him improve his "emotional regulation"?


Dimension on Adobe photoshop for 8ftx40ft billboard

I have been asked to design my first billboard which will be 8ft x 40ft. Can someone help me on what dimensions and dpi/ppi it is best to use on Adobe Photoshop. Thank you


Does the formula $(x^n)' = nx^{n-1}$ fail for some value of $n \in \mathbb{Z}$?

It is well known that the formula $$\int x^n dx = \frac{x^{n+1}}{n+1}+C$$  breaks down at $n=-1$ (we get a logarithm).  My question is, does there exist a value of $n \in \mathbb{Z}$ for which the formula $$\frac{d}{dx}x^n = nx^{n-1}$$  breaks down?


"Each person's car" vs. "each persons' car"

Which of the following is correct?        Each person's car has four wheels.   Each persons' car has four wheels.


Making calls through the smartphone using the PC

Is it possible to connect a smartphone through a USB cable to an Ubuntu machine and make or receive phone calls to or from other phones using the desktop?  EDIT: This is not a VOIP based question. What I intend to ask is whether, making phone calls using the GSM / 3G network is possible.


Is it possible to sit at a seat of higher class, for free, after boarding a flight?

I referenced . Herein, suppose that many seats of higher class (eg Premium Economy or Busines Class) are empty after boarding. Also, suppose that the passenger doesn't will to pay anything.   My outright guess is no; a counterargument would be that if everyone  did this, then because there aren't enough such seats, then it wouldn't be fair to the peope who failed to perceive these empty seats.  Yet what would be some arguments in favour? Has this happened? Those empty seats  feel wasteful.


I have one method which returns Multidimensional Array. When I expand and see the data start from index [1,1] how this is done with C# ?  There is no [0,0], [0,1] ...  It start from  [1,1] [1,2] [1,3]   ...  When I initialize for example object[,] = new object[5,5]; The data start from index [0,0].  Here is the whole code  Worksheet cSheet = (Worksheet)workBookE.Worksheets[i]; Range range = cSheet.UsedRange; string address = range.get_Address(); string[] cells = address.Split(new char[] { ':' }); string beginCell = cells[0].Replace("$", ""); string endCell = cells[1].Replace("$", ""); object[,] objectArray = (object[,])cSheet.get_Range(beginCell + ":" + endCell).Value2; // here the index starts from 1,1


How to do this integral $\int_{-\infty}^{\infty}{\rm e}^{-x^{2}}\cos\left(\,kx\,\right)\,{\rm d}x$

How to do this integral  $$\int_{-\infty}^{\infty}{\rm e}^{-x^{2}}\cos\left(\,kx\,\right)\,{\rm d}x$$  for any $k > 0$ ?.  I tried to use gamma function, but sometimes the series doesn't converge.


In python we can decorate functions with code that is automatically applied and executed against functions.  Is there any similar feature in bash?   In the script I'm currently working on, I have some boilerplate that test the required arguments and exit if they don't exist - and display some messages if the the debugging flag is specified.  Unfortunately I have to reinsert this code into every function and if I want to change it, I'll have to modify every function.  Is there a way to remove this code from each function and have it applied to all functions, similar to decorators in python?


I am working on a new brand, which is all about food.   What colors should we use for the logo and website?   I keep reading that red makes you hungry, but i would like to stay away from that color. All of our competitors must have read the same articles.


How do I convert this Java For Each loop into a regular For loop?

I'm trying to convert this for each into a for loop. how do I do that? here's the code im using for (char character: word.toCharArray()) {                     character = Character.toUpperCase(character);                                          if (character >= 'A' && character <= 'Z') {                         count[character - 'A']++;                     }                                      }  Thanks in advance


What does it mean when 'HD' is printed on a lens?

Do the two letters mean High Definition? Are they called HD lenses? How do they differ from normal (SD?) lenses? Please include a plenty of details in your answer..


I run Ubuntu 14.04 and want to use one installation of Firefox with two different profiles for the same logged in Ubuntu user.  How can I set this up, so that I may easily launch both profiles from the Unity launcher?


Why can't I see text on the nopad in dark mode?

Text from selected line is not visible in dark theme mode.   However, text is visible in the normal standard-themed mode. I think it's Ubuntu's user interface error.


how to take a backup of my calender events in galaxy ace duos

is there any way to take a backup of my calender events in galaxy ace duos. am searching for the third party software but couldn't find one.


Story where calories are used as currency

Please forgive the vague details I have here. I heard about this story in passing and wasn't able to learn the title.  From what I gather, the story is set in a future time where food is so scarce that currencies as we know them have been replaced by calories. People trade them for actual food. People are given a base allowance of enough calories to keep them alive but starving, and they have to work in order to earn more calories.


When I say "get", what does it mean to you? A GET request? To retrieve something? To query a database? To call the get method on a C# property?  appears to encompass all of those and more. We should either burn it or split it up.  However, splitting it up would just result it . For the SQL query, we already have . Ultimately, most should questions should be retagged .  Its tag wiki suggests that it is for the HTTP GET protocol, however, there are quesions tagged with  that don't fit that description. A manual retag might be the only solution with ~375 questions tagged with it. There are also some that have both the  tags. The fact that you need two to describe the question shows that they really should be changed to .  As suggested by RiaD, maybe use . We could maybe burn  and replace it with ?


What version of Java should I load onto my Ubuntu 14.10 O/S. Also if there is a specific process needed to install same please provide explicit instructions as I am first learning to use Linux?


Creating a list and struct arrays using C

I'm currently starting out with C so I thought I'd try creating my own custom list. Here's the code:  #include <stdio.h>  struct list {     char data[10];     struct list *n; };  void clist(struct list *a) {     int j=(sizeof(a)/sizeof(a[0]));     j--;         for(int i=0; i<j-1; i++) {         struct list *next=&a[i+1];         a[i].n=next;      } }  int main() {      struct list first = {.data="one", .n=NULL};     struct list second = {.data="two", .n=NULL};     struct list third = {.data="three", .n=NULL};      struct list arr[] = {first, second, third};      struct list *p=&arr[0];      clist(p);      struct list looper = first;      while(looper.n!=NULL) {         printf("%s ", looper.data);         looper = *looper.n;     }      return 0; }   So basically I have a struct that saves a char array and a pointer. I initialize them and then I try to link them together by giving it to the clist method. There lies the problem: it seems clist isn't getting anything useful as the variable j stays at 0. If I do the whole size calculation before giving the array to the clist method, I'm getting the correct 3 as a result. Why is that?


I do not like the youtube link showing how to do a grid in photoshop.  It is really archaic, drawing line by line etc etc. I have a portrait that I need to draw grid over.  Is there a simple way in Photoshop CC?


How is the feather from the trailer related to what has happened so far in the episodes that have aired?

During the trailer launch of Game of Thrones season 8. A feather is shown with a good amount of significance. We have seen this feather related to Robert Baratheon visiting the Crypt of Winterfell but that's the old story.  How is the feather related to season 8 so far what has been aired?


Contact names don’t appear on lock screen whatsapp notifications

the problem I’m experiencing is that contact names do not appear on whatsapp lock screen notifications. For example, if I get a message from Dad, whatsapp only displays the whatsapp logo and “message”, without displaying the sender. When I turn on message previews, I can see both the contact name and the message preview, but I used to be able to see just the contact name (“Dad has sent you a message”) instead of having to see the preview. This just happened as I updated to ios 11.3.1. Anyone having a similar problem? Thank you so much.


There are scripts like  to copy text data, not sure about binary data. What I want to know is if theres a way to paste image data with JS? I want to paste image data that will be uploaded to Imgur for example


A classical inequality involving the central binomial coefficient

I have to prove that for every $n \in \mathbb{N}_+$ $$\binom{2n}{n} \ge \frac{4^n}{2\sqrt{n}}$$  It works for n = 1. But for n+1 I don't know what to do after this:  $$\binom{2(n+1)}{n+1}=\frac{2n!(2n+1)(2n+2)}{n!(n+1)(n+1)!}\ge\frac{4^n}{2\sqrt{n}}\cdot\frac{(2n+1)(2n+2)}{(n+1)^2}=\frac{n\cdot 4^{n+1}+4^n}{2\sqrt{n}(n+1)}$$


Selecting n Number of Rows Starting From The nth Row

SQL-noobie here that wants to modify the following stored procedure into one that selects a specified amount of rows starting from the specified row. For example I want to select 5 rows starting from the 10th row, ie 10, 11, 12, 13, 14, 15.  Here is what my SP looks like atm:  SELECT Posts.Slug, Comments.commentId, Comments.[date], Comments.name, Comments.[text] FROM Comments  INNER JOIN Posts ON Comments.postId = Posts.Id WHERE Comments.approved = 0   I don't need to order the results as I want to read sequentially, in-case that matters.  Thanks!


Google Maps Marker: Position Value Changed

I have an issue with google maps marker where am passing position with longitude and latitude with some values which, after passing to the code below, the value for longitude is slightly changing (some trailing values are being added). Can someone please help me on this? PFB code.  var lat = parseFloat(asset.latitude); var lon = parseFloat(asset.longitude); window.marker[i] = new google.maps.Marker({     position: new google.maps.LatLng(lat, lon),     icon: image,     map: that.map,     animation: google.maps.Animation.DROP,     title: asset.Description,     equipment: "" });   Values passed to marker API:   Trailing value added to coordinate from console:   Here, I have passed longitude as -68.83577 but after it is passed to marker API, its value got changed as -68.83577000000002. My issue is why some trailing values are being added.


How can I install a new version of R in my own directory, e.g., /local/data/project/behi.


Unable to install VirtualBox Guest Additions for Ubuntu 18.04

I have installed Ubuntu 18.04 in Oracle virtual box but I am not able to install Guest Additions to maximize the Ubuntu screen. I have run the following command in the Ubuntu terminal but when I click "Devices => Insert Guest Addition CD Image" I get an error that unable to insert virtual optical disk. How to fix the issue ? I need to maximize the Ubuntu screen. sudo apt install build-essential dkms linux-headers-$(uname -r)


Scanning in Ubuntu 20.10 with HP OfficeJet Pro 8025 scanner

I can’t seem to get the HP OfficeJet Pro 8025 to scanning Linux regularly. The scanning seems to work only sporadically, even though the unit is detected in Ubuntu. I tried installing the HPLIP software, but the install does not succeed in Ubuntu 20.10, something related to Python dependencies not being met. The HPLIP software uses simple-scan for scanning documents. The simple-scan software sometimes works, but a lot of the time the scanning seems to be sporadic. I am using a USB connection and the lsusb command seems to detect the printer/scanner combo fine. Printing with CUPS almost works every time; I only had an issue where the printer wouldn't print once.


First Law of Motion, Gravitational acceleration and Law of Conservation of Energy

When an object leaves a celestial body (e.g. planet or star) with it's escape velocity, according to first law of motion, it will continue travel away from the body with the same speed (without having need of any additional energy). Let's assume that: At time t1 the object has at distance d1 from the celestial body. And At time t2 the object has at distance d2 from the celestial body. Here t2 > t1 and d2 > d1 Now if the object falls from distance d1 back to the body, at the time of impact it will have certain energy. Let's assume this energy is j1 Jules. And if the object falls from distance d2 back to the body, at the time of impact it will have more energy than j1 (Because, d2 > d1 hence gravitational acceleration will cause more speed at the time of impact) Let's assume this energy is j2 Jules Question is: This total system didn't consume any external energy (neither the object was supplied with additional fuel after it starts its journey from celestial body). Then how does it generate more energy just by travelling for more time in space? How can this be explained in the context of law of conservation of energy? Update 1: This is not question about escape velocity. It's more about how to explain relation of energy of impact of a trajectory (if it falls back) with the amount of time it has travelled in space. More the amount it travels, more is it's impact. How to explain that especially wrt Energy conservation law. Update 2: I was using some online free fall calculators (for e.g. ,  and ) and they calculated speed exceeding escape velocity for height more than 10 thousand kilometer. That made me to think of this question.


insserv: warning: script 'S99runlcactivator' missing LSB tags and overrides

I am unable to install a new software or upgrade the existing ones. I have been getting insserv warning ()  Please help.


What are all the marriages and child relationships following the final chapter?

In the last chapter of Naruto, some characters got married, and some of them had kids. What is the entire husband-wife-kids set?


I found a limit problem which is $\lim_{n\to\infty}{2n \choose n}$ as we know that $\sum_{i=0}^{n}{n \choose i}^2={2n \choose n}$ now we could transform the given problem as $\lim_{n\to\infty} \sum_{i=0}^{n}{n \choose i}^2$ and as $\sum_{i=0}^{n}{n \choose i}^2$ is a polynomial in $n$, therefore, $\lim_{n\to\infty}\sum_{i=0}^{n}{n \choose i}^2=\infty$ Please tell me if my solution is correct or not,and if it is incorrect then please provide me a solution.  Thanks


How to calculate second derivative using definition?

I am currently reading Analysis on Manifolds by Munkres and this problem has me flustered.  $f(x, y) = \frac{xy(x^2 - y^2)}{x^2 + y^2}$ and $f(0) = 0 $. Show that $D_1D_2 f$ and $D_2 D_1f$ exist at $0$ but are not equal there?  I can calculate $D_1D_2f$ and $D_2D_1f$ using partial differentiation. Thus \begin{align} D_1D_2 f &= \frac{\partial }{\partial x}\left( \frac{\partial f}{\partial y}\right) = \frac{(x^2 - y^2)(x^4 + 10x^2y^2 + y^4)}{(x^2 + y^2)^3}\\ D_2D_1f &= \frac{\partial }{\partial y} \left( \frac{\partial f}{\partial x} \right) = \frac{(x^2 - y^2)(x^4 + 10x^2y^2 + y^4)}{(x^2 + y^2)^3} \end{align} So I know for a fact that this is not the way to go. However, how do I actually calculate $D_1 D_2 f(\bf 0)$ using definition of derivative? I can calculate $D_2 f(\bf 0)$ as follows: \begin{align} D_2 f({\bf 0}) &= \lim\limits_{\lambda \to 0}\frac{f({\bf 0} + \lambda(0 , 1)) - f({\bf 0})}{\lambda} = \lim\limits_{\lambda \to 0} \frac{f(0, \lambda) - 0}{\lambda} \\ &= 0 \end{align} How do I get a closed form function for $D_1 f$ 0r $D_2 f$ so I can take a second derivative?


I have created virtual box hard disk for Ubuntu 16.04 system. I have dynamically allocated hard disk space of 8GB. After installation, the actual size is only around 3GB. My requirement is, now, I want to reduce 8GB space to 4GB because that is enough space. I need this because, I can create a 4GB image from VDI file and then can write this image to 4GB USB sticks. I am using Virtual Box 5.0.24_Ubuntu r108355 and Ubuntu 16.04.1  Note: I have used VBoxManage command to modify hard disk:   # sudo VBoxManage modifyhd Ubuntu-16-04-1.vdi --resize 4096 /usr/lib/virtualbox/VBoxManage: /usr/local/lib/libldap_r-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4) /usr/lib/virtualbox/VBoxManage: /usr/local/lib/liblber-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4) 0%... Progress state: VBOX_E_NOT_SUPPORTED VBoxManage: error: Resize medium operation for this format is not implemented yet!   Basically I faced this problem :  VBOX_E_NOT_SUPPORTED  VBoxManage: error: Resize medium operation for this format is not implemented yet!  EDIT: I wanted to reduce the Virtual Disk Size, not the VDI file itself. I want to make ISO image from VDI file, and shrinking basically did not help me, it was always 8GB.


Find the indefinite integral $\int {dx \over {(1+x^2) \sqrt{1-x^2}}} $

Find the indefinite integral  $$\int {dx \over {(1+x^2) \sqrt{1-x^2}}} $$  Is there a smart substitution or algebric trick that I'm missing? Because integration by parts hasn't helped..


stat -c '%B' * reports the same number 512 for each file. What does %B mean? I don't understand the manual:     %B - The size in bytes of each block reported by ‘%b’   Is it related to my block size:  $ sudo blockdev --getbsz /dev/sda1 4096   Thanks.


Functions with the same derivatives  Besides, $f(x)=e^x$,  what other non-zero functions are the same as their derivatives no matter how many times the derivative is taken?


Show that $(0,1)$ and set of positive real numbers are equivalent sets

I try to prove that the open interval $(0,1)$  and $\mathbb{R}_+$ are equivalent sets.   I thought maybe if I define a bijective function between those two sets; it would help, but I couldn't. Can you help with it?


I have the following variables initialized to the user inputs,  int completedPasses = reader1.nextInt();  int attemptedPasses = reader2.nextInt();  double completionRatio = (250 / 3) * ((completedPasses / attemptedPasses) - 0.3);  How do I round the computation above to a double of one decimal place?


Is there a way to access AskUbuntu for seeing questions and their related answers through Linux terminal

I wish to access AskUbuntu in the terminal for seeing questions and their related answers.   My use case is this:  AskUbuntu is an excellent source of learning Linux. But I will have to continuously shift between my browser and terminal every time for seeing the site and learning by typing commands in terminal.   So I wish to atleast browse through the questions and the associated answers from the terminal (My requirement is not to post a new question in AskUbuntu from the terminal, so I don't even require to be signed in). In this way, I can see and type in the terminal itself.   Is it possible?


"Directory(s)", "director(ies)"...: what's the correct parenthetical plural form?

Often times "(s)" is added to the end of a word to represent one or more of something:     "He saved the file(s)."   What do you do when the plural of the word is not created by simply adding an "s?"  Take the word "directory" for example:     "He copied the directory(s)."   That's clearly wrong...     "He copied the director(ies)."   ...also clearly wrong.  What do I do with a word like this?


Using the crop package, we can easily add printer marks. I am look for .     I am wondering if there is a package for this?


they or he/she when the gender/count is not known?

Consider the following sentence. Which one is correct? Why?   Someone called but as soon as they heard my voice they hung up. Someone called but as soon as he/she heard my voice they hung up.


Show that an inverse of a bijective linear map is a linear map.

So I've got a bijection. It clearly has an inverse, but how exactly do I prove that the inverse is a linear map as well?     Suppose that the linear map $T:U\to V$ is a bijection. So $T$ has an inverse map $T^{-1}:V\to U$. Prove that $T^{-1}$ is a linear map.


When I have to decide whether a clause is restrictive/non-restrictive I typically figure out whether the information in the restrictive clause is, in my opinion, necessary. Is this correct or is the fundamental definition that the sentence would grammatically be incomplete without the restrictive clause. I saw some examples where the sentence would be complete without the corresponding restrictive clause, but would like to have a definite answer. Example sentence is:      Would you lend me the video that you told me about last month?   In my understanding, the sentence would be grammatically correct without the restrictive clause ("would you lend me the video?"), and thus, the definition of a restrictive clause depends on the writers judgment!  Thank you!


How is PBKDF2 so much better than normal Hashing or even using HMAC

I do not know how the Key Length extension attack works. So if we leave that aside for once, and say just about usual brute-force attack on the hash, I don't really know how is PBKDF2 so much better than usual hashing.   Mathematically I know that PBKDF2 is so better against rainbow table attacks and also slow to recreate, but as computing power is moving up in the world, how it's still keeping its integrity?  For an HMAC we use a salt, also we can do the same for an usual hash.  So, SHA256('Hello'), is easily rainbow tabled. So if I prepend a salt, it's a little bit better, like SHA256(salt+msg), but Salts are usually kept in DB as clear text, so if some hacker is able to crack that salt, he can manually append the salt and perform the same operation.   Now in HMAC, -> H(key(opad) + h(salt + key(ipad))) is mathematically secure, but one can easily brute-force all possible password by running it through an HMAC operation (if he knows the salt), and he gets the key. A bit slower, but possible, and in pbkdf2, this whole process is looped maybe a million times even, with that much mathematical complexity, yet, if one gets the salt. He could simply run a big list of passwords with through another pbkdf2 function, and maybe very slow, but still possible, right?    So what's the use of this much complex algorithms by hashing and hashing with previous results of HMAC and so on, if it's still very much prone to a slower bruteforce?


How to write Test class for following Apex class?

public with sharing class JournalPage1 {  public integer limitvalue=5; public integer offsetvalue=0; public integer papersize=0;     public Date endDate { get; set; }          Public Date startDate { get; set; }      public List<Author_Research_Paper__c> AuthList { get; set; }      public boolean Showdetailsflag { get; set; }      public List<wrapJournalPage1> WrapList { get; set; }     public PageReference lastPage() {     offsetValue = papersize - limitValue;     callQuery();              return null;     }    public PageReference nextPage() {   offsetValue = offsetValue + LimitValue;     callQuery();         return null;     } public PageReference previousPage() {    if(offsetValue > 0){     offsetValue = offsetValue - LimitValue;     callQuery();     }         return null;     }    public PageReference firstPage() {     offsetValue = 0;     callQuery();         return null;     }  public void callQuery(){  WrapList = new List<wrapJournalPage1>(); // list<Research_Paper__c> rlist=[Select id from Research_Paper__c];   papersize=count;   for(Research_Paper__c rc:[Select Id,Name, Paper_Title__c,Name_of_Primary_Author__c,Status__c,Publication_Date__c from Research_Paper__c  limit:limitvalue OFFSET:offsetvalue]){                wrapJournalPage1 obj=new wrapJournalPage1(rc);                             Wraplist.add(obj);                              }                            }  public void Showdetails() {          List<Id> rpID = new List<Id>();          for(wrapJournalPage1 wp : wrapList)          {          if(wp.flagWrap==true)          {          rpID.add(wp.rcWrap.Id);          }          }          for(Id i : rpID)          {      AuthList=[Select Id, Research_Paper__r.Name, Research_Paper__r.Paper_Title__c, Author__r.Name,                       Research_Paper__r.Status__c, Research_Paper__r.Submission_Date__c                        From Author_Research_Paper__c                        Where Research_Paper__c =: i];          }                    Showdetailsflag=true;     }       public void updated() {         Research=[Select id from Research_Paper__c];                                      count=Research.size();     }     public Integer count { get; set; }      public List<Research_Paper__c> Research { get; set; }          public JournalPage1() { Research=new list<Research_Paper__c>();  }    public PageReference Show() {           WrapList = new List<wrapJournalPage1>();          if(startDate!=null && endDate!=null)     {          Research=[Select Id,Name, Paper_Title__c,Name_of_Primary_Author__c,Status__c,Publication_Date__c from Research_Paper__c where Publication_Date__c>=:startDate AND                                          Publication_Date__c<=:endDate limit:limitvalue OFFSET:offsetvalue];                             count=Research.size();                             for(Research_Paper__c rc:Research)                             {                             wrapJournalPage1 obj=new wrapJournalPage1(rc);                             Wraplist.add(obj);                             }     }             return null;     }     Public class wrapJournalPage1{          Public Research_Paper__c rcWrap{get; set;}     public boolean flagWrap{get;set;}          public wrapJournalPage1(Research_Paper__c rc){             this.rcWrap=rc;             this.flagWrap=false;     }          } }


Proof that a rational is a repeating decimal.

It's true, But how can we prove that fact?


Proof of a different (Russian peasant) method of multiplication

I got this problem in the book Topics in the Theory of Numbers by Paul Erdos and Janos Suranyi and I found it very interesting. I have no idea how to prove this. (Although I believe it can be proved by a lot of methods.)  All I could conclude was the following:   If $A$ and $B$ are two numbers, this method sums the quantity $[\frac{A}{2^i}]\cdot2^iB$ only when the greatest integer function has odd value. (There will be only a finite number of terms as $[\frac{A}{2^i}]$ will eventually become $0$ after some $i>i_0.$) I also tried writing $A$ and $B$ in the form as $A= \sum_{i=0}^{n}    a_i\cdot10^i$ and $B= \sum_{j=0}^{m} b_j\cdot10^j$ but could not reach to any conclusion.   Any sort of help is appreciated.  Also, I would like to know how efficient is this method for calculating the product of two numbers in computer algebra systems (for example PARI/GP) compared to the other methods currently being used?


* I did an update on my Macbook Retina 13" to the most recent version of Sierra OS X. The computer never gets past the Apple logo (black screen with a full progress bar). *  This is a copy of the problem previously written up in November.  None of the solutions worked nor a few others.


I'm looking for a couple of good coined phrases that I can use in front of business people, apologies if the one I had in mind offends anyone.   I'd use "can sleep at night" but I want the phrase to imply legal liability if we don't do something.


Redirecting cout to a console in windows

I have an application which is a relatively old. Through some minor changes, it builds nearly perfectly with Visual C++ 2008. One thing that I've noticed is that my "debug console" isn't quite working right. Basically in the past, I've use AllocConsole() to create a console for my debug output to go to. Then I would use freopen to redirect stdout to it. This worked perfectly with both C and C++ style IO.  Now, it seems that it will only work with C style IO. What is the proper way to redirect things like cout to a console allocated with AllocConsole()?  Here's the code which used to work:  if(AllocConsole()) {     freopen("CONOUT$", "wt", stdout);     SetConsoleTitle("Debug Console");     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED); }   EDIT: one thing which occurred to me is that I could make a custom streambuf whose overflow method writes using C style IO and replace std::cout's default stream buffer with it. But that seems like a cop-out. Is there a proper way to do this in 2008? Or is this perhaps something that MS overlooked?  EDIT2: OK, so I've made an implementaiton of the idea I spelled out above. Basically it looks like this:  class outbuf : public std::streambuf { public:     outbuf() {         setp(0, 0);     }      virtual int_type overflow(int_type c = traits_type::eof()) {         return fputc(c, stdout) == EOF ? traits_type::eof() : c;     } };  int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {     // create the console     if(AllocConsole()) {         freopen("CONOUT$", "w", stdout);         SetConsoleTitle("Debug Console");         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);       }      // set std::cout to use my custom streambuf     outbuf ob;     std::streambuf *sb = std::cout.rdbuf(&ob);      // do some work here      // make sure to restore the original so we don't get a crash on close!     std::cout.rdbuf(sb);     return 0; }   Anyone have a better/cleaner solution than just forcing std::cout to be a glorified fputc?


How to determine a matching color code from a physical sample?

I need to make a restaurant menu design that matches restaurant wallpapers. For some reason my client cannot get color codes used in wallpaper, but he provided me with a sample. (see below)    How can I get the correct color codes from the wallpaper? (someone mentioned that there are scanners for this purpose, but I could not find any information regarding that)  Let me know if this question should be in another site.


I just tried to edit a post on Stack Overflow but when I pressed the 'edit' button it showed me this message on a white page.    I know what the message means but I don't think it is supposed to show up in a white page. So, is this a bug or is it something else?


Should I post an answer to my own question if the answer is obtained in the comment section?

Should I post an answer to my own question if I obtain the answer through the hints in the comments section after a reasonable amount of discussion, or should I leave it to future readers to make their way through the comments?  Edit:There is a new link attached classifying this as a duplicate talks about the answer already being posted, whereas I'm talking of a situation where no answer is posted and the answer is arrived at in the comments.


Missing repository problem (404 Not Found)

My system spec is:   Release 15 (olivia)     Kernel Linux 3.8.0-19-generic    MATE 1.6.0   I have recently been unable to install or upgrade any new package. I am getting many errors like this:  Err http://archive.ubuntu.com/ubuntu/ raring/main libcairo-script-interpreter2 amd64 1.12.14-0ubuntu1 404  Not Found [IP: 91.189.91.14 80]   I also added the following line to the /etc/apt/sources.list file, but it didn't help either (the following line is the only line in that file):  deb http://old-releases.ubuntu.com/ubuntu oneiric-security main restricted universe multiverse   How can I solve the problem?  p.s. The content of /etc/apt/sources.list.d dir:       local-repository.list   nvbn-rm-ppa-raring.list   official-package-repositories.list   plexydesk-plexydesk-dailybuild-raring.list


Is the Radeon HD 7650 compatible with ubuntu?

I am planning to buy a new notebook. I found a cheap one with Radeon HD 7650M . Will it be fully supported by Ubuntu? I had problems with my previous ATI card (xpress 1250) and I do not want to have the same problems again.


I have this configuration :  location / {     root /etc/nginx/euchet; }  location /app/ {     proxy_pass http://172.16.184.2:8080;     proxy_redirect off;     proxy_set_header Host $host;     proxy_set_header X-Real-IP $remote_addr;     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;     proxy_set_header REMOTE_ADDR $remote_addr; }   And I need to add another location with auth_basic enabled only for the request: /app/f?p=3000  I tried with rexexp:     location ~ \/appt\/f\?p=3000 {             auth_basic "Hello! Enter password";             auth_basic_user_file /etc/nginx/euchet.htpasswd;              proxy_pass http://172.16.184.2:8080;             proxy_redirect off;              proxy_set_header Host $host;             proxy_set_header X-Real-IP $remote_addr;             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;             proxy_set_header REMOTE_ADDR $remote_addr;     }   Nginx use previous location /app/.  I tried another way:  location ~* /euchet/f {      if ($arg_p = "4550") {         return 403;     }      error_page 403 = @hidden; }     location @hidden {             auth_basic "Hello! Enter password";             auth_basic_user_file /etc/nginx/euchet.htpasswd;              proxy_pass http://172.16.184.2:8080;             proxy_redirect off;              proxy_set_header Host $host;             proxy_set_header X-Real-IP $remote_addr;             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;             proxy_set_header REMOTE_ADDR $remote_addr; }   And I get 403 error on f?p=3000, and 404 errors on f?p=<another_number>  How can I fix this problem?


Can a soccer player steal the ball while the goalkeeper bounces it on the ground?

When the ball is being bounced by the goalkeeper from his hands and a player steals it without touching the goalkeeper (while the goalkeeper is not touching the ball) and scores, is it legal or not?   shows what I'm talking about.


User is suspended till '18, but it is 2019 and he/she is still suspended?

Just now I saw a user with a banner on his/her profile page that says the user is suspended until '18.  Right now, it is 2019.  The user should have been set free last year, but for some reason he/she still appears to be suspended with only 1 reputation.          Why is the user still appearing to be suspended?  It seems to be a kooky error to me.  Can anyone please try to fix this bug, or at least explain to me what is going on?  -


Curse of dimensionality- does cosine similarity work better and if so, why?

When working with high dimensional data, it is almost useless to compare data points using euclidean distance - this is the   However, I have read that using different distance metrics, such as a cosine similarity, performs better with high dimensional data.  Why is this? Is there some mathematical proof / intuition?  My intuition is that it's because the cosine metric is only concerned with the angle between data points, and the fact that the plane between any two data points and the origin is 3 dimensional. But what if two data points have a very small angle but lie "far away" from each other (in an absolute difference sense) - then how would they still be considered close / similar?


I have problem with this code:  import paho.mqtt.client as mqtt import datetime import time global global_x global_x = 0  mqtt_topics = [("esp8266-1",0), ("esp8266-2",0)]  def on_connect(client, userdata, flags, rc):   print("Connected with result code "+str(rc))   print(datetime.datetime.now())   client.subscribe(mqtt_topics)  def on_message(client, userdata, msg):   global_x = int(msg.payload)   #print(str(msg.topic)+" "+str(msg.payload) + " " + str(datetime.datetime.now()))  client = mqtt.Client() client.on_connect = on_connect client.on_message = on_message client.connect('localhost', 1883, 60)  try:   while True:     client.loop_start()     time.sleep(2)     print(global_x)     client.loop_stop()  except KeyboardInterrupt:   print("CTRL-C: Terminating program.")   How to use value global_x? I would like to use it as variable to run my camera to right active esp8266.  I've checked everywhere and didn't find solution. Printing values only works fine, but I can't use this data. This code only produces "0", instead of "1" or "0" (depending of PIR sensor value). Printing msg.payload works perfectly.


I'm using Ubuntu 18.04 with GNOME desktop.  Please advise which will be the easy way to increase the top bar size as well as font size.


How does `\pgfmathanglebetweenpoints` work?

I'm trying to understand how \pgfmathanglebetweenpoints works. Why here it turns out that X = 243.57? Thanks.  \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}  \pgfmathanglebetweenpoints{\pgfpoint{0cm}{1cm}}{\pgfpoint{-1cm}{-1cm}} \edef\angleX{\pgfmathresult} \node at (3,0) {X=\angleX}; \end{tikzpicture} \end{document}


I downloaded a bunch of wpts from my gps. I converted them to .SHP format with a CRS WGS 84  in QGIS, and started a new project. I then exported some satelite imagery from the internet as a tiff and imported it as a raster in my project as WGS 84. I have CRS 'on the fly, enabled, but I still cannot see both layers at once. I can zoom between layers but they wont overlay.


How do you install Grub2 on a USB stick?

How do you install Grub2 on a bootable USB stick?  Somewhere I've heard that Grub2 can boot directly from ".iso" images, so I'm hoping Grub2 will make it easy to drag-and-drop several "liveCD" iso images onto a bootable USB stick and try them out.


SUB-TREE WITHIN A TREE in MySQL  In my MYSQL Database COMPANY, I have a Table: Employee with recursive association, an employee can be boss of other employee. A self relationship of kind (SuperVisor (1)- SuperVisee (∞) ).     Query to Create Table:    CREATE TABLE IF NOT EXISTS `Employee` (   `SSN` varchar(64) NOT NULL,   `Name` varchar(64) DEFAULT NULL,   `Designation` varchar(128) NOT NULL,   `MSSN` varchar(64) NOT NULL,    PRIMARY KEY (`SSN`),   CONSTRAINT `FK_Manager_Employee`                 FOREIGN KEY (`MSSN`) REFERENCES Employee(SSN) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;   I have inserted a set of tuples (Query):    INSERT INTO Employee VALUES   ("1", "A", "OWNER",  "1"),     ("2", "B", "BOSS",   "1"), # Employees under OWNER   ("3", "F", "BOSS",   "1"),   ("4", "C", "BOSS",   "2"), # Employees under B  ("5", "H", "BOSS",   "2"),   ("6", "L", "WORKER", "2"),   ("7", "I", "BOSS",   "2"),   # Remaining Leaf nodes     ("8", "K", "WORKER", "3"), # Employee under F        ("9", "J", "WORKER", "7"), # Employee under I        ("10","G", "WORKER", "5"), # Employee under H   ("11","D", "WORKER", "4"), # Employee under C  ("12","E", "WORKER", "4")     The inserted rows has following Tree-Hierarchical-Relationship:                A     <---ROOT-OWNER         /|\                     / A \               B     F      //| \    \              // |  \    K        / | |   \                       I  L H    C         /     |   / \  J     G  D   E   I written a query to find relationship:    SELECT  SUPERVISOR.name AS SuperVisor,          GROUP_CONCAT(SUPERVISEE.name  ORDER BY SUPERVISEE.name ) AS SuperVisee,          COUNT(*)   FROM Employee AS SUPERVISOR    INNER JOIN Employee SUPERVISEE ON  SUPERVISOR.SSN = SUPERVISEE.MSSN  GROUP BY SuperVisor;   And output is:    +------------+------------+----------+ | SuperVisor | SuperVisee | COUNT(*) | +------------+------------+----------+ | A          | A,B,F      |        3 | | B          | C,H,I,L    |        4 | | C          | D,E        |        2 | | F          | K          |        1 | | H          | G          |        1 | | I          | J          |        1 | +------------+------------+----------+ 6 rows in set (0.00 sec)   [QUESTION] Instead of complete Hierarchical Tree, I need a SUB-TREE from a point (selective) e.g.: If input argument is B then output should be as below...  +------------+------------+----------+ | SuperVisor | SuperVisee | COUNT(*) | +------------+------------+----------+ | B          | C,H,I,L    |        4 | | C          | D,E        |        2 | | H          | G          |        1 | | I          | J          |        1 | +------------+------------+----------+      Please help me on this. If not query, a stored-procedure can be helpful. I tried, but all efforts were useless!


Should I submit https:// and http:// in Google Search Console both with and without the www?

In my site I'm redirecting everything (http://, http://www., https://) to https://www.example.com.  Google webmaster tools says: Make sure you add both "www" and "non-www" versions for your site. Also, if you use the HTTPS protocol, add those variations as well.  So I've added all the FOUR versions to google webmaster tools. Is this a correct process?


First view of the question on Stack Exchange sites

I am just curious about the very first viewer of the question as soon as you post any question. It always show that "viewed 1 time".   Is this like we are the very first viewer of our own question as soon as we post it? Or there is some bot who views your question as soon as you publish it?


To create bottle neck by extruding outwards all faces normally?

I want the portion of the bottle as shown by red arrows in the image. So I need to do something like extrusion but how to extrude it towards the center and away from the center?


Finite-dimensional subspaces of normed vector spaces are direct summands

Here is a problem in functional analysis from Folland's book:     If $\mathcal{M}$ is a finite-dimensional subspace of a normed vector space $\mathcal{X}$, then there is a closed subspace $\mathcal{N}$ such that $\mathcal{M}\cap \mathcal{N} = 0$ and $\mathcal{M}+\mathcal{N} = \mathcal{X}$.   I tried the following approach: I am trying to define a projection map $\pi_{\mathcal{M}}$ from $\mathcal{X}$ to $\mathcal{M}$, which would be continuous and hence taking the inverse of any closed set would give a closed set in $\mathcal{X}$. I am confused about what the projection map would be. Please suggest some approach.


I am looking for a particular linguistic term for this process of turning words like hot into words like heat. English has a bunch of pairs like these:  Hot -> heat Whole -> heal (Folk)lore -> learn Dole -> deal? Token -> teach?  What is going on there? What does it mean?


Use Web Browser (Google Chrome or Firefox) to Open Web Sites from a List in File

I have a (text) file containing a list of web site addresses. I know that I can open the file in an editor and then copy-paste the addresses to the browser address bar. That means, if I have ten addresses in that file, I will need ten copy-paste operations, which must be tedious. But is there a way to ask the browser (preferably Google Chrome or Firefox)  to open all of them in one go in different tabs?  I am using Ubuntu, if that is related in any way to the solution you provide.


Book Recommendation for Lagrangian and Hamiltonian Mechanics

I'm looking for a book recommendation for an undergraduate level textbook covering Lagrangian and Hamiltonian Mechanics. I'll be taking the second course on classical mechanics in the upcoming term. Ideally, I'd like a textbook that -- in addition to focusing on the application of the principles to solve physical systems, as mostly done in "$\text{PHY}: 101$" -- focuses on the theoretical aspects as well -- Poisson Brackets etc. Most of the textbooks I have seen seem to focus only on the former.  Since ideas in Hamiltonian and Lagrangian Mechanics pop up everywhere -- from non relativitic QM to QFT -- I'd appreciate if someone can recommend an undergraudate level textbook that caters to both of the aforementioned criteria.


Evaluating $\int_0^1 \sqrt{1 + x ^4 } \, d x $

$$ \int_{0}^{1}\sqrt{\,1 + x^{4}\,}\,\,\mathrm{d}x $$   I used substitution of tanx=z but it was not fruitful. Then i used $ (x-1/x)= z$ and $(x)^2-1/(x)^2=z $ but no helpful expression was derived. I also used property $\int_0^a f(a-x)=\int_0^a f(x) $ Please help me out


I know that equivalent capacitance of multiple capacitors in series is $$ C = \left(\frac{1}{C_1} + \cdots + \frac{1}{C_n}\right)^{-1} $$ and in parallel is $$ C = C_1 + \cdots + C_n. $$ But there are circuits that are neither in parallel nor series.   So what is the canonical definition of equivalent capacitance?   This question sprung to mind when I tried to find equivalent capacitance in this circuit:    Apparently, there are some techniques known as Y-Delta transforms. But I wouldn't understand it without a clear definition of equivalent capacitance.  This is not a question about calculating capacitance/resistance in parallel or series, but the very definition of "equivalent capacitance."   For example, the definition of equivalent resistance goes something like this. If we replace all the individual resistors with one of equivalent resistance, we get the same current/power (provided constant voltage). In effect, the equivalent resistance is really defined by the ratio $$\Delta V / I$$.   So what is the analog for capacitance? For only one capacitor, its capacitance can be defined as $$\Delta V/Q.$$ But for a network of multiple capacitors (not necessarily in parallel or series), what is the quantity Q here?  Thank you!


Given $abc(a+b+c)=3$ prove $(a+b)(b+c)(c+a)>8$

This is an exceptionally strange question. I have tried with all the methods I know. There is an equality which comes pretty close $(a+b)(b+c)(c+a)>8abc$. Please help me!!


Getting StackOverflow exception during some calculations

I have following code (coords calculations for grenade trajectory)  public class GrenadeTrajectory {     public int speedValue;     public static boolean shotStart;     public boolean stop;     ArrayList<Integer> xA = new ArrayList<Integer>();     ArrayList<Integer> yA = new ArrayList<Integer>();     Executor executor = Executors.newSingleThreadExecutor();     Worms worms = new Worms();     MapSettings MapSettings;     public void startTask()     {           stop = false;         executor.execute(new Runnable()          {             @Override             public void run()              {                 int TRAJECTORY_STEPS = 10;                 double alpha = 45.0;                 double x0 = MapSettings.mp_player1_weapon_position_x;                 double y0 = MapSettings.mp_player1_weapon_position_y;                 double v0 = 50.0;                 double g = 8.91;                 double c = Math.sqrt(Math.pow((worms.getWeaponDirectionPosition(true) + MapSettings.mp_player1_weapon_position_x), 2));                 double degrees = Math.acos((worms.getWeaponDirectionPosition(true) - MapSettings.mp_player1_weapon_position_x) / Math.pow(worms.getWeaponDirectionPosition(true) - MapSettings.mp_player1_starting_position_x, 2) - Math.pow(MapSettings.mp_player1_starting_position_y - worms.getWeaponDirectionPosition(false), 2));                 double[] arrayX = new double[TRAJECTORY_STEPS];                 double[] arrayY = new double[TRAJECTORY_STEPS];                 for (int t = 0; t < TRAJECTORY_STEPS; t++)                 {                      arrayX[t] = x0+v0*Math.cos(degrees)*t;                     arrayY[t] = y0+v0*Math.sin(degrees)*t-0.5*g*t*t;                     System.out.format("t=%d x=%f y=%f", t, arrayX[t], arrayY[t]);                 }                 Thread.currentThread().stop();               }           });     }     public void setCons(Worms w, MapSettings cfg)     {         xA.clear();         yA.clear();         worms = w;     }     public void stopTask() throws InterruptedException     {              stop = true;      }   }   And I'm getting following errors / exceptions:  Exception in thread "main" java.lang.StackOverflowError     at java.util.concurrent.AbstractExecutorService.<init>(AbstractExecutorService.java:71)     at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1305)     at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1198)     at java.util.concurrent.Executors.newSingleThreadExecutor(Executors.java:134)     at com.worms.ShotPower.<init>(ShotPower.java:15)     at com.worms.Worms.<init>(Worms.java:31)     at com.worms.GrenadeTrajectory.<init>(GrenadeTrajectory.java:19)   And those exceptions I have there like 1000 times. Error is on line    double c = Math.sqrt(Math.pow((worms.getWeaponDirectionPosition(true) + MapSettings.mp_player1_weapon_position_x), 2));   What am I doing wrong and how can I fix this? Thanks.


How is the Earth pushing "up"/"outwards" at $9.8\text{ m/s}^2$ in general relativity?

So I've been trying to wrap my head around GR for a bit now, but one thing that keeps me down is the idea that while earth bends spacetime around us, the earth is also accelerating towards us at $9.8\text{ m/s}^2$, which is why objects accelerate towards it at that rate. However, I haven't been able to source this claim, it comes up independently in the information I am consuming. One claim by "ScienceClic English" claims that the geological forces of the earth itself is expanding the earth at a rate of $9.8\text{ m/s}^2$ while the curvature of spacetime keeps earth the same size. You can imagine my difficulties sourcing this as all results on "expanding earth" in any variation returns debunking of the expanding earth theory itself. The other claims do not go into any detail, they merely claim that the earth is accelerating "up" at $9.8\text{ m/s}^2$. What is the deal with this? I feel a force acting upon me, so already there's the natural intuition towards gravity existing. Yet we know gravity isn't a real force, I am just experiencing the curvature of spacetime, but what else? What governs the law that things fall towards the earth at $9.8\text{ m/s}^2$ on earth?


How can I tell Ubuntu 18.04 to do nothing when I close my laptop lid?

I want my laptop to do nothing when I close the laptop lid. I found these options in dconf-editor for the laptop to do 'nothing'. However, the laptop still goes to suspended mode after I close the lid.  What did go wrong?


I am trying to launch Minecraft.jar and I cannot make it boot as an executable. I have gone into the properties and set it to executable, and I have installed jdk-7u55-nb-8-linux-x64.sh with and without superuser. I do run a x64 computer. I recieved the file from the website . I have tried ./Minecraft.jar and java -jar Minecraft.jar  Output of java -jar Minecraft.jar  The program 'java' can be found in the following packages:  * default-jre  * gcj-4.6-jre-headless  * gcj-4.7-jre-headless  * openjdk-7-jre-headless  * openjdk-6-jre-headless Try: sudo apt-get install <selected package>   Output of ./Minecraft.jar  ./Minecraft.jar: line 1: $'PK\003\004': command not found ./Minecraft.jar: line 2: $'\b\b\222t\354B\002': command not found ./Minecraft.jar: line 3: syntax error near unexpected token `)' K-*��ϳR0�3���M���u�I,.�R�K-����KM.JL+�K��/).)J,�s��x�x�PK'K-.


Why didn't Voldemort suspect Snape as a double agent during Philosopher's Stone?

I read something online that got me thinking about this. Why didn't Voldemort suspect Snape had defected from the Death Eaters and was now working for Dumbledore during the events of *Philosopher's Stone?  Voldemort was possessing Quirrell's body and his head was protruding from the back of Quirrell's - in other words, Voldemort was with Quirrell constantly during the events of Philosopher's Stone, presumably overhearing whatever Quirrell himself heard.   Snape cornered Quirrell more than once (Halloween, when Quirrell let the troll in, and the night Harry broke into the Restricted Section over the Christmas holidays to look for information on Nicholas Flamel) and openly threatened him against working for Voldemort and pressuring him to declare his loyalties to Dumbledore. This obviously revealed Snape's loyalty to Dumbledore to Quirrell, and presumably Voldemort, and I can't think of a reason why Voldemort wouldn't have been able to hear Snape strong-arming Quirrell perfectly clearly.   Why didn't Voldemort attempt to make contact with Snape during Philosopher's Stone? After all, Snape was supposedly Voldemort's most faithful servant. How is it Voldemort didn't suspect Snape was working for Dumbledore and didn't orchestrate a move against him? Snape wasn't even pretending to be a double agent during Philosopher's Stone, so why Voldemort didn't kill Snape as soon as he was physically able, or have Quirrell attempt to kill him, is unclear.  So yes, why didn't Voldemort suspect Snape as a double agent during the events of Philosopher's Stone?


So I have this problem, have Windows 7 and Xubuntu 16.04, dual boot screws time in Windows, tried to change /etc/default/rcS as stated in other posts, but UTC = yes line does not appear in that file, never mind, I create the line anyway and set it as stated in those posts, but still when I log into Windows time is wrong again...  Can anyone offer some help?


Can a user reside in one group, but write from another?

We have group Apache and, let's say, "District" group.  All our team members are part of "District" group.  Apache user is part of "Apache" group, and does a lot of work on our server, creating and modifying files. But "Apache" group has fairly strict permissions, so there is no way we "District" group members can write to these files.  How can we help "District" members have write permissions to these files? One way to solve it is to "chmod 777" everything in the Apache group...but...eh. We don't want the anyone to be able to edit these files...just people from "District" group.  Question: Is it possible to make "Apache" user remain in "Apache" group, but write as part of "District" group? (and, therefore, have all Apache-authored files become accessible to "District" members)


Generate normally distributed random numbers with non positive-definite covariance matrix

I estimated the sample covariance matrix $C$ of a sample and get a symmetric matrix. With $C$, I would like to create $n$-variate normal distributed r.n. but therefore I need the Cholesky decomposition of $C$. What should I do if $C$ is not positive definite?


How come the cosmological constant supports the idea of dark energy existing?

According to an article I've read recently, the cosmological constant was used to support the theory of dark energy. But the cosmological constant already defines an inclination in the essence of cosmos. And the dark energy is also a force that causes the galaxies to move away from each other with a growing acceleration. So if they cause the same things to happen eventually, wouldn't they disagree with each other and can not exist at the same time? Is it me lacking knowledge about these terms or did I get the article wrong?


I've been googleing and ran across  little blog post. It has a bit of information stating the the & symbol was at one point the 27th letter in the alphabet.     For years the & symbol (now known as the ampersand) was the final,   pronounced “and” but recited with the Latin “per se,” meaning “by   itself.” The position and pronunciation eventually ran together, with   “X, Y, Z, and per se and” becoming “X, Y, Z, ampersand.”   I have to wonder how could a symbol be in the alphabet? My understanding is that letters represent sounds and the putting the sounds together make words. If & was a letter for the combined sound that the word "and" makes was it ever used in the spelling of a word? Something along the lines of “h&” for hand? Also, why was & in the alphabet and not other symbols like % or #?  I don't think this is a duplicate as I'm not looking for the definition of the & symbol or the story of where it came from but rather its use as a letter in the alphabet and any words that used it in their spelling. The linked blog states it was the 27th letter but gives no examples of word usage.


All of us experienced with this function : $$x^{x}$$ It's easy to differentiate it, so my question is: How to differentiate this function:  $$x^{{x}^{...}}$$, maybe there is some recurrence equation? For example there is $n$, $x$ in "stairs". P.S. sorry for my English skills


I have line in script which is working, but not working from command line.  echo "User ALL = NOPASSWD: ALL, !/bin/su" | sudo tee -a /etc/sudoers    [user@localhost ~]$ echo "test ALL = NOPASSWD: ALL, !/bin/su" | sudo tee -a /etc/sudoers bash: !/bin/su": event not found [user@localhost ~]$   Edit: I am trying to add a sudo user with no permission to su command and sudo user have password less access to root using sudo -i. I was just checking each command in that script, to see how they work in command line.  I found a workaround for this in command line, that I have to use "'!'"/bin/su. So can someone help to explain why this didn't work in command line?


Modify systemd unit file without altering upstream unit file

I have installed the pimd service by means of apt. This comes with an upstream systemd unit file (/lib/systemd/system/pimd.service).  I want the service to be restarted when for some reason it gets killed, hence I wish to add the line Restart = always in the unit file.   However, I don’t want to modify the upstream unit file.  Is there any workaround for this?


Can I travel with my New Zealand visa on my old passport

I am an Indian national and would like to ask a question about my travel to New Zealand. My old passport contains my New Zealand visitors visa which is still valid for 8 months. Recently my old passport has expired and I got it replaced with a new passport. I am planning to visit my friends there and just wondering can I just travel  New Zealand with visa in my old passport?


How find series $\sum_{n=1}^{\infty}\frac{(-1)^{[\sqrt[m]{n}]}}{n^a}$?


nullpointer when using shared prefference in no activity class

so i am trying to use my shared prefference in a no activity class but i keep getting null pointer on my     private SharedPreferences setingPreferences = context.getSharedPreferences("Settings", Activity.MODE_PRIVATE);    how do i solve this?   public class ConnectionClass {     Context context;     private SharedPreferences setingPreferences = context.getSharedPreferences("Settings", Activity.MODE_PRIVATE);     String ip;     String classs = "net.sourceforge.jtds.jdbc.Driver";     String db = "ISTABLocalDB";     String un = "istab_wpf";     String password = "istab_!234";     @SuppressLint("NewApi")     public Connection CONN() {         ip = setingPreferences.getString("server", "");         StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()                 .permitAll().build();         StrictMode.setThreadPolicy(policy);         Connection conn = null;         String ConnURL = null;         try {             Class.forName(classs);             ConnURL = "jdbc:jtds:sqlserver://" + ip + ";"                     + "databaseName=" + db + ";user=" + un + ";password="                     + password + ";";             conn = DriverManager.getConnection(ConnURL);         } catch (SQLException se) {             Log.e("ERRO", se.getMessage());         } catch (ClassNotFoundException e) {             Log.e("ERRO", e.getMessage());         } catch (Exception e) {             Log.e("ERRO", e.getMessage());         }         return conn;


Crash when passing to other activities-Android

The app crashes when you click the button. There is a NullPointerException error, how can I fix that?  XML file of the crash button   <Button     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="@string/clickaqui"     android:id="@+id/registro"     android:layout_below="@+id/textView"     android:layout_centerHorizontal="true"     android:onClick="onRegister"/>   AndroidManifest:  <application     android:allowBackup="true"     android:icon="@mipmap/ic_launcher"     android:label="@string/app_name"     android:supportsRtl="true"     android:theme="@style/AppTheme" >     <activity android:name=".CreateMessageActivity" >         <intent-filter>             <action android:name="android.intent.action.MAIN" />              <category android:name="android.intent.category.LAUNCHER" />         </intent-filter>     </activity>     <activity android:name=".RegisterActvity"         android:label="@string/app_name">     </activity> </application>     Code of the crash button:  Intent intent = new Intent(CreateMessageActivity.this,    RegisterActvity.class);         startActivity(intent);


Differences between various official Microsoft Windows .iso files

I want to make a bootable USB thumb drive to install Windows on my computer. I don't want to use my old DVD to create an image and then upgrade to SP1, so I decided to download an untouched .iso file that already has SP1 in it. My question is this, is there a difference between these two files files?     en_windows_7_home_premium_with_sp1_x64_dvd_620851.iso   vs     en_windows_7_home_premium_with_sp1_x64_dvd_u_676549.iso   What does dvd_u mean, is it somehow different from plain dvd? Also will these work with my retail Home Premium key or do these work only for thoe with TechNet/MSDN accounts?


Jquery script not loading on site Front page

I've been working on updating a site which was running on an old version of WordPress, I've had to update the theme, most of the plugins and finally got the WordPress up to date. I've had to do a few customisations including using plugins to replace old theme functions that the site used which are not present/working in the updated theme. The theme is now not supported by the developer.  The only thing stopping the site going live is that a scroll up button doesn't work properly on the Home page. The scroll up button appears after a user scrolls down a page and when clicked on smooth scrolls to the top of the page and disappears. This is acheived using a bit of jQuery that has been added to the theme's custom.js file.  The custom.js file starts with the line:  jQuery(document).ready(function($) {   The button script works fine on all the other pages but not on the front page where it seems the jQuery script has not been loaded. Here's the bit of jQuery:      /* --------------------------------------------------------------------------- */ /*  13. Back to Top /* --------------------------------------------------------------------------- */  $("#back-top").hide();  $(window).scroll(function () {     if ($(this).scrollTop() > 100) {         $('#back-top').fadeIn();     } else {         $('#back-top').fadeOut();     } });  $('#back-top a').click(function () {     $('body,html').animate({         scrollTop: 0     }, 600);     return false; });  });   I'm at the point where I'm just going to wpenqueue the required script to make it work anyway but I'd rather fix the problem which may be obvious to some but now has me going in circles.  The site can be seen at   UPDATE 28/10/2013:  I've copied the jQuery code and put it into its own script and enqueued the script via functions.php. I can see the script (backtotop.js) loading but it still isn't working on the home page but works on all others.  Here's the script:  jQuery(document).ready(function() {     jQuery("#back-top").hide();      jQuery(window).scroll(function () {         if (jQuery(this).scrollTop() > 100) {             jQuery('#back-top').fadeIn();         } else {             jQuery('#back-top').fadeOut();         }     });      jQuery('#back-top a').click(function () {         jQuery('body,html').animate({             scrollTop: 0         }, 600);         return false;     });  });   The site is at


Reference different places to the same footnote

For example, I want to make footnotes both at Sentence 1 and Sentence 2 (which are on the same page) to the same footnote. Wikipedia's "References" have this effect.


Can't propose tag synonym (already proposed)

A while ago   with . They are indeed exactly the same thing.  However, somebody has also proposed to make  a synonym of :   not only is this proposal disputable: web start is the deployment mechanism whereas jnlp is an xml file that holds the configuration required for the deployment - so even though the 2 concepts are closely related, they can't really be called synonyms but it also prevents anybody to suggest the webstart/java-web-start synonym: "synonym java-web-start already proposed on the tag jnlp"   The situation could go on forever (it has already been a few months). Is there anything that could be done about this?


Jquery line item script calculations and ajax calls

This question is a part of my other question . I have fiddled and example of the broken line item feature. You can use the add row button to add rows and the tiny square to the right is supposed to be a glyphicon trash can which will remove a row.   In the example given you will notice that the first two lines which are part of page load will allow you to edit quantity and rate values and will auto updated the subtotal and grand totals. The issue comes in when you add a new row and attempt to update the quantities and rates. Nothing happens.  I believe this conflict is due to something I am not seeing in the following functions. OR, worse yet something to do with the table row being added and jquery not being allowed to access the elements.  $('#addVar').on('click', function(){    var varCount = $('#lineitem tr').length;    $node = ['
',     ''+varCount+'	',     '<select name="itemID[]" class="itemID form-control">',     '<option disabled selected>Product/Service</option>',     '</select>	',     '<input class="itemdetail form-control" type="text" name="describe" value=""/>	',     '<input id="qty" class="qty form-control" type="text" name="qty" value="0"/>	',     '<input id="rate" class="rate form-control" type="text" name="rate" value="0.00"/>	',     '<input id="amount" class="amount form-control" type="text" name="amount" value="0.00"/>	',     '	',     '
'].join('\n');   $('#lineitem > tbody:last').append($node); });   and  $("select.itemID").mousedown(function(){     var $this = $(this);     if (data) {         $(this).val(data);     } else {         itemList();         $(this).html(result);     } });     Other factors from the original question will have effects on this row. like select list on mousedown and on change events ( which dont work either ) are intended to populate the row after which the user would be able to edit quantity and rates.  EDIT** before duplicating with questions like that one be sure to read the code.... EVERYTHING is bound to .on() events therefore is not a duplicate problem.. Something else is wrong. I have triwd variations of .on("mousedown","#itemID" function... they change nothing directly


I was just wondering how to get this JButton "nextButton" to work. It is used by the actionPerformed method for the e.getSource instanceof JButton. How can I make it to work alone?          if(e.getSource() == nextButton){             try {                 stmt.executeUpdate("UPDATE seats SET type = 'booked' WHERE seatNum = 3");              } catch (SQLException e1) {                 // TODO Auto-generated catch block                 e1.printStackTrace();             }         }          if(e.getSource() instanceof JButton){             bookedIcon = new ImageIcon("images/bookedSeat.png");              int a = Integer.parseInt(e.getActionCommand());             int seat = a;             a =- 1;             seatsA[a].setIcon(bookedIcon);          }


I was wondering something regarding the Back To The Future movie: Marty McFly is on stage and he's playing Johnny B. Goode. Marvin Berry phones his cousin Chuck Berry (the person who wrote the song).  Chuck hears the song and he uses it as a hit for himself. Now at this point Chuck learns the song through Marty but Marty learned it through Chuck. There is no actual creation moment of the song as both parties copied the song. So doesn't that mean the song can't exist at all? What kind of paradox would this be?


Uninstall software not listed in Ubuntu Software Center

My question is, how is software not listed in Ubuntu Software Center uninstalled?


$$\lim_{n\rightarrow\infty}\sqrt[3]{n^3+n^2}-\sqrt[3]{n^3+1}\rightarrow\frac{1}{3}$$  I tried to say we can erase the $1$ from the equation, as it's a constant. But I don't know how to do the rest without running into this mistake: $$\lim_{n\rightarrow\infty}\sqrt[3]{n^3+n^2}-n=\frac{\sqrt[3]{\frac{n^3}{n^3}+\frac{n^2}{n^3}}-\frac{n}{n}}{\frac{1}{n}}=\frac{1-1}{0}$$


I'm traveling to Rome from Delhi, India, via Kuwait. What are the options available to spend the transit time (approximately 6 hours) in the airport? I also have a 5-year-old kid with me. Are there some affordable sleeping places? And the entire transit time is at night.


Is it possible to have Google Chrome always open shortcuts in a separate window?

If Chrome is already open, it opens new sites (e.g. from Windows shortcuts, application shortcuts, or from the Run dialog) in new tabs of the existing instance.   I'd prefer to open new sites in a separate window (a new instance of Chrome).   I don't see that in the options - is it possible?


If gcd(a, b) = 1 and a | bc. Prove that a | c.

Let a, b, c ∈ N such that (a, b) = 1 and a | bc. Prove that a | c.  I'm a little confused about if I'm doing this proof right.  I know that $\exists  p, q \in \mathbb{Z}$. Such that $pa = bc$ and $qa=c$. Re-arranging the first equation.  $$a = \frac{bc}{p} $$  Substituting this into the second equation.  $$ qa = c$$ $$ q(\frac{bc}{p}) = c$$ $$ \frac{qb}{p} c =c $$ $$ \frac{qb}{p} c =c $$  Thus this equation divides c. Therefore a | c. Does this proof make sense.  Thank you for any guidance.


How to prove using math induction that $\forall n\in \mathbb{N}$, $\sum ^{n}_{i=1}i^{2}=\frac{1}{6}n\left( n+1\right) \left(2n +1\right)$?

Use mathematical induction to prove that $\forall n\in \mathbb{N}$, $$\sum ^{n}_{i=1}i^{2}=\dfrac {n\left( n+1\right) \left(2n +1\right) }{6}$$


How to identify the app/process which re-mounts partitions R/W, creates files and changes file permissions?

I have a rooted device, with superuser rights granted to a few apps I trust. I have often found my /system or /vendor partition mounted read/write, and some files chmoded to 0777. Similarly directories/files with random names are created/deleted (e.g. /sdcard/.a03Degpoif), .nomedia files are created inside them to hide their contents from gallery etc.  logcat/dmesg contains no traces of all this happening in background. This doesn't happen periodically but in a slapdash way, internet connectivity isn't a condition either. I have tried disabling/uninstalling apps, looking for any suspicious processes running, but couldn't identify the culprit(s).  Is there a way to figure out who is doing this?