How do I determine a public holiday in Sql server?

I have an application written in c# that cannot run on a public holiday or a weekend. I've looked around a bit and haven't found anywhere (official) that provides all the public holidays for the...

SQL for sorting boolean column as true, null, false

My table has three boolean fields: f1, f2, f3. If I do SELECT * FROM table ORDER BY f1, f2, f3 the records will be sorted by these fields in the order false, true, null. I wish to order them...

How to store a list in a column of a database table

So, per Mehrdad's answer to a related question, I get it that a "proper" database table column doesn't store a list. Rather, you should create another table that effectively holds the elements of...

REST Complex/Composite/Nested Resources

I'm trying to wrap my head around the best way to address concepts in a REST based API. Flat resources that don't contain other resources are no problem. Where I'm running into trouble are the...

Combining rows of queried results by unique identifier?

I have a query that searches through several tables and returns one row for every value in one specific column of one of the queried tables. The table returns multiple rows for one unique...

How to phrase a T-SQL horizontal join?

I have a database which is including two tables, Labs and LabUsers How do I join a column from LabUsers into a cell in Labs. To be specific, I would like to have the user names of a lab to be...

Best way to count rows by arbitrary time intervals

My app has a Events table with time-stamped events. I need to report the count of events during each of the most recent N time intervals. For different reports, the interval could be "each week"...

Disable Column Header sorting on a JTable

Is it possible to disable manual sorting on a JTable after adding a sorter? So I have a JTable that has the following sorter attached to it (basically sorts by column 3 when the table is...

Update and insert records into Oracle table using OracleDataAdapter from DataTable

a question from a newbie to c# and apologies for the lenght of it. I have the following scenario. I have a small console application that populates a datatable by connecting to an external...

Pagination is not showing in jQuery datatable

I am using JQUERY DATATABLES in my project. I have added all the reference and followed all the steps specified in documentation. But I am not able to see the Pagination's. I can see table sorting...

What is Hash and Range Primary Key?

I am not able to understand what Range / primary key is here in the docs on Working with Tables and Data in DynamoDB How does it work? What do they mean by "unordered hash index on the hash...

Spring Data sorting on wrong Table

I have an app running Spring Data + Hibernate and the following query: @Query(value = "SELECT NEW com.foo.dto.OfertaBancoDto(y,(SELECT CASE a.id WHEN NULL THEN 0 ELSE 1 END FROM Banco b LEFT JOIN...

Data Vault 2.0 in SQL Server

In data vault 2.0 one hashes the business key and takes this hash as a primary key of the table. Also Link Tables use the hash primary key to create a relationship. My problem is with hashes that...

T-SQL Challenges from hackerrank

Julia asked her students to create some coding challenges. Write a query to print the hacker_id, name, and the total number of challenges created by each student. Sort your results by the total...

Comparing typeof(Type) to System.RuntimeType

First off, I do have a workaround for this issue (use type.FullName), so its just for interest sake really. *Edited for clarification; This is really just a question of what is the best way to...

TypeError: $(...).DataTable is not a function in Angular4

I used bootstrap4 datatable jquery function in my angular4 app to create a sortable table. Here is the code. .component.ts import { Component } from '@angular/core'; declare var $:...

"The coordinates of the range are outside the dimensions of the sheet" error when sorting

I am trying to create a script to sort a table on the current active sheet/tab but I am getting an error that I could not identify. I keep getting The coordinates of the range are outside the...

HackerRank Weather Observation Station 5

I would like to know why my code isnt working. This question has been asked before here:...

Angular 6 DataTables - Table Items Appear/Disappear Upon Sort or Search

I am using Angular-DataTables 6.0 (found here https://l-lin.github.io/angular-datatables/#/welcome) and I have been running into a reoccurring problem. When a table item is added or deleted, the...

How to add case insensitive sorting in react table?

By default, react table sorting is case sensitive. In order to make it insensitive we have to write a custom sort function. I like this answer from...

UI-Sortable is not working with dynamic Angular Datatables

I am using Angular DataTables in my application and created a dynamic table with nested rows and trying to add sortable functionality on parent rows. I have tried to add ui-sortable but not...

Postgresql query takes more than 5 minutes

I have a big table with more then 500 millions of rows. I'm trying to find the best indexing alternative to speed up the query time a bit. I suppose sorting according to timestamp slows the query...

override django oscar search app to return only merchant specific products?

I am using Django oscar(2.0.2), where I have made foreign key relation of merchant ids with product table AbstractProduct with data, (https://prnt.sc/s1ssxx) so that I can fetch merchant-specific...

disable sort in react-table

let { getTableProps, getTableBodyProps, headerGroups, prepareRow, page, canPreviousPage, canNextPage, nextPage, previousPage, state: { pageIndex, sortBy } ...

SQL Server: Top competitor with at least one full scoring submission

Here is the question context Julia just finished conducting a coding contest, and she needs your help assembling the leaderboard! Write a query to print the respective hacker_id and name of...

Creating a reverse lookup table from measured values

I'm recording 2 voltages from an encoder (of known speed) during calibration. Creating this (voltage over angle), then I need to measure the voltages and get the corresponding angle. I would like...

Fix the last row of react material-table to display the sum of a particular column?

We have a requirement display the total sum for 2 columns import MaterialTable, {MTableToolbar, MTableAction} from "material-table"; . . . <MaterialTable actions={transformActions()} ...

Prevent sorting from styling column on antd

I have an antd Table with a sortable column. This table's rows might or might not be styled. When I sort the rows the style is overwritten. Is there a way to prevent this? Here's an example of an...

How to populate JTable with an existing ArrayList of objects?

As an assignment, I am required to make a Swing GUI. In the first part, I have created an ArrayList (f1Driver) of objects (Formula1Driver). At the moment what is required is to sort said array...

How to sort and chunk a dependency tree of actions, so you can batch as many actions as possible together at each step?

Say you have a bunch of actions for creating/inserting records into a bunch of different database tables. You have some records which can be inserted without any dependency on the output of any...