How to model multiple types of contacts?

I’m not sure if this can be called a polymorphic association – what is needed is to for each Message to have a Sender Contact and a Recipient Contact. Both Sender Contact and Recipient Contact could be one of 2+ types. Currently SMS and Email are supported but more may come.

I have this urge to eliminate a possible duplication that would appear in case of having two different tables – sender_contacts and recipient_contacts. Also type column is a kinda of a DB-modeling smell. But I’m not a DB modelling expert and rather looking for an advise from an experts how to properly model those relationships.

Any input is appreciated.

Thanks.

I will provide any types of Data Entry work. for $10

I am proficient Data Entry Freelancer, I have many years of experience in data entry work. I can complete any complex data entry task as per your instruction. So, you need not worry as I am here to take your burden and make you pleased. Please provide me any type of task related to my services. I will complete it with 100% Accuracy, As per your requirement and the time you will specify. My Services:-Image/PDF to MSExcel or MSWord. Fillable PDF Form. Google Document and Spreadsheet Data Entry. Sales or Purchase Order entry in Excel. Make CSV and KDP File. Information from Web to Word or Excel.Online and Offline Typing Work.HTML Code Writing. Internet Research. File Conversions. Product Data Posting. And Many More. You Will Get (((Fast Delivery/ Confidential/ Responsibility/ Reasonable Price/ Unlimited Revisions))) Please message me for your project details. I will give a supportive response within a few munites.100% Refund if you are not satisfied with my work. Your Freelancer Forever

by: sasankanayak
Created: —
Category: Data Entry
Viewed: 252


Why does content types on sites/libraries contains old document templates?

We are using SharePoint 2013 and have setup a Content Type Hub where we publish content types with attached document templates.

When republishing content types with document templates on them, we started have problems with content databases size growing drastically.

Content database was 400 GB and grew to 800 GB and 2 days later 1400 GB, which of course was alarming.

After some digging we found that by manually republishing the same content type a couple of times, had made one of the content types document templates on all sites to be placed in the recycle bin. When checking one of the libraries that inherited the content type and looking into the forms folder, we found that that content type had 18 document templates attached to it, but only one active, the latest one.

A couple of thousand sub-sites, and the content type had 18 document templates in the sub-sites document libraries forms folder. Which meant that 700.000 document templates was placed in the site collection recycle bin.

The question is now. Why is old inactive document templates saved in published content types? And is it safe to remove them from the CTH _CTS folder before we republish the CT next time, as they are no longer in use by the content type, and can’t be reverted to. Is there a reason why they are keeping old document templates attached to content types?

Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?

Hi guys I am trying to create a Custom Premium wordpress theme for a Travel Agency. I am thinking of finishing the theme and submitting it for review.

I want this theme to be really useful so I ended up creating some Custom post Types (CPT) like :

  • Organized Trip : with custom fields(CF) like : Hotel name, Trip Duration,Type of reservation,… .

I honestly agree with those who say for a better code these CPT & CF belong into a Plugin something like Organized Trip Plugin .

So should I :

  1. Make this a separate plugin and pack it into the wordpress theme in a bundle way with TGM Plugin Activation.

Or

  1. write down these Custom post types into the wordpress theme files and include them in the functions.php – Theme Setup.

Which one do you think is the best Way to do this?

Normalising a table with multiple column types and keys

I have a table item in which different columns are filled depending on the template type of item that it is e.g.

|item_id|template_id|brand|model|heading|usp_1|usp_2|icon_1_asset_id|icon_2_asset_id| |-------|-----------|-----|-----|-------|-----|-----|---------------|---------------| | 1     | 1         | ABC | xyz |       | ddd |     | 1             | 2             | | 2     | 1         | ABC | xyy |       | eee |     | 3             | 4             | | 3     | 2         | BCD | ghj | opqrs |     |     | 2             |               | | 4     | 3         | FGH | stu |       | jjj | kkk |               |               | 

In reality, it has about 40 columns. template_id has a foreign key to the template table, icon_1_asset_id and icon_2_asset_id both have foreign keys to the asset table. The columns filled depend on the template_id, in this example:

  • All items have a template_id, brand, model.
  • template_id = 1 items have usp_1, icon_1_asset_id, icon_2_asset_id
  • template_id = 2 items have heading, icon_1_asset_id
  • template_id = 1 items have usp_1, usp_2

As you can see, there is a large amount of wasted space of cells that will never hold data.

I have considered altering the structure to:

Table item

|item_id|template_id| |-------|-----------| | 1     | 1         | | 2     | 1         | | 3     | 2         | | 4     | 3         | 

Table property_type

|property_type_id| description     | |----------------|-----------------| | 1              | brand           | | 2              | model           | | 3              | heading         | | 4              | usp_1           | | 5              | usp_2           | | 6              | icon_1_asset_id | | 7              | icon_2_asset_id | 

Table template_property_type

|template_id|property_type_id| |-----------|----------------| | 1         | 1              | | 1         | 2              | | 1         | 4              | | 1         | 6              | | 1         | 7              | | 2         | 1              | | 2         | 2              | | 2         | 3              | | 2         | 6              | | 3         | 1              | | 3         | 2              | | 3         | 4              | | 3         | 5              |  

Table item_property

|item_property_id|item_id|property_type_id| value | |----------------|-------|----------------|-------| | 1              | 1     | 1              | ABC   | | 2              | 1     | 2              | xyz   | | 3              | 1     | 4              | ddd   | | 4              | 1     | 6              | 1     | | 5              | 1     | 7              | 2     | | 6              | 2     | 1              | ABC   | | 7              | 2     | 2              | xyy   | | 8              | 2     | 4              | eee   | | 9              | 2     | 6              | 3     | | 10             | 2     | 7              | 4     | | 11             | 3     | 1              | BCD   | | 12             | 3     | 2              | ghj   | | 13             | 3     | 3              | opqrs | | 14             | 3     | 6              | 2     | | 15             | 4     | 1              | FGH   | | 16             | 4     | 2              | stu   | | 17             | 4     | 4              | jjj   | | 18             | 4     | 5              | kkk   | 

Although this gives more efficient storage and an amount of database-level control over which properties can be filled, you loose the foreign key constraint on the property value due to the fact that some properties are linking to another table and some are plain text.

Is there a way to put some database-level constraint on the value column – possibly by breaking it out onto another table, or re-working the structure?

Or is there a completely different way to approach this type of data?

I’m using MSSQL, although the fundamental problem is not tied to any specific relational database.

Common Encryption types with keys stored in Base64

I am a noob 🙂

I am attempting to recover a password from a piece of software. The software has a XML file contains three fields that appear important to this process: Password Value, EncryptionKey Value, and PasswordEncoding Value. PasswordEncoding Value is set to 12000 (in case that helps).

The other two fields appear to be base64 strings that, when decoded, seem to be nonprintable characters.

I want to use Python to try to find the type of enc used in hopes of decrypting the Password Value field. What are common types of Encryption that would store data in base64 in a xml file? This is from a Windows app.

Thank you

I will do all types of Data Entry Jobs for $10

I am offering the following services, I love my work and do it with honesty and devotion. Data Entry (All type)PDF to word / Excel Scanned Images to excel/WordBusiness Cards to excel Product listing(wordpress, shopify, magento etc) Data Mining Data Scraping Data Conversion Photoshop Work Manually Typing Work PowerPoint Presentation Contact details search Google spreadsheet Bank Statements to Excel Property data collection LinkedIn data collection Web Research Admin Support, Customer Support, Chat Support, Email Support. All kind of Virtual Assistant, Data Entry Jobs

by: salmanrafiq86
Created: —
Category: Content & Writing
Viewed: 31


Taking levels in monster types

Today I found this post on reddit and in one of the comments they mention taking levels in fey, outsider, and aberration (not all at the same time). Are there any alternate rules I’m not aware of or are they just referring to monsters as pcs rules from the srd.

Heres the OP

Over the past few days with some help from members of the /r/touhou Skype group, I have made a spreadsheet listing (almost) every Touhou character and have filled in some slots slots along their names accounting for their D&D Morality Alignment, Four Temperaments, MBTI, and other silly things that aren’t as relevant.

Chart (not very complete): https://docs.google.com/spreadsheets/d/18l9L-jEret6eKSXMA-51nC9jwPYfAODp3ogKUgXiyZo/edit?usp=sharing

D&D Alignments explained: https://en.wikipedia.org/wiki/Alignment_(Dungeons_%26_Dragons)

Four Temperaments explained: https://en.wikipedia.org/wiki/Four_temperaments

MBTI is harder to grasp, especially the cognitive functions but there are more than enough online resources detailing that.

Enneagram explained: https://en.wikipedia.org/wiki/Enneagram_of_Personality

If there is anything that should be put in or whatnot, please leave your thoughts on characters and also your alignment/MBTI/other if you like.

EDIT: If I like a suggestion and want to add it, I’ll do so in the name of the user who suggested it. You can also leave comments on the sheet as well.

Here’s an excerpt

Now, let’s see. You’ve given D&D (presumably 3.5e rather than 4e or 5e) classes and Pathfinder classes as a category. I can definitely help with that. Going down the line:

Rumia probably doesn’t have class levels, but she’d be a Commoner or just take levels of Outsider(Edit: Or Aberration, depending on how you see Youkai) if she did.

Letty Whiterock is probably just a Fey.

Kogasa Tatara is just an Aberration with Aberration levels.