AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-488579

Rilcon42's questions

Martin Hope
Rilcon42
Asked: 2018-05-24 16:58:02 +0800 CST

尽管安装,但找不到 pyodbc 驱动程序

  • 7

我已pyodbc安装并尝试连接到服务器,但pyodbc找不到驱动程序。我做了以下事情:

  1. 安装pyodbc使用pip:

    pip install pyodbc
    
  2. 按照微软的指示。

  3. 运行一个测试脚本:

    import pyodbc 
    
    print(pyodbc.drivers())
    

    它返回一个空数组。

我还需要做什么?我在 Anaconda Python 安装中的 Jupyter Notebook 中运行脚本。

python drivers odbc mssql
  • 1 个回答
  • 10902 Views
Martin Hope
Rilcon42
Asked: 2017-10-05 07:54:50 +0800 CST

如何从已安装软件包列表中查找特定软件包名称

  • 2

我正在尝试删除旧版本的 eclipse (3.8),但我不知道包名称。有人可以解释如何正确找到包名吗?

我试过这个,但是当我对这些名称进行自动删除时,它找不到包:

king@king-Inspiron-7352 ~ $ apt list --installed |grep eclipse

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

eclipse-jdt/xenial,xenial,now 3.8.1-8 all [installed,automatic]
eclipse-pde/xenial,now 3.8.1-8 amd64 [installed,automatic]
eclipse-platform/xenial,now 3.8.1-8 amd64 [installed,automatic]
eclipse-platform-data/xenial,xenial,now 3.8.1-8 all [installed,automatic]
eclipse-rcp/xenial,now 3.8.1-8 amd64 [installed,automatic]
libeclipse-aether-java/xenial,xenial,now 1.0.2-1 all [installed,automatic]
libeclipselink-java/xenial,xenial,now 2.5.1-3 all [installed,automatic]
apt
  • 1 个回答
  • 1186 Views
Martin Hope
Rilcon42
Asked: 2017-03-30 05:25:16 +0800 CST

通过子目录递归运行命令

  • 5

我正在尝试将一堆图像转换为可能位于多个子目录中的缩略图,并将图像的副本保存为子目录中的缩略图,但我无法弄清楚语法。任何的建议都受欢迎。

convert test/*/*.jpg -50x50 test/*/*_thumb.jpg
bash
  • 2 个回答
  • 10130 Views
Martin Hope
Rilcon42
Asked: 2016-10-12 08:06:50 +0800 CST

通过 bash 命令切换音频设备

  • 4

我正在尝试编写一个 bash 命令来在音频设备(不是不同的卡)之间切换。我找到了有关该主题的AskUbuntu 帖子,然后我开始在下面的列表中尝试每个输出设备,以确定哪个是我的扬声器,哪个是我的耳机。有没有更好的方法?

我尝试了什么:

pactl set-card-profile 0 output:hdmi-surround71

对于每个音频设备,从扬声器到耳机输出没有变化。

$ pacmd list-cards | grep output\:
        output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
        output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
        output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
        output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: unknown)
        output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 100, available: unknown)
        output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: unknown)
        output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: unknown)
        output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: unknown)
        output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5200, available: unknown)
        output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 100, available: unknown)
        output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 100, available: unknown)
    active profile: <output:hdmi-surround71>
        output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
        output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
        output:analog-surround-21: Analog Surround 2.1 Output (priority 800, available: unknown)
        output:analog-surround-21+input:analog-stereo: Analog Surround 2.1 Output + Analog Stereo Input (priority 860, available: unknown)
        output:analog-surround-40: Analog Surround 4.0 Output (priority 700, available: unknown)
        output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 760, available: unknown)
        output:analog-surround-41: Analog Surround 4.1 Output (priority 800, available: unknown)
        output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (priority 860, available: unknown)
        output:analog-surround-50: Analog Surround 5.0 Output (priority 700, available: unknown)
        output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (priority 760, available: unknown)
        output:analog-surround-51: Analog Surround 5.1 Output (priority 800, available: unknown)
        output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (priority 860, available: unknown)
        output:analog-surround-71: Analog Surround 7.1 Output (priority 700, available: unknown)
        output:analog-surround-71+input:analog-stereo: Analog Surround 7.1 Output + Analog Stereo Input (priority 760, available: unknown)
        output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
        output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5560, available: unknown)
    active profile: <output:analog-stereo+input:analog-stereo>
        iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
$ pactl set-card-profile 0 output:hdmi-surround71

我的水槽:

$ pacmd list-sinks
2 sink(s) available.
  * index: 10
    name: <alsa_output.pci-0000_00_14.2.analog-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: RUNNING
    suspend cause: 
    priority: 9959
    volume: front-left: 50462 /  77% / -6.81 dB,   front-right: 50462 /  77% / -6.81 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 23.16 ms
    max request: 4 KiB
    max rewind: 64 KiB
    monitor source: 11
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 1
    linked by: 1
    configured latency: 23.22 ms; range is 1.00 .. 371.52 ms
    card: 1 <alsa_card.pci-0000_00_14.2>
    module: 7
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "ALC892 Analog"
        alsa.id = "ALC892 Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA ATI SB"
        alsa.long_card_name = "HDA ATI SB at 0xfe200000 irq 16"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:14.2"
        sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card0"
        device.bus = "pci"
        device.vendor.id = "1002"
        device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
        device.product.id = "4383"
        device.product.name = "SBx00 Azalia (Intel HDA)"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analog Stereo"
        device.description = "Built-in Audio Analog Stereo"
        alsa.mixer_name = "Realtek ALC892"
        alsa.components = "HDA:10ec0892,1462f640,00100302"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: no)
            properties:

        analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
            properties:
                device.icon_name = "audio-headphones"
    active port: <analog-output-headphones>
    index: 14
    name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
    driver: <module-alsa-card.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 9050
    volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 15
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
    card: 0 <alsa_card.pci-0000_01_00.1>
    module: 6
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 1"
        alsa.id = "HDMI 1"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "7"
        alsa.card = "1"
        alsa.card_name = "HDA NVidia"
        alsa.long_card_name = "HDA NVidia at 0xfe080000 irq 26"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:01:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:02.0/0000:01:00.1/sound/card1"
        device.bus = "pci"
        device.vendor.id = "10de"
        device.vendor.name = "NVIDIA Corporation"
        device.product.id = "0fbb"
        device.product.name = "GM204 High Definition Audio Controller"
        device.string = "hdmi:1,1"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo-extra1"
        device.profile.description = "Digital Stereo (HDMI 2)"
        device.description = "GM204 High Definition Audio Controller Digital Stereo (HDMI 2)"
        alsa.mixer_name = "Nvidia GPU 71 HDMI/DP"
        alsa.components = "HDA:10de0071,196e1131,00100100"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
            properties:
                device.icon_name = "video-display"
                device.product.name = "ASUS VH238
  "
    active port: <hdmi-output-1>
bash
  • 2 个回答
  • 3339 Views
Martin Hope
Rilcon42
Asked: 2016-10-09 16:48:14 +0800 CST

强制永久更改显示器分辨率的正确方法是什么?

  • 0

我正在使用以下设置从 Geforce 970 上运行 3 台显示器:

  1. Mon1 (1024x768) 连接到 DVI 端口(原始分辨率 1920x1080)
  2. Mon2 (1920x1080) 连接到显示端口
  3. Mon3 (1920x1080) 连接到显示端口

将 Mon1 上的分辨率强制为 1920x1080 的正确方法是什么?我需要覆盖 xorg.conf 中的某些内容吗?或在 nvidia-settings-rc 文件中?

xrandr -q输出:

Screen 0: minimum 8 x 8, current 4864 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1024x768+0+156 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      60.00*+
   1360x768      59.96    59.80  
   1152x864      60.00  
   800x600       72.19    60.32    56.25  
   680x384       59.96    59.80  
   640x480       59.94  
   512x384       60.00  
   400x300       72.19  
   320x240       60.05  
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 connected 1920x1080+2944+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      59.89  
   1400x1050     59.98  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00    50.08  
   720x480       59.94    60.05  
   640x480       75.00    72.81    59.94    59.93  
   480x576       50.00  
   480x480       59.94  
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 connected 1920x1080+1024+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  

xorg.conf(从 nvidia-settings 中生成):

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 361.42  (buildd@lgw01-18)  Tue Apr  5 14:33:28 UTC 2016

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: xconfig, VertRefresh source: xconfig
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DFP-0"
    HorizSync       28.0 - 55.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 970"
EndSection
Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-I-1: nvidia-auto-select +0+156, DP-1: nvidia-auto-select +2944+0, DP-3: nvidia-auto-selec$
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
nvidia
  • 1 个回答
  • 1526 Views
Martin Hope
Rilcon42
Asked: 2016-10-09 14:14:56 +0800 CST

无法从启动器以 sudo 运行程序

  • 0

我正在尝试使用以下命令输入创建启动器:

gksu sh -c "~/evelauncher/evelauncher.sh"

但它失败了。当我输入:

sudo ~/evelauncher/evelauncher.sh

在终端中它完美地工作(带有文本输出)并启动程序。有人可以解释为什么启动器不起作用吗?启动器作为我的用户具有读写访问权限,并且选中了“将文件作为程序执行”复选框。

command-line
  • 2 个回答
  • 496 Views
Martin Hope
Rilcon42
Asked: 2016-08-25 18:51:29 +0800 CST

更新 dconf 不会更改命令

  • 2

我刚刚使用存储的设置文件更新了 dconf,dconf load /org/cinnamon/ < keyboard_shortcuts_export_dconf然后对文件进行了一些更改(交换firefox为google-chrome)并尝试使用相同的命令导入文件。它没有给出错误,但更改没有生效(当我使用快捷方式时,它仍然在 Firefox 中打开)。我必须使用某种source命令来刷新文件或其他东西吗?

[/]
panels-autohide=['1:false']
panels-resizable=['1:true']
enabled-applets=['panel1:left:0:menu@cinnamon.org:0', 'panel1:left:1:show-desktop@cinnamon.org:1', 'panel1:left:2:panel-launchers@cinnamon.org:2', 'panel1:left:3:window-list@cinnamon.org:3', 'panel1:right:0:notifications@cinnamon.org:4', 'panel1:right:1:user@cinnamon.org:5', 'panel1:right:2:removable-drives@cinnamon.org:6', 'panel1:right:3:keyboard@cinnamon.org:7', 'panel1:right:4:bluetooth@cinnamon.org:8', 'panel1:right:5:network@cinnamon.org:9', 'panel1:right:6:sound@cinnamon.org:10', 'panel1:right:7:power@cinnamon.org:11', 'panel1:right:8:systray@cinnamon.org:12', 'panel1:right:9:calendar@cinnamon.org:13', 'panel1:right:10:windows-quick-list@cinnamon.org:14', 'panel1:right:0:workspace-switcher@cinnamon.org:15']
next-applet-id=16
panel-launchers=['DEPRECATED']
panels-height=['1:31']

[settings-daemon/plugins/xsettings]
antialiasing='rgba'
hinting='slight'

[settings-daemon/peripherals/touchpad]
motion-threshold=3
natural-scroll=true
motion-acceleration=3.1529411764705881
scroll-method='two-finger-scrolling'
two-finger-click=3
three-finger-click=2
touchpad-enabled=true

[settings-daemon/peripherals/keyboard]
numlock-state='off'

[desktop/keybindings/custom-keybindings/custom2]
binding=['<Super>d']
command='google-chrome "drive.google.com"'
name='drive'

[desktop/keybindings/custom-keybindings/custom1]
binding=['<Super>e']
command='google-chrome "https://inbox.google.com/?pli=1"'
name='email'

[desktop/keybindings/custom-keybindings/custom4]
binding=['<Super>Down']
command='xrandr --output eDP1 --rotate normal'
name='rotate screen normal'

[desktop/keybindings/custom-keybindings/custom0]
binding=['<Super>c']
command='google-chrome "https://www.google.com"'
name='chrome'

[desktop/keybindings/custom-keybindings/custom3]
binding=['<Super>Up']
command='xrandr --output eDP1 --rotate right'
name='rotate screen right'

[desktop/keybindings]
custom-list=['custom0', 'custom1', 'custom2', 'custom4', 'custom3', 'custom5']

[desktop/keybindings/media-keys]
terminal=['<Super>t']
home=['XF86Explorer']

[desktop/keybindings/wm]
push-tile-up=@as []
switch-to-workspace-left=['<Super>Left']
switch-to-workspace-right=['<Super>Right']
maximize-vertically=['<Primary>Right']
show-desktop=['<Primary>d']
push-tile-left=@as []
push-tile-right=@as []
push-tile-down=@as []

[desktop/background]
picture-uri='file:///home/king/Desktop/image3.png'

[desktop/interface]
text-scaling-factor=1.5000000000000004

[sounds]
login-enabled=false
logout-enabled=false
unplug-enabled=true
tile-enabled=false
switch-enabled=false
cinnamon
  • 1 个回答
  • 533 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve