问题列表 - 第41827页

sox file.wav -r 10 file.dat

音频文件的样本包含什么?

当我运行命令"sox file.wav -r 10 file.dat"时,输出就像

; Sample Rate 10
; Channels 2
           0    0.00085449219   -0.0007019043
         0.1       0.01348877    -0.011260986
         0.2      0.015930176    -0.013214111
         0.3      0.014923096    -0.012390137
         ...      ...            ...
Run Code Online (Sandbox Code Playgroud)

我知道第一列是第二列和第三列代表2个通道的时间.

但我想知道通道值包含什么?

audio sox sample-rate

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

核心数据:自我引用表

我的核心数据模型中有一个实体,其中包含对自身的引用.即一个页面可以有一个子页面集合.编译时我收到警告:

"Page.pages - to-many关系没有反转:这是一个高级设置(对象不能在特定关系的多个目的地中)"

现在我已经读过,核心数据需要一个反向关系来维护完整性,并希望提供这一点.我不介意我的数据模型被改变它是一个早期的开发阶段.处理这种情况的适当方法是什么?

替代文字

iphone core-data self-reference

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

如何将popToRootViewControllerAnimated与我的标签集成?

我正在尝试使用popToRootViewControllerAnimated使我的一个标签按钮转到根目录.我的问题是:我在哪里放这个代码才能工作?我通过Interface Builder创建了我的标签...是否必须对其进行硬编码以使其正常工作?

这是我要使用的代码:

[self.navigationController popToRootViewControllerAnimated:YES];
Run Code Online (Sandbox Code Playgroud)

AppDelegate中的新代码:

- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
    if (viewController = HomeViewController) {
        [HomeViewController popToRootViewControllerAnimated:NO];
    }
}
Run Code Online (Sandbox Code Playgroud)

objective-c iphone-sdk-3.0 ios4

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

JQuery - 如何:复制<li>并将其放在<ul>的末尾

我有一个普通的ul li.我想将li附加到列表中,该列表基于列表中的第一个li.

HTML

<div id="gallery">
<ul>
<li>Point Nr 1<p>lol</p></li>
<li>Point Nr 2</li>
<li>Point Nr 3</li>
<li>Point Nr 4</li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)

伪javascript/jquery

$("#gallery ul li").first().duplicate(attachTo:"#gallery ul li")
Run Code Online (Sandbox Code Playgroud)

这就是它的样子:

<div id="gallery">
<ul>
<li>Point Nr 1<p>lol</p></li>
<li>Point Nr 2</li>
<li>Point Nr 3</li>
<li>Point Nr 4</li>
<li>Point Nr 1<p>lol</p></li>
</ul>
</div
Run Code Online (Sandbox Code Playgroud)

我该怎么做呢?:)

javascript jquery copy duplicates html-lists

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

Latex - 在图的标题中插入引用

在Latex中,我想在图形的图例中添加一个引用,如:

\begin{figure}
   ...
   \caption{This is the legend of this figure (reprinted from \cite{something}).}
   ...
\end{figure}
Run Code Online (Sandbox Code Playgroud)

但引文不允许放在标题中,仅在文本中.我的参考书目正在研究文本的任何其他地方.

有什么建议怎么做?

谢谢

latex caption figure

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

数字子串的总和

找到数字子串总和的最佳解决方案是什么?

例如,Sum(123)= 1 + 2 + 3 + 12 + 23 + 123 = 164.

我认为这是O(n ^ 2).因为

sum = 0
for i in number: // O(n)
    sum += startwith(i) // O(n)
return sum
Run Code Online (Sandbox Code Playgroud)

有什么最佳方案?什么是最好的方法?

这是我的解决方案,但O(n ^ 2):

public static int sumOfSubstring(int i) {
  int sum = 0;

  String s = Integer.toString(i);

  for (int j = 0, bound = s.length(); j < bound; j++) {
   for (int k = j; k < bound; k++) {
    String subString = s.subSequence(j, k …
Run Code Online (Sandbox Code Playgroud)

java algorithm complexity-theory big-o

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

将基于类的设计应用于JavaScript程序是不好的做法吗?

JavaScript是一种基于原型的语言,但它能够模仿基于类的面向对象语言的一些特性.例如,JavaScript没有公共和私有成员的概念,但通过闭包的魔力,它仍然可以提供相同的功能.类似地,方法重载,接口,命名空间和抽象类都可以以这种或那种方式添加.

最近,当我用JavaScript编程时,我觉得我正在尝试将其转换为基于类的语言,而不是按照它的使用方式使用它.似乎我试图强迫语言符合我以前的习惯.

以下是我最近编写的一些JavaScript代码.它的目的是抽象出绘制到HTML5 canvas元素所涉及的一些工作.

/*
Defines the Drawing namespace.
*/
var Drawing = {};

/*
Abstract base which represents an element to be drawn on the screen.
@param The graphical context in which this Node is drawn.
@param position The position of the center of this Node.
*/
Drawing.Node = function(context, position) {

    return {

        /*
        The method which performs the actual drawing code for this Node.  This method must be overridden in any subclasses of Node.
        */
        draw: function() …
Run Code Online (Sandbox Code Playgroud)

javascript

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

编译器错误:无法应用运算符"*"和"+"

我昨天问了这个问题,但我没有得到很好的答案

在下面的代码中为什么我不能在最后一行使用*和+?并且解决方法是什么?谢谢

    private void bigzarb(int u,int v)
    {
        double n;
        int x=0;
        int y;
        int w=0;
        int z;
        string[] i = textBox7.Text.Split(',');
        int[] nums = new int[i.Length];
        for (int counter = 0; counter < i.Length; counter++)
        {
            nums[counter] = Convert.ToInt32(i[counter]);
        }

        u = nums[0];
        double firstdigits =Math.Floor(Math.Log10(u) + 1);
         v = nums[1];
        double seconddigits = Math.Floor(Math.Log10(v) + 1);
        if (firstdigits >= seconddigits)
        {
            n = firstdigits;

        }
        else
        {
            n = seconddigits;

        }
        if (u == 0 || v == …
Run Code Online (Sandbox Code Playgroud)

c# algorithm winforms

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

如何在应用Column标题的背景后添加排序箭头

将背景颜色应用于列标题后,缺少排序箭头.如何添加回来?

silverlight wpf wpfdatagrid

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

如何在我的Android应用程序中获取SQLite数据库的URI?

我有一个带有名为"myTestDB"的数据库的Android应用程序,其中包含一个名为"list_items"的表.我想使用Cursor getContentResolver().query()方法来获取要添加到SimpleCursorAdapter的游标.query()方法的第一个参数是一个URI,我不确定URI应该是什么样子.

database android uri

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