Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Activity for hkotsubo‭

Type On... Excerpt Status Date
Edit Post #282065 Initial revision almost 4 years ago
Question What does the "\s" shorthand match?
I've seen some regular expressions (regex) using `\s` when they want to match a space, but I noticed that it also matches line breaks. Example: the regex `[a-z]\s[0-9]` (lowercase ASCII letter, followed by `\s`, followed by a digit) matches both `a 1` and ```none b 2 ``` Because `\s` matc...
(more)
almost 4 years ago
Edit Post #282006 Post edited:
almost 4 years ago
Edit Post #282006 Post edited:
almost 4 years ago
Edit Post #282006 Initial revision almost 4 years ago
Answer A: Why is this client code getting the wrong date for a few hours a day?
First of all, we need to understand what a JavaScript `Date` actually is. And surprisingly, it's not exactly a date (at least not in terms of having unique values for day, month, year, hour, minute and second). A JavaScript `Date` actually represents a timestamp. More precisely, according to the...
(more)
almost 4 years ago
Comment Post #281886 Actually, `print` will add a new line if you set ` ="\n".Thedocmentionsthat:"Iftheoutputrecordseparator(\`) is not `nil`, it is appended to the output*" - as the [default value is `nil`](https://ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/variable.html#bslash), `print` won't nor...
(more)
almost 4 years ago
Comment Post #281871 Actually, `print` will add a new line if you set `$\ = "\n"`
(more)
almost 4 years ago
Comment Post #281762 From my experience, the main issue in any ticket system is when users can't explain their problem with enough details (and we need to contact them to get those details). Markdown, as a markup language, (with **formatting purposes only**), wouldn't help to solve this problem - because it's a communica...
(more)
almost 4 years ago
Edit Post #281730 Post edited:
formatting
almost 4 years ago
Suggested Edit Post #281730 Suggested edit:
formatting
(more)
helpful almost 4 years ago
Comment Post #281585 I agree that in most cases we simply shouldn't do it. But the main subject of the question is Zalgo Text, so how could I show an example without actually showing it? I believe the question is a valid case where this should be done, otherwise the post would lack important information. Anyway, if the d...
(more)
almost 4 years ago
Edit Post #281552 Post edited:
almost 4 years ago
Comment Post #281555 I recognize this is probably a minor issue, as text like that will be rarely used in posts, so I don't mind if this issue gets low priority.
(more)
almost 4 years ago
Edit Post #281555 Initial revision almost 4 years ago
Question Text with many diacritic marks are not displayed correctly in posts
When posting this question, I noticed a difference between editor's preview and the post's final render. When editing, the preview correctly shows the Zalgo Text: But after the post is saved, it's rendered in the browser like this: Note that part of the text (the diacritics at the to...
(more)
almost 4 years ago
Edit Post #281551 Post edited:
almost 4 years ago
Edit Post #281551 Post edited:
almost 4 years ago
Edit Post #281552 Post edited:
almost 4 years ago
Edit Post #281551 Post edited:
almost 4 years ago
Edit Post #281552 Initial revision almost 4 years ago
Answer A: How does Zalgo Text work, and how can I prevent my application from accepting it?
First, let's see how Zalgo Text works. Unicode Combining Characters Unicode defines the concept of combining characters. Basically, some characters can be combined with others, to "make/create" different ones (you can also say that they can modify other characters). > Example: in Portu...
(more)
almost 4 years ago
Edit Post #281551 Initial revision almost 4 years ago
Question How does Zalgo Text work, and how can I prevent my application from accepting it?
A Zalgo Text is something like this: T̃͟͏̧̟͓̯̘͓͙͔o̤̫͋ͯͫ̂ ̥͍̫̻͚̦͖͇̌ͪ̇ͤ̑̐͋̾̕i̢͖̩͙͐͑ͬ̄̿̍̚ͅn̵̢̼̙̳̒̄ͥ̋̐v̡̟̗̹̻̜͕̲ͣ̐ͤͤ͒́oͫ͂̆͑ͩ҉͇̰͚̹̠̫͔̗k̷̭̬̭͙̹̺̯ͩ̌̾̒̋̓ͤ͛͘͠e̥͙̓̄̕ ̵̫͈ͪţ̱̺̺̑̿̉̌͛̂̇h͙̣̬̓̂͞ę̡̲̟͎͉̟͛̓̉̆̉͘ ͍̯̱͎̬͍ͬ̒ͣͩ͟͡ḥ̗͖̝̮̗̼ͮ̋̉̃͐̿ͪͅi̞͉̯͖̞͉̙ͬͦ̄͋̈̂ͥ̊́̕v̶̝̼̫͔̬̯̯ͯ͑̈͠e̪͓͕̦̪̗̠ͯ͛͌̀̉͘ͅ-̍̉ͦ̈́͌͏̸͉͍͖̥͓̭̗̖mͣͣͪ̇͂͏̳̤̺...
(more)
almost 4 years ago
Comment Post #281511 I guess "*passwords and other data*" refer to the passwords themselves saved in your browser config (so it offers an option to auto-fill login forms). After you login, each website might set a cookie with your token/credential info, but Chrome has no way to know which cookies are related to authentic...
(more)
almost 4 years ago
Comment Post #281288 When handling dates in a system, one should prefer to send/receive in a standard format (to make parsing easier), and only when presenting this to users, a specific localized format is chosen - BTW, that's exactly what browsers (and probably your mail client) do: internally, the `input` value is in I...
(more)
almost 4 years ago
Comment Post #281288 Date formats are specific to locale/culture/country/etc. What makes sense to one doesn't necessarily make to another (in Japan, the "normal" order is year-month-day, in USA, month-day-year, in Brazil, day/month/year, and so on - nobody is "wrong"). But ISO 8601 is not intended to be locale oriented, ...
(more)
almost 4 years ago
Comment Post #281288 ISO 8601 is intended to be "locale agnostic" and unambiguous, and this "biggest to smallest units" approach is IMO a good choice, with advantages already pointed by previous comments. It's an information exchange format, not a human friendly one (although it *is* friendly once you get used to it)
(more)
almost 4 years ago
Comment Post #281288 According [to MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date), the displayed format of `input type=date` can change according to the browser's locale. My guess is that mail clients might do something similar when interpreting HTML. Not sure if this can be changed (without s...
(more)
almost 4 years ago
Edit Post #281169 Post edited:
about 4 years ago
Edit Post #281168 Post edited:
Adding tags
about 4 years ago
Suggested Edit Post #281168 Suggested edit:
Adding tags
(more)
helpful about 4 years ago
Edit Post #281169 Initial revision about 4 years ago
Answer A: SQL timestamp for daylight saving day when clock goes 1 hour back.
This behaviour is documented here: > "... an ambiguous timestamp that could fall on either side of a jump-back transition is assigned the UTC offset that prevailed just after the transition." So, when there's an ambiguous timestamp (when a local date/time occurs twice: first in Daylight Saving ...
(more)
about 4 years ago
Comment Post #281036 @MonicaCellio I noticed that it also happens in other sites (example: https://meta.codidact.com/posts/281048) - Would it be worth posting this problem in Codidact Meta? Or having it just here is enough?
(more)
about 4 years ago
Edit Post #281050 Post edited:
about 4 years ago
Edit Post #281050 Post edited:
about 4 years ago
Edit Post #281050 Post edited:
about 4 years ago
Edit Post #281050 Post edited:
about 4 years ago
Edit Post #281050 Initial revision about 4 years ago
Answer A: How to match standard email addresses with regex?
Matching a valid email address can be as complicated as you want it to be. If you want to be compliant with RFC 5322, the regex will be a monster (see below). But if you want a subset of it, with predefined arbitrary rules, then your monster will be a little less scary. Considering the simpl...
(more)
about 4 years ago
Edit Post #281036 Post edited:
about 4 years ago
Edit Post #281036 Post edited:
about 4 years ago
Edit Post #281036 Post edited:
about 4 years ago
Edit Post #281036 Post edited:
about 4 years ago
Edit Post #281036 Post edited:
about 4 years ago
Edit Post #281036 Post edited:
about 4 years ago
Edit Post #281036 Post edited:
about 4 years ago
Edit Post #281036 Post edited:
about 4 years ago
Edit Post #281036 Post edited:
about 4 years ago