How to get all the source for my current Ubuntu installation?

I think it would be really useful (and cool) to be able to get all the source code for my current Ubuntu installation. I mean everything, every last package from the kernel all the way up to user interface details.

(One situation where this would be useful is when there is some kind of error message that I don’t understand what it means and don’t know exactly where it came from, like the infamous “system program problem detected” popup. I don’t know which package is responsible for presenting that. If I had all the source code I could simply search for the error message string to find the relevant part of the code. That could help me understand what happened and possibly modify the code slightly to add more details in the error message, or whatever, and rebuild that package.)

Assuming that I installed everything using apt, I can get the source code for any individual package x using apt-get source x so I guess it should be possible to write a script that first gets a list of the names of all currently installed packages, and then use a loop to get the source code using apt-get source for each package one by one. My question is: is there a more convenient way of getting all source code for all software I currently have installed, perhaps using a single command?

2013 Workflow doesn’t run when deselecting “Automatically update the workflow status to the current stage name” in Document Library

SP 2016 OnPrem:

I’m using an API to do a custom upload to my Document library. After initial upload my script gathers basic info about the user to set default values and update the document properties. So the item is uploaded and saved a 2nd time almost immediately. Then I open the document properties immediately after that so the user can add more details, all within the same process. I have a 2013 workflow set to run on Update, so it’s triggered on that 2nd save.

This causes a conflict error when trying to Save the document properties for the 3rd time (in the UI). (Because while I was opening the document properties the workflow was running in the background.) It’s the same problem described here: Cannot save document properties with workflow enabled

I am able to get around that by deselecting “Automatically update the workflow status to the current stage name” in the workflow. That prevents the conflict but it also prevents my workflow from triggering on that UI save.

I have checked the End date in the workflow history and sure enough, it doesn’t run for that 3rd save. However, if I close the document properties, reopen and save them again, the workflow will trigger.

So the problem has something to do with uploading via api, updating via api and opening the document properties in the UI all in one stroke.

It makes sense why the conflict would happen, but not why the workflow won’t run if I deselect that option.

Any advice?

Thank you

Show total price of current product on product page before “Add To Cart” button, why not?

I’m having a hard discussion about adding total price per product in product page before adding to cart or not.

The situation:

Our user normally add more than 1 product to cart and our products have a cheap price, but the user never buys just 1. For example, if he is buying a roof tile, he will add 500 tiles. And considering it I thinking the total price could be a benefit helping users to know the individual total (subtotal for each product) before add to cart reducing the shopping cart abandonment. And the experience could improve because this new feature will reduce the number of page changes and we will be very transparent with the user without bad surprises.

As this feature is no common on other e-commerce is being very difficult to approve an A/B test. Adding the total price for each product on the product page looks a good idea? Why not?

I already read this topic but they are talking something more advanced and my user is not adding a shirt or simple items to the cart. I just want to calculate: Product Price X Quantity and show the total price.

See an example of how I expect to do it.

enter image description here enter image description here

current user is always is administrator on a SharePoint App

I have tried following solution to check the current user’s permissions on the current host web in a SharePoint hosted app, however the user is always administrator.

function sharePointReady() {      hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));      appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));       context = new SP.ClientContext.get_current();       hostWebContext = new SP.AppContextSite(context, hostweburl);       currentWeb = hostWebContext.get_web();      user = hostWebContext.get_web().get_currentUser();      context.load(user);      context.load(currentWeb, 'EffectiveBasePermissions');        context.executeQueryAsync(onAppReadySuccess, onAppReadyFailed); }  function onAppReadySuccess() {       alert(currentWeb.get_effectiveBasePermissions().has(SP.PermissionKind.fullMask)); } 

Clicking on an Enterprise Wiki Category link only returns the current page

In Sharepoint Online, I have an Enterprise Wiki that I created using CSOM.

I have a term store and on each page there is a Categories section which shows terms: enter image description here

When I click on one of these, I would expect to see a list of all the pages with the same term/category. But I only get 1 result: The page itself:

enter image description here

I can add new terms to the ones that were created with CSOM but they behave the same.

Using the Term Store Manangement Tool everything looks normal: enter image description here

Why don’t I get the list of pages that I expect?

List all entries in the current directory whose names contain only uppercase letters

In one of my lab questions I was asked to list all entries(both files and folders) in the current directory whose names contain only uppercase letters using piping and grep command. Folders must have a forward slash displayed. Initially, my solution looked like this:

ls -p | grep -e "^[[:upper:]]*\/?$  " 

I thought that I can protect the ‘/’ sign with the backward slash(as in echo \* vs echo *). However, it doesn’t work as intended. One of my friends suggested the following solution:

ls -p | grep -e '^[[:upper:]]*/\?$  ' 

I have no idea why the backward slash is used like this. What is even more weird,for me, that it actually produces the right result. I was wondering if someone could explain where the mistake in my solution is and why the second version actually works.

How to get current user in high-trust apps

I want to get current user in high-trust apps at sharepoint 2013 on-premises environment. But each returned user are the same, how can i get the correct current user? Here is my code:

    public ActionResult Index()     {         TokenHelper.TrustAllCertificates();         var sharepointUrl = Request.QueryString["SPHostUrl"];          var clientContext = TokenHelper.GetS2SClientContextWithWindowsIdentity(new Uri(             sharepointUrl), Request.LogonUserIdentity);          clientContext.Load(clientContext.Web.CurrentUser, user => user.LoginName);          clientContext.Load(clientContext.Web);         clientContext.ExecuteQuery();          string result = "<h2>Web title retrieved using the managed client object model</h2>";         result += "<p>" + clientContext.Web.Title + "</p>";          clientContext.Dispose();          ViewBag.Content = result;         ViewBag.User = string.Format("Current UserName:{0}", clientContext.Web.CurrentUser.LoginName);          return View();     } 

Awesome features of google current

Hello everyone,,
Google has released its new Currents app for Android devices and iOS. The universal app offers a personalized news experience in a magazine-like format.
Google Currents contains three “editions,” including Publisher, Google trending, and favorites.

The Google Trending edition offers the five most recent trending stories in multiple categories such as world, entertainment and sports. Finally, your favorite blogs and feeds are…

Awesome features of google current