小编Jac*_*kie的帖子

使用arm-linux-androideabi-gcc编译对象的问题

背景

  • OSX是OS
  • R8 NDK

我正在尝试使用Android GCC编译器编译以下类...

#include <stdint.h>
int main (void){
   return 0;
}
Run Code Online (Sandbox Code Playgroud)

我用以下命令做...

un@un:~/Development/Code/OpenGL$ ~/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc hello.c -o hello
Run Code Online (Sandbox Code Playgroud)

我明白了......

In file included from hello.c:1:0:
/Users/un/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/include/stdint.h:3:26: fatal error: stdint.h: No such file or directory
compilation terminated.
Run Code Online (Sandbox Code Playgroud)

因此,由于缺乏gcc知识(但有一些谷歌能力),我发现了这一点并尝试了...

un@un:~/Development/Code/OpenGL$ ~/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc hello.c -o hello -ffreestanding
Run Code Online (Sandbox Code Playgroud)

我得到......

/Users/un/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
/Users/un/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory
/Users/un/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc
/Users/un/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: ld returned 1 exit …
Run Code Online (Sandbox Code Playgroud)

android-ndk

10
推荐指数
3
解决办法
5万
查看次数

如何让easy_install忽略certifcate

我们的网络安装不是最好的,所以我需要告诉通过ssl进行通信的应用程序忽略证书.不得不用NPM等做同样的事情所以现在当我跑...

$ easy_install pip
...
Download error on https://pypi.python.org/simple/pip/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
Run Code Online (Sandbox Code Playgroud)

那么我该如何关闭此验证呢?

PS我知道这是一个安全载体,但幽默我.

python easy-install

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

如何按名称选择所有槽位?

我正在处理这种情况...

<template>
  <slot name="thing"></slot>
  <slot name="other"></slot>
</template>
Run Code Online (Sandbox Code Playgroud)

和一个像这样的实现

<custom-element>
  <div slot="thing"> Thing 1 </div>
  <div slot="thing"> Thing 2 </div>
  <div slot="other"> Thing 3 </div>
</custom-element>
Run Code Online (Sandbox Code Playgroud)

如何使用 CSS 查询影响事物 1 和事物 2 但排除事物 3?

css custom-component web-component slot shadow-dom

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

Node 16+ 中 ES 模块和 CommonJS 之间有性能差异吗?

我正在开发一个项目,该项目仍然将 TS 转换为 commonJS 以在 Node 上运行。现在该节点已开始转向 ES 模块,从 commonjs 迁移是否有性能优势?或者说差异只是表面上的?

我知道在以前的版本中不支持本机 ESM,因此旧的答案和其他问题似乎已经过时。因此,我似乎无法找到一个好的答案。

node.js typescript es6-modules

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

Spring 3匹配的通配符是严格的,但是没有找到元素'jee:jndi-lookup'的声明

所以我遇到类似这里的问题......

Spring 3.0错误:匹配的通配符是严格的,但是找不到元素的声明

我的pom看起来像这样

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
      http://www.springframework.org/schema/jee/spring-jee-2.5.xsd">
...
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/db" resource-ref="true" />
Run Code Online (Sandbox Code Playgroud)

但是当我尝试在Websphere上运行该服务时,我得到以下内容......

Line 16 in XML document from ServletContext resource [/WEB-INF/context/loyalty-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jee:jndi-lookup'.
Run Code Online (Sandbox Code Playgroud)

这似乎与我的链接不同,因为我已经在命名空间中有了架构.有任何想法吗?

db2 spring hibernate jndi

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

如何在Angular 2中进行简单的文本输入绑定?

我试图从Angular2组件到模板进行简单的绑定.我的模板代码看起来像这样......

<textarea class="left-side" #newLeft (keyup)="enterLeftText($event, newLeft)"></textarea>

<textarea class="right-side">{{leftText}}</textarea>
Run Code Online (Sandbox Code Playgroud)

然后在我的组件中我有以下...

enterLeftText($event, newLeft) {
  this.leftText = newLeft.value;
}
Run Code Online (Sandbox Code Playgroud)

问题是newLeft总是未定义的.我错过了什么?

angular

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

即使使用Scala Test使用@PrepareForTest,PowerMockito也会抛出ClassNotPreparedException

我有以下测试......

import org.scalatest.junit.JUnitRunner
...
@PowerMockRunnerDelegate(classOf[JUnitRunner])
@PrepareForTest(Array(classOf[AuditLog]))
class ConnectorAPITest extends path.FreeSpec with ShouldMatchers {
  "Mocked Tests" - {
      println("This got called in the mocked tests.")
      PowerMockito.mockStatic(classOf[AuditLog]);
      ...
  }
}
Run Code Online (Sandbox Code Playgroud)

但是当我跑步时,我得到......

An exception or error caused a run to abort: The class com.paxata.services.log.AuditLog not prepared for test.
To prepare this class, add class to the '@PrepareForTest' annotation.
In case if you don't use this annotation, add the annotation on class or  method level. 
org.powermock.api.mockito.ClassNotPreparedException: 
The class com.paxata.services.log.AuditLog not prepared for test.
To …
Run Code Online (Sandbox Code Playgroud)

scala powermock scalatest powermockito

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

当我在IntelliJ中自动导入Typescript类时,为什么我得到了错误的路径

如果我在我的IntelliJ中并尝试命令空间自动导入Typescript类,我会得到完整的路径(import {Http} from "../../../../node_modules/@angular/http/src/http";),当我期望更短的on(import {Http} from "@angular/http")

这在某一点上起作用,但我无法弄清楚什么设置被重新调整.有人有想法吗?我在2017.1

intellij-idea pycharm webstorm typescript

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

linting 时我应该使用“plugin:vue/essential”和“plugin:vue/vue3-recommended”吗?

文档不清楚。如果我使用 Vue3,我需要两者还是只需要plugin:vue/vue3-recommended

lint vue.js vuejs3

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

如何在我的 ESM(ECMA 模块加载器)项目中使用 Cucumber?

我有一个简单的项目,基本上......

export class Application{
  constructor(...){
    ...
  }
  async run(){
    console.log("I Ran!");
  }
}
Run Code Online (Sandbox Code Playgroud)

我想使用 Cukes 运行它,所以我按照以下步骤操作并使其正常工作(注意 .cjs 扩展名以表明它是一个 cjs 文件)

// features/basic.feature

Feature: Hello World
  Scenario: Hello World
    Given I start the app
    When it is running
    Then I see the console

// features/support/steps.cjs
const { Given, When, Then } = require("@cucumber/cucumber");

Given("I start the app", function () {
  // TODO: Setup child process
  return
});

When("it is running", function () {
  // TODO: Execute using Worker …
Run Code Online (Sandbox Code Playgroud)

javascript cucumber cucumberjs es6-modules

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