Google地图具有出色的联系人位置共享功能.有谁知道这些数据是否以编程方式可用?如果能够访问我和我妻子的家庭自动化或脚本等内容,将会很有帮助
我有一个字符串,我希望replace使用以下替换获得所有可能的组合:
var equiv = {
"a": "4",
"b": "8",
"e": "3",
"i": "1",
"l": "1",
"o": "0",
"t": "7"
}
Run Code Online (Sandbox Code Playgroud)
我想定义一个String.prototype函数,如:
String.prototype.l33tCombonations = function()
{
var toReturn = [];
for (var i in equiv)
{
// this.???
// toReturn.push(this???)
}
return toReturn;
}
Run Code Online (Sandbox Code Playgroud)
所以我可以提供类似的东西"tomato".l33tCombinations()并回来:
["tomato", "t0mato", "t0mat0", "tomat0", "toma7o", "t0ma7o", "t0m470", ...].
Run Code Online (Sandbox Code Playgroud)
订单并不重要.思考?
我这里有一个有趣的问题。我有几个 Javascript 字符串,如下所示:
var a = "A few sentences. For tests. The point of these sentences is to be used as examples.";
var b = "A couple more sentences. These ones are shorter.";
var c = "Blah. Foo. Bar. Baz. Test. Test 2. Test C.";
var d = "Test sentence.";
Run Code Online (Sandbox Code Playgroud)
我想扩展string原型以提供一种方法,将每个字符串拆分为两个字符串的数组,每个字符串具有数学上尽可能相似的字符数,同时还保留整个句子。
我正在寻找的结果:
a.halve() // ["A few sentences. For tests.", "The point of these sentences is to be used as examples."]
b.halve() // ["A couple more sentences.", "These ones …Run Code Online (Sandbox Code Playgroud) 只是好奇电子邮件标头是否由 Gmail 标记以表示电子邮件是已安排还是立即发送。
arrays ×2
javascript ×2
prototype ×2
string ×2
email ×1
gmail ×1
gmail-api ×1
google-maps ×1
str-replace ×1