jquery – Limit numer of rows in data from json file

I would like to limit the number of songs to only the first 10 songs. Currently, it lists all songs played the last week.


            $(document).ready(function () { 

                // FETCHING DATA FROM JSON FILE 
                        function (data) { 
                    var song = ''; 

                    // ITERATING THROUGH OBJECTS 
                    $.each(data, function (key, value) { 

                        //CONSTRUCTION OF ROWS HAVING 
                        // DATA FROM JSON OBJECT 
                        song += '<tr>'; 
                        song += '<td>' +  
                            value.song + '</td>'; 

                        song += '<td>' +  
                            value.artist + '</td>'; 

                        song += '</tr>'; 
                    //INSERTING ROWS INTO TABLE  

integration – Help with a limit involving incomplete beta integral

In trying to prove that the limit of a certain function approaches 1 as the a positive integer parameter $n$ approaches inifinity ,I have ended up with the following intermidiate expresiion:
$$ h(n)=n(n-1)/2 left( frac{f(n)}{n+1}-frac{g(n)}{n-1}right)$$
Can somebody kindly help me with the evaluation of $ lim_{n to infty} h(n) ?$>If somebody could also plug it in Mathematica ,I would be highly obliged.Thanks for any help in advance .
PS: In the above the notation $B_z(a,b)$ stands for the incomplete beta function defined by:
$$B_z(a,b)=int_0^z u^{a-1}(1-u)^{b-1} du$$.

Firebase Storage Rules: how to limit user to an overall upload limit

I have the following problem concerning Storage Rules in Firebase:

I want a save way to check a user’s overall uploaded MBs before uploading the next file.

As there is no way to access the real time db from the the Storage Rules, the idea was to store a user’s uploaded MBs somewhere else (where it is accessible by the storage rules).

But as I can see from the Firebase Docs: Storage Rules you only have the following variables available:

  1. The resource variable: gives you access to the file’s metadata and other data like path, bucket etc.
  2. The request variable: gives you info to the current user (Auth User Object), stuff like uid, token, email etc.

First of all:

  • The metadata is not a save way to store this information because it comes from frontend and can be manipulated, so this option can be ruled out

As far as I see the only possibilities left are

  1. Save this information as custom data to user within the Auth-User Object, HOWEVER that doesn’t seem possible (with the exception of claims which should be used for access topics only see here)
  2. Access another file within a directory, e.g. index.txt which has the information within its metadata and cant be accessed by the user and is updated after every upload , HOWEVER it isn’t possible to access other files than the one being uploaded as far as I understood
  3. Cloud Functions: we could trigger a specific cloud function that gets triggered on upload HOWEVER there is no trigger before the upload, only after as far as I have understood (and anyway I don’t know if the CF would be powerful enough to cancel an upload ??)

So I’m running out of ideas…

I guess this should actually rather be a feature request on Github, but who knows maybe I missed something?

BTW: I read this medium article and it looks like the proposed method is flawed as well as the token comes from the front end and can be manipulated (see comments in the article)

PS: I would be open to other suggestions how this problem can be solved (e.g. not with Firebase Storage Rules but Cloud Functions, or use a different type of Storage rule that achieves the same goal?)

Best regards

windows – The limit of Windows10 Context Menu Share (the size and count of file)

I noticed that Share feature in right click context menu may be failed to share files sometimes (like the screenshot)

enter image description here

In my PC, I usually met this problem if I selected more than 10 files (11 png, total size is 385KB), but it could work sometimes (the content of share panel could be shown and features could work correctly).

Another case was I selected 4 videos (total size is around 10 MB) and encountered same problem.

I couldn’t find any document on Microsoft site to elaborate the limitation, does anybody knows the limit of context menu share feature? Or you guys can point me a way to find the limitation. Many thanks.

P.S My PC’s version

enter image description here

why bitcoin limit difficulty adjustment timespan by four?

from here: https://github.com/bitcoin/bitcoin/blob/master/src/pow.cpp

 // Limit adjustment step
 int64_t nActualTimespan = pindexLast->GetBlockTime() - nFirstBlockTime;
 if (nActualTimespan < params.nPowTargetTimespan/4)
     nActualTimespan = params.nPowTargetTimespan/4;
 if (nActualTimespan > params.nPowTargetTimespan*4)
     nActualTimespan = params.nPowTargetTimespan*4;

I know that code used to control network difficulty adjustment timestamp to at less 1 quarter of the target timespan and at most 4 times the target timespan. But why 4 was chosen? why not 2, or 3, or 5?

Limit search engine results to first 100 or less


i want to limit search engine results to the first 100 results or less. 

How can i do this?

Thank You.

The reason is i’m using scrapebox for non english content, and after the first 40-50-60 or so results, the sites scraped are no longer relevant and its way better and faster to use long tail keywords.

pr.probability – Ljapunow condition on scheme of random variables for generalization of central limit theorem

on numerical tests I see that the scaled and centered sum of dependent variates
{X_1, X_2, …, X_m}hspace{1cm} text{ with } hspace{1cm} X_i sim Bin(n,theta_i), hspace{1 cm }theta_i sim Beta(alpha_i, beta_i)

is normal distributed. For the Ljapunow or Lindeberg version of the CLT it is not a problem that the random variables are not identical distributed. And I guess that the variates meet the requirements. (will check that)

I assume that the dependence can be described as a mixing process. The dependence might vary as it is derived via a minimum spanning tree. I guess the next step would be to find a scheme of random variables and check again if the Ljapunow or the Lindeberg requirement apply.

Could one of you smart guys approve this approach? Or are you experienced with dependencies of the variates with respect to the CLT? Is there a good paper suggestion? Do you have tipps about how create a scheme of random variables? Do you have suggestions which of the both requirements is more easily accessible?

Thanks a lot

How to limit impact of a bad application on MariaDB Galera Cluster with MaxScale?

I have a Galera Replication cluster with three MariaDB nodes where a Maxscale Active-Passive cluster in front provides a single node image to tis clients.

I have a bad behaving client, which opens connections and doesn’t close them. No of connections keep increasing till database limits hit. To limit the number of connections I have configured below two params


My situation is this, When I have only max_connections configured, whenever the limits are reached Galera node stops accepting more connection with error of “Too many connections”. When Maxscale see this connection rejections for n number of times, it puts the server under Maintenance mode. I can understand this behaviour, it’s expected.
When I configure max_user_connections, and because the application is behaving bad and trying to make new connections continously, when the userspecific limit reaches further attempt of connections fails to the mariadb nodes in backend. Maxscale observes these failures, and again puts the server in Maintenance mode. I believe during this time it only sees connections attempt from the bad client, no other application tried to connect.

And this way, MaxScale puts all three nodes in Maintenance mode over the time, which makes complete DB service unavailable.

For me as administrator, situation becomes same, puting a user specific limit doesn’t achieve anything. I would like to ask two points here

Q1. How can I prevent just one user connection failures from puting the backend mariadb node into maintenance?

Q2. Any documentation, or tutorials, article reference on how and when MaxScale decides to put a server in Maintenance mode?

Below are the details about the environment

Galera – 25.3.23,
MariaDB – 10.3.12,
MaxScale – 2.4.11,
OS – RHEL 7.4 (Maipo)

Here is my configuration

MariaDB Galera Configuration


# this is only for the mysqld standalone daemon
#user statistics
# * Galera-related settings
# Mandatory settings
wsrep_provider_options="gcache.size=300M; gcache.page_size=300M; pc.ignore_sb=false; pc.ignore_quorum=false"
#wsrep_cluster_address defines members of the cluster
#query logging
#slow queries
#error logs

Similarly all three Galera nodes are configured.

MaxScale configuration


# Server definitions



# Monitor for the servers

servers=mariadb1, mariadb2, mariadb3

# Service definitions

servers=mariadb1, mariadb2, mariadb3



plotting – Limit Y-axis Evaluation but NOT the Plot Range

I have seen some answers to similar questions, but usually they are satisfied with just limiting the plot using PlotRange.
I want to keep the plot range as I have it, and just limit the range that is evaluated.
I don’t want to show that horizontal line at 90 (which is part of the output) so I want to limit the output to just above 90 (like 90.1) so that I can instead show the horizontal dashed line as the output approaches it asymptotically.
I think it does not tell the story as clearly if I just limit the range to 90 since it would be approaching the x-axis so I want to keep the displayed range down to 80.

eq1 = NSolve(0.5==(-(Pi)/3)r^3(1/Cos((Theta)*Degree)^3)(2+Sin((Theta)*Degree))(1-Sin((Theta)*Degree))^2, (Theta));
Labeled(Plot((Theta)/.eq1, {r,0.6203, 6} ,ImageSize->700,ImageMargins->0,ImagePadding->{{22, 10}, {15, 5}}, PlotRange-> {{0,6},{90,180}}, GridLines ->{{{0.62,Dashed}}, {{90, Dashed}}}, Ticks ->{{0,0.62,1,2,3,4,5,6},{10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180}}),{"Contact Angle ((Degree))","Tube Radius",  "Maximum Contact Angle for Plug of Volume 1 at Critical Bond Number" }, {Left, Bottom, Top}, RotateLabel -> True, Spacings ->{0,1,0})

magento 1.9 – Mageto 1.9 UPS limit to 48 contiguous United Sates

I have set UPS Ground as Free Method in the UPS shipping method configuration. And an amount of 75 dollars as Minimum Order Amount for Free Shipping.

This is working fine. But I need a Free shipping exception for the states of Alaska and Hawaii. How do we accomplish this in Magento 1.9?

As per the configuration, these 2 states are also showing UPS Ground as a free method.

Please help.

enter image description here