NBO analysis of potentially hypervalent compounds

Question: I know that one can determine which type of bond is present between different atoms in a molecule by analyzing the output of an NBO analysis. Furthermore the second order perturbation theory analysis can provide information about the presence interactions like hyperconjugation. But is there also a way to determine whether there are three-center four-electron bonds, i.e. hypervalency in a molecule by a NBO analysis ?
Comment: Hypervalency is an obsolete model which is superseded by Valence Bond Theory (resonance) and/or Molecular Orbital Theory (multicenter bond).
Answer: It is possible to determine such 3-centre bonds using an NBO analysis.
Here is a sample output of an NBO analysis obtained from this website:

The number of 3C (3-centre) bonds can be seen in the Lewis Structure column.
A really good resource is the NBO 6.0 Manual to read more about such 3-centre bonds.
There is a chapter in the manual called: B.16 3-CENTER, 4-ELECTRON HYPERBOND SEARCH
Additionally for some theory on a quantitative definition of hypervalency, this paper discusses a method to determine hypervalency using various charge models, one of which is NBO analysis.
Comment: Thanks for your answer ! So if there are only zeros in the Lewis structure column it does mean that there are no 3-center bonds present in the system ?
Comment: Also, the manual says that the hyperbond search is done by default but when carrying out an NBO analysis on my compound there is no output corresponding to the hyperbond search. Is there an additional keyword I have to add ? I can not find anything about this in the manual.
Comment: I am not an expert in this , from what I can understand in the manual, if there were no 3-c output for your compound then there are no 3-c present.I quote from the manual "If the initial 1c/2c search leaves unassigned NL-density exceeding the current occupancy threshold, the NBO search automatically extends to 3-center NBOs."
Comment: The more relevant and probably more interesting chapter in the NBO manual (version 7 can be accessed on the website freely) is the one about Natural Resonance Theory.
Answer: So I have found out that by default the NBO version implemented in GAUSSIAN 16 searches for 1c and 2c bonds but not for 3c bonds. One has to activate it by adding an NBO input at the end of the GAUSSIAN input file. An example looks like this:
<code>%Chk=chk_file.chk
# B3LYP/def2tzvp pop=nboread

nbo 3c bond analysis

0 1
A x1 y1 z1
B x2 y2 z2
C x3 y3 z3

$nbo
3CBOND
$end

</code>
Using this input causes the program to also search for three-center bonds.
Comment: Please do not use this. NBO 3.1 is really old and known to have bugs in implementation and theory. There have been significant advances in this field, too.


PHP SOAP - Handling web service failures and timeouts

Question: I'm currently sending data to a web service using PHP SOAP.
Everything is working fine but I'm struggling to find anything in regards to dealing with web service outages, slow response times, etc.
The web service isn't mine so I'm having to simulate no responses by using an incorrect location setting. As it stands a Fatal error is thrown.
The data is stored prior to the SOAP call so ideally I want to try a couple of times and if there is no response store this result and move the user on.
Here is the basis of the code for ref:
<code>    $soap = new SoapClient( null , array(

    "location" => "https://www.thewebservice.com",
    "uri" => "http://www.w3.org/2001/XMLSchema-instance",
    "trace"=>true

    ) );

    $ret = $soap->__soapCall( "executeSoap" , Array( $xmlvar ) );
</code>
Comment: Have a look at this http://stackoverflow.com/questions/3500527/php-soapclient-timeout
Answer: <code>try {
//your soap code
} catch (SoapFault $e) {
//error handling
}
</code>


Is it okay for a duck/splay footed individual to rock climb?

Question: If an individual walks with a pronounced duck-footed (splayed) gait, and is actively trying to correct this, is there any harm for the individual to begin rock climbing. I feel like a lot of edging during rock climbing puts your feet in a pretty extreme toe-out position and therefore may exacerbate the issue.
Comment: so edge toe-in?
Comment: @endolith that seems pretty extreme, especially if climbing toe out doesn't hurt the effort to stop walking toe out.
Answer: https://www.ifsc-climbing.org/index.php/world-competition/paraclimbing
People with some pretty extreme physical impairments find ways to rock climb and also accomplish their other rehabilitation goals.  If I were you / this person I would ask whatever physiotherapist is guiding them in their rehab but unless specifically contraindicated, the general strength flexibility and fitness demanded and encouraged by climbing is likely greater benefit than harm.
Comment: mmcc, I very much appreciate your suggestion to seek professional advice before making this trip. It should always be the first thing when discussing activities for people who either have known physical problems, or might be vulnerable, especially if they haven't done something before.


How to remove_filter that filters iframes in posts?

Question: Which filter if removed allows iframes to be inserted into wordpress posts?
Answer: This filter does not. This feature is disabled in the visual editor TinyMCE.
<code>function wpse49619_change_mce_options($initArray) {
    $ext = 'iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]';
    if ( isset( $initArray['extended_valid_elements'] ) ) {
        $initArray['extended_valid_elements'] .= ',' . $ext;
    } else {
        $initArray['extended_valid_elements'] = $ext;
    }
    // maybe; set tiny paramter verify_html
    //$initArray['verify_html'] = false;
    return $initArray;
}
add_filter('tiny_mce_before_init', 'wpse49619_change_mce_options');
</code>
Also you can use examples from WPEngineer how to enhancement TinyMCE.
Comment: Ok @Chip Bennett, I added little code :)
Comment: Please put relevant code *in your answer* rather than merely linking to an external site. This one should be straight-forward enough that the code shouldn't be too onerous. :)
Comment: Thanks! Now, I can put iframe directly into the editor BUT I used `media_send_to_editor($html)` to add `iframe` to editor but 'Add Media' screen hangs up. What could be the problem?
Comment: Ok I found the problem. This happens when Visual (WYSIWYG) is active. Works fine when HTML view is active.
Comment: Well this is because I was getting `` from the Video API I am using. This causes _Cannot call method 'indexOf' of undefined_ in wp-tinymce.php. Should be ``. HTML view auto converts this. WYSIWYG does not!


Is there something wrong if Docker service has 614 /usr/bin/unpigz child processes

Question: In a Ubuntu instance in GCE, I have 614 unpigz child processes under dockerd when examining the processes via ps afx. Normal? After restarting Docker, is there a chance that it gets reproduced...?
Comment: What are you running in docker?
Comment: Couple of node processes in a phusion baseimage based image. In the host side there is an automation that keeps sure that the latest image from the registry is being used. I don't think it is related to the image internals since the container has been upgraded recently and that didn't affect the situation.
Answer: This is a BUG actually (see https://github.com/moby/moby/issues/38608). These processes will disappear after Docker service restart, but they will be created again as long as you use Docker's ADD *.tar.gz (or similar) feature.
Answer: Inefficient but not dangerous. You make the decision of whether lots of processes like this is healthy for your environment.
pigz is a parallel implementation of gzip. The default maximum for --processes is the number of online processors, and each container sees all the CPUs of the system. They will compete for CPU and I/O, so may pile up and thrash the Linux scheduler a bit.
Optimum number of process is probably closer to 2x the number of CPUs. If you run lots of pigz at once, it may be more effecient to serialize those, reduce --processes, or use regular not-threaded gunzip.


Any suggestions on what size to make my animation characters?

Question: What are the best sizes that an animation character's XYZ scale measurements average? I am teaching myself how to use the Blender app. By default, the XYZ scales are 1.000 but I think that's too small unless the character is something like a cricket.
Comment: One blender unit is by default 1 meter, that is the "correct" scale to work at, Cycles render engine, light power units, and physics properties all expect that
Answer: The sizes are in real-world units, Metric by default.

These two numbers sound kinda similar but mean very different things.

When an object has a scale of (1.0, 1.0, 1.0) it basically means "This is how big this object should be by default".
That could be a 50ft building or a 1cm cricket like you describe.
You usually want to keep your scale at 1 because other settings can cause modifiers and other stuff to misinterpret things about your mesh and cause issues.

Unless you happen to be animating the object or something.
So to answer your question: How big should you character be? As big as they um... are.


Adding X-Frame-Options to heroku rails 2.3.15 app

Question: I've found many answers on how to remove X-Frame-Options SAMEORIGIN, but I've been unable to find a correct answer for how to add it.
The app is on Heroku and is running under Rails 2.3.15 (nginx).  I don't think it is a Sinatra app (I say this only because there is no config.ru. A friend built the app for me and he's unable to help out now, so I'm not positive.)
I tried adding the following to /app/controllers/application_controller.rb but it just made every page return a 503:

config.action_dispatch.default_headers = {
      'X-Frame-Options' => 'SAMEORIGIN'   }

When that failed I tried this syntax instead, in the same file:
def set_x_frame_options
  response.headers["X-Frame-Options"] = "SAMEORIGIN"
end

That doesn't seem to break anything, but there are also no new http headers added.
As you may be able to tell, I barely know what I'm talking about here, so please feel free to talk to me like I'm a n00b in your answer. :-)
-=-=- edit -=-=-=-
Figured it out myself for adding http header for pages served from the app itself.
Added this to /app/controllers/application_controller.rb :

before_filter :default_headers
def default_headers
  headers['X-Frame-Options'] = 'SAMEORIGIN'
end

Still not sure how to add it to a few pages I have outsite the app, in /public/, so pointers welcome on that front.
Comment: Hi @StefanLasiewski ,   I tried but was told via error message that I had to wait >= 8 hours before doing so. The error mesage included a suggestion to add the answer to the initial post by means of an an edit instead, so I did. :-)
Comment: Oh, but that leaves it languishing in the 'unanswered' filter.  Fixing...
Answer: Figured it out myself for adding http header for pages served from the app itself.
Added this to /app/controllers/application_controller.rb :

before_filter :default_headers
def default_headers
  headers['X-Frame-Options'] = 'SAMEORIGIN'
end

Still not sure how to add it to a few pages I have outsite the app, in /public/, so pointers welcome on that front.


How do I display a full 360 degrees using Actionscript 2 and Trigonometry?

Question: I'm creating a game that uses trigonometry to calculate and display distance and degrees in dynamic text boxes. I'm calculating the distance of my cursor from center of a movie clip. And using that center of the movie clip, I'm trying to calculate and display a full 360º as my cursor moves around the swf. I have the distance part of the game working but the part that displays degrees is not working properly. The dynamic text box only display from 90º thru 270º. Instead of going past 270º to 360º/0º to 90º, it just counts back down from 270º to 90º. Below is my actionscript. I'd greatly appreciate any help or suggestions. Thanks!
//Mouse and Dynamic Text Boxes-------------------------

Mouse.hide();

onMouseMove = function () {
feedback.text = "You are moving your mouse";
cursor._x = _xmouse;
cursor._y = _ymouse;
updateAfterEvent();
xmouse_value.text = Math.atan2((a), (b));
ymouse_value.text = Math.round(radians*180/Math.PI)
updateAfterEvent();
};

Mouse.addListener(myListener);

//distance (RANGE)
_root.onEnterFrame = function () {
xmid = Stage.width/2;
ymid = Stage.height/2;

a = _root._ymouse-ymid;
b = _root._xmouse-xmid;
c = Math.sqrt(Math.pow(a, 2)+Math.pow(b, 2));
feedbacka.text = Math.round(a);
feedbackb.text = Math.round(b);
feedbackc.text = Math.round(c/30.4);

updateAfterEvent();

var radians:Number;
var degrees:Number;

//Calculcate Radians
//Radians specify an angle by measuring the length around the path of the circle.
radians = Math.atan2((c), (b))

//calculate degrees
//the angle the circle is in relation to the center point
//update text box inside circle
radians_txt = Math.round(radians*360/Math.PI);
degrees_txt = Math.round(radians*180/Math.PI);

updateAfterEvent();

//getting past 270 degrees

radians2_txt = Math.round(radians/Math.PI);
radians2_txt = Math.floor(radians + -270);

}

Answer: The parameters to atan2 should be the delta-y and delta-x between the two points, but you are passing the distance between the two points and the delta-x. Try this instead:
radians = Math.atan2(a, b);

The next problem is to convert the radians into degrees. To convert radians to degrees, you can do this:
degrees_txt = radians * 180 / Math.PI;

Note that atan2 returns from between -Math.PI / 2 to Math.PI / 2. When converted to degrees, this range becomes -180 to 180. To convert to 0 to 360, you can add 360 to the result if it is negative:
if(degrees_txt < 0) degrees_txt += 360;


android vpn allow connection dialog

Question: I sometimes use light screen manipulating apps on my galaxy s4(such as twilight app,...) and when the apps are enable,in my vpn apps,ok button in vpn allow connction dialog does not work(cannot be tapped) but cancel button works az usual!
I want to know what is the behind?i think this is not a bug, it is something like a rule.
Comment: Screen overlay apps cause this; this is to prevent malicious overlay from manipulate your operation.
Answer: Your security is the reason
This is to prevent Tapjacking . See bmdixon's answer here Screen overlay detected, what is the problem? for details
So, VPN is not permitted but if you don't have a Cancel option to go back ( and disable the screen app, normally option for this is available in app settings) - how do you go back ? You can't, therefore, Cancel option is NOT greyed out

android vpn allow connection dialog


Mounting a server by only its ears?

Question: Is it possible (and safe) to mount a 19-inch 4u rack server on a 2-post rack... by only its ears?
Comment: How would you like it if we held you up by your ears?
Comment: You mean "wings"?
Comment: @Andrew: I've heard "ears", "tabs", "wings", and a small variety of other names. I think it's just a regional thing.
Answer: Only if you don't have any problems replacing it after it falls.  I wouldn't chance it.
Comment: +1. I agree whole heartedly.
Comment: And when it does go, there's a reasonable chance it'll damage the rack it's in, and anything else below it..
Answer: IMHO, No. Servers are meant to be installed on rails or shelves. The "ears" are meant to secure the server in the rack, not to support it.
Comment: I had some real short depth 4U servers back in the day that were designed to be ear-mounted.  No rails/shelf necessary.
Comment: Actually, this is true for most servers, but not all.  Sun had some 1U servers that only had ears, not rails. (eg. Netra X1)  Of course, they were also less than 2 foot deep, so didn't need to support as bad of a moment.  I've never seen a 4U "server" that shipped like this, although I have seen some larger network gear (eg, most Xyplex terminal servers, Cisco switches, etc.)
Comment: @Joe H: I agree. If the equipment doesn't span the full length of the rack (communications equipment typically) then it's usually mounted by the ears. Full length servers are another matter altogether.
Comment: most server rails only attach at the front though?
Comment: Not that I've seen. Most rails I've worked with attached at the front and rear.
Comment: I guess if the server is 4U and short, or it's a very short & light network switch, you can get away with ears-only mounting. However, I have several Sun Netras under my care, and I would strongly (STRONGLY) recommend using a full or half-length shelf to support them, assuming you can't be bothered to go buy the rails that are supposed to be attached to them...
Answer: Look at the server's manual.  If you haven't bought it yet, look online -- there's normally a mounting guide of some sort, and it might have specific instruction for dealing with a two post rack.
Some systems have alternate holes tapped in the sides so you can mount the ears closer to the center of gravity.  The system will stick out the front of the rack, but it'll cause less torque.
Other systems have enough of the heavy components far enough forward that they're fine with 2 post mounting with only sticking out a few inches.  (basically, you turn the ears around before attaching them).
Another option is to get a shelf rated for the weight, and install that to take the load of the server.
Comment: +1 for the shelf - this is what I've done when I've absolutally had to rack mount a server in a 2-post rack (in an A/V cupboard). Shelves rated for that much weight usually cover several units to distribute the load evenly.
Comment: I forgot to add one more option -- place it in the bottom of the rack, so it's supported by the base of the rack if it tries to rotate.
Answer: I'm sure it is possible, but if it isn't designed to be mounted that way, then I wouldn't risk it.
Comment: I've seen some flimsy 2-post racks, my money would be on the rails bending out of shape, ripping out the screws that hold the rack rails in place (especially if it's in say an A/V cupboard where the racks may be mounted against veneered plywood or MDF)
Answer: Is it possible? Yes
Is it advisable? No
Answer: Short answer:
It depends on your system. You need to find and read the racking manual, or contact the vendor.
Long answer:
Only if you don't have any problems replacing it and the systems underneath it after it falls, to borrow the quote from @PHLiGHT . If you're racking other hardware  near this server, and you bump this chassis by accident, will it fall and crush your hands or toes? What if it fell partway and bent the rails? What will you do then?
For many rails, the weight is transferred from the server to the rails to the little screws holding it into the rack. With most servers this is fine, because you have two rails and 4 screws per rail. With a two post system, you might be looking at only two screws on each side of the 4U box. That sounds dangerous.
How are the ears attached to the side-rails? Are they attached with nice solid connections, or are they attached with little wimpy screws, or with little sheet-metal flanges?
Comment: Okay ... the civil engineer in me is compelling me to bring up an issue -- if you've properly installed the ears, the screws aren't taking the weight.  The friction between the ears and the server is taking the sheer load; the screws are providing tension to create the friction, but taking very little of the sheer load (the weight in this case).  The screws only take a significant load in this situation if they're not torqued down properly, or if there's a lateral load (eg, an earthquake)
Comment: You might be right. And I Am Not A Civil Engineer, but I'm looking at several sets of ears right now, and I'm not convinced that the friction is holding everything together. Some of the ears do have flanges to hold the weight, but not all of them.
Answer: Yes you can do this, but I wouldn't recommend it. some servers are very heavy and could also do with support at the back.  If your server is only a 1U then it's not a good idea because it's likely to bend at the front.
If it's 4U case then there is generally enough strength at the front to support it OK.  I've done this before when we didn't have rails.
Trouble is, it's a real pain to get at the server when things go wrong or you just need to pull it out for some reason.  They can be very heavy as you know and when you remove the bolts the whole thing either drops or puts its full weight on the server below (which may be supported in the same way.
Get some rails if you can.  Or if you can't get these then other option is to get a shelf and make the server sit on the that.  At least then you can remove a couple of bolts and slide it out a bit on the shelf.  You can even get shelves that slide.
Answer: Possible yes, albeit briefly. Safe, no.
If for some reason you really need to mount a server into a 2 post rack you MAY be able to get away with using cables attached to the top of the rack to support the rear of the server. While that will work it is clearly not the preferred option.
Answer: Those 2 post racks are usually called telcom or relay racks.  Networking equipment is usually fine to put on them, but they are not designed for servers in general.
Answer: I actually have a heavy rackmounted server that miraculously survived having one of it's "ears" fail when it was being racked. They absolutely WILL bend and break. I say no. (I'll post a picture later)
Answer: I've recently had similar problem with this APC Smart-UPS, which is how I ran into this question.
This is the manual, which came with it.
The first step on the manual instructs to attach the two "ears" on the sides of the UPS. I assume the OP was asking whether a UPS can be mounted by those only. That sounds insane!
Instead, my problem was that the package came with 2 "slightly larger ears", which should be mounted on the front poles only (as shown on the manual). I was actually baffled even at this, and worried these could not hold the UPS. Instead, I've found some proper 4-pole rails, which I would have been much more comfortable with.
In the end, I was told I should stop worrying and love the "slightly larger ears". To my surprise they can indeed hold the weight, especially since the batteries are on the front of the device, and  happen to be just the same depth as the "ears" extend. The drawback is I have to make sure not to ever put pressure on the back of the UPS accidentally.
PS. Some manufacturers have specific instructions to mount their storage servers by the ears. Still looks crazy!

Mounting a server by only its ears?


Cryptonote vs an X11 Coin

Question: Which one is a more desirable feature in an altcoin?
The X11 or the Cryptonote?
Also why cnt the 2 be implemented together?
X11 seems to allow 11 algos to mine the coin, and cryptonote is based on something else.
Answer: ''Which one is a more desirable feature in an altcoin?'' that's not an easy question and the answer depends on the philosophy you impart in your coin. X11 is in essence a PoW with 11 hash functions (blake, bmw, groestl, jh, keccak, skein, luffa, cubehash, shavite, simd, echo) if one of them gets cracked there's still 10 more to deal with. It does allow for reduced energy draw and heat output from GPU but that's pretty much all I could say about it's cons. The downside of X11 algorithm is in that it's not as long-term as some expect it to be. The experts claim that it will take a maximum of two years before this algorithm gets ASIC'd. Even though it's complex, X11 is one of the mining algorithms which isn't relying on hardware memory hence it's much more simple to implement on ASICs. In my opinion all PoW algorithms need to use memory bound functions so if you are thinking long term I'd suggest you go with CryptoNight.
CryptoNight relies on random access to the slow memory. And a megabyte of internal memory is almost unacceptable for the modern ASICs. So far quite a few coins have been using this algorithm, all of them are CryptoNote-based. Bytecoin (BCN) is probably the most prominent one since it was the first coin to have built its architecture around the CryptoNote protocol. Bytecoin has been around since 2012 but from what I've heard the development started as early as 2009. It is a CPU-minable coin with anonymous transactions feature and immunity to ASICs. You could try mining Bytecoin with a GPU but the coefficient of performance would be comparable to CPU-mining. Bytecoin is doing pretty well and there are other coins with CryptoNight algorithm; Fantomcoin, Quazarcoin or Monero.
Theoretically you could implement X11 and CryptoNight together in a cryptocoin but two years later you'll inevitably face the ASIC problem for your X11 PoW. So I don't really see any practical use of such a combination.

Cryptonote vs an X11 Coin


How do I ripen tomatoes?

Question: I am in zone 9b and growing tomatoes since summer in a vegetable garden.  I have a few tomatoe plants that have small tomatoes.  Now that the weather has started to get cold, the tomatoes are not turning red as you would normally expect.  How do I ripen them or get them to turn red?  Should I bring them into the house where it is much warmer and let is sit till they turn red?
Comment: They should ripen on the vine
Comment: Pick and put on a sunny windowsill in a warm spot if you have one, or in a paper bag with a ripe banana - you'll need to change the banana after a few days though. Those that don't ripen in a week or two, you can make a chutney with them instead.
Answer: Unless they're too immature, they will eventually turn red if you bring them in the house and wait. If you're planning to save seeds, though, people often say that the seeds cease to develop after you've picked them. Nevertheless, seeds from full-sized unripe tomatoes (in my experience) do grow. If they don't look very developed, or if they're particularly thin, I wouldn't count on them growing, though, whether they're green or red.
In some rare cases (in my experience), green tomatoes that are supposed to change red won't fully turn red if ripened indoors (but they will change yellow or orange). In the vast majority of cases, however, they will turn red. Either way, they'll be ripe and you can eat them. But it should be noted that just because an occasional one turns yellow, that doesn't mean the seeds will produce yellow fruit (because it's not cross-pollination that causes this). I forgot the reason this happens, but I did read about something like this once.
Green tomatoes, in my many years of experience storing them to ripen, can take anywhere from a day to several months to turn red indoors, depending on various factors (including the variety). Contrary to popular belief, you don't have to get special storage tomato varieties to do this (whether or not they're any better for the purpose). Most tomatoes will work. Some ripen fast, and some take a long time to ripen (the ripening speed outside is a good (but not perfect) indicator as to how long it will take).
Tomatoes will usually ripen faster if they're warm. Refrigerating them isn't a good idea, but dry, cold storage is great if you want to delay ripening so you can have tomatoes months from now, or what-have-you.
If your tomatoes have a dull look to them, or aren't smooth to the touch, they're probably not ripe enough to be worth storing indoors. They can ripen still, but they may end up being leathery.
Ethylene helps tomatoes to ripen faster. It is found in other ripe fruits. Putting other ripe fruits near your green tomatoes may speed the ripening process; however, it may also make them go bad faster after ripening.
Phosphorus is found in large amounts in seeds, and it is also limited when it's cold. If you still have a decent amount of time left before the frost, and if your plants are still warm enough to actually be growing bigger, then you might try giving them some extra phosphorus to see if that helps the seeds to mature (which may in turn help to speed ripening). Phosphorus seemed to help with my melons last year, anyway (I didn't try it this year). I have read that phosphorus helps to speed ripening, but it took a lot of searching to find anything on the topic; so, I would consider it experimental, personally.
If you try it in future, you'll likely find that some varieties are a lot better at ripening fast even on slow-ripening years than others. This was a slow-ripening year for most varieties for me. I grew about 100 varieties. For me, the faster-ripening ones (after fruit set) were Chocolate Pear, Matina, Creole, Aussie, Pink Cheeks, Mountain Princess and perhaps some others.
Comment: Apples produce ethylene, and they are usually used (on domestic garden) to help other vegetables/fruits to ripen faster).
Answer: Unless you have a small variety of tomatoes, they're likely to be immature and will never ripen off the vine.
If they're mature and still green, then they will ripen off the vine. Keep them in the dark covered with some newspaper to minimize the loss of ethylene, at a temperature of  68°F to 77°F. Outside this range the ripening slows down, or completely stops.
Once they're off the vine the sugar levels will not increase any further since the plant can not store any more sugars in the fruit.
http://www.harvesttotable.com/2011/08/how_to_ripen_tomatoes_on_the_v/

How do I ripen tomatoes?


Select fields in multiple tables / change output value / compare fields

Question: i want compare (=) two fields in two tables. In the first field, i have only a nid (e.g. 55) and in the second field, the value is formatted with "node/%" (e.g. node/55).
How can I created the join query for compare these two fields ?
I have tested this with this code without success :
<code>$uid = arg(1);
$query = db_select('field_data_field_users', 'alias1');
$query
    ->condition('user_id', $uid, '=')
    //->addExpression('node/(fdfur.entity_id)', 'alias2'); // > not functionnal
$query->join('menu_links', 'ml', 'ml.link_path = alias1.entity_id');
// ml.link_path = alias1.entity_id > node/55 = 55 > no match...
$query
    ->fields('alias1', array('entity_id'))
    ->fields('ml' , array('language'))
    ->fields('ml' , array('link_path'))
$results = $query->execute();
</code>
Here an image that explains my problem
I start from the user id and I want to get the datas of the menu links. The first db_select in the custom table is ok, i get the related nids with the user ids, but I can't to get the datas of the menu link.
Have you any idea to resolve my problem ?
Thanks for your help.
Answer: I suspect this is what you are looking for
<code>db_query("SELECT * FROM node LEFT JOIN url_alias ON url_alias.alias=concat('node/',node.nid)");
</code>


Checking to see if postGIS is enabled in Ruby on Rails

Question: How can you check if postGIS is enabled in a ruby on rails app? rails seems to do a lot of the backend for you so this is confusing for me. Normally, i would set it up and set up the extension myself.  How can I check that it is enabled?
Answer: If you can run arbitrary sql statements
<code>SELECT postgis_full_version();
</code>
will return results if PostGIS is enabled and installed in a schema you have access to.


Relation between word length, character size, integer size and byte

Question: What is the relation between word length, character size, integer size, and byte in C++?
Comment: This was asked previously http://stackoverflow.com/questions/589575/c-size-of-int-long-etc
Comment: See also: http://stackoverflow.com/questions/271076/what-is-the-difference-between-an-int-and-a-long-in-c
Answer: The standard requires that certain types have minimum sizes (short is at least 16 bits, int is at least 16 bits, etc), and that some groups of type are ordered (sizeof(int) >= sizeof(short) >= sizeof(char)).
Comment: One minor edit should be made - int only needs to be at least 16 bits.
Answer: In C++ a char must be large enough to hold any character in the implemetation's basic character set.
int has the "natural size suggested by the architecture of the execution environment".  Note that this means that an int does not need to be at least 32-bits in size. Implementations where int is 16 bits are common (think embedded ot MS-DOS).
The following are taken from various parts of the C++98 and C99 standards:

long int has to be at least as large as int
int has to be at least as large as short
short has to be at least as large as char

Note that they could all be the same size.
Also (assuming a two's complement implementation):

long int has to be at least 32-bits
int has to be at least 16-bits
short has to be at least 16-bits
char has to be at least 8 bits
Answer: The Standard doesn't know this "word" thingy used by processors. But it says the type "int" should have the natural size for a execution environment. But even for 64 bit environments, int is usually only 32 bits. So "word" in Standard terms has pretty much no common meaning (except for the common English "word" of course).
Character size is the size of a character. Depends on what character you talk about. Character types are char, unsigned char and signed char. Also wchar_t is used to store characters that can have any size (determined by the implementation - but must use one of the integer types as its underlying type. Much like enumerations), while char/signed char or unsigned char has to have one byte. That means that one byte has as much bits as one char has. If an implementation says one object of type char has 16 bits, then a byte has 16 bits too.
Now a byte is the size that one char occupies. It's a unit, not some specific type. There is not much more about it, just that it is the unit that you can access memory. I.e you do not have pointer access to bit-fields, but you have access to units starting at one byte.
"Integer size" now is pretty wide. What do you mean? All of bool, char, short, int, long and their unsinged counterparts are integers. Their range is what i would call "integer size" and it is documented in the C standard - taken over by the C++ Standard. For signed char the range is from -127 <-> 127, for short and int it is the same and is -2^15+1 <-> 2^15-1 and for long it is -2^31+1 <-> 2^31-1. Their unsigned counterparts range from 0 up to 2^8-1, 2^16-1 and 2^32-1 respectively. Those are however minimal sizes. That is, an int may not have maximal size 2^14 on any platform, because that is less than 2^15-1 of course. It follows for those values that a minimum of bits is required. For char that is 8, for short/int that is 16 and for long that is 32. Two's-complement representation for negative numbers is not required, which is why the negative value is not -128 instead of -127 for example for signed char.
Answer: Standard C++ doesn't have a datatype called word or byte. The rest are well defined as ranges. The base is a char which has of CHAR_BITS bits. The most commonly used value of CHAR_BITS is 8.
Comment: @Artyom: I specified what a byte means (since it is not required to be always 8 bits -- a common misconception).
Answer: sizeof( char ) == 1 ( one byte ) (in c++, in C - not specified)
sizeof( int ) >= sizeof( char )
word - not c++ type, usualy in computer architecture it mean 2 bytes
Answer: Kind of depends on what you mean by relation. The size of numeric types is generally a multiple of the machine word size. A byte is a byte is a byte -- 8 bits, no more, no less. A character is defined in the standard as a single unsigned byte I believe (check your ARM for details).
The general rule is, don't make any assumptions about the actual size of data types. The standard specifies relationships between the types such as a "long" integer will be either the same size or larger than an "int". Individual implementations of the language will pick specific sizes for the types that are convenient for them. For example, a compiler for a 64-bit processor will choose different sizes than a compiler for a 32-bit processor.
You can use the sizeof() operator to examine the specific sizes for the compiler you are using (on the specific target architecture).


Does the input data representation when training an autoencoder matter?

Question: Suppose I want to train an autoencoder on English words. Does it matter what kind of input data representation I use? E.g., if I use word2vec as my input or bag of words, will the quality of my autoencoder differ? If so, what do people typically use for autoencoder input?
Answer: Definitely, the input type of data can affect your autoencoder's performance.
On one side, the bag-of-words ignores context, but it is easy to train. On the other side, Word2Vec captures the semantic relationships, but again it's not that easy to train the model since it will need a lot of data and resources.
You may try One-hot encoding, since it's simple to use and usually used in autoencoders.
In general, there isn't necessarily a best choice here; what works best will depend on factors like your specific task requirements, available computational resources etc., so it's usually worth trying out several options if possible.


Which thinset mortar do I choose

Question: I have painted redgard on the shower walls and I am ready to tile.  Which thinset mortar do I use over the redgard?  I am using 12x24 tiles on 1 wall and 4x12 on the other 2.
I am using ceramic tiles.
Comment: This is a "read the label on available products" scenario. Most likely any polymer-modified mortar will be good, but do read the label on what you have in stock.
Answer: Some mortar/thinset is not suitable for porcelain. Porcelain should be specifically listed if your tiles are porcelain. Floor tiles could be porcelain. Wall tiles are usually ceramic. The labeling of your tile should reveal this information.
This refers to the substrate, as exposed on the back of the tile. (The finishing on the front does not matter.) Ceramic is lighter, more porous, and reddish. Porcelain is heavier, more dense, and often white/beige.
Many bags in the tile-aisle look the same, so read the long list of application/uses. The thinset for porcelain is more expensive, and can be used for ceramic. For any questionable backing or tile type I use thinset for porcelain.
Using modified thinset on a roll-on water membrane is fine.
Make sure you applied the membrane thick and with multiple coats. It is not applied thinly like a primer. Inspect it carefully, looking for tiny bare or thin spots. Let it dry and cure per instructions.
Answer: Find out the brand sold at the store where you plan on buying it. Call the manufacturer, they're the best source for a question like this. They'll tell you the best product for your application and also tell you what size trowel to use. 12x24 tiles definitely need the proper thinset. I would also recommend you use a "tile leveling system" for the 12x24 tiles. Hard to explain what they are but you can easily find a video. They are clips that keep the tiles level so you don't have a tile that sticks up higher than the others.
Answer: The answer depends somewhat on what type of tile is being used on the walls.
If the tile is a common ceramic or porcelain, you need a modified ( just means that polymer bonding agents are added) thin set. If it is a stone tile a non modified is recommended. I would use a thin set for medium format tiles. It can be used with both size tiles.
Good luck.

Which thinset mortar do I choose


Calling Pathfinder Divide through JavaScript in Illustrator?

Question: How do I call Window → Pathfinder → Divide through JavaScript in Illustrator? If not, can I call an action that pushes this button through javascript?
Answer: Use this code to apply Divide Effect. Please note that the effect must be applied to groups.
to group selected items, use
app.executeMenuCommand('group');

to apply the Divide effect to a selected group, use
app.executeMenuCommand('Live Pathfinder Divide');

if you need to expand appearance, use
app.executeMenuCommand('expandStyle');

Comment: This works but its not entirely ideal because it intercepts the style. You would need to take any exsting style and take it out and return it back. So this is not pathfinder divide as such and has other nasty side effects and is harder to use.
Comment: Oh by the way if you include how you need to group the date first and apply the divide effect on the group then ill up vote you.
Comment: sorry, I didn't post a complete working sample, merely showing that there was an alternative access to the much needed Path Finder tools.
Comment: Yes, though my reading of the OP is that they are aware of this since they explicitly say pathfinder.
Answer: Elmentary you can not. Tough you can kludge your way trough the system and call a action that has been recorded to use pathfinder. The scripting interface of Illustrator is pretty limited in scope.
The extendscript that comes with Adobe apps can not call the windowing subsystem to press buttons. NodeJS could be made to do that tough but then that wouldnt be a simple script.
Comment: trying not to hijack the thread, how do we use NodeJS in Illustrator?
Comment: @CarlosCanto you do not! You can use [windows COM](https://helloacm.com/using-com-object-in-nodejs/) though or OSA on OSX. But that is a different API and not compatible acros operating systems
Comment: @CarlosCanto if you want more info feel free to drop by into the [chat](http://chat.stackexchange.com/rooms/1240/the-ink-spot)
Comment: thanks for the info, the link and the offer to chat. I will definitely pay you a visit there...not now though, I'm in a crunch at the moment.
Answer: Yea, you can have a previously recorded (or dynamically written too) action that does the pathfinder operation and then it's as simple as doing app.doScript(actionName, setName)


Deployment error: __MISSING LABEL__ PropertyFile - val dependent.class.invalid not found

Question: I am facing deployment error as shown below. I searched a lot but could not find correct solution for this. What needs to be done for this?
Answer: This is a compilation error.  In my case, a variable type was changed
FROM:
webservice myClassName myVariableName;
TO:
webservice List < myClassName > myVariableName;
However, the corresponding variable type change was NOT made in the test class.
This resulted in a compilation error.  Unfortunately, the error statement does not point you to where the compilation error is occurring.
We were able to track it down only because our nightly run of test classes failed, so we knew it had to be caused by a change made the previous day.  Based on a log of the previous day's code changes, we were able to isolate it.
Hope this helps.
Mike


Performance difference between a .NET assembly built in debug and release mode?

Question: Some previous developers put some assemblies that were built in debug mode into production. Is it worth recompiling them in release mode and redeploying them? If there's just a 1-2% performance increase, I'd probably just leave them there. On the other hand, a 10-20% increase might change my mind.
Answer: I had this same question about a year ago because we were having major performance issues in production.  As it was explained to me from MS Premier support the debug build versions include hooks for debugging which can result in about 1 - 10 % increase in memory consumption depending upon what the application does.
If you are not having problems then leave them alone, but if you are having problems with memory consumption then go ahead and recompile / deploy.
Answer: In my experience, I saw a 30-40% difference.  This was with DotNetZip, a library that does encryption, compression, and a little file i/o.  Over 85% of the time was spent in encryption and compression, just moving bytes around.
Answer: If you look at the IL code generated for Debug and Release builds the differences are generally quite small. Most of the differences lie in additional nop commands at key source points to support Edit and Continue and source line debugging. However when the .NET runtime actually JITs the MSIL the runtime assembly is almost identical. The biggest difference comes when a debugger is attached. That will prevent the JIT from optimizing the actual running code.
Release versions are often much smaller as well because they just don't include as much code. There's can be patches of code surrounded with #if DEBUG statements as well as Conditional attributes that instruct the compiler to omit calls to methods in release mode (Like Debug.WriteLine).
I've found that the Debug.WriteLine and Trace.WriteLine methods, when left in production code and have a significant performance implications even if a debugger is not attached.
Answer: It is worth noting that release code also removes some preprocessor stuff like:
<code>#if DEBUG
...
#endif
</code>
It also removes Debug.WriteLine, Debug.Assert, and some other stuff in the System.Diagnostics namespace, which can be useful in testing, but are pointless in well designed code for the release build.
Answer: Generally you will see a benefit because the release version is typically compiled with optimizations using the <code>/optimize</code> compiler option. However, how big the difference will be will depend on your specific assembly - you will need to profile.
Answer: I've found that the performance difference increases exponentially with the complexity of the code - a simple application may only see a 5% difference, but I've seen as much as a 50% slowdown on complex applications, especially ones which involve larger data structures like arrays or maps.
There's of course the possibility that debug code could be slightly different as well, depending on how you are set-up - look at assertions for example.
Answer: Another argument against using debug builds in production is because they consume much more memory since debug symbols are required to be loaded.


Why does Jackson ignore the surface term in this integration by parts, in the electric potential of a polarized dielectric?

Question: In Jackson's electrodynamics Page (153), it is given that the total potential is the sum of potential due to free charge and potential due to dipole. Therefore,
\begin{align*}
\phi(x) & = \frac{1}{4\pi\varepsilon_0}\int\frac{\rho(\vec{x}')}{|\vec{x} - \vec{x}'|}d^3x'
+ \frac{1}{4\pi\varepsilon_0}\int{\vec{P}(\vec{x}')}\cdot\vec{\nabla}'\frac{1}{|\vec{x} - \vec{x}'|}d^3x' \\
& = \frac{1}{4\pi\varepsilon_0}\left[\int\frac{\rho(\vec{x}')}{|\vec{x} - \vec{x}'|}d^3x'
+ \int\vec{\nabla}'\cdot\left[\frac{{\vec{P}(\vec{x}')}}{|\vec{x} - \vec{x}'|} \right]d^3x'
- \int\frac{\vec{\nabla}'\cdot \vec{P}(\vec{x}')}{|\vec{x} - \vec{x}'|}d^3x' \right]
\end{align*}
Using the Gauss's divergence theorem, the 2nd term becomes
\begin{equation*}
\int\vec{\nabla}'\cdot\left[\frac{{\vec{P}(\vec{x}')}}{|\vec{x} - \vec{x}'|} \right]d^3x' = \int\frac{\vec{P}(\vec{x}')\cdot \vec{ds}'}{|\vec{x} - \vec{x}'|}
\end{equation*}
This term has been neglected while reaching Eq. (4.32) in the book. How we can do that?
Comment: Most of the time a divergence term vanishes at a boundary of infinity you will see this concept used everywhere in physics most of the time it doesn't matter
Answer: Jackson is assuming that the medium fills all of space, so that the boundary term is taken at infinity, and it is assumed to vanish.
Whether it does actually vanish, i.e. whether a suitable surface-to-infinity limit exists that will take that integral to zero, is a separate (and often fairly subtle) question, and the answer may well be negative. However, I think it is justified in Jackson's usage in that section, since he is primarily concerned with the behaviour of the bulk, with the surface-charge effects embodied by that integral getting deferred to later sections of the book.
To be honest, I find this aspect of the presentation to be lacking sufficient clarity. However, you can clearly see that the bulk of §4.3 is treating the medium as infinite since its last paragraph draws a line of demarcation and talks about what happens if the medium is not infinite.
Generically, though, that term doesn't vanish, and there are important polarization surface charge effects (say, the charge marked 'bound surface charge density' in this Wikipedia page) at any region where the dielectric susceptibility changes discontinuously.
Comment: I realise that the closed surface integral of $P$ will vanish if the surface is entirely within a homogeneous medium, but how is that argument extended to the closed integral of $P/|x-x'|$?
Comment: @Rob I don't think it does extend to at modified integrand.
Answer: Jackson is talking about potential due to dipoles associated with some selected region of material medium. Such potential contains contribution due to all charges of dipoles implied, including those that are outside the boundary of the region. At the same time, it does not have contributions due to charges inside the boundary that come from other dipoles that are outside the boundary. This means Jackson's $\Phi$ as he defines it and expresses in 4.30 is not necessarily potential due to all charges inside the boundary surface, but differs by some contribution that can be associated with the boundary surface. It is common to talk about surface polarization charges, with surface charge density $\mathbf P\cdot \mathbf n$.
The term that you found Jackson removed is exactly the potential due to these surface polarization charges.
There are two ways to justify the removal.

If the boundary is entirely outside the polarized body, then the term is zero and can be removed without any change in value of potential.
But if the boundary is at least partially inside the polarized body, when the term is removed, the resulting expression is no longer what Jackson defined $\Phi$ to be, but a slightly different thing: it is the potential of all dipoles that have at least some charged part inside the boundary. A microscopic distinction, but with macroscopic difference in potential.

Personally, I think the most useful and clear case is the first one, where the potential is unambiguously potential of the whole polarized body and the microscopic distinction in the two ways of counting what belongs to the integral does not arise.


Who first used the term "alter Christus" to describe a priest?

Question: Who first used the term alter Christus ("another Christ") to describe an ordained (ministerial) priest?
Comment: According to Pope John Paul II, it is a part of Tradition: https://www.ewtn.com/catholicism/library/take-holy-pride-in-being-other-christs-8229
Comment: @PierreOriol Sure, but _who_?
Comment: Paul uses the wording υπερ χριστου in 2 Corinthians 5:20. 'we beseech you _in the stead of_ Christ ... ' (in the context of preaching and teaching).
Answer: EDITED TO ADD
Luis Miranda's Manuale Praelatorum Regularium (1612) explicitly calls a priest an alter Christus:

Nam licet Sacerdos secundum se, sit persona finita, non tamen illud offert in sua persona, sed in persona Christi, estque (ut sic loquamur) aequivalenter, quasi alter Christus, in repraesentatione Christi, qui est principalis offerens..."

Translation:

For although the Priest, in himself, is a finite person, he does not offer it [i.e. the Mass] in his own person, but in the person of Christ, and he is (so to speak) the same as if he were another Christ, in the representation of Christ, who is the principal offerant.

See also An exhortation given by the bishop of Freising (now: Munich and Freising) in 1694, in which the bishop references the fact that St. Francis (not an ordained priest) is often called an "alter Christus" and applies this term to ministerial priests: "...et ita sitis cum Francisco alter Christus."
I also found a book from 1854 with a reference to St. Bernard. The quote from Bernard (1090-1153), which is from De Consideratione, lib. II, c. 8, is close but not quite the same thing. He is speaking about the pope, not just any priest:

Quis es? Sacerdos magnus, summus Pontifex. Tu princeps episcoporum, tu hæres Apostolorum, tu primatu Abel, gubernatu Noe, patriarchatu Abraham, ordine Melchisedech, dignitate Aaron, auctoritate Moyses, judicatu Samuel, potestate Petrus, unctione Christus.

My quick translation:

Who are you? A great priest, the supreme Pontiff. You are the prince of the bishops, the heir of the Apostles. You are Abel by primacy, Noah by governance, Abraham by patriarchy, Melchisedech by order, Aaron by dignity, Moses by authority, Samuel by judgment, Peter by power, and Christ by anointing.

Original Answer
I take it that your question is about the first usage of these words, not this general meaning.
This seems to be surprisingly difficult to track down. Many scholars seem to be content with repeating what others have said without reference, e.g. in Tom Thott, "Sacerdotium - A Reconsideration" (1980):

It was inevitable that the president of the Eucharistic assembly should be associated in a special way with Christ, the one priest. This, incidentally, gives us the only correct understanding of the phrase sacerdos alter Christus, first used by Cyprian, and later taken up by Augustine.

The reference is to Cyprian's Epistle 59 and Augustine's De Civitate Dei XX.9.

I was unable to find anything close to this phrase in Cyprian (though John Paul II also cites Cyprian, but only as the originator of the idea of a Christian as "another Christ").

The Augustine quote (which I find in XX.10, though perhaps that is an issue with editions) is also quite different and never explicitly uses the phrase alter Christus:

Quod autem, cum dixisset: In istis secunda mors non habet potestatem, adiunxit atque ait: Sed erunt sacerdotes Dei et Christi et regnabunt cum eo mille annis: non utique de solis episcopis et presbyteris dictum est, qui proprie iam uocantur in ecclesia sacerdotes; sed sicut omnes christos dicimus propter mysticum chrisma, sic omnes sacerdotes, quoniam membra sunt unius sacerdotis; de quibus apostolus Petrus: Plebs, inquit, sancta, regale sacerdotium. Sane, licet breuiter atque transeunter, insinuauit esse Deum Christum dicendo: Sacerdotes Dei et Christi, hoc est Patris et Filii; quamuis propter formam serui sicut hominis filius, ita etiam sacerdos Christus effectus sit in aeternum secundum ordinem Melchisedech.

English translation from New Advent:

To the words, In them the second death has no power, are added the words, but they shall be priests of God and Christ, and shall reign with Him a thousand years; and this refers not to the bishops alone, and presbyters, who are now specially called priests in the Church; but as we call all believers Christians on account of the mystical chrism, so we call all priests because they are members of the one Priest. Of them the Apostle Peter says, A holy people, a royal priesthood. 1 Peter 2:9 Certainly he implied, though in a passing and incidental way, that Christ is God, saying priests of God and Christ, that is, of the Father and the Son, though it was in His servant-form and as Son of man that Christ was made a Priest for ever after the order of Melchisedec.

The most explicit treatment of this exact issue I can find is in the detailed historical background section of Antonio Aranda, "El cristiano «alter Christus, ipse Christus» en el pensamiento del Beato Josemaría Escrivá de Balaguer" (1994). After giving a review of the basic idea of "configuration with Christ" that is found in Scripture, Aranda gives an excellent review in pg. 525-28 of the patristic basis of calling Christians "christs." The numerous references don't seem to be specific to the ministerial priesthood, however.
Anti-Lutheran controversies led to an increasing emphasis on the ministerial priesthood (as opposed to the universal priesthood of all Christians). Nevertheless, the literal phrase "alter Christus" doesn't seem to appear until the 20th century.
Aranda summarizes his findings on pg. 533-34:

De la expresión recién citada, sacerdos alter Christus, tampoco se conoce su origen inmediato. Cuando la utiliza el magisterio contemporáneo parece tener un sabor tradicional. A decir verdad, en la tradición tampoco está literalmente presente, aunque sí lo esté, como venimos viendo, en cuanto al sentido. Hay que concluir con Gerardi que, no obstante las pistas que algunos señalan, la investigación no ha alcanzado resultados ciertos y seguros. En 1934 el
Cardenal Mercier la calificaba de «una especie de adagio teológico»,
con el que la tradición cristiana expresa su sentimiento sobre el
sacerdocio. Lo cierto es que, en esa fecha, quienes la habían utilizado en su literalidad eran principalmente los Papas Pio X, Benedicto XV y Pio XI; antes de ellos no parecen existir referencias ciertas. Quizá tampoco haya que buscar un origen literal inmediato fuera de esas fuentes.

My quick translation:

We also don't know the immediate origin of the phrase just cited, sacerdos alter Christus. When the contemporary magisterium uses it, it appears to have a traditional flavor. In truth, it is also not literally present in the tradition, although it certainly is, as we just saw, with regard to meaning. We must conclude with Gerardi that, despite the paths that some point out, the investigation has not reached any certain and safe results. In 1934, Cardinal Mercier described it as "a kind of theological adage" with which the Christian tradition expresses its feeling about the priesthood. One thing certain is that, at that time, those who had used it word-for-word were principally Popes Pius X, Benedict XV, and Pius XI; before then, there do not appear to be any certain references. Perhaps there is no need to search for an literal, immediate origin beyond those sources.
Answer: The earliest reference to Sacerdos alter Christus ("a priest [is] another Christ") I could find is in the proceedings of the Second Plenary Council of Baltimore (1866).
Acta et decreta Sacrorum Conciliorum recentiorum: Collectio Lacensis (t. 3) col. 371:

in the new law the Priest ascends to the altar, takes bread and wine, and as another Christ, by the words of consecration converts the their substances into the true body and blood of Christ, created by the lips of the almighty Son of God, indeed, by marvelous and divine power, when He said to his ministers: Do this in my commemoration.
novæ legis Sacerdos ascendit ad altare, sumit panem et vinum, et tanquam alter Christus, verbis consecrationis substantias illas in verum Christi corpus sanguinemque convertit, miranda quidem atque divina virtute a labiis omnipotentis Filii Dei creata, dum ipse suis ministris dixit: Hoc facite in meam commemorationem.

ibid. cols. 373-4:

[A priest] is another Christ, vowing himself to the salvation of souls like Christ Himself.
[Sacerdos] est alter Christus, se vovendi saluti animarum sicut Christus ipse.

A Priest of Christ is another Christ. He holds the place of Christ among men, and carries out His duty. As the Father sent me, I also send you. A Priest is selected by Christ and send to continue and perfect Christ's work, which is the salvation of souls.
Sacerdos Christi est alter Christus. Locum Christi inter homines tenet, et vices illius gerit. Sicut misit me Pater, et ego mitto vos. Sacerdos a Christo eligitur et mittitur ad continuandum et perficiendum opus Christi, quod est salus animarum.

Cdl. Henry Manning uses "Sacerdos alter Christus" in his excellent 1870 The Eternal Priesthood (8th ed.):
p. 163:

Friendship is not only unity of will, but a mutual goodwill each to each. Amicus alter ego. Sacerdos alter Christus. ["A friend is another self. A priest is another Christ."]

p. 211:

These five habits [spirit of penance, study of Holy Scripture, daily prayer, mental prayer, spirit of docility] will continually unfold the seven gifts [of the Holy Ghost] in our intellect and our will, and form in us the habit of mental obedience, the rationabile obsequium ["rational obeisance"], without which a priest cannot be alter Christus, or the likeness of his Master.
Comment: I'm curious why you accepted your own answer, given that I provided an earlier source (and recently updated with a much earlier source).
Comment: @brianpck I wish we were notified when answers are edited.


I am failing to delete a partition on a USB drive/stick

Question: I got a partition that is probably created by dd, and is about 200MB on a 4GB USB stick. I am failing to delete it using GParted (the option is greyed on the right-click menu).
Answer: Open a terminal
steve@mcr-pc-29334:~$ sudo fdisk  /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): d
Selected partition 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
steve@mcr-pc-29334:~$

so sudo fdisk /dev/sdb
then press d
to delete the partition if its the only one there it will auto select otherwise it will prompt for partition number
then press w
to write the changes to the disk
done :)
Answer: I think the reason the option was greyed out is because the stick wasn't actually unmounted. It's a bug in GParted because I unmounted it using its Unmount right-click menu option, and I didn't get a message saying the operation failed.
Answer: Try unmounting it from commandline: umount /dev/sdb1.
If you cannot delete it in any way, create a similar partition in a loopback device and dd it to that stick.
Then, you must install the programs to create a FAT32 partition again.
Answer: Sorry if this answer is too generic, but it applies to situations where partitions just won't delete - by deleting the partition table.  You might need this for those NTFS volumes that are locked or corrupted for example, or when MBR, VBR etc are corrupt or locking the filesystem.
This will destroy all* data so backup first. In Ubuntu close GParted and unmount the volume if possible, then type:
sudo dd if=/dev/zero of=/dev/[drive name] bs=512 count=4 status=progress

where:
[drive name] including brackets is the name of the drive that is locked,
bs=block size in bytes;
count=number of blocks to overwrite.  I only needed 4 blocks i.e. 2048 bytes in my case, you might need more;
status=progress is optional and displays progress of dd.
After I did this, the drive looked unformatted in gparted and I was able to create a partition table and new partitions.
*The remaining data will still be lingering on the drive though so you could write over the entire drive with zeros or /dev/urandom if you need to.
This situation arose for me because I'd been given a usb memory stick which claimed to be 16GB capacity but was actually 4GB and wasted much time backing up files, as it would corrupt anything stored past 4GB.  See F3probe https://askubuntu.com/questions/737473/check-real-size-of-usb-thumb-drive


How to make visual studio 2008 deploy to ftp in ACTIVE mode?

Question: I'm using Amazon EC2 services and would like to publish my WCF application to this server using the visual studio 2008. Instead of opening so many ports on the amazon firewall, I'll use the ftp ACTIVE mode which will need to open only two ports (20,21). Alas, visual studio 2008 is determine to use only PASSIVE ftp connection, why?!
Comment: BTW, as a workaround I use SMB to perform publishing.
Answer: FTP in active mode needs to open a connection back to you, and a lot of firewalls can't handle that. It certainly wouldn't fly in the corporate environment I work in. So passive mode tends to be easier to get working.
If VS has no option for changing this, I guess they went for the dumbed-down failsafe option. But I don't know VS, so I'm just guessing.
Comment: I managed to access my FTP by regular windows ftp CLI tool. The problem is with the VS that even have a check box for passive ftp mode, but for some reason it doesn't work...
Answer: It is not possible with VS 2008, I just did a workaround to use SMB to publish.


Struts2 parameters between actions

Question: I have to pass some parameter from an action to another action,for example to keep trace of an event.
What is the best way to do that?
I would not use session parameters. Thanks
Answer: Assuming you are serverside within one action and wishing to invoke another action with some parameters.
You can use the s:action tag to invoke another action, possibly with additional/other parameters than the original action:
    <s:action name="myAction"  ignoreContextParams="true" executeResult="true">
        <s:param name="foo" value="bar"/>
    </s:action>

You can also use a standard struts-xml result type with a parameter:
<result name="success" type="redirect" >
      <param name="location">foo.jsp?foo=${bar}</param>
      <param name="parse">true</param>
      <param name="encode">true</param>
 </result>

If you want a client side redirect you have to send an url back to the client with the proper parameters, and maybe use some javascript to go there.
        <s:url action="myAction" >
            <s:param name="foo" value="bar"/>
        </s:url>

Comment: I had a lot of trouble figuring this out:

does not work in Struts 188.8.131.52. After upgrading to Struts 2.2.1 everything is okay. Haven't found a note on that anywhere.
Answer:
   <s:url id="url" action="Logging">
      <s:param name="m_userNameInAction"><s:property value="m_userNameInForm"/></s:param>
    </s:url>
    <s:a href="%{url}">English</s:a>

Comment: sorry?? should I answer? please, don't spam lookin' for score.
Answer: Use url tag in the struts core tags, sample is given below:
                <s:url var="idurl" action="EditEnterprise">
                    <s:param name="enterpriseId">
                        <s:property value="enterpriseId" />
                    </s:param>
                </s:url>

Answer: Actually you are going to pass your one action parameter value from one action to another action.
simply include bean variable with same name. which parameter you are going to receive on action(receiver action).
<action name="ForwardAction" class="...">
       <result name="success" type="chain">ReceiverAction</result>
</action>

ForwardAction parameter will be forwarded to ReceiverAction. you can use it.
but include same bean name in both actions.
if you are going to receive userid in receiveaction means.,
This should be in both actions.,
private int userid;

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

public int getUserid(){
     return userid;
}

Answer: actually, the scope and servletConfig interceptor can be utilized in struts2, to automatic pop the action context parameters, (request/session, etc)

Struts2 parameters between actions


QGIS Web Client

Question: I've downloaded QGIS Web Client Package from this link.
I extracted the package, and copied it to (C:\OSGeo4W\apache\htdocs), and I can access the app using this URL (http://localhost/qgis-web-client-master/site/index.html).
In this page there is "Your Local Maps" sections which contains two maps:
HelloWorld (Projection WGS84/Pseudo Mercator - EPSG 3857)
NaturalEarth (Projection WGS84/Pseudo Mercator - EPSG 3857)
When I try to open these maps, I get a blank application that keeps loading the maps and no map loads (in the screenshot below)
I think that the problem is with the (home/web/qgis-web-client/projects/) directory in the maps links (http://localhost/qgis-web-client-master/site/qgiswebclient.html?map=/home/web/qgis-web-client/projects/helloworld.qgs)
I don't understand where is this path (home/web/qgis-web-client/projects/helloworld.qgs) or where to create it.
Comment: Welcome to gis.stackexchange! Please edit the title of your question to include enough information for future visitors to be able to find this thread when looking for the same problem.
Answer: I did manage to get the QGIS web client (QWC) working in windows, but I never managed to get it to work using the hello world or the naturalearth examples.
Some things to try:

I have my QWC running my qgis projects directly, and as a result I'm not able to use the per project configuration options as described in the QWC documentation. That means I'm not using index.html at all. The only control I have over options in my QWC is in the GlobalOptions.js file. Remember that many of the directions for setting up the QWC client are for linux, not windows. Thus, when you see a directory structure like /home/.... that's for linux, not windows. I've disabled the theme switcher option in GlobalOptions.js
I renamed the qgis-web-client folder as "web" and moved it into my apache htdocs folder.
Make a test myproject.qgs project in your desktop QGIS, and put one shapefile loaded into the project in the same directory as your qgs project. Remember to set the CRS of your qgs project as 3857, as described here at this post Then put those files into a folder in the projects sub-folders of "web".
This url works for me:
http://localhost/web/site/qgiswebclient.html?map=C:/OSGEO4W32/apache/htdocs/web/projects/myprojectfolder/myproject.qgs
Obviously I have my apache installed as a part of my OSGEO for windows installation, but I assume this should work wherever you have apache installed.
If I'm not mistaken, If you want the google maps baselayers to work (rather than the openlayers baselayers), your web pages must be publicly accessible - it won't work if your apache server is behind a firewall of your network. You can enable or disable google maps base layers in the GlobalOptions.js file.

While QWC will work in windows, I think it probably is meant to work more easily in linux. I recently set it up in a Ubuntu virtualbox virtual machine, and it was quite easy.

QGIS Web Client


How to deploy react client to azure from visual studio 2017

Question: I have one project with asp.net core server and another project (which one supposed to be nodejs for azure server, but I don't need server part) with my react (cra) app. I want to be able run npm install and npm run build every time before publishing. For now, I solve this problem by using post build action. But this runs only if files is out of date. Changes in folder with my react app is not enough for visual studio to rebuild. So i need to manually run rebuild every time I want to publish changes in my react app. Is there more correct way to publish react app separated from backend, from visual studio to folder on aws?
Answer: Follow the same as you were upload any other app is very simple.
https://learn.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-to-azure?view=vs-2017
Comment: But this i way it wouldn't run npm build and just will publish this as static files.
Answer: You could set up automatic deployment from a Github repo. I have it set up so that everytime I push code to the master-branch on my Github-repo it rebuilds my app and publishes it.
Here's a guide on how to do it: https://blog.github.com/2015-09-15-automating-code-deployment-with-github-and-azure/
If I'm honest, I find this approach to be easier than having to publish manually. Also, all I need is Git.


SIP call using C# and Objective-C

Question: I am planning to do a SIP video conferencing application that works on SIP protocol ,
between an iPhone client and C# server ?
Is that possible and is there example on C# server for handling SIP?
Answer: Yes http://sipsorcery.codeplex.com/.
Answer: Given that SIP is a network protocol, any SIP entities implemented in any language will be able to communicate. So your Objective-C and C# stacks will happily communicate with, say, a Delphi stack.

SIP call using C# and Objective-C


Can someone please explain the word problem (from group theory) in Calculus III layman's terms

Question: I'd appreciate it if someone could offer a schematic explanation of the word problem from group theory in terms which someone at a calculus III level (but without any background in group theory or abstract algebra) could understand.  If you are going to use "generators" in your explanation, please explain what a generator is.
Comment: it is like explaining the colors to the one who can not see. At least you should learn what group is and some basic defination in my opinion.
Comment: If you have no background at all in abstract algebra and group theory then I can't see how can a not-so-basic issue in group theory can be explained...
Comment: I gave a lengthy explanation of the word problem [here](http://math.stackexchange.com/questions/476972/theorems-with-the-greatest-impact-on-group-theory-as-a-whole/479311#479311).
Comment: It is a challenge to try and explain the algebra. In the case of [braid groups](http://en.wikipedia.org/wiki/Braid_group#Intuitive_description) a somewhat pictorial explanation is possible. Basically the word problem there asks that if you are given two sequences of elementary braid moves (these are the moves of crossing two adjacent braids), whether the resulting braids *look the same*. The catch is the some different sequences of moves do lead to identical braids, and you need to take that into account.
Answer: Consider a finite alphabet $\Sigma$, i.e. a finite set of letters. For every letter $x$, call $x'$ another letter (not yet in $\Sigma$) and let $\Pi$ denote $\Sigma \cup \{ x' \mid x \in \Sigma \}$, i.e. all letters with and without prime.
A word is just a finite sequence of letters in $\Pi$; the set of all words is denoted by $\Pi^*$. The empty word is also a word; it is written as $\epsilon$.
Now you're given a finite set of rules that allow you to change a word into another word. There are always rules that allows you to remove or add occurences of $xx'$ and $x'x$ (with $x \in \Sigma$) from a word. Furthermore, there is a finite set of rules $R$ that tells you that you can replace a certain subsequence of a word by another subsequence. That is, $R$ is a finite set of pairs $(s_1,s_2)$ with $s_1, s_2 \in \Pi^*$; it means that you can replace an occurence of $s_1$ by $s_2$ or visa versa.
The word problem is: given such a $\Sigma$,a set of rules $R$, is there an algorithm that takes as input two words $w_1$ and $w_2$, and decides whether or not it is possible to change $w_1$ into word $w_2$ by applying the rules?
Example. Consider the letters $a$ and $b$ (and $a'$ and $b'$) and the rules
$(aaaa,\epsilon)$, $(bb,\epsilon)$, $(b'ab,a')$. Then it is possible to transform $ab$ into $baaa$ (via $ab \to bb'ab \to ba' \to ba'aaaa \to baaa$), but it is not possible to transform $ab$ into $ba$.
(If you know some group theory, you'll recognize this as a presentation of the dihedral group $D_4$.)


How do I convert a NTFS partition to FAT32 safely?

Question: I am using Windows XP now. Is there any way to convert a NTFS partition to FAT32 safely? A simple solution that doesn't involve backing everything up would be better.
Answer: Here's my answer - don't do this at all, seriously, forget about it. If you had to I'd be tempted to just copy/backup-restore the data from one drive to another rather than risk all my data to a needless conversion. Either way don't do it.
Comment: I can't upvote this enough.
Comment: +1, There's no good reason to do this.
Comment: +1. There are ways to do it, but I wouldn't recommend them.
Answer: I'll get my harping on done first: no filesystem-wide operation like that should be performed without some reliable form of backup. Really. Seriously. How annoyed would you be if something went wrong and all that data was lost?
There is no way that I am aware of to convert from NTFS to FAT32 (or anything else for that matter) directly inplace. If the reason you want an inplace conversion is that you do not have another device with enough free space to copy the data onto then there is a way of converting in-place less directly but it is long winded:

Delete anything you really don't need to keep from the NTFS partition and clear the recycle bin - that may make the following take less steps.
Use a tool like gparted's live CD or Partition Magic (if that is still an available product? I've not heard much of it for a while) to resize the NTFS partition as small as possible.
Using the same tool, create a FAT32 partition in the space vacated by the now truncated NTFS one.
Move as much as you can from the NTFS partition to the FAT32 one as will fit.
Resize the NTFS partition to as small as it can go again (now you have freed some space by moving stuff to the new partition), or if it is now empty just remove it.
Move the FAT32 partition as close to the beginning of the disk as you can (i.e. so it starts at the end of the NTFS one if still there or the start of the disk) so it moves to the space vacated by the now shrunk/removed old partition and then resize it so it takes the now freed space towards the end of the disk.
Repeat steps 4, 5 and 6 until everything is moved to the new partition and the old one is gone.

I wouldn't actually recommend this though for a number of reasons:

It will take far longer than copying the data to a backup (or refreshing your existing backup - you do keep backups of your important data, don't you? (I know I said I'd finish harping at the top this answer, but I couldn't help myself - if your data is important then keep backups, if it isn't just delete it and stop worrying!)), reformatting the existing partition to the desired format and copying the data back.
There are many filesystem wide operations that could kill your data if something (human error, software failure, hardware failure, power cut, ...) goes wrong, so if you don't have good backups the operation is risky and if you do have good backups see my point above about the overall speed of the operation.
You might get half way through and discover something that won't copy (a file larger than 4Gb for instance) or that because of the inefficiencies of the FAT32 filesystem you data takes more space that way so there isn't actually room for it in that format. This is particularly problem for lots of small files: NTFS can store them in the directory structure where they waste very little space but in FAT32 they must have a block to themselves so a 10 byte file will effectively take a couple of tens of bytes under NTFS but up 32,768 under FAT32 (for filesystems above 32Gb in size FAT32 uses 32Kbyte allocation blocks). The lack of granularity in FAT32's space allocation method leads to much wasted space for lots of files whether they are small or not: each file will wast on average 16Kbyte on a large FAT32 filesystem but 2Kbyte on a similarly sized NTFS one - see here for more information on cluster sizes for the various MS fileystems.
This definitely will not work, at least without some extra jiggery-pokery, for system partitions.
Comment: +1 for mentioning how it can be done, *and* why it should not be done
Answer: Generally, this doesn't work, because FAT32 has a lower limit on file size and overall filesystem size.
Answer: Partition Magic 8 and later can apparently do it, though I've never tried.
Regardless I would suggest that doing this without a full (tested) backup is foolhardy, any time you're changing the file system there's always a risk you'll end up losing everything.  If your power fails during the conversion you've lost everything, if the computer crashes you've lost everything, etc.
Answer: Microsoft CONVERT utility is a one way trip.
You could backup your data and restore on a FAT32 partitition or create a FAR32 partition and XCOPY/ROBOCOPY the files.
The good old Partition Magic did the NTFS->FAT conversion.
Comment: He means **one-way trip**


link ajax response to smarty variables

Question: I'm using smarty to separate the presentation from the business logic.
I have a form which contains a select box , an input text field(text to search for) and a button (search). Wen I click on the button I want to show the contacts array from my database without reloading my page again. So that I thought to use Ajax. But when using ajax within smarty, I have had major headaches with it the last few days...
Smarty is only used when the page is actually loading (or reloaded), but not when an ajax request with jQuery (or other js frameworks) is answered so that I can't use ajax to send smarty variable to my form.
Is there any way to link smarty with ajax so that I can show the contacts array into an html table?
Can you help me to find a way  to show the list of my contacts after the searching on my page?
Answer: Smarty is a php library and therefore cannot work on the client side.
If you want Smarty to parse some variables you will need to setup and parse a page before sending it as the response to the AJAX call and then have Javascript replace the html with the new code.

link ajax response to smarty variables


Not sure where to post a question about finding a mentor

Question: I am a college student looking for a mentor and I am not sure how I should go about doing it. I want to post this question but I do not know where to post it or even if this is the right forum for this question.
Comment: Maybe in chat somewhere?
Comment: A minor nitpick: The SO/SE network of sites is made up of Q&A sites and not forums. An important difference regarding the content that will fit on the various sites.
Comment: @Bart, so is my question more for a forum? If so, do you have any suggestions for where to post it?
Comment: No, that's not what I meant and I honestly can't suggest anything beyond what @blahdiblah has already stated. You just used the word "forum" in your question. That's all I was hinting at in my off-topic remark.
Comment: Hi Emily! Welcome to Stack Overflow. As Some Helpful Commenter has pointed out below, there are a number of sites in the Stack Exchange network that might suit your needs. I hope you take a few moments to check them out, they're good sites with the same values as Stack Overflow. :)
Comment: try http://workplace.stackexchange.com/questions
Answer: This is not the place.
I'd recommend finding a local hackerspace or asking your professors if they have any advice about where/how to look.
Comment: Technically, this answer is incorrect. She was wondering which site might be best for her to ask a question about mentorship. Telling her that she should ask in Analog Life is good advice, but also ignores the number of other sites ([academia.se], [workplace.se], etc.) where she could ask her questions. Just a little nitpick. :)
Comment: Thank you, I will take my question elsewhere :D
Answer: If you were a graduate student I'd recommend academia.stackexchange.com since they do have 6 questions tagged mentoring.
If your were an entrepreneur I'd recommend answers.onstartups which has 20 questions tagged mentor
If you were looking for mentoring in the workplace I'd suggest workplace.stackexchange.com but they don't have any mentoring questions yet.
That said before asking a question on any of these be sure to visit the the site faq to make sure that you are in the right place before you do post.


How can I make class into an array?

Question: I was searcing for some information, and I found a method like this:
public partial class Customer {
    private string customerIDField;

    private string companyNameField;

    private string contactNameField;

    private string contactTitleField;

    private string addressField;

    private string cityField;

    private string regionField;

    private string postalCodeField;

    private string countryField;

    private string phoneField;

    private string faxField;
    // Other properties
}

Then the coder used this class like this.  How?
private static Model.Customer[] BuildCustomers(SqlDataReader reader)
{
    if (reader.HasRows)
    {
        List<Model.Customer> custs = new List<Model.Customer>();
        while (reader.Read())
        {
            Model.Customer cust = new Model.Customer();
            cust.CustomerID = reader["CustomerID"].ToString();
            cust.CompanyName = reader["CompanyName"].ToString();
            cust.ContactName = reader["ContactName"].ToString();
            custs.Add(cust);
        }
        return custs.ToArray();
    }
    return null;
}

I really want to learn how this coder uses "Customer -----> Model.Customer[] ". Is there any method that does this?
Answer: Are you asking how to convert a Customer object in to an array?
There are a couple of ways to do it - the example you showed in the second piece of code built up a List by adding Customers, then converted the List to an array. This works well when you do not know how many customers you have, you keep adding to the list and create and array at the end and the array will be the correct size.
If you just have one customer object you could also create an array called customers with one element and add a customer object to it like this:
Model.Customer[] customers = new Model.Customer[1];
customers[0] = customer;

or, an even shorter way:
Model.Customer[] customers = new Model.Customer[] {customer};

Answer: Is your confusion over how the method is returning an array?
It's just using List<T>.ToArray(). The list is built up one customer at a time, and then ToArray() is called at the end.
Answer: Like Jason says, you're just returning an array of Model.Customers from the List<Model.Customer>.  It is possible to access a class like an array, and that's to use an indexer.
for example:
class Foo
{
     public string this [int index]
     {
          get { return new string; }
     }
}

This is then used like this:
Foo foo = new Foo();
string s = foo[0];

Obviously you would want to do something to make Foo return some values depending on index, but that's the basic way to do it.
Comment: I don't understand your question.  What do you mean by a "spot answer"?
Answer: I not sure what you would like to do here.
Do you want an Array of Customer? Or do you want to access the properties in Customer Class using an array type syntax?
to go through the code sample (2nd one)
the code makes an List of Customer,
creates a single customer which is populated via a DataReader (this repersents the Database data, which allows access via its column index or name)
the new cusomter is added to the List of customers
finally the List is converted into an Array (as its a List (Generic) it supports the conversion to a Customer[] with out the need of casting).
HTH
Bones

How can I make class into an array?


Secured Store Upgrade - no target applications migrated - any help?

Question: I am upgrading 2013 to 2016, copied Secured store DB and Created Secured store connecting it to the DB with passphrase, but after all done the target applications, are missing, any help would be appreciated.
Answer: The first problem was the Update-SPSecureStoreApplicationServerKey : Master secret key is not present in the database.
I used script to change the key from link:
SharePoint 2016 - Secure Store - MasterKey cannot be set! Problem Solved.
That worked , except no target Applications got transferred.
Deleting App with data, re-importing DB and recreating SS App with PS from
https://docs.microsoft.com/en-us/sharepoint/upgrade-and-update/upgrade-service-applications-to-sharepoint-server-2016
Solved the peroblem.


"In the event of failure, the candidate will be asked to withdraw from the Graduate Program.", How is it different from being fired?

Question: This is from a document explaining the procedure for the comprehensive exam for entering the Ph.D. candidacy at my school. It mentions that the potential candidate should withdraw from the Ph.D. program if they do not pass the comprehensive exam. My question is: What would be the consequences if the potential candidate simply refuses to withdraw? They would be fired, right? Is there any benefit in withdrawing from the program compared to just doing your research and waiting to be fired? Or, it is just the usage of polite language and beating around the bush in this document?
For reference, this is about a university in Canada.
Comment: You aren't an employee, you are a student. The effects are the same though.
Comment: What country are you in? The language connotations differ...
Comment: "Is there any benefit in withdrawing from the program" - besides not having tuition due?
Comment: I edited. thanks.
Comment: In British English "fired" would indicate the termination of a contract of employment it would not be used for a pupil in an academic setting.
Answer: When you withdraw from the program, you can tell people later (in a job interview, social situation etc) that you "decided to withdraw from the program".
If you are fired you will have the option of either lying (with possible bad consequences if the lie is found out) or telling people "I was fired".
Which of those sounds better?
Comment: great answers in this thread but this seems the most sensible reason for the student to do that/ for the program of offer such an option.Thanks
Answer: In the U.S., and to the extent I understand it, in Canada, funding is slightly and significantly separate from "being allowed to hang around, register for classes, etc.".
Of course, in many STEM fields, the usual expectation is that one _is_funded_ including tuition paid, so long as one is "in good standing" in the grad program. That means passing exams on schedule, doing whatever is prescribed.
Failing qualifying exams (if no repeats are allowed) surely puts one "not in good standing". Almost certainly this would entail loss of funding, and loss of tuition coverage. (Loss of teaching assistant or research assistant jobs, too.)
It might not immediately disqualify you from registering for classes, or from continuing in the graduate program... However, if the program requires that you (eventually?) pass the qualifying exam, and you're not allowed any further attempts after failing... success is impossible.
If the latter is your situation, you probably won't be escorted out of the building by security, but at some point you'll get no more pay, you'll be asked to vacate any office space, and have to pay to register, at best.
The only possible interesting thing is to inquire of your program how to get reinstated... or to be supported by them in trying to move to a lower-tier program that might be happier with you.
Comment: They have never once stated that they failed such an exam. They are *only* wondering out of curiosity why it is phrased this way. Why are you advising the asker to switch programs?
Comment: @user64742, I am only speaking exactly of the hypothetical, as an explanation of why it is phrased this way.
Answer: In some places, doctoral students aren't actually employees though they have some other position, such as a TA, which can be a separate thing. Your relationship to the university is "student", not "employee". In such systems what you suggest makes perfect sense. You can no longer enroll in courses if you fail comps. Normally a TA job also disappears since student status may be required to hold it, but that would be, administratively and legally, a different thing.
But if you fail comprehensive/qualifying exams, you won't be welcome, generally. You will get no benefit for "hanging around" and there is no path to a degree at that institution.
Some places you get more than one chance to pass, say twice.
In other places, doctoral students are employees of the university or a lab, and in such situations failing and being fired are about the same.
Answer: I imagine the details vary by institution, but the ones (in Canada and US) I am familiar with -

Formally, to register each semester/quarter/whatever, you need to be "in good standing" according to your department. If you are not, you cannot register.
If you have scholarship and/or grant-type funding, this is released contingent on you being registered and "in good standing" (or a similar condition)
If you have funding based on TA duties (or similar), the precise conditions of your contract may vary, but I'd be surprised if any contract you have would be for more than one academic year, potentially even one term, and your institution would just not renew it with you.
If you are funded through student loans, they will require confirmation that you are in good standing.

Therefore, if your department encourages you to withdraw, and you do not -- and don't persuade them to keep you in -- you will find yourself unable to register, and without funding.
Now in general, threats to take comprehensives etc seriously aside, departments don't actually want to push people out the door. If you have generally been making decent progress and something blows up, In my experience, they will work with you to buy you time, retake something, defer some deadline via accommodation/exception, etc. However, this has 3 important limitations.

They don't have to do this, and it depends on specific people personally championing you to suss out how to make it happen and influencing bureaucrats to make it happen. So don't treat it as an entitlement.
The dropout rate in graduate programs is appallingly high. This is not the place to discuss why and what should be done about this, but many people who drop out just aren't progressing at an adequate speed, from faculty's perception through insufficient creativity/imagination in the field (just not suited to it, regardless of how nice people they may be) and/or insufficient self-motivation and/or work ethic to make progress fast enough.  A number of these seem to perpetually be overoptimistic about their ability to turn things around, and so for better or worse it's rules on progress deadlines or crucial pass/fails that end up pushing them out, with faculty members breathing a sigh of relief since they can't actually see that person succeeding in the end anyway (whether correctly or not). So expect exceptions only if your failure or running out the clock is an uncharacteristic blip and you have a bunch of supporters who will argue that this blip aside, you are making great progress and show every sign of being a successful finisher.
If you do somehow stop the clock, or go away and work on something, AND successfully get reinstated later, of course you won't get financial support while you're "away", and you may well be required to retroactively register and pay full or partial tuition while you were "away" on your return. Depends on the institution, and is unfair (since you were not benefiting while away), but be prepared for it.

Not trying to be harsh here, just honest. Fully recognize that crucial junctures like comprehensives create a lot of worry and catastrophising. Hopefully that's all it is, and you'll do fine.
Answer: My institution (also in Canada) has similar wording but in the context of having a non-satisfactory grade on a required course, "the student is strongly recommended to withdraw from the graduate program". I spoke to my supervisor about this (same question as you) and in this context the reasoning is that you technically won't be eligible to graduate, but your supervisor can make a case for why you should be allowed to graduate despite the grades.
I'd assume that the reasoning is the same in your case. But I recommend that you speak to your supervisor/a department head about this. It should be an easy question to answer and it can likely vary by institution/department.