小编Pet*_*ude的帖子

使用仅通过HTTPS网站的HTTP的开放天气地图,而不是混合内容警告

我在SO上查看了此链接:处理HTTPS页面中的HTTP内容

我从这里开始试用这个开放式协议:http://benpowell.org/https-and-http-the-protocol-less-or-protocol-relative-urls/

但我只有一个调用openoutmap的HTTP网址,它不会通过HTTPS提供内容,除非你支付500/mo.不能这样做.

因此,我需要找到一种方法来为OpenWeatherMap引入HTTP内容,而不是在"任何"浏览器上生成"混合内容"错误消息.

这是OWM的API调用:http://api.openweathermap.org/data/2.5/weather la = 32.22 &lon = 100.50&APPID = c6fdcf2d49a0bba3e14f310bd3d5cdc2

任何想法,任何人?

提前致谢.

ssl https http

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

Cassandra 2.2.1 将不会开始使用 cassandra -f

我从 apache.cassandra 下载了 cassandra。

我已确保我的环境路径变量设置正确。

我在 Windows 命令提示符中输入:cassandra -f,这就是我得到的结果:

E:\apache-cassandra-2.2.1\bin>cassandra -f
Detected powershell execution permissions.  Running with enhanced startup scripts.
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*

    WARNING!  Automatic page file configuration detected.
    It is recommended that you disable swap when running Cassandra
    for performance and stability reasons.

*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
Exception calling "Start" with "0" argument(s): "The system cannot find the file specified"
At E:\apache-cassandra-2.2.1\conf\cassandra-env.ps1:249 char:5
+     $p.Start() | Out-Null
+     ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : Win32Exception

Exception calling …
Run Code Online (Sandbox Code Playgroud)

cassandra-2.0

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

如何在表格组中不垂直对齐角度+材质垫复选框?

我有两种情况:

一是在我使用FORM GROUP的同时使用angular 5 + Angular Material Design的地方。

这是我的多个复选框的代码

<div *ngSwitchCase="'checkboxField'" class="checkbox-field">
  <div *ngIf="!field?.properties?.hideTitle">{{field?.properties.title}}</div>
    <div class="checkbox-label" *ngFor="let
         element of field?.elements">
         <mat-checkbox
        [value]="element?.properties.value"
        [disabled]="field?.properties.disabled"
        [checked]="isItemChecked(element?.properties.value)"
        (change)="onCheckboxChange(element?.properties.value);
        notifyFormOfChange($event);">
        {{element?.properties.title}}
    </mat-checkbox>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

有两种显示方法:

1)水平2)垂直

垂直仅发生在一个表单组中,在该表单组中我有多个复选框或单选按钮(也需要修复)。当我不使用表单组而只是放置复选框或单选按钮时,我会有CBX或RB的行,它们之间没有空格。

当此属性设置为true时,我需要垂直堆叠CHECKBOXES:

field.properties.stackVertically = true
Run Code Online (Sandbox Code Playgroud)

我只能用CSS做到这一点。

这是表单组的CSS

.row[_ngcontent-c30] {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}
Run Code Online (Sandbox Code Playgroud)

水平仪没有什么比这更好的了。

开关垂直是一个选项“如果”,这

field.properties.stackVertically = true
Run Code Online (Sandbox Code Playgroud)

这是我在说的两张照片:

在此处输入图片说明 在此处输入图片说明

更新到伟大的答案!!!

参见SUCCESS图像,这是集成了解决方案的上述CODE。

我必须将解决方案放在第二行而不是我认为必须的位置。有点试验和错误,但有效!!!

带有集成代码的解决方案

现在这是上面的代码,由KimCindy回答!谢谢!

  <div *ngSwitchCase="'checkboxField'" class="checkbox-field">
    ***<div class="cb-wrapper" [ngClass]="{'cb-vertical': field?.properties?.stackVertically }">***
         <div *ngIf="!field?.properties?.hideTitle">{{field?.properties.title}}</div>
      <div class="checkbox-label" *ngFor="let
           element …
Run Code Online (Sandbox Code Playgroud)

angular-material angular

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

如何使用 angular 或 JQuery 删除来自本地存储的前导和尾随双引号

这必须很简单,所以这就是交易;

我将以下对象数组 (JSON) 放入本地存储,它看起来像这样:

[{"id": 150, "label": "Animal Cookies (Phat Panda)"}, {"id": 110, "label": "Blue Dream (Pioneer)"}, {"id": 30, "label": "Candyland"}, {"id": 130, "label": "Dragon OG (Avitas)"}, {"id": 20, "label": "Golden Pineapple Family"}, {"id": 140, "label": "Golden Ticket (Liberty Reach)"}, {"id": 120, "label": "GSC: Thin Mint (Phat Panda)"}, {"id": 40, "label": "Jack Herer Master Blend"}, {"id": 80, "label": "Owyn's White Widow Blend Master"}, {"id": 50, "label": "P91 San Diego Family"}, {"id": 60, "label": "Phat Panda"}, {"id": 100, "label": "Space Queen …
Run Code Online (Sandbox Code Playgroud)

javascript jquery angularjs

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

嵌套异常是 java.io.FileNotFoundException: 无法打开 ServletContext 资源 [/spring/servlet-context.xml]

好的,感谢您帮助解决最后一个问题。这是我的新错误和后面的代码。错误中的粗体文本是我关心的全部修复,因为这是唯一的错误。

[Thread-36] ContextLoader 错误上下文初始化失败 org.springframework.beans.factory.BeanDefinitionStoreException: IOException 解析来自 ServletContext 资源 [/spring/servlet-context.xml] 的 XML 文档;嵌套异常是 java.io.FileNotFoundException: 无法打开 ServletContext 资源 [/spring/servlet-context.xml] 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341) 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) 在 org.springfactorybeans.beans. .support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) 在 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) 在 org.springframework.beans.tractBeanDefinitionReader. .java:149) 在 org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) 在 org.springframework.web。context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) 在 org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) 在 org.springframework.context.support.AbstractApplicationContext.obtainFreshBean. 467) 在 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) 在 org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) 在 org.springframework.web.context.ContextLoader .initWebApplicationContext(ContextLoader.java:197) 在 org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) 在 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204) at org.apache.catalina.core.StandardContext$1.call( StandardContext.java:5199) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)在 java.lang.Thread.run(Unknown Source) 引起:java.io.FileNotFoundException:无法在 org.springframework.web.context.support.ServletContextResource.getInputStream 打开 ServletContext 资源 [/spring/servlet-context.xml] (ServletContextResource.java:117) 在 org.springframework.beans.factory.xml.XmlBeanDefinitionReader。loadBeanDefinitions(XmlBeanDefinitionReader.java:328) ... 2013 年 10 月 …

java tomcat

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

删除图层后,在动画GIF中,如何摆脱GAP什么都没有?

让我解释.谢尔盖回答了我的另一个问题,所以我希望他能抓住这个问题.

我有101张图片.我删除了图像23 - 74.

当我运行动画时,那些删除的图层有一个没有的GAP.

发生了什么,我该如何解决?

以前有人经历过吗?

我尝试将24以上的层重命名为顺序,但这没有帮助.

谢谢

更新:

这是"保存为Web"对话框,其中101层仍然显示...

保存为Web对话框

photoshop

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

为什么我无法使用打字稿伪造 &lt;a&gt; 链接来打开文件对话框 &lt;input type=file&gt;

这是我的情况、代码和来自 Stackoverflow 的参考。

我想触发打开的对话框,我找到了参考资料,但它们似乎不起作用;

首先是我的代码片段:

                <i class="fas fa-upload uploadicon"></i><br>
                Drop document here or 
                <a href="javascript:;" class="dropimgmessage" id="uploadLink" name="uploadLink" ngbTooltip="Click to upload a document or drag here!" placement="top">browse</a>
                <input type="file" class="form-control fileuploader" #fileInput  id="api-file-container" formControlName="docUpload" name="api-file-container" (change)="handleFileInput($event.target.files)">
                <span class="dropimagetypemsg">Supports PDF, JPG, PNG, GIF</span>
Run Code Online (Sandbox Code Playgroud)

现在我的打字稿:

declaration of variables:

public uploadlink: HTMLElement;
public fileinput: HTMLElement;

------

ngAfterViewInit() {

    this.uploadlink = document.querySelector('#uploadLink') as HTMLElement;
    this.fileinput = document.querySelector('#api-file-container') as HTMLElement;

    this.uploadlink.addEventListener('click', (e: Event) => {
      e.preventDefault();
      this.fileinput.click();
    });

}  
Run Code Online (Sandbox Code Playgroud)

发生的情况是代码被触发,但从未进入片段:

this.uploadlink.addEventListener('click', (e: Event) => { …
Run Code Online (Sandbox Code Playgroud)

input-type-file typescript

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