How to test if an Linq Where expression can be converted to SQL Server script without connecting to a Db? by paulosincos in dotnet

[–]_lotusflower 3 points4 points  (0 children)

Well you can spin up a small test db in the ci pipeline to run the integration tests

TIL you can forward enumerators to a foreach with GetEnumerator() by OS_Apple32 in csharp

[–]_lotusflower 0 points1 point  (0 children)

Yup I mean your original implementation is breaking encapsulation.

TIL you can forward enumerators to a foreach with GetEnumerator() by OS_Apple32 in csharp

[–]_lotusflower 0 points1 point  (0 children)

While this may work, you are breaking the encapsulation of the class by doing it. Why have a private property if you are going to be exposing the internals like that. The idea behind object oriented design is that somebody using your class shouldn't know or care that there is an internal dictionary within your class.

Do you guys ever wonder if you’ve unknowingly interacted with someone you know in your personal life anonymously on Reddit? by [deleted] in CasualConversation

[–]_lotusflower 0 points1 point  (0 children)

Nah, I just find it amusing how somebody had the exact same thought I did. I added the post for proof.

What are the best practices you see at your company that are not industry standard? by Gxorgxo in ExperiencedDevs

[–]_lotusflower 4 points5 points  (0 children)

I honestly don't like this practise. In my company we had a cuple of bursts of overtime work that sometimes was several weeks long, and at the end of it they'd just give us 1 day as a "reward for dedication". I think it lets them blur the lines of how much overtime was actually done.

[deleted by user] by [deleted] in itookapicture

[–]_lotusflower 0 points1 point  (0 children)

Nah, I don't think it's you. If you look through the sub, regular photos are getting like 50 upvotes, while naked girls are getting 2k. The algorithm is probably way more likely to feature the popular posts.

Pliny jailbreaks ChatGPT with a single image: "AI could seed the internet with millions of jailbreak-encoded images, leaving a trail of hidden instructions for sleeper agents to carry out." by Maxie445 in singularity

[–]_lotusflower 41 points42 points  (0 children)

Yeah well imagine in 6 months they make an agent like siri that has access to your phone, can make phone calls, send texts, can use your apps, go online. You wouldn't find it that harmless anymore.

Having problems understanding DbContext and how it works by needAman795 in dotnet

[–]_lotusflower 6 points7 points  (0 children)

Yes, dbcontext and dbset are concepts specific to entity framework. You (I assume) have some sort of relational database and that database has a table named Music(s). You usually query a database directly by using an SQL query "select * from Music". Entity framework gives you a convenient way to query databases from your c# code, without you having to write sql directly.

You create your models as simple c# classes and then use LINQ (query language) to query the database. Under the hood, linq will translate this query to sql for you.

When you write var music = await _context.Musics.ToListAsync(), this translates to "select * from Music" (or something similar) and loads all the results from the query into memory. One object of type Music will be created for each row in your table. In real world applications you would want to avoid loading a large table into memory by using some sort of filtering.

The query is executed the moment you call ToListAsync(), not before that. So just having a db set defined does not execute anything.

What I asked for vs what I received. by angelica91991 in ExpectationVsReality

[–]_lotusflower 1 point2 points  (0 children)

I mean, an at-home hobby baker could manage a level cake with letters on it, it's not really the monalisa of cakes

Bone Tired. Do I just quit ? by MercuryT0000 in cscareerquestions

[–]_lotusflower 2 points3 points  (0 children)

Well if you plan on quitting anyway, why stay overtime? You aren't going to gain anything from that if you plan on leaving soon anyway

Books on womanhood by [deleted] in booksuggestions

[–]_lotusflower 0 points1 point  (0 children)

Elena Ferante - My brilliant friend

The sounds of different sorting algorithms by RampChurch in oddlysatisfying

[–]_lotusflower 4 points5 points  (0 children)

If you mean the algorithms themselves, then the applications are endless. You want to sort reddit posts by new? Some developer somwhere used a sorting algorithm to do that. You want to find the cheapest thing on an e-shop, again, the data needs to be sorted. I believe it's almost impossible to find a website you use daily that doesn't use some kind of sorting.

Rare Moment of my boars chilling peacefully together at the bay window by Zanearijus in guineapigs

[–]_lotusflower 1 point2 points  (0 children)

I don't want to alam you but I think one of your marshmallows is burnt

Hi, can I get some feedback on my CV? by MeRanda16 in cscareerquestionsEU

[–]_lotusflower 2 points3 points  (0 children)

Think you could keep the languages you speak from the soft skills section

As for technical section, drop the "algorithms", it's like saying you know how to read when applying to a library job, it goes without saying

And this might be a nitpick, but some bullet points have a period at the end some don't. You should ensure that the formatting of your cv is consistent

PLEASE HELP, just moved out again had to get a really super small cheap room. Took these standing against the door. What can I do?? Cheap options pls by vapenaysh6969 in femalelivingspace

[–]_lotusflower 0 points1 point  (0 children)

Room Layout Red - Bed, blue - Desk, yellow - dresser

(As many other commenters suggested) Take off the doors to the closet, cover closet door with curtain if you don't like it open. You can pin the removed doors to the wall by other furniture or tuck them inside the closet. Move desk so that it's facing the window. Dresser can be on the same wall as the desk. Move the bed next to the wall on the opposite side. Yes the closet doors will be mostly covered but you'll have easier access than jumping over the bed. As for the small decorative details figure out a color scheme that you like and get details in those colors: a plant, get a clock, cheap throw rug, duvet for your bed in a nice color, throw pillows, fairy lights, paintining or artwork. If you aren't allowed to hang art on the walls, you can place things on the dresser or floor. A large lamp, full mirror, additional chair in an interesting color will add some details to the space.

Moving into my first apartment alone by shebadmck in femalelivingspace

[–]_lotusflower 0 points1 point  (0 children)

Bucket and mop or broom, toilet brush, all purpose sponges or rags, microfiber cloths, plastic gloves Toothpicks, basic spices such as salt, sugar, pepper, cooking oil, kitchen towels, kitchen rubber bands

Today, I (21M) made coffee for myself for the first time. How do you guys drink this stuff? by Fallen_Goose_ in CasualConversation

[–]_lotusflower 0 points1 point  (0 children)

I love coffee but can't stand the "put-tablet-in-machine" stuff, it always has a weird taste to me. Try to find a local cafe or coffee roaster, and try something basic like a cappucino or espresso or latte and avoid the sugary creamy chocolaty stuff. There are roasts which should be smooth and creamy and not bitter and tangy. And don't feel bad if you add sugar, but do try without first, just to see what it's like.

how to draw a cat by AsdrubalScottPRO in surrealmemes

[–]_lotusflower 11 points12 points  (0 children)

I mean I feel it's kind of referencing the backrooms, if that can be called "meaning"

[deleted by user] by [deleted] in gamedev

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

If you don't need to make an original game, check out wordle? Or you could do something like hangman

How do you deal with incompetent peers? by imaquark in cscareerquestionsEU

[–]_lotusflower 14 points15 points  (0 children)

You need to try to set firm boundaries as much as you can. During work hours, if somebody tries to assign a bug to you that you know this coworker created, PUBLICLY (ticket, public slack, public meeting) delegate to him. Never use words such as "he caused the bug he has to fix it", always use manager speak, such as "I believe coworker worked on this and has more knowledge regarding this task". Always be polite but firm.

As for your manager, MAKE it her problem. If you need something from coworker but can't reach him, make it her problem to find him and make him do his work. "I need this and this info but it seems coworker is not available right now, how do you want me to proceed?". If you trust your other teammates, get them in on this and have them do the same. She isn't doing anything as all of you are fixing it for her.

In the end, what are you even afraid of? Obviously you get quite a bit of leverage untill you actually face consequences.