我想在当前日期添加天数:我使用以下代码:
$i=30;
echo $date = strtotime(date("Y-m-d", strtotime($date)) . " +".$i."days");
但是没有得到正确的约会我得到了这个: 2592000
请建议.
我想在本地Windows系统上安装OSQA.我已经下载了bitnam-djangostack-1.1.1-2-windows-installer.exe,它内置了django,python,mysql和apache.
我在django网站上运行了一个django示例,它运行正常.
但我很困惑如何安装OSAQ.我已经从OSQA站点下载了源代码并阅读了安装说明(它需要django 1.1.1),但我无法使其工作.
我在其中一个页面上传了文件功能.我使用JavaScript检查文件的扩展名.现在我想限制用户上传大于1 MB的文件.有什么办法可以使用JavaScript检查文件上传大小.
我的代码目前看起来像这样:
<script language="JavaScript">
function validate() {
   var filename = document.getElementById("txtChooseFile").value;
   var ext = getExt(filename);
   if(ext == "txt" || ext == "csv")
      return true;
   alert("Please upload Text files only.");
   return false;
}
function getExt(filename) {
   var dot_pos = filename.lastIndexOf(".");
   if(dot_pos == -1)
      return "";
   return filename.substr(dot_pos+1).toLowerCase();
}
</script>
我有两个视频名称v11.webm和v12.webm.
我想要的是这两个视频应该无缝地运行.
我遵循媒体源api方法将数据附加到源缓冲区.
我指的是这个链接上给出的演示
我已修改该示例并删除了分块视频的部分,并尝试将数据附加到源缓冲区文件.
我的代码如下:
<script>
var video = document.querySelector('video');
window.MediaSource = window.MediaSource || window.WebKitMediaSource;
if (!!!window.MediaSource) {
  alert('MediaSource API is not available');
}
var mediaSource = new MediaSource();
video.src = window.URL.createObjectURL(mediaSource);
mediaSource.addEventListener('webkitsourceopen', function(e) {
    var sourceBuffer = mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');  
    for(i=1;i<=2;i++)
    {
        (function(i){
          GET('v1'+i+'.webm', function(uInt8Array) {
              var file = new Blob([uInt8Array], {type: 'video/webm'});
              var reader = new FileReader();
              reader.onload = function(e) {
                sourceBuffer.append(new Uint8Array(e.target.result));            
              };
              reader.readAsArrayBuffer(file);
          });
        })(i);
    }
}, false);
mediaSource.addEventListener('webkitsourceended', function(e) {
  logger.log('mediaSource readyState: ' …我有文件夹,没有.的HTML文件.我可以算不上吗?使用javascript的文件?请帮忙
谢谢
我是android应用程序开发的新手.我正在使用http://developer.android.com/resources/tutorials/views/hello-formstuff.html上给出的Form Stuff示例.在这里我使用了自定义按钮示例.
我的代码如下:
    package com.example.helloformstuff;
    import android.app.Activity;
    import android.content.DialogInterface.OnClickListener;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    import android.widget.Toast;
    public class HelloFormStuff extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final Button button = (Button) findViewById(R.id.button);
        button.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                // Perform action on clicks
                Toast.makeText(HelloFormStuff.this, "Beep Bop", Toast.LENGTH_SHORT).show();
            }
        });    
    }
   }
它显示以下错误:
The type new DialogInterface.OnClickListener(){} must implement the inherited 
     abstract method …我指的是 chrome://flags
我很想知道的是,是否可以通过自定义chrome扩展启用或禁用特定的chrome标志?
例如 - 我想Enable Media Source API on <video> elements.通过chrome扩展启用flag.
我在本网站上搜索了与此相关的各种问题,但我无法解决我得到的问题.
我想点击listview项目从数据库中获取id
这是我的类别类:
package com.example.reminders;
import java.util.List;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
public class Categories extends ListActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        DBAdapter db = new DBAdapter(Categories.this);
        db.open();
        List<String> cs = db.getAllCategoriesList();
        setListAdapter(new ArrayAdapter<String>(this, R.layout.activity_categories,cs));
        ListView listView = getListView();
        listView.setTextFilterEnabled(true);
        listView.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {
                // When clicked, show a toast with the …我想检查日期是否在开始日期和结束日期之间.
我添加了一个where子句
where datepaid between '2010-04-01' AND '2010-04-15'
但问题在于它排除了"2010-04-15".
它应该包括结束日期,我该怎么做?
请帮帮我
问候,
潘卡
我指的是这个链接上给出的媒体源api演示
它对于给定的测试webm文件工作正常,但是当我尝试将文件名更改为自定义webm文件时,代码停止工作.
它产生以下错误:Uncaught Error: INVALID_STATE_ERR: DOM Exception 11在以下代码中:  sourceBuffer.append(new Uint8Array(e.target.result));
为了检查自定义webm文件是否正常工作,我创建了一个测试页面,其中我定义了一个包含该自定义webm文件源的视频标签.当我运行代码时,它工作正常.
我无法理解这种奇怪行为的原因.