5个用户的单个实例 [英] single instance for 5 users

查看:63
本文介绍了5个用户的单个实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个测验应用程序,并希望确保所有登录该应用程序的用户同时拥有相同的问题系列。虽然应用程序随机选择测验。

I am writing aa quiz application and will want too ensure that all the users that sign on to the application have the same series of question at the same time. Though application select the quiz at random.

推荐答案

我认为这是一个网站,测验网站似乎是一项常见的家庭作业。所以,你可能想从一个共同的来源获得你的问题,这个来源构建一个随机列表并存储它供所有人使用。这可能是您的数据库或应用程序对象,或者只是一个随机出现的算法,但总是给出相同的结果(例如,建立在随机数生成器上,按当前时间播种到最近的小时,或今天的日期,或者无论如何,取决于你希望他们改变的频率。)
I assume this is a website, quiz websites seem to be a common homework task. So, you probably want to get your questions from a common source, which builds a random list and stores it for use by everyone. This could be your db, or the application object, or simply an algorithm that appears random, but always gives the same result ( for example built on a random number generator, seeded by the current time to the nearest hour, or todays date, or whatever, depending on how often you want them to change ).


这篇关于5个用户的单个实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆