text:
Q: On the intersection of two Orlicz spaces It is well-known that if $1\leq p\leq q\leq \infty $ then
$$ L^p(X)\cap L^q(X)\subset L^r(X)\quad\quad  \text{whenever $r\in [p,q]$}\tag{I}\label{Eq}.$$
Indeed let $u\in L^p(X)\cap L^q(X)$. For some $0\leq \theta\leq 1$ we can write $$\frac{1}{r}=\frac{1-\theta}{p}+\frac{\theta}{q} $$
so that, $|u|^{1-\theta}\in L^{p/1-\theta}$ and $|u|^{\theta}\in L^{q/\theta}$ and the Hölder's inequality implies,
$$\|u\|_{L^r(X)}\leq  \|u^{1-\theta}\|_{L^{p/1-\theta}(X)}\|u^{\theta}\|_{L^{q/\theta}(X)}= \|u\|_{L^{p}(X)}^{1-\theta}\|u\|_{L^{q}(X)}^{\theta}.$$
Replacing $\theta=\frac{\frac{1}{r}- \frac{1}{p}}{\frac{1}{q}- \frac{1}{p}}$ by its value gives
$$\|u\|_{L^r(X)}\leq \|u\|_{L^{p}(X)}^{\frac{\frac{1}{q}- \frac{1}{r}}{\frac{1}{q}- \frac{1}{p}}}\|u\|_{L^{q}(X)}^{\frac{\frac{1}{r}- \frac{1}{p}}{\frac{1}{q}- \frac{1}{p}}}$$
Question: What is the analogue of the property \eqref{Eq} for Orlicz spaces of type $L^\phi(\Bbb R^d)$?
Any hint or references is welcome...
Recall the Orlicz space $L^\phi(\Bbb R^d)$:
\begin{align*}
 L^\phi(\Bbb R^d)&= \Big\{u: \Bbb R^d\to \Bbb R\text{ meas.}:~ \int_{\Bbb R^d}  \phi\Big(\frac{|u(x)|}{\lambda}\Big)d x<\infty ~~\text{for some $\lambda>0$}\Big\}.
 \end{align*}
The space $L^\phi(\Bbb R^d)$ is equipped with the Luxemburg norm $\|\cdot\|_{L^\phi(\Bbb R^d)}$ by
\begin{align}
 \|u\|_{L^\phi(\Bbb R^d)}=\inf \Big\{ \lambda>0~: \int_{\Bbb R^d} \phi\Big(\frac{|u(x)|}{\lambda}\Big)d x\leq 1\Big\}.
 \end{align}
Where $\phi$ is  a sufficiently nice Young function, e.g., $\phi$ is continuous, increasing, convex and in addition, the mapping $x\mapsto \frac{\phi(x)}{x}$, $x>0$ is increasing and satisfies
\begin{align*}
&\lim_{x\to 0^+}\frac{\phi(x)}{x}= \lim_{x\to \infty}\frac{x}{\phi(x)}= 0.
\end{align*}

A: It's many years ago that I read it, but I think that some of the most general interpolation type results for Orlicz spaces were contained in O'Neil, Richard, Integral transforms and tensor products on Orlicz spaces and $L(p,q)$ spaces, J. Anal. Math. 21, 4–276 (1968) which is practically a monograph. Some other interpolation results are in the monograph Rao, M. M. and Ren, Z. D., Theory of Orlicz spaces, Marcel Dekker, New York, 1991.


text:
Q: Testing for equivalences of $\infty$-categories on strictifications? It is in general not too hard to show that maps between finite $CW$-complexes/finite simplicial sets are homotopy equivalences.
Question : Can we do something similar for:

*

*quasi-categorical equivalences between finite simplicial sets.

*"finitely generated" monoidal quasi-categories. Where by finitely generated I mean in a "polygraphic way" i.e. by a finite sequence of pushout of maps in the image of the free monoid functors.

and eventually more generally for $(\infty,2)$-categories or even $(\infty,n)$-categories.
I'll be more precise:
For homotopy equivalence between finite simplicial sets for example you have an explicit presentation of the $\pi_1$-groupoid given by the $0$,$1$-cell and $2$-cell. If the $\pi_1$ is equivalent to a set then Hurewicz's theorem tells you that you can test if your map is an equivalence on homology, and homology of finite simplicial sets is easy to compute.
If the $\pi_1$ are non trivial, it is a bit harder, but you can manage using the homology of the universal cover, or cohomology with value in local coefficient which are also very computable.
To some extent it also works for some infinite simplicial sets if they have explicit enough presentation.
Now I have a precise conjecture that would perfectly answer my question which I would details, but I'm also open to different suggestion.
The case of spaces above can be rephrased as follow:
Theorem: The strictification functor from weak $\infty$-groupoids to strict $\infty$-groupoids is conservative. (i.e. detect weak equivalences)
That might require some explanation.
Strict $\infty$-groupoids have been proved by Brown and Higgins to be equivalent to "Crossed complexes". And one can see that Crossed complexes are basically a structure that encodes a $\pi_1$ and what you need to compute a 'twisted' homology.
What I call the strictification functor, is in modern terms the left adjoint to the forgetful functor from strict $\infty$-groupoid to weak $\infty$-groupoid. Such a functor exists because there is a "Folk model structure" on the category of strict $\infty$-groupoids constructed by Brown and Golanski meaning that the homotopy category of this model category is a cocomplete $(\infty,1)$-category and so there is a unique left adjoint functor from the $\infty$-category of space to the $\infty$-category of strict $\infty$-groupoid sending terminal object to terminal object.
And it basically corresponds to the construction sending a space to the crossed complex computing its $\pi_1$ and (co)homology (with local coefficient).
So similarly their should be a unique left adjoint functor from the category of $(\infty,n)$-categories to the  $\infty$-category of strict $(\infty,n)$-categories (the necessary model structure has been constructed by Ara and Metayer) which send the first $n$ globes to the corresponding globes.
In the case of quasicategories such a functor can for example be constructed by taking the left Kan extension of Street's Orientals, which gives a left adjoint functor from simplicial sets to strict $(\infty,1)$-categories, which I think is a Quillen functor for Joyal model structure and Ara-Metayer's folk structure on strict $(\infty,1)$-category.
Conjecture:The strictification functor from weak $(\infty,n)$-categories to strict $(\infty,n)$-categories is conservative.
The two case that are of main interest to me (and that corresponds to the first two points of my original question) is the case of the Kan extension of Street's Orientals from Joyal model structure to strict $(\infty,1)$-categories. And the conservativity of "the functor" from simplicial monoid (with quasi-categorical equivalences) to the category of "one object" $(\infty,2)$-categories (i.e. monoidal $\infty,1$-categories), which essentially corresponds to the second point of my initial question.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Get connection string and password from Azure management I am a user of Azure and want to get a connection string and email password from the azure management portal. I have put these two variables in the app settings and tried to get access to them on my website but the connection string always returns this error:
The ConnectionString property has not been initialized.
Here is my C# code:
private string connectionString = Environment.GetEnvironmentVariable("SQLAZURECONNSTR_bitverifydb");
private string emailPassword = Environment.GetEnvironmentVariable("APPSETTING_Password");

A: You can get your connection string and email password in your Azure App Settings by using the CloudConfigurationManager class in the "Microsoft.WindowsAzure.ConfigurationManager" namespace.
Note that you need to install the nuget package for this at the link below.
Microsoft Azure Configuration Manager
The sample code is as below:
private string connectionString = CloudConfigurationManager.GetSetting("SQLAZURECONNSTR_bitverifydb");
private string emailPassword = CloudConfigurationManager.GetSetting("APPSETTING_Password");

Hope this helps!

A: Make sure that you have added mentioned keys in your configuration files. You can refer the link below to get familiar with usage of CloudConfigurationManager.
How to use the CloudConfigurationManager

A: It's not clear from your question which Azure platform you are using. Some other answers assumed it's CloudService. However, in a case, you are using AppService, it's the same code as .NET using System.Configuration
var connString = ConfigurationManager.ConnectionStrings["bitverifydb"].ConnectionString;
var password = ConfigurationManager.AppSettings["Password"]


text:
Q: Either .each do or .all isn't working how I think it should So whenever someone rates  a shop, I want the Shop model to calculate its new average rating and store that in the database (instead of calculating the average every time someone looks at it).  So I wrote the segment of code that follows, and it doesn't work.
The loop always iterates exactly once, no matter how many shop_ratings in the database exist that have the shop's id as their shop_id.  I played around with it a bit and found that every time a new rating is submitted the function is called successfully, but it only runs the loop once and sets the average to what the first rating was.
I don't know if the "query" that sets the ratings variable is wrong or if it's the loop that's wrong.
class Shop < ActiveRecord::Base
  has_many :shop_ratings

  attr_accessible :name, :latitude, :longitude

  validates_presence_of :name
  validates_presence_of :latitude
  validates_presence_of :longitude

  def distance_to(lat, long)
    return (self.longitude - long) + (self.latitude - lat)
  end

  def find_average

    total = 0
    count = 0
    ratings = ShopRating.all(:conditions => {:shop_id => id})
    ratings.each do |submission|
      total = total +  submission.rating
      count = count + 1
    end
    update_attribute :average_rating, total/count
  end

end

A: Here is a better find_average method (btw, it should be called set_average_rating because you are not finding it, you are saving it)
shop.rb - Replacement for: find_average
def set_average_rating
  update_attribute(:average_rating, shop_ratings.average(:rating))
end

As you can see, we are leveraging AR's average calculation method, which returns a float. Doc: http://ar.rubyonrails.org/classes/ActiveRecord/Calculations/ClassMethods.html#M000293
Speaking of floats, the reason your existing code seems to not be calculating the average correctly is likely b/c you are not telling ruby that the final average is to be a float, not an integer. Hopefully you have defined your shop#average_rating field to be a float or decimal and not an integer.

A: if you want to know what happens, put some debug information into your code:
    ratings = ShopRating.all(:conditions => {:shop_id => id})
    # add this log
    Rails.logger.info "==== the raings of this Shop: #{ratings.inspect}"
    ratings.each do |submission|

and probably you will see the ratings only contains 1 element.
so, I suggest you re-implement your code :
change:
# previous:
ratings = ShopRating.all(:conditions => {:shop_id => id})
ratings.each do |submission|

to be:
# because you already defined  :
# has_many :shop_ratings
shop_ratings.each do |submission|


text:
Q: Category list is not showing in wordpress I have two custom post types. When I select particular category the posts which are listing is not coming accurately.    https://datingwithconfidencecoaching.com/category/confidence-love/
On this link there is only one post in this category still it is show more than one.


text:
Q: Store JSignature output to mysql to be redrawn on separate page Can someone please explain to me exactly how to take the output of my JSignature form and store it in my MySQL database so I can get the stupid thing to redraw on another page later? I swear I feel like such a total idiot sometimes. Please keep in mind that I know very little about Javascript and will likely need someone to walk me through this step by step.
OK so, I have gotten the JSignature working on my page with the following code:

    <button type="button" onclick="$('#signature').jSignature('clear')">Clear</button>
    <button type="button" onclick="alert($('#signature').jSignature('getData','base30'))">Save</button>

This is all within a form that is submitting a bunch of data via $_POST.
As you can see, I have added a button that will display the output to any alert window but I have no clue as to how to place that value inside a hidden input so it can be submitted with the rest of my form.
Thank you to everyone in advance.

A: Funky plugin.

<button type="button" onclick="$('#signature').jSignature('clear')">Clear</button>
<button type="button" id="btnSave">Save</button>

<input type="hidden" id="hiddenSigData" name="hiddenSigData" />

That snippet of code above says:
1. "when the button with the id 'btnSave' is clicked"...
2. Convert the signature canvas to a bas64 encoded string, and save it in a variable called 'sigData'.
3. Set the value of the field with id 'hiddenSigData' to variable 'sigData'.
Boom, you have it.
Do you have any server-side code for processing your form? I've assumed that you're using <form> tags... that field will then just appear with the POST'ed data.
If you don't have any handler for the data, you'll need to look into C#/PHP depending on what you're running. But, anyway.. that's the JS bit.


text:
Q: Overlapping Confidence Interval Alphas in ggplot2 I'm trying to visualize the confidence intervals for a set of Monte Carlo draws and am having some issues with my approach using alpha levels.
I'm running a loess regression for each draw and I wanted to try to visualize how the confidence intervals from each draw overlapped by displaying them on top of one another with reduced alphas to produce a gradient effect.
Essentially in the end produce the darkest areas would show where the confidence intervals overlapped the most.
As you can see in the example, the central portions are heavily obscured. While this pattern is to be expected, there isn't as much differentiation shown in the central portions as I need. I tried reducing the alpha level, but the result remained the same.  After some looking around I found that ggplot2 doesn't display alphas at levels lower than 0.1.
Edit
As mentioned in the comment, the alpha can in fact be set below 0.1, and from my own quick testing it seems anything set at 0.005 is where it fails to display. Even though this is quite low, I would like to display the alpha at an even lower level or use an alternative approach if possible.
The included sample set is a little long, but in the initial 20 draw sample the problem wasn't as clear. This set shown here includes 50 draws, but the actual analysis consists of 1000 draws, so the effect is even more pronounced.
I'd like to know if there are any workaround to achieve an effect that is similar to what I'm looking for, or if there is another way to visualize this.
Sample plot image set at 0.1

Sample plot image set at 0.006

Sample code
ggplot(data = subset(play, !is.na(y)),
       aes(x = -x, y = y, group = RunID)) +
  geom_smooth(method = "loess", linetype = 0, alpha = 0.1) +
  scale_x_reverse() +
  theme_minimal()

Reproducible sample
dput(play)
structure(list(x = c(-4616, -4510, -4465, -4473, -4466, -4689,
-5301, -5214, -4880, -4869, -5122, -4771, -5045, -4535, -4670,
-4988, -4752, -4478, -4427, -4650, -5284, -4866, -4930, -4915,
-5136, -4599, -5246, -4806, -4554, -5046, -4429, -4419, -4494,
-4631, -4403, -5309, -5197, -4900, -4889, -5107, -5131, -4410,
-4635, -4558, -4912, -5010, -5330, -4484, -4669, -4665, -4541,
-4420, -5295, -4901, -4867, -4911, -5170, -4496, -5068, -4401,
-4680, -4810, -4528, -4980, -4487, -4626, -4649, -4456, -5296,
-5087, -4945, -4883, -5201, -5302, -4436, -4654, -4609, -5052,
-4909, -4485, -4531, -4423, -4609, -5280, -5091, -4901, -4862,
-5216, -4829, -4806, -4809, -4776, -4729, -5386, -4412, -4571,
-4595, -4410, -4475, -5302, -5010, -4891, -4867, -5217, -4870,
-4417, -4838, -4582, -4696, -5035, -5346, -4488, -4589, -4430,
-5275, -5150, -4878, -4929, -5118, -5284, -4968, -4737, -4877,
-5159, -4963, -4469, -4624, -4473, -4431, -5282, -5268, -4924,
-4928, -5228, -4891, -4923, -4643, -4550, -4848, -4878, -4451,
-4547, -4470, -4466, -4446, -5304, -5085, -4885, -4868, -5104,
-4742, -4703, -4586, -4930, -4747, -5226, -4550, -4448, -5290,
-4892, -4936, -4929, -5138, -5143, -4520, -4490, -4910, -4914,
-4505, -4574, -4540, -4476, -4500, -4645, -4462, -5306, -4924,
-4898, -4888, -5217, -5283, -4462, -4719, -4881, -4740, -4497,
-5234, -5111, -4461, -4413, -4480, -4566, -4552, -4424, -5303,
-4964, -4878, -4881, -5160, -4449, -4566, -4702, -4737, -4463,
-5070, -4422, -4457, -4452, -4681, -4578, -5271, -4873, -4887,
-4889, -5185, -4985, -4514, -4924, -4573, -4540, -5168, -4475,
-4594, -4662, -5299, -4990, -4869, -4923, -4435, -5170, -4488,
-4623, -4596, -4532, -4651, -4435, -4414, -4550, -4702, -4405,
-5283, -5267, -4927, -4915, -5193, -5177, -4959, -4647, -4569,
-4722, -5316, -4424, -4486, -4402, -4672, -4494, -5291, -5134,
-4883, -4950, -5125, -4814, -4405, -4674, -4729, -4668, -5244,
-5348, -4405, -4507, -4612, -4632, -4460, -5299, -4995, -4861,
-4944, -5171, -5220, -4906, -4875, -4766, -4709, -5213, -5085,
-4455, -4402, -4715, -4729, -4435, -4415, -5271, -5266, -4915,
-4919, -5148, -5324, -4706, -4824, -4847, -4786, -4425, -4447,
-4644, -4549, -4632, -5281, -5012, -4923, -4947, -5140, -5202,
-5188, -4747, -4642, -4633, -4689, -4433, -4474, -4616, -4462,
-4468, -5297, -5293, -4941, -4920, -5125, -4406, -5352, -4844,
-4590, -4423, -4456, -4436, -4675, -4507, -5297, -4867, -4900,
-4902, -4436, -5141, -4603, -4849, -4932, -4669, -4493, -4544,
-4434, -4490, -4409, -4590, -4418, -4698, -4471, -5288, -5309,
-4935, -4912, -5172, -4973, -4806, -4540, -4616, -4847, -5223,
-4449, -4481, -4541, -4617, -5301, -5177, -4938, -4893, -5179,
-5124, -4668, -4635, -4432, -4739, -4945, -4901, -4432, -4475,
-4661, -4503, -4442, -5309, -5271, -4941, -4925, -5204, -5242,
-5086, -4828, -4543, -5020, -5359, -4404, -4475, -4659, -4689,
-5276, -5241, -4944, -4862, -5119, -5286, -4403, -4517, -4610,
-4869, -4717, -5017, -4479, -4438, -4450, -4730, -4607, -4467,
-4453, -5307, -5157, -4884, -4861, -5213, -4444, -4675, -4886,
-4473, -4786, -5311, -4724, -4411, -4655, -4418, -4440, -5282,
-4875, -4909, -4872, -5193, -5242, -4909, -4565, -4615, -4881,
-5114, -4419, -4663, -4471, -5300, -5097, -4880, -4879, -5100,
-4610, -4428, -4618, -4922, -4778, -4907, -4403, -4605, -4585,
-4431, -5275, -5032, -4875, -4933, -5125, -5264, -4596, -4768,
-4630, -4550, -4444, -4415, -4495, -4685, -4433, -4481, -4423,
-5274, -5199, -4869, -4861, -5166, -5225, -5068, -4468, -4743,
-4586, -4936, -5319, -4873, -4422, -4471, -4705, -4589, -4428,
-5307, -4898, -4897, -4891, -5121, -4837, -4501, -4786, -4946,
-5253, -5061, -4421, -4717, -4528, -4448, -5291, -5062, -4897,
-4914, -5181, -5399, -4453, -5250, -4838, -4629, -4716, -4551,
-4689, -4425, -4467, -4592, -4401, -4427, -5270, -4984, -4867,
-4879, -5222, -4467, -4922, -4480, -4723, -4621, -4827, -4525,
-4538, -4586, -4426, -4463, -5285, -5096, -4895, -4890, -5200,
-4844, -4432, -4752, -4726, -5195, -5108, -4410, -4454, -4596,
-4475, -5279, -5014, -4939, -4942, -5210, -5357, -4795, -4580,
-4792, -4535, -4756, -5312, -4437, -4451, -4709, -4547, -4463,
-5286, -5217, -4877, -4905, -5185, -4984, -4532, -4809, -4492,
-4878, -4657, -4719, -4443, -4472, -4663, -4666, -4528, -5307,
-5115, -4940, -4932, -5148, -4837, -4479, -4901, -4538, -5017,
-4730, -4464, -4518, -4405, -4589, -5292, -5063, -4934, -4943,
-5168, -5219, -4509, -4774, -4460, -4809, -4843, -4740, -4426,
-4538, -4710, -4573, -4567, -4470, -4402, -5270, -5256, -4901,
-4916, -5196, -5326, -4855, -4726, -4558, -4458, -4448, -4539,
-4567, -4594, -4552, -5294, -4917, -4863, -4891, -5189, -4786,
-5329, -4669, -4680, -5302, -5285, -4459, -4472, -4673, -4720,
-5307, -4864, -4929, -4906, -5219, -5088, -5031, -4491, -4552,
-4560, -5187, -4497, -4649, -4466, -4715, -4444, -5270, -4999,
-4939, -4897, -5106, -4798, -4890, -4583, -4841, -4517, -4858,
-4484, -4432, -4714, -4447, -5300, -4876, -4932, -4949, -4428,
-5187, -4754, -5293, -4806, -4740, -4993, -4440, -4419, -4436,
-4682, -4648, -4609, -5290, -5128, -4862, -4861, -5105, -5181,
-4488, -4981, -4510, -4694, -5064, -4456, -4448, -4639, -4485,
-4537, -5299, -4975, -4943, -4865, -5190, -4628, -4921, -4552,
-4665, -4863, -4592, -4544, -4425, -4471, -4728, -4511, -5296,
-5284, -4928, -4863, -5172, -5069, -4970, -4803, -4722, -4852,
-4827, -5333, -4438, -4514, -4489, -4575, -4402, -4541, -5282,
-5031, -4908, -4928, -5161, -5370, -4453, -5381, -4694, -4578,
-4479, -4733, -4473, -4407, -4552, -4444, -4596, -4424, -5295,
-5114, -4933, -4915, -5156, -5385, -5106, -4713, -4692, -5305,
-5095, -4482, -4706, -4654, -4440, -5292, -5267, -4912, -4946,
-5114, -5295, -4542, -4543, -4745), y = c(0.191919191919192,
0, 0.4, 0.133333333333333, 0.126984126984127, 0.2, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.133333333333333,
0.126984126984127, 0.2, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.5, 0.191919191919192, 0, 0.4, 0.133333333333333, 0.2, 0.296296296296296,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.193548387096774, 0.166666666666667, 0.184027777777778,
0.5, 0.191919191919192, 0, 0.4, 0.2, 0.296296296296296, 0.133333333333333,
0.160493827160494, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.2, 0.184027777777778,
0.5, 0.191919191919192, 0, 0.4, 0.2, 0.296296296296296, 0.125,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.126984126984127, 0.2, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.4, 0.2, 0.296296296296296,
0.133333333333333, 0.160493827160494, 0.241803278688029, 0.2,
0.0588235294117647, 0.244791666666667, 0, 0.2, 0.193548387096774,
0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.2, 0.160493827160494, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.5, 0.191919191919192, 0, 0.4, 0.2, 0.296296296296296, 0.160493827160494,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.2, 0.296296296296296, 0.133333333333333, 0.160493827160494,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.2, 0.133333333333333, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.2, 0.184027777777778,
0.130434782608696, 0.5, 0.191919191919192, 0, 0.4, 0.133333333333333,
0.2, 0.160493827160494, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.193548387096774, 0.166666666666667,
0.184027777777778, 0.130434782608696, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.126984126984127, 0.2, 0.296296296296296,
0.125, 0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.126984126984127, 0.2, 0.133333333333333,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.130434782608696,
0.5, 0.191919191919192, 0.4, 0.2, 0.133333333333333, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0.22884012539185,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.2, 0.296296296296296, 0.133333333333333, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.4, 0.133333333333333,
0.126984126984127, 0.2, 0.133333333333333, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.193548387096774,
0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.2, 0.133333333333333, 0.125, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.130434782608696, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.2, 0.296296296296296, 0.133333333333333,
0.160493827160494, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.5, 0.191919191919192, 0, 0.4, 0.2, 0.296296296296296, 0.133333333333333,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.2, 0.160493827160494, 0, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.4, 0.2, 0.296296296296296,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0.22884012539185, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.5, 0.191919191919192, 0, 0.4, 0.133333333333333, 0.126984126984127,
0.2, 0.296296296296296, 0.133333333333333, 0.160493827160494,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.126984126984127, 0.2, 0.133333333333333, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.130434782608696, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.2, 0.296296296296296, 0.160493827160494,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.2, 0.296296296296296, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.193548387096774,
0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.126984126984127, 0.2, 0.296296296296296,
0.133333333333333, 0, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.130434782608696, 0.5, 0.191919191919192, 0, 0.4, 0.2, 0.296296296296296,
0.125, 0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.2, 0, 0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.2, 0.296296296296296, 0.160493827160494, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.4, 0.133333333333333,
0.2, 0.296296296296296, 0.160493827160494, 0.125, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.2, 0.184027777777778, 0.130434782608696, 0.5, 0.191919191919192,
0, 0.4, 0.126984126984127, 0.2, 0.296296296296296, 0.133333333333333,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.184027777777778, 0.130434782608696, 0.5, 0.191919191919192,
0, 0.4, 0.2, 0.296296296296296, 0.125, 0.241803278688029, 0.2,
0.0588235294117647, 0.244791666666667, 0, 0.2, 0.193548387096774,
0.166666666666667, 0.184027777777778, 0.130434782608696, 0.5,
0.191919191919192, 0, 0.4, 0.126984126984127, 0.2, 0.133333333333333,
0.160493827160494, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.2, 0.184027777777778,
0.5, 0.191919191919192, 0, 0.133333333333333, 0.2, 0.296296296296296,
0.160493827160494, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.5, 0.191919191919192, 0, 0.4, 0.133333333333333, 0.2, 0.160493827160494,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.130434782608696,
0.5, 0.191919191919192, 0, 0.4, 0.126984126984127, 0.2, 0.296296296296296,
0.133333333333333, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.130434782608696, 0.5, 0.191919191919192, 0, 0.4, 0.126984126984127,
0.2, 0.296296296296296, 0.133333333333333, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.4, 0.133333333333333,
0.126984126984127, 0.2, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.130434782608696, 0.5, 0.191919191919192, 0, 0.4, 0.133333333333333,
0.2, 0.296296296296296, 0.133333333333333, 0.125, 0, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0.4, 0.133333333333333,
0.2, 0.296296296296296, 0.133333333333333, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.4, 0.133333333333333,
0.2, 0.296296296296296, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.5, 0.191919191919192, 0, 0.133333333333333, 0.2, 0.296296296296296,
0.133333333333333, 0.160493827160494, 0.241803278688029, 0.2,
0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.4, 0.133333333333333,
0.2, 0.160493827160494, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0.22884012539185, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.4, 0.133333333333333,
0.2, 0.296296296296296, 0.133333333333333, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.193548387096774,
0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.2, 0.296296296296296, 0.133333333333333, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.130434782608696, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.2, 0.296296296296296, 0.241803278688029,
0.2, 0.0588235294117647, 0.244791666666667, 0, 0.2, 0.166666666666667,
0.184027777777778, 0.130434782608696, 0.5, 0.191919191919192,
0, 0.4, 0.133333333333333, 0.126984126984127, 0.2, 0.296296296296296,
0.133333333333333, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.193548387096774, 0.166666666666667,
0.184027777777778, 0.5, 0.191919191919192, 0, 0.4, 0.126984126984127,
0.2, 0.296296296296296, 0.133333333333333, 0.160493827160494,
0.241803278688029, 0.2, 0.0588235294117647, 0.244791666666667,
0, 0.2, 0.166666666666667, 0.184027777777778, 0.5, 0.191919191919192,
0, 0.4, 0.2, 0.296296296296296, 0, 0.241803278688029, 0.2, 0.0588235294117647,
0.244791666666667, 0, 0.2, 0.166666666666667, 0.184027777777778,
0.5), RunID = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L,
9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 10L,
10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L,
10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L,
12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L,
13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 14L,
14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L,
14L, 14L, 14L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L,
15L, 15L, 15L, 15L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L,
16L, 16L, 16L, 16L, 16L, 16L, 17L, 17L, 17L, 17L, 17L, 17L, 17L,
17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 18L, 18L, 18L,
18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L,
18L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L,
19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L,
20L, 20L, 20L, 20L, 20L, 20L, 20L, 21L, 21L, 21L, 21L, 21L, 21L,
21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 22L, 22L, 22L,
22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 23L,
23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L,
23L, 23L, 23L, 23L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L,
24L, 24L, 24L, 24L, 24L, 24L, 24L, 25L, 25L, 25L, 25L, 25L, 25L,
25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 26L, 26L, 26L,
26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L,
27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L,
27L, 27L, 27L, 27L, 27L, 27L, 28L, 28L, 28L, 28L, 28L, 28L, 28L,
28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 29L, 29L, 29L, 29L, 29L,
29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 30L, 30L, 30L, 30L,
30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 31L, 31L,
31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L,
31L, 31L, 31L, 31L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L,
32L, 32L, 32L, 32L, 32L, 32L, 32L, 33L, 33L, 33L, 33L, 33L, 33L,
33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 34L, 34L,
34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
34L, 34L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L,
35L, 35L, 35L, 35L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L,
36L, 36L, 36L, 36L, 36L, 36L, 36L, 37L, 37L, 37L, 37L, 37L, 37L,
37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 38L, 38L,
38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L,
38L, 39L, 39L, 39L, 39L, 39L, 39L, 39L, 39L, 39L, 39L, 39L, 39L,
39L, 39L, 39L, 39L, 40L, 40L, 40L, 40L, 40L, 40L, 40L, 40L, 40L,
40L, 40L, 40L, 40L, 40L, 40L, 40L, 40L, 40L, 41L, 41L, 41L, 41L,
41L, 41L, 41L, 41L, 41L, 41L, 41L, 41L, 41L, 41L, 41L, 42L, 42L,
42L, 42L, 42L, 42L, 42L, 42L, 42L, 42L, 42L, 42L, 42L, 42L, 42L,
43L, 43L, 43L, 43L, 43L, 43L, 43L, 43L, 43L, 43L, 43L, 43L, 43L,
43L, 43L, 43L, 44L, 44L, 44L, 44L, 44L, 44L, 44L, 44L, 44L, 44L,
44L, 44L, 44L, 44L, 44L, 44L, 45L, 45L, 45L, 45L, 45L, 45L, 45L,
45L, 45L, 45L, 45L, 45L, 45L, 45L, 45L, 45L, 45L, 46L, 46L, 46L,
46L, 46L, 46L, 46L, 46L, 46L, 46L, 46L, 46L, 46L, 46L, 46L, 46L,
47L, 47L, 47L, 47L, 47L, 47L, 47L, 47L, 47L, 47L, 47L, 47L, 47L,
47L, 47L, 47L, 48L, 48L, 48L, 48L, 48L, 48L, 48L, 48L, 48L, 48L,
48L, 48L, 48L, 48L, 48L, 48L, 48L, 48L, 49L, 49L, 49L, 49L, 49L,
49L, 49L, 49L, 49L, 49L, 49L, 49L, 49L, 49L, 49L, 49L, 49L, 50L,
50L, 50L, 50L, 50L, 50L, 50L, 50L, 50L, 50L, 50L, 50L, 50L, 50L,
50L)), groups = structure(list(.rows = structure(list(1L, 2L,
    3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
    16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L,
    28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L,
    40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L,
    52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L,
    64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L,
    76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L,
    88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L,
    100L, 101L, 102L, 103L, 104L, 105L, 106L, 107L, 108L, 109L,
    110L, 111L, 112L, 113L, 114L, 115L, 116L, 117L, 118L, 119L,
    120L, 121L, 122L, 123L, 124L, 125L, 126L, 127L, 128L, 129L,
    130L, 131L, 132L, 133L, 134L, 135L, 136L, 137L, 138L, 139L,
    140L, 141L, 142L, 143L, 144L, 145L, 146L, 147L, 148L, 149L,
    150L, 151L, 152L, 153L, 154L, 155L, 156L, 157L, 158L, 159L,
    160L, 161L, 162L, 163L, 164L, 165L, 166L, 167L, 168L, 169L,
    170L, 171L, 172L, 173L, 174L, 175L, 176L, 177L, 178L, 179L,
    180L, 181L, 182L, 183L, 184L, 185L, 186L, 187L, 188L, 189L,
    190L, 191L, 192L, 193L, 194L, 195L, 196L, 197L, 198L, 199L,
    200L, 201L, 202L, 203L, 204L, 205L, 206L, 207L, 208L, 209L,
    210L, 211L, 212L, 213L, 214L, 215L, 216L, 217L, 218L, 219L,
    220L, 221L, 222L, 223L, 224L, 225L, 226L, 227L, 228L, 229L,
    230L, 231L, 232L, 233L, 234L, 235L, 236L, 237L, 238L, 239L,
    240L, 241L, 242L, 243L, 244L, 245L, 246L, 247L, 248L, 249L,
    250L, 251L, 252L, 253L, 254L, 255L, 256L, 257L, 258L, 259L,
    260L, 261L, 262L, 263L, 264L, 265L, 266L, 267L, 268L, 269L,
    270L, 271L, 272L, 273L, 274L, 275L, 276L, 277L, 278L, 279L,
    280L, 281L, 282L, 283L, 284L, 285L, 286L, 287L, 288L, 289L,
    290L, 291L, 292L, 293L, 294L, 295L, 296L, 297L, 298L, 299L,
    300L, 301L, 302L, 303L, 304L, 305L, 306L, 307L, 308L, 309L,
    310L, 311L, 312L, 313L, 314L, 315L, 316L, 317L, 318L, 319L,
    320L, 321L, 322L, 323L, 324L, 325L, 326L, 327L, 328L, 329L,
    330L, 331L, 332L, 333L, 334L, 335L, 336L, 337L, 338L, 339L,
    340L, 341L, 342L, 343L, 344L, 345L, 346L, 347L, 348L, 349L,
    350L, 351L, 352L, 353L, 354L, 355L, 356L, 357L, 358L, 359L,
    360L, 361L, 362L, 363L, 364L, 365L, 366L, 367L, 368L, 369L,
    370L, 371L, 372L, 373L, 374L, 375L, 376L, 377L, 378L, 379L,
    380L, 381L, 382L, 383L, 384L, 385L, 386L, 387L, 388L, 389L,
    390L, 391L, 392L, 393L, 394L, 395L, 396L, 397L, 398L, 399L,
    400L, 401L, 402L, 403L, 404L, 405L, 406L, 407L, 408L, 409L,
    410L, 411L, 412L, 413L, 414L, 415L, 416L, 417L, 418L, 419L,
    420L, 421L, 422L, 423L, 424L, 425L, 426L, 427L, 428L, 429L,
    430L, 431L, 432L, 433L, 434L, 435L, 436L, 437L, 438L, 439L,
    440L, 441L, 442L, 443L, 444L, 445L, 446L, 447L, 448L, 449L,
    450L, 451L, 452L, 453L, 454L, 455L, 456L, 457L, 458L, 459L,
    460L, 461L, 462L, 463L, 464L, 465L, 466L, 467L, 468L, 469L,
    470L, 471L, 472L, 473L, 474L, 475L, 476L, 477L, 478L, 479L,
    480L, 481L, 482L, 483L, 484L, 485L, 486L, 487L, 488L, 489L,
    490L, 491L, 492L, 493L, 494L, 495L, 496L, 497L, 498L, 499L,
    500L, 501L, 502L, 503L, 504L, 505L, 506L, 507L, 508L, 509L,
    510L, 511L, 512L, 513L, 514L, 515L, 516L, 517L, 518L, 519L,
    520L, 521L, 522L, 523L, 524L, 525L, 526L, 527L, 528L, 529L,
    530L, 531L, 532L, 533L, 534L, 535L, 536L, 537L, 538L, 539L,
    540L, 541L, 542L, 543L, 544L, 545L, 546L, 547L, 548L, 549L,
    550L, 551L, 552L, 553L, 554L, 555L, 556L, 557L, 558L, 559L,
    560L, 561L, 562L, 563L, 564L, 565L, 566L, 567L, 568L, 569L,
    570L, 571L, 572L, 573L, 574L, 575L, 576L, 577L, 578L, 579L,
    580L, 581L, 582L, 583L, 584L, 585L, 586L, 587L, 588L, 589L,
    590L, 591L, 592L, 593L, 594L, 595L, 596L, 597L, 598L, 599L,
    600L, 601L, 602L, 603L, 604L, 605L, 606L, 607L, 608L, 609L,
    610L, 611L, 612L, 613L, 614L, 615L, 616L, 617L, 618L, 619L,
    620L, 621L, 622L, 623L, 624L, 625L, 626L, 627L, 628L, 629L,
    630L, 631L, 632L, 633L, 634L, 635L, 636L, 637L, 638L, 639L,
    640L, 641L, 642L, 643L, 644L, 645L, 646L, 647L, 648L, 649L,
    650L, 651L, 652L, 653L, 654L, 655L, 656L, 657L, 658L, 659L,
    660L, 661L, 662L, 663L, 664L, 665L, 666L, 667L, 668L, 669L,
    670L, 671L, 672L, 673L, 674L, 675L, 676L, 677L, 678L, 679L,
    680L, 681L, 682L, 683L, 684L, 685L, 686L, 687L, 688L, 689L,
    690L, 691L, 692L, 693L, 694L, 695L, 696L, 697L, 698L, 699L,
    700L, 701L, 702L, 703L, 704L, 705L, 706L, 707L, 708L, 709L,
    710L, 711L, 712L, 713L, 714L, 715L, 716L, 717L, 718L, 719L,
    720L, 721L, 722L, 723L, 724L, 725L, 726L, 727L, 728L, 729L,
    730L, 731L, 732L, 733L, 734L, 735L, 736L, 737L, 738L, 739L,
    740L, 741L, 742L, 743L, 744L, 745L, 746L, 747L, 748L, 749L,
    750L, 751L, 752L, 753L, 754L, 755L, 756L, 757L, 758L, 759L,
    760L, 761L, 762L, 763L, 764L, 765L, 766L, 767L, 768L, 769L,
    770L, 771L, 772L, 773L, 774L, 775L, 776L, 777L, 778L, 779L,
    780L, 781L, 782L, 783L, 784L, 785L, 786L, 787L, 788L, 789L,
    790L, 791L, 792L, 793L, 794L, 795L, 796L, 797L, 798L, 799L,
    800L, 801L, 802L, 803L), ptype = integer(0), class = c("vctrs_list_of",
"vctrs_vctr", "list"))), row.names = c(NA, -803L), class = c("tbl_df",
"tbl", "data.frame")), row.names = c(NA, -803L), class = c("rowwise_df",
"tbl_df", "tbl", "data.frame"))

A: ggplot2 does recognise alpha values less than 0.1.
For example:
ggplot(data = subset(play, !is.na(y)), aes(x = -x, y = y, group = RunID)) +
    geom_smooth(method = "loess", linetype = 0, alpha = 0.01) +
    scale_x_reverse() +
    theme_minimal()

produces

Only when you use an alpha transparency scale through an aesthetic, values are mapped to alpha values in the interval [0.1, 1].


text:
Q: VNC on Ubuntu 14.04 LTS I have a Mac running OS X 10.11.6 and Ubuntu EC2 instance running 14.04LTS.
I'm trying to get VNC running KDE from my Mac.
XQuartz launches but I have not keyboard, or mouse control over KDE.

Port 5901 is open in my EC2 security group.
Here's my /etc/init.d/vncserver file:
ubuntu@ip-10-0-1-107:~$ vi /etc/init.d/vncserver

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartupTH="$PATH:/usr/bin/"
export USER="ubuntu"
DISPLAY="1"
DEPTH="16"
GEOMETRY="1600x1200"
OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY} -localhost"
. /lib/lsb/init-functions

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
kdestartup &

case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;

stop)
log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;

restart)
$0 stop
$0 start
;;
esac
exit 0

Starting vncserver script:
ubuntu@ip-10-0-1-107:~$ sudo service vncserver start
xsetroot:  unable to open display ''
vncconfig: unable to open display ""
$DISPLAY is not set or cannot connect to the X server.
 * Starting vncserver for user 'ubuntu' on localhost:1...                       Option "--login" is no longer supported in this version of gnome-terminal; you might want to create a profile with the desired setting, and use the new '--profile' option

(x-window-manager:2591): Gtk-WARNING **: cannot open display:
error: XDG_RUNTIME_DIR not set in the environment.
Failed to parse arguments: Cannot open display:

Here's the ssh command on OS X (server address and cert altered for).
ssh -L -X 5901:127.0.0.1:5901 -N -f -l ubuntu x.x.x.x -i blahblahblah.pem

Here's the VNC server running on Ubuntu:
ubuntu@ip-10-0-1-107:~$ ps -ef | grep vnc
ubuntu    4289     1  0 17:13 ?        00:00:00 Xtightvnc :1 -desktop X -auth /home/ubuntu/.Xauthority -geometry 1600x1200 -depth 16 -rfbwait 120000 -rfbauth /home/ubuntu/.vnc/passwd -rfbport 5901 -fp /usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb -localhost

Here's kde:
ubuntu@ip-10-0-1-107:~$ ps -ef | grep kde
root        57     2  0 Jul30 ?        00:00:00 [kdevtmpfs]
kdm       1535  1532  0 Jul30 ?        00:33:25 /usr/lib/kde4/libexec/kdm_greet
ubuntu    6067     1  0 17:16 ?        00:00:00 /bin/bash /usr/bin/x2goruncommand 50 5895 ubuntu-50-1502558186_stDKDE_dp32 34503 startkde esd D
ubuntu    6165  6067  0 17:16 ?        00:00:00 /usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session /usr/bin/im-launch /usr/bin/env LD_LIBRARY_PATH=/usr/lib/nx/X11/Xinerama:/usr/lib/nx/X11 startkde
ubuntu    6302  6165  0 17:16 ?        00:00:00 /bin/sh /usr/bin/startkde
ubuntu    6305     1  0 17:16 ?        00:00:00 /usr/bin/dbus-launch --exit-with-session /usr/bin/im-launch /usr/bin/env LD_LIBRARY_PATH=/usr/lib/nx/X11/Xinerama:/usr/lib/nx/X11 startkde
ubuntu    6429     1  0 17:16 ?        00:00:00 /usr/lib/kde4/libexec/start_kdeinit +kcminit_startup
ubuntu    6435     1  0 17:16 ?        00:00:00 kdeinit4: kdeinit4 Running...
ubuntu    6436  6435  0 17:16 ?        00:00:00 kdeinit4: klauncher [kdeinit] --fd=9
ubuntu    6438     1  0 17:16 ?        00:00:03 kdeinit4: kded4 [kdeinit]
ubuntu    6457  6435  0 17:16 ?        00:00:02 kdeinit4: ksmserver [kdeinit]
ubuntu    6633     1  0 17:16 ?        00:00:02 /usr/lib/kde4/libexec/polkit-kd-authentication-agent-1

I'm using X2Go client which uses
"This program uses Qt version 4.8.7."
NXPROXY - Version 3.5.0

Copyright (C) 2001, 2010 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '25164'.
Session: Starting session at 'Sat Aug 12 10:16:20 2017'.
Info: Connecting to remote host 'localhost:35502'.
Info: Connection to remote proxy 'localhost:35502' established.
Info: Connection with remote proxy completed.
Warning: Unrecognized session type 'unix-kde-depth_32'. Assuming agent session.
Warning: Failed to read data from the X auth command.
Warning: Generated a fake cookie for X authentication.
Info: Using WAN link parameters 768/24/1/0.
Info: Using cache parameters 4/4096KB/8192KB/8192KB.
Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_32'.
Info: Using ZLIB data compression 1/1/32.
Info: Using ZLIB stream compression 1/1.
Info: No suitable cache file found.
Info: Forwarding X11 connections to display '/private/tmp/com.apple.launchd.hnXbYavKVp/org.macosforge.xquartz:0'.
Session: Session started at 'Sat Aug 12 10:16:22 2017'.
Info: Established X server connection.
Info: Using shared memory parameters 0/0K.

Here's the log file /home/ubuntu/.vnc/ip-10-0-1-107:1.log:
** (xfce4-volumed:4415): WARNING **: Binding '<Ctrl><Alt>XF86AudioMute' failed!

** (xfce4-volumed:4415): WARNING **: Failed to map virtual modifiers

** (xfce4-volumed:4415): WARNING **: Binding '<Alt><Shift>XF86AudioMute' failed!

** (xfce4-volumed:4415): WARNING **: Failed to map virtual modifiers

** (xfce4-volumed:4415): WARNING **: Failed to map virtual modifiers

** (xfce4-volumed:4415): WARNING **: Failed to map virtual modifiers

** (xfce4-volumed:4415): WARNING **: Binding '<Ctrl><Shift><Alt>XF86AudioMute' failed!

** (xfce4-volumed:4415): WARNING **: Failed to map virtual modifiers

** (xfce4-volumed:4415): WARNING **: Failed to map virtual modifiers

** (xfce4-volumed:4415): WARNING **: Failed to map virtual modifiers
initctl: UPSTART_SESSION isn't set in the environment. Unable to locate the Upstart instance.

** (process:4416): WARNING **: killswitch.vala:103: Can't open /dev/rfkill for use as a killswitch backend: Permission denied

** (process:4416): CRITICAL **: bluez.vala:104: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.155" (uid=1000 pid=4416 comm="/usr/lib/x86_64-linux-gnu/indicator-bluetooth/indi") interface="org.bluez.Manager" member="DefaultAdapter" error name="(unset)" requested_reply="0" destination="org.bluez" (uid=0 pid=1052 comm="/usr/sbin/bluetoothd ")

(xfsettingsd:4462): xfsettingsd-CRITICAL **: No RANDR extension found in display :1.0. Display settings won't be applied.
Xlib:  extension "XInputExtension" missing on display ":1.0".

(xfsettingsd:4462): xfsettingsd-CRITICAL **: XI is not present.

(xfsettingsd:4462): xfsettingsd-CRITICAL **: Failed to initialize the Xkb extension.

(xfsettingsd:4462): xfsettingsd-CRITICAL **: Failed to initialize the Accessibility extension.

(zeitgeist-datahub:4395): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(zeitgeist-datahub:4395): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (process:4355): CRITICAL **: volume_control_set_volume_internal: assertion '_tmp1_ == PA_CONTEXT_READY' failed
Failure: Module initialization failed

** (process:4355): CRITICAL **: file /build/buildd/indicator-sound-12.10.2+14.04.20140401/obj-x86_64-linux-gnu/src/volume-control.c: line 1775: uncaught error: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: No such interface (g-dbus-error-quark, 16)

** (nm-applet:4347): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: Rejected send message, 3 matched rules; type="method_call", sender=":1.168" (uid=1000 pid=4347 comm="nm-applet ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 pid=1123 comm="NetworkManager ")

(xfsettingsd:4462): xfsettingsd-WARNING **: Failed to get the _NET_NUMBER_OF_DESKTOPS property.
system-config-printer-applet: failed to start NewPrinterNotification service
system-config-printer-applet: failed to start PrinterDriversInstaller service: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.171" is not allowed to own the service "com.redhat.PrinterDriversInstaller" due to security policies in the configuration file
Xlib:  extension "RANDR" missing on display ":1.0".
Xlib:  extension "RANDR" missing on display ":1.0".
Error executing command as another user: Not authorized

This incident has been reported.
ERROR:dbus.proxies:Introspect error on :1.5:/org/freedesktop/NetworkManager: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 3 matched rules; type="method_call", sender=":1.175" (uid=1000 pid=4686 comm="/usr/bin/python3 /usr/bin/update-manager --no-upda") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination=":1.5" (uid=0 pid=1123 comm="NetworkManager ")

A: It is maybe related to the screen.
try to add -X in the ssh command
ssh -X


text:
Q: React Google Charts Candlestick colors and wicks not displaying I am trying to implement the React Google Charts candlestick charts, and I am plugging in my own data into the charts but when the charts are displayed, the candlesticks are all being displayed in one color at a time even when I change the color options.
options={{
        legend: "none",
        bar: { groupWidth: "100%" }, // Remove space between bars.
        candlestick: {
          fallingColor: { strokeWidth: 0, fill: "#a52714" }, // red
          risingColor: { strokeWidth: 0, fill: "#0f9d58" } // green
        }
      }}

I am almost certain my data is shaped correctly (this is the ordered_data array of arrays passed to the charts data property.
  data={this.state.ordered_data}

The wicks are also not displaying on the charts even though my data fits into the same shape as the default example data.
I am linking to a codesandbox showing my charts.
The chart without any wicks and with all candles with the same color looks as shown below

The codesandbox with the code for the chart is embedded below. Here's the official example for using this chart: React Google Charts candlestick. I've tried to customize the colors using the options fallingColor and risingColor settings to no avail. How can I get the wicks to display?
You can view the shape of my data from the console in the codesandbox.

<iframe src="https://codesandbox.io/embed/charming-oskar-15lkf?fontsize=14&hidenavigation=1&theme=dark" style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;" title="charming-oskar-15lkf" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
  sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>

A: looking at the code sandbox and the data in the console,
it looks as though your data is structured as follows...
"day", "open", "high", "low", "close"

but according to the data format for Google's Candlestick Chart,
the data should be structured as follows...
"day", "low", "open", "close", "high"


text:
Q: Server side pagination in node js using ejs Template and MYSQL As I have to render large data and when I am doing client-side pagination then it's taking time and I know Server side pagination is best for

*

*Large data set

*Faster initial page load

But I don't have any idea how to do Server Side pagination using NODE.JS  EJS and MYSQL here is my Routes and.EJS
Routes
app.get('/',function(req,res,next){
    req.getConnection(function(error, conn) {
        let sql = `SELECT *FROM studiestable
                   WHERE ReceivingDate >= ( CURDATE() - INTERVAL 35 DAY )
                   ORDER BY  Bckup DESC,
                   ReceivingDate DESC`;

        conn.query(sql,function(err,rows,fields){
            if (err) {
                req.flash('error', err)
                res.render('patient/dashboard', {
                    title: 'Dashboard',
                    data: ''
                })
            } else {
                res.render('patient/dashboard', {
                    title: 'Dashboard',
                    data: rows
                })
            }
        })
    })
})

EJS

                ID
                Patient Name
                Age
                Modality
                Images

            <% if (data) { %>
                <% data.forEach(function(Patient){ %>

                        <%= Patient.PatientID %>
                        <%= Patient.PatientName %>
                        <%= Patient.Age %>
                        <%= Patient.Modality %>
                        <%= Patient.Images %>

                <% }) %>
                <% } %>

A: Pagination in NodeJS, EJS, and MongoDB, using Mongoose ODM
If you are trying to do Pagination the do it the following way. Your Node.JS file
const ITEMS_PER_PAGE = 4;

exports.getIndex = (req, res, next) => {

    // start constants
    const page = +req.query.page || 1; // pagination
    let totalItems; // pagination
    // end constants

    Hotel.find()
    .countDocuments()
    .then(numberOfProducts => {
        totalItems = numberOfProducts;
        return Hotel.find()
                    .skip((page-1) * ITEMS_PER_PAGE)
                    .limit(ITEMS_PER_PAGE);
    }).then(hotels => {
        res.render('pages/hotel', {
            hotels: hotels,
            currentPage: page,
            hasNextPage: (ITEMS_PER_PAGE * page) < totalItems,
            hasPreviousPage: page > 1,
            nextPage: page + 1,
            previousPage: page - 1,
            lastPage: Math.ceil(totalItems / ITEMS_PER_PAGE)
        });
    }).catch(err => {
        console.log(err);
    });
}

And then write your ejs in the following manner:

Hotels

        <%if (hotels.length > 0) {%>

            <%for (let hotel of hotels) {%>

<%=hotel.title%>

<%=hotel.description%>

            <%}%>

                        <% if (hasPreviousPage) { %>

                            First

                            <a class="page-link" href="?page=<%= previousPage %>"><%= previousPage %>

                        <% } %>

                            <a class="page-link" href="?page=<%= currentPage %>"><%= currentPage %>

                        <% if (hasNextPage) { %>

                            <a class="page-link" href="?page=<%= nextPage %>"><%= nextPage %>

                            <a class="page-link" href="?page=<%= lastPage %>">Last

                        <% } %>

        <%} else {%>

No products found.

                Go Home

        <%}%>

Have used bootstrap for CSS.
This is how you can do it. It will fetch a few items from database and paginate the UI.

A: You might want to try using SQL's LIMIT and OFFSET for pagination. So, it'll be something like this for your Node's SQL string:
`SELECT * FROM studiestable
    WHERE ReceivingDate >= ( CURDATE() - INTERVAL 35 DAY )
    ORDER BY Bckup DESC,
    ReceivingDate DESC`
    LIMIT 30 OFFSET ${req.query.page*30};`

I know, passing such variable unsanitized is very unsecure, but just to give a rough idea.
So what happens in this one is, you receive a query string called page (example url: api.example.com/?page=0). We'll assume our page numbers start from 0. So, when page is equal to 0, it returns first 30 rows (0 offset). Then when page is equal to 1 (30 offset), it returns the next 30 rows. And as page increases, it returns the next 30 set of data depending on your page.


text:
Q: Solve the ODE to get the expression of theta(z) can someone help me to solve this Ordinary Differential Equation? If there is no symbolic solution exist, how can I get a numerical solution? thanks for help
\begin{gather}
\left.
\begin{aligned}
&\frac{\left( (1+\lambda \alpha z) \theta(z)+\frac{z(1+\lambda z)}{1-\gamma}\theta'(z)\right)^{1-\frac{1}{\gamma}} }{1-\frac{1}{\gamma}}+\frac{\mu^2\left(\theta(z)+\frac{z}{1-\gamma}\theta'(z)\right)^2 }{2 \sigma^2 \left(-\gamma \theta(z)+2 z \theta'(z)+\frac{z^2}{1-\gamma}\theta''(z)\right)} \\
&+\left( \frac{\beta}{1-\gamma}-r+\alpha \delta\right) \theta(z)-\frac{(r+\delta)z}{1-\gamma}\theta'(z)=0
\end{aligned}
\right.
\end{gather}


text:
Q: JTextArea and GridBagLayout: how to avoid changing column width as we write some text? I would like to design a JFrame whose layout consists in 3 columns:

*

*a left column containing a text editor (I have chosen a JTextArea);

*center column containing a single button (JButton);

*a right column containing another text editor.

I managed to do this using the GridBagLayout class.
However, when I write some text in an editor, the width of the editor gets larger and the width of the other editor gets smaller.
Could help me to fix this?
Here is my code:
JFrame frame = new JFrame("My frame");
frame.setSize(1000, 1000);
frame.setLocation(500, 0;

Container pane = frame.getContentPane();
GridBagLayout layout = new GridBagLayout();
pane.setLayout(layout);

JTextArea textEditor = new JTextArea();

// LEFT TEXT EDITOR
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 0;
constraints.gridy = 0;
constraints.fill = GridBagConstraints.BOTH;
constraints.weightx = 1;
constraints.weighty = 1;
JPanel leftPanel = new JPanel();
leftPanel.setBackground(Color.WHITE);
leftPanel.add(textEditor);
layout.setConstraints(leftPanel, constraints);
pane.add(leftPanel);

// CENTER BUTTON
constraints = new GridBagConstraints();
constraints.gridx = 1;
constraints.gridy = 0;
constraints.fill = GridBagConstraints.NONE;
JButton button = new JButton("Do");
layout.setConstraints(button, constraints);
pane.add(button);

// RIGHT TEXT EDITOR
constraints = new GridBagConstraints();
constraints.gridx = 2;
constraints.gridy = 0;
contraintes.fill = GridBagConstraints.BOTH;
contraintes.weightx = 1;
contraintes.weighty = 1;
JPanel rightPanel = new JPanel();
rightPanel.setBackground(Color.WHITE);
rightPanel.add(textEditor);
miseEnPage.setConstraints(rightPanel, constraints);
pane.add(rightPanel);

A: in your code i think you should use 2 JTextAreas
and set each JTextArea
setLineWrap(true)

like so
JFrame frame = new JFrame("My frame");
        frame.setSize(500, 500);
        frame.setLocation(500, 0);

        Container pane = frame.getContentPane();
        GridBagLayout layout = new GridBagLayout();
        pane.setLayout(layout);

        JTextArea textEditor = new JTextArea();//JTextArea 1
        textEditor.setLineWrap(true);//setLineWrap(true)
        JTextArea textEditor1 = new JTextArea();//JTextArea 2
        textEditor1.setLineWrap(true);//setLineWrap(true)
        // LEFT TEXT EDITOR
        GridBagConstraints constraints = new GridBagConstraints();
        constraints.gridx = 0;
        constraints.gridy = 0;
        constraints.fill = GridBagConstraints.BOTH;
        constraints.weightx = 1;
        constraints.weighty = 1;
        JPanel leftPanel = new JPanel();
        leftPanel.setBackground(Color.WHITE);
        leftPanel.add(textEditor);
        layout.setConstraints(leftPanel, constraints);
        pane.add(leftPanel);

        // CENTER BUTTON
        constraints = new GridBagConstraints();
        constraints.gridx = 1;
        constraints.gridy = 0;
        constraints.fill = GridBagConstraints.NONE;
        JButton button = new JButton("Do");
        layout.setConstraints(button, constraints);
        pane.add(button);

        // RIGHT TEXT EDITOR
        constraints = new GridBagConstraints();
        constraints.gridx = 2;
        constraints.gridy = 0;
        constraints.fill = GridBagConstraints.BOTH;
        constraints.weightx = 1;
        constraints.weighty = 1;
        JPanel rightPanel = new JPanel();
        rightPanel.setBackground(Color.WHITE);
        rightPanel.add(textEditor1);
        layout.setConstraints(rightPanel, constraints);
        pane.add(rightPanel);


text:
Q: java/jackson - chained @JsonValue annotations and deserialization I have the following construction. I know it seems odd, but I am simulating our code with this example:
public static class StringWrapper {
    protected final String s;

    @JsonValue
    public String getS() {
        return s;
    }

    public StringWrapper(final String s) {
        this.s = s;
    }
}

public static class StringWrapperOuter {
    protected final StringWrapper s;

    @JsonValue
    public StringWrapper getS() {
        return s;
    }

    public StringWrapperOuter(final StringWrapper s) {
        this.s = s;
    }
}

public static class POJO {
    protected final List<StringWrapperOuter> data;

    public List<StringWrapperOuter> getData() {
        return data;
    }

    public POJO(final List<StringWrapperOuter> data) {
        this.data = data;
    }

    public POJO() {
        data = Collections.emptyList();
    }
}

Serialization of the POJO gives the expected JSON array of strings:
<mapper>.writeValue(System.out, new POJO(Arrays.asList(new StringWrapperOuter(new StringWrapper("a")), new StringWrapperOuter(new StringWrapper("b")), new StringWrapperOuter(new StringWrapper("c")))));

{"data":["a","b","c"]}

How can I deserialize this JSON string into an object of type POJO?
<mapper>.readValue("{\"data\":[\"a\",\"b\",\"c\"]}", POJO.class);

The mapper has difficulties to recognize the input, since two @JsonValue annotations are chained. It gives the following exception:
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class StringWrapperOuter] from String value ('a'); no single-String constructor/factory method
 at [Source: {"data":["a","b","c"]}; line: 1, column: 10] (through reference chain: POJO["data"]->java.util.ArrayList[0])

A: As Sotirios said in a previous answer. The @JsonCreator is the key here. But, in order to get all of the classes to work @JsonProperty might be needed.
public static class POJO {
    protected final List<StringWrapperOuter> data;

    // In order for POJO creation to work properly the @JsonProperty
    // annotation on the arg is required
    @JsonCreator
    public POJO(@JsonProperty("data") final List<StringWrapperOuter> data) {
        this.data = data;
    }

    public List<StringWrapperOuter> getData() {
        return data;
    }
}

public static class StringWrapper {
    protected final String s;

    @JsonCreator
    public StringWrapper(final String s) {
        this.s = s;
    }

    @JsonValue
    public String getS() {
        return s;
    }
}

public static class StringWrapperOuter {
    protected final StringWrapper s;

    @JsonCreator
    public StringWrapperOuter(final StringWrapper s) {
        this.s = s;
    }

    @JsonValue
    public StringWrapper getS() {
        return s;
    }
}

A: @JsonValue is for serializing. The analogous annotation for deserializing is @JsonCreator.
Annotate your constructors
@JsonCreator
public StringWrapper(final String s) {
    this.s = s;
}

and
@JsonCreator
public StringWrapperOuter(final StringWrapper s) {
    this.s = s;
}


text:
Q: MappingException (Hibernate) "Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister "
I am not using any maven or such tools and manually add and reference libraries.
I have gone through all the similar questions posted earlier and included all the relevant libs that might need to be included.
I am using Java 1.8,Hibernate 5 with the same compliance level.
All getters and setters also present and verified.
Unable to determine what's causing this.[PLEASE DON'T MARK THIS DUPLICATE AND LET ME KNOW IN COMMENTS IF YOU THINK I MISSED ANY POSSIBLE SOLUTION]
Student.java
package com.vv.hibernate.demo.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="student")
public class Student {
    public Student() {
    }

    @Id
    @Column(name="id")
    private int id;

    @Column(name="first_name")
    private String firstName;

    @Column(name="last_name")
    private String lastName;

    @Column(name="email")
    private String email;

    public Student(String firstName, String lastName, String email) {
        super();
        this.firstName = firstName;
        this.lastName = lastName;
        this.email = email;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "Student [id=" + id + ", firstName=" + firstName + ", lastName=" + lastName + ", email=" + email + "]";
    }

}

CreateStudentDemo.java( the main file)
package com.vv.hibernate.demo;

import org.hibernate.MappingException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.boot.Metadata;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import com.vv.hibernate.demo.entity.Student;

public class CreateStudentDemo {

    public static void main(String[] args) throws org.hibernate.MappingException {
        SessionFactory sessionFactory;
        try {
            StandardServiceRegistry standardRegistry = new StandardServiceRegistryBuilder()
                    .configure("hibernate.cfg.xml").build();
            Metadata metaData = new MetadataSources(standardRegistry)
            .addAnnotatedClass(Student.class)
//          .addAnnotatedClassName( "com.vv.hibernate.demo.entity" )
                    .getMetadataBuilder().build();
            sessionFactory = metaData.getSessionFactoryBuilder()
                    .build();
        } catch (Exception e) {
            System.out.println("Initial SessionFactory creation failed");
            e.printStackTrace();
            return;
        }

        try(Session session = sessionFactory.openSession()) {
            Student student = new Student("a", "b", "a@b.com");
            session.beginTransaction();
            session.save(student);
            session.getTransaction().commit();
            System.out.println("Transaction completed");
            session.close();
        }
        catch (MappingException exception) {
            System.out.println("Problem creating session factory");
            exception.printStackTrace();
        }

    }

}

hibernate.cfg.xml
<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

    <session-factory>

        <!-- JDBC Database connection settings -->
        <property name="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
        <property name="connection.url">jdbc:mysql://localhost:3306/hb_student_tracker?useSSL=false&serverTimezone=UTC</property>
        <property name="connection.username">hbstudent</property>
        <property name="connection.password">hbstudent</property>

        <!-- JDBC connection pool settings ... using built-in test pool -->
        <property name="connection.pool_size">1</property>

        <!-- Select our SQL dialect -->
        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>

        <!-- Echo the SQL to stdout -->
        <property name="show_sql">true</property>

        <!-- Set the current session context -->
        <property name="current_session_context_class">thread</property>

    </session-factory>

</hibernate-configuration>

Console Errors:
    Feb 25, 2021 7:57:30 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.2.17.Final}
Feb 25, 2021 7:57:30 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1 (file:/C:/eclipseWKSP/hibernate-tutorial/lib/jaxb-impl-2.2.6.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Feb 25, 2021 7:57:31 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
Feb 25, 2021 7:57:31 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Feb 25, 2021 7:57:31 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [com.mysql.cj.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/hb_student_tracker?useSSL=false&serverTimezone=UTC]
Feb 25, 2021 7:57:31 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {password=****, user=hbstudent}
Feb 25, 2021 7:57:31 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Feb 25, 2021 7:57:31 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 1 (min=1)
Feb 25, 2021 7:57:31 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
Feb 25, 2021 7:57:32 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop
INFO: HHH10001008: Cleaning up connection pool [jdbc:mysql://localhost:3306/hb_student_tracker?useSSL=false&serverTimezone=UTC]
Initial SessionFactory creation failed
org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
    at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:123)
    at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:77)
    at org.hibernate.metamodel.internal.MetamodelImpl.initialize(MetamodelImpl.java:129)
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:300)
    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
    at com.vv.hibernate.demo.CreateStudentDemo.main(CreateStudentDemo.java:27)
Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
    at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:91)
    at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:116)
    at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:382)
    at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:519)
    at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:124)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:96)
    ... 5 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:88)
    ... 15 more
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.reflect.AccessibleObject.setAccessible(boolean)" because "ao" is null
    at javassist.util.proxy.SecurityActions.setAccessible(SecurityActions.java:103)
    at javassist.util.proxy.DefineClassHelper.toClass3(DefineClassHelper.java:151)
    at javassist.util.proxy.DefineClassHelper.toClass2(DefineClassHelper.java:134)
    at javassist.util.proxy.DefineClassHelper.toClass(DefineClassHelper.java:95)
    at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:131)
    at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:530)
    at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:515)
    at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:451)
    at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:422)
    at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:75)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
    at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:156)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:58)
    ... 21 more

Java Build Path config also attached:

A: *

*First reason - some jars missing.

*Second reason - put the same version for hibernate in all dependencies jars

A: I still couldn't find the exact answer to above code but after retracing the tutorial i am following and by luck , the errors are gone . Will reshare the exact things that worked.
Also I was following udemy chad's tutorial so anyone who faces the same can reference this. Be very exact with jars versions (chad didn't include many in his).
Student.java was same as question
CreateStudentDemo.java ( I had to use old ORM code to get this to work)
package com.vv.hibernate.demo;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

import com.vv.hibernate.demo.entity.Student;

public class CreateStudentDemo {

    public static void main(String[] args) {

        // create session factory
        SessionFactory factory = new Configuration().configure("hibernate.cfg.xml").addAnnotatedClass(Student.class)
                .buildSessionFactory();

        // create session
        Session session = factory.getCurrentSession();

        try {
            // create a student object
            System.out.println("Creating new student object...");
            Student tempStudent = new Student("Paul", "Doe", "paul@luv2code.com");

            // start a transaction
            session.beginTransaction();

            // save the student object
            System.out.println("Saving the student...");
            session.save(tempStudent);

            // commit transaction
            session.getTransaction().commit();

            System.out.println("Done!");
        } finally {
            factory.close();
        }
    }
}

hibernate.cf.xml was also same as question
Console log
Feb 26, 2021 12:52:06 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.2.0.Final}
Feb 26, 2021 12:52:06 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Feb 26, 2021 12:52:06 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1 (file:/C:/eclipseWKSP/hibernate-tut/lib/jaxb-impl-2.2.6.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Feb 26, 2021 12:52:07 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
Feb 26, 2021 12:52:07 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Feb 26, 2021 12:52:07 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [com.mysql.cj.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/hb_student_tracker?useSSL=false&serverTimezone=UTC]
Feb 26, 2021 12:52:07 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {password=****, user=hbstudent}
Feb 26, 2021 12:52:07 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Feb 26, 2021 12:52:07 PM org.hibernate.engine.jdbc.connections.internal.PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 1 (min=1)
Feb 26, 2021 12:52:07 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
Creating new student object...
Saving the student...
Hibernate: insert into student (email, first_name, last_name) values (?, ?, ?)
Done!
Feb 26, 2021 12:52:09 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop
INFO: HHH10001008: Cleaning up connection pool [jdbc:mysql://localhost:3306/hb_student_tracker?useSSL=false&serverTimezone=UTC]

referenced libraries:

A: I was stuck with the same problem, also following the same course by Chad on Udemy.
Removing javassist-3.22.0-GA.jar and adding the jar from here (version 3.19.0-GA ) fixed it for me.

A: I also learn this online tutorial and meet the same problem. After trying various solutions, I find there are some clues:

*

*check all jars
lib folder

*delete the module-info.java file
Not sure about the reason but the second solution works well on both JavaSE-11 and JavaSE-17.


text:
Q: one table for all blob with a one to one table for metadata which link to one or many tables? I'm going to start by saying that I'm not a DBA but i got that role in my current project so I'm doing my best.

*

*The application must be able to store files(attachments, official
documents, etc)

*The application is using entity framework 6 (EF6) to query the
database.

*Sql server that I'm using (2012) doesn't have the
FileStream/FileTables functionality activated and I have to assume
it will never be activated.

*I don't have access to a fileserver.
I'm not the only one that could change the DAL in the application and I know that if you are not careful with how you write the query with EF6, it's by default select * from so while doing the database I made the choice, to be safe, of creating one table for all blob with a identity as primary key and a one to one mapping to another table which contain the metadata (filename, uploaded time, uploaded by, etc).
A file can have relation to many others tables(dataset) and a dataset can have multiple files.
I see two way of design, I'm showing 2 datasets here(notice and noticemaster) but I could have more;
Option 1

Option 2

My question is; which one is a proper implementation? is there an option 3?
Bonus question; did i made a good choice to have 1 table for all files and 1 table for all metadata?

A: Either of these models look reasonable. The NoticeMasterFile intersection table is not strictly needed since you can get the information through either model. The question is: How do you intend to use the NoticeMasterFile information? Perhaps this change would support some future plans that you have.
Of course, the problem is that looking at a data model does not really reveal the thinking behind the model.
Nonetheless, separating the blob seems like a very good idea to me. If nothing else it protects you when someone runs SELECT * on the FileMeta table.
As an aside and for what it is worth, if you use sp_tableoption to set 'large value types out of row'=1 the blobs will leave a 16-byte key that references the blob pages.  The blob will still be considered part of the table. The separation would allow you to query the other columns of FileMeta without the processing overhead of the blob data.  (This is the default setting.)
Questions: How many documents do you expect to accumulate in your database? How large is the average size? Et cetera?
If your document load will be relatively light, then this should be fine. But remember that every document is included in the backups that you take.
If you think it likely that you will eventually move into the Terabyte size range, you should do some further planning for how to store the documents.
Perhaps:

*

*Consider creating a series of filegroups for the documents as the data grows. At the proper time, set the older filegroups to read only. This protects the data and gives you the option of backing them up less frequently.

*Ask your business to reconsider the value of storing documents in the file system.

For what it is worth, we have done it both ways over the years and both ways have their issues. But more systems that were using embedded documents are now using a file share instead.


text:
Q: Getting duplicates in MySQL JOIN query I needed to join 2 tables together in a query and have the query executing properly except it is listing duplicates of the data?  I only need one copy of each record returned.
SELECT DISTINCT FirstName, LastName, r.Email, ListingID
FROM TableE e
JOIN TableR r ON e.ListingAgentID=r.AgentID
WHERE ListingFirmID = 'JNA'
ORDER BY ListPrice DESC

Returns:
FirstName  |  LastName  |  Email      |  ListingID
-------------------------------------------------
Buck       |  Rogers    | buck@b.com  |  563214
Buck       |  Rogers    | buck@b.com  |  563214
Samm       |  Bogers    | samm@b.com  |  999999
Samm       |  Bogers    | samm@b.com  |  999999
Alan       |  Stoger    | Alan@b.com  |  232323
Alan       |  Stoger    | Alan@b.com  |  232323
Dann       |  Dammit    | dann@b.com  |  636363
Dann       |  Dammit    | dann@b.com  |  636363
Dann       |  Dammit    | dann@b.com  |  636363
Dann       |  Dammit    | dann@b.com  |  636363

A: SELECT DISTINCT <rest of your query goes here>


text:
Q: Build custom Extjs for panel I'm using an extjs panel that shows information that the user can show or hide. Everything works smoothly. But ext-all.js's size is too big and I've been looking around and saw that there is a possibility to customize it to just use the parts you need. I tried the site's "Build your own" but says the page is not found.
Anyone knows how to reduce the size of the ext-all.js? Or build a custom one?

A: You can build your own extjs with jsbuilder, which is a software (exists in java and in python.
You'll have to modify the .jsb file, in order to manage dependencies. You can look at how the pkgs files are built.
This is quite difficult, though, to find your way through the dependencies.
The command line looks like (on linux) :
java -jar /path/to/JSBuilder2.jar --projectFile $BUILDDIR/ext-lsi.jsb2 --homeDir $DESTDIR

I use it often, it's working well now.
But I'm quite sure this will be another adventure for Ext4.
Links

*

*Sencha Forum about jsbuilder

*Tutorial

A: In your download of ExtJS there is a pkgs directory which contains some prebuilt parts.


text:
Q: ¿Por qué me dice error: deprecated conversion from string constant to 'char*' [-Wwrite-strings]? #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
char *preorden="GEAIBMCLDFKJH";//linea 5
char *inorden="IABEGLDCFMKHJ";//linea 6
char *postorden;

 void post(char *pre, char *in, char *pos, int n)
 {
     int longIzqda;

     if(n!=0) {
         pos[n-1]=pre[0];
         longIzqda=strchr(in,pre[0])-in;
         post(pre+1,in,pos,longIzqda);
         post(pre+1+longIzqda,in+1+longIzqda,pos+longIzqda,n-1-longIzqda);
     }
 }

 int main(int argc,char *argv[])
 {
     int aux;
     aux=strlen(preorden);
     postorden=(char *)malloc(aux*sizeof(char));
     if (postorden) {
         printf("El preorden es: %s\n",preorden);
         printf("El inorden es: %s\n",inorden);
         post(preorden,inorden,postorden,aux);
         postorden[aux]='\0';
         printf("El postorden calculado es: %s\n",postorden);
         free(postorden);
     } else {
         fprintf(stderr,"Error: Sin memoria\n");
         return 1;
     }
     return 0;
 }

A: El problema reside en que estas pasando cadenas constantes a una función que recibe char*.
Dado que no vas a modificar esas cadenas dentro de la función te sugiero lo siguiente.
Modifica la cabecera de la función de la siguiente manera:
void post(const char *pre, const char *in, char *pos, int n)

y las cadenas:
const char *preorden="GEAIBMCLDFKJH";
const char *inorden="IABEGLDCFMKHJ";

Esta es una pregunta relacionada del sitio en inglés


text:
Q: MVC 3 get days of month in table columns I am learning MVC 3, it is fun, but not always :).
I have one problem I can't solve.
I have this in my table in db
  id     | worker      | working_hours |    year     | month | day  |  shift

    1        worker1            5             2013      6      1        day
    2        worker2            6             2013      6      2        day
    2        worker3            7             2013      6      3        night

That works ok. But I would like to make it better :). But I have two problems.

*

*I need table columns do be prepopulated with days of month and for each day I could see working hours

*I need table to look something like this

         | 1  |  2  | 3  |   Total

day        5     6            11

night                 7        7

That is just for 3 days in db, but I need table headers to be prepopulated with all days for month.
It seems easy, but I cant solve this one :). Can someone please give me a hand with this. I am doing all this in MVC 3 and using linq to sql connection to my db.

A: Maybe do something like this if this is REALLY what you want:
id  |  id(from table 1)  |  Shift  | 1  |  2  | 3  | ect.....  Total

 1             1            day      5     6                    11

 2             1            night               7                7

Then in your primary table replace the Day column with the id from the above table and remove the Shift column. You could then add a unique key constraint to the above table so it won't allow a repeat if the id from table 1 and the shift are the same.
To be brutally honest however all this is just a bit confusing. Best bet would be to have two tables:
A:
id     | worker

1        worker1
2        worker2
3        worker3

B:
  id     | workerid      | working_hours |    year     | month | day  |  day

    1        1                  5             2013      6      1        true
    2        1                  6             2013      6      2        true
    3        2                  7             2013      6      3        false

It doesn't really matter that this table will have loads of entries and doesn't read well because you then write smart queries using LINQ to pull out the data that you need to display on an MVC webpage.


text:
Q: Check if async request is finished, using loopj android async I am developing an android app that uses Android Async. I am using this library called Android Asynchronous Http Client
I made a method for a GET request
public String getVenues(String token) throws Exception {
    AsyncHttpClient venuesReq = new AsyncHttpClient();
    venuesReq.addHeader("Authorization", "Token token=" + token);
    venuesReq.get(mainAct.httpRequestURL + "/venues", new AsyncHttpResponseHandler() {
        @Override
        public void onSuccess(String response) {
            venues = response;
        }
        @Override
        public void onFinish() {
           // Completed the request (either success or failure)
       }
    return venues;
}

but when I call getVenues("token") the return is null, but when I try to call getVenues("token") after few seconds there are now results for venues.
I know that I am using async request so the venues doesn't return immediately.
Now what I want is, when I call getVenues("token") method there should be a returned response for the GET Request.

A: You need to use interface here take a look at this
https://stackoverflow.com/a/21773406/472336
Your class from where you are listening/asking for asyntask result need to impliment interface and call that interface method from asyntask..
Hope this helps


text:
Q: How to load extension for Chrome in remote selenium using golang?
I have selenium in docker container(selenoid from aerocube) and selenium library for golang from tebeka.
I can't find any examples that show how to run chrome in a remote selenium with the extension (literally only for go)
I even found function in library which do it, but I did not found example of code where It was used.
(https://pkg.go.dev/github.com/tebeka/selenium@v0.9.9/chrome#Capabilities.AddExtension)
caps := selenium.Capabilities{"browserName": "chrome", "browserVersion": "103.0"}

driver, err := selenium.NewRemote(caps, "http://127.0.0.1:4444/wd/hub")
if err != nil {
    fmt.Printf("create selenium session error: %v\n", err)
    return
}
defer driver.Quit()
driver.Get("https://www.google.com/")
driver.Close()

A: I want to use the modheader extention, but I get the same question, and i solved it.
Step 1: Get your chrome extention (.crx) file
In my case, i find the modheader document,and get download link from the page.
https://docs.modheader.com/advanced/selenium-webdriver
Download the .crx file to you project.
the .crx download page
Download link
https://github.com/modheader/modheader_selenium/raw/main/chrome-modheader/modheader.crx
Note: Web browser maybe block the download by policy, use the "wget" command get the
file.
block by browser
wget the file
If you want to get other extention , use the follow CRX Extracti/Downloader can help you.
CRX Extracti link
CRX Extracti/Downloader webpage
Step 2: Use the Code loding the extention
package main

import (
    "fmt"
    "os"

    "github.com/tebeka/selenium"
    "github.com/tebeka/selenium/chrome"
)

const (
    port = 8080
)

func main() {

    opts := []selenium.ServiceOption{
        // Enable fake XWindow session.
        // selenium.StartFrameBuffer(),
        selenium.Output(os.Stderr), // Output debug information to STDERR
    }

    _, err := selenium.NewChromeDriverService("../your_driver_path/chromedriver.exe", port, opts...)
    if err != nil {
        panic(err)
    }

    caps := selenium.Capabilities{"browserName": "chrome"}
    var cap_ext chrome.Capabilities

    // add your extention by crx file
    cap_ext.AddExtension("./modheader.crx")
    caps.AddChrome(cap_ext)

    wd, err := selenium.NewRemote(caps, fmt.Sprintf("http://127.0.0.1:%d/wd/hub", port))

    // Using api to setting modheader

    // add header
    wd.Get("https://webdriver.modheader.com/add?test=ModHeader%20Test")

}

Step 3: Setting the extention
Modheader extention supply api to setting.
Example :
wd.Get("https://webdriver.modheader.com/add?test=ModHeader%20Test")

Step 4: Result
Loading and setting extention successful
I hope that I can help. Good Luck.


text:
Q: Can I still have a data logging background service in Android 8.0? My app relies on logging the battery temperature, as well as several other sensor variables, every second in a background service that can be started from the main activity and continues running in the background until it's stopped (by another button in the main activity). This works fine in Android 7.0 and below, but reading into Android 8.0, it looks like it limits background services pretty severely. Can I still do this data logging that I currently do, or is that no longer possible?

A: If your usecase is to keep the app in foreground during this processing then,
based on the documentation, there shouldn't be any problem, since the restrictions for background service is applied if your app is not in Foreground or no foreground app is connected to the app
X minutes (based on my observations its around 1 - 2 minutes) after your app enters in background all the restrictions for background service will kick in and your Service will be stopped as if you have called Service.stopSelf()
You should avoid doing it continuously, since it will impact battery life of the device, if are intending to do in background. You can perform logging periodically using JobScheduler/AlarmManager.
If you still want to proceed, you can make the service ForegroudService and perform the operation but if system considers your task as CPU intensive then this approach wont' work either


text:
Q: Поиск одинаковых классов в таблице У меня есть таблица. Мне нужно что бы при клике на любую из ячеек все соседние элементы(и только те которые находятся рядом), которые имеют такой же рисунок(соответственно класс) поменяли цвет. Значит сделала, но очень много кода, то есть разным группам прописала разные классы, но это не правильно так как групп может быть очень много. Потом решила включить голову и как-то это сократить. Вопрос в том, как кликнув на ячейку выделить всех ее соседей с таким же классом, только те которые находятся рядом

window.onload = function() {
  var blockcolor = document.getElementById('table');
  var first = document.querySelectorAll('.first');
  var elements = document.getElementsByTagName('th');
  table.addEventListener('click', function() {
    if (this.classList.contains('first')) {
      for (var i = 0; i < elements.length; i++) {
        elements[i].style.background = 'green'
      }
    }
  })
}
table tr th {
  width: 40px;
  height: 40px;
  border: 1px solid black;
}

.background {
  background: grey;
}

.first,
.second,
.third,
.four {
  width: 40px;
  height: 40px;
  border: 1px solid black;
}

.first,
.third {
  background: yellow;
}

.second,
.four {
  background: pink
}

    ✫
    ✫
    ❄
    ❄
    ❄
    ❄

    ✫
    ✫
    ❄
    ❄
    ✫
    ✫

    ✫
    ❄
    ❄
    ✫
    ✫
    ❄

    ✫
    ❄
    ✫
    ✫
    ✫
    ✫

A: не в качестве ответа, но может подтолкнет к решению.
вариант на jquery

$("td").click(function(){
   $(".marked").removeClass('marked');

   var c = $(this).index();
   var r = $(this).parent().index();
   var cls = $(this).attr('class');

   var rows = [r-1, r, r+1];
   var cols = [c-1, c, c+1];

   var rowMax = $("#table").find("tr").length - 1;
   var colMax = $("#table tr:first-child td").length -1;

   rows.forEach(function(rIdx){
       if(rIdx < 0 || rIdx > rowMax) return false;

       cols.forEach(function(cIdx){
           if(cIdx < 0 || cIdx > colMax) return false;

           var cell = $("#table tr").eq(rIdx)
                           .find("td").eq(cIdx);

           if( cell.hasClass(cls) ){
               cell.addClass('marked');
           }

       });
   });

});
.first { background-color: pink; }
.first::after { content: '✫'; }
.second { background-color: yellow;}
.second:after {  content: '❄'; }

td { width: 40px; height: 40px; border: 1px solid black; text-align: center; }

.marked { color: red; font-weight: bold; }

A: Вариант на чистом JS. Вид элемента определяется по атрибуту data-type чтобы не было конфликта с классами, это значит что можно присваивать сколько угодно и какие угодно классы. Выделяются только те которые впритык. До этого выбранные элементы не сбиваются и им можно обратно отключать активность.

const th = document.querySelectorAll('th');

[...th].forEach(i => i.addEventListener('click', ({ target }) => {
  const active = target.classList.contains('active')
  const myTr = target.closest('tr')
  const myIndex = [...myTr.children].indexOf(target)
  let elements = [target, target.previousElementSibling, target.nextElementSibling]

  if (myTr.previousElementSibling)
    elements.push(myTr.previousElementSibling.children[myIndex])
  if (myTr.nextElementSibling)
    elements.push(myTr.nextElementSibling.children[myIndex])

  elements = elements.filter(i => i && i.dataset.type === target.dataset.type)

  for (i of elements) {
    i.classList.toggle('active', !active)
  }
}))
.active {
  background: green !important;
  color: white;
}

.ceil {
  width: 40px;
  height: 40px;
  border: 1px solid black;
}

[data-type="first"] {
  background: yellow;
}

[data-type="second"] {
  background: pink
}

    ✫
    ✫
    ❄
    ❄
    ❄
    ❄

    ✫
    ✫
    ❄
    ❄
    ✫
    ✫

    ✫
    ❄
    ❄
    ✫
    ✫
    ❄

    ✫
    ❄
    ✫
    ✫
    ✫
    ✫

A:

window.onload = function() {
  var blockcolor = document.getElementById('table');
  var first = document.querySelectorAll('.first');
  var elements = document.getElementsByTagName('th');
  table.addEventListener('click', function(event) {
    // элемент, на который кликнули
    const {target} = event;
    // обрабатываем только ячейки
    if(target.nodeName !== 'TH') return;
    const isActive = target.getAttribute('active')
    const className = target.classList.value;
    const parent = target.parentNode; // строчка, в которой находится ячейка

    // проходимся циклом по всем дочерним элементам
    for(child of parent.children) {
      if(child.classList.contains(className) && !isActive) {
        child.style.background = 'green';
        child.setAttribute('active', true);
      } else {
        child.style.background = '';
        child.removeAttribute('active');
      }
    }
  })
}
table tr th {
  width: 40px;
  height: 40px;
  border: 1px solid black;
}

.background {
  background: grey;
}

.first,
.second,
.third,
.four {
  width: 40px;
  height: 40px;
  border: 1px solid black;
}

.first,
.third {
  background: yellow;
}

.second,
.four {
  background: pink
}

    ✫
    ✫
    ❄
    ❄
    ❄
    ❄

    ✫
    ✫
    ❄
    ❄
    ✫
    ✫

    ✫
    ❄
    ❄
    ✫
    ✫
    ❄

    ✫
    ❄
    ✫
    ✫
    ✫
    ✫


text:
Q: How to create a Windows Compatible Encrypted disk image? I need to send a file over Email securely.  My idea was to use a Disk Image containing the file.  Unfortunately, the person who I am sending the file to has a PC running Windows 10.
I need a way (most likely through the command line) to create an Encrypted Disk Image from a folder that is both read and write compatible on both Mac's and PC.
Even better would be an Apple Script Droplet that would take a file (not a folder) create a folder and then create an Encrypted Disk Image from that folder that is both read and write compatible on both Mac's and PC and then remove the original file and folder.
Note:  Shell scripts are fine for the Apple Script Droplet.
I have tried creating an encrypted .cdr image and then changing the extension to .iso.  Worked on Mac, but "Error...Corrupted" on PC.
I have also tried
hdiutil makehybrid -iso -joliet -o [filename].iso [encryptedfile].cdr
It worked but it was not encrypted.