// Updated: Aug. 20, 2024 | |
// Run: node testRegex.js whatever.txt | |
// Live demo: https://jina.ai/tokenizer | |
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0) | |
// COPYRIGHT: Jina AI | |
const fs = require('fs'); | |
const util = require('util'); | |
// Define variables for magic numbers | |
const MAX_HEADING_LENGTH = 7; |
output_file="/Users/jwheeler/Desktop/combined_src_files.txt" | |
www_src_directory="/Users/jwheeler/Projects/demofun/www/src" | |
api_src_directory="/Users/jwheeler/Projects/demofun/api/src" | |
# Clear the output file if it already exists | |
> "$output_file" | |
# Function to process files | |
process_files() { | |
local directory=$1 |
""" | |
DSPy Logging Utilities | |
Author: Dhar Rawal | |
Works with DSPy to log forward calls and their results, using a custom handler function. | |
Works with typed predictors too! | |
""" | |
import functools | |
import json | |
from typing import Any, Callable, Dict, Optional, Tuple |
# Usage: pr (pull request current branch into develop) | |
# Usage 2: pr stable (pull request current branch into stable) | |
# Notice: replace "team" with your github team account. | |
function pr() { | |
base=$1; | |
if [ "$1" == "" ]; then | |
base="develop" | |
fi | |
hub pull-request -b team:"$base" -h team:`git rev-parse --abbrev-ref HEAD`; |
1 | |
00:01:47,959 --> 00:01:51,400 | |
三名瑞典人於今日遭到逮捕 | |
罪名是涉嫌架設- | |
2 | |
00:01:51,560 --> 00:01:57,400 | |
-全世界最大的非法下載站台 | |
3 |
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)
jQuery does good jobs when you're dealing with browser compatibility. But we're living in an age that fewer and fewer people use old-school browsers such as IE <= 7. With the growing of DOM APIs in modern browsers (including IE 8), most functions that jQuery provides are built-in natively.
When targeting only modern browsers, it is better to avoid using jQuery's backward-compatible features. Instead, use the native DOM API, which will make your web page run much faster than you might think (native C / C++ implementaion v.s. JavaScript).
If you're making a web page for iOS (e.g. UIWebView), you should use native DOM APIs because mobile Safari is not that old-school web browser; it supports lots of native DOM APIs.
If you're making a Chrome Extension, you should always use native APIs, not only because Chrome has almost the latest DOM APIs available, but this can also avoid performance issue and unnecessary memory occupation (each jQuery-driven extension needs a separate