RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-270671

Angel Pensive's questions

Martin Hope
Angel Pensive
Asked: 2020-01-26 00:54:10 +0000 UTC

在应用程序中创建 Ubuntu 快捷方式

  • 0

在 Jetbrains Toolbox 的帮助下安装的 Goland 在我/usr/share/applications 从它工作的管理员运行 nautilus 的文件夹中创建了一个快捷方式,对于普通用户,在 Show Applications 中没有也没有程序。试图给chmod 777没有帮助。
操作系统 Ubuntu 18.04

linux
  • 1 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-01-19 20:49:04 +0000 UTC

没有合适的主键或唯一键

  • 2

尝试创建表但抱怨没有匹配的唯一键或主键。

CREATE TABLE category
(
    id NUMBER GENERATED ALWAYS as IDENTITY(START WITH 1 INCREMENT by 1),
    name VARCHAR(100),
    cat_id VARCHAR(20),
    CONSTRAINT pk_category PRIMARY KEY (id, name, cat_id)
);
CREATE TABLE manufacturer
(
    id NUMBER GENERATED ALWAYS as IDENTITY(START WITH 1 INCREMENT by 1),
    name VARCHAR(100),
    site VARCHAR(255),
    description BLOB,
    CONSTRAINT pk_manufacturer PRIMARY KEY (id, name)
);
CREATE TABLE product
(
    id NUMBER GENERATED ALWAYS as IDENTITY(START WITH 1 INCREMENT by 1),
    name VARCHAR(100),
    model VARCHAR(100),
    quantity NUMBER,
    price DEC(9,2),
    availability VARCHAR(1) CHECK(availability IN('y','n')),
    cat_id VARCHAR(20),
    manufacturer VARCHAR(100),
    CONSTRAINT pk_product PRIMARY KEY (id, cat_id, manufacturer),
    CONSTRAINT fk_product_cat_id FOREIGN KEY (cat_id)
        REFERENCES category(cat_id),
    CONSTRAINT fk_product_manufacturer FOREIGN KEY (manufacturer)
        REFERENCES manufacturer(name)
);
sql
  • 1 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-01-07 16:15:43 +0000 UTC

admin 需要用户名和密码

  • 0

当您尝试登录管理员时,会弹出一个窗口,其中包含用户名和密码。默认登录是root,密码应该是空的,但是我无法登录。我像这样通过docker链接安装所有东西

docker run --link mysqlserver:db -p 8080:8080 adminer
phpmyadmin
  • 1 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-12-30 15:30:01 +0000 UTC

点击按钮动画

  • 2

我试图找到如何在单击并悬停在按钮上时设置按钮动画的示例。到目前为止没有成功。

请分享秘密手稿。
理想情况下,我想将qss动画与 c结合起来QPushButton。

python
  • 1 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-11-20 20:54:56 +0000 UTC

三个js阴影不起作用

  • -3

我正在尝试设置我写这一行的阴影:

renderer.shadowMap.enabled = true;

什么都没有出现,之后编译器会写一个错误:

TypeError: Cannot set property 'enabled' of undefined

完整代码:

var camera, controls, scene, renderer;
var plane
var shoulder, cubit, wrist;
var root_beam, top_beam;
var claw_base, claw_one, claw_two;

function init() {

    // create a scene, that will hold all our elements such as objects, cameras and lights.
    scene = new THREE.Scene();

    // create a camera, which defines where we're looking at.
    camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000);

    // create a render and set the size
    renderer = new THREE.WebGLRenderer();
    renderer.setClearColorHex();
    renderer.setClearColor(new THREE.Color(0x000000));
    renderer.setSize(window.innerWidth-350, window.innerHeight-65);

    // show axes in the screen
    var axes = new THREE.AxisHelper(20);
    scene.add(axes);

    // create the ground plane
    var planeGeometry = new THREE.PlaneGeometry(60, 60);
    var planeMaterial = new THREE.MeshBasicMaterial({color: 0xffffff});
    plane = new THREE.Mesh(planeGeometry, planeMaterial);

    // rotate and position the plane
    plane.rotation.x = -0.5 * Math.PI;
    plane.position.x = 0;
    plane.position.y = 0;
    plane.position.z = 0;

    // add the plane to the scene
    scene.add(plane);

    var sphereGeometry = new THREE.SphereGeometry(2, 20, 20);
    var sphereMaterial = new THREE.MeshBasicMaterial({color: 0x8B0000, wireframe: false});

    shoulder = new THREE.Mesh(sphereGeometry, sphereMaterial);
    shoulder.position.z = 2;


    plane.add(shoulder);

    var geometry = new THREE.CylinderGeometry( 1.5, 1.5, 20, 32 );
    var material = new THREE.MeshBasicMaterial( {color: 0x778899} );
    root_beam = new THREE.Mesh( geometry, material );
    root_beam.rotation.x = 0.5 * Math.PI;
    root_beam.position.z = 10;

    shoulder.add(root_beam);

    cubit = new THREE.Mesh(sphereGeometry, sphereMaterial);
    cubit.position.y = 10;

    root_beam.add(cubit);

    top_beam = new THREE.Mesh( geometry, material );
    top_beam.position.y = 10;
    cubit.add(top_beam);

    wrist = new THREE.Mesh(sphereGeometry, sphereMaterial);
    wrist.position.y = 10;

    top_beam.add(wrist);

    var cubeGeometry = new THREE.BoxGeometry(12, 1, 4);
    var cubeMaterial = new THREE.MeshBasicMaterial({color: 0x778899, wireframe: false});
    claw_base = new THREE.Mesh(cubeGeometry, cubeMaterial);
    claw_base.position.y = 2;

    wrist.add(claw_base);

    cubeGeometry = new THREE.BoxGeometry(6, 1, 4);
    cubeMaterial = new THREE.MeshBasicMaterial({color: 0xFF0000, wireframe: false});

    claw_one = new THREE.Mesh(cubeGeometry, cubeMaterial);
    claw_one.rotation.z = 0.5 * Math.PI;
    claw_one.position.y = 3.5;
    claw_one.position.x = 5.5;

    claw_base.add(claw_one);

    cubeMaterial = new THREE.MeshBasicMaterial({color: 0x0000FF, wireframe: false});

    claw_two = new THREE.Mesh(cubeGeometry, cubeMaterial);
    claw_two.rotation.z = 0.5 * Math.PI;
    claw_two.position.y = 3.5;
    claw_two.position.x = -5.5;

    claw_base.add(claw_two);

    shoulder.rotation.y = 0.5;

    cubit.rotation.z = 1.5;

    wrist.rotation.y = 0.8;

    // position and point the camera to the center of the scene
    camera.position.x = -30;
    camera.position.y = 40;
    camera.position.z = 30;
    camera.lookAt(scene.position);

    // add the output of the renderer to the html element
    document.getElementById("imterBody").appendChild(renderer.domElement);

    controls = new THREE.OrbitControls( camera, renderer.domElement );
                //controls.addEventListener( 'change', render ); // call this only in static scenes (i.e., if there is no animation loop)
    controls.enableDamping = true; // an animation loop is required when either damping or auto-rotation are enabled
    controls.dampingFactor = 0.25;
    controls.screenSpacePanning = false;
    controls.minDistance = 100;
    controls.maxDistance = 500;
    controls.maxPolarAngle = Math.PI / 2;


    window.addEventListener( 'resize', onWindowResize, false );
}

function onWindowResize() {
    camera.aspect = window.innerWidth / window.innerHeight;
    camera.updateProjectionMatrix();
    //renderer.setSize( window.innerWidth, window.innerHeight );
    renderer.setSize( window.innerWidth, window.innerHeight );
}

function animate() {
    requestAnimationFrame( animate );
    controls.update();
    render();
}

function render() {
    renderer.render( scene, camera );
}

function start(){
    init();
    animate();
}
window.onload = start;
javascript
  • 1 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-04-17 08:36:17 +0000 UTC

js如何从css文件开始动画?

  • 0

css文件中有一个动画:

    .pointImg{
        position: absolute ;
        width: 8%;
        margin: 1% 1% 1% 1%;
        -webkit-animation: pulsing 1s infinite;
        animation: pulsing 1s infinite;
    }

    @-webkit-keyframes pulsing {
    0% {
      -webkit-transform: scale(0, 0);
      transform: scale(0, 0)
    }
    50% {
      -webkit-transform: scale(1.0, 1.0);
      transform: scale(1.0, 1.0);
    }
    100% {
      -webkit-transform: scale(0, 0);
      transform: scale(0, 0);
    }
}

@keyframes pulsing{
    0% {
        -webkit-transform: scale(0, 0);
        transform: scale(0, 0)
    }
    50% {
        -webkit-transform: scale(1.0, 1.0);
        transform: scale(1.0, 1.0);
    }
    100% {
        -webkit-transform: scale(0, 0);
        transform: scale(0, 0);
    }
}

单击另一个图像(不是 pointImg 类)时,如何从脚本中启用和禁用此动画?我知道 .onclick 事件,但我不知道如何再次启用动画。

javascript
  • 1 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-04-13 00:47:52 +0000 UTC

我无法理解错误没有这样的插槽

  • 1

实际上写没有这样的插槽

void runA(long &a, long &b, int end);

我想像这样递归调用它

QTimer::singleShot(300, this, SLOT(runA(a,b,end)));

在此之前,项目没有问题。现场检查了Q_OBJECT,试图将插槽移至公共插槽并没有像在公共Q_OBJECT中那样有帮助。

c++
  • 1 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-04-01 13:12:15 +0000 UTC

延迟不起作用[重复]

  • 0
这个问题已经在这里得到了回答:
如何在某处传递函数 // 为什么事件会立即触发? (1 个回答)
4年前关闭。
rotate.onclick = function () {
   setTimeout(clickC(rotate),5000);
};
javascript
  • 1 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-03-05 20:26:45 +0000 UTC

循环中每次迭代后的 Qt 延迟

  • 1

每次迭代后如何在循环中进行延迟?

void Programma::on_pushButton_clicked()
{
  while (true) {
   //задержка
   // исполняемый код
  }
}
c++
  • 3 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-10-19 20:25:04 +0000 UTC

QTextStream 输出字符串两次

  • 0

读取文件:

if (V_on(stream1.readLine(),stream2.readLine()))
{
  stream << (stream1.readLine() + "\n");
}

并且我需要在满足条件后再次读取这一行,而不将指针移动到下一行并且不创建缓冲区变量。是否有可能做到这一点?

c++
  • 1 个回答
  • 10 Views
Martin Hope
Angel Pensive
Asked: 2020-10-15 21:54:55 +0000 UTC

Qt 运算符重载 = 用于结构

  • 1

无法为结构重载 = 运算符。程序可以编译,但在执行直接合并时会崩溃。

结构:

struct Student
    {
        QString fio;
        int group;
        int ysp[5];

        Student& operator = (const Student &s)
        {
            fio = s.fio;
            group = s.group;
            ysp[0] = s.ysp[0];
            ysp[1] = s.ysp[1];
            ysp[2] = s.ysp[2];
            ysp[3] = s.ysp[3];
            ysp[4] = s.ysp[4];
            ysp[5] = s.ysp[5];
            return (*this);
        }
    };

直接归并排序:

void MainWindow::Merge(Student *list_S, int left, int right)
{
    if (right == left) return;
    if (right - left == 1)
    {
        if (ui->Ascending->isChecked())
        {
            if (list_S[right].group < list_S[left].group) swap(list_S[right], list_S[left]);
        }
        if (ui->Descending->isChecked())
        {
            if (list_S[right].group > list_S[left].group) swap(list_S[right], list_S[left]);
        }
        return;
    }

    int m = (right + left) / 2;

    Merge(list_S,left, m);
    Merge(list_S,m + 1, right);

    Student buf[right];
    int xl = left;
    int xr = m + 1;
    int cur = 0;

    while (right - left + 1 != cur)
    {
        if (xl > m) buf[cur++] = list_S[xr++];
        else if (xr > right) buf[cur++] = list_S[xl++];

        else if (ui->Ascending->isChecked() && list_S[xl].group > list_S[xr].group)buf[cur++] = list_S[xr++];
        else if (ui->Descending->isChecked() && list_S[xl].group < list_S[xr].group)buf[cur++] = list_S[xr++];

        else buf[cur++] = list_S[xl++];

    }

    for (int i = 0; i < cur; i++) list_S[i + left] = buf[i];
}

如果在排序中更正,一切都会正常工作:

Student buf[right+1];
c++
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5