SharePoint 2010: Copy the data on 'Name' column to 'Title' column for existing documents

Question: I have a document library and I need to  copy the data on 'Name' column to 'Title' column. Be noted that the existing documents have already an existing data on the 'Title' column and I needed to update it so that it will be similar to 'Name' column.
Your help is greatly appreciated.
Answer: you can write a powershell script to update the Title Column with the values from the Name Column by looping through all items
Comment: Ca you please give me a sample code on how to do that in powershell? I haven't used it before. Thanks!
Answer: You can write a worfklow in Sharepoint Designer, which triggered if the item modifies. Make an extra Yes/No field, and a datasheet field, which has only a few columns (including the new Y/N, of course :-) ) and has many rows. You can easily modify a plenty of items with this Y/N field. My experience: 100 items/pages works enough fast, and even 5000 item can modify within an hour (depends on the server performance and your bandwidth),


How to keep session in android?

Question: My app android have connect to webservice (.asmx) use ksoap2. But it has session. When i login service will keep session to manage user - client. But when i login success, session in webservice is keeping null? Can some body tell me why?
Answer: Android is not able to define sessions, as it is a feature of web browsers. The simplest solution we had come up with was to send the sessionID of the web session along with the URL, for e.g.: http://your.required.url/your.context/your.action;jsessionid=<the_current_session_id>?GET=PARAMETERS

How to keep session in android?


What are the advantages of iTRAQ/TMT technology over electrophoresis?

Question: I'm currently working on the paper regarding proteomics research. I've listed a lot of questions that freshmen may have during their study. Can anyone explain (based on your experience in the lab) the advantages and disadvantages of iTRAQ/TMT technology and electrophoresis? Which technique is better?
Answer: I believe this paper can answer your question: Q&As About Proteomics (Q1-Q5). It says that 2-DGE is a protein separation technology developed along with MALDI-TOF technology. In theory, the total protein can be separated one by one with the difference of isoelectric point (IEF) and molecular weight (SDS-PAGE). The actual situation is not that ideal, because the low-abundance protein cannot be successfully stained and seen, and the protein is deviated from the theoretical position after post-translational modification. A 2-DGE can identify a total of 1000–2000 proteins. Compared to electrophoresis-based techniques such as 2-DE and DIGE, iTRAQ/TMT has a high resolution. MtoZ Biolabs found 6,000 proteins at most in the cell samples it has treated, most of which have quantitative and qualitative information. Moreover, its iTRAQ has high flux and can complete up to 8 samples at a time. If TMT technology is used, it can complete up to 10 samples at a time, which is especially suitable for simultaneous comparison between multiple samples and dynamic detection of biological processes.


Short circuit in oven didn't trip breaker?

Question: Well I went and did a dumb thing. Noticed the heating element in my oven wasn't working. So I removed it and wanted to test the connectors for power, to see if the problem was there. Accidentally must've gone to ground somewhere, because I got a lot of sparks, a little fire (quickly extinguished by the insulation in the oven cavity), and more sparks. I pulled out the probes just as the stove shut off. Figured the breaker tripped, but when I checked it at the box it hadn't. I turned it off manually. I cleaned everything off, made sure the connectors were separated, and turned the breaker back on, and the stove worked. (At least, the clock.) Now I know this was stupid, and I've learned my lesson. (The power is off. And I'll leave the rest of this oven repair to a pro.) But now I'm wondering: why didn't the breaker trip? Could the breaker be faulty?
Comment: Then the odds of it being a faulty breaker are quite low. The odds that it was less than 40A worth of arc are fairly high.
Comment: What's the brand-name of the breaker panel? There are a few that are known to be prone to failing to trip and where the panel should be replaced before it burns your house down - Zinsco, Federal Pacific Stablok are two of them - but 50A at 240V is a LOT of power, and I've seen my failed oven element arc and build a minor volcano on itself without bothering a good breaker.
Answer: It takes a lot of load, sustained for a period of time, to trip a 50A breaker. It takes much less current to make sparks. It's unlikely that you have a bad breaker. Generally, if they're going to fail they fail open or trip more easily than they should.
So the only answer with certainty is "yes", but it's not likely.

Short circuit in oven didn’t trip breaker?


How can I remove the cap from my chlorine feeder?

Question: Chlorine feeder cap broke while attempting to remove it. Pool had been shut off for 2 weeks. It feels like there is a vacuum inside the feeder. I used a 2x4 across the cap fins for leverage, but one fin broke off. I also broke the PVC fittings connected to the feeder. Cap didn't come off yet. How do I get rid of the suction? I tried everything I read on this post so far.
Comment: Post some pics please. If you broke PVC fittings leading to this unit, and the pump equipment is shut down completely, then you could not have a vacuum.
Comment: possible duplicate of [How do I fix a chlorine feeder that's nearly impossible to open?](http://diy.stackexchange.com/questions/7312/how-do-i-fix-a-chlorine-feeder-thats-nearly-impossible-to-open)
Answer: I found one answer to my own question today. Although I still don't know why the cap was so tight I managed to remove it. At first I used a 2x4 across the cap top and a rubber strap wrench to hold the feeder from turning. But I broke all 4 cap fins plus the pvc fittings which were connected to the feeder.  Then I removed the feeder and placed it in a vise on my work bench. That made me nervous as I was trying not to crack the feeder body. But the cap came off with a strap wrench, finally.  I am still curious to know why the cap was so tight. It felt like a vacuum even after I loosed a bleeder on top of my cartridge filter, I loosened the basket lid on my pool pump, and I removed the broken pvc fittings and any plug I could find on the feeder. The cap was always tight for 12 years but never like this time. Go figure.
Comment: I'd like to thank Jimmy Fix it for his post. Yes, I agree that I should not have a vacuum with all the stuff I disconnected. So, what would make the cap more stubborn this time than the last 12 years?


Do free-trade agreements typically include clauses relating to services?

Question: Do free-trade agreements typically include clauses relating to services?
For example, reciprocal recognition of professional qualifications.
Answer: The simplest answer is: some do, some don't.
Trade in goods and trade in services are dealt with quite separately, so structurally, you wouldn't find a couple of clauses on services within an FTA.  You would generally find a chapter on goods and (possibly) another on services, reflecting the division in the WTO between the GATT (goods) and the GATS (services).
Quantitatively, there is a roughly equal split between goods-only agreements and agreements that cover both (153 for goods only and 154 combined agreements have been notified to the WTO as of December 2018).
You also often find a group of countries negotiating a goods-only FTA first, then extending to cover services later on (for example by adding a protocol to an existing treaty).  This reflects the fact that an integrated services market is usually seen as a "deeper" form of integration than tariff-free trade.
Answer: No, but there is a proposed free trade in services agreement on the table, but reciprocal recognition of licenses isn't intrinsically part of it.  However, it does have a provision that once a trade barrier is dropped, it can never be reintroduced in some form.  So, for example, a Canadian physician cannot practice in the US and vice versa automatically, but under the proposed treaty, if the two nations acknowledged the validity of each other's licenses, then they could never reverse that decision.
Comment: Ben has asked about free-trade agreements in general, but you seem to have answered about one in particular.
Comment: My answer, in general, is no.


Converting Deterministic Finite Automata to Regular Expression

Question: I am reading Michael Sipser's "Theory of Computation". In one of the proofs he talks about converting "DFA to Regular Expression" and he talks about "GNFAs". I understand one method of converting DFA to Regular Expression that is using Arden's Theorem. I assume GNFA is a medium between DFA and Regular Expression. Can someone explain the GNFA method? and also would i be okay not knowing it and only knowing the Arden Theorem method?
Comment: The GNFA is a finite automaton with regular expressions along the edges, instead of single symbols. On this site a summary is given under the name [state removal](https://cs.stackexchange.com/a/2389/4287) method. This method is mostly equivalent to that of Arden, but I like the graphic notation of the relevant languages between states. You probably should not ask us about which method to study, but rather your instructor, if you have one.
Comment: @HendrikJan Thank You for the link, i should have been clear in the op. What i meant was " is the result of GNFA and Arden method same", which i learned it is from your comment and the link

Thank you again :)
Comment: Thanks for the clarification. I have added a reference that explicitly compares methods for transforming automata into expressions in a new answer.
Answer: Jacques Sakarovitch studies the outcome of the various algorithms.
See his paper The Language, the Expression, and the (Small) Automaton (CIAA 2005. LNCS 3845), where some results are summarized that are obtained in his book on automata theory. https://doi.org/10.1007/11605157_2
First one should note that the expression (and its size) highly depends on the order of handling the nodes, and not on the method.
When following strict methods (no additional tricks and shortcuts) the results seem syntactically equal. As far as I understand this result (from the paper) compares state elimination and Arden's solving equations.

Proposition 1. The state elimination method and the solution (by
Gaussian elimination) of a system of linear equations taken from an
automaton give the same regular expression (assuming that the same
order in elimination is used in both cases).
Comment: Perfect, This is what i wanted to know :)

Appreciate it


How do I remove the cistern lid that has been grouted in?

Question: My tiler grouted the cistern lid against the wall a few months back. Only realized when the toilet started leaking and I couldn't open it. What is the best way to get rid of the grout and try and release the cistern from the wall? I'm hoping there's no more cement behind the grout...
Comment: Could you provide a photo your life type is different than the type normally used on this side of the pond I believe.
Comment: Call the tiler and point out the problem they caused, and request that they fix it, at their expense.
Comment: I'm guessing that there's a corresponding hole in the tile on the wall. Not good. That said, you should've had the tile removed for that job.
Answer: Yikes. That was a really bad idea on his part.
The first thing I would try is a grout saw. It's designed to grind the grout out without damaging the tile. Hopefully grout is your only obstacle.
If the tiles immediately above the tank are insurmountable, your next job will be to try and remove them. They are partial tiles and hopefully you can remove them by sawing the grout out and prying them up (they will probably break in doing so). Once the tiles are out, hopefully that solves the problem.
Answer: You can also try using a nail set or narrow punch to tap the grout loose. This is the quick way to remove/break the grout joint. Keep punch centered on grout and use gentle soft hammer taps.
Most likely some of the lid is covered by grout so keep the punch at a shallow angle (20-30 degrees).
Once the grout is loosened try to lift the lid. If it can be moved even slightly keep working it until the grout crumbles.
It may be safer to use a section of wood cut to a blunt point as a chisel. This will not chip the porcelain as easily as a metal tool would.


UIWebView and local css file

Question: I want to style a web page meant for the desktop so that it is presentable on a UIWebView on iPhone. I do not have access to the web server from which the pages originate. I would like to do this by changing the href attribute of the <link> stylesheet element programmatically.
I do the following with my IBOutlet UIWebView *webView.
NSString *cssPath = [[NSBundle mainBundle] pathForResource:@"MyStyleSheet"
                                                    ofType:@"css"];
NSString *js = @"document.getElementsByTagName('link').setAttribute('href','";
NSString *js2 = [js stringByAppendingString:cssPath];
NSString *finalJS = [js2 stringByAppendingString:@"');"];

//check element structure
NSString *res = [webView stringByEvaluatingJavaScriptFromString:finalJS];

This does not work. Using the [webView stringByEvaluatingJavaScriptFromString:] message and making a change to the backgroundColor of the body does indeed work - done as an exercise to see if I was using the call correctly.
Am I barking up the wrong tree?
Answer: You can load CSS from local project directory
NSString *path = [[NSBundle mainBundle] bundlePath];
NSURL *baseURL = [NSURL fileURLWithPath:path];
[webView loadHTMLString:htmlString baseURL:baseURL];

detail info check this site :
http://iphoneincubator.com/blog/windows-views/uiwebview-revisited
Comment: The css file is loaded by a declaration in the html header - like this: `` Then you need to set the `baseURL` to the directory where the `default.css` file can be found.
Answer: Unfortunately UIWebView doesn't provide an API for intercepting and modifying the requests that it makes while loading a resource. This means that any approach you try will be hack-ish to a certain extent.
The first approach I would try is:

Provide your own UIWebViewDelegate delegate on the view.
Implement -webView:shouldStartLoadWithRequest:navigationType: and return NO when you spot the CSS requests being made.
Once the view has finished loading the main resource, use -stringByEvaluatingJavaScriptFromString: to inject JavaScript into the page that dynamically loads/sets the stylesheet that you want to use.

In the JavaScript I would create an entirely new <link> element/node on the document instead of trying to modify the existing one.
Comment: I don't think that `-webView:shouldStartLoadWithRequest:navigationType:` will be called when loading a css resource.
Answer: Your code should work, if you choose index 0 of the found elements:
    NSString *js = @"document.getElementsByTagName('link')[0].setAttribute('href','";
    NSString *js2 = [js stringByAppendingString:cssPath];
    NSString *finalJS = [js2 stringByAppendingString:@"');"];
    [webview stringByEvaluatingJavaScriptFromString:finalJS];

You missed [0]
Answer: SWIFT 3
If you (like me) only use a html snippet (not a complete web page) you need to add your local css file in the header of the html snippet.
I therefore define a html header like this:
let htmlHeader = " \n  \n <link href=\"default.css\" rel=\"stylesheet\" type=\"text/css\" /> \n  \n  \n"

and a footer like this:
let htmlFooter = " \n "

Then find the baseURL for the css like this:
let baseURLForCss = Bundle.main.url(forResource: "default", withExtension: "css")

And load the html snippet with your own css like this:
webView.loadHTMLString(String.init(format: "%@%@&@", htmlHeader, htmlSnippet, htmlFooter), baseURL: baseURLForCss)

UIWebView and local css file


Moving chain data to a new hard drive

Question: I'm running a node and my existing hard drive is running out of space. If I install a new hard drive, how do I move or point the node data to use my new hard drive instead?
Answer: You have 3 ways to do this
1) create a symlink from the previous location to the new location of the data directory. This way no change to your workflow is necessary
2) alternatively you can use the option <code>-d</code> of the tezos node to point to the new data directory location
3) as suggested in the comments you can also mount the new disk at the old point after having synced all the data if your goal is to litterally swap disks and not keep the old one mounted at the old location.
For more details you can consult the official doc
http://tezos.gitlab.io/mainnet/api/cli-commands.html
Comment: Indeed,
./tezos-node run --help shows us --data-dir=DIR The directory where the Tezos node will store all its data. Resulting in a command like:
./tezos-node run --rpc-addr 127.0.0.1 --data-dir //.tezos-node

Moving chain data to a new hard drive


Default MenuItem TopLevelHeader Control Template

Question: Where can I get the MenuItem TopLevelHeader Control Template? The MSDN link for styling menu items gives a modified template.

I need to obtain a control template that contains a default pop-up/context menu.
Answer: Manny tools are available that will serve the purpose like stylesnooper and Show Me The Template
but if you have Microsoft Expression Blend you can extract the default control template by

Draggint the control onto the design
surface
Right click the control and choose
Edit Template -> Edit Copy

When you do this, Blend will extract the base template from the control and explicitly declare it within document/application as a resource which you can then edit to your liking.
Check this for more
http://www.shafqatahmed.com/2009/01/wpf-kid-stuff-extracting-a-control-template.html
Answer: I could not get Blend or the usual tools to access that control template but you can extract it yourself with code like the following:
<code>var controlTemplate = (ControlTemplate)FindResource(MenuItem.TopLevelHeaderTemplateKey);
var sb = new StringBuilder();
var xml = XmlWriter.Create(sb, new XmlWriterSettings { Indent = true, NewLineOnAttributes = true });
XamlWriter.Save(controlTemplate, xml);
var xaml = sb.ToString();
Debug.WriteLine(xaml);
</code>
The output is too long to include here.


Where can I get full audio cockpit recordings of all four flights involved in the 9/11 attacks?

Question: First of all, this is a question specifically asking about the September 11th, 2001 attacks. It is not focused on NTSB or other accident investigations in other countries. If you think it is, please explain your reason.
I have always been curious to know how people reacted to that terrible day, and if I remember correctly, there was a thirty-one-minute recording from flight 93 that started with someone saying there was a bomb on board up until the crash.
I guess the main reason I am so focused on sound is because of something I am going to explain to you all. I am a totally-blind user who uses screen reader technology and accessible web sites to brows. Since I cannot obtain visual information and expressions, my next source of information is how things sound. It is frustrating to not have this information. Someone could tell you that this or that happened, and it looked horrific, but if you can't see it, how do you know? Maybe some people would say that it was a blessing that you didn't have to see such things, but still, I feel like I'm missing out on something. Sounds of horror, of grief, all of those can be just as traumatising to hear as one would see an image. I have spent numerous hours on YouTube, trying to find stuff to add to my audio memorabilia of 9/11, because as we move through history, I want people of the future to know how everything played out from beginning to end, what people endured, how many people were killed, hurt, and willing to risk their lives to help rid the bad guys. Most importantly, I want them to experience all of this without the ability to see what's going on. If you can hear the recordings, you should be able to make pictures based on all of your senses, and you'll be able to make appropriate emotional responses.
Also, a friend of mine inspired me to do all of this because she had a former acquaintance of hers, who is no longer her friend tell her that 9/11 never happened, that it was all a conspiracy. So I vowed to help her out by obtaining as much proof as I could by making a file containing as many audio recordings detailing the events of that day.
I have heard that the NTSB is exempt from releasing these audio recordings even with the FOIA, but I believe that if you can approach an attorney, you can circumvent this exemption by claiming that such recordings must be available for historic reasons. I don't know if they will release it twenty-five years later, fifty years, seventy-five, or a hundred years from now.
And yes, there has been evidence of CVR recordings being leaked into the public, which is like finding a rare piece of jewellery since they are scarce.
Comment: Most likely what you have heard is not the CVR recordings, but recordings of several telephone calls made from the aircraft. One of the flight attendants on AA flight 11 made an Airphone call to American Airlines operations. There were also a few calls made on cell phones from flight 93. These recordings are available but not the CVR
Comment: Your question has been answered: it would be ***illegal*** to release CVR audio. End of story. FOIA and "historical significance"  and all else don't trump the explicit Federal law. True, that law has, in very rare occasions, been violated in the past, but the audio from 911 remains secure. Which is as it should be.
Comment: Additional stumbling block: for two of the planes (AA11, UA175), the CVRs were never recovered (neither were those planes' FDRs, for that matter), and were presumably destroyed by impact forces and/or the intense, prolonged postcrash fire, while for a third (AA77), the CVR was recovered, but the recorder had been broken open by impact forces and the recording medium destroyed by fire ([see for yourself](https://en.wikipedia.org/wiki/File:Flight_77_CVR.jpg)), meaning that obtaining audio recordings from those three CVRs would be _literally impossible_ even if it were legal to do so.
Answer: The short answer: you can't. Federal law prohibits the release of CVR audio, though transcribed excerpts (if they are relevant to the investigation) are made publicly available once the accident report is released.
See 49 USC 1114(c):

Cockpit Recordings and Transcripts.—(1) The Board may not disclose
  publicly any part of a cockpit voice or video recorder recording or
  transcript of oral communications by and between flight crew members
  and ground stations related to an accident or incident investigated by
  the Board. However, the Board shall make public any part of a
  transcript or any written depiction of visual information the Board
  decides is relevant to the accident or incident— (A) if the Board
  holds a public hearing on the accident or incident, at the time of the
  hearing; or (B) if the Board does not hold a public hearing, at the
  time a majority of the other factual reports on the accident or
  incident are placed in the public docket.


Most effective instant access savings for a child - UK

Question: We have a maxed out stocks and shares ISA for our baby - what is the most effective non-term limited account that can be in her name? We're thinking it will be useful for birthday parties, clothes etc. Most of the payments will be on an ad-hoc basis from gifts etc.
Comment: http://www.moneysavingexpert.com/savings/child-savings-tax-free
Comment: What do you mean by 'effective' ?
Comment: Hmmm...I guess I mean tax effective, easy to open & access, and (if possible), good rates of interest.
Answer: Just get the child whatever deposit account you can find. There won't be any tax on the interest unless:

there is more than £100/year of interest on money that came from you (her parents), as opposed to grandparents, friends, other relatives etc.
there is more than the personal allowance (>£10K/year) of any interest

If you're just saving for parties, clothes etc it's unlikely you'll hit either limit.
https://www.gov.uk/savings-for-children


Git doesn't seem to want to keep local refs to origin/master

Question: First: apologies for the question title, I don't actually know what the problem is so I don't know how to ask about it.
I want to diff my master with upstream master (should be origin/master, based on the way my remotes are set up).
But: origin was put there after I had been working on it locally for a while, so it's "origin" in name only. That is: I had a local repo, put it up into a gitolite setup, and then told my local git to call it origin.
These are the symptoms:
$ git diff master orgin/master
fatal: ambiguous argument 'orgin/master': unknown revision or path not in the working tree.

$ git diff master origin/master --
fatal: bad revision 'origin/master'

Hm.
$ git remote -v
origin  email@example.com:example (fetch)
origin  email@example.com:example (push)

okay, that looks right.
$ git branch -a
... # nothing from origin

Hm.
$ git fetch -a origin
From example.com:example
* branch            HEAD       -> FETCH_HEAD

I have no idea if that's correct. It looks productive, but git diff master origin/master still fails, and:
$ git branch --track omaster origin/master
fatal: Not a valid object name: 'origin/master'.

Wha?
$ ls .git/refs/remotes
gitps  ps

That looks wrong: those are old remotes that haven't existed for months. Also they're empty. And .git/remotes doesn't exist at all, although I'm not sure that it should.
Answer: Have you tried git remote update? This will update all remotes, creating remote-tracking branches as needed.
Comment: Just tried it, exactly the same result as `git fetch -a origin`, unfortunately.
Answer: You may need to tell git which branches to fetch from origin.  In the .git/config file for this repo, under the [remote "origin"] section, there should be a line like fetch = ....  This tells git what to fetch and where to put it locally.  Here's a pretty standard example:
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = ssh://...

If you don't see the fetch = ... line, you can safely add it to match the example, which is the standard "track all branches and call them origin/branch locally" option set up by git clone.
See the git pro book for a good description of what's going on.
Comment: Thanks. For me, my fetch line existed, but was only fetching from a particular release branch for some reason.  I updated the line to the above and did `git remote update` and then `git reset --hard origin/branchname` and everything works perfectly.
Answer: I had a similar issue just now. I discovered that my local .git directory as actually a file
$ file .git
     .git: ASCII text

I deleted the file, and initialized the git repository
git init && git remote add origin "gitrepo"

Not too sure why this happened. Hopefully this can help someone..


How to create a page when a theme is activated?

Question: I want my theme to have an 'about' page available by default when a user uses my theme.
Is there a way to auto create a page when a user selects your template?
Or some other way of achieving this?
Answer: There is a hook specifically for this purpose, called after_switch_theme. You can hook into it and create your personal page after theme activation. Have a look at this:
add_action( 'after_switch_theme', 'create_page_on_theme_activation' );

function create_page_on_theme_activation(){

    // Set the title, template, etc
    $new_page_title     = __('About Us','text-domain'); // Page's title
    $new_page_content   = '';                           // Content goes here
    $new_page_template  = 'page-custom-page.php';       // The template to use for the page
    $page_check = get_page_by_title($new_page_title);   // Check if the page already exists
    // Store the above data in an array
    $new_page = array(
            'post_type'     => 'page',
            'post_title'    => $new_page_title,
            'post_content'  => $new_page_content,
            'post_status'   => 'publish',
            'post_author'   => 1,
            'post_name'     => 'about-us'
    );
    // If the page doesn't already exist, create it
    if(!isset($page_check->ID)){
        $new_page_id = wp_insert_post($new_page);
        if(!empty($new_page_template)){
            update_post_meta($new_page_id, '_wp_page_template', $new_page_template);
        }
    }
}

I suggest you use a unique slug to make sure the code always functions properly, since pages with slugs like about-us are very common, and might already exist but don't belong to your theme.
Answer: The wp_insert_post() function is where to start https://developer.wordpress.org/reference/functions/wp_insert_post/ . You would place your code to create the post in the theme activation code. The googles show many examples of using that function.
(Although I am not sure that theme users would want a post automatically created. Seems to me a bit of an imposition on your part. I sure wouldn't want an automatically created post on my site. Even with full disclosure prior to theme activation.  Sort of like 'do no harm' to someone else's blog.)
Answer: Starter content is a user friendly way of doing this, so it doesn't impose anything unwanted on the user. Take a look at https://make.wordpress.org/core/2016/11/30/starter-content-for-themes-in-4-7/
Answer: add_action('wpmu_new_blog', 'create_pages');
function create_pages(){
$awesome_page_id = get_option("awesome_page_id");
if (!$awesome_page_id) {
//create a new page and automatically assign the page template
$post1 = array(
'post_title' => "Awesome Page!",
'post_content' => "",
'post_status' => "publish",
'post_type' => 'page',
);
$postID = wp_insert_post($post1, $error);
update_post_meta($postID, "_wp_page_template", "awesome-page.php");
update_option("awesome_page_id", $postID);
}
}


awk with if statements

Question: I am trying to print from a file using awk, but my output is empty.
Here is my code so far
accountNum=$1
while read -r LINE || [[ -n $LINE ]] ; do
            awk -F',' '{ if($1==accountNum) { print $3.$2 } }' Accounts
done < Accounts

I have also tried this:
accountNum=$1
while read -r LINE || [[ -n $LINE ]] ; do
            echo $LINE  | awk -F',' '{ if($1==accountNum) { print $3.$2 } }'
done < Accounts

The input file is :
1,Doe,John
2,Rooney,Wayne
3,Smith,Will
4,Crow,Russel
5,Cruise,Tom

The expected output when I run the file is
$./file.sh 3
Will Smith

But I get the following
$./file.sh 3
$

That is nothing is being printed out. I know the solution with cut, but I want to use awk.
Answer: You should use -v option of awk:
awk -F',' -v accNum="$1" '$1 == accNum {print $3,$2}'

With $1 in double quote, the shell will handle all its special character ( if has ) for you.
Answer: You have:
accountNum=$1
awk -F',' '{ if($1==accountNum) { print $3.$2 } }' Accounts

How does the shell variable accountNum get into awk? It doesn't: you need to provide its value to awk explicitly. You can use:
awk -F',' '{ if($1=='"$accountNum"') { print $3.$2 } }' Accounts

which leaves single quotes and has the shell substitute the value of its variable into the awk command, then reenters single quotes for the rest of the command string.
A better or at least more idiomatic script would be:
#!/bin/sh
accountNum=$1
awk -F, '$1 == "'"$accountNum"'" { print $3,$2 }' Accounts

which deals with non-numeric account numbers (quoting the substituted variable), uses a pattern block instead of an explicit if (the {} block will run if the test before it is true), and prints a space between the names as you wanted (because of ,). If you prefer to use if explicitly, move the test inside your existing if statement.
Depending on your real goal awk may not be the best fit for what you're doing. The above still fails if the script's $1 has quotes in it. The shell loop you had wasn't doing anything useful, although it would have repeated the output many times.
Comment: are you saying I should remove the `while` loop? :)
Comment: At least for the examples it isn't doing anything to help you.
Answer: Your script already practically does the job without any awk at all:
while IFS=, read -r num last first
    do  [ $((num==accountNum)) -eq 1 ] &&
        printf '%s.%s\n' "$first" "$last"
done < Accounts

I'm not suggesting that this is a better or more efficient solution than using awk alone, but if you want the while...read loop, this certainly beats separate awk processes per each line. Just an FYI, I guess.
Comment: Not just one awk for every line, but that awk reads the entire file again for every line that the shell itself reads. Way to get a O(n^2) algorithm.
Answer: #!/bin/bash

awk -v a="$1" -F ',' '$1 == a { print $3, $2 }' Accounts

With -v a="$1" we set the awk variable a to the value of the script's first command line argument, then we specify that the input is comma separated with -F ','.  If the first column is equal to the value of a, print the two other columns in reverse order.
You get nothing in your output as you are comparing the first column to the awk variable accountNum, which is unset.
Had there been an entry whose first column had 0 (zero) in it, that entry would have been printed.  This is because the value of unset variables in awk evaluates to zero.

awk with if statements


How vulnerability scanners identify version of services on targets

Question: I would like to know that how vulnerability scanners identify the version of services running on the target after identifying the service by the port number.
Comment: Do you mean banner grabbing?
Answer: How Fingerprinting works
For every service fingerprinting would be done differently, generally, it works by finding differences between the implementations, and using them to detect the version of the software, I have included a few simple examples:
SSH
If you run the following command:
nc HOST 22

You can see that the first thing that a server sends is a string identifying it's version, such as:
SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4

From this you can get the version
HTTP
If you run the following command:
curl -v URL > /dev/null

You can see that the server sends many headers, one of which is likely to look like this:
< Server: cloudflare

This can show you the server if it has not been changed, and possibly the plugins running also
Wordpress
Looking at the feed available at /feed/ gives an xml file with the following tag:
<generator>https://wordpress.org/?v=4.9.2</generator>

If this is disabled then differences in the readme can be used to detect the version instead
Comment: short answer is: the service tells you what version it is
Comment: @jrtapsell Thank you so much for the detailed answer.


How do I stay logged into Gmail after shutting down my computer if the "stay signed in" box does NOT appear at the sign in?

Question: The "stay signed in" check box no longer appears when I log in to my Gmail account. Therefore, every time I go to Gmail after shutting down my computer I have to re-enter the password. I have no idea why the "stay signed in" no longer appears on the Gmail sign-in page. Any suggestions?
Answer: If you use Google Chrome, you can sign into Chrome Browser.
In the top right corner, where the minimize button is (on windows), you will see a picture of a person.  Simply click on the person and sign into your google account and it will keep you signed in between reboots.
This will not work if you are using Incognito Mode.  As Incognito Mode will remove all setting when you close the browser session.
Also note the other benefits of signing in.  It will save bookmarks and settings to if you have to reinstall you computer or use a different computer your settings will come back when you sign in to the new computer.


Trying to check if two expressions are equal

Question: So I am trying to check if two expressions are the same. I have seen multiple posts on how we can just put expression 1 == expression 2 and Mathematica returns true or false. This works for a simple example: 3==5 gives false, as it should.
But lately, when I am putting two expressions equal I just get the two expressions as output? They all have the same variables and functions, so how can I make Mathematica understand?
A basic example is putting 3x == x 3, Mathematica will not understand this either. Any ideas on what to do to compare expressions?
Answer: "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)"
in my case your example works fine. Try appending <code>//FullSimplify</code>
Comment: Windows, 12.1, same here.


Where to start programming?

Question: Once you have your first set of requirements and design done where do you start programming?  (Assume tests will be written in the same order, but before the code).

The entry point
Framework/Support classes
Entity Classes
Easiest thing first
Hardest thing first

What do you suggest?
Comment: Maybe consider turning this into a community wiki
Comment: Do you think it possible that there is one correct answer to this question? If not, it should be CW.
Comment: Why community wiki?  It is a perfectly valid question about programming.
Comment: Yes it's valid, but it's a poll-like question, which should generally be a wiki.
Comment: Where's the line between asking for advice and conducting a poll?
Comment: Questions naturally turn into a Wiki if they hang around a long while. No need to convert it too early is there?
Comment: Depends on your feelings re rep-farming questions, I guess.
Comment: @Neil -- I know what you mean, and mostly agree, BUT... Many actual, brass-tacks programming questions will have more than one correct answer.
Answer: I work from the lowest level in the dependency chain to the highest. That way I can have something to compile and test early, and then I can build on it as I go.
Answer: I almost always start with the User Interface. Once I know exactly what's coming in and what's going out, I find it easier to organize everything else.
Comment: +1: in many applications all the stuff underneath is there only to serve the user interface. Building the UI first will help clarify the requirements on information models and data layer.
Comment: Depends on the application, but UI-first is a good way to make sure you don't waste a lot of time writing code that you ain't gonna need.
Comment: I kinda like this answer. I didn't mention it in mine because most of the stuff I work on has no UI, but it's a good point.
Answer: I start with my Data Structures (DB tables, XTD, Data Dictionaries, etc)
Then how the data will get into and out of said structures (Data Access layer)
Then the Business Objects with their associated logic
Finally, the User Interface and attaching those programmatic hooks to my business logic
Answer: It seems like everyone who's posted an answer to this question names a different place to start. The wide variation in starting points is a perfect illustration of where you should really start: wherever your ideal starting point is.
Different people have different ways of approaching problems. Often the success of a project is independent of the initial approach that one takes. Take time to think about and try different areas to focus on first and find out what's right for you.
EDIT: On a more abstract level, this article by Paul Graham offers good insight on a Lisp-style, bottom-up approach to programming.
Answer: Personally, I think you should start with the domain model. This will, in large part, be pulled directly from your requirements, and will help you identify what pieces you'll need to create. Your domain model will drive your data model, and the requirements will tell you what has to be done to the domain objects.
Answer: It must depend on what you are creating. I am working on a windows mobile application and started form the bottom up, working on classes and various data abstractions and then plugged it all together with a gui and it was a nightmare. You just can't show people (non-developers) code and convince them that you are 40% done, they need to see some sort of GUI. If I could go back, I'd mock up the GUI first.
But when it comes to data-driven websites, I start with the data purely because the web pages that allow you to manipulate them depend on knowing what the data will look like and how you might interact with it.
As an aside, I'm interested in "easiest" and "hardest" things because I think the natural human tendency is to think easy things will be easier than they are and hard things will be harder than they turn out to be!
Answer: I like to start by roughing out the UI.
That gets the discussion out of the way more quickly about how the design and requirements were all wrong (even if everyone signed off on them) and saves a lot of wasted effort.
This is a bit dangerous however, because most people assume that the UI is the bulk of the work and won't understand why it is taking so long to finish when the screens look almost final.
Answer: Re: Easy vs Hard item precedence:
I try to do what I think will be harder items first. This way if things go wrong, you're more likely to get and be able to give advanced notice. Also, if it turns out that something is unachievable, you don't waste you time on a bunch of small things that were dependent and are no longer needed.
http://www.businessballs.com/rocks.htm
Answer: I would tend to write and test the supporting framework classes first.  I find that if I don't, I end up writing too much code before compiling and testing.  Also, writing them first means that you'll be more inclined to make them full abstractions, rather than half-baked ones that are too incestuously coupled to the code using them.  If you haven't written the higher level code when you write the supporting classes, you'll avoid accidentally introducing circular dependencies.
That said, when I'm writing the support classes, I will at least have already written snippets of code that show examples of how they are to be used in the higher-level code.
Answer: Working with desktop/command line programs, I usually do what Ted suggested and start at the top (root) of the dependency chain (tree), in order to have something to test and compile early. I then add classes and complexity step by step down (up) the chain (tree).
Working with web applications I usually take a somewhat different approach:

I tend to start by building a rough html shell to give an idea of what the site should look like.
Then I start with the simplest functionality (in many cases it has been a guestbook or blog-like input/display data kind of thing) where I start by setting up a table in the database, map it to my data provider (Entity Framework if I'm in .Net) and get the site to access the data (no input functionality yet!).
When the page is getting data correctly (I test by putting random stuff in the db manually) I start working on the input part of this section of the site.
Once one section of the site (for example the guestbook) is done and working exactly as I want it to, I go on to the next part and start over at 1 again.
Answer: The best place to start, imho, is with the data schema and then domain model and then any business logic between the model & the interface and then the interface.
Depending on the technology and development paradigm you use, it will serve as a natural extension of your business requirements into the coding world as it should, ideally, represent the bulk of your requirements.
Really, what you need to consider is what you're building, the design pattern you used to architect your solution, the relevant technologies being used and how they inter-relate (or not) and their dependencies.
Start with the piece that is the limiting factor - if you cannot build an adequate Domain Model without a data schema, then start with the schema.
If you have a rather intelligent database (all the tables, integrity and rules built into the stored procedures that do all the error checking and validation) with a rather ignorant middle tier (all it does is pass data along) design then the bulk of the work and the functionality lies in the back ....
If you have a rather simple database (just the tables and fields) and a very smart middle tier (all the logic, validation and integrity checking done here) ... the bulk of the functionality is in the middle ...
Now it's a matter of preference.  I like progress so i start with the "easiest" thing to build - the "simplest" part of the application.  For me, this helps crystalize the whole process at the code level for me - to see pieces falling into place at a relatively frequent rate.
BUT I ALWAYS leave the dazzly front-end to the last (or i get someone else to do it - which i'd prefer).!!
It's as much an art as it is a science ... every project is different unless you're just repeating a pattern with the same technologies and processes - in which case, bust it down to a science and make sure you take lessons away from each project so that you can compose a more efficient process going forward.
Cheers
Answer: I prefer to start with the higher level (architectural) parts as they will better define what you specifically need at the lower levels.  If you start at the lower levels then you usually end up bastardizing the higher levels to fit with the way you decided the lower levels should work. So in essence, you make your job harder by starting at the lower levels and your design becomes harder to understand.  The higher level application code is the part that you want easy to understand, so it makes more sense too me to start there and ensure it works exactly how you want it to.
This usually means starting with the UI and adding functionality as the UI is built.
EDIT: If you don't know how something is going to work at the higher level you are working at; then create a method for that higher level piece to call and push the work off to the lower level modules.  This does wonders for me in simplifying my code.
Answer: I agree with the general consensus so far that you start at the lowest level, the data layer, of your application and build from there. To me it makes perfect sense because the business logic is built on top of the data layer and the front end is built on top of the business logic etc.
However, just considering one more thing - your customer. Unfortunately, the customer needs to see visible changes to know that you are doing something. And you will be surprise that even technical managers tend to fall into this mindset too.
So I try to make sure that at each iteration some thing is done to the UI as well, so in a sense the application is built in vertical lines. That is, some data, some business logic, some UI, show the customer. Repeat.
Comment: If you'd done that, they would have figured you were almost done from the start, and then got real impatient that you were still working on it weeks later. You can't win for losing, dude.
Answer: Whenever possible, I'd start with a path through the whole app. Work generously with stubs. This helps to clarify the overall architecture of the program.
When that's done, I strongly recommend to work on the hardest part next. (Hardest part aka the most risky part aka the part where you have the least information about.)
Why? Because you need time to find all that missing information and if you cannot get this part working, the other parts have been wasted.
Answer: I like to start by writing the framework, and then letting the other pieces fall together.
For instance, I will usually write a class which I know will be needed, then interface it once i have some desired functionality...then will carry on to the surrounding functionality.
I like doing things this way, because if feels like stream of conciousness, and when things are clicking it is very satisfying.
Answer: My take as a journeyman programmer:

Plan the data structure
Make a rough version of UI
Code the application logic
Put finishing touches on UI

When developing a Django application, I would define the models first, hack together some just-adequate templates, code the view functions and finish the remaining work on UI. All these steps inevitably overlap a bit (like making changes to Model classes while coding views), but this would be the general road map for me.

Where to start programming?


How does "ranged" work for effects that don't have an attack roll?

Question: Normally, ranged attacks have 3 range categories (short/medium/long) with different penalties to the attack roll (-0/-2/-5). Which one do you use if an effect doesn't have an attack roll? E.g. an area attack, or a non-attack effect such as Move Object or Create?
Answer: On pages 139-140, the various options for the Area Modifier are explained, including the Ranged Modifier. It reads, "Ranged - A Ranged Area Effect can be placed anywhere within the effects range, extending to fill the area's volume from the origin point." This means that the effect can be placed anywhere you can accurately see in within the limits of the Ranged Modifier; for simplicity's sake, lets say that it has to be within the shortest increment (25ft per Rank). If you're using Create at a range to drop a considerably large object on someone, I'd argue that such a thing would also count as a Ranged Area Effect as we discussed here. Funny thing about Move Object is that it can either be used as a way to use exotic actions at a range (such has picking stuff up or as a medium for tripping people) or as a  "Ranged Strike". When interacting with an opponent using an object that isn't of considerable size, you make a Ranged Attack Roll against their Parry defense; otherwise it should count as a Ranged Area Effect when affecting an opponent.
Hope this helps!
Answer: Generally, it does not apply. Area Attacks don't have an attack roll. Dropping an object on someone doesn't have an attack roll. You just use them at maximum range. Move Object is actually an interesting case in my opinion since it ought to be a Ranged attack (unless you take it to Perception range), but I could see an argument for someone using it as a Close attack, much like with Elongation. For Area attacks (including dropping a Created object on someone), you could treat the range penalty as penalty on the Dodge DC so that targets would have an easier time reducing the damage, but that would be a houserule. I could similarly see imposing a range penalty on using Elongation or Move Object to do something at a great distance, like making a skill check in Technology to disarm a bomb from around the corner.


Is there any rule when to use panels and when to use templates in drupal 7

Question: I want to know about the panels and templates use cases as i am confused when to use panels and when to use templates as each page can be designed by both the ways then which is the best solution.
 As we can easily layout both the things through html css.
Answer: Simple rule:

If you want to add some other blocks, content panes, or other information that is related but not included in content; you need to use Panels.
If you want to display the content in a custom way and all information you want to display is already included in content, then you don't need Panels, use a template.


what do you call someone who marries for citizenship?

Question: A gold digger is someone who marries for money. Is there a term for someone who marries for citizenship (and then divorces as soon as they get the citizenship)?
Answer: It's usually called a green card marriage.
Per wikipedia:

Green card marriage is a neologism that refers to the marriage of convenience between a legal resident of a country and a person who would be ineligible for residency but for being married to a resident.
Comment: ...so the person would be called a green card wife?
Comment: Well since it is usually not a legal marriage, you wouldn't want to go around telling everyone that your wife or hubby was a *green card spouse.* When or why would you want to ever use the term? I guess you could tell trusted friends or family, but some secrets may be too big to tell anyone.


is language a barrier?

Question: If I am an illitrate of all (this worldly languages) and I am aware of all the unanswered doubts, then how come i'll explain you 'what I have asked or answered ? There are so many bars in putting questions or placing answers people. Ahh.. Nt easy admin.
Answer: I think I remember a story told of the Dalai Lama walking through a crowd, and meeting someone in the crowd who had some mentally illness. According to the story, the Dalai Lama took that man's hand in his own and held it for a while, and the man (who had been unhappy) relaxed.
The story was told as an example of His Holiness's compassion (and communication).

I suppose there are several different types of language barrier:

Doesn't understand written language ("illiterate")
Doesn't understand spoken language ("deaf")
Understands one natural language but not another (e.g. understands english but not chinese)
Doesn't understand technical vocabuary (for example Pali words such as dukkha)
Sensory barriers (e.g. different people are in different rooms)
Learning disability (e.g. someone didn't learn to communicate when they are an infant child, etc.)
Mental barriers (e.g. someone is drunk, drugged, mentally ill, etc.)

Language is a "system of communication". It might be like "a bridge over a river" or "two people holding hands". There might be a limit to what or how much can be communicated, but language can be as much "bridge" as it is "barrier".
On the other hand, the part of one's mind which communicates using language can (I guess) be mistaken as the 'self' or 'ego'. Language is a sensory (conditioned) phenomenon. Some meditative practices (e.g. "guarding senses" etc.) may be intended to reduce one's dependence on communication.
Answer: As for literacy in general-- you have to remember that the Buddha didn't write anything down. I'm not sure that he was literate. There weren't books, instead people did incredible feats of memorization.
Or did you mean you personally? So far this community is full of people who really want to help you people with their question. If you just keep throwing words at people, some will stick. Usually if it is an interesting question, people will edit your question to clean up the English.
In the old Pali texts, the speaker often uses many words with similar meanings in a row, as if they are trying to make sure that if you don't understand one word, you'll understand one of the next near synonyms.
If you keep throwing words at us, we will eventually get the point and in turn, we will keep throwing words at you until we reach an answer.
(This isn't true on all StackExchange sites, on some sites, like StackOverflow, questions get closed if they aren't coherent and reasonable.)
Answer: Language is a means of communication. When it comes to the Dhamma the role of language is the elaborate the techniques and provide guidance. The realisation should be at the experiential level.
Answer: Language or the word, is a barrier in a sense that it can not present the totality of an experience. Language is linear and fixed.Experiences are fluid. It is not like taking a photograph or making a duplicate.When one uses language or words to describe an experience what happens is the experience itself is transformed. Language is a way to solidify the vague feelings and sensations and thoughts as a means to organise reality ( or our impressions of reality).Though language, like thinking has its uses, it is also a way for the ego to solidify  experiences which are  impermanent.First we think then we churn our thoughts using words then before we know it we've built a solid wall of concepts around us imprisoning ourselves from the world of sensing or experiencing or just being.This is why its said that Language shows and hides their meaning at the same time.So like everything else in life language should be used skillfully and not as a substitute for reality.
Answer: I was looking through the answers for the most famous Buddhist story about an illiterate person... the 6th patriarch, Huineng. He was illiterate yet (he could not read or write) but due to great past merit and cultivation, when he heard a Buddhist sermon he Awakened. Afterwards he just worked in the monastery and the head, the 5th patriarch, did not know of his Awakening for a long time until he did a poetry contest to find the most Awakened student.

Huineng was born into the Lu family in 638 A.D. in Xinzhou
  (present-day Xinxing County) in Guangdong province. His father died
  when he was young and his family was poor. As a consequence, Huineng
  had no opportunity to learn to read or write and is said to have
  remained illiterate his entire life.
  from Wikipedia

I reccommend reading the full story from The Diamond Sutra Explained by Master Huai-Chin Nan.

is language a barrier?


Is there a difference between energy levels and electron shells?

Question: Is there any difference between energy levels and electron shells, or do they mean the same thing? Does the number of energy levels remain constant when progressing across a period?
Comment: Well, they are different, since the 2s and 2p orbitals have different energies but belong to the same "shell".
Comment: Shell is just a bunch of levels.
Answer: Introduction
The absolute energy levels of all electrons in an atom are different, and will shift subtly when electrons are added or taken away. However, it is true that, generally speaking, sets of electrons in an atom will tend to have energy levels very closely clustered together, with big differences in energy to other sets of electrons in the atoms. We say that these electrons are all in the same energy level. On the other hand, election shells have to do with the mathematics of the electrons 'orbitals', and are closely related, but are not the same. If you want to avoid 'hair-splitting' detail at this point, the difference is this -
Energy levels
Each electron in an atom belongs to an energy level in which all the electrons in that level have nearly exactly the same energy, but there are big energy differences between the levels. If you were to strip away all the electrons from an atom and then return them one by one, you would find that you could only put 2 in the lowest level and then 8 in the next. The capacity for the first five levels are 2, 8, 8, 18, 18 in that order. This corresponds to the number of atoms in each of the first five periods of the periodic table and helps explain the properties of elements in the periodic table. This makes 'energy levels' a very useful idea. So energy levels go from 1 to 5 for the first 5 periods of the periodic table, and in simple terms, full energy levels tend to be 'desired' by atoms.
Electron shells
Electron shells are slightly different, but closely related. They are numbered, like the energy levels. The first shell, 'is' the first energy level. Likewise, the second shell, is the second energy level. But after this, it becomes more complicated, and this is where the confusion can come in.
With the exception of the first shell, each shell is made up of sub-shells. These sub-shells make up each energy level, but sub-shells can belong to different numbered energy level from shell 3 onwards.
To add some detail. There are 3 kinds of shell, 3 ways of satisfying the quantum maths for bound electrons, in the first 5 periods. There are labelled, 's' shells, 'p' shells and 'd' shells. In the mathematics for these, there are 'shell numbers'. For shell number '1', the mathematics only allows for 's'-shells. For shell number 2, 's'-shells and 'p'-shells are allowed, and for shell number 3, s, p and d-shells are allowed. S-shells can take 2 electrons, p-shells 6 electrons and d-shells 10. So shell level 1 has 2 electrons, level 2, 8 (2+6=8) electrons, and level 3, 18 (2+6+10=18) electrons, giving the pattern 2, 8, 18. This is clearly different from the energy levels, and to know why, we have to know more about the sub-shells.
The sub-shells are written down with the shell number first, the shell type second, and the number of electrons actually in that shell, third, (usually as a superscript). So Hydrogen's electrons would be 1s1, and Helium's 1s2. For the second energy level, Li would be 1s2 2s1, and further across the period, Carbon, 1s2 2s2 2p2, having six electrons. At the end of the period, Neon would have two full energy levels, written as 1s2 2s2 2p6. (Often lower full shells are ignored, so Neon would be written 2s2 2p6.) So far, electron 'shell numbers' coincide with energy levels. However, the third energy level has only 3s and 3p shells, not 3d. This is because the 3d shell has an energy level between 4s and 4p. So the 3d sub-shell belongs to energy level 4. Similarly, the 4d sub-shell has an energy level between the 5s and 5p sub-shells. These extra 10 electrons in the energy levels 4 and 5 produce the transition metal block in the periodic table.
Conclusion
Shells and energy levels come from the properties of atomic electrons, but one comes from the mathematics of electon orbitals, and the other from the energy that the electrons take in these sub-shells. This means that referring to energy levels as 'shells' will produce confusion, when an understanding of 'sub-shells' is needed for a better understanding of the periodic table chemistry.
Comment: I am sorry but this is really not correct. Energy levels are not what you described at all. Those are shells. s, p, d, and f are subshells not shells. Shells refer to collections of subshells with the same principal quantum number.
Comment: Clear expressions, thanks. Want to add, that the confusion about 3s after 4s,... comes from the postulated number of electrons for each shell with 2*n^2. This equation is simply not helpful and doesn't matches the Periodic table of elements. It would be better to explain the electron number of the first three shells by the [equilibration of the electrons magnetic dipole moment](https://www.academia.edu/18391675/About_the_distribution_of_electrons_magnetic_dipole_moments_in_atoms_Part_1).
Comment: So is the term "shells" even used anymore or is it more correct to use the terminology 'energy levels' , 'sublevels' , and 'orbitals'?
Answer: They are different. Take iron as an example. If we using the term shell, the outermost shell should have 16 electrons, according to the "2 8 18" sequence. As for the energy level, the electron configuration of $\ce{Fe}$ should be $\mathrm{(1s)^{2}(2s)^{2}(2p)^{6}(3s)^{2}(3p)^{6}(4s)^{2}(3d)^{6}}$, as the $\mathrm{4s}$ sublevel (subshell) is the furthest from the nucleus, the outermost energy level should have 2 electrons. Shells are more likely to used from a mathematical view since it don't consider the actual energy of each subshell.
Comment: Iron has 4 electron shells, so the valence shell only has 2 electrons


"Can't edit this property from an override data-block" while adding driver

Question: I tried to add a driver to a custom property after library override.
And I checked the message, "Can't edit this property from an override data-block."
On the other hand, proxy allowed driver to be added to a custom property.
Why is this happening? Is this because library override is still in development?
I have attached a diagram of what I tried and a warning message below.
Comment: I guess you can't (yet). I hope this will be possible once the system is production-ready. However you can define the driver inside the base file and change the target object inside the work file... It has its limitations though
Answer: In Blender 2.9 you can define the driver inside the source file and set your custom property with the "is library overridable".

Then you will be able, at least to animate and change the value for that driver through your custom property in your work file.


Ensure that SQL server "avoids" the clustered index when a non-clustered index can be used

Question: I have a query, the short of which looks like the following. While this is not exact, it should show how the problematic behavior is introduced and what I am looking to prevent. And "prevent" means to forbid/avoid selection of the UCL entirely - independent of any statistics SQL server may have.
Important update/preamble: This SomeStatusVIEW "table" is a view with a UNION ALL of several tables***, sharing the same columns, cluster definition, and secondary index definition. However, during the plan view expansion / constant folding all but one of the tables is elided from the QP due to the constant filter on TableId.
The table is clustered (UCL_UclKey) and there is an index (IX_IndexKey). From domain knowledge, it is known that the result of this query is "at most a few thousand rows", out of billions. There is no good domain distribution on IndexKey (consider it a SHA value).
select l.UclKey, m.IndexKey, max(l.NotInIndex)
-- m contains very few rows with a very small selectivity over IndexKey
from #SomeMapping m
inner loop join SomeStatusVIEW l with (forceseek)
    on l.IndexKey = m.IndexKey
where 1=1
    and l.TableId = 1
    -- **this following predicate (as a literal) spans the range of UclKey almost exactly
    -- even though it has ALMOST NO BEARING on the domain-knowledge expected results
    -- this is the likely culprit, which will be verified to-morrow on production
    and l.UclKey between '00000000-0000-E000-7000-23EC00000000' and '00000000-0000-E000-7000-2DEA7FFFFFFF'
group by l.UclKey, m.IndexKey
option (force order)

SQL Server can use both the clustered index and secondary (IX_IndexKey) to answer this query and fulfill the forceseek hint and nested loop. On most environments it use the IX_IndexKey which is a very efficient query for the domain data. However, on the environment with the most data (by several factors), it incorrectly selects the UCL_UclKey which results in a very sub-par query.

How can I ensure that SQL Server always uses IX_IndexKey in the "most flexible" manner?
I could add INDEX(2), as this is the only secondary index and INDEX(1) is the UCL. However, can this be done in a fashion that does not make this index order assumption? In addition, SomeStatusVIEW joins several different tables (all with the good index as the only non-UCL index, yet all with a different index name) so I cannot use a named index as a query hint.
Ideally, I would imagine something like with (forceseek, avoid index(1)). However, this desired table hint does not exist.
**The UclKey range filter in the query is because the table (and IX_IndexKey) are partitioned over UclKey. This shown value selects about 7 of 30 partitions, and the original inclusion was to hopefully allow SQL Server to prune the partitions directly in the QP instead of during execution. This was/is possibly a premature 'optimization'.
***The "table" allows for eliding all non-used base tables using this structure, such that only one of the base tables ever appears in the query plan.
select 1 as TableId, * from table1
union all
select 2 as TableId, * from table2
...

Comment: Discussion on this question has been **[moved to chat](https://chat.stackexchange.com/rooms/133222/discussion-on-question-by-user2864740-ensure-that-sql-server-avoids-the-cluste)**.
Answer: Aside from what was mentioned in the comments / chat discussion regarding index tuning and query tuning based on what your execution plan says, alternatively you may be able to leverage the Query Store's Regressed Queries Feature to force the execution plan you prefer that uses your nonclustered index.
The one caveat is the plan you want to force has to have been cached by the Query Store already:

To force a plan, select a query and plan, then select Force Plan. You can only force plans that were saved by the query plan feature and are still retained in the query plan cache.

This would definitely be a workaround solution, but the Query Store is a very helpful feature for monitoring and troubleshooting performance issues with queries.


Related to death penalty

Question: Is there somewhere a list of all countries in the world that have death penalty and of when someone can/must be punished by death penalty?
Answer: This gives a list, though not a single table (it's separated by continent). You may have to look into country-specific laws (e.g. the definition of "aggravated robbery" which triggers execution in Sierra Leone, witchcraft in Saudi Arabia, or violation of state ideology in North Korea.

Related to death penalty


Is it a good practice use LDAP for auth in a public webapp beside the app DB?

Question: Internet app needs to be really secure. So LDAP for auth got into the game. Instead doing the traditional db with users table, we want to authenticate agains a LDAP server. How good/bad you think it is ?
Answer: In principle, there is no fundamental difference in security between a "normal" DB and LDAP if implemented with equal care. However, there will be no benefit when compared to a DB if you use it to authenticate just a single app. The main advantage of LDAP as a user database is that you can use the same users in many different contexts and it can easily fit into a hierarchical model in an enterprise, which is difficult to achieve with a classic database.
What benefit would you expect from LDAP?


Requirejs urlArgs paramater in the requirejs-config.js file redirects all the min.js file requests to full .js file urls

Question: I have enabled the production mode in my Magento 2.2.4 version, disabled the static sign functionality and added the parameter: urlArgs:"version='test'" in requirejs-config.js file. I have enabled the minify js functionality from the backend of Magento 2 . If i do not add this parameter all the dependency are loaded without any issues with the .min.js suffix, but once i added that parameter for cache busting functionality, all the dependency are loading with .js suffix and ignoring the .min.js files. I am unable to find the solution for this, can anyone please suggest me a solution for it?
Comment: Not getting your requirement.
Answer: I have found a solution to this issue. I will say it is not a perfect solution, the below solution has solved my issue, so i am posting it here so that it can help others facing this issue.
Cause of the problem:
The problem was that after enabling the production mode in my Magento 2 instance, disabling static version sign and enabling the js minification  from backend requirejs was not loading the few .js files as min.js. So after long hours of debugging i found out that requirejs-min-resolver.min.js was the culprit. It was not loading few min.js files, the problem is with this line of code where the regular expression: url=url.replace(/(\.min)?\.js$/,'.min.js'); was not loading few .js files as min.js.
The fix:
requirejs-min-resolver.min.js file is created from this php class, override this below method using di.xml:
vendor/magento/framework/RequireJs/Config.php

public function getMinResolverCode()
    {
        $excludes = [];
        foreach ($this->minification->getExcludes('js') as $expression) {
            $excludes[] = '!url.match(/' . str_replace('/', '\/', $expression) . '/)';
        }
        $excludesCode = empty($excludes) ? 'true' : implode('&&', $excludes);

        $result = <<<code
    var ctx = require.s.contexts._,
        origNameToUrl = ctx.nameToUrl;

    ctx.nameToUrl = function() {
        var url = origNameToUrl.apply(ctx, arguments);
        if ({$excludesCode}) {
            //url = url.replace(/(\.min)?\.js$/, '.min.js'); // commented this line of code.
           //added below line of code
        if( (url.match('static/frontend/Vendor') || url.match('static/adminhtml/Magento')) && !url.match('.min.js') && !url.match('.json')){url=url.replace('.js','.min.js');}
        }
        return url;
    };

code;

        if ($this->minification->isEnabled('js')) {
            $result = $this->minifyAdapter->minify($result);
        }
        return $result;
    }

Note: The expression that i have used has full filled my requirment, please change that according to your own requirement.
Solution impact area:
The above expression will blindly start adding the .min.js extension to all the .js files that are loaded from our Magento 2 instance. Please take care that it does not start adding the .min.js extension to third party .js files even though i have taken care of it in the above custom  expression.
Answer: In my case, it was enough to add into xml this part of code
<block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/>

in situation of collision to read *.js vs *.min.js dependencies.


How to ask for delay in joining date to save money

Question: I got an offer from one company. My current company has a strict rule for two months notice period, which I already told to my new employer. But here is a problem, I want to extend this time. (2months +10 days). If I resign after 10-12 days, I'll not be "charged" by my current company as per their policies. The amount is almost 90% of my current monthly salary. I don't wanna lose it. How to ask my new employer to delay the joining date. Should I be honest and ask directly or is there any other way?
Comment: How can that work?  They can't take back money they have previously paid you unless you have a *very* unusual and specific contract.  Otherwise, what's to keep you from quitting after receiving the next paycheck?  At worst they can withhold pay from the end of the last period until the paycheck, but that is unlikely legal, unless, again, you have previously agreed to very unusual terms.
Comment: @theGamblerRises - Neither.  Just say "As I said during the interview, the date I'm available to start is _______".  It has nothing to do with how it affects your pay, and there's no need to make up something, so don't bother trying to give any justification.  The reasons don't matter, the start date does.
Comment: They pay a certain amount monthly basis, it has a cycle of 6 months. They prefer to call it "tenure based amount". Now if you put down the paper before the cycle ends, they will calculate the total paid amount and deduct from last month salary. This cycle will end on 31st May. So if I put down the papers on 1st June, a new cycle will start and I don't have to pay any money.
Comment: @bobson, the link you provided is quite similar. But what should I ask? Directly stating the problem or giving any excuse.
Comment: @theGamblerRises Seriously, your employer can withhold 90% of your wages for time you have already worked? Please let us know who this is so we can absolutely be sure not to work there.
Comment: Yeah, they do it. In the name of "company's policies", they do whatever they want. :-(
Comment: @theGamblerRises - Depending where you are and what industry you're in, that may not be legal.  We're not lawyers here, but it might be worth asking it as a separate question.  But see http://meta.workplace.stackexchange.com/questions/1856/what-is-asking-for-legal-advice first.
Comment: @Bobson, thanks for the advice. I checked the link. I'll ask it separately.
Comment: Hello Gambler, I marked this as a duplicate of the other question. If I missed something and it's not in fact a dup, please edit the post to clarify further and @ping me or flag the post for mod attention. Thanks for participating and good luck with the new job.
Answer: I was once in a similar situation; I wasn't facing a penalty like you are, but I'd been laid off and was due "pseudo-severance" for a certain period of time that would end when I started a new job (or when the clock ran out).  So while I wasn't going to reject an otherwise-acceptable position based on the loss of (in my case) a few weeks' pay, I wanted to delay the start date from the date they offered.
Our conversation went something like this:

HR: We'd like you to start on $date.  I'm sorry it can't be sooner but (bureaucracy).
Me: Actually, it'd be even better for me if you could move that out another two weeks.  Would that be possible?
HR: We can do that, sure.

I wasn't asked for a reason and didn't offer one.  Had I been asked for a reason, I had planned to say: "I have some financial incentives to delay, but if you need me to start sooner we can talk about the impact".  Note: I didn't go straight to "...but I can drop that if you need me to"; my phrasing leaves open the possibility that they might say "how much are we talking about? We'd like you to start sooner and maybe can make it up to you with a signing bonus?".
Never make demands if you aren't prepared to walk -- but you can ask for changes and, if needed, explain why you're asking -- then let them respond.
Comment: Thanks, I checked with them same way. They didn't agree though. :-(
Comment: Sorry to hear it.
Answer: Generally the notice period in the contract is the notice period and you are legally obligated to pay if you violate it if the contract specifies a penalty. How enforceable it is will vary from country to country, but I am pretty sure that countries like India where long notice periods are the norm have enforceable contracts in this area.
However, you present this to you new company and say you must work out the notice period or, if they want you to come earlier, then they need to pay you the money to legally get out of your contract.  A good company would not want you to knowingly violate your contract as they could then expect the same unethical behavior from you when you want to leave them. A company that doesn't care if you meet your contractural obligations to others is highly likely to not care about meeting their contractural obligations to you. So consider their reaction a litmus test on how they will treat you if you become their employee.
Comment: @theGamblerRises - The question is "What did you tell them during the hiring process?"  If you said "I need to give two months notice", then that would be from the day you accepted you the position.
Comment: I am sorry if I didn't clear my point. See, new employer offered me job on last Friday 16th May. So according to them I'd put papers by 21st May (consider 2-3 days). Adding two months for notice period would make my joining 22nd July. Now I want to delay it 10-12 days. The reason I stated in question. Please tell me how to ask for it?


Market failure in the provision of facilities for people with disabilities

Question: In the US, I believe it is a statutory requirement that all places are accessible for people with disabilities. However, if it were not for this statutory requirement, I would imagine that accessible facilities would be less common. Profit-maximising businesses may not undertake this kind of investment if they only imagine it benefitting a very small number of customers. Hence, the government regulates this to ensure equity. But how can we frame this issue in terms of welfare economics and market failure? Is inequity a kind of market failure? Could it be that these facilities are a public good? Is it a case of there being a positive externality? Or does economics lack the tools to explain this behaviour? Thank you!
Answer: There are ways of framing this from public economics perspective, but let me first address your question before providing what I believe is most correct answer:

Is inequity a kind of market failure?

No, inequity itself is not market failure. Market failure, by definition, is a situation where market does not provide efficient allocation of resources (e.g. see Baar Economics of Welfare State 5th ed chapter 3), and efficient allocation has nothing to do with equitable allocation.

Could it be that these facilities are a public good?

Public good has to have two following characteristics (ibid pp 51):

be non-excludable (it is not easy or too costly to exclude people from using it)
be non-rivalrous (at a current level of demand there is excess capacity e.g. theatre that is half-full)

in addition to above two, recently some authors prefer to also add third condition (ibid pp 51):

non-rejectability (if the good was supplied it cannot be rejected e.g. national defense). But this condition is not included by every source.

These facilities fail most or all of these criteria.
First, this facilities are clearly excludable. Second, if the facilities do not have large unused  they are also rivalous. Third non-rejectability would depend on what facility we talk about.  So this is not good way of framing the issue from public econ perspective, since the first condition is clearly not satisfied pretty much for all facilities I can think of and other two are debatable (note even if one condition is not satisfied the good is not public good but some other category).

Is it a case of there being a positive externality?

This could be possible in some cases. This depends whether allowing disabled people access to those business has some positive wider effect on third parties (i.e. other people than disabled people and business themselves).
This is ultimately empirical question, you can make arguments either way. For example, having educated people including disabled people is likely to have positive effects on society beyond just increased wages of people themselves (e.g. it is possible educated people are nicer, more informed voters etc). So you could make good argument that such facilities should be provided at schools/universities. You would need to look at other places on case by case basis.
So this could be one possible way how to frame it from public economics perspective.

However, while you can frame this issue in terms positive externalities (subject to some empirical inquiry if they are present), the most correct term to frame it is not from perspective of market failure but from distributional normative perspective.
Making economy as efficient as possible is not necessarily appropriate social objective. In public economics when we decide on optimal policy we do not simply look at what is most efficient outcome. Rather we first create some social welfare function e.g. 'vanilla' Marshallian welfare where you look total surplus (consumer+producer), utilitarian social function where people's preferences are assigned weight depending on their (decreasing) marginal utility (assuming cardinal utilities as this does not work with ordinal utility), Rawlsian welfare function where state only assigns positive welfare weight to poorest people in society and everyone else gets zero welfare weight, classical-liberal welfare function where everyone's preference gets equal weight etc). Once we have some social welfare function, we maximize that even if it would come at cost of making economy as efficient as possible (this is why welfare/public economics is separate field from lets say micro or macroeconomics).
Here the most correct framing is not from efficiency perspective but from normative perspective. People with disabilities are typically poorer as due to their disability they are less able to provide for themselves. For example, using utilitarian or Rawlsian social welfare function society should redistribute resources to these people from others, even if this comes at a cost of distorting efficient allocation of resources.
Now, usually the most efficient way how to redistribute resources are direct transfers, but this is not always the case. It might be quite difficult for these disabled people to organize and pay for these facilities from the redistributed funds. In this case it can be reasoned the most effective way to redistribute resources is simply to make firms mandate to provide facilities for them. This will have to come out of combination of lower profits, wages or higher prices so its effectively a redistribution measure.
In terms of welfare/public economics this is in my opinion the most reasonable framing. The positive externality argument also makes sense in some  cases, but as a result that argument has to be examined on case by case basis.
Comment: Thank you for your answer, I would definitely agree. I'm only in the second year of my BSc Economics degree so, while I have learned a lot about whether a market situation is efficient, they're yet to emphasise the need for reconciling these economic frameworks with broader concepts from normative economics. Thanks!
Answer:
Is inequity a kind of market failure?

As muflon said, no its not. Market failure is a situation where individual rationality does not lead to group rationality. In other worse, the actions of self-interested individuals won't eventually lead to the optimal outcome for society as a whole.
Inequity is often economically optimal. For example, you bring up the accessibility requirements in the US. Economically, it is very clearly suboptimal to require every business in the US be wheelchair accessible when only 1% of the population uses wheelchairs. The cost very clearly vastly outweighs the benefits. Why do we do it? We do it because we feel sorry for people who can't walk, and want to provide charity for them.
The 3 types of market failures are:

Externalities
Anti-competitive markets
Suboptimal initial resource allocation

Disabilities could be considered number 3. People with disabilities got the short end of the stick and have basically been given a lot less in life. Because of the diminishing utility of wealth, the second fundamental theorem of welfare economics shows that charity or other non-trade monetary transfers can be beneficial for society as a whole from a utilitarian perspective. The same may hold true for the disabled, tho this is complicated a bit by the fact that their lives usually necessarily have more costs associated with them. But people also want to live in a society where if something happens to them, they know they'll be taken care of. So these kinds of things can also be seen as a sort of insurance for the healthy as well.

Is it a case of there being a positive externality?

All government activity is a big ball of externalities. Money is taken from people who didn't choose to be taxed, and money is given to people who aren't trading something requisite in return. The accessible infrastructure businesses are forced to create absolutely confers a positive externality for disabled people. However in the absence of regulations that would require these things, such infrastructure would not be an externality at all. Some businesses would choose to make their establishment accessible, and would expect to attract more disabled customers because of it. It should be expected that perhaps on the order of 1% of businesses would make their business wheelchair accessible for example - a similar rate to the rate of wheelchair use.
The ADA requirements are more likely a case of government failure however. Special interest groups typically extract concessions for their group at the expense of the majority of people. This is very clearly one of those cases.
However, if the majority did actually want to support disabled people as a form of collective charity, that is perfectly reasonable and economically justifiable. But requirements on accessibility are a very suboptimal way to go about doing that. It would be far more efficient to provide a subsidy for those that choose to make their establishments accessible.


Use Geany IDE On Ubuntu For Objective-c & C#

Question: Is there any IDE is available in Ubuntu for programming in C# and Objective -C . I have already one IDE called Geany installed . I want to use it for writing C# and objective -C if it is possible .
Comment: You seem to have two questions: "Is there an IDE?" and "(How) can Geany be used?" What is it that you really want to know? -- If you look for an IDE that matches your requirements, you should list your requirements in the question. If you want to extend Geany with some features (e.g., in the form of plugins), you should list what you need in your question. Please [edit] your question (be specific).
Answer: MonoDevelop I heard is good for C# and has support for Objective-c if I remember correctly.
That being said, more details on what exactly you require from the IDE/text editor/etc. would be helpful in making a recommendation.
Comment: I need an IDE only supported by Linux  to run objective-c and  c# .    Yes MonoDevelop is obiviously a good option  for C#  but what about   objective-c  ?


Google Sheets conditional formatting based on cell above it

Question: I have a column of blank cells. If I type something into a cell, I want the cell immediately below that one to turn red. Any ideas for conditional formatting help?
Answer: Try this custom formula:
=not(isblank(offset(A1,-1,0)))
The only problem that I can see is that A1 is automatically highlighted, regardless of any value in any other cell
Answer: follow this steps
select cell b1
set conditional Format, say for Column B
apply to Range: B2:B  (>it will later correct to B2:B999 or max rows)
Format Rules
Custom Formula: =not(isblank(b1))  >>fill RED
...done
if for some reason, like not selecting B1 at the beginning the formula (upon inspection) is different, pls correct to ...B1...


How to export mysql schema from phpmyadmin?

Question: I have a huge db that hangs the server if I try to export it, is there a way I can export it without all the data? Only the tables structure.
Comment: I come across this post as I was looking to export table structure only through phpmyadmin however I wanted to use the export as documentation so I was looking to export it in PDF with foreign key and inter table relation preserved: http://blog.cuelogic.co.in/how-to-export-mysql-database-schema-to-pdf-with-foreign-keys-and-inter/
Answer: In the Export tab for your database, there's a checkbox on the lower right that says Data.
Uncheck it and you should only have the bare structure in your export file.
Answer: With the newer phpmyadmin versions, in the export tab for your database or table click on custom.

Under Format-specific options click dump table -> structure
Comment: If I do two separate dumps - one for the data and one for the schema - is there a lot of overlap in terms of what gets outputted? (Logically there shouldn't be, but you can never know for sure.)
Answer: Select your database or table.
Select the Export tab.
Below Export method, select Custom.
Below Tables, check the appropriate Structure boxes.
Here's a screenshot:
Comment: Thanks worked for me!
Comment: this worked for me.+1
Answer: There is a checkbox called "Data". Untick it and phpMyAdmin should only return the table structure.


Can I intercept and impersonate a server over an HTTP wireless connection?

Question: Let's assume I have a strong enough antenna at exactly the same frequency as the victim. If it sends a request over unprotected http to the router, could I then listen to that request and respond to it before the router does? Would I need the MAC address of the victim too?
Comment: What kind of wireless connection, do you mean Wi-Fi?
Comment: look at ettercap / bettercap, watch some youtube videos on that. if you are connected to the wifi its a simple way to ARP / DNS poison / etc etc this sounds like what you are trying to do. personally I would go the DNS poison route on a wifi network to redirect to a server a control.
Answer: You can set up your own compromised AP that poses as the original AP, often called Evil Twin. If you can make the victim connect to yours instead of the real one, maybe by  DoS'ing the legitimate access point (AP), then you will have control over any traffic the victim produces. You can see this in action in this video by hak5.
Answer: HTTP does not protect against this whatsoever. So that question is then pushed down to the type of wireless connection.
For example a private wifi uses a shared secret (password). If you don't know this password, you should not be able to neither read, nor change/respond. (Though vulnerabilities in wifi are not that uncommon).
If the wifi is enterprise, you would not be able to do this even if you had login credentials, unless you had the private key of the router.
If it is an open wifi, then yes, you should be able to do it quite easily.
And of course, there are meny other possible connections and other factors. For example a VPN would prevent this, IPsec or IPv6 encryption would prevent this etc. You need to be able to break or bypass all levels of security to intercept the connection. HTTPS is only the one that is always talked about, because it is the most encompassing, available and reliable of them.
Comment: But with open wifi, it's still not as easy as just intercepting the radio signal. You need to participate in the wifi network. That's trivial to do, but it's not at the signal level. That's not obvious in your answer. I think you might need a line explaining that you have to join the network.
Comment: @MrSomeone there are some hurdles. You may need to intercept the wifi handshake when a user connects. But in principle yes, it can be done with just little extra preparation.
Comment: @schroeder yes there are, but the question concerned HTTP, did not mention wifi, so I did not want to go into details. Especially if the details would not be enough to pull off the attack and did not help with preventing/risk asses it either. It just did not seem relevant. Do you think I should add it anyway?
Comment: Let's say I have the password and am already connected. So it's possible?


Saint Quotes on Holy Obedience to Overcome Satan

Question: I have read at various times in the past regarding the devil's ability to pretend even humility, but his utter inability to feign obedience.
Recently, I have tried to find some quotes from Catholic Saints regarding this, but the closest thing I have been able to come up with is the following excerpt from St. Faustina's Diary (939):

A soul that will not fully submit its inspirations to the strict control of the Church; that is, to the director, clearly shows by this that a bad spirit is guiding it. The director should be extremely prudent in such cases and test the soul's obedience. Satan can even clothe himself in a cloak of humility, but he does not know how to wear the cloak of obedience and thus his evil designs will be disclosed.

The above quote relates to spiritual direction and the obedience due thereof.
QUESTION: What quote(s) are there from other Saints regarding the weapon of obedience to overcome the devil---and Satan's utter loss to defend against it?
Answer: How about the following quote from St. Francis de Sales:

``The Devil doesn't fear austerity but holy obedience.''

See:
https://quotefancy.com/quote/1398171/Saint-Francis-de-Sales-The-Devil-doesn-t-fear-austerity-but-holy-obedience
Comment: As this is the only answer after two or three days, it gets the check mark.


How to create an invisible mesh like CTRL_Hole in Archimesh?

Question: As far as I understand, to use the boolean modifier to cut a hole, the selected object has to be a mesh. Is it possible to create a mesh that is invisible like CTRL_Hole in Archimesh to create the hole? I've tried to delete the faces of a cube but it doesn't work (there is no hole created when a mesh has no faces).

Thank you,
Sicong
Answer: Select the operand/cutter (the mesh that will add, remove, etc. from the main object).
Set: Object Properties > Viewport Display > Display >  Wire.
This way you see only the edges. And if you really don't wanna see your cutter objects, then in the Outliner, click on the Eye icon (Display in Viewport).
This way you see the result of your stack of Boolean Modifiers, but not the operand(s). Boolean result updates with any modification you make to the geometry of operands in Edit Mode.


Connecting web part to picture library

Question: I want to connect picture library with a webpart. I have 3 light as pictures (green, yellow and red) for commands. I want to have the most simple way to make a command ( for example: process is completed and then it shows green light) and apply it on picture.
Comment: Could you be more specific please? Do you need a WebPart to show these pictures?
Answer: if its in a webpart why are you not storing the images (i presume they are allways green,orange and red) within styles library?
within your code have a function that checks and changes the image accordingly?
if your insistant on the doc library and you know its the same values everytime than do:
SPWeb Web = SPContext.Current.Web;

SPPictureLibrary pictures = (SPPictureLibrary)web.Lists["my home Photos"];

the above needs to be within creatchildcontrols or called from. After that you can so somthing like:
string sourceurl = Web.Url + "/" + pictures.Items[index].Url;

this.Controls.Add(new LiteralControl("");

above needs to also be within creatchildcontrols ;) , index refers to the item number within the list! so if you have green orange red that would be (0) green, (1) orange, (2) red.

Connecting web part to picture library