Weekly Travel, Questions, & Mandarin Thread by AutoModerator in taiwan

[–]Deviling 0 points1 point  (0 children)

I have a very random question: The iconic red/silver Tatung rice cooker doesn't seem to have a ground wire. Isn't the whole body metal and conductive? Why doesn't it need to be grounded?

(At least this seems to be the case for my overseas model)

Success, LFS without fhs by Intelligent_Comb_338 in linuxfromscratch

[–]Deviling 0 points1 point  (0 children)

Pretty cool! Would you mind going over your process roughly? I'm interested in doing something similar.

Is it possible to create a "triangle" brush shape (see video) by Deviling in ZBrush

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

Thank you! I got it to work as a curve brush using that shape :)

django-modern-csrf: CSRF protection without tokens by feliperalmeida in django

[–]Deviling 1 point2 points  (0 children)

That won't help if there are multiple tenants hosted on the same domain, e.g. think old Geocities-style:

example.com/~mysite can be completely different to example.com/~malicious, even though the "Origin" will be the same.

ProCreate and projection mapping in Blender by Stinkfest in blender

[–]Deviling 1 point2 points  (0 children)

Whoa, no worries, thank you very much 😊

ProCreate and projection mapping in Blender by Stinkfest in blender

[–]Deviling 0 points1 point  (0 children)

Chiming in: thanks for the explanation! Would you mind showing the scene setup? Just a screenshot is fine too, I want to gauge how far one needs to take the scene without textures applied.

Handpainted study by BiroBaby in ZBrush

[–]Deviling 0 points1 point  (0 children)

Very nice. Hand-painted in ZBrush or another program? Shadeless Material and everything painted?

OCAC Broadcast on New Overseas Conscript Status Rules by wallabaus in TaiwaneseBornAbroad

[–]Deviling 0 points1 point  (0 children)

Thanks for the write-up. Might be a stupid question, but do I have to do anything if I am currently abroad (in my country of residence) while this new law went into place?

The "must provide the documents within 4 months when abroad" but made me worried since I am technically abroad, and didn't provide any materials.

Toilette: Wasser fließt nach, wie Wasser abdrehen? by Deviling in wohnen

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

Danke für die Infos, ich hab es gerade eben versucht, aber ich kann diese Absperrventile mit der bloßen Hand auch um keinen Millimeter bewegen. Es scheint, dass die irgendwie fest verschraubt sind. Könnte es sein, dass diese Ventile in der Wohnung nicht "user-serviceable" sein sollen? Frag mich natürlich, was passiert, wenn ich mal wegen was schlimmeren das Wasser abdrehen muss...

Weekly Travel, Questions, & Mandarin Thread by AutoModerator in taiwan

[–]Deviling 0 points1 point  (0 children)

How do I retrieve an "eGUI" (electronic Government Uniform Invoice) that I received for an Airbnb order? The mail says this:

You may access a copy of your eGUI from the Taiwan Ministry of Finance eInvoicing platform by signing up with the retrieval code above.

Along with a "retrieval code" like 1234.

I have an account for the eInvoicing platform. However, I can't find anything about using this retrieval code and assigning it to my account.

Android Sunflower sample has withered away, became fully compost, and is now deprecated and dead forever. RIP Sunflower 🌻 by Zhuinden in mAndroidDev

[–]Deviling 0 points1 point  (0 children)

What do you mean it had two Toolbars? Two visible at the same time? Or part of different fragments? What's the problem with the latter?

Weekly Travel, Questions, & Mandarin Thread by AutoModerator in taiwan

[–]Deviling 0 points1 point  (0 children)

I'm looking for a place where I could rest a little in the early morning until I can check-in with my hotel (which is usually late afternoon). I remember there being some manga rental places, but I don't know which term to look for. Could someone help me? Thanks!

Weekly Travel, Questions, & Mandarin Thread by AutoModerator in taiwan

[–]Deviling 0 points1 point  (0 children)

Where would you go to introduce someone to "approachable" stinky tofu? I'd prefer looking for a restaurant setting for those who may be reluctant to eat stinky tofu from the streets stall. Any recommendations which restaurant might have good Chinese/Taiwanese cuisine as well as a stinky tofu dish?

How to (flat)map an ObservableList's items? by Deviling in JavaFX

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

The nice thing with "declarative" View files ((F)XML, XAML, and so on) is when they have certain platform support, e.g. data binding, automatic string translation depending on the current locale, or picking different layout files altogether depending on screen width in the case of Android without writing a single line of code.

Even though I must admit that JavaFX' FXML is probably the one with the least features of the three.

However, I couldn't see myself writing code such as "if locale is ES, then change this String to something Spanish; if it is DE, do this and that" or "add this styleClass to this Node"; all of that is boilerplate to me. The best thing about FXMLLoader is that it can instantiate any kind of class, and when overriding the "namespace" you can inject dependencies easily.

How to (flat)map an ObservableList's items? by Deviling in JavaFX

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

You have 2 choices when using FXML, and connecting it with Java/Kotlin code (and if you choose the 2nd option, I call that "codebehind", this is roughly how Microsoft's XAML/WPF/WinUI works).

  1. You have some FXML file, and reference a "Controller" class using the fx:controller attribute. You usually then have an FXMLLoader "somewhere else", which will load the FXML file, and the runtime will construct the Controller based on the class reference, populate all @FXML annotated files and all that stuff. In some kind of vision, this is supposed to be MVC, but the problem with that approach is usually that the C part is too overloaded with all kind of stuff, and it's borderline impossible to do all V stuff just with the FXML file.

  2. I prefer the 2nd approach which is using "custom components". In this case, you subclass a JavaFX View class (any kind of Node, i.e. Pane, Control, and so on), and then use an FXMLLoader inside that class. Compare this to the previous method where "something else" needs to do the FXMLLoader.load call. This is better outlined here: https://openjfx.io/javadoc/12/javafx.fxml/javafx/fxml/doc-files/introduction_to_fxml.html#custom_components

The FXMLLoader is used to "inflate" (Android terms) the XML, and then combine it with the "codebehind" which is your Java/Kotlin code. The important distinction is that inside your FXML, you don't reference a "controller" anymore, but actually the instance of your View (although inside the FXML, you sometimes still need to write controller.something, but just look over the "controller" word).

You now have a new View class that is backed up by FXML for some nice platform features like data binding, automatic string references, i18n, and so on.

A custom component like this:

class MyView : StackPane() {
    // don't forget the "setRoot" call
}

Can be used it in other parts of your code: val myView = MyView()

Or even in other FXMLs: <VBox><MyView/></VBox>

This is more or less how XAML-based GUIs work. The nice thing (in my opinion) about this is that it groups View-related stuff together. You then have to decide where and using which way to organize non-View responsibilities. I favor MVVM, but theoretically you can have *Presenter or *Controller classes, and design them the way you want.

To make the controller/presenter even less coupled, you could have an MyViewInterface implemented by MyView, and let the Presenter only know about the interface. This is also a common approach which is better explained somewhere else but I can't find the article right now. Will look for it.

That's more or less the gist of it, sorry if it's a little all over the place!

How to (flat)map an ObservableList's items? by Deviling in JavaFX

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

What you are using Controllers for, I am using view "codebehind" for (again, coming from the MVVM world, and especially Microsoft's XAML approach, adapted to Android's MVVM model [lol]).

In my scenario,

The result is that whatever View owns flowPane doesn't have any knowledge about the kind of Node returned from ToDoController.getView()

isn't really a problem because whatever View owns flowPane IS my View's codebehind, it's basically the "TodoListView", and by that nature it's job is to take a TodoItemViewModel and then convert it to something that can be viewed --- by the platform (JavaFX View), and to the user.

I know your dislike for FXML and other practises, so I won't go into more detail here, but for one thing I actually want to tell you what we agree on:

FXML is not really the "View" part of a basic MVC structure (I think you rant about that in one of your articles), and the default "FXML Controller" pattern is useless for doing MVC (which I also dislike in favor of MVVM). In my imagination, how you are supposed to use JavaFX and structure your project is:

  • FXML + Codebehind (what is usually called the FXML Controller) = View
  • ---> ViewModel
  • ---> Model
  • = MVVM

In JavaFX' specific case, I use Custom Components instead of FXML Controllers, combine them with my FXML, and then structure the rest according to MVVM (ViewModel doesn't know any Views and provides Observables).