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.
ランダム化したいPHPに1000を超えるキーの配列があります。現在、これを行うためにシャッフルを使用していますが、シャッフルの順序を毎回同じにしたいと考えています。したがって、ランダムですが、スクリプトが実行されるたびに常に同じランダムな順序になります。
それはクライアントの要求です:)。ランダム化しますが、毎回同じランダムな順序に保ちます。
srand(int seed)最初に定数を指定して呼び出します。例えばsrand(123)。
srand(int seed)
srand(123)
以下のコードを使用して JSON データを解析しようとしています。Web サイトには API キーが必要です。これは今のところ、strings.xml に文字列として保存されています。
public class JSONParser { static InputStream is = null; static JSONArray jarray = null; stat