试图安装PySide,我收到此错误:
running build
Python architecture is 64bit
nmake not found. Trying to initialize the MSVC env...
Searching MSVC compiler version 10.0
error: Failed to find the MSVC compiler version 10.0 on your system.
Run Code Online (Sandbox Code Playgroud)
我有minGW,QT 4.8 vs 2010和mingw版本,Cmake.
现在我感觉PATH中缺少某些东西,但我不确定它应该指向何处以及它应该是什么.我目前的路径:
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Python34\;C:\Python34\Scripts;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Windows\System32;C:\Program Files (x86)\CMake 2.8\bin
Run Code Online (Sandbox Code Playgroud)
有什么建议?
我有一堂关于房间的课。我希望每次使用该类创建对象时,该对象都会被添加到所有房间的列表中。客房等级:
class Rooms:
"""Room class, takes type,days, occupied or not and when it frees up"""
def __init__(self, room_type, days, occupied, when_free):
self.room_type = room_type
self.days = days
self.occupied = occupied
self.when_free = arrow.get(when_free,'YYYY-MM-DD')
Run Code Online (Sandbox Code Playgroud)
任何其他反馈也将受到赞赏!
也不确定我是否应该就此创建新主题,但是否有可能当创建对象并将占用时的 True 传递给对象时,您不需要传递第四个变量,而是将其作为当前日期?简而言之,如果没有第四个变量,它会传递 arrow.get(str(arrow.utcnow()),'YYYY-MM-DD') 代替
弄清楚了我的第二个问题。我确实将init更改为:
def __init__(self, room_type, days, occupied, when_free=str(arrow.get(str(arrow.utcnow()),'YYYY-MM-DD'))):
self.room_type = room_type
self.days = days
self.occupied = occupied
self.when_free = arrow.get(when_free,'YYYY-MM-DD')
Run Code Online (Sandbox Code Playgroud) 好吧,所以我有一个ScheduledExxecutorService,它会检查日期列表中的日期是否已经过,代码:
public void dateCheckinator(){
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
Runnable r = new Runnable() {
@Override
public void run() {
Calendar cal = Calendar.getInstance();
for(int i=0;i<dateList.size();i++){
if (cal.getTime()>dateList.get(i)){
kaladeList.add(kaladeList.get(i));
kaladeListats.add(kaladeListats.get(i));
}
}
System.out.println(cal.getTime());
}
};
scheduler.scheduleAtFixedRate(r, 1, 1, TimeUnit.SECONDS);
}
Run Code Online (Sandbox Code Playgroud)
但是我在if语句中得到错误,如何检查日期是否已过?我将调度程序更改为每分钟左右检查一次,而不是几秒钟后检查.