如何在MVC4中创建上下文类[关闭](How to create context class in MVC4 [closed])
我有一个MVC4数据库第一个项目。 我建立了数据库连接,并为表格创建了所有的.cs文件。 上下文已创建,但创建控制器时不会显示在下拉列表中。 难道我做错了什么? 如果需要,将提供任何其他信息。
I have a MVC4 database first project. I have established database connection and all the .cs files are created for the tables. A context is created, but this does not show up in the dropdownlist while creating a controller. Am I doing something wrong? Any additional information will be provided if required.
原文:https://stackoverflow.com/questions/17880832
最满意答案
请改用
sudo port py27-opengl
。通常,对于与MacPorts python相关的端口,它所应用的Python版本以其名称编码:
py25-
,py26-
,py27-
,py31-
,py32-
。 他们在Python 2.4之后开始这样做,因此py-
通常是传统的Python 2.4版本。 还有其他端口使用变量来选择要链接的Python。 这些在端口描述中被调用,如下所示。 例如,要安装Python 2.7的boost
,你可以使用sudo port boost +python27
。Use
sudo port py27-opengl
instead.In general, with MacPorts python-related ports, the Python version to which it applies is encoded in its name:
py25-
,py26-
,py27-
,py31-
,py32-
. They started doing this after Python 2.4, sopy-
are generally the legacy Python 2.4 versions. There are other ports that use variants to select which Python to link with. These are called out in the port descriptions, like these. For example, to installboost
for Python 2.7, you would usesudo port boost +python27
.
相关问答
更多-
我记得它是像g++-mp-4.6这样的东西。 我相信设置环境变量CXX就足够了。 I remember it being something like g++-mp-4.6. I believe it's enough to set the environment variable CXX to that.
-
使用port installed列出所有端口。 Use port installed to list all of your ports.
-
MacPorts在安装python模块时不会碰到系统python。 它确实为它自己的python版本安装了这些模块,默认是/opt/local/bin/python2.7 。 你可以使它成为在shell中使用sudo port select --set python python27键入python时运行的默认python。 MacPorts does not touch the system python when installing python modules. It does install th ...
-
MacPorts用于安装DotNet的OpenSSL Force Link(MacPorts OpenSSL Force Link for Installing DotNet)[2024-02-01]
我发现了这个问题的解决方案,但不是.NET Core 第173期中更通用的解决方案。 简而言之,您需要将libcrypto.dylib和libssl.dylib的MacPorts版本链接到/usr/local/lib : sudo ln -s /opt/local/lib/libcrypto.1.0.0.dylib /usr/local/lib/libcrypto.1.0.0.dylib sudo ln -s /opt/local/lib/libssl.1.0.0.dylib /usr/local/lib/ ... -
第一个区别:OpenGL是一个规范,而不是一个库。 因此,比较PyOpenGL和OpenGL,就像比较蓝图和房子。 回答你的问题:Python是一种解释型语言,就像Java一样。 游戏引擎需要非常密集的计算,不仅适用于图形,还适用于物理学,人工智能,动画,加载3D文件等。对于优秀的图形来说,PyOpenGL可能就足够了,但对于所有CPU端代码来说,Python是不够的。 当然,这也取决于游戏引擎的“等级”:对于简单/学术游戏,Python可能会完美运行,但不要期待Cryengine具有它。 First di ...
-
PyopenGL glReadPixels(PyopenGL glReadPixels)[2022-09-10]
你的主要问题是glReadPixels接受左下角原点而pygame接受左上角。 首先,你应该总是保存你的pygame Surface (我将很快演示的原因)。 所以: window = pg.display.set_mode((500,500),pg.OPENGL) 现在您可以访问window.width和window.height 。 所以现在你的glReadPixels将获得适当的位置: color=glReadPixels(x,window.height-y,1,1,GL_RGB,GL_FLOAT) ... -
请改用sudo port py27-opengl 。 通常,对于与MacPorts python相关的端口,它所应用的Python版本以其名称编码: py25- , py26- , py27- , py31- , py32- 。 他们在Python 2.4之后开始这样做,因此py-通常是传统的Python 2.4版本。 还有其他端口使用变量来选择要链接的Python。 这些在端口描述中被调用,如下所示。 例如,要安装Python 2.7的boost ,你可以使用sudo port boost +python ...
-
macports混淆(macports confusion)[2023-06-14]
MacPorts将其所有端口安装到/opt/local (或者您配置的任何前缀,但默认为/opt/local )。 它安装自己的Perl,Python等副本,以便MacPorts的安装是标准化的,并且为了避免冲突(苹果公司提供的一些程序,如Perl和Python,以及一些库的版本,往往远远落后于最新版本的那些工具)。 当你安装MacPorts时,它会自动将/opt/local/bin加到你的$PATH变量中(你可以通过编辑你的shell配置文件来改变它),所以如果你调用perl等,你会得到MacPorts版 ... -
更改 from OpenGL import * 至 from OpenGL.GL import * 但是,我赞成使用这种格式: import OpenGL.GL as GL import OpenGL.GLU as GLU import OpenGL.GLUT as GLUT window = 0 width, height = 500,400 def draw(): GL.glClear(GL.GL_COLOR_BUFFER_BIT |GL.GL_DEPTH_BUFFER_BIT) ...
-
没有PyGame的PyOpengl(PyOpengl without PyGame)[2022-03-24]
当pygame与opengl一起使用时,pygame将处理跨平台:窗口创建,键输入,声音输出,图像加载等等,但是pyOpenGL会进行实际渲染。 Pyglet还有跨平台窗口创建+ opengl: http ://www.pyglet.org/ 我不相信使用pygame与其他解决方案有很大的速度差异。 但不同之处在于你如何做事,这将产生最大的影响。 使用numpy vs not,重复调用昂贵的函数,例如:opengl的begin / end等。 When using pygame with opengl, p ...