[-] bappity@lemmy.world 1 points 4 days ago* (last edited 4 days ago)

I switched to using tiberius

bit different but not too hard don't have my code on hand atm but this is how I started with it

    let mut config = Config::new();
    config.host("your_server_name");
    config.database("your_database_name");
    config.authentication(tiberius::AuthMethod::sql_server("your_username", "your_password"));
    config.trust_cert();

    let tcp = TcpStream::connect(config.get_addr()).await?;
    tcp.set_nodelay(true)?;
    
    let mut client = Client::connect(config, tcp.compat_write()).await?;

then I did something along the lines of

fn main() {
        let stream = client.query(&query, &[]).await?;
        let rows = stream.into_first_result().await?;

        let db_data: Vec<MyObject> = rows.into_iter().map(mapping_function_i_made_for_myobject).collect();
}

fn mapping_function_i_made_for_myobject(row: Row) -> MyObject {
    MyObject {
        my_date_field: row.get::<NaiveDateTime, _>("my_date_field").map(|dt| Local.from_local_datetime(&dt).unwrap()),
    }
}

[-] bappity@lemmy.world 4 points 4 days ago* (last edited 4 days ago)

just started out rust and made a massive thing with sqlx only to find out the latest versions don't have mssql support anymore and the last version that did doesn't support decoding DateTime<Utc> 😭😭😭

had to rewrite the whole thing again with Tiberius, painful yet educational

[-] bappity@lemmy.world 15 points 5 days ago* (last edited 5 days ago)

certificates fucking destroy everything in my work for an hour once every year because of expiry

[-] bappity@lemmy.world 38 points 5 days ago

I don't get the appeal of azure because of things like this.

annoying how much they try to push it

[-] bappity@lemmy.world 166 points 2 months ago

don't give me hope

129
submitted 2 months ago by bappity@lemmy.world to c/tenforward@lemmy.world
[-] bappity@lemmy.world 135 points 3 months ago

ANTI UPGRADE?? WHAT THE FUCK

90
it's Monday again (media.tenor.com)
submitted 6 months ago by bappity@lemmy.world to c/tenforward@lemmy.world

yay
~my brain is slowly rotting as the unstoppable marching of time is slowly guiding us all towards an inevitable death~

172
not tired rule (lemmy.world)
submitted 6 months ago by bappity@lemmy.world to c/196@lemmy.blahaj.zone
2
Tailor Rule (lemmy.world)
submitted 7 months ago* (last edited 7 months ago) by bappity@lemmy.world to c/tenforward@lemmy.world

cross post from https://lemmy.world/post/12105270

~~can't find a way to properly cross post on Lemmy, hope it's implemented soon~~ looks like I did it anyway oh

[-] bappity@lemmy.world 138 points 7 months ago

no suprise here. it's apple. they made a $3500 device that has been bricking itself and charging people $100 to fix it because it's completely proprietary

1
mobile data (lemmy.world)
submitted 8 months ago by bappity@lemmy.world to c/tenforward@lemmy.world
1
submitted 8 months ago by bappity@lemmy.world to c/tenforward@lemmy.world
31
submitted 9 months ago* (last edited 9 months ago) by bappity@lemmy.world to c/eternityapp@lemdro.id

I liked the colour scheme for it and the tap to collapse comments immediately so made a theme for it! some pics below and the JSON for it if you wanna import it yourself. (it's in a spoiler below)

profile sidebar

homepage posts

comments view

It copies the colour scheme of jerboa and also uses tap to collapse comments.

Theme share text below (click here){"archivedTint":"#FFB4009F","authorFlairTextColor":"#FFEE02C4","awardedCommentBackgroundColor":"#FF000000","awardsBackgroundColor":"#FFEEAB02","awardsTextColor":"#FFFFFFFF","backgroundColor":"#FF000000","bottomAppBarBackgroundColor":"#FF000000","bottomAppBarIconColor":"#FFE5A477","buttonTextColor":"#FFE5A477","cardViewBackgroundColor":"#FF000000","chipTextColor":"#FFFFFFFF","circularProgressBarBackground":"#FF000000","colorAccent":"#FFFFDBC9","colorPrimary":"#FF000000","colorPrimaryDark":"#FF000000","colorPrimaryLightTheme":"#FFFFDBC9","commentBackgroundColor":"#FF000000","commentColor":"#FFFFFFFF","commentIconAndInfoColor":"#B3FFFFFF","commentVerticalBarColor1":"#FF0336FF","commentVerticalBarColor2":"#FFC300B3","commentVerticalBarColor3":"#FF00B8DA","commentVerticalBarColor4":"#FFEDCA00","commentVerticalBarColor5":"#FFEE0219","commentVerticalBarColor6":"#FF00B925","commentVerticalBarColor7":"#FFEE4602","crosspostIconTint":"#FFFF1868","currentUser":"#FF00D5EA","dividerColor":"#FF69666C","downvoted":"#FF007DDE","fabIconColor":"#FF261811","flairBackgroundColor":"#FF00AA8C","flairTextColor":"#FFFFFFFF","fullyCollapsedCommentBackgroundColor":"#FF000000","isAmoledTheme":true,"isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface":false,"isDarkTheme":false,"isLightNavBar":false,"isLightStatusBar":false,"isLightTheme":false,"linkColor":"#FFE5A477","lockedIconTint":"#FFEE7302","mediaIndicatorBackgroundColor":"#FFFFFFFF","mediaIndicatorIconColor":"#FF000000","moderator":"#FF00BA81","name":"Jerboa Amoled ","navBarColor":"#FF000000","noPreviewPostTypeBackgroundColor":"#FF424242","noPreviewPostTypeIconTint":"#FF808080","nsfwBackgroundColor":"#FFFF1868","nsfwTextColor":"#FFFFFFFF","postContentColor":"#B3FFFFFF","postIconAndInfoColor":"#B3FFFFFF","postTitleColor":"#FFFFFFFF","postTypeBackgroundColor":"#FFE5A477","postTypeTextColor":"#FF000000","primaryIconColor":"#FFE5A477","primaryTextColor":"#FFE5A477","readPostCardViewBackgroundColor":"#FF000000","readPostContentColor":"#FF979797","readPostTitleColor":"#FF979797","receivedMessageBackgroundColor":"#FF4185F4","receivedMessageTextColor":"#FFFFFFFF","secondaryTextColor":"#B3FFFFFF","sendMessageIconColor":"#FF4185F4","sentMessageBackgroundColor":"#FF31BF7D","sentMessageTextColor":"#FFFFFFFF","singleCommentThreadBackgroundColor":"#FF123E77","spoilerBackgroundColor":"#FFEE02EB","spoilerTextColor":"#FFFFFFFF","stickiedPostIconTint":"#FF0336FF","submitter":"#FFEE8A02","subreddit":"#FFE5A477","subscribed":"#FFFF1868","tabLayoutWithCollapsedCollapsingToolbarTabBackground":"#FF000000","tabLayoutWithCollapsedCollapsingToolbarTabIndicator":"#FFE5A477","tabLayoutWithCollapsedCollapsingToolbarTextColor":"#FFE5A477","tabLayoutWithExpandedCollapsingToolbarTabBackground":"#FF000000","tabLayoutWithExpandedCollapsingToolbarTabIndicator":"#FFE5A477","tabLayoutWithExpandedCollapsingToolbarTextColor":"#FFE5A477","toolbarPrimaryTextAndIconColor":"#FFE5A477","toolbarSecondaryTextColor":"#FFE5A477","unreadMessageBackgroundColor":"#FF123E77","unsubscribed":"#FF0336FF","upvoteRatioIconTint":"#FF0256EE","upvoted":"#FFE5A477","username":"#FF606650","voteAndReplyUnavailableButtonColor":"#FF3C3C3C"}

[-] bappity@lemmy.world 203 points 9 months ago* (last edited 9 months ago)

if the US actually re elect him they're fucked

94
submitted 9 months ago by bappity@lemmy.world to c/risa@startrek.website

me when

15
submitted 10 months ago* (last edited 10 months ago) by bappity@lemmy.world to c/marvelstudios@lemmy.world

SEASON 2 SPOILERS

Just curious if anyone has different thoughts on this. My current thoughts are:

SACRED TIMELINE (and its branches) - An infinite number of universes. It has at least one universe for each possible moment in time. You can take anything from those universes (or "branches") without affecting the others because each one is physically its own entity.

Traveling through them is not really traveling through time; it's more like traveling a long distance to other universes that are just following similar paths of development.

TVA TIMELINE - A single universe (or some kind of expanse? Probably not a "universe"). It's one single entity. New branches (other universes/expanses, separate entities) will not form from it for some reason, so the only kind of time travel possible would be dynamic (actual time travel, not just hopping across universes).

If you take something from its past, the entire future will change. Some examples from season 2: when Loki crashes into the chrono bay window, breaks the monitor, and cracks the floor. When he timeslips back to his point in time, the crack was apparently always there. Another example: when Loki talks to O.B. in the past, and O.B. in the future recalls that it happened.

I think that the expanse that the TVA is in encompasses the sacred timeline, so dynamically traveling to the past of the TVA is also dynamically traveling to the actual past of the sacred timeline.

61
submitted 11 months ago by bappity@lemmy.world to c/casualuk@feddit.uk

only in the UK...

[-] bappity@lemmy.world 157 points 11 months ago

if this is true I might actually stop being lazy and mess with Linux for my personal systems

121
submitted 11 months ago by bappity@lemmy.world to c/risa@startrek.website
217
IT'S THE WEEKEND (lemmy.world)
submitted 11 months ago by bappity@lemmy.world to c/risa@startrek.website
[-] bappity@lemmy.world 137 points 1 year ago

every day I'm glad I switched to firefox

[-] bappity@lemmy.world 289 points 1 year ago

twitter blue subscribers can now hide the entire reason they spent money on it in the first place

[-] bappity@lemmy.world 179 points 1 year ago

GOOD, hope they win

view more: next ›

bappity

joined 1 year ago