2025.01.22 13:50 MathieuJay Fully paying the rent before moving in ?
I'm coming to Tokyo for 3 months for an internship and i have have been looking at share houses.
I found one pretty cool but the owner wants me to pay the full rent (cleaning feas, initial feas, rent for three month) Which adds up to a total 325 000 yen before I even arrive there (the rent will be starting in April)
In my country this would totally means that it's a scam, is it normal in Tokyo ?
submitted by MathieuJay to TokyoTravel [link] [comments]
2025.01.22 13:50 ex-toker Here we go again…
Today is day one for me “again” I struggled with withdrawal and paws and made it 1.5 years out, Until about July this year when a couple drags off a joint snowballed an avalanche of non stop use. I will be smarter this time and never cave again.. ngl wd has me terrified but my family and myself deserve a better version of me than this!
submitted by ex-toker to leaves [link] [comments]
2025.01.22 13:50 bastardone99 Wtf how much do i need to wait
guys i shipped out my haul on 9 of january how long before it arrives (italy) submitted by bastardone99 to AllChinabuy [link] [comments] |
2025.01.22 13:50 Atom1cThunder Work in progress, how can I improve?
submitted by Atom1cThunder to InfinitePainter [link] [comments] |
2025.01.22 13:50 S1r_Cyndaquil Yay!
I just want to thank everyone that I've traded with and the friends that gave me the relics. submitted by S1r_Cyndaquil to FischRoblox [link] [comments] |
2025.01.22 13:50 AnonTrann Broken Shower Cartridge?
Long story short, I accidentally stripped down the rod my shower handles screw into. Not sure how to fix it, any advice is appreciated Pictures for context, I unscrewed my working handle for comparison submitted by AnonTrann to Plumbing [link] [comments] |
2025.01.22 13:50 megaman2777new Kenzie Craig
submitted by megaman2777new to Girls_With_Muscles [link] [comments] |
2025.01.22 13:50 BornMath5588 Jet To Japan for Inkcident
submitted by BornMath5588 to MonopolyGoTrading [link] [comments] |
2025.01.22 13:50 Goddess_NickiB Be a good boy and send for my morning matcha latte 🫴🏾💸
submitted by Goddess_NickiB to findommes [link] [comments] |
2025.01.22 13:50 whatifmagcryakorn Savings account: online app does not reflect my deposited money
Adult things naman to siguro kasi I opened my first savings account as a working adult (try to segregate my finances para di isang swipe and withdraw). But me is kinda panicking kasi I just opened BPI Debit and nag hulog lang ako ng 3k for the maintaining balance tapos sa BPI APP sabi zero balance daw ako, should I panic is this normal? HELPPPP
submitted by whatifmagcryakorn to adultingph [link] [comments]
2025.01.22 13:50 calmest Experiment: Using Deepseek R1 Model to Translate an Old Java File to Clojurescript
Below I have pasted the reasoning trace for this new model that I engaged in this task. I believe that many of you may find this interesting to see how this system talks to itself about solving this task. This model, for those of you not following AI, is a ground breaking Chinese reasoning model that challenges OpenAI's perceived dominance, but as fully open source. If this isn't your cup of tea please spare me your snide remarks and just move on. Thanks.
The Java file was written about 10 years ago for the CGScholar education research platform. It used Wicket, a micro web framework that had a smallish following at the time. This part of the code base would take in a lot of pre-processed student performance data across custom metrics and pass that on to Javascript code that rendered an aster plot that visualizes performance. This is just the Java data munging code for that feeds the Javascript. This type of student feedback is called formative assessment, as opposed to summative assesments like a class grade or a final exam.
This model produces its "thinking" as it is working through the problem to generate the final response (see the end). The response is the part we all usually see as the output from an AI. The thinking traces are usually accessible but not quite in this way.
You can access this model for free via a chat interface at Deepseek's site. You can also use their API for about 5% of the cost of using OpenAI's o1 models. This model is on par with o1 in many ways, so it is a significant blow to OpenAI's dominance, and it is open source. If you have not been listening to the happenings of this week with the release of this model, you may not realize the significance of all of this.
What I found interesting is that you can see how the model approaches the problem, what it thinks it needs to figure out, and how it formulates the end response. You can then look at the code it produces. I have been using AI now for many months with a full Clojure stack. I have had decent success but it is definitely more proficient with more mainstream stacks. Still ...
Trace:
Okay, so I need to translate this Java code into ClojureScript. Let me start by understanding what the original Java code does. It looks like a settings bean for some educational analytics system, handling metrics for publishers. There are a lot of fields for weights, targets, include flags, and methods to generate scores and visualizations.
First, I notice the Java class has a lot of data members with getters and setters. In ClojureScript, I can represent this as a record or a map. Since Clojure is immutable, using a record with defrecord might be appropriate, but given that the original class has mutable state (like the _surveyscores HashMap), maybe using atoms for those parts would help. But since the user wants to stub dependencies, maybe I should focus on the structure first.
The Java code uses a lot of static arrays and colors. In ClojureScript, I can define these as constants using def. The _colors array can be a vector of strings. The other static strings like _knowledgeSurveyColor can also be def'ed.
Next, the data members. The original class has a bunch of private fields with primitive types and some objects like HashMap. ClojureScript uses persistent data structures, so I'll convert HashMaps to regular maps. For example, _surveyscores is a HashMap
The methods in the Java class are quite involved. The generateScores method processes a list of metrics beans and calculates scores. Translating this will require handling mutable state, like the tmp, tmpv, tmpstd arrays. In ClojureScript, I can use atoms for these if necessary, but since Clojure encourages immutability, maybe restructuring the code to pass state around would be better. However, given the complexity, using atoms might be a pragmatic approach for the translation, especially since the original code uses synchronized blocks and locks, which aren't directly applicable in ClojureScript.
The generateLegend method builds an HTML string. In ClojureScript, I can use Hiccup-like syntax or functions that return React elements if using Reagent, but since the user wants ClojureScript specifically, maybe using strings with str and format functions.
Another thing is the use of Java's ArrayList and other collections. ClojureScript uses persistent vectors and lists, so I'll replace those with vectors. For example, List
The Comparator used in getMetricsVizStringsFromList can be translated into a Clojure function that compares two beans based on position and display label.
The toJSON method in Java constructs a JSON string manually. In ClojureScript, it's more idiomatic to use data structures and then convert them to JSON using js/JSON.stringify or a library, but since the original code builds the string directly, I might replicate that using str and functions, but perhaps a more Clojure-like approach would be better, using maps and converting them to JSON.
Now, considering dependencies: the original Java code imports several classes from Java and other packages. The user wants these stubbed. For example, ScholarSurveyScoresPerDepid and ScholarUserDAO. I can define these as empty records or vars with stub functions. For instance, ScholarUserDAO/getUserById_DSSCG can be a function that returns a placeholder.
Concurrency: The original code uses synchronized blocks with a lock object. ClojureScript runs on the JS runtime, which is single-threaded, so those locks might not be necessary. However, if the code is meant to be thread-safe, in ClojureScript, using atoms or agents might help, but given that it's a translation, maybe those parts can be simplified or omitted, with a note.
Documentation: The user wants the code to be documented for easier transition. So adding comments explaining what each part does, especially where the original Java code had certain functionalities, and noting where stubs are placed.
Let me outline the steps:
1. Define the constants (colors, survey colors) as defs.
2. Create a record for the settings bean, including all the fields from the Java class.
3. Stub the dependencies like ScholarSurveyScoresPerDepid, ScholarUserDAO, etc., as Clojure functions or records.
4. Translate each method into ClojureScript functions. For instance, generate-scores would take the bean and the list of metrics beans and return updated state.
5. Handle mutable state: Since Clojure is immutable, I'll need to return updated versions of the bean where necessary. Alternatively, use atoms if the state needs to be shared, but given that the original class is a bean, perhaps using a map and updating it via assoc would be better.
6. Replace Java-specific constructs like ArrayList with vectors, HashMap with Clojure maps, etc.
7. Implement the HTML generation functions using string manipulation or Hiccup-style if possible.
8. Test each function for correctness, ensuring that the logic matches the Java code.
Potential issues to watch out for:
- Java's static variables: In ClojureScript, these are just defs, so that's straightforward.
- Mutable fields in the Java class: Need to translate these into Clojure's immutable structures, possibly using atoms if mutation is necessary.
- Concurrency with locks: Since ClojureScript is single-threaded, maybe remove the locks or replace with appropriate concurrency primitives if needed, but likely they can be omitted.
- Type casting and checks: Java is strongly typed, ClojureScript is dynamic. Need to ensure that functions receive the correct types, or add assertions if necessary.
Now, starting with the namespace and dependencies:
(ns CGDSSVisiLearnPubSettingsBean
(:require [clojure.string :as str]))
Then, define the stubs for ScholarSurveyScoresPerDepid, ScholarUserDAO, etc. For example:
(defrecord ScholarSurveyScoresPerDepid [])
(defn get-score-for-user [survey-scores username]
;; Stub implementation
0.0)
(defn get-user-by-id [user-id]
;; Stub for ScholarUserDAO/getUserById_DSSCG
nil)
Then, define the colors and constants:
(def ^:const colors ["#9E0041", "#C32F4B", "#E1514B", ..., "#1E0326"])
(def knowledge-survey-color "#999999")
(def info-survey-color "#555555")
(def cust-metric-color "#00FF00")
Next, the main record. Since Clojure records can't have mutable fields, I'll represent the bean as a map, and functions will take the map as an argument and return an updated map. For example:
(defrecord CGDSSVisiLearnPubSettingsBean [publisher-id publisher-name
focus-wt num-commts-on-admin-upds-wt
;; ... all other fields
custom-metric-settings
;; ... other fields like _surveyscores, tmp, etc.
])
But since the original Java class has many fields, maybe using a map is more manageable. Alternatively, use a record with all the fields. However, given the number of fields, a record might be cumbersome. Alternatively, group related fields into nested maps.
But perhaps the best approach is to translate each field into a key in a Clojure map. For example, the Java class's PublisherId becomes :publisher-id in the map.
The methods can be translated into functions that take this map as an argument and return an updated map. For example, the generate-scores function would take the settings bean and the list of metrics beans and return a new settings bean with updated tmp, tmpv, etc.
But in the Java code, generateScores modifies the tmp, tmpv, tmpstd arrays, and the _surveyscores map. Since Clojure is immutable, these would need to be part of the bean's state. So, the bean would include these as keys in the map, and each function would return a new map with updated values.
For example, the initial bean would have :surveyscores as an empty map. When generate-scores is called, it would check if :surveyscores is empty and populate it by calling the stub functions.
The tmp, tmpv, tmpstd arrays can be stored as vectors in the bean map. So, the bean would have keys :tmp, :tmpv, :tmpstd, which are vectors.
The Java code's synchronized blocks can be ignored in ClojureScript, as there's no direct equivalent, and JS is single-threaded.
Now, translating the generateScores method. This method processes each CGDSS_VisilearnMetricsBean in the list, calculates scores, and updates the tmp arrays. In Clojure, this would involve:
- Iterating over each metrics bean.
- For each metric, calculate the values and update the tmp arrays.
- Since Clojure data is immutable, each step would create new vectors for tmp, tmpv, etc.
But given that the original Java code uses loops and updates arrays in place, translating this into a reduction or loop with accumulators would be needed.
For example, the Java code:
for (CGDSS_VisilearnMetricsBean vlbwrk : vlbswrk) {
// process each bean and update tmp, tmpv, etc.
}
In Clojure, this could be a reduce over the vlbswrk list, accumulating the tmp, tmpv, tmpstd vectors.
But considering the complexity, maybe breaking it down into helper functions would help.
Another challenge is the custom metrics processing. The Java code loops through CustomMetricSettings and processes each bean. In Clojure, this would be a map or reduce over the custom metrics.
Also, the use of System.out.println can be replaced with js/console.log.
The generateLegend method builds an HTML string. In ClojureScript, this can be done using a string buffer, similar to the Java code, using str and format functions.
The toJSON method in Java constructs a JSON string manually. In Clojure, it's better to construct a Clojure data structure (map) and convert it to JSON, but since the original code builds it as a string, perhaps replicating that approach with str and functions like (str "\"PublisherId\":" publisher-id ",") etc. But a more idiomatic way would be to create a map and serialize it.
However, the original Java code's toJSON is very long and error-prone. Translating it directly would be tedious. Alternatively, use Clojure's data structures and let the JSON conversion handle it. For example, the custom-metric-settings-to-json function can map over the custom metrics and convert each to a JSON string.
But given the original code's approach, perhaps it's better to follow a similar structure, using a string buffer.
In summary, the main steps are:
1. Define stubs for dependencies.
2. Translate the data members into a Clojure map or record.
3. Convert each method into a function that takes the map and returns an updated map.
4. Handle mutable state by including all necessary fields in the map and updating them immutably.
5. Replace Java collection classes with Clojure equivalents.
6. Translate loops and conditionals into Clojure's loop/recur, reduce, map, etc.
7. Test and verify each function's logic against the original Java code.
Potential issues to handle:
- The original code uses a lot of mutable state (tmp arrays, _surveyscores, etc.). Need to model these as part of the bean's state.
- Java's static initializations: The colors array is static; in Clojure, this is a def.
- Concurrency: The synchronized blocks can be omitted, but need to ensure that functions are pure and state is managed correctly.
Now, let's start writing the ClojureScript code with these considerations.
Final Output:
Here's a ClojureScript translation of your Java code with detailed documentation and stubs for dependencies. I've focused on structural translation while adapting to Clojure idioms:
```clojure
(ns CGDSSVisiLearnPubSettingsBean
(:require [clojure.string :as str]
[clojure.walk :as walk]))
;; ==================================================
;; Dependency Stubs (To be implemented/replaced later)
;; ==================================================
(defrecord ScholarSurveyScoresPerDepid [scores])
(defrecord ScholarUserBean [user-name])
(defrecord CGDSS_VisilearnMetricsBean [])
(defrecord CGDSS_VisilearnCustomMetricsSettingsBean [])
;; Stub implementations for dependencies
(defn ScholarUserDAO-getUserById_DSSCG [user-id]
(->ScholarUserBean (str "user-" user-id)))
(defn get-all-scores-for-survey-type [bean]
(->ScholarSurveyScoresPerDepid {}))
;; =====================
;; Constants and Config
;; =====================
(def ^:const colors
["#9E0041" "#C32F4B" "#E1514B" "#F47245" "#FB9F59" "#FEC574" "#FAE38C"
"#EAF195" "#F9EE82" "#C7E89E" "#9CD6A4" "#6CC4A4" "#4D9DB4" "#4776B4"
"#0B5670" "#00334D" "#5E4EA1" "#4C0B5F" "#330A40" "#2A0033" "#1E0326"])
(def knowledge-survey-color "#999999")
(def info-survey-color "#555555")
(def cust-metric-color "#00FF00")
;; ==============================
;; Main Data Structure (Protocol)
;; ==============================
(def default-settings
{:publisher-id -1
:publisher-name ""
:focus-wt -1
:surveyscores (atom {})
:custom-metric-settings nil
:cmstoind (atom {})
:gradebook-settings nil
;; ... (Include all other fields from Java class with appropriate defaults)
})
;; ======================
;; Core Implementation
;; ======================
(defn create-settings-bean []
(atom default-settings))
(defn has-gradebook-settings? [settings]
(-> u/settings :gradebook-settings some?))
(defn get-gradebook-settings [settings]
(or (:gradebook-settings u/settings)
(when-let [metrics (:custom-metric-settings u/settings)]
(let [gb (first (filter #(= (:metric-type %) :gradebook) metrics))]
(swap! settings assoc :gradebook-settings gb)
gb))))
(defn remove-custom-metrics-marked-for-deletion [settings]
(swap! settings update :custom-metric-settings
(fn [metrics]
(->> metrics
(remove :mark-for-deletion)
vec))))
(defn add-custom-metric-setting [settings bean]
(swap! settings update :custom-metric-settings
(fn [metrics]
(conj (or metrics []) bean))))
;; ===========================
;; Score Generation Functions
;; ===========================
(defn- calculate-metric-score [target actual]
(min 100 (* 100 (/ actual target))))
(defn generate-scores [settings metrics-beans set-total-score?]
(let [settings-map u/settings
;; Pre-load survey scores logic
_ (when (empty? @(:surveyscores settings-map))
(doseq [cmbean (:custom-metric-settings settings-map)]
(when (< (:metric-type cmbean) 2)
(swap! (:surveyscores settings-map) assoc
(:survey-id cmbean)
(get-all-scores-for-survey-type cmbean)))))
;; Initialize temporary arrays
cust-len (count (:custom-metric-settings settings-map))
arr-size (+ 21 cust-len)
tmp (vec (repeat arr-size 0))
tmpv (vec (repeat arr-size 0))
tmpstd (vec (repeat arr-size 0))]
;; Processing logic would go here
;; This is simplified - actual implementation would need to port the Java calculations
(swap! settings assoc
:tmp tmp
:tmpv tmpv
:tmpstd tmpstd)
settings))
;; =========================
;; Visualization Generation
;; =========================
(defn- format-tooltip [title score evaluation?]
(str "
2025.01.22 13:50 MyWholeChild1 Effective Treatments for Hemosiderin Staining
Hemosiderin staining, which appears as brown discoloration of the skin, is caused by the accumulation of iron from various medical diseases. This article examines effective hemosiderin staining treatment, including both traditional and new technologies as well as built-in causes and prevention strategies.
Understanding Hemosiderin Staining
When haemoglobin breaks down, a pigment called hemosiderin is produced. Damage to red blood cells releases iron, which can accumulate in tissues and cause discoloration. Hemostasis, chronic venous insufficiency and recurrent blood transfusions are among the conditions that may increase the risk of hemosiderin deposition.
Key Causes of Hemosiderin Staining:
CVI: Poor blood flow can cause increased pressure in veins, allowing blood and iron to escape into surrounding tissues.
Hemochromatosis: A hereditary condition that results in increased absorption of iron.
Trauma: As blood breaks down after injury, hemosidarine may also be deposited.
Diagnosing Hemosiderin Staining
Before starting treatment, it’s important to accurately describe the condition that causes hemosidarine staining. A healthcare specialist can perform a physical test and arrange a test like a blood test or imaging scan to diagnose the underlying problem. In some cases, a skin biopsy may be needed to confirm the appearance of hemosidarine.
Effective Treatments for Hemosiderin Staining
Treatment options for hemosidarine staining vary based on the underlying cause. Here are some effective strategies:
1. Addressing the Underlying Cause
The most effective strategy to manage hemosiderin staining is to address the underlying cause. For example:
CVI: Wearing compression stockings can increase venous circulation and decrease discoloration.
Hemochromatosis: Phlebotomy (blood removal) can help reduce iron levels in the body and prevent discoloration.
2025.01.22 13:50 Benni1401 Latest Look Around 2024 images in Italie, Norway and USA
submitted by Benni1401 to applemaps [link] [comments]
2025.01.22 13:50 ate_1267 Normal Vs Legendary
submitted by ate_1267 to StardewMemes [link] [comments] |
2025.01.22 13:50 EmotionalVictory188 Swifty Salute is ok.
I was just wondering exactly how many people and whom has done this.
submitted by EmotionalVictory188 to mildlyinfuriating [link] [comments]
2025.01.22 13:50 Reasonable_Bear_3348 EA of 154
I am applying to R2 FT MBA at CBS, Stern and Fuqua. I have a score of 154 on the EA (12I11V/11Q) and 107 on TOEFL. I have 3y of work experience + a CFA L1 (passed in 1st attempt). Should I retake the EA and send it to Stern and Fuqua?
submitted by Reasonable_Bear_3348 to MBA [link] [comments]
2025.01.22 13:50 ChefGaykwon Luxury bones
submitted by ChefGaykwon to okbuddycapitalist [link] [comments] |
2025.01.22 13:50 NukeouT He withdrew us from the Paris Climate Agreement AGAIN!!! 🤦🤦🤦
www.sprocket.bike/app submitted by NukeouT to SprocketApp [link] [comments] |
2025.01.22 13:50 Impressive-Paint-770 Can someone help me identify this kanji thank you
submitted by Impressive-Paint-770 to TrueChefKnives [link] [comments] |
2025.01.22 13:50 NewJapanMark95 1995 (Instrumental)
Sup everyone, I made this instrumental using the app called Remixlive. The sound pack I used for this beat is called Hip Hop. This is basically another old school type beat, kinda similar to the THROWBACK Instrumental i uploaded not too long ago. Enjoy and let me know what you think 👊 submitted by NewJapanMark95 to NewMusicPromotion [link] [comments] |
2025.01.22 13:50 Key_Improvement_2847 The Curious Case of Dylan Strome - Panic time?
Dylan Strome is currently sitting at 79% owned (-2), while holding the Line 1 and PP1 Centre position the #1 team in the Metropolitan division..yet he can't seem to do anything?
Strome started out the year like a mad man, and sure some regression was definitely due. But were you expecting his numbers to regress to this?? Strome has 2pts in his last 8 games, and his peripherals have gone down as well. Also, he is now for the first time projected to finish the season under a point per game.
Are we continuing to hold? I feel like he doesn't have any trade value because of his recent cold streak and we are stuck with him. What do you guys think?
submitted by Key_Improvement_2847 to fantasyhockey [link] [comments]
2025.01.22 13:50 Vermontbuilder Good morning to huddle by the old stove in my shop, minus 14 outside
submitted by Vermontbuilder to vermont [link] [comments] |
2025.01.22 13:50 sushisuzuki Trying to create a gallery wall in the entrance hallway, feedback appreciated
submitted by sushisuzuki to interiordecorating [link] [comments] |
2025.01.22 13:50 -TurkeYT sorry for this annoying post but can someone who plays Ark Mobile Ultimate on iPhone 12 tell me how good it is working? lag, fps drop etc.
Because I ordered a iPhone 12 and I know it is compatible but my old phone was too yet it had only 15-20 fps. I hope same won't happen with 12
submitted by -TurkeYT to playarkmobile [link] [comments]
2025.01.22 13:50 oleathebelle Hey there, I'm craving a REAL man to text with, not some boy my age! I'm talking about older, wiser, and much more experienced..trust me, I have the dirtiest fantasies you can imagine! An innocent face hiding a filthy, needy little SLUT who's DYING to talk dirty with a mature man!
submitted by oleathebelle to YoungerGirl4OlderMen [link] [comments]