编程笔记

  • 解决:django.db.utils.OperationalError: no such table: auth_user

    解决:django.db.utils.OperationalError: no such table: auth_user 我们在创建Django项目的时候已经创建这个表了,表一般都保存在轻量级数据库中 只需要同步一下再执行即可 python manage.py migrate python mana…

    编程笔记 2022年7月3日
  • kvm部署高可用无盘工作站

    1. 概述 本篇博客记录如何部署一个高可用的无盘工作站。 无盘工作站,即节点开机启动以后,从pxe引导,把操作系统的根文件系统创建在网络文件系统(NFS)上。 需要部署的服务有: pacemaker 负责高可用集群管理 nfs…

    编程笔记 2022年7月3日
  • ABC 258 上分记录

    A 模拟,注意特判前导零。 signed main() { int x; cin >> x; int h = x / 60; x %= 60; printf("%d:", h + 21); if(x <= 10) printf("0"); printf("%d",x); return 0; } B 我们发现他能够将这个矩形给复…

    编程笔记 2022年7月3日
  • Spring JMS Artemis Example

    In this post I’m going to show you how to connect to ActiveMQ Artemis using Spring JMS. In fact: Artemis is the successor of ActiveMQ. So if you’re starting a new project, give it a try. Let’s take a…

    编程笔记 2022年7月3日
  • Spring JMS Integration Gateway Example

    This is the most comprehensive guide on setting up a Spring JMS Integration Gateway. The best part? It includes a working code sample. Keep reading… If you want to learn more about Spring JMS - head …

    编程笔记 2022年7月3日
  • 关于 mysql:PHP PDO 和 SELECT COUNT(*) 查询

    PHP PDO and query with SELECT COUNT(*) 我在这里有一个非常奇怪的问题 - 这是 PDO 不能返回 num_rows 与 MySQL 结合使用的一个小解决方法。 我可以通过 phpmyadmin 将此查询直接提供给数据库: 12345678910111213…

    大数据 2022年7月3日
  • 关于 java:JPA 条件谓词查询结合 Integer 和 String 参数

    JPA criteria predicate query combining Integer and String arguments 我正在使用 JPA(EclipseLink 风格),框架 JSF 2.0,查询包含 4 个字段的 MySQL 联系人表: 1 contactId(int Pk), firstName (St…

    大数据 2022年7月3日
  • LeetCode 871. 最低加油次数

    汽车从起点出发驶向目的地,该目的地位于出发位置东面 target 英里处。 沿途有加油站,每个 station[i] 代表一个加油站,它位于出发位置东面 station[i][0] 英里处,并且有 station[i][1] 升汽油。 假设汽车油箱的…

    编程笔记 2022年7月3日
  • 如何用好 vim 里面的宏

    引言 在我学习 vim 的过程中,最具有启发意义的一句话是: vim 其实是一门编程语言 很早之前我就接触过 vim,但是当时 vim 的按键组合和按键的逻辑对我来说很难记忆,再加上 vim 的界面实在太过于复古,于是我就转…

    编程笔记 2022年7月3日
  • Spring JMS Artemis Example

    In this post I’m going to show you how to connect to ActiveMQ Artemis using Spring JMS. In fact: Artemis is the successor of ActiveMQ. So if you’re starting a new project, give it a try. Let’s take a…

    编程笔记 2022年7月3日