This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Title</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>news like sspai</title> | |
| <style> | |
| * {margin: 0;padding: 0} | |
| html { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>轮播</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <style> | |
| .banner { | |
| margin: 0 auto; | |
| width: 1000px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>渐变轮播DEMO</title> | |
| <script src="//code.jquery.com/jquery-2.1.1.min.js"></script> | |
| <style> | |
| ul,a,li { | |
| margin:0; | |
| padding: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function currentUser() { | |
| let user = AV.User.current() | |
| if (user) { | |
| // let r = parseUserFromAVUser(user) | |
| // console.log( '-- user --: ' + r['objectId']) | |
| return parseUserFromAVUser(user) | |
| } else { | |
| return undefined | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| protocol Channel: IteratorProtocol { | |
| func send(_ value: Element?) | |
| } | |
| /// A blocking channel for sending values. | |
| /// | |
| /// `send` and `receive` must run in separate separate execution contexts, otherwise you get a deadlock. | |
| final class BlockingChannel<A>: Channel { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol SoundsFunc { | |
| func voice () -> String | |
| } | |
| class Computer { | |
| var name: String | |
| init(name: String) { | |
| self.name = name; | |
| } | |
| func calculat() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //-------- swift 集合类型解读 - 1210 | |
| /* | |
| --> Sequence 协议 | |
| 这个协议是内置集合类型的核心,正是它让 针对元素序列的通用操作 成为可能 | |
| 其规定了要实现跟返回一个 迭代器(Iterator) | |
| protocol Sequence { | |
| associatedtype Iterator: IteratorProtocol // 这里使用了 关联类型,作用就是协议中的 “范型” 或者 “alias” | |
| func makeIterator() -> Iterator | |
| } | |
| --> IteratorProtocol 协议,一般只有在自定义序列类型的时候才使用 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //-------- swift 集合类型解读 之 Sequence - 1212 | |
| /* | |
| 另一个 完备的模拟使用,比如在 终端上的打印所有的输入过程 | |
| */ | |
| // a 实现一个 Iterator | |
| struct PrefixIterator: IteratorProtocol { | |
| let str: String | |
| var offset: String.Index | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package net.jmecn.math; | |
| /** | |
| * 四元数 | |
| * | |
| * | |
| */ | |
| public class Quaternion { | |
| public float x, y, z, w; |