#php if inside if
Explore tagged Tumblr posts
infoanalysishub · 2 days ago
Text
PHP Nested if Statement
Learn everything about PHP nested if statements with easy examples, syntax, best practices, and real-world use cases. Perfect for beginners and intermediate learners. Mastering PHP Nested if Statements: A Complete Guide Conditional statements are the backbone of decision-making in programming. In PHP, the if statement allows us to execute code based on whether a condition is true. But what if…
0 notes
thokanetwork · 2 years ago
Text
Reibungsloser Übergang zu PHP 8.x: Insider-Tipps
Tumblr media
Machen Sie sich bereit für eine aufregende Reise, während wir Sie durch einen reibungslosen Übergang zu PHP 8.x führen. Dieser Artikel ist vollgepackt mit Insider-Tipps, die Ihnen helfen, die Zukunft Ihrer Website selbst in die Hand zu nehmen. Entdecken Sie die aufregenden neuen Funktionen und Verbesserungen von PHP 8.x, und erfahren Sie, wie Sie mögliche Herausforderungen auf dem Weg dorthin meistern können. Mit unserer fachkundigen Anleitung werden Sie in der Lage sein, fundierte Entscheidungen zu treffen und die Freiheit zu erlangen, die Sie sich für Ihre Website wünschen.
Die Vorteile von PHP 8.x
Bei der Erkundung von PHP 8.x werden Sie zahlreiche Vorteile entdecken, darunter eine verbesserte Leistung und neue Sprachfunktionen. PHP 8.x bringt erhebliche Verbesserungen in Bezug auf die Leistung und Sicherheit Ihres Codes. Die neue Version führt die Just-In-Time-Kompilierung (JIT) ein, die die Ausführungsgeschwindigkeit optimiert und den Ressourcenverbrauch reduziert. Das bedeutet, dass Ihre Website oder Anwendung schneller geladen wird und mehr gleichzeitige Benutzer verarbeiten kann. Außerdem führt PHP 8.x neue Sprachfunktionen wie Union-Typen, benannte Argumente und Attribute ein, die Ihrem Code mehr Flexibilität und Ausdruckskraft verleihen. Es ist jedoch wichtig, die Auswirkungen von PHP 8.x auf Ihren bestehenden Code und Ihre Plugins zu berücksichtigen. Einige ältere Codes oder Plugins müssen möglicherweise aktualisiert werden, um mit PHP 8.x kompatibel zu sein. Es wird empfohlen, Ihren Code und Ihre Plugins vor dem Upgrade in einer Staging-Umgebung gründlich zu testen, um einen reibungslosen Übergang zu gewährleisten.
Tumblr media
Planung Ihrer PHP 8.x-Migrationsstrategie
Um Ihre Migrationsstrategie für PHP 8.x zu planen, sollten Sie zunächst die Kompatibilität Ihrer Website bewerten und sich mit den an der Entwicklung beteiligten Entwicklern oder Agenturen beraten. Es ist wichtig, dass Sie vor der Umstellung sicherstellen, dass Ihre Website mit PHP 8.x kompatibel ist. Ein wichtiger Aspekt, den Sie berücksichtigen sollten, ist die Aktualisierung von Plugins und die Behandlung veralteter Funktionen. Veraltete Funktionen sind Features, die als veraltet gekennzeichnet wurden und in zukünftigen PHP-Versionen nicht mehr verwendet werden. Indem Sie sich mit diesen veralteten Funktionen befassen, können Sie sicherstellen, dass Ihre Website auch unter PHP 8.x ordnungsgemäß funktioniert. Außerdem ist es wichtig, sich mit den Entwicklern oder Agenturen, die an Ihrer Website gearbeitet haben, abzustimmen, um mögliche Herausforderungen oder Probleme zu verstehen, die während des Migrationsprozesses auftreten können. Wenn Sie diese Schritte befolgen, können Sie einen reibungslosen Übergang zu PHP 8.x sicherstellen und die Freiheit behalten, die neuesten Funktionen und Verbesserungen zu nutzen.
Einrichten einer Staging-Umgebung für PHP 8.x-Tests
Die Einrichtung einer Staging-Umgebung ermöglicht es Ihnen, die Kompatibilität Ihrer Website mit PHP 8.x zu testen und die notwendigen Anpassungen vorzunehmen, bevor Sie die Umstellung vornehmen. Dies ist von größter Wichtigkeit, um einen reibungslosen Übergang zu PHP 8.x zu gewährleisten. Um eine Staging-Umgebung für PHP 8.x-Tests einzurichten, führen Sie die folgenden einfachen Schritte aus. Wählen Sie zunächst auf Ihrer Hosting-Plattform, z. B. ThoKa, Ihre WordPress-Website aus und erstellen Sie mit dem Environment Picker eine neue Staging-Umgebung. Klonen Sie eine bestehende Umgebung und benennen Sie sie entsprechend. Wählen Sie dann die neu erstellte Staging-Umgebung als Standard aus. Importieren Sie anschließend Ihre Website mit DevKinsta und ändern Sie die PHP-Version auf 8.0 oder 8.1. Nachdem Sie Ihre Staging-Umgebung eingerichtet haben, können Sie nun Kompatibilitätstests mit Tools wie PHPCompatibility, Psalm und PHPStan durchführen. Diese Tests helfen Ihnen, eventuelle Probleme zu erkennen und die notwendigen Anpassungen vorzunehmen, bevor Sie PHP 8.x auf Ihrer Live-Site implementieren, um einen problemlosen Übergang zu gewährleisten.
Durchführen von Kompatibilitätstests für PHP 8.x
Kompatibilitätstests sind unerlässlich, um sicherzustellen, dass Ihre Website mit PHP 8.x ordnungsgemäß funktioniert. Um einen reibungslosen Übergang zu erreichen, ist es wichtig, statische Analysetools wie PHPCompatibility, Psalm und PHPStan zu verwenden. Diese Tools können helfen, veraltete Funktionen in Ihrer Codebasis zu identifizieren. Veraltete Funktionen sind Features, die als veraltet markiert wurden und in zukünftigen PHP-Versionen entfernt werden. Mit Hilfe dieser Tools können Sie veraltete Funktionen in Ihrem Code identifizieren und aktualisieren und so sicherstellen, dass Ihre Website mit PHP 8.x kompatibel bleibt. Darüber hinaus können statische Analysetools wie Psalm und PHPStan auch Prüfungen in Bezug auf Variablentypen durchführen, was die Kompatibilität Ihrer Website weiter verbessert. Durch die Durchführung von Kompatibilitätstests und die Behebung von Problemen, die von diesen Tools identifiziert werden, können Sie sicherstellen, dass Ihre Website bei der Verwendung von PHP 8.x ordnungsgemäß funktioniert.
Sicherstellung der Wordpress-Kompatibilität mit PHP 8.X
Stellen Sie sicher, dass Ihre WordPress-Website mit PHP 8.x kompatibel bleibt, indem Sie alle Kompatibilitätsprobleme beheben, die durch ordnungsgemäße Tests und die Verwendung statischer Analysetools festgestellt wurden. Das Upgrade von Plugins und die Aktualisierung von Themes sind wichtige Schritte zur Aufrechterhaltung der Kompatibilität. Testen Sie Ihre Website zunächst gründlich in einer Staging-Umgebung, bevor Sie Änderungen an Ihrer Live-Site vornehmen. Verwenden Sie statische Analysetools wie PHPCompatibility, Psalm und PHPStan, um veraltete Funktionen, geänderte Standardwerte und Probleme mit Variablentypen zu identifizieren. Mit Hilfe dieser Tools können Sie sicherstellen, dass Ihr Code mit PHP 8.x kompatibel ist. Halten Sie sich außerdem mit der Dokumentation und den Updates von WordPress Core, Plugins und Themes auf dem Laufenden, was die Kompatibilität mit anderen PHP-Versionen angeht. Mit diesen Schritten können Sie einen reibungslosen Übergang zu PHP 8.x sicherstellen und sich die Freiheit erhalten, Ihre WordPress-Website anzupassen und zu verbessern.
Tumblr media
Fehlerbehebung bei allgemeinen Problemen beim Übergang zu PHP 8.x
Sollten Sie während der Umstellung auf PHP 8.x auf Probleme stoßen, wenden Sie sich an Ihren Webhoster, um Unterstützung und Anleitung zu erhalten. Dort erhalten Sie fachkundige Unterstützung bei der Fehlersuche und der Lösung von Problemen. Ein häufiges Problem, auf das Sie stoßen können, ist die Aktualisierung veralteter Funktionen. Mit PHP 8.x werden Änderungen und Verbesserungen eingeführt, was bedeutet, dass bestimmte Funktionen, die zuvor verwendet wurden, nicht mehr unterstützt werden. Ihr Webhoster kann Ihnen helfen, diese veralteten Funktionen zu identifizieren und zu aktualisieren, um die Kompatibilität mit PHP 8.x sicherzustellen. PHP 8.x hat möglicherweise andere Standardwerte für bestimmte Funktionen oder Einstellungen. Ihr Webhoster kann Sie beraten, wie Sie Ihren Code oder Ihre Konfigurationen an diese Änderungen anpassen können. Zögern Sie nicht, Ihren Webhoster um Hilfe bei der Umstellung zu bitten, um einen reibungslosen und problemlosen Ablauf zu gewährleisten.
Tumblr media
Best Practices für eine reibungslose Umstellung auf PHP 8.x
Für eine erfolgreiche Migration auf PHP 8.x ist es wichtig, Ihren Code und Ihre Plugins gründlich auf Kompatibilität zu testen. Machen Sie sich zunächst mit den neuen Funktionen von PHP 8.x vertraut und machen Sie sich mit allen Änderungen vertraut, die Ihre Codebasis betreffen könnten. Bereiten Sie Ihre Codebasis auf PHP 8.x vor, indem Sie sicherstellen, dass alle veralteten Funktionen und geänderten Standardwerte berücksichtigt werden. Verwenden Sie statische Analysewerkzeuge wie PHPCompatibility, Psalm und PHPStan, um umfassende Tests durchzuführen, einschließlich Überprüfungen in Bezug auf Variablentypen. Es ist von entscheidender Bedeutung, eine Staging-Umgebung zu schaffen, um Ihren Code zu testen, bevor Sie auf Ihrer Live-Site auf PHP 8.x umstellen. Wählen Sie einen zuverlässigen Webhoster, der Anleitung und Unterstützung für PHP 8.x-Kompatibilität bietet. Wenn Sie diese Best Practices befolgen, können Sie einen reibungslosen Übergang zu PHP 8.x sicherstellen und sich die Freiheit erhalten, die leistungsstarken Funktionen zu erforschen und zu nutzen. Read the full article
0 notes
ladaeliseeva · 2 years ago
Text
Tumblr media
0 notes
unpretty · 10 months ago
Text
what the FUCK was i doing when i edited this theme
what if i enabled comments on my site but only for members paying at least $5 a month or $40 a year
187 notes · View notes
feminist-space · 9 months ago
Text
"Officers raided the facility on Oct. 18, 2023, and detained the lone female employee while they searched the business, the lawsuit said. However, they didn’t find a single cannabis plant and only saw a typical medical facility with rooms used for conducting x-rays, ultrasounds, CT scans and MRIs, the owners said.
The officers then released the employee and told her to call a manager, the lawsuit said, while they continued to wander around various rooms of the facility. The plaintiffs say the officers’ behavior was “nothing short of a disorganized circus, with no apparent rules, procedures, or even a hint of coordination.”
At one point, an officer walked into an MRI room, past a sign warning that metal was prohibited inside, with his rifle “dangling… in his right hand, with an unsecured strap,” the lawsuit said. The MRI machine’s magnetic force then allegedly sucked his rifle across the room, pinning it against the machine. MRI machines are tube-shaped scanners that use incredibly strong magnetic fields to create images of the brain, bones, joints and other internal organs.
An officer then allegedly pulled a sealed emergency release button that shut the MRI machine down, deactivating it, evaporating thousands of liters of helium gas and damaging the machine in the process. The officer then grabbed his rifle and left the room, leaving behind a magazine filled with bullets on the office floor, according to the lawsuit."
Read the full article here: https://www.sfgate.com/cannabis/article/lapd-cannabis-mri-raid-19789448.php
114 notes · View notes
kommandonuovidiavoli · 6 months ago
Text
Just a lil thing since people have been saying it: Side B is not the only way our characters can interact!
If you have a story that centers on your own version of Sector V and its members and no OCs that can be on their own adventure, we can still interact!
"Universe Mixes" is the tag I use when characters interact outside the normal story! For example:
Various versions of Wallabee talking together at the same time? Universe Mixes!
OCs talking to Penny and somehow they're all still kids? Universe Mixes!
Your world Sector V somehow interacting with mine after a portal has mysteriously opened? Universe Mixes!
Anything that is not related to my story/your AU and our OCs interact keeping track of ages and years is Universe Mixes!
Some pics for examples:
Tumblr media Tumblr media Tumblr media
These are Side B pics since the characters interact while minding of the right ages (kid or teens or adults). (in the pics: Irwin with Sector PHP by @artsygirl0315, Penny and Aiden by @kandykatz, and Penny and Gianna by @numbuh-72)
Tumblr media Tumblr media Tumblr media
These are Universe Mixes since different versions of the same characters interact and have fun together or some characters interact with parallel universe ones! (In the pics: Hoagie and Wally by me and @spicedwatermel0n, various versions of Nigel from this post from various people, and an inside joke between me and @roguephenon I'm not gonna explain yet LMAO)
So yeah, I'm open to both honestly!
I love it when different universes collide because it's fascinating to see how different versions of the same character interact!
Also, love it when different timelines interact... should draw that more tbh.
That's all!
26 notes · View notes
beardedmrbean · 24 days ago
Note
Really and truly not sending this to be dismissive, but apparently there’s more to that Jonathan Joss situation than what we know. His husband claiming that the house was burned due to homophobia was already lying, as there’s a news article that stated that it was because they left a grill lit (and Johnathan admitted it):
https://www.expressnews.com/lifestyle/article/king-of-the-hill-jonathan-joss-san-antonio-fire-20053771.php
Also people are pointing out that it makes no sense that the shooter killed Jonathan for being gay but didn’t bother killing his husband. Something isn’t adding up, but I still firmly believe Jonathan should never have died. It’s just that there’s way more than what’s being told and I don’t like people potentially lying about hate crimes
Clickable link to the article here it's about the fire
Actor and San Antonio native Jonathan Joss lost three dogs and his childhood home in a South Side house fire Thursday.
The McCollum High School grad, famous for his roles as the voice of John Redcorn in the animated series "King of the Hill" and Chief Ken Hotate in "Parks and Recreation," said the vacant home lacked gas and electricity.
"I don't have a job," Joss said via phone Friday from a San Antonio hotel. "And now my three dogs died in my home. I can't even concentrate on work."
Joss said he and his partner had lit a barbecue grill inside the house for warmth and to "make some Abuelita" Mexican hot chocolate earlier Thursday, but were sure they extinguished it before leaving at noon to get lunch and pick up supplies to clean the home.
Fire crews reportedly responded to the home in the 200 block of Dorsey Drive around 1 p.m. Thursday. By the time Joss and his partner returned just before 2 p.m., the uninsured residence was a smoldering loss.
"I told them it was my fault," Joss said. "Very easily it could have started because of my stupidity."
Joss noted his father bought the home in 1957 and his mother willed it to him before she died. Joss said the fire also destroyed his 1994 Chevrolet Impala SS, along with his "King of the Hill" library and more than 30 years of television memorabilia.
He broke into tears as he recounted the loss of his three dogs at the home. Firefighters found the body of one dog and Joss found the other two.
Of his eldest dog Lucy in the Sky with Diamonds, a 13-year-old Chihuahua mix, Joss said the dog always kept him safe.
Joss noted he was in the process of returning to Los Angeles to resume his acting. He returns as John Redcorn for a "King of the Hill" revival slated for this year on Hulu. Joss' other credits include the 2016 remake of the 1960 classic "The Magnificent Seven" and the Paramount+ series "Tulsa King" starring Sylvester Stallone.
Joss said he and his partner are just trying to get some aid. Those interested in helping can contact Joss at 210-929-9017.
"Just [want to say] thank you to my fans, and always love your puppies because you never know when accidents will happen," Joss said. "God speed and be strong, everybody." _________________________
Ugh, this is muddying the waters.
Trial should clear a bunch of that up though, hopefully at least
7 notes · View notes
lavender-lily-lilac · 24 days ago
Text
https://www.expressnews.com/lifestyle/article/king-of-the-hill-jonathan-joss-san-antonio-fire-20053771.php
"Joss said he and his partner had lit a barbecue grill inside the house for warmth and to "make some Abuelita" Mexican hot chocolate earlier Thursday, but were sure they extinguished it before leaving at noon to get lunch and pick up supplies to clean the home.
Fire crews reportedly responded to the home in the 200 block of Dorsey Drive around 1 p.m. Thursday. By the time Joss and his partner returned just before 2 p.m., the uninsured residence was a smoldering loss.
"I told them it was my fault," Joss said. "Very easily it could have started because of my stupidity.""
yet then Joss' husband Tristan Kern de Gonzales said on facebook after the shooting:
“My husband Jonathan Joss and I were involved in a shooting while checking the mail at the site of our former home,” the statement began. “That home was burned down after over two years of threats from people in the area who repeatedly told us they would set it on fire. We reported these threats to law enforcement multiple times and nothing was done.”
doesn't add up
6 notes · View notes
escapistsatellite · 1 year ago
Text
Development History of the Command Wolf
And the zoids that came from it, which the internet at large seem to have forgot.
I'll note here that the following took place on the continent of Delpoi according to the Zoids Bible lore book, making this zoids a separate species than the later Konig Wolf, which originate on the continent of Europa.
Tumblr media Tumblr media Tumblr media
(Source & further reading: https://theironbible.com/IndexZoids/CommandWolf.php)
Tumblr media
This role will later be filled by the Shadow Fox after the Liger Zero becomes the primary infantry zoids of the Helic Republic. (Source: https://theironbible.com/ZoidBooks/OfficialFanBook/1-9.php)
Tumblr media
I adore the HMM boxes because that have the most complete breakdown of technical details I have ever seen. Source & further lore: https://theironbible.com/ZoidsModelKits/HMM/CommandWolf.php
From the base models we get several variants, from the very well-known Irvine custom and the Command Wolf AC:
Tumblr media Tumblr media
Source & Advanced Lore: https://theironbible.com/ZoidsModelKits/HMM/CommandWolfAC.php
And Of course Town Wolf:
Tumblr media
Blitzer and Climber Wolf:
Tumblr media
The Blitzer Wolf was actually the creation of one Yusuke Chiba has an entry in the 2nd CoroCoro Zoids Remodeling Grand Prix which was held in 11/2000 and won the wind-up category. The Blitzer Wolf, like the motorized winner, Death Stinger KFD, were featured in the Zoids Official Fan Book 3 and the wolf was also added to the card game. (Source: https://theironbible.com/IndexZoids/BlitzerWolf.php)
Now moving onto the unused concepts, firstly comes:
Tumblr media
This fuselage was apparently intended to compete with the Imperial Lightning Saix, but the power demands on the core were too high and it was scrapped after several unsuccessful prototypes were tested. (Source: https://theironbible.com/IndexZoids/CommandWolfMKIIConcept.php)
Now for my absolute favorite, that I really wish had been a kit or action figure at some point:
Tumblr media Tumblr media
The bigger, more complex looking armored legs, the claws, the overall more advanced armor and segments that make up the neck and torso, the close combat focus
Tumblr media
unfortunately this wolf never featured in a story or merchandise, and it's only official appearance was in the pages of Dengeki Hobby Magazine, January 2002's Smack Zoids! B-Part. In universe it was apparently declared impractical due to its close combat focus and never saw mass production. Boo!mo
And now for my absolute least enjoyed entry in the Command Wolf development chronicles:
Tumblr media Tumblr media
I have no damnable clue how two additional heads were meant to either fold-up and deploy from inside this thing, or be attached via the hangar/transport/whatever. don't like the heads gimmick, don't like the weapons pack, glad it got canned.
36 notes · View notes
widowskins · 1 year ago
Text
widowbase v3 and v4
Whooboi, there is a lot of discourse going on right now about JCINK coders. Perfect time for me to update some base skins!
For those who just want to streamline their coding process, I have updated my widowbase v3 to include a day/night theme toggle and made a few responsive tweaks to the vertical nav and sidebar. For those looking to learn how to use CSS grid and flexbox to create responsive forum designs, I added a new base, widowbase v4. This version includes some HTML templates that have a very ugly, extremely basic, but functional fluid grid layout. These templates also incorporate hidden divs (read as, display: none) that include the PHP variables frequently used inside those respective HTML templates, so you can easily delete everything I've done and start from scratch with your own. Then just delete the hidden div when you've used everything you need. Easy peasy!
For those of you just beginning your coding journey, I wish you the best of luck! It is such a fun and rewarding hobby. You are also free to rip apart any of the codes on my preview site and cobble them back together. These experiments can be a great learning tool! You are more than welcome to use any of my free resources as a base, as long as the finished product remains free. As for my actual skin bases (or template sets specifically labeled as bases), these can be used for free or paid skins. Make money or give it away, whatever works for you, just leave the credits given to resources intact so others can find out how to accomplish the same thing!
41 notes · View notes
mostlysignssomeportents · 7 months ago
Text
This day in history
Tumblr media
#20yrsago WIPO notes from day three: democracy == ignoring dissent https://web.archive.org/web/20041124024604/https://www.eff.org/deeplinks/archives/002130.php#002130
#15yrsago Britain’s new Internet law — as bad as everyone’s been saying, and worse. Much, much worse. https://memex.craphound.com/2009/11/19/britains-new-internet-law-as-bad-as-everyones-been-saying-and-worse-much-much-worse/
#5yrsago DJ Earworm: 100 songs from the past decade in one mashup https://music.youtube.com/watch?v=UhIte8t6BEg
#5yrsago Leaks reveal how the “Pitbull of PR” helped Purdue Pharma and the Sacklers ignite the opioid crisis https://www.propublica.org/article/inside-purdue-pharma-media-playbook-how-it-planted-the-opioid-anti-story#171238
#5yrsago Beyond the gig economy: “platform co-ops” that run their own apps https://www.vice.com/en/article/worker-owned-apps-are-trying-to-fix-the-gig-economys-exploitation/
#5yrsago Elizabeth Warren’s plan to denazify America https://medium.com/@teamwarren/fighting-back-against-white-nationalist-violence-87b0c550f51f
#5yrsago Youtube told them to use this “royalty-free” music; now rightsholders are forcing ads on their videos and claiming most of the revenue https://torrentfreak.com/royalty-free-music-supplied-by-youtube-results-in-mass-video-demonetization-191118/
#5yrsago The State of South Dakota wants you to know that it’s on meth https://www.washingtonpost.com/health/2019/11/18/meth-were-it-says-south-dakota-new-ad-campaign/
#5yrsago Sand thieves believed to be behind epidemic of Chinese GPS jamming https://www.technologyreview.com/2019/11/15/131940/ghost-ships-crop-circles-and-soft-gold-a-gps-mystery-in-shanghai/
#5yrsago Quiet Rooms: Illinois schools lead the nation in imprisoning very young, disabled children in isolation chambers https://features.propublica.org/illinois-seclusion-rooms/school-students-put-in-isolated-timeouts/#170648
#5yrsago Terabytes of data leaked from an oligarch-friendly offshore bank https://web.archive.org/web/20191117042726/https://data.ddosecrets.com/file/Sherwood/
#5yrsago Naomi Kritzer’s “Catfishing on the CatNet”: an AI caper about the true nature of online friendship https://memex.craphound.com/2019/11/19/naomi-kritzers-catfishing-on-the-catnet-an-ai-caper-about-the-true-nature-of-online-friendship/
#5yrsago Girl on Film: a graphic novel memoir of a life in the arts and the biological basis for memory-formation https://memex.craphound.com/2019/11/19/girl-on-film-a-graphic-novel-memoir-of-a-life-in-the-arts-and-the-biological-basis-for-memory-formation/
7 notes · View notes
the-nox-syndicate · 2 months ago
Text
SysNotes devlog 3 - Ability to create a new profile
Welcome back to my SysNotes update! SysNotes is a system management app for people with DID, OSDD, and those who are otherwise plural.
(I will keep the intro text the same in all devlogs for context)
This devlog will be shorter than usual because I didn't want to lump it in with the next feature, which I expect will be quite long. In this devlog, I will add a way to create a new profile.
First Devlog (1) | Previous Devlog (2)
Quick Refactor before we jump in
"So I did some refactoring off-camera..." - originally, everything on the page was happening inside one component. I decided to split it up into the main page and the profile section, which is a new separate component. This will keep my code shorter and easier to maintain.
I also added a way to refer to each profile individually by their ID in the URL:
(Colin's profile is ID 4, which is shown in the URL)
Tumblr media
I was also storing profile data as separate variables, which would be inconvenient to individually pass into the new main profile component. So I moved them all into one variable:
(old | new)
Tumblr media Tumblr media
Design of the New Profile form
To be honest, I've been dreading this part since the beginning. I mean, how do I even lay this out? 💀
Tumblr media
It is common for developers to avoid UI design because they are "coders not designers". I, for one, quite enjoy web design. Still, this task feels quite overwhelming to me. So, let's take this little mockup I made and turn it into something usable 💪
Too much stuff?
I think the biggest challenge here is the sheer number of inputs. And as the app grows, the number of inputs in this form will only increase.
The only mandatory input for a new profile is just their name. Therefore, the first step should be separating the Name field from the rest of the inputs.
The new and improved New Profile form is looking much better now:
Tumblr media
...Yes, really! That's the whole form!
You are unlikely to know everything about an alter that has just split, so all those fields are completely unnecessary for an alter to be added to the list. Every other detail can be added later through the edit mode, where each field can be edited separately without needing one giant form.
Another big reason why I decided to forego the big form altogether is that the code for saving a new profile and the code for editing a profile would be almost exactly the same (including validation), and it wouldn't make sense to duplicate this code if I can just use it in one instance.
Saving a new profile
Let's add some validation to the input field to make sure that the user enters the name in a correct format.
As the Name is stored in the database as a string, it has the maximum length of 255 characters. Trying to save a longer name than this will cause errors, so we need to validate the input to make sure it's safe to insert into the database:
Tumblr media
Here's what happens when I input a whole paragraph of Lorem Ipsum text and try to save it:
Tumblr media
On the other hand, a shorter name saves just fine:
Tumblr media
By the way, these flash messages are added in 2 ways: the success is a session message, and the error is an error stored separately by the validator. The flash messages originally have no styling, so I defined those myself using Tailwind's "@apply" for efficiency.
Tumblr media Tumblr media
Once submitted, the name list automatically updates with our new profile:
Tumblr media
(And if I click cancel it just empties the input)
Tumblr media
Okay, let's click on Jenny's profile to see what it looks like! ...Oh
Tumblr media
This is because the code tries to access Jenny's status, but she doesn't have one yet, she only has a name!
(When I pull the data from the database, I'm trying to access a non-existent value)
Tumblr media
(And when I display the values I got from the database, the display may break if the value is NULL)
Tumblr media
(This error applies to all profile fields, not just status, however the app crashes after just the first error it comes across so the remaining errors are not shown)
This can easily fixed by using PHP's "isset()" and/or "empty()" function, which checks if a variable has a value:
(I'm using a ternary operator as a more compact alternative to if-else. it basically goes: "if this condition is true ? then do it : if not, do something else")
Tumblr media
(And here I just check if these values are not blank before rendering them)
Tumblr media
Success, Jenny's profile shows!
Tumblr media
Now, we just have to populate this profile with data about Jenny, and to do that we'll need to be able to edit each field. I will work on this in the next devlog, as I expect this to take quite some time.
Thanks so reading! As always, any suggestions are welcome!
5 notes · View notes
bookloure · 1 year ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media
Isabela: A Novel—My Reading Journey | I dove into this book thinking that I was going to read a historical fiction saga set in the mountains of Isabela. The prologue, "A Woman Wounded,” opens with Ka Julia being shot. I was immediately hooked and excited to witness Julia’s life in the mountains, her past, and the events that led her to this moment. Then I turned the page, and I was met with something else…
It took me a while to get into the narrative. The expectation I had going in might have contributed to that, but I guess the biggest question in my mind as I was reading was “why is this a novel and not a short story collection?” Isabela is told in converging voices, in characters with overlapping names and stories. In the beginning, I was fighting with the book, grasping for the characters' names, dates, narratives to ground me… but they continued to shift and move, so I decided to stop trying to wrestle and go with the flow. That’s when I began to enjoy the stories.
How the novel plays with time is perhaps the most interesting and enjoyable part for me to witness. There are dates, natural disasters, and landmark political events to pin the dates for most of the stories, and yet time inside the novel feels vague, ungraspable, unpinnable. Even as I finished reading don’t have a clear perception of the time these characters occupy, especially with respect to each other. And that’s on the author’s craftsmanship. Between the repetition of names and the feeling of deja vu throughout the novel, I got a lowkey One Hundred Years of Solitude vibe, which honestly makes my heart flutter a bit.
The different narratives are framed by the story of Julia. Perhaps in the same way that the people of Isabela are shaped by poverty, violence, agrarian issues, political climate, and contours of the land. Between the corrupt administration, ineffective policies, and climate violence we all are subjected to, how different are we, really? The names will overlap, the situations will overlap, the faces will overlap. We cannot help it. In this place we call home, we are forced to face the same violence every day of our lives. In this place we call home we keep going—despite, despite, despite.
Ateneo University Press kindly sent me a copy of this book to review. However, you can grab a copy through their Lazada and Shopee stores for only 450 Php.
17 notes · View notes
posttexasstressdisorder · 8 months ago
Text
Tumblr media
https://www.sfgate.com/weather/article/inside-slider-wildfire-weather-california-19838589.php
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
5 notes · View notes
communionwaiver · 3 months ago
Text
One of the wilder beliefs I'm still working on is the belief that the outside world only pretends to have a separate set of a moral values than life inside the cult. Non-fundamentalists allegedly don't believe in such severe corporal punishment, they don't think women and men are separate but complementary, and they don't believe in the Rapture or Salvation. But sometimes I still really feel like if I fuck up badly enough, any outsider is going to 'turn' and reveal that they really do think the way we do in the cult. Chiefly, and I don't know if this is as common as a belief for other ex-fundamentalists, but it's felt so universal for me, the belief that if I break the rules, any authority figure is allowed to hurt me in any way they feel necessary. I temporarily stop being a person when I do something 'bad'. (And of course children, being inherently sinful, aren't fully people to begin with.)
It's made all conflict impossible up until after IOP/PHP. In conversations with roommates, coworkers, and friends, I was so scared of being wrong because it really felt like life or death. In other contexts I thought if I rolled over and let people walk all over me that they'd have a little more mercy when I really did make them angry. It made it basically impossible to be honest with any mental health professionals, too, because some part of me wanted those beliefs to be wrong and I was absolutely terrified they would prove me right, that the 'secular' world is just a less self-aware version of the 'normal' world. On a deeper level I was scared I'd be punished for questioning anything.
Ironically it's really hard for 'secularists' to understand why I'm so weird. This conflict between fundamentalism and anything else feels like a universal struggle, but basically nobody I've met since moving to Chicago knows what the fuck I'm talking about when I talk about speaking in tongues or the end times. I probably seemed like a socially-anxious pathological liar for a couple years. It's taken almost a year of therapy to feel okay saying, "I was raised in a cult," and not completely worry that the person I'm talking to is gonna go mask-off and drag me back into the cult.
5 notes · View notes
phprentacar · 1 year ago
Text
The new Infiniti QX80 2025 SUV is here
With a completely reimagined design for 2025, the new Infiniti SUV The QX80 promises to redefine the standard of luxury and performance in its segment and the PHP Rent a Car Cluj office presents the most important details about this car in the lines below. In a competitive market where models like the Lincoln Navigator, Cadillac Escalade, Jeep Grand Wagoneer, Mercedes Benz GLS and BMW X7 compete for customers' attention, Infiniti comes with a proposal that cannot be ignored. The exterior of this luxury behemoth impresses with 22-inch wheels, fixed side skirts and a completely new body, accompanied by full LED lighting. Inside, passengers are greeted by premium leather upholstery and new infotainment technology that promises to deliver an experience of unprecedented luxury and comfort:
7 notes · View notes