Skip to content

Instantly share code, notes, and snippets.

View 0xlitf's full-sized avatar

0xCalcifer 0xlitf

  • 03:47 (UTC +08:00)
View GitHub Profile
% 作者: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;
dmxlc3M6Ly82ZjdiNmRmOS1jOWM5LTc0ZWItOTQwMy02MjkwZjM0MWEzZDRAMTAuNDcuMTEyLjI6MTgwMDE/ZW5jcnlwdGlvbj1ub25lJnNlY3VyaXR5PW5vbmUmdHlwZT10Y3AmaGVhZGVyVHlwZT1ub25lI3ZsZXNzJTNhJTJmJTJmMTAuNDcuMTEyLjIlM2ExODAwMQp2bGVzczovLzZmN2I2ZGY5LWM5YzktNzRlYi05NDAzLTYyOTBmMzQxYTNkNEAxMC40Ny4xMTIuMTU6MTgwMDE/ZW5jcnlwdGlvbj1ub25lJnNlY3VyaXR5PW5vbmUmdHlwZT10Y3AmaGVhZGVyVHlwZT1ub25lI3ZsZXNzJTNhJTJmJTJmMTAuNDcuMTEyLjE1JTNhMTgwMDEKdmxlc3M6Ly82ZjdiNmRmOS1jOWM5LTc0ZWItOTQwMy02MjkwZjM0MWEzZDRAMTAuNDcuMTEyLjE5OjE4MDAxP2VuY3J5cHRpb249bm9uZSZzZWN1cml0eT1ub25lJnR5cGU9dGNwJmhlYWRlclR5cGU9bm9uZSN2bGVzcyUzYSUyZiUyZjEwLjQ3LjExMi4xOSUzYTE4MDAxCnZsZXNzOi8vNmY3YjZkZjktYzljOS03NGViLTk0MDMtNjI5MGYzNDFhM2Q0QDEwLjQ3LjExMi4yMDoxODAwMT9lbmNyeXB0aW9uPW5vbmUmc2VjdXJpdHk9bm9uZSZ0eXBlPXRjcCZoZWFkZXJUeXBlPW5vbmUjdmxlc3MlM2ElMmYlMmYxMC40Ny4xMTIuMjAlM2ExODAwMQp2bGVzczovLzZmN2I2ZGY5LWM5YzktNzRlYi05NDAzLTYyOTBmMzQxYTNkNEAxMC40Ny4xMTIuMjE6MTgwMDE/ZW5jcnlwdGlvbj1ub25lJnNlY3VyaXR5PW5vbmUmdHlwZT10Y3AmaGVhZGVyVHlwZT1ub25lI3ZsZXNzJTNhJTJmJTJmMTAuNDcuMTEyLjIxJTNhMTgwMDEK
@0xlitf
0xlitf / Neumann_and_PM_and_Jonswap.m
Created June 16, 2021 07:39
Neumann_and_PM_and_Jonswap.m
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;
#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;
}
@0xlitf
0xlitf / gist:56b2c99fb678eb91f4b6ecc3e3699552
Created September 16, 2017 13:18 — forked from elpuri/gist:3753756
A collapsible nested list example in QML
import QtQuick 1.1
Item {
width: 200
height: 300
ListView {
anchors.fill: parent
model: nestedModel
delegate: categoryDelegate
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 "";
function once(fn, context) {
var result
return function () {
if (fn) {
result = fn.apply(context || this, arguments)
fn = null
}
return result
}
}
Keys.onPressed: {
if(event.key==Qt.Key_Back)
{
event.accepted = true;
homePage.pop()
}
}
Rectangle {
id: scrollBar
visible: gridView.contentHeight > gridView.height
height: parent.height
width: 20
color: "#0fffffff"
radius: 2
anchors {
top: parent.top
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