小编try*_*its的帖子

CSS过渡自动高度不起作用

我有一个网站,我决定用纯CSS片段替换基于jquery的切换框.当我使用固定高度值进行过渡(CSS的最后一行)时,它运行良好,但是使用该auto值,动画丢失,只有高度变化才有效!

有没有办法使用自动值?我想使用变量文本而不使用脚本.

.ac-container{
  width: 400px;
  margin: 10px auto 30px auto;
  text-align: left;
}
.ac-container label{
  font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
  padding: 5px 20px;
  position: relative;
  z-index: 20;
  display: block;
  height: 30px;
  cursor: pointer;
  color: #777;
  text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
  line-height: 33px;
  font-size: 19px;
  background: #ffffff;
  background: -moz-linear-gradient(top, #ffffff 1%, #eaeaea 100%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#ffffff), color-stop(100%,#eaeaea));
  background: -webkit-linear-gradient(top, #ffffff 1%,#eaeaea 100%);
  background: -o-linear-gradient(top, #ffffff 1%,#eaeaea 100%);
  background: -ms-linear-gradient(top, #ffffff 1%,#eaeaea 100%);
  background: linear-gradient(top, …
Run Code Online (Sandbox Code Playgroud)

css animation css-transitions

59
推荐指数
4
解决办法
8万
查看次数

属性工厂附件未找到

我在使用材质组件时无法运行项目.

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'android.arch.lifecycle:extensions:1.1.1'

    implementation 'com.facebook.fresco:fresco:1.11.0'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
    implementation  'com.fxn769:pix:1.2.5'




    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-v4:28.0.0'

}
Run Code Online (Sandbox Code Playgroud)

错误日志:

Android资源链接失败输出:D:\ Android Projects\Ghar3\app\src\main\res\layout\main_layout.xml:23:错误:属性fabAttached(aka com.recreation.ghar:fabAttached)未找到.错误:链接文件资源失败.

命令:C:\ Users\Abdul Qadir.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\93d85fd8448aa5b91b30eb47e2faac6a\aapt2-3.2.1-4818971-windows\aapt2.exe链接-I\D:\ sdk\Android\sdk\platforms\android-28\android.jar\--manifest\D:\ Android Projects\Ghar3\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest. xml\-o\D:\ Android Projects\Ghar3\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\-R\@D:\ Android Projects\Ghar3\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\--auto-add-overlay\--java\D:\ Android Projects\Ghar3\app\build\generated \not_namespaced_r_class_sources\debug\processDebugResources\r\--custom-package\com.recreation.ghar\-0\apk\--output-text-symbols\D:\ Android Projects\Ghar3\app\build\intermediates\symbols\debug\R.txt\--no-version-vectors守护进程:AAPT2 aapt2-3.2.1-4818971-windows守护进程#0

android material-design

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

带有 UUID 的 Spring 接口投影

我正在尝试使用JPA 投影(Spring v1.5.9.RELEASE)从JpaRepository如下(MCVE)返回自定义类型:

@Repository
public interface TestRepository extends JpaRepository<Void, Void> {

    public interface TestValue {
        UUID getId();
        int getNum();
    }

    @Query(value = "SELECT :id as id, 1 as num", nativeQuery = true)
    List<TestValue> getTestValues(@Param("id") UUID id);
    
}
Run Code Online (Sandbox Code Playgroud)

我想按如下方式使用存储库:

List<TestValue> testValues = testRepository.getTestValues(UUID.randomUUID());
int num = testValues.get(0).getNum(); // Returns 1 as expected
UUID id = testValues.get(0).getId(); // ***Fails with an exception***
Run Code Online (Sandbox Code Playgroud)

但是,调用getId()失败并出现以下异常:

java.lang.IllegalArgumentException: Projection type must be an interface!
    at org.springframework.util.Assert.isTrue(Assert.java:92) ~[spring-core-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.data.projection.ProxyProjectionFactory.createProjection(ProxyProjectionFactory.java:110) ~[spring-data-commons-1.13.9.RELEASE.jar:?] …
Run Code Online (Sandbox Code Playgroud)

java spring projection spring-boot

7
推荐指数
0
解决办法
1330
查看次数

作为服务运行时,QtService应用程序无法连接到系统总线

我用Windows 集成的dbus重新编译了Qt.

此外,我已经实现了一个QtService应用程序,它在系统总线上注册服务和对象,如下所示:

QDBusConnection::systemBus().registerService("com.mycompany.Configuration");
QDBusConnection::systemBus().registerObject("/com/mycompany/Configuration/MySetting", myObject);
Run Code Online (Sandbox Code Playgroud)

现在,当我使用-e参数(作为常规应用程序运行)运行服务应用程序时,它工作正常,dbus-monitor并向qdbus --system我显示已注册的服务和对象.

但是,当我将应用程序作为Windows服务运行时,它不会在系统总线上注册任何内容.

调试服务给我错误消息

未连接到D-Bus服务器

在打电话registerService(...)registerObject(...).

我已经设置了环境变量:

DBUS_SYSTEM_BUS_ADDRESS = autolaunch:
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = autolaunch:
Run Code Online (Sandbox Code Playgroud)

我的system.conf文件:

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <type>system</type>

  <fork/>

  <pidfile>/pid</pidfile>

  <listen>autolaunch:</listen>

  <policy context="default">

    <allow user="*"/>

    <deny own="*"/>
    <deny send_type="method_call"/>

    <allow send_type="signal"/>
    <allow send_requested_reply="true" send_type="method_return"/>
    <allow send_requested_reply="true" send_type="error"/>

    <allow receive_type="method_call"/>
    <allow receive_type="method_return"/>
    <allow receive_type="error"/>
    <allow receive_type="signal"/>

    <allow send_destination="org.freedesktop.DBus"/>

    <deny send_destination="org.freedesktop.DBus"
          send_interface="org.freedesktop.DBus"
          send_member="UpdateActivationEnvironment"/> …
Run Code Online (Sandbox Code Playgroud)

windows service qt dbus qdbus

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

Lombok @Builder not working in lombok-1.16.18 java:cannot find symbol builderclass

@Builder
public class ProcessorLombokBO {
    private String panel;
    private String motherBoard;
    private String ram;
    private String hardDisk;
}

public static void main(String[] args) {
    ProcessorLombokBO processorLombokBO =
                    new ProcessorLombokBO.ProcessorLombokBOBuilder()
                    .panel("Brown")
                    .hardDisk("SanDisk 256GB")
                    .ram("4GB")
                    .motherBoard("Intel")
                    .build();
    System.out.println(processorLombokBO);
}
Run Code Online (Sandbox Code Playgroud)

I am trying to implemenent @Builder in a POJO, but it gives the below error when I execute the main method.

java: cannot find symbol symbol: class ProcessorLombokBOBuilder

Did I miss something?

java lombok

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

需要帮助以使用Testcafe检查元素是否在当前视口中

我正在尝试实现一个自定义方法,以查找元素是否在当前视图端口中

以下是我尝试实现的代码片段,但结果未呈现布尔结果:

export const isElementInViewport = () => {
const getBoundValues = ClientFunction(() => document.querySelectorAll(".hero-getstart").item(0).getBoundingClientRect());

const windowHeight = ClientFunction(() => window.innerHeight);
const windowWidth = ClientFunction(() => window.innerWidth);

return getBoundValues.bottom > 0 && getBoundValues.right > 0 && getBoundValues.left < (windowWidth || document.documentElement.clientWidth) && getBoundValues.top < (windowHeight || document.documentElement.clientHeight);
};
Run Code Online (Sandbox Code Playgroud)

上面的代码在浏览器控制台上可以正常运行,即,当我尝试将getBoundValuesin 存储在变量A中并尝试运行return命令时,它会根据视口中元素的可见性将输出打印为true或false。脚本,它总是给出一个假:

这是触发上述方法的方法:

export const verifyElementInView = () => {
  const elementVisible = isElementInViewport();
  console.log(elementVisible);
};
Run Code Online (Sandbox Code Playgroud)

输出始终为假。

这是我尝试执行时收到的输出摘要console.log(getBoundValues)

{ [Function: __$$clientFunction$$]
with: [Function],
[Symbol(functionBuilder)]: 
ClientFunctionBuilder {
callsiteNames: 
  { …
Run Code Online (Sandbox Code Playgroud)

automated-tests ui-testing viewport e2e-testing testcafe

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