some sleep training tips!

Ok here are some sleep training tips.

It’s bedtime but the baby looks quite energetic. Do you put the baby to sleep or do you want to stay up until it gets really tired? The answer is simple bedtime is bedtime and even if the baby does not look tired It should go to sleep really fast. Just remember this only will happen if the baby had proper energy burned throughout the day and was fed well!

Validate password so that it does not allow character repitition n times

So you want to make sure that your ascii password doesn’t haven any character recurring more than n times.

Here is what I came up with!

Unicoding…just increase your int array to accommodate!

static bool HasMultiple(string pass,int num)
{
var CharCheck = new int[256];
for (int x = 0; x < pass.Length; x++) {

if (CharCheck[pass[x]] > num-1)
{
return true;
}
else
{
CharCheck[pass[x]] ++;
}
}
return false;
}