I use . I love .  How do I replace Notepad with Notepad2 in Windows 7, so I never use the old version of Notepad again?

OK, I really really want to replace the default notepad.exe in Windows 7 with Editpad (yes, I want to replace the actual executable, and no I don't want to use something like Notepad2, so please don't suggest that).  I used the following batch script which has worked for me before:  @echo off TITLE EditPad Install Script for Complete Windows Vista and 7 Notepad Replacement echo. echo EditPad Install Script for Complete Windows Vista and 7 Notepad Replacement echo Version 2.0 echo. echo Confirm to apply? (Press Ctrl-C and answer Y to terminate) pause echo. echo.  if exist %SystemRoot%\notepad.original.exe goto exist_editpad_already if exist %SystemRoot%\System32\notepad.original.exe goto exist_editpad_already takeown /f %SystemRoot%\notepad.exe takeown /f %SystemRoot%\System32\notepad.exe icacls %SystemRoot%\notepad.exe /grant "%USERNAME%":f icacls %SystemRoot%\System32\notepad.exe /grant "%USERNAME%":f IF EXIST %SystemRoot%\SysWOW64 (bcdedit.exe -set loadoptions "DDISABLE_INTEGRITY_CHECKS") copy %SystemRoot%\notepad.exe %SystemRoot%\notepad.original.exe copy %SystemRoot%\System32\notepad.exe %SystemRoot%\System32\notepad.original.exe echo. echo Original notepad.exe has been renamed to "notepad.original.exe" in its original folder. echo. echo Overwriting %SystemRoot%\notepad.exe with "%~dp0\EditPad.exe" copy "%~dp0\EditPad.exe" %SystemRoot%\notepad.exe /y echo Overwriting %SystemRoot%\System32\notepad.exe with "%~dp0\EditPad.exe" copy "%~dp0\EditPad.exe" %SystemRoot%\System32\notepad.exe /y echo. echo EditPad installation is completed. echo If no error occurred, EditPad will now replace all Notepad functions. echo. pause goto eof  :exist_editpad_already echo. echo INSTALLED EditPad ALREADY! (notepad.original.exe exists in windows or windows system32) echo. pause goto eof  :eof   This script did replace notepad.exe with the Editpad executable, but now if I try and open a text file, I get the error "Your copy of NOTEPAD.EXE appears to have been damaged. Please try reinstalling it from the original setup package."  I am using Windows 7 64 bit.  What could I do to force Windows to let me use Editpad as my notepad.exe without giving me this stupid error message?  UPDATE: I think I have some more information that may help things a bit.  The problem seems to be with me running editpad.exe at all inside the system32 directory.  If I substitute various other exe files for system32\notepad.exe they run fine, but when I try to run editpad.exe inside that directory, Windows 7 gives me a popup dialog: "The publisher could not be verified.  Are you sure you want to run this software?"  If I click Run, I get the 'file is damaged' error - but ONLY if I'm running it inside the system32 directory.  I need to find a way to get this exe running inside the system32 directory.


If a credit card says you get something like, "0% APR for the first 12 months," does that mean you can get by with paying only minimum payments and not have any accrued interest build up?  If so, wouldn't it be better if they just advertised it as being of no interest?  If not, what's the difference  between 0% APR and whether or not you pay interest?

(Read the normal print for an amusing story, skip to the bolded text for more important info)  To begin, I'm a scallywag.  I saw that card offer in the mail and did some digging because I'm not used to credit cards. 0 percent APR for 12 months and APR is the interest that builds up if you don't pay on time. I pay on time. I wait until the last second but always on time so I'm decent with that. But how awesome would it be to have a card that I don't have to pay off for 12 months? I'm not even a spendthrift, ask my mom, I'm frugal as hell. Still, 12 months of not having to think about paying the bill. Nice.  So I get the Bank of America card, I'm approved, it shows up two days ago. And I'm reading through the pack of stuff because I'm plain like that. And I look at the interest and fees section - because I really don't know what I'm doing and if this 0 APR thing is legit.  It doesn't seem like it is. Or at least the way this is worded is a bit confusing to me.  The APR is 0.00% through to my statement Closing Date in February 2018, so almost 12 months. I have an Introductory Offer ID that I don't know what to do with, after which the APR will be 20 something percent. Same with Balance Transfers.  So then I go to the fees section. Promotion Offers are temporary offers, yada yada yada, but then at the bottom, not even bolded, it says:  "If you revolve your balance to take advantage of a Promotional Offer, all transactions and balances, including purchases, will be charged interest."  Huh?  So I look up "what is revolving a balance?" It's basically not paying on time, revolving the balance by waiting another month or so, at least I think that's what it means.  But isn't that the entire point of having 12 months with 0 percent APR? That can't possibly be right or else why would anyone get excited - knowing that they have to pay their bill by the end of the following month anyway or else they'll be charged interest? I googled more about "what 0 APR means/revolving balances/dangers" but nothing useful came up.  Then I thought, "maybe only certain cards allow you a 23-25 day grace period, and this one doesn't, so they offer you 12 months of paying your bills "on time" and ignoring any daily interest. But, that's not true, becaus e my due date is at least 25 days after the billing cycle.  Basically I don't understand how having 0 Percent APR helps anyone if you basically have to pay the bill on time anyway to reap the benefit.    Thank you for any answers and for


Something happened with my windows 10 computer and it wont start up as it should. To solve this I have gotten myself a Ubuntu Live USB stick and plugged it and managed to start the Ubuntu OS up. So, now when I tried to access the harddrive from the “Files“ dropdown menu it gives the following error message...  “Unable to access “1000 GB Volume”  Error mounting /dev/sda4 at /media/ubuntu/0C1281071280F6CC: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=999,gid=999" "/dev/sda4" "/media/ubuntu/0C1281071280F6CC"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.“   I have at least found out that I might be able to “force“ ubuntu to open the disk, but I do not know how. (Some comands to enter into terminal perhaps?)  My question, how do I get access to my harddrive through Ubuntu so I can save some files from the not functioning computer?

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


I have read about the . This principle suggests that nature would allow a particle to travel in a path along which the integral of the difference between kinetic energy and potential energy is minimum.    Is this a basic law of nature?  Is it completely independent of other basic laws of nature like conservation of energy and conservation of angular momentum?  At the same time I would like to know how was it reached at, cause this doesn't seem to be something that we can easily identify and generalize.

Is there a proof from the first principle that for the Lagrangian $L$,    $$L = T\text{(kinetic energy)} - V\text{(potential energy)}$$  in classical mechanics? Assume that Cartesian coordinates are used. Among the combinations, $L = T - nV$, only $n=1$ works. Is there a fundamental reason for it?  On the other hand, the variational principle used in deriving the equations of motion, Euler-Lagrange equation, is general enough (can be used to to find the optimum of any parametrized integral) and does not specify the form of Lagrangian. I appreciate for anyone who gives the  answer, and if possible, the primary source (who published the answer first in the literature).      Notes added on Sept 22: - Both answers are correct as far as I can find. Both answerers were not sure about what I meant by the term I used: 'first principle'. I like to elaborate what I was thinking, not meant to be condescending or anything near to that. Please have a little understanding if the words I use are not well-thought of. - We do science by collecting facts, forming empirical laws, building a theory which generalizes the laws, then we go back to the lab and find if the generalization part can stand up to the verification. Newton's laws are close to the end of empirical laws, meaning that they are easily verified in the lab. These laws are not limited to gravity, but are used mostly under the condition of gravity. When we generalize and express them in Lagrangian or Hamiltonian, they can be used where Newton's laws cannot, for example, on electromagnetism, or any other forces unknown to us. Lagrangian or Hamiltonian and the derived equations of motion are generalizations and more on the theory side, relatively speaking; at least those are a little more theoretical than Newton's laws. We still go to lab to verify these generalizations, but it's somewhat harder to do so, like we have to use Large Hadron Collider. - But here is a new problem, as @Jerry Schirmer pointed out in his comment and I agreed. Lagrangian is great tool if we know its expression. If we don't, then we are at lost. Lagrangian is almost as useless as Newton's laws for a new mysterious force. It's almost as useless but not quite, because we can try and error. We have much better luck to try and error on Lagrangian than on equations of motion. - Oh, variational principle is a 'first principle' in my mind and is used to derive Euler-Lagrange equation. But variational principle does not give a clue about the explicit expression of Lagrangian. This is the point I'm driving at. This is why I'm looking for help, say, in Physics SE. If someone knew the reason why n=1 in L=T-nV, then we could use this reasoning to find out about a mysterious force. It looks like that someone is in the future.


#include <iostream>  int main() {     int x = 1;     char ch[] = "sai";     int a[] = {1,2,3};          // statement : 1     std::cout << ch << ' ' << a << '\n';      // statement 2     std::cout << *ch << '\n';     return 0; }  output: sai 0x7fff900919b8 s  expecting: **address of first char** 0x7ffde5767cd8 s  Reasoning: ch stores the address of the first character of the copy of string literal sai. So when we are printing ch then it should print the address right? Whereas both statement-2 and int array a outputs are printed as expected. Where am I going wrong? Any help would be really appreciated!

I'm using C++ to understand how exactly pointers work. I have this piece of code using arrays, which I'm using just to understand how the equivalent works with pointers.  int main() {         int arr[10] = {1,2,3};         char arr2[10] = {'c','i','a','o','\0'};     cout << arr << endl;     cout << arr2 << endl; }   However when I run this, arr outputs the address of the first element of the array of ints (as expected) but arr2 doesn't output the address of the first element of the array of chars; it actually prints "ciao".  What is it that I'm missing or that I haven't learned yet about this?


The tag line basically says it all...this is a question in Luenberger's Optimization book (5.14.4 on p.138).  Clearly I don't expect someone to deliver a full proof if it's tedious, but a sketch or theorem or tactic would help...I tried:   characterizing the dual of $BV[a,b].$  finding a sequence $\{f_n\}$ of continuous functions without a weakly convergent subsequence. Using the Hahn-Banach theorem to extend a functional on $BV[a,b]$.   Any help? Thanks!

How does one prove that $C^0([0;1],\mathbb{R})$ equipped with the supremum norm is not reflexive?  I don't understand how to show that the $J$ mapping is not surjective.


I'm trying to make a script that creates a temporary folder with a particular name, specifically the base name of the folder I'm running the script from. To do this I've tried to do this with the following approach.   setenv suffix $(basename $PWD) mkdir /tmp/userid_$suffix   But this fails with an illegal variable name error. I can't seem to figure this out after looking a number of sites and questions on here. How can I add the base name of the current folder to a new folder, either in one step or with setting a variable?

The modern recommendation is to use:  $(...)   instead of the older:  `...`   mainly for readability and to avoid the need for escaping when nesting.  Which shells do not support the $(...) form, and are any of them still in use today?


The whole sentence is "But had events gone another way, this would be a rather different memoir."   Why is the sentence not like "But the events have gone another way"? "Have" and "events" are reversed, is this first conditional?

Were I rich, I would live on Long Island.   If I were rich, I would live on Long Island.   Is the first sentence still used, or is used in particular contexts (in example, to give emphasis to the sentence)?


This is a spin-off question from .   says this on the subject of storage order (clustered index) and the output order     A lot of people believe that a clustered index guarantees a sort order on output. But that's not what it does; it guarantees a storage order on disk.   See, for example, .   I've read the blog post by Hugo Kornelis and understands that an index doesn't guarantee that the sql server reads the records in a specific order. Yet I have a hard time accepting that I can't assume this for my scenario?  CREATE TABLE [dbo].[SensorValues](   [DeviceId] [int] NOT NULL,   [SensorId] [int] NOT NULL,   [SensorValue] [int] NOT NULL,   [Date] [int] NOT NULL, CONSTRAINT [PK_SensorValues] PRIMARY KEY CLUSTERED  (   [DeviceId] ASC,   [SensorId] ASC,   [Date] DESC ) WITH (     FILLFACTOR=75,     DATA_COMPRESSION = PAGE,     PAD_INDEX = OFF,     STATISTICS_NORECOMPUTE = OFF,     SORT_IN_TEMPDB = OFF,     IGNORE_DUP_KEY = OFF,     ONLINE = OFF,     ALLOW_ROW_LOCKS = ON,     ALLOW_PAGE_LOCKS = ON)   ON [MyPartitioningScheme]([Date])   My original query was this:  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date < 1339225010   ORDER BY Date DESC   But I suggest that I could as well use this one (read below for my explanation):  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date < 1339225010   As you can see, my table rows are small (16bytes) and I've got only one index, a clustered. In my scenario, the table consists of 100.000.000 records at this moment (and this will most likely increase tenfold).  When the database server queries this table it has two ways of finding my rows, either it seeks the primary key and thereby reading and returning my values in desc. order of Date, or it has to do a full table scan. My conclusion is that a full table scan on all those records will be way too slow and the database server will therefore always seek the table via its primary key and thereby returning the values sorted by Date DESC


Suppose I wrote someone an email and told him something. After a few days, it occurred to me that I forgot to tell him about other things. What is correct in this situation:   Hi marc, I have just remembered that I forgot to tell you about other things...   or    Hi marc, I just remembered that I forgot to tell you about other things ...

I know there are differences between American and British English in this area. So when answering, please specify whether you speak American or British English.


What i'm trying to do is create a new model that will have certain features:  public class GenericGoal {     public int _id { get; set; }     public List<String> Type_of_Goal { get; set; }     public DateTime Date { get; set; } }   my quick and small question would be, how would I prepopulate the Type_of_goal field?

How do you give a C# auto-property an initial value?  I either use the constructor, or revert to the old syntax.    Using the Constructor:  class Person  {     public Person()     {         Name = "Initial Name";     }     public string Name { get; set; } }   Using normal property syntax  (with an initial value)  private string name = "Initial Name"; public string Name  {     get      {         return name;     }     set     {         name = value;     } }   Is there a better way?


I have a GTX 780 and I would love to get another one and use it for sli, I was wondering what's a good powersupply wattage that I should get. I'm currently using a Corsair CX 600 Watt Power supply, and I was wondering is 600 watts is ok for 2 gtx 780's

Note: This is intended to become a canonical post.  I got a dedicated graphics card of type XXX and it claims I need at least a YYY Watt PSU.   How big does my PSU really need to be?


I want to understand what $1\ \mathrm{kg}$ represents. For example: I know that $1$ second is equal to $9\,192\,631\,770$ transitions from the microwave radiation that a cesium-133 atom (at $0\ \mathrm K$) emits, if it's excited just right. I can imagine that. I can see how you would "count" these 9 billion transition until you know, that exactly $1$ second has passed.  Now I would like to know if there is a similar explanation for the kilogram.   I understand how Planck's constant has be redefined using methods such as the Kibble balance. I would like to know how I can explain what $1\ \mathrm{kg}$ is using $h$. Here is what I've got so far:  Knowing that $E=hf$ and $E=mc^2$, if both of those energies are equal, this gives $m=\frac{hf}{c^2}$. So if we want to know what $1\ \mathrm{kg}$ is, we find the frequency $f$, that gives $\frac{hf}{c^2}=1\ \mathrm{kg}$, which would be $1.3564 \times 10^{50}\ \mathrm{Hz}$.   What does this frequency represent? Is it the frequency of light that you would need to "push" an object with a force equivalent to the weight of $1\ \mathrm{kg}$? Sorry if my thinking is completely off.  Edit: the answer of the question  explains in detail how the new units get defined and what their relations are, but does not give a satisfying explanation as to what e.g. a kilogram represents.

The metrology world is currently in the middle of overhauling the definitions of the SI units to reflect the recent technological advances that enable us to get much more precise values for the fundamental constants of nature than were possible when the SI was drawn up. This has already happened to the second and the meter, which are defined in terms of a caesium transition and the speed of light, and it is being extended to the other units. Thus, in the new system, known as the ,     four of the SI base units, namely the kilogram, the ampere, the kelvin and the mole, will be redefined in terms of invariants of nature; the new definitions will be based on fixed numerical values of the Planck constant ($h$), the elementary charge ($e$), the Boltzmann constant ($k$), and the Avogadro constant ($N_A$), respectively.   The  gives more details, but it stops short of describing the recommended mises en pratique. For example, for the kilogram, the definition goes     The SI unit of mass, the kilogram         The kilogram, symbol kg, is the SI unit of mass; its magnitude is set by fixing the numerical value of the Planck constant to be exactly 6.626 069 57 10−34 when it is expressed in the SI unit for action J s = kg m2 s-1.         Thus we have the exact relation h = 6.626 069 57 10−34 kg m2 s-1 = 6.626 069 57 10−34 J s. Inverting this equation gives an exact expression for the kilogram in terms of the three defining constants $h$, $\Delta \nu$(133Cs)hfs and $c$:   $$ \mathrm{kg} =\left(\frac{h}{6.626 069 57\times10^{−34}}\right)\mathrm{m}^{2}\:\mathrm s^{-1} =1.475521\ldots\times 10^{40}\frac{h \Delta \nu\left(^{133}\mathrm{Cs}\right)_\mathrm{hfs}}{c^2} $$   The Planck constant is a constant of nature, whose value may be expressed as    the product of a number and the unit joule second, where J s = kg m2 s-1. The effect of this definition is to define the unit kg m2 s-1 (the unit of both the physical quantities action and angular momentum), and thus together with the definitions of the second and the metre this leads to a definition of the unit of mass expressed in terms of the value of the Planck constant $h$.      Note that macroscopic masses can be measured in terms of $h$, using the    Josephson and quantum-Hall effects together with the watt balance apparatus,    or in terms of the mass of a silicon atom, which is accurately known in terms    of $h$ using the x-ray crystal density approach.   However, the brochure is pretty scant as to what the specific realizations through watt balances actually imply in terms of a route from measured physical quantities to values of fundamental constants or to inferred masses. For the specific case of the watt balance, for example, the physical constants at play are much more naturally the  and  constants, $K_J=2e/h$ and $R_K=h/e^2$, if I understand correctly, so there is some re-shuffling of experimental results to be done.  The SI brochure is similarly vague for the other three base unit / fundamental constant pairs.  This brings me, then, to my specific questions. For each of these four base unit / fundamental constant pairs,   what are the proposed experimental realizations, what are the basics of their operation, and what physical effects do they rely on? what other fundamental constants are used to go from experimentally measured values to inferred parameters? (i.e. the meter depends on the second. Does the kilogram depend on the value of the electric charge?) what specific natural constants are measured by the experiment, and how are they reshuffled to obtain final results?   Additionally, what is the dependency tree between the different definitions of the base units? What units depend on what others, either directly or indirectly?


I didn't know you could create a function using new Object:  var myFunc = new Object(function myFunc () {})   Looking at the console, it seems identical to:  function myFunc () {}   Is there a reason to use new Object to create a function?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I've just noticed, that the jQuery  method only sets the content of a TEXTAREA, if if has not been updated manually. For example (also on ):    $('#myButton').click(function() {    $('#myText').text(Date.now);  }); <textarea id="myText"></textarea> <button id="myButton">Go!</button>  <script src="//code.jquery.com/jquery-2.1.0.js"></script>     Now when I click on Go!, the content of the TEXTAREA gets updated with the current timestamp. I also can do it multiple times. Working. But if I manually change the text (e.g. by deleting or adding a character), it stops working.  I also tried out the val(...) method. It works as expected, regardless of manual changes on the text field.  How to get jQuery.text(...) working after manual changes?

I am attempting to set a value in a textarea field using jquery with the following code:  $("textarea#ExampleMessage").attr("value", result.exampleMessage);   The issue is, once this code executes, it is not altering the text in the textarea?  However when performing an alert($("textarea#ExampleMessage").attr("value")) the newly set value is returned?


Note: I have flagged this post to be changed to a community wiki because I'm unable to do so.   I have a few C# interview questions I genuinely wanted to give to our community. I was looking for option to make the question community wiki however I didn't found one.  Can an option be provided to make a new question community wiki?

It looks like the Community Wiki checkbox is no longer appearing on the ask/edit question page, making it difficult to mark questions Community Wiki.  Where is it, and how is one supposed to mark a question as CW now?


I am using AngularJs, html to show table and display the records in the table. Demo:   I am trying to click on the number's hyperlink present in the second column. Currently I'm splitting the numbers using the comma (,) delimiter and used the  link to pass the associated number I have clicked on (can see working on first row links).  Sometimes as the data is dynamic, I may get semicolon (;) or colon (:) as the separator, and then the code breaks, passing multiple associated numbers when clicked on the link.          {{associateNum}};   How to support the above  link even when the associated numbers in the same row are having , or ; or : as the separators?  js code:  app.controller('MainCtrl', function($scope) {   $scope.players = [{     "name": "Robert C",     "associatedNumber": "21,10,133",     "standing": true,     "result":"Delivered,shipped,shipped" }, {     "name": "Joey C",     "associatedNumber": "55,2:22;33",     "standing": false,     "result":"To be delivered,Delivered" }, {     "name": "Bobby A",     "associatedNumber": "15;22:11",     "standing": true,     "result":"TO be delivered" }, {     "name": "John A",     "associatedNumber": "1,33,34",     "standing": true,     "result":"To be delivered,shipped" }]; });

How do I split a string with multiple separators in JavaScript? I'm trying to split on both commas and spaces, but AFAIK JavaScript's split() function only supports one separator.


There's a lot of posts with the pattern http://%20http ( an example search for Stack Overflow; the Stack Exchange multi-site search unfortunately does not grok this syntax) and by quick testing, I was able to repro by clicking the "insert link" icon in the post editor and pasting a URL with a space in front.    I can see no useful scenario where links would need to have whitespace at either the beginning or the end, and this causes rather inexplicable broken links in posts.  Could the editor please be fixed to trim leading and trailing whitespace before inserting the pasted address?

When you paste a link into the "Insert Hyperlink" box, it adds it automatically as a citation link:  [Example 1][1]    [1]: http://example.com   But when you paste a link starting with a space , it tries to URL encode it, to change the space to %20, and then sticks a http:// on the front to make it a valid link:  [Example 2][2]    [2]: http://%20http://example.com   This, however, means the link doesn't work.    Please could leading whitespace be stripped from the URL?


Why an sliced list of negative step (or stride) can't get the whole list?  >>> my_list = range(1,11) >>> reverse_list = my_list[10:0:-1] >>> reverse_list [10, 9, 8, 7, 6, 5, 4, 3, 2] >>> reverse_list = my_list[11:0:-1] >>> reverse_list [10, 9, 8, 7, 6, 5, 4, 3, 2] >>> reverse_list = my_list[11:-1:-1] >>> reverse_list [] >>>    But, if omitted start and end it works!  >>> reverse_list = my_list[::-1] >>> reverse_list [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]

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


If I want to find the inverse number of $5$ $mod448$ using $gcd$. I try to do like that: $448=89\cdot5+3$ $gcd(5,448)=gcd(89,3)$ $89=3\cdot29+2$ $gcd(89,3)=gcd(29,2)$ $1=29-2\cdot14$ $1=29-14\cdot(89-29\cdot3)$ $1=43\cdot29-14\cdot89$ But here I don't know how to continue, maybe I have mistake...

I'm confused about how to do the extended algorithm. For example, here's the gcd part gcd(8000,7001)  $$\begin{align}8000 &= 7001\cdot1 + 999\\ 7001&=999\cdot 7+8\\ 999&=8\cdot 124+7\\ 8&=7\cdot 1+1\\ 7&=1\cdot 7+0\\ \gcd(8000,7001)&=1\end{align}$$    Now, the extended algorithm  $$\begin{align}1 &= 8 - 1\cdot7\\ &= 8 - 1\cdot(999 - 8\cdot124)\\ &= -1\cdot999 + 8\cdot125\end{align}$$  How do you get this 8*125 from the previous line?


I am Windows user for quite a long time and wanted to try Ubuntu. With no experience of using any other OS than Windows, I started searching about Linux and found that Ubuntu is by far the most popular distro. Hence, my next search was how to install it alongside my Windows 10. After following step by step guide, I managed to install Ubuntu 20.04 using USB bootable disk on my Lenovo Legion Y520 laptop.   It is very capable laptop at least for Ubuntu, having Intel Core i5-7300hq, 16GB RAM, Nvidia GTX 1050 4GB, 1TB HDD.  I later installed ADATA 256GB NVME M.2 SSD and installed Windows on it. The first problem I face while installing Ubuntu was that I didn't had an option to select my NVME SSD, the only option available was my HDD. Since I didn't had other option I went ahead with HDD installation.   The Installation went smooth though very slow, at least as compared to a Windows 10 installation. But I gave it a benefit of doubt since my Windows 10 is installed on NVME and this Ubuntu installation is done on mechanical HDD. I then changed my regional settings to US and it asked me to restart the PC.   From here onwards I started hating Ubuntu simply because it took around 5 minutes to restart. I thought that may be it is first time that is why it is taking time and therefore I decided to shutdown the PC so that I will power ON it again to see the difference.   Ubuntu refuse to power off and stuck at stopping disk. The had to hold power button to switch that off and immediately came here to ask you guys if I have done anything wrong which is causing Ubuntu to behave unusually.

I have just upgraded to 20.04 without any issues, however, Gnome is painfully slow 2second delay with every action, apps take an age to open, terminal takes 2 sec to scroll through the history one item at a time. Anyone else seen this and have any answers?


I'm trying to change my launcher from being on the left to the bottom. I've tried everything but it just wont.      I even tried the command line method many times.  Any help to get?

Just upgraded from Ubuntu 17.04 to Ubuntu 17.10.  Please help me to shift the side bar (aka Ubuntu Dock) to bottom.   I tried running the following command which used to work with older Ubuntu releases   gsettings set com.canonical.Unity.Launcher launcher-position Bottom   but it's not working.


I am a doctor, with specialty in psychiatry and a subspecialty in mood disorders.   I have been offered an academic position at a larger university, but the letter of offer does not specify any research time - only clinical time. I want to negotiate clinical time (number of patients to see per week), which will be my main source of income, vs protected research time (for which the Hospital/University will provide compensation). I want to be able to do research but need the department to commit to paying me for it.  It is my understanding that this will be the only time I will be in a position of power to negotiate something, but I don't know where to start. I have other 2 offers in place as well.   The clinical aspect may make this negotiation different from other junior faculty members, e.g. as in .

I've been offered an academic position, and am now in the fortunate, but unfamiliar position of negotiating the offer.  I've seen a few blogs/comments/posts on this process.  However, I have no real idea how to evaluate the offer that's been made.  Coming from the position of a postdoc, the package seems impressive (given that, as a postdoc, my "package" consists of a very modest salary and health benefits).  However, I also realize the importance of maximizing (within reason) my initial offer, as this sets the baseline for, at least, the first few years of my faculty career and could provide support that would prove very important in the initial year or so while I'm trying to obtain grant funding.  In particular, I'm looking for two types of information.  First, what types of startup packages are standard for tenure-track assistant professors of Computer Science at a public RU/VH (i.e. Research) university?  This is just to give me some point of comparison.  Second, what types of changes are reasonable to negotiate?  Can I ask for more summer salary support while still conveying to them my desire to obtain grant funding as quickly as possible?  The offer already includes a reduced teaching load for the first few years --- is it also reasonable to ask for an extra semester off prior to a tenure review?  I understand these are fairly broad questions, but any input or suggestions would be very helpful.  I'm definitely interested in the job; I really liked the department and think it's a great opportunity.  I don't want to alienate anyone by pushing too hard, but at the same time, I want to make sure that I make every reasonable effort to maximize my chances for academic success, which includes maximizing my available resources by negotiating the best startup package I can.


In this MWE, the link created by hyperref points to the first page but should point to the second page. How can I fix this issue? \documentclass{article} \usepackage{hyperref} \usepackage{varioref}  \newcounter{counterOne} \newcounter{counterTwo} \renewcommand{\thecounterTwo}{\alph{counterTwo}} \labelformat{counterTwo}{\textbf{\thecounterOne.#1)}}   \begin{document} \refstepcounter{counterOne} \refstepcounter{counterTwo}   \section{Part 1} \begin{itemize} \item \label{first} This is the first point  \item \label{second} This is the second point \end{itemize}  \newpage \section{Part 2}  \setcounter{counterTwo}{0} \refstepcounter{counterOne} \refstepcounter{counterTwo}  \begin{itemize} \item \label{third} This is the third point \end{itemize}  \newpage \section{Part 3}  It was \ref{third}.  \end{document}   (the picture shows where the link should point to)

I'm having an interesting problem with hyperref.  Apparently, when a counter is reset by \setcounter{mycounter}{0} then hyperref always links to the first possible instance of the counter and not the one where the respective label sits.   Check this MWE out:   % !TEX TS-program = xelatexmk \documentclass{article} \usepackage[paperwidth=6in,paperheight=3in]{geometry} \usepackage{hyperref} \hypersetup{colorlinks=true, allcolors=blue, } \newcounter{mycounter}\setcounter{mycounter}{0} \newcommand\countme{\refstepcounter{mycounter}\themycounter}  \begin{document}  First line \countme{} has some interesting text.  The second line \countme \label{onelabel} has \textbf{more} interesting text.  As we saw at line \ref{onelabel} ...  \newpage  A new page brings new numbers \setcounter{mycounter}{0}   A very different first line \countme{} has other interesting text.  The second line \countme \label{otherlabel} has \textbf{different} interesting text.  As we saw at line \ref{otherlabel} ... \end{document}   As you can see in the screenshot below, the pop up preview of the \ref on the second page doesn't refer to the second line with \label{otherlabel} but to the one on the first page (also has the tooltip "Go to page 1" -- in TeXShop).   Am I not understanding something fundamental about hyperref?      The context for all this is an environment that resets my counter to 0 at begin.  And all subsequent \refs to labels in a second or third iteration of the environment point to the very first instance of that environment, not the correct one where the label sits.


For example i am given this string as an input: "HeLlo" How can i make this case insensitive for later uses? I want it to be equal to "hello" or "HELLo" etc...

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


My ssh-server has been working like a charm for 4 years now, so I just want to add a user + chroot him to a specific folder.  > useradd -m -c /home/thomas -s /bin/sh thomas > passwd thomas > chmod 755 /home/thomas > chown root: /home/thomas > service ssh restart   When I do this, I can connect through ssh and my sftp connexion works. The problem is that I want to chroot to a specific folder.  > vim /etc/ssh/sshd_config   Add at the end of the file:  Match user thomas     ChrootDirectory /home/%u   When I only add this, this shouldn't change something right? The configuration should be the same and I still should be able to connect or use sftp... so I restart with service ssh restart and I cant connect with sftp anymore.  Just in case:  root@xx:/etc/nginx/sites-enabled# /usr/sbin/sshd -v sshd: illegal option -- v OpenSSH_6.0p1 Debian-4+deb7u6, OpenSSL 1.0.1t  3 May 2016 usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-c host_cert_file]             [-f config_file] [-g login_grace_time] [-h host_key_file]             [-k key_gen_time] [-o option] [-p port] [-u len] root@xx:/etc/nginx/sites-enabled#   What am I doing wrong?

I have a linode and I access via ssh throw terminal. I need to create an sftp user which his default directory (and the only he can access) is /var/www/xxxxxx.com/public_html/directory  Now, I did it, but when I try to connect I get broken pipe or connection rejected by peer  What I did is this:  $ adduser --home /var/www/xxxxxx.com/public_html/directory/ username $ chown username:username /var/www/xxxxxx.com/public_html/directory/ $ chmod 755 /var/www/xxxxxx.com/public_html/directory/ $ nano /etc/ssh/sshd_config   In /etc/ssh/sshd_config I added the following lines  Match User username    ChrootDirectory /var/www/xxxxxx.com/public_html/directory/    AllowTCPForwarding no    X11Forwarding no    ForceCommand internal-sftp   What am I doing wrong?  EDIT: This is the actual error    EDIT2: this is the error in filezilla    EDIT 3: auth.log   Oct 15 17:47:11 (none) sshd[361]: fatal: bad ownership or modes for chroot directory "/var/www/xxxxxxxxxxxx.com/public_html/extras_html"


this is my first time here.  So the problem is, i have an object with all my variables like this:  app.Variables = {     var1: 0,     var2: 0,     var3: 0 }   And i want to store this values in a object called Defaults like this:  app.Defaults = app.Variables   But the problem now is, in my code, app.Variables.var1 e.g. get incremented like this:  app.Variables.var1++   And this means, that app.Defaults.var1 get also incremented equal to app.Variables.var1.  What shall i do here?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


$P=IV$, $P=I^2R$, $P=\frac{V^2}{R}$, what are the distinctions between these equations? How do you know which equation to use when?

I'm studying a lightbulb and its variable resistance, given by the expression:  $R(T) = Ro[1 + α(T-T_0)]$, where $R_0$ is the resistance of the lamp at $T_0$.  In this case, $R$ is not given by Ohm's law ($V=Ri$). So, which expression can I use to calculate the power consumed by a lightbulb?   $P = R\cdot i^2$ $P = \frac{V^2}{R}$ $P = V\cdot i$ (I don't think I can use this one)   I have measured the current and the e.p.d. at the bulb using instruments.


I have used a double-paged template and it currently creates a blank page such that the new chapter always begins on the left side. However, my report is quite small and I would like to remove these blank pages. How do I do that?  A MWE:  \documentclass[10pt,twoside,b5paper,showtrims]{memoir}   % Stock and paper layout \showtrimsoff \pagebv \setlrmarginsandblock{26mm}{20mm}{*} \setulmarginsandblock{35mm}{30mm}{*} \setheadfoot{8mm}{10mm} \setlength{\headsep}{7mm} \setlength{\marginparwidth}{18mm} \setlength{\marginparsep}{2mm}   \checkandfixthelayout                 % Check if errors! \sideparmargin{outer}                 % Put sidemargins in outer position   % Chapterstyle \makeatletter \makechapterstyle{mychapterstyle}{     \chapterstyle{default}     \def\format{\normalfont\sffamily}      \setlength\beforechapskip{0mm}      \renewcommand*{\chapnamefont}{\format\LARGE}     \renewcommand*{\chapnumfont}{\format\fontsize{40}{40}\selectfont}     \renewcommand*{\chaptitlefont}{\format\fontsize{32}{32}\selectfont}         \setlength\midchapskip{1ex}      \renewcommand*{\printchaptertitle}[1]{\raggedleft \chaptitlefont ##1}     \renewcommand*{\afterchaptertitle}{\vskip0.5\onelineskip \hrule \vskip1.3\onelineskip}  } \makeatother \chapterstyle{mychapterstyle}  % Header and footer \def\hffont{\sffamily\small} \makepagestyle{myruled} \makeheadrule{myruled}{\textwidth}{\normalrulethickness} \makeevenhead{myruled}{\hffont\thepage}{}{\hffont\leftmark} \makeoddhead{myruled}{\hffont\rightmark}{}{\hffont\thepage} \makeevenfoot{myruled}{}{}{} \makeoddfoot{myruled}{}{}{} \makepsmarks{myruled}{     \nouppercaseheads     \createmark{chapter}{both}{shownumber}{}{\space}     \createmark{section}{right}{shownumber}{}{\space}     \createplainmark{toc}{both}{\contentsname}     \createplainmark{lof}{both}{\listfigurename}     \createplainmark{lot}{both}{\listtablename}     \createplainmark{bib}{both}{\bibname}     \createplainmark{index}{both}{\indexname}     \createplainmark{glossary}{both}{\glossaryname} } \pagestyle{myruled} \copypagestyle{cleared}{myruled}      % When \cleardoublepage, use myruled instead of empty \makeevenhead{cleared}{\hffont\thepage}{}{} % Remove leftmark on cleared pages  \makeevenfoot{plain}{}{}{}            % No page number on plain even pages (chapter begin) \makeoddfoot{plain}{}{}{}             % No page number on plain odd pages (chapter begin)  %  \begin{document} % \chapter{Discussion} \chapter{Modelling}  \end{document}

I am using LaTeX for my thesis and I am getting a blank page after Appendix and the next chapter. My document class is book:  \documentclass[a4paper,oneside,12pt]{book}   I have tried inserting the following commands in my preamble but it does not seem to work:  \makeatletter\@openrightfalse\makeatother   and  {\let\cleardoublepage\clearpage  \input{appendix} }   and  \csname @openrightfalse\endcsname   could someone help me out with this?


I have cracked part of my screen and i would like to "cut" that part off (effectively turning my 1920x1080 into a 1560x1080 screen)  I tried to utlize several tools like   "MS Powertoys for Win 10" "DisplayFusion"   but either i am too stupid to configure them correctly or they both offer something i confused with what i search for.  I don't know how this question doesn't satisfy standards though because i wrote down everything i know and want to know...

My laptop's 1920x1080 screen has been damaged and about 150 of the leftmost columns are not working. It will be a few weeks before I can replace it, so I would like to change my settings so it doesn't use those columns (I'm on Windows 10, BTW).  Ideally, I'd like to have a 1770x1080 resolution with an offset of 75px to the right from the center, which means only those columns would be cropped.  I tried using the tools suggested on both answers to , but had similar errors on unsupported/invalid settings.  My guess is that I cannot pass these settings as loosely as I'd like, but I could not pinpoint exactly what rules they need to follow.  Any hints on how this should be done or even if there's another better approach for the problem is very much appreciated, thank you.


Is it possible to create one function instead two functions of same purpose but different argument type?  I have two functions written in C, they convert image from RGB to HSV:  void png_rgb2hsv(pPNG_DATA data); void jpg_rgb2hsv(pJPEG_DATA data);   they do exactly same thing: they take data->row_pointers and cycle it in a loop data->height times. Then it convert the values referred by data->row_pointers. This is how it works. But the only difference is that the data structures use different types. It seems to me senseless to use two functions for same thing. Especially when I would add more functions for more color spaces.  How this problem of program design is solved in practice in C?  Update: Most of readers didn't understand the question. I did not asked about overloading. It was question about design. I ask if is it possible to remove redundant function, "redundant" code. Because both functions are using same code, do the same thing, but the types in the function argument are different because one type is from libjpeg and the second type is from libpng. What I found is that it is not possible because it would mean use one variable for two different types.

Is there any way to achieve function overloading in C? I am looking at simple functions to be overloaded like    foo (int a)   foo (char b)   foo (float c , int d)   I think there is no straight forward way; I'm looking for workarounds if any exist.


I've searched this site and plenty other sites, but nobody seems to be able to answer my question entirely (not even Google), so here goes...  What would be the proper procedure to change the url of one of my pages (not my website, just a single page) from an "somesite.com/unnecessarily-long-and-SEO-unfriendly-url-that-drags-on-longer-than-mondays" to a "somesite.com/short-and-sweet-url"?  Ok, so I switch the url for my page to a short URL and create a 301 redirect from the long url - but what do I do next?  If I change the old url in the sitemap and upload it to GWT - that could just send a signal to Google that one of my old articles is gone and that a new one emerged.  I could also submit the old url for deletion from index and submit my new article for indexing, but that could still cause my "old" article to disappear from search results (at least until the "new" article emerges).  So my question is, what is the correct procedure for an url change that will let google know that I'm changing an URL for an EXISTING article - that doesn't lead to a rankings drop or even a temporary disappearance from the SERPs?

I'm refactoring my ASP.net application from ASP.net 3.5 to 4.0. Also I'm changing the URLs to user friendly URLs /product.aspx?id=100 to /product-name/100.  All my pages are indexed by search engines and the site has already been online for 6 years. I'm planning to do 301 redirect from the old pages to the new one.  I want to make sure I won't lose the rankings and traffic.  Any suggestion how to do it properly?


I'm reading up on pathinfo basename and the like. But all I am gathering from those are how to obtain the details I want when using an absolute/relative path. What I am trying to figure out is how can I get the filename.ext from a url string (not necessarily the active URL, maybe a user input url).   Currently I am looking to get the file name and extension of user provided URLs containing images. But may want to extend this further down the road. So in all I would like to figure out how I can get the filename and extension  I thought about trying to use some preg_match logic finding the last / in the url, spliting it, finding the ? from that (if any) and removing the point beyond that and then trying to sort it out after with whats left. but I get stuck in cases where the file has multiple . in the name ie: 2012.01.01-name.jpg  So I am looking for a sane optimal way of doing this without to much margin of error.

This is a question you can read everywhere on the web with various answers:  $ext = end(explode('.', $filename)); $ext = substr(strrchr($filename, '.'), 1); $ext = substr($filename, strrpos($filename, '.') + 1); $ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $filename);  $exts = split("[/\\.]", $filename); $n    = count($exts)-1; $ext  = $exts[$n];   etc.  However, there is always "the best way" and it should be on Stack Overflow.


I have heard mention of late addition of extracts. I was under the impression that you need to boil the extract to kill off any possible nasties?  When I brew, so far always from a prepackaged kit, after the steep, I get the boil going, add the steep/rinse water, bring back to boil, add liquid extract, bring back to boil, add hops, boil 60 min, add finishing hops...  what would I gain or lose by waiting to add the extract? and how late into the boil is considered a late extract addition?  Thanks and Cheers!

My recipe calls for a pound of DME at the beginning of the boil and 6 pounds at 15 minutes to go.  What's the point of that?


My OLD HP MB supports DDR2 667 RAM (only 4 GB now) - Win 7 32 Bit - - - - My newer Win 10 64 Bit HP Burnt The Heck Up  It "used" DDR PC3 Knowing only faster RAM will not speed up my system - Can the present OLD MB handle this added or replacing the OLD DDR2?

If a motherboard's specifications say it supports DDR3 SDRAM sticks, would I be correct to assume it is also compatible with DDR2 RAM? Am I wrong, or does it depend on the motherboard?


Quite often, I see something like:  Sorry if the language is not perfect, I translated the quotes from german.   or  Sorry, English is not my native language.   in questions (and, although more rare, in answers).   Although I'm far from writing English perfectly, I think most people are able to understand what I write. So when I see such a notice, I try to fix the language as well as possible. Should I remove "bad English excuse" notices after improving the language?  I would say that such a notice can be removed as soon as the language seems to be good enough to be understood. In my opinion, there should not be any "sorry" or "thanks in advance" or, more general, be anything that is not part of the question. If people see minor mistakes, they can edit the mistake.   According to , many people seem to think that is a good idea to remove "Thanks". So I guess almost the same reasons why people think that salutations should be removed apply to removing "My English is bad" excuses. But I'm not sure about it, so I would like to hear your opinion.

I encounter a number of questions where the question starts with a disclaimer asking to be excused for their poor English etc..This is actually redundant because the post will anyway be reviewed and the mistakes corrected.  My dilemma is that while reviewing such posts, should I delete that disclaimer as it is anyway being reviewed or should I leave it alone. From SO's perspective, it doesn't make any sense to retain such disclaimers as the question has been reviewed and polished.


Suppose $a_n$ is a positive sequence, then the product $$\prod_{n=1}^{\infty}(1+a_n)$$ converges iff the series $$\sum_{n=1}^{\infty}a_n$$ converges as well.  Any hints please ?

Let $(a_n)_n$ be a sequence of non-negative real numbers.      Prove that $\sum\limits_{n=1}^{\infty}a_n$ converges if and only if the infinite product $\prod\limits_{n=1}^{\infty}(1+a_n)$ converges.   I don't necessarily need a full solution, just a clue on how to proceed would be appreciated.  Could any convergence test like the ratio or the root test help?


As , there is no built-in support in Outlook 2013 to sort out the on-behalf messages, so I had to create a custom rule.  My rule is the following:     Rule type: Apply this rule after the message arrives      Condition: with specific words in the message header: company@example.com      Action: move it to the specified folder: Company1   This is a part of the header for a particular email:  From: =?utf-8?Q?The=20Company=20T=C5=91?= <company@example.com> Reply-To: =?utf-8?Q?The=20Company=20T=C5=91?= <company@example.com>   The rule does not do anything.   What should I modify?

I subscribe to a few newsletters which are obviously using a third party service like MailChimp or Campaign Monitor to send their mails and I cannot find a way to create a rule that moves the newsletters into the appropriate folder that I have created.   All the newsletters follow a format that is structured like this:  Jared Spool <jared.m.spool=uie.com@mail214.atl101.mcdlv.net>; on behalf of; Jared Spool <jared.m.spool@uie.com>   The prolem with using the senders address for newsletters like this is that the full address that these mails are sent from seems to change quite regularly and the rule no longer works. If I try using "use specific words in the senders address" and then fill in the name, or the 'on-behalf of' email address, the rule does not work.  In most cases the subject lines don't follow a consistent format either, so I can't create a rule based on the subject line.  Does anyone have any ideas?


To give better context I have a CPT on my site called "Upcoming Games". I have the posts ordered by the datepicker:  $args = array(         'post_type'      => 'upcoming-games',         'post_status'    => 'publish',         'orderby'        => 'meta_value',         'meta_key'       => 'release_date',         'meta_value'     => current_time( 'timestamp' ),         'meta_compare'   => '>=',         'order'          => 'ASC',         'posts_per_page' => is_front_page() ? 3 : 12, );   But I want to take it a step further, if a game is released on August 1, 2016 and the current date is August 2, 2016, technically it's no longer an "Upcoming Game" so I'd like the post to be drafted without manually having to go into WP each time and change it myself.

I would like to give my user the ability to publish a post and the post only becomes visible  (like with a published status) when the date hits. I'm using the following code to try and set it to published but on a future date:  $bmt_post = array(     'post_title'    => wp_strip_all_tags( $title ),     'post_content'  => $information,     'post_status'   => 'publish',     'post_category' => array( $cat_ids ),     'post_date_gmt' => $postdate,     'post_date' => $postdate, ); $post_id = wp_insert_post( $bmt_post );   When I do this, the post is already visible even though it's scheduled for a future date. If I remove the 'post_status'   => 'publish' then it creates the post as a draft but then someone would have to go back on the date and change the status from draft to published.  How can I do this so when the user creates the post it's created for the future and only becomes visible when the post_date is the actual date? I know there is a 'post_status'   => 'future' but does that automatically convert to published on that date?


This might sound like a queer question, but why do we marinade meat with acid / enzymes? Given that marinading doesn't tenderize meat, it just turns the outer fibers into mush and releases the juices when cooking? Why not just go with a flavored brine instead?  In other words: Why is it customary to use such marinades, and why is it commonly said that it tenderizes the meat?  Source Shirley Corriher:       At first, water molecules are attached to and trapped within this   protein mesh, so the tissue remains juicy and tender. But after a   short time, if the protein is in a very acidic marinade, the protein   bonds tighten, water is squeezed out, and the tissue becomes tough. If   you've ever tried marinating shrimp in highly acidic ingredients, it's   likely that you're familiar with this result.   Also     My experience with tenderizing enzymes mirrors that of Dr. Nicholas   Kurti, a famous Oxford physicist who tried tenderizing a pork roast by   injecting half with pineapple juice, leaving the other half untouched.   A noted chef, Michel Roux, was to judge on television which side was   better. After cooking, the half treated with pineapple was total mush   and looked like a pile of stuffing. Not surprisingly, Chef Roux   preferred the untreated half.


Installing Ubuntu on 64 bit Pentium i3 HP ProBook 4530S that has Windows 7 Home Premium as the original OS.  I will be using it as a server to house a handful of websites of my own. I have partitioned the drive already and installed version ubuntu-18.04.2-desktop-amd64, and it is functional, working, etc.   Problem is, it says AMD 64 bit, I have Pentium. Is there a difference?? I see it in other things from time to time and am asking now because I never found out and am wondering if it may be important in this install and what I will be using it for. I do still have a small partition with the original Windows that came with the laptop, but it is set to automatically boot into Ubuntu if there's no input at boot-up.  I am aware of the Windows problems with security vulnerabilities, that is why I want to use Ubuntu, and I have never used it before.  ANY tips or advice are most welcome, and thanks to all!  :D

What is the difference between standard i386 download and the amd64 download of Ubuntu 11.04? I am currently running the i386 on an amd machine, would my system work better with the amd64 download instead? (my machine was running Windows 7 64bit, but I neglected to look at that prior to installing Ubuntu).


If there a way in Firefox on Windows 10 to increase the sound when I play a YouTube video at 100% loudness with 100% loudness on the system level as well?

I'm watching live streamed videos, but the volume sometimes is barely loud enough.  With Windows, I can only turn the system volume and the flash volume up to maximum, and then bad luck if that's still not loud enough.  On Linux, on the same notebook, I have the same problem, but I can use pavucontrol (pulseaudio volume control) to amplify the sound volume beyond 100%.  Unfortunately, I can't always work on Linux, since Visual Studio and SQL-Server only run on Windows.  Is there any tool or way to amplify volume on Windows 7 / 8 , without having to resort to run Linux in a virtual machine?


Let $a_1, \ldots, a_n > 0$. How to compute the limit $\lim_{n \to \infty} \sqrt[n]{a_1^n + \cdots + a_m^n}$?  My solution:  $$ \lim_{n \to \infty} \sqrt[n]{a_1^n + \cdots + a_m^n} \\ = \lim_{n \to \infty} (1 + a_1^n + \cdots + a_m^n - 1)^{1/n} \\ = \lim_{n \to \infty} \left( (1 + a_1^n + \cdots + a_m^n - 1)^{\frac{1}{a_1^n + \cdots + a_m^n - 1}} \right)^{ \frac{a_1^n + \cdots a_m^n-1}{n}}. $$ But then we need to have the condition $a_1^n + \cdots + a_m^n - 1 \to 0$ ($n \to \infty$).   Thank you very much.


sometimes there happens that I post question before I think the problem over well enough. (if I know well it's not against the rules, the only problem with it is that it gets a lot of downvotes if noticed) If I got the solution before anyone would help, what to do. Should I delete the question, or keeping it with an own answer for the site would be worth?

I might want to answer my own question because:  I arrived at a solution before there were any other correct answers or I like mine better, can I still answer my own question?  I have a folder with lists of code snippets for things I always forget or get wrong, such as regular expressions for processing XML, common WinForms control idioms, etc. Is it considered poor etiquette for Stack Overflow to ask a question I already know the answer to, and then self answer, just so it gets recorded on the website?   Related:          For more information, see "" in the .


I was wondering if the use of “for” like “because” was current use. For example: “I haven’t come to the party, for I was tired.” Is this used nowadays? Or shall we say “I haven’t come to the party because I was tired” otherwise? Thank you ever so much! 😊

I am not a native speaker. On a previous question of mine, I thanked for an answer by saying:     So the phrase is not an idiom, since it is applied in its literal sense.   I consciously chose since over because, because — well, I like that usage of since, even though I know that some (native speakers) don't like it. Nonetheless, that choice got me thinking for a while, and it occurred to me that I even could have used more alternatives, namely as or for, without changing the meaning.   So, on a general note, here are the alternatives:        Statement A (is true), because statement B (is true).   Statement A (is true), since statement B (is true).   Statement A (is true), as statement B (is true).   Statement A (is true), for statement B (is true).      Are these completely interchangeable? Or interchangeable in certain situations? Or can you point out any (not-so-)subtle differences between any of them? Are there even more synonyms?


I have a requirement where I need to call the main css file using javascript into the header section. So basically instead of having the below line within the headers   <link rel="stylesheet" href="css/main.css">   How can I call it using javascript within the header tags?

Is it possible to import css stylesheets into a html page using Javascript? If so, how can it be done?  P.S the javascript will be hosted on my site, but I want users to be able to put in the <head> tag of their website, and it should be able to import a css file hosted on my server into the current web page. (both the css file and the javascript file will be hosted on my server).


This is the screen where everything freezes and the page lags a lot when I try to type something.

I installed Ubuntu 18.04 amd64 desktop on Asus Eeepc 1015px, but it hangs on booting. The last message is 'Started User Manager for UID 120'.  I managed to boot up in recovery mode and finished the installation with 'sudo apt-get upgrade', but nothing has changed.  Does anybody know how I can tackle it?  Thanks in advance, Newton.


I created a Drow rogue and my Roguish Archetype is an assassin for 5e. I have been running into the problem of disadvantage rolls on Perception. This wouldn't bug me as much, but since there's only one person in the party that doesn't take disadvantage during the day and her Perception rolls are not that good most of the time, it's getting annoying when a random NPC pack gets the drop on us.

My friends and I are trying to come up with ways to get around the drow's sunlight limitations. We thought of using spells, but Darkness makes it impossible to see, which would defeat the purpose.  The best I've been able to come up with is lashing a large patio umbrella to a mule and making it follow the drow everywhere. Would this work, at least for a low level melee character?  What other options does our drow have?  This question is about what I can do as a player to take advantage of RAW; the players in my group don't mind being munchkin-y. Telling the GM to make the campaign take place at night isn't an option.


Well, it's been , but it's been 8 months and it hasn't got any easier. Epic is by far the hardest silver badge. Only 103 of them have been awarded so far. The majority of gold badges have a higher count; except Copy Editor (80), Reversal (49) and duh - Legendary (30).* Should the requirements be lowered? (Disclosure of interest: I have 38 "exceeded" days). * (Not counting the new badges Announcer, Booster and Publicist).

I was just curious, why is epic a silver badge if only 73 users have been awarded with it?  For example: Silver Epic - 73  Gold Electorate - 193    Edit: My point was to reduce the level of epic, like "hit the daily reputation cap on 30 days" so it becomes some what at par with other silver badges.


Suppose, that $ K $ is normal subgroup of $ N $, and $ N $ is also normal subgroup of $ G $. Prove, that $ K $ needn't be normal subgroup of $ G $. I can give only counter-example?

Let $F,G,H$ be groups such that $F\trianglelefteq G \trianglelefteq H$.  I am asked whether we necessarily have $F\trianglelefteq H$. I think the answer is no but I cannot find any counterexample with usual groups. Is there a simple case where this property is not true?


I'm trying to create a virtual machine to follow a course and I don't have much practice in Ubuntu. The machine in this case is VMWare Workstation and I don't know exactly how to do it.  I have seen several questions about this on this site, but they are old and from very earlier versions of Ubuntu. Is there any new way to install this machine on my PC?

I am new to Ubuntu and want to install VMWare Player. What is the step by step procedure to install that?


Because many times my laptop powers off after some movement around the power jack, I thought I would re-route the internal power cables that ends up in the DC power jack, and fit them into a USB. Then cut the power cord, from the power supply and fit it in a male USB so it will, probably get a better fit. Has anyone tried doing this? Any suggestions?  PS: I think some Lenovo G500 I have seen using such way as factory default.

The charging port on my Acer laptop is dead, I thought it was the charger but I bought a new universal charger only to discover that the problem was the port on my laptop. The new charger has USB ports on it as well as different size heads, can I charge my laptop using the USB port since my charging port will not work?


For example, if two people are discussing cows & dairy farming & one person mentions carpet. Is there a word for this? Maybe a literary term?

Consider this conversation:      John: I am giving free chess lessons.   Mary: Nice! You’re a true teacher.   John: How so?   Mary: A true teacher imparts knowledge without a price tag.   John: But what if teaching is his only source of income? Would he not be a “true” teacher then?   Mark (in response to the question above): You clearly mentioned “free chess lesson”.   I don’t see how Mark’s comment adds anything to the discussion or makes sense in the current discussion. It is “redundant” — that’s one word for it — but is there a more fitting word?


My theory is, that the Kingship among the Noldor wasn't as ideologically well-founded as among Men, they didn't think that their Kings were appointed to this role by the Valar or Eru, nor attributed by them with divine healing power, and made the prosperity or their land dependent on the legitimacy of the King, like the men of Gondor. It was more that they followed whom they held the most suitable, wise and valiant leader. Because of this, and because they could hope that the current king won't die at all, they didn't have well-defined succession laws. This would also explain, how heroic mortals could become mighty chieftains in elven-kingdoms (Túrin), or even marry into their royal house (Tuor). In Númenor this would be impossible for a Lesser Man from Middle-earth.   Have I understood Elvish Succession laws? Did the Elvish Kingship work in this way?  Bonus question: Is it possible, that if Turgon had died, but the City survived, Tuor would've become the King of Gondolin, and as a mortal ruled over tens of thousands of Eldar?

I was answering , which made me curious about the succession rules for the High Kingship of the Noldor.  Based on my analysis, it seems as though succession works on a variation of , where female heirs are excluded from the line of succession  I say this mainly because Fingolfin succeeded Finwë as High King of the Noldor, despite having an older sister (). This same thing happens with the next High King; when Turgon dies, the Kingship passes not to his aunt  (whose fate is admittedly unknown; it's possible she's dead at this point), but to the heir of Írimë's younger brother Finarfin.  However, I'm curious if Tolkien ever formalized these rules of succession. So here's my question:  What, if anything, did Tolkien write regarding the rules of Elvish succession?


I have had a couple of run-ins with viruses and malware before, and have found that a format and re-install of the OS is the easiest way of dealing with them.  But, my experience has simply been: PC acting funny > Run scan(s) to find virus/malware > Format & Reinstall > PC no longer running funny; scans don't find anything.  A lot of other guides suggest altering the registry, and deleting any specific .dll files and uninstalling any programs that relate to the virus. But that approach seems to be a more intricate/delicate approach than my "wipe it all and start over" tack.  So, will my approach actually remove a virus/malware? If you need specifics - Conficker and Trojans are the ones I have used this on.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I would like to merge two lines having a y = mx + b equation with very close angles. I am simply comparing their angle difference, then I create a new line passing through the middle of these by calculating their m and b average.  This method succeeds when the algorithm encounters two lines with positive values.    The segment on the right has it's m variable set to 0.034, and b variable set to 109.49. The segment on the left has it's m variable set to 0.017, and b variable set to 128.72.  The averaging method gives a result of m being 0.026 and b with the value of 119.105.  But I am actually stuck in the case where there are two diagonal lines, where one of them has a negative m variable.    The segment on the top right has it's m variable set to 26.837, and b variable set to -44172.254. The segment on the bottom left has it's m variable set to -19.648, and b variable set to 29264.59.  The averaging method gives a result of m being 3.5945 and b with the value of -7453.8324.  Is there a more efficient method of solving this problem ?

The formula for finding the angular bisectors of two lines $ax+by+c=0$ and $px+qy+r=0$ is $$\frac{ax+by+c}{\sqrt{a^2+b^2}} = \pm\frac{px+qy+r}{\sqrt{p^2+q^2}}$$ I understand the proof of this formula but I do not understand how to determine which sign is for acute bisector and which one for obtuse. I can find the angle between a bisector and a line, and if it comes less than $45^\circ$ then it is acute bisector. But that is a lengthy method and involves calculation. My book says, if $ap+bq$ is positive then the negative sign in the formula is for acute bisector. I want a proof of this method. Edit: Using the method for finding the position of two points with respect to a line is okay for the proof.


How can I trust any Repositories  like   sudo add-apt-repository ppa:upubuntu-com/tor  or  sudo add-apt-repository ppa:wagungs/Kali-linux

I see a lot of interesting programs out there that can only be obtained by adding a "PPA" to the system but, if I'm understanding correctly, we should stay within the official "repositories" for adding software to our system.   Is there any way for a novice to know if a "PPA" is safe or if it should be avoided? What tips should the user know about when dealing with a PPA?.


My mortgage payment is 1200.00. I send in the 1200.00 each month along with a additional PRINCIPAL payment of 2000.00 clearly noted on the payment book as intended as a principal payment. But each month the mortgage company takes 1200.00 away from my Principal payment and  makes the next months regular payment of 1200 in advance and then applies the other 800.00 as a principal payment.  I clearly noted that the whole additional 2000.00 is for a principal payment. They have done this repeatedly when ever my principal payment is over 1200.00.   This seems like some type of scam; anyone heard of this practice before. Thanks for any help.  When I have sent in a principal payment less the the 1200.00 then they don't do it ; seems because it is not enough to use it as a regular house payment.

My friend was told by her bank she could not make early payments and apply them to the principal on her home mortgage. She wants to pay half her mortgage every two weeks and it seemed like a reasonable request.  She then asked what would happen if she just paid an extra lump sum once a year and asked it to be directed towards the principal. They told her they would only apply half to the principal and the other half to interest.  Are there any known laws explicitly allowing or preventing this behavior?


So I have this flat shape, and I'm trying to make it 3D. It's pretty round and has a ton of vertices. My end goal is to have the 3D shape with smooth edges.    I approached this by pressing ALT+F to fill the shape. It created a bunch of faces that don't look too clean.    Then I extruded the shape once forward, and once back (from the original shape) so that it was "3D". This is close to what I want, but I want it to have a subdivision modifier, so the edges look smooth.    I then applied a subdivision modifier, and the shape just looks awful. Bumpy and ugly.   If I do "F" instead of ALT +F, it still produces a poor result.   I've tried looking on this forum for solutions to similar issues, but so far not much has worked. I hope the images are enough to paint my issue, and give an idea of what I'm trying to achieve, any help would be appreciated.

So I'm making a basic car model here for fun, but when I try to add the subdivision surface modifier for smoother body, the side of the car become what it looks like in the screenshot. Is there any solution to make the side look less bulky? Any help is appreciated. :D


I have a code like this,   def myfunction(json_dict):      mylistsize = len((list(json_normalize(json_dict,'data')['title'])))-1      print(mylistsize)      data = [c for c in json_dict['data']][0]#This line when it is 0 or 1 or 2 works for me.      df = pd.DataFrame()      data_paragraphs = data['paragraphs']   But when I change it to include all the elements of my array, to something like this -   data = [c for c in json_dict['data']][0:mylistsize]   It gives me an error on this line -     data_paragraphs = data['paragraphs']  Kindly help me with this.

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


When making bread during Ramadan, I can't taste the flour.  Is there a known ratio of salt to flour when making bread?

I've been baking bread on and off during the last two years. Now, finally, I found a nice recipe. It calls for 2% of salt (20gr per kg of flour). It gives a tasty bread.  On the other hand, the health service recommends using less salt in bread, but I don't know the recommendation, nor the tastefulness of the recommended bread... (that's a lot of recommends in one sentence).  So, what is the recommendation and does it produce a decent bread?


My website was attacked yesterday, SQL injection attack thanks to the parameter left open I made the necessary editing in php codes. sql code of the attack (SELECT 7105 FROM (SELECT(SLEEP(32-(IF(ORD(MID((SELECT HEX(IFNULL(CAST(table_name AS NCHAR),0x20)) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema=0x7472616b75735f647974726f726774657374 LIMIT 29,1),10,1))>49,0,32)))))FfpS)  I regularly review access and mysql logs. There were no new attacks on the url, but the slowness of my web site still continues. I monitor the processes with the show full processlist command, sometimes the sleep command comes into play. Could a timer have been created?

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


All these years I've just washed rice, put it into a pressure cooker (a regular pressure cooker; not a rice cooker), added the right amount of water and cooked it until the first whistle. Both for brown rice and white rice.    But when looking up this page on , the author does two things differently. 1. She pre-soaks the rice for 30 minutes. 2. She brings the water to a boil before adding the rice to it.    On searching for more info,  and  recommend soaking rice overnight! This completely perplexed me.   Assuming that I want to cook my rice with soaking, how do I choose between soaking for 30 minutes and overnight? Is soaking overnight a safety concern? Is it better to soak it overnight in the fridge? Wont an overnight soaking make it absorb a lot of water and make it less suitable for cooking in a pressure cooker?

I rarely ate rice growing up, and only recently started cooking it. I started with basmati, and seemed to do alright with that, but my wife (who used to live in Korea) said she preferred rice to clump together, as opposed to the perfect individual grains of a nicely cooked basmati.  Well, as embarrassed as I am to say so, I've been struggling with this two-ingredient dish. I've tried using short-grain rice, which helped somewhat, but using my basmati technique on it is not yielding the desired result.   After doing some research, I've found a slew of conflicting advice, on nearly every point, including:   Wash / don't wash Soak / don't soak Use less / more water Boil hard / steam on lowest setting   What I would love to know is, what do each of these factors really do?


In , Witten derives the general coordinate variation of a Wilson loop, i.e., equation 3.11. My question is, how does one derive this? I only managed to obtain a similar result by doing a direct variation and integration by parts, the result I obtained had  \begin{equation} F_{IJ}=\partial_I A_J-\partial_J A_I. \end{equation} This is clearly incorrect, since he specifically says that $F=dA+A\wedge A$. I believe I am supposed to vary the path somehow, or that the path ordering somehow gives rise to the term $A\wedge A$, which is just the commutator $[A_I,A_J]$. However, I cannot see how this happens.

I am trying to derive Eq. (7.25) (p. 117) of Polyakov's book:  $$ \delta \Psi (C) ~=~ \int_{0}^{2\pi} {\rm P} \left(F_{\mu\nu}(x(s)) \exp \oint_C A_\mu dx^\mu \right)\dot{x}_\nu \delta x_\mu(x) \, {\rm d} s, \tag{7.25} $$  where the non-abelian phase factor around a closed loop $C$ is defined as  $$ \Psi(C) ~=~ {\rm P}\exp \left(\oint A_\mu dx^\mu \right) = {\rm P}\exp \left(\int_{0}^{2\pi} A_\mu \dot{x}_\mu\, {\rm d}s \right). \tag{7.1} $$  It seems that he is using the relation given on p. 116:  $$ \delta \, {\rm P} \exp \int_{0}^{2\pi} M(\tau) {\rm d}\tau ~=~ \int_{0}^{2\pi}{\rm d}t\,{\rm P} \left(\delta M(t) \exp \int_{0}^{2\pi}M(\tau){\rm d}\tau\right). \tag{7.24b} $$  Matching with (7.25) I find $\delta A_\nu = F_{\mu\nu} \delta x_\mu$. This relation seems to be saying that if I change the position of the loop at the parameter $s$ by $\delta x_\mu(s)$ then the vector potential changes by $\delta A_\nu(x(s)) = F_{\mu\nu}(x(s)) \delta x_\mu(s)$.    I don't know how to derive this relation. Is it legitimate?


Working on ads and pleasing your client is hard. Sometimes they will change they mind and would prefer the one you made on the 5th revision when you already revised it 10 times. And changing small things multiple times and saving the file gets frustrating. You forget the one you did from the 3rd revision.  How do you deal with this? For me, history panel is my friend in Photoshop. I recently discovered it can automatically save a snapshot every time you save it. But sometimes, its not super effective.

I'm trying to figure out the best way to link a printed piece to the electronic file name. What are the best practices for file naming and version control? Do you use a log of sorts for graphic design?


Is there a bash command like source except it will only source a file once for a given shell?  for example:  source_cached foo.sh    # runs as normal source_cached foo.sh    # would not load foo.sh a second time   since the foo.sh path has already been sourced, it would not source it again.

At the moment, when I open a terminal on my Mac, it automatically calls:  source ~/.bash_profile.  What bemuses me, however, is that my shell does not seem to inherit any of the content from ~/.bashrc or ~/.profile. But that might be typical.  I have a number of scripts to inherit using source or .; if I put those calls in ~/.bash_profile, it can take some time to load a new shell window, sometimes 3 or 4 seconds, and that gets old. I imagine that there is some way to source those scripts just once and have my ~/.bash_profile file inherit it somehow.  Note that calling source ~/.bashrc or source ~/.profile from my ~/.bash_profile is not what I want to do, and is also probably a bad idea. It's not what I want to do because it doesn't solve the problem of a slow load for each new shell.  I added some echo statements; every time I open a new bash terminal window, this is logged:  starting to load /etc/profile finished loading /etc/profile starting to load bash_profile finished loading bash_profile   that makes sense, but what is disheartening - do I really need to load these every time a new shell is opened? Why can't it do some fancy inheritance so that we don't have to reload everything every time?  I created a video demo'ing the problem.  I have 4 terminal applications I use regularly:  terminal.app                  # misbehaves iterm2                        # misbehaves webstorm terminal emulator    # misbehaves vscode terminal emulator      # behaves!   VSCode actually behaves in the way I would desire. I am guessing that it does this by loading ~/.bash_profile in a parent shell, and only doing that once, when vscode boots up. All of the terminal windows in the app, are then subshells of that one parent shell.  Hopefully this video makes the issue clear:   This is a legit issue - most terminal applications do this whole thing wrong, however, quite miraculously, it appears that VSCode from Microsoft actually does this whole thing the right way, see this issue:


I am trying this below program  class Car1 {     static int count;     Car1()     {         System.out.println("Car instance has been created...");     }      Car1(int arg) {         System.out.println("Car instance has been created...");     }      Car1(double arg) {         System.out.println("Car instance has been created...");     }     Car1(int arg1, double arg2) {         System.out.println("Car instance has been crreated...");     }     {         count++;     } } public class MainClass10 {     public static void main(String[] args) {         System.out.println("Program Started");         new Car1(11);         new Car1(11, 12.11);         for (int i = 0; i<9; i++)         {             new Car1();         }         Car1 c1 = new Car1(11.12);         System.out.println("Total number of cars: " + c1.count);         System.out.println("Program Ended");     } }   The output for number of count is 12 and when I try this by changing count variable as non static then 'number of count is 1'.  Could anyone please help me understand this?

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


In the Chamber of Secrets, till the end, no one knows that the monster of Slytherin and the creature behind the attacks is a Basilisk.  Dumbledore, of all people, should have figured it out using the following clues  There are the following observations from which at least Dumbledore could figure out that the creature was a Basilisk:   Slytherin (and Riddle, perhaps?) being fond of snakes, it would be hard to miss that the monster of Slytherin would be snake-like at least. There are presumably a limited number of magical creatures that can petrify their victims. The fact that roosters were being found dead in suspicious circumstances was a clue to the Basilisk. Plus, it wasn't a satisfactory explanation that an Acromantula killed Myrtle, as she was uninjured, but dead.   Surely Dumbledore could put two and two together and figure out what the monster was?  I believe the clues pretty much narrow it down to a Basilisk, correct me if I am wrong.  After all, even if it takes a genius to figure it out, Dumbledore was the right man for the job!  But he presumably didn't  I say this because:   He made no attempt to distribute mirrors among the students as a safety measure. Nor did he station hundreds of roosters in the school to kill the basilisk.(Surely even Riddle would have a hard time killing so many roosters quickly to save his basilisk?) This would have been an effective measure, as roosters living as far away as near Hagrid's hut were threats to the Basilisk, so many roosters in the castle would probably get the job done.   Of course these methods are kind of extreme, but they are helpful in saving lives.  My Question  I can understand if no one else could figure out what Slytherin's monster was, but why couldn't Dumbledore do so?   After all, all it would take is some digging. Dumbledore, highly intelligent, would probably figure it out easily.  Can someone give me a reasonable explanation for this?

The information is all clearly there, since Harry and Ron, two 12-year-olds, were able to figure it out (with a bit of help from a petrified Hermione), thought at the time Aragog was much younger and smaller and wouldn't have been as easy to find, so maybe the "spiders flee before it" clue would have been lost, although to be honest it's not exactly as vital a piece of the puzzle as the others.  Dumbledore himself is obviously a very capable and intelligent Wizard, and after Myrtle died she came back as a ghost and was able to provide (admittedly limited) details of her own death.  I don't know about you, but I'd have thought at least someone would have tried to piece it together at the time, and it wouldn't have taken them long to figure out "Oh, she saw a pair of big yellow eyes after hearing a boy speak a funny language in the bathroom and dropped dead? Sounds like she might have heard somebody order a Basilisk to look her in the eyes in parseltongue", especially if the investigator in question was someone like Dumbledore.  Do we have any info on why nobody seemed to have found out anything in 50 years prior to Harry Potter (and, probably more importantly, Hermione Granger) turning up at Hogwarts?


I have negative AIC values for comparing models and want to know which would suggest a model fits better. I know that smaller values indicate a better fitting model but unsure how this works for negative models  E.g. I have one model with an AIC of -161.5795 and one with -143.8596. Does this mean the first model fits best? The R squared suggests that this is a good model with R2m = 0.55 and R2c 0.86

My question is related to the thread .  I often get negative AIC values from the software I use.  I notice it most when I'm doing time series.  But here is what I don't get.  When defining the AIC like   $$AIC = 2k-2\ln(L)$$  $L$, the likelihood, is a joint probability and to my understanding must be bound between 0 and 1.  Mathematically this implies the $AIC$ must be positive.  So I don't know what my software is giving me for the value labeled $AIC$.  Any thoughts?


Let $E$ be  a complex Hilbert space. Let $T\in \mathcal{L}(E)$.     It is true that for an arbitrary operator $T\in \mathcal{L}(E)$, we have   $$w(T) := \sup\big\{\;\left|\langle Tu\;|\;u\rangle \right|,\;\;u \in E\;, \left\| u \right\| = 1\;\big\}=0\Longrightarrow T=0?$$   Or $T$ must be self-adjoint operator?   Thank you.

Let $E$ be  a complex Hilbert space. Let $T\in \mathcal{L}(E)$.  I have two questions:     Why it is not true that for an arbitrary operator $T\in \mathcal{L}(E)$, we have $\langle Tu\;|\;u\rangle=0,\;\forall u\in E \Longrightarrow T=0$? And is  this property true for normal operators?   I think it is true for self adjoint operators because the norm of a self adjoint operators is given by  $$\left\|T\right\|= \sup\big\{\;\left|\langle Tu\;|\;u\rangle \right|,\;\;u \in E\;, \left\| u \right\| = 1\;\big\}$$  Thank you.


The bug here is the notification ! I must confess. I upvoted  up when I reached my daily vote limit. Before the crime :    During the crime :   After the crime (refreshed):   You can go and see for yourself. It is still there.

I just cast my last vote of the day. But when I did, I received this message:       Daily vote limit reached; come back in 2 hours   However, this was my last vote. I don't need to come back in 2 hours! The vote still stands.  The box should probably only appear if I cannot vote anymore, or the wording should be changed.


Let $x_1 < \cdots < x_n$ and $y_1 < \cdots < y_n$.  Prove that $\det(e^{x_iy_j}) > 0$.  Expanding out the determinant shows that it suffices to prove:  $$\sum_{even} \sum x_iy_{\sigma{(i)}} > \sum_{odd} \sum x_i y_{\sigma{(i)}}$$ Which is kinda like a generalized rearrangement inequality, but I'm not quite sure how to finish it.  Reading the solutions to "positivity of the determinant" answers my original question, but I would like to see if it is possible to have a proof of the above inequality.

I'm stuck to prove the following exercise : Given real numbers $x_1,\ldots,x_n$ and $y_1,\ldots,y_n$, show that  $$ \det(e^{\large{x_iy_j}})_{i,j=1}^n>0 $$ provided that $x_1<\cdots<x_n$ and $y_1<\cdots<y_n$.   Any idea ?


I'm following Professor R. Shankar's Fundamentals of Physics course on YouTube.  There I saw him doing manipulations of Calculus I never saw before.  Here it goes, $$\newcommand\deriv[2]{\frac{\mathrm d #1}{\mathrm d #2}} \deriv{v_t}{t}=a$$ $$\implies v_t \newcommand\deriv[2]{\frac{\mathrm d #1}{\mathrm d #2}} \deriv{v_t}{t}=a v_t$$ $$\implies \newcommand\deriv[2]{\frac{\mathrm d #1}{\mathrm d #2}} \deriv{\dfrac{{v_t}^2}{2}}{t}=a \newcommand\deriv[2]{\frac{\mathrm d #1}{\mathrm d #2}} \deriv{x_t}{t}$$  Then he cancels out $\mathrm dt$ from both sides and obtains, $\mathrm d(\dfrac{{v_t}^2}{2})=a\cdot \mathrm d(x_t)$  And proceeds by, $\dfrac{1}{2} \mathrm d({v_t}^2)=a\cdot \mathrm d(x_t)$  Thus deriving, $\dfrac{1}{2} ({v_t}^2-{v_0}^2)=a (x_t-x_0)$ $\implies {v_t}^2-{v_0}^2=2a(x_t-x_0)$  So, ${v_t}^2={v_0}^2+2a(x_t-x_0)$  How do you justify his calculations using Mathematical rigour?   Is it legitimate to cancel out $\mathrm dt$ from both sides? Aren't we considering $\newcommand\deriv[2]{\frac{\mathrm d #1}{\mathrm d #2}} \deriv{v_t}{t}$ as a fraction then? And Isn't there a better way of deriving this using Integral calculus?

Just as background, I should say I am a mathematics grad student who is trying to learn some physics. I've been reading "The Theoretical Minimum" by Susskind and Hrabovsky and on page 134, they introduce  transformations. Here's the first example they use:  Consider a particle moving in the x,y plane under the influence of a potential, $V$, which depends only on the radius, with Lagrangian:   $L=\frac{m}{2}(\dot{x}^2+\dot{y}^2)-V(x^2+y^2)$  This is clearly invariant under rotations:  $x \rightarrow x\cos \theta + y\sin \theta$  $y \rightarrow -x\sin \theta + y\cos \theta$  All well and good. Now they say "consider what happens ... when the angle $\theta$ is replaced by an infinitesimal angle $\delta$." Already I could say "What the heck is $\delta$ really?", but I'm willing to play along with my intuition. Since $\delta$ is infinitesimal, we work to first order and say   $\cos \delta=1$ and $\sin \delta= \delta$.  Plugging this into our rotation formulas above, we obtain:  $x \rightarrow x+y\delta$  $y \rightarrow y-x\delta$  By differentiating, we see that:  $\dot{x} \rightarrow \dot{x}+\dot{y}\delta$  $\dot{y} \rightarrow \dot{y}-\dot{x}\delta$  Plugging these into the Lagrangian and ignoring terms higher than first order, we see that the Lagrangian is invariant under this transformation.  My main problem with all of this is that I don't understand what the physical nature of an infinitesimal transformation actually is. All I got from the above was that if you do this formal calculation by following rules like "only work to first order in $\delta$," then the Lagrangian is invariant. This is in contrast to the case where we have an actual transformation, like a rotation, where there is no question about what is going on physically.  I would also like to know how all of this relates to rigorous mathematics. In mathematics, I can't recall ever using infinitesimals in an argument or calculation, so it would be useful if there was some way of formulating the above in terms of limits/ derivatives/ differential forms (for example). I sense a connection to Lie Algebras, as the infinitesimal version of the rotation is $(I+A)$ where $I$ is the identity matrix and $A$ is an element of the Lie Algebra of $SO(2)$.   Here are some questions whose answers I believe may be useful to me (feel free to answer some or all):  -What is an infinitesimal quantity like $\delta$ to the physicist?   -Why do physicists argue using infinitesimals rather than "standard" calculus?  -What is the physical meaning of infinitesimal transformation? How does it relate to Lie Algebras?   -Is there a rigorous theoretical apparatus for justifying the computations shown above?  -What is meant by the Lagrangian being invariant under infinitesimal transformations?  If any of the questions seem too vague, please say so. Thanks in advance for your insights!


What is the mathematical proof for this?

Suppose I have two counter-propagating travelling waves of the same frequency but of different amplitude, like the transverse waves produced in a string by partial reflection off an endpoint.  I read that we will get a mixture of standing and traveling waves, and I can see the theoretical part, but what does this mean, exactly? What are the nodes now? Also, can I now say that energy between loops will be non-transmitting? Because now we have both a traveling and a standing wave.  If possible please provide a picture for better visualization.