小编Jas*_*els的帖子

PHP Session 上传进度和 fcgid

我正在使用 Apache2.2/mod_fcgid/php5.4.3,但会话中没有显示上传进度。我读到如果通过 fastcgi 加载 php,则 php 会话上传进度功能将不起作用。真的吗?如果是这样,使用fastcgi时获取上传进度的选项是什么?

php apache file-upload

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

Jasny Bootstrap - 隐藏提交按钮,直到选中文件

我正在使用带有Jasny前叉的 Bootstrap .我正在处理用户可以上传图像的表单.我想隐藏表单的提交按钮,直到用户实际选择了图像.理想情况下,当用户从表单中删除文件时,提交按钮也应该消失.这是我第一次真正使用这个fork.我该怎么办?

<div class="fileupload fileupload-new" data-provides="fileupload">
  <div class="fileupload-new thumbnail" style="width: 114px; height: 64px;"><img src="http://www.placehold.it/114x64/EFEFEF/AAAAAA" /></div>
  <div class="fileupload-preview fileupload-exists thumbnail" style="width: 114px; height: 64px;"></div>
  <span class="btn btn-file"><span class="fileupload-new">Select image</span><span class="fileupload-exists">Change</span><input type="file" /></span>
  <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
  <button type="submit" class="btn btn-primary">Upload</button>
</div>
Run Code Online (Sandbox Code Playgroud)

javascript jquery twitter-bootstrap jasny-bootstrap

4
推荐指数
2
解决办法
6967
查看次数

Unable to Install or Update Packagist package "twbs/bootstrap" with composer

I work on a French version of WindowsNT (I stated that you are not surprised by the names in French like "Mes Documents").

I want to add the "twbs/bootstrap" package in my symfony2 project. Like I've done a hundred times before, I've add the line :

"twbs/bootstrap": "dev-master",
Run Code Online (Sandbox Code Playgroud)

In the "require" section of my "composer.json" file located in the root of my project.

This is a copy of my "composer.json" file :

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": …
Run Code Online (Sandbox Code Playgroud)

symfony twitter-bootstrap composer-php packagist jasny-bootstrap

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

使用jasny-bootstrap扩展名angularjs上传图像

有人尝试使用jasny-bootstrap扩展名在angularjs上传图像吗?

我使用http://jasny.github.io/bootstrap/javascript/#fileinput

这就是代码

<div class="fileinput fileinput-new" data-provides="fileinput">
            <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"></div>
            <div>
              <span class="btn btn-default btn-file">
                <span class="fileinput-new">Select image</span>
                <span class="fileinput-exists">Change</span>
                <span class="fileinput-upload" ng-click="">Upload</span>
                <input type="file" name="...">
              </span>
              <a href="#" class="btn btn-default fileinput-exists" data-dismiss="fileinput">Remove</a>
            </div>
          </div>
Run Code Online (Sandbox Code Playgroud)

单击上载时,我想上传服务器上选择的文件.

一些忠告?

image-uploading twitter-bootstrap angularjs jasny-bootstrap

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

如何将 EPSG 坐标转换为纬度/经度?

我有以下 OpenGis 数据,我想将其转换为纬度/经度坐标(如 Google 地图所使用)。

\n\n
<address xmlns:gml="http://www.opengis.net/gml">\n  <gml:Point srsName="urn:ogc:def:crs:EPSG::28992">\n    <gml:pos>142629.0 523546.0</gml:pos>\n  </gml:Point>\n</address>\n
Run Code Online (Sandbox Code Playgroud)\n\n

EPSG注册表中,我找到了EPSG的起始位置:28992。

\n\n
Latitude of natural origin      52\xc2\xb009\'22.178"N\nLongitude of natural origin     5\xc2\xb023\'15.5"E\nScale factor at natural origin  0.9999079 unity\nFalse easting                   155000 metre\nFalse northing                  463000 metre\n
Run Code Online (Sandbox Code Playgroud)\n\n

我尝试过使用proj4js,但我不知道如何将其放入投影中以及如何获得所需的输出。

\n\n

我也尝试过自己计算一下。但我不知道我在这里做什么,也没有什么真正有意义的:(。

\n

geolocation node.js opengis epsg

3
推荐指数
1
解决办法
5587
查看次数

如何使 PHPUnit 模拟在调用未配置的方法时失败?

当在模拟对象上调用任何未配置的方法时,是否有可能让 PHPUnit 失败?

例子;

$foo = $this->createMock(Foo::class);
$foo->expects($this->any())->method('hello')->with('world');

$foo->hello('world');
$foo->bye();
Run Code Online (Sandbox Code Playgroud)

这个测试会成功。我希望它失败

Foo::bye() was not expected to be called. 
Run Code Online (Sandbox Code Playgroud)

PS 以下可以工作,但这意味着我必须在回调中列出所有配置的方法。这不是一个合适的解决方案。

$foo->expects($this->never())
    ->method($this->callback(fn($method) => $method !== 'hello'));
Run Code Online (Sandbox Code Playgroud)

php phpunit mocking

3
推荐指数
1
解决办法
124
查看次数

Jasny Bootstrap文件上传控件

我在我的asp.net项目中使用Jasny Bootstrap文件上传控件.

它看起来真的很好,但我无法将附件发送到服务器(.ASHX webservice)

我的布局代码看起来像这样

<div class="fileupload fileupload-new" data-provides="fileupload">
<div class="input-append">
<div class="uneditable-input span3"><i class="icon-file fileupload-exists"></i> <span class="fileupload-preview"></span></div><span class="btn btn-file"><span class="fileupload-new">Select file</span><span class="fileupload-exists">Change</span><input type="file" /></span><a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)

c# jquery twitter-bootstrap jasny-bootstrap

2
推荐指数
1
解决办法
5244
查看次数

为什么不调用https.request回调?

我有一些node.js代码,我正在尝试从raw.github.com获取package.info.我正在做一个HTTPS请求,但由于某种原因,它似乎永远不会调用回调,因为'here'永远不会输出.

有谁看到出了什么问题?

console.log(options)

req = https.request(options, function(res) {
  console.log('here')
  res.setEncoding('utf8')
  // ... more code here
 })

 console.log(req)

 // .. return -> listening and waiting
Run Code Online (Sandbox Code Playgroud)

产量

{ host: 'raw.github.com',
  port: 443,
  path: '/jasny/bootstrap/2.2.2-j3-wip/package.json',
  method: 'GET' }
{ domain: null,
  _events:
   { response: { [Function: g] listener: [Function] },
     socket: { [Function: g] listener: [Function] } },
  _maxListeners: 10,
  output: [],
  outputEncodings: [],
  writable: true,
  _last: false,
  chunkedEncoding: false,
  shouldKeepAlive: true,
  useChunkedEncodingByDefault: false,
  sendDate: false,
  _hasBody: true,
  _trailer: '',
  finished: false,
  agent: …
Run Code Online (Sandbox Code Playgroud)

https node.js twitter-bootstrap jasny-bootstrap

2
推荐指数
1
解决办法
1297
查看次数

为什么我的JavaScript变量不起作用?

这有效:

$('.sameDiv').css('width', '25%');
Run Code Online (Sandbox Code Playgroud)

但这不是:

var squaresize = 25;
$('.sameDiv').css('width', 'squaresize%');
Run Code Online (Sandbox Code Playgroud)

此外,我已经尝试使用百分号作为变量的一部分,这没有帮助.

javascript variables jquery

2
推荐指数
1
解决办法
98
查看次数

如何强制iframe调整大小以适应嵌入的文档?

我有一个iframe,在可见元素的末尾有相当多的空白区域.事实上,我知道iframe正在加载我所有元素的大小,包括隐藏元素.这些元素被隐藏起来,直到一些淘汰问题得到解答,此时iframe应相应地调整大小.

我正在与之斗争的另一场战斗是,我还需要处理两个滚动条,一个用于iframe,当然还有网页滚动条.这非常俗气,不太友好.

这是我继承的问题,所以我希望有一个涉及iframe的解决方案.我也愿意探索其他解决方案,因为这可能不是最合适的.

html javascript css iframe jquery

2
推荐指数
1
解决办法
639
查看次数

CSS颜色名称来自哪里?

我正在寻找我正在研究的主题的颜色选项,并且有一些奇怪的名称用于常规颜色.一些颜色是FireBrick为红色,Gainsboro为浅灰色,NavajoWhite为一种微妙的黄色,没有任何意义,因为它根本不是白色.有谁知道为什么这些名字存在?

css colors css3

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