I was running a dual-boot of Ubuntu 14.04 and Windows 8 Pro. I recently took advantage of the free Windows upgrade and upgraded my Windows 8 to 10, however; whenever I start up my machine, Grub2 still lists my Windows loader as Windows 8 and whenever I select Windows I get the old Windows 8 logging on screen for a while before getting into Windows 10. Am new to Ubuntu so I don't know if this is a Grub2 problem or something else. Please help
This is a Q&amp;A that I recently have figured out, so I have posted the answer below.  After installing Windows 10, every time I get a kernel update or I run the update-grub2 it always shows Windows 7 or Windows Recovery Environment instead of Windows 10.  How do I fix this permanently?
I'm trying to make a material node setup to set final render colors, regardless of lighting conditions. Is such a setup possible? I am developing a set of classes that implement a common interface. A consumer of my library shall expect each of these classes to implement a certain set of static functions. Is there anyway that I can decorate these class so that the compiler will catch the case where one of the functions is not implemented.  I know it will eventually be caught when building the consuming code. And I also know how to get around this problem using a kind of factory class.  Just curious to know if there is any syntax/attributes out there for requiring static functions on a class.  Ed Removed the word 'interface' to avoid confusion. Zoom in/out on click in OpenLayers 3? Difference between a space and a "wave" symbol (tilde/"~")? I am running out of storage, I usually have bought a lot of my games on disk but if I buy a game on the store then delete it, and want to redownload it do I have to buy it again Allow bounty to be set with reputation from another site? Here's one to get shot down: How about letting bounties to be set using the reputation gained through the use of another site? So, for instance, I'm a programmer with a high Stack Overflow rep who hates using computers. Wouldn't it be useful for me to be able to exchange some of my excess Stack Overflow credit to incentivise a question on Super User?   Or perhaps I'd like to highlight a question on Meta Stack Overflow, but I don't spend my time there. I'd like to split strings like these  'foofo21' 'bar432' 'foobar12345'   into  ['foofo', '21'] ['bar', '432'] ['foobar', '12345']   Does somebody know an easy and simple way to do this in python? What is the equivalent of Persian idiom "When the reed blooms"? In Persian, we say "When the  blooms" when we want to  express that an event:   Never happens. (This is only the opinion of the speaker so it's not a fact) It's very unlikely to happen. It's going to take so long to actually happen. (It's so long that you'd be better off giving up expecting it)  3.1. We also use it when someone is always postponing something they have to do so you never actually see it happen.   For example:      Kyle: When are you going to pay my money back?      Cartman: When the  blooms.   Now I don't know if I got the plant's name right because there are some other versions like:        In any event, they have mentioned this plant in the idiom because apparently some versions of it actually never bloom. Others believe it's because farmers harvest them before they get the chance to bloom (e.g to make music instruments), so it never happens. I'd love to know the equivalent idioms or expressions for this.  PS: I only know "When pigs fly" but I'm not a fan of it because the word pig sounds a bit rude to me and partly because it implies a strong impossibility which doesn't work for the #3 use. I've recently noticed an issue with Ubuntu Software Center which I have tried to resolve following the answers provided in  without result and  which partially worked but didn't persist. The Issue After installing 20.04 I opened Ubuntu Software Center and installed a number of apps without any problem - one of which was Stacer which I will use as an example.  In Show Applications the app is clearly present and right clicking on the icon selecting Show Details provides the image above and it works perfectly well. However, if I open Ubuntu Software Center and type in the search bar stacer it reports that no application is found:  Nor is it listed when selecting the Installed tab. This is the setup for for Software and Updates.  There are other applications I have previously installed which are also now reported as No Application found such as gLabels, gscan2pdf and others. Has something changed since I initially installed 20.04.1 and more importantly, how can I restore good order to the Ubuntu Software Center? Modular arithmetic problem (mod $13$) $$\large2017^{(2020^{2015})} \pmod{13}$$  I am practicing for my exam and I can solve almost all problem, but this type of problem is very hard to me. In this case, I have to compute this by modulo $13$. Delete specific line number(s) from a text file using sed? How can I setup a Material in Cycles for Z-Transparency? I am trying to use a MERGE statement to insert or delete rows from a table, but I only want to act on a subset of those rows. The documentation for MERGE has a pretty strongly worded warning:     It is important to specify only the columns from the target table that are used for matching purposes. That is, specify columns from the target table that are compared to the corresponding column of the source table. Do not attempt to improve query performance by filtering out rows in the target table in the ON clause, such as by specifying AND NOT target_table.column_x = value. Doing so may return unexpected and incorrect results.   but this is exactly what it appears I have to do to make my MERGE work.  The data I have is a standard many-to-many join table of items to categories (e.g. which items are included in which categories) like so:  CategoryId   ItemId ==========   ====== 1            1 1            2 1            3 2            1 2            3 3            5 3            6 4            5   What I need to do is to effectively replace all rows in a specific category with a new list of items. My initial attempt to do this looks like this:  MERGE INTO CategoryItem AS TARGET USING (   SELECT ItemId FROM SomeExternalDataSource WHERE CategoryId = 2 ) AS SOURCE ON SOURCE.ItemId = TARGET.ItemId AND TARGET.CategoryId = 2 WHEN NOT MATCHED BY TARGET THEN     INSERT ( CategoryId, ItemId )     VALUES ( 2, ItemId ) WHEN NOT MATCHED BY SOURCE AND TARGET.CategoryId = 2 THEN     DELETE ;   This appears to be working in my tests, but I am doing exactly what MSDN explicitly warns me not to do. This makes me concerned that I will run into unexpected problems later on, but I cannot see any other way to make my MERGE only affect rows with the specific field value (CategoryId = 2) and ignore rows from other categories.  Is there a "more correct" way to achieve this same result? And what are the "unexpected or incorrect results" that MSDN is warning me about? How do I alter a message in the message queue independent of site language? I want to programatically alter a message in the message queue. The message I want to alter is set in the message queue by function comment_form_submit() in comment.module, i.e.:  if ($comment-&gt;status == COMMENT_NOT_PUBLISHED) {   if (!user_access('administer comments')) {     drupal_set_message(t('Your comment has been queued for review by site administrators and will be published after approval.'));   } }   Instead of this, I want the call to drupal_set_message() to be this:  drupal_set_message(t('Your comment will be published when you validate your e-mail address.'));   How do I do this?  Postscript: Based on the answer below by Topsitemakers, I got this working for any language by using array_search() inside a custom MYMODULE_comment_submit to search the message array, and then compare the translated strings to identify the key of the string to alter.  This is the working code I ended up with:  $mm = drupal_get_messages('status', TRUE); $key = array_search(t('Your comment has been queued for review by site administrators and will be published after approval.'), $mm['status']); if (FALSE !== $key) {   $mm['status'][$key] = t('Your comment will be published when you validate your e-mail address.'); } foreach ($mm['status'] as $msg) {   drupal_set_message($msg, 'status'); } Permitting scp but not ssh - without scponly I play on the DivineJourney modpack with a friend, but he wants to constantly spawn things in. Is there any way to allow him to be able to use the teleport command, but not be able to spawn in items?  I've already locked the NEI mode to Recipe.  I've looked around for a mod for plug-ins for Forge (as thats what the server is on) but I couldn't find anything thats up to date. I found Sponge, but thats for 1.8+, and I need 1.7.10. Why is the derivative of a circle's area its perimeter (and similarly for spheres)? When differentiated with respect to $r$, the derivative of $\pi r^2$ is $2 \pi r$, which is the circumference of a circle.  Similarly, when the formula for a sphere's volume $\frac{4}{3} \pi r^3$ is differentiated with respect to $r$, we get $4 \pi r^2$.  Is this just a coincidence, or is there some deep explanation for why we should expect this? I am trying to add a timed delay in a C++ program, and was wondering if anyone has any suggestions on what I can try or information I can look at?  I wish I had more details on how I am implementing this timed delay, but until I have more information on how to add a timed delay I am not sure on how I should even attempt to implement this. Get last n lines of a file, similar to tail I'm writing a log file viewer for a web application and for that I want to paginate through the lines of the log file.  The items in the file are line based with the newest item at the bottom. So I need a tail() method that can read n lines from the bottom and support an offset.  This is hat I came up with: def tail(f, n, offset=0):     &quot;&quot;&quot;Reads a n lines from f with an offset of offset lines.&quot;&quot;&quot;     avg_line_length = 74     to_read = n + offset     while 1:         try:             f.seek(-(avg_line_length * to_read), 2)         except IOError:             # woops.  apparently file is smaller than what we want             # to step back, go to the beginning instead             f.seek(0)         pos = f.tell()         lines = f.read().splitlines()         if len(lines) &gt;= to_read or pos == 0:             return lines[-to_read:offset and -offset or None]         avg_line_length *= 1.3  Is this a reasonable approach?  What is the recommended way to tail log files with offsets? Delete data using 2 DialogForm