类关系: User N~1 Group 测试代码: System.out.println("1"); List stuList = session.createQuery("from User s where s.password ='123'").list(); //(1) System.out.println("2"); for(Iterator it = stuList.iterator(); it.hasNext();){ User st…
if __name__== "__main__" 的意思(作用)python代码复用 转自:大步's Blog http://www.dabu.info/if-__-name__-__main__-mean-function-python-code-reuse.html 有人在学习python脚本时会发现有的脚本下面有几行代码; 1 2 if __name__== "__main__": main() 不明白其中的意思,其实这就是方便我们代码复用的,我们可以在…