Problem : User open window dialog to pick a file on mapped drive, but the user cannot browse to the drive.
Solution : configure the EnableLinkedConnections registry value
Filed under: VB6, Windows | Tagged: VB6, Windows | Leave a comment »
Problem : User open window dialog to pick a file on mapped drive, but the user cannot browse to the drive.
Solution : configure the EnableLinkedConnections registry value
Filed under: VB6, Windows | Tagged: VB6, Windows | Leave a comment »
The error:
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute with name javax.zkoss.zk.ui.Session
The solution:
**edit zk.xml, add
<system-config> <ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class> </system-config>
Filed under: java | Tagged: java, ZK | Leave a comment »
The error:
Traceback (most recent call last): File "D:\pyhomelib\mainwindow.py", line 19, in <module> from sqlquerymodel import SqlQueryModel File "D:\pyhomelib\sqlquerymodel.py", line 4, in <module> from exceptions import Exception ImportError: No module named 'exceptions'
The problem:
from exceptions import Exception
Explanation:
In Python 3, exceptions module was removed and all standard exceptions were moved to builtin module. Thus meaning that there is no more need to do explicit import of any standard exceptions.
Filed under: Python | Leave a comment »
Traceback (most recent call last): File "D:\port\workspace\python\PyQtTest\hris\mdi00\querymodel.py", line 61, in data return value.upper() AttributeError: 'QDateTime' object has no attribute 'upper'
The code:
class CustomSqlModel(QSqlQueryModel): def data(self, index, role): value = super(CustomSqlModel, self).data(index, role) if value is not None and role == Qt.DisplayRole: if index.column() == 0: return '#%s' % value elif index.column() == 2: return value.upper() if role == Qt.TextColorRole and index.column() == 1: return QColor(Qt.blue) return value
The problem is at line 8: “return value.upper()”.
I edit the class with adding function hasattr(value, ‘upper’),
class CustomSqlModel(QSqlQueryModel): def data(self, index, role): value = super(CustomSqlModel, self).data(index, role) if value is not None and role == Qt.DisplayRole: if index.column() == 0: return '#%s' % value elif index.column() == 2: if hasattr(value, 'upper'): return value.upper() if role == Qt.TextColorRole and index.column() == 1: return QColor(Qt.blue) return value
Filed under: PyQt5, Python | Leave a comment »
D:\port\sip-4.16.2>python configure.py -p win32-g++ This is SIP 4.16.2 for Python 3.4.1 on win32. The SIP code generator will be installed in D:\port\Python341-32. The sip module will be installed in D:\port\Python341-32\Lib\site-packages. The sip.h header file will be installed in D:\port\Python341-32\include. The default directory to install .sip files in is D:\port\Python341-32\sip. Creating siplib\sip.h... Creating siplib\siplib.c... Creating siplib\siplib.sbf... Creating sipconfig.py... Creating top level Makefile... Creating sip code generator Makefile... Creating sip module Makefile... D:\port\sip-4.16.2>mingw32-make mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/sipgen' gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o main.o main.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o transform.o trans form.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o gencode.o gencode .c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o extracts.o extrac ts.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o export.o export.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o heap.o heap.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o parser.o parser.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o lexer.o lexer.c g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt ime-pseudo-reloc -Wl,-subsystem,console -Wl,-s -o sip.exe main.o transform.o gen code.o extracts.o export.o heap.o parser.o lexer.o mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/sipgen' mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/siplib' gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341- 32\include -o siplib.o siplib.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341- 32\include -o apiversions.o apiversions.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341- 32\include -o descriptors.o descriptors.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341- 32\include -o qtlib.o qtlib.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341- 32\include -o threads.o threads.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341- 32\include -o objmap.o objmap.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341- 32\include -o voidptr.o voidptr.c gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341- 32\include -o array.o array.c g++ -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341- 32\include -o bool.o bool.cpp g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt ime-pseudo-reloc -shared -Wl,-subsystem,console -Wl,-s -o sip.pyd siplib.o apive rsions.o descriptors.o qtlib.o threads.o objmap.o voidptr.o array.o bool.o -LD:\ port\Python341-32\libs -lpython34 mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/siplib' D:\port\sip-4.16.2>mingw32-make install mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/sipgen' copy /y sip.exe D:\port\Python341-32\sip.exe 1 file(s) copied. mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/sipgen' mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/siplib' copy /y sip.pyd D:\port\Python341-32\Lib\site-packages\sip.pyd The process cannot access the file because it is being used by another process. 0 file(s) copied. Makefile:39: recipe for target 'install' failed mingw32-make[1]: *** [install] Error 1 mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/siplib' Makefile:7: recipe for target 'install' failed mingw32-make: *** [install] Error 2 D:\port\sip-4.16.2>mingw32-make install mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/sipgen' copy /y sip.exe D:\port\Python341-32\sip.exe 1 file(s) copied. mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/sipgen' mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/siplib' copy /y sip.pyd D:\port\Python341-32\Lib\site-packages\sip.pyd 1 file(s) copied. strip D:\port\Python341-32\Lib\site-packages\sip.pyd copy /y D:\port\sip-4.16.2\siplib\sip.h D:\port\Python341-32\include\sip.h 1 file(s) copied. mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/siplib' copy /y sipconfig.py D:\port\Python341-32\Lib\site-packages\sipconfig.py 1 file(s) copied. copy /y D:\port\sip-4.16.2\sipdistutils.py D:\port\Python341-32\Lib\site-package s\sipdistutils.py 1 file(s) copied. D:\port\PyQt-5.3.1>python configure.py --target-py-version=3.4 --spec=win32-g ++ D:\port\PyQt-5.3.1>python configure.py --target-py-version=3.4 --spec=win32-g++ Querying qmake about your Qt installation... Determining the details of your Qt installation... This is the GPL version of PyQt 5.3.1 (licensed under the GNU General Public License) for Python 3.4.1 on win32. Type 'L' to view the license. Type 'yes' to accept the terms of the license. Type 'no' to decline the terms of the license. Do you accept the terms of the license? yes Found the license file pyqt-gpl.sip. Checking to see if the QtGui module should be built... Checking to see if the QtHelp module should be built... Checking to see if the QtMultimedia module should be built... Checking to see if the QtMultimediaWidgets module should be built... Checking to see if the QtNetwork module should be built... Checking to see if the QtOpenGL module should be built... Checking to see if the QtPrintSupport module should be built... Checking to see if the QtQml module should be built... Checking to see if the QtQuick module should be built... Checking to see if the QtSql module should be built... Checking to see if the QtSvg module should be built... Checking to see if the QtTest module should be built... Checking to see if the QtWebKit module should be built... Checking to see if the QtWebKitWidgets module should be built... Checking to see if the QtWidgets module should be built... Checking to see if the QtXmlPatterns module should be built... Checking to see if the QtDesigner module should be built... Checking to see if the QAxContainer module should be built... Checking to see if the QtDBus module should be built... Checking to see if the dbus support module should be built... DBus v1 does not seem to be installed. Checking to see if the _QOpenGLFunctions_2_0 module should be built... Checking to see if the QtSensors module should be built... Checking to see if the QtSerialPort module should be built... Checking to see if the QtX11Extras module should be built... Checking to see if the QtBluetooth module should be built... Checking to see if the QtMacExtras module should be built... Checking to see if the QtPositioning module should be built... Checking to see if the QtWinExtras module should be built... Checking to see if the QtQuickWidgets module should be built... Checking to see if the QtWebSockets module should be built... Qt v5.3.1 (Open Source) is being used. The qmake executable is D:\port\Qt5.3.1\5.3\mingw482_32\bin\qmake.exe. Qt is built as a shared library. SIP 4.16.2 is being used. The sip executable is D:\port\Python341-32\sip.exe. These PyQt5 modules will be built: QtCore, QtGui, QtHelp, QtMultimedia, QtMultimediaWidgets, QtNetwork, QtOpenGL, QtPrintSupport, QtQml, QtQuick, QtSql, QtSvg, QtTest, QtWebKit, QtWebKitWidgets, QtWidgets, QtXmlPatterns, QtDesigner, QAxContainer, _QOpenGLFunctions_2_0, QtSensors, QtSerialPort, QtBluetooth, QtPositioning, QtWinExtras, QtQuickWidgets, QtWebSockets. The PyQt5 Python package will be installed in D:\port\Python341-32\Lib\site-packages. PyQt5 is being built with generated docstrings. The Designer plugin will be installed in D:/port/Qt5.3.1/5.3/mingw482_32/plugins/designer. The qmlscene plugin will be installed in D:/port/Qt5.3.1/5.3/mingw482_32/plugins/PyQt5. The PyQt5 .sip files will be installed in D:\port\Python341-32\sip\PyQt5. pyuic5, pyrcc5 and pylupdate5 will be installed in D:\port\Python341-32. The interpreter used by pyuic5 is D:\port\Python341-32\python.exe. Generating the C++ source for the QtCore module... Generating the .pro file for the QtCore module... Generating the Makefile for the QtCore module... Generating the C++ source for the QtGui module... Generating the .pro file for the QtGui module... Generating the Makefile for the QtGui module... Generating the C++ source for the QtHelp module... Generating the .pro file for the QtHelp module... Generating the Makefile for the QtHelp module... Generating the C++ source for the QtMultimedia module... Generating the .pro file for the QtMultimedia module... Generating the Makefile for the QtMultimedia module... Generating the C++ source for the QtMultimediaWidgets module... Generating the .pro file for the QtMultimediaWidgets module... Generating the Makefile for the QtMultimediaWidgets module... Generating the C++ source for the QtNetwork module... Generating the .pro file for the QtNetwork module... Generating the Makefile for the QtNetwork module... Generating the C++ source for the QtOpenGL module... Generating the .pro file for the QtOpenGL module... Generating the Makefile for the QtOpenGL module... Generating the C++ source for the QtPrintSupport module... Generating the .pro file for the QtPrintSupport module... Generating the Makefile for the QtPrintSupport module... Generating the C++ source for the QtQml module... Generating the .pro file for the QtQml module... Generating the Makefile for the QtQml module... Generating the C++ source for the QtQuick module... Generating the .pro file for the QtQuick module... Generating the Makefile for the QtQuick module... Generating the C++ source for the QtSql module... Generating the .pro file for the QtSql module... Generating the Makefile for the QtSql module... Generating the C++ source for the QtSvg module... Generating the .pro file for the QtSvg module... Generating the Makefile for the QtSvg module... Generating the C++ source for the QtTest module... Generating the .pro file for the QtTest module... Generating the Makefile for the QtTest module... Generating the C++ source for the QtWebKit module... Generating the .pro file for the QtWebKit module... Generating the Makefile for the QtWebKit module... Generating the C++ source for the QtWebKitWidgets module... Generating the .pro file for the QtWebKitWidgets module... Generating the Makefile for the QtWebKitWidgets module... Generating the C++ source for the QtWidgets module... Generating the .pro file for the QtWidgets module... Generating the Makefile for the QtWidgets module... Generating the C++ source for the QtXmlPatterns module... Generating the .pro file for the QtXmlPatterns module... Generating the Makefile for the QtXmlPatterns module... Generating the C++ source for the QtDesigner module... Generating the .pro file for the QtDesigner module... Generating the Makefile for the QtDesigner module... Generating the C++ source for the QAxContainer module... Generating the .pro file for the QAxContainer module... Generating the Makefile for the QAxContainer module... Generating the C++ source for the _QOpenGLFunctions_2_0 module... Generating the .pro file for the _QOpenGLFunctions_2_0 module... Generating the Makefile for the _QOpenGLFunctions_2_0 module... Generating the C++ source for the QtSensors module... Generating the .pro file for the QtSensors module... Generating the Makefile for the QtSensors module... Generating the C++ source for the QtSerialPort module... Generating the .pro file for the QtSerialPort module... Generating the Makefile for the QtSerialPort module... Generating the C++ source for the QtBluetooth module... Generating the .pro file for the QtBluetooth module... Generating the Makefile for the QtBluetooth module... Generating the C++ source for the QtPositioning module... Generating the .pro file for the QtPositioning module... Generating the Makefile for the QtPositioning module... Generating the C++ source for the QtWinExtras module... Generating the .pro file for the QtWinExtras module... Generating the Makefile for the QtWinExtras module... Generating the C++ source for the QtQuickWidgets module... Generating the .pro file for the QtQuickWidgets module... Generating the Makefile for the QtQuickWidgets module... Generating the C++ source for the QtWebSockets module... Generating the .pro file for the QtWebSockets module... Generating the Makefile for the QtWebSockets module... Embedding sip flags... Generating the C++ source for the Qt module... Generating the .pro file for the Qt module... Generating the Makefile for the Qt module... Generating the .pro file for pylupdate5... Generating the Makefile for pylupdate5... Generating the .pro file for pyrcc5... Generating the Makefile for pyrcc5... Generating the pyuic5.bat wrapper... Generating the Qt Designer plugin .pro file... Generating the Qt Designer plugin Makefile... Generating the qmlscene plugin .pro file... Generating the qmlscene plugin Makefile... Re-writing D:\port\PyQt-5.3.1\examples\quick\tutorials\extending\chapter6-plugins\Charts\qm ldir... Generating the top-level .pro file... Generating the top-level Makefile... D:\port\PyQt-5.3.1>mingw32-make (10:05-11:05) cd QtCore\ && ( if not exist Makefile D:\port\Qt5.3.1\5.3\mingw482_32\bin\qmake. exe D:\port\PyQt-5.3.1\QtCore\QtCore.pro -o Makefile ) && mingw32-make -f Makefi le mingw32-make[1]: Entering directory 'D:/port/PyQt-5.3.1/QtCore' mingw32-make -f Makefile.Release mingw32-make[2]: Entering directory 'D:/port/PyQt-5.3.1/QtCore' g++ -c -pipe -fno-keep-inline-dllexport -mstackrealign -fno-exceptions -O2 -Wall -Wextra -frtti -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_ CORE_LIB -I. -I"." -I"..\..\Python341-32\Include" -I"..\qpy\QtCore" -I"..\..\Qt5 .3.1\5.3\mingw482_32\include" -I"..\..\Qt5.3.1\5.3\mingw482_32\include\QtCore" - I"release" -I"..\..\Qt5.3.1\5.3\mingw482_32\mkspecs\win32-g++" -o release\sipQtC orecmodule.o sipQtCorecmodule.cpp g++ -c -pipe -fno-keep-inline-dllexport -mstackrealign -fno-exceptions -O2 -Wall -Wextra -frtti -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_ CORE_LIB -I. -I"." -I"..\..\Python341-32\Include" -I"..\qpy\QtCore" -I"..\..\Qt5 .3.1\5.3\mingw482_32\include" -I"..\..\Qt5.3.1\5.3\mingw482_32\include\QtCore" - I"release" -I"..\..\Qt5.3.1\5.3\mingw482_32\mkspecs\win32-g++" -o release\sipQtC oreQAbstractAnimation.o sipQtCoreQAbstractAnimation.cpp . . . D:\port\Qt5.3.1\5.3\mingw482_32\bin\moc.exe -DUNICODE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D__GNUC__ -DWIN32 -ID: /port/Qt5.3.1/5.3/mingw482_32/mkspecs/win32-g++ -ID:/port/PyQt-5.3.1/qmlscene -I D:/port/Python341-32/Include -ID:/port/Python341-32/Include -ID:/port/PyQt-5.3.1 /qmlscene -ID:/port/Qt5.3.1/5.3/mingw482_32/include -ID:/port/Qt5.3.1/5.3/mingw4 82_32/include/QtQml -ID:/port/Qt5.3.1/5.3/mingw482_32/include/QtNetwork -ID:/por t/Qt5.3.1/5.3/mingw482_32/include/QtGui -ID:/port/Qt5.3.1/5.3/mingw482_32/includ e/QtCore pluginloader.h -o release\moc_pluginloader.cpp g++ -c -pipe -fno-keep-inline-dllexport -mstackrealign -O2 -Wall -Wextra -frtti -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QML_LIB -DQT_NET WORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I"..\..\Python341-32\Include" -I"..\..\ Python341-32\Include" -I"." -I"..\..\Qt5.3.1\5.3\mingw482_32\include" -I"..\..\Q t5.3.1\5.3\mingw482_32\include\QtQml" -I"..\..\Qt5.3.1\5.3\mingw482_32\include\Q tNetwork" -I"..\..\Qt5.3.1\5.3\mingw482_32\include\QtGui" -I"..\..\Qt5.3.1\5.3\m ingw482_32\include\QtCore" -I"release" -I"..\..\Qt5.3.1\5.3\mingw482_32\mkspecs\ win32-g++" -o release\moc_pluginloader.o release\moc_pluginloader.cpp g++ -Wl,-s -shared -mthreads -Wl,--out-implib,release\libpyqt5qmlplugin.a -o rel ease\pyqt5qmlplugin.dll release/pluginloader.o release/moc_pluginloader.o -lglu 32 -lopengl32 -lgdi32 -luser32 -LD:\port\Python341-32\libs -lpython34 -LD:/port/ Qt5.3.1/5.3/mingw482_32/lib -lQt5Qml -lQt5Network -lQt5Gui -lQt5Core mingw32-make[2]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene' mingw32-make[1]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene' D:\port\PyQt-5.3.1>mingw32-make install cd QtCore\ && ( if not exist Makefile D:\port\Qt5.3.1\5.3\mingw482_32\bin\qmake. exe D:\port\PyQt-5.3.1\QtCore\QtCore.pro -o Makefile ) && mingw32-make -f Makefi le install mingw32-make[1]: Entering directory 'D:/port/PyQt-5.3.1/QtCore' mingw32-make -f Makefile.Release install mingw32-make[2]: Entering directory 'D:/port/PyQt-5.3.1/QtCore' copy /y D:\port\PyQt-5.3.1\QtCore\QtCore.pyd D:\port\Python341-32\Lib\site-packa ges\PyQt5 1 file(s) copied. copy /y D:\port\PyQt-5.3.1\sip\QtCore\qabstractanimation.sip D:\port\Python341-3 2\sip\PyQt5\QtCore 1 file(s) copied. copy /y D:\port\PyQt-5.3.1\sip\QtCore\qabstracteventdispatcher.sip D:\port\Pytho n341-32\sip\PyQt5\QtCore 1 file(s) copied. copy /y D:\port\PyQt-5.3.1\sip\QtCore\qabstractitemmodel.sip D:\port\Python341-3 2\sip\PyQt5\QtCore 1 file(s) copied. copy /y D:\port\PyQt-5.3.1\sip\QtCore\qabstractnativeeventfilter.sip D:\port\Pyt hon341-32\sip\PyQt5\QtCore . . . cd qmlscene\ && ( if not exist Makefile D:\port\Qt5.3.1\5.3\mingw482_32\bin\qmak e.exe D:\port\PyQt-5.3.1\qmlscene\qmlscene.pro -o Makefile ) && mingw32-make -f Makefile install mingw32-make[1]: Entering directory 'D:/port/PyQt-5.3.1/qmlscene' mingw32-make -f Makefile.Release install mingw32-make[2]: Entering directory 'D:/port/PyQt-5.3.1/qmlscene' copy /y "release\pyqt5qmlplugin.dll" "D:\port\Qt5.3.1\5.3\mingw482_32\plugins\Py Qt5\pyqt5qmlplugin.dll" 1 file(s) copied. mingw32-make[2]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene' mingw32-make[1]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene' copy /y D:\port\PyQt-5.3.1\__init__.py D:\port\Python341-32\Lib\site-packages\Py Qt5 1 file(s) copied. xcopy /s /q /y /i D:\port\PyQt-5.3.1\pyuic\uic D:\port\Python341-32\Lib\site-pac kages\PyQt5\uic 36 File(s) copied copy /y D:\port\PyQt-5.3.1\pyuic5.bat D:\port\Python341-32 1 file(s) copied. strip D:\port\Python341-32\pyuic5.bat strip:D:\port\Python341-32\pyuic5.bat: File format not recognized Makefile:1980: recipe for target 'install_pyuic5' failed mingw32-make: [install_pyuic5] Error 1 (ignored)
==>edit file D:\port\PyQt-5.3.1\Makefile
==>find “install_pyuic5”
==>remove line “-strip D:$(INSTALL_ROOT)\port\Python341-32\pyuic5.bat”
==>run again
. . . mingw32-make[2]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene' mingw32-make[1]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene' copy /y D:\port\PyQt-5.3.1\__init__.py D:\port\Python341-32\Lib\site-packages\Py Qt5 1 file(s) copied. xcopy /s /q /y /i D:\port\PyQt-5.3.1\pyuic\uic D:\port\Python341-32\Lib\site-pac kages\PyQt5\uic 36 File(s) copied copy /y D:\port\PyQt-5.3.1\pyuic5.bat D:\port\Python341-32 1 file(s) copied. D:\port\Qt5.3.1\5.3\Src\qtbase\src\plugins\sqldrivers\oci>mingw32-make mingw32-make -f Makefile.Release all mingw32-make[1]: Entering directory 'D:/port/Qt5.3.1/5.3/Src/qtbase/src/plugins/ sqldrivers/oci' D:\port\Qt5.3.1\5.3\mingw482_32\bin\moc.exe -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT _NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -D QT_CORE_LIB -D__GNUC__ -DWIN32 -ID:/port/Qt5.3.1/5.3/Src/qtbase/mkspecs/win32-g+ + -ID:/port/Qt5.3.1/5.3/Src/qtbase/src/plugins/sqldrivers/oci -ID:/port/Qt5.3.1/ 5.3/mingw482_32/include/QtSql/5.3.1 -ID:/port/Qt5.3.1/5.3/mingw482_32/include/Qt Sql/5.3.1/QtSql -ID:/port/Qt5.3.1/5.3/mingw482_32/include -ID:/port/Qt5.3.1/5.3/ mingw482_32/include/QtSql -ID:/port/Qt5.3.1/5.3/mingw482_32/include/QtCore/5.3.1 -ID:/port/Qt5.3.1/5.3/mingw482_32/include/QtCore/5.3.1/QtCore -ID:/port/Qt5.3.1 /5.3/mingw482_32/include/QtCore main.cpp -o .moc\release\main.moc g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -W all -Wextra -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCE PTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I"D:\port\Qt5.3 .1\5.3\mingw482_32\include\QtSql\5.3.1" -I"D:\port\Qt5.3.1\5.3\mingw482_32\inclu de\QtSql\5.3.1\QtSql" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include" -I"D:\port\Qt5 .3.1\5.3\mingw482_32\include\QtSql" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include\Q tCore\5.3.1" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include\QtCore\5.3.1\QtCore" -I" D:\port\Qt5.3.1\5.3\mingw482_32\include\QtCore" -I".moc\release" -I"%INCLUDE%" - I"D:\port\OracleIC-11.2.0.3.0\include" -I"..\..\..\..\mkspecs\win32-g++" -o .obj \release\main.o main.cpp . . . g++ -c -pipe -fno-keep-inline-dllexport -g -std=c++0x -fno-exceptions -frtti -Wa ll -Wextra -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEP TIONS -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I"D:\port\Qt5.3.1\5.3\mingw482 _32\include\QtSql\5.3.1" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include\QtSql\5.3.1\ QtSql" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include" -I"D:\port\Qt5.3.1\5.3\mingw4 82_32\include\QtSql" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include\QtCore\5.3.1" -I "D:\port\Qt5.3.1\5.3\mingw482_32\include\QtCore\5.3.1\QtCore" -I"D:\port\Qt5.3.1 \5.3\mingw482_32\include\QtCore" -I".moc\debug" -I"%INCLUDE%" -I"D:\port\OracleI C-11.2.0.3.0\include" -I"..\..\..\..\mkspecs\win32-g++" -o .obj\debug\moc_qsql_o ci_p.o .moc\debug\moc_qsql_oci_p.cpp g++ -shared -Wl,--out-implib,D:\port\Qt5.3.1\5.3\Src\qtbase\plugins\sqldrivers\l ibqsqlocid.a -o ..\..\..\..\plugins\sqldrivers\qsqlocid.dll .obj/debug/main.o .o bj/debug/qsql_oci.o .obj/debug/moc_qsql_oci_p.o -L%LIB% -LD:\port\OracleIC-11.2 .0.3.0\lib\msvc -loci -LD:/port/Qt5.3.1/5.3/mingw482_32/lib -lQt5Sqld -lQt5Cored mingw32-make[1]: Leaving directory 'D:/port/Qt5.3.1/5.3/Src/qtbase/src/plugins/s qldrivers/oci' D:\port\Qt5.3.1\5.3\Src\qtbase\src\plugins\sqldrivers\oci>
==>copy qsqloci.dll D:\port\Qt5.3.1\5.3\Src\qtbase\plugins\sqldrivers to D:\port\Qt5.3.1\5.3\mingw482_32\plugins\sqldrivers
Filed under: Oracle, PyQt5 | Leave a comment »
When I start Glassfish 4.0 from inside NetBeans IDE 7.4, I got this output
SEVERE: SEC5054: Certificate has expired: [ [ Version: V3 Subject: CN=GTE CyberTrust Root 5, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5 Key: Sun RSA public key, 2048 bits modulus: 237418898293472616608124373663877543854434319738611148654904141538840503317458119 685231168476255701465927369352097185652960533868421359855348631579831288127741629 980536737464707822524076734022381468699944387295512467683687823183938783744210339 075971622187580245817351396820871269828095114790591006170278928802275878558774794 328856044044024356628023904840990658714305852845345296273477175303521896120771306 066426769516400713367170264590375425529279058511714605893615703921997487534148556 756656350033357699159081872243472328073360224565373289620950053233829400806769318 22787496212635993279098588863972868266229522169377 public exponent: 65537 Validity: [From: Fri Aug 14 21:50:00 ICT 1998, To: Thu Aug 15 06:59:00 ICT 2013] Issuer: CN=GTE CyberTrust Root 5, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US SerialNumber: [ 01b6] Certificate Extensions: 4 [1]: ObjectId: 2.5.29.19 Criticality=true BasicConstraints:[ CA:true PathLen:5 ] [2]: ObjectId: 2.5.29.32 Criticality=false CertificatePolicies [ [CertificatePolicyId: [1.2.840.113763.1.2.1.3] [] ] ] [3]: ObjectId: 2.5.29.15 Criticality=true KeyUsage [ Key_CertSign Crl_Sign ] [4]: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: 76 0A 49 21 38 4C 9F DE F8 C4 49 C7 71 71 91 9D v.I!8L....I.qq.. ] ] ] Algorithm: [SHA1withRSA] Signature: 0000: 41 3A D4 18 5B DA B8 DE 21 1C E1 8E 09 E5 F1 68 A:..[...!......h 0010: 34 FF DE 96 F4 07 F5 A7 3C F3 AC 4A B1 9B FA 92 4.......<..J.... 0020: FA 9B ED E6 32 21 AA 4A 76 C5 DC 4F 38 E5 DF D5 ....2!.Jv..O8... 0030: 86 E4 D5 C8 76 7D 98 D7 B1 CD 8F 4D B5 91 23 6C ....v......M..#l 0040: 8B 8A EB EA 7C EF 14 94 C4 C6 F0 1F 4A 2D 32 71 ............J-2q 0050: 63 2B 63 91 26 02 09 B6 80 1D ED E2 CC B8 7F DB c+c.&........... 0060: 87 63 C8 E1 D0 6C 26 B1 35 1D 40 66 10 1B CD 95 .c...l&.5.@f.... 0070: 54 18 33 61 EC 13 4F DA 13 F7 99 AF 3E D0 CF 8E T.3a..O.....>... 0080: A6 72 A2 B3 C3 05 9A C9 27 7D 92 CC 7E 52 8D B3 .r......'....R.. 0090: AB 70 6D 9E 89 9F 4D EB 1A 75 C2 98 AA D5 02 16 .pm...M..u...... 00A0: D7 0C 8A BF 25 E4 EB 2D BC 98 E9 58 38 19 7C B9 ....%..-...X8... 00B0: 37 FE DB E2 99 08 73 06 C7 97 83 6A 7D 10 01 2F 7.....s....j.../ 00C0: 32 B9 17 05 4A 65 E6 2F CE BE 5E 53 A6 82 E9 9A 2...Je./..^S.... 00D0: 53 0A 84 74 2D 83 CA C8 94 16 76 5F 94 61 28 F0 S..t-.....v_.a(. 00E0: 85 A7 39 BB D7 8B D9 A8 B2 13 1D 54 09 34 24 7D ..9........T.4$. 00F0: 20 81 7D 66 7E A2 90 74 5C 10 C6 BD EC AB 1B C2 ..f...t\....... ]
The solution that work on me, go to folder “glassfish4/glassfish/domains/domain1/config” and then execute “keytool -delete -alias gtecybertrust5ca -keystore cacerts.jks -storepass [yourwish]”
Filed under: GlassFish, java, NetBeans | Leave a comment »
On Apache error.log
...PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in D:\\port\\Apache24-2.4.9\\htdocs\\index.html on line 34
Use on of this :
1. Edit php.ini, then restart Apache
[Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = Asia/Jakarta
2. If your php.ini cannot be edit, you can use this function at the beginning of code
date_default_timezone_set('Asia/Jakarta');//or change to whatever timezone you want
3. Edit index.php without edit php.ini
if( ! ini_get('date.timezone') ) { date_default_timezone_set('GMT'); }
4. If you can’t modify php.ini, and don’t want to add a date_default_timezone call, then use gmdate()
<? print(gmdate("Y")); ?>
Filed under: Apache, PHP | Leave a comment »
15 15 * * * /u01/app/oracle/backups/scripts/test.sh >>/mnt/uranus/rman/logs/59_`date +\%Y\%m\%d\%H\%M\%S`.log
It will create ‘/mnt/uranus/rman/logs/59_201403171515.log’
Filed under: Linux | Leave a comment »
My archived log are saved in different folders according to the save date; for example 2014_03_10, 2014_03_11 which contains all the archives saved on that day and so on.
This is my log_archive_dest parameter,
SQL> show parameter log_archive_dest NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ log_archive_dest string log_archive_dest_1 string SQL> SELECT DEST_NAME, DESTINATION FROM V$ARCHIVE_DEST WHERE STATUS='VALID'; DEST_NAME DESTINATION ------------------------ ------------------------------------------- LOG_ARCHIVE_DEST_1 USE_DB_RECOVERY_FILE_DEST SQL> show parameter db_recovery_file_dest NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /u01/app/oracle/fast_recovery_ area
To change archived log save in one folder without separate it by day, we can change alter LOG_ARCHIVE_DEST_1
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle/backups/fast_recovery_area' scope=both; System altered.
Filed under: Oracle | Leave a comment »
Filed under: Oracle | Leave a comment »
CROSSCHECK BACKUP; # checks backup sets, proxy copies, and image copies CROSSCHECK BACKUPSET; # crosschecks backupsets on disk and SBT
and
CROSSCHECK COPY; # crosschecks only disk copies of database files
Filed under: Oracle | Leave a comment »
ls -laLR > print.txt
to print permission of all files, folders include hidden file and symlinks
ls -dl 'find / -type d'
to print permissions only folder
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
to print folder structure
Filed under: Linux | Leave a comment »
RMAN> delete obsolete; RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 using channel ORA_DISK_1 Deleting the following obsolete backups and copies: Type Key Completion Time Filename/Handle -------------------- ------ ------------------ -------------------- Control File Copy 15 13-FEB-14 /home/oracle/standby.ctl Control File Copy 18 15-FEB-14 /home/oracle/stby.ctl Control File Copy 19 15-FEB-14 /home/oracle/new.ctl Control File Copy 21 15-FEB-14 /home/oracle/top.ctl Control File Copy 23 15-FEB-14 /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f Do you really want to delete the above objects (enter YES or NO)? yes RMAN-06207: WARNING: 5 objects could not be deleted for DISK channel(s) due RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status RMAN-06210: List of Mismatched objects RMAN-06211: ========================== RMAN-06212: Object Type Filename/Handle RMAN-06213: --------------- --------------------------------------------------- RMAN-06214: Datafile Copy /home/oracle/standby.ctl RMAN-06214: Datafile Copy /home/oracle/stby.ctl RMAN-06214: Datafile Copy /home/oracle/new.ctl RMAN-06214: Datafile Copy /home/oracle/top.ctl RMAN-06214: Datafile Copy /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f
This solution work for me,
RMAN> crosscheck copy; released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1702 device type=DISK specification does not match any datafile copy in the repository validation failed for control file copy control file copy file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f RECID=23 STAMP=839616673 validation failed for control file copy control file copy file name=/home/oracle/top.ctl RECID=21 STAMP=839589691 validation failed for control file copy control file copy file name=/home/oracle/new.ctl RECID=19 STAMP=839585230 validation failed for control file copy control file copy file name=/home/oracle/stby.ctl RECID=18 STAMP=839584426 validation failed for control file copy control file copy file name=/home/oracle/standby.ctl RECID=15 STAMP=839414702 RMAN> delete expired copy; released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1702 device type=DISK specification does not match any datafile copy in the repository specification does not match any archived log in the repository List of Control File Copies =========================== Key S Completion Time Ckp SCN Ckp Time ------- - --------------- ---------- --------------- 23 X 15-FEB-14 69502411861 15-FEB-14 Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f Tag: TAG20140215T185113 21 X 15-FEB-14 69502351103 15-FEB-14 Name: /home/oracle/top.ctl Tag: TAG20140215T112131 19 X 15-FEB-14 69502304494 15-FEB-14 Name: /home/oracle/new.ctl Tag: TAG20140215T100710 18 X 15-FEB-14 69502303165 15-FEB-14 Name: /home/oracle/stby.ctl Tag: TAG20140215T095346 15 X 13-FEB-14 69426170931 13-FEB-14 Name: /home/oracle/standby.ctl Tag: TAG20140213T104502 Do you really want to delete the above objects (enter YES or NO)? yes deleted control file copy control file copy file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f RECID=23 STAMP=839616673 deleted control file copy control file copy file name=/home/oracle/top.ctl RECID=21 STAMP=839589691 deleted control file copy control file copy file name=/home/oracle/new.ctl RECID=19 STAMP=839585230 deleted control file copy control file copy file name=/home/oracle/stby.ctl RECID=18 STAMP=839584426 deleted control file copy control file copy file name=/home/oracle/standby.ctl RECID=15 STAMP=839414702 Deleted 5 EXPIRED objects RMAN>
Filed under: Oracle | Leave a comment »
When I “yum install libXext.i686 -y”, it failed because
Error: Protected multilib versions: libXext-1.3.1-2.el6.i686 != libXext-1.1-3.el6.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
Then I do again “yum install libXext.i686 -y –skip-broken”. but again another message like this
Error: Protected multilib versions: libXext-1.3.1-2.el6.i686 != libXext-1.1-3.el6.x86_64 You could try running: rpm -Va --nofiles --nodigest
I have run these
package-cleanup --dupes package-cleanup --cleandupes yum clean all yum update #take very long time to finish
Here the solution that work for me,
yum install libXext.i686 -y --setopt=proctected_multilib=false
Filed under: Linux, RedHat | Leave a comment »
Cause of this message is because archive log file destination was changed or someone deleted/moved the archive log files manually using OS commands.
Use “DELETE EXPIRED ARCHIVELOG ALL” will alleviate the VALIDATION FAILED messages.
RMAN> crosscheck archivelog all; RMAN> delete expired archivelog all;
Filed under: Oracle | Leave a comment »
Just simple,
sqlplus "user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname_or_ipaddress)(PORT=port_number))(CONNECT_DATA=(SERVER=dedicated)(SID=remote_SID)))"
example,
sqlplus "pandazen/pandaworld@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.1.2)(PORT=1521))(CONNECT_DATA=(SERVER=dedicated)(SID=pandaserver)))"
Filed under: Oracle | Leave a comment »
Server:
On server 192.168.51.57
On server 192.168.51.55
Finish, then we can test create a textfile from 192.168.51.57 and then open it from 192.168.51.55.
Filed under: Linux | Leave a comment »
When using “yum install”, I got this message
Another app is currently holding the yum lock; waiting for it to exit
For example, when I’m done running “yum install-y binutils” then I proceed proceed to run “yum install compat-libcap1-y”, a moment later the message like this show up,
Another app is currently holding the yum lock; waiting for it to exit …
The other application is: PackageKit
. This message keep show repeatedly if I go with another “yum install”.
So to stop this, just edit PackageKit config in /etc/yum/pluginconf.d/refresh-packagekit.conf then change “enable=1” to “enable=0”
[Main] enabled = 0
Filed under: Linux | Leave a comment »
[root@mars ~]# su - oracle [oracle@mars ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Thu Feb 27 15:12:23 2014 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 CURRENT 2 INACTIVE 3 INACTIVE SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 CURRENT 2 INACTIVE 3 INACTIVE SQL> alter system switch logfile; System altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 INACTIVE 2 INACTIVE 3 CURRENT SQL> alter system switch logfile; System altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 INACTIVE 2 CURRENT 3 INACTIVE SQL> alter database drop logfile group 1; Database altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 2 CURRENT 3 INACTIVE SQL> ALTER DATABASE ADD LOGFILE GROUP 1 ( 2 '/u01/app/oracle/oradata/itcsyariah2/redo01a.log', 3 '/data04/redolog/itcsyariah2/redo01b.log', 4 '/backup/redolog/itcsyariah2/redo01c.log') SIZE 250M REUSE; Database altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 UNUSED 2 CURRENT 3 INACTIVE SQL> alter system switch logfile; System altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 CURRENT 2 INACTIVE 3 INACTIVE SQL> alter database drop logfile group 2; Database altered. SQL> ALTER DATABASE ADD LOGFILE GROUP 2 ( 2 '/u01/app/oracle/oradata/itcsyariah2/redo02a.log', 3 '/data04/redolog/itcsyariah2/redo02b.log', 4 '/backup/redolog/itcsyariah2/redo02c.log') SIZE 250M REUSE; Database altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 CURRENT 2 UNUSED 3 INACTIVE SQL> alter database drop logfile group 3; Database altered. SQL> ALTER DATABASE ADD LOGFILE GROUP 3 ( 2 '/u01/app/oracle/oradata/itcsyariah2/redo03a.log', 3 '/data04/redolog/itcsyariah2/redo03b.log', 4 '/backup/redolog/itcsyariah2/redo03c.log') SIZE 250M REUSE; Database altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 CURRENT 2 UNUSED 3 UNUSED SQL> alter system switch logfile; System altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 INACTIVE 2 CURRENT 3 UNUSED SQL> alter system switch logfile; System altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 INACTIVE 2 INACTIVE 3 CURRENT SQL> alter system switch logfile; System altered. SQL> select group#, status from v$log; GROUP# STATUS ---------- ---------------- 1 CURRENT 2 INACTIVE 3 INACTIVE SQL>
Filed under: Oracle | Leave a comment »
CMIIW ^_^
SQL> create pfile=’/u01/app/oracle/backups/pools/pfiles/pfilesqlplus20140226.ora’ from spfile;
File created.
SQL> create pfile=’/u01/app/oracle/backups/pools/pfiles/pfilememory20140226.ora’ from memory;
File created.
ASMCMD> cp +DATA/ITCAPPS2/spfileitcapps2.ora /u01/app/oracle/backups/pools/pfiles/pfileasmcmd20140226.ora
copying +DATA/ITCAPPS2/spfileitcapps2.ora -> /u01/app/oracle/backups/pools/pfiles/pfileasmcmd20140226.ora
RMAN> backup spfile to destination=’/u01/app/oracle/backups/pools/pfiles/rman’;
Starting backup at 26-FEB-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1385 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 26-FEB-14
channel ORA_DISK_1: finished piece 1 at 26-FEB-14
piece handle=/u01/app/oracle/backups/pools/pfiles/rman/ITCAPPS2/backupset/2014_02_26/o1_mf_nnsnf_TAG20140226T153522_9jv9tbqw_.bkp tag=TAG20140226T153522 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 26-FEB-14
Filed under: Oracle | Leave a comment »