text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (ls *linestate) deleteToEnd() { ls.buf = ls.buf[:ls.pos] ls.refreshLine() }
[ 0.534622311592102, -1.0845422744750977, 0.42145347595214844, -0.9175264239311218, 0.5641829967498779, -0.2728336453437805, -0.22492583096027374, 0.045085206627845764, 0.07646462321281433, 0.17862346768379211, -0.6653909087181091, 0.5015647411346436, 0.5215957164764404, 0.050907883793115616...
func (ls *linestate) deletePrevWord() { oldPos := ls.pos // remove spaces for ls.pos > 0 && ls.buf[ls.pos-1] == ' ' { ls.pos-- } // remove word for ls.pos > 0 && ls.buf[ls.pos-1] != ' ' { ls.pos-- } ls.buf = append(ls.buf[:ls.pos], ls.buf[oldPos:]...) ls.refreshLine() }
[ 0.8649998307228088, -0.8217722773551941, 1.0885405540466309, -0.7628850936889648, -0.42640626430511475, 0.09077996015548706, 0.050034049898386, 0.641225278377533, 0.3948827385902405, 0.6913031935691833, -0.23337328433990479, 0.3660314679145813, -0.13864658772945404, 1.2637176513671875, 0...
func (ls *linestate) completeLine() rune { // get a list of line completions lc := ls.ts.completionCallback(ls.String()) if len(lc) == 0 { // no line completions beep() return KeycodeNull } // navigate and display the line completions stop := false idx := 0 u := utf8{} var r rune for !stop { if idx < ...
[ 0.07634402066469193, -0.6493092179298401, 0.7633213996887207, 0.22858230769634247, -0.2968808114528656, -0.19251860678195953, -0.31919175386428833, -0.05354134365916252, 0.03285001590847969, -0.07543251663446426, -0.10659699141979218, -0.6104958057403564, 0.39680907130241394, 0.59224545955...
func (ls *linestate) String() string { return string(ls.buf) }
[ 0.8060183525085449, -1.9962520599365234, -0.08988809585571289, -0.7948879599571228, -0.3878333568572998, 1.0243842601776123, -0.12703506648540497, -0.9080087542533875, 0.3395448327064514, -1.1823499202728271, -0.5440005660057068, 0.5371447801589966, 0.24287746846675873, -0.0049807680770754...
func NewLineNoise() *Linenoise { l := Linenoise{} l.historyMaxlen = 32 return &l }
[ 1.1057744026184082, -0.5641398429870605, 0.16137069463729858, 0.2702079713344574, 0.10783815383911133, -0.0036974770482629538, -1.3850703239440918, -0.611764132976532, 0.5915860533714294, -1.4235751628875732, -1.3787201642990112, 0.35520562529563904, -0.008177765645086765, 0.40773424506187...
func (l *Linenoise) edit(ifd, ofd int, prompt, init string) (string, error) { // create the line state ls := newLineState(ifd, ofd, prompt, l) // set and output the initial line ls.editSet(init) // The latest history entry is always our current buffer l.HistoryAdd(ls.String()) u := utf8{} for { r := u.getRu...
[ 0.4288197457790375, -0.4144691824913025, 0.6803739070892334, 0.10092998296022415, -0.31489092111587524, -0.48505833745002747, 0.07899991422891617, -0.23958158493041992, 0.2890184223651886, -0.1298966258764267, -0.05949315428733826, 0.3164728879928589, 0.41530734300613403, 0.290774852037429...
func (l *Linenoise) readRaw(prompt, init string) (string, error) { // set rawmode for stdin l.enableRawMode(syscall.Stdin) defer l.disableRawMode(syscall.Stdin) // edit the line s, err := l.edit(syscall.Stdin, syscall.Stdout, prompt, init) fmt.Printf("\r\n") return s, err }
[ -0.2689315974712372, -0.39604291319847107, 0.892884373664856, 0.14549507200717926, -0.8110232353210449, 0.6250993609428406, -0.48624616861343384, -0.08624420315027237, -0.04940914735198021, -0.5887330174446106, -0.044528014957904816, 0.6669566035270691, 0.3093113601207733, -0.2095589935779...
func (l *Linenoise) readBasic() (string, error) { if l.scanner == nil { l.scanner = bufio.NewScanner(os.Stdin) } // scan a line if !l.scanner.Scan() { // EOF - return quit return "", ErrQuit } // check for unexpected errors err := l.scanner.Err() if err != nil { return "", err } // get the line string...
[ 0.37522584199905396, 0.004334688186645508, 0.9929192066192627, 0.4965400993824005, -0.34956854581832886, 0.6943244934082031, -1.0823782682418823, -0.95294588804245, -0.6839613914489746, -0.16053523123264313, 0.8097012042999268, -0.08980190753936768, 0.27598491311073303, -0.2824577689170837...
func (l *Linenoise) Read(prompt, init string) (string, error) { if !isatty.IsTerminal(uintptr(syscall.Stdin)) { // Not a tty, read from a file or pipe. return l.readBasic() } else if unsupportedTerm() { // Not a terminal we know about, so basic line reading. fmt.Printf(prompt) s, err := l.readBasic() if e...
[ 0.000768898578826338, -0.7974491119384766, 0.6800205111503601, 0.47521349787712097, -0.35589471459388733, 0.48259207606315613, -1.158689022064209, -0.43648049235343933, -0.1305151730775833, -0.5824291110038757, 0.8122138977050781, 0.4542835056781769, 0.12076608091592789, -0.168347746133804...
func (l *Linenoise) Loop(fn func() bool, exitKey rune) bool { // set rawmode for stdin err := l.enableRawMode(syscall.Stdin) if err != nil { log.Printf("enable rawmode error %s\n", err) return false } u := utf8{} rc := false looping := true for looping { // get a rune r := u.getRune(syscall.Stdin, &t...
[ -0.49564802646636963, 0.14063821732997894, 0.7423482537269592, 0.49737226963043213, -0.5791091918945312, 1.0820207595825195, -0.8101881742477417, 0.21974347531795502, -0.6048855185508728, 1.232695460319519, -0.1450907438993454, -0.49098071455955505, 0.08828115463256836, -0.0102539546787738...
func (l *Linenoise) PrintKeycodes() { fmt.Printf("Linenoise key codes debugging mode.\n") fmt.Printf("Press keys to see scan codes. Type 'quit' at any time to exit.\n") // set rawmode for stdin err := l.enableRawMode(syscall.Stdin) if err != nil { log.Printf("enable rawmode error %s\n", err) return } u :=...
[ 0.48472025990486145, -0.4606747627258301, 0.7974391579627991, -0.021084172651171684, -0.5919517278671265, -0.17124855518341064, -0.5820256471633911, -0.46053531765937805, -0.1277393400669098, 0.03647046908736229, -0.45180803537368774, 0.77152019739151, -0.15806730091571808, 0.5065228343009...
func (l *Linenoise) SetCompletionCallback(fn func(string) []string) { l.completionCallback = fn }
[ 0.671503484249115, -0.6257745623588562, 0.3070030212402344, 0.06198352947831154, 0.16387157142162323, 0.06806682795286179, 0.7014450430870056, 0.291459321975708, 0.6190335750579834, 0.0657748132944107, -1.0291130542755127, -1.2689318656921387, 1.8937093019485474, 1.1183557510375977, -0.3...
func (l *Linenoise) SetHintsCallback(fn func(string) *Hint) { l.hintsCallback = fn }
[ 1.0674736499786377, 0.053229883313179016, 0.3936077356338501, -0.6354809999465942, 0.24569402635097504, 0.5087791681289673, 0.26616331934928894, -0.08183731138706207, 0.3627565801143646, 0.06009446457028389, -0.7471712231636047, -0.6294713616371155, 0.990007221698761, 0.16557686030864716, ...
func (l *Linenoise) SetMultiline(mode bool) { l.mlmode = mode }
[ 0.02939143404364586, -0.42408260703086853, 0.5306003093719482, 0.48202410340309143, -0.5702689290046692, 0.5895397663116455, -0.7746471762657166, 0.31902965903282166, -0.09016319364309311, -0.047383327037096024, -1.2600972652435303, 0.13994598388671875, 0.047488193958997726, 1.473480463027...
func (l *Linenoise) SetHotkey(key rune) { l.hotkey = key }
[ 0.3086429238319397, -0.07796042412519455, 0.08567550778388977, 0.195929154753685, 0.8979923725128174, 0.20422442257404327, -0.22026993334293365, 0.28369009494781494, -0.1768549382686615, 0.3844907283782959, -0.8838657140731812, 0.255443274974823, 1.1349844932556152, 1.7335361242294312, -...
func (l *Linenoise) historyPop(idx int) string { if idx < 0 { // pop the last entry idx = len(l.history) - 1 } if idx >= 0 && idx < len(l.history) { s := l.history[idx] l.history = append(l.history[:idx], l.history[idx+1:]...) return s } // nothing to pop return "" }
[ 0.08963529020547867, 0.7875930666923523, 0.6829299330711365, -0.2048938274383545, 0.11648150533437729, 0.11677154898643494, -0.31141820549964905, -0.40809711813926697, 1.0509312152862549, 1.0618562698364258, 0.641444981098175, -0.21125002205371857, 0.06868926435709, -0.6504423022270203, ...
func (l *Linenoise) historySet(idx int, line string) { l.history[len(l.history)-1-idx] = line }
[ 0.47838568687438965, 0.14480793476104736, 0.18243539333343506, -0.47669073939323425, 0.4828660786151886, 0.08567707240581512, -0.46974965929985046, -0.5377644896507263, 0.2285134643316269, -0.5807127952575684, -0.02694123052060604, 1.1616313457489014, 0.1338086724281311, -0.339525669813156...
func (l *Linenoise) historyGet(idx int) string { return l.history[len(l.history)-1-idx] }
[ 0.004049607552587986, 0.051796380430459976, 0.4866938591003418, -0.49985766410827637, 0.44334036111831665, -0.33021610975265503, -0.8054795265197754, -1.2788043022155762, 0.2390640527009964, -0.7348043322563171, 0.5980736613273621, 0.7592570185661316, 0.03136663883924484, -0.76100611686706...
func (l *Linenoise) historyList() []string { return l.history }
[ 0.7219393253326416, -0.1299504190683365, 0.2416868656873703, 0.45548513531684875, 0.8040776252746582, 0.8568159937858582, -0.9248141646385193, 0.2379208356142044, 0.7795805335044861, -0.030093085020780563, -0.5711460113525391, 0.6885989904403687, 0.8475625514984131, 1.0075407028198242, -...
func (l *Linenoise) historyNext(ls *linestate) string { if len(l.history) == 0 { return "" } // update the current history entry with the line buffer l.historySet(ls.historyIndex, ls.String()) ls.historyIndex-- // next history item if ls.historyIndex < 0 { ls.historyIndex = 0 } return l.historyGet(ls.histo...
[ 0.33194711804389954, -0.15397962927818298, 0.4736590087413788, 0.8153571486473083, -0.2805650234222412, 0.3036256432533264, -0.5703856945037842, -0.359798401594162, 0.9982366561889648, -0.8883933424949646, -0.13458667695522308, 0.6100687384605408, 0.2547454237937927, 0.19927264750003815, ...
func (l *Linenoise) historyPrev(ls *linestate) string { if len(l.history) == 0 { return "" } // update the current history entry with the line buffer l.historySet(ls.historyIndex, ls.String()) ls.historyIndex++ // previous history item if ls.historyIndex >= len(l.history) { ls.historyIndex = len(l.history) -...
[ 0.47447651624679565, 0.14541606605052948, 0.8386234045028687, -0.12343595176935196, 0.005627288017421961, 0.1186859980225563, 0.2610568106174469, -0.18728800117969513, 0.4922289550304413, -0.49242809414863586, -0.24339047074317932, 0.45230284333229065, 0.029798218980431557, -0.045346770435...
func (l *Linenoise) HistoryAdd(line string) { if l.historyMaxlen == 0 { return } // don't re-add the last entry if len(l.history) != 0 && line == l.history[len(l.history)-1] { return } // add the line to the history if len(l.history) == l.historyMaxlen { // remove the first entry l.historyPop(0) } l.hi...
[ 0.8698944449424744, 0.3616703152656555, 0.7887682914733887, 0.41468343138694763, 0.889352560043335, 0.6435911059379578, -0.2788502871990204, 0.5715891122817993, 1.153613567352295, -0.5951593518257141, 0.36638638377189636, 0.5426062941551208, -0.04212939739227295, 0.6995330452919006, 0.30...
func (l *Linenoise) HistorySetMaxlen(n int) { if n < 0 { return } l.historyMaxlen = n currentLength := len(l.history) if currentLength > l.historyMaxlen { // truncate and retain the latest history l.history = l.history[currentLength-l.historyMaxlen:] } }
[ 0.6907703876495361, 0.4347526729106903, 0.30802246928215027, -0.08164294809103012, -0.023557420819997787, 0.21713107824325562, -0.4363199472427368, 0.35808321833610535, 1.0244721174240112, -0.44678741693496704, -0.4563446044921875, 0.4108844995498657, 0.5293021202087402, 1.1906872987747192...
func (l *Linenoise) HistorySave(fname string) { if len(l.history) == 0 { return } f, err := os.Create(fname) if err != nil { log.Printf("error opening %s\n", fname) return } _, err = f.WriteString(strings.Join(l.history, "\n")) if err != nil { log.Printf("%s error writing %s\n", fname, err) } f.Close()...
[ 0.3810163736343384, 0.14284171164035797, 0.5947157144546509, -0.3453456461429596, 0.8245764970779419, 0.30676549673080444, 0.1704028844833374, 0.26620548963546753, -0.39992111921310425, -0.10509777814149857, -0.714224636554718, -0.08219439536333084, 0.118514783680439, 1.0598297119140625, ...
func (l *Linenoise) HistoryLoad(fname string) { info, err := os.Stat(fname) if err != nil { return } if !info.Mode().IsRegular() { log.Printf("%s is not a regular file\n", fname) return } f, err := os.Open(fname) if err != nil { log.Printf("%s error on open %s\n", fname, err) return } b := bufio.NewR...
[ 0.3237878084182739, 0.21496838331222534, 0.9317410588264465, -0.2727811336517334, -0.47242042422294617, 0.061855386942625046, -0.17844019830226898, 0.3203442692756653, -0.11968067288398743, -0.013372503221035004, 0.05462101101875305, 0.4909074604511261, 0.3261778950691223, 0.80107921361923...
func (d *DSP) Release() error { res := C.FMOD_DSP_Release(d.cptr) return errs[res] }
[ -1.576183557510376, 1.0849814414978027, 0.2645708918571472, -0.08117270469665527, -0.5711324214935303, -0.8906102776527405, 0.9646008014678955, -0.18944285809993744, 0.15453387796878815, -0.44410836696624756, -0.10078476369380951, 0.6900688409805298, -0.3084818422794342, 0.1562000960111618...
func (d *DSP) SystemObject() (*System, error) { var system System res := C.FMOD_DSP_GetSystemObject(d.cptr, &system.cptr) return &system, errs[res] }
[ -0.5655452013015747, -0.028583554551005363, 0.47291794419288635, 0.28362542390823364, -0.7311252355575562, -0.3945150375366211, 0.8151727914810181, -0.9492222666740417, 0.25144243240356445, -1.3078328371047974, -0.6539500951766968, 0.7290734648704529, 0.48370590806007385, 0.011156735941767...
func (d *DSP) AddInput(input DSP, typ DSPConnectionType) (DspConnection, error) { var dspConn DspConnection res := C.FMOD_DSP_AddInput(d.cptr, input.cptr, &dspConn.cptr, C.FMOD_DSPCONNECTION_TYPE(typ)) return dspConn, errs[res] }
[ -1.8903177976608276, 0.25274285674095154, 0.6054108142852783, 0.06142590939998627, -0.8165632486343384, 0.22683973610401154, 0.5288677215576172, -0.06284353882074356, 0.613909900188446, -0.8097899556159973, 0.481537789106369, 0.505494236946106, -0.8042052388191223, -0.04159443452954292, ...
func (d *DSP) DisconnectFrom(target DSP, connection DspConnection) error { res := C.FMOD_DSP_DisconnectFrom(d.cptr, target.cptr, connection.cptr) return errs[res] }
[ -0.9242448210716248, -0.3253093659877777, 0.4755180776119232, -0.33773332834243774, -0.4668659567832947, -0.31944650411605835, 0.24474483728408813, 0.15128736197948456, 0.12661892175674438, -0.2545097768306732, 0.7350634336471558, 0.1277536302804947, 0.5749675631523132, -0.7023800015449524...
func (d *DSP) DisconnectAll(inputs, outputs bool) error { res := C.FMOD_DSP_DisconnectAll(d.cptr, getBool(inputs), getBool(outputs)) return errs[res] }
[ -0.773151159286499, 0.14916492998600006, 0.5494313836097717, 0.6835310459136963, -0.3115699589252472, -0.28732678294181824, 0.21568529307842255, -0.04470754414796829, -0.07216710597276688, -0.21291206777095795, 0.38304561376571655, -0.3069828152656555, 0.1987687647342682, 0.181775271892547...
func (d *DSP) NumInputs() (int, error) { var numinputs C.int res := C.FMOD_DSP_GetNumInputs(d.cptr, &numinputs) return int(numinputs), errs[res] }
[ -1.3056813478469849, 1.440979242324829, 0.6859173774719238, -0.2540673315525055, -0.7418835759162903, -0.930435299873352, 1.194197654724121, -0.0010870073456317186, 0.41996854543685913, -1.2128955125808716, -0.9895027875900269, 0.11585823446512222, -0.3478628695011139, 0.002371390117332339...
func (d *DSP) NumOutputs() (int, error) { var numoutputs C.int res := C.FMOD_DSP_GetNumOutputs(d.cptr, &numoutputs) return int(numoutputs), errs[res] }
[ -0.8302730321884155, 0.9578216671943665, 0.6964915990829468, -0.2769826352596283, -0.5291972756385803, -1.6092865467071533, 1.1865885257720947, -0.03866494819521904, -0.02229815348982811, -1.0481233596801758, -0.9931126236915588, -0.46655863523483276, 0.3510815501213074, 0.1844712644815445...
func (d *DSP) Input(index int) (DSP, DspConnection, error) { var input DSP var inputconnection DspConnection res := C.FMOD_DSP_GetInput(d.cptr, C.int(index), &input.cptr, &inputconnection.cptr) return input, inputconnection, errs[res] }
[ -1.2498763799667358, 0.2667570114135742, 0.5324267148971558, -0.3243759274482727, -0.9466220736503601, -0.5370911359786987, 1.1529790163040161, -0.37003836035728455, 0.8211139440536499, -0.5849625468254089, -0.3472733199596405, 0.4421844780445099, -0.42446091771125793, -0.2718920409679413,...
func (d *DSP) Output(index int) (DSP, DspConnection, error) { var output DSP var outputconnection DspConnection res := C.FMOD_DSP_GetOutput(d.cptr, C.int(index), &output.cptr, &outputconnection.cptr) return output, outputconnection, errs[res] }
[ -1.5413752794265747, 0.21151606738567352, 0.43010231852531433, -0.4465193450450897, -1.0335544347763062, -1.325803518295288, 0.6741959452629089, -0.7659730315208435, 0.3699067234992981, -0.06345381587743759, -0.4637485146522522, -0.18290656805038452, -0.17063339054584503, -0.30281633138656...
func (d *DSP) SetActive(active bool) error { res := C.FMOD_DSP_SetActive(d.cptr, getBool(active)) return errs[res] }
[ -0.8936518430709839, 0.035149943083524704, 0.5778300166130066, 0.20584280788898468, -0.4806258976459503, 0.01455223560333252, 1.150657057762146, 0.015997078269720078, -0.18806888163089752, -0.6089076995849609, -0.9826207756996155, 0.27109357714653015, -0.02320782095193863, -0.8044339418411...
func (d *DSP) IsActive() (bool, error) { var active C.FMOD_BOOL res := C.FMOD_DSP_GetActive(d.cptr, &active) return setBool(active), errs[res] }
[ -0.8916550874710083, -0.38857170939445496, 0.7142245173454285, 0.10962886363267899, -0.33119842410087585, -0.47101083397865295, 0.5083895921707153, 0.19063305854797363, -0.005386345088481903, -0.4471307694911957, -0.7040759325027466, 0.6626299619674683, -0.2279125452041626, -0.880194425582...
func (d *DSP) SetBypass(bypass bool) error { res := C.FMOD_DSP_SetBypass(d.cptr, getBool(bypass)) return errs[res] }
[ -0.6502617001533508, 0.3473083972930908, 0.5737587809562683, -0.23541802167892456, -0.1681501567363739, -0.4146560728549957, 1.498913049697876, -0.5811023116111755, -0.11692275106906891, -0.10872705280780792, -0.610392689704895, 0.5729175209999084, 0.00040874574915505946, -0.32102119922637...
func (d *DSP) Bypass() (bool, error) { var bypass C.FMOD_BOOL res := C.FMOD_DSP_GetBypass(d.cptr, &bypass) return setBool(bypass), errs[res] }
[ -0.9418895840644836, 0.4913792312145233, 0.5884485840797424, -0.35774803161621094, -0.049988992512226105, -0.532967209815979, 1.0938949584960938, -0.6726495027542114, -0.03895258903503418, -0.376101016998291, -0.33198586106300354, 0.5810576677322388, -0.030893847346305847, -0.7865703105926...
func (d *DSP) SetWetDryMix(prewet, postwet, dry float64) error { res := C.FMOD_DSP_SetWetDryMix(d.cptr, C.float(prewet), C.float(postwet), C.float(dry)) return errs[res] }
[ -0.9443504810333252, 0.15147104859352112, 0.486609548330307, -0.9312863945960999, -0.12989169359207153, 0.45885154604911804, 0.9719234108924866, -0.42089536786079407, -0.5205166935920715, -1.288910984992981, -0.3769837021827698, 0.7437726855278015, 0.7509453296661377, 0.34175771474838257, ...
func (d *DSP) WetDryMix() (float64, float64, float64, error) { var prewet, postwet, dry C.float res := C.FMOD_DSP_GetWetDryMix(d.cptr, &prewet, &postwet, &dry) return float64(prewet), float64(postwet), float64(dry), errs[res] }
[ -1.0299490690231323, 0.3052932918071747, 0.5642402172088623, -0.753909707069397, -0.009442140348255634, -0.12015439569950104, 0.9964368939399719, -0.3540947437286377, -0.22888056933879852, -0.9468290209770203, -0.03956497833132744, 0.5519628524780273, 0.3150653541088104, 0.4472537934780121...
func (d *DSP) SetChannelFormat(channelmask ChannelMask, numchannels int, source_speakermode SpeakerMode) error { res := C.FMOD_DSP_SetChannelFormat(d.cptr, C.FMOD_CHANNELMASK(channelmask), C.int(numchannels), C.FMOD_SPEAKERMODE(source_speakermode)) return errs[res] }
[ -0.3651267886161804, -0.1069142296910286, 0.2780633270740509, -0.6684631705284119, -0.3282270133495331, -0.9549605846405029, 0.11599325388669968, -0.38942980766296387, 0.6955698132514954, -0.865513026714325, -0.27114370465278625, 0.5866872668266296, 0.15097995102405548, 0.33344680070877075...
func (d *DSP) ChannelFormat() (ChannelMask, int, SpeakerMode, error) { var channelmask C.FMOD_CHANNELMASK var numchannels C.int var source_speakermode C.FMOD_SPEAKERMODE res := C.FMOD_DSP_GetChannelFormat(d.cptr, &channelmask, &numchannels, &source_speakermode) return ChannelMask(channelmask), int(numchannels), Sp...
[ -0.3376675546169281, -0.34298670291900635, 0.4974551200866699, -0.5082730650901794, -0.38574346899986267, -1.4812777042388916, 0.4107900857925415, -0.5757325887680054, 0.6782698631286621, -0.6892895102500916, 0.1179257184267044, 0.8660711050033569, -0.002646292559802532, 0.4031876921653747...
func (d *DSP) OutputChannelFormat(inmask ChannelMask, inchannels int, inspeakermode SpeakerMode) (ChannelMask, int, SpeakerMode, error) { var outmask C.FMOD_CHANNELMASK var outchannels C.int var outspeakermode C.FMOD_SPEAKERMODE res := C.FMOD_DSP_GetOutputChannelFormat(d.cptr, C.FMOD_CHANNELMASK(inmask), C.int(inch...
[ -1.0261561870574951, -0.6228403449058533, 0.48189350962638855, -0.6843137145042419, -0.5678293704986572, -1.4133834838867188, 0.3599379062652588, -0.8688409328460693, -0.014054748229682446, -0.2779216468334198, 0.36202603578567505, 0.04432503134012222, -0.3978285789489746, -0.3705309629440...
func (d *DSP) Reset() error { res := C.FMOD_DSP_Reset(d.cptr) return errs[res] }
[ -1.1272494792938232, 1.0587105751037598, 0.2654893398284912, 0.1999654918909073, -0.02023819275200367, -0.9658935070037842, 1.4631558656692505, -0.4157703220844269, -0.26217326521873474, -0.17497296631336212, -0.5176498293876648, 1.1436705589294434, 0.027947109192609787, -0.527064740657806...
func (d *DSP) SetParameterFloat(index int, value float64) error { res := C.FMOD_DSP_SetParameterFloat(d.cptr, C.int(index), C.float(value)) return errs[res] }
[ -0.9091084003448486, 1.2656950950622559, 0.3152028024196625, -0.02834896743297577, -0.3003504276275635, -0.1306169182062149, 1.1950873136520386, -0.3838540315628052, -0.32158607244491577, -0.45309385657310486, -0.14006155729293823, 0.6116957068443298, -0.5444594025611877, 0.532270133495330...
func (d *DSP) SetParameterInt(index, value int) error { res := C.FMOD_DSP_SetParameterInt(d.cptr, C.int(index), C.int(value)) return errs[res] }
[ -1.4349080324172974, 0.7664777636528015, 0.3645994961261749, -0.8908543586730957, -0.9654890298843384, 0.023717233911156654, 0.7515527606010437, -0.9016884565353394, 0.0511682853102684, 0.2638506293296814, -0.20005176961421967, 0.693254828453064, -0.18693622946739197, -0.04984249174594879,...
func (d *DSP) SetParameterBool(index int, value bool) error { res := C.FMOD_DSP_SetParameterBool(d.cptr, C.int(index), getBool(value)) return errs[res] }
[ -1.3975485563278198, 0.9815694689750671, 0.37847602367401123, 0.24492678046226501, -0.4111745357513428, 0.23697015643119812, 0.8212625980377197, -0.00652194581925869, 0.09337493777275085, 0.7200627326965332, -0.5095509886741638, 0.8539543151855469, 0.10432641953229904, -0.5470012426376343,...
func (d *DSP) SetParameterData(index C.int, data *interface{}, length C.uint) error { //FMOD_RESULT F_API FMOD_DSP_SetParameterData(FMOD_DSP *dsp, int index, void *data, unsigned int length); return ErrNoImpl }
[ -1.6516801118850708, 0.8162104487419128, 0.16568434238433838, -0.5964558720588684, -0.5945865511894226, 0.4676733613014221, 0.6243292093276978, -0.19844262301921844, 0.7408401370048523, -0.26458707451820374, -0.7677422165870667, 1.2197753190994263, -0.17183233797550201, -0.0207390487194061...
func (d *DSP) ParameterFloat(index C.int, value *C.float, valuestr *C.char, valuestrlen C.int) error { //FMOD_RESULT F_API FMOD_DSP_GetParameterFloat(FMOD_DSP *dsp, int index, float *value, char *valuestr, int valuestrlen); return ErrNoImpl }
[ -0.3956141173839569, 0.8883292078971863, 0.29161810874938965, -0.1426720917224884, -0.18859662115573883, -0.5761250853538513, 1.0370020866394043, -0.738628089427948, -0.2705603837966919, -0.7078059911727905, 0.2569442391395569, 0.8905337452888489, -0.26506030559539795, -0.02424338646233081...
func (d *DSP) ParameterInt(index C.int, value *C.int, valuestr *C.char, valuestrlen C.int) error { //FMOD_RESULT F_API FMOD_DSP_GetParameterInt(FMOD_DSP *dsp, int index, int *value, char *valuestr, int valuestrlen); return ErrNoImpl }
[ -0.860562801361084, 0.3623667061328888, 0.28649425506591797, -1.0042153596878052, -0.9004203081130981, -0.36978283524513245, 0.6340566277503967, -1.2465059757232666, -0.058821387588977814, 0.12120289355516434, 0.15084485709667206, 0.8672575354576111, -0.12733952701091766, -0.93617463111877...
func (d *DSP) ParameterBool(index C.int, value *C.FMOD_BOOL, valuestr *C.char, valuestrlen C.int) error { //FMOD_RESULT F_API FMOD_DSP_GetParameterBool(FMOD_DSP *dsp, int index, FMOD_BOOL *value, char *valuestr, int valuestrlen); return ErrNoImpl }
[ -0.9944213032722473, 0.5310469269752502, 0.4015415906906128, 0.16589032113552094, -0.4157593250274658, -0.039917953312397, 0.6796513795852661, -0.1422083079814911, 0.1291801929473877, 0.5141424536705017, -0.2232261598110199, 1.2255573272705078, 0.4344046413898468, -1.1980819702148438, 0....
func (d *DSP) ParameterData(index C.int, data **interface{}, length *C.uint, valuestr *C.char, valuestrlen C.int) error { //FMOD_RESULT F_API FMOD_DSP_GetParameterData(FMOD_DSP *dsp, int index, void **data, unsigned int *length, char *valuestr, int valuestrlen); return ErrNoImpl }
[ -1.089097261428833, 0.41349610686302185, 0.32324472069740295, -0.4878382384777069, -0.45203128457069397, 0.059703342616558075, 0.6080337166786194, -0.4936975836753845, 0.7419911026954651, -0.49654480814933777, 0.024155091494321823, 1.5125914812088013, -0.0019049488473683596, -0.30628466606...
func (d *DSP) NumParameters() (int, error) { var numparams C.int res := C.FMOD_DSP_GetNumParameters(d.cptr, &numparams) return int(numparams), errs[res] }
[ -1.051080346107483, 1.7216087579727173, 0.6657438278198242, -0.10577806085348129, -0.3970623016357422, -1.0713688135147095, 0.6453726291656494, 0.2101501077413559, 0.09363283962011337, -0.16145774722099304, -0.9592037200927734, 0.25815513730049133, -0.6218100190162659, 0.35034382343292236,...
func (d *DSP) ParameterInfo(index C.int, desc **C.FMOD_DSP_PARAMETER_DESC) error { //FMOD_RESULT F_API FMOD_DSP_GetParameterInfo (FMOD_DSP *dsp, int index, FMOD_DSP_PARAMETER_DESC **desc); return ErrNoImpl }
[ -1.1164239645004272, 0.8951603770256042, 0.48623621463775635, -0.3695420026779175, -0.3189622163772583, -0.10065536201000214, 0.7262313365936279, -0.4596608877182007, -0.11430148780345917, -0.26858535408973694, -0.23650364577770233, 0.9870972037315369, 0.541543185710907, -0.094345077872276...
func (d *DSP) DataParameterIndex(datatype C.int, index *C.int) error { //FMOD_RESULT F_API FMOD_DSP_GetDataParameterIndex (FMOD_DSP *dsp, int datatype, int *index); return ErrNoImpl }
[ -2.059117078781128, 0.7017644643783569, 0.25872132182121277, -0.858843207359314, -0.37150824069976807, 0.008718706667423248, 0.7345286011695862, -0.38798075914382935, 0.36027991771698, 0.25769495964050293, -0.789781391620636, 1.25899076461792, 0.2414921075105667, -0.14464108645915985, 0....
func (d *DSP) ShowConfigDialog(hwnd *interface{}, show C.FMOD_BOOL) error { //FMOD_RESULT F_API FMOD_DSP_ShowConfigDialog (FMOD_DSP *dsp, void *hwnd, FMOD_BOOL show); return ErrNoImpl }
[ -0.5576573014259338, 1.178200602531433, 0.6181551814079285, 0.159308061003685, -1.3764244318008423, -0.0076986742205917835, 1.3124644756317139, 0.7938159704208374, 0.1581379473209381, 0.446420282125473, -0.3240716755390167, 0.37982967495918274, 0.7719911336898804, 1.3135793209075928, 1.1...
func (d *DSP) Info(name *C.char, version *C.uint, channels, configwidth, configheight *C.int) error { //FMOD_RESULT F_API FMOD_DSP_GetInfo(FMOD_DSP *dsp, char *name, unsigned int *version, int *channels, int *configwidth, int *configheight); return ErrNoImpl }
[ -0.9430817365646362, 0.12866100668907166, 0.47059574723243713, -0.5030051469802856, -0.7633487582206726, -1.0330371856689453, 0.4238232374191284, -0.6548652052879333, -0.2918753921985626, 0.2321588546037674, -0.948151171207428, 0.22186604142189026, 0.4736965596675873, 0.015048888511955738,...
func (d *DSP) Type() (DSPType, error) { var typ C.FMOD_DSP_TYPE res := C.FMOD_DSP_GetType(d.cptr, &typ) return DSPType(typ), errs[res] }
[ -1.0771210193634033, 0.8003310561180115, 0.44802194833755493, 0.20529302954673767, -0.15433134138584137, -0.596118688583374, 0.7170878648757935, -0.724537193775177, 1.0001411437988281, -0.35936278104782104, -0.18795999884605408, 0.6629036068916321, -0.06864330172538757, 0.37760278582572937...
func (d *DSP) Idle() (bool, error) { var idle C.FMOD_BOOL res := C.FMOD_DSP_GetIdle(d.cptr, &idle) return setBool(idle), errs[res] }
[ -1.0546612739562988, 1.098961591720581, 0.7265786528587341, -0.42913222312927246, 0.3622894883155823, -0.28284481167793274, 0.49135342240333557, -0.41857054829597473, 0.4326859712600708, -0.7486141920089722, -0.8813291788101196, 0.49386218190193176, -1.1931204795837402, -0.2733549177646637...
func (d *DSP) SetUserData(userdata interface{}) error { data := *(*[]*C.char)(unsafe.Pointer(&userdata)) res := C.FMOD_DSP_SetUserData(d.cptr, unsafe.Pointer(&data)) return errs[res] }
[ -1.3383946418762207, 0.5830497741699219, 0.6039037704467773, 0.33184871077537537, -1.2200063467025757, 0.14075009524822235, 0.9148158431053162, -0.5520994663238525, 0.2836633026599884, -0.9917706251144409, -1.2774642705917358, 1.1905425786972046, -0.13566705584526062, 0.2209170013666153, ...
func (d *DSP) UserData() (interface{}, error) { var userdata *interface{} cUserdata := unsafe.Pointer(userdata) res := C.FMOD_DSP_GetUserData(d.cptr, &cUserdata) return *(*interface{})(cUserdata), errs[res] }
[ -0.8736580610275269, 0.33693209290504456, 0.6733049154281616, 0.4614320397377014, -1.1659268140792847, -0.47023773193359375, 0.9093989729881287, -0.7218257784843445, 0.4802076816558838, -1.302961826324463, -0.5462731122970581, 0.9151206612586975, -0.14773152768611908, -0.3449223041534424, ...
func (d *DSP) SetMeteringEnabled(inputEnabled, outputEnabled bool) error { res := C.FMOD_DSP_SetMeteringEnabled(d.cptr, getBool(inputEnabled), getBool(outputEnabled)) return errs[res] }
[ -0.4281682074069977, 0.3753153085708618, 0.682218074798584, 0.03698191046714783, -1.0665557384490967, 0.3656114339828491, 0.503421425819397, 0.13875405490398407, 0.35610371828079224, -0.308729350566864, -0.5525010228157043, 0.6525485515594482, -0.9709537625312805, 0.767609179019928, 0.63...
func (d *DSP) MeteringEnabled() (bool, bool, error) { var inputEnabled, outputEnabled C.FMOD_BOOL res := C.FMOD_DSP_GetMeteringEnabled(d.cptr, &inputEnabled, &outputEnabled) return setBool(inputEnabled), setBool(outputEnabled), errs[res] }
[ -0.13629162311553955, 0.1539444923400879, 0.9051240682601929, 0.13301533460617065, -0.705218493938446, 0.22581009566783905, 0.2614628076553345, 0.519349217414856, 0.1704326719045639, 0.17502176761627197, -0.9995807409286499, 0.3798375725746155, -0.736696720123291, 0.5919089913368225, 0.8...
func (d *DSP) MeteringInfo() (DSPMeteringInfo, DSPMeteringInfo, error) { var cinputInfo, coutputInfo C.FMOD_DSP_METERING_INFO var inputInfo, outputInfo DSPMeteringInfo res := C.FMOD_DSP_GetMeteringInfo(d.cptr, &cinputInfo, &coutputInfo) inputInfo.fromC(cinputInfo) outputInfo.fromC(coutputInfo) return inputInfo, o...
[ -0.4545063376426697, -0.37499916553497314, 0.9421008825302124, -0.44555994868278503, -1.0736216306686401, -0.15845341980457306, 0.3368774652481079, -0.09704171121120453, -0.5720053911209106, -0.2643841505050659, -0.7283561825752258, -0.03198973834514618, 0.39618292450904846, 0.440676212310...
func TestGetMgmtPortsSortedCost(t *testing.T) { testMatrix := map[string]struct { deviceNetworkStatus DeviceNetworkStatus rotate int expectedMgmtValue []string expectedAllValue []string }{ "Test single": { deviceNetworkStatus: DeviceNetworkStatus{ Version: DPCIsMgmt, Ports: []Ne...
[ 0.29696792364120483, 0.7918160557746887, 0.6392113566398621, -0.6478080153465271, 0.43828102946281433, -0.09485812485218048, 0.2753104567527771, -0.4459599256515503, 0.002832502592355013, -0.35513630509376526, -0.5423998832702637, -0.19596382975578308, 0.016250640153884888, 0.2093241810798...
func NewBuildClient(scheduler remoteworker.OperationQueueClient, buildExecutor BuildExecutor, filePool filesystem.FilePool, clock clock.Clock, workerID map[string]string, instanceNamePrefix digest.InstanceName, platform *remoteexecution.Platform, sizeClass uint32) *BuildClient { return &BuildClient{ scheduler: ...
[ -0.08825251460075378, -0.9920623898506165, 0.578294038772583, -0.4933331310749054, -1.0250744819641113, 0.4859851002693176, 0.6062674522399902, -0.49796009063720703, -0.5115670561790466, -0.12318311631679535, -0.6081459522247314, 0.8714857697486877, -0.6459333300590515, -0.3442939817905426...
func (bc *BuildClient) Run() error { // When executing an action, see if there are any updates on the // execution state. if bc.executionCancellation != nil { timer, timerChannel := bc.clock.NewTimer(bc.nextSynchronizationAt.Sub(bc.clock.Now())) select { case <-timerChannel: // No meaningful updates. Send t...
[ -0.5220870971679688, -0.6067688465118408, 0.8006405830383301, 0.7011154294013977, -0.05669587850570679, 0.07649648189544678, 0.5657441020011902, -0.07595521956682205, -0.24561981856822968, 0.27135369181632996, -0.2879249155521393, 0.40192610025405884, -0.716694712638855, 0.0521355532109737...
func (bc *BuildClient) InExecutingState() bool { return bc.inExecutingState }
[ -0.11758439242839813, -0.16094569861888885, 0.22190804779529572, 0.10443001985549927, -0.3183645009994507, 0.4722164571285248, -0.00859822053462267, 0.6451795101165771, -0.7580006718635559, 0.18476150929927826, -0.6716955304145813, 0.514764130115509, -1.1417592763900757, -0.061661541461944...
func NewGetDeviceHealthParams() *GetDeviceHealthParams { var () return &GetDeviceHealthParams{ timeout: cr.DefaultTimeout, } }
[ -0.12410065531730652, 0.0434790663421154, 0.3261714279651642, 0.9567371010780334, -0.2465144693851471, 0.2568983733654022, -0.06553906202316284, -0.1848514974117279, -0.23129872977733612, -0.7467942237854004, -0.17251549661159515, 0.772151529788971, -0.8315907716751099, 0.05270001292228699...
func (o *GetDeviceHealthParams) WithDeviceID(deviceID string) *GetDeviceHealthParams { o.SetDeviceID(deviceID) return o }
[ -0.44104188680648804, -0.5486226081848145, 0.4036412239074707, 0.2575456500053406, -0.5416305065155029, 0.9061914086341858, 0.05075642839074135, -0.7016751170158386, 1.3802649974822998, 0.15564794838428497, 0.6638919115066528, 0.1186794862151146, 0.17231987416744232, 1.0783239603042603, ...
func (o *GetDeviceHealthParams) SetDeviceID(deviceID string) { o.DeviceID = deviceID }
[ -0.9471427798271179, -0.22142018377780914, 0.3592738211154938, 0.41606950759887695, -0.19919782876968384, 1.1021802425384521, 0.6240276098251343, -0.19425207376480103, 0.825152575969696, -0.235686793923378, 0.40317970514297485, 0.6259312033653259, -0.5150294899940491, 1.406360387802124, ...
func (o *GetDeviceHealthParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // header param Authorization if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil { return err } // path pa...
[ -1.2893328666687012, 0.16820977628231049, 0.8468436002731323, -0.1701524555683136, 0.6276567578315735, -0.013411050662398338, 1.1062003374099731, -0.3736121356487274, -0.3072640001773834, -0.21164371073246002, 0.6396401524543762, 0.6095407009124756, -0.4595687687397003, -0.0654309689998626...
func palindromeIndex(s string) int { n := len(s) for i := 0; i < n/2; i++ { // problem, find which index // is at fault. if s[i] != s[n-i-1] { if palindrome(s[:i] + s[i+1:]) { return i } else { return n - i - 1 } } } return -1 }
[ -0.5278881192207336, -0.7904353737831116, 0.510736346244812, 0.10906747728586197, -0.7078883647918701, -0.3160983622074127, 0.7135964632034302, -0.10735206305980682, -0.06427229940891266, -0.5944757461547852, -0.7108336687088013, 0.5835092067718506, -1.4630236625671387, -0.9174057841300964...
func Register(ctx *gin.Context) { DB := common.GetDB() //获取数据 name := ctx.PostForm("name") telephone := ctx.PostForm("tel") password := ctx.PostForm("password") email := ctx.PostForm("email") //判断数据 if len(name) == 0 { name = utils.RandString(9) } if len(telephone) != 11 { response.Response(ctx, http...
[ -0.8347503542900085, 0.6734079122543335, 1.1906331777572632, 1.131937861442566, 0.36155709624290466, 0.38372310996055603, 0.22207041084766388, -0.09022608399391174, -0.003010392189025879, 0.14368180930614471, -1.4942095279693604, -0.8016451597213745, -0.28806644678115845, 0.401699393987655...
func Login(ctx *gin.Context) { DB := common.GetDB() //获取数据 telephone := ctx.PostForm("tel") password := ctx.PostForm("password") //判断数据 if len(telephone) != 11 { response.Response(ctx, http.StatusUnprocessableEntity, 4221, gin.H{}, "手机号必须为11位") return } if len(password) < 6 { response.Response(ctx, ht...
[ -0.2745548486709595, 0.043114837259054184, 1.3186237812042236, 0.6258469223976135, -0.5414872765541077, 0.3921043872833252, 0.09956905245780945, 0.5429439544677734, 0.41396647691726685, -0.027457939460873604, -0.9721187949180603, -0.2714797556400299, -0.017377076670527458, -0.0085833473131...
func Info(ctx *gin.Context) { user, _ := ctx.Get("user") response.Success(ctx, gin.H{ "user": dto.UserToDto(user.(model.User)), }, "ok") }
[ 0.17167580127716064, 0.31328874826431274, 0.7443370223045349, 0.22564555704593658, -0.4012737572193146, 0.13255077600479126, 0.4886710047721863, -0.4091346263885498, -0.9563838243484497, -0.1635463684797287, 0.014892430044710636, 0.5318408012390137, 1.2112829685211182, -0.4631693959236145,...
func UserExist(db *gorm.DB, tel string) bool { var user model.User db.First(&user, "telephone = ?", tel) if user.ID != 0 { return true } return false }
[ -0.27804574370384216, -0.06498569250106812, 0.3485804796218872, 1.028084635734558, 0.21273699402809143, 1.1275646686553955, -0.52088463306427, 0.2373420149087906, -0.06996989995241165, 0.4610990285873413, -0.4712575078010559, -1.5400891304016113, -0.15432767570018768, 1.0925768613815308, ...
func ToggleBluetoothFromBluetoothSettings(ctx context.Context, s *testing.State) { cr := s.FixtValue().(*bluetooth.ChromeLoggedInWithBluetoothEnabled).Chrome tconn, err := cr.TestAPIConn(ctx) if err != nil { s.Fatal("Failed to create Test API connection: ", err) } // Reserve ten seconds for cleanup. cleanupCt...
[ -0.354408860206604, 0.7583767175674438, 0.6173797845840454, -0.27919402718544006, 0.5687422752380371, 0.12345688045024872, 0.48318853974342346, -0.2958724796772003, -0.20830774307250977, 0.1409694105386734, -0.4672089219093323, 0.10602838546037674, -0.8710748553276062, 0.24369201064109802,...
func testParentSelection(t *testing.T, dsc, schema string) { t.Run(dsc, func(t *testing.T) { assertar := assert.New(t) ctrl := gomock.NewController(t) defer ctrl.Finish() consensus := NewMockConsensus(ctrl) store := NewMemStore() node := NewForTests(dsc, store, consensus) node.initParents() defer nod...
[ 0.14673930406570435, 0.6327155232429504, 0.21786484122276306, -0.1966327428817749, 0.7846173048019409, -0.5104959011077881, 0.5855069160461426, -0.18546968698501587, -0.6029257774353027, -0.47171396017074585, -0.30448341369628906, -0.13062550127506256, -0.1325780153274536, 0.67495083808898...
func NewSingleFlowNode(nodeName string, nodeType FlowNodeType, inputPorts, outputPorts []uint16, options map[string]string, cb SingleFlowProcessCallback, data interface{}) *SingleFlowNode { cname := C.CString(nodeName) defer C.free(unsafe.Pointer(cname)) var coptions *C.struct_sol_flow_node_options strvOptions :=...
[ 0.03732294589281082, -0.3434498608112335, 0.813273012638092, -0.250102698802948, -0.009251770563423634, 0.09334459900856018, 0.8221883773803711, -0.43226754665374756, 0.7869510650634766, 0.16293488442897797, -0.1678396612405777, 0.6676636338233948, -0.36829105019569397, -0.1399391442537307...
func (sf *SingleFlowNode) ConnectPort(portIndex uint16, direction int) { switch direction { case FlowPortInput: C.sol_flow_single_connect_port_in(sf.FlowNode.cnode, C.uint16_t(portIndex)) case FlowPortOutput: C.sol_flow_single_connect_port_out(sf.FlowNode.cnode, C.uint16_t(portIndex)) } }
[ -0.17338521778583527, -0.31966426968574524, 0.5082465410232544, 0.04693853482604027, 0.88458651304245, 0.6231172680854797, 1.2634540796279907, -0.39857053756713867, 0.8714162111282349, -0.34418150782585144, 0.13489778339862823, 0.011541393585503101, -0.5775512456893921, -0.2166444361209869...
func (sf *SingleFlowNode) DisconnectPort(portIndex uint16, direction int) { switch direction { case FlowPortInput: C.sol_flow_single_disconnect_port_in(sf.FlowNode.cnode, C.uint16_t(portIndex)) case FlowPortOutput: C.sol_flow_single_disconnect_port_out(sf.FlowNode.cnode, C.uint16_t(portIndex)) } }
[ -0.5618776679039001, -0.17916056513786316, 0.4174496531486511, -0.4556995630264282, 0.7089353799819946, 0.5588356852531433, 1.4289891719818115, -0.09374593198299408, 0.8235676288604736, -0.1629617065191269, -0.08960556238889694, -0.2868289053440094, -0.8049999475479126, -0.626184344291687,...
func HandleGetIP(ctx *gin.Context) { ip, port, err := net.SplitHostPort(ctx.Request.RemoteAddr) if err != nil { glog.Error(err.Error()) ctx.JSON(500, gin.H{"result": "internal server error"}) return } glog.Info("Incoming request /getip:" + ip + ":" + port) // Only return the IP, even though we have their so...
[ -0.32889389991760254, 0.22367481887340546, 0.578557014465332, -0.09813403338193893, 0.21991796791553497, -0.3120660185813904, 0.4874925911426544, 0.37367141246795654, 0.4889537990093231, 0.15983282029628754, 0.7048234939575195, -0.7368185520172119, 0.3724597096443176, -0.5238497853279114, ...
func CheckSlotSpan(slotAfter func(delta time.Duration) common.Slot, slot common.Slot, span common.Slot) error { if slot+span < slot { return fmt.Errorf("slot overflow: %d", slot) } // check minimum, with account for clock disparity if minSlot := slotAfter(-MAXIMUM_GOSSIP_CLOCK_DISPARITY); slot+span < minSlot { ...
[ -0.32611706852912903, 0.525991678237915, 0.5006927847862244, 0.011567183770239353, -0.8788504600524902, 0.8103785514831543, 0.4837757647037506, -0.6620798110961914, 0.03125128149986267, -0.5571134090423584, 0.3292078673839569, 0.49668407440185547, 0.34747743606567383, 0.7017765045166016, ...
func (c *Client) Status() error { client, err := c.client(false) if err != nil { return err } rel, err := url.Parse("status") if err != nil { // This indicates a programming error. panic(err) } resp, err := client.Get(c.baseURL.ResolveReference(rel).String()) if err != nil { return err } defer resp....
[ 0.2890818119049072, -0.051231276243925095, 0.3033938407897949, 0.8206166625022888, 0.21097330749034882, 0.17014038562774658, -0.1182350441813469, -0.02765822224318981, 0.009859121404588223, -0.6434858441352844, 0.44586801528930664, 0.3184610903263092, -0.4715481698513031, 0.699894428253173...
func Score(word string) int { var totalScore int scoresPerLetter := map[int][]string{ 1: {"A", "E", "I", "O", "U", "L", "N", "R", "S", "T"}, 2: {"D", "G"}, 3: {"B", "C", "M", "P"}, 4: {"F", "H", "V", "W", "Y"}, 5: {"K"}, 8: {"J", "X"}, 10: {"Q", "Z"}, } for _, _letter := range word { letter := str...
[ -0.28883907198905945, -0.14896558225154877, 0.9613867402076721, -1.0021144151687622, -0.8585179448127747, -0.502332866191864, 0.4245743751525879, -0.328411340713501, 0.33249449729919434, 1.4238572120666504, -0.5351066589355469, -0.3398696184158325, -0.7179158329963684, 0.25573691725730896,...
func FromRepository( id scalar.ID, dir string, versionIDs []scalar.ID, collaboratorIDs []scalar.ID, isPublicVisible bool, title string, albumIDs []scalar.ID, projectIDs []scalar.ID, deleted time.Time, deletedByID scalar.ID, created time.Time, createdByID scalar.ID, lastUpdated time.Time, lastUpdatedByID s...
[ -0.31441283226013184, -0.4914309084415436, 0.2620316743850708, -0.021503383293747902, -0.07103388756513596, -0.6425008773803711, 0.4337408244609833, 0.0636187419295311, 0.7484014630317688, 0.5142697691917419, -0.3257542848587036, 1.2843892574310303, -0.39623886346817017, -0.470316082239151...
func LoadLoginPage(w http.ResponseWriter, r *http.Request) { cookie, _ := cookies.Read(r) if cookie["token"] != "" { http.Redirect(w, r, "/feed", 302) return } utils.RunTemplate(w, "login.html", nil) }
[ 0.20918263494968414, 0.47680991888046265, 0.7005184888839722, -0.316854327917099, 0.18839415907859802, -0.12061730027198792, -0.5767426490783691, 0.017452465370297432, 0.05679189786314964, 0.6095977425575256, 0.2609437108039856, -0.2207046002149582, -0.9149163365364075, -0.0675957575440406...
func LoadRegisterPage(w http.ResponseWriter, r *http.Request) { utils.RunTemplate(w, "register.html", nil) }
[ -0.22650079429149628, 0.9183897972106934, 0.4384938180446625, 0.30111777782440186, 0.5505434274673462, -0.0570598840713501, 0.49200543761253357, 1.056392788887024, -0.28862738609313965, 0.6186710596084595, -0.01702479086816311, -0.33825573325157166, -0.760480523109436, 1.2939432859420776, ...
func LoadHomePage(w http.ResponseWriter, r *http.Request) { url := fmt.Sprintf("%s/publications", config.APIURL) response, err := requests.RequestsWithAuthentication(r, http.MethodGet, url, nil) if err != nil { responses.JSON(w, http.StatusInternalServerError, responses.ErrorAPI{Err: err.Error()}) return } def...
[ -0.23312193155288696, 0.03859920799732208, 0.6818288564682007, 0.4927259087562561, -0.33866116404533386, 0.02710133232176304, 0.335125207901001, 0.2949434220790863, 0.38856327533721924, 1.7937015295028687, 0.6214970946311951, -0.20634475350379944, -1.1946715116500854, 0.2375524491071701, ...
func LoadEditPage(w http.ResponseWriter, r *http.Request) { parameters := mux.Vars(r) publicationID, err := strconv.ParseUint(parameters["publicationId"], 10, 64) if err != nil { responses.JSON(w, http.StatusBadRequest, responses.ErrorAPI{Err: err.Error()}) return } url := fmt.Sprintf("%s/publications/%d", co...
[ -0.7913811206817627, 0.19711582362651825, 0.7547351121902466, -0.3759903311729431, -0.05694495141506195, 0.20324675738811493, 0.25650614500045776, 0.12426072359085083, -0.25659647583961487, 1.4279677867889404, 0.44666680693626404, -0.026462456211447716, -1.2856419086456299, -0.142566993832...
func LoadUsersPage(w http.ResponseWriter, r *http.Request) { nameOrNick := strings.ToLower(r.URL.Query().Get("user")) url := fmt.Sprintf("%s/users?usuario=%s", config.APIURL, nameOrNick) response, err := requests.RequestsWithAuthentication(r, http.MethodGet, url, nil) if err != nil { responses.JSON(w, http.Stat...
[ -0.7767940163612366, 0.6184777617454529, 0.6768380403518677, -0.048980556428432465, -0.2526811361312866, -0.2848418653011322, -0.4090820550918579, -0.3791070282459259, 0.11024994403123856, 0.8147452473640442, 0.49843716621398926, -0.14769390225410461, -0.463209331035614, 0.6896184682846069...
func LoadUserPage(w http.ResponseWriter, r *http.Request) { parameters := mux.Vars(r) userID, err := strconv.ParseUint(parameters["userId"], 10, 64) if err != nil { responses.JSON(w, http.StatusBadRequest, responses.ErrorAPI{Err: err.Error()}) return } cookie, _ := cookies.Read(r) userIDLogged, _ := strconv....
[ -0.4554988741874695, 0.03809468448162079, 0.9794445633888245, 0.6208166480064392, -0.6719619631767273, -0.10466521233320236, 0.6374390721321106, -0.5960391759872437, 0.2985992729663849, 0.891699492931366, 0.007256591226905584, -0.25618085265159607, -0.4433966875076294, 0.7261239886283875, ...
func LoadUserLoggedProfile(w http.ResponseWriter, r *http.Request) { cookie, _ := cookies.Read(r) userID, _ := strconv.ParseUint(cookie["id"], 10, 64) user, err := models.SearchCompleteUser(userID, r) if err != nil { responses.JSON(w, http.StatusInternalServerError, responses.ErrorAPI{Err: err.Error()}) return...
[ -0.0590505376458168, 0.25952816009521484, 0.8133491277694702, 0.548857569694519, -0.6489275097846985, -0.34451785683631897, 0.5372281670570374, -0.312621533870697, 0.2117242068052292, 0.8190207481384277, -0.7159217000007629, -0.14667996764183044, -0.24354098737239838, -0.01799589768052101,...
func LoadUserEditPage(w http.ResponseWriter, r *http.Request) { cookie, _ := cookies.Read(r) userID, _ := strconv.ParseUint(cookie["id"], 10, 64) channel := make(chan models.User) go models.GetUserData(channel, userID, r) user := <-channel if user.ID == 0 { responses.JSON(w, http.StatusInternalServerError, r...
[ -0.35730189085006714, 0.6696447730064392, 0.7066298723220825, 0.08985774964094162, -0.08847561478614807, -0.0340225026011467, 0.6652675271034241, -0.42593303322792053, -0.26823386549949646, 0.6105870008468628, 0.10789757966995239, 0.5938380360603333, -0.43159791827201843, 0.143014356493949...
func LoadUserPasswordEditPage(w http.ResponseWriter, r *http.Request) { utils.RunTemplate(w, "update-password.html", nil) }
[ -0.19536170363426208, -0.010634303092956543, 0.34737730026245117, 0.023797176778316498, -0.21906231343746185, 0.5168981552124023, 0.6191290020942688, 0.32588469982147217, 0.5188668370246887, 0.991682767868042, 0.07320535182952881, 0.03746365010738373, -0.46181005239486694, 0.12335829436779...
func TestGetSlidesPlaceholder(t *testing.T) { request := createGetSlidesPlaceholderRequest() e := initializeTest("GetSlidesPlaceholder", "", "") if e != nil { t.Errorf("Error: %v.", e) return } c := getTestApiClient() r, _, e := c.PlaceholdersApi.GetSlidesPlaceholder(request) i...
[ 0.2552551031112671, 0.7937394380569458, 0.4579339325428009, -0.5493074059486389, 0.355203777551651, 0.7758002281188965, 0.5651196837425232, -0.6099279522895813, 0.4998629093170166, -0.5518154501914978, -0.5907651782035828, 0.509813129901886, -0.7297154664993286, -0.1017548218369484, 0.09...
func TestGetSlidesPlaceholderInvalidname(t *testing.T) { request := createGetSlidesPlaceholderRequest() request.name = invalidizeTestParamValue(request.name, "name", "string").(string) e := initializeTest("GetSlidesPlaceholder", "name", request.name) if e != nil { t.Errorf("Error: %v.", e) ...
[ 0.283326119184494, 0.4619840979576111, 0.3196907937526703, -0.5021219849586487, -0.23269122838974, 0.6591650247573853, -0.10220455378293991, -0.4509000778198242, 0.1834145188331604, -0.25505363941192627, -0.4532039761543274, 0.3326885402202606, -0.6251457333564758, 0.35268545150756836, 0...
func TestGetSlidesPlaceholderInvalidslideIndex(t *testing.T) { request := createGetSlidesPlaceholderRequest() request.slideIndex = invalidizeTestParamValue(request.slideIndex, "slideIndex", "int32").(int32) e := initializeTest("GetSlidesPlaceholder", "slideIndex", request.slideIndex) if e != nil { ...
[ -0.021574772894382477, 0.7620969414710999, 0.24488979578018188, -0.6794232726097107, 0.35433152318000793, 0.7231854796409607, 0.26805949211120605, -0.3917953670024872, 0.42221328616142273, -0.606098473072052, -0.49758514761924744, 0.4038081467151642, -0.5885716080665588, -0.242915898561477...
func TestGetSlidesPlaceholderInvalidplaceholderIndex(t *testing.T) { request := createGetSlidesPlaceholderRequest() request.placeholderIndex = invalidizeTestParamValue(request.placeholderIndex, "placeholderIndex", "int32").(int32) e := initializeTest("GetSlidesPlaceholder", "placeholderIndex", request.place...
[ -0.03508872911334038, 0.8899940252304077, 0.22279994189739227, -0.5815138816833496, 0.23588378727436066, 1.0080348253250122, 0.41804370284080505, -0.27609285712242126, 0.23949311673641205, -0.6119121313095093, -0.2013222873210907, 0.4743088185787201, -0.7635257840156555, -0.351090639829635...