首页 \ 问答 \ 将jQuery DataTable添加到Asp.NET MVC 4项目中(Add jQuery DataTable to Asp.NET MVC 4 project)

将jQuery DataTable添加到Asp.NET MVC 4项目中(Add jQuery DataTable to Asp.NET MVC 4 project)

我想在我的mvc4网站上添加jQuery DataTable( http://www.datatables.net/ )。 但它不起作用。 在添加脚本之前没有显示任何内容,表格看起来像。

FireBug显示错误:

TypeError:$(...)。dataTable不是函数

**Admin_panel.cshtml**

@model IEnumerable<Rejestracja_imprez.Models.User>

@{
    Layout = "~/Views/Shared/_PanelAdmin.cshtml";
    ViewBag.Title = "Admin";
}

    <script src="~/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="~/Scripts/jquery.dataTables.js" type="text/javascript"></script>
    <link href="~/Content/themes/base/jquery.dataTables.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript">
            $(document).ready(function () {
                $('#myDataTable').dataTable();
            });
        </script>


<table id="myDataTable">
....

在HTML页面,它的工作正常。

<html>
    <head>
        <style type="text/css" title="currentStyle">
            @import "../../media/css/jquery.dataTables.css";
        </style>
        <script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
        <script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>

        <script type="text/javascript" charset="utf-8">
            $(document).ready(function() {
                $('#example').dataTable();
            } );
        </script>
    </head>

    <body >

<table id="example" >
...

I want add jQuery DataTable (http://www.datatables.net/) to my mvc4 site. But it's doesn't work. Doesn't show anything, table look like before adding script.

FireBug show an error:

TypeError: $(...).dataTable is not a function

**Admin_panel.cshtml**

@model IEnumerable<Rejestracja_imprez.Models.User>

@{
    Layout = "~/Views/Shared/_PanelAdmin.cshtml";
    ViewBag.Title = "Admin";
}

    <script src="~/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="~/Scripts/jquery.dataTables.js" type="text/javascript"></script>
    <link href="~/Content/themes/base/jquery.dataTables.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript">
            $(document).ready(function () {
                $('#myDataTable').dataTable();
            });
        </script>


<table id="myDataTable">
....

In html page it's work good.

<html>
    <head>
        <style type="text/css" title="currentStyle">
            @import "../../media/css/jquery.dataTables.css";
        </style>
        <script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
        <script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>

        <script type="text/javascript" charset="utf-8">
            $(document).ready(function() {
                $('#example').dataTable();
            } );
        </script>
    </head>

    <body >

<table id="example" >
...

原文:
更新时间:2021-11-28 19:11

最满意答案

您的意思是将所有单个样本作为文本获取吗? SoX可以做到这一点。

$ sox file.wav file.dat

将获取音频文件file.wav ,并生成一个文本文件file.dat其中包含时基列(以秒为单位),以及每个音频通道的列,该列按最大可能值进行缩放。


Do you mean getting all the individual samples as text? SoX can do that.

$ sox file.wav file.dat

will take an audio file file.wav, and generate a text file file.dat with a column for the timebase in seconds, and a column for each audio channel scaled by the maximum possible value.

相关问答

更多
  • 如果您有一个要在MergeList.txt合并的文件列表,它看起来像这样: fileRandomID1.wav fileRandomID2.wav fileRandomID3.wav 你可以做: sox -m $(cat MergeList.txt) output.wav If you have a list of the files that you want merged in MergeList.txt and it looks like this: fileRandomID1.wav fileR ...
  • 您可以使用AVFoundation轻松地从现有样本中创建更长的声音,即AVMutableComposition类。 但根据您的应用程序的用途,背景音频播放应该有所不同。 播放音频只是为了让您的应用在后台运行会在评论时拒绝您的应用。 You can easily compose longer sounds from existing samples using AVFoundation, namely the AVMutableComposition class. But be vary that the b ...
  • 我甚至无法弄清楚如何在当前播放结束后自动播放新的音频文件 您必须实施Amazon Audio Player方法。 这些操作将被自动调用。 例如,如果播放结束,则会调用onPlaybackNearlyFinished()方法。 所以你必须在这些方法中实现你自己的逻辑,以排队你的下一首歌。 对于下一首歌曲,只需添加一个新的PlayDirectiv作为对PlayBehavior.ENQUEUE的onPlaybackNearlyFinished的响应。 ,或者当我说“Alexa,下一个”。 这是一个常规的AMAZO ...
  • 如果你允许gstreamer,这里有一个小脚本可以做到这一点。 它接受gstreamer可以处理的任何音频文件。 构造一个gstreamer管道,使用audioconvert将通道减少到1,并使用水平模块获得峰值 运行管道直到EOS被击中 从找到的最小值/最大值标准化峰值。 片段: import os, sys, pygst pygst.require('0.10') import gst, gobject gobject.threads_init() def get_peaks(filename): ...
  • 你需要知道音频文本以及你想要的mp3 /格式文件。 我会用一个MYSQL数据库和文本和音频文件作为数据库中的条目。 audioText = "sample audio" $("#translate").on("keyup",function () { if ($(this).val() == audioText) { $(this).css("border","2px solid green") } else { $(this).css("border","2px solid red" ...
  • 我不明白你到底想要做什么,但你可以看看这个好东西的例子。 http://jsfiddle.net/trixta/VvmmC/ i I don't understand what exactly are You trying to do, but You can take a look at this nice example of everything. http://jsfiddle.net/trixta/VvmmC/ i
  • 首先,当你谈到频谱时,你指的是音频信号的频率成分,这与振幅非常不同。 无论如何,如果你想绘制一段时间的振幅,那么x轴将是y轴的振幅。 这里的关键值是采样率 ,它定义了您每秒记录多少个采样; 您需要确定您想要在屏幕上绘制平均幅度值的多少次(相对于采样率),然后...只需绘制它。 我建议你从一些简单的事情开始,比如三星官方文档中的以下例子: AudioRecord recorder; // our recorder, must be initialized first short[] buffer; // bu ...
  • 您的意思是将所有单个样本作为文本获取吗? SoX可以做到这一点。 $ sox file.wav file.dat 将获取音频文件file.wav ,并生成一个文本文件file.dat其中包含时基列(以秒为单位),以及每个音频通道的列,该列按最大可能值进行缩放。 Do you mean getting all the individual samples as text? SoX can do that. $ sox file.wav file.dat will take an audio file fi ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)