This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % 作者:IC设计者笔记 | |
| % 链接:https://www.zhihu.com/question/301995846/answer/3012429972 | |
| % 来源:知乎 | |
| % 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 | |
| clc;clear; | |
| h1=figure('name','太阳系模型','position',[0 25 2000 1200],'color',[0 0 0]); | |
| xlabel('x');ylabel('y');zlabel('z'); | |
| [x,y,z]=sphere; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dmxlc3M6Ly82ZjdiNmRmOS1jOWM5LTc0ZWItOTQwMy02MjkwZjM0MWEzZDRAMTAuNDcuMTEyLjI6MTgwMDE/ZW5jcnlwdGlvbj1ub25lJnNlY3VyaXR5PW5vbmUmdHlwZT10Y3AmaGVhZGVyVHlwZT1ub25lI3ZsZXNzJTNhJTJmJTJmMTAuNDcuMTEyLjIlM2ExODAwMQp2bGVzczovLzZmN2I2ZGY5LWM5YzktNzRlYi05NDAzLTYyOTBmMzQxYTNkNEAxMC40Ny4xMTIuMTU6MTgwMDE/ZW5jcnlwdGlvbj1ub25lJnNlY3VyaXR5PW5vbmUmdHlwZT10Y3AmaGVhZGVyVHlwZT1ub25lI3ZsZXNzJTNhJTJmJTJmMTAuNDcuMTEyLjE1JTNhMTgwMDEKdmxlc3M6Ly82ZjdiNmRmOS1jOWM5LTc0ZWItOTQwMy02MjkwZjM0MWEzZDRAMTAuNDcuMTEyLjE5OjE4MDAxP2VuY3J5cHRpb249bm9uZSZzZWN1cml0eT1ub25lJnR5cGU9dGNwJmhlYWRlclR5cGU9bm9uZSN2bGVzcyUzYSUyZiUyZjEwLjQ3LjExMi4xOSUzYTE4MDAxCnZsZXNzOi8vNmY3YjZkZjktYzljOS03NGViLTk0MDMtNjI5MGYzNDFhM2Q0QDEwLjQ3LjExMi4yMDoxODAwMT9lbmNyeXB0aW9uPW5vbmUmc2VjdXJpdHk9bm9uZSZ0eXBlPXRjcCZoZWFkZXJUeXBlPW5vbmUjdmxlc3MlM2ElMmYlMmYxMC40Ny4xMTIuMjAlM2ExODAwMQp2bGVzczovLzZmN2I2ZGY5LWM5YzktNzRlYi05NDAzLTYyOTBmMzQxYTNkNEAxMC40Ny4xMTIuMjE6MTgwMDE/ZW5jcnlwdGlvbj1ub25lJnNlY3VyaXR5PW5vbmUmdHlwZT10Y3AmaGVhZGVyVHlwZT1ub25lI3ZsZXNzJTNhJTJmJTJmMTAuNDcuMTEyLjIxJTNhMTgwMDEK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clear all; | |
| close all; | |
| clc; | |
| %% | |
| format short | |
| w_spectrum = 0:(pi/2 + pi/10)/2047:(pi/2 + pi/10); | |
| w_size = size(w_spectrum); | |
| g = 9.8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <QTextCodec> | |
| inline QString GBK2UTF8(const QString &inStr) | |
| { | |
| QTextCodec *gbk = QTextCodec::codecForName("GB18030"); | |
| QTextCodec *utf8 = QTextCodec::codecForName("UTF-8"); | |
| QString g2u = gbk->toUnicode(gbk->fromUnicode(inStr)); // gbk convert utf8 | |
| return g2u; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import QtQuick 1.1 | |
| Item { | |
| width: 200 | |
| height: 300 | |
| ListView { | |
| anchors.fill: parent | |
| model: nestedModel | |
| delegate: categoryDelegate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| QString LoginWrapper::getToken() { | |
| qDebug() << "m_tokenFilename: " << m_tokenFilename; | |
| QFile file(m_tokenFilename); | |
| if (!file.exists()) { | |
| file.open( QIODevice::ReadWrite | QIODevice::Text ); | |
| file.close(); | |
| } | |
| if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { | |
| return ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function once(fn, context) { | |
| var result | |
| return function () { | |
| if (fn) { | |
| result = fn.apply(context || this, arguments) | |
| fn = null | |
| } | |
| return result | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Keys.onPressed: { | |
| if(event.key==Qt.Key_Back) | |
| { | |
| event.accepted = true; | |
| homePage.pop() | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rectangle { | |
| id: scrollBar | |
| visible: gridView.contentHeight > gridView.height | |
| height: parent.height | |
| width: 20 | |
| color: "#0fffffff" | |
| radius: 2 | |
| anchors { | |
| top: parent.top |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import QtQuick 2.7 | |
| Item { | |
| id: contentColumnView | |
| clip: true | |
| property bool hideHeader: true | |
| property var headerTextList: ["t1","t2","t3"] | |
| property ListModel model | |
| property int rowHeight: 150 | |
| property int columnCount: 2 |
NewerOlder