## networking – Program to continuously check availability of internet connection c#

I have a C# program to check if a hard coded host is available and if not, waits 5 seconds then checks again (this is a loop). How can it be enhanced?

``````using System;
using System.Net.NetworkInformation;
using System.Windows.Forms;

namespace trial17
{
public partial class Form5 : Form
{
public Form5()
{
InitializeComponent();
}

static Ping p = new Ping();
static string host = "8.8.8.8";
static byte() buffer = new byte(32);
static int timeout = 1000;
static PingOptions po = new PingOptions();
//plays media if connected
System.Media.SoundPlayer player = new System.Media.SoundPlayer("media file path");

private void Form5_Load(object sender, EventArgs e)
{
try
{
Show();
conn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
async void conn()
{
try
{
pr = p.Send(host, timeout, buffer, po);
if (pr.Status == IPStatus.Success)
{
player.Play();
//label updated after connection
label1.Text = "Connected";
}
else
{
conn();
}
}
catch (Exception) {
}
}
}
}
``````

## Second order elliptic PDE problem with boundary conditions whose solutions depend continuously on the initial data

Consider the following problem
$$begin{cases} -Delta u+cu=f,&xinOmega\ u=g,&xinpartialOmega end{cases}$$
where $$Omegasubseteqmathbb R^n$$ is open with regular boundary, $$cgeq0$$ is a constant, $$fin L^2(Omega)$$ and $$g$$ is the trace of a function $$Gin H^1(Omega)$$. If we consider $$u$$ a weak solution to this problem, and define $$U=u-Gin H_0^1(Omega)$$, it is easy to see that $$U$$ is a weak solution to the following problem
$$begin{cases} -Delta U+cU=f+Delta G-cG,&xinOmega\ U=0,&xinpartialOmega end{cases}$$
It is also easy to see that we can apply Lax-Milgram theorem with the bilinear form
$$B(u,v)=int_Omegaleft(sum_{i=1}^nu_{x_i}v_{x_i}+cuvright)$$
and the bounded linear functional
$$L_f(v)=int_Omega(f-cG)v-int_Omegasum_{i=1}^n G_{x_i}v_{x_i}$$
to conclude there exists a unique weak solution $$U$$ to the auxiliary problem defined above. If we define $$u=U+Gin H^1(Omega)$$, it is clear then that this function will be a solution to the original problem.

Now to the question: I would like to prove that this solution $$u$$ depends continuously on the initial data, that is, that there exists a constant $$C>0$$ such that
$$lVert urVert_{H^1(Omega)}leq C(lVert frVert_{L^2(Omega)}+lVert GrVert_{H^1(Omega)})$$
I feel that the work I have done to prove that $$L_f$$ is bounded should be relevant for our purposes, because
$$lVert urVert_{H^1(Omega)}leqlVert UrVert_{H^1(Omega)}+lVert GrVert_{H^1(Omega)}$$
and
$$lVert UrVert_{H^1(Omega)}leq C B(U,U)^{1/2}= C|L_f(U)|^{1/2}$$
The problem is that I don’t know how to manipulate $$L_f(U)$$ to obtain the result. I have managed to prove a completely useless inequality, for it involves the norm of $$U$$.

P.S. The problem is that a priori $$Delta G$$ doesn’t have to be in $$L^2(Omega)$$, which makes it hard to use the $$H^2$$ regularity of $$U$$ (which would solve the problem instantly).

P.S.S. Also posted this question in SE.

## formulas – I am getting input mismatch exception error continuously?

formulas – I am getting input mismatch exception error continuously? – Web Applications Stack Exchange

## design – Continuously updating a state object bad practice?

Say I have a state machine which returns a State object. Depending on the State (“Home”, “Lost”, “Known Location”), I would like to enforce some logic, e.g. if State is “Lost” I need to enforce dropping a breadcrumb.

So I have a function goForWalk that is maybe a MDP, I am debating between the two following designs:

``````def goForWalk():
walk_state = State()
for numSteps in walk:
current_state = calculateState().
if current_state == "Known Location":
elif current_state == "Lost":
return walk_state

class State:
def __init__(self):
self.state = None
if state == "Lost":
self.state = state
``````

Under the constraint that TerminalState needs to execute some logic based on its state, which could be continuously updated, (I may go from “Lost” to “Known Location” to “Lost” again). I feel like there is a better way to do this if there are suggestions/pointers!

## st.statistics – Whether to use binomial or Poisson distribution, when events are not able to happen continuously, but an average rate is known

Let us say there are on average 15 snowy days in December.

Let $$X$$ be the number of snowy days in a given December.

Is the binomial distribution, with $$X sim B (31, frac{15}{31})$$, or the Poisson distribution, with $$X sim Po(15)$$, correct?

(My argument for the binomial distribution is that there cannot be multiple snowy days in one day.)

## sharepoint enterprise – SP host controller service keep on stopping/disabled continuously

I have created a search service application few days back, but when I started crawl getting an error

Could not connect to the search administration web service on server ‘Server Name’ because the web server is not running.

When I googled it I found it was because of SP Host Controller is disabled, I started the services and set the start-up type to automatic with Logon account domainSPFarm same for search application. But don’t know why the service is getting stopped and disabled, due to the same search crawl and search both is impacting. Please suggest.

## macbook pro – Wifi connection continuously cuts out

I have been having an issue I can’t seem to fix. The WIFI on my 2017 Macbook Pro keeps cutting out, about once every 10-20 minutes. When this happens I lose internet connection and when I click on the wifi icon in the menu bar it shows that my wifi is on and connected to my network, but my network, as well as all other available wifi networks, are greyed out and I am unable to click anything. Turning the wifi off and back on temporarily fixes the problem.

Here is a list of things I have tried so far:

Restart computer
Turn wifi on/off
Remove network and reconnect
Remove wifi service and reestablish
Rebout router
Factory restore of router
New SSID, new channels, new wifi password
Reset the PRAM & SMC
Updated the Mac OS to Big Sur (from Catalina)
Ran Wireless Diagnostics

Running Wireless Diagnostics initially finds nothing when the internet is working, but then when this happened it does detect a “Dropped Wi-Fi Connection”, stating that:

Your Mac experienced an unexpected Wi-Fi connection drop, which can be
caused by a combination of environment, configuration, and software
problems.

Provide the diagnostics report created in /var/tmp to an AppleCare
customer support representative for further analysis.

I looked into the logs, but am not really sure what I am looking at. And to make matters worse the applecare on this machine just expired.

Also worth noting that the network has been, and continues to work fine for all other devices (another macbook pro, two iphones, smart tv, etc.) and nothing major changed with the network before this occurred.

Any tips on what to try next?

## web hosting – How do I continuously run and host Node.js script on Heroku?

I currently want to deploy a website ranking API, and for that I need a web crawler. The thing is I want to keep the web crawler running 24/7 so it can continuously update the websites. However, with services like Heroku, after one hour the server stops. So all my crawling progress is gone and I have to recrawl. How do I host a Node.js script that is always alive on Heroku. If it is not possible, what else can I do?

## usability – Best UX for displaying a continuously scrolling set of videos

I have a constantly updating (every few seconds) set of videos being uploaded by users and I need to display them continually updating. What is/are the best practices for showing a constantly refreshing set of videos?

There are some thoughts I have:

• Netflix style horizontal scrolling, but continuously moving left, so the user has time to review and stop the scrolling.
• Display a grid/gallery and change the thumbnails one by one, so the user has time to quickly scan to see if any are of interest

What other ideas would you recommend?