Best way to organize data table

1) what is the best and intuitive way to provide the filtering option when the column is large?

One option would be to have a “add filter” button. The user clicks it, then selects the columns to filter, then finally the filter value/range. That way, you only show a list of filter fields that the user is interested in rather than them all in one go.

Another option, each column header should have a filter button. You click the button, it shows a popup where they select the filter value/range, then they apply it (update your results). If you use this method make sure it is very clear which columns have filters applied. Perhaps make them a different colour, and/or a line of disclaimer text above/below the results saying “one or more filters are applied to these results”, for example.

2) How to provide the sorting function to the user, the best way to know is to provide the sorting when the user clicks on the header.

Sorting by clicking column header makes sense, most users know that is how to sort.

However, you can’t just sort “the current page”. You need to apply the sort to all data and then only return the data relevant to the selected page.

web development – How do I organize my REST API codes along with the codes for generating the website?

Using github as an example, is the website people visit and is the REST api server programs will visit. But they probably share some codebase and in my case they share a lot.

We actually developed the rest server first for our mobile apps then we decided to develop a website because we had though there were quite some codes can be reused. But now codes are not clean at all and I am trying to refactor them.

The similarity between them and the problems I need to fix include:

First, the logic to access the database is basically the same. After get the data, the REST codes will just return them as JSON while the “website code” (without a better word to describe them) will feed the data to the template which then generates the html pages.

Second, the router logics share in common a lot.

Third, I need to make the deployment easy. We use nginx to direct REST request to the rest server and website request (again, without a better word) to the website server, which is different from the rest server(2 standalone servers).

So how do I organize the source codes to be DRY & be easy deployment ?

c# – How to organize database access logic for the infrastructure and application layer when avoiding ORM tools?

ORMs like Entity Framework do not preclude you from using Raw SQL queries.

If Entity Framework is a bit too much for your liking, consider using Dapper or any of a number of different micro-frameworks. These tools remove a lot of the hassle of making a connection to the database and managing query parameters without encountering Little Bobby Tables, allowing you to focus your time and effort on writing the SQL queries.

ORMs also serve as your Data Access Layer, abstracting CRUD operations away from the more interesting Service Layer of your application. If you still feel like writing your own Data Access Layer, you can still do so. You will need one class and four methods for each table in your database (Create, Read, Update & Delete).

The way you manage your connection can vary. Depending on how quickly MariaDB can open connections and whether or not it caches connections, you might want to just open a connection for each query. You could also do it at the Aggregate level if you’re practicing DDD. Or, you could simply open a connection and leave it open. It really all depends on your application and what you want to do with it.

One file per SQL statement sounds like a bit much. Try putting your SQL statements inside your entity classes; it’s a very convenient place to stash them.

Folder structures are largely a matter of taste. There’s no “standard,” and everyone does them differently.

Further Reading
P of EAA : Data Mapper
P of EAA : Repository
P of EAA : Service Layer

How to organize my controllers into projects in the API .Net?

I am working on a project which is an API with many controllers and modules. Which of the following is best architectural practice for organizing my API controllers by DLL (.NET 4.7 WebAPI)? Why?

OBS: Each element is inside a module is a dll

  1. A DLL for each controller. Each csproj contains a single Controller.cs file:

Module 1
– API Controller 1

– API Controller 2

– Domain
– Application
– Infra

Module 2
– API Controller 3

– API Controller 4

– Domain
– Application
– Infra

  1. Group controllers in projects by context

Module 1

– Domain
– Application
– Infra

Module 2

– Domain
– Application
– Infra

  1. Create a single csproj with all the controllers.

Module 1

– Domain
– Application
– Infra

Module 2

– Domain
– Application
– Infra

API (controllers)

Note: I use DDD (where possible), separating my business rules by context. Each context has its layers: domain, application and infra.

I started to centralize all controllers from all contexts in an API project. It started to get messy, so I separated from separate projects. However, is there a performance problem or an architectural model to follow to organize my project?

algorithm – (Java) Read .txt and organize activities for hours / minutes

Doubts in logic to generate the output file according to the example
I need that even if he reaches the total_min <720 condition he continues to travel the lines. 720 is the total number of minutes before lunch, when reached, it should separate the activities that should be performed after lunch (lunch must be inserted manually).

  • I need to make a system that reads a TXT file (intput.txt).
  • This file has several lines.
  • Each line an activity with execution time (30min, 45min, 60min)
  • Activities should start at 9 am.
  • Half day (12:00) lunch break
  • Generate a TXT with organized activities (output.txt)


Correr 60min
Estudar 30min
Ler 45min
Escrever 60min
Caminhar 45min
Jogar 30min

Example how the output.txt file should look

09:00 Correr 60min
10:00 Estudar 30min
10:30 Ler 45min
11:15 Caminhar 45min
12:00 Almoço 60min
13:00 Jogar

My code:

    public static void main(String() args) throws IOException {
    // TODO code application logic here

    ArrayList<String> antes_almoco = new ArrayList<String>();
    ArrayList<String> depois_almoco = new ArrayList<String>();

    int total_min = 540;
    int horas = total_min / 60;
    int minutos = total_min % 60;
    String trinta = "30min";
    String quarentaCinco = "45min";
    String sessenta = "60min";
    boolean trinta_min = false;
    boolean quarentaCinco_min = false;
    boolean sessenta_min = false;
    String path = "C:\input.txt";
    String outputDir = "C:\output.txt";

    FileReader arq = new FileReader(path);
    BufferedReader lerArq = new BufferedReader(arq);
    String linha;

    File file2 = new File(outputDir);
    FileWriter arq_output = new FileWriter(file2, true);
    PrintWriter gravarArq = new PrintWriter(arq_output);

    if (!file2.exists()) {

    while ((linha = lerArq.readLine()) != null) {

        trinta_min = linha.toLowerCase().contains(trinta.toLowerCase());
        quarentaCinco_min = linha.toLowerCase().contains(quarentaCinco.toLowerCase());
        sessenta_min = linha.toLowerCase().contains(sessenta.toLowerCase());

        if (sessenta_min == true) {
            total_min += 60;
            if (total_min < 720) {
            } else if (total_min > 720) {

        if (trinta_min == true && total_min < 720) {
            total_min += 30;
            if (total_min < 720) {
            } else if (total_min > 720) {

        if (quarentaCinco_min == true && total_min < 720) {
            total_min += 45;
            if (total_min < 720) {
            } else if (total_min > 720) {

        if (total_min == 720) {
            total_min += 60;
            antes_almoco.add("12:00 Almoço");

    for (String cont : antes_almoco) {
        gravarArq.printf("%d:%02d %s n", horas, minutos, cont);
    for (String cont : depois_almoco) {
        gravarArq.printf("%d:%02d %s n", horas, minutos, cont);

design templates – I have 2 sets of buttons, how can I organize them for a better user experience?

I have 2 sets of buttons on a pop-up box on a website. Game 1 consists of several options from which the user can choose, i.e. option 1, option 2, etc. Another is "Previous" "Next" "Start Over". What will be the best arrangement for the buttons? I have tried both arrangements. I have attached the images. Please tell me if it's okay or if there is a much better way to organize the button. Thank you.

1.enter description of image here

2.enter description of image here

Should I organize the links under XML Sitemap?

We use Yoast on the WordPress website and it generates an, database organized on the last modification date.

Do we need to have it organized based on our navigation menu?

IT architecture – Can an example of threads be used to organize code logically?

I'm looking for an example where threads can be used for organizing code to answer the following question:

Threads can be used to execute code in parallel but also simply to organize the code logically. Give an example of the latter.

I have the following example of some lecture notes:

The other reason for using multiple threads is code organisation. Here, the standard example
is that of a web server. A web server has to handle multiple clients at the same time. Yet, it is
convenient to implement the server as if there was a single client. Then, you ask the operating
system to run several copies of the same server, in parallel, one for each client

Does this example basically say that writing code using multiple threads is more conducive to "organizing code" than a non-threaded alternative.

I think this example is rather vague?

usability – What is the best way to organize the structure of my personal / professional computer folder / file in order to be organized by design?

It may not sound like a ux.stackexchange question, but I really think UX designers may be the best people to answer something like that.

I want to organize the organization structure of the folders on my computer and am having trouble finding an extensive bibliography or systems / principles that will help me with this.

Why i use my computer

Apart from personal use

I work on many self-initiated projects (no clients) of an artistic nature, using different file formats:

  • Simple images like .jpg, .png
  • Design formats like Photoshop, Illustrator, InDesign
  • Video projects like First or Final cut and all raw video files like .mov or .mp4
  • Drafting of projects with many .SMS, .reduction, .Fountain files

The amount of my projects is calculated in tenths while the unique pieces comprising the projects (files) are in thousands.

Ideally, what I want is the following

  • A system that works on all operating systems (macOS, Windows, Linux) and that does not depend on other software to work
  • Single file location
  • Only one possible location of the file intentionally (no second guess in recovery or storage)
  • File location should not be linked to project location (because sometimes a "file" is part of another project)
  • Easy adding of new file types (which I haven't used yet)

Any suggestion of what works for you, or even & # 39; how should i think / what to focus on & # 39; to solve the problem, as well as books, systems or principles who will broaden my understanding are more than welcome.

Organize photos with smart albums and other cameras

I am trying to organize my photos on Photos application

Here are the steps I'm following (extract from David's youtube video)

  • I create a folder
  • I create a smart album on the folder
  • This smart album has 2 rules
    • Satisfy being between two dates
    • To not be in another album "The album is not"

The problem that I have is that it seems that the photos that I took with another camera (not my iPhone), it did not appear . it's as if they already belonged to another album.