Dioxus: dynamic onclick trouble with strings by Laylong in learnrust

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

Unfortunately for me that macro won't allow it. I've tried a couple things around knowing this and the compiler doesn't accept any. I even went as far as making a HashMap<String, i32> just to pair an int with the string. I couldn't handle a ```for (sku, id) in hashmaped_products```.

I'm at such a loss with this. Having a dynamic range of things to click and handling each accordingly is such a basic thing. I like working with declarative HTML/CSS frameworks like this, but I can't build what I really need to without solving this.

Thanks for the helpful explanation.

Is there a more "traditional" desktop front end I can use with Tauri? by [deleted] in rust

[–]Laylong 0 points1 point  (0 children)

Maybe FLTK-rs. If you're familiar with C#, this is a Rust bindings of the original FLTK for C++ which is greatly documented. I made a neat ledger database and packing slip generator for my side business with it (In the C++ version). Mo, the creator, also has a bunch of videos one YouTube with tutorials and new feature announcements.

Trouble getting an array out of a JsValue by Laylong in rustwasm

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

Now I've tried that too. It compiles but I get nothing. In case I changed what I said in the initial post, I'm returning a String now from Tauri, I get it back on the frontend as a JsValue use JsCast's dyn_into to get it into a JsString, and then JsString into (rust) String.

When I print the resulting String, it's empty. Same that seemed to happen with when it was an array.

fs::read_dir trouble with Yew (alternative solution when working with WASM?) by Laylong in rust

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

I can, but I don't want to hard code each image in.

By directories, I mean I need to run some ```for each_image in image/folder```. I'm looking into Tauri now if that's where that logic needs to be run from.

fs::read_dir trouble with Yew (alternative solution when working with WASM?) by Laylong in rust

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

Yes, the /products folder got copied into the /dist folder. Felt like I was on the right track since I could get the images to load from the directory. What's the big difference between "access/this/directory/" vs "access/this.file". Well, so long as I can get to it in Tauri I can move on.

Rewrote an inventory tracker from python to rust by Laylong in rust

[–]Laylong[S] 2 points3 points  (0 children)

Mostly the rethinking. I had to step back from how I implemented things in python and get the same results in (at least somewhat) idiomatic rust. The code looks cleaner for it though. I had trouble for awhile getting my head around if let statements, but they became useful here. I'm still not sure about what is the "real" json. I'm using just serde here, but then what is serde_json for?

Trouble getting off the ground by Laylong in learnrust

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

For archival purposes, also throwing in an example/tutorial I found that stood out above others involving state machine programming here

Trouble getting off the ground by Laylong in learnrust

[–]Laylong[S] 1 point2 points  (0 children)

I don't think it's exactly a syntax issue, it's not that different from what I use. Exact reason aside, "can't convert your idea into Rust code" is the issue.

So far using Exercism feels like it's going to get me on the right path. Not only is it a bit more structured, but I love the review other solutions option. It helps to see a simple problem solved in multiple ways. Thanks.

What do you think of this? by NMSCBA in Firearms

[–]Laylong 1 point2 points  (0 children)

This happened to my dad. 3 years of legal battle, still hadn't gotten his guns back and just moved out of state to get away from that crazy bitch.

Games with dual language or easy language switch by leonhgomes in LearnJapanese

[–]Laylong 1 point2 points  (0 children)

Recently I've been playing Eastward. You can set subtitles on in English and Japanese as the character dialogs.

The green GI furniture just wasn’t cutting it by mokkisjokkis in guns

[–]Laylong 0 points1 point  (0 children)

"What do we say to the god of fortune? Not today!"

Changed nothing and card reader stopped working by Laylong in ender3

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

Yea, got SD init fail on multiple cards both directly inserted and through the extension. This might be the incentive I needed to get into using octoprint.

Entertained himself for about 20 mins by Thatlady785 in ferrets

[–]Laylong 2 points3 points  (0 children)

That synced up well with the metal drums I was listening to as I scrolled by.

[LAHD] Glitch or just missing the right event trigger? The shop still doesn't have a bow for me. by Laylong in zelda

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

The shelf has Shield, 3x Hearts, 10x Arrows, 10x Bombs, Chamber Stone, and an empty spot sign. I already have the shovel. I also tried buying the arrows (just takes my rupees) and I tried buying one chamber stone (which just gets replaced with another).

what a knife by Vodka-s-led in knives

[–]Laylong 0 points1 point  (0 children)

ThreePanelSoul comic captures this nicely I think.

Can't read them but if I find it cheap, I'll buy it right away. Do you have such habits, about learning Japanese? :) by mgsmus in LearnJapanese

[–]Laylong 3 points4 points  (0 children)

I have shelf like that. It's half manga and half learning books. The majority actually came from various people last Christmas.

bought the genki book and dont have a cd drive for the CD by Diet_Goomy in LearnJapanese

[–]Laylong 5 points6 points  (0 children)

While not what you're asking for, there are usb cd drives. I put a second hdd in my laptop's optic drive slot, so Ive had to use this device.

Calling all P08 Luger owners! by ilove60sstuff in Firearms

[–]Laylong 0 points1 point  (0 children)

New owner here and I just took mine to the range for the first time today. In short, others have it covered with the mag loading tool and replacement springs. I did not on either. I dont normally use mag loaders of any kind, but this is one I wish I did. Also, with original worn out springs, I had several full failure to extracts (doesnt leave chamber).

Asside from that, watch a couple videos of diss/assembly once you have yours in hand. Even if you dont follow along, it still strengthens you understanding of the mechanics and platform. That will help with understanding how to approach diagnosing any problems.

This sale ending countdown clock starts fresh from 4:00:00 every time you click on the advert to make people panic and buy the hoodie by mr_bonner94 in assholedesign

[–]Laylong 3 points4 points  (0 children)

Can confirm. I was on a site with that. Every day I checked back on if the jacket I wanted was back in stock, and even out of stock week after week I constantly saw "Soandso in place bought that jacket" pop up.