走过海棠暮

文章 评论 浏览 25

走过海棠暮 2024-10-03 10:32:02

我觉得Matthew分享的文章很好。这是另一篇文章,提供了相当多的见解 - http://www.code-magazine .com/Article.aspx?quickid=0511061

I think article shared by Matthew is a good one. Here's another one that offers quite a bit insight - http://www.code-magazine.com/Article.aspx?quickid=0511061

有关 Asp.Net 管道和内部请求处理架构的文章/链接

走过海棠暮 2024-10-03 08:29:02

在 Rails 3.1 中,“responds_to_parents”不起作用,因为它使用库“PrototypeHelper”,并且该库已在 3.1 中删除。
http://apidock.com/rails/ActionView/Helpers/PrototypeHelper

在 Rails 中 > 3.0,您可以随时将 'responds_to_parent' 替换为 'remotipart'。
os.alfajango.com/remotipart/
https://github.com/JangoSteve/remotipart

In Rails 3.1 'responds_to_parents' doesn't works because it use the library 'PrototypeHelper' and this library has been removed in 3.1.

http://apidock.com/rails/ActionView/Helpers/PrototypeHelper

In rails >3.0, you can always replace 'responds_to_parent' by 'remotipart'.
os.alfajango.com/remotipart/
https://github.com/JangoSteve/remotipart

Rails 3 中的responds_to_parent

走过海棠暮 2024-10-03 06:42:01

如果您确实尝试渲染这些,您应该在中间创建一个顶点,并制作 4 个三角形,其中中点作为顶点之一。
否则我不明白 (v1, v2, v3), (v2, v3, v4)

[编辑:]

抱歉,我在 3D 中思考。这不适用。

If you are actually trying to render these, you should create a vertex in the middle and make 4 triangles with the middle point as one of the verts.
Otherwise I don't see whats wrong with going (v1, v2, v3), (v2, v3, v4)

[EDIT:]

Sorry, I'm thinking in 3D. This doesn't apply.

将任意 4 顶点多边形三角化

走过海棠暮 2024-10-03 05:16:27

我会尝试 AES。通常,与图像压缩等其他步骤相比,加密的瓶颈要小得多。但当然,如果不知道设置的任何具体细节,就很难做出可靠的预测。

I'd try AES. Often the encryption is much less of a bottle neck than other steps, such as image compression. But of course, whithout knowing any specific details of your setup it is hard to make reliable predictions.

快速、“便宜”图像加密

走过海棠暮 2024-10-03 04:10:43

您可以在表单中使用隐藏字段,并将隐藏字段的存储在数据库中(“也许或很可能”为此您需要一个单独的表)。当用户提交表单时,您会检查数据库中是否存在提交的隐藏变量的

当处理来自特定的请求时,将其从数据库中删除。

You can use a hidden field in the form, and store the the value of hidden field in database ("maybe or very probably" you will need a separate table for this). When user submits the form you check that the submitted value for hidden var exists in the database.

When the request from particular value is processed, delete it from database.

php 请求/发布/获取/会话过期

走过海棠暮 2024-10-02 19:31:08

也许是 libSIMDx86?

http://simdx86.sourceforge.net

一个 SSE Stdlib 式的库?

走过海棠暮 2024-10-02 12:56:02

我想说这些问题包含不完整的信息。我的商店在我们的编码标准中仍然在删除之前检查 NULL,因为我们仍然有一个必须支持的编译器/平台配置,如果传递 NULL,它就会进入默认删除运算符的未定义行为。如果原发帖者有类似的情况,那么就需要检查 NULL,否则,请更改编码标准!

I would say the questions contains incomplete information. My shop still has a check for NULL before delete in our coding standard, as we still have one compiler/platform configuration that we must support that goes into undefined behavior with the defualt delete operator if it is passed NULL. If the original poster has a simular situation then there is a point to the check for NULL, otherwise, change the coding standard!

使用重载删除删除对象之前进行 NULL 检查

走过海棠暮 2024-10-02 11:52:12

如果您想使用可移植可执行文件,则无法获取 的副本规格

已经有一段时间了,但如果我没记错的话:IT 和 IAT 是相同的,除了 IAT 在解析导入时由 PE 加载器填充 - 但不要相信我的话,检查规格:)

编辑:

快速浏览了一下规格,刷新了我的记忆:
导入表是主结构,您要从中导入的每个 DLL 都有一个条目。除其他外,每个条目还包含导入查找表 (ILT) 和导入地址表 (IAT)指针(iirc 这些过去被称为 OriginalFirstThunkFirstThunk)。 ILT 和 IAT 表在磁盘上是相同的,但在运行时 IAT 将填充导入函数的内存地址。

如果您希望能够处理非标准 EXE,则可能无法 100% 依赖 PE 标头 IAT 字段,就像您不能依赖代码和数据指针的开始/大小一样。最好忽略 IAT 标头字段并解析 IT。此外,在解析 IT 时,某些可执行文件将缺少 ILT,只有 IAT - 较旧的 bo​​rland (iirc) 链接器因不生成 ILT 而臭名昭著。

编辑 2:定义

  • IT:导入表(PeCoff 第 6.4.1 节)- 每个 DLL IMAGE_IMPORT_DESCRIPTOR 的表。
  • ILT:导入查找表(PeCoff 第 6.4.2 节)- 每次导入 IMAGE_THUNK_DATA 的表。
  • IAT:导入地址表(PeCoff 第 6.4.4 节)- 磁盘上:与 ILT 相同,运行时:填充导入的函数内存地址。

If you want to play with Portable Executables, there's no way around grabbing a copy of the specs.

It's been a while, but in case memory serves me correctly: IT and IAT are identical, except that IAT is filled by the PE-loader while resolving imports - but don't take my word for it, check the specs :)

EDIT:

Had a quick browse through the specs, and refreshed my memory a bit:
The Import Table is the master structure, with one entry per DLL you're importing from. Each entry contains, among other things, an Import Lookup Table (ILT) and Import Address Table (IAT) pointer (iirc these used to be called OriginalFirstThunk and FirstThunk). The ILT and IAT tables are identical on-disk, but during runtime the IAT will be filled with the memory addresses of imported functions.

The PE header IAT field probably can't be relied on 100% if you want to be able to deal with nonstandard EXEs, just like you can't depend on the start-of/size-of code and data pointers. It's best to ignore the IAT header field and parse the IT instead. Also, when parsing the IT, the ILT will be missing on some executables, having only the IAT - older borland (iirc) linkers were notorious for not generating the ILT.

EDIT 2: definitions

  • IT: Import Table (PeCoff section 6.4.1) - table of per-DLL IMAGE_IMPORT_DESCRIPTOR.
  • ILT: Import Lookup Table (PeCoff section 6.4.2) - table of per-import IMAGE_THUNK_DATA.
  • IAT: Import Address Table (PeCoff section 6.4.4) - on-disk: identical to ILT, runtime: filled with imported function memory addresses.

“导入表地址”和“导入表地址”有什么区别?和“导入地址表地址”在 PE 的日期目录中?

走过海棠暮 2024-10-02 09:39:41

在实体组的上下文中,“子”表示 MessageIndex 的是 Message 的键的后代。这并不意味着 MessageIndex 列表(或集合)是消息的属性。

有关如何在 Java 中执行此操作的示例,请参阅事务文档中标题为“使用实体组创建实体”的部分。
http://code.google.com/appengine/docs/java/datastore /交易.html

In the context of entity groups, 'child' means the MessageIndex's key is a descendant of the Message's key. It does not mean the MessageIndex list (or collection) is a property of the Message.

See the section titled "Creating Entities With Entity Groups" in documentation on transactions for an example of how to do this in Java.
http://code.google.com/appengine/docs/java/datastore/transactions.html

GAE:不在类中的子对象

走过海棠暮 2024-10-01 21:02:44

设置正确的包含路径:假设您的 Utils 目录位于 /exp/appstat/benbou/multiboost 中,那么 cmake (实际上是 gcc)必须知道这一点:

include_directories( /exp/appstat/benbou/multiboost )

或者将其作为传递的选项传递可能更方便命令行:

include_directories( ${MyProjectRoot} )

cmake -DMyProjectRoot=/exp/appstat/benbou/multiboost    

set the correct include path: suppose your Utils directory is in /exp/appstat/benbou/multiboost, then cmake (well actually, gcc) has to know this:

include_directories( /exp/appstat/benbou/multiboost )

or it might be more convenient to pass this as an option which is passed on the command line:

include_directories( ${MyProjectRoot} )

cmake -DMyProjectRoot=/exp/appstat/benbou/multiboost    

CMake 和绝对头路径

走过海棠暮 2024-10-01 08:30:34

将文件夹移至 Program Files 中。这解决了我的错误代码 13 的问题。

Move the folder in your Program Files. That fixed my problem with the error code 13.

Eclipse Helios 未启动

走过海棠暮 2024-10-01 08:15:09

使用 jQuery 的 ScrollTo 插件。 示例

Use jQuery's ScrollTo Plugin. Example.

JQuery - 当调用事件时,页面应该移动

走过海棠暮 2024-10-01 04:37:16

当我看到这样的条目时:

[DEBUG] Connecting to repository: 'Artifactory-internal-repository' with url: 'http://192.168.0.59:8081/artifactory/repo'.
Downloading: http://192.168.0.59:8081/artifactory/repo/pl/com/abg/iacsro/onthespotcheck/1.0-SNAPSHOT/onthespotcheck-1.0-SNAPSHOT.pom
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[DEBUG]   Artifact resolved
[WARNING] POM for 'pl.com.abg.iacsro:onthespotcheck-checks-api:pom:DEV2009_2:provided' is invalid.

我很想问关于 onthespotcheck-1.0-SNAPSHOT.pom 是否有什么特别要说的?

顺便说一句,你有很多:

for project: null:artifactId:version

我觉得很奇怪。为什么 groupId 为 null?关于你的 pom 有什么值得一提的吗?

When I see such an entry:

[DEBUG] Connecting to repository: 'Artifactory-internal-repository' with url: 'http://192.168.0.59:8081/artifactory/repo'.
Downloading: http://192.168.0.59:8081/artifactory/repo/pl/com/abg/iacsro/onthespotcheck/1.0-SNAPSHOT/onthespotcheck-1.0-SNAPSHOT.pom
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[DEBUG]   Artifact resolved
[WARNING] POM for 'pl.com.abg.iacsro:onthespotcheck-checks-api:pom:DEV2009_2:provided' is invalid.

I'm tempted to ask if there is anything particular to say about onthespotcheck-1.0-SNAPSHOT.pom?

As a side note, you have a bunch of:

for project: null:artifactId:version

that I find pretty weird. Why is the groupId null? Anything worth to mention about your pom?

Maven:父项目未解析,传递依赖项未用于编译

走过海棠暮 2024-09-26 22:48:35

问题:打印纯 HTML 模板时能否保证布局尺寸?

理论上是的,通过 CSS 和使用打印样式表。

实际上不会,例如因为浏览器倾向于添加(并为其保留空间)自己的页眉和页脚。

生成 PDF 将是标签打印的一种更可靠的方式。

如果您仍然想在 HTML 中执行此操作,这些将有所帮助:

一些帮助您开始 PDF 生成的好问题:

Question: Can layout dimensions be guaranteed when printing an HTML only template?

In theory yes, through CSS and by using a print stylesheet.

In practice no, for example because browsers tend to add (and reserve space for) their own headers and footers.

Generating a PDF would be a way, way more reliable way for label printing.

If you still want to do it in HTML, these will help:

Some good questions to get you started on PDF generation:

“艾利”在浏览器中输入模板

走过海棠暮 2024-09-26 17:14:36

我这样做的方式是 BO 期望一个 DataReader 或 DataContext 或从 DAL 返回的任何内容,而不是实际形成的对象。然后 BO 层的工作就是从返回的对象中获取并填充自身。 DAL 不会返回已完成的 BO。要记住的主要事情是,更改 BO 层中的某些内容不应导致 DAL 层出现问题,但更改 DAL 层中的某些内容可能会导致 BO 层出现问题。

执行的操作的简短示例

我通常在 BO 层中

FillData(){
   DataReader dr = DataLayer.GetData("SomePropertyForAStoreProcedure");
   If dr.Read(){
    Property1 = dr.GetValue("Property1");
    //So on and so forth
   }
}

在 DAL 中

DataReader GetData(String SPProperty){

}

The way the I do this is the BO expects a DataReader or a DataContext or whatever back from the DAL, not the actual formed object. It is then the job of the BO layer to take and fill itself from the object that came back. The DAL isn't returning back a completed BO. The main thing to remember is that changing something in the BO layer shouldn't cause issues for the DAL layer, but changing something in the DAL layer could cause issues for the BO layer.

A short example of what I typically do

In the BO layer

FillData(){
   DataReader dr = DataLayer.GetData("SomePropertyForAStoreProcedure");
   If dr.Read(){
    Property1 = dr.GetValue("Property1");
    //So on and so forth
   }
}

In the DAL

DataReader GetData(String SPProperty){

}

业务对象和数据层

更多

推荐作者

屌丝范

文章 0 评论 0

lcx_

文章 0 评论 0

予囚

文章 0 评论 0

朦胧时间

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文