## inverse – How to get x value where area under curve is some number?

My goal is to get x value where area under the curve (from the x ~ infinity) is about 0.05. But the code which I have tried shows errors. How to correct it?

``````Solve(!(
*SubsuperscriptBox(((Integral)), (x), ((Infinity)))(
*FractionBox((
*SuperscriptBox((E), ((-x)/2))
*SuperscriptBox((x), (3/2))), (3
*SqrtBox((2 (Pi))))) (DifferentialD)x)) == 0.05, x)
``````

## Regex To Validate A String, But The String Can’t Contain n Number Of A Specific Character

Recently I ran into a validation situation I’ve been trying to solve with regex. The rules are as such:

• Center of the string may be of any length
• Center of the string may have any combination of upper and lower case letters and numbers
• Center of the string may have up to one underscore
• Must end with a number

I have attempted to match this string with the following regex:

``````^(?!_{2,})((A-Z)(a-zA-Z0-9_)*(0-9))\$
``````

and

``````^(?<=_{0,1})((A-Z)(a-zA-Z0-9_)*(0-9))\$
``````

Both of these attempts still match cases where there is more than one underscore present. I.E. `App_l_e9` or `App__le9`.

How can you check to see if your regex match, I.E. the `((A-Z)(a-zA-Z0-9_)*(0-9))` part contains zero or one underscore in any place within the middle of the string?

## analytic number theory – What’s the average order of the reduction of a section of an elliptic curve

Suppose $$E$$ is an elliptic curve over $$mathbb Q$$ and $$x in E(mathbb Q)$$ is not torsion. We can reduce $$x pmod p$$ for a prime $$p$$ of good reduction and it will have some order $$n_p$$ in the group $$E(mathbb F_p)$$. Has there been any work on the asympotitcs of the average of $$n_p$$ for $$p < X$$ as $$X to infty$$?

More generally, suppose $$x,y in E(mathbb Q)$$ are two linearly independent sections and let them generate subgroups $$G_x(p),G_y(p) subset E(mathbb F_p)$$ for a prime of good reduction. Have the asymptotics of the average of $$G_x(p)cap G_y(p)$$ been studied?

This question seems tangentially related.

## combinatorics – Number of ways a committe can be formed

In how many ways can a committee of four be formed from 10 men (including Richard)
and 12 women (including Isabel and Kathleen) if it is to have two men and two women

a) Isabel refuses to serve with Richard,

b) Isabel will serve only if Kathleen does, too

My Thoughts :
a) Total number of ways to select 4 people = 22C4 now for part a) I just need to deduct the
pairs where Isabel and Richard are both in the committe which = 20C2

I am not sure how to proceed with part (b) and if part (a) is entirely correct

## random – This code is a non-static C# class for rolling a number of dice

Fellow human beings, today I present to you my dice rolling script! Behold, in my amateurish attempt at some raw C# code. Perhaps this will remain here regardless of the dozens of other dice rolling scripts out there.

### Contains a ‘for’ loop, a ‘switch’, and a method that returns a value.

I have indeed read through other, similar iterations of this class, and I have found them to be lacking in what I might learn from, usually due to over-complication for my tiny brain, or because it invoked the use of libraries I have yet to hear of.

I did my best to make it easy to read for whichever intrigued person stumbles upon this. I deeply respect and appreciate any who may take the time to offer any criticism on my code. What did I do right? What did I do wrong? I don’t have anyone or anywhere else to share it with.

``````using System;

namespace C_
{
class RollDice : Program
{

//Variables

int numOfDice;
int numOfSides;

int maxDice = 100;
int minDice = 1;
int maxSides = 100;
int minSides = 1;
int totalRolled;

//Start method for number of Dice to throw - take the player input in InputMethod() which returns an int. If returning 0, then restart. Clamp the value between min/max. Continue to next function.

public void GetDice()
{
Console.WriteLine("Welcome to Roll Dice!");
Console.WriteLine("How many dice do you want to throw?");
numOfDice = InputMethod();
if(numOfDice == 0)
{
GetDice();
}
if (numOfDice > maxDice || numOfDice < minDice)
{
numOfDice = Math.Clamp(numOfDice, minDice, maxDice);
Console.WriteLine(\$"Number of Dice set to {numOfDice}");
}

GetSides();
}

// Get the sides of each dice by using a similar process. Roll() for each dice, then sum the totals in RollTotal().

public void GetSides()
{
Console.WriteLine("How many sides does each dice have?");
numOfSides = InputMethod();
if(numOfSides == 0)
{
GetSides();
}
if (numOfSides > maxSides || numOfSides < minSides)
{
numOfSides = Math.Clamp(numOfSides, minSides, maxSides);
Console.WriteLine(\$"Number of Sides set to {numOfSides}");
}

for (int x = 1; x <= numOfDice; x++)
{
Roll();
}

RollTotal();
}

// Create a new Random() instance for the number of sides and add it to the totalRolled variable.

public void Roll()
{
Console.WriteLine(".....");
Console.WriteLine("Rolling");
Random r = new Random();
var result = r.Next(1, numOfSides + 1);
Console.WriteLine(\$"You rolled {result}");
totalRolled += result;
}

// Output the total and prompt to roll again or quit. Reset the total..

public void RollTotal()
{
Console.WriteLine(\$"Total sum rolled is {totalRolled}");
Console.WriteLine(" ");
Console.WriteLine("Enter 1 to re-roll or 2 to quit.");

{
case 0:
RollTotal();
break;

case 1:
totalRolled = 0;
GetDice();
break;

case 2:
totalRolled = 0;
Environment.Exit(0);
break;

default:
Environment.Exit(0);
break;
}
}

//Convert the input to an integer if valid and return the value. Else return 0.

public int InputMethod()
{
if(!Int32.TryParse(input, out int convertedStringToInt))

{
Console.WriteLine("You need to enter a valid number!");
return 0;
}

else

{
return Convert.ToInt32(input);
}

}

}
}
``````

## What does two asterisks mean in this strange USA “phone number”? (**)

These are special “StarStar” numbers offered by StarStar Mobile: https://www.starstarmobile.com/

So the asterisks don’t really represent anything, they’re literal representations of `*` key/button you find on any phone.

While I’m not familiar with the details of the implementation, it appears to be a clever hack on VSCs, which are how telcos let you control various telephony features via the network itself:

https://en.wikipedia.org/wiki/Vertical_service_code

So presumably the Star Star folks have struck a deal with the big telcos to route any calls starting with `**` their way, and they can then forward the calls to the paying customers.

## Google Analytics – Match URLs on Unique Number in Content Drilldown Using RegEx?

I am trying to track pageviews on Google Analytics for knowledge base articles (on Zendesk).
Each article has a unique number. However, the title of the page is sometimes appended to the URL, and GA tracks this as a separate page. If the title of the article changes, it generates a new URL.

For example, these would all be the same article, so I want to see a single pageviews count, but GA would show as 3 separate stats

``````/hc/en-us/articles/360039413394
/hc/en-us/articles/360039413394-How-To-Make-A-Sandwich
/hc/en-us/articles/360039413394-How-To-Make-A-Turkey-Sandwich
``````

I want GA to roll up the articles matching on the unique number, and ignoring everything after that. Is there a built-in way to do this? Is there a way to do this with Regex? Where would I add the Regex for the Content Drilldown page? Help!

Thank you.

## How to increase number of open connections for mongoDB from clients (C#)

mongoDB v4.0.4 >> replica set of 3 nodes (not sharded)

Previously

``````su - mongo7937
No directory, logging in with HOME=/
\$ ulimit -Hn
1048576
\$ ulimit -Sn
1024
\$

cat /etc/pam.d/common-session | grep pam_limits.so

cat /etc/sysctl.conf | grep fs.file-max
``````

changed to

``````su - mongo7937
No directory, logging in with HOME=/
\$ ulimit -Hn
1048576
\$ ulimit -Sn
64000
\$

cat /etc/pam.d/common-session | grep pam_limits.so
session required        pam_limits.so

cat /etc/sysctl.conf | grep fs.file-max
fs.file-max = 2097152

sysctl -p
``````

So earlier my max number of connections were limited to 818 which is 80% of 1024.
As per recommendation from mongoDB documentation I’ve increased the limit to 64000 but still when mongo c# client reaches max open connections to 818, my mongoDB abruptly stopping.

Is there working command set for c sharp driver to limit number of connection client end ?
because whatever we tried is not working, can someone share if that is working for you.

Else can someone tell me the right steps to limit number of open connections from mongoDB side and at server user level.

## What is normal verified links number in Tier 1/2/3?

What is normal verified links number in Tier 1/2/3?

## Is it possible to search for a phone number in Google?

Is it possible to search for a phone number in Google?
Not concrete phone number, but some phone pattern, for example, phone number with country code.
For example query:

“some words” +1*

to search for the “some words” and some USA phone number (+1 country code).
Is there some regex alternative in Google search?
I can use query

“some words” +1 *

(additional space between the country code and the phone number body)
But in this case Google will search for +1 XXXXXXXX phone number, but not for +1XXXXXXXX.