Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设在站点上加载了三行信息,并且在站点上,每次刷新页面时您只希望加载 3 行中的 1 行,因此它可能应该按随机或更好的方式排序。什么是最好的代码?
去做array_rand()
array_rand()
<?php $arr=array("Offer 1","Offer 2","Offer 3"); $val=array_rand($arr,1); echo $arr[$val];
我可能在这里遗漏了一些东西,但我似乎找不到任何关于使用 Spring Integration JPA Outbound Channel Adapter 持久化实体列表的文档。我有一个非常简单的场景,应该轮询数据库并将新数据复制到另一个数据库。因此:
<int-jpa:inbound-channel-adapter channel="myC