a_m0d

Joined 16 years ago

Karma
227
Submissions
41
Member since
May 6
.Net and web developer.

Github: https://github.com/am0d

View on Hacker News

Recent submissions

Comment · 8 years ago
Must say I've had kind of the opposite experience - I found that the MiUI skin was actually quite confusing and definitely didn't add anything useful. Otoh, my Leagoo T5 has been a great phone, has better specs, a gorilla glass screen (RedMi Note 4X has regular glass and cracked within days of getting it), and has been getting system updates about once per month from Leagoo, all for less than the price of the Xiaomi. ymmv I guess, but that's been my experience so far.
Comment · 11 years ago
SQL Server has a limitation of 1000 rows maximum allowed in a VALUES clause, so sometimes a SELECT ... UNION ALL is required instead (this limitation probably doesn't exist in Postgres, though).
Comment · 11 years ago
This script works in SQL Server - I would think you could do the same in Postgres, but I'm not as familiar as I'd like to be with Postgres.

Note that it does require 2 separate steps rather than 1 as you appear to desire, so may not work for you:

    IF OBJECT_ID('dbo.dogs', 'U') IS NOT NULL
        DROP TABLE dbo.dogs
    GO
    
    IF OBJECT_ID('dbo.doghouses', 'U') IS NOT NULL
        DROP TABLE dbo.doghouses
    GO
    
    CREATE TABLE dogs (
        id INTEGER IDENTITY (1, 1) PRIMARY KEY
       ,name VARCHAR(MAX) NOT NULL
    );
    
    -- Now we want to give each dog a doghouse:
    CREATE TABLE doghouses (
        id INTEGER IDENTITY (1, 1) PRIMARY KEY
       ,name VARCHAR(MAX) NOT NULL
    );
    GO
    
    ALTER TABLE dogs ADD doghouse_id INTEGER REFERENCES doghouses (id);
    GO
    
    INSERT INTO dogs (name)
    VALUES
        ('Sparky'),
        ('Spot')
    ;
    
    DECLARE @DogsAndHouses TABLE (
        doghouse_id INT
       ,name VARCHAR(MAX)
    );
    
    INSERT INTO dbo.doghouses (name)
    OUTPUT INSERTED.id, INSERTED.name INTO @DogsAndHouses
    SELECT
        d.name
    FROM
        dbo.dogs d;
    
    UPDATE d
    SET
        doghouse_id = dah.doghouse_id
    FROM
        dogs d
        JOIN @DogsAndHouses dah ON d.name = dah.name;
    GO
Comment · 12 years ago
Receiving an official diagnosis by a doctor for celiac is not always possible. Although my wife's doctor considered it a possibility that she was celiac, he did not do anything with that idea until she had tried being gluten free already for a few months and found that it helped her intense pain.

The test for celiac requires a person to have been eating regular amounts of gluten for 3 months before the test is done. When my wife is in a position such that a crumb of normal bread in her meal can cause her pain afterwards, there is no way she can eat gluten for 3 months in order to get a diagnosis by a doctor. The best she can get now is a statement that she is sensitive to gluten - but that sensitivity is enough that she can't have food cooked in the same pan as your food when you don't give any consideration to her.

So don't say this is "bullshit food intolerances" - just because you don't have to deal with it does not mean that it is not real.

Comment · 12 years ago
Did you mean

> NaCl aims to provide a simple, clean interface ...

Comment · 12 years ago
Your site still breaks when scrolling by dragging the scroll thumb down. On a long page, dragging the scroll thumb down (the way many people actually do scroll) makes the page jump around very fast, and skip larger sections as the page goes further down.
Comment · 12 years ago
Another reason to hate it, which my wife runs across all the time on Facebook - she scrolls by dragging the scroll-thumb down with her mouse. Once she gets near the bottom, the page jumps as the extra content gets loaded, and she has to find her place again.
Comment · 13 years ago
That doesn't include the possibility that the user right-clicks and selects "Open Link in New Tab"
Comment · 13 years ago
We are currently using MS SQL Server, but have looked at the possibility of using Postgres in the future.

One major stopping point for us is the fact that on SQL Server we use a Case Insensitive, Accent Insensitive collation. Postgres doesn't support this, and apparently has no plans to.

We have many stored procedures in TSQL which are built around the assumption of CI,AI. Converting these will be a lot of work, but the lack of CI,AI collation would be by far the biggest pain point.

Comment · 13 years ago
What's the problem with the marked cars driving the speed limit? If all the cars drive at the speed limit, that's good, right?

I always thought the speed limit was there as a speed limit. I've found that in Australia, speed limits are obeyed much more than in North America, where they seem to be suggestions or lower bounds on speed. Many times in Canada I've been travelling in traffic that's doing 30 - 40 kph over the speed limit. That's enough to get your car confiscated in Western Australia!

Comment · 13 years ago
This framework is quite broken on the iPad (in Chrome).

- The dropdown menu doesn't work well. It triggers on hover, but trying to do "hoverintent" on the iPad simply fires the click event on the button, causing the menu to appear briefly before the page navigates. - I can't even scroll at all on the demo pages. Dragging the page (to scroll) just drags the whole tab rather than actually scrolling.

Comment · 13 years ago
I was thinking more of StackOverflow as an answer to this one.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton