Anyone making >=$250 a day?

Hi,

I've just worked out that if I can make $250 a day I will be able to retire at the grand age of 27 :D

So my question,

If you can make either $250 or more a day through adsense, how many sites are you running/how popular are they?

I ask so I have a goal and need someone to inspire me! :]

cheers

JP

p.s I doubt I would become a bum but it's nice to have a real goal :]

Making the block reward dependent on the difficulty?

I am looking for papers which discuss, if making the block rewards dependent on the difficulty could be used to curb excessive PoW growth.

Idea is that BTC price roughly drives difficulty and energy consumption proportionaly. If the block rewards would decrease with difficulty (like in reward=(a+b/difficulty) with suitable constant values for aand b) then it would become much faster unprofitable to add more hash power, thus curbing the growth of total hash power and energy consumption.

This must have been discussed somewhere before, but I can not find anything related.

algorithm – Making a level progression system similar to Bravely Default’s

So I am working on an RPG and I want the level up system to be similar to Bravely Default’s, which must be similar to how FF classically levels up characters.

What I know about the level up in the game is that.

  1. The game starts of with a large exp pool to fulfill, and the enemies give large drops of exp too (ex: in lvl 1 areas enemies give 50-150 exp points, and you need around 500 exp to reach lvl 2 and so on)
  2. The larger the level, the more exp you will need (to the point you need x0 000 exp points to continue in the midgame), however in the late game, the exp point does not increase exponentially (let’s say it doesn’t reach x00 000 not even at level 99)

Obviously, we want more effort to gain more levels, but this is more about assigning the enemies appropriate exp points depending on the region of the game.

Currently my algorith is lvl = constant * sqrt(exp), however I feel this formula doesn’t work for very large numbers.

bitcoin core – Making a valid Block from the mempool

I have a mempool which consists of random transactions with satoshis and weight

I want to make valid block from mempool which yields me more fees.

I need the logic/algorithm to get output as a valid block which maximize the fees.I know

to sort transactions by sat/vb…But can’t make it successfully

fa.functional analysis – Making rigorous a suggested Newton-Raphson like approach for finding root of a functional on $H^1_0$

I am trying to figure out the reasoning behind the proposed method in the following document. So we have the following non-linear equation on the unit square $Omega=(0,1)^2$ given by
$$-mu Delta u+rho u^2=1,;;; text{ in weak form };;; mu intnabla ucdot nabla v +rho int u^2v-int v =0,;;forall vin H^1_0(Omega),$$
with $mu$ and $rho$ being constants.

The author starts with the following. He defines
$$F(u)=mu intnabla ucdot nabla v +rho int u^2v-int v,$$

He then fixes a basis function $phi_i$ of $H^1_0(Omega)$ (he’s using the finite element basis but I think his argument can also work for other bases for $H^1_0$). For this basis function corresponds a functional $F_i:H^1_0(Omega)tomathbb{R}$ defined by
$$F_i(u)= mu intnabla ucdot nabla phi_i +rho int u^2phi_i-int phi_i.$$
Then he says that we have to find a root for $F$ (I think he meant $F_i$) by computing it’s Jacobian applied to an element $deltain H^1_0$ as follows:
$$J_F(u)delta=muint nabla deltanablaphi_i+2rhoint udeltaphi_i. (*)$$

  • 1st question: since there is a $phi_i$ appearing in $(*)$, does he mean $J_{F_i}$ instead of $J_F$?

  • 2nd question: how did he obtain $(*)$? More specifically, how did he compute the functional derivative?

Then he applies the well-known Newton-Raphson mathod as follows: he takes an initial guess $gin H^1_0$, and then defines the sequences ${u_n}_{ngeq 0}$ and ${delta_n}_{ngeq 1}$ as follows:
$$u_0=g,;;;; J_F(u_n)delta_{n+1}=F(u_n),;;;;u_{n+1}=u_n+delta_{n+1},;;forall ngeq 0.$$
Supposedly, the sequence $u_n$ should converge to the solution $u$ and $delta_n$ should go to 0.

  • 3rd question: how does one show that $u_nto u$?

I’m really confused with the lack of detail in linked document, but I think the author is onto something, and any help or reference to this would be great.

security – Making a domain more trustworthy to corporate networks so that it won’t be blocked by their filters

I developed a web app for a customer which is made in basic PHP/MySQL, pretty normal site, lighter than WordPress, and when my customer went to his client to sell the app the domain was blocked by the internal router.

He was first on the guest-WiFi, domain was blocked, but then they tried to plug his computer directly to the router with a cable, domain was still blocked. His clients are big factories, and I know those tends to have higher security on their local network.

I’m looking for solutions to make his domain trustworthy so this doesn’t happen again when he presents what he has to sell. My research was not concluding enough for me as it just gives me examples to make the website LOOK more trustworthy or it’s people having problems with their home network. Hence why I’m here looking for help.

Aside from manually white-listing his domain on each factories’ network he visit, is there a solution?

The only thing I figured out so far is that it may be because his domain is young and only renewed for 1 year at a time, we suggested him to renew for 5 years at a time, but I fear that this won’t be enough. Is there something to do in the DNS?

I sadly don’t have any information of the factory’s network setup and protections. I’m more looking for a solution that would work everywhere, if possible. Like Facebook will never be blocked anywhere because of its authority and trustworthiness, but how do I get a domain to that level of acceptance by security?

Domain name: hybpreventionconseil.ca

c++ – Making an animated text’s background transparent

Ok, so:
I’m building a website. Since i’ve been using this C++ programming language since like, not more than 3-4 months ago, i need experience. And I dont know how to make this possible, what happens is this:

I have an animated text whose background is a drawing I made.
I want the background to be intact by this embed on top of it.
And (whole) the code is this:

`

body {
background-image: url(‘https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/3fa27849-0dc3-40aa-9259-e6bef6b5a1f2/del54v0-6257d715-eb1c-4e26-9a40-16828366bbb7.png/v1/fill/w_960,h_720,q_80,strp/lion_by_isaac7500_del54v0-fullview.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7ImhlaWdodCI6Ijw9NzIwIiwicGF0aCI6IlwvZlwvM2ZhMjc4NDktMGRjMy00MGFhLTkyNTktZTZiZWY2YjVhMWYyXC9kZWw1NHYwLTYyNTdkNzE1LWViMWMtNGUyNi05YTQwLTE2ODI4MzY2YmJiNy5wbmciLCJ3aWR0aCI6Ijw9OTYwIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmltYWdlLm9wZXJhdGlvbnMiXX0.Th9GxX7iDyzFwYpoe8UzBQel6wI65SvJyh5b7Pflyhw’);
background-size: cover;
background-position: center;
text-align: center;
color: black;
padding-top:10em;
}

* { color:#fff; text-decoration: none;}

var TxtType = function(el, toRotate, period) {

this.toRotate = toRotate;

this.el = el;

this.loopNum = 0;

this.period = parseInt(period, 10) || 2000;

this.txt = ”;

this.tick();

this.isDeleting = false;

};

TxtType.prototype.tick = function() {

var i = this.loopNum % this.toRotate.length;

var fullTxt = this.toRotate(i);

if (this.isDeleting) {

this.txt = fullTxt.substring(0, this.txt.length – 1);

} else {

this.txt = fullTxt.substring(0, this.txt.length + 1);

}

this.el.innerHTML = ”+this.txt+”;

var that = this;

var delta = 200 – Math.random() * 100;

if (this.isDeleting) { delta /= 2; }

if (!this.isDeleting && this.txt === fullTxt) {

delta = this.period;

this.isDeleting = true;

} else if (this.isDeleting && this.txt === ”) {

this.isDeleting = false;

this.loopNum++;

delta = 500;

}

setTimeout(function() {

that.tick();

}, delta);

};

window.onload = function() {

var elements = document.getElementsByClassName(‘typewrite’);

for (var i=0; i .wrap { border-right: 0.08em solid #fff}”;

document.body.appendChild(css);

};

`

security – Making a domain more trustworthy to the “eyes” of local networks

I developed a web app for a customer which is made in basic PHP/MySQL, pretty normal site, lighter than WordPress, and when my customer went to his client to sell the app the domain was blocked by the internal router.

He was first on the guest-wifi, domain was blocked, but then they tried to plug his computer directly to the router with a cable, domain was still blocked. His clients are big factories, and I know those tends to have higher security on their local network.

I’m looking for solutions to make his domain trustworthy so this doesn’t happen again when he presents what he has to sell. My research was not concluding enough for me as it just gives me examples to make the website LOOK more trustworthy or it’s people having problems with their home network. Hence why I’m here looking for help.

Aside from manually white-listing his domain on each factories’ network he visit, is there a solution?

The only thing I figured out so far is that it may be because his domain is young and only renewed for 1 year at a time, we suggested him to renew for 5 years at a time, but I fear that this won’t be enough. Is there something to do in the DNS?

I sadly don’t have any information of the factory’s network setup and protections. I’m more looking for a solution that would work everywhere, if possible. Like Facebook will never be blocked anywhere because of its authority and trustworthyness, but how do I get a domain to that level of acceptance by security?

Domain name: hybpreventionconseil.ca

Thank you for your time in advance.

Making an HTTP subrequest causes CurrentRouteMatch to have the wrong route

For complicated and unpleasant reasons(*), I want to embed entity data from the JSONAPI module inside JSON returned from a REST module resource.

I am trying to do this by making an HTTP subrequest to tge JSONAPI module route within the REST module resource class.

Like this:

    $kernel = Drupal::service('http_kernel');

    $current_request = Drupal::request();

    $request = Request::create('/jsonapi/paragraph/' . $paragraph->bundle() . "https://drupal.stackexchange.com/" . $paragraph->uuid->value);
    $request->setSession($current_request->getSession());

    $response = $kernel->handle($request, HttpKernelInterface::SUB_REQUEST);
    $json = $response->getContent();
    $data = json_decode($json, TRUE);

I get the data I want and it’s great!

However, the request to the REST resource endpoint crashes with this:

SymfonyComponentSerializerExceptionNotEncodableValueException: Serialization for the format “api_json” is not supported. in SymfonyComponentSerializerSerializer->serialize() (line 112 of /var/www/vendor/symfony/serializer/Serializer.php).

This is because in DrupalrestEventSubscriberResourceResponseSubscriber->getResponseFormat(), $route = $route_match->getRouteObject(); is the JSONAPI module route from the subrequest, and not the route from the main request.

What am I doing wrong with my subrequest?

(*) Enormous amount of custom code powering a REST resource for a decoupled front end. I want to change it to using JSONAPI but it’s a massive change with huge repercussions on the frontend. Changing over gradually to JSONAPI by switching some paragraph types to the JSONAPI format. Could call the JSONAPI module’s PHP code directly, but that’s not a public API and so future versions of Drupal could break it. Making a subrequest is using the API and so more maintainable.

How can I replace WordPress standard process of editing posts with making WordPress use a custom page?

I have the following problem: When I want to edit the content of posts, WordPress simply opens its standard page editor where I can add and arrange blocks, control the general page design and what not. That page editor comes with tons of controls and in my case also all kinds of additional parameter areas for various plugins (like Yoast SEO and Content Egg etc), so it looks kind of cluttered or freightened with many elements not needed when you simply want to edit a post’s content. Only among others can I edit the post content (text) there.

What I would like WordPress to do is to open a custom page where I can just edit the post content (text) and submit the changed text back to the underlying database.

So how would I go about directing WordPress to opening some custom page I have created where I can simply edit the post content, without all the editing facilities of WordPress around?

The custom post editing page would probably a form with a message field where I can edit and submit the post content. How exactly would I need to build that form so that the (edited) post content is stored back into the database when I click on the form’s submit button?