小编joe*_*rvi的帖子

Sequelize select*where属性为非x

查看您可以使用 的文档model.findAll({where: {attribute: x}}).但是,我想选择所有非x的属性.我在这里寻找一个正则表达式,但这似乎不是一个最佳解决方案.

做这个的最好方式是什么?

mysql orm node.js sequelize.js

9
推荐指数
4
解决办法
6535
查看次数

thread.start_new_thread 不工作

我试图让这些 GPIO 端口同时打开和关闭,但在 RPi 上的间隔不同。我可以运行其中一个循环并且它可以工作,但是当我引入线程时它却没有。

import RPi.GPIO as GPIO  
from time import sleep  
import thread

GPIO.setmode(GPIO.BOARD)  

GPIO.setup(11, GPIO.OUT)  
GPIO.setup(13, GPIO.OUT)  
GPIO.setup(15, GPIO.OUT)  

def fast():  
    while True:  
        GPIO.output(11, True)  
        sleep(.02)  
        GPIO.output(11, False)  
        sleep(.02)  

def med():
    while True:
        GPIO.output(13, True)
        sleep(.2)
        GPIO.output(13, False)
        sleep(.2)

def slow():
    while True:
        GPIO.output(15, True)
        sleep(2)
        GPIO.output(15, False)
        sleep(2)

thread.start_new_thread(fast,())
thread.start_new_thread(med,())
thread.start_new_thread(slow,())
Run Code Online (Sandbox Code Playgroud)

python python-2.7 raspberry-pi

0
推荐指数
1
解决办法
1674
查看次数

标签 统计

mysql ×1

node.js ×1

orm ×1

python ×1

python-2.7 ×1

raspberry-pi ×1

sequelize.js ×1