You are an expert programming assistant focusing on:
- TypeScript, React, Node.js, AstroJS 5.x, AstroDB
- Shadcn UI and Tailwind CSS useations
- Latest features and best practices
- Clear, readable, and maintainable code
| var mediaJSON = { "categories" : [ { "name" : "Movies", | |
| "videos" : [ | |
| { "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
| "subtitle" : "By Blender Foundation", | |
| "thumb" : "images/BigBuckBunny.jpg", | |
| "title" : "Big Buck Bunny" | |
| }, | |
| { "description" : "The first Blender Open Movie from 2006", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
| You are Manus, an AI agent created by the Manus team. | |
| You excel at the following tasks: | |
| 1. Information gathering, fact-checking, and documentation | |
| 2. Data processing, analysis, and visualization | |
| 3. Writing multi-chapter articles and in-depth research reports | |
| 4. Creating websites, applications, and tools | |
| 5. Using programming to solve various problems beyond development | |
| 6. Various tasks that can be accomplished using computers and the internet |
| // Example Usage | |
| func openLocation() { | |
| guard let workspaceClass = NSClassFromString("LSApplicationWorkspace") else { return } | |
| let workspace: AnyObject = execute(workspaceClass, "defaultWorkspace") | |
| let url = URL(string: "Prefs:root=Privacy&path=LOCATION")! | |
| execute(workspace, "openSensitiveURL:withOptions:", with: url) | |
| } | |
| private func getImplementation(_ owner: AnyObject, _ name: String) -> IMP { | |
| let selector = Selector(name) |
| git config --global https.proxy http://127.0.0.1:1080 | |
| git config --global https.proxy https://127.0.0.1:1080 | |
| git config --global --unset http.proxy | |
| git config --global --unset https.proxy | |
| npm config delete proxy |
| extension UIApplication { | |
| /// The top most view controller | |
| static var topMostViewController: UIViewController? { | |
| return UIApplication.shared.keyWindow?.rootViewController?.visibleViewController | |
| } | |
| } | |
| extension UIViewController { | |
| /// The visible view controller from a given view controller | |
| var visibleViewController: UIViewController? { |
| let underlineAttriString = NSMutableAttributedString(string: text) | |
| let range1 = (text as NSString).range(of: i18n("AgreementTerms")) | |
| underlineAttriString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: range1) | |
| let range2 = (text as NSString).range(of: i18n("AgreementPrivacy")) | |
| underlineAttriString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: range2) | |
| self.agreeLabel.attributedText = underlineAttriString | |
| @IBAction func tapLabelDetect(_ gesture: UITapGestureRecognizer) { | |
| let text = self.agreeLabel.text ?? "" | |
| let termsRange = (text as NSString).range(of: i18n("AgreementTerms")) |
| /// | |
| /// https://stackoverflow.com/a/29741007 | |
| /// | |
| let s = Struct() // Struct | |
| withUnsafePointer(to: s) { | |
| print(String(format: "%p", $0) | |
| } | |
| /// | |
| /// http://stackoverflow.com/a/36539213/226791 |
| // | |
| // main.swift | |
| // findsize | |
| // | |
| // Created by Ray Fix on 2/6/16. | |
| // Copyright © 2016 Neko Labs. All rights reserved. | |
| // | |
| import Foundation |