lightning:select - Set default value based on sObject List from apex controller

Question: Trying to populate an lightning attribute if a single record exists and if multiple records exists would like to provide the user a select list to choose the record then set the attribute.
I cannot seem to get the lightning:select to get its value to be set:
Component
<aura:component description="Account_Selection" controller="MyController">

        <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

        <aura:attribute name="accounts" type="Account[]"/>

        <lightning:select aura:id="a_opt" name="a_opt" label="Accounts"  onchange="{!c.onSelectChange}">
            <aura:iteration items="{!v.accounts}" var="account">
                <option value="{!account.Id}">{!account.Name}</option>
            </aura:iteration>
        </lightning:select>
</aura:component>

Controller
({
    doInit : function(component, event, helper) {
        //console.log('here');
        helper.getAccounts(component);
    },

    onSelectChange : function(component, event, helper) {
        // Print out the selected value
        var selected = component.find("a_opt").get("v.value");
        console.log('@@@@@@@: ' + selected);
    }
})

Helper
({
    getAccounts : function(cmp) {
         var action = cmp.get("c.getAccounts");
         action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                cmp.set("v.accounts", response.getReturnValue());
                cmp.set("v.accountId","ANIDTOTESTTHESET");
                var sel = cmp.find('a_opt');
                sel.set("v.value","ANIDTOTESTSETTINGTHEVALUE");
            }
        });
         $A.enqueueAction(action);
    }
})

Now, the select DOES show the available select options but I cannot for the life of me get the value to be set via the code.
The above component is within a parent component as so:
<c:Account_Selection aura:id="a_selection"/>

The parent component has an attribute
<aura:attribute name="accountId" type="Id"/>

What I would like to happen:

If only one account record returned from the apex controller, set the value of the accountId attribute to the Id of that record
If multiple accounts found, set the default value of the select list to a specific value and set the attribute value
If user selects a value then set the value of the attribute

I have tried everything I can think of searched but cannot get it to work. The select list has all the options but the first value seems to always be selected regardless of the value I attempt to set.
The outPutText does not have any value despite explicitly setting it from the component..
Any ideas how to make this work?
Update
I think the issue is the "cmp" is not the lightning component it is the apex controller? How do i get a reference back to the component on the callback?
Comment: @Praveen - I will see how well that works. I am essentially trying to default the value if only one option and allow select if multiple options. If only one option the select will be hidden. As to the Why, I am still learning lol so seeing how everything works in relation to the lifecycle....This is not your momma's visualforce anymore.
Comment: why are you manually trying to select using cmp.find() instead of using `value` attribute in the lightning:select point to `v.accountId`?
Comment: I think `cmp` is a reference to the component. Are you having the problem in the `getAccountss` helper function? (is the addition s a typo?)
Comment: Assuming the account Id is a valid, 18-character ID, it should work. If you're using just 15-character ID values, it won't work. Does that help?
Comment: Solved it... One sec.
Comment: @PhilHawthorn - Was a typo in the question. When I pass in Component from doInit and hardcode the values it works properly
Answer: Setting the options doesn't actually cause the rendering to happen. So, the value you're setting is ignored because it isn't valid at the time. The solution is to use another callback post-rendering. Here's an example app I wrote that demonstrates this:

<aura:application extends="force:slds" controller="LightningAccountController">
    <aura:attribute name="accounts" type="Account[]" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />

    <lightning:select label="Choose 1" name="a_opt" aura:id="a_opt" onchange="{!c.change}">
        <aura:iteration items="{!v.accounts}" var="account">
            <option value="{!account.Id}">{!account.Name}</option>
        </aura:iteration>
    </lightning:select>
</aura:application>

// Controller
({
    doInit: function(component, event, helper) {
        // Request from server
        var action = component.get("c.getAccountList");
        action.setCallback(this, function(result){
            var accounts = result.getReturnValue();
            console.log(accounts);
            component.set("v.accounts", accounts);
            // Let DOM state catch up.
            window.setTimeout(
                $A.getCallback( function() {
                    // Now set our preferred value
                    component.find("a_opt").set("v.value", accounts[4].Id);
                }));
        });
        $A.enqueueAction(action);
    }
})

// Apex class
global class LightningAccountController {
    @AuraEnabled global static Account[] getAccountList() {
        return [SELECT Name FROM Account LIMIT 10];
    }
}

Comment: @Eric I get what you mean... Somehow, the callback seems to need time to do rendering. I think it's a limitation of callbacks, although the docs don't seem to explicitly say that. See [Modifying Components Outside the Framework Lifecycle](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_cb_mod_ext_js.htm), which was the inspiration/source of my answer.
Comment: I had an inkling it was a rendering issue. Will try it out later this evening but I am sure it will work...Thank you very much!
Comment: @Eric It's my pleasure. I learned something new today as well.
Comment: It is wierd because if I hardcode the values and do not do the enque action it works as expected. If you look at the example here (replacing the UI with Lightning NS): https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_select.htm - it works as expected, but if I pass in the sObject List and call the "loadOptions" from the callback and modify to use the sObjectList it does not set the value. Weird.....If you want me to update question with this example let me know.
Comment: is the `settimeout` part a "guess" or could dom delays or something affect this guess and cause it to not set the value? And can you say frustrated. About ready to drop all this multiple components thing as setting values on the parent component from the child takes more code than just placing the child component code directly on the parent.....maybe I am missing something.
Comment: @Eric JavaScript is a single-threaded model, so the timing should definitely be okay, even if rendering takes a lot of time. I do find it curious that the value isn't set right without the callback, though, because the documentation basically says "hear, this should work." So, either we have a bug, or we have a documentation error (that never happens... right?). Maybe we should try and get an authoritative answer from Dev Support?
Comment: as documented it works. But if you call the loadoptions from the callback of the call to the apex controller (getAccounts) and pass in the results as opts to the method it does not. Make sense? Maybe I will post up an example in my question when I get back home.


Initiate File Download? Wordpress Theme

Question: I'm at the end of my theme! Building the last functions - file downloads.
I've done this before, but I want to make sure I'm actually working according to best practices in wordpress and use of headers.
After a purchase, the user can download a file. The file must be dynamically re-sized and given to them. If its a zip or eps, its simply transferred likewise. This part I can handle.
The part in question:
In the wordpress environment, what is the best way to stimulate a download? In linking to an external php file, you can't get access to wp functions unless you include wp_load.php, which is not good practice. I would need these for validating request.
I thought perhaps I could use some sort of filter/action/hook checking to see if a file is being requested before customer page load? Is there perhaps a way to dynamically zip it via wordpress? This would be a bonus. Doing this without a page refresh would be most ideal.
I hope this question is not overly subjective. Thank you.
Answer: I might be over-complicating it - this thread seems to hit it nicely - How to start file download instantly using php headers

Initiate File Download? Wordpress Theme


Bacula: how to run a script after 2 jobs are finished?

Question: There is a Run After parameter in Bacula configs. But what if I need to wait for several jobs to finish and then run my script?
Answer: Make all the jobs but one have the same priority, the same start time, and set concurrency to 1, and disallow mixed priorities. Then for the last job, set a lower priority, and schedule it so it starts a minute (or few) later than your other jobs. Put the Run After only on that last job.
For example, let's say you have job1, job2, job3, job4 and job5. job1-4 would have priority=10, and job5 would have priority=20 and Run After. What would happen is bacula will queue job1-4 to at the same time, but run them one by one (due to Maximum Concurrent Jobs = 1). Only when all of them complete, would a job5 be run (due to Allow Mixed Priority=no it will wait for all higher priority jobs to complete before it starts), and only when job5 completes, will bacula run Run After Job script). So, the script will be run only after all of job1-5 complete.
You can even keep concurrency higher than 1, if you want to run several jobs in parallel - it would still work.
Comment: looks like it should work)
Answer: Put all of your related jobs into a single script and then use Run After.
Comment: What do you mean? How can I put bacula jobs configs into a script?


Is the swap partition needed when the root partition and RAM are large enough?

Question: I want to install Ubuntu on my machine by allocating 400 GB for the / partition and 50 GB for the /home folder and 16GB RAM. Does it make sense, in this case,  to create a swap partition or is it useless?
Comment: Swap space doesn't relate directly to hard drive space, except for the fact that it takes up a part of the hard drive space.
Comment: Wow; duplicate in hot questions.
Comment: Whether it's useful depends entirely on how the machine is used. e.g. for a server where memory usage is not likely to exceed available RAM, it's not very useful (but it doesn't hurt to have some, just in case), while a desktop machine running programs that use lots of RAM (e.g. chromium or firefox with lots of tabs/windows open), it can be very useful.   BTW Linux has `zram` (uses RAM only) and `zswap` (uses RAM with block device) which use compression algorithms to increase virtual memory size.  compression ratio can be very impressive but depends, of course, on what is being compressed.
Comment: Very insightful feedback, thank you very much @cas
Answer: Swap partition doesn't have links to partition size or partition use but linked to memory & some I/O usage...
Swap is needed only to manage on this.  It's always a good Idea to have e little swap even when it seems to be useless just in case... it should be needed ...  someday....
Even with a 64Gb ram machine I Use some swap if it is an important machine like production server or backup machine for example.
Comment: It also depend on the type of production servers, their loads and how much RAM you allocated for them. As a rule of thumb, DHCP/DNS servers wont need it much, Java-based application servers or MySQL server might need a larger swap often in a while.
Answer: Swap is just like an extension to your physical RAM, and it caches unused data from your RAM, freeing critical RAM space, and speeding some of your operations up. It doesn't have any direct relation to how much space you allocate for each partition. If you're sure that you have plenty of RAM, then you may simply give a lesser amount of swap. But just in case, using a large and generous swap partition ( >= 1 GB) is all good and fine.
There used to be an old rule: Swap = RAM * 2, but this doesn't apply to modern systems.
For more information about what swap is, refer here. Or better, google it out.
Comment: I also agree that nowadays a 1-2G partition should be enough for most common servers.
Answer: As @francois says, it is always a good idea to have a partition, mainly because you might have a contingency situation someday, and it will keep the kernel happy.
Modern kernels are however not that much dependent on having swap as in the past.
However, having a large enough root partition, more than enough RAM, and swap being rarely used, it does not need to be a partition. Create a 51MB/1G swap file inside the root partition if you want a simpler configuration.
You will only need larger swap files in production servers like application servers, databases or large web servers.
see Creating a Swap File
Answer: Swap needs will depend on how much RAM you have and what your system will be used for.  I give my machine with 16gb of RAM 4gb of swap, it very rarely gets used.  My linode.com VPS with 1gb of ram has 256mb swap and even acting as mail/web/etc for a private domain it rarely uses swap.
Depending on what the machine will be used for I'd reconsider that space allocation - my /home takes much more space than the rest of the filesystem, except for one spot that I store ISO and OVA files on (which is actually yet another disk on a different mount point).


What is the paper created by a plagiarizer?

Question: If a man plagiarizes by copying from other peoples' work, what do we call the document (e.g. research paper) that he creates based on this, which contains the copied research?
Comment: Call it "Exhibit A."
Comment: Plagiarism is not a crime, even though it can be grounds for dismissal for a breach of *ethics* in several professions, so there is no specific legal word for a work of plagiarism.
Comment: Is it necessary for there to be a single word for your purposes? Does your language have a single word for this concept?
Comment: @Mitch I can't answer for Czech, but several languages do in fact have a specific word for items created through plagiarism—English does, too, at least to some extent.
Comment: In Czech, this is called "plagiát" as opposed to "plagiátorství" which is the act of plagiarizing something.
Comment: "Garbage" would be an apt description.
Answer: As Pickett's answer says, plagiarism itself can be used in this sense.
If you wish to distinguish between plagiarism (the act or practice of plagiarising content) and the resulting work, however, there is another word which can be called upon: plagiary.
Most dictionaries define plagiary as:

Plagiarist; one that plagiarises
Plagiarism

The first sense is archaic, and noted as such in dictionaries; but the second sense is synonymous with plagiarism. You can use this to deliberately distinguish between the two meanings. A similar double meaning is found for forgery, which can both be the action and the work, but forgery is used more often for the work than the action (where a gerund forging is more prevalent); for this reason, I would suggest using plagiarism for the action, and plagiary for the work.
Note, however, that there is no hard-and-fast distinction between the words, so you'll have to specify that you are using the words deliberately in this way.
(Side note: the word plagiat does exist in English, too, though it's very rare and archaic. Don't use that, though: it means kidnapping in English!)
Answer: English does not have a single word that expresses the concept 'the piece of text that was plagiarized'. One might use 'a plagiarism' to attempt to capture this but it would be very infelicitous (it would sound off and would be difficult to understand that way).
The shortest clear way to express it is to say it is with two words:

plagiarized text.

For other media, there are single words. In art, one uses 'fake' ("that painting is a fake"). In music, one can use 'sample' but that word has removed the taboo connotation with stealing.
Answer: Plagiarism is a count noun, so you may refer to it by saying for example "yes, that is the plagiarism I was talking about" or "this document is the plagiarism in question". Source.


Get the command line for the process that owns a window

Question: How can I detect in Lubuntu the command line invocation of a process from one of its windows, so that I can run it later from the command line?
Comment: I'm not sure what you asking about but you might be asking about `xprop`.
Comment: Could you provide an example of what you are trying to achieve?
Comment: On Raspbian I can open the "GUI Network Dialog" by clicking the right mouse on the Network Widget on the Taskbar. In need to know how to open that network dialog from commandline.
Comment: I don't quite understand. Are you trying to run Windows programs from your command line while being booted into Lubuntu?
Answer: You can combine a couple of commands:
$ cat /proc/$(xprop | grep PID | awk '{print $3}')/cmdline | tr '\0' ' ';echo

xprop will wait until you click on a window. When you do, it prints the process id number and other info (grep and awk clean that up) and cat shows the file /proc/cmd/PID/cmdline which holds the command line, with arguments, but uses zero as separator. Then with tr you the zero caracters into spaces. A final echo leaves the output in its own line.
This is not meant to be performant but, hopefully, readable.
You can also call ps with the flags you need, in order to get information on the process:
$ ps FLAGS -p $(xprop | grep PID | awk '{print $3}')

Comment: Ok. Thank you. I will try to use this Information.


How to match one word or 2,3,4,5-consecutive words between two documents?

Question: I have two text documents and want to get the word matches between the two documents. The words can match anywhere - for instance, word#5 of doc1 can match word#3 and word#67 of doc2; and then word#23 of doc1 can again match word#3 and word#67 of doc2 - so I want all the matches. Also, aside from one-word matches I want to similarly get consecutive multiple (2-word, 3-word ....15-word etc) word matches between the two documents. How should I approach this in Java? I have been looking at regular expressions but am still not convinced on the exact approach.
Comment: simple brute force matching by running the loop for every word, then every pair of words and so on. regexes seem to offer a way to do this efficiently but haven't been able to comprehend the approach.
Answer: First, you need to split the document into bunches of n words (1 word, 2 words, 3 words, ..., n-words) - those bunches are called n-grams. Refer here.
Secondly, create a Set of n-grams from document A. Then, for each n-gram from document B, check if it is in the set.
Answer: I suggest you to maintain a treeset of single words for each document, looping through the firs treeset and checking the matches versus the second should accomplish your task.
For the multiple words part use the same trick only getting two words groups, eg
word1 word2 word3 yay!

take word1 word2 and put it in the treeset, then take word2 word3 and do the same. You could use regexes to remove punctuation, so the algorithm should consist of three steps:

cleaning the documents from punctuation
"indexing" the words and the groups of consecutive words
comparison phase

About point 1 be careful because for example those phrases are the same:

I ate, the cat didn't, I did
I ate the cat, didnt' I? did!


How to manage audience Manager Database Address Books

Question: How we should manage Audience Manager Database Address Books. If I have multiple brand site and each brand has multiple countries site. I want one contact can subscribe in each brand.
So how could I manage contacts among these sites. Please give me an expert suggestion. It will be highly appreciable.
Answer: It's a little tricky to answer with absolute certainty here, since it depends on a lot of variables. In the end, it's up to you to decide what works for you -- perhaps with the input of some expert consultants that can help you consider all of the variables.
From what limited information you have given, it sounds like you only need a single static Address Book. You could then control the brands that they are a part of using Keywords and filter the Contacts in each brand by the relevant Keyword (if that's what you want), using Dynamic Address Books or Dynamic Distribution Lists.
Again, there's lots of options to consider before deciding on a final design. Should your users always have access to all of the Contacts? Or only the ones for their brand? Does a Contact (profile) need to be the same across all brands or does signing up for brand A and brand B involve two different accounts? etc.
Comment: Peter, My user will always have access common contacts of brand and location access not complete brand contacts. Like we have 3 brands brand A,brand B,brand C and 10 locations location A, location B,.... Like brand A have 100 contacts but brand A and location A have 10 common contacts.Then my location A user can see only 10 contacts not full brand contacts. And user also have the ability to import contacts from .csv file only for his location. All brands have different sign up.
Comment: This isn't really the best place for those kinds of discussions, but it sounds like you need an Address Book for each brand at least (since they need to have separate accounts for the same Contact). You could then create Dynamic Address Books for the brand+location combination so that your users can only see the overlap -- but I don't think there is any way you can limit the import to only the overlap. I think they'll be able to import any Contacts into the brand Address Book as a whole. So that would need to be handled by your own business rules.


Lock down computer when on a domain

Question: Is there a way to disable all users except your user from logging into your PC when you're part of a Windows Server 2008 Active Directory domain?
Answer: If you're blocking it through the AD, you're going to need to go to the "Active Directory Users and Computers", select the record for the computer in the domain, and go to the "Security" tab and remove everyone you don't want to have access.
Might also want to go to "Local Security Settings -> User Rights Assignment" and make sure "Access this computer from the Network" is right, and "Allow logon though terminal services" as well.
Comment: Umm... your first suggestion isn't what I would recommend. Why mess with the ACL on the computer account when your second option is easier, safer, and the more preferred method, although you want to set the "Allow log on locally" user right as well.
Comment: +1 for using GPO to control the local security settings.
Answer: You can add your user account to the "Users" local group, then remove the "Domain Users" AD group from the local users group.
This won't keep admins out though.

Lock down computer when on a domain


Why does "to wire" mean to trick?

Question: A Collection of College Words & Customs written by Benjamin Homer Hall in 1856 defines a "wire" as a trick and I'm curious to know if it is of any relation to a magician using invisible wire to trick his audience? Any thoughts?
Comment: Seems likely that your explanation is apt, both in relation to the stage and to seances. Floating apparitions and knocking sounds have been controlled by wire.
Comment: ...and I believe that kind of stage trickery was very much in vogue back then.
Answer: Wire-pulling is associated with trickery:
Wire-pulling is defined as political manipulation in The American slang dictionary 1891 and Wire-puller in the political sense is 1848, American English, on the image of pulling the wires that work a puppet.
but a good magician needs to be artful in 'picking your pocket', as well as, adding items to your person, and a wire is a thief with long fingers, expert at picking ladies' pockets.  It is reasonable that 'to wire' was 'stolen' from thieves
Comment: Do you happen to have a reference for "a wire" being "a thief with long fingers"? It's a cool term.

Why does "to wire" mean to trick?


Strong maximum principle for a PDE with coefficient in $L^1$

Question: Let $U$ be a bounded open subset of $\mathbb{R}^n$ with smooth boundary, $n \geq 3$. Set $N = \frac{2n}{n-2}$. I am interested in the following equation:
$$
-\Delta \phi + R \phi + \phi^{N-1} = 0
$$
with boundary condition $\phi \equiv 1$ on $\partial U$. I also assume that $R \in L^1(U)$, $R \geq -1$.
It turns out that we can construct $\phi \in W^{1,2}(U) \cap L^\infty(U)$ hwich is a weak solution to this equation as follows.
First a naive remark. If $R$ was regular, we see that $1$ is a supersolution while $0$ is a (sub) solution so we expect $0 \leq \phi \leq 1$.
We introduce the functional
$$
I(\phi) = \int_U \left[\frac{1}{2}\left(|d\phi|^2 + R \phi^2\right) + \frac{1}{N} |\phi|^N\right] dx.
$$
This functional is ill-defined over $W^{1,2}(U)$ but well-defined over the closed subset $C$ consisting of functions that are between $-2$ and $2$ ($C$ is closed for the weak topology as it can be described as the set of functions $\phi$ such that $-2 \mu(A) \leq \int_A \phi dx \leq 2 \mu(A)$ for all measurable $A \subset U$).
By classical arguments $I$ is sequentially lower semicontinuous on $C$ and, hence, admits a minimum $\phi_0$. As $I(\max\{\phi_0, 0\}) \leq I(\phi_0)$ and $I(\min\{\phi_0, 1\}) \leq I(\phi_0)$, we can assume that $0 \leq \phi_0 \leq 1$.
As we have allowed ourselves some wiggle room in the definition of $C$, we have, for each $\psi \in W^{1, 2}_0(U) \cap L^\infty(U)$, that $\phi_0 + \lambda \psi \in C$ for small enough $\lambda$ and, hence, "differentiating" the inequality $I(\phi_0 + \lambda \psi) \geq I(\phi_0)$, we get that, for all such $\psi$,
$$
0 = \int_U \left(\langle d\phi_0, d\psi\rangle + R \phi_0 \psi + \phi^{N-1} \psi\right) dx,
$$
i.e. $\phi_0$ is a weak solution to our problem.
Is $\phi_0$ bounded from below by a positive constant?
With a more regular $R$, that would follow from Harnack's inequality but I could not find a proof with regularity as low as what I presented.
For the interested reader, the context in which this problem appears is the study of the mass of asymptotically hyperbolic manifolds (see e.g. https://arxiv.org/abs/math/0110035).
Answer: I think that the answer is no, you need more regularity to insure that $\phi_0$ is bounded from below by a positive constant (e.g. $R\in L^p$ with $p>n/2$).
We look  on the radial function $\phi_0(x)=\|x||^\alpha$ on the unit Euclidean ball $U=\mathbb{B}$. Then
$$-\Delta \phi_0+\phi_0^{N-1}=\left(-\frac{\alpha(\alpha+n-2)}{\| x\|^2}+\| x\|^{\frac{4\alpha}{n-2}}\right)\phi_0.$$
Letting
$$R(x)=\frac{\alpha(\alpha+n-2)}{\| x\|^2}-\| x\|^{\frac{4\alpha}{n-2}},$$
we get
$$-\Delta \phi_0+R\phi_0+\phi_0^{N-1}=0.$$
Clearly in dimension $n\ge 3$, $R\in L^1(\mathbb{B})$.
And $V$ is bounded from below and if $\alpha(\alpha+n-2)\ge 0$ then
$V(x)\ge \alpha(\alpha+n-2)-1\ge -1$ on the unit ball $\mathbb{B}$.
Comment: indeed, the regularity in Harnack's inequality is optimal. I need to impose more regularity on $R$. Thank you for your comment!


Name of Supernatural episode with evil car/GPS?

Question: I remember watching this Supernatural episode like back in 2015-2016. All I remember about it was that it had an evil GPS or maybe car, and it locked a victim in the car and the GPS then displayed 666 and a pentagram, then it killed the dude I think.
Answer: Is this Supernatural S10E13, "Halt & Catch Fire" (2015)...?

To take his mind off of the Mark of Cain, Dean goes hunting. They track down a ghost that is killing college students through electronics and the internet.

From the Supernatural Wiki:

A girl and a boy are driving down a street in Spencer, Iowa. He says he's not sure he's okay to drive but it's nothing a little grease won't fix. Billy asks his voice-controlled phone to direct them to the nearest Taco Town. Janet questions the phone's directions, but he says that her phone is only 3G and that his doesn't make mistakes. Later on, Janet complains that it's cold, but Billy says that the air isn't on. The phone leads them to a bridge that's been blocked off. Billy argues with the voice. The voice then demands Janet to get out of the truck. The truck door closes and locks Billy inside. The truck then drives forward, onto the blocked off bridge, while Janet screams.
Comment: I am pretty sure this is it, but I remember seeing that Satanic imagery in it that this episode did not have. Maybe I am mixing 2 episodes in my mind. Regardless, thanks for the find.


List data backup SharePoint Office 365

Question: I am unable to find correct approach to get list data backup.
if anything happened with list. if we have backup, so we can use that data.
Comment: You can create list template including contents.
Answer: This is one kind of limitation in Office 365 or MSFT still behind on this.
There are couple of options.

save as template include the content( as mentioned above), but this has its own limitation i.e losing metadata, if list size is more than 50 MB then it cause trouble.
2nd & most reliable options as of now is use the 3rd party tools for backup and restore.
Lastly you can contact MSFT support but they will restore the whole site collection not the list. they retains upto 14 days.
You can also use the Recycbin to recover the deleted items or enabling the versioning.
Comment: Which 3rd party tool is good. And after using 3rd party tool if anything goes wrong then MSFT will support?
Answer: You could try exporting the list as a template and export the data along with it.

You can then upload the exported template to the solutions gallery (accessed from site settings):

You can then use this template when creating a new list and it will have all the exported data.

List data backup SharePoint Office 365


Swipe Gesture not working in xcode

Question: Since Xcode got updated, i can't use swipe gesture. I have 2 UIViewController, i dragged a Swipe Gesture in the first and in the second. I connected them with Modal Action Segue. I tried in the simulator and on my device and both didn't work. It's so simple and i used to be able to do it but now it just doesn't work. Am i missing something ? I tried playing with the "State: Enable button" but that didn't worked. Normally i would just do a navigation bar with a button to change view but for this app i really want to you swipe gesture... Thanks
Answer: That was a stupid mistake... I dragged the Swipe Gestures on the background images. You need do drag them on the view itself. Just move the background image and drag the swipe gesture on the UIView and it should work!
Answer: Lol, I'm having trouble with that too.
I fixed it by making swipe gesture programatically

Swipe Gesture not working in xcode


Could I same column to represent a foreign key to multiple tables?

Question: I am trying to use the same column to represent a has foreign key to different columns. This is because there could be an arbitrary number of tables to be indexed using this column.
Right now, my idea is to use a small varchar() field to represent which field they are indexing and then check for them my probably sub-querying for all that match the given field, then querying based on the id?
Is this a good method that would take advantage of MySQL indexing?
Are there any other better ways to accomplish this?
Answer: Check out the http://github.com/Theaxiom/Polymorphic2.0 Polymorhpic Behavior.
You use 2 fields to represent a connection to any other table. One field holds the ModelName of the linked Model and the other holds any arbitrary foreign_id value.
Answer: Create a "supertype" table that unifies the keys from the other tables. This example might help:
http://consultingblogs.emc.com/davidportas/archive/2007/01/08/Distributed-Keys-and-Disjoint-Subtypes.aspx
Answer: I usually use Abba's solution for these sort of problems in a one-to-many relationship.  Use a type field to define the table the foreign key reffers to.
If this comes up in a one-to-one relationship you may consider flipping the relationship around.  Move the foreign key to the other tables.  Any number of tables may link a foreign key to the single original table.
Answer: One way to represent the gen-spec design pattern is to use the same key as both a foreign key and as a primary key in the specialized tables.  As a foreign key, it references the PK in the generalized table.  And the PK in the generalized table references a row in one of the specialized tables, without specify which one.
This is the usual method of modeling the gen-spec pattern in the relational model.


Clean and sell my pc

Question: I want to sell my PC. I'm going to sell everything but the hard disk. My question is if the motherboard can store some information that have not been removed or not.
Answer: The motherboard itself doesn't have any storage to worry about.
But you will have to keep in mind that the Windows license-key is in most cases tied to the motherboard/UEFI/Bios.
So you will be effectively selling the computer + the Windows license and the Windows install (if any) on the hard-disk you have taken out will NOT have a valid Windows license anymore.
Comment: @gronostaj Unfortunately the "Free" Windows 10 upgrade changes a WIndows 7 or 8  BOX license into an OEM license. Something most people are not aware off.
Comment: This applies to OEM licenses of Windows. BOX licenses can be transferred to other motherboards.
Comment: Oh ok thanks. Windows is not a problem because it wasn't activated, so I bought a new licensefor other computer.

Clean and sell my pc


How much plastic pellets does it take to make 1 kg of filament? (making my own 3D filaments)

Question: Maybe this is a stupid question, but is 1 kg of plastic pellets equivalent to 1 kg of filament? I want to extrude my own filament using recycled plastic pellets. I want to know the cost of my material in general, so I was wondering if 1 kg of plastic pellets result in 1 kg of filament (regular spool)? How much plastic pellets are needed get 1 kg of filament?
Comment: Hi @Deborah, and welcome to the 3D printing group.  Questions may be on-topic or off-topic, but they are never "stupid" when asked with good intention.
Comment: As Fred.u said - if the extruder has a large reservoir, you may lose that much material once in each run.  E.g. if the reservoir uses 10 g, then you lose 10 g no matter whether creating  100 g or  10 kg of filament in a single run.
Answer: If you ignore losses due to production machinery, your one kilogram of pellets will provide you with nearly one kilogram of filament. There may be some small loss of material stuck in the auger and drips from the nozzle and any place you discover plastic that is not on the spool.
How many plastic pellets does it take to make one kilogram of filament? One kilogram plus a bit more. If you are asking about the numerical quantity of pellets, how much does one pellet weigh? Are they large pellets or small pellets?


Preload array of images for faster load

Question: I read here in SO about preloading the array of images for faster loading of the web page so that when the application needs them to be shown, that would have loaded and can be shown instantly. But my doubt was where to include the code snippet:

at the bottom of page   or

at the start ()?
As, I also read that in order for fast loading one should include all the javascripts  at the bottom.
Which will be a better way? Or do I have to compromise on both the ways?

The javascript code:

Comment: use `ajaxStart()` and `ajaxComplete()`.
Comment: By the way, if you use CSS sprites, you can eliminate the need for preloading.
Answer: Even though all the other answers are inherently correct. They don't seem to address you directly.
Your script is not making use of any DOM elements. Which means that waiting for the DOM to load is not a concern at all.
The halt of the layout rendering while downloading a

Preload array of images for faster load


SOQL 'LIKE' and wildcards '%' not returning full results

Question: I'd like to get a deeper understanding into the SOQL use of wildcards and the term 'Like'. I have the following query:
 SELECT name, city, state
 FROM Account
 WHERE name LIKE '%'+:searchVar+'%'

Let us say my target account is called 'Salesforce StackExchange LLC'. Inserting this full string as my search yields the one correct result, 'Salesforce StackExchange LLC'. Good.
Then let's cut off some of the string and search for 'Salesforce StackExchange'. Now we get multiple results, one of which is our target. So far, all good.
Finally, if I cut off even more, say "Salesforce", I get a bunch of results, but my target is NO LONGER in the results. No good.
I would expect the behavior of the query to keep increasing the amount of results, but still retain all query results from prior searches. If a result comes up for 'Salesforce StackExchange', shouldn't it also come up for 'Salesforce'?
Reading the SOQL guide seems to confirm my above expectation:

Expression is true if the value in the specified fieldName matches the
  characters of the text string in the specified value. The LIKE
  operator in SOQL and SOSL is similar LIKE Like to the LIKE operator in
  SQL; it provides a mechanism for matching partial text strings and
  includes support for wildcards.
• The % and _ wildcards are supported
  for the LIKE operator.
• The % wildcard matches zero or more
  characters.
• The _ wildcard matches exactly one character.
• The text
  string in the specified value must be enclosed in single quotes.
• The LIKE operator is supported for string fields only.
• The LIKE
  operator performs a case-insensitive match, unlike the case-sensitive
  matching in SQL.
• The LIKE operator in SOQL and SOSL supports
  escaping of special characters % or _.

So what's going on?
Thanks!
EDIT: actual SOQL code is below (in JS):
var searchQuery = $j('#searchQuery').val() || ' ';
var queryOptions = {
        where: {
            name: {like: '%'+searchQuery+'%'}
        }
    };

    globals.destObjModel.retrieve(queryOptions, function(err, records, event){...}

Comment: If you search `Salesforce` then it should return `Salesforce StackExchange LLC` value.. I have tested this in my org it is returning
Answer: You may be getting into an issue of selectivity and/or "cost". Your query may not be "selective" enough when you reduce the character string to just "Salesforce". Queries on text fields have the highest "cost" of almost any kind of query you can run on a Salesforce database when you use any of the following: "LIKE", Leading Wildcards (%string), Comparators >, <, =, <=, >=, "NOT LIKE", and "EXCLUDES".
If you go to the Query Optimizer and or the Execution Time Lime in the Developer Console, you'll see what I'm referring to. These force the Query Engine to go through every record to get a result. In essence, as the size of your database increases, you wind up with a non-selective query. Other than Name, none of the fields in your query are indexed, greatly reducing it's selectivity and increasing the cost.
I'll add that one thing which may also be causing your results to decrease is that you're not using a %+ string +% which tells the engine to look for additional words beyond Salesforce, but instead more along the lines of "Salesforces". Your other queries already have a blank space in them while the one for Salesforce does not. So that one doesn't think it should look for non-alphanumeric characters. In any case, your query is a difficult one for the engine to run.
Comment: Does Salesforce put some sort of limit on the query? The query of simply 'salesforce' would be expensive, but would it not still run? Does Salesforce put a limit on the run and this is why it is not returning all of the results?
Answer: I think you have an error in your SOQL.
It should looks like the following in Apex:
Dynamic SOQL:
String query = 'SELECT Id, Name FROM Account WHERE name LIKE \'%' + searchVar + '%\'';
List<Account> accts = Database.query(query);

or using Apex Variables:
List<Account> accts = [SELECT Id, Name FROM Account WHERE name LIKE :('%' + searchName + '%')];

Comment: This was just back of the envelope code above. The actual code (in js) is written above in EDIT
Comment: The second statement (Apex Variables) worked for me, but there is a problem with the syntax of the first with the \ chars.
Answer: Please try to encodes to the querystring.
it encodes the following characters: , / ? : @ & = + $ #
SOQL:
query = "SELECT Id from Account Where Id= '" + id + "' and name LIKE '%"+name+"%' ORDER BY Id DESC";
API URL = instance_url + "/services/data/v20.0/query?q=" +encodeURIComponent(query);


grammar/ the use of The more

Question: "you must act like THE MORE aggressive predator" is the use of "the more" correct in this sentence. thank you
Comment: It seems more natural to parse that as "the ((more aggressive) predator)".
Comment: Hello, Carole. Are you just asking about the form of the comparative construction (which would be off-topic on ELU), or is there a deeper question?
Answer: Yes, that's correct.
Many adjectives in English can be modified by adding "-er" or "-est" to describe a comparison.  For example, "bold" can be modified in this way:  "You must act like the bolder predator."  The following link describes some general rules for applying this modification:
https://www.englishclub.com/spelling/rules-add-er-est.htm
HOWEVER, there are also many adjectives that cannot be modified in this way.  I do not know of any rules that can help you know which is which -- some just can, and some just can't.  "Aggressive" is one that can't, it is not correct to say "aggressiver" or "aggressivest."
For these adjectives, you use "more" and "most" to modify them, just as you do above.  Your sentence correctly communicates that the subject must act like the predator who is more aggressive.  (This of course assumes there are two predators involved.  If there were three or more predators, then the subject must act like the predator who is most aggressive.)
Comment: Hello, JDM. Comparatives and superlatives have been fully addressed on ELU before (including the sometime optionality of periphrasis, and the rare 'hindmost' form). If this is what OP is asking about, which I don't think is correct, the question should be close-voted.

grammar/ the use of The more


What is that type of light in the picture?

Question: Is it flash ? or just LED ring light ??
Answer: A flash light can be made from leds. The diference would be if it lights on a single strobe or in a continuous mode.
That is definetly a "ring" made of leds. If was used as a strobe or as a continuous light is hard to know. (But I suspect it is the second option)
A continuous light can be used on video.
But on a still photography you could try to gess reading the exif from the photo.
Comment: Since the diffraction flares on the LEDs are a different angles, suggesting at least three separate exposures, I suspect that the ring-led was Photoshopped in, and the main light source was probably a conventional flash. Certainly, some image manipulation on the ring-led has been performed.
Comment: @Mick I don't think it was shopped. The main source was the ring light due to light balance of the hair and the catchlights in the eyes have only the ring source. No other highlights are evident ruling out the use of a second source. A conventional flash would have introduced other lighting artifacts not evident here. It appears to be approximately 24 to 30 inches or more in diameter.
Answer: This is an LED ringlight.
Homemade. I made one as well.
All the clubs in dubai Prefer if you use one when shooting gigs in there.
-5050 Led strip or similar
-Battery pack
-Dimmer (helps with exposure)
-Pipe (Hulahoop type etc Or smaller if preferred)
Comment: First, HOW did you know it is in Dubai  ? Second, can you please put some tutorial links? Youtube?

Thanks


setImage often without blocking UI thread Android

Question: I have an ImageView. When user presses button I want to change image (it is animation-list) and run this animation. I used to use setImageResource, but it blocks UI thread and causes lags. I can't predict what image I would set befor user presses button. I tried to preload drawables but it causes OOM, because I have about 30 xmls with animation-list. How can I solve It? To sum up, I want to fastly change image in my ImageView and then start frame animation on it.
Answer: You might look into using a library to load up your images. There is one that is really easy to implement called Picasso. It's been around for a while too, so it should be easy to see some examples.
Answer: I think you are performing a fetch operation on the UI thread for the image(either from storage or network call). That is what is causing the lag.


Joining attribute tables without columns with the same name in QGIS

Question: I would like to link the two attribute tables (see image). However, as far as I know, I need two columns with the same name for the link. Is there an alternative so that I can link the two attribute tables or line layers without columns with the same name?
Comment: Sure, just manually expand one of the tables =P or join them by location, if possible.
Comment: I tried to add a column called 'OBJECTID' to link them, but if try to join them the other columns don't have any values :/
I think both columns should contain the same value
Answer: To do an attribute join you need two columns containing the same / matching data. Note that they also need to have the same datatype. E.g. Integer to string won't match. The names of the columns do not matter.
If you do have the required information, open the layer properties of the layer you want to add the data to, navigate to Joins, and click the little green plus  at the bottom and choose your layer to join as well as the two matching fields. Additionally, you can choose some other settings as well. Note that this type of join is not permanent and only within your QGIS project. If you want to make the join permanent, export the joined layer as a new data file.
If you do not have matching data, you simply cannot do an attribute join. But you can maybe do a spatial join if they share some common spatial relations. If so, please add this to your question body.


Input impedance of oscilloscope and BNC terminator

Question: Assuming an oscilloscope has the input impedance of 1MΩ, you could adjust it to 50Ω by using 50Ω BNC terminator. And I think you could do the same thing by just changing input impedance option in the oscilloscope. Could anyone please tell me what's the difference between them?
Comment: both are electrically same
Answer: Assuming both terminators (internal and external) are well-designed, there shouldn't be much difference.
However, not all scopes have a configurable input impedance, so 50Ω terminators are handy. Also, an external terminator might have superior accuracy and/or superior power handling capability, which may be important in some cases.
Answer: Sometimes the internal terminator can give slightly lower attenuation as the signal is terminated right at the buffer amp, but when an external terminator is used, the signal still has to pass through the 1M ohm input impedance before it gets to the buffer amp (high impedances are more sensitive to capacitance to ground). But in reality, you probably won't even notice the difference


What became of Moshe's staff?

Question: Tradition teaches us that the staff used by Moshe was created on the sixth day (source: Pirkei Avot 5:6) and was given to Adam, then to Noach, then to Avraham and so on. After Moshe's death, what became of the staff? Was he buried with it? Did it vanish? Is it possibly with the Ark of the Covenant?
Answer: At least some versions of Avot DeRabbi Natan 41:12 have "the staff" listed along with the Ark, the container of manna, and a few other things which was hidden away. But other lists of things hidden away (eg. Horiyot 12a) don't list it. All the lists have Aaron's flowering staff [too], so it's possible that's what was intended by Avot DeRabbi Natan and the wording is messed up a bit.
That said, there is the following Midrash in Yalkut Shimoni Tehillim 869:

מטה עוזך ישלח ה' מציון. איזה מטה זה מטה של יעקב שנאמר כי במקלי עברתי את הירדן הזה, והוא המטה שהיה ביד יהודה ומטך אשר בידך, והוא המטה שהיה ביד משה ומטה האלקים בידו, והוא המטה שהיה ביד אהרן וישלך אהרן את מטהו, והוא המטה שהיה ביד דוד שנאמר ויקח מקלו בידו, והוא המטה שהיה ביד כל מלך ומלך עד שחרב בית המקדש ונגנז, ועתיד לימסר ביד מלך המשיח ובו עתיד לרדות את עו"א
The Staff of Your Strength G-d shall send forth from Zion. Which staff is this? This is the staff of Jacob about which it is said: "Because with my staff I crossed this Jordan." And this is the staff that was with Judah [as it is said:] "And your staff that was in your hands." And this was the staff that was in the hands of Moses [as it is said:] "And the staff of G-d in his hands." And this was the staff that was in the hands of Aaron [as it is said:] "And Aaron cast down his staff." And this was the staff that was in the hands of David as it is said: "And he took his staff in his hands." And this is the staff that was in the hands of every king until the Beit Hamikdash was destroyed and it was hidden. And it is promised to be given over into the hands of the King Messiah and with it, [the King Messiah] is prophesied to strike down the idolaters.
Comment: Excellent answer. Based on the last line, it would be included with those things hidden at the direction of Yirmiyahu the Prophet. By an chance, did you check the text in Sefer Emek HaMelech? That is the list associated with the Copper Scroll from Qumran.
Answer: This is something I typed a bunch of years ago.
Comment: Instead of Yoma how about Bamidbar 17:25?
Comment: The passuk tells us it was there in his time ,the gemera tells us eventually what happens to it ,that it gets hidden.

What became of Moshe's staff?


Delete all level child item using sql query

Question: I have a table where I have menus listed where I can insert and delete.
Structure goes like:-
ID  Name                  ParentId
1  1. Home                    0
2  2. Products                0
3      a. SubProduct1         2
4      b. SubProduct2         2
5         i. Subsub           4
6         ii. ......          4
7  3. About                   0

Top-level menu ParentId is always 0 as displayed in 1, 2 and 7.
Child level items would have ParentId of their parent for ex. Subproduct has 2 as its parentId.
When I delete menu item that time all level child item should be delete irrespective of there levels using SQL query.
There can be any number of levels
The levels can go upto subsubsubsub...... any number.
Answer: How about this query:
DECLARE @DelID INT
SET @DelID=1

;WITH T(xParent, xChild)AS
(
SELECT ParentID, ChildId FROM Table WHERE ParentID=@DelID
UNION ALL
SELECT ParentID, ChildId FROM TABLE INNER JOIN T ON ParentID=xChild
)
DELETE FROM TABLE WHERE ParentID IN (SELECT xParent FROM T)

Answer: You can use a common table expression to get all the heirarchy items from the item you want to delete to the end of the tree hten
;WITH ParentChildsTree
AS
(
    SELECT ID, Name, ParentId
    FROM MenuItems
    WHERE Id = @itemToDelete
    UNION ALL
    SELECT ID, Name, ParentId
    FROM ParentChildsTree c
    INNER JOIN MenuItems t ON c.ParentId = t.Id
)
DELETE FROM MenuItems
WHERE ID IN (SELECT ID FROM ParentChildsTree);

Here is a Demo.
For example if you pass a parameter @itemToDelete = 4 to the query the the items with ids 2 and 4 will be deleted.
Comment: You can't delete directly from a recursive CTE.


How to create multiple layers from a single csv file in QGIS?

Question: I have one csv file that holds coordinate point data for different vehicles (below is an image of the csv).  I want each vehicle to have its own layer when I upload the data as a delimited text file. How can I do this without uploading the data for each vehicle as a separate file?
Here is how I would want the data to look.
Answer: You can get the appearance you want without having a layer per vehicle. Instead, just symbolize the layer with a different symbol/color for each vehicle.
After loading the CSV file, go to the layer properties style pane. Select categorized for the symbol style and VID for the column. Click on classify and then adjust the colors if they're not to your liking.  (This is for 2.X - I'm not running 3.0, so there might be some difference in the interface.)
Comment: The file is quite large (401 KB) and my computer stalls QGIS whenever I try to upload the entire file. Does anyone know of a way I could fix this other than by bisecting the file and uploading it in 2 parts?
Comment: 401KB is not a large file. I just tested adding a 6.7MB file, ~46K records, 18 fields. The dataset loads and displays in 2-3 seconds. This is on a 5+ year old i7 laptop running QGIS 2.18 under Windows 7. If you're willing to place your file someplace on the web, I'll try loading it.


What is the root of "El bokeh wall" naming?

Question: I've found that bokeh wall in some sources is referred as El Bokeh Wall. I wonder: why is that? Searching gives no answer. Is it in spanish or something else?
Example of using "El Bokeh Wall": http://www.diyphotography.net/el-bokeh-wall/
Comment: All the potential sources for the term 'el bokeh wall' I looked at seem to lead back to that same article.  Either way the etymology makes no sense since Bokeh roots in Japanese and El would be Spanish/Portuguese.
Comment: @JamesSnell I'm pretty sure that's all there is to the answer. Unless, Flame, you've seen this somewhere else?
Comment: @mattdm After additional research I can't find any other sources. It seems that it's only author of that article calls this technique that way. Alright, I can accept an answer if you post it.
Answer: The answer from Laya himself: "The el doesn't have any meaning. Haha. Just wanted to call it the el bokeh wall". Great mystery resolved :)
Answer: Wild guess based on the fact that the the author is named Laya.
I wonder if "the El bokeh wall" -- which the author says is naming by himself

I call it "The El Bokeh Wall"

-- simply stands for "the effect given by a background wall where bokeh plays a predominant role made by someone whose name begins with L".
Note that the author is based in the Philippines where spanish is not unheard of, so it could well be a play on words.
Comment: It absolutely is an answer - I missed the part in the article where the author says they're naming it.
Comment: I also note that this is a wild guess and so maybe it doesn't deserve to be an answer. If you feel so, I will remove it.
Answer: I did some digging around on this and all the potential sources for the term 'el bokeh wall' appear to eventually lead back to that same article which suggests that the term was coined by the author.
Since Bokeh is Japanese and El would be Spanish/Portuguese, the etymology of those words doesn't lend support to the term being coined by a native speaker of either and there are previous examples of people using 'El' as an alternative for 'the old' as a reference to something familiar (as in to give them 'the old 1-2'.)
But... it's always worth dropping the author a line an seeing what they have to say.


Buddhist's teaching on grief?

Question: Was there any wisdom, any words of clarity about how to handle grief in the Buddhist scriptures or in a good teacher's interpretation? Is grief a unique mind state? Is it lobha based?
Comment: There was, and not asked for the first time. Gone isn't to avoid of what has become. So why again?
Answer:
Grief Management

AN 5:49 tells of how King Pasenadi happened to be in the Buddha's presence when one of his courtiers came and whispered into his ear that his favorite queen, Mallikā, had just died. Overcome with shock and sorrow, the king could do nothing but sit there brooding, his shoulders drooping, at a loss for words.

The Buddha's immediate response was to teach him three things to do to manage his grief. The first was to reflect on the universality of loss. No one anywhere, no matter how powerful, can arrange for what is subject to change not to change, or for what is subject to death not to die. To the extent that there are beings—past, present, and future—change and death happen to all of them. This thought helps take some of the personal sting out of the loss, allowing you to acquiesce to what has happened and not to waste energy in trying to undo what can't be undone.

The second step the Buddha taught to the king was that as long as he saw that traditional funeral observances performed a useful function in giving skillful expression to his sense of loss and to his appreciation for the person now gone, he should arrange them. The Buddha never advocated that his listeners try to smother their grief with feigned indifference. As long as they felt a need to express their loss, they should try to do it in a skillful and healing way.

Among the observances he mentioned as potentially useful were eulogies, donations, and the recital of wise sayings. These three activities have since formed the core of funeral observances in many Buddhist traditions. If you actually want to help the person who has passed on, you make gifts and do good in other ways. Then you dedicate the merit to your loved one. To heal the wound in your heart, and to encourage goodness in the people still alive, you express your appreciation for your loved one's goodness. To remind you of the continued value of Dhamma practice, you listen to passages of Dhamma. Weeping and wailing accomplish none of this. They destroy your health, cause distress to those who love you, and please those who hate or despise you.

The Buddha mentioned this last point as motivation for gathering energy for the third step, which is to remind yourself that there are still good things to accomplish in life. For the sake of your true well-being and that of others, once you've skillfully expressed your appreciation for your loved one, you need to get back to the good work that the loss has interrupted.

The Buddha gave just an outline explanation of these three steps to Pasenadi, perhaps assuming that the king would know how to fill in the details, especially for steps one and three. But our discussion in Chapters Three and Six should allow us to fill in the details ourselves.

With regard to the first step, reflecting on the universality of loss: In light of the practice of the brahmavihāras, when you think of all the beings everywhere who have suffered loss, the obvious response should be compassion. When you think of how unavoidable and pervasive loss is throughout the cosmos, it helps to broaden your heart and to enlarge your compassion for the suffering of others. At the same time, the act of broadening your perspective on others' loss and grief helps you gain some distance from your own. You pull out of your grief, not by denying it—for that would be inhumane—but by turning it into a more healing, expansive, and uplifting emotion, one that acknowledges suffering but, instead of being swallowed up by it, allows the mind to grow larger than its sufferings and to manage a more ennobling and nourishing response to them.

From this enlarged perspective, you can gain a broader sense of what needs to be done in the third step of grief management, reflecting on what good work you still have to do in life. In the words of the question that ended the Buddha's conversation with Pasenadi, you should ask yourself, "What important work am I doing now?" The wise response is not to define "important" in terms of the pressing responsibilities of the daily grind. Instead, you think about what's important in terms of the future course of your life as a whole."

by Ven. Thanissaro Bhikkhu "Grief for the Loss of a Loved One"
Answer: The Buddha speaks about grief in AN 5:49. This search turned up a few others that also may help shift perspective, and provide a little relief.
Answer: Grief vanishes once you see through the eyes of Dhamma. What has a beginning must have an end. So why grief?
Also forms is not me , mine or myself.
Feelings are not me , mine or myself.
Choices , perceptions and consciousness are not me mine or myself. So why grief ?

Buddhist's teaching on grief?


What is the closed form solution for the inverse CDF for Epanechnikov

Question: Is there a closed form solution for this inverse CDF?
Answer: You mean for a random variable with a single Epanechnikov kernel as PDF? Well, the PDF is $\frac{3}{4}(1-u^2)$, so the CDF is $\frac{1}{4}(2 + 3 u - u^3)$. Inverting this in Maple leads to three solutions, of which  $$u = -1/2\,{\frac { \left( 1-2\,t+2\,i\sqrt {t}\sqrt {1-t} \right) ^{2/3}+1 +i\sqrt {3} \left( 1-2\,t+2\,i\sqrt {t}\sqrt {1-t} \right) ^{2/3}-i
\sqrt {3}}{\sqrt [3]{1-2\,t+2\,i\sqrt {t}\sqrt {1-t}}}}$$ seems to be the right one (where the third roots return the main branch). Of course this is a real value for real values of $t$ between 0 and 1; I currently don't have time to make this come out right but I'll try and revisit in a couple of days. If someone else sees it, it would be great if you could leave a comment.

Note whuber's comment below for a much nicer formula:
$$
u(z)=2\sin\left(\frac{1}{3}\arcsin(2z-1)\right)
$$
for $z\in[0,1].$
Comment: Use the trigonometric method for this one and then perform a little algebraic simplification.  About the shortest way to express the solution is $u(z) = 2 \sin \left(\frac{1}{3} \arcsin(2 z-1)\right)$.
Comment: @whuber thanks.  The u(z) you provided seemed so simple in comparison to the other that it was hard for me to understand that they are the same.  Just plotted both and indeed they are the same.
Comment: I'm afraid this is a bit overwhelming.  In your u(z) the z refers to what?  Some transformation?
Comment: @rmarimon It's the inverse CDF: that's what your title asks for, right?  It is *identical* to the formula @Erik gives in the range $0 \le z \le 1$, which are the only values that matter.
Comment: @whuber Is there an expression fo the inverse cdf, around mean point $x_0$ and bin width $h$ using your trigonometric simplification?


Excel Export: Text Objects in title band or groupheader band get their own separate columns

Question: I need to have QuickReport export to XLS files,
The problem is that I get empty columns in between my data objects,
That happens because while the stream is being created, columns are set
according to the objects position from top to bottom, in such a way that
if an objects left position is not set to the exact same position
as a detail objects left underneath it, that object will get
its own separate column, which will then result in empty cells underneath it
which can otherwise be occupied by detail objects.
An example would be: if the title was "Customer List" and the two detail columns
were "Customer Nr" and "Customer Name", the title would be placed in say B1,
then the two detail objects would receive A2 and C2. What I want though is
to for them to receive A2 and B2:
<code>~~~~~~~~~|Customer List|~~~~~~~~~~~

CustNr~~~|(Empty Cell)~~|~CustName~~ ->Not good (This is what I'm getting now) :(

~~~~~~~~~|Customer List|~~~~~~~~~~~~~

CustNr~~~~|CustName~~|~~(empty Cell)} ->Good (This is the wanted result) :)
</code>
I was thinking theoretically, what needs to be done is to not have the
head band taken into consideration when determining the max number of columns,
but I have no idea how to achieve that.
Comment: Is there a particular reason that you still use Delphi 4?
Comment: Yes, delphi4 is the developing enviorment for the source of the software marketed by my employer.
Answer: easier solution.
create two column headers.
first column header will get
~~~~~~~~~ Customer List ~~~~~~~~~~~~~
second column header will get
CustNr~~~~CustName ~~~~ (empty Cell)}
each will be exported as a new line.
problem solved.


Should I let the committee know that they accidentally mentioned two deadlines for a job application?

Question: I applied for a tenure track job recently. There were two deadlines mentioned in their advertisement (on mathjobs), one was Oct 1 and the other was Oct 15. I did not notice the Oct 1st one and applied on Oct 15. I never received a call from them, so out of curiosity, I looked at their job ad and found out about the two deadlines. Can I email the hiring committee chair and let them know about this situation and ask whether or not my application is being considered? If so, what would be the appropriate language? I do not want to come across as someone who wants to take advantage of it. I genuinely overlooked the earlier deadline.
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Answer: Yes, you can just ask, saying that you noticed two deadlines listed but only after you applied by the second one. Ask if there is any problem with your application because of this.
A short email is really all that you need.
Answer: It is likely the search chair has already received 30 emails about their typo.    Reminding them of their mistake is unlikely to benefit you.  Do not email.
Comment: @paulgarrett, actually it is terrible advice. The reason for writing isn't to inform them, but to seek their assurance that you are under consideration. If they get 30 emails it is their own fault and they can easily stop the flood by simply informing everyone applying during the interim period of their status. They should have done so after the first email. The only way this advice could be "correct" here is if other people don't do this. If everyone takes it, then no one informs the institution.
Comment: @Buffy, yes, _if_ everyone were to take this advice, it wouldn't be good. That's not quite an argument for _no_ one taking the advice. Hard to know, I think.
Comment: This is certainly correct... though, it's not clear to any of us whether the questioner's situation will be altered because of it.
Comment: @Buffy I see no value in "assurances."
Answer: You can send an email but I suggest to put effort for searching other positions that are currently open and accept applications, instead of trying to recover the one that probably would lead to dead end. I don't wanna be so pessimistic but you should become used to not hearing back from whatever job that you applied regardless of if your application is strong or weak, or if it is submitted within deadline or not, or it has all the required documentation or not, etc. Unfortunately it's the way it works for pretty much everyone these days inside/outside of academia.


Can computers only add?

Question: So recently I've been involved in a discussion and I was told that literally the only thing computer can do is addition. Is that true? What about logic operations? Aren't they performerd by physical logic gates?
Comment: Computers can do more than only add.  For example, in addition to logical operations that you mention, they can execute branching instructions. Besides, addition **is** ultimately implemented using logic gates (just like every other digital computation). If $x$ and $y$ are one-bit numbers then $a+b$ can be represented using two bits $z_1 z_0$, where $z_0 = x \oplus y = (x \wedge \overline{y}) \vee (\overline{x} \wedge y)$ and $z_1 = x \wedge y$. See, e.g., [here](https://en.wikipedia.org/wiki/Adder_(electronics)#Half_adder).
Comment: Computers essentially do NAND operations ($\overline{a\land b}$) in logical gates. This is enough to implement any computation in the world.
Comment: As @YvesDaoust indicated, in the CMOS process, arithmetic and logic circuits, including addition circuits, are essentially built out of NAND, NOR, and NOT gates for reasons of solid state physics. Non-monotonic gates (e.g. XOR) are possible if you appropriately buffer the output, but details. Whoever told you that was wrong; a look at any CPU's instruction set reveals a lot of logic and bit manipulation instructions. However, more complex functional units are often made from adder circuits these days, such as multiplication units. See, for example, https://en.wikipedia.org/wiki/Wallace_tree
Comment: See https://en.wikipedia.org/wiki/Instruction_set_architecture
Answer: You know something about logic gates since I see them in your question.  I believe that computers can do much more than add, but let me play devil's advocate and try to show you that we could think of most of what computers do is adding.
So the main logic gates in classical computers (the ones that use electricity) are "and gates", "or gates", and "not gates".  The "and gate" takes two bits and produces a one if both input bits are 1.  We could say that this computes the addition of two bits and outputs a one if adding the two bits equals 2.  We can prove this by checking each case.  If both bits are 0, then clearly their addition does not equal 2, so it outputs a zero.  If only one of the bits is 1, and the other bit is zero, these bits only sum to 1 and so the output is also a zero.  Finally, if both input bits are 1, their sum is 2 since 1+1=2, and so the gate outputs a 1.
"Or gates" produce an output of 1 if the sum of the input bits is 1 or more.  So checking our cases, if both bits are zero, than the sum is 0 and so the output is 0.  If the inputs are 1 and 0, then the sum is 1 and so the output is 1.  If both input bits are 1, then the sum is 2 and the output is 1.
The "not gate" may be the trickiest gate to think of in terms of addition.  The not gate only has one input.  It basically switches the input, so its output is "not" its input.  We can think of this as adding one, but with a carry bit.  If the input is 0, then the output is 0 + 1 = 1.  The tricky part is when the input is 1.  We can do this, but only in "binary".  In binary, adding one plus one gives you 2, but 2 in binary is written as 10, so that the ones digit is zero, as desired.
I think that for arithmetic, @Pseudonym's links show you how to do that.
Their are instructions that tell the computer to go to different parts of the computer program or code.  A lot of these use comparison, which use the logic gates I mentioned above, and Boolean algebra.  For example, the computer may use an instruction that tells the computer to go to a different part of its instructions if a number is larger than 10.  The computer does this by first adding -10 to the input, and then using Boolean algebra to test if this result is greater than zero, which is easy for a computer.  It can use Boolean algebra and logic gates for this.
Computers also do things like copying registers (which are just numbers stored in the processor).  While this doesn't involve addition, you could think of it as a way of putting a number into the computer's processor so that it can add something the next time that the processor does something.

Well, hopefully this wasn't boring, and that you learned something.  There are many ways to think of a computer, and scientists have actually put a fair amount of time into actually defining what a computer is.  What scientists came up with is a Turing machine, named after Alan Turing.
Answer: Computers can perform any algorithm using only addition (or even using only the x86 MOV instruction).
But what they have is a set of instructions aiming to maximize performance.
A computer that only use the add operator will be slow in doing multiplication. To get around this, computers have hardware-implemented functions performing binary multiplication and division. But actually the most of instructions executed in the hardware by the code are moves, branches and add/sub operations, as you can see in SPEC CPU2017 Benchmarks.
Logic gates are part of the processor components, but also can be implemented in software, for example: to compare two numbers for equality we can subtract them and check if the result is zero.
Answer: I think the comments answer your question. To add some more context, it also depends on what you define as a computer. If you consider FPGAs and ASICs computers, then there are hard-coded circuits that can perform a variety of logic operations with transistors.
Answer: If "the only thing a computer can do is adding", then a computer can do everything it does just by adding.
But by adding you can't change a 1 to a 0. There are many things you can't do just by adding.
What you do need to do anything a computer can do: Perform a NAND operation. Select memory. Produce electrical signals that can be detected outside. (Open to suggestions what else would be needed).
Comment: What ? In binary $1+1=0$ !
Answer: Presumption: We're talking about CPU.
At the lowest level, we have only logic gates. [We may go even lower than that ;) ]. In that sense even add is a combination of logic operation, else CPUs have much more instructions besides addition.
For arithmetic: subtraction can be represented as a + (-b), multiplication as series of addition and division as series of subtraction. How do we represent negative numbers that's another topic (r's complement).

Can computers only add?


Is there a way to block all TOR traffic incident on my public servers?

Question: I don't want any connections coming from a tor network to be accepted by my servers.
Answer: See I want to ban the Tor network from my service from the official Tor documentation.
The Tor project provides a list with IPs of all the exit nodes that can access your service, use query string parameters to tell it the IP and port of your service, example : https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=22.214.171.124&port=443.
You can then loop through the results, split them each newline, ignore lines starting with "#" and finally adding a -J DROP IPtables action to each one of them or using an IPset which would give you better performance with such a large number of hosts, something like this should do the trick :
ipset -N tor iphash # create a new set named "tor"

# get the list, don't forget to put your service's IP in the query string
curl -s https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=18.104.22.168 | sed '/^#/d' | while read IP
do
  # add each IP address to the set, silencing the warnings for IPs that have already been added
  ipset -q -A tor $IP
done

iptables -A INPUT -m set --match-set tor src -j DROP # block any IP in this set in IPtables

(source)
They also provide a DNS based list but it's still in experimental stage so I suggest you stick with the first option, it's also easier to work with.
Comment: Any DNS-based (or hash-based) solution is going to need routine updating.  If you're okay with that, then carry on.  Otherwise, you need a Layer 7 aware firewall OR, you could hack something together like this bloke: http://community.spiceworks.com/how_to/show/3120-how-i-stopped-tor-traffic-in-our-network


Mavik Thumbnails for Joomla 3

Question: Is there a way how to use Mavik Thumbnails plugin on Joomla 3?
Comment: From The Joomla! Extensions Directory - http://extensions.joomla.org/extensions/photos-a-images/images/articles-images/6263
Answer: You can download a test version of Mavik Thumbnails 2 from http://www.mavik.com.ua/download/mavikthumbnails_2.zip. This version is compatible with Joomla 3.
Keep in mind that it's still in beta (as far as I understood from the ukranian forums). I have not used it myself, only installed, but it does install without problems in Joomla 3.3.3.
Answer: I did some research and it seems that original Mavik Thumbnails are very easy to be rewritten for Joomla 3.
Here is the reult https://github.com/aidik/Mavik-Thumbnails-J3/releases
It is not much tested, but it seems to work.

Mavik Thumbnails for Joomla 3


How to test a ".xap" file on a Windows Phone 7 device?

Question: Please tell me step by step process for testing a .xap file on a Windows Phone 7 device?
Comment: You've asked 46 questions and accepted 2 answers, were the answers to all the others questions really that unsatisfactory?
Answer: Firstly you must ensure that you meet the following prerequisites:

Your Windows Phone device is developer unlocked using the Microsoft Developer Registration Tool or Chevron WP7 Labs unlocker tool.
You have the Zune client software installed
You have the Windows Phone development toolkit installed

If you have all that sorted, you can then use the Application Deployment Tool to publish your .xap file by:

Connecting your phone to the computer
Open the Application Deployment Tool
Select "Windows Phone Device" from the drop down
Select your .xap file
Click Deploy

There's more information on MSDN
How to: Use the Application Deployment Tool for Windows Phone
Comment: No, you can't.  The phone has to be unlocked in order to deploy a xap file.

The only way you can deploy to locked phones is to go through the Marketplace.  There is now a beta feature in Marketplace, which will allow you to give a link to the file to up to 99 users, whose Live accounts you have to list (to give them permissions).  In this way they can test without their phones being unlocked.
Comment: can i directly test the .xap file in real device without having all above requirements.in android directly they can install apk file.like that directly can we install .xap in our phone ?
Comment: There is also the ability to publish a "private" application which will not be searchable in the Marketplace. These private applications can only be installed if you have a direct link to them. This would allow a company to distribute applications which don't apply to the public at large.
Answer: There are 2 ways to do this

Using Visual Studio as described here.
Use the Application Deployment Tool as described here.

Note that deploying to a device requires the device to be developer unlocked and registered. For this, you must first get an App Hub account.
Answer: 1.Need Developer Account First.
2.Zune installation.
3.After Activation of the Account need to register your mobile using windows phone registration tool.
4.Once register your mobile you can able to test the apps in device.


Tool to back up mac mail folders

Question: I have several labels. That gives Apple Mail a big reason to maintain a large number of folders. I am looking out for a solution that can backup my Mac Mail folders.
Answer: I have been working with a paid software named Mail Backup X. Though not in hundreds, I too have quite many mail folders. Amazingly Mail Backup X backs up mac mail folders and all their emails perfectly. The tool has an option to auto update the folders. That is if you add new folders to your account, that will be instantly reflected in your Mail Backup X Viewer, and thus to your back up locations.
For reference, you may read this article:http://www.mailbackupx.com/how-to-scenerios/how-to-backup-apple-mac-mail-mails-on-mac.html
Comment: thanks, that helped. it backed up all my mails with the right order of labels and folders. Thanks for the recommendation

Tool to back up mac mail folders


ROTH IRA Contribution (Income Too High) How will I know about penalty?

Question: I am currently looking into 2021 Tax and arranging all the documents. I contributed $6000 (myself) and $6000 (spouse) for Roth IRA contributions. Now I am calculating my income for 2021 Tax and it seems like I will be pushing over 198K. I think my income may come out to be around 204K. I have a side job which also earns income and that has pushed me over the limit. What should I do in this case? I know that I will have to pay a 6% penalty but how do I know about this penalty? I mean how will I know and whom should I pay?
Comment: Thanks I have updated the question. Yes 2021.
Answer: If you already know that you'll end up above the limits, I suggest you call your custodian ASAP and ask them to re-characterize the contribution to Traditional. Then (assuming you have no other Traditional IRA amounts), immediately convert back to Roth (ideally before 2022 starts, in case BBB passes).
This way you don't end up paying any penalty, and end up with the same Roth IRA you intended.
If you already have Traditional IRA amounts, conversion becomes complicated because of proration rules, but you can just leave it in Traditional then.
Remember that the 6% excess contribution penalty is charged every year until you withdraw it, so you better do recharacterization.
Comment: @MaryDoe the custodian should know since it is a legally allowed transaction that they have to be able to support. Once you re-characterize it, it becomes a regular Traditional IRA contribution. Since you're unable to deduct it due to income limits, you'll have after-tax basis in your IRA and you'll use the form 8606 to track it. You can wait till February, sure, as long as you do this before tax due date you should be fine, but the re-characterization should be before that date, leave the custodian some time to process your request (at least a month).
Comment: @MaryDoe on the opposite, it's designed to avoid taxes and penalties in the exact scenario you're in.
Comment: Thanks! That is a good advice. I already have a Traditional IRA so I can just re-characterize Roth IRA to Traditional IRA and leave it there. I can take the whole amount $6K for myself and $6K for my spouse and re-characterize it. Will the custodian know how to calculate the gains on that amount because I need to re-characterize the gain also. Also, since my contribution to Roth is post tax what will happen once it goes to Traditional IRA.
Comment: Another question. Do you think I should wait till Feb 2022 when I have all the documents and I will have better idea of my Modified Adjusted Gross Income. Maybe my MAGI will end up being 190K (married filling jointly) which means I am still under the limit of $198K.
Comment: Thanks! I will wait till Mid Feb to see how much is my MAGI which should match my AGI. If it is over 198K (married filing jointly) then I will take steps for re-characterzing it.
Comment: Will the re-characterization of Roth IRA to Traditional IRA incur any taxes or penalties that I will have to pay. Thanks!
Comment: Thank you so much! I am forever grateful to you. I am actually going to call custodian in few days and perform the re-characterization.
Comment: One follow up question. I just started the recharacterization and moved $6000 + gains from my Roth IRA account to Traditional IRA. This process will take couple of days. My question is that if the gain was $500 on my $6000 contribution then do I have to do anything with the gain like taxes OR I don't pay taxes since it is traditional IRA and I pay taxes when I take them out at retirement.
Answer: When you file your federal income tax return for the year, if you have an IRA penalty for that year, you must fill out Form 5329, and the penalty is added to the total taxes for the year on your federal income tax return (Form 1040). As with income taxes, you are supposed to have withheld or have paid estimated taxes through the year to reach approximately the level you needed to have paid, and when you file your tax return, any excess you have paid will be refunded, and any deficit you will owe (and if you owe too much there can be an underpayment penalty). A penalty will increase the tax you will owe, and therefore decrease your refund or increase the amount you will owe.
Now, assuming you made the contributions in 2021, and it is before the 2021 tax return filing deadline (April 15, 2022) right now, there are still two ways to avoid an excess contribution penalty:

You can withdraw the excess contribution (plus earnings attributed to that contribution) before the tax filing deadline, and it won't count as an excess contribution. You will have to pay tax on the earnings. I am not sure if there will be an early withdrawal penalty on the earnings.
You can recharacterize the Roth IRA contribution into a Traditional IRA contribution before the tax filing deadline. The IRA custodian will transfer the contribution, plus earnings attributed to the contribution, into Traditional IRA. It will be treated as if you guys contributed to Traditional IRA to start with. Since Traditional IRA does not have a contribution income limit, there will not be an excess contribution penalty. (There is an income limit for deducting the contribution if either of you contributed to a 401k, however. But if that's the case, it just means you have a non-deductible Traditional IRA contribution.) You may then, if you choose, convert that money into Roth IRA, paying tax on the earnings, effectively executing a belated "backdoor Roth IRA contribution". Roth IRA conversion also has no income limit, though pending legislation may affect wealthy people's ability to do this in future years. But only do the conversion if you have no pre-tax money in Traditional/SIMPLE/SEP IRAs, or the pro-rata rule will get you.
Comment: @MaryDoe T Row Price, will not know about any penalty. They don't know how much you make, and they don't see all your investments.
Comment: Thank you so much for the detailed answer. You said "If you have IRA penalty for that year". So that is where I am confused. How would I know that I have IRA penalty? Will I receive a letter of will the T Row Price tell me that you have penalty? How does that work.
Comment: @MaryDoe: Read [Publication 590-A](https://www.irs.gov/forms-pubs/about-publication-590-a) for the rules on contribution limits, and the tax on excess contributions.
Comment: Thanks! I still confused as how will I know that I have made excess contribution to the IRA. Is it when I file tax and I see my MAGI to be over 198K (married filling jointly). If that is the case, I should call T Row Price and withdraw or transfer excess contribution to Traditional IRA account. How how will I know how much in excess or should I just move all $6K for me and $6K for my spouse to a traditional IRA.
Comment: If the OP has other (pre-tax) money in her Traditional IRA, it is not possible to do "a back-door Roth IRA contribution" of _just_ the  nondeductible contribution into the Traditional IRA.  All money coming out of a Traditional IRA is _prorated_ between the  _pretax_ part (deductible contributions plus _all_ earnings) and the _basis_ (the nondeductible contributions, if any. Also, _all_ Traditional IRA accounts (regardless of who the custodian is) are considered as _one_ IRA by the IRS, and so, starting a separate Traditional IRA account with just the nondeductible contribution does not help.


Rolling releases starting version

Question: Is it important which version of a rolling release I start from? For example, if I download a version of Arch Linux 6 months older than the latest on the website, and then run update & upgrade, isn't it the same of running the same command on the latest version?
Comment: Probably yes, but the evil is in the details
Comment: I am pretty sure Debian is the exact opposite of a rolling release. The Debian team focuses on stability and only make a release when it is ready. Rolling releases do not have versions.
Comment: Arch Linux then
Comment: @StrongBad Debian testing is pretty close to a rolling release...
Comment: @StephenKitt sure, but you do not install Debian testing from a downloaded  installer so it does not make much sense for this question.
Comment: @StrongBad There are testing installers, available *e.g.* from http://cdimage.debian.org/cdimage/daily-builds/daily.new/current/ (the site mentions Jessie but the images install Stretch).
Answer: In a perfect and smooth world, you would be able to start with a several years-old version and get the same thing after update as if you had started with the very last version available.
But as Basile said, the evil is in the details. The Arch wiki recommend to do regular upgrades, mainly to avoid having plenty of manual interventions required at the same time on different packages.
Most of the time, when you upgrade your system, everything will work like a charm. But it only needs a few tricky updates (like the systemd/SysV) among the hundreds to get a real mess. And the chance of having such updates grows with the age of the system you upgrade.
So, maybe starting from a monthly-old system will work fine, but I don't get the point of taking the risk to loose time doing boring stuff to get things work when you just have to download a fresh iso to reduce this risk dramatically.
Comment: The Arch installer does not install the packages from the installer, but rather fetches them from the package repository.
Comment: Yeah, so? Saying that you will get the same state after an upgrade no matter the age of the system you start with is simply false because some updates require manual intervention, hence the state of a system depends on its history, not only the state of the repository.
Comment: But with Arch there is no reason to do an upgrade immediately after installation no matter how old the installer is.
Comment: After reading it again, I am not sure whether Dom's question is about the version of the installer or the version of Arch you start with. If this is the installer, I am indeed off topic for Arch in particular (but my answer applies for distros with an installer embedding and using old packages).
Answer: Arch Linux periodically releases an installer image. The Arch installer, unlike the Debian installer, always installs, or attempts to install, the newest version of Arch, regardless of the "version" of the installer (assuming a somewhat recent installer from the past few years). The Arch installer downloads the newest version of packages from the Arch repos and therefore no matter what version of the installer you use, you will end up with an identical system.
The Debian installer installs a specific version of distro. Upgrading from, for example, old stable to stable, should theoretically give you an identical system, but there could be differences in the default packages installed. There could also be incompatibiities in the upgrade pathway, although the Debian team tries to avoid these issues. Using the Debian installer for stable, but a slightly dated point release, will likely install the core packages from the installer image. Depending on the installer type, it might install all packages from the image or it might install the most recent packages from the stable repositiory. After installing, you can update the packages to the most recent version. This is a much more throughly tested procedure and will like result in a identical system independent of the installer version.

Rolling releases starting version


How to control IE-hosted java applet programmatically?

Question: I've got a need to navigate java-applet programmatically and I am not that keen on Java platform. So lets assume I've got IE process stated with appropriate java applet loaded. Next I need to have some actions taken to this particular applet, like, lets say, sending WM_COMMAND to dialog along with BN_CLICKED code like I do with Windows in C. Assuming it's not a regular window I can refer to using HWND, I would like to ask someone for recommendations on how to do this.
Comment: Depending on what you want to do I would attempt to download the applet, decompile it and interact with it by including it in a Java program. If that's not a possibility, you can still try to download it and run it locally to get rid of having to run it within IE.
Comment: Unfortunately I do not have experience with any other ways. I however found http://stackoverflow.com/questions/11342150/could-someone-suggest-a-test-automation-tool-to-automate-java-applet-window which suggests FEST, but that's also in java... I'm sorry I can't help you further.
Comment: Ok. Maybe any other suitable idea on how to automate java applet? Any applet container? I don't want to decompile applet since I'm not java-developer and the time seems to be running out...
Answer: As I understand you want to navigate (sending keystrokes and mouse clicks) a java-applet on the client side. It depends if you own the applet (say: you have the code and can change it) or if the applet is closed source and you just want to remote it.
In the first case use javascript to automate it. Change the containing HTML page to include some Javascript and pass parameters to the applet as described in the Java Tutorials.
If the applet accepts parameters, but you cannot change the HTML page, use a GreaseMonkey alternative for IE.
Your other approach (sending Windows Messages from an extern application to IE) should also work. Start Spy++ (use the 64bit version if you are using a 64bit Windows), choose "Search - Find window..." and drag the "Finder Tool" icon over the applet and release it. You will see then the HWND and if you press search you will see the window inside IE window hierarchy.  So, yes you can send keystrokes and mouse clicks to a browser.
If I would automate the browser I would use Geb. You code a "web site test" in Groovy, just look at the Geb index page.
Answer: You could try to record a navigation through the applet with FireFox + "Selenium IDE" then export it and try run it in a Java Application with the Selenium IE WebDriver.
Information about Selenium can be found here : http://docs.seleniumhq.org/
Maybe this question will also help you : How to automate Java applet?


Boolean function in terms of K-map

Question: I am working on a Boolean function question. I have produced a truth table out of a 4-variables K-map. How do I state the Boolean functions in canonical form? Must I include both SOP & POS? Also, how do I determine the minimum number of basic logic gates by minimizing the Boolean functions using K-map method?
Answer: SOP & POS: Ask your instructor.
Minimum gates: yes, minimizing terms using K-Map is a good start ... but it may not minimize the number of gates. For example, through the K-map method you may find $ab + ac + d$ as the minimal SOP, but $a(b+c)+d$ has fewer gates.  You wouldn't find this using the K-Map since this is not in SOP or POS.

Boolean function in terms of K-map


two external monitors

Question: Can i run two external monitors from a dell 1525? I already use one connected via hdmi, and plan to connect another (if possible) via the same method - using an hdmi / vga adapter, as the 1525 only has a single hdmi socket. I have UltraMon installed. Any help much appreciated.
Answer: According to your specs your laptop has an Intel 3100 and according to Intel's specs it supports 2 displays:

Intel Graphics Media Accelerator X3100
  supports dual independent displays
  using an integrated 3D graphics engine
  with eight graphics cores.

So I would say yes.  Also on the Dell page it lists that your laptop has an HDMI and VGA output, so you should be able to connect one monitor to the HDMI and one to the VGA output.  Since the X3100 supports 2 displays, you laptop's display won't be on when using two monitors.

two external monitors