So I designed database relationships for a voting/polling application. I want a user to only be able to pick 1 option on a poll. I want multiple options per poll.
So what I have here is this.
- has an id, username, email, password
- the primary key is its id
- has a title and an id
- the primary key is its id
- has a text, and an id and holds a reference to the id of the poll that it belongs to
- its primary key is its id PLUS the id of its parent poll
- holds a reference to the id of the user that voted
- holds a references to the selected option
So how does this look? I have set up these tables and I can insert records for polls, options and users but when I want to add a vote the options I get are not what I expected. I want to add a vote per poll where I can pick exactly 1 option.
This is my first time designing a database, any help would be great.
I am developing a website where customers can register products they bought in order to receive a benefit in the form of e.g. a cashback, a discount or promotional goods. In the future, we also plan on developing more of these websites in the future.
The website includes the following several registration steps:
- One of the steps gathers customer details, including what we need to provide the benefit (e.g. Address or IBAN number).
- One of the steps gathers a proof of purchase, often in the form of a product code or receipt.
For each of these steps, validation is done to ensure that the data is legitimate input before continuing. At the end of the registration, there is a ‘register now’ kind of button to officially register.
I want to split the implementation between an API and a frontend. Now I want to make sure that the customer doesn’t bypass registration steps in the frontend (that include validation) and calls the final API call by itself to get the benefit without having bought the product.
I imagine this may be doable with some kind of session, or by keeping all data around and re-submit it in the final request and then validating it again in the backend. However, I am unsure which would be better, and if there is some option that I am missing which would be better than both.
For this question I want to focus on the web design aspect, so defending against forged purchase proofs is out of scope of this question.
How does someone in the industry use the right icons and text together in order for age > 40 people to understand the functionality of the feature that they are clicking on. I have come up with a few small ideas where a button would have the text centred and the icons on top left corner small/medium sized but I am looking for more input or if there are any studies done for this?
I’m just after a bit of advice really. I have programmed a script in Python that downloads market data from an API, and then does various bits of analysis and spits out some tables and charts displaying this analysis. There are a couple of user inputs required such as time frame or market they want to analyse, but generally the script itself is quite straight forward.
My question is how to set up a website, and what would be required for users to basically be able to use my script, but via the website. I actually only want the script itself to run every 15 minutes say, to update the data, and then the user can decide what bits they want to look at.
I’m not after a full blown answer, more just guidance as to what would be required and any good tutorials if anyone knows of any, or even just the right thing to start googling, or a service that would be able to cater for this.
I have absolutely zero HTML/CSS knowledge, and a decent understanding of python. FWIW.
I’m designing an NPC that is meant to be a manager/mentor to the players. Contrary to the archetype I’ve just invoked by mentioning Gandalf, she isn’t some divine force incarnate-she’s just somewhat stronger and more experienced than the other players.
Since I’m new, how should I ‘design’ this NPC?
Do I write stats for her the same way I would a player?
If the players are starting out as level 1, what is an appropriate range of strength for her that while she can help the players against tougher threats, she also can’t hold back the tide by herself?
The NPC starts out as the person coordinating operations for the NGO the players are working for. She’s strong enough that local militaries need to account for neutralizing her in their tactical planning and politicians in their policy making. The players will eventually become strong enough to challenge her if the storyline goes in that direction.
So I am debating what approach to follow. My scenario is : Will receive a POJO which I need to validate ( REST end point ) Now I can explicitly validate specific fields ( which I know / are stated in requirements that they are mandatory ) OR should I define the fields in a db table and define which are mandatory vs not and then read this table one time and then based on what is configured in db drive my validations .
Would the second config driven approach be an overkill ? ( I guess the answer would be ‘depending’ on the number of times such scenarios can arise where we would need to change the rules of what is mandatory )
apologies if I am not making sense
I’m new to Sketch (app) and am looking to learn how to use the application. Currently, I’m designing a web application however I’m struggling to understand how one designs within the grid. For example, if in my application, I’d like to have a menu on the left-hand side and that appears outside of the grid suggested in Sketch, what does that mean?I’ve added an image if my question doesn’t make sense, I’m struggling to articulate this well. Thank you!
I am a beginner in website design, I only had experience with Github pages design, however, I am not satisfied with the imported templates design. I would like to do my own design and I dont know how I should start. I do prefer using opensource coding and not using wix or others ready templates.
I have this website as an example, I am astonished with it simple and high quality design:http://www.entagma.com/
I would like to have an advice from where I should start.