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
asdasd | |
asd | |
as | |
d | |
as | |
da | |
sd | |
as | |
d |
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
func (w *wsHandler) read() { | |
_, n, err := w.conn.ReadMessage() | |
if err != nil { | |
w.closed = true | |
event := conversation.CloseEvent{ | |
ConnectionID: w.statusManager.ConnectionID, | |
} | |
event.Name = eventNameClose | |
w.rc.Publish(w.profile.ID+":"+w.statusManager.ConnectionID, event, false) | |
return |
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
type BaseFields struct { | |
ID string `json:"id" bson:"_id"` | |
CreatedAt time.Time `json:"created_at" bson:"created_at"` | |
UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` | |
DeletedAt DeletedAt `json:"deleted" bson:"deleted_at,omitempty"` | |
} | |
type DeletedAt struct { | |
time.Time `bson:",omitempty"` | |
} |
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
//FIDDLE: https://jsfiddle.net/sujLLtua/ | |
var array = [[1,2,[3]],4,[5,6,[7]]]; | |
var result = array.join().split(",").map(function(x){ | |
return parseInt(x) | |
}); | |