the solve of volume problem

本文介绍如何使用HTML5的<input type=range>元素与<video>标签结合,实现音视频播放器的音量调节及进度条控制功能。通过JavaScript动态调整音量和进度,增强用户体验。

i finally solved this problem as follow :

this problem can be very well solved  by  using the <audio > label,

this is a test file.


 

<!DOCTYPE html>
<html>
<head>
<meta  charset="utf-8" />
<title> HTML5 input元素type=range </title>
</head>
<body>
<input id="range" type="range" min="1" max="100" value="5" onchange="change()" >
<span id="value">5</span>

<br>
<br>
<br>


 <video style="float:left;" id="video1" preload="metadata" src="test1.mp3" height="300" autoplay="autoplay" controls="controls">
                你的浏览器不支持html5视频
            </video>

<br>
<br>
<br><!-- 
            <button id="upVolume" onclick="getVolume()" >音量+</button>
            <button id="downVolume">音量-</button>
 -->




<script type='text/javascript'>

// var value = document.getElementById('range').value ;

// var myVid=document.getElementById("video1");
// function getVolume()
//   { 
  
//   myVid.volume=change().value;
//     alert(myVid.volume);
//   } 


    // var button=document.getElementById("upVolume");
    // // var button=document.getElementById("upVolume").contentWindow.document.getElementById("clickindoc");
    // button.onclick=function(){
        
    //     getvolume(); 

    //     // window.location.assign( "#gallery");

    //     // alert("you are being hacked!!!");   
    // }
    



function change() {
   var value = document.getElementById('range').value ;
   document.getElementById('value').innerHTML= value;
   var getvalue=value;

   
 // alert(getvalue);

    myVid=document.getElementById("video1");

    myVid.volume=getvalue/100;

 
}





// var $  = function(id){return document.getElementById(id);};
//             var _video = $("testVideo");

//加大声音,每次加大1/10
//                 upVolume : function(){
//                     _video.volume += 0.1;
//                 },
//                 //减小声音,每次减小1/10
//                 downVolume : function(){
//                     _video.volume -= 0.1;
//                 },

//  //绑定页面上各个按钮的事件
//             var btns = document.getElementsByTagName("button");
//                     for(var i = 0 ;i < btns.length ; i++){
//                         var el = btns[i];
//                         el.onclick = self[el.id];
//                     }




</script>
</body>
</html>
can play the music  and the volume can be change by that processbar. 



For macroscopically anisotropic media in which the variations in the phase stiffness tensor are small, formal solutions to the boundary-value problem have been developed in the form of perturbation series (Dederichs and Zeller, 1973; Gubernatis and Krumhansl, 1975 ; Willis, 1981). Due to the nature of the integral operator, one must contend with conditionally convergent integrals. One approach to this problem is to carry out a “renormalization” procedure which amounts to identifying physically what the conditionally convergent terms ought to contribute and replacing them by convergent terms that make this contribution (McCoy, 1979). For the special case of macroscopically isotropic media, the first few terms of this perturbation expansion have been explicitly given in terms of certain statistical correlation functions for both three-dimensional media (Beran and Molyneux, 1966 ; Milton and Phan-Thien, 1982) and two-dimensional media (Silnutzer, 1972 ; Milton, 1982). A drawback of all of these classical perturbation expansions is that they are only valid for media in which the moduli of the phases are nearly the same, albeit applicable for arbitrary volume fractions. In this paper we develop new, exact perturbation expansions for the effective stiffness tensor of macroscopically anisotropic composite media consisting of two isotropic phases by introducing an integral equation for the so-called “cavity” strain field. The expansions are not formal but rather the nth-order tensor coefficients are given explicitly in terms of integrals over products of certain tensor fields and a determinant involving n-point statistical correlation functions that render the integrals absolutely convergent in the infinite-volume limit. Thus, no renormalization analysis is required because the procedure used to solve the integral equation systematically leads to absolutely convergent integrals. Another useful feature of the expansions is that they converge rapidly for a class of dispersions for all volume fractions, even when the phase moduli differ significantly.
06-02
c++题目,代码禁止有注释 A Angry Birds 作者 刘春英 单位 杭州电子科技大学 Aris is playing the classic game, Angry Birds! Because Aris has been playing for too long, Yuuka confiscated Aris’s game console and demanded that Aris complete today’s math homework before getting it back. However, Sensei did not assign any math homework to Aris today, so Yuuka had to come up with a problem for Aris to solve. Consider the game field of Angry Birds as a three-dimensional Euclidean space, and the bird as a sphere with radius R 3 ​ . Establish a spatial Cartesian coordinate system O−xyz, such that the trajectory of the bird’s center lies in the horizontal plane z=0. It is known that the trajectory of the bird’s center is a closed polyline, consisting of n segments connected end to end. The connection points are n points: (x 1 ​ ,y 1 ​ ,0),(x 2 ​ ,y 2 ​ ,0),⋯,(x n ​ ,y n ​ ,0). The i-th segment has endpoints (x i ​ ,y i ​ ,0) and (x imodn+1 ​ ,y imodn+1 ​ ,0). However, due to sensor errors, the actual n points may deviate from (x i ​ ,y i ​ ,0) by a distance not exceeding R 2 ​ (the sensor deviation R 2 ​ is the same for all points). That is, the actual i-th point (x i ′ ​ ,y i ′ ​ ,0) can be anywhere within the circle (which is still contained in the plane z=0) centered at (x i ​ ,y i ​ ,0) with radius R 2 ​ . Let S be the set of all points that the entire bird may pass through, i.e., points in 3D space whose distance to the bird’s center trajectory is at most R 3 ​ . Yuuka requires Aris to compute the volume of the convex hull of S. Convex hull: The convex hull of a point set S is defined as the smallest set T such that for any two points in S, all points on the line segment between them are contained in T. Input Format The first line contains a positive integer T (1≤T≤10 3 ), indicating the number of test cases. For each test case, the first line contains three integers n,R 2 ​ ,R 3 ​ (1≤n≤10 5 ,0≤R 2 ​ ,R 3 ​ ≤10 6 ), representing the number of connection points, the sensor error radius, and the bird radius, respectively. The next n lines each contain two integers x i ​ ,y i ​ (∣x i ​ ∣,∣y i ​ ∣≤10 6 ), representing the i-th connection point of the trajectory. It is guaranteed that the sum of n over all test cases in a single test point does not exceed 10 5 . Output Format For each test case, output a single floating-point number representing answer. Your answer is considered correct if the relative or absolute error compared to the standard answer is at most 10 −9 . Let your answer be a and the standard answer be b. If max{b,1} ∣a−b∣ ​ ≤10 −9 , it is considered correct. Sample 1 5 1 1 0 0 3 1 2 3 2 2 -1 3 77.622211120429587 Notes The convex hull of all points that the bird’s center may pass through: sample.png 代码长度限制 32 KB Java (javac) 时间限制 2000 ms 内存限制 256 MB Python (python2) 时间限制 2000 ms 内存限制 256 MB Python (python3) 时间限制 2000 ms 内存限制 256 MB Python (pypy3) 时间限制 2000 ms 内存限制 256 MB Kotlin (kotlinc) 时间限制 2000 ms 内存限制 256 MB 其他编译器 时间限制 1000 ms 内存限制 256 MB 栈限制 131072 KB
最新发布
10-23
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值