- Jun 2024
-
www.codium.ai www.codium.ai
Tags
Annotators
URL
-
- Mar 2023
-
sindresorhus.com sindresorhus.com
-
```js /! devtools-detect https://github.com/sindresorhus/devtools-detect By Sindre Sorhus MIT License / const devtools = { isOpen: false, orientation: undefined, };
const threshold = 170;
const emitEvent = (isOpen, orientation) => { globalThis.dispatchEvent(new globalThis.CustomEvent('devtoolschange', { detail: { isOpen, orientation, }, })); };
const main = ({ emitEvents = true } = {}) => { const widthThreshold = globalThis.outerWidth - globalThis.innerWidth > threshold; const heightThreshold = globalThis.outerHeight - globalThis.innerHeight > threshold; const orientation = widthThreshold ? 'vertical' : 'horizontal';
if ( !(heightThreshold && widthThreshold) && ((globalThis.Firebug && globalThis.Firebug.chrome && globalThis.Firebug.chrome.isInitialized) || widthThreshold || heightThreshold) ) { if ((!devtools.isOpen || devtools.orientation !== orientation) && emitEvents) { emitEvent(true, orientation); }
devtools.isOpen = true; devtools.orientation = orientation;
} else { if (devtools.isOpen && emitEvents) { emitEvent(false, undefined); }
devtools.isOpen = false; devtools.orientation = undefined;
} };
main({ emitEvents: false }); setInterval(main, 500);
export default devtools; ```
Tags
Annotators
URL
-
- Nov 2022
-
stackoverflow.com stackoverflow.com
-
While there are many great answers regarding the "glyph not found" glyph, that won't help you actually detect it, as the text string in code will still have the character regardless of the font used to render it.
-
- May 2022
-
attacomsian.com attacomsian.com
-
let timer; // Timer identifier const waitTime = 500; // Wait time in milliseconds // Search function const search = (text) => { // TODO: Make HTTP Request HERE }; // Listen for `keyup` event const input = document.querySelector('#input-text'); input.addEventListener('keyup', (e) => { const text = e.currentTarget.value; // Clear timer clearTimeout(timer); // Wait for X ms and then process the request timer = setTimeout(() => { search(text); }, waitTime); });
let timer; // timer identifier const waitTime = 500; // Wait time in milliseconds
// search function const search = (text) => { // to do: make http request here }
// Listen for
keyup
event const input = document.querySelector('#input-text'); input.addEventListener('keyup', (e) => { const text = e.currentTarget.value; // clear timer clearTimeout(timer);// Wait for X ms and then process the request timer = setTimeout(() => { search(text); }, waitTime); });
-
-
-
// Get the input box let input = document.getElementById('my-input'); // Init a timeout variable to be used below let timeout = null; // Listen for keystroke events input.addEventListener('keyup', function (e) { // Clear the timeout if it has already been set. // This will prevent the previous task from executing // if it has been less than <MILLISECONDS> clearTimeout(timeout); // Make a new timeout set to go off in 1000ms (1 second) timeout = setTimeout(function () { console.log('Input Value:', textInput.value); }, 1000); });
let timeout = setTimeout(callback, milliseconds); clearTimeout(timeout);
document.getElementById("id-name"); object.addEventListener('event-name',callback);
-
In order to execute an event listener (or any function for that matter) after the user stops typing, we need to know about the two built-in JavaScript methods setTimeout(callback, milliseconds) and clearTimeout(timeout): setTimeout is a JavaScript method that executes a provided function after a specified amount of time (in milliseconds). clearTimeout is a related method that can be used to cancel a timeout that has been queued.
Step 1. Listen for User Input
<input type="text" id="my-input" />
let input = document.querySelector('#my-input'); input.addEventListener('keyup', function (e) { console.log('Value:', input.value); })
Step2: Debounce Event Handler Function
let input = document.getElementById('my-input'); let timeout = null;
input.addEventListener('keyup', function(e) { clearTimeout(timeout);
timeout = setTimeout(function() { console.llog('Input Value:', textInput.value); }, 1000); })
-
- Jan 2022
-
svelte.dev svelte.dev
- Dec 2021
-
-
Maxmen, A. (2021). Omicron blindspots: Why it’s hard to track coronavirus variants. Nature. https://doi.org/10.1038/d41586-021-03698-7
-
- May 2021
-
journals.sagepub.com journals.sagepub.com
-
Tybur, J. M., Lieberman, D., Fan, L., Kupfer, T. R., & de Vries, R. E. (2020). Behavioral Immune Trade-Offs: Interpersonal Value Relaxes Social Pathogen Avoidance. Psychological Science, 31(10), 1211–1221. https://doi.org/10.1177/0956797620960011
-
- Mar 2021
-
www.nature.com www.nature.com
-
Pullano, G., Di Domenico, L., Sabbatini, C. E., Valdano, E., Turbelin, C., Debin, M., Guerrisi, C., Kengne-Kuetche, C., Souty, C., Hanslik, T., Blanchon, T., Boëlle, P.-Y., Figoni, J., Vaux, S., Campèse, C., Bernard-Stoecklin, S., & Colizza, V. (2021). Underdetection of cases of COVID-19 in France threatens epidemic control. Nature, 590(7844), 134–139. https://doi.org/10.1038/s41586-020-03095-6
-
-
www.bmj.com www.bmj.com
-
Iacobucci, G. (2021). Sixty seconds on. . . Flu. BMJ, 372, n584. https://doi.org/10.1136/bmj.n584
-
- Oct 2020
-
svelte.dev svelte.dev
-
whenValueChanges whenValueBecomes
-
- Sep 2020
-
github.com github.com
-
When you visit location /one and the server redirects you to location /two, you expect the browser’s address bar to display the redirected URL. However, Turbolinks makes requests using XMLHttpRequest, which transparently follows redirects. There’s no way for Turbolinks to tell whether a request resulted in a redirect without additional cooperation from the server. To work around this problem, send the Turbolinks-Location header in the final response to a visit that was redirected, and Turbolinks will replace the browser’s topmost history entry with the value you provide.
-
- Mar 2019
-
gitee.com gitee.com
-
Language Understanding
目标是根据一个用户utterance/query 得到其对应的语义slot。slots是预先根据场景定于的。通常来说有两种类型的表示,一个是句子级别的类别,例如用户的意图和utterance的类别。另外一个是单词级别的信息抽取,例如命名实体和槽位填充。
意图识别是根据一句话来检测用户的意图。 基于深度学习的意图识别: L. Deng, G. Tur, X. He, and D. Hakkani-Tur. Use ofkernel deep convex networks and end-to-end learningfor spoken language understanding. InSpoken Lan-guage Technology Workshop (SLT), 2012 IEEE, pages210–215. IEEE, 2012
G. Tur, L. Deng, D. Hakkani-T ̈ur, and X. He. Towardsdeeper understanding: Deep convex networks for se-mantic utterance classification. InAcoustics, Speechand Signal Processing (ICASSP), 2012 IEEE Interna-tional Conference on, pages 5045–5048. IEEE, 2012.
D. Yann, G. Tur, D. Hakkani-Tur, and L. Heck. Zero-shot learning and clustering for semantic utteranceclassification using deep learning. 2014.
尤其是这个用CNN来抽取query vector进行query分类。 H. B. Hashemi, A. Asiaee, and R. Kraft. Query intentdetection using convolutional neural networks. InIn-ternational Conference on Web Search and Data Min-ing, Workshop on Query Understanding, 2016
P.-S. Huang, X. He, J. Gao, L. Deng, A. Acero, andL. Heck. Learning deep structured semantic modelsfor web search using clickthrough data. InProceedingsof the 22nd ACM international conference on Confer-ence on information & knowledge management, pages2333–2338. ACM, 2013
Y. Shen, X. He, J. Gao, L. Deng, and G. Mesnil.Learning semantic representations using convolutionalneural networks for web search. InProceedings of the23rd International Conference on World Wide Web,pages 373–374. ACM, 2014.
-
- Feb 2018
- Aug 2015
-
-
“Confirmed and looks good… Its legit.”
Second Data Breach from Ashley Madison is legit
-