Questions tagged [seed]

Seed is a JavaScript interpreter and a library of the GNOME project.

632 questions
6
votes
2 answers

Having trouble seeding CSV file into Rails App

I'm trying to seed about 2K records into a model and I've tried using all the different methods out there so far (faster csv, fast_seeder, and the railscasts ep). I feel like this should be pretty simple. I've got all the data in a CSV file and I've…
sacshu
  • 397
  • 9
  • 20
6
votes
5 answers

Deterministic random number generator with context?

I am looking for a seeded random number generator that creates a pool of numbers as a context. It doesn't have to be too good. It is used for a game, but it is important, that each instance of the Game Engine has its own pool of numbers, so that…
Michael Ochs
  • 2,846
  • 3
  • 27
  • 33
5
votes
1 answer

Entity Framework Code First: How to seed a database for unit testing

My question and code is based on the Code First Entity Framework Unit Test Examples blog post. I am using SQL Compact 4.0 and as such my unit tests are running against the actual database using real data similar to what is being described in the…
Gerhard Wessels
  • 681
  • 1
  • 9
  • 18
5
votes
3 answers

How can I produce a pseudorandom pattern from X/Y coordinates deterministically?

I'm writing a shader which occasionally makes a point sparkle on a 2D map. (The "sparkle" is simply a brighter-colored pixel.) I'd like the sparkled blocks to appear randomly and uniformly distributed on the (infinite) plane, but I want the…
Henry Merriam
  • 834
  • 6
  • 20
5
votes
2 answers

How to use Seed in Windows, Mac, Android to write standalone applications in JavaScript?

Use Javascript language with Seed looks great. But how do you use it in Windows, Mac, Android? Is there any port available for those? I was trying to test them in cross-platforms where in my Gnome it works only, such as:…
user285594
5
votes
1 answer

What does a crawler seeds list contain?

I've been reading on how to implement a crawler. I understand that we start with a list of URLs to visit ( seeds list ). Visit all those URLs and add all the links in the visited pages to the list (frontier). So how much should I add to this seed…
Vanddel
  • 1,094
  • 3
  • 13
  • 32
5
votes
1 answer

EF Core: how to validate data exists by condition in OnModelCreating

I use EF Core and want to add predefined data. It can be done by the following code: modelBuilder.Entity().HasData(new UserPage() { Name = "Homepage", Editable = true, …
Oleg Sh
  • 8,496
  • 17
  • 89
  • 159
5
votes
3 answers

Monte carlo on GPU

Today I had a talk with a friend of mine told me he tries to make some monte carlo simulations using GPU. What was interesting he told me that he wanted to draw numbers randomly on different processors and assumed that there were uncorrelated. But…
MPękalski
  • 6,873
  • 4
  • 26
  • 36
5
votes
1 answer

Strange numpy random shuffle and seed

I have a question about random of numpy, especially shuffle and seed. 'seed' is used for generating a same random sequence. 'shuffle' is used for shuffling something. To shuffle two lists in the same order, this code works : idx = [1, 2, 3, 4, 5, 6]…
Hibkj
  • 73
  • 1
  • 1
  • 5
5
votes
1 answer

Why is Bash’s $RANDOM not seeded (?) on some machines?

I noticed that on some machines (all openSUSE 11.2 on identical hardware) every Bash shell would output the same sequence of values for $RANDOM: $ bash -c 'for i in `seq 10`; do echo -n "$RANDOM "; done; echo' 17767 9158 6249 18547 23633 23807 5194…
hfs
  • 2,433
  • 24
  • 37
5
votes
1 answer

How to db:seed a model and all its nested models?

I have these classes: class User has_one :user_profile accepts_nested_attributes_for :user_profile attr_accessible :email, :password, :password_confirmation, :user_profile_attributes end class UserProfile has_one :contact, :as =>…
Zabba
  • 64,285
  • 47
  • 179
  • 207
5
votes
3 answers

WebStorm keeps indexing with slight changes

I'm currently using WebStorm build 11.0.3, to do some Angular 2 programming/learning and I'm using Angular 2 seed. WebStorm keeps indexing after every few changes and/or some minutes... Any suggestions or advises? I'm sure there are some settings…
Han Che
  • 8,239
  • 19
  • 70
  • 116
5
votes
1 answer

Adding an existing non-seed Cassandra node to the list of seeds

I have an existing Cassandra cluster with the following setup: DC1 Node1 Node2 Node3 DC2 Node4 Node5 Node6 Current seeds list in all nodes' yamls is "Node1, Node4" I would like to add one more node from each datacenter to the seed list, i.e. I…
CRCerr0r
  • 525
  • 1
  • 8
  • 17
5
votes
6 answers

How avoid adding duplicates to database managed by EntityFramework caused by Seed method?

Every time I run the application same objects are added to the database(duplicates). My Global.asax: using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Web; using System.Web.Mvc; using…
Yoda
  • 17,363
  • 67
  • 204
  • 344
5
votes
4 answers

Best seed for parallel process

I need to run a MonteCarlo simulations in parallel on different machines. The code is in c++, but the program is set up and launched with a python script that set a lot of things, in particular the random seed. The function setseed thake a 4 bytes…
Ruggero Turra
  • 16,929
  • 16
  • 85
  • 141