QSlider::groove:horizontal {
border: 1px solid #bbb;
background: white;
height: 10px;
border-radius: 4px;
}
QSlider::sub-page:horizontal {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #66e, stop: 1 #bbf);
background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1,
stop: 0 #bbf, stop: 1 #55f);
border: 1px solid #777;
height: 10px;
border-radius: 4px;
}
QSlider::add-page:horizontal {
background: #fff;
border: 1px solid #777;
height: 10px;
border-radius: 4px;
}
QSlider::handle:horizontal {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
stop:0 #eee, stop:1 #ccc);
border: 1px solid #777;
width: 13px;
margin-top: -2px;
margin-bottom: -2px;
border-radius: 4px;
}
QSlider::handle:horizontal:hover {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
stop:0 #fff, stop:1 #ddd);
border: 1px solid #444;
border-radius: 4px;
}
QSlider::sub-page:horizontal:disabled {
background: #bbb;
border-color: #999;
}
QSlider::add-page:horizontal:disabled {
background: #eee;
border-color: #999;
}
QSlider::handle:horizontal:disabled {
background: #eee;
border: 1px solid #aaa;
border-radius: 4px;
}
'분류 전체보기'에 해당되는 글 96건
- 2023.12.21 Qslider Style Sheet
- 2022.05.13 학점 Grade 계산
- 2022.04.15 lambda
- 2022.04.15 Folder 생성/삭제, File 생성/삭제
- 2022.04.15 Open / Save File Dialog
- 2022.04.14 DeskTop path, Zip file
- 2022.04.07 cnvtol,comp,,1e-2
- 2022.04.04 Auto Complete Jupyter NoteBook
- 2021.08.30 Selenium Code
- 2021.06.15 ACT Numpy
map, reduce, filter..
score = lambda x: "A등급" if x >= 80 else ("B등급" if x >= 70 else "C등급")
# ----------------------------------------------------------
add = lambda a, b: a+b
result = add(3, 5)
# ----------------------------------------------------------
arr = [[1,2,9],
[5,1,8],
[3,7,9]]
# 2열이 가장 큰 행
print(max(arr, key=lambda x: x[1])) # [3,7,9]
# 2열이 가장 큰 행의 3번째 요소
print(max(arr, key=lambda x: x[1])[2]) # 9
# ----------------------------------------------------------
# ----------------------------------------------------------
# ----------------------------------------------------------
import os
[os.remove(f) for f in glob.glob('./test/*.log')]
import os
os.rmdir(folder) # 빈 폴더가 아니면 error 발생
import shutil
shutil.rmtree(folder) # 폴더 안에 파일이 있어도 삭제
import os
path = './dir/sub_dir/tmp1'
os.makedirs(path, exist_ok=True)
os.path.exists(path or file)
os.path.isdir(dir)
os.path.isfile(file) # 파일이 존재하지 않는 경우, folder 인 경우 False
import os
os.path.expanduser('~')
os.path.join(os.path.expanduser('~'),'Desktop')
>> open and unzip file
import os
import zipfile
import tkinter as tk
from tkinter import filedialog
root = tk.Tk()
root.withdraw()
file_paths = filedialog.askopenfilenames(parent=root, title='Choose a file')
file_path = file_paths[0]
unzip_path = os.path.join(os.path.expanduser('~'),'Desktop')
with zipfile.ZipFile(file_path, 'r') as existing_zip:
existing_zip.extractall(unzip_path)
ACT_NumPy_Ex3.xml
---------------------------------------------------------------------------------------------------------------
<extension version="192" minorversion="0" name="ACT_NumPy_Ex3">
<guid shortid="ACT_NumPy_Ex3">98V1CB96-4EEE-4DF2-AA62-EC8F9838543A</guid>
<author>SanthoshM</author>
<description> Asd
</description>
<script src="main.py" compiled="true"/>
<script src="A_NumpyFun3.py" compiled="true"/>
<interface context="Mechanical">
<images>images</images>
<callbacks>
<oninit>init</oninit>
</callbacks>
<toolbar name = "ACT_NumPy_Ex3" caption = "ACT_NumPy_Ex3">
<entry name = "ACT_NumPy_Ex3" icon = "hand">
<callbacks>
<onclick>CreateCustomPost</onclick>
</callbacks>
</entry>
</toolbar>
</interface>
<simdata context ="Mechanical">
<result name="CustomRes" version="1" caption="CustomNumPyRes" icon="hand" location="node" type="scalar" >
<callbacks>
<evaluate>Manupulate</evaluate>
</callbacks>
<property name="Geometry" caption="Geometry" control="scoping"> </property>
<property name="DispFactor" caption="DispFactor" control="float" default="5.0"> </property>
<property name="InputFileName" caption="Input csv File Name" control="text" default="auto" readonly="true"> </property>
<property name="OutputFileName" caption="Output csv File Name" control="text" default="auto" readonly="true"> </property>
</result>
</simdata>
</extension>
---------------------------------------------------------------------------------------------------------------
main3.py
---------------------------------------------------------------------------------------------------------------
https://stackoverflow.com/questions/66887591/ansys-ironpython-act-does-not-run
Ansys ironpython ACT does not run
I am trying to make the code work from the 9-17min mark in this youtube video: https://www.youtube.com/watch?v=oX5hDU0Qg-Q I wrote down every single line of code and it should work, however I get the
stackoverflow.com
def __init__(context): ExtAPI.Log.WriteMessage("initiating Scipy manipulate...") pass def CreateCustomPost(analysis): ExtAPI.Log.WriteMessage("clicked on CustomPost button") result=analysis.CreateResultObject("CustomPost")