How to set git tag
$ git tag -a gittag_2021 -m "description"
#git #git tag
Github git push error
Error list :
error: failed to push some refs to 'github.com:id/AutoTrade.git'
fatal: refusing to merge unrelated histories
command for issue )
git pull origin master --allow-unrelated-histories
This command option is used to store the history of a project that already exists. In other words, git basically rejects when merging two heterogeneous projects that do not have related records.
I think it got twisted somewhere because I repeated git add and git init.
The conclusion is solved.
step )
kw@ig-ui-MacBookAir autotrade % git init
kw@ig-ui-MacBookAir autotrade % git remote add origin git@github.com:id/AutoTrade.git
kw@ig-ui-MacBookAir autotrade % git add .
kw@ig-ui-MacBookAir autotrade % git commit -m "first"
Error 1) error: failed to push some refs to 'github.com:id/AutoTrade.git'
kw@ig-ui-MacBookAir autotrade % git push origin master
To github.com:id/AutoTrade.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'github.com:id/AutoTrade.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I didn't "git pull", so I think this issue occurred.
So, I did "git pull". -> Error 2 Step
Error 2) Merge made by the 'recursive' strategy.
kw@ig-ui-MacBookAir autotrade % git pull git@github.com:id/AutoTrade.git master
From github.com:id/AutoTrade
* branch master -> FETCH_HEAD
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: refusing to merge unrelated histories
… "git pull" is not executed… what the issue….
fatal: refusing to merge unrelated histories
Solve)
kw@ig-ui-MacBookAir autotrade % git pull origin master --allow-unrelated-histories
From github.com:id/AutoTrade
* branch master -> FETCH_HEAD
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Merge made by the 'recursive' strategy.
kw@ig-ui-MacBookAir autotrade % git push origin master
Enumerating objects: 15, done.
Counting objects: 100% (15/15), done.
Delta compression using up to 8 threads
Compressing objects: 100% (13/13), done.
Writing objects: 100% (14/14), 7.16 KiB | 3.58 MiB/s, done.
Total 14 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
To github.com:id/AutoTrade.git
412ec51..2332532 master -> master
<pull option>
--allow-unrelated-histories
The conclusion is solved, so let's just use it.
#git #github #issue #error #fatal: refusing to merge unrelated histories #python #c++ #c
An internal security tool caused a problem because xlsx was locked into a security program.
In conclusion, the following method was used, but it could not be solved.
error handling step...
code : occurred openpyxl error
< zipfile.BadZipFile: File is not a zip file >
import openpyxl
if __name__ == "__main__" :
wb = openpyxl.load_workbook("contents.xlsx")
print(f"{wb}")
error
zipfile.BadZipFile: File is not a zip file
The following methods were used to solve this problem caused by in-house security tools.
step 1. encoding error
< UnicodeDecodeError: 'cp949' codec can't decode byte 0xf0 in position 20: illegal multibyte sequence >
import openpyxl
import xlrd #add
if __name__ == "__main__" :
file = open("contents.xlsx","r")
wb = xlrd.open_workbook(file_contents=file.read()) #add
print(f"wb")
error
wb = xlrd.open_workbook(file_contents=file.read())
UnicodeDecodeError: 'cp949' codec can't decode byte 0xf0 in position 20: illegal multibyte sequence
step 2. encoding error : add utf-8
< TypeError: an integer is required (got type str) >
import openpyxl
import xlrd
if __name__ == "__main__" :
file = open("contents.xlsx","r", "utf-8")
wb = xlrd.open_workbook(file_contents=file.read())
print(f"wb")
error
file = open("contents.xlsx","r","utf-8")
TypeError: an integer is required (got type str)
must be specified Encoding type like "utf-8" as "python2 -> python3".
step 3. ???
< TypeError: an integer is required (got type str) >
import openpyxl
import xlrd
if __name__ == "__main__" :
file = open("contents.xlsx","r", encoding="utf-8")
wb = xlrd.open_workbook(file_contents=file.read())
print(f"wb")
error
file = open("contents.xlsx","r", encoding="utf-8")
TypeError: an integer is required (got type str)
"utf-8-> encoding="utf-8"
1. create qml file
- main.qml
- test.qml
2. create resource.qrc file
resource.qml code
<RCC>
<qresource>
<file>qml/main.qml</file>
<file>qml/test.qml</file>
</qresource>
</RCC>
-----------------------------------
3. execute command in terminal (in workspace included qml files)
$ pyside2-rcc -o resource.py resource.qrc
4. check resource.py file
: Completed when the resource.py file is created.
How to use qrc file!
1. in main.py
ex ) qrc:///filename
QUrl("qrc:///qml/test.qml")
2. in main.qml file
ex ) qrc:/qml/test.qml
source: "qrc:/qml/test.qml"
#qrc #resource.qrc #resource.py #python #qt #pyqt #pyside2-rcc
solve :
pip install [item] --trusted-host pypi.org --trusted-host files.pythonhosted.org
ex)
$ pip install requests --trusted-host pypi.org --trusted-host files.pythonhosted.org
$ pip install psutil --trusted-host pypi.org --trusted-host files.pythonhosted.org
$ pip install --upgrade paramiko --trusted-host pypi.org --trusted-host files.pythonhosted.org
$ pip install --upgrade scp --trusted-host pypi.org --trusted-host files.pythonhosted.org
#python #pip #pip3 #error #--trusted-host #pypi.org #pythonhosted #ssl
C++ example:
#include <typeinfo>#include <iostream>int main() {int nInt;char cChar;std::cout<<"nInt type = " << typeid(nInt).name() <<std::endl;std::cout<<"cChar type = " << typeid(cChar).name() <<std::endl;return 0;}if you define #include <typeinfo>, you can know type info of the variant.
sk7mobile 알뜰폰 삼성페이 교통카드 등록 시, 한도 초과 문제 해결방법 skt usim 해킹 사건으로 인해 sk7mobile 알뜰폰을 사용하는 저도 usim을 바꾸고 나니 삼성페이 교통카드가 등록이 안되더라구요... 삼성페이 교통카드 기능 은...