Searching txt.sour.is

Twts matching #math
Sort by: Newest, Oldest, Most Relevant

用 Go 語言實現用戶一鍵登錄,有哪些可靠的方案
一鍵登錄是現代應用中提升用戶體驗的關鍵功能,本文將深入探討 Go 語言實現一鍵登錄的幾種可靠方案,並提供完整的代碼實現和對比分析。方案一:短信驗證碼登錄(最常用)實現原理用戶輸入手機號 服務器發送短信驗證碼 用戶輸入驗證碼完成登錄 完整代碼實現package mainimport(“crypto/rand”“fmt”“math/big”“net/http”“time”“githu ⌘ Read more

⤋ Read More

用 Go 語言實現用戶一鍵登錄,有哪些可靠的方案
一鍵登錄是現代應用中提升用戶體驗的關鍵功能,本文將深入探討 Go 語言實現一鍵登錄的幾種可靠方案,並提供完整的代碼實現和對比分析。方案一:短信驗證碼登錄(最常用)實現原理用戶輸入手機號 服務器發送短信驗證碼 用戶輸入驗證碼完成登錄 完整代碼實現package mainimport(“crypto/rand”“fmt”“math/big”“net/http”“time”“githu ⌘ Read more

⤋ Read More

Thanks to @kat@yarn.girlonthemoon.xyz and her shelf I finally spent several hours in the woodshop. I wanted to build two drawers for the workbench and thought that I will complete this project in no time. I’ve been so wrong again. ;-)

I didn’t draw any plans, just measured a few times and then went to cutting a bunch of particle board leftovers at the table saw. I routed rebates on the sides, fronts and backs to lap the boxes and sink in the bottom. It turned out that having no plans was a stupid idea. I cut exactly on the lines as I calculated and measured, however, the math in my head fell apart when it eventually met reality. The bottoms are too short, so I gotta glue on some strips. Also, with the longer fronts, the sides won’t work either, I have to fix them as well. :-D

Finally, the lid of my cyclone bucket broke when the negative pressure got too large. Oh well. It was just an old wood glue bucket, I’ve got another empty one, so I can use that lid but strengthen it first with some plywood. Something for future Lyse to deal with.

All in all, it was still good fun. Wood (haha) do it again, but at least with some sketches on paper. ;-)

⤋ Read More
In-reply-to » I got a small desk calendar as advertising gift. It shows three months at once. I'm using this thing since the beginning of this year and I have to say that it turned out to be super useful. I'm happily surprised.

@eapl.me@eapl.me @bender@twtxt.net @prologic@twtxt.net Not including a photo was a stupid move, sorry. There you go:

Image

This particular one is 95mm wide and 185mm high. Fairly compact.

I can only use it figure out distances to other dates and to do some basic calendar math. I’m not able to actually schedule anything. But I grew up with a month calendar like you have there where all appointments of the entire family was recorded.

By far most of my paper use is drawing random stuff on scratch paper during meetings. :-D

Image

⤋ Read More
In-reply-to » I'm in an article in Quanta Magazine! It's about the bizarre world of algorithms that re-use memory that's already full. https://www.quantamagazine.org/catalytic-computing-taps-the-full-power-of-a-full-hard-drive-20250218/ I'm the one with all the snow in the background.

@lyse@lyse.isobeef.org I am a big fan of “obvious” math facts that turn out to be wrong. If you want to understand how reusing space actually works, you are mostly stuck reading complexity theory papers right now. Ian wrote a good survey: https://iuuk.mff.cuni.cz/~iwmertz/papers/m23.reusing_space.pdf . It’s written for complexity theorists, but some of will make sense to programmers comfortable with math. Alternatively, I wrote an essay a few years ago explaining one technique, with (math-loving) programmers as the intended audience: https://www.falsifian.org/blog/2021/06/04/catalytic/ .

⤋ Read More
In-reply-to » There is also a ~5x increase cost in memory utilization for any implementations or implementors that use or wish to use in-memory storage (yarnd does for example) and equally a 5x increase in on-disk storage as well. This is based on the Twt Hash going from a 13 bytes (content-addressing) to 63 bytes (on average for location-based addressing). There is roughly a ~20-150% increase in the size of individual feeds as well that needs to be taken into consideration (on the average case).

(#2024-09-24T12:44:35Z) There is a increase in space/memory for sure. But calculating the hashes also takes up CPU. I’m not good with that kind of math, but it’s a tradeoff either way.

⤋ Read More

Where’s the Calculator on iPad? Use Spotlight!
Calculators are wildly useful tools for various obvious reasons, whether you need to perform simple math or complex calculations. One of the more curious iPad oversights on Apple’s behalf is the lack of a built-in Calculator app, which is missing on iPad, but has been included on the Mac, iPhone, and Apple Watch, since the … Read MoreRead more

⤋ Read More
In-reply-to » @prologic High five, I’m “generation Java” as well! 😂 There were some leftovers of C++, we used that in the computer graphics courses in Uni a lot. But pretty much anything else that involved programming was Java.

@movq@www.uninformativ.de Haha! yeah sounds about like my HS CS program. A math teacher taught visual basic and pascal. and over on the other end of the school we had “electronics” which was a room next to the auto body class where they had a bunch of random computer parts scavenged from the district decommissioned surplus storage.

The advanced class would piece together training kits for the basic class to put together.

⤋ Read More

Golang 如何有效限制併發數?
Go 語言目前很火熱,一部分原因在於自身帶 “高併發” 的標籤,其本身就擁有優秀的併發量和吞吐量。1 協程可以無限創建嗎?我們在日常開發中會有高併發場景,有時會用多協程併發實現。在高併發業務場景,能否可以隨意開闢 goroutine 並且放養不管呢?畢竟有強大的 GC 和優越的 GMP 調度算法。看下面的代碼:package mainimport (    ”fmt”    ”math”    ” ⌘ Read more

⤋ Read More
In-reply-to » I found these write-ups for advent of code. They are quite well done and a great learning resouce for algorithms!

@xuu@txt.sour.is Despite that these AoC math text problems are rather silly in my opinion (reminds me of an exercise in our math book where somebody wanted to carry a railroad rail around an L-shaped corner in the house and the question was how long that rail could be so that it still fits — sure, we’ve all carried several meter long railroad rails in our houses by ourselves numerous times…), these algorithms are really neat!

⤋ Read More
In-reply-to » Basecamp Details 'Obscene' $3.2 Million Bill That Prompted It To Quit the Cloud An anonymous reader shares a report: David Heinemeier Hansson, CTO of 37Signals -- which operates project management platform Basecamp and other products -- has detailed the colossal cloud bills that saw the outfit quit the cloud in October 2022. The CTO and creator of Ruby On Rails did all the sums and came up with an e ... ⌘ Read more

So… Just out of curiosity (again), back of paper napkin math. Based on Vultr pricing, running my infra in the “Cloud”™ would cost me upwards of $1300 per month. That’s about ~10x more than my current power bill for my entire household 😅 (10 VMs of around ~4 vCPUS and 4-6GB of RAM each + 10TB of storage on the NAS)

⤋ Read More

Math support in Markdown
Mathematical expressions are key to information sharing amongst engineers, scientists, data scientists, and mathematicians. Today we are pleased to announce that math expressions can be rendered in Markdown on GitHub using $$ as a delimiter for code blocks with math content or the $ delimiter for inline math expressions. ⌘ Read more

⤋ Read More

being able to render TeX math equations to PNG files is pretty empowering, because it allows me to write about more technical things here that would otherwise be more difficult to communicate in plaintext.

⤋ Read More