小编Eth*_*etz的帖子

PHP加载错误:%1不是有效的Win32应用程序.

运行win64架构,尝试首次使用Apache运行php.在httpd.conf中加载php模块后,apache无法启动并显示错误日志

Cannot load c:/php/php5apache2_4.dll into server: %1 is not a valid Win32 application.  
Run Code Online (Sandbox Code Playgroud)

其他消息来源声称这是一个兼容性问题,并且有一个win32版本的php和win64 apache,反之亦然,我不认为是这种情况.我downoaded从Apache的Win64中VCl 4版http://www.apachelounge.com/download/和PHP的Win64的VC11版本http://windows.php.net/download#php-5.6 -是什么原因造成的错误当我尝试加载php模块?

php apache

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

如何从我的 Angular 项目中删除 Bootstrap?

我正在尝试在我的 Angular 项目中使用 Material Design Bootstrap (MDB)。但是,当我使用 angular bootstrap 组件时,似乎标准 bootstrap 会干扰样式。

在此处输入图片说明

从我的 angular 项目中完全删除 bootstrap 以便我的组件仅由 angular bootstrap 设置样式的最佳方法是什么?

编辑

angular.json

"styles": [
              "node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss",
              "node_modules/@fortawesome/fontawesome-free/scss/solid.scss",
              "node_modules/@fortawesome/fontawesome-free/scss/regular.scss",
              "node_modules/@fortawesome/fontawesome-free/scss/brands.scss",
              "node_modules/angular-bootstrap-md/scss/mdb-free.scss",
              "src/styles.scss"
            ],
Run Code Online (Sandbox Code Playgroud)

包.json ,

"dependencies": {
    "@angular/animations": "~7.2.0",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/router": "~7.2.0",
    "@fortawesome/fontawesome-free": "^5.8.2",
    "@types/chart.js": "^2.7.52",
    "angular-bootstrap-md": "^7.5.2",
    "atom": "^1.1.0",
    "chart.js": "^2.5.0",
    "core-js": "^2.5.4",
    "hammerjs": "^2.0.8",
    "jquery": "^3.4.1",
    "rxjs": "~6.3.3",
    "terminal": "^0.1.4",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.26"
  },
Run Code Online (Sandbox Code Playgroud)

angular-bootstrap angular mdbootstrap

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

RxJS 订阅未触发

目前正在学习 RxJS。我在服务中有一个整数selectedCourseIndex,我想要一个单独的组件来订阅它。

课程部分.service.ts

private selectedCourseIndex: number = -1; //this number can change from another method
private selectedCourseIndexUpdated = new Subject<number>();

getSelectedCourseUpdateListener(){
    return this.selectedCourseIndexUpdated.asObservable();
}
Run Code Online (Sandbox Code Playgroud)

课程部分.component.ts

  private selectedCourseIndex: number = -1; //Placeholder initial selectedCourseIndex until new one given on init from courses-section service
  private selectedCourseSub: Subscription;

  constructor( public coursesSectionService: CoursesSectionService ){}

  ngOnInit(){
   this.selectedCourseIndex = 
   this.coursesSectionService.getSelectedCourseIndex();
   this.selectedCourseSub = this.coursesSectionService
    .getSelectedCourseUpdateListener()
    .subscribe((selectedCourseIndex: number) => {
      this.selectedCourseIndex = selectedCourseIndex;
      console.log('this fires when subscription updates'); //this never fires once
    });
  }
Run Code Online (Sandbox Code Playgroud)

但是,订阅永远不会触发,无论是在最初订阅时还是在整数更改时。怎么了?

rxjs angular

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

是否可以使用ng-style的动画?(AngularJS)

我将div设置为动态高度,option.height使用AngularJS的ng-style属性调用.

<div class="rec" ng-style="{ 'height': option.height, 'background-color': option.color}"></div>
Run Code Online (Sandbox Code Playgroud)

加载页面时,高度可以设置为0px到300px之间的任何值,具体取决于之前的用户输入.虽然这有效,但我希望div高度从0px动画到任意值选项.高度使用CSS动画,而不是仅从正确的高度开始.这可能吗?我该怎么做呢?

html javascript css css-transitions angularjs

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

没有“ Access-Control-Allow-Origin”客户端修复

我试图通过suredbitsAPI获取免费的NFL数据。不幸的是,他们没有在标头中添加Access-Control-Allow-Origin,这会导致CORS问题。当我尝试运行这样的代码时...

$.getJSON("http://api.suredbits.com/nfl/v0/stats/jones/julio", function(playerData) {
      alert(playerdata); 
}
Run Code Online (Sandbox Code Playgroud)

我不断收到这个错误 No 'Access-Control-Allow-Origin' header is present on the requested resource.

因此,基本上,他们有什么办法可以通过客户端解决错误?

javascript api cors

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

动态更改 RxJS 间隔

我有一个obs具有间隔的可观察量125*variable,每 0.125 秒完成一个动作。的值variable将在我的程序中动态变化。

 obs = interval(125*variable).pipe(
    takeWhile(() => this.t < moment('2019-04-16T18:00:00')),
    tap(() => {
      if (!this.isPaused) {
        this.t.add(1, 'minutes'); this.time = this.t.format('LLL');
      }
    }),
    map(() => moment(this.time))
  );
Run Code Online (Sandbox Code Playgroud)

如何更改可观察值的间隔以使用正确/更新的variable值?

rxjs angular

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

ChartJS BoxWidth不起作用

首先,我的JSFidle:https ://jsfiddle.net/ethernetz/u8yc4tvb/

在图表的顶部,有一个粉红色的框。我希望那个盒子消失。其他人通过添加

legend: {
    labels: {
        boxWidth: 0,
    }
},
Run Code Online (Sandbox Code Playgroud)

他们的代码,使盒子消失了。如您所见,这根本没有影响我的盒子。我究竟做错了什么?

javascript chart.js

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