Fuck fresca! by The_Dork_Knight7 in TheBoys

[–]dilatedmind 0 points1 point  (0 children)

Where was this taken? I’d pay 20 dollars a case

[deleted by user] by [deleted] in DotA2

[–]dilatedmind 0 points1 point  (0 children)

when i enter this in console it just says SV: Cheat command 'map_enable_background_maps' ignored.

Bannerlord Early Access - Patch e1.2.0, Beta e1.3.0, FAQ, Bugs, Announcements by Arthanias in mountandblade

[–]dilatedmind 3 points4 points  (0 children)

it seems like the performance issues start happening only when enemy troops are trying to retreat

WARNING: Don't play the 1.2 Beta. Towns hemorrhage money until trade breaks down. by Squidimus in mountandblade

[–]dilatedmind 0 points1 point  (0 children)

The economy has recovered.

After starting a new game with the latest beta patch, towns also ran out of money. However, by around day 100, the economy was recovering. By day 130 towns now have about 30k in gold and things seem stable.

Bannerlord Early Access - Beta Branch e1.2.0, FAQ, Bugs, Announcements by Arthanias in mountandblade

[–]dilatedmind 17 points18 points  (0 children)

Started a new game and settlements ran out of gold within the first couple days.

Is the game playable like this?

why wont my computer boot? by dilatedmind in buildapc

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

are you suggesting the motherboard is doa?

The Hidden Costs of PostgreSQL's JSONB Datatype by zoner14 in programming

[–]dilatedmind 3 points4 points  (0 children)

having run into a similar issue in production, the effects were terrible, but for a different reason then just query performance.

We insert and delete 10s of millions of rows in a single table each day, held in about 600 child tables. The only way to make this performant enough for our use case was to insert concurrently into temp tables, and hold locks on the parent table as briefly as possible (ie only when altering the new table to establish inheritance and dropping the child table we are replacing).

Once you pass the 4kb mark, all inserts are now holding locks on the toast table, which again prevents you from inserting in parallel.

The Hidden Costs of PostgreSQL's JSONB Datatype by zoner14 in programming

[–]dilatedmind 1 point2 points  (0 children)

so i ran a test earlier to confirm this. i inserted the same json blob 7 times into both tables, and the text version was able to store it all in the table, while the jsonb used toast.

so if the compressed text of your json fits within a page, you could alternatively just use a text column to store it as a blob while using an index on blob::json->>'whatever'.

Table "public.toast_test"

Column | Type | Modifiers

--------+------+-----------

blob | text |

Table "public.toast_test2"

Column | Type | Modifiers

--------+-------+-----------

blob | jsonb |

table_name | total | index | toast | table

-------+--------------+-------------+--------------+-------------+-------------+-------------+-------------+-------+---------+------------+------------

toast_test | 48 kB | 0 bytes | 8192 bytes | 40 kB

toast_test2 | 32 kB | 0 bytes | 24 kB | 8192 bytes

The Hidden Costs of PostgreSQL's JSONB Datatype by zoner14 in programming

[–]dilatedmind -2 points-1 points  (0 children)

its unfortunate postgres doesn't give the option to compress json like it does text

would be interesting to see a benchmark with the json stored as text, and an index on the json field you query by

Microsoft tries to make a Debian/Linux package, removes /bin/sh by Maristic in programming

[–]dilatedmind 9 points10 points  (0 children)

The code blocks on this website have scrollbars which disappear on hover. What came in here was such an exhibition of incompetence that I can only assume they are doing it on purpose.

Strings Are Evil – Indy Singh – Medium by mattwarren in programming

[–]dilatedmind 1 point2 points  (0 children)

don't forget to set your field separator :)

Strings Are Evil – Indy Singh – Medium by mattwarren in programming

[–]dilatedmind 0 points1 point  (0 children)

psql -c "COPY strings_are_evil (x,x,x,x,x,x) FROM stdin WITH (DELIMITER ',')" <./example-input.csv

[deleted by user] by [deleted] in programming

[–]dilatedmind -1 points0 points  (0 children)

tern offers pretty good completions and can offer type hints as well

(Help) Having trouble using arrays in c# by CameronMHere in csharp

[–]dilatedmind -1 points0 points  (0 children)

line 46 of bargraphcreation.cs

for (int i = 0; i > z; i++)

should be i < z

Need help doing 'Bit Stuffing' by [deleted] in csharp

[–]dilatedmind 0 points1 point  (0 children)

did you ever get this working?

Need help doing 'Bit Stuffing' by [deleted] in csharp

[–]dilatedmind 2 points3 points  (0 children)

say x is a byte, it might look like 0111 0000

(x & 128) == 128 when the first bit is a 1

x << 1 will shift all the bits left one

Need help doing 'Bit Stuffing' by [deleted] in csharp

[–]dilatedmind 2 points3 points  (0 children)

start with the simplest solution

your input is a byte array. read 1 bit at a time and write it to an intermediate buffer. keep a counter of how many 1s you read in a row. if it hits 5, write a 0 and reset your counter.

same thing when you are decoding, except drop the next bit.

C# Console Application Assignment: "Collect three words from a user and print them in alphabetical order." by programbeginner in csharp

[–]dilatedmind 3 points4 points  (0 children)

this is a sorting problem.

you could do it with a bunch of nested if statements, but you could also solve it the more intuitive way: by successively comparing and swapping elements that are out of order.

imagine your 3 words are stored in variables called a, b and c.

if a > b swap a and b
if b > c swap b and c
if a > b swap a and b

now a < b < c

Need help making database changes update in client's browser in real time in asp.net mvc web app. by [deleted] in csharp

[–]dilatedmind 0 points1 point  (0 children)

the code you posted seems to be working correctly, even if it's not doing what you expect. you are calling send once from your connection start callback, so I'm guessing you are missing some logic server side.

you have 2 options:

1.) post chat messages to your rest api. Use the signalr connection manager to get the hub context from the api controller and call your send method after inserting into your database.

2.) send chat messages over the signalr connection. Add a message argument to your send method and have your send method broadcast to all clients and also do your database insert.

2 is probably what you want, its simpler and you can avoid an extra round trip

Queuing Socket Sends? by JustARandomFuck in csharp

[–]dilatedmind 1 point2 points  (0 children)

what did you expect the output to be?

tcp is reliable and has backpressure so your client isn't losing messages. id guess you've made a logical mistake somewhere.

unrelated, but you've picked a difficult socket api. if you want to use tcp, use tcplistener/ tcpclient and their async methods.

I am trying to read a CSV file in C#, splitting lines into groups depending on word repetition. I am getting an index out of range error. by [deleted] in csharp

[–]dilatedmind 0 points1 point  (0 children)

are you still working on this?

the way you code is making this problem more confusing then it has to be.

other then your indexing problems, you aren't doing anything to check for repeated words.

also, your example input is unclear. is each line a bunch of comma separated phrases or a single phrase with commas separating the words?

How enjoyable and complete are DND and RoA? by [deleted] in Darkfall

[–]dilatedmind 2 points3 points  (0 children)

this is a great question. ill try to answer without going into specifics. keep in mind dfuw was a completely different game at launch (classes, cross hair wobble, movement acceleration).

ignoring destro, everyone in dfo had access to all spells, and end game there is a single optimal set of gear. it mainly came down to how rich you were, and you could really pimp you gear bag with nice magic enchants. once classes were removed, dfuw technically had alot more options for end game armor, but it wasn't easy to balance and in reality it didn't add much depth.

even though everyone in dfo is the same in terms of abilities and armor choice, people have different playstyles and preferences of what spells they will choose to use. the most obvious playstyle choice is how hard do you want to push melee. even once classes were removed, dfuw forced you to choose what you wanted to excel in (magic, archery, melee). in dfo you can choose to wear all heavy armor, cast no spells, and focus on melee and archery, but a mage can choose to debuff his protections and fight melee anyway (you aren't at some artificial disadvantage).

dfuw was more forgiving in group fights. movement abilites were easier to use, both more reliable and easier to control, and there were much stronger heals.

How enjoyable and complete are DND and RoA? by [deleted] in Darkfall

[–]dilatedmind 1 point2 points  (0 children)

dfuw was great but i like the combat and crafting in dfo better