问题列表 - 第32035页

在浏览器中停止流媒体播放mp3文件

我在apache服务器上有一个mp3.我希望在用户访问链接时将其下载为文件.而不是quicktime,或谷歌chromes媒体播放器将尝试流式传输.

有标题的解决方案吗?或者是唯一的选择,所以'右键单击另存为'?

编辑这是我的标题.Safari已经停止了流媒体,但是chrome已经停止了.Chrome似乎忽略了这一点:

我可以看到标题已正确更改:

Date    Wed, 04 Aug 2010 00:14:35 GMT
Server  Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.11
Last-Modified   Tue, 03 Aug 2010 04:37:01 GMT
Etag    "2bbd692-79597d-48ce3de3f5540"
Accept-Ranges   bytes
Content-Length  7952765
Content-Disposition attachment
Keep-Alive  timeout=5, max=100
Connection  Keep-Alive
Content-Type    audio/mpeg
Run Code Online (Sandbox Code Playgroud)

标题中是否还有其他内容会导致此问题?

编辑我做了一些调查我发现:http : //www.google.com/support/forum/p/Chrome/thread?tid= 76de4f53f43f03d3 & hl= en看起来Chrome中可能存在一个错误,导致无法下载.

browser apache mp3 download

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

具有cmath函数的stl方法

我试图编写一个STL方法来获取向量的日志:

for_each(vec.begin(),vec.end(),log);
Run Code Online (Sandbox Code Playgroud)

但我明白了

no matching function for call to ‘for_each(__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, <unresolved overloaded function type>)’
Run Code Online (Sandbox Code Playgroud)

我收集的是由于日志功能的多个版本.显然我可以在日志函数周围编写一个简单的包装器并用它调用它.有没有更简单的方法来指定我想要内联的日志功能?

c++ stl

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

查找位于指定距离之间的用户(使用用户的邮政编码)

有没有办法使用邮政编码找到径向距离?

我的任务是搜索居住在指定距离内的所有用户.我知道用户的zipcodes.

例如,距离当前位置25英里的用户.

我有其他搜索类别,我正在使用mysql查询.我无法解决距离问题.

我的后端是在Flex中的php和前端.

对我来说最好的选择就是www.zip-codes.com/zip-code-radius-finder.asp.即,如果我能够在指定的径向距离内获得所有可用的邮政编码.所以我可以将此邮政编码与我数据库中的用户邮政编码进行比较.并选择匹配的.

这个你能帮我吗.Zeeshan

php mysql apache-flex actionscript

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

jQuery显示/隐藏问题

我只是想尝试一个非常简单的jQuery动作.

我有两个组件:#safety并且#safety-tab a,#safety需要在加载时隐藏.当该链接#safety-tab被点击,它会hide本身slideUp#safety.

这种作品,但#safety只是点击闪烁的框,不会显示:

 $(document).ready(function() {
   $("#safety-tab a").click(function() {
     $(this).hide();
     $("#safety").removeClass("hide");  
   });
   });
Run Code Online (Sandbox Code Playgroud)

虽然标记是这样的:

     <div id="safety" class="hide group">
      ...
     </div><!--end #safety-->
    <div id="safety-tab">
      <a href="">...</a>
    </div><!--end #safety-tab-->
Run Code Online (Sandbox Code Playgroud)

知道我做错了什么吗?

javascript jquery show-hide

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

Rails:提交后保留params

假设您有一个网络应用程序,人们可以在其中提交链接,自己网站的链接以及他们不拥有的网站链接.提交表单在两种情况下几乎相同,除非他们提交链接的域名.

如果用户从他们自己注册的网站列表中提交,他们将获得他们网站的下拉列表.

If the user is submitting a link the user types the domain into a field whose value I get in the "link" model through an attr_accessor. The "link" model then executes a find_or_create method on that domain.

Right now my solution is unsatisfactory: When the user clicks "Submit Link" I put ?other=prompt into the url and then have this kind of conditional:

<% if params[:other] == "prompt" %>
    <div class="prompt_form">

<h2>This link is for:</h2>
<span class="blue_button"><%= link_to "My …
Run Code Online (Sandbox Code Playgroud)

forms ruby-on-rails

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

SQL Server,删除一个或多个记录后不将记录插入正确的位置

我知道,这是一个非常基本的问题,但我在重新学习sql存储过程的过程中,这就是背后的问题:

I was practicing with some simple delete/insert routines, when encountered with this: if I ONLY insert records:

    1. dog

    2. cat

    3. t-rex

    4. llama

all is ok, then I call a delete procedure, passing the colum_ID to identify the record and delete it.

This is done correctly and all is OK

Then I call a insert procedure once again and the insert happens like this:

    1. dog

    2. cat

    5. snake**now this is wrong, right?**

    4. llama

And …

database sql-server stored-procedures sql-server-2008

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

Conversion from unsigned int to float

warning C4244: '=' : conversion from 'unsigned int' to 'float', possible loss of data  
Run Code Online (Sandbox Code Playgroud)

Shouldn't a float be able to handle any value from an int?

unsigned int: 0 to 4,294,967,295  
float 3.4E +/- 38 (7 digits) 
Run Code Online (Sandbox Code Playgroud)

Wiki:

The advantage of floating-point representation over fixed-point (and
Run Code Online (Sandbox Code Playgroud)

integer) representation is that it can support a much wider range of values.

Any insight would be helpful, thanks.

http://msdn.microsoft.com/en-us/library/s3f49ktz%28VS.80%29.aspx

c++ windows variables types

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

Rewrite author of Git commits

I have a couple of commits where my email address is wrong in the history.

How can I rewrite this history to reflect the correct email address?

If I choose to rewrite history, what is it that another user will have to do to fix their checkout?

git

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

Can I use the display:inline with text-align: right?

Example:

<td>
  <img src="..." />
  <img src="..." />
  <div style="text-align:right display:inline;">
    hello world!
  </div>
</td>
Run Code Online (Sandbox Code Playgroud)

css xhtml

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

locationServicesEnabled测试在viewDidLoad中被禁用时传递

我在设置面板中为我的应用程序禁用了位置服务.我在视图控制器中的viewDidLoad中运行测试,看看它们是否已启用:

if([CLLocationManager locationServicesEnabled]) {
   //Do something now
}
Run Code Online (Sandbox Code Playgroud)

此测试总是因某种原因而通过.如果我尝试访问位置服务,我会得到位置管理器的kCLErrorDenied错误.是什么赋予了?

我使用了错误的测试吗?

iphone cllocationmanager

8
推荐指数
2
解决办法
9395
查看次数