What is this strange error: Tuple type element list cannot be empty

Environment: SP2019 onprem

SPFx version: 1.4.1

All of sudden below error is coming while doing gulp build or gulp serve.

A tuple type element list cannot be empty.Error – typescript – src/webparts/displayStateInformation/components/DisplayStateInformation.tsx(14,4): error TS1122: A tuple type element list cannot be empty.

How to resolve this?

Below is my interface

export interface IItemsData {   k:[]; } 

Error throwing for property k

[GET][NULLED] – Element Pack – Addon for Elementor Page Builder WordPress Plugin v3.2.4


[GET][NULLED] – Element Pack – Addon for Elementor Page Builder WordPress Plugin v3.2.4

Grab-bar element in iOS issue

Today’s WTH moment.

I just sat down to do a typical grab-bar sliding panel, this in iOS ….

enter image description here

being completely familiar with every little widget in iOS I started to type for autocompletion .. grab .. slide .. bar .. but …. what?

On second thought, it occurred to me I’m pretty sure ….. there is no native grab bar element in iOS. No, really!

Three questions arising,

  1. Can anyone absolutely confirm that, uh, there is no native grab bar element in iOS

  2. An interesting question is, what or where is the definitive current list of native elements available in iOS? (This would have application to programmers, managers, etc.) (It would be good to have this for the other major platforms also.)

The only thing I could really find was, if you hunt around on Apple you can download a file UIElements+DesignTemplates+Guides.sketch , but it doesn’t really seem definitive.

You’d think there would surely be a page somewhere from Apple “Here are the and only the native UX elements in iOS”

  1. Funny thing, I swear there are a number of major apps (so, the major social media, etc), for iOS, that use such a grab bar on a sliding panel – can anyone think of an example? It’s on the tip of my tongue but searching around I can’t find one.

Note that iOS has these two sliding-panel-esque elements – I found them in the file mentioned above – but they are indeed grabbarless (unless there’s an option or such I have not stumbled on – again it’s weird there’s really no “definitive list”)

enter image description here enter image description here

Is there an O(1) solution to find the kth-smallest element in an implicit min-heap?

I know this would be an O(k log n) operation on a traditional heap, and I know there are ways to maintain Kth-smallest over a stream of inserts/deletes for constant-time access…

My question though is, when we have an implicit array representation of a min-heap, e.g.:

min_heap = [1, 2, 4, 3, 6, 5, 54, 12, 12, 34] 

In this case, is it possible to infer the Kth-smallest value’s index from the value of K, so you can use the array index to get the value in O(1) time?

SharePoint Online – PowerShell – CSOM ExecuteQuery Exception is Root Element is Missing

I am used to working with SharePoint on-premises environments, but I am now trying to come up to speed with SharePoint Online. I can connect to my tenant using Connect-SPOService and use the standard SharePoint Online cmdlets, so my credentials are working and that route of access seems to be in good order for me.

However, I will need to use the greater utility of CSOM for work that I need to do. Initially, I have just tried to set up a simple PowerShell procedure to start walking through some of the basics using CSOM with SharePoint Online. But I continue to have a problem with ClientContext.ExecuteQuery. It always fails with the “root element is missing” error. I’m not sure if this is due to the query not retrieving any data or something else relating to my environment.

I currently have my own SharePoint tenant with some initial sites and lists. I am the only user and administrator. Everything is still very simple. I have installed and imported (using PSGallery) the following modules to set my PS environment (and sessions). I think that I have identified everything that I need, but it’s certainly possible that I am missing something important.

   ModuleType Version    Name                                 ---------- -------    ----                                    Binary     16.0.90... Microsoft.Online.SharePoint.PowerShell    Manifest    Microsoft.PowerShell.Management       Manifest    Microsoft.PowerShell.Security        Manifest    Microsoft.PowerShell.Utility           Script     1.2        PSReadline                             Script     1.0.0      SharePointOnline.CSOM                 Binary     3.11.19... SharePointPnPPowerShellOnline        Script     2.1.6      SharePointSDK  

I am working in Windows 10 with PowerShell 5.1 (running as Administrator). Everything is still very simple, but I can’t get past the query execution to load the web context so I can start trying to do additional things.

I have found many online examples of PowerShell/CSOM to connect to sites and set context. I’ve tried them all (at least it seems like I have), but nothing has worked so far. I can’t find anything else to try or additional diagnostic steps to take. So I would welcome any suggestions at this point.

Here is a PS Session Log of one of my test runs with the error message at the end …

PS C:>$  LibPath = "C:\Program Files\WindowsPowerShell\Modules\SharePointOnline.CSOM.0.0" PS C:>[System.Reflection.Assembly]::LoadFile("$  LibPath\Microsoft.SharePoint.Client.dll") GAC    Version        Location ---    -------        -------- False  v4.0.30319     C:\Program Files\WindowsPowerShell\Modules\SharePointOnline.CSOM.0.0\Microsoft.SharePoint.Cl...  PS C:>[System.Reflection.Assembly]::LoadFile("$  LibPath\Microsoft.SharePoint.Client.Runtime.dll") GAC    Version        Location ---    -------        -------- False  v4.0.30319     C:\Program Files\WindowsPowerShell\Modules\SharePointOnline.CSOM.0.0\Microsoft.SharePoint.Cl...  PS C:>[System.Reflection.Assembly]::LoadFile("$  LibPath\Microsoft.SharePoint.Client.UserProfiles.dll") GAC    Version        Location ---    -------        -------- False  v4.0.30319     C:\Program Files\WindowsPowerShell\Modules\SharePointOnline.CSOM.0.0\Microsoft.SharePoint.Cl...  PS C:> PS C:># try simple connection test PS C:>Write-Host "Start connection test ..." Start connection test ...  PS C:> PS C:>$  UserName = "xxxxxxx@xxxxxx.onmicrosoft.com" PS C:>$  SiteUrl = "https://xxxxxx.sharepoint.com/sites/Testing" PS C:>$  ctx = New-Object Microsoft.SharePoint.Client.ClientContext($  SiteUrl) PS C:> PS C:>$  pwd = Read-Host -Prompt "Enter password" -AsSecureString Enter password: ********** PS C:>$  securePwd = ConvertTo-SecureString $  pwd -AsPlainText -Force PS C:> PS C:>$  Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($  UserName, $  securePwd) PS C:> PS C:>$  ctx.credentials = $  Cred PS C:>if (!$  ctx.ServerOjectIsNull.Value) {     Write-Host "Connected to $  SiteUrl" -ForegroundColor Green } Connected to https://xxxxxx.sharepoint.com/sites/Testing  PS C:> PS C:>$  web = $  ctx.Web PS C:>Write-Host "Context is $  ctx" Context is Microsoft.SharePoint.Client.ClientContext  PS C:>Write-Host "Web is $  web" Web is Microsoft.SharePoint.Client.Web  PS C:>$  ctx.Load($  web) PS C:>$  ctx.ExecuteQuery()  **Exception calling "ExecuteQuery" with "0" argument(s): "Root element is missing." At line:1 char:1 + $  ctx.ExecuteQuery() + ~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException     + FullyQualifiedErrorId : XmlException** 

Hierarchical list for selecting an element

The user is trying to select an element which will be used in a form. So it could be like selecting interests in an app where you can pick the more general case (e.g. sports) or the more specific (e.g. baseball).

I have hierarchical data where:
* Exactly one node may be selected.
* Users can select nodes anywhere in the tree
* Leaf nodes must be selectable
* Parent nodes may be selectable. Selecting a parent node represents a selection of all of its leaf node descendants.
* Selectable parent nodes are uncommon.
* The depth of the data is deeper than can be readily shown on the screen all at once.

I am developing an interface for browsing this data. This data needs to be usable on both desktop and mobile interfaces on the web.

I am thinking of modeling an interface after what Apple does with hierarchical menus, like the one below. The differences in my case are primarily that:
* The items can have three states: selectable node, refinable node, and nodes with both capabilities. How do I make this look uncluttered?
* My design must operate reasonably on both desktop and mobile. How do I design the refinement signifier in an unobtrusive way that is clear even on desktop views.
* My lists have a lot of heterogenous content. This happens only rarely in Apple menus, like the shut down button in the second screenshot. How do I show heterogenous content without looking disjoint?
iOS settings menu

Notice the blue row at the bottom representing differing content.
iOS shut down screen

What I’ve been thinking of so far is similar to the Apple design. These next two screenshots show the top level of the hierarchy here, and…
Top level of hierarchy

…the screen after food is selected.
Refinement of hierarchy

I like the multi-screen approach to this design for my use case, so I am primarily looking for feedback on exactly what icons/buttons to put in, and how to separate out content. I’m particularly interested in examples on the web and high fidelity mock examples, but I’m open to lower fidelity feedback as well.

The one structural thing that I think could be changed is in the combination case where a parent node can also be selected. Conceptually I’ve illustrated it here:
Alternate design to combination case

I’d like to draw attention to the fact that this makes the rows less crowded, and seem more homogenous. But I’m not sure exactly how to design the current level selection mechanism. How could I clearly indicate that the current level can be selected? Relatedly, how do I indicate the situation where the current level can’t be selected?