code is not working as expected; array doubling; pass by reference
Is Java "pass-by-reference" or "pass-by-value"?
We are having issues with our exchange 2013 server. The server is running Windows Server 2008 R2 Standard.  The issue we're having is that our Exchange server isn't receiving internet emails. It can currently send mail out to internet addresses, and send and receive internal emails from the current email server. I have checked the settings of the receive connectors and everything seems correct. We have tried everything that we can think of.   We can send and receive email locally, and send out to a gmail account. However, we don't get the reply email from the gmail account to the inbox.    Thanks in advance!! Image is of the DNS settings on the exchange server. How can we do pagination in datagridview in winform Recording claimable expenses in GnuCash I am new to accounting and trying to learn a few things as my accounts get more and more complicated.  I currently use GnuCash to record simple income/expenses/assets/liabilities and have had a new situation I don't know how to record.  I am currently billing some expenses for work and for my kayak club to my personal credit card.  Under normal circumstances I would do the following (my +/- may be backwards):  Expense +$100 Credit Card -$100  and then when the credit card bill comes I would pay it off  Credit Card +$100 Chequing Account -$100  For expenses that I get reimbursements for I would like to be able to note that I paid for the expense with my credit card and that I paid off my credit card with my chequing account.  At the same time, I would like to be able to create another parent account (maybe "claimable expenses") that shows that I purchased the item, and was then reimbursed so that an individual expense for work or my club has a zero balance.  I tried to look this up in previous threads but didn't quite understand how to apply this to my situation Any advice would be appreciated. If $E[X|Y]=Y$ almost surely and $E[Y|X]=X$ almost surely then $X=Y$ almost surely Assume that $X$ and $Y$ are two random variables such that $Y=E[X|Y]$ almost surely and $X= E[Y|X]$ almost surely. Prove that $X=Y$ almost surely.   The hint I was given is to evaluate: $$E[X-Y;X&gt;a,Y\leq a] + E[X-Y;X\leq a,Y\leq a]$$  which I can write as: $$\int_A(X-Y)dP +\int_B(X-Y)dP$$ where $A=\{X&gt;a, Y\leq a\}$ and $B=\{X\leq a,Y\leq a\}$.  But I need some more hints. Suppose that a box contains 10 red balls, 20 green balls, and 30 blue balls.   Suppose also that balls are drawn from the box one at a time at random.  What is the probability that all the red balls are drawn before the blue or green balls are themselves exhausted. What is the probability that as the last red ball is drawn, there remains at least one blue and one green left in the box.  The answer I was given is $\dfrac{7}{12}$ and a general equation is: $$ \dfrac{b g}{1-b}+\dfrac{b g}{1-g} $$ where $$ g=\dfrac{20}{60},b=\dfrac{30}{60} $$ but why? What special characters must be escaped in regular expressions? I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps? What is the differences between &> and 2>&1 There are two forms of redirection the standard output and standard error into standard output. But which one is better? and why the &amp;&gt; is considered the perfect?  I can't find what is the differences so that many tutorials and even bash manual state that  &amp;&gt; is better!   So Why shall I use &amp;&gt; and not 2&gt;&amp;1  Mainly using bash shell    EDIT: Thanks for commentors   Only >&amp; works in csh or tcsh  In ksh only 2>&amp;1 works.  dash use >file 2>&amp;1 redirection only  Then which one to use to ensure my script is compatible with other systems whatever the used shells are! Making crafted items usable in adventure mode In a map I'm making the player has to survive while locked in a maze. To stop them from breaking out, they will be in adventure mode. However, I still want them to be able to craft items and use them with specified blocks. I have tried several methods already but they all have a flaw.  One method is to have a scoreboard objective called item and giving certain item entities a specific score using something like:  /scoreboard players set @e[type=Item] item 1 {Item:{id:"minecraft:sapling"}}   Then it is possible to select these items with:  /entitydata @e[type=Item,score_item=1,score_item_min=1] {Item:{tag:{CanPlaceOn:["dirt"],HideFlags:24}}}   This works but it requires the item to be dropped, which isn't a problem for saplings, but for tools and other craftable items, it becomes a hassle.  To fix this, I'm currently clearing tools without damage and giving the player a slightly damaged tool in return:  /clear @a minecraft:stone_axe 0 1   /give @a minecraft:stone_axe 1 1 {CanDestroy:["log","log2","leaves","leaves2"],HideFlags:24}   This doesn't work for items without damage values (e.g. torches), but I don't mind these having to be dropped as there aren't too many of these. However, there is another problem. In the nether, the player will have access to an enchantment table and an anvil. This means they can repair enchanted tools, which will cause them to be cleared and replaced with unenchanted ones as soon as they go back to the overworld.  I also thought about using a stat.craftItem scoreboard objective and giving them the usable item if they craft it. However, this would result in the player having a duplicate of every item they crafted, as I think it is impossible to select an item without NBT-data in the /clear command.  Is there any way to make this work? And if not, would it be better to have the player drop all crafted items or have duplicates of them all? I need to render a model on a transparent background. The models have a light source so they should be casting a shadow on a surface (the XY plane). The purpose for this is to overlay the rendered images (out of blender) on an image of the actual surface, so I want to generate the render including a semi-transparent shadow.  I don´t have any problem rendering the models on transparent background, but I can not make a shadow appear. I tried adding a surface below the model so the shadow can fall on it, but now there's the problem of keeping the surface from rendering.  How can I render the shadow on a transparent background? Writing string at the same position using Console.Write in C# 2.0 $\sum (-1)^n/n$ fails the p-series test, but passes the alternating series test? How to get remote host DNS address from a super-slim host (docker) without ping or bind-utils? How do you deserialize json properties that are reserved words in apex? Is there any way to deserialize JSON into an object using JSON.deserialize if some of the property names in the JSON are reserved words in apex? I want to do something like this:  string jsonString = '{"currency" : "ABC"}'; public class JSONResult {     public string currency; } JSONResult res = (JSONResult) JSON.deserialize(jsonString, JSONResult.class); system.debug(res);   but of course I get an error that the identifier name is reserved. Extending the User model with custom fields in Django Desktop folders won't open with clean install of 18.04 How to fix a stripped pedal crank The threads on my bike's pedal crank just became fully stripped and the pedal fell off, though the pedal itself is fine. Is there any way I can fix this without fully replacing the pedal crank? Improving your own suggested edit makes you leave the First Posts review queue When reviewing the First Posts (and Late Answers) review queue, after you suggest an edit, you're back in the review queue and the I'm Done button is activated. So far, so good, but when I realize I want to edit something else as well (I often forget the tags), I can click the 'edit' link again. When I'm done improving my suggested edit, I'm suddenly outside the review queue.    This does not happen if you have enough reputation (2k) to edit posts straight away; then you always stay in the review queue. How to populate the geometry column in a PostGIS table? After loading a polygon shapefile into PostGIS, the geometry column (geom) is blank for several features. In one case, only a single feature has the geometry calculated and all others are blank. I'm using the PostGIS SHP and DBF loader v.2.0. I am creating a spatial index, and using COPY rather than INSERT. I have loaded several other point datasets and they geom column is populated just fine... (Otherwise, things are working just fine for the polygons: when I create a new feature, the geometry is calculated / geom field populated...etc.) Have I done something wrong when importing the data?  Solution by @ThomasG77 (in comments) PgAdmin3 [doesn't] display features that are too complex but they are present.  You can try SELECT length(ST_astext(the_geom)) from your_table to confirm or you can find &quot;true&quot; empty geometry with SELECT * from your_table WHERE the_geom IS NULL;. In Greek, λογικοφανής is a word that describes a person who spits out seemingly logical statements. It often has a negative connotation as it is targeted towards people who tend to fool the public with supposedly beautifully-constructed thoughts that sound convincing in our ears but are not necessarily accurate. The first word that comes to mind is deceptive, but it is not quite what I look for. Any thoughts? Add a rule after chapter title using titlesec