我的代码是
a={"1"=>"adi","2"=>"amar","3"=>"rave","4"=>"sum"}
arr=["1","5","3"]
Run Code Online (Sandbox Code Playgroud)
如果哈希中存在数组值,我想提取所有这样的值
result =["adi","rave"]
Run Code Online (Sandbox Code Playgroud)
没有使用任何循环.这是可能的
当我与谷歌联系时,它给了我们
OAuth2::Error ({"errors"=>[{"domain"=>"usageLimits", "reason"=>"accessNotConfigured", "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}], "code"=>403, "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your …Run Code Online (Sandbox Code Playgroud) 我是RedHat IDM的新手.以下是我的要求.请帮忙.
假设我们有两台RHEL7机器
Redhat IDM客户端机器
现在我们在IDM客户端计算机上创建了两个用户,条件如下
useradd ravendra
第二个我们使用IPA命令创建用户
IPA用户添加JSMITH --first =约翰--last =史密斯--manager = bjensen --email=johnls@example.com --homedir = /家庭/工作/约翰 - 密码
现在我们有以下要求.
所以请建议我任何插件或任何方式我如何能够实现这一目标.
提前致谢
我的代码在这里
str = "Early in his first term in office, Obama signed into law economic stimulus legislation in response"
arr= str.split(" ")
set_element= arr.each_cons(2).to_a
sub_str = set_element.map {|i| i.join(' ')}
Run Code Online (Sandbox Code Playgroud)
如果我有一个像大字符串这样的大字符串,那么这个过程需要6.50秒,因为我想要这种类型的结果
sub_str= ["Early in", "in his", "his first", "first term", "term in", "in office,", "office, Obama", "Obama signed", "signed into", "into law", "law economic", "economic stimulus", "stimulus legislation", "legislation in", "in response"]
Run Code Online (Sandbox Code Playgroud)
是否有可能采用其他有效方式
我有两个ElasticSearch服务器:
http://12.13.54.333:9200
Run Code Online (Sandbox Code Playgroud)
和
http://65.98.54.10:9200
Run Code Online (Sandbox Code Playgroud)
在第一台服务器中,我有100k的数据(id= 1到id= 100k),在第二台服务器中我有100k的数据(id= 100k + 1到200k).
我希望obama在两台服务器上的一个请求中对该关键字进行文本搜索.这可能吗?
我的代码在这里
a="524398447598973,12312345,1234567"
b="524398447598973,123,123456789"
c=a << b
Run Code Online (Sandbox Code Playgroud)
而且我想
c="524398447598973,12312345,1234567,524398447598973,123,123456789"
Run Code Online (Sandbox Code Playgroud)
我怎么能这样做.请有人帮助我.
谢谢