Tag Archives: import

org.apache.jasper.JasperException: Unsupported encoding:

org.apache.jasper .JasperException: Unsupported encoding: 

org.apache.jasper . compiler.DefaultErrorHandler.jspError ( DefaultErrorHandler.java:51 )

org.apache.jasper . compiler.ErrorDispatcher.dispatch ( ErrorDispatcher.java:409 )

org.apache.jasper . compiler.ErrorDispatcher.jspError ( ErrorDispatcher.java:116 )

org.apache.jasper . compiler.JspUtil.getReader ( JspUtil.java:1093 )

org.apache.jasper . compiler.ParserController.doParse ( ParserController.java:250 )

The reason for throwing this exception is that there is a problem in the encoding settings of the JSP page

<%@ page language=”java” import=” java.util .*” pageEncoding=””%>

Here, the value of pageencoding is empty, which cannot be recognized by the server. Even if there is one more space, the server will not recognize it.

& lt;% @ page contenttype = “text/HTML; charset = GB2312″% & gt; the charset here has an extra space, so this exception should be thrown.

Coding and decoding Base64 in Python

Base64 coding is a kind of coding method of “guard against gentleman but not villain”. It is widely used in MIME Protocol. As the transmission code of e-mail, the generated code is reversible. The last two bits may have “=”, and the generated codes are all ASCII characters.
Advantages: fast speed, ASCII characters, incomprehensible to the naked eye
disadvantages: the encoding is relatively long, very easy to crack, only suitable for the occasion of encrypting non key information
Base64 encoding and decoding in Python
& gt; & gt; & gt; import Base64
& gt; & gt; s =’I am a string ‘
& gt; & gt; a = Base64. B64encode (s)
& gt; & gt; & gt; Print a
ztlkx9fwt / u0rg = =
& gt; & gt; & gt; print Base64. B64decode (a)
I am a string

Solution of VS2008 unable to open GL / glaux. H header file

2011-04-15 wcdj
 
I don’t know why there is no OpenGL header file in SDK after VS2008. Here is a summary for this problem.
 
In Lesson 6 of learning Nehe’s texture mapping, I initially needed to use the header file containing gl/glaux. H, but found that I didn’t have this header file on my system. There are two header paths in the compiler that reference OpenGL:
C:/Program Files/Microsoft SDKs/Windows/v6.0 A/include/gl/gl h (the default)
C:/Program Files/Microsoft Visual Studio 9.0/VC/include/gl/glut. H (the new gl manually folder)

Googled the solution.

thod 1: Find the most used solution, but I do not have VS2003 or VS2005 installed on my system, so I cannot copy it.
I have been porting old openGL program to VS2008. I have solved the problem by copying the “include/gl/glaux.h” and “lib/glaux.lib” from the VS2005 Platform SDK located on “C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK” To the PlatformSDK of VS2008 located on “C:/Program Files/Microsoft SDKS /Windows/ V6.0a “


Based on the reply to https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1065518& SiteID=1, it looks like glaux. Lib is deprecated. Instead link to kernel32.lib, user32.lib, gdi32.lib and advapi32.lib


The easiest way to sort this out is to:
) Install Glut3.6 or newer as directed.
2>pen Visual Studio 2008 and create a new project
3) Cho>C ++ -Empty solution
4) Import Al> the files from your previous OpenGL project
5) delete all headers i.e.
#include < gl/glu.h>
#include < gl/gluax.h>
and any other GL headers
6) then replace with #include < gl/glut.h>
7) recompile.

this worked for all of my 2003 & 2005 Solutions.

thod 4: Download Missing Files.
1: download the source CSDN download
OpenGL installation package download required documents:

http://d.download.csdn.net/down/2560229/ssagnn23 include:
GL. H GLAUX. H GLU. H glut.
H GLAUX. LIB GLU32. LIB glut32. LIB glut. LIB OPENGL32. LIB
GLAUX. DLL GLU32. DLL glut32. DLL glut. DLL OPENGL32. DLL

VS2008 without GL. H, H, glu.h, GLAUX. Lib, glu32.lib, opengl32.lib.

1) Copy GLUX. DLL, GLUT32.DLL, GLU32.DLL and GLU32.DLL to C:/WINDOWS/system32, which should already have OpenGL32.DLL and GLU32.DLL.
. (2) the GL H, GLAUX. J H, glu. H, glut. H a copy to the C:/Program Files/Microsoft Visual Studio 9.0/VC/include/GL
. (3) the GLAUX LIB and Glu32. LIB, glut32. LIB, Opengl32. LIB, C:/Program Files/Microsoft Visual Studio 9.0/VC/lib

br>>
nehe SRC – cn – nehe OpenGL tutorials Chinese version and the code download

http://code.google.com/p/nehe-src-cn/downloads/list nehe OpenGL tutorial Chinese version and the code download

http://www.yakergong.com/nehe/ provides each Lesson # sample code and the file you need.

4 according to the method, after downloading the file and configure, recompile, without the previous mistakes, documents found, but the following mistakes.
error C2664: “auxdibimageLoadw” : Cannot convert parameter 1 from “char *” to “LPCWSTR”
is is because I am building a Unicode character set based project, so I want to use wide characters. It is also possible not to use Unicode character sets in the property page ->; Configure properties ->; You can modify it in general. Select not to use the Unicode character set here; that is, select Unset. And then recompile it. OK!

br>>

reference:
missing glaux. H in v6.0 a SDK?

http://social.msdn.microsoft.com/Forums/en/windowssdk/thread/b66e5f7a-91f6-4dbe-b388-0c131008b08f project under VS2003 under VS2008 compilation, however, Can’t find the gl/glaux. H

http://topic.csdn.net/u/20070930/15/6a900f21-8e41-4325-862f-f6df3a425f36.html VS 2008 OpenGL configuration

http://lujun5918.blog.163.com/blog/static/287227712011013114410553/ Load images generated texture opengl program
http://topic.csdn.net/u/20070823/19/4497cb18-be2a-464f-ad20-b12191a61b26.html
 
 
 
 

The corresponding solutions to the problems of various external symbols that cannot be resolved

When using a VS2008 debugger, it is common to have problems with external symbols that cannot be resolved. There are many possible reasons. Here are some of the things I have learned over the past year.
For reference only.
 
Consider possible reasons:
[0] can’t parse may be because the.lib file is not correct, such as a 64 – bit compiler configuration, the results using the 32-bit lib package.
[1] is only to write a class declaration, but I haven’t write the implementation class, causing a call cannot resolve
[2] declaration and definition is not regulated, cause inconsistent links, cannot resolve
[3] is not in the project properties page of the linker command line options to join the corresponding class package.
[4] in the c + + contains, to join the corresponding class package repository directory path
[5] file directory to be tested in test engineering of measured classes may need to include the CPP definition file
[6] ICE interface test, cannot resolve may be because the file is not being measured include relevant CPP file, in addition, in TestSuite_ProjectRun. H file needs to contain IProjectRun. H header file, and the relevant header files (for example).
[7]import related contents cannot be resolved, the solution is to add the corresponding dynamic library in the linker dependencies
[8] The following error is usually caused by the fact that the dynamic library does not have a package. __imp
ProjectRun. Obj: error LNK2019: cannot resolve __imp__StartHistoryLocalModule external symbols, the symbol in the function “protected: virtual int __thiscall HiRTDB: : CProjectRun: : DoStart (void)” (?DoStart@CProjectRun @hirtdb @@maehxz)
[9] ERROR LNK2001: __imp___CrtDbgReportW
project properties, C/C++, code generation, runtime library select MDD,
[9] cannot resolve the external symbol “__declspec (dllimport) public: int __thiscall HiRTDB: : CTagTree: : GetObjectA (int, struct HiRTDB: : SBaseReadProps const & amp; ,struct HiRTDB::SBaseReadValues &) ” (__imp_?Public: int __thiscall hirtDB :: cStringImpl ::Get(int,struct hirtDB :: sStringReadprops const & ,struct HiRTDB::SStringReadValues &) “(?Get @cStringImpl @hirtdb @@qaehhabusStringReadProps @2 @aausStringReadValues @2@@Z
The reason may be that there are extra options in the project configuration file, please refer to the configuration options of other modules, do not have extra configuration.

Package python3.1 + PyQt4 into exe

There are many programs that package Python as an exe, such as Py2exe, PyInstaller, and so on, but so far none of them support Python 3.1 well, so I’ll introduce CX_freeze 4.2.2 here, which also supports cross-platform running on Windows and Linux.
Cx_freeze download site is http://sourceforge.net/projects/cx-freeze/files/, want to undertake choosing according to install python version. For example, I am using python3.1, so I will download the file cx_Freeze- 4.2.2.2.win32-py3.1.msi. After running the installation package, the program is copied to the Python directory. There are two main places, one is C:/Python31/Scripts and the other is C:/Python31/Lib/site-packages/cx_Freeze
 
In previous versions of cx_Freeze, py was converted to exe through the script Freezepython.py, but in 4.2.2 Freezepython.py is gone and the main work is done by the C:/Python 31/scripts cxfree.bat.
There are two main ways to complete python exe packaging using cx_Freeze:
First, run cxfreeze. Bat directly through:
Go to the CMD command line, enter the C:/Python 31/scripts directory, and run cxfreed.bat-h to see its instructions. We can do an experiment with CX_freeze’s own sample.
Go to C :/ Python 31/scripts/ and run
cxfreeze C:/Python31/Lib/site-packages/cx_Freeze/samples/PyQt4/PyQt4app.py –install-dir=d:/123
Pytqt4app.py is packaged as exe, and the libraries it USES are also evaluated in the d:/123 directory.
 
Second, run setup.py:
In the example provided with CXfreeze C:/ python31/lib /site-packages/cx_Freeze/samples/PyQt4, there is a setup.py file. Open this file and we find that it is:

By running this script, packaging can be done automatically:
For example, if you go into C:/ python31/lib /site-packages/cx_Freeze/samples/PyQt4,
run
setup.py build
After that, a build/exe.win32-3.1 directory will appear under this directory, where you can see the packaged exe file. We want to package our script, copy this setup.py over, and put it in
executables = [Executable(“PyQt4app.py”, base = base)])
Change pyqt4app.py to your own script name.
 
Problems during packaging:
For Chinese support, if there is Chinese in the script and the encoding format is not specified, the packaging process will occur: UnicodeDecodeError: ‘utf8’ codec can ‘t decode bytes in the position of 1602: invalid data this kind of mistake, this blog post on http://www.cnblogs.com/xinzaitian/archive/2010/12/10/1902481.html, the author mentioned Chinese must be deleted.
In fact, Chinese characters can be retained by adding the following at the beginning of the script file:
#! /usr/bin/env python
#coding=utf-8
It is ok
 
Another problem is that if the packaged EXE file is run under “desktop” or other Chinese path, a window will pop up showing “Cannot get zipimporter” instance. So far, no good solution has been found

Python error: typeerror: ‘module’ object is not callable

TypeError: ‘module’ object is not callable when calling another function or class in Python. This is related to the import mechanism
To be clear, attention_keras.py and attention_tf.py are in the same package (i.e. under the same folder)


While calling a function in the attention_Tf.py file, it is found that attention_TF cannot be called
# Set attensons-Master – Mark Directory As -& GT; Resources ROOT

rule: 1, if the method in b.> file is called, that is, B.py has Class B: the principle of calling is: module name-class name-method name

2, if calling a function in the b.py file: module name – function name