-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemp.cpp
73 lines (51 loc) · 2 KB
/
temp.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
class Thr : public QThread {
public: static void msleep(unsigned long msecs) { QThread::msleep(msecs); }
};
/* QProgressDialog progress("Analyzing audio track...", "Cancel", 0, 10, this);
for (int i=0; i<=10; i++) {
Thr::msleep(500);
progress.setValue(i);
QApplication::processEvents();
if (progress.wasCanceled())
break;
}
}*/
/*QList<QNetworkReply::RawHeaderPair> headers = reply->rawHeaderPairs();
QList<QNetworkReply::RawHeaderPair>::const_iterator iter;
for (iter = headers.begin(); iter != headers.end(); ++iter) {
QString name = (*iter).first;
QString value = (*iter).second;
if (name.compare("Set-Cookie", Qt::CaseInsensitive) != 0) continue;
int p = value.length();
int p1 = value.indexOf(';');
int p2 = value.indexOf(' ');
if (p1 > 0) p = p1;
if (p2 > 0 && p2 < p) p = p2;
QString trimmed = value.left(p);
if (value.startsWith("PHPSESSID=")) phpsessid = trimmed;
if (value.startsWith("num_searches_cookie=")) num_searches = trimmed;
if (value.startsWith("recent_searches_cookie_1=")) recent_searches = trimmed;
}*/
QList<QNetworkCookie> cookies;
cookies.append(QNetworkCookie(QByteArray("partners_cookie"), partners.toAscii()));
QVariant var;
var.setValue(cookies);
req.setHeader(QNetworkRequest::KnownHeaders::CookieHeader, var);
int rpos = url.lastIndexOf('/');
if (rpos)
int lpos = rpos-1;
while (lpos>0 && url[lpos] != '/')
lpos--;
if (/bwFdr9VaFJw/
//QTableWidgetItem *item = new QTableWidgetItem(link);
for (int o = 0; o<npoints-range*2; o++) {
for (int f=0; f<period/2; f++) {
if (mags[f]) {
int x = amp1[o*period/2+f] * 100 / mags[f];
int y = amp2[o*period/2+f] * 100 / mags[f];
int z = amp3[o*period/2+f] * 100 / mags[f];
int c = x*y*z/50000;
score += c;
}
}
}