Design: managing common database entries for different users


We have a requirement that presents certain items for users that they can add to their shopping cart. There are common elements among users, but users can add / edit common choice names.

For example:

  • Common elements are: apple, banana
  • User 1: Mango
  • User 2: Papaya

When the database receives queries, User1 must have Apple, Banana, Mango, and User2 should have Apple, Banana, Papaya.

But User2 can also edit "Banana" so that the title becomes "Plaintain". So for User2, "Plaintain" would be returned but for User1, the word "Banana" is still used.

Approaches envisaged up to now

We have considered two models for this:

  1. Create two tables, TableCommonChoices and TableUserChoices. TableCommonChoices contains "common" choices while TableUserChoices contains each entry in TableCommonChoices with assigned UserId for a specific user.

    When creating a new user, the database will create individual entries for the new user based on the entries of TableCommonChoices. In this way, users each have examples of common choices that can be edited and also add their own choices.

    A concern here is whether a new common choice is added in the first array. It presents additional complexity when adding new common choices for each user in the other table. Ditto for the update, delete.

  2. Will always have two tables, TableCommonChoices and TableUserChoices. But the second table will be used to store "Delta" changes in current choices and new entries.

    When creating a new user, nothing is created in TableUserChoices. Once the user changes a common choice, it's the only time an entry is TableUserChoices will be created containing the & # 39; delta & # 39; and the reference identifier of the modified choice.

    When a new common choice is added, it is only once, because the database will always look at the TableCommonChoices as common for all users.


  • What is the best design for this requirement?
  • And, is there a term for the second reason?

javascript – Changeable entries in React that can be swapped by a button

Part of my page involves entering numbers and allowing them to be editable and exchangeable. Calculations are performed on numbers, so they should only be calculated when the inputs are fuzzy. The values ​​of the boxes must be updated when the values ​​are exchanged. However, they must also be modifiable. I am a newcomer to React, so it's the best I could find, but it's very clumsy and repetitive. I would really appreciate any advice on style and efficiency.

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';

class Calculator extends React.Component {
  constructor(props) {

    this.state = {
      num1: null,
      num2: null,
      box1: null,
      box2: null,

    this.handleNumChange = this.handleNumChange.bind(this);
    this.handleNumInput = this.handleNumInput.bind(this);
    this.handleSwap = this.handleSwap.bind(this);

  handleNumChange = (event, key) => {

  handleNumInput = (event, box) => {

  handleSwap = (event) => {
      num1: this.state.num2,
      num2: this.state.num1,
      box1: this.state.num2,
      box2: this.state.num1,

  render() {
    return (
); }; } function NumberBox(props) { return (
) } function NumberPrompt(props) { return ( ); } function SwapButton(props) { return ( ); } function Output(props) { return (
{`Number 1 is ${props.num1} and Number 2 is ${props.num2}`}
); } // ==================================================== ReactDOM.render( , document.getElementById('root') );

Edit: I realized that I had NumberPrompt's like id instead of class. I have corrected this in my code.

sharepoint online – How to use JSON column formatting to highlight duplicate entries in a list of columns?

The formatting of columns is used in SharePoint Online to customize the way fields are displayed in lists. Microsoft provides documentation on the use of JSON for formatting columns.

As described in the documentation, it works well for basic things such as adding a class based on the name of the current file. field. For example:

  "attributes": {
    "class": "=if(@currentField == 'Done', 'sp-field-severity--good', if(@currentField == 'In progress', 'sp-field-severity--low', if(@currentField == 'In review', 'sp-field-severity--warning', if(@currentField == 'Has issues', 'sp-field-severity--severeWarning', 'sp-field-severity--blocked')))) + ' ms-fontColor-neutralSecondary'"

The final result being:

Column format on the status of a column

However, is there a way to check the values ​​in the column and apply a class or color to duplicate entries in this column?

For example, if there is a column named participants. A list entry has value, Smith, John. If another entry is created and Smith, John is added again, these two values ​​would be highlighted or have a class applied.

html – The width of some different entries with a general entry class applies to all

Hello, I have the next course that applies to all DOM entries

  background: #ffffff;
  color: #000000;
  margin-left: 5px;
  margin-top: 0px;
  margin-bottom: 5px;
  border-radius: 4px;
  box-sizing: border-box;
  transition: .5s ease;
  border: 2px solid #000000;
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
  background: #ffffff;
  color: #000000;
  padding-left: 30px;
  background: #ffffff;
  -webkit-box-shadow: 0 2px 2px 0 rgba(90,90,90,0.2) inset;
  box-shadow: 0 2px 2px 0 rgba(90,90,90,0.2) inset;
  border-radius: 4px;
  border: 2px solid black;
  padding-left: 25px;
  /*background: rgba(255,253,232,1);*/

I would like to put some entries with a width of 50px because short values ​​will be entered, which resemble those of the class but not so wide, I tried to put the attribute witdh = "50" thinking that I would have a preference, but she does not take it. it is as if the class mentioned had more prevalence on this attribute, it is possible that at these few entries, I take all the class but with a width of 50px?

magento2 – How to add class entries focused on order forms and product evaluation?

If an entry is active or has a value, I want to add a class to all parent .field div entries. For example, on the review form of the product page or on the shipping form of the payment page. If the entry is active, I would add an "active" class and if the entry has a value, I would add the "hasavalue" class.

When I try to use jQuery, nothing happens on the product page revision form entries or on the payment page entries.

Here is the jQuery that I use:



    $('.field input').focus(function () {
    }).blur(function () {

    $('.field input').blur(function(){

        if ( $(this).val() ) {
        } else{



Should I use KO? If so, how can I translate this simple query so that it works with all entries in Magento?

forms – Split the credit card number fields into four different entries

I would always always prefer the simplest solution. In that case, a single field to be entered by the user.

With split fields, such as the 4-cell box that you offer, this adds an extra cognitive load to the user.

  • "Do I have to manually access each field?"
  • "Will the system do it for me?"
  • "And if I hit tab myself, but the form has automatically jumped – will it have jumped into the 3rd field instead …? "

All these additional questions – perhaps unconsciously, perhaps more avant-garde in their minds – are not questions that would even be considered in a single field.

Of course, the 4-field options make it easier to read – so if the user enters a wrong number, it will be easier for him to reread his entry to see which area he has misled. But this can be further mitigated in a single field. As you have shown above, you can make user input with spaces in the single field.

Another consideration is mobile users. While this may be simple on a desktop computer, a mobile has a keyboard to be able to open and close at the field's entrance. Different devices and operating systems behave differently, but it is very likely that the keypad will auto-close and automatically open from field 1 to field 2, which will cause a flashing flash to flash. Screen, the user can optionally click on the fifth digit when the keyboard closes. , thus moving the cursor to another area of ​​the screen or simply missing that digit of the entry.

The mobile problem is well illustrated on the Baymard blog, where they also point out that mobile users tend to manually tap into each field – which desktop users do less often.

Your proposal is a good idea, but I think it falls into the category of "over-engineering". Unless you notice important input errors on a single field, I do not think you need to introduce an alternative. You could risk decreasing the ease of use instead of improving it.

Data compilation and copy-and-paste entries for $ 10

I am looking for a data entry job for a long term hiring and I hope the best customer who hire me long term as data entry agent

by: Imranghaffar91
Created: –
Category: Data Entry
Viewed: 183


Sensitive table with many text entries

I have a table of this type:

So, I have to make it responsive, of course on mobile devices.
Several opinions on the table:
1) Yes, there certainly should be some tips for each text field, it's very important. "Tips" – maybe those labels in the header or something that describes the entries ("Card Number", "Chip Number");
2) Yes, the "Save" button should be in front of each row, it is necessary;
3) This icon on the left side also has a destiny – it may be visible for some lines and invisible to others;

Of course, the first thing that came to my mind was something like an accordion with this content resembling: enter the description of the image here
But if there are a lot of lines (the average number should be like 20), that's fine
have a hard time clicking for each of them to collapse and then save. So I'm asking for help to make this table responsive

validation – C # console application better or more efficient to validate entries

As you suggested, you have a lot of redundant code. And rightly, you want to adhere to the DRY principle.

All of these input methods have the same model internally.

static void Main(string() args)


Dry road

..ideally you would like to be able to call them like this:

static void Main(string() args)
    var weight = AskInteger("Enter weight of parcel: ");
    var height = AskInteger("Enter height of parcel: ");
    var width = AskInteger("Enter width of parcel: ");
    var depth = AskInteger("Enter depth of parcel: ");

    Console.WriteLine("press any key to terminate the application..");

Advanced Road to SEC

Or if you want to provide a complex object Request with 4 properties and a lambda to provide both a message to the user as a definition expression to materialize the query

static void Main(string() args)
    var request = new Request();
    AskInteger(request, x => x.Weight);
    AskInteger(request, x => x.Height);
    AskInteger(request, x => x.Width);
    AskInteger(request, x => x.Depth);

    Console.WriteLine("press any key to terminate the application..");

How would you implement AskInteger is a challenge that I leave you.


  • Do not pollute your code with non-value added regions. #region User Weight Input Validation
  • Try to avoid comments without meaning _isInvalidInput = true;//reset value to true

How to structure an array of entries in

I implements financial information schemas (with the help of JSON-LD), in this case, mortgage loans.

The example below at shows how to implement it for a specific loan, but I'm not quite sure how to modify the chart when I'm Have several mortgages, each with a different loan. and interestRate. Do I just have to repeat this whole block for each loan? Or can I nest each mortgage under this type @?

The information I want to convey is that a loan can have different loan terms, which will have different interest rates.

I could place the different rates and terms as nested objects under each label, but it seems there is no relation between the two.

How should I do this? This is a code example of what I have.