Am I a materialist?

Question: I believe that there is nothing even close to non-trivial certainty in philosophy, at least outside of ethics and psychology. For this reason, I believe in monism at about 60%. Furthermore, I believe that materialism is much more preferable to idealism, at about 60%. I think this may mean I believe in materialism at about 36%. Am I a materialist?
Comment: But 36% Materialist means 64% Idealist
Comment: that's one way of looking at yes @MauroALLEGRANZA but am I materialist?
Comment: Maybe applying percentages is not the useful approach to "philosophical beliefs"... If you believe that materialism is much more preferable to idealism (no percentage used) then yes, you are a materialist.
Comment: that's a reasonable response, yes @MauroALLEGRANZA I just find it confusing. Is this a thing?
Comment: Whyever do you pick out ethics and psychology as potential areas of certainty? These are two of the more contentious portions of philosophy.
Comment: Finally ... someone who sees the light but ... is blinded by it! Me ... me in dark ... cold ... place ... with !!
Comment: @BobaFit obviously not all ethics is uncontroversial, but if ethics is universal then torturing innocent people is at least bad, and i believe that with *some certainty*. as to psychology, if it could establish no facts etc. then neuroscience is going to struggle (i would have thought). it may be mistaken to subsume these under "philosophy", if not the argument that is to be had here
Comment: to an extent, i may just mean "[Folk Psychology](https://plato.stanford.edu/entries/folkpsych-theory/#TheoTheo)", whatever its status (i'm unsure)
Comment: i would have *thought* we can predict how people will behave (big data is good at it), in *some* situations, with far more reliability than there is consensus in philosophy.
Comment: Welcome to SE. Whether you are a materialist or not is a matter of what you believe and no-one can tell you what you believe - though someone else could classify your beliefs if that's your problem. If you don't feel your beliefs fit neatly into this category or that, but maybe you lean one way or another, probabilities make sense. But it is very odd to call yourself a materialist without qualification unless you are more than 50% materialist. Given your numbers, I would suggest that it makes sense to call yourself an idealist with materialist leanings.
Comment: @user66128 and you are more certain of these things than basic mathematical formulations, like 1+1=2?
Comment: @Nacht Note that 1+1 = 1 when adding probabilities.  Not everything follows the linear version of arithmetic.
Comment: what do you mean @Dcleve the answers seem to have missed that if we use standard probability then either we can be pretty sure on trivial things or we don't believe/know much through philosophy
Comment: @user66128 — I was pointing out to Natch that different maths apply to different aspects of our world, and therefore 1+1 does not always equal 2.
Answer: I would suggest to frame this as a betting exercise, not a probability; probabilities are facts about frequencies in large sample sets, and there's only the one reality to be monistic or not.
Suppose these percentages are the ratios at which you'd consider it a good bet if God came down from heaven and offered you odds before divinely revealing the true nature of reality beyond all possible doubt.
If...

your prior bets are well considered

you are confident that you have considered all possible answers

you are confident in your assessments that the prior bets are indeed necessary conditions for the secondary bets

...then it is rational to convert the odds on the prior bets to fractions of the whole (so e.g. 6:4 odds becomes 6/(6+4) = 0.6) and multiply the odds to obtain the ratio at which a secondary bet is also a good bet.
1 is subjective. 3 looks good in this case, materialism is a kind of monism.
However, you should not be confident in 2: idealism and materialism don't form a complete set of ways that reality can be monistic. See also panpsychism ("all is spirit") and pantheism ("all is God/gods"), and possibly others that I haven't considered. What if your assessed weightings are panpsychism 70, pantheism 20, materialism 6, idealism 4? Then materialism is preferred to idealism by a 6:4 ratio, but your bet on materialism (after multiplying by 6/10 for monism) should be made at odds of only 36:964, or 3.6% of the total set of outcomes.
Be careful of over-estimating very small ratios when doing this with a large set of possibilities. Humans are bad at intuiting a difference between 1:100 and 1:100000, and there are plenty of things that aren't even worth a 1:100000 bet.
Answer: Hmmm. There are not very many actual materialists left among serious philosophers. The discoveries of modern physics in the last century, where energy, fields, and probability envelopes seem more fundamental than objects, pretty much killed materialism.
The plurality of philosophers today are physicalists, where "what we discover about the subjects studied by physics" takes the place of "matter" in a monist ontology. But there are a lot of problems with this worldview.
The first problem is that a field of study is intrinsically open, both to its content, and its completeness.  Physics does not presume monism, nor the causal closure of physics.  Hence "what physics learns" cannot be a monist stand in for materialism, without some other NON physics assumptions added.  The best known articulation of this problem is Hempel's Dilemma.  The lack of a case for causal closure within physics itself supplements Hempel.
The second issue is the nature of logic and information.  Many theoretical physicists are trending toward treating physics as reducible to math. The Copenhagen interpretation "shut up and calculate" basically does this, and the rationale for Everett, that "the other world are in the math therefore they exist" is explicitly reductive to math. Others treat it as reducible to information, which is what the holographic approaches to physics do.  Both information and math are in the general category of abstractions, and reducing to them is a version of idealism.  Few physicists embrace this full on idealism, but many admit that characterizing our universe requires specifying both objects and information about them.  Which is a dualism.  Information and math are driving physics in the direction of either a dualism or a monist idealism.
The third issue is the status of reductionism and emergence. Physicalism, to be a monism, requires everything to reduce to physics.  But the near consensus today is that the other sciences do not reduce to physics.  See section 5 of SEPs article on Scientific Reduction. The majority view is pluralism, that the other sciences, AND non science fields, study real things. And how they relate/interact with physics is TBD.  Pluralism does not support a monism.  Physicalists who embrace it hold by a strong version of emergence, but emergence principles are still unspecified, as is an epistemology that produces two classes of "real". The "real real" of physics and the "dependent/emergent" real of all other fields.  Popperian science only generates one class of real.
The fourth concern is the hard problem of consciousness. No physicalist theory explains consciousness.  Apply Darwinian variance to them, and all would predict we should not be conscious, or have been falsified by test cases. A long term "problem" like this (over 150 years for HPC) is generally seen by those who don't hold by the view that faces the "problem" as a definitive refutation. Consider the similar "problem of evil". Non theists consider it a definitive refutation of an omniGod.
You realize that philosophy is complex. An ontological worldview, tied to an epistemological theory, is therefore unlikely to be a slam dunk that one can spell out in complete and convincing terms.
I suspect that once you investigate the points I summarized, you will abandon the materialist label for physicalism, but that due to the four subsequent problems noted, you are only going to consider yourself "physicalist leaning".
Four three good books by sympathetic but now formerly physicalist leaning philosophers, see Daniel Stoljar's Physicalism, Jaegwon Kim's Physicalism or Something Near Enough, and Susan Blackmore's A Very Short Introduction to Consciousness. I have reviews of all three on Amazon. Blackmore is a Neutral Monist, Kim an epiphenomenalist dualist but just in relation to qualia, and Stoljar has abandoned ontology for just open minded Popperian empiricism.
Answer:
Am I a materialist?

This question doesn't make sense within the context of your argument, and cannot be answered as such.
There are some answers here that illuminate the question, but I'm going to take a simple tack and criticize the question. If you state the assignment of a property in terms of probability, then to ask whether or not the property applies with certainty is a fallacy, because in the premises of the argument, the probabilities that you explicitly state presume that it is undecided whether or not the property applies. To review, your argument states:

P1 I'm 60% likely to be a monist.
P2 I'm 60% likely to be a materialist rather than an idealist.
P3 I believe I'm 36% likely to be a materialist.

The question, "Am I a materialist?" is fundamentally the wrong sort of question to ask, because all three premises are probabilistic. Unless the numbers come out to 0% or 100% when using frequentist notions of probability (though your usage is subjective, not frequentist), one cannot claim certainty in a conclusion. Your numbers do not come out to 0% or 100%, so it's a bad question. The well-formed question in this argument is instead "What is the probability I am a materialist?" And for the record, your belief (which is an additional premise because it's a propositional attitude) doesn't make it so but only offers to the reader the insight that you are using multiplication of probabilities as a frequentist does in calculations raising the philosophical question of whether such a technique is appropriate using subjective probabilities. I would, for example, be inclined that your use of numbers in this circumstance is an example of false precision:

False precision (also called overprecision, fake precision, misplaced precision and spurious precision) occurs when numerical data are presented in a manner that implies better precision than is justified; since precision is a limit to accuracy (in the ISO definition of accuracy), this often leads to overconfidence in the accuracy, named precision bias.

By what grounds do your premises use such numerical accuracy to begin with? If we strip out the false precision, we still have:

P1: It's likely I am a monist.
P2: It's likely I am materialist.
P3: I believe its unlikely I am a materialist.

What should the conclusion be drawn about being a materialist? Well, it seems that if you believe you think it's more likely you're a materialist than an idealist, and you believe you unlikely to be a materialist, then your conclusion is irrational and that your premises are therefore suspect to begin with.
Answer: Let's calculate: 36% of materialism and 40% of them of idealism = 14,4%, so 50,4% of materialism or idealism, but stop... what is 49,6%?
Oh...
You definitely at most part 49,6% Dark-Materialist!
Comment: @user66128 ye, im ok, i think you should to create something not your usual themes, to be not banned in chats)
Comment: oh hey, i'm sorry about my behaviour. are you ok?
Comment: and yeah, i don't feel like using this site anymore :) so chill axe and go happy, if not free haha. thanks!
Comment: if you want to chat about something start a room and i'll do my best hah. but it's up to ye
Answer: If we suppose that much of philosophy has the same branching nature of materialism/physicalism and monism, and that it is the case that there is no near certain non-trivial knowledge to be had from it, then there seems to be two options

we can conclusively or near conclusively debunk a philosophy (100% sure that idealism is not true)

we don't believe our philosophical positions, just hold them as the most likely among their alternatives (36% physicalist and 24% idealist).

Both look a bit like negative meta-philosophies: philosophy works to exclude beliefs (at 100% or as less appealing than another).

Am I a materialist?


"Not ... Is Nothing" versus "... IsNot Nothing"

Question: Does anyone here use VB.NET and have a strong preference for or against using Not foo Is Nothing as opposed to foo IsNot Nothing? If so, why?
For Example
If var1 IsNot Nothing Then
...
End If

and
If Not var1 Is Nothing Then
...
End If

I just want to know which one is better?
Are they both equally acceptable?
Comment: I've already looked this Question.[It](http://stackoverflow.com/q/5791/507860) is a Comparism of IsNothing(obj) Between obj Is Nothing.
Answer: The
If Not var1 Is Nothing Then

Is a hangover from VB6.  There didn't used to be an IsNot, and so this was the only way to determine if a variable was not Nothing.  It seems to be redundant in VB.NET.
Comment: `IsNot` is a newer operator that didn't exist in pre .NET2 versions.
Comment: I wonder if it's actually faster or compiles to the same. I mean, `Not x Is Nothing` first does a check for type equality, then negates it. `x IsNot Nothing` does only a check for type unequality which the runtime might be capable of doing faster (dumbly imaginable as if it checks a type field by field and can leave by the first non-matching one rather than going through each field to check for equality - on top just to negate the result eventually).
Answer: foo IsNot Nothing
The following line is straight from Microsoft's Visual Basic Coding Conventions:

Use the IsNot keyword instead of Not...Is Nothing.
Answer: I would go with the first variant - it reads like English and is easier to follow/understand than the second one. Other than that, they are equivalent.
Answer: I found a similar question here VB.NET - IsNothing versus Is Nothing, where I feel this question was exhaustively answered. Among the answers Jack Snipes identified http://weblogs.asp.net/psteele/410336, a blog that gives some extra detail. From those I prefer and have used
IsNot Nothing

which also makes my code easier to read and understand.
Comment: "Not...Is Nothing" is not the same thing as "Not IsNothing(...)" Not outright wrong, but not an answer for this question.
Answer: Using VB 7.0
If var1 Is Not Nothing Then
generates an "invalid use of object error" as per this "VBForums" link.
If var1 IsNot Nothing Then
generates a "Compile error:  Expected: Then or GoTo"
If Not IsNothing(var1) Then
worked like a champ
Comment: "`If var1 IsNot Nothing Then` generates a Compile error" of course it does, when there is no statement or block afterwards. `var1 IsNot Nothing` itself will work. You also fail to show what `Not var1 Is Nothing` does, so you don't really answer the question. And please fix your formatting


NTC thermistor circuit design - obtaining resistance values

Question: I am trying to solve this circuit in order to compare to regular Op Amp thermistor circuits.
I'm using R4 as an NTC thermistor that ranges from 25ºC (6.24kOhm) to 40ºC (2.663kOhm), and VCC as 5V and i want to get an output voltage from 0.1V to 4.9V (going for arduino) R3 is 5kOhm once it's the value of R4 at  room temperature.
How does this type of Amplifier work? Should I consider R1 and R2 any resistances and then only ajust Rg and Vref to manipulate the input voltage to 0.1-4.9?
Thank you for your atention. The Amp is an AD620A.
Comment: Search on "Wheatstone Bridge"
Comment: @ScottSeidman already did, how would i define a gain range from 0.1-4.9V from the IA by having the interval of voltage from the outputs of the bridge?
Answer: See this wonderful explanation from @VoltageSpike to offset the output voltage when the bridge is matched (room temp) and yet produces the 0.1V you desire. The gain should be calculated from the 40ºC difference voltage of the bridge.


Armature doesn't want to spin around intended origin

Question: The origin is at the feet squarely below the torso. If I sit the character down in for example a spinning chair and try to spin him, he becomes offset from it because his torso is behind the spinning axis of the chair but his spinning axis is still beneath his torso despite posing his legs. This is more of a question of practice than anything. Surely the origin shouldn't be in front of a model because that would compromise his ability to rotate while standing up but I cant think of what to do other than temporarily shift the origin in edit mode which seems like more trouble than it might be worth.
Answer: When I would code this for a game, I would do it like this:

Apply the sit down animation and wait for it to finish.
Make the Character a child of the spinning chair seat.
Rotate the seat of the spinning chair.

Im not sure how to do this within a blender animation but I hope this approach might be useful for finding a solution.
Answer: You don't have to shift origin in edit mode. Just parent armature to chair (if you want animate spinning from chair origin). For parented armature doesn't matter where origin is placed.
Like here - Armature and Cone are parented to Empty with animated rotation.
You can also parent armature directly to Cone, I did it just for a more freedom.

But seems to me more efficient use Bone Constraint modifier (for hip bone) > Copy Rotation, Target: Empty or Chair (animated), Mix: Add .


Applying promotions for a shoppin cart in react in the right order

Question: I just wanna know what is the best data structure type or any idea for executing multiple promo codes for discounts in the right order. For example I may have $164.99 worth of items in my shopping basket. After I apply promo code that takes 5% off the initial price and then I apply -20 dollars promo code I get 136.74 as the final price. Now let's say I wanna switch the order promotions have been added to the basket. On the initial price of $164.99 I first want to apply -20 dollars promo code and then 5% promo code and I get the 137.74 as the final price. How can I make it always have the right price in this case it would be $136.74 let's say.
I've only applied one switch case for that and here it is :
<code>export const priceAfterDiscount = (cart, promotions) => {
let totalReturnedPrice = getCartTotal(cart);
promotions.forEach(element => {
    switch(element){
    case "5%OFF":
        var reducedPrice = (totalReturnedPrice * 5) / 100;
        totalReturnedPrice -= reducedPrice;
        break;
    case "20EUROFF":
        totalReturnedPrice -= 20;
        break;
    case "20%OFF":
        var reducedPrice = (totalReturnedPrice * 20) / 100;
        totalReturnedPrice -= reducedPrice;
        break;
    }
});
return totalReturnedPrice;
}
</code>
Answer: All you can do is to apply every discount to the original value.
-say 5% applied on $164.99.
so discount will be of $8.2495,
you need to save this value
second discount is of $20 so total discount becomes $(20+8.2495)
$164.99-28.2495
Hence the discount remained same irrespective to the order of promo


Why is Wordpress custom post type not showing in admin panel?

Question: Every time I create a custom post type, the label never shows on the left admin panel, However, they do show when you click on manage post type.. Not sure what is going on.
Comment: manage post type? that's not something that's part of WordPress core, are you using a plugin to add post types?
Comment: Please post the code you are using to register your post type.
Comment: Make sure you don't give your post type a slug with more than 2 separators like this : `custom_post_type`, use `custom_posttype` instead.
Answer: Please check what the value of the show_in_menu and show_ui arguments for register_post_type your post types before you register tham.
Comment: Thank you Oleg, if ayone come here asking for a solution to hidden CPT in dashboard menu items,please take this into asscount (from codex):
Default 'show_ui' value is value of $public., I just change the value of public and my item disappear!
Answer: Sometimes this can be caused by the menu_position clashing with another menu position, or perhaps being hidden away by some other plugin. Try changing that value.
'menu_position' => 21

Answer: Hi I Have Some Idea Add I Also Create Custom Post Type You Need
Custome Post Type You Follow This Code It's Work for me.
// Register Custom Post Type services
function create_services_cpt() {

    $labels = array(
        'name' => _x( 'services', 'Post Type General Name', 'e-education' ),
        'singular_name' => _x( 'services', 'Post Type Singular Name', 'e-education' ),
        'menu_name' => _x( 'services', 'Admin Menu text', 'e-education' ),
        'name_admin_bar' => _x( 'services', 'Add New on Toolbar', 'e-education' ),
        'archives' => __( 'services Archives', 'e-education' ),
        'attributes' => __( 'services Attributes', 'e-education' ),
        'parent_item_colon' => __( 'Parent services:', 'e-education' ),
        'all_items' => __( 'All services', 'e-education' ),
        'add_new_item' => __( 'Add New services', 'e-education' ),
        'add_new' => __( 'Add New', 'e-education' ),
        'new_item' => __( 'New services', 'e-education' ),
        'edit_item' => __( 'Edit services', 'e-education' ),
        'update_item' => __( 'Update services', 'e-education' ),
        'view_item' => __( 'View services', 'e-education' ),
        'view_items' => __( 'View services', 'e-education' ),
        'search_items' => __( 'Search services', 'e-education' ),
        'not_found' => __( 'Not found', 'e-education' ),
        'not_found_in_trash' => __( 'Not found in Trash', 'e-education' ),
        'featured_image' => __( 'Featured Image', 'e-education' ),
        'set_featured_image' => __( 'Set featured image', 'e-education' ),
        'remove_featured_image' => __( 'Remove featured image', 'e-education' ),
        'use_featured_image' => __( 'Use as featured image', 'e-education' ),
        'insert_into_item' => __( 'Insert into services', 'e-education' ),
        'uploaded_to_this_item' => __( 'Uploaded to this services', 'e-education' ),
        'items_list' => __( 'services list', 'e-education' ),
        'items_list_navigation' => __( 'services list navigation', 'e-education' ),
        'filter_items_list' => __( 'Filter services list', 'e-education' ),
    );
    $args = array(
        'label' => __( 'services', 'e-education' ),
        'description' => __( 'post display theme services', 'e-education' ),
        'labels' => $labels,
        'menu_icon' => 'dashicons-buddicons-buddypress-logo',
        'supports' => array('title', 'editor', 'thumbnail', 'revisions', 'author', 'trackbacks', 'page-attributes', 'post-formats', 'custom-fields'),
        'taxonomies' => array(),
        'public' => true,
        'show_ui' => true,
        'show_in_menu' => true,
        'menu_position' => 5,
        'show_in_admin_bar' => true,
        'show_in_nav_menus' => true,
        'can_export' => true,
        'has_archive' => true,
        'hierarchical' => true,
        'exclude_from_search' => true,
        'show_in_rest' => true,
        'rest_base' => 'true',
        'publicly_queryable' => true,
        'capability_type' => 'post',
    );
    register_post_type( 'services', $args );

}
add_action( 'init', 'create_services_cpt', 0 );

This code carefully use Services => is my custom Post Type e-education => is my 'text-domain' you replace and Use
Comment: There's an error in this code. `rest_base` is a string, not a bool, and rather than using `'true'` as a value, the value is generally the post_type - in this case 'services'. Just because your code works for you doesn't mean your code is the answer to someone else's code not working. There was probably something else interfering with (perhaps) good code that the OP had. I'm struggling with this same situation now. Everything looks right. I need to look deeper to see what is affecting the left-hand navigation bar when the "+NEW" admin bar shows my CPT.
Answer: This is a very old Q&A but I just resolved this by ensuring that register_post_type is invoked in a callback on action 'init', not 'admin_init'.
I was thinking that since I would only want my CPT maintenance to be visible to admins that I should setup on admin_init. I believe the proper way to see this is that CPT dashboard menus are generated on 'init', and to limit the visibility, use capabilities. That is, set capabilities on the CPT and add capabilities to roles which are assigned to users. See this other SE Q&A on that topic.
You don't want to avoid the registration code using is_admin. It's more likely that a CPT should always be defined for all users, and that we just want to restrict visibility and maintenance rights to specific users (via their capabilities).


How to rigorously test if variables are drawn from a certain distribution

Question: Say I have a list of numbers $X = \{x_1, x_2, \dots, x_n\}$, and I expect them to be drawn from a certain distribution. For my case it is the Binomial distribution $P(x) = \binom{n}{x}p^x(1-p)^{n-x}$, but I think I general answer would be the most helpful. What is the standard and most rigorous way I could determine if the samples $X$ are from that distribution?
Comment: You can't determine that observations *are* from a given distribution. You may sometimes be able to be pretty confident they *aren't* - and in some circumstances, completely certain of it (e.g. if n=10, none of 11, -5 or 3.4 are even possible), but since something that's not binomial may be arbitrarily close to binomial, no test can tell you that they *are* binomial.
Comment: @Alexis I'd politely dispute your use of the word 'precisely'. Equivalence testing answers a different question to the one in the original post. The OP is asking about determining if the samples *are* binomial. Equivalence testing would be about testing whether they were 'close enough' to binomial by some criterion. The two are logically distinct. I wouldn't disagree that checking for some form of closeness makes more sense. But we don't have some nice TOST procedure for our equivalence test for binomialness, so there's some work to do there.
Comment: This is true enough. However, when one uses equivalence tests in combination with difference tests, *any difference* is no longer meaningful, only relevant difference. So within that inferential framework we sacrifice some precision (i.e. rejecting an equality) for more generality with respect to evidence for and evidence against a target distribution within some tolerance. And yes, some work to do. Possibly related: http://stats.stackexchange.com/questions/97556/is-there-a-simple-equivalence-test-version-of-the-kolmogorov-smirnov-test.
Comment: @GLen_b I disagree somewhat with this position. From a statistical perspective, this is more or less *precisely* the purpose of equivalence testing. From a philosophy of science perspective, the weakness of a *strong falsifiability* perspective (which you are, I think, alluding to), is (a) that any hypothesis can be framed in terms of its negative, and (b) there is no objectively preferred null hypothesis.
Comment: I would assume you don't know the parameters of the binomial distribution, but just in case, are they known?
Answer: So this doesn't remain unanswered.
1) You can't determine that observations are from a given distribution.
2) You may sometimes be able to be pretty confident they aren't - and in some circumstances, completely certain of it (e.g. for a binomial, if n=10, none of 11, -5 or 3.4 are even possible, so if you see them, you can reject), but since something that's not binomial may be arbitrarily close to binomial, no test can tell you that they are certainly binomial
Alexis points out the existence of equivalence tests, which could allow you to see whether you have something that's only trivially different ('close enough') from some base case. It might be worth considering these tests, but to my knowledge we don't presently have some nice TOST procedure for our equivalence test for binomialness.
Comment: One can calculate a correlation, and examine an explained fraction ($r^2$). For comparing pdf models, one can compare correlated r-values, and calculate confidence intervals. If the error type is known (e.g., Poisson) one can calculate a noise error and and a misregistration error (e.g., of the square root of the pdf and fit). So, yes, one cannot prove that two things are similar, but one can put bounds on their dissimilarity.
Comment: @Carl You should clarify what you mean ... calculate a correlation between what and what else? The OP has a single sample of size $n$. What's the other variable?
Comment: There are two things 1) data as a histogram 2) a model of the histogram as fit to the data. When plotted (for lack of a better term) parametrically, the data histogram and the fit model evaluated at the class mid-points are correlated. How well they correlate is one indication of how good the model is and has two (main) components; histogram noise and model inaccuracy. There is also as slight error from using the midpoints of the class interval data as opposed to the mean or median x-value (best location depending) of that class interval.
Comment: @Carl  It's not clear to me what you intend by "data as a histogram". In the question the data are "a list of numbers". The model is binomial, of which the "fit" would consist of a single parameter ($p$) being either estimated or prespecified.  You might presume that the list of numbers actually consists of counts (though we don't actually know this for sure) -- is that presumption  -- that the $x$'s are counts -- what you intend by "a histogram"? Then one might have a set of expected counts from the binomial (e.g. taking $(\text{expected count at }X=x) = \sum_i x_i\cdot P(x)$). However ...ctd
Comment: ctd.... to me a histogram is quite distinct from a list of counts, since a histogram is a manner of displaying certain kinds of counts -- those derived by binning some variable -- and not always the best choice. Note that the question mentions nothing about classes or midpoints. We can take a correlation between expected values and counts, but this can sometimes be a very *bad* idea (e.g. if the expected values were obtained without reference to the total count in the data, as we might get in some situations I have seen), then the correlation can be nearly 1 but the  fit can be terrible. ..ctd
Comment: ctd... finally, we *could* in some sense prove that they were "similar" (though as just suggested I would not be using correlation for that purpose) -- that much I agreed with Alexis on -- but the problem is that the question doesn't ask about the model and data being similar. That is the question isn't "would this be a reasonable model". The OP asks a different question
Comment: Did not only mention correlation, just one example. But, I agree, the OP asked for a proof, which is not achievable. BTW +1.
Answer: Maybe to add some form of more practical answer.
One could use the Kolmogorov–Smirnov test which would quantify the distance between the empirical and the reference distribution.
One problem of the KS test is that you would like not to reject the null that that the samples are drawn from the same distribution. Nevertheless, the KS test is rather widely used in a number of different fields.
I think you could further increase the power of the KS test by transforming the original distribution (see here).
Hope this is helping in a more practical sense.
Comment: Aside from the noted problem (that it doesn't do what the question asks, but answers a different question), the tables for the Kolmogorov Smirnov test is based on the assumption of sampling from continuous distributions. If the distribution is discrete (as here) then the test is often highly conservative (with how much depending on the circumstances).


At the federal level, are tax-free earnings the only tax advantage of 529 plans?

Question: I heard the other day that president Barack Obama proposed start taxing earnings on 529 plans. I always thought that tax-free earnings were the only major advantage of 529 plans (other than the benefits at the state level depending on your state). Wouldn't that make 529 plans practically useless? Am I missing some other big benefit I'm not aware of?
Answer: There was so much opposition by both parties that the proposal is dead. But yeah, the major benefit was going to get taxed, although not necessarily at the same brackets or rates. Year-to-year growth would still have been tax-deferred, so still a benefit.
Comment: Also, it was unclear if they would just end the benefits on future contributions or try to change how existing plans work.  The problem, and the Obama administration has a good point, is that the primary beneficiaries of 529 plans are very wealthy people who can afford the cost of college anyway.
Comment: @ssaltman Let's take a poll using votes; for everyone who's wealthy and agrees with ssaltman that the primary beneficiary to 529s are the wealthy, upvote his comment.  If you disagree, upvote my comment.  Most of the people I know with 529s make less than $90K a year, which isn't how I'd define wealthy (can't the wealthy just use trust funds, anyway?).
Comment: http://www.slate.com/articles/business/moneybox/2015/01/obama_s_plan_to_tax_529_college_savings_accounts_it_s_a_bad_idea_but_not.html
Answer: No, it is not the only advantage.
Contribution to the 529 plan is considered a gift to the beneficiary for gift tax purposes. However, you can contribute 5 times the maximum exemption amount at once and "spread" it over the next 5 years for the purpose of gift tax exemption.
See the instructions to form 709 for details.
That is very useful in estate planning, as it allows excluding large amounts (up to $70K per beneficiary) from the estate at once. With the current estate tax rates - these are thousands of dollars in savings.
That explains why the rich people, who technically can afford tuition without any 529 plan, end up using them so much.
But for "normal" people, for whom the estate tax essentially no longer applies, the tax shelter/deferral is the main benefit and as @Rocky has told you - that was scrapped, rightly so.


How to start a new analytics contact if a different contact identifier is used in on the same device?

Question: I'm looking for a process to handle multiple users logging into the same device.
If we call IdentifyAs() on authentication, the next time this is called on the same browser, it will merge the contacts.
What is a graceful way to handle ending the current analytics session and starting a new one? I've considered clearing the SC_ANALYTICS_GLOBAL_COOKIE on logout but this isn't ideal because the next request on the device will be a new contact, even if that person isn't actually a different person.
Comment: Where you able to solve this issue in Sitecore 9.3? We are seeing this issue for multiple user in the same browser tab / session.
Any advise how to solve the problem.
Comment: @sc_consultant I still haven't found a neat solution for this. One theory is on login, to detect if the user is different, if so clear the cookies, then call the start tracking pipeline to recreate the cookie.
Answer: It should work this way out of the box if you call IdentifyAs and the current contact is known one: https://doc.sitecore.com/xp/en/developers/102/sitecore-experience-platform/identifying-contacts.html

Could you please let me know if it works differently for you?
Comment: It will merge the contacts, which is not desired in this case.


What is the cartesian product of a non empty set and a set containing an empty set (or $X_1 \times \{ \emptyset \}$ )?

Question: Let $X_1$ be a set. What is $X_1 \times \{ \emptyset \}$? I know that a the product of a set and an empty set is an empty set, but what is the product of a set and an empty set WITHIN a set?
Comment: It is just the set $\{(a,\emptyset)\mid a\in X_1\}$. This set is of course empty if $X_1$ is. In any case, there is an obvious bijection between it and $X_1$.
Answer: The empty set, considered as an element of another set, is nothing special!  It is just an element.  You could do the problem by finding
$$X_1\times\{\,a\,\}$$
and then replacing $a$ by $\varnothing$.
Answer: As a clarifying example, take
$$
\{\emptyset\}\times\{\emptyset\}
$$
It's the product of two sets with one element, and it's exactly
$$
\{(\emptyset, \emptyset)\}
$$
with the standard representation of pairs ($(x,y) = \{\{x\},\{x,y\}\}$), it becomes
$$
\{
\{\{\emptyset\},\{\emptyset,\emptyset\}\}
\}
$$
which is the same as
$$
\{
\{\{\emptyset\}\}
\}
$$
Answer: Still empty. Cartesian product does not care about where your set lives. It's the set of all ordered pairs taken from the two sets, and when one of them is empty, there are no such pairs.
Comment: The second set is $\{\emptyset\}$, which is not empty.
Comment: I interpreted the question to be about the empty set as a subset of some other set, but the notation indicates otherwise, on second viewing.


I was updating my pokemon go and it said i had to delete it then log back in.

Question: Now it doesn't recognise my email address so i cannot log in again.  please help.  how do i log back in to my account, or has anyone had the same issue
Answer: You are probably logging into the wrong account. There is one for google and a completely different one for pokemon. You can choose to create an account with either one, but they are not the same thing. So if it don't work on google try the pokemon account, which is where you probably created it or vice versa.


Search Kit search for cases and roles

Question: On search kit I am trying to create a table with case related information in it (e.g. case status, case type, country). To achieve this I have created a 'search for cases' with the relevant filters and fields. However, I would additionally like to add a column for a specific case role. Is there a way to add case roles (other than the case client) to a case search on search kit?
Answer: I remember there being a Case Contacts entity but it seems to have gone missing. But the reverse is available - start with Contacts and then you can join on Contact Case Roles, or start with Related Contacts.
EDIT: https://lab.civicrm.org/dev/core/-/issues/3843
Comment: Thank you, that way around seems to work. Next step is to remove duplicates of cases (where multiple people have the same role). Ill play around with it!

Search Kit search for cases and roles


Expected number of uniform distributions

Question: Suppose you have i.i.d uniformly distributed numbers $u_i \in [0,1], i=1,2,\dots$, which are realized sequentially. At the start of the game, $u_1$ is drawn. After you know the realization of $u_1$, denoted by $\hat{u}_1$, you bet that $u_2$ is smaller than $\hat{u}_1$ if $\hat{u}_1 \ge \frac{1}{2}$, and you bet $u_2$ is bigger than $\hat{u}_1$ if $\hat{u}_1 \le \frac{1}{2}$. Then $u_2$ is drawn. If you're right, you get one dollar, and you bet against the value of $u_3$ again with the knowledge of $u_2$'s realization $\hat{u}_2$ using same betting scheme; if you're wrong the game ends. So on so and forth. What is the expected payoff of this game?
Answer: Let $W(u)$ be the expected winnings having just seen random number $u>0.5$.  We want to find $W(1)-1$, i.e. the winnings after a "sure bet" on $u=1$.
Now $$
W(u) \ =\ u + \int_{v=0}^{0.5} W(1-v) \mathrm{d}v + \int_{v=0.5}^{u} W(v) \mathrm{d}v
$$because you win a dollar with probability $u$ then, for winning value $v<u$, you experience further winnings $W(1-v)$ if $v<0.5$ or $W(v)$ otherwise.  Note that $W(1)=2W(0.5)$.
Differentiate with respect to $u$:$$
W^\prime(u)\ =\ 1 + W(u)
$$so $W(u) = Ae^u-1$ for some $A$.
But $W(1)=2W(0.5)$, so $A=1/(2e^{0.5}-e)$ and therefore your expected winnings are$$
\begin{array}{rcl}
W(1)-1 &=& 1/(2e^{-0.5}-1)-2 \\
&\approx&2.69 \ \textrm{dollars}
\end{array}
$$
Comment: Why do we want to calculate $W(1) -1$? And why do we have $W(1) = 2 W(0.5)$?
Comment: $W(1)$ is the winnings from the game that starts with $\hat{u}_0=1$, which is equivalent to your game except for the "free" payoff of one dollar at the start (due to it being a sure bet that $u_1<\hat{u}_0$).  As for $W(1)=2W(0.5)$, just write down the integral equation in the two cases, 1 and 0.5, and note that $\int_0^{0.5}W(1-v)\mathrm{d}v=\int_{0.5}^1W(v)\mathrm{d}v$ (because it's just the area under the $W(v)$ curve between $v=0.5$ and $v=1$).
Comment: That's genius! W(1) - 1 is equivalent to the original game. Can we also do $W(0.8) - 0.8$? I think that's wrong, please correct me.
Comment: We can't do $W(0.8)-0.8$ ... that's about 2.04, not 2.69.  The nice thing about $W(1)$, where $\hat{u}_0=1$, is that $u_1$ is free to take any value in $[0,1]$, just as it does in the original game.  With $W(0.8)$, you have $u_1 \in [0,0.8]$ instead.


I just changed my brakes and hear a knocking noise when i stop accelerating

Question: My brakes were squeaking so I just bought new brake pads and replaced them. The squeaking is gone but I noticed driving that when I let off the accelerator it makes a knocking noise and the steering wheel starts to shake a little. Any suggestions and thank you
Answer: Did you tighten your wheel nuts correctly?
This could be a very possible cause.
Check them ASAP.
Comment: Yes, learn from my experience. Torque your lug nuts.
Answer: You don't mention changing the rotors so I'll assume you reused them.  The rotors are bedded-in to the old pads and very often new pads don't sit right against the new one right away.  You may see this improve with time.
The best procedure is to replace or resurface the rotors along with the pads.
Comment: Does this explain the knocking noise and steering wheel shake?
Comment: I think it does.


Led driver interference on lcd screen but only when with 1 power source

Question: I have a few lcd open panel screens I've modified with higher powered led strips instead of ccfl. In doing this I needed to add led drivers for voltage and current regulation. When utilizing the same power source there is so much noise and static and interference that the screen shuts down. When not changing anything except running the power to the drivers via a seperste power source (even non-grounded AC/dc) I get no interference at all. I built an LC filter which helped a bit but these are still unusable. I need to use them off the same power source because they are portable. I can't seem to figure out how to reduce the interference. Any ideas?
Comment: Can you put a DC LISN in the power input to the LED drivers, then get us scope/specan shots of what they're dumping back onto the line?
Comment: DC LISN I dont have - Scope I can do but I'll need to find another way to measure the RF noise. It definitely is coming from the LED driver side though as by not moving a single component, just wiring the driver to an external power source (whose lines run nearly parallel) to the battery wires, the interference is gone. I originally thought it was an issue with grounding but thats not it. Not sure how to test for the fix though.
Comment: you probably could (*quite carefully*) DIY a DC LISN -- the base circuit is a 50uH inductor in series with each power line, and then 1uF film caps from each power input terminal to earth, a 100nF film cap from each power load terminal to each signal output's center terminal, and a 1kOhm resistor from each signal output's center terminal to earth, all built into a well shielded and earthed metal box.  Good lead dress is important, though, to avoid unwanted parasitics and get the frequency response desired.
Comment: Thanks ThreePhaseEel, Im up for a challenge. I wired a separate cc/cv from the same power src as the LCD (bypassing/isolating the driver completely) and the interference lives-Thought then maybe its LEDs themselves but that wdnt make sense bec I ran the other set of LEDs (1 strip top 1 bottom) from the ext src through the driver and no interference-If the driver+LED+LCD are on the same power src - interference. If the driver+led(stripA) on external source and LCD separate - no interference. Lastly - if the LCD + separate cc/cv are on the same src while LED(stripB) is ext powered, interference.
Answer: Ok - figured this out (but I don't understand how the solution works). It is a grounding issue that causes the interference (static on the LCD). If I run two separate power and ground cables to the same battery source, static appears (tried everything, LC filter, twisted wires, inductors, caps. No difference). To solve the issue I needed to run the ground (and vcc) cable from the power source and attach it to the LCD controller. I then run a long ground cable from each component to the actual back of the LCD (which is metal as it is open frame). I stripped and exposed a couple inches of wire from each cable and put them on opposite corners, the further the better. Attached them by wedging them on the corners - couldn't solder as it is aluminum back panel. This was the only way to remove the static on the screen, having ground go through the panel. Issue solved - why this works I don't know.


finding unknown CRC 32 bit algorithm used in a firmware file

Question: I want to modify a firmware image for a WiFi router. The image file consist of an UBI image, 0x04100000 bytes in size. Additonally, 20 bytes of unknown metadata have been appended to the UBI image data. I have two different official firmware files for this router. After comparing those 20 bytes of both files I am convinced now that the first 4 bytes are a 32 bit CRC of some sort.
Because CRC32 is very common, I tried CRC32 with various common start values and polynominals without luck. I applied it only across the UBI data before those 20 bytes, the UBI data with the remaining 16 bytes and the UBI data with the whole 20 bytes while using a 0x00000000 and 0xffffffff placeholder for the CRC.

What could I try next? Is there a way to programatically find CRC32 start values/polynominals when the data and CRC are given?
Here are the files: https://drive.google.com/file/d/15n_Pg8zeSOf_VCcflWoTaMm8MwxBaFXk/view?usp=drive_link
Decompiling the Broadcom CFE bootloader that installs the firmware would be an option but isn't going to be easy at all.
Thanks!
Answer: OK my question didn't age well. Turns out "RevEng" was the tool I needed:
<code>reveng.exe -w 32 -fs 010139.3.4.001.0-dec-crc.bin
reveng.exe: warning: you have only given 1 sample
reveng.exe: warning: to reduce false positives, give 4 or more samples
width=32  poly=0x04c11db7  init=0xffffffff  refin=true  refout=true  xorout=0x00000000  check=0x340bc6d9  residue=0x00000000  name="CRC-32/JAMCRC"
</code>
The input file for RevEng contained the UBI image data plus the 4 bytes CRC appended to the end (thats what RevEng expects).
Comment: You can accept this as an answer.


Huge amount of Placemarks on MKMapView

Question: i have a application, which is connected to a webservice, and it is getting realtime informations about something happened at some places.
The Information have a timestamp and Lat/Lon coordinates.
I store each of that datasets into a NSMutableArray. In some cases, there can be several thounsands (50.000) of datasets in it.
That all is working great. But now i want to have a MKMap on which i place each dataset as a small dot (6px diameter) on the desired location.
I have a function, that is called if a new message is placed in the array. Here i can put the new point to the map.
My question is now, when i use annotaions, the MKMap will be unusable due to the high amount of annotations. Every two seconds i want to redraw the points in the view area. I do this, because i want to change the colors of the points. Color from Yellow to brown depends on the age of the message.
What is the best method to do this ? What about a Core Graphics layer over the MKMap ?
And what about if i drag the map, or if i change the zoomlevel? I think, I need a redraw of the map then.
Answer: If you want to change the color of the points, I would recommend just updated their UIView objects rather than re-adding them to the map for performance reasons.

Huge amount of Placemarks on MKMapView


Will 5/4 treated deck boards span 20"?

Question: I am building a houseboat and I am torn between using 5/4 deck boards or just using 2x6s for deck boards. My joists are on 20" centers. My main issue is I am wanting to save on weight because I only have so much buoyancy. The 5/4s boards will be significantly lighter than using the 2x6s. Anyone have any input on this ? Thanks!
Comment: I suspect having closer joists would give desired rigidity for cheaper in weight than 2x6s
Comment: Yea I am aware of that. The platform is already assembled at 20" center.
Answer: Based on my house's deck built by a previous occupant, 5/4 did fine to span 24" joists.  It was a bit springy, but it was fine.  Though I'd check the mfgr specs on the specific 5/4 you're planning on using to confirm that 20" span is within spec.

Will 5/4 treated deck boards span 20”?


Inspiration for Warren Worthington in the "X-Men"?

Question: When Stan Lee and Jack Kirby created the X-Men, what was the inspiration and concept behind the superhero character Warren Worthington III? Why did they choose the idea of him being a wealthy billionaire playboy as well as his physical appearance?
Comment: It makes him a better rival for Scott for Jean's affections, being rich and fun-loving.
Answer: While I don't believe that it was ever confirmed by the writers, I have often seen people claiming that Edmond Hamilton's "He That Hath Wings" was probably the basis of the character. Along with being a winged humanoid, there's the hollow bones and the altered blood to support flying.


Block messages from advertisement or organisations (Non-digit sender id)

Question: I'm getting messages from organisations or websites who does not have a phone number. I mean messages from TD-MAN, LM-058457 etc. Is there any way to block messages from these sources. I'm from India.
Answer: If you own a Nokia you can use the call and sms filter
Go to Settings -> Call & SMS filter
in this app you can select specific numbers that should be blocked and in advanced settings you can also block withheld numbers.
I'm from Europe so don't know if these Indian (non digit sender) sources are easily blocked as well because we don't have them in Europe but it should help you at least a little bit.
some screenshots here:http://allaboutwindowsphone.com/flow/item/18112_Nokia_adds_call_and_SMS_blocki.php
If you dont have a Nokia phone but HTC, Samsung or any other device there is no option.
Comment: as I said in my answer I'm not from India so wasn't sure on how these non digit senders work. I do believe you that this option didn't work for you if you say so. Does blocking withheld numbers work? Also is it possible to block these kinds of numbers on other phones (e.x. iphone/android)?
Comment: Wow this sounds terrible. I'm from South Africa and we don't have this either, though I'm pretty sure we will probably get it as all terrible ideas end up here sooner or later. How is there no call log - does it not even appear as Unknown?
Comment: I'm having Lumia 620 with gdr-2 (I specified this in tags). The answer you given is the normal way of blocking a Sender/ Caller. But these non digit sender id can't be blocked in this way. And there's no call log from these sources too.
Comment: I'm able to block normal phone numbers. And I was able to block these kinda sender ids in old Nokia classic phone as `Screened Numbers`.
Answer: I'm not sure if this worked but I think it did. Contact you provider and ask them to block these texts and calls. I did this by text to Vodafone and it seemed to work.


Receive SMS messages by web application

Question: We are building a web app that should be able to receive SMS messages and store the information contained in it in database.
Which methods have you used? Which service providers are out there that can assist?
Answer: http://www.clickatell.com/ are massive and it works exactly like it says on the tin.  You pay for a phone number and sms messages sent to that end up hitting a URL on your site to deliver them just like someone posting a form.
Comment: I thought I'd update this after a few years. Twillio are a new player in the market and have an amazing API for stuff like this
Answer: I'd recommend using a service such as TextMarks. TextMarks is free, and lets you pick a keyword for your service that allows users to route messages to you through TextMarks' shared short code, 41411. The only catch here is that they reserve 20 characters in each message for short advertisements to pay for their services.
If you ever outgrow their ad-sponsored services, you can upgrade to a premium version that doesn't include ads.
Answer: Another (cheaper) alternative is to have your users send text messages to an email address like email@example.com.  Then you can have a background thread that's looking at the email account and puts the messages into the database.
I've implemented and tested this approach with major US carriers with everything from smart phones to pay-as-you-go "crappy" phones without a hitch.
When the user sends the SMS to your email address you get the SMS email gateway address (e.g. firstname.lastname@example.com) so you can send response messages.
The only downside is that it's a bit more difficult to find the "send to email address" options on most phones, but it is (basically) free for you.  This is especially helpful for reducing costs while testing out workflows.  Those ~3 cents for each SMS add up pretty quickly, especially during automated testing.
When you want to support SMS numbers you can configure most SMS gateways to send an email to an address, so you won't have to change your infrastructure to support a "real" SMS messages.
Answer: I haven't done it yet, but I guess you could also setup an Asterisk system on your server, then get a regular VOIP acccount (which Asterisk hooks into) and configure the Asterisk server to forward all SMS to your application. This article might help setting up the Asterisk server.
Comment: That article uses physical mobile phones to send/receive SMS messages and the bluetooth driver to do so. Seems mostly irrelevant.
Answer: I've had experience using MX Telecom as an SMS Gateway. Essentially they posted data to our web service every time we received an incoming SMS. The application in question was also sending SMS messages as well and we just did an http GET to a web page of theirs.
I can't speak to the business end (i.e. cost), as I was just in charge of implementing the features - but working with an SMS gateway is really very simple from a development perspective.
Answer: +1 on sebastian i was jsut writting pretty much the same
if you are working with ruby you might want to have a look at adhearsion
Answer: You can use SMS gateway software which will receive SMS messages through a GSM modem or 3G dongle connected to a PC and POST them to your website via HTTP. Eg: this software

Receive SMS messages by web application


Add a new field to a layer containing the ovelapping area with another layer in QGIS

Question: I'm working with QGIS 3.16 Hannover under MacOS 10.13 environment. I've got two polygon layers: natural_parks (multiple features) and region (single feature). I want to add a new field to the layer natural_parks that computes the overlapping area of each Natural Park with my region. Is it possible to do so with the field calculator? So far, I've been able to get it by means of a virtual layer, but I want to insert the results into the original layer.
Answer: Sure, you can use this expression in field calculator of your natural_parks layer:
area(intersection($geometry,collect_geometries(overlay_intersects('region',$geometry))))

Explanation: overlay_intersects() will get all geometries of the region layer which intersect with your current natural_parks feature and store them in an array. collect_geometries() will create a single multipolygon out of this array. intersection() will only keep the overlapping part of this multipolygon and your current natural park. area() finally calculates the area of this intersection. So yes, in your case you can simplify the expression since there is only one feature in your regions layer. But I want to keep this answer a little more universal to use.
Comment: @JesúsPinilla Yes there is: The area calculated by $area respects both the current project's ellipsoid setting and area unit settings.Calculations using area() are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned area will match the units for the SRS. This differs from the calculations performed by the $area function, which will perform ellipsoidal calculations based on the project's ellipsoid and area unit settings. (citated from QGIS function help)
Comment: I definitely works but, is there any reasonable explanation for a discrepancy between this calculation and the simple `$area` function? Actually, none of the figures match in those features that fall enterely within the region: e.g. 100637 vs. 100695; 65316 vs. 65340; etc. I know it's not a great deal, but I feel a bit annoyed anyway.


Does the PCB have to be thinner than through-hole pin length?

Question: If I have a part that has pins that are 1.2mm long. Can I use a PCB that is 1.2mm thick or does it need to be even thinner than that?
Comment: Use a different part.   USB "C" jacks are available in a zillion different configurations.   You can find one with proper length pins.    But to answer the question, if this is for 'production' then no way should you do that.  If it's for a one-off that you're planning to solder by hand, you'll be able to make it work.
Comment: The solder joints _may be_ fine, but they wouldn't be verifiable by visual inspection. I would choose a different part.
Comment: It really should be. That part is probably designed for use in smartphones with thin 0.8mm PCBs
Comment: You might find it hard to solder properly otherwise.
Answer: If you'll use this part in a mass production (i.e. at least tens of production each day) then the PCB really should be thinner than the pin length for easy soldering. As Enrico has stated in his answer, you should follow the manufacturer recommendations for PCB thickness.
But if you are talking about using this part in just a few PCBs (e.g. up to 5 PCBs for testing purposes) then you may use a 1.2mm or even 1.6mm PCB having through-hole plating. However, lots of manual soldering and using some chemicals like flux, solder paste, etc will be required. And care must be taken as it'll nearly impossible to verify if the pins are properly soldered.
Answer: This actually works quite ok, as long as you solder it using the pin-in-paste method. For example, in Littelfuse's appnote, they use 1.4 mm long pins with 1.55 mm PCB.
Make a solder stencil opening for each of the holes. When you apply solder paste, it will go into the holes and on the pad around it. When heated to reflow temperature, it will flow to the hole and form a good connection.
However, reliable pin-in-paste soldering in mass production requires careful dimensioning, and most of the cheapest PCBA manufacturers do not even offer it. It might also be that the connector layout is too dense to be able to fulfill the required pad size specification.
Answer: All through-hole connectors specify the height of the PCB and the type of soldering: wave soldering and/or reflow soldering.
Please read the datasheet or write here brand and part number of that connector.
Answer: Visual inspection requires a visible solder fillet. This needs the pin to protrude beyond the surface of the board, so the solder meniscus between the end of the pin and the pad on the board can be seen.
It may be possible with skill and hand soldering to use a pin that's flush with the board, or even buried within the hole. However, it's not inspectable, and so highly not recommended.
You should be able to find a USB socket with pins of a suitable length.
Answer: As above, it is considered bad practice.  And, it is forbidden in some shops.  However, IPC6xx (working from old memory) used to have inspection protocols for this.  For a production item, I would check with the assembly line inspector for the current thinking.


Moving to Docker From SVN

Question: We are currently using SVN for our application development among 6 to 8 developers. Recently we have requirement for developing a new application using Docker.
I have gone through the docker setup documentation and difference between containers and images and how it works.I am bit confused how to use this for a application where team of 6 to 8 developers working if a more than one developer works on a same file how file merging will happen?
Answer: Don't use Docker for the source control of your code.
You should continue using SVN (i'd switch to GIT but whatever) to develop your application. Add a Dockerfile in the repository that defines how you want to build the environment of your application using your source code or built artifacts.
https://docs.docker.com/reference/builder/
Answer: The only part of Docker which can involve VCS is the Data Volume that you can define in order to share your source with any container you have define in order to build your app.
That means: you continue developing on your host as usual, using any VCS tool of your choice, but the modifications done to the sources can be share through a VCS working tree which can be mounted as a Volume Container, making those same sources visible to your containers.

Moving to Docker From SVN


calling custom api in another custom api in Magento 2

Question: I am trying to get the result of one custom API in another custom API. Please help me with the same.
Comment: If I am giving the entity id of the product , the api will be resulted with sku...I need this result in another another api's method..that sku will be used by that method to give its result..do help me for the same
Comment: What is the need of Both custom Api ?
Comment: Suppose I want to use the result of one api to input of another api...then i need  two apis
Answer: You can use curl or zend_client to call custom API from another API.
Note: This method is not recommended.
Curl
<code>        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 60);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

        $response = json_decode(curl_exec($ch));
</code>


How do we know quran is from god

Question: How do we know that the quran is from god, and, before you tell me something like all the scientific accuracy of it, my real question is, how do we know it is from god, and not another being, that, is able to know all the stuff the quran says? How do we know the hadith where the prophet says stuff, he got it from Allah?
Comment: That another being that you are referring to (able to know Quran and all stuff) is called God and we Muslims call Him, Allah. Unless you believe in a pantheon of gods, that's another problem. Before you deal with the sayings of the prophet PBUH, first KNOW YOUR CREATOR.
Comment: Can you please prove it is from god and no one else?
Answer: We don't "know" anything of the sort. That's what imaan is for.
Answer: The Quran is a miracle, and the Prophet Muhammad (SAW) as well brought many miracles with him.
The Quran is a miracle for plenty of reasons including: prophecies, literary perfection, inability of people to make something to challenge it even after being challenged to do so, etc.
The Prophet (SAW) showed people the miracle of the splitting moon among other miracles. How do you know it actually happened? It was reported by many, many people in mass-transmission. If a person doubts something that is this widely attested, he may as well deny that his parents are his parents.
If you ask: What if the Quran was sent by a being other than God that knows how to make the Quran and also is able to do these miracles?
Answer: At that point, what makes this being not God Himself? Who else has the power to control reality and know the future except God Himself?
Another response: Go ahead and do these miracles and write something like the Quran yourself with the help of this being if you claim there is one like him. This is what the Quran challenged. If you cannot, why would this being help a person who says he does not exist (Muhammad SAW who has said there is only one God and denied any other power) while not help someone who does believe in the possibility of him?
At this point, a person is holding on to meaningless doubts for the sake of holding on to them.
If a person continues to be in that much doubt, there should be no issue in him accepting that he will go to Hell and then he can doubt whether Hell exists or not while burning there.
The disbelievers of the Prophet's time used to put forth this same doubt, but they used the term "magic." But, how can they accuse the Prophet of magic when they know he never learned magic, they know their greatest magicians cannot match him, and they know their greatest fortune-tellers cannot make as true prophecies as he did? It is meaningless objection based only on assumptions.
Which is why the angels make fun of those being thrown in Hell by saying:

"This is the Fire which you used to deny. Or is this [also] magic, or do you not see?
"[Enter to] burn therein; then be patient or impatient - it is all the same for you. You are only being recompensed [for] what you used to do." (52:14-16)

If they can deny such a clear prophecy, they can be comforted by the fact that they can likewise deny the fire while they are in it.
Comment: How do we know only god can control reality
Comment: @ProNoob See the second response.
Answer: On religion, Islam and hints for the qur'an being from Allah
Generally one must say religion is a matter of faith and believe. Both of these are usually far from any logic and evidentiary value.
However in Islam the qur'an itself addresses both the heart (which believes) and the mind (which reflects and uses logic) fairly good and often by inviting us to reflect about its words and statements.
There are many verses ending by:

Then will you not reason?

And two verses beginning with:

Then do they not reflect upon the Qur'an? ...

Further the qur'an includes some knowledge and information that none could have known at the time: It includes prophecies.
It includes wisdom and knowledge that needed centuries to be verified.
And the qur'an always challenges doubters and enemies to find errors or come with something similar.
Linguistically the qur'an has challenged the Arabs who at the time considered themselves to be the best poets, linguists and most eloquent orators with its specific unprecedented language or linguistic style. They even have chosen 7 poems which they fixed on the walls of the Ka'abah as a sign of their mastership. But the Arabs couldn't come with something equivalent and called it:

"And said, "This is not but magic imitated [from others]."(74:24)

And as they couldn't explain it and wanted to declare it as the speech of Muhammad () they called him a poet (which the qur'an and all his companions and even contemporary disbelievers denied) and a soothsayer. So in fact they got caught up in contradictions.
The qur'an also quotes different kinds of disbelief which seems to me hardly possible to cover by one person
Some scholarly evidences for the qur'an being from Allah
In the following I will quote some evidences for the qur'an being the word of Allah as quoted in some scholarly fatwas:

The qur'an challenged both humans and jinn's to come with something alike (not even the whole book, but anything that is comparable) in several verses (see for example 2:23, 11:13, 17:88).
A part of its challenge is that humans (and jinn) may commit errors and mistakes and the qur'an challenges them to find mistakes in it. (See for example in 4:82 and 41:41-42).
Allah himself promised to preserve the qur'an, since more than 14 centuries the qur'an has been transmitted orally from generation to generation, any change or deviation would easily be found by Muslims, if anybody tried to corrupt the original revelation.
Another miracle are the legislation, rulings, stories and beliefs which variety and depth can hardly be man made or inspired especially in the short time period of the revelation. Further the stories of ancient nations shows and gives additional information to what was revealed before.
The prophecies and unknown things that the qur'an came with such as biological phenomena, geological phenomena which were not yet discovered at the time of its revelation. Allah the Almighty says:

We will show them Our signs in the horizons and within themselves until it becomes clear to them that it is the truth. But is it not sufficient concerning your Lord that He is, over all things, a Witness? (41:53)

And among these is also the information about an ongoing far away war between the Persian and Roman (Byzantine) empires, where Allah informed about a victory that only happens after the death of Muhammad () (See 30:2-4).
As many people even the contemporary disbelievers tried to say that the qur'an was authored by Muhammad () or Muhammad was inspired by others. The qur'an actually 14 centuries after Muhammad, still includes verses that reproach him and mentioned embarrassing stories (See for example 33:37, 33:53, 66:1, 80:1-3). Why would Muhammad keep these stories and rebukes if he was the author?

Some reference fatwas and articles:
islamqa #13804 and in Arabic: islamweb #190727,  article on wordpress and on alukah.
Answer: The Quran says:
They say that he made it a lie. Say: If you are truthful, bring a surah like it, and call on whomever you can except God (Surat al-Toor, 33-34)
Say, "If mankind and jinn come together to bring the like of this Qur'an, they will not bring it like it, though some of them support others." (Surat al-Hud: 13)
Answer: There are many books and articles in Islam that have dealt with this issue. They examine different aspects of the Qur'an and the circumstances of the Prophet of Islam and try to show you very logically whether the Qur'an is from God or not!
Hundreds of pages of content can be written to prove it. The Qur'an has methodical miracles, expressive miracles, content miracles, and scientific miracles.
The subject of the Prophet's illiteracy and unwritten handwriting is historically certain, and even non-Muslim orientalists and historians have confirmed it. While the Qur'an was at the peak of eloquence  and expressed wise words and unknown scientific points. Sometimes he announced the future.
The Prophet was sent at a time when literature and poetry were very strong in the Arab world .
The way the Qur'an is spoken is very different from what human beings have ever heard or said. No words can reach the foot of the Qur'an in the beauty of appearance and the sweetness of expression. What literary scholars interpret as eloquence and rhetoric is at the highest level in the Qur'an.
The Qur'an has a special style that is unparalleled. Hence, Walid ibn Mughirah, one of the greatest writers of the pre-Islamic period, said of the Qur'an: "His speech has a special sweetness." But to neutralize the influence of the Qur'an, he said, "Say the Prophet is a sorcerer."
According to research, the Holy Qur'an has raised issues about cosmology, biology, medicine, etc., which have become clearer with the development of experimental sciences: general gravity and the motion of the earth and the mating of plants and...
For more information, please refer to the hundreds of volumes of books and articles that have been written about this.
https://qurantv.ir/content/5420
Answer: One of my favourite questions, especially if a non-Muslim was asking it, but it's normal that you doubt the Qur'an, and that's because you didn't read much about the theology to know who is this Creator behind us, Allah:
96:1

ٱقْرَأْ بِٱسْمِ رَبِّكَ ٱلَّذِى خَلَقَ
Read in the name of your Lord who created

Everyone will tell you what they know about God [and hence the Qur'an], some take the whole topic on pure faith, some others admire the literacy of the Qur'an [even non-Muslims], many awe at its miracles, dozens like its depth in story narration, millions like its majestic rhymes and confidence in speech, it is impossible that this is an ordinary Book.
If you want to know how the Qur'an came to being, then you should seek why God willed to reveal a Qur'an in the first place.
At a time around 2000 BCE, a monotheist man from Mesopotamia called Abraham made a covenant with God, it was as following:
2:124

۞ وَإِذِ ٱبْتَلَىٰٓ إِبْرَٰهِـۧمَ رَبُّهُۥ بِكَلِمَـٰتٍ فَأَتَمَّهُنَّ
ۖ قَالَ إِنِّى جَاعِلُكَ لِلنَّاسِ إِمَامًا ۖ قَالَ وَمِن ذُرِّيَّتِى
ۖ قَالَ لَا يَنَالُ عَهْدِى ٱلظَّـٰلِمِينَ
And [mention, O Muḥammad], when Abraham was tried by his Lord with words [i.e., commands] and he fulfilled them. [Allah] said, "Indeed, I
will make you a leader for the people." [Abraham] said, "And of my
descendants?" [Allah] said, "My covenant does not include the
wrongdoers."

A similar pact exists in the Torah Genesis 12:2-3 and Genesis 17:1-7, which means Christians and Jews also believe in the same covenant like Muslims.
Abraham then brought up 2 sons, Ishmael [the grandfather of Makkah's Arabs], and Isaac [the grandfather of the Hebrews], and [as the Bible and Qur'an say] God made the covenant of Abraham starting with the Israelites, whom are the descendants of Prophet Jacob/Israel, the son of Isaac.
From the progeny of Jacob, many messengers were sent to the nation of Israel, including Moses, David, Solomon and Jesus. The Qur'an confirms this fact too:
45:16

وَلَقَدْ ءَاتَيْنَا بَنِىٓ إِسْرَٰٓءِيلَ ٱلْكِتَـٰبَ وَٱلْحُكْمَ
وَٱلنُّبُوَّةَ وَرَزَقْنَـٰهُم مِّنَ ٱلطَّيِّبَـٰتِ وَفَضَّلْنَـٰهُمْ
عَلَى ٱلْعَـٰلَمِينَ
And We did certainly give the Children of Israel the Scripture and judgement and prophethood, and We provided them with good things and
preferred them over the worlds.

However, the Israelites betrayed God's covenant with Abraham, and committed crimes against Him from killing His messengers to distorting the Scripture to immediate disbelief, and even the Bible testifies on them as we read in Judges 2:11-15, Psalm 106:23-29, Ezekiel 33:23-29 and many more....
The final straw was Jesus [AS], not only the Jews disbelieved him, they even tried to push the Romans to kill him and threw accusations at his mother Mary. Hence, God cursed the Jews, and destroyed the Temple of Solomon 40 years later after the claimed crucifixion, and took them out of the Holy Lands.
+600 Years later, after Jesus disappeared from history, God took the covenant from Israel and gave it to the sons of Ishmael, the cousins of the Israelites:

Deuteronomy 18:18 I will raise them up a Prophet from among their brothers, like you [O Moses], and will put my words in his mouth; and he shall speak unto them all that I shall command him.

So the Jews believe that the covenant is endless with Isaac, and that Jesus was an imposter.
And Christians also stand that the covenant is endless, but believe that Jesus was the Messiah mentioned in the Jewish Scripture.
But Muslims believe that God shifted the covenant to Ishmael's sons after Israel.

Muhammad [PBUH] admitted he is a grandson of Ishmael: https://sunnah.com/muslim:2276
Did you understand what God planned from Abraham's covenant?
When Allah told Abraham His descendants shall be leaders on the earth, He was talking about our modern world where Abrahamic religions are dominating nations from East to West, Judaism, Christianity, and Islam.
A 4000 years old pact fulfilling in our age; is just one of many evidence that Muhammad didn't lie when he declared the Creator has sent him, a messenger to warn every human being before the Hour comes:
18:110

قُلْ إِنَّمَآ أَنَا۠ بَشَرٌ مِّثْلُكُمْ يُوحَىٰٓ إِلَىَّ أَنَّمَآ
إِلَـٰهُكُمْ إِلَـٰهٌ وَٰحِدٌ ۖ فَمَن كَانَ يَرْجُوا۟ لِقَآءَ
رَبِّهِۦ فَلْيَعْمَلْ عَمَلًا صَـٰلِحًا وَلَا يُشْرِكْ بِعِبَادَةِ
رَبِّهِۦٓ أَحَدًۢا
Say, "I am only a man like you, to whom has been revealed that your god is one God. So whoever would hope for the meeting with his Lord - let him do righteous work and not associate in the worship of his Lord anyone."

How do we know quran is from god


Why do blues musicians perform sitting?

Question: I noted that many blues performers (singers/guitar players) sit during their performances. It seems to me that this is much more common in blues than in any other genre. Is there a reason for this?
Comment: It's hard to stand up when the dog done eat your shoes and your woman left you with just a bottle of bourbon and a big bag of nothin'
Comment: No, I don't think so. Classical, big band and (sometimes) jazz guitarists perform sitting. I think the real question is "why in pop/rock/fusion does the guitarist perform standing". The answer would be http://tvtropes.org/pmwiki/pmwiki.php/Main/RuleOfCool
Comment: It is MUCH more common in classical playing!
Answer: I don't have a scientific answer, but I guess you could say that blues isn't exactly an adrenaline-filled music. Punk,rock, metal etc are kinds of music that makes you feel hyped and alive. They are the kind of music that makes you want to be standing and jump or run or whatever.
Blues (and Jazz) although, is the kind of laid back enjoyment. You sit on the table with a drink and relax listening to the music. The artists have to pass that vibe to you, so they have to act similarly.
Comment: Eh, Ornette Coleman's take on Lonely Woman ain't exactly easy listening new age bubble bath music.
Comment: @SomeDudeOnTheInterwebs lol, I wouldn't or didn't call Ornette Blues or bubble bath music. Don't know why you downvoted me for that
Comment: actually I upvoted your answer. I just find your definition of blues and jazz as "laid back enjoyment"... amusing :)
Comment: Also, I didn't call blues or jazz as 'easy listening'. I said laid back
Answer: Maybe because of the guitar?  Classical guitarists always sit while playing, with the guitar resting on one leg.  Many of the early blues players had a highly-developed technique -- very different from classical guitar technique but developed through many hours of practice nonetheless, most likely sitting down.  (Think of Robert Johnson for instance.)
Generally, singers sound better, or at least louder, if they sing standing up than sitting down.  They can expand the lungs farther.  This, and the ability to play while strolling around, probably led most singer-guitarists to put on the strap and stand up -- and (for some of them at least) to get plenty of technique out of practicing standing up.
Most blues singers who don't play an instrument sing standing up, as far as I know.
So I guess the answer is:  blues guitarists (singing or not) sit down because that's how they learned it, and rock and mariachi guitarists stand up because that's how they learned it.
Answer: Maybe it also has to do with hambone (body percussion) being done sitting down.  Also, I doubt country musicians had a guitar strap.
Comment: I'd agree with the first part, but a country musician ought to know how to cut a length of twine.

Why do blues musicians perform sitting?


Visual Studio 2013 css outline

Question: Until Visual Studio 2010, when opening a CSS file a window with all the classes and IDs opened automatically to help CSS file navigation.
In Visual Studio 2013, I cannot find this option; am I missing something, or has Microsoft decided that the feature is not useful anymore?
Comment: but it does not work for CSS; With a CSS file opened I get an empty list
Comment: In VS 2012, I can open a CSS file and then View -> Other Windows -> Document Outline. Then the next time I open a CSS file, it also automatically shows the Document Outline. Are you saying that no longer happens in VS 2013?
Comment: I am afraid is not visible in VS 2013; see image above. Thanks for your help though!
Comment: In your screenshot it is in the View menu itself, 9th item in the list.
Comment: infact.. with a CSS file opened that option (9th in the list) does not even show up; just tried now
Answer: Starting from the same point, we leverage Dependency Graphs.
Thanks to MEF, VS Solution Explorer is listening to imported graph providers. So we jumped on it in order to    bring back a document outline "like" experience for css files. The result is a VS extension available here: http://visualstudiogallery.msdn.microsoft.com/b6dd8050-77fa-4dba-998f-dabdd255d96d
Comment: Your extension is great. Can you please make an update for visual studio 2015, which at least includes the CSS Tree View functionality of the extension (for v1.0)? I think this is so important and desperately missing from VS 2015 and your extension is the only one offering this solution, and it looks to do it perfectly. Thanks man.
Comment: We could use one for VS 2017 as well.

Visual Studio 2013 css outline