#codeing — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #codeing, aggregated by home.social.
-
i have to switch one of my scripts to use
getoptsinstead of just acasestatement pray for me ;_; -
This is how I roll when I need to mark models as "completed", or anything else:
1. Allow the marking to be idempotent
2. If not idempotent, throw exceptions on duplicated calls
3. Save is opt-out, to avoid more than one update query.#Programming #PHP #Laravel #Database #DB #WebDevelopment #WebDev #SoftwareDevelopment #Software #Codeing #code
-
This is how I roll when I need to mark models as "completed", or anything else:
1. Allow the marking to be idempotent
2. If not idempotent, throw exceptions on duplicated calls
3. Save is opt-out, to avoid more than one update query.#Programming #PHP #Laravel #Database #DB #WebDevelopment #WebDev #SoftwareDevelopment #Software #Codeing #code
-
☑️ Day 19/100: #Leetcode daily question
🟨 Question: 670. Maximum Swap
The question was good and I was able to do it but went for the solutions tab because I was not feeling like solving anymore. The solution was using a greedy approach.
🐈⬛ Check out my #GitHub where I post all the daily streak 🔥 questions and #LeetcodeContest 🏆 solutions
🔗 Solution Link: https://github.com/akshatsingh1718/leetcode/tree/main/maximumSwap
🔗 My Leetcode Github: https://github.com/akshatsingh1718/leetcode
-
Check out my latest article: Is http://main.py == main.txt? 🐍💻 https://linkedin.com/pulse/mainpy-maintxt-akshat-singh-ux0yc
-
OKAY, so #Symfony question for you experts out there.
I have an entity that I'm using to store encrypted data in the DB. My entity needs to get a parameter from the parameter bag that's unique to the .env file it's in.
Symfony basically says "don't do this" except that I really need to do it. If I try to use a setter, I'm having to add a setter for this for EVERY time I ask for either the entity, or one of its parents.
That is... A lot... of calls to a setter where instead I could just have the entity get the parameter instead.
And no, can't be a class constant (unless there's some way that I haven't found that lets you set constants based on params).
So, how do I do this? Would appreciate some advice here. #symfony #php #codeing
-
OKAY, so #Symfony question for you experts out there.
I have an entity that I'm using to store encrypted data in the DB. My entity needs to get a parameter from the parameter bag that's unique to the .env file it's in.
Symfony basically says "don't do this" except that I really need to do it. If I try to use a setter, I'm having to add a setter for this for EVERY time I ask for either the entity, or one of its parents.
That is... A lot... of calls to a setter where instead I could just have the entity get the parameter instead.
And no, can't be a class constant (unless there's some way that I haven't found that lets you set constants based on params).
So, how do I do this? Would appreciate some advice here. #symfony #php #codeing
-
Am 31.03.2023 schließt git.codecoop.org. endgültig. Bitte migriert Eure Projekte bis zu diesem Zeitpunkt.
Seit nunmehr 2 Jahrzehnten(!) ist “codecoop.org” ein Ort, an dem Menschen gemeinsam Software entwickeln
-
Am 31.03.2023 schließt git.codecoop.org. endgültig. Bitte migriert Eure Projekte bis zu diesem Zeitpunkt.
Seit nunmehr 2 Jahrzehnten(!) ist “codecoop.org” ein Ort, an dem Menschen gemeinsam Software entwickeln