问题列表 - 第48391页

C:长长总是64位?

如果我在我的代码中使用long longs,那么无论运行什么代码的机器,我是否绝对100%保证它们将具有64位?

c

7
推荐指数
1
解决办法
9396
查看次数

a:访问不是在Mozilla上运行,但在IE上工作正常

a:访问过的函数在我的IE上工作正常但在mozilla上没有.它对Mozilla没有影响.Css课是

            ul#menu1 li a:link, a:visited { 
    display: block; height: 18px; padding: 5px 0 6px 15px;
    text-decoration: none; clear: both; color: #666; 
             }
Run Code Online (Sandbox Code Playgroud)

css

4
推荐指数
1
解决办法
4945
查看次数

如何停止更改焦点时自动显示软键盘(OnStart事件)

我正在开发使用Android 2.2的平板电脑.

我有一个表单,我用于新的和可编辑的实例.可编辑时,我想阻止用户编辑某些字段.我在我的onStart-event中设置了这个,设置了txt.setFocusableInTouchMode(false).这会强制焦点转到下一个可聚焦EditText的形式(这很棒),但在运行时,软键盘会自动显示EditText焦点.谁知道如何制止这个?

这是代码(在onStart事件中调用):

private void PopulateFields(){
    TextView txtTitle = (TextView) this.findViewById(R.id.txtEquipmentEditTitle);
    AutoCompleteTextView txtMake = (AutoCompleteTextView) this.findViewById(R.id.autEquipmentEditMake);
    AutoCompleteTextView txtModel = (AutoCompleteTextView) this.findViewById(R.id.autEquipmentEditModel);
    EditText txtDesc = (EditText) this.findViewById(R.id.txtEquipmentEditDesc);
    TextView txtDeptKey = (TextView) this.findViewById(R.id.txtEquipmentEditDeptKey);
    EditText txtSerial = (EditText) this.findViewById(R.id.txtEquipmentEditSerialNo);
    EditText txtBarCode = (EditText) this.findViewById(R.id.txtEquipmentEditBarCode);

    txtTitle.setText("Edit Equipment");
    txtMake.setText(make);
    txtModel.setText(model);
    txtDesc.setText(desc);
    txtDeptKey.setText(Integer.toString(deptKey));
    txtSerial.setText(serial);
    txtBarCode.setText(barCode);
    txtMake.setEnabled(false);
    txtModel.setEnabled(false);
    txtDesc.setEnabled(false);
    txtMake.setClickable(false);
    txtMake.setFocusableInTouchMode(false);
    txtModel.setFocusableInTouchMode(false);
    txtDesc.setFocusableInTouchMode(false);
    txtMake.setFocusable(false);
    txtModel.setFocusable(false);
    txtDesc.setFocusable(false);
}
Run Code Online (Sandbox Code Playgroud)

android android-softkeyboard android-edittext

27
推荐指数
3
解决办法
3万
查看次数

js脚本文件中的WordPress路径URL

我添加了自定义脚本:

wp_enqueue_script('functions', get_bloginfo('template_url') . '/js/functions.js', 'search', null, false);
Run Code Online (Sandbox Code Playgroud)

它很棒,除了functions.js我有:

Reset.style.background = "url('../images/searchfield_clear.png') no-repeat top left";
Run Code Online (Sandbox Code Playgroud)

这曾经以前工作过,直到我改为非常永久链接和.htaccess

文件夹层次结构如下:

themename/js themename/images (图像和js文件夹位于theameame文件夹中)

我试过../images - ./image - /images

通常它应该返回到js文件所在的任何位置的1级....

我不想使用完整路径.

WordPress是否有另一种方法可以在javascript文件中识别出正确的路径?

目前我很困惑我做错了什么.

javascript wordpress wordpress-theming

45
推荐指数
4
解决办法
10万
查看次数

使用jQuery选择/提交仅更改的表单字段

我正在寻找一种方法只将更改的表单字段提交给服务器.所以,假设我有一个表格

<form>
    <input type="text" name="a"/>
    <select name="b">...</select>
    <input type="checkbox" name="c"/>
</form>
Run Code Online (Sandbox Code Playgroud)

已经填充了某些数据.用户编辑表单并单击"提交".如果用户只更改了输入b,那么我只想提交输入b.如果只更改了a和c,我只想提交a和c.等等.

我可以自己写一些东西来完成这个,但我想知道可能已经有一些我可以使用的东西了吗?理想情况下,我希望代码简短.像这样的东西是完美的:

$('form').serialize('select-only-changed');
Run Code Online (Sandbox Code Playgroud)

另外,我遇​​到了这个http://code.google.com/p/jquery-form-observe/,但我发现它存在问题.这个插件是否能够稳定运行?

javascript jquery asp.net-mvc-3

14
推荐指数
3
解决办法
2万
查看次数

php substr_replace空格用连字符?

我有这个

echo "<div class='weather " . $cell->textContent ."'>";
Run Code Online (Sandbox Code Playgroud)

当textContent只是像"sunny"这样的单词时,这个工作正常.然而,如果当前天气例如"部分多云",我当然会应用两个类(.partially和.cloudy而不是.partially-cloudy.

如何在textContent中包含两个(或更多)单词时确保用连字符替换所有空格?

这不起作用:

echo "<div class='weather " . substr_replace(" ", "-", $cell->textContent) ."'>";
Run Code Online (Sandbox Code Playgroud)

谢谢.

php replace substr

0
推荐指数
1
解决办法
2087
查看次数

php到C#转换器

我需要将这个PHP代码转换为C#.是否有工具或网站可以实现这一目标?

public function call($method, array $params) {
    // Add the format parameter, only 'json' is supported at the moment
    if (!array_key_exists('format', $params)) {
        $params['format'] = 'json';
    }

    $url = "{$this->_url}/{$method}";
    $ch = $this->_getCurlHandle($url);

    if (!$ch) {
        throw new Fuze_Client_Exception("Unable to create a cURL handle");
    }

    // Set the request parameters
    $queryString = http_build_query($params);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $queryString);

    // Fire!
    $result = $this->_executeCurl($ch);

    // All API response payloads should be valid json with 'code' and
    // 'message' members
    $json = json_decode($result);
    if …
Run Code Online (Sandbox Code Playgroud)

php c#

13
推荐指数
3
解决办法
6万
查看次数

无法编译已知在android上很好的着色器

我从android SDK样本中获取了以下着色器:

   final String vertexShader = 
            "uniform mat4 uMVPMatrix;\n" +
            "attribute vec4 aPosition;\n" +
            "attribute vec2 aTextureCoord;\n" +
            "varying vec2 vTextureCoord;\n" +
            "void main() {\n" +
            "  gl_Position = uMVPMatrix * aPosition;\n" +
            "  vTextureCoord = aTextureCoord;\n" +
            "}\n";
Run Code Online (Sandbox Code Playgroud)

着色器来自他们的opengl es 2.0示例,并且在我编写示例时工作正常.

但是,当我尝试在程序中编译着色器时,我得到:

03-07 17:36:21.109: ERROR/GLES20TEST(5992): Could not compile shader 35633:
Run Code Online (Sandbox Code Playgroud)

还有一个事实,该方法:

GLES20.glGetShaderInfoLog(shader)
Run Code Online (Sandbox Code Playgroud)

没有返回任何信息(就我从谷歌研究中所理解的那样,我相信这是一个已知的错误)

有谁知道我做错了什么?

谢谢你,杰森

android opengl-es-2.0

5
推荐指数
1
解决办法
2985
查看次数

接口中的C#静态功能

有没有办法在C#中模拟接口中的静态函数?

我想将它用于工厂,其中每个对象都继承自ICreateAble静态函数'Create',然后在工厂类中可以调用Factory.Create(Type t, string fromFile)哪个调用t.Create()

c# directx

7
推荐指数
2
解决办法
3631
查看次数

WCF服务主机找不到任何服务元数据

我刚学习wcf,目前已经走到了这一步.

CS档案:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace wcfLib
{            
    [ServiceContract]
    public interface IfaceService
    {
        [OperationContract]
        int wordLen(string word);
    }

    public class StockService : IfaceService
    {
        public int wordLen(string word)
        {
            return word.Length;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

然而,当我试图运行它时,它会弹出一个错误:

WCF服务主机找不到任何服务元数据...

知道它可能是什么?

配置文件:

<system.serviceModel>
   <services>
      <service behaviorConfiguration="wcfLib.Service1Behavior" name="wcfLib.Service1">
        <endpoint address="" binding="wsHttpBinding" contract="wcfLib.ser">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8732/Design_Time_Addresses/wcfLib/Service1/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="wcfLib.Service1Behavior"> …
Run Code Online (Sandbox Code Playgroud)

c# wcf

18
推荐指数
2
解决办法
5万
查看次数