非常简单的问题,只是语法有问题。
我有'Needs reference to Microsoft Scripting Runtime
Sub Translate()
Dim dic As Dictionary
Dim i As Integer, sTmp As String
Set dic = New Dictionary
dic.Add "AUST", "ARLINGTON"
dic.Add "DAFW", "ARLINGTON"
For i = 2 To 3
sTmp = ThisWorkbook.Worksheets(1).Range("A" & i)
Debug.Print sTmp, "-", dic(sTmp)
Next
Set dic = Nothing
End Sub
技能,这是一些数字。
当按%单击按钮时,我需要根据var
更改div的宽度,但我不确定语法是什么:
skill
答案 0 :(得分:2)
那样的?
var percent = 100 - skill;
$('.div').css("width", percent + '%')
答案 1 :(得分:1)
您只需在最后添加%符号。
$sentence1 = $table_node->FIND('//tr/td/p')
JavaScript能够将其识别为百分比。
答案 2 :(得分:0)
你需要使用字符串
#include <iostream>
#include <string>
#include <map>
#include <memory>
struct Data_Struct
{
int a;
std::string b;
};
void process(std::map<std::string,std::shared_ptr<const Data_Struct>>);
std::map<std::string,std::shared_ptr<const Data_Struct>>
convert_map(const std::map<std::string,std::shared_ptr<Data_Struct>>& source)
{
std::map<std::string,std::shared_ptr<const Data_Struct>> ret;
for(const auto& item : source) {
ret.emplace(item.first, item.second);
}
return ret;
}
void process(std::map<std::string,std::shared_ptr<const Data_Struct>> data) {
for(auto &d : data)
std::cout << d.first << std::endl;
}
void calling_function() {
std::map<std::string,std::shared_ptr<Data_Struct>> my_data;
my_data.emplace("test",std::shared_ptr<Data_Struct>(new Data_Struct)).first->second->a = 2;
process(convert_map(my_data));
}
using namespace std;
int main()
{
calling_function();
return 0;
}