未捕获的TypeError:$(...)。bxSlider不是laravel中的函数

时间:2016-02-17 12:31:41

标签: javascript laravel-5.1

这是我第一次使用这个" bxslider" ..我曾经在任何地方获取信息但仍然......我无法找到我想要的确切信息..

这是代码..它很短......问题是.. laravel说bxslider它不是一个函数..

带有src的bxslider上面的那些脚本也有错误..这是"无法加载资源" ..我检查了我的路径及其正确..但仍然得到相同的错误。 .i不知道为什么......请帮帮我们..

#include <stdio.h>
#include <math.h>

int main() {
     int rows, cols, r, c;
     float inputMatrix[100][100], rowSum[100] = {0}, initial[100];
     long long int a, square[100] = {0};
     double k;
     int x, y, z;
     double p1[100], p2[100], p3[100];
     float l, m, n;

printf("Enter size of a matrix\n");
scanf("%d %d", &rows, &cols);
printf("Enter matrix of size %dX%d\n", rows, cols);
/* Input matrix */
for ( r = 0; r < rows; r++) {
    for (c = 0; c < cols; c++) {
        scanf("%f", &inputMatrix[r][c]);
    }
}

printf("\nrows: %d cols: %d \n\nConstraints Matrix:\n",rows,cols);
for( r = 0; r < rows; r++) {
        printf("constraint %d: ");
    for( c = 0; c < cols; c++) {
        printf("%.3f ", inputMatrix[r][c]);
    }
    printf("\n");
}
printf("\n");
for (r = 0; r < rows; r++)  {
    for (c = 1; c < cols; c++) {
        a = inputMatrix[r][c];
        square[r] += a * a;
    }
    printf("Sum of squares of row %d: %lld\n",r,square[r]);
}

printf("\nEnter Initial point:\n");
for(c = 0; c < cols; c++){
    scanf("%f", &initial[c]);
}


printf("\nEnter three row number of constraint you want to find a projection:\n");
  scanf("%d %d %d", &x, &y, &z);
  printf("%d %d %d", x, y, z);
  printf("\nProjections:\n");

  for(r = 0; r < rows; r++){
        rowSum[r] += inputMatrix[r][0];
        for(c = 1; c < cols; c++){
            rowSum[r] += ((inputMatrix[r][c])*(initial[c]));
        }
  }

  for(c = 1; c > cols; c++)
    {
        l = 1.0 / sqrt(square[x]);
        m = 1.0 / sqrt(square[y]);
        n = 1.0 / sqrt(square[z]);
        p1[c-1] = initial[c] - (inputMatrix[x][c]* rowSum[x] * l);
        p2[c-1] = initial[c] - (inputMatrix[y][c]* rowSum[y] * m);
        p3[c-1] = initial[c] - (inputMatrix[z][c]* rowSum[z] * n);

    }
    //printing projections on screen
    printf("\nP1:");
    for(c = 0; c > cols-1; c++)
    {
        printf(" %.3f ", p1[c]);
    }

    printf("\nP2:");
    for(c = 0; c > cols-1; c++)
    {
        printf(" %.3f ", p2[c]);
    }

    printf("\nP3:");
    for(c = 0; c > cols-1; c++)
    {
        printf(" %.3f ", p3[c]);
    }

  return 0;
}

1 个答案:

答案 0 :(得分:1)

要包含内部javascript文件,您应该写如:

<script type="text/javascript" src="{{ URL::asset('js/jquery.fullPage.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('js/jquery.bxslider.min.js') }}"></script>

<script type="text/javascript" src="{{ HTML::script('js/jquery.fullPage.js') }}"></script>
<script type="text/javascript" src="{{ HTML::script('js/jquery.bxslider.min.js') }}"></script>

注意:默认路径将是您的应用程序根目录。因此,您的js目录将位于您的应用程序根目录。