Spin bug

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
If zenno have inteli spintax as well then this need to write in features.
Why i'm telling that is because i have problem with spintax - I have 6 links in my file.
And from 60 posts what i made i have:
24 - posts with keyword 1
18 - posts with keyword 2
18 - posts with keyword 3

Not a single post with keyword 4 - keyword 5 and keyword 6 :O
I thought that spintax working like random. But as i see i was wrong...

Actually i noticed some problems with anything random things in zennoposter. You should change your random algorithm because it is not really random.

Cheers
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
It looks fine from math background. You can get more even random using this code.
It generates a number from 0 to 5.
JavaScript:
Random rnd = new Random();
int r = rnd.Next(10000000);
int w = r % 6;
return w;
 

shade

Client
Регистрация
19.11.2010
Сообщения
580
Благодарностей
346
Баллы
63
It looks fine from math background. You can get more even random using this code.
It generates a number from 0 to 5.
JavaScript:
Random rnd = new Random();
int r = rnd.Next(10000000);
int w = r % 6;
return w;
It's nice way. I have made project for this test this generation.
JavaScript:
Random rnd = new Random();


var d = new Dictionary<int, int>();


for (int i = 0; i < 100000; i++)
{
    int r = rnd.Next(10000000);
    int w = r % 6;
    if (!d.ContainsKey(w)) d.Add(w, 1);
    else d[w]++;
}


var sb = new StringBuilder();


foreach (KeyValuePair<int, int> pair in d)
{
    sb.AppendLine(String.Format("{0}: {1}", pair.Key, pair.Value));
}


return sb.ToString();
This code generates 100000 times number from range 0-5, collects statistics and write it to returned variable.
I have got the follow:
0: 16728
1: 16721
2: 16603
3: 16567
4: 16677
5: 16704
I think it's not bad.
 

Вложения

  • 14,3 КБ Просмотры: 229
  • Спасибо
Реакции: Hungry Bulldozer

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Thank you guys for pieces of code but this is totally not what i reported...

Please check my first post...

Thanks
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113

Вложения

  • 34 КБ Просмотры: 244

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
I'm really not sure do you think i'm lie ? ? ?
Test it not with one two or anything like that but as i said i had html a-href in spintax.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113

Вложения

  • 34,3 КБ Просмотры: 246
  • Спасибо
Реакции: Hungry Bulldozer

Кто просматривает тему: (Всего: 2, Пользователи: 0, Гости: 2)