老房东 on Nostr: 写一段神秘代码,发现报税时用的上 ``` let data = """ """ // Split the ...
写一段神秘代码,发现报税时用的上
```
let data = """
"""
// Split the data into lines
let lines = data.components(separatedBy: "\n")
// Add a line number to each line
for (index, line) in lines.enumerated() {
print("\(index + 1): \(line)")
}
```
Published at
2024-03-14 03:19:00Event JSON
{
"id": "05d71a0b61ce32265bb1e34a0dc5087f4d8adcc331e5be69b21272760e187b6b",
"pubkey": "06f0d4127f96e0f689489ad9fc60939204596d1815a8b2a99a5933b3e66d63cf",
"created_at": 1710386340,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.world/users/hdcola/statuses/112091879226156524",
"activitypub"
]
],
"content": "写一段神秘代码,发现报税时用的上\n\n```\nlet data = \"\"\"\n\"\"\"\n\n// Split the data into lines\nlet lines = data.components(separatedBy: \"\\n\")\n\n// Add a line number to each line\nfor (index, line) in lines.enumerated() {\n print(\"\\(index + 1): \\(line)\")\n}\n```",
"sig": "bc08852daf486fec6c13b6d95917c5006e5ec927de4a19862596f20d078afeded686f2687f53871511d0fe87f05efe2c4c69d26517f24ff4cb758d3ebd0e4d9b"
}