How to make code examples accessible in a document?

I’m creating a MS Word document (and will probably convert it to PDF later on) for a visually impaired programming student.

I’m following all the guidelines about text semantics, like correctly using headers, paragraph, tables, avoiding blank lines, etc. But I don’t know what to do when it comes to code examples. I’m particularly using Python for this document, so not only there are code snippets but also interpreter examples, including the “>>>” symbols. What’s the best way to add these in my document? Should I enclose these examples in a table containing just one cell, and then adding a title to the table along the lines of “this is a code example:”? Should I add line numbers? Any other markup that I should add?

Moving Document Library to a subsite in SharePoint

Currently, we have Document Libraries created in SharePoint Online and would like to move them using Powershell to its own Subsite. The reason we would like to move them is that we would like to keep the version history. Since we are dealing with 1000s of files, I would like to use Powershell to complete this task.

I am currently connecting to my SharePoint site using:

Connect-PnPOnline -Url “Sitename” -UseWebLogin

Here is where I need assistance. I am trying to use Move-PnPFolder but I am not sure how to write a command that would define the source, destination, and move of all files in the document library to a subsite that I have manually created.

Help please?

SPO – Set Document Library as Site’s Homepage

I want users to automatically be directed to the Document Library when visiting a Sharepoint Site (sites/sitename/Shared%20Documents/Forms/AllItems.aspx). These are Office 365 group sites being used primarily for file sharing/syncing.

Using a page that contains the document library web part does not suffice as the web part does not include all the file and folder functions.

If I use Pages > +New > Link and use the document library URL, the resulting link opens a download of the URL shortcut when set as the homepage.

I see no available SPO cmdlets or parameters of existing cmdlets that allow setting the home page similar to Set-SPOHomeSite. This cmdlet seems to only set the global home site for the tenant, not for a specific site, and if I try to use Connect-SPOService on a specific /sites/ it fails to authenticate. I was hoping for something like:

Set-SPOSite -Identity https://tenant.sharepoint.com/sites/sitename -HomePageURL https://tenant.sharepoint.com/sites/sitename/Shared%20Documents/Forms/AllItems.aspx

How do I properly encrypt a document with GPG2 on Mac?

Here is what I have done roughly, starting from scratch:

$   brew install gnupg $   cat >foo <<EOF    Key-Type: RSA    Key-Length: 4096    Subkey-Type: RSA    Subkey-Length: 4096    Name-Real: My Name    Name-Comment: ...    Name-Email: ...    Expire-Date: ...    Passphrase:  EOF $   gpg --batch --full-generate-key foo gpg: key ... marked as ultimately trusted gpg: revocation certificate stored as '/Users/username/.gnupg/openpgp-revocs.d/....rev' $   gpg --list-keys pub   rsa2048 2013-11-23 [SC]       ...key1... uid           [ultimate] My Name <email@email.com> sub   rsa2048 2019-10-26 [E]  pub   rsa4096 2019-10-26 [SC] .... $   gpg --output me.asc --armor --export ...key1... $   gpg --import me.asc gpg: key ...: no valid user IDs gpg: this may be caused by a missing self-signature gpg: Total number processed: 1 gpg:           w/o user IDs: 1 $   gpg --version gpg (GnuPG) 2.2.17 

What I would like to finish doing is finally encrypt a document.

$   gpg --encrypt file.png --recipient "???" 

Not quite there yet. Wondering why I am getting this error:

gpg: key ...: no valid user IDs gpg: this may be caused by a missing self-signature 

What steps am I missing? What did I do wrong or do I need to do?

Do I want a “self signature”, or do I want to somehow sign this with some trusted party (I’m vaguely familiar with self-signed SSH certificates, which is what I’m drawing the parallel with).

Printing document on usb drive with confidential information on multi user computer

I have a pdf file with confidential information on a usb flash drive. This document needs to be printed on a multi user Ubuntu system. I want to prevent other users from seeing the content of the document.

Assume the following procedure:

  • The usb drive is inserted to the computer and mounted.
  • The document is opened with okular or evince and printed directly from the program.
  • The usb drive is umounted and removed from the computer.

Question: What do I need to do to wipe any traces / copies of the document I printed?

First idea: I guess /tmp would be a good place to look out for – though I do not know if there will be any copies stored there or at other places. Do I have to do additional steps to remove all traces / copies?

Sharepoint Online (O365) – Only search Document Title and Names

If i search for a document name in the Document Library, it returns a list of files that contain the search word, but not the document with the correct title.

I want to change the search in Sharepoint so that only document titles and names are searched.

I already found the managed properties -> Contents and the field “mappings to crawled properties” (i hope i translated it correct)

crawled properties

Now someone here mentioned too look out for “Basic:10(Text)” https://social.technet.microsoft.com/Forums/lync/en-US/562c3f58-aa64-40a9-8661-a4543da99ef4/search-file-names-in-document-libraries?forum=sharepointsearchprevious

I only need search to find document titles

What do i need to change here without breaking everything?

I hope you can help me a bit 🙂

SP 2013 document library custom view webpart

We have a requirement to display most recent uploaded file in a document repository in a separate view on the home page.

For example we have Document_Library_1 with files file_new, file_old1, file_old2… we need to have a custom custom view or dashboard on homepage, where the user can access the most recent reports.

enter image description here

Could someone please point me in the right direction on how to achieve this, is custom webpart a solution or the standard view could be customized?

Get the FieldValues of a Document in a Document Library (SharePoint Online) c#

connecting to a SharePoint online tenant (ctx works fine) I want to get all items which match a certain criteria ([“Status”] == “Out of Synch”) then load the ListItem Property “JobReference” at the same time but I keep getting Value does not fall within the expected range.

List sourceLibary = web.Lists.GetByTitle("Timer Job Source Library");         string camlString = @"<View><ViewFields>< FieldRef Name = 'Status' />< FieldRef Name='JobReference' /></ViewFields><Query><Where><Eq>             <FieldRef Name='Status' /><Value Type='Text'>Out of Synch</Value>         </Eq></Where></Query></View>";         CamlQuery query = new CamlQuery();         query.ViewXml = camlString;         ListItemCollection sourceItems = sourceLibary.GetItems(query);         ctx.Load(sourceItems, si => si.Include(i => i.File, i => i["JobReference"]));         ctx.ExecuteQuery(); 

I create the field myself earlier in the code with no issues

string jobNameFieldXml = "<Field ID='{620CF30A-7551-4D8C-8FE6-75C0C96FA764}' Type='Text' Name='JobReference' StaticName='JobReference' DisplayName='Job Reference' />"; 

I have then tried changing ctx.Load() to the below but I always get errors?

ctx.Load(sourceItems, si => si.Include(i => i.File, i => i.File.ListItemAllFields.FieldValues["JobReference"])); 

or

ctx.Load(sourceItems, si => si.Include(i => i.File, i => i.File.ListItemAllFields["JobReference"])); 

or

ctx.Load(sourceItems, si => si.Include(i => i.File, i => i.FieldValues["JobReference"])); 

EDIT

So I found if I load the parts on the item separate it works? This makes the whole process very chatty? does anyone know why, maybe I misunderstand the return of the getItems() query or how .Include() works?

Working

foreach (ListItem item in sourceItems)         {             ctx.Load(item, i => i.File, i => i["JobReference"]);             ctx.ExecuteQuery();         } 

Tia!