How can I iterate through a string in Java?  I'm trying to use a foreach style for loop  for (char x : examplestring) {     //action }
StringTokenizer? Convert the String to a char[] and iterate over that? Something else?
Color of questions with accepted answers on user profile page Related to these questions:    When viewing the Meta user profile, the difference between questions with accepted answers and questions without is pretty subtle. At first glance, I couldn't tell the difference at all. Can the contrast between the styles be increased a bit to make it easier to see?     This screenshot doesn't look too bad, but when looking at a list going down a whole page, it gets a bit difficult to pick one out at a glance. (I'm guessing even more so for some of the color-challenged users) test class with Batch and Callout I have a problem with FeedItems in my Test class, it's very weird behaviour Does someone explain to me why this happens?  Callout Class  public with sharing class Callout {  public static void runProccess(Case[] records) {     Database.executeBatch(new CalloutBatch(records), 10); }  public static void send(Case[] records) {     Case[] toUpdate = new Case[]{};       for (case record : records) {         HttpRequest req = new HttpRequest();         req.setEndpoint('callout:test/SOME_URL');         req.setMethod('POST');         req.setHeader('Content-Type', 'application/json');         req.setBody('');         Http http = new Http();         HTTPResponse res = http.send(req);          Map&lt;String, Object&gt; response = (Map&lt;String, Object&gt;) JSON.deserializeUntyped(res.getBody());          toUpdate.add(new Case(Id = (Id) response.get('Id'), Status = (String) response.get('Status')));     }      update toUpdate;  } }   CalloutBatch Class  global with sharing class CalloutBatch implements Database.Batchable&lt;Case&gt;, Database.AllowsCallouts{  private final Case[] records;  global CalloutBatch (Case[] records) {     this.records = records; }  global Iterable&lt;Case&gt; start(Database.BatchableContext BC) {     return records; }  global void execute(Database.BatchableContext BC, Case[] scope) {     Callout.send(scope); }  global void finish(Database.BatchableContext BC) { } }   Test Class  @IsTest  private class CalloutTest { @IsTest static void shouldReaciveData() {     String status = 'Closed';     Case caseRecord = new Case(Type = 'Web', Status = 'New');     insert caseRecord;      //insert new FeedItem(ParentId = caseRecord.Id, Visibility='AllUsers', Type = 'TextPost', Body = '');      System.assertEquals(0, [SELECT Count() FROM Case WHERE Id = :caseRecord.Id AND Status = :status]);      Test.startTest();     Test.setMock(HttpCalloutMock.class, new CalloutTestMock(caseRecord.Id, status));     Callout.runProccess(new Case[]{caseRecord});     Test.stopTest();      System.assertEquals(1, [SELECT Count() FROM Case WHERE Id = :caseRecord.Id AND Status = :status]); } }   Mock Class  public with sharing class CalloutTestMock implements HttpCalloutMock {  private Id recordId; private String status;  public CalloutTestMock(Id recordId, String status) {     this.recordId = recordId;     this.status = status; }  public HTTPResponse respond(HTTPRequest req) {     HttpResponse response = new HttpResponse();      response.setStatusCode(200);     response.setBody('{"Id": "' + recordId + '", "Status": "' + status + '"}');      return response; } }   This code works, but when I uncomment insert FeedItem in Test Class I receive an error message:     System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out   Class.Callout.send: line 23, column 1   Class.CalloutBatch.execute: line 20, column 1   FeedItem doesn't have an impact on this functionality, (I don't have any Process Builders, triggers etc. on FeedItem object) Assuming there are 5 items in the settings file (MySetting1 to MySetting5), why does PropertyValues have 0 items while Properties has the correct number?   Console.WriteLine( Properties.Settings.Default.PropertyValues.Count); // Displays 0 Console.WriteLine( Properties.Settings.Default.Properties.Count);     // Displays 5 LaTeX figures side by side "can't" versus "couldn't", what is the difference? That can't be Obama at the door, it's too early.  That couldn't be Obama at the door, it's too early.    What is the difference between them? Are they almost the same? Etiquette, rules, or advice on which site to pose a question? (Or, why are there so many StackExchange sites?) Can't install xposed framework I want to install the xposed framework on my Nexus 5 and in the framework, the install/update option doesn't work.  My Nexus 5 runs Android 5.0 (Lollipop). I  and while on other sites I did not get a 'Reputation Notification' to explain that I was given 2 upvotes for my answer - yet if I manually check my Profile here at meta.SE my total Reputation is in agreement with the amount there.  I'm not knowledgeable about the intercommunication between the servers and sites but I would explain it this way: Super User either failed to send or other sites failed to receive the message the I had a reputation update on Super User.  I should have received either two green star trophies (🏆) of 10 reputation each or one of 20; depending on when I returned to one of the Stack Exchange / Stack Overflow / Super User / etc. sites.  Here's a screenshot showing no reputation change notification for Super User:    Here's a screenshot of my Profile over at Super User showing that I was silently credited:    I'm bringing this up on Meta.SE in case the communication is broken between more sites than just Super User and everywhere else. Proof of the formula $1+x+x^2+x^3+ \cdots +x^n =\frac{x^{n+1}-1}{x-1}$ Possible Duplicate:          Proof to the formula  $$1+x+x^2+x^3+\cdots+x^n = \frac{x^{n+1}-1}{x-1}.$$ Where to start with Oracle? More than one time dimension We know that space-time dimensions are 3+1 macroscopically, but what if 2+2?  Obviously it is tough to imagine two time dimensions, but mathematically we can always imagine as either having two parameters $t_1$ and $t_2$ or else in Lorentz matrix $$\eta_{00} = \eta_{11} = -1$$ and, $$\eta_{22} = \eta_{33} = 1.$$  Is there any physical reason for not taking this, like the norms become negative or something else? Join tables from two different server The use of imaginary and complex values comes up in many physics and engineering derivations. I have a question about that: Is the use of complex numbers simply to make the process of derivation easier, or is it an essential ingredient, without which it would be impossible to derive some results?   I can identify two different settings where the answer may be different:   It doesn't look like it is mandatory for results in Newtonian mechanics, General Relativity and classical electrodynamics. Can we say the same thing about quantum mechanics either way for sure?   Could this be a difference in quantum mechanics over the classical picture? Two seasonal periods in ARIMA using R I'm currently using R to predict a time series with these instructions:  X &lt;- ts(datas, frequency=24) X.arima &lt;- Arima(X, order=c(2,1,0), seasonal=c(1,1,1)) pred &lt;- predict(X.arima, n.ahead=24) plot.ts(pred$pred)   As you can see I've data each hour, and I chose the seasonal period of 24 (one day).  I would like to improve my forecasting using an additional seasonal period in order to include the seasonal component of the week (seasonal length of 7*24=168 data)  Is there any method for this? How do you do it?  UPDATE: I've read  (your) blog page, maybe can I use the external regressors to simulate a second seasonal period? Why am I getting a NoClassDefFoundError in Java? I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this? I've used following codes and no luck  1  //Hide admin footer from admin function change_footer_admin () {     return ' '; } add_filter('admin_footer_text', 'change_footer_admin', 9999);  function change_footer_version() {     return ' '; } add_filter( 'update_footer', 'change_footer_version', 9999);   2  function wpbeginner_remove_version() { return ''; } add_filter('the_generator', 'wpbeginner_remove_version');   3  function my_footer_shh() {     remove_filter( 'update_footer', 'core_update_footer' );  } add_action( 'admin_menu', 'my_footer_shh' );   Still I see those texts and version on my footer.   So what is the accurate way to remove these? I've added these code snippets into my child theme function.php I have a sprite that moves from waypoint to waypoint. It turns to face its velocity vector, but not instantly (there's a rotation speed).  The problem I'm having is, from one direction to another, the sprite will often turn in wild, unnecessary ways instead of appearing like you might expect a car to appear (turn such that the minimum delta in angle occurs).  Right now I'm using the following formula to calculate the rotation float for the current velocity:  MathHelper.PiOver2 + -Math.Atan2(anotherVector.Y - vector.Y, -(anotherVector.X - vector.X));   And then I lerp the current rotation by the new rotation by the rotation speed (10f):  rotation = MathHelper.Lerp(rotation, targetRotation, 10f * (float)gameTime.ElapsedGameTime.TotalSeconds);   But unfortunately, it's causing the sprite to spin in wild directions before reaching the correct angle. Any suggestions? Upgrading from Yosemite to El Capitan, but not Sierra We have an older iMac (Model A1311, Mid 2011). It has been running Yosemite. We have run into some of the WIFI issues associated with Yosemite.   Is it possible to upgrade to El Capitan but not Sierra?   El Cap has been out longer. Its my wife's computer, its older, and I really don't want to be debugging Sierra until a few  more "dot" releases come out. Automatically convert quotations in the form of "abc" to become ``abc" I did not know that latex had different symbol for opening and closing quotation marks. I've used it like "abc" every where and just realised that I really should have used ``abc". Is there anyway I can convert all the quotations to become like ``abc"? Doing it manually will take forever as I have a lot of quotations. When will there be a Windows Phone app?