我正在使用Visual Studio 2012和最新的Web Essentials作为IDE开发TypeScript(0.9.1)项目,并使用Chrome Developer工具进行调试.
最近,很可能是在Chrome更新(cur.版本29.0.1547.66 m)之后,我编辑后,typeScript文件没有得到更新,另一方面相应的已编译的js文件也会更新,但似乎某种程度上是功能仍然取决于源的非更新版本.
解决方案尝试失败:
经过一些试验后,即使是下载ts源文件的请求也会产生非更新版本(http://localhost:1198/xxx.ts例如)
看起来问题在完全重启后会得到部分修复(如果重要的话是Windows 8),源文件会在chrome中更新,但是一旦我再次更改它,就会出现同样的问题.
另一个解决方案是使用隐身,因为它似乎是一个缓存问题.
我的问题:
缓存typeScript文件的方式是由项目配置中的问题引起的(即使以前工作过),或者这是新版Chrome中的错误?
caching google-chrome google-chrome-devtools visual-studio-2012 typescript
我正在尝试排序vector< pair<int,char> >但我想改变对类型的比较运算符的行为,这样如果第一个值相等并且它与(>)运算符进行比较,我希望它将第二个值与(<)运营商.
我正在努力解决" 什么是密码分析?" 关于uva的问题.这是我的方法:
string toLower(string in){
string out;
for(int i=0;i<in.length();i++){
if(in.at(i)<='Z' && in.at(i)>='A'){
out+=in.at(i)+('a'-'A');
}
else if(in.at(i)<='z' && in.at(i)>='a'){
out+=in.at(i);
}
}
return out;
}
int main(){
//freopen("in.txt","r",stdin);
//freopen("tmp.txt","w",stdout);
vector< pair<int,char> >vp;
pair<int,char> tp;
for(char a='a';a<='z';a++){//buliding a table of values and chars
tp= make_pair(0,a);
vp.push_back(tp);
}
int T;
cin >> T;
string s;
cin.ignore();
for(int i=0;i<T;i++){
getline(cin,s);
s=toLower(s);//remove special chars and convert all to lower
int l=s.length();
for(int j=0;j<l;j++){
vp[s[j]-'a'].first+=1;//increasing the value of each …Run Code Online (Sandbox Code Playgroud)