mysql – What is the best way to create descriptive labels for tables and columns that have unique alphanumeric names?

I have a database of 1,050 tables with unique alphanumeric names like B02001, B07009, B20017F, each with columns named B02001_001, B02001_002, B02001_003, and so on. I’m trying to create a way to search for tables by their actual subjects and titles.

For instance if table B07009‘s subject is Educational Attainment and the columns B07009_001, B07009_002, B07009_003 are High School Diploma, Some College, Bachelor's Degree or Higher and so on, how can I create a way to search the database for tables matching “education” or “profession” or “commute time” and get the columns that I need? Some of the tables have over 100 columns with names that exceed 64 bytes which is why I can’t simply name the tables and columns with their descriptive names.

I’ve tried creating a table called labels but some tables have hundreds of columns (like the Professions table) and exceed the postgres row size limit of 8192 bytes. I’ve also considered storing the lables for every table and column in a json file and searching it with python before executing SQL statements. What is the best way to attack this problem?

Alphanumeric symbols in the data/app directory?

Why are the names of the applications replaced with alphanumeric characters in the data/app directory? I am seeing this when accessing the directory through an adb shell.

input fields – How to state valid characters are alphanumeric and ‘all keyboard symbols’?

I don’t think you need to overthink it too much, most users understand the concept of passwords these days.

I would suggest something simple like this can work:

A valid password can only contain letters, numbers and special characters.

I would suggest making “special characters” a hyperlink (as illustrated by the bold style above). This can either show a pop-up, or expand a panel, which lists all the valid characters.

This approach keeps the form simple and uncluttered and will satisfy the majority of your users, but it also allows for the “less knowledgeable” users to get the extra information they need with a simple click.

recovery – How can I prevent .txt files loading in binary, and recover the alphanumeric content of those that insist on doing so?

I’m using TED Notepad in Windows 10.

When I try to open some of the .txt files I’ve edited in the last few days, I receive the following message: “Warning: Loaded file is binary. Edit with care.” I click on OK, and the file is blank – though if I press Ctrl+A a paragraph of invisible characters is highlighted, its size roughly proportional to the length of the work (prose, not code) that I last saved. There is also a recovery file (suffix .txt~) following each of the affected .txt files in the directory, but this does not disappear after the file is saved and closed, as was formerly the case. Files I have not recently edited before today open as normal, but are affected by the second issue of recovery files persisting in their directory.

The files are on a new micro SDXC card. I edited some, possibly all, of these files in a USB-stick installation of Linux Mint Xfce that has problems of its own (it restores itself to ‘factory settings’ on reboot, with all settings lost). I’m now back on Windows, for the time being at least. TED Notepad’s encoding is set to UTF-8; I have not changed that or any other setting in a very long time.

I have tried:

  • Opening the files using other programs (in Windows Notepad, the file appears the same, as a paragraph of blank characters; in LibreOffice Writer, the file appears as a paragraph of hash/ pound/ # symbols).
  • Copying and pasting the invisible contents from TED Notepad into various new documents (yielding a paragraph of invisible characters in Windows Notepad and TED Notepad, and a single line of the same in LibreOffice Writer).
  • Inserting the SD card into another computer, with the same results.
  • Using online tools to attempt to recover my writing, including onlineutf8tools.com/convert-binary-to-utf8 (output remains blank).

I wonder

  1. why this (files loading as binary) is happening,
  2. whether the persistent recovery files have anything to do with it,
  3. if there is a way to prevent these behaviours from occurring, and
  4. if there is a way of rescuing my work from the blank files.

Thank you for any light you may be able to shed.

sharepoint online – InfoPath validation for Alphanumeric Characters and period

I have a Notes textbox in my InfoPath form which will contain multiple lines of text.

I wanted to add a validation so it can only contain Alphabets, Numbers and period .
No special characters like ! @ etc are allowed.

I tried

description does not pattern (A-Za-z)(( )(A-Za-z)) or

description does not pattern .d. or

description does not pattern . or

But it throws validation error when I type “please help 123.”

Please help!!!

Thanks

sort – How should sorting work when numeric is mixed with alpha-numeric

This question (and specially @Harrison Paine’s answer) had helped me on my project and I want to provide the (javascript) implementation of his answer for future reference. Here is the sorting function:

var win7sort = function(a, b) {
    var regex = /(^d)+|d+/g;

    // Split each filename into alphabetical and numeric parts
    var ar = a.match(regex);
    var br = b.match(regex);
    var localeCompare;

    // For each part in the two split names, perform the following comparison:
    for(var ia in ar) {
        for(var ib in br) {
            var ari = ar(ib);
            if(ari == undefined) {
                ari = "";
            }
            var bri = br(ib);
            if(bri == undefined) {
                bri = "";
            }

            // If both parts are strictly numeric, compare them as numbers 
            if(!isNaN(ari) && !isNaN(bri)) {
                localeCompare = ari.localeCompare(bri, {}, {
                    numeric: true
                });
            }
            else {
                localeCompare = ari.localeCompare(bri, {}, {
                    ignorePunctuation: true,
                    sensitivity: "base"
                });
            }
            if(localeCompare != 0) {
                // If you run out of parts, the name with the fewest parts comes first
                return localeCompare;
            }

            // If they're the same, move on to the next part
        }
    }
    return localeCompare;
};

And here is how to use it:

var list = ("1", "a", "z", "new folder 2", "new folder 03", "new folder 03-a",
    "new folder 039", "new folder 5", "new folder 41", "2", "21", "3", "41", "100");
var sortedList = list.sort(win7sort);

Product Codes in ERP: Alphanumeric vs Numeric

Background

I’m working through creating a structure for Items in a new ERP (Cloudsuite Industrial) that I’m implementing. For Items (which can be finished goods/products or raw materials), we currently have a three level hierarchical system of organization. I’m trying to determine the best/standard practice for mapping that information into Product Codes.

In CSI, Product Codes can be Alphanumeric along with a few special characters such as hyphen and underscore and have a 10 char max limit.

Simplified Example Structure:

Structure

  • ItemType 1
    • Division A
      • Category 1
      • Category 2
      • Category 3
    • Division B
  • ItemType 2
  • ItemType 3

Example

  • Finished Goods
  • Sub Assembles
  • Raw Materials

Initial Thoughts on Product Code Structure:

Structure

(ItemType) + HYPHEN + (Division) + HYPHEN + (Category)

Examples

FG-CR-SED (Finished Goods – Cars – Sedans)
FG-BT-Y (Finished Goods – Boats – Yachts

Concerns

When presenting this idea to higher-ups, the response was, “why not just do sequential numeric?” CSI provides a separate text field for description which is shown beside the product code. That will mean that if I have a code of “FG-CR-SED”, then on the page beside it, it’ll show another text box with “Finished Goods, Cars, Sedans”, so there is no real NEED for the code itself to be smart/human readable.

However, what I don’t see is an actual downside to using smart/human readable codes. Seems like it might be useful if the data is exported, because the code it part of the Item record itself, while the code’s description is a separate table.

I’d like to get some feedback on what other ERP users typically do for setup of this.

Thanks!

microsoft excel – Displaying country flags (from alphanumeric codes) in spreadsheet cells

Can I somehow trick Excel’s auto-formatting capabilities into displaying ISO 639 country codes (alpha-2 as in ccTLDs and emojis) as flags?

I don’t care much whether the code is still shown or becomes hidden then.

Unlike all other vendors, Microsoft does not render emoji regional indicator symbol sequences (RIS, U+1F1E6–FF) as national flag symbols, otherwise I would try to bump the charcode accordingly (depending on lowercase/uppercase). (Although I’m not sure whether or how that could work at all.)

Example: UN or un becomes 🇺🇳 (or some kind of graphic)

input fields – Forbid and deactivate alphanumeric keys in a form?

scenario: form validation

I ask myself the question: in a special input form for postcode for example, in which only numbers (integer) are allowed. In a usability view I would say, you should be allowed to input all keys (abcd, 1234), the logic should fit it in the background. Would you forbid and deactivate alphanumeric keys, that the user cannot put the wrong keys into the input field?
I think the user would be confused. What is your opinion?

The HTML-Input for numbers: no way. It is a desktop application on Windows.

Thank you!

Try to sort the text in groups to decrypt the alphanumeric codes (Python IDE 3)

I am using Python IDE 3. My goal is:
If I have a text string, "ABCDEFGHIJKL", I want to sort it into groups, like three groups ("ADGJ", "BEHK", "CFIL").
I need an entry for this, but the prompts do not appear and I cannot type in entry. Here is my code:

#data
code_text = input('Text: ').lower()
code_skip = int(input('Shift length: '))
code_list = ()
#function
def countSkip(text, shift, list):
    i = 0
    set = 1
    def iterate():
      if set <= shift:
        for e in text:
#make sure the set starts at the right place
          if e.index()+1 < set:
            pass
          elif shift != 0:
            if i = shift:
              list.append(e)
              i = 0
            i += 1
          else:
            list.append(e)
          set += 1
    iterate()
#calling function    
countSkip(code_text, code_shift, code_list)