Preference Alignment on Diffusion Model: A Comprehensive Survey for Image Generation and Editing

Welcome any citation! 🎉

Created: 2025-02-09 · Updated: 2025-02-09 · 1 min · Martin

Kattis Rank Climbing Notes

Martina DNA The core thinking is Sliding Window Algorithm. int findMinSubstringLength(const vector<int>& s, const unordered_map<int, int>& requiredCounts) { unordered_map<int, int> windowCounts; int minLength = INT_MAX; int left = 0, right = 0; int satisfied = 0; while (right < s.size()) { int rightInt = s[right]; if (requiredCounts.find(rightInt) != requiredCounts.end()) { windowCounts[rightInt]++; if (windowCounts[rightInt] == requiredCounts.at(rightInt)) { satisfied++; } } while (satisfied == requiredCounts.size()) { minLength = min(minLength, right - left + 1); int leftInt = s[left]; if (requiredCounts.find(leftInt) != requiredCounts.end()) { windowCounts[leftInt]--; if (windowCounts[leftInt] < requiredCounts.at(leftInt)) { satisfied--; } } left++; } right++; } return minLength == INT_MAX ? -1 : minLength; }

Created: 2023-11-05 · Updated: 2023-11-05 · 1 min · Martin

Use of MapEntry in Java

I met Map.Entry for many times when I was fighting with Leetcode. However, I did not understand it and it always confused me. I studied it today and write down to record it for myself. (:Click here for java documention:) Map.Entry is a internal interface of Map. It provides more convenient method for outputing key-value pair. How do we output key-value pair of a Map generally? First, get all keys as a set Second, iterate to get every value according to keyset. If we have Map.Entry, we will get key and value at meantime. ...

Created: 2023-02-04 · Updated: 2023-02-04 · 1 min · Martin

Haskell

Stack A modern, cross-platform build tool for Haskell code.

Created: 2023-01-20 · Updated: 2023-01-20 · 1 min · Martin

Download APache Maven on MacOS

I finally got maven installed, and the steps were generally easy, but I stepped in a few holes, I’ll record them. Download APache Maven Website📡: Apache-Maven Choose Binary zip archive and download it. Unzip the zip archive I unzip it into /Libaray on my computer. Configuration vi .bash_profile Add 2 lines into this profile export M2_HOME=/Library/apache-maven-3.8.7 // Or you can choose your own path and folder export PATH=$PATH:$M2_HOME/bin Then, type :wq, save and quit vim. ...

Created: 2023-01-19 · Updated: 2023-01-18 · 1 min · Martin