public static void main(String[] args) {   Clock c = new Clock();   c.m = c.m + 1;   //where m is a private instance variable in an another class.` }   Why is it incorrect for the main() method using a class Clock to have the second statement below? Please help?
In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?
What if I accidentally run command "chmod -R" on system directories (/, /etc, ...) REST Service API executor.executeAsync Call Ends in Failure Function in Sharepoint Hosted App Any Answers Will Help me to Forward and Gain Knowledge in SharePoint Development  While i am Trying to get the list Items Using Rest API Calls in SharePoint Hosted App Using Below Function  function loadingSamples()  {     var JobListName = "RRR Jobs #";     var executor;     // Initialize the RequestExecutor with the app web URL.     executor = new SP.RequestExecutor("/");      //Fetching the choice values from the Job Status Field, to show in the Dropdown field     executor.executeAsync     ({         url: "/_api/web/lists/getbytitle('" + encodeURIComponent(JobListName) + "')/fields/getbytitle('Job Status')?$select=Choices",         method: "GET",         headers: { "Accept": "application/json; odata=verbose" },         success: successHandlerStatus,         error: errorHandler     }); } function successHandlerStatus(data)  {     alert("sucesss") }  function errorHandler(data, errorCode, errorMessage)  {     alert("errorMessage") }   It's always going to error function named errorHandler With  Error Code as -1002 and Error Message as Bad Request and Inside Data -> Body , the Error message is  {     "error":{            "code":"-1,Microsoft.SharePoint.Client.InvalidClientQueryException",         "message":{             "lang":"en-US",             "value":"The expression \"web/lists/getbytitle('DWR Jobs \" is not valid."         }     } }   Note :    This is working code in Sharepoint Hosted App that previously hosted in another Windows server. Now i hosted this App in New windows server,it's successfully hosted but it gives above mentioned Error in Rest Service Call. I'm trying to make a page where a user provides an ID of a attachment and the site will set the headers and deliver that file instead of a 404 page. so /download/1754 would lookup the attachment with that Id and output it for viewing/download depending on the file type.  I just can't think of a wordpress friendly way to do this from inside a plugin. I considered using add_rewrite_rule but couldn't see a good way around it, also considered checking $_SERVER['REQUEST_URI'] to deliver the content before any HTML but then I'd have to stop the page from rendering a 404 and I was not sure of a Wordpress friendly way to do this.  My current idea was to have my plugin make a download page, assign a template and have that template run the logic instead of my plugin class. while I have used this before for another situation it was very messy as I had to write a lot of code to force users to be unable to update or edit the file and recreate/delete it on activation.deactivation. so ideally I'd like to avoid that. I have a Trek 3900 Mountain bike that had a serious creaking problem whenever I would pedal.  I found that the ring that holds the Shimano sealed bearing was really loose.  I tightened it up and it helped somewhat.  It loosened up again and I put loktite on the threads and really tightened it up but it is still creaking a little.  The bearing cartridge seems fine.  Any ideas? Uncaught exception thrown after moving my website to localhost What is the difference between Python's list methods append and extend? Truth Tables for Digital Circuits 'pagesize' attribute ignored in hot network list Steps to reproduce:   Open  in Guest/Incognito mode or with cookies disabled. This will have 30 questions per page by default. Click the  link and as expected, you'll see questions 1-50 with page size of 50. Go the the  and see the bug: you're in the second page of 30 items per page, i.e. you'll see questions 31-60 instead 51-100 as expected.     It is very annoying. Please fix it.  My user-agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:70.0) Gecko/20100101 Firefox/70.0  There are no plugins installed affecting the site. It happens both when logged in or not.  The mechanism used to work before, but some weeks/months ago it stopped, enough to bother me to post here :)  Here are all modified "privacy" settings from about:support page:  privacy.clearOnShutdown.offlineApps true privacy.clearOnShutdown.openWindows true privacy.clearOnShutdown.siteSettings    true privacy.cpd.offlineApps true privacy.cpd.openWindows true privacy.cpd.passwords   true privacy.cpd.siteSettings    true privacy.donottrackheader.enabled    true privacy.history.custom  true privacy.item.cookies    true privacy.sanitize.migrateClearSavedPwdsOnExit    true privacy.sanitize.migrateFx3Prefs    true privacy.sanitize.pending    [{"id":"shutdown","itemsToClear":["cache","cookies","offlineApps","history","formdata","downloads","sessions","siteSetti privacy.sanitize.sanitizeInProgress ["cache","cookies","offlineApps","history","formdata","downloads","sessions","siteSettings","openWindows"] privacy.sanitize.sanitizeOnShutdown true privacy.sanitize.timeSpan   0 privacy.trackingprotection.enabled  true privacy.trackingprotection.introCount   20 I am trying to understand how complex numbers made their way into QM. Can we have a theory of the same physics without complex numbers? If so, is the theory using complex numbers easier? Is there an English term for "L'esprit de l'escalier"? Finding a conformal map from the intersection of two disks to the unit disk. Slope of geometry as `fac` input for cycles material I have a terrain with two materials going into a Mix Shader, I want the fac input to be the slope of the terrain. Steep parts should be one color, flat part another. Suppose $m_1, m_2, m_3,\ldots, m_k &gt; 1$ and not necessarily pairwise relatively prime. Also $a_1, a_2,\ldots, a_k\in\Bbb Z$. What can we say about the solutions of the following congruence equations: $\begin{align*} x&amp;=a_1\mod m_1\\ x&amp;=a_2\mod m_2\\  &amp;\phantom{1}\vdots\\ x&amp;=a_k\mod m_k \end{align*}$ Puzzling Enumerable.Cast InvalidCastException The following throws an InvalidCastException.  IEnumerable&lt;int&gt; list = new List&lt;int&gt;() { 1 }; IEnumerable&lt;long&gt; castedList = list.Cast&lt;long&gt;(); Console.WriteLine(castedList.First());   Why?  I'm using Visual Studio 2008 SP1. I am writing a few rather large pseudocode functions using algorithm and algorithmic, i.e. my code looks something like:  \begin{algorithm}                      \caption{Coolest Algorithm ever}           \label{findme}                           \begin{algorithmic} [1]                   % enter the algorithmic environment \REQUIRE    Here are a few variables \\             variable 2 \\             variable 3  \ENSURE     this is the output \\             output 2  \STATE $some cool code here$ \STATE $some cool code here$ \STATE $some cool code here$ \STATE $some cool code here$ \end{algorithmic} \end{algorithm}   Unfortunately this code does not fit on one page and I am definitely not able to split it into some subfunctions or so (I already did that as far as possible).  So now I need to split up the algorithm into two pages, but I have no idea how.  The easiest way I can imagine is just to start a new algorithm on the new page, but this time letting the line counter start at line 35 or so instead of 1. But how can I do that?  Please not that there is already a similar question here on this site, but it deals with the package algorithmicx. Shell Script for logging into a ssh server I tried writing a shell script which can do automatic login into a ssh server using password which is mentioned in the script. I have written the following code:  set timeout 30 /usr/bin/ssh -p 8484 root@172.31.72.103 expect  {    "root@172.31.72.103's password"     {       send "password\r"     } }   This code is not running properly, still it is asking for the password. Can somebody please help me in solving this pc ram memory 2x1GB or 1x2GB I don't know if it's the right place to ask but can somebody advise me for buying a ram memory for my computer.  I have a Dell Vostro 200 with 1GB of RAM and 667MHz. (2 x 512MB)  I want to buy raise the amount of RAM but I'm confused whether to buy 1 x 2GB or 2 x 1GB  I know it's the same for the available amount of memory but is ther a difference maybe in the clock speed so that 2 x 667MHz will be better than 1 x 667MHz. or maybe accessing one single memory slot will be faster and better than accessing two slots.  Please anyone helps. I am trying to copy multiple files named "F3.bam" two level of directories to up and then rename these files with the name of the sub-directory after copy.  For example:  /samples/mydata1/RUN1/ID_date/PCR2/TIME1/F3.bam /samples/mydata2/RUN1/ID2_date4/PCR2/TIME7/F3.bam /samples/mydataxxx/RUN1/IDxxx_datexxx/PCR2/TIMExxx/F3.bam   Expected results:  1. The files are first copied two directories level up:  /samples/mydata1/RUN1/ID_date/F3.bam /samples/mydata2/RUN1/ID2_date4/F3.bam /samples/mydataxxx/RUN1/IDxxx_datexxx/F3.bam   2. The files are renamed according to the name of the current sub-directory:  /samples/mydata1/RUN1/ID_date/ID_date_F3.bam /samples/mydata2/RUN1/ID2_date4/ID2_date4_F3.bam /samples/mydataxxx/RUN1/IDxxx_datexxx/IDxxx_datexxx_F3.bam   Ideally a bash loop would be great (working on a Mac). SharePoint Online REST API List Items Paging Can anyone confirm that they are able to page against a SharePoint Online List Items query? Either I'm not understanding how this query is supposed to work or it just doesn't work.   tenant.sharepoint.com/conversations/_api/web/lists/getbytitle('Posts')/items?$skiptoken=Paged=TRUE&amp;amp;P_ID=2   I'm leveraging the documentation  but when using Postman, all items are returned in the same query response. For example, according to the $skiptoken P_ID=2 above, I'm expecting a response without item ID 1. However, I still get ID 1, 2, and 3 in the response. Units and Nilpotents