Hash table with $n(1+\epsilon)$ space using power of $d$ choices and cuckoo hashing

I’m trying to construct a hash table in which we store $ n$ items using $ n(1+\epsilon)$ space. Lookups should be worst case $ O(1)$ and insertion/deletion should be $ O(1)$ in expectation.

Thoughts: The idea is to have a main table that is size $ n$ . We use the power of $ d$ choices to find a cell for a given item. Let the max capacity per cell in the main table be a constant $ c$ . We hash the item with $ d$ different hash functions and place the item in the cell with the most room. If that fails (that is, no cells have room), we move the item to an overflow table that is size $ n\epsilon$ for $ 0 < \epsilon < 1$ . The overflow table will use Cuckoo hashing. I need to find a $ d$ and $ c$ for which this works.

Cuckoo hashing works well when the load factor is under $ 1/2$ . That means with $ n\epsilon$ space, we should never move more than $ \frac{n\epsilon}{2}$ items from the main table into the overflow table. We need to pick $ d$ such that the number of collisions greater than $ c$ is at most $ \frac{n\epsilon}{2}$ .

I’m not sure where to go from here (or if I’m on the right track). Any help is appreciated.

How to show list of available choices on a sharepoint form

I have a simple sharepoint form added called ‘laptop borrowing request’ which has employee name, date and laptop as fields. Laptop is a choice column: surface, thinkad and laptop. There are only three devices physically present at client.

Now the following seems difficult to implement for me: 1. Let’s say if couple of users have put in request and they have acquired possession of thinkpad and laptop ,so only surface is available to request.

If the next person puts in a request for thinkpad, how do I show that its not available or restrict to put in a request for thinkpad.

Please share thoughts if any, thanks. I am working SP online modern.

Getting choices from choice field in Online using JSOM

I am trying to get all of the choices from a choice site column in SharePoint online. Using the following code I get to the success method but it errors out saying ‘field’ is undefined. I don’t understand why this doesn’t work because I have defined field in the fields() method

hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl")); appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));      function fields() {         var context = new SP.ClientContext(appweburl);         var factory = new SP.ProxyWebRequestExecutorFactory(appweburl);         context.set_webRequestExecutorFactory(factory);          var appContextSite = new SP.AppContextSite(context, hostweburl);         var web = appContextSite.get_web();         context.load(web);          var siteColumns = web.get_fields();         var field = context.castTo(siteColumns.getByInternalNameOrTitle('InternalFieldName'), SP.FieldChoice);          context.load(field);         context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod), Function.createDelegate(this, this.onFailureMethod));     }      function onSuccessMethod(sender, args) {         var choices = field.get_choices();         alert("Choices: (" + choices.length + ") - " + choices.join(", "));     }      function onFailureMethod(sender, args) {         alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());     } 

Unable to edit a Choice field with Checkboxes and fill-in choices

I’m a fairly novice SP user, however I’ve run into an issue. I’ve created a list, and one of the columns is a ‘Choice’ with checkboxes so users can select multiple items. When I set the ‘Allow fill-in choices’ to No, everything works well. However, when I set it to Yes, all of a sudden that field becomes uneditable. When I go to create a new item, it works fine. However, if I try to edit the list directly, there’s no drop down and no way to edit that field.

What it looks like with 'Allow fill in' set to No When it's set to Yes[![The 'New Item' works well]3

‘New Item’ works fine’

Not working

This is what it looks like when I’m trying to edit this field on the list.

Web application and persistence choices

Right now we have a highly analytical system which collects tons of various metrics. We need to display this data in a web ui for users to consume.

Since we are in early stages of development we are throwing all data into google bigquery, when a users visits the app we run a cloud function to request the data from bigquery, and store/cache it in firebase.

When a user visits the same route for the same view we will show them the data from firebase (old data) whilst we fetch any updated results from bigquery.

The data itself is similar to web event logs for the most part, but some of it is more complex, and we are storing it as a json string in bigquery.

It feels like a complex and hard to maintain setup for a small team, as we are still building the MVP and keep iterating on the views presented to the user. My question is how to simplify our database choices, to have to maintain less DBs, but still have flexibility around changing the final views and an acceptable level of latency for queries <2secs.

Possible ways to show some multilevel choices for a multiplatform application

I have an application running on 3 platforms: Windows, Android, Linux. While the native part is practically the same, the UI part is obviously different – WPF on Windows, xml/layout based UI on Android and Swing on Linux.

On all platforms, the application’s main window has a drop-down menu with 7 items. Now, some new features were added, and each of these 7 items will have 2 to 6 subitems to select from.

I am trying to find a solution that would be

  • user-friendly
  • suitable for small screens (phones)
  • more or less visually similar on all platforms

The obvious solution would be to use submenus, however, there are 2 problems: 1. When a user is going to select another option, they should see the currently selected option. 2. Submenus don’t work well on touch screens, and roughly 50% of our users are using the app on phones.

So far I haven’t come with a solution that answers all 3 criteria.

What are the current choices for framework/toolset/libraries aiding implementation of custom animated UI for Android or Raspberry PI?

I want to help my son doing home automation and we fancy to have a dedicated wall-fastened touch screen that will control our home, that would sport an animated GUI (Star Trek-themed 😉 )

I can either buy a decent LCD display and connect it to the Raspberry PI, or simply glue a cheap Android tablet.

I am a data scientist and the last time I have implemented a UI was 20 years ago on Windows 95 ;-). The only general-purpose languages I feel comfortable are C++ and Python, but I am also open to others.

I ask to because I want to know my options. Googling revealed only non-free QT Design Studio, and I doubt it is the only solution in the industry.