Skip to content

Commit 880fc81

Browse files
committed
update
1 parent 97909c3 commit 880fc81

File tree

276 files changed

+5514
-5775
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+5514
-5775
lines changed
+2-70
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,16 @@
11
eclipse.preferences.version=1
2-
encoding//QAxWidget/\u663E\u793Aword_excel_pdf.py=utf-8
32
encoding//QListView/CustomWidgetSortItem.py=utf-8
43
encoding//QListView/SortItemByRole.py=utf-8
54
encoding//QProxyStyle/Lib/TabBarStyle.py=utf-8
65
encoding//QProxyStyle/TabTextDirection.py=utf-8
7-
encoding//QTableView/CopyContent/CopyContent.py=utf-8
8-
encoding//QTableView/CopyContent/__main__.py=utf-8
9-
encoding//QTableWidget/SqlQuery/SqlQuery.py=utf-8
10-
encoding//QTableWidget/SqlQuery/__main__.py=utf-8
6+
encoding//QSplitter/RewriteHandle.py=utf-8
117
encoding//QThread/moveToThread.py=utf-8
128
encoding//QTreeWidget/ParsingJson.py=utf-8
13-
encoding//\u5176\u5B83/C\u548CC++\u6269\u5C55/py\u8F6Cpyd/pydmod.py=utf-8
14-
encoding//\u5176\u5B83/QRC\u8D44\u6E90\u6587\u4EF6\u4F7F\u7528/qrctest1.py=utf-8
15-
encoding//\u5176\u5B83/QRC\u8D44\u6E90\u6587\u4EF6\u4F7F\u7528/qrctest2.py=utf-8
16-
encoding//\u5176\u5B83/QRC\u8D44\u6E90\u6587\u4EF6\u4F7F\u7528/res_rc.py=utf-8
17-
encoding//\u5176\u5B83/QRC\u8D44\u6E90\u6587\u4EF6\u4F7F\u7528/textread.py=utf-8
18-
encoding//\u5176\u5B83/\u4E32\u53E3\u8C03\u8BD5\u5C0F\u52A9\u624B/UiSerialPort.py=utf-8
19-
encoding//\u5176\u5B83/\u4E32\u53E3\u8C03\u8BD5\u5C0F\u52A9\u624B/\u4E32\u53E3\u8C03\u8BD5\u5C0F\u52A9\u624B.py=utf-8
20-
encoding//\u5176\u5B83/\u4EBA\u8138\u63CF\u70B9\u68C0\u6D4B/OpencvWidget.py=utf-8
21-
encoding//\u5176\u5B83/\u5168\u5C40\u70ED\u952E/HotKey.py=utf-8
22-
encoding//\u5176\u5B83/\u53F3\u4E0B\u89D2\u5F39\u51FA\u6846/WindowNotify.py=utf-8
23-
encoding//\u5176\u5B83/\u5B57\u4F53\u6D4B\u8BD5/FontAwesome.py=utf-8
24-
encoding//\u5176\u5B83/\u5B57\u4F53\u6D4B\u8BD5/TestFontAwesome.py=utf-8
25-
encoding//\u5176\u5B83/\u5B57\u4F53\u6D4B\u8BD5/TestFontRoboto.py=utf-8
26-
encoding//\u5176\u5B83/\u6D88\u606F\u63D0\u793A/BubbleTips.py=utf-8
27-
encoding//\u5176\u5B83/\u6D88\u606F\u63D0\u793A/Notification.py=utf-8
28-
encoding//\u5176\u5B83/\u7A0B\u5E8F\u91CD\u542F/AutoRestart.py=utf-8
29-
encoding//\u5176\u5B83/\u81EA\u52A8\u66F4\u65B0/mylibs/testlibs.py=utf-8
30-
encoding//\u5176\u5B83/\u81EA\u52A8\u66F4\u65B0/test.py=utf-8
31-
encoding//\u5176\u5B83/\u81EA\u5B9A\u4E49import/IronyImporter.py=utf-8
32-
encoding//\u5176\u5B83/\u81EA\u5B9A\u4E49import/build.py=utf-8
33-
encoding//\u5176\u5B83/\u81EA\u5B9A\u4E49import/main.py=utf-8
34-
encoding//\u5176\u5B83/\u81EA\u5B9A\u4E49import/src/test.py=utf-8
35-
encoding//\u5176\u5B83/\u81EA\u5B9A\u4E49\u5C5E\u6027\u6D4B\u8BD5/\u81EA\u5B9A\u4E49\u5C5E\u6027\u6D4B\u8BD5.py=utf-8
36-
encoding//\u52A8\u753B/\u53F3\u952E\u83DC\u5355\u52A8\u753B.py=utf-8
37-
encoding//\u52A8\u753B/\u591A\u9875\u9762\u5207\u6362\u52A8\u753B/SlidingStackedWidget.py=utf-8
38-
encoding//\u52A8\u753B/\u591A\u9875\u9762\u5207\u6362\u52A8\u753B/UiImageSlider.py=utf-8
39-
encoding//\u52A8\u753B/\u591A\u9875\u9762\u5207\u6362\u52A8\u753B/\u56FE\u7247\u8F6E\u64AD\u52A8\u753B.py=utf-8
40-
encoding//\u52A8\u753B/\u6309\u94AE\u653E\u5927\u7F29\u5C0F\u52A8\u753B.py=utf-8
41-
encoding//\u52A8\u753B/\u70B9\u9635\u7279\u6548/\u70B9\u9635\u7279\u6548.py=utf-8
42-
encoding//\u52A8\u753B/\u7A97\u53E3\u6DE1\u5165\u6DE1\u51FA.py=utf-8
43-
encoding//\u56FE\u5F62\u89C6\u56FE/\u4E16\u754C\u5730\u56FE/WorldMap.py=utf-8
44-
encoding//\u56FE\u5F62\u89C6\u56FE/\u663E\u793A\u56FE\u7247\u53CA\u7F29\u653E.py=utf-8
45-
encoding//\u56FE\u5F62\u89C6\u56FE/\u6DFB\u52A0QWidget.py=utf-8
46-
encoding//\u56FE\u5F62\u89C6\u56FE/\u7B80\u5355\u56FE\u50CF\u5904\u7406/SimpleImagePs.py=utf-8
47-
encoding//\u56FE\u5F62\u89C6\u56FE/\u7B80\u5355\u56FE\u50CF\u5904\u7406/SimpleImageThread.py=utf-8
48-
encoding//\u56FE\u5F62\u89C6\u56FE/\u7B80\u5355\u56FE\u50CF\u5904\u7406/SimpleImageView.py=utf-8
49-
encoding//\u56FE\u7247/\u4EFF\u7F51\u9875\u56FE\u7247\u9519\u4F4D\u7279\u6548.py=utf-8
50-
encoding//\u56FE\u7247/\u56FE\u7247\u52A0\u8F7D/res_rc.py=utf-8
51-
encoding//\u56FE\u7247/\u56FE\u7247\u52A0\u8F7D/xpmres.py=utf-8
52-
encoding//\u56FE\u7247/\u56FE\u7247\u52A0\u8F7D/\u56FE\u7247\u52A0\u8F7D.py=utf-8
53-
encoding//\u56FE\u7247/\u56FE\u7247\u65CB\u8F6C.py=utf-8
54-
encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/pyd\u7248\u672C/QtNinePatch/sip/configure.py=utf-8
55-
encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/pyd\u7248\u672C/QtNinePatch/sip/testQtNinePatch.py=utf-8
56-
encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C1/NinePatch.py=utf-8
57-
encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C1/testNinePatch.py=utf-8
58-
encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C2/QtNinePatch.py=utf-8
59-
encoding//\u56FE\u7247/\u663E\u793A.9\u683C\u5F0F\u56FE\u7247/\u7EAFpython\u7248\u672C2/testQtNinePatch.py=utf-8
60-
encoding//\u591A\u9875\u9762/QScrollArea/\u4EFFQQ\u8BBE\u7F6E\u9762\u677F/SettingUi.py=utf-8
61-
encoding//\u591A\u9875\u9762/QScrollArea/\u4EFFQQ\u8BBE\u7F6E\u9762\u677F/\u4EFFQQ\u8BBE\u7F6E\u9762\u677F.py=utf-8
62-
encoding//\u591A\u9875\u9762/QStackedWidget/\u5DE6\u4FA7\u9009\u9879\u5361/\u5DE6\u4FA7\u9009\u9879\u5361.py=utf-8
63-
encoding//\u6D4F\u89C8\u5668/QWebView/\u68A6\u5E7B\u6811/\u68A6\u5E7B\u6811.py=utf-8
64-
encoding//\u6ED1\u52A8\u6761/\u6ED1\u52A8\u6761\u70B9\u51FB\u5B9A\u4F4D.py=utf-8
65-
encoding//\u7A97\u53E3/\u5206\u5272\u7A97\u53E3\u7684\u5206\u5272\u6761\u91CD\u5199.py=utf-8
66-
encoding//\u7A97\u53E3/\u65E0\u8FB9\u6846\u81EA\u5B9A\u4E49\u6807\u9898\u680F\u7A97\u53E3/FramelessWindow.py=utf-8
67-
encoding//\u7A97\u53E3/\u65E0\u8FB9\u6846\u81EA\u5B9A\u4E49\u6807\u9898\u680F\u7A97\u53E3/win\u65E0\u8FB9\u6846\u8C03\u6574\u5927\u5C0F.py=utf-8
68-
encoding//\u7A97\u53E3/\u65E0\u8FB9\u6846\u81EA\u5B9A\u4E49\u6807\u9898\u680F\u7A97\u53E3/\u65E0\u8FB9\u6846\u81EA\u5B9A\u4E49\u6807\u9898\u680F\u7A97\u53E3.py=utf-8
69-
encoding//\u7A97\u53E3/\u6D88\u606F\u5BF9\u8BDD\u6846\u5012\u8BA1\u65F6\u5173\u95ED.py=utf-8
70-
encoding//\u7A97\u53E3/\u7A97\u53E3\u91CD\u542F.py=utf-8
71-
encoding//\u7F8E\u5316/Effect/AnimationShadowEffect.py=utf-8
72-
encoding//\u7F8E\u5316/Effect/\u56FE\u7247\u6309\u94AE\u8F93\u5165\u6846\u9634\u5F71.py=utf-8
73-
encoding//\u7F8E\u5316/QLabel/\u5706\u5F62\u56FE\u7247.py=utf-8
9+
encoding//QWebView/DreamTree.py=utf-8
7410
encoding//\u7F8E\u5316/QProgressBar/Metro\u8FDB\u5EA6\u6761.py=utf-8
7511
encoding//\u7F8E\u5316/QProgressBar/\u6C34\u6CE2\u7EB9\u8FDB\u5EA6\u6761/ProgressBar.py=utf-8
7612
encoding//\u7F8E\u5316/QProgressBar/\u6C34\u6CE2\u7EB9\u8FDB\u5EA6\u6761/\u6C34\u6CE2\u7EB9\u8FDB\u5EA6\u6761.py=utf-8
7713
encoding//\u7F8E\u5316/QSlider/PaintQSlider.py=utf-8
7814
encoding//\u7F8E\u5316/QWidget/CustomPaintWidget.py=utf-8
7915
encoding//\u7F8E\u5316/QWidget/CustomWidget.py=utf-8
8016
encoding//\u7F8E\u5316/QWidget/QWidget\u6837\u5F0F\u6D4B\u8BD5.py=utf-8
81-
encoding//\u83DC\u5355/\u83DC\u5355\u591A\u9009\u4E0D\u5173\u95ED.py=utf-8
82-
encoding//\u8868\u683C/QTableView/\u8868\u683C\u5185\u5BB9\u590D\u5236.py=utf-8
83-
encoding//\u8868\u683C/QTableWidget/\u6570\u636E\u5E93\u67E5\u8BE2\u663E\u793A\u8868\u683C/main.py=utf-8
84-
encoding//\u8868\u683C/QTableWidget/\u6570\u636E\u5E93\u67E5\u8BE2\u663E\u793A\u8868\u683C/mainui.py=utf-8
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
#%%cython
2-
import numpy as np
3-
cimport numpy as np
4-
np.import_array()
5-
6-
# 参考http://cython.readthedocs.io/en/latest/src/userguide/wrapping_CPlusPlus.html?highlight=cdef%20extern%20from
7-
# 参考https://www.zhihu.com/question/23003213
8-
9-
cdef extern from "CalSpecSpeaLib.h":
10-
void cal_spec_accel(double acc[], int len, double dt, double maxPeriod, double periodStep, double dampRatio, double *Period, double *Fre, double *MAcc, double *MVel, double *MDis, int numt)
11-
12-
def calspecaccel(np.ndarray[double, ndim=1, mode="c"] acc, int length, double dt, double maxPeriod, double periodStep, double dampRatio):
13-
cdef int numt = int(maxPeriod / periodStep) + 1
14-
# 初始化各存储数据
15-
cdef np.ndarray[double, ndim=1] Fre = np.zeros(numt, float)
16-
cdef np.ndarray[double, ndim=1] MDis = np.zeros(numt, float)
17-
cdef np.ndarray[double, ndim=1] MVel = np.zeros(numt, float)
18-
cdef np.ndarray[double, ndim=1] MAcc = np.zeros(numt, float)
19-
#产生501个
20-
cdef np.ndarray[double, ndim=1] Period = np.arange(0.0, maxPeriod + periodStep, periodStep) # 10.0 + 0.02, 0.02
21-
Period[0] = 0.001
22-
# 调用CalSpecSpeaLib.cpp定义的函数对数组进行处理
23-
cal_spec_accel(<double*> np.PyArray_DATA(acc), length, dt, maxPeriod, periodStep, dampRatio,
24-
<double*> np.PyArray_DATA(Period), <double*> np.PyArray_DATA(Fre),
25-
<double*> np.PyArray_DATA(MAcc), <double*> np.PyArray_DATA(MVel),
26-
<double*> np.PyArray_DATA(MDis), numt)
1+
#%%cython
2+
import numpy as np
3+
cimport numpy as np
4+
np.import_array()
5+
6+
# 参考http://cython.readthedocs.io/en/latest/src/userguide/wrapping_CPlusPlus.html?highlight=cdef%20extern%20from
7+
# 参考https://www.zhihu.com/question/23003213
8+
9+
cdef extern from "CalSpecSpeaLib.h":
10+
void cal_spec_accel(double acc[], int len, double dt, double maxPeriod, double periodStep, double dampRatio, double *Period, double *Fre, double *MAcc, double *MVel, double *MDis, int numt)
11+
12+
def calspecaccel(np.ndarray[double, ndim=1, mode="c"] acc, int length, double dt, double maxPeriod, double periodStep, double dampRatio):
13+
cdef int numt = int(maxPeriod / periodStep) + 1
14+
# 初始化各存储数据
15+
cdef np.ndarray[double, ndim=1] Fre = np.zeros(numt, float)
16+
cdef np.ndarray[double, ndim=1] MDis = np.zeros(numt, float)
17+
cdef np.ndarray[double, ndim=1] MVel = np.zeros(numt, float)
18+
cdef np.ndarray[double, ndim=1] MAcc = np.zeros(numt, float)
19+
#产生501个
20+
cdef np.ndarray[double, ndim=1] Period = np.arange(0.0, maxPeriod + periodStep, periodStep) # 10.0 + 0.02, 0.02
21+
Period[0] = 0.001
22+
# 调用CalSpecSpeaLib.cpp定义的函数对数组进行处理
23+
cal_spec_accel(<double*> np.PyArray_DATA(acc), length, dt, maxPeriod, periodStep, dampRatio,
24+
<double*> np.PyArray_DATA(Period), <double*> np.PyArray_DATA(Fre),
25+
<double*> np.PyArray_DATA(MAcc), <double*> np.PyArray_DATA(MVel),
26+
<double*> np.PyArray_DATA(MDis), numt)
2727
return Period, Fre, MAcc, MVel, MDis
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
1-
#include "CalSpecSpeaLib.h"
2-
3-
#include <stdio.h>
4-
#include <iostream>
5-
#include <math.h>
6-
using namespace std;
7-
8-
9-
double maxabs(double num[], int len)
10-
{
11-
//
12-
return abs(num[0]);
13-
14-
}
15-
bool isALLvaluezero(double num[], int len)
16-
{
17-
//
18-
return false;
19-
20-
}
21-
void cal_spec_accel(double acc[], int len, double dt, double maxPeriod, double periodStep, double dampRatio, double *Period, double *Fre, double *MAcc, double *MVel, double *MDis, int numt)
22-
{
23-
//
24-
Period[0] = 99.95;
25-
Fre[0] = 99.96;
26-
MAcc[0] = 99.97;
27-
MVel[0] = 99.98;
28-
MDis[0] = 99.99;
29-
}
30-
31-
int main()
32-
{
33-
double acc[20] = { 0.0038,0.0049,0.0061,0.0075,0.0088,0.01,0.0112,0.0123,0.0133,0.0140,0.0146,0.0152,0.0157,0.0162,0.0167,0.0172,0.0175,0.0178,0.0179,0.0179 };
34-
int len = 20;
35-
double dt = 0.005;
36-
double maxPeriod = 10.0;
37-
double periodStep = 0.02;
38-
double dampRatio = 0.05;
39-
int numt = int(maxPeriod / periodStep) + 1;
40-
double *Fre = new double[numt];
41-
double *MDis = new double[numt];
42-
double *MVel = new double[numt];
43-
double *MAcc = new double[numt];
44-
double *Period = new double[numt];
45-
for (int i = 0; i<numt; i++) {
46-
Period[i] = periodStep*i;
47-
Fre[i] = 0;
48-
MDis[i] = 0;
49-
MVel[i] = 0;
50-
MAcc[i] = 0;
51-
}
52-
Period[0] = 0.001;
53-
//cal_spec_accel(double acc[], int len,double dt,double maxPeriod,double periodStep,double dampRatio,double *Period,double *Fre,double *MAcc,double *MVel,double *MDis)
54-
cal_spec_accel(acc, len, dt, maxPeriod, periodStep, dampRatio, Period, Fre, MAcc, MVel, MDis, numt);
55-
56-
for (int i = 0; i<numt; i++)
57-
{
58-
cout << MAcc[i] << endl;
59-
}
60-
61-
delete[] Fre;
62-
return 0;
1+
#include "CalSpecSpeaLib.h"
2+
3+
#include <stdio.h>
4+
#include <iostream>
5+
#include <math.h>
6+
using namespace std;
7+
8+
9+
double maxabs(double num[], int len)
10+
{
11+
//
12+
return abs(num[0]);
13+
14+
}
15+
bool isALLvaluezero(double num[], int len)
16+
{
17+
//
18+
return false;
19+
20+
}
21+
void cal_spec_accel(double acc[], int len, double dt, double maxPeriod, double periodStep, double dampRatio, double *Period, double *Fre, double *MAcc, double *MVel, double *MDis, int numt)
22+
{
23+
//
24+
Period[0] = 99.95;
25+
Fre[0] = 99.96;
26+
MAcc[0] = 99.97;
27+
MVel[0] = 99.98;
28+
MDis[0] = 99.99;
29+
}
30+
31+
int main()
32+
{
33+
double acc[20] = { 0.0038,0.0049,0.0061,0.0075,0.0088,0.01,0.0112,0.0123,0.0133,0.0140,0.0146,0.0152,0.0157,0.0162,0.0167,0.0172,0.0175,0.0178,0.0179,0.0179 };
34+
int len = 20;
35+
double dt = 0.005;
36+
double maxPeriod = 10.0;
37+
double periodStep = 0.02;
38+
double dampRatio = 0.05;
39+
int numt = int(maxPeriod / periodStep) + 1;
40+
double *Fre = new double[numt];
41+
double *MDis = new double[numt];
42+
double *MVel = new double[numt];
43+
double *MAcc = new double[numt];
44+
double *Period = new double[numt];
45+
for (int i = 0; i<numt; i++) {
46+
Period[i] = periodStep*i;
47+
Fre[i] = 0;
48+
MDis[i] = 0;
49+
MVel[i] = 0;
50+
MAcc[i] = 0;
51+
}
52+
Period[0] = 0.001;
53+
//cal_spec_accel(double acc[], int len,double dt,double maxPeriod,double periodStep,double dampRatio,double *Period,double *Fre,double *MAcc,double *MVel,double *MDis)
54+
cal_spec_accel(acc, len, dt, maxPeriod, periodStep, dampRatio, Period, Fre, MAcc, MVel, MDis, numt);
55+
56+
for (int i = 0; i<numt; i++)
57+
{
58+
cout << MAcc[i] << endl;
59+
}
60+
61+
delete[] Fre;
62+
return 0;
6363
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
double maxabs(double num[], int len);
2-
bool isALLvaluezero(double num[], int len);
1+
double maxabs(double num[], int len);
2+
bool isALLvaluezero(double num[], int len);
33
void cal_spec_accel(double acc[], int len, double dt, double maxPeriod, double periodStep, double dampRatio, double *Period, double *Fre, double *MAcc, double *MVel, double *MDis, int numt);
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
cd %~dp0
2-
3-
python setup.py build
4-
5-
python test.py
6-
1+
cd %~dp0
2+
3+
python setup.py build
4+
5+
python test.py
6+
77
pause

0 commit comments

Comments
 (0)