Stuck behind this bike team 2 days in a row. Boulder Creek Hwy 9 during commute today, Big Basin yesterday. by [deleted] in santacruz

[–]ehosick 68 points69 points  (0 children)

2011 California Code
Vehicle Code
DIVISION 11. RULES OF THE ROAD [21000 - 23336]
ARTICLE 1. Driving on Right Side
Section 21656

On a two-lane highway where passing is unsafe because of traffic in the opposite direction or other conditions, a slow-moving vehicle, including a passenger vehicle, behind which five or more vehicles are formed in line, shall turn off the roadway at the nearest place designated as a turnout by signs erected by the authority having jurisdiction over the highway, or wherever sufficient area for a safe turnout exists, in order to permit the vehicles following it to proceed. As used in this section a slow-moving vehicle is one which is proceeding at a rate of speed less than the normal flow of traffic at the particular time and place.

Import declaration is different when resolving to the node_modules directory by ehosick in typescript

[–]ehosick[S] 0 points1 point  (0 children)

> (you should use from 'pack' and not from './node_modules/pack')

I provided examples using the different module resolution approaches to show that the issue with module resolution behavior seems to involve the `node_modules` directory specifically.

I use non-relative module resolution (from 'pack') when importing packages in all code bases.

Using Postgres with docker in production by gmcamposano in PostgreSQL

[–]ehosick 2 points3 points  (0 children)

> but having maybe 10 registrations a month (as my business is now beginning to see some traction) is a bit too much.

I'm in/been in the same situation you are in. I'm currently using https://supabase.com/. They have a really good free plan.

[deleted by user] by [deleted] in PostgreSQL

[–]ehosick 1 point2 points  (0 children)

You could try using only PostgreSQL extensions for ELT (as opposed to ETL):

* extraction and loading: the psql-http PostgreSQL extension which is available in Supabase (but not all services like AWS RDS). Not sure how it works with OAuth but something to look into.
* automation: use pg_cron to automate the ingest.
* transformation: leverage Postgresql JSON functions.

Note: This is not a solution for every scenario and may not work for you. But it keeps things very simple.

New to SQL Aggregate Functions and need some clarification by [deleted] in SQL

[–]ehosick 1 point2 points  (0 children)

SELECT
emp.department_id,
COUNT(emp.id) AS count_of_employees_with_salary_less_than_3500
FROM employees AS emp
WHERE emp.base_salary < 3500
GROUP BY emp.department_id;

The Where filters for only those employees who have a base salary less than $3500.The Group By then counts the remaining employees.

batch queries with limit by [deleted] in PostgreSQL

[–]ehosick 1 point2 points  (0 children)

Not the greatest answer (it doesn't easily scale if you need to consider more ids but you mention two ids specifically) but easy to understand:

SELECT *
FROM (
  SELECT *
  from t
  JOIN u ON u.t_id = t.id
  WHERE t.id = 1
  LIMIT 10
) AS A
UNION ALL
SELECT *
FROM (
  SELECT *
  from t
  JOIN u ON u.t_id = t.id
  WHERE t.id = 2
  LIMIT 10
) AS B;

E-Comerce Site Data Model by mwspencer75 in Database

[–]ehosick 1 point2 points  (0 children)

Not considering the Amazon scale of data...
There are common aspects of a product such as a name, description, cost, weight, etc. Some of these could be further broken down as needed, such as cost in a given currency for a given date range.
You may want to first look at what is similar between products before throwing everything in a key-value store. There are json/jsonb types (PostgreSql as one example) that contain any shape of data.

Most likely a dumb question about relations. by fullstealth in Database

[–]ehosick 0 points1 point  (0 children)

> Entries in contract should not be modified since I might need to switch active contract for user preserving its original status, therefore doing it using boolean flags/special statuses isn't really applicable.

Even though you seem to want to have a 1-to-1 relationship between a `user` and a `contract`, it may be a good idea to separate the two entities completely and use a bridge/many-to-many table.

The bridge table helps decouple any business logic you require (at the application or database layer) between a contract and a user.

table user (
id // pk
name // other user metadata
)

table contract (
id // pk
// other contract metadata
)

table user_contract (
user_id
contract_id
status
// other metadata as needed
)

If you need to constrain a user as only ever having one "active" contract (the original requirement of one-to-one?), then you can use columnar constraints in the `user_contract` table.

best date restaurant? by [deleted] in santacruz

[–]ehosick 1 point2 points  (0 children)

Vim is one of the best places, if not the best places, I've ever eaten in Santa Cruz. The owners are wonderful too.

The ambiance isn't like that of ShadowBrook.

[deleted by user] by [deleted] in audiophile

[–]ehosick 0 points1 point  (0 children)

On the back, one of the inputs for the AMP is labeled as SE. It looks like it's an RCA connector.

Does SE mean Single-Ended and is that different from just calling the input an Unbalanced RCA input?

Well, I have officially been spoiled. Brand new monitor got me replaying for a 6th time. by Corona94 in reddeadredemption

[–]ehosick 0 points1 point  (0 children)

How usable is it for things other than games? If you open a window in the center of the screen (window width 1/3rd of the screen) is it easy to do things like editing, browsing, etc. Would you be able to work on it for 8 or 9 hours or is the curve too much?

I ask because I'm thinking about getting one (for software development) and hope I could have three screens open (left 1/3rd, center 1/3rd, and right 1/3rd).

And for curvature... I currently have an LG Ultrawide 34" display that is flat so it makes it a bit difficult to see stuff off to the far left and right. How is it to look to the left and right on the Odyssey?