Why is iCloud not syncing my calendars on my iOS devices?

Question: When I create or update a calendar event on one device, it is not being propagated to my other devices via iCloud despite having iCloud enabled for calendars on all my devices and the Apple ID being the same everywhere.
Comment: Check that the calendar(s) showing are not only "on my Mac" but include iCloud's calendars.
Comment: Both sets of calendars are visible.
Comment: Any answers for this ongoing issue? I have had the same issue pop up over and over, seems the only way to fix is to delete and re add. which is a huge pain in the bumm, cause my phone will not sync with anything, including a backup. it is like it doesnt talk, but it will listen. anything i put on my cal goes no where, but anything added to icloud or my computer magically shows up on my phone.
Comment: I think that if I click and drag an appointment to a different day in Outlook, iOS doesn't sync that properly, it still shows the appointment on the original day. Further supporting this, if I delete the appointment in iOS on the wrong day, it deletes the appointment in outlook on the right day. The only workaround I found was to just delete the rescheduled appointment and re-make it.
Answer: Your iOS device may be saving new calendar events to a local calendar instead of the iCloud calendar. This is particularly confusing if that local calendar has the same name as the calendar you want to use in iCloud. To change the default calendar for saving events on an iOS device, navigate to Settings > Mail, Contacts, Calendars > Default Calendar and select your preferred  calendar under your iCloud account:
Comment: Syncing problems come in two flavors:  *easily resolved*  sweet and *oh, my aching head* sour. Unfortunately, you've seemingly bitten into a lemon here. Update your question with as many details and steps that you've already taken and we'll keep plugging away at it. Best of luck finding a sugary center.
Comment: Thanks jaberg, I have checked this and it seemed that all the events in question were correctly placed in the iCloud calendars. I may consider changing the default calendar as you suggest, however, I have the added complication that I am running Snow Leopard and do add events there occasionally. Since SL "doesn't do iCloud", I may stick with assigning the calendar manually to ensure the events also sync over when I plug in my devices (even if this means duplicate entries sometimes). I wish Apple would allow iCloud for iCal .... :-(
Answer: Problem: Synching a shared calendar did not work from my Mac to iPhone (using iCloud), but worked from iPhone to Mac.
What I did: In the Calendars App on the Mac I exported the calendar - to have it as a backup. The old calendar could not be deleted on the Mac, it just re-appeared again (confirming that changes made on the Mac did not sync to iCloud). I therefore deleted the old calendar on my iPhone and it disappeared on the Mac as well. Good.
Then I re-imported the exported (old) calendar and gave it a new name. It now works. Probably would work using the old name as well (since internally the app uses calendar-IDs).
Answer: Try this:

Turn off the iCloud calendar on the phone: Settings> iCloud> Calendar> Off
Do a hard reboot of the phone: Hold down Power & Home buttons simultaneously.
Turn on the iCloud calendar on the phone: Settings> iCloud> Calendar> On
Set the phone and computer calendars to Push.
ON PHONE: Settings> Mail> Contacts> Calendar> Fetch new date - turn push on then under the iCloud mccs + 6 more, set to push
ON COMPUTER: in Calendar app> Preferences> Accounts> iCloud> Refresh calendars - set to push
Refresh the iPhone calendar. In the Calendar app, go to Calendars and drag the screen down for a refresh.

Now it should work.
If some events are still not showing after the previous advice, left click on the event in question (on the calendar on your Mac).
Then click on >Calendar on the drop down; if the event type shows under "on my mac", select the same colour under the "iCloud" portion
Next refresh your phone calendar as per above, by swiping down on the (daily) notes section of the calendar app.
The event should now appear on both phone and Mac.
Answer: I had this problem and turned out that a setting had been put in place to only sync calendars 1 month back (Go to Settings. Mail, Contacts, Calendars. Sync. All Events)
So I could not see my data from prior months even though it was there in iCloud. I changed it to Sync All Events, turned phone off then on, and voila.
Answer: This Might be a Problem with an Entire Shared Calendar
If the appointment that is not syncing is in a shared iCloud calendar, it is possible that syncing no longer works for that entire calendar.  I experienced this while I was traveling in late September 2012 -- the missing appointments were my itinerary which was in a calendar I share with my executive assistant.
Sidebar: My suspicion is that Apple somehow broke the syncing of (some or all) shared calendars created prior to the iCloud update for the iOS6 release.
Confirm Problem
You can confirm that syncing is broken for a shared calendar by doing the following:

log into your iCloud calendar using a non-mobile browser
find the appointment that is not syncing
change the appointment from a shared calendar to a non-shared calendar

If the appointment shows up on your iOS device when you change it to a non-shared calendar, then that entire shared calendar might not be syncing to iOS devices anymore.  Test some other appointments in the shared calendar to confirm that the entire calendar is affected.
Another symptom of a broken shared calendar is that it causes Outlook Sync (installed by iCloud Control Panel on Windows) to hang (i.e. endlessly "Refreshing..." in the Outlook Toolbar).
"Solution"
The only solution that seems to work in this situation is to create an entirely new shared calendar.  The new shared calendar should accept new appointments and sync them to all devices, but it won't have the appointments from your old broken shared calendar.  The appointments from that calendar will have to be migrated to the new calendar.
Appointment Migration Option #1 - Use Outlook Sync
If you are the sharee (but not the sharer) of the broken calendar it is possible that you will see all of the appointments in Outlook (but not in iOS).  In this case, it might be possible to change the calendar view in Outlook to a list view and drag-and-drop the appointments en masse from the broken calendar to the new, working shared calendar.
Appointment Migration Option #2 - Use iCloud Web Page or iOS calendar
You can migrate appointments from the broken calendar to the new, working shared calendar by logging into the iCloud Web Page and manually changing each appointment's calendar.  This is very time consuming if you have many appointments.
Solution to Outlook Sync Hanging
The only way to solve the Outlook Sync hanging problem that is caused by a broken shared calendar is to delete the broken calendar.  Make sure that you migrate all of the important appointments before you do this, because deleting the calendar will also delete all of the appointments on it.
Answer: I also have problems getting IOS6 "Appointments" calendar to sync with iCloud (my MacBook iCal and Windows8 Pro Outlook 2010 were working normally). I have 4 calendars on iCloud: Appointments (default), Calendar, Work and Home. It took me a while to realise that only the "Appointments" calendar was failing to Sync. I created a new "Appointments2 calendar which appears to work normally". I was planning to migrate my "Appointments" to "Appointments2" using Outlook (because its easy) ... BUT its very comforting to realise that I'm not alone and someone else came up with this already!
Comment: hmmm ... well this workaround worked for me for while .. but now I'm back to square 1 :(
Answer: I've had this problem ever since I got ICloud, months ago. I finally decided to sit at my computer all day until I figured it out and I finally found the answer!
It's just a setting in Outlook-- a hard to find setting! I've given the link below, but also pasted the instructions here. Need to re-start and wait a few minutes for the changes to take place, but it worked for me! On this same page are also instructions for other apps and devices.
http://office.microsoft.com/en-us/outlook-help/enable-or-disable-add-ins-in-office-programs-HA010034127.aspx
Outlook
1.On the Tools menu, click Trust Center, and then click Add-ins.
2.View the add-ins and application extensions that are categorized as follows:
◦Active Application Add-ins     Lists the extensions that are registered and currently running in your Office program.
◦Inactive Application Add-ins     Lists the add-ins that are present on your computer but are not currently loaded. For example, smart tags or XML Schemas are active only when the document that references them is open. Another example is the COM add-ins that are listed in the COM Add-ins dialog box. If the check box for a COM add-in is selected, the add-in is active. If the check box for a COM add-in is cleared, the add-in is inactive. To learn how to open the COM Add-in dialog box, see the section called Turn off or manage the installed add-ins.
◦Document Related Add-ins     Lists template files that are referenced by currently open documents.
◦Disabled Application Add-ins     Lists add-ins that were automatically disabled because they are causing Office programs to crash.
If you find "ICloud Outlook ADd-in" is listed in "Disabled Add-Ins",  click to highlight it, and then find  "MANAGE: COM Add-ins" below and click "Go".
You will then see a list of all "Add-ins". Make sure ICloud Outlook Add-in is checked.
You should now see it moved from "Disabled" to "Inactive". Restart your computer and it should become active. It will take a few minutes to sync once you restart and open Outlook.
Answer: When you add a new calendar "Event" on your iMac, there is an option to color tag the event to one of your calendars.  If the color tag you choose is labeled "On My Mac", it will not sync to your other IOS devices (because "On My Mac" is not included on the Cloud).  Use just about any other color coded calendar and it should sync.  The safest is the one color coded "Home".


eclipse Failed to load properties file for project

Question: I'v just installed eclipse for developing android applications on my macbook pro(10.9).I'v installed jdk1.7,android sdk and adt plugin for eclipse,however,when i create my first android application , i got the error  'Failed to load properties file for project ...'
Error Log:
    !SESSION 2015-03-10 09:08:33.363 -----------------------------------------------
    eclipse.buildId=4.4.2.M20150204-1700
    java.version=1.7.0_75
    java.vendor=Oracle Corporation
    BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=zh_CN
    Framework arguments:  -product org.eclipse.epp.package.java.product -keyring    /Users/bwiunbuaa/.eclipse_keyring -showlocation
    Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product  org.eclipse.epp.package.java.product -keyring /Users/bwiunbuaa/.eclipse_keyring -showlocation
<code>!ENTRY com.android.ide.eclipse.adt 4 0 2015-03-10 09:09:57.105
!MESSAGE Failed to load properties file for project 'lighthouse'
</code>
what is wrong for me?
Comment: Stop. Use Android Studio.
Answer: follow steps for updating eclipse
<code> 1. Download Eclipse from the official site
 2. Download and install JDK latest version
 3. After installing the eclipse, go to Help > Install New Software.
 4. Click Add, in the top-right corner.
 5. In the Add Repository dialog that appears, enter "ADT Plugin" for the
Name and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/
Click OK.
 6. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
 7. In the next window, you'll see a list of the tools to be downloaded. Click Next.
 8. Read and accept the license agreements, then click Finish.If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
 9. When the installation completes, restart Eclipse.
</code>


Why does my game use 100% CPU and LunarLander doesn't?

Question: Well basically my question is right in the title: why does my game use 100% cpu and the LunarLander example does not?
My game is currently almost identical to the LunarLander example in function, with a separate thread for the game loop, updating physics/events in a while() loop and drawing to the screen continuously.
However when I run LunarLander and enable the debug tools, it shows about 50% cpu usage (the emulator uses about 25% on my dual-core PC). My own game uses 100% of the cpu (and the emulator 50% on my pc).
I don't necessarily want or need to reduce the cpu load and increase the performance of my game (although it runs a bit sluggish on the emulator and on a slower phone), but I just really don't understand why the LunarLander example doesn't use 100%? It basically has a while(true) loop in which it updates the physics and draws to the screen constantly. Why does that not reach 100%?
Also my game is quite similar: I update my game state in a method and then draw everything to the screen. First a background image, then a few other images on it (the LunarLander example uses Drawables while I use Bitmap, because I don't have to transform them and they're supposed to be faster). When I don't interact with the game, nothing even really happens, and interaction is done through events, not even in the main loop.
Any ideas? :-)
Comment: Well I could post a few thousand lines of code, but that would make nobody happy. It's different in that I load and draw other bitmaps. I have an ontouchlistener which sets an offset on moving to draw the background in another position. And I draw Bitmap tiles on it (from an ArrayList) rather than a Drawable which is transformed. And that's about it. The overall structure (thread for game loop, update() method, draw() method) is the same.
Comment: "My game is currently almost identical to the LunarLander example" - How is it different? Code would help a lot.
Comment: You probably do want to reduce the CPU load. The load you place on mobile hardware is directly related to how much of the user's battery power it will consume.
Answer: The only way any thread can use less than 100% of its core is if it contains I/O, sleeps, competition with another thread, or anything that suspends it some of the time. So if you pause the lunar lander a few times, you will see how it suspends.


Preprocess Info.plist with file from Build Phase

Question: I'm trying to preprocess my Info.plist with a file that is generated from a script run in a build phase. Since the file doesn't exist at the beginning of the compile, I receive a warning "C Preprocessor Error: 'file' file not found". Of course the file will exist by the time that it's needed. Is there any way around this?
Comment: I'm more and more convinced that this is a bug (or at least a deficiency) with Xcode. I will file a bug with Apple.
Answer: The generated file needs to exist before the target starts. The workaround is to create another target with the sole purpose of generating the preprocess prefix file.
Assuming your main target is 'foo', and using Xcode 4.3:

Add Target -> Other -> Aggregate (this creates an empty target)
Add the "run script" phase
In foo's build phases, reference the new target as a target dependency

From this blog post by Marcus S. Zarra.


History of the Expression "Search Me"

Question: The phrase "search me" is so ubiquitous in the English language that it is found on every list of common idioms. It is a situational idiom for "I don't know" in response to any direct question. But where did it originate? English has a lot of expressions, usually sarcastic, for expressing ignorance. Where did this one come from and when?
Comment: According to etymonline, the idiom [**search ME**](http://www.etymonline.com/index.php?term=search) - as a verbal shrug of ignorance – is first recorded 1901.)
Answer: Even as a native speaker of a language which doesn't have a similar idiom (German), I always found this one immediately clear and obvious:

I swear I haven't got your keys. Search me if you don't believe me! [literal]
I swear I don't know where your keys are. Search me! [literal]
I swear I don't know where you parked your car. Search me! [literal though jocular]
I swear I never knew your birthday in the first place. Search me. [could theoretically be literal, referring to some kind of written proof, though in practice it almost certainly isn't]
Search me if [= whether] I know where that came from!

Search me! clearly started as a particularly drastic way of asserting that you don't have something. As we all love drastic expressions and tend to overuse them, it was overused and gradually felt less and less drastic.
[Added after Oldbag's comment:]
Equal stress on both words (as the dictionaries say), or even stress only on the second word, makes sense as follows: "Search me for information, and you won't find any!" "Search me for information? What are you thinking?" This is only a variation of the above. It's slightly more complicated, so while the variant that I described with stress on search may exist only in my head, it would also be plausible as an earlier stage that made place for a new, even more drastic way of saying it.
PS: In the specific case that I found described in Webster's, i.e. in response to a question, there is a straightforward interpretation of search me with any stress pattern as short for: "It won't do you any good to search me!"
Comment: Sorry, -1. In most of your examples, the emphasis would be on the word "search" as in:  "SEARCH me!"  The way the expression is pronounced is: : "search ME!"  I don't know the origin, although it was a popular saying in the mid 20th century. It is actually the equivalent of: "Damned if I know!"
Comment: @Oldbag: the stress could easily have changed at some point in the etymological progression Hans describes.
Comment: @Oldbag: consider the similar expression *"Damned if I know"*. If you meant it literally, you wouldn't put the stress on ***"I"***. But when it means "*Search me,*" you naturally put the stress on ***"I"***. The stress shifting to ***"me"*** in *"Search me*" would similarly be perfectly natural.
Answer: Dictionary definitions
Christine Ammer, The American Heritage Dictionary of Idioms (1997/2013) generally agrees with Etymonline on the approximate date of origin of the phrase (as noted in a comment beneath the poster's question by user98990):

search me I don't know the answer to that, as in Where's John?—Search me, I haven't seen him for weeks. This expression in effect means "you can investigate me completely for the information you want but you won't find it. {Slang; c. 1900}

Harold Wentworth & Stuart Flexner, Dictionary of American Slang, first edition (1960) gives an example from 1905, in the form o a book title:

search me, {you can} I don't know. 1905: You Can Search Me {book title}, Hugh McHugh. 1951: "'Oh, why must people ... chase after money? ...' 'Search me.'" M. Shulman, Dobie Gillis, 155. Fig. = you can search me and won't find an answer.

Google Books search results
The earliest matches that my Google Books searches turned up follow the wording of McHugh's book: "You can search me." From David Phillips, The Deluge (1905):

"Good form!" I exclaimed. "That's what I want. What does 'good form' mean?"
He laughed. "You can search me," said he. "I could easier tell you—anything else. It's what everybody recognizes, and nobody knows how to describe. It's like the difference between a cultivated 'jimson' weed and a wild one."

From Lincoln Steffens, "A Servant of God and the People: The Story of Mark Fagan, Mayor of Jersey City," in McClure's Magazine (January 1906):

When Mr. Record confessed he could not account for it, he referred m to Jimmy Connolly, and I asked Connolly: "How does Mark Fagan do it?"
"You can search me," said he. "I've watched him, and I've listened to him, and I give it up. And you can ast anybody in this town [Jersey City, New Jersey]; we've all ast ourselves and that is where you'11 end up. You'll ast yourself. I don't know what he says, and I've listened to him, but he doesn't say nothing. Leastways, if you or the likes of me said to a fellar what Mark says, I can just hear the fellar say, 'Say, what ye givin' me, what?' 'Say,' he'd say, 'haven't ye got th' price of a drink in your clothes?' But when Mark says it, what he says, they fall down to it like dead soldiers. Nope you got to find that out for yerself."

From George Ade, Father and the Boys, excerpted in Current Literature (September 1908):

WILLIAM. Are we too late?
LEMUEL. Let me get down to earth. Too late? Too late for what?
HIGBEE. What is this anyway.
BESSIE. You can search me.
THOMAS. When we got into Goldfield this morning we heard that you'd come out here. As soon as we could get some proper clothing we followed you. We knew she was with you.

The first instance I found of "Search me" in the relevant sense without "You can" preceding it is from Leavitt Knight, "Baltimore Lunch and Hartford Lunch," in Everybody's Magazine (April 1914), where it becomes a recurring refrain, and indeed something of a punchline:

Passing the cashier's desk, I halted. "Sir," I addressed the occupant, a flabby youth and slumbrous, "what is the difference between a Hartford Lunch and a Baltimore Lunch?"
"Search me!" he said with much earnestness—and even with worry, I fancied. "Good night!"
...
One long minute the cashier contemplated me uncertainly. Then dolefully he thrust back the dollar, shook his sleek head, and said: "Search me!"
"That's what they said all day yesterday!" Leander piped, and from behind me, he leered wickedly at the cashier. "Search me! Search me! Search me! You'd think they were a pack of crooks who had passed long their stolen goods before the bulls pinched them! ..."

Two months later, Parker Fillmore, "The Stenog," in Everybody's Magazine (June 1914) is back at it:

"But why is he in love?" Rosie demanded.
Terry shook his head gloomily. "Search me."
...
"Jarge, dear, tell me one thing: why are you in love with her?"
George shook his head. "Search me. I don't know."

And then from Lydia Crane, "Newsboys," in The Child Labor Bulletin (August 1914):

SAM It is fun though, isn't it, to be a newsboy?
NEWSIE (Gloomily) Search me! If it is I ain't found it out. Some of the boys think it's fine; but they'd think anything fine that kept them on the street and let them run wild and get pennies for craps and movies. Now that ain't me. It's business with me.

Newspaper archive search results
A rather laborious search of newspaper records turns up a match for "you can search me" in the idiomatic sense from 1897. From "Floats for P. O .P.: This Year's Great Spectacle Is Nearly Ready," in the Kansas City [Missouri] Journal (September 19, 1897):

"Do you follow the coloring on the water color painting?" Mr. Toye was asked.
"Only in a general way," he replied. "I study the water color sketch, the coloring and the shading, after which I study the float, decide upon the color and go to work. There is a difference between the work to be done here and what was done in water colors. This is all solid, opaque—a scumble."
"A what?"
"Why, a scrumble," answered Mr. Toye, seemingly surprised at the interrogatory that disclosed such profound ignorance.
"What's a scrumble?" the reporter asked the artist [not Mr. Toye].
"You can search me," was the reply.
"What's a scrumble. Mr. Toye?"
"A scrumble is tho breaking of a lighter color over a darker to give it a transparent effect. Glazing is breaking a darker over a light color to reduce or heighten the tone."

A second instance occurs in "St. Louis Letter," in the [St Genevieve, Missouri] Fair Play (March 12, 1898):

Take the speeches of the average congressman and analyze them, and the majority of them are nine-tenths wind and the other tenth down-right absurdity. ...
What good do such speeches and such congressmen do? To use the slang phrase, "you can search me." The candidate on the stump should be asked: "What do you propose to do if elected?" If he has nothing better in mind than making political speeches in the halls of congress, he should be promptly turned down and some one elected who proposes to do something and keep on hammering at it until it is accomplished, or until he is convinced that such would not be for the best interests of the country.

St. Genevieve is on the eastern edge of the state, not far from St. Lois, while Kansas City is on the western edge of the state. Nevertheless, it is an unexpected coincidence that the two earliest authenticated matches for the slang expression "you can search me" are from the same midwestern state.
A seemingly relevant instance of the short form "Search me" appears in "Here Is a Machine That Shows How Drugs Poison Men," in the San Francisco [California] Call (June 12, 1898):

"Well, will you have a drink of whisky now, just to show how the stimulant affects your pulse?" asked Dr. Simon.
The man's eyes glistened and he drew a deep breath of anticipation as he remarked emphatically, if laconically:
"Would I?  Search me," and he wiped his mouth with the back of his hand.

Here , "Search me" seems to have an idiomatic sense along the lines of "Give me a chance and see if I don't."
Another instance appears in "An Artistic Frost," in the [Washington, D.C.] Evening Star (August 27, 1898), this time using "Search me" in the unmistakably modern sense:

"But strangest of all," put in the wife of a celebrated naval hero, "my pocket book with all my money and jewelry, has disappeared."
"What!" came the chorus, and all eyes turned in the direction of the unfortunate young Washingtonians [who had been speaking in cyphers at supper the night before].
They looked at each other in astonishment, and in the silence that followed beat a hasty exit.
"I wonder if those queer ones think e swiped their pocket book?" asked one.
"They are liable to think anything after that conversation last night."
"What'll we do?"
"Search me."
"Maybe they will!"

Conclusions
Writers have been invoking David's psalm 139 for centuries, as for example, in Robin Jeffs, Fast Sermons to Parliament (1646) [combined snippets]:

Hence it was that David desired to be kept from secret sins; not onely such as were secret to others but especially which were secret to himself; which is the proper meaning of that place. Psal. 19.12. For which purpose he also further desires the help and assistance of God. Psal. 139.23. Search me O God, and know my heart; try me, and know my thoughts: And see if there be any wicked way in me, and lead me in the way everlasting. And thus far of sins whether; which is the first thing to be sound out by us.

Likewise, various nineteenth-century accounts of people suspected of having taken something describe the suspect, after protesting his or her innocence, as telling the accusers, "You can search me if you don't believe me."
The idiomatic expression "Search me" meaning "I have no idea" is relatively recent. Reference works put the first recorded instances of the wording in the relevant sense at 1900 or 1901, but the earliest I found are of the longer phrase "You can search me," and date to 1897 and 1898; both are from newspapers published in Missouri. The earliest unmistakable match for the shorter form "Search me" is from an article printed in a Washington, D.C. newspaper in 1898.
Several Google Books matches for "You can search me" pop up during the period 1905–1908, suggesting that adoption of the phrase had become significantly more widespread by then. The shortened form "Search me" suddenly proliferates in Google Books matches in 1914.
Answer: I may wish to suggest that the  origin of this phrase may not be English, if it is found in the Bible. Originally it meant "look keenly at" The etymological contruct in English, German, etc are but expansions of the phrase. In Hebrew  it means"to look keenly" meant more than observing.
Comment: Is it used figuratively in the Bible?  This question is focussed on the figurative usage.
Comment: What would be the German construct?

History of the Expression "Search Me"


Magnetic field and magnetic forces and polarity

Question: When the polarity of the voltage applied to a DC motor is reversed, the direction of motion does not reversed. Why not? How could the direction of motion be reversed?
Answer: In an ordinary (permanent magnet) DC motor, reversing the drive polarity will indeed reverse the direction of rotation of the motor. This principle is used in all reversible battery-powered electric screwdrivers, etc. This will not happen if the motor is an AC type.
Answer: You have a shunt or compound motor.

The field winding is in parallel with the armature.
There are four terminals:

armature A1 and A2.
shunt field F1 and F2.

If you reverse the source V, all currents reverse but the motor goes in the same direction.  Field and armature reverse.
To reverse the motor, you must switch the polarity of the field or the armature.


Xcode: table view cells only being created when I use a breakpoint. Why?

Question: When I put a break point right on the line
"if (coordinator!= nil){"
the table view that is created from core data works correctly.
If I remove or put the breakpoint anywhere before that in my code it does not show the table view cells.
<code>- (NSManagedObjectContext *) sharedManagedObjectContext {
if (_managedObjectContext != nil) {
    return _managedObjectContext;
}

NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
if (coordinator != nil) {
    _managedObjectContext = [[NSManagedObjectContext alloc] init];
    [_managedObjectContext setPersistentStoreCoordinator: coordinator];
    [_managedObjectContext setMergePolicy:NSMergeByPropertyStoreTrumpMergePolicy];
</code>
}
<code>return _managedObjectContext;
</code>
}
I have no clue as to how this is happening and had very little luck finding any other situations similar to this one.
Thank you for your help in advance!
Edit 1:
Here is the code that is being used to fetch the data from coredata
<code>- (BOOL) setupFetchedResultsController:(NSError **) error {

self.managedObjectContext = [[PhotoBreezePersistentStoreManager shared] sharedManagedObjectContext];

NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];

[fetchRequest setEntity:[NSEntityDescription entityForName:@"GeoTrack" inManagedObjectContext:self.managedObjectContext]];

NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"trackName" ascending:NO];

NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
[fetchRequest setSortDescriptors:sortDescriptors];

NSFetchedResultsController *controller = [[NSFetchedResultsController alloc]
                                          initWithFetchRequest:fetchRequest
                                          managedObjectContext:self.managedObjectContext
                                          sectionNameKeyPath:nil
                                          cacheName:nil];

controller.delegate = self;

self.fetchedResultsController = controller;

return [controller performFetch:error];
</code>
}
If I put a breakpoint in any of the above code...
after: "self.managedObjectContext = [[PhotoBreezePersistentStoreManager shared] sharedManagedObjectContext];"
... it will still work.
I'm pretty new to objective-c/cocoa so im not absolutely sure if a queue or thread is involved. I will however look into what you mentioned
Thanks!
Answer: Not enough information to really say;   you would need to post details related to the creation/population of the table view.
However, this does sound like a classic race condition.  Any threads or queues involved?
Comment: I posted the code that fetches the data from coredata. Hopefully it will help. Probably be soe weird timing problem that I'll have to keep trying to debug. Thanks!
Comment: What is calling `setupFetchedResultsController:`?


Can you remove the chain missing link too often?

Question: I became  pretty obsessed with my MTB maintenance. After every trip, I completely remove the chain and wash it.
I am wondering if you can damage the missing (and weakest) link of the bike by doing that this often.
Thanks.
Comment: Invest in a "chain washer".  A lot faster/cleaner and virtually no chance of somehow compromising the chain.
Comment: Some links are not designed to be opened and re-used. Make sure you don't have one of these. On the other hand there are instances that would recommend you NOT to wash a chain as it removes the grease inside the links and accelerates wear. A chain is best brushed, then rubbed with an oiled cloth.
Comment: Assuming you are appropriately using an oil based lubricant.
Comment: I do have a chain washer, but now that I own a chain that mandates to use the missing link only, to close it, I thought that it would be much easier to remove and wash it completely off the bike. I never considered the potential issue of removing the grease inside the link though. Sheldon Brown even suggests to BOIL the chain to clean it!
Answer: Yes.
Most sorts of reusable link generally have a "snap in" position that the link pops into when you pull on the chain.  Between normal chain tension and design, the link should stay in that position.  However, with repeated use, you can wear the portion of the link that is tight enough to keep the link in the running/together position.  This means the link may become easier to get off, but will also be susceptible to coming uncoupled when the chain has less tension on it.
Your individual mileage on a quick link may vary, but generally they are much less expensive than a whole new chain and the reduced cost (to you) by keeping your drivetrain clean will likely be worth it.
Comment: I did just notice that the missing link quickly became actually easier to reset on. But, I can hardly imagine that the tension can ever become that low so that it would fall apart, there's always the rear derailleur pulling back the chain and keeping it tight after all.
Comment: Depends on your riding style.  Chain slap is enough of a thing that manufacturers are now building chainstay protectors into the frame.
Answer: I've been using the same missing link on a KMC x10sl for 3 years. I may have opened it around 40-50 times. No problem. Note that I use the proper tool to open it (KMC Missing Link Chain Pliers):
Comment: I marked this as the accepted answer being it based on actual experience.


Brake Jam on Opel Corsa

Question: I have opel.corsa 1.4 GLS .After many days  I drive my car but due to Brake jam while starting I can't move the car .With the engine off, in neutral, if I  jack a front wheel up and rotate the wheel by hand,  it turns freely.and if I then start the engine in neutral I cant rotate the front wheel
Comment: Welcome to the site, what year is your corsa?
Comment: When you start the engine, does the brake pedal go down without pressing it?
Answer: I'm not entirely sure if this issue can be caused by other brake parts such as the ABS module, but in this answer I've formulated what seems to me the most logical explenation. These are my thoughts:
Your car has a brake booster which uses vacuum pressure from the intake to amplify the force applied to reduce the efford needed from the driver to stop the car. See below image.

(Source: https://www.researchgate.net/figure/Diagram-of-vacuum-booster-system_fig3_326618599)
The left chamber and right chamber both have vacuum pressure inside. Between these chambers there is a flexible diaphragm. When the brake pedal is pushed, atmospheric pressure is introduced in the left chamber, which pushes the diaphgram into the right chamber because of the pressure difference. This way the pressure in the brake pedal is amplified using the vacuum pressure in the right chamber.
Now if there is a leak in the left chamber, there is always a pressure difference that causes the master cylinder to be compressed. As a result of which the brakes get jammed on when the engine is started.
As per @GdD's comment: You can test this by removing the vacuum hose that attaches to the vacuum source (see image). If the brakes don't stick on anymore, here is your problem. The solution is to rebuild or replace the brake booster.
Comment: @TANKEEN, you can test this by pulling the vacuum line off of the brake assist, plugging the hose and running the engine. If the wheel spins then that's the issue, if not it's something else.

Brake Jam on Opel Corsa


Can a player take both a madness and injury card if his investigator gets reduced to zero stamina and sanity?

Question: The Dunwich expansion allows for drawing Madness or Injury cards in place of going insane or being rendered unconscious. Can this be used to draw both Injury and Madness when both go to zero? I believe given that this usually leads to being devoured and that there is no explicit mention of this in the Dunwich rules, the answer is no. Is there any supporting documentation otherwise?
Answer: The investigator is devoured.
The Dunwich Horror rulebook reiterates the basic rule

If an investigator is reduced to both 0 Sanity and 0
  Stamina at the same time, that investigator is devoured.
Comment: I'd also like to add, as it seems to be relevant, that I have a house rule that if you have a combination of three or more madness/injury cards, your investigator automatically retires from being too debilitated to carry on with the investigation.
Comment: @generalcrispy - The rules allow retirement at 2 madness/injury cards.  Is there a need to force retirement at 3?
Comment: Player exasperation, mostly. Had someone who was manically depressed and concussed, but wanted to trudge on.


Friction acting on a particle on a rough place

Question: If a particle on a rough inclined is attached to a spring so that the spring is parallel to the inclined place, when the particle is equilbrium just because of the weight of the particle extends the spring somewhat. Does friction need to be taken into account (because it is not moving), will it be the maximum friction $\mu R$ (coefficient of friction times the reaction)? and will it be acting up or down the slope?
Comment: There is static friction even when the particle is not moving. Friction always acts in the direction to oppose motion.
Answer: Indeed we still need to consider friction, for if there was no friction the equilibrium of the spring would be extended even farther down the ramp. The friction we are interested is called static friction, which is contrasted with kinetic friction.
The force of friction would point up the ramp, since the static friction is keeping the ball from rolling down the ramp (along with the spring). There we see that the friction does some of the "work" in keeping the ball up on the incline, and the spring does the rest. If there was no friction the spring would need to do all the "work" of keeping the ball from rolling down the incline. I use work in quotation marks because there is no actual displacement and I meant work in the common sense (effort).
The actual force of the friction will be given by the coefficient of static friction, which is some constant, times the Normal Force. The normal force is the force the incline exerts on the ball, normal to the inclines surface: $F_N=mg\cos(\theta)$. Where $m$ is the mass, $g$ is the gravitational acceleration and $\theta$ is the angle of the incline. And thus the force of static friction would be: $F_{\mu_s}= \mu_s*F_N= \mu_s*mg\cos(\theta)$. Where $\mu_s$ is the static coefficient of friction.
Note: I believe the above has answered your question in full, but what follows is hopefully some justification for why the friction is important. It might be helpful to balance all the forces acting on the ball, so let's think about what those are.
i) gravity pull the ball down the ramp,
ii) the spring pulling the ball up the ramp, and
iii) the static friction holding the ball form rolling down the ramp.
Let's impose the condition that the ball is not moving so therefore $F_{net}=0$. Now let's find out what the net force looks like in terms of the three forces:
i)Gravity: $F_g=mg\sin(\theta)$ (Down the ramp)
ii)Spring: $F_{spring}=k\Delta x$ (Up the ramp). Where is $k$ is the spring constant and $\Delta x$ is the displacement from equilibrium.
iii)Friction: $F_{fric}=\mu_s*mg\cos(\theta)$ (up the ramp)
So that: $F_{net}=F_g+F_{spring}+F_{fric}=-mg\sin(\theta)+mg\cos(\theta)+k\Delta x=0$. Then we can solve for the displacement of the spring by solving for x, which follows that:
$\displaystyle \Delta x=\frac{mg}{k}(\sin(\theta)-\cos(\theta))$
Note that in the absence of friction, x would be larger since the friction contributes the $-\cos(\theta)$ term. Hence I have shown that friction indeed decreases the displacement of the ball attached to the spring, ergo we do need to take friction into consideration!
Comment: Thanks. Though you say friction acts up the ramp because the ball would roll down the ramp due to gravity. How do you know the ball wouldn't roll up the ramp due to the spring, and so friction should act down the ramp?
Comment: @Jonathan. ,if the spring is stretched to a point where the spring force exceeds the gravitational pull, the friction will act down the plane. Remember that friction always tries to oppose **relative** motion or the **tendency** of relative motion. Usually, we can calculate the net force due to all other forces except, and say that friction will act opposite to the net force vector. But beware, this only works if all the other forces are independent of the friction force.


I don't see cookies sent by the expressjs (passportjs) in the browser

Question: So I have created a react app using vite and when I complete my authentication using passportjs I don't see any cookies in the browser.
After trying all the available solutions I decided to create another react app using create-react app tool and tried authenticating and surprisingly
now I see cookies in the browser. I didn't change anything in the backend code just used another tool to create react app. I don't know what is going on.
Do I have to make any changes in the vite config file to be able to see the cookies in the browser?. I tried everything, nothing seems to work with vite.
I tried ChatGpt too, He suggested some solution but that didn't help.
I didn't change anything in the vite config file at all.
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],

})

Answer: Okay, finally, after playing with my code for hours, I figured out a solution that works. When I start my react app that is created using VITE, by default it runs on http://127.0.0.1:5173 (Now, with the new VITE versions, it runs by default on http://localhost:5173/). When we create react app using create-react-app it runs on http://localhost:3000. I used to think both localhost and IP address 127.0.0.1 are same, but that is not the case there are substantial differences between localhost and 127.0.0.1.
So decided to use --host flag that VITE gives us to expose other IP addresses.
yarn dev --host

You see the output like this. Now react app is running on localhost, i.e. http://localhost:5173.
  ➜  Local:   http://localhost:5173/
  ➜  Network: http://192.168.56.1:5173/
  ➜  Network: http://192.168.137.1:5173/
  ➜  Network: http://192.168.116.191:5173/

Then in the back-end code I replaced http://127.0.0.1:5173 with http://localhost:5173. And now I can see the cookie in the browser that is set by the passportJS. My authentication now works fine, there are no issues.


How to use BPMN and use case and other diagrams together

Question: BPMN (Business Process Modeling Notations) is used for modeling business process by visualization, thus making intangible ideas become physically concrete through the expression of BPMN diagrams. The question is, how do I organize the BPMN with the UML.
Initially, I thought of two ways to organize use cases and business process diagram:

1 to one/many: By mapping each step (step here means each node in the BPMN digram) in the business process diagram with one or several use cases. Each use case is mapped with relevant several class diagrams/component diagrams (I prefer this one, since you can encapsulate a set of classes into one component which has input and output), several sequence diagrams (optional). After you have class diagrams/sequence diagrams, code is written/generated based on the model.
Many to one: By mapping several steps into one use case. The subsequence steps are the same.
Many to many: For example, one step in the business process can be mapped with two or more use cases, and the same two or more use cases can be mapped with other steps.

The above methods can be done by the modeling tool, and in my case, I use Enterprise Architect from Sparx System. I discover it recently and I am using its trial, but I will buy it in the future. I can organize many use case diagrams with one step of the BPMN diagram, and can click to view the necessary use cases. However, I don't if it supports many to many cases.
After thinking my own method for organizing BPMN and Use Cases, I searched the Internet, and found two other papers, each suggest the following method:

Turn each use case into each step of BPMN diagrams: To visualize how refined use cases fit into the business process. I like this approach, since the business process with steps can be modeled, and later each step is turned into a use case. One step is one use case.  This is the same with my one to one mapping above. Original presentation is here: Visualizing Use Case Sets as BPMN Processes

Each use case is exactly a business process: Each step in the use case is each step of the business process. Original paper is here: Describing Business Processes with Use Cases

It seems to me that there's not standardized way of gluing these artifacts (BPMN and Use Cases and other digrams) together. Maybe it's a management problem and rely more on creative usage rather than follow a formal steps. What are your opinions/experience on the usage of these diagrams in software engineering process?
I know methodology like XP which specifies its own practice in software development process. However, unlike Scrum where it focuses more on management aspects (which means you can still apply the BPMN/UML modeling into your work process), XP specifies software practices and requires you to follow, and eliminate the modeling process like BPMN/UML, and its practices if not apply properly will lead to issues like under documentation, incorporates insufficient software design....
I prefer the model driven way than XP. I guess it's up to the preference of companies and people. One of Agile goal is to "free developers from document works". Methodology like XP seems to easily lead to under documentation. I think to achieve that goal, the solution is to implement the tool to help developer reduce the workload on writing document, not by writing less documents, by gathering information from existing diagrams and automatically generate reports (in RTF, PDF, HTML in the case of Enterprise Architect of Sparx System). Another example is, people often complain about drawing diagrams consume their time. In my opinion, the solution is not to draw diagram, but the using the tool. Modeling tools today support round-trip engineering, where you can synchronize between your code and your diagrams, thus eliminates the extra effort to manually correct the diagrams if the code base changes (specifically, class diagram). What's your opinions/experience on this issue?
Comment: Have you contacted OMG http://www.omg.org to have some feedback on best practices? I think they are in charge for both specifications (UML and BPM notations).
Answer: Usecase should be goal oriented tasks they are not single steps.  The first example is a definite variation of the standard way to utilise usecases.  I suggest map each usecase onto a single business process.  This Sparx EA example maps usecase onto activities  diagrams but does reveal the approach to use.
Answer: My 2 cents
My suggestion is to use these tools to understand the business processes. I follow the below

End user point of view: user stories
Business Analyst perspective: use cases (with main and alternate flows) and specification by example
BPMN: Executable business process

When you start looking out for the perfect marriage of all these, you will be lost in details. ;-)
Answer: I suggest this approach: https://www.academia.edu/6750935/From_Business_Process_Models_to_Use_Case_Models_A_systematic_approach
Generally speaking, one process maps to more than one use case, only in particular cases the relationship goes one-to-one.


norm induced by inner product and triangle inequality

Question: Let $\langle\cdot,\cdot\rangle$ be a scalar product on a space $X$, and let $\lVert \cdot\rVert$ denote the norm induced by this scalar product. I need to show that for $x,y\in X$, $\lVert x+y\rVert=\lVert x\rVert+\lVert y\rVert $ holds $\Longleftrightarrow$ $x$ and $y$ are linear transformations of each other, i.e. $\exists \alpha\geq 0$ with $x = \alpha y$. While one direction is clear ($\Longleftarrow$) I am struggling with $\Longrightarrow$. How can I construct such an $\alpha$?
Comment: I think you actually meant "..$\,x\,,\,y\,$ are linearly dependent, or a scalar multiple of each other.
Answer: Do you know that the Cauchy-Schwarz inequality
$$\lvert \langle x, y \rangle \rvert \leq \lVert x \rVert \lVert y \rVert$$
is an equality if and only if $x = \alpha y$ for some $\alpha$? (If not, here's a proof.)
With that, you can prove the other direction by noting that
$$\lVert x \rVert^2 +\lVert y \rVert^2 + 2\lVert x \rVert \lVert y \rVert = (\lVert x \rVert + \lVert y \rVert)^2 = \lVert x + y \rVert^2 =\langle x+y , x+y \rangle \\
= \langle x , x \rangle + \langle y , y \rangle + 2\langle x, y \rangle = \lVert x \rVert^2 + \lVert y \rVert^2 + 2 \langle x , y \rangle.$$
This implies that $\langle x , y \rangle = \lVert x \rVert \lVert y \rVert$, which by the first claim means that $x = \alpha y$ for some $\alpha$.
Comment: @Amarus: I figured that OP was working over a real vector space, so I did not include the extra argument. In your case $$2\lVert x \rVert \lVert y \rVert = \langle x , y \rangle + \overline{\langle x , y \rangle} = 2\mathrm{Re}\langle x , y \rangle.$$ Since also $$\mathrm{Re} \langle x, y \rangle \leq \lvert \langle x , y \rangle \rvert \leq \lVert x \rVert \lVert y \rVert,$$ the first line implies that both of these inequalities are actually equalities. This means that also in this case $\lVert x \rVert \lVert y \rVert = \lvert \langle x , y \rangle \rvert$, which proves the claim.
Comment: I did not know that. Thanks.
Comment: @smi: You should accept and upvote an answer which answers your question. Simply click on the check on the left (as well as on the arrow pointing upwards).
Comment: I'm working the same problem and just had to delete a similar thread of my own. Thanks for your help, fuglede. However, I have a problem with the equality: $$\langle x+y , x+y \rangle \\
= \langle x , x \rangle + \langle y , y \rangle + 2\langle x, y \rangle.$$ We just have $$\langle x+y , x+y \rangle \\
= \langle x , x \rangle + \langle y , y \rangle + \langle x, y \rangle + \langle y, x \rangle \\
= \langle x , x \rangle + \langle y , y \rangle + \langle x, y \rangle + \overline{\langle x, y \rangle},$$ don't we? So an additional argument is required.


Daniel and King Cyrus

Question: Did King Cyrus know about what God had anointed him to do? If so, who told King Cyrus about what God had determined the king would do?
Answer: Daniel and King Cyrus
Check out the following for who did the telling:-

Isaiah, Chap 45, [NASB] 1. Thus says the Lord to Cyrus His anointed, Whom I have taken by the right hand, To subdue nations before him, And to loose the loins of kings; To open doors before him so that gates will not be shut: 2. "I will go before you and make the rough places smooth; I will shatter the doors of bronze, and cut through their iron bars. 3. And I will give you the treasures of darkness, And hidden wealth of secret places, In order that you may know that it is I, The Lord the God of Israel, who calls you by your name."

...and so on and so on. Daniel himself, being there in Babylon at it's overthrow by the Medes and Persians, led by Cyrus the Great and being of great importance to Darius the Mede and Cyrus the Persian, would also have no doubt imparted the news of Cyrus' anointing.
Comment: +1 nice answer :)
Answer: Isaiah 45:

1This is what the LORD says to Cyrus His anointed,
whose right hand I have grasped
to subdue nations before him,
to disarm kings,
to open the doors before him,
so that the gates will not be shut

God himself might have spoken to Cyrus.
2 Ch 36:

22
In the first year of Cyrus king of Persia, in order to fulfill the word of the LORD spoken by Jeremiah, the LORD moved the heart of Cyrus king of Persia to make a proclamation throughout his realm and also to put it in writing:

Daniel could have told Cyrus, Dan 10:

1 In the third year of Cyrus king of Persia, a revelation was given to Daniel

who told King Cyrus about what God had determined the king would do?
God could have told him directly. He could have heard it from Daniel, or through someone who knew about Isaiah's writing.
Comment: Yes, Cyrus could have been aware of Isaiah's writings and heard from Daniel firsthand, but could not have heard from Ezra in any shape or form.
Comment: Right. I deleted the offending lines. Thanks :)
Comment: Ok, now I can upvote and thank you for recognizing my answer.
Comment: I am unsure of your first sentence - Isaiah lived over 100 years before Cyrus, so Isaiah could not have informed Cyrus himself.
Comment: Right. I deleted the offending words. Thanks :)
Comment: Thank you for the answers to my question. I appreciate it.

Daniel and King Cyrus


What do I need to run PHP applications on IIS?

Question: Having been a PHP developer on LAMP servers for quite a while, is there anything that I will need to take into consideration while preparing an application for IIS on windows.
Answer: Make sure you get the FastCGI extension for IIS 6.0 or IIS 7.0.  It is the single most important thing you can have when running PHP under IIS.  Also this article should get you setup:
http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/
Everything beyond this is simple, MySQL and what not.
Comment: Only problem i had after following this list was something with the default timezone, which was fixed by following the directions in this post: http://forums.iis.net/t/1158954.aspx .
Answer: We just rolled out PHP 5.2.6 + FastCGI on our shared hosting platform without any problems. As long as you follow the steps outlined in the article Nick linked to then you should be just fine.
My only additional piece of advice would be to forget about using the fcgiconfig.js script to modify the fcgiext.ini file, it's more of a hindrance than a help. Just edit it by hand, you also learn more about how it works.
If you're installing PHP onto IIS 7 then this link should be worth a read though:

Using FastCGI to Host PHP Applications on IIS 7
Answer: @pix0r
That actually annoyed the hell out of me too and nothing came close to Apache mod_rewrite.  Because they all have this overly complex XML structure.  So I actually took the time and wrote my own rewriter for IIS 6.0 and IIS 7.0.  Non-.NET applications only works in IIS 7.0.
http://www.managedfusion.com/products/url-rewriter/
http://www.codeplex.com/urlrewriter
Answer: One of the major sticking points I've had with IIS is the lack of Apache's mod_rewrite.  There are other work-arounds and work-alikes depending on what you're doing, but just keep in mind that you'll need to change things up a bit to work with IIS if you're using mod rewrite extensively.
Answer: Since you're moving from LAMP (a somewhat cool acronym) to WIMP (a less cool one), you may need to mentally affirm yourself.  Otherwise, I've had very little trouble with PHP on Windows.
ISAPI rewrite (http://www.isapirewrite.com/) is $99 and has worked very well for me for URL rewriting.
Answer: Why not go with Apache on Windows?
Comment: Apache on Windows is getting pretty unstable if you have a lot of projects and load on the machine. And IIS is performing better on Windows than Apache.
Comment: Why this answer,  is not in comment section?
Comment: @Hamza, It's an answer rather than a comment because it was posted in August of 2008, which was during the beta period before comments existed.
Answer: If your using iis 7 keep an eye on this project, http://phpmanager.codeplex.com/.


Should menu having a drop down menu in it point to a page?

Question: I am developing a website with drop down menu. I was thinking if the parent menu should also point to a location or just point to the same page?
Here is the visual,

Thanks in advance.
Answer: (Assuming I understand your question correctly) you never want to have menu items that don't go anywhere (or go anywhere different).  If it's redundant and you want to send that link to the same place as one of it's children, then you should take a menu item out, and if it's a parent of menu items, then make a summary/landing page for that category where you list the child menu items along with an explanation.


Is cracking wifi password Halal Or Haram

Question: Is cracking wifi password Halal Or Haram and does it differ if the internet pckage were limited or not limited?
Comment: Why would you crack Wi-Fi password?
Comment: who's password are you cracking? Your own or someone else's. Is it with permission? Best to understand the question before giving a fatwa
Comment: to use internet for free. Some neighbor might have bought an internet package, and he has it over wifi. the Questioner is asking if he can steal the broadband? by hacking the password of wifi or not? Does it even matter to the owner if it is unlimited connection? @AbuNooh
Answer: Stealing is haram in Islam:

"[As for] the thief, the male and the female, amputate their hands in recompense for what they earned [i.e. committed] as a deterrent [punishment] from Allah. And Allah is Exalted in Might and Wise." [Quran 5:38]

You cracking the WIFI password for your use is stealing since they are paying for the internet service and not you. You are using someone else's resources that are not yours which they pay cash for. Additionally, this can also be constructed as invasion of privacy since if you are on the network you can view most of the public files on many networks that are not secured:

"Do not spy on one another." [Quran 49:12]
Comment: Look up what password cracking means. Why would someone pay/ask him to crack for them when they can easily reset it? Even then why would the OP think that would even be Haram if he has permission?
Comment: How could you possibly know who's password he's talking he could have gotten permission
Comment: But does it the same in limited and unlimited, unlimited wouldn't hurt the owner of the internet in his package exactly when it is used for browsing only
Comment: Cracking softwares isn't spying, it's an artistic way to make an expensive material reachable for the poor.


Is it possible for me to change hair in animation?

Question: My question is very simple.  Suppose I have a curly hair in frame 0.  In frame 5 I want it straight.  I can't find any tutorials on this using the new geo node system.  There isn't any shape keys I can save after combing so I'm at a loss.
Answer: Shape Keys for Hair Curves
If you need shape keys for the new hair system of Blender 3, the "Hair Curves", then you can simply save the different hairstyles/shapes in several curve objects. These will be your "curve shape keys". Then set up a small Geometry Nodes tree to create the mixing functionality that Blender provides for (mesh) shape keys.

Here is Suzanne with a shape key named "shocked", and two hairstyles "flat" and "raised".
Note: To keep things simple, make sure that both hairstyles have the same number of curves and that the indices are in the same order. That is, duplicate the first hairstyle and create the second hairstyle from it by combing the hair. Do not add/remove hair curves and do not slide the roots.

The GN moves the control points of the source/original curves to the control point positions of the given target/alternative curves. It uses the Index value to match them. The Mix node does the transition. For animation, you can create a keyframe for the Mix Factor (yellow) or use a driver.
Answer: If you mean straightening the hair, use physics gravity, set the hair to overweight and you're done.
If you want to do it in Geonodes you need to create them as curves, then give them the shape you want.


Is TOR legal in Ukraine?

Question: Is TOR usage legal in Ukraine? I mean for legal purposes. Are there any countries where TOR is not legal? Thank you very much!
Answer: Questions like this have come up before. The more general question would be whether encryption is illegal in Ukraine.
The country does have its own set of regulations for the use of cryptography, which do also seem to apply to domestic use, as detailed on the Ukraine page of the cryptolaw.org site:

2. Domestic laws and regulations
Production, trade and use of cryptography are subject to licensing, according to the Law On
  Licensing Certain Types of Economic Activity of 1 June 2000. Licenses
  are issued by the Department of Special Telecommunication Systems and
  Protection of Information of the Security Service of Ukraine (SBU). A
  joint order, No. 88/66, of the State Committee for Regulatory Policy
  and Entrepreneurship and the SBU's Telecom Department regulates the
  use of encryption and contains an application form to request a
  license.

You would have to research further to determine if there are any existing legal precedences - i.e. previous cases - showing how easy the above laws would be to enforce.
With regards as to whether Tor is illegal in other countries: almost certainly in countries where domestic use of encryption is illegal, of which there must be plenty. (Regardless of what the Tor FAQ says... )
Answer: TOR is not legal in Belarus, Ukraine's neighbor. Belarusian government maintains a list of blocked internet resources. All instruments that could allow users to access these resources are forbidden there.
Answer: There's no explicit prohibitions of Tor in any country as far a sI know, but there's some law collisions that can make Tor usage illegal, like the case of Pakistan, or Zimbabwe case . In Ukraine - as far as I know - it's legal
Comment: @Next Tails OS = Linux distro. Linux is legal in Ukraine, so Tails too
Comment: And what about TAILS OS? It is also legal in Ukraine?
Comment: Do you use TAILS? Does it really give more anonymity in the Internet?
Comment: @Next no, I'm using my distro I'm about to release soon. TAILS is too raw for me, I didn't liked it]

Is TOR legal in Ukraine?


Can an editor review manuscript without sending to reviewers?

Question: I submitted my manuscript to a journal one month ago and the status is "with editor" up to now. As the editor of my paper is one of the leading scientists in the field of my research paper (mathematics), I would like to know that can an editor do the review of paper by him/herself without sending to other reviewers?
Comment: Journals have their own rules, of course.
Comment: You cannot infer anything from this. It is perfectly normal that it takes more than 6 months until you here anything from the journal again.
Answer: Yes, an editor can review a manuscript themselves, but you cannot infer an editor is reviewing themselves when a manuscript has been with "a journal [for] one  month...and the status is 'with editor' up to now."
Comment: Even if the editor can have a conflict of interest?
Comment: @user21820 _an editor *can* review_, that doesn't mean they will nor should. Conflict of interest is one instance when they shouldn't.
Answer: The editor may simply not have had the time to look at your manuscript and find a suitable reviewer. Or he may have contacted one or more potential reviewers, but they may not have accepted yet, in which case the editorial system may still show the manuscript as "with editor".
Also, of course, editors do look at manuscripts themselves. They typically don't write full reviews themselves, but they may desk reject, i.e., reject it without even sending it out for review, if the manuscript is obviously not within the journal's scope or of too low quality. ("Obviously" is obviously subjective.)
If you fear a conflict of interest, it would be good to account for this before submission, by either asking the manuscript to be handled by a different editor (assuming the journal has more than one), or by submitting to a different journal.
Answer: I am an editor at a mathematics journal which uses a (IMHO) pretty crappy online editorial system. When a paper is assigned to me, I find it much easier to work with referees "off the grid" rather than using the infernal editorial system. (For example, the system insists that I input in an entire page of details before sending a referee request to someone who most likely will ignore the request anyway.) So I don't think you can infer anything at all from the fact that the online status says "with editor."


We are no longer Beta!

Question: Congratulations to all you expats (and all others). Outside of losing the Beta tag, there won't be any obvious differences... yet. But it is a solid accomplishment. This has been, and will continue to be, the go-to site for long term stay of all kinds, as well as citizenship and other related topics we've adopted. In the coming years we should eventually get some of the customization options available to other fully graduated sites.
Answer: Just like to reiterate the thanks to everyone who made this site a success! I have found this site exactly when I moved abroad and a lot of answers - and questions as well - helped me guide through my journey abroad, including my eventual naturalisation.
I'm hoping I'm not the only one who has found the site useful and has gained valuable knowledge, and hopefully it has helped people avoid awkward situations and issues.
Just to also add to what ouflak was saying there are going to be a couple changes apart from losing the Beta flag:

We're hoping to get a migration path from our big sister site Travel.SE to here. Hopefully this will bring some high quality and useful questions (and potential answers) to this site
Graduation does mean we will have a real moderator election at some point, either in 2022, or in early 2023. I guess since we had a temporary election not too long ago, we're not in a hurry, but if you would like to try out moderation make sure you volunteer when the opportunity comes.

Thanks again, and hoping for another constructive 7 years, and some more

We are no longer Beta!


NEAR Shoemaker mission data

Question: I'm thinking of designing a mission to an asteroid, to Eros, and since NASA has already done a mission to this asteroid, I was wondering if anyone knows of any site, document or whatever helps me. I would also like to know the composition of the soil of Eros.
Comment: What has your prior research turned up so far?
Answer: All the data from the NEAR Shoemaker mission is archived at the Small Body Node of the NASA Planetary Data System. Asteroid surface properties (the regolith) is normally measured using images or spectra in the mid/thermal-infrared to determine the thermal inertia. This can vary considerably depending on whether the surface is made from coarse boulders to very fine regolith as shown in slide 10 of this presentation. Unfortunately the NEAR Shoemaker spacecraft did not carry a mid-IR instrument as spacecraft-sized, reliable and rugged detectors for that spectral range were only developed after that mission flew. Rozitis 2016 discusses the determination of the the surface roughness and discusses the determination of the thermal inertia of Eros using the shape model derived by NEAR Shoemaker and ground-based thermal IR measurements.
Comment: If I place a 3U cubesat in eros orbit, what elements should I have to detect which minerals are there and where is there more concentration?

NEAR Shoemaker mission data


Attack Speed Breakpoints In Diablo 3

Question: In Diablo 2, attack rate was calculated in terms of frames. This meant that there were discrete jumps as you broke certain Increase-Attack-Speed breakpoints. In Diablo 3, is there a similar discrete frame-based calculation, and what is the framerate used by the game engine in calculating attacks?
Comment: there might not be discrete frames (in terms of display), but the game logic could be in fixed-time-step intervals.
Answer: This is an old question, but all the literature suggests that Diablo 3 has a 60 fps simulation rate, and that IAS should be tailored to hit an integral number of frames per attack at 60 fps.
https://www.reddit.com/r/Diablo3Barbarians/wiki/breakpoints
https://www.reddit.com/r/Diablo3DemonHunters/comments/66nnyn
Comment: I must admit I'm not an expert on d3 mechanics, so I'll accept the first non-link answer that describes how you go about listing out IAS breakpoints for a particular skill.
Answer: Diablo III is not sprite-based like Diablo II was (Instead, it's full 3d), so there are no longer discrete frames.
The gameplay ramifications of this, of course, is that any amount of increased attack speed is equally viable. (Though not necessarily noticeable)
You can view your current attacks per second on your character sheet, and unlike in Diablo II (which listed only a speed, e.g. Slow / Fast / Very Fast), you'll actually get a decimal value.
Comment: How does this answer match up with something like [this discussion about Barbarian Whirlwind breakpoints](http://us.battle.net/d3/en/forum/topic/6037344497)?
Comment: @Sterno It would imply that Diablo III reports all damage dealt / resource spent changes in a FixedUpdate loop running 60. Without being able to look into the Game's code, I can't tell you if the attacks are timestamped (such that all IAS is equally viable, with certain values of attack speed "registering" their damage some fractional seconds after the game engine considers them to have happened), or binned (such that there **are** IAS breakpoints for extremely specific values for extremely minor DPS increases). Since "Frames" is irrelevant for a game running on Blizzard servers (since the
Comment: damage calculations have to happen on Blizz servers anyway), the "true" answer would be based on how fast the client and server can communicate, which would bin things *anyway* as they're passed to and fro back over the network. To test this, you would have to concoct a situation where the extra DPS from just shy of one of these "breakpoints" would prevent an enemy's attack (by killing them), and see if your character takes damage or not. I do not think that is feasibly testable.
Comment: The other thing to recognize is that if there are IAS breakpoints, they are nowhere near the magnitude they were in Diablo II. I'd posit that they're not worth worrying about, one way or the other.

Attack Speed Breakpoints In Diablo 3


Data transfered from old iPad to a new iPad and iPhone; will a reset of the old iPad, wipe the data from the new devices?

Question: Will factory reset of my old iPad2 remove my transferred data from the new iPad and iPhone? Everything's on the same account. Do I have to unsynch first?
Answer: If you factory reset your iPad, you won't wipe the data from your other devices.
To give you some perspective, it would be counter intuitive if you lost your phone and remotely wiped your device only to have all your other devices wiped as well.
That being said.... don't have the expectation that your other devices are back ups of your data.  While you will have access to your data in the case of losing a device, if you inadvertently delete your data (all your photos as an example) that change will propagate to all your other devices.
Comment: Absolutely not clear what your answer is. Is not resetting to factory setting deleting all the data, which you are saying would wipe all on the other devises, since it's identical account and all the data.
Comment: Resetting the device doesn't send a "delete" command.  It reinitialized the device to the state it came from the factory.  That will *never* be propagated to your other devices.  You selecting data and pressing delete will be propagated.
Answer: Provided you transferred to to the new devices space and not iCloud space and when you factory reset don't accidentally reset your iCloud storage your fine. Just be care because some apps like notes, photos, contacts could be stored through other means.


Why is earth on an axial tilt of 23.4 degrees?

Question: What were the influences for this to occur? Did some things play a bigger part that others?
Answer: An impact, possibly the same impact that caused material from earth to fly off to space and create the moon, tilted the earth to $23.5^o$
Comment: Has this actually been proved or is it our best guess yet? Wondering if I should mark it as correct
Comment: I'm not 100% certain if its proven but to the best of my knowledge its our best educated guess. Its the dominant/currently accepted theory.
Answer: I thought the tilt was caused by the formation of the earth.
When the earth formed from the gas of the pre-solar system, the gasses rotated and created a disk with an axis of near 23 degrees.  When the disk got dense enough, it condensed it to spheroid we know know and love, keeping its tilt from its gassy days.
Taking into consideration a collision that generated the moon, the collision could certainly have nudged the earth's tilt to the 23.5 degrees we know today.
Comment: The moon was formed about 100,000 years after the earth formed. A computer simulation shows that a collision with an object about 1/3 the size (with the right conditions), would eject enough matter so the moon could form. This collision would have definitely changed the momentum of the earth, affecting the axis tilt and rotation.
Comment: Oh, I see; but since the tilt of the earth is actually a mystery, my answer may still be correct, although augmented by the moon-generating collision.
Comment: I would think that the most likely direction for the axis is normal to the elliptic plane. All the dust circling the start, joining together under gravitational pull, forming a sphere. Oh wait. There will be many, many, many collisions with various rocks which will affect the momentum of the earth. Although your idea has promise, I don't think you can say that the axis did not shift before the moon generating collision.
Comment: That's what I'm saying, that I think the axis shifted to some degree before the moon generating collision, and then adjusted to the 23.5 degrees today after the collision.
Comment: Oh, I thought you said "an axis of near 23 degrees". Anyway, here is the simulation video: https://www.youtube.com/watch?v=Fwl_JBQtH9o. Notice the violence of the collision.
Comment: Neat video, "near" is arbitrary anyway.  Just saying Earth_Formation + Moon_Formation + else = 23.5 degrees.
Answer: It's not constant, so there is no magic about it.  It varies within a range, reflecting stabilising interactions with the moon and the sun, and the equatorial bulge.
Answer: This would be better in astronomy since the earth collided with another planet size rock and the moon was the result. Since the center of the earth is fluid, the tilt of the axis would vary considerable, but the moon has a stabilizing effect.


Questions with no good answers?

Question: What if I ask a question, and get no good answers. This is hurting my accept ratio... but not because I'm too lazy to mark one as correct, just no one has posted a reasonable answer. Maybe it's not a terribly important question, so I don't want to start a bounty... what can we do? Can we at least flag the question as "given up" or something?
Answer: see
Getting attention for unanswered questions?
Have you really invested the effort into getting your questions answered?
Comment: Sometimes no, and that's my point. It might be a minor problem I'm having with one of the many projects I'm working on, and it's just not a high priority. In fact, I might give up on the project before the question gets answered thus making it not really relevant (to me, anyways). I don't think it's worth deleting though, because it might be valuable to someone else, or to myself again, if I ever take up that project again.
Answer: No one expects you to maintain a 100% accept rate.  If you have a few questions that didn't generate a good answer, it's not that big of deal.
From Jeff's announcement of acceptance rate:

It is considered good manners to accept answers on your questions, eventually, but accepting answers is not required. I personally consider anything at 70% or over quite good, meaning you accept answers on 7 out of 10 questions that you ask. There are certainly cases where you don't get an answer you like, or the question is inherently unanswerable.
Answer: Community Wiki questions don't seem to affect your accept ratio, at least from what I've seen on a question I asked that I started as CW.  Maybe marking as CW will stop it from being counted in your accept ratio?

Questions with no good answers?


How do I change hyperlink colors in Eclipse on a Windows 7 machine?

Question: I use a dark color theme (oblivian) with Eclipse (Juno) and can't read the default blue hyperlinks. How do I change them? I went to Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Active hyperlink text color and changed it to cyan but this did not work.
I've seen this question asked/answered for Linux but not Windows.
Answer: Turns out it is a Windows system setting. The answer is actually contained in this question but for Windows XP.
To change in Windows 7:
Control Panel -> Display -> Personalization (lower left corner) -> Window Color (bottom middle) -> Advanced appearance settings -> In the Item dropdown choose Hyperlink then choose the color you want. I went with cyan, much better!
Answer: Solution for windows 10:
Create a class action law suit, to  Microsoft into making a "high contrast theme", in which only the link color is different.
0000FF or something like that.
(I´m serious. Doing this would allow for a universal setting of link-color, which wouldn´t need a change for all programming languages for all workspaces, if it even works for all of them.)


how to detect race condition in a sequential circuit?

Question: lets say we are given a sequential circuit ( e.g. a conventional D latch )
how should i go about detecting if it has a race condition or not ?
Answer: I would recommend googling about asynchronous circuit analysis.
What you should do is to first determine all the feedback loops in the circuit.
i.e. Y = X'Z or with whatever assignment convention you're used to.
Output as a function of all inputs.
Then create a state table like in the picture below. [The top row with the "Next State" header are the inputs]
You'll see a race condition when an input requires a Present State to go to a Next State that would require more than one bit change (fundamental mode).
A race occurs with more than one bit change in state transitions because two bits are "racing" to be the other. For example 00 -> 11. It can be 01 first, or 10 first, and this may cause problems. When this leads to problems, it's called a critical race. But if this race condition eventually leads to the final or intended state anyway, it's ok. For example, with an input of 1, 00->11 is expected. But with an input of 1, the state 10 leads to next state 11, and the same is with 01 leading to next state 11. So you have no problem.
An easier table to see this would be following the format of the following:
The "Y2Y1" are the present states and the "W2W1" are the next states.
Just encircle the states the next states that are the same as the present states. These are the stable states. If there's a column without a stable state, there's instability.
There's much more to do here. Anyway, another thing with your question, it's also nice to create a state diagram that follows a one bit change arrangement. And if there's any cross between states (where there's more than one bit change), depending on how you arranged it, then there's a race.


Save fuel or save the fuel?

Question: I heard this phrase once: "He was driving slowly to save fuel." However it says about some particular fuel, which is in the tank, so using the definite article would be more logical. Why the article was omitted here?
Answer: He's trying to save fuel as a general concept.  Yes, the specific fuel is the one that is in his gas tank at the moment, but that's so obvious from context that there's no particular need to point it out; it's not like he could be saving someone else's fuel.  Saying the fuel implies that we're particularly concerned about this exact, specific fuel, but we're not - fuel is interchangeable.
Answer: A particular definition of 'save' is "to prevent things from being wasted", and with regard to that definition, there is no need to put an article in front of the noun as 'fuel' is being referred to generally. The same applies to money, time and effort, that is, they are all general terms that isn't bound to a single entity. However, if you really want to specifically (and unnecessarily) denote that it's your fuel you want to save, you can say something like "I was driving to save the fuel in my car."
Another reason you wouldn't use the definite article is that it has nothing to refer back to.
"I drove slowly to save the fuel."
"What fuel?"
"Oh, I mean the fuel in my car."
"Oh okay."
Comment: I see, only I do need to overthink that since, I'm sure, there's a lot of such word combinations in English. For example, I can be easily puzzled, whether to put the article in the phrase "to keep gas", only to find out later on that it actually has the same meaning as the former. So I really need to get to the bottom of this;)
Comment: Uhh I see, so you maintain that when we say "save fuel" by fuel we mean, in basic English, all the liquid in the world? And that by saving fuel we just make a contribution to saving "general" fuel?
Comment: And I find this particularly interesting as you're probably a native speaker: why did you omit "the" before "definite article" in your answer?:)
Comment: Sorry, just a typing error. And regarding your other comment, I'd say that's a reasonable interpretation. No need to overthink this, just remember that 'to save fuel' considers fuel in general.
Answer:
He was driving slowly to save fuel

This would be the typical way to express that idea. In this case, "fuel" is used as a mass noun. Note that with this sentence, fuel is still being used, but he is reducing how much (thus saving some of it).

He was driving slowly to save the fuel

This would be less likely as-is. While there is specific fuel in the tank, this would only likely be used if there had been some particular fuel referenced that was being saved:

He was driving slowly to save the fuel in the tank
Comment: Additional example: the supply of fuel is limited to what you have.  Say you're driving across the desert and there won't be a gas station for a long time.  "Save the fuel" would refer to the fuel in your possession, the only fuel there is.
Comment: @fixer1234 Even in that type of case, "save fuel" would be likely. You might see "save the fuel" if there is a specific unit of fuel, e.g. "I'm saving the fuel for when it gets cold"

Save fuel or save the fuel?


Superearth Gravity Calculation?

Question: Consider an Earthlike Planet. It has a similar composition and density to the Earth with an iron core and water oceans. What is the formula to determine the acceleration due to gravity at the planet's surface?
Comment: If you express yourself poorly, please edit your question to make it clear.
Comment: ...What? If your planet has the same mass than earth, then it would also have the same gravitational attraction.
Comment: Not the same mass as earth , but proportionally the same density and composition , I guess  Iexpressed poorly the question.
Comment: $F=G\frac{m_1 m_2}{r^2}$
Comment: If it's an earth-like planet with the mass of earth it will have the same gravity as Earth. And water oceans will influence the mass. After all adding water means adding mass. I am not sure I understand what you are asking here.
Comment: https://en.wikipedia.org/wiki/Newton's_law_of_universal_gravitation
Answer: Gravity at surface is easy enough: in SI, $g=\frac{GM}{r^2}$.
G is the gravitational constant, M is the planet's mass, r is its radius, g is the surface gravity.
If you're working in multiples of Earth rather than SI, $g_n=ga_r^{-2}b_m$ can be used, where $a_r$ is the scaling factor of the radius of earth (0.5 for half the radius, etc.) and $b_m$ is the scaling factor for mass.
If you're working in density terms, $M=\frac{4}{3}\pi r^2 \rho$ (or, again, in Earth-centric units, $M=r^2 \rho$), with $\rho$ being the density in each case.
Wikipedia will tell you that "The total mass of the hydrosphere is about 1.4 quintillion metric tons ($1.4×10^{18}$ long tons or $1.5×10^{18}$ short tons), which is about 0.023% of Earth's total mass" – which isn't enough to make a significant difference to gravity.
Comment: Good answer - it can be improved by adding simple examples for SI and multiples of earth, and also by providing the value for G (6.67408 × 10^-11). That'll make it easy enough to use without additional sources...
Answer: The force of gravity exerted on an object on the surface of a planet is proportional to the mass of the planet and inversely proportional to the square of the distance from the object to the center of the planet. So, if you work with values relative to those of Earth, you can forget about difficult units and large numbers.
$$ g = {M \over r^2} $$
where $M$ = mass of the planet, expressed in Earth masses; and $r$ = radius of the planet, expressed in Earth radii. Of course $g$, the gravity, will also be expressed in Earth gravities.
For example, a Super-Earth that is 1.2 times the size of Earth and with 1.8 times its mass will have a surface gravity of
$$ g = {1.8 \over 1.2^2} = {1.8 \over 1.44} = 1.25 $$
The actual value will be 1.25 times Earth gravity, i. e.
$$ g = 1.25 \times 9.8\space m / s^2 = 12.25\space m / s^2$$
Note that mass and radius are not independent. If your planet is larger than Earth but has the same mass, then it must have a lower density, but a Super-Earth (a large rocky planet) cannot be a lot less dense than Earth.
Oceans on Earth make no significant difference on the mass of the planet. In any case, an ocean is not made of special stuff; water (and ice) only add to the overall mass of the planet.

Superearth Gravity Calculation?


Is the smallest primitive root modulo p a primitive root modulo p^2?

Question: Let $p \ne 2$ be a prime and $a$ the smallest positive integer that is a primitive root modulo $p$. Is $a$ necessarily a primitive root modulo $p^2$ (and hence modulo all powers of $p$)? I checked this for all $p < 3 \times 10^5$ and it seems to work, but I can't see any sound theoretical reason why it should be the case. What is there to stop the Teichmuller lifts of the elements of $\mathbb{F}_p^\times$ being really small?
Comment: Well, the probability of a primitive root $r$ modulo $p$ not to be primitive modulo $p^2$ is $1/p$ (there is exactly one $a$ modulo $p$ such $(r+ap)^{p-1}\equiv1\pmod{p^2}$). So, your search for larger $p$ will hardly lead to a counter example. But I've never heard on a theoretical background towards this.
Comment: Since finite fields can not be ordered, I am sometimes a little bit annoyed by properties defining the smallest (natural) integers $a$ whose reduction modulo $p$ has a certain property in the finite field $\mathbb Z/p\mathbb Z$.
Comment: Well, but among the finite fields the prime field is a bit special, and it indeed has a canonical total order (which is not compatible with the field operations).
Answer: It is not true in general.  See http://primes.utm.edu/curios/page.php/40487.html for the example, 5 mod 40487^2.
Comment: Good reason not to trust computer-based evidence.
Comment: Oops! There was a typo in my computer program, so I missed this example. Thanks for the quick response!
Comment: Victor, I checked after all myself: $5^{40486}\equiv 1 \pmod{40487^2}$, but I am not very surprised after learning the story about Wolstenholme primes (http://en.wikipedia.org/wiki/Wolstenholme%27s_theorem): only two are known with the smallest 16843 of about the same magnitude as 40487.
Answer: The key term here is: Wieferich prime base $a$.
What you observed can be presented to children in the following form:  if $p$ is a prime greater than 5 and the fraction $1/p$ has decimal period $d$, numerical tables show $1/p^2$ has decimal period $dp$, $1/p^3$ has decimal period $dp^2$, and generally the decimal period  of $1/p^k$ is $dp^{k-1}$. For example, 1/13 has decimal period 6, 1/169 has decimal period $78 = 6 \cdot 13$, and 1/2197 has decimal period $1014 = 6 \cdot 13^2$.
This works for primes below 100, but if you search far enough you will find a counterexample.  The first one is $p = 487$: 1/487 and $1/487^2$ both have decimal period 486. The second counterexample is $p = 56,598,313$. (!!) This list has been Sloaned: http://oeis.org/A045616.
For a general article about this business, see http://www.jstor.org/stable/3219294.
Within algebraic number theory, this phenomenon appears when you compute the ring of integers of ${\mathbf Q}(\sqrt[n]{2})$, which turns out to be ${\mathbf Z}[\sqrt[n]{2}]$ for all $n \leq 1000$.  With that evidence you might guess the ring of integers is always ${\mathbf Z}[\sqrt[n]{2}]$, just like the ring of integers of ${\mathbf Q}(\zeta_n)$ is always ${\mathbf Z}[\zeta_n]$.  But in fact it's not always true.  There are $n > 1000$ such that ${\mathbf Z}[\sqrt[n]{2}]$ is not the full ring of integers of ${\mathbf Q}(\sqrt[n]{2})$. If you search for Wieferich primes to base 2 you will find them.
Comment: +1 for the verb "to Sloane"
Comment: For the general statement: c.f. "Problems in Algebraic Number Theory", Murty and Esmonde, second edition, Exercise 5.6.12
Comment: @FilippoAlbertoEdoardo: I've heard Noam Elkies refer to a book as being Dovered.
Answer: Primes $p$ for which $p^2$ divides $q^{p-1}-1$, for various small values of $q$, are often important in elementary attacks on Fermat's Last Theorem. See Lenstra and Stevenhagen's article "Class Field Theory and the First Case of Fermat's Last Theorem" in the book Modular Forms and Fermat's Last Theorem, for a quick survey. I don't see any reason, from this perspective, that $(q^{p-1}-1)/p$ should be particularly unlikely to be divisible by $p$. Nonetheless, that literature might give you some hints.
Crandall, Dilcher and Pomerance (see Section 3) present data suggesting that $(2^{p-1}-1)/p \mod p$ looks uniformly distributed in $[-p/2, p/2]$. They suggest that the rarity of primes with $p$ dividing $(2^{p-1}-1)/p$ has no deeper reason than that, if $a_p$ is a random sequence indexed by primes, one only expects $p$ to divide $a_p$ for roughly $\log \log N$ primes less than $N$, and $\log \log$ of the computable range is quite small. Replacing $2$ by the smallest primitive root mod $p$ may exhibit similar behavior.
Comment: David, they are more important for Catalan's equation! Such pairs are crucial in the final solutions, while for the FLT they only do the "1st case".
Answer: This would probably fit in the eventual counterexamples page too.
http://www.ams.org/journals/mcom/2009-78-266/S0025-5718-08-02090-5/home.html
Comment: The main result of the cited paper was anticipated by Steven Glasby in a post to the Number Theory mailing list on 22 April 2001. See http://listserv.nodak.edu/cgi-bin/wa.exe?A2=ind0104&L=nmbrthry&T=0&F=&S=&P=2674
Comment: The link didn't work when I tried it just now, but one can find the post by searching the nmberthry archive at the listserv for Glasby.
Comment: For the record (in case the links disappear again):
A. Paszkiewicz, "A new prime $p$ for which the least primitive root
mod $p$ and the least primitive root mod $p^2$ are not equal",
*Math. Comp.* **78** (2009), 1193-1195.  The prime $p$ is $6692367337$;
the least primitive root mod $p$ is $5$, but $5^{p-1} \equiv 1 \bmod p^2$
(the least primitive root mod $p^2$ turns out to be $7$).
Comment: @Noam, sorry, I meant the link I posted to the Glasby post to the nmbrthry listserv --- that's the one that seems to be broken.
Comment: Just in case the link gets outdated: that prime counterexample is 6692367337.


Piranha CMS Want to extend the Users with new Data?

Question: I wanted to Customize the Manager Area, specific the User. I added a new Column(PhoneNumber) in the Database and the Data of this field gets in the UserEditModel. I added an new text field in the Edit.cshtml.

        @Localizer.General["Email address"]
        <input type="email" v-model="userModel.user.email" class="form-control small" maxlength="128" required />

            @Localizer.General["Email address is mandatory."]

        @Localizer.General["PhoneNumber"]
        <input v-model="userModel.user.PhoneNumber" class="form-control maxlength="128" required />

            @Localizer.General["PhoneNumber is mandatory."]

In the Model the PhoneNumber is filled with the Data from the Database, but the Phonenumber Field doesnt get the Data from the Model. Do i need to declare the Field somewhere? Do i need to change something in the piranha.useredit.js?
I hope somebody can help me.
Answer: This is the method in the project Piranha.AspNetCore.Identity that is responsible for saving the user to the database.
https://github.com/PiranhaCMS/piranha.core/blob/master/identity/Piranha.AspNetCore.Identity/Models/UserEditModel.cs#L60
Answer: You can use the identity module as a template/ or use NuGet-package Piranha.AspNetCore.Identity and create your own identity Implementation.
Follow this link for more info on Piranha Modules https://piranhacms.org/docs/master/extensions/modules


Biscotti with chocolate drizzle in batter

Question: I make biscotti. I want to introduce chocolate — not chips, but melted chocolate — drizzled through the dough without turning it completely into chocolate. Any suggestions on how to do this?
Answer: You'd have to do it at the time you form the loaf for the first bake.
One way would be to use a layer or two of chocolate sticks (as used in pain au chocolat but seemingly sold as "croissant sticks"). This would be very suitable chocolate as even melted it's not too runny. You could probably split them to get more, thinner sticks.  You could melt chocolate and allow it to cool in strips to make your own, which could be longer, thinner and less even. You'd need to have the dough mixed and then mix in whatever chocolate you use as little as possible.
A different approach would be to make a half batch of normal dough and a half batch of chocolate dough then combine those without mixing, as if making a marble cake. But this may not be what you're looking for.
Comment: You could grate solid chocolate in a ribbon and it will melt in the oven.
Comment: @GdD I've had success with curls but not ribbons (but I've never tried systematically). I recon my graters would be too fine and make a chocolate speckle dough. You've probably got a trick I don't know of