首页 \ 问答 \ PHP 5.3.6和PHP 5.3.8源代码兼容性(PHP 5.3.6 and PHP 5.3.8 source code compatibility)

PHP 5.3.6和PHP 5.3.8源代码兼容性(PHP 5.3.6 and PHP 5.3.8 source code compatibility)

我在我的计算机上安装了PHP 5.3.6,我想开始创建PHP扩展...所以我设置了VC ++ 2008(因为PHP 5.3.6是用vc ++ 2008编译的)。

我现在需要下载PHP源代码,而我发现的所有内容都是来自php.net的PHP 5.3.8源代码

我的问题是:这个版本的源代码是否与我在服务器上安装的版本兼容?

换句话说,对于我的PHP版本,我可以在这个源代码的帮助下开始创建PHP扩展吗?


I got PHP 5.3.6 Installed in my computer , and I want to begin creating PHP extensions... so I've setup VC++ 2008 (since PHP 5.3.6 is compiled with vc++ 2008).

I need now to download PHP source code, and All I find is PHP 5.3.8 source code from php.net

My question is: is this version of the source code compatible with the version I've installed in my server?

In other words, can I start creating PHP extensions with the help of this source code, for my version of PHP?


原文:https://stackoverflow.com/questions/8693816
更新时间:2023-12-13 14:12

最满意答案

确保您使用的是System.Linq因为Cast应该可以使用。
我使用以下代码完成了您想要的结果:

if ( listBox1.Items.Cast<string>().Contains( comboBox1.SelectedItem.ToString() ) )
{
    MessageBox.Show( "duplicate" );
}
else
{
    listBox1.Items.Add( comboBox1.SelectedItem );
}

自定义控件(OP的情况):
如果foreach解决方案适用于您的自定义控件并且.Text不是有效的扩展方法,则只需使用:

item.ToString().Contains(Combobox1.SelectedItem.ToString())

Make sure you are using System.Linq because Cast should work.
I accomplished your desired result by using this code:

if ( listBox1.Items.Cast<string>().Contains( comboBox1.SelectedItem.ToString() ) )
{
    MessageBox.Show( "duplicate" );
}
else
{
    listBox1.Items.Add( comboBox1.SelectedItem );
}

Custom controls (OP's situation):
If the foreach solution works for your custom control and .Text isn't a valid extension method just use:

item.ToString().Contains(Combobox1.SelectedItem.ToString())

相关问答

更多
  • 避免重复检查的唯一方法是将检查逻辑移动到知道所有组的组件(或每个组件负责比较一组组)。 The only way to avoid duplicate checks is to move the checking logic to a component that is aware of all the groups (or a few components each of which is responsible for comparing a pair of groups).
  • 确保您使用的是System.Linq因为Cast应该可以使用。 我使用以下代码完成了您想要的结果: if ( listBox1.Items.Cast().Contains( comboBox1.SelectedItem.ToString() ) ) { MessageBox.Show( "duplicate" ); } else { listBox1.Items.Add( comboBox1.SelectedItem ); } 自定义控件(OP的情况): 如果foreach ...
  • 在我的测试中,我发现首先检查违规是非常有效的,而不是让SQL Server尝试和失败,特别是当故障率预计会很高时(最好它们的性能大致相同,失败率低)。 详情在这里和这里 。 除了表现,另一个不依赖约束来提出错误的理由是,明天有人可以改变或放弃它。 In my testing I have found that it is much more efficient to check for the violation first instead of letting SQL Server try and fai ...
  • 在控制器操作方法中,您可能会返回模型错误并在视图中显示该错误。 ModelState.AddModelError("","Customer already exists"); return View(customer) 假设您的视图具有帮助方法,以向用户显示错误详细信息。 @Html.ValidationSummary() 如果您使用其他方法进行重复检查,则可以返回适当的值,表明存在重复记录/所有内容均按预期工作。 您可以将枚举/类作为返回类型,也可以将自定义异常返回给调用代码。 自定义类作为返回类型 ...
  • 我找到了一个完全符合我需求的插件。 Tagit 。 您可以删除重复检查, allowDuplicates设置为true。 I found a plug in that fits perfectly to my needs. Tagit. You can remove duplicate check with allowDuplicates set to true.
  • 基本上,您需要使用xsd:unique来强制元素或属性的唯一性。 以下是该链接的摘录: 指定属性或元素值(或属性或元素值的组合)在指定范围内必须是唯一的。 值必须是唯一的或为零。 如果您不知道,那么您需要创建一个XSD / DTD,使用该XSD / DTD可以强制执行此唯一性,然后使用任何可用的XML解析器针对该XSD / DTD验证XML。 下面是一个Java示例以及XSD。 您的陈述有问题: 使用XSD或其他方式请求xml会没问题 据我所知,如果你想检查你的XML文档的有效性,那么你必须有一个XSD或D ...
  • 控制器: if(data.number == 0){ //If email id is duplicate, then show the message in UI $scope.isDuplicate = true; } else{ //If email id is not duplicate, then hide the message in UI $scope.isDuplicate = false; } HTML:
    问题在于错误Filter chain halted as :login_check rendered or redirected看起来像认证错误。 根据您的操作代码, staus.status == 'true' staus == 'true'应该是staus.status == 'true' 。 The problem is in the error Filter chain halted as :login_check rendered or redirected looks like an authe ...
  • 这是可能的方法之一。 可能它不是最有效的,但它做得很好。 Array.prototype.pushUnique = function (item) { var newObj = JSON.stringify(item); if (~(this.map(function (obj) { return JSON.stringify(obj); }).indexOf(newObj))) { return false; } else { this.push(i ...
  • for(var i = 0; i < (myVar2.split("\r\n")).length; i++) { //here is wrong if(myVar2[i].value == myVar1) { flag = 1; } 你应该改为 var wordsarr = myVar2.split("\n"); for(var i = ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。