netsecwarrior

u/netsecwarrior




r/Kotlin•

I posted a while back about some of my dislikes of Exposed. Since then I've been using Hibernate with Ktor, which has for the most part worked quite well. I can define one data class that autogenerates the table and the entities are directly serializable. Which nicely solved what I didn't like about Exposed (having to declare separate tables, entities and DTOs).

But querying with Hibernate is so uninspiring. The JPA Criteria API is so long winded, and using HQL is unsatisfying, it feels wrong to introduce a runtime language. This is in contrast to Exposed where the Kotlin query syntax is safe, intuitive

18

r/techsupport•

I have a Lenovo IdeaPad S340-15API. It is just over 2 years old and was working perfectly until the other day. Now, it will not power on.

If I connect the charger, attempting to power on results in an orange light flashing three times slowly. I've tried to find an authorative guide to the flash codes without success. Some forum posts online say this is battery error.

If I don't connect power, attempting to power on does absolutely nothing.

I've tried holding power for 10s, which has not helped (some forum posts advise this).

Charger is outputting about 20v, confirmed with multimeter.

I've opened the case and copied my data off the internal NVMe card.

I tried disconnecting the internal

11

r/askanelectrician•

Does anyone know where I can source a 1-gang, 1-way LED dimmer switch in white?

All the LED dimmers I can find are 2-way. Call me picky, but I prefer the action of a 1-way dimmer, where you turn it up from off through to the level you want. The push on/off action of a 2-way dimmer feels inferior to me.

Edit: I mean a rotary as opposed to a push toggle

07

r/Kotlin•

Has anyone managed to make an Exposed ORM entity be serializable? If I try just adding @Serializable I get this error:

Impossible to make this class serializable because its parent is not serializable and it does not have exactly one constructor without parameters.

My use case is that I'm using Exposed with Ktor and I'd like to return Exposed object directly from controllers. A start would be just making them serialize, and manually deserialize for now - although ideally I want deserialization too.

The deserialization semantics should be fairly obvious. If id is missing or null, create a new object. If it's non-null, load the existing object with that id. Then apply all the other fiel

312

r/Kotlin•

I'm generally liking Exposed, but I've got a feeling explicitly defining both tables and entities will get tiresome as I build a larger app.

Is it possible to do it in one class, as other ORMs (e.g. Hibernate) allow? I'm open to slightly hacky solutions.

Alternatively, does anyone have recommendations for Kotlin ORMs? I know Hibernate is an option but I'm keen to try something that's designed specifically for Kotlin.

28

r/stopdrinking•

Good news, this is day 12 free of alcohol and day 4 free of valium and any intoxicant. I feel good, I'm sleeping ok, keeping busy, doing well at work, spending plenty of time with my children.

My first attempt at a self-medicated detox failed. I basically kept drinking and hammered the valium as well.

My second attempt worked. I went from 50 units a day to zero, and used street valium to manage the withdrawal symptoms. I used a high dose initially (80mg) so actually felt very little withdrawal. I tapered this down quickly and by day 4 didn't need valium during the day, just to sleep. Then I tapered off more slowly but have now had three nights of decent sleep with nothing.

I realise a sel

217

r/AskUK•

My idea of a village is a few houses, a single pub and maybe a small shop.

A village near me (Edgworth) claims to be a village, despite having: three pubs, a cricket club, a post office, GP, dentist, pharmacy, hairdresser, estate agent, butcher, a school, two nurseries, and probably a few more businesses. At what point do they become a town?

Although Ringway is still a village and it has a major international airport with two runways and three terminals. But that feels different somehow.

3071

Sometimes when cooking for a group, one person really doesn't like spice. So you end up coming the dish really mild. The others can add a spicy sauce, but that is inferior to spice cooked in with the dish. So can you get a "spice neutralising" sauce, so you could cook the while dish hot, and that one person at the neutraliser?

17