Xubuntu setup not allowing to create an extended partition, limits to four total, no matter if primary or logical

I have just been installing Xubuntu on my netbook and after I have let the setup wipe the disk and install it by itself out of laziness. It was half into the setup that I noticed I haven’t seen it create a swap partition in the confirmation dialog, so I have let it complete and then restarted it to manually partition it.

After reading a bit more on the matter itself before doing random things, I have come to the knowledge to place the swap partition at the beginning of the drive so it can be accessed fast and also to place /boot within the first 100 GB of the drive so the BIOS can find and boot from it. I also read more about the importance and advantages of partitions in general and decided to create a few more than just swap, /boot and /.

So halfway into it, having created swap first as logical partition, /boot second as primary partition and / as well as /var as logical partition, the setup refused to create more, stating it was not possible for me to create more than four primary partitions.

Now this was the moment when confusion hit me like a train as I have already read before about that (which is why I have had selected logical for anything but /boot in the first place), because I have only created a single primary partition and not four as the setup stated.

During my research I found that the solution for creating more than four was to use extended partitions but the setup (as opposed to gparted) did not even give me the option to select anything but primary and logical, whereas it obviously didn’t even care what I selected and created only primaries.

I messed around a bit with it and was able to create tons of small logical partitions in a row, but as soon as I have applied the above mentioned configuration, it was over.

So, does the order of the logical and primary partitions matter? If yes, how am I supposed to adhere to “place swap at the beginning of the drive” and “keep your /boot within the first 100GB of the drive” and have more than just two more additional partitions?

Page jumps and separate pages in primary navigation

We’re working on a website and I was wondering what the best practice for this scenario is. We are designing a website for our company and we aren’t too sure if it’s good practice to link to separate pages as well as linking to page jumps in the same menu.

I have a feeling that it will more than likely confuse the user that they might be going to a different page or to certain points on the same page. Has anyone else had any experience doing this?

Using UNIQUE (col1, col2) or using a composite primary key for a relation table in SQLite/SQL?

i’m working on a project where i’m using SQLite and where i have a few relation tables looking similar to this one:

CREATE TABLE tag_entry_relation ( id INTEGER PRIMARY KEY, tag_id INTEGER REFERENCES tag(id), entry_id INTEGER REFERENCES entry(id) ); 

I know that the two “referencing” columns will together be unique (so there will be no duplicates).

I’m considering whether to use the UNIQUE constraint or if it’s better to use a composite primary key

The reason i see for using a composite primary key is simply that it requires one column less than the other option

I don’t see a reason for using a UNIQUE constraint except that i’m more used to this than using a composite primary key, so i’m worried i might be missing something

What would you recommend? Grateful for help!

PS: As far as i can tell there’s no difference between SQL and SQLite in regards to this question

Does 5e follow the Primary Source rule?

In D&D 3.5, there exists a hierarchy of sources as a rules concept so that if something in one text contradicts a passage in another one of the sources may officially take precedence. An important benefit of this often lampooned publication paradigm is that the Core Rules– the PHB, MM, and DMG– overrule any other source that contradicts them except errata and, as a result, owning the core rules lets you know how everything in those rulebooks works; you don’t have to get any more books to find out e.g. how falling ‘actually’ works, because the rules presented in the Core set aren’t changed by anything except freely-available errata documents, at least in theory. While other books may present optional rules or new rule systems, they can’t add new rules that change, even slightly, how the old ones work and so you can be confident, if you have the core set, that you aren’t ‘missing anything’.

Of course, Wizards then did publish content (e.g. the FAQ or Rules Compendium) that wasn’t a errata and yet tried to change how things worked and that didn’t work out so good. But I digress.

In 5th edition, I’m not sure what the conflict resolution structure is supposed to be, or if there even is one. I know that most systems use a ‘the most recently printed thing is right’ rule, often without even codifying it, and I have a suspiscion that 5e’s actual resolution scheme is that the official rules aren’t intended to be coherent and sorting that out is the DM’s job, but I’m not sure if there’re any actual printed statement/rules about how this works somewhere.

Does 5e have any publication primacy rules similar to 3.5’s Primary Source rules and, if not, what does it have instead?

Does 5e follow the Primary Source rule?

In D&D 3.5, there exists a hierarchy of sources as a rules concept so that if something in one text contradicts a passage in another one of the sources may officially take precedence. An important benefit of this often lampooned publication paradigm is that the Core Rules– the PHB, MM, and DMG– overrule any other source that contradicts them except errata and, as a result, owning the core rules lets you know how everything in those rulebooks works; you don’t have to get any more books to find out e.g. how falling ‘actually’ works, because the rules presented in the Core set aren’t changed by anything except freely-available errata documents, at least in theory. While other books may present optional rules or new rule systems, they can’t add new rules that change, even slightly, how the old ones work and so you can be confident, if you have the core set, that you aren’t ‘missing anything’.

Of course, Wizards then did publish content (e.g. the FAQ or Rules Compendium) that wasn’t a errata and yet tried to change how things worked and that didn’t work out so good. But I digress.

In 5th edition, I’m not sure what the conflict resolution structure is supposed to be, or if there even is one. I know that most systems use a ‘the most recently printed thing is right’ rule, often without even codifying it, and I have a suspiscion that 5e’s actual resolution scheme is that the official rules aren’t intended to be coherent and sorting that out is the DM’s job, but I’m not sure if there’re any actual printed statement/rules about how this works somewhere.

Does 5e have any publication primacy rules similar to 3.5’s Primary Source rules and, if not, what does it have instead?

Raising attention for primary button in competition to the header

I am searching for some help with our primary color. We are using blue as the primary color and placed it into the header to support the brand’s identity.

On the other hand, blue is also our primary button color. The placing of our CTAs was easy, till today.

With our list view, I tend to place it directly under the header. The problem: the focus gets lost because the attention for the button is less effective through the immense use by the header.

Do you know how to replace the button or change the style to make it more attractive?

Placing it to the bottom right should be the last solution because we reserved the corner bottom right for a chat/support button.

Thank you together 🙂

Example of the primary color problem

Received all dependent UK visas but not the primary visa

What could lead to dependents receiving their entry visas before the primary applicant? Main question: Is it true that my application has to be successful before they would issue dependent visas?

I applied from the U.S. for a tier 4 student visa for a PhD program in the UK. What makes my application somewhat unique, perhaps, is that I have 5 dependents coming with me (spouse and 4 children).

I have now received the 5 successful dependent visas via UPS, but mine (the primary or sponsoring visa) has not even shipped yet. I have the return label tracking numbers for all of the 2nd Day Air UPS packages. 5 are delivered (obviously, I have them in hand) but mine has not even been picked up by UPS yet.

How can I move the character to the center of the screen when the user clicks with the primary mouse button?

I am a newbie at this and I’m just trying to learn how to do different things. I am wanting to move a character sprite in a horizontal line, toward the center of the screen when the primary mouse button is detected and then it moves back to the edge of the screen when no input is detected. Any help would be greatly appreciated.

Design Review: Randomly generated primary keys in database


Problem:

In my web application entities have unique IDs, and for some type of entities(e.g. user, order etc.), the IDs are visible to users via URLs. MySQL is used for storing the entities.

Using auto increment integer as primary key is simple and convenient, but if it’s exposed in URL, people are able to estimate the entity amount or increasing rate by observing the IDs(German Tank Problem), and we might want to avoid that.

Having read a lot of posts on the topic, I’m aware of several approaches to mitigate the information disclose, e.g. generate random IDs by the app, using UUIDs, encode/hash last insert ID etc.

But finally I’ve come up with my approach.

Design

Firstly, generate a list of unique integers, and preload them into the database.

Since I’m not going to have billions of records, I could make a large sequential list and shuffle it in memory.

table to store the integers would be:

CREATE TABLE IF NOT EXISTS entity1_id (     id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,     entity_id INT UNSIGNED NOT NULL UNIQUE ); 

The entity_id column is assigned the integer value.

Secondly, prepare the entity table and a counter table:

CREATE TABLE IF NOT EXISTS entity1 (     id INT UNSIGNED PRIMARY KEY,     create_time DATETIME DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB;  CREATE TABLE IF NOT EXISTS id_counter (     entity_name CHAR(30)  PRIMARY KEY,     counter INT NOT NULL DEFAULT 1 );  INSERT INTO id_counter (entity_name) VALUES ('entity1'); 

Finally, use a “BEFORE INSERT” trigger to fetch a ID from the entity1_id table, and increment the ID counter.

The counter is used to keep track of used IDs in the entity1_id table. Think of entity1_id as a map, entity1_id[counter] gives next entity ID.

Here is the trigger:

DELIMITER |  CREATE TRIGGER entity1_idgen BEFORE INSERT ON entity1 FOR EACH ROW BEGIN     DECLARE cnt, eid INT UNSIGNED;      IF (NEW.id IS NULL) THEN         SET cnt = (SELECT counter FROM id_counter WHERE entity_name='entity1' FOR UPDATE);          SET eid = (SELECT entity_id FROM entity1_id WHERE id=cnt);         IF (eid IS NULL) THEN             SET @errMsg = CONCAT("table `entity1_id` doesn't have row where id=", cnt);             SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT=@errMsg;         END IF;          SET NEW.id = eid;         UPDATE id_counter SET counter=counter+1 WHERE entity_name='entity1';     END IF; END|  DELIMITER ; 

I’ve briefly tested this approach, when inserting into the entity1 table, if id is not specified, an ID is taken from the entity1_id table; if a ID is specified, it would be used, and entity1_id and id_counter is not visited; if id is not specified and there’re no enough IDs in entity1_id, the error is reported.

Analysis

I think this approach is good for me:

  1. I get randomly generated IDs
  2. I can decide what IDs to use
  3. It’s not slow

From my observation, this approach has 3 downsides:

  1. it’s not a straightforward solution
  2. the risk of running out of IDs
  3. extra space for the pre-generated IDs

Question

  • Am I doing something wrong?
  • Are there any other risks I’m not aware of?

[ Other – Politics & Government ] Open Question : Who do you think will stand out in the first Democratic primary debates in the end of June?

Night 1: Cory Booker, Beto O’Rourke, Amy Klobuchar,John Delaney,Tulsi Gabbard,Julian Castro,Tim Ryan,Bill de Blasio,Elizabeth Warren Night 2: Michael Bennet,Marianne Williamson,Eric Swalwell, Kirsten Gillibrand,Andrew Yang,John Hickenlooper,Kamala Harris,Pete Buttigieg,Bernie Sanders,Joe Biden