Prove that $Hom(V,W)\neq L(V,W)$

Question: Let $V$ a normed space of infinite dimension and let $W\neq 0$ a normed space. Prove that $Hom(V,W)\neq L(V,W)$.
Comment: This is the classical example, the differentiation operator: https://en.wikipedia.org/wiki/Unbounded_operator#Example
Comment: excuse me, i made a mistake.
Answer: Let $\phi:V\to\mathbb{K}$ (where $\mathbb{K}$ is the base field) be a discontinuous linear functional$^{(1)}$. Let $x\in W\setminus 0$. Define $T:V\to W$ by $Tv=\phi(v)x$.
Let's show that $T$ is discontinuous: Since $\phi$ is discontinuous, it is unbounded, so there exists a bounded sequence of vectors $\{v_n\}$ in $V$ such that $\{\phi(v_n)\}$ is unbounded. But then, since $x\neq 0$, $\Vert x\Vert>0$, and it follows that $\{T(v_n)\}=\{\phi(v_n)x\}$ is unbounded in $W$. Thus $T$ is unbounded, i.e., discontinuous.
Thus we found $T$ which is linear and discontinuous, i.e., $T\in Hom(V,W)\setminus L(V,W)$.

$(1)$For example, let $B$ be a basis of $V$. Choose an infinite subset $\{x_n\}\subseteq B$, and define $\phi(x_n)=n\Vert x_n\Vert$ and $\phi(x)=0$ for $x\in B\setminus\{x_n\}$ (and extend it linearly to all of $V$). To see that $\phi$ is discontinuous, note that the sequence $x_n/n(\Vert x_n\Vert)$ converges to $0$ but $\phi(x_n)=1$.
The existence of discontinuous linear functions depends on the axiom of choice. See the question On every infinite-dimensional Banach space there exists a discontinuous linear functional.
Comment: @ArielMarceloPardo It doesn't make sense to say that a vector space is empty (as a set), since one of the axioms states that there **exists** a zero vector. The correct condition is that $W$ is non-zero (i.e., it is contains a vector different from the zero vector).
Comment: why did you edit $W\neq\emptyset$ for $W\neq0$?

Prove that $Hom(V,W)\neq L(V,W)$


How do I scan for viruses with ClamAV?

Question: I installed ClamAV via Terminal (Ctrl+Alt+T) with:
sudo apt-get install clamav

but how can I scan for viruses?
Answer: Terminal
At first you have to update the virus definitions with:
sudo freshclam

Then you can scan for viruses.
clamscan OPTIONS File/Folder

If necessary start with root permissions: sudo clamscan.
Examples:

To check all files on the computer, displaying the name of each file:
clamscan -r /

To check all files on the computer, but only display infected files and ring a bell when found:
clamscan -r --bell -i /

To scan all files on the computer but only display infected files when found and have this run in the background:
clamscan -r -i / &

Note - Display background process's status by running the jobs command.
To check files in the all users home directories:
clamscan -r /home

To check files in the USER home directory and move infected files to another folder:
clamscan -r --move=/home/USER/VIRUS /home/USER

To check files in the USER home directory and remove infected files (WARNING: Files are gone.):
clamscan -r --remove /home/USER

To see more options:
clamscan --help

See:

Latest documentation: PDF | HTML
ClamAV official Wiki
Ubuntu Wiki

Graphical User Interface: ClamTK
ClamTk is a frontend for ClamAV. You can install it via Terminal with:
sudo apt-get install clamtk

You can get the latest version from Bitbucket as Debian package.
There is also a PPA (Outdated):
sudo apt-add-repository ppa:landronimirc/clamtk
sudo apt-get update && sudo apt-get install clamtk

Scan Menu: Here you can choose a file, folder or a device for scanning

View Menu:

Quarantine Menu:

Advanced Menu:

Help Menu: Here you can check for updates.

See:

ClamTk@Sourceforge
ClamTk Help
ClamTk FAQ
Comment: I think it's a mistake to not create at leat man page for clamav, wich is the name of the package.
Comment: If you want to check all files of the system, then you should use `clamscan -r --bell -i --exclude-dir="^/sys" /` because in `/sys/` are no real files and not excluing it would cause reading errors. http://askubuntu.com/questions/591964/clamav-cant-read-file-error
Comment: `sudo freshclam
ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).`
Comment: @Dmitriy You are probably getting this error because `freshclam` is already running. See this answer: https://askubuntu.com/a/909276/338982
Comment: @Dmitriy What has it to do with the answer? It's a specific problem. Maybe you should ask a new question with your detailed problem.
Comment: I commented because this answer seems to not work anymore. At least on Ubuntu 16.04 LTS x64. Or do you say this issue happens only on my installation?
Answer: The accepted answer is a great answer, but every time I reach this page, it's a pain to find the command I want from the clutter of information. So just providing a concise answer to the question:
sudo apt-get install -y clamav; sudo freshclam

To scan all folders in your computer (except /sys):
clamscan -r -i --exclude-dir="^/sys" --bell /

To scan specific folders or files, you have to create a file in which you list out which files/folders you want to scan, and tell clamav where to find that file:
clamscan -r -i --bell --file-list=/home/nav/ClamScanTheseFolders.txt

My ClamScanTheseFolders.txt contained:
/media/nav/someFolder1
/media/nav/someFolder2
/opt/someFolder/somefile

Comment: Nice. But that should be two dashes before exclude: `--exclude`
Comment: @SumitKumar No.  clamscan doesn't need the daemon running.  clamdscan does (but is faster because you don't have to load the definitions every time.)
Comment: There is still an issue with double dashes before exclude. It does not work after copying and pasting into terminal window
Comment: Does this require a running instance of the clamav-daemon ?

How do I scan for viruses with ClamAV?


How to remove a curtain rail fitting?

Question: I am trying to remove a current curtain rail and it's fitting. However once I remove the initial pole and fitting stay I am left with a stud for which there is no apparent attachment method and a plate which seems to have no movement. Any ideas how to remove this with minimal damage? Adding a picture of how it looks following comments to show closeness to wall.
Comment: Jiggle and try to turn it. Either the rod will come off or the base plate will
Answer: The plate is a cover that can be removed, revealing the screws that hold the fitting to the wall.
Some fittings that look like this have a slot or small hole on the rim. You must press a small screwdriver or awl into the hole, releasing an internal catch.
Usually, though, there is no slot, and the cover is held by a spring action. You simply pry it straight off with a butterknife or small screwdriver.
It can be difficult to do this without damaging the wall. Place a scrap of thin plywood, or a flat tool like a trowel or handsaw, between your prying tool and the wall.
Comment: Less commonly there might even be a small setscrew in a hole in the rim holding it on.
Comment: Thank you for your suggestions, have tried twisting and prying unfortunately with no results. Any other ideas would be earnestly received!
Answer: In the end tried to use pliers to twist the sticky out bit and it finally gave a little and I was able to remove the cover plate. Thanks all for your suggestions!

How to remove a curtain rail fitting?


finding a way for a car in a maze using DFS algorithm (C programming)

Question: hello everyone can anybody help me with the DFS algorithm :
Path* agent_DFS (void* arg1,...);
which is written on C program and is about Artificial intelligence which I have to find a way for a car to his goal  ..??
it returns an array of type path
I got absoloutely no idea about that ...
please help me
Answer: Recursion is useful for implementing this.
Remembering if a location is on your current path as you traverse it will help you not to go in circles.  You may also want to remember which addresses that you have not yet been to (interesting paths) and addresses you have already decided were dead ends (or at least not helpful in reaching your goal).
If you are looking for the optimal path then remembering how far (through the maze) each address on a path is from both the beginning and the end (on the shortest path discovered that goes through that address) is also helpful.  The sum of both of these distances should be the same for all addresses along the shortest paths (paths because their could be more than one path with the same distance), by the way.
Answer: In order to know where the car is in the maze with respect to where it came from, it keeps track of all moves made (north, east, west, south).  Whenever you backpedal, it doesn't add to the path, but rather removes from it (what point is there to know that you've been to a dead-end and come back for example?).
Comment: Well, remembering this is useful, so that you don't choose that route again (if you return to a junction).
Comment: Well I suppose it really depends on how the algorithm works.  If you always stuck to the left, it wouldn't matter but then, I don't know how this AI works.


How to add browse button in contacts us form

Question: How to add browse button in contacts us form i want to send browse image in contacts us email with browse image.
Answer: If you look at the Mage_Contacts_IndexController class you can see the template is set in there Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE) theXML_PATH_EMAIL_TEMPLATE is set to contacts/email/email_template. This is set in the configuration area of the admin.
If you head to admin > System > Configuration > Contacts > Email Options you should see the template set in there. In my case this is Contact Form (Default Template from Locale).
This template can be found at  app/locale/en_US/template/email/contact_form.html. Simply add the markup you need in there.
Comment: that i know i want to add browse button & then save or upload that image in to server or sent in to an email


How to make web part with properties for Js Development only

Question: I want to start development for SharePoint with JavaScript, but I am not sure if it provides the same flexibility as the server side development, for example I would like to make a web part with properties, that the web part can read these properties and do something with them, how would I do something like this without using custom web part? I am confused about if using custom web part means server side code or not.
Comment: It really depends on what you really mean by properties and custom web part. There are many out of the box web parts that have different options and properties. However, if you are trying to add javascript to a page, there are a few ways to do it. The most common is a Content Editor Webpart (CEWP). It also sounds like you are referring to having some form of properties that you want to be able to change, but not sure what you are asking there. You can create jQuery plugins that have different properties that you can use, but not sure if that was the angle you were thinking.
Comment: Thanks for your answer. For example, in regular SP development, you can have a web part with properties that user can fill and then you read these properties. We do so by modifying the .cs file for the web part to add the new properties then read the properties in custom code. How do I do the same thing if I want to develop in JavaScript only solution? Is it clear?
Comment: Yes, what eirikb states is correct, but you did not state that you were using 2013. Also, there is a big difference in the cloud version and on premise installs and between 2007, 2010, and 2013. In 2013 App model, there is a major difference in how things work and hosted apps in one of them. One of the major things I dislike about the whole thing is having to rebuild the UI and connect all your different pages together and all sorts of stuff because it doesn't run in the host web. There are ways to make things work, but it is a much different animal than on premise or farm/sandbox solutions. J
Answer: If you are using SharePoint 2013 you can make a SharePoint hosted app which are JavaScript (and templates) only.
In those you can make a Client Web Part, and in these you can have custom properties, like this:
<code><Property
    Name="name"
    Type="string"
    RequiresDesignerPermission="true"
    DefaultValue="Friend"
    WebCategory="Coffeemaker properties"
    WebDisplayName="Your name, please.">
</Property>
</code>
ref http://code.msdn.microsoft.com/SharePoint-2013-App-part-9d83703c/sourcecode?fileId=60479&pathId=1470526092 (Coffeemaker app example)
Comment: Hi, Thanks a lot , that would really be helpful, but how can I make it for on premise as well? I need the same functionality as in Visual WebParts where I can have property and so on, but I don't really want to use custom code, I want to use only JS for it to be used in SPO as well
Comment: A SharePoint hosted solution can be deploy on any 2013 SharePoint, such as on premise. Note that you need to enable apps on your site for it to work.
Comment: Can I use this method without needing to use Apps? for example if I need to make a visual web part for it.


Referencing store config values in phtml templates

Question: I am attempting to modify the frontend output for Print Invoice/Print Order to comply with ATO requirements.
The template in question is app/design/frontend/base/default/template/page/print.phtml
I need to display two fields from the store configuration in the page header, the paths are:
'general/store_information/phone'and'fontis_australia/business/abn'

Both paths are defined and work correctly in transactional emails using markup tags, but in this script I always get null when using getStoreConfig().
<?php echo $this->__('Tel') ?><?php echo $this->escapeHtml($this->getStoreConfig('general/store_information/phone')) ?>

<?php echo $this->__('ABN') ?><?php echo $this->escapeHtml($this->getStoreConfig('fontis_australia/business/abn')) ?>

I have tried a few variations of these 2 lines, but I am new to both magento and php so i would appreciate any help I can get.
thanks
Tom
Answer: I think you can try Mage::getStoreConfig instead of $this->getStoreConfig
Comment: Great. Please upvote or accept as answer if you find it useful
Comment: Good thought.  That works perfectly


Black holes / density

Question: If a star explodes to form a black hole how does the gravitational field become infinite from one state to the next? ie: it seems additional mass has been added or is this simply a function of density?
Comment: Possible duplicates: https://physics.stackexchange.com/q/137618/2451 and links therein.
Answer: It does seem odd that a star that isn't a black hole can explode, and therefore presumbly lose mass, and still form a black hole.
The explanation is that to form a black hole requires a high density not just a high mass. Even a small object such as, well, you or I could form a black hole if compressed enough, though obviously in practice that level of compression is impossible.
The explosion you're thinking of is a type II supernova. This happens because a large star is kept inflated by the heat it generates from fusion in its core. But large stars run out of fuel surprisingly suddenly, and when that happens the star starts collapsing under its own gravity. This collapse compresses the core enough to form a black hole then rebounds to blow the rest of the star to bits as a supernova.
So the black hole isn't formed as a result of the star getting more massive, but as a result of the star's core getting compressed enough to form a black hole.
Answer: This can be understood by showing in general where curvature comes from. Spacetime can curve naturally all on its own even in empty space.
Matter can connect together regions that have two different types of curvature.
One possible type of curvature is the funnel-shaped curvature outside a star or outside a black hole. As the star collapses inwards to for the black hole the location of the matter moves in. This means the location where the two types of curvature can meld together moves inwards.
But the curvature type outside was the funnel curvature, so when it fills inwards it fills inwards with more of the same type and so creates new, and stronger curvature in this region. (and it also actually creates space because this new region of the new type is actually larger than the old region of the bold type).
This is because the type of curvature in empty space is a type that is fully capable of creating more of itself, all the matter does is allow two different types (like the type inside and the type outside the star) to join up.
So as the star collapses the region that is now outside becomes more strongly curved and it persists and survives that way all by itself because it is perfectly natural.
Now eventually the star gets so compact we can't see what is going on inside the star anymore. This is what we call a black hole. Since we don't know what is going on we have to just look at the math because there could be new effects at higher densities we wouldn't know.
At this point, the black hole has formed (because the event horizon has formed) but the singularity inside has not yet formed. The event horizon is not caused by an infinite density or an infinite force or anything like that. The event horizon is what makes it black and we don't actually know for sure if a singularity forms.
The math indicates that we can't see the inside because the path of everything inside that event horizon (even light) is to head inwards and if that is the case it will compress inwards more and more no matter what tries to stop it, so it looks like they will collapse into a singularity. But again, we don't know for sure because we haven't seen it. Unlike the outside which we have seen.

Black holes / density


Signing messages using ETH wallet - etherscan says that the Message Signature Hash is too short

Question: I've got a problem with verifying ETH messages using etherscan.io (and the messages are signed using MyEtherWallet).
The signed message JSON looks like this:
{
    "address": "0xb49d0a635b0ec9508a775ba4f344af3db7293322",
    "msg": "0x656565",
    "sig": "224a0ae6ede23a8666ef8e5a9eb28a354ed24dacc676dd968031993c70ad80e903265341d13a1021a7a3724f276fe153d7b4ac9b25dcea883326efeda43f7e8f1b",
    "version": "3",
    "signer": "mnemonic"
}

When I paste the "sig" into "Message signature hash", I get an error message that it has "Invalid Length".
Strangely, it seems to be missing 2 characters every single time, but when I add the missing characters (and they are within the charset of the hash), in example e1, 11 , b1 , d4 - the verification passes.
Could it be that MyEtherWallet is doing something wrong? Or am I missing something?
I am fairly new to crypto, and I am trying to implement message verification mechanism
Answer: You need to put 0x in front of the sig.


Dought regarding tomcat bin directory & configuring eclispse for tomcat

Question: I had installed tomcat7 in Ubuntu 12.10 by
sudo apt-get install tomcat7
I have two problems..
First one is, When go to the tomcat installation directory i.e /etc/tomcat directory, i didn't find bin directory. Where it is?
Second one is, While configuring Eclipse IDE for Tomcat7 i followed these steps
1) gone to the Preferences
2) On servers tab i choose Runtime Environment
3) Clicked on add button, i had chosen  apache and then chosen Apache Tomcatv7.0 then i have Clicked next.
4) There i have given Tomcat installation directory as /etc/tomcat7 then i got error like following:
Unknown version of Tomcat was specified.
So, please help me to fix these problems......
Answer: I was facing the same problem and the only mistake was to select /usr/share/tomcat7 folder instead of /etc/tomcat7 folder because bin exists in /usr/share/tomcat7 folder.
Hope it helps others.
Answer: I guess English is not your first language, its doubt and not dought :-)
In Ubuntu you have to provide the location /usr/share/tomcat7 in Eclipse for it to work. Other way to find which directory is to run the following code
locate bin | grep tomcat7

and find where tomcat7 installation directory is.
Hope this helps you.
Comment: command `locate` not found
Answer: Can you do a "which tomcat" and make sure you're looking for the bin directory in the proper location. If you didn't get a bin directory then you either aren't looking in the right place or your installation process had some serious problems. Try looking too at your environment variables (CATALINA_HOME).
In Eclipse, I believe you are failing because it isn't getting the bin directory. Once you get past your first question, it should certainly help you to answer the second.
Hope that helps.


Do all celestial objects have stationary orbit?

Question: Do all celestial bodies of sufficient mass such big asteroids, moon, planets etc. have orbit such that the period of revolution is same as the sidereal period of that object  (such as geostationary orbit in earth) ?
Comment: definitely not a "geo"stationary orbit. Not sure what the correct term is, though.
Comment: @JanDvorak Thanks i edited that, if you still think there is a mistake you can make a suggested edit ;+)
Answer: This depends on a few things, in particular the Hill Sphere and the rotational rate. The hill sphere calculation can be seen below. If an object is too close to a big object, or rotates too slowly, then it won't work.
$r \approx a (1-e) \sqrt[3]{\frac{m}{3 M}}.$
If an object is too close for such an orbit to be formed, it will likely be tidally locked, such as our moon is to us. I haven't worked out all of the math yet, but I believe it's not possible to orbit in a synchronous way a tidally locked object.
The stationary orbit for the moon would be fairly well along the way to the Earth-Moon distance, although as the Moon is less massive, it will not be as far out. The only orbits which could be considered stationary are the Earth-Moon Lagrange points, of which I think all of them are to a degree for a tidally locked object. See below image.

In addition, a slow rotating object will just never have an altitude where it can be orbited at a stationary orbit. Venus, for instance, rotates slower than it moves around the sun, it certainly doesn't have a stationary orbit. Mercury likely doesn't, due to it's slow rotation rate. The proper way to evaluate this would be by figuring out the hill sphere, and the proper stationary altitude, and seeing if the stationary orbit is stable.
Using Wolfram Alpha, here's a few examples of the synchronous orbit / hill sphere. If less than 1, it could be stable, if more than 1, it is not stable.

Mercury- 1.386
Venus- 1.53
Earth- 0.02865

Moon- 1.522

Mars- 0.02079
Ceres- 0.0058
Vesta- 0.00482
Jupiter- 0.003164

Io- 1.448
Europa- 1.46
Ganymede - 1.44
Callisto- 1.443

Saturn- 0.001803

Titan- 1.485
Iapetus- 1.484

Uranus - 0.0012

Titania- 1.44
Oberon- 1.44

Neptune 0.00079

Triton- 1.44

Pluto- 0.003276

Charon- 1.39

I'm sure the 1.4 ish number that most objects seem to have is not a typical stationary orbit, but is one of the Lagrange points, I'm going to guess either L1 or L2. Wolfram Alpha just provides that because a normal stationary orbit isn't possible.
Bottom line is, Earth, Mars, the Gas Giants, and some of the larger asteroids have synchronous orbits, most moons will not, and neither will Venus or Mercury. Pluto actually has a satellite in synchronous orbit already, it's called Charon, but it seems unlikely it could have any others, except perhaps at Pluto-Charon Lagrange points.
Comment: The 1.4 ish number that most objects seem to have is because most of the objects you used are tidally locked to their primary. If you ignore the factor of $(1-e)$, the ratio of the synchronous orbit radius to the hill sphere radius for a tidally-locked object reduces to $^3\sqrt3$, or 1.442... .
Comment: The ratio for the Earth should be 0.028 rather than 0.28. You lost a zero in translation. Your other numbers appear to be good.
Comment: One last comment: The Hill sphere is an approximation. Since prograde equatorial orbits aren't quite as stable as retrograde orbits, it's fair to say that a synchronous orbit is definitely possible if the ratio is less than 1/3, unlikely if the ratio is more than 1/2, and not possible if the ratio is more than one. Because this ratio is about $\sqrt[3]3$ for an object that is tidally locked to its primary, a synchronous orbit about such a tidally-locked object is not possible.


Which organic compound's NMR and IR are these? Can't find out. (Data available: Melting Point ~ 116 °C)

Question: Which organic compound's NMR and IR are these? I have figured out that the compound is a 1,4 substituted benzene. And the substituents are probably not -COOH and -OH from the spectroscopy. Kindly help me in figuring the other groups out. (Data available: Melting Point ~ 116 °C, gives sooty flame)
Comment: @Soumik Das: The presence of two clean doublets in aromatic reagion of NMR would not agree with your suggestion. It may be 4-nitrophenol, which has $113-114$ $\mathrm{^0C}$ melting point.
Comment: The very strong signal at ~1350 would fit for C-NO2
Comment: Why is there no C-H stretch band in the IR spectrum near 3000 $\ce{cm^{-1}}$ ?
Comment: @pas — When you present an NMR spectrum, you absolutely need to also give the nucleus, the frequency and the solvent. Nevertheless, I agree with Mathew on the 4-nitrophenol. The chemical shift of OH group can vary A LOT depending on the solvent, the temperature and the pH which, in turn, depends on the concentration. In this case, p-nitrophenol is acidic, so the more concentrated it is in the NMR tube, the more acidic the pH and the more the signal will move to the left.
Comment: @MathewMahindaratne The signals of 1,4-substituted benzenes form a AA'XX' system; so despite their appearance for this sample and measurement they do not qualify as simple doublets.
Answer: The integrals and shifts in the very simple NMR spectrum are a giveaway that this is a simple compound with two different types of aromatic signal, and another non-aromatic signal from a substituent, at a 2:1 peak integral ratio, hence possibly a para-disubstituted benzene ring with one proton in one substituent, none on the other.
The IR spectrum is practically identical to that in the NIST webbook for p-nitrophenol.
Some other clues:

Oop Signal at $\pu{800 cm^-1}$: para substitution
$\pu{1400-1600cm^-1}$: aromatic cc stretch, matches nicely with typical appearance for para substitution
No peak at $\pu{1700cm^-1}$: no carbonyl
Weak signals at $\pu{3000cm^-1}$: sp2 stretch, no sp3
Signals at $\pu{1350 and 1500cm^-1}$ may be nitro

Note this is a little tricky - a search would show some variation in reported spectra.
The melting point also matches reported values.
This is well in agreement with many of the comments under the original post.


WiX: Rollback on update/uninstall not working

Question: We have a built a custom .NET-based installer for one of our products using WiX, and we are currently trying to implement a "Cancel" button that is shown while the installation is running. When this button is clicked the installation should be rolled back before the application terminates.
I initiate the rollback by setting e.Result to Result.Cancel in the method called by the bootstrapper upon the Progress event. This works fine when installing the application for the first time. However, when I cancel while doing an update or uninstall of the application, the application always ends up being uninstalled (the application's files are deleted).
The update is initiated by calling Engine.Plan(LaunchAction.Install) and I am wondering if this is the reason why the application ends up being uninstalled when I cancel during an update (however, this would not explain why cancelling the uninstall does not work correctly :/ ). I tried using LaunchAction.UpdateReplace instead, but I don't get it to work. I have read that in order to use UpdateReplace, one has to call Engine.SetUpdate() first. Since I want the update to occur from the same exe file that the user executed, I tried calling it as follows:
Engine.SetUpdate(null, null, 0, UpdateHashType.None, null);

But in the log file I get the same errors as when I use UpdateReplace without calling SetUpdate():
[21A0:1C1C][2013-12-23T11:44:51]e000: Error 0x8000ffff: Invalid package type.
[21A0:1C1C][2013-12-23T11:44:51]e000: Error 0x8000ffff: Failed to plan execute package.
[21A0:1C1C][2013-12-23T11:44:51]e000: Error 0x8000ffff: Failed to process update package.
[21A0:1C1C][2013-12-23T11:44:51]e000: Error 0x8000ffff: Failed to plan update.

I have observed that when I run the .MSI file directly (instead of the custom exe installer), and I cancel the upgrade while it is running, it seems to rollback properly. Hence it looks like the configuration in the .wxs file is fine.
Please advise if I am on the right path and how I should get the rollback to work.
Answer: I had a similar problem, did not work rollback on update/uninstall.
I fixed this by setting the cache properties of the MSI package to "yes".
<MsiPackage Id="SomeId" DisplayName="Name" SourceFile="Source" Cache="yes"/>

Cache="yes" - is a default behavior, but in my project it was set to "no".


Do Apple brick-and-mortar stores carry the iMac with built-in VESA Mount Adapter?

Question: If not, what does apple do to aid & prevent the pain of using their products?
from Increasing height of 27" iMac
Comment: I'm voting to close this question as off-topic because asking *how/why Apple does something is outside the scope of what can be asked as defined in the [Help Center](https://apple.stackexchange.com/help/on-topic).*
Comment: As found by following one of the links in the AskDifferent question posted above, [this VESA mount device](http://www.imacmount.com/order.html) from iMacMounts work very, very well. I used one for several years until the iMac bit the dust and I upgraded to a Mac Mini and an external Dell monitor. Well worth US$78.
Comment: We cannot speak for Apple on both points. You'll have to contact the Apple Store in question to see if they stock it (this is not any different from any other retail store) As for the second, we can't tell you how Apple will respond to a customer perceived frustration point.
Comment: Allan - the question is poorly phrased and I assume was not intended to be a query about how or why Apple does things. My answer below (about ordering online) makes it clear that iMacs with integral VESA mounts can be made available for pickup at brick-and-mortar Apple Stores. TBH, I flagged this question as being off topic until I did a little research, and had no idea that iMacs were available with this modification to begin with. Let's give @productiveuser a chance to edit the question to remove the useless verbiage and be more specific. The _title_ of the question is quite specific.
Comment: @IconDaemon - "carry" is not the same as "accept for delivery" (local drug stores now "accept for delivery" Amazon orders - it doesn't mean they "carry" what Amazon sells) and the very first line of the question (not title) is literally asking "what Apple does to mitigate customer pain" which is something only Apple can answer.  I voted to close because there's just not enough material to begin with to attempt to "massage" it into being on-topic.
Answer: I initially flagged this question to be "Off Topic", but in the US, you can order on-line and pick up at your local Apple Store. There may be a delay, but it is possible:
Answer: I haven't seen any already attached version in any store (marketplace) close to me, but you really shouldn't be using what you get with that VESA mount. Sure, buy the mount but change the screws, and be prepared for apple to refuse to help if anything goes anyway, as they would have done had you used the originals.
The mount itself is branded as Apple but created by a third party making any return impossible:
https://www.youtube.com/watch?v=MG_NRcy5mxU


Shuffling questions in only one section of a Google Form

Question: I am creating this Google Form with two sections. One takes the student information; Reg. No., Name, Class etc., and the other section contains the subject-related questions which I need to have shuffled every time a student login. How can I accomplish this task? I.e., have the first set of student information not shuffled while the questions get shuffled. Any help is much appreciated.
Comment: This question has been bumped by Community user eight times.
Answer: It's not possible.
As of October 2023, the form is the Google Forms setting to shuffle question order scope. I can't be set to shuffle only the questions of a specific section or to set an exception to avoid shuffling the questions of a specific question.
For your convenience, I'm copying below an extract of the help article Edit your form, more specifically the section Randomly order questions and answers > Shuffle question order

Shuffle question order
Important: If you want your questions to appear in a specific order, you should not shuffle your questions.

At the top of the form, click Settings.
Next to "Presentation," click the Down arrow Down arrow.
Under "Form presentation," turn on Shuffle question order.

Google Apps Script and Google Forms API can't be used for this because they might be used only on the server side, not on the client side of the form view, either when the form is opened by a viewer or after it is loaded.


how to generate po file from js file using poedit

Question: i am using Gettext.js library to localize my contents generated from a JS file. Now the situation is, i have to create and write each and every po files manually. I know we can scan php files for gettext strings using PoEdit. So, is it possible to scan JS files for gettext strings using PoEdit?
Answer: Achieved this by creating a new parser of python language in PoEdit.
File > Preferences > Parsers > New
Language:
JS

List of extension:
*.js

Parser command:
xgettext --language=Python --force-po -o %o %C %K %F

Item in Keyword List:
-k%k

Item in input files list:
%f

Source code charset:
--from-code=%c

i found this tutorial while searching on this, which helped me to attain the situation Tutorial Here>>
Actually the tutorial is in French and the link is a google translated(to English) one.
Comment: This worked for me when I changed `--language=Python` to `--language=C`
Answer: Since version xgettext 0.18.3, you can use JavaScript as the language parameter.
This version of xgettext is used in Poedit since at least version 1.6.2.
Answer: xgettext now supports JavaScript natively, so the command is simply:
xgettext --output=output.pot --language=JavaScript *.js

Answer: The xgettext commandline program is used to scan source code and can parse the following languages:
C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, Tcl, Perl, PHP, GCC-source, Glade
Although JavaScript is not listed as a language, I just tried it with a few and Perl actually worked. Try this:
echo " testFunc('foo');" > test.js;
xgettext --keyword=testFunc --output=- test.js --language="perl";

To do this from POEdit, open Preferences > Parsers > Perl add ;*.js to the file extensions list and add --language=Perl after xgettext in the Parser command field. This worked for me and I was able to get new strings from a JS file this way.
Although I don't know how gettext.js works a better approach may be to convert PO files to a native JavaScript file format.


How to flag Kinetis bootloader to load new fw?

Question: I have a board that features a Freescale Kinetis K60 MCU and I want to write a bootloader for it but I don't have hardware in place to signal it after a reset to go into "load new firmware" mode vs. "normal operation" mode.
What are my alternative possibilities?
Can I set a flag in flash to signal the bootloader to enter one or the other mode? How would I do this? Any ideas?
Answer: That really depends on how complex a bootloader you want to write, and what you have in place in the way of communications options.
For example, if the bootloader is using a UART to take in the application code, you could include a minimal console (menu-driven, for simplicity) in the bootloader that allows you to issue various commands, e.g. erase the existing application, start the existing application, or load a new application.  Include a startup timeout - if you don't press a key within 3 seconds of boot, it automatically starts the existing application, if there is one, otherwise it stays in the menu waiting for an application to be loaded.
If the bootloader implements a simple, well-documented and widely supported serial file transfer protocol e.g. Y-Modem (yes, Z-modem is far, far better, but it's complicated), then you can upload application binaries from just about any terminal program.
Answer: That's actually pretty simple. The steps are as follows:

Define a section for the linker where your special flash page will be stored
Make sure that both bootloader and application know about this section

A good example is outlined here: http://mspgcc.sourceforge.net/faq/x71.html, although it's not special for the K60 family.
You will also need to figure out where you are going to place that section. I would reserve one full page near the end of the flash. If this is where your stack is stored, you might want to go forward before that section. Your linker file should tell you about your sections.


Problem driving my jackal robot

Question: I have a Clearpath jackal robot and I am having troubles with driving it using keyboard control. Whenever I run the command: "ros2 run telep_twist_keyboard teleop_twist_keyboard" I don't get any errors and the velocity commands seem to be published, but the rover does not actually move.
ROS1 was originally installed on the robot, so I have recently been upgrading everything to ROS2. One of these steps involved upgrading the firmware, which I'm guessing is where the problem might be. I have been following the instructions on your website (https://docs.clearpathrobotics.com/docs/ros/installation/robot) but I can't seem to complete the step under the "Start Service" heading. I am getting issues when running the command "sudo systemctl daemon-reload && sudo systemctl start clearpath-robot.service" it seems like it is having problems with my yaml file for the robot. It thinks I have the wrong battery type, but I have tried all of the ones listed on the Clearpath website and the one labeled on my actual battery (HE2411) and none seem to fix the problem. Here is my yaml file below:
serial _number: j100-0108
version: 0
system:
hosts:
self: cpr-j100-0108
platform:
cpr-j100-0108: 192.168.131.1
onboard: {}
remote: {}
ros2:
username: administrator
namespace: j100_0108
domain_id: 0
rmw_implementation: rmw_fastrtps_cpp
workspaces: []
platform:
controller: ps4
battery:
model: HE2411
configuration: S1P1
attachments:
- name: front_fender
type: fender
- name: rear_fender
type: fender
rpy: [0.0, 0.0, 3.1415]
extras:
urdf: null
ros_parameters:
platform_velocity_controller:
linear.x.max_velocity": 2.0
linear.x.min_velocity": -2.0
linear.x.max_acceleration": 20.0
linear.x.min_acceleration": -20.0
angular.z.max_velocity": 4.0
angular.z.min_velocity": -4.0
angular.z.max_acceleration": 25.0
angular.z.min_acceleration": -25.0
links:
box: []
cylinder: []
frame: []
mesh: []
sphere: []
mounts:
bracket: []
fath_pivot: []
riser: []
sensor_mount: []
sensors:
camera: []
gps: []
imu: []
lidar2d: []
lidar3d: []
I feel like I have edited the yaml file well enough to match what exists in the Clearpath tutorials and the specifications of my specific robot, yet I continue to have problems so I think there must be some error in my file.
Please let me know what your thoughts are on why the rover is not moving! I appreciate your help!
Best,
Austin Wohleb
Answer: HE2411 is not currently setup as a valid battery option for the Jackal in the software. Please enter a github issue to get this fixed (on the clearpath_config repo - feel free to assign it to me). In the meantime you can set it to HE2613 (the newer version of this battery) or you can omit the battery section entirely and it will default to that same battery. The only difference should be that the reported battery percentage will be less accurate until this gets fixed.
Backing up a bit, you are correct that you won't be able to complete starting the service with issues in your robot.yaml file. Once you have moved past those issues, when you are launching the teleop twist, make sure that you are launching it with the same namespace you put in the robot.yaml. (eg. ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/j100_0001)
Clearpath Robotics does not generally monitor stack exchange so if you are ever in need of our attention, feel free to also reach out to our support team or enter an issue on github and make sure to provide the terminal output of any failing command.

Problem driving my jackal robot


Marketing Cloud Connect - Tracking with a new connection

Question: If we disconnected our org from once Marketing Cloud account and connected it to a new MID thats not connected to the old one, if we send in the new account to the same contact keys, will tracking data be merged at the contact level in the SF org? We suspect there will be a conflict with jobIDs when the new instance runs job IDs into SF tracking where those already exist from the old account. Has anyone run into this situation before and have any insight to a possible solution? If possible we are looking to just have a smooth cutover and retain tracking from the old connection. This wouldn't be a multi-org setup, just moving the connection from one MID to another.
Answer: We got a direct answer form SF about this question and wanted to post the results.
Since the connector factors in the MID of the MC account as a key, the tracking data can co-exist on the same contact record between the old MID and the new MID connections.


The use of passive voice and MS Word

Question: MS word constantly complains about the use of passive voice and sometimes I struggle to find a better way to express myself. For instance, how do I say the following differently? "Despite all the windows being shut there was still a draught."
Comment: You don't have a passive construction in your sentence. So Word is wrong here. In cases where Word is right, you are better off regarding the feedback, not as a complaint, but as an alert to a construction you might wish to rewrite. I would suspect that in most cases you will be perfectly happy with what you have written because you have used the passive for one of the many reasons why it is the better choice.
Comment: There is nothing wrong with passive voice. It's just one more tool a writer can bring to bear. It's only bad if overused—like anything else.
Comment: Thank you. I suspected as much but thought I'd get a 2nd opinion.
Comment: Who shut the windows? Add the actor and you'll make it an active sentence.
Comment: Was there an error message when you typed this actual sentence? If so, could you reproduce it exactly, please.
Answer: First of all, MS Word can complain all it wants about the use of the passive voice, but sometimes the passive voice is the better choice. You'll have to use your judgment. If you're writing about bees, for example, the active Bees make honey is likely better. But if you're writing about honey, the passive Honey is made by bees is likely better. You can find other good excuses for the passive voice at RIT's Use of the Passive Voice
Secondly, without any further evidence to the contrary, your example does not use the passive voice; it just happens to follow a pattern that MS Word uses to flag* a (possible) passive voice construction: a to be verb (e.g. being) + a participle (e.g. shut).
Your sentence, with its absolute phrase all the windows being shut, uses that same pattern—but it's not passive. Instead, being shut functions as an adjective to modify windows.
You can test this by rephrasing:

Despite all the shut windows, there was still a draught.

And you can further test this by swapping in a non-participle adjective:

Despite all the open windows, there was not a draught.
Despite all the windows being open, there was not a draught.

Indeed, the latter sentence—with its non-participle adjective open—will smooth MS Word's passive voice hackles.
Still reading? You do need a comma after shut, but I think that matter is for another question.

* MS Word flags things based on your Preferences settings in Spelling and Grammar. Set Writing style to Formal for the strictest review. When you see something flagged with the squiggly line, you can right click or option click it to see details regarding what it's upset about.
Answer: I suggest that MS Word is telling you to insert a comma: "Despite all the windows being shut**,** there was still a draught."
"Despite all the windows being shut," is a fronting free modifier, and these are offset by a comma.
Comment: @Edwin Ashworth: *OP implies (and Shoe states) that the reason Word flags a complaint is use of a passive construction.* No... you are wrong. I suspect that is the reason *that the OP **thinks*** is the cause. ++ I am intrigued that you think that putting anything in a Google search will bring up perfect examples of punctuation - Google has a strange way of dealing with punctuation. I would have been more impressed if you had asked the OP to insert a comma and see what happens.
Comment: (1) OP implies (and Shoe states) that the reason Word flags a complaint is _use of a passive construction_. (2) Free modifiers are often _not_ offset by a comma, though some forms lack the comma more infrequently than others (and with some, the comma _is_ required). See [Comma after introductory words, phrases ...](https://english.stackexchange.com/questions/52091/comma-after-introductory-words-phrases-clauses-unacceptable-obligatory-or-op). Checking "Despite his injuries he" in a Google search, as I expected and as I feel is ...
Comment: correct, about half the sentence-initial examples are offset by the optional comma. _You need to start including references from decent works on grammar, rather than just making unsupported and sometimes inaccurate and so unhelpful claims._
Comment: (1) I've asked OP to clarify, always a good idea before answering an iffy question. (2) I am intrigued that you think that you have a complete command of punctuation and/or that you think that others should just accept this,  and that need not bother including supporting evidence. If you looked at the linked thread, you'd find, from a publication by respected educationalist Martha Kolln,  'It is permissible, even commonplace, to omit a comma after most brief introductory elements — a prepositional phrase, an adverb, or a noun phrase ...'
Comment: @EdwinAshworth *(1) I've asked OP to clarify, always a good idea before answering an iffy question.* But you did not think it was "iffy" You made an assumption as to what it meant. As you do not have a copy of MSWord, I put the example in mine (2007 ed.): with and without the comma it shows no error but the OP may have a different version or auxiliary grammar checker.
Comment: I guessed what was meant, but did not give an 'answer' as I wasn't sure. I've put the sentence in question through my copy of _Word_ now, and it doesn't flag either the commaed or the commaless version. I'm happy with that, but am not happy with OP (and thus have now close-voted) and wonder why the acceptability _Word_ conveys on the commaless version doesn't inform your answer.

The use of passive voice and MS Word


Configure Android black box

Question: My apps on my phone keep bugging out on me, but I can never catch them in the act. Is there any way to keep a black box of my phone state (perhaps polled every 1 minute) for the past x minutes so that when I catch a bug, I can save the last x minutes and debug them later?
Answer: Run a system monitoring app, then go back through the morning log until you find it. This is just an idea which helped me with data consumption on new Sprint Pro hotspot which should have not been released yet.
Comment: It would be better if you could also provide a link to the "system monitoring app" you mentioned.

Configure Android black box


Have you tried using MVC for GWT client code?

Question: Have you tried using MVC or any other UI pattern for GWT client code. What are the pitfalls/advantages  you've faced in different approaches?
Answer: I think you need to treat GWT just like any other UI framework, like Swing, Cocoa, etc. Everything that makes sense in those frameworks in terms of MVC (or other paradigms) makes sense in GWT as well. I think sometimes people take the MVC thing too far, and I like the way it works in Cocoa more than most frameworks. You create a view, you have a ViewController that controls all the behaviour of the view, and then you have model objects with all your data. I don't think you need to be dogmatic about where all of your business logic is, it just needs to be where it makes sense.
In terms of pitfalls,the main one you will run into is that GWT is purely a front end technology, so technically the back end is sitting on a server somewhere. I don't see this as being that different to writing a client server swing application, that stores it's data in the cloud somewhere. The difference is that GWT is compiled down into javascript, and has all the limitations of a javascript web application, so there will be some things that you simply cannot do on the front end. Let's say for example you want to create a PDF and show that to the user, you can't do that in GWT, you need to call the back end to do it for you. In a Swing app on the other hand you could probably use itext and do it on the client side.
Answer: The MVC pattern for GWT is discussed in this question, which also has a link to this in-depth blog post.
The only thing I'd add is that the client side code in its entirety can be be considered the "V" in "MVC", which may alter the way you look at it.  Thinking of the client side code as its own nested MVC component, well, it's Java, it's object oriented, so it can be designed much like a Swing app.  I think it is to your advantage to pull as much Controller code out of the View as possible to handle the GWT RPC stuff.  The Model is sometimes more problematic, because you may have to decide if you want it on the server instead of the client.  Or create a Model proxy, etc.
Answer: http://code.google.com/p/gwt-mvc/ could help you.
The advantages are :

easy to read controller
History Tokens management
Controllers are testble with JMock (but not GwtTestCase)
Hierarchical MVC
Simple inheritance to start coding your view, controllers and models.
Answer: Have you tried GWTruts (http://sourceforge.net/projects/gwtruts/)?
It is also an open source GWT MVC framework which separate View and Controller in GWT
Answer: Using some sort of MVC/MVP type pattern is really important when GWT apps get beyond the smallest project else you just loose control of what is going on.
Apart from what already has been mentioned there is also GXT's MVC implementation which I have looked at here: http://www.bristol-gtug.org/?p=45
This talk at Google IO last year started a lot of people off thinking about MVC/MVP on GWT: http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPractices.html.
I recently noticed that there is also now an tutorial on MVP architecture in the GWT documentation which is a good start: http://code.google.com/webtoolkit/doc/latest/tutorial/mvp-architecture.html
Answer: You could take a look at JetPad-Mappers, a minimalistic MVC framework developed at JetBrains and used in several (currently unreleased) products.

https://github.com/JetBrains/jetpad-mapper

Disclaimer, I am involved in development of this framework.


Is it possible to run games over remote desktop?

Question: I'm not expecting to run hardcore games, but maybe simpler games where low frame is OK. I have a 1gbit network between my computers. How can I set up my computers so I can remotely play games?
Comment: They are all good. TeamViewer and RealVNC cost money (you can use real VNC on Windows NT 4, 2000, XP, Server 2003 for free). Tight VNC is completely free but doesn't have all the bells and whistles you see with TV and RVNC. I would suggest going to their respective web sites they all have feature lists.
Answer: Technically OnLive does this, but they have custom silicon in ridiculous data centers that can encode HD video with 1ms latency. Any traditional VNC is going to incur enough latency in compression and transfer to make any real-time game unplayable. Solitaire will still work fine.
Some VNC clients for Windows are RealVNC, TightVNC, and TeamViewer.
Comment: What about Windows Remote Desktop?
Comment: @crush RDP is only marginally better than VNC for this -- where RDP excels is when the visual elements are common to both the server and the client -- so things like menus and windows are sent across the network as objects, not as images. But for games, the visual elements are usually being generated programmatically, so RDP has to operate upon the same principles as VNC in those cases.
Answer: It shouldn't matter all of the rendering will be done on the remote machine, it will just bring the output to your monitor. You should be fine playing any game the remote computer can handle. I play Civ 4/5 over team viewer all the time. Your only problem will be if you are accessing this PC over a WAN, you may get choppiness due to network latency.
Answer: For the more tech savvy installing a "Gaming Anywhere" server and client may be useful:
http://www.gaminganywhere.org/index.html
I¡d suggest to take a look at the performance experiment they did; the figures are quite impressive except for network load that is sometimes very slightly over the already deceased OnLive or StreamMyGame.
http://www.gaminganywhere.org/perf.html
They offer pre-compiled binaries for win 32 bits and linux 32 bits, and an alpha for Android.
It's open source and free.
Answer: Are you connecting to a computer on your local home network or is it over the internet to another location?
If you are just on your home network, it will work to a degree, but it is really not intended for that purpose.  I do not know of any remote software that focuses on game performance specificly.
Any video rendering is done on the remote machine though and just sent as video/pictures to your remote connection.  Most performance of a remote connection is based on the network connectivity, hence why I asked if you were staying on your local network or not.
Bottom line, it should work for you, just don't expect great performance.
Answer: It's entirely possible - just use your favourite VNC server and client - but the performance may be disappointing. It will depend entirely on the game, however. The problem is not likely to be the amount of graphics power required - 3D games may well work fine - but (at least with VNC) the amount the display changes. VNC operates by sending only the pixels that change - if lots of pixels change quickly, your bandwidth requirement will increase, and you may experience a lag while your remote display updates. A good game to play over VNC would be one which does not involve much animation or which will wait for user input, for instance a puzzle game or turn-based strategy. A bad game would be one that involves a lot of animation or requires quick reaction to events, such as a shoot-em-up or FPS game.
There are things you can do to improve your chances of a good experience - using gigabit ethernet is one you've already identified, and setting the host computer to use a lower resolution is another. In short, though, I think you'd just need to try it and see. Some games will be acceptable, others won't.
Answer: These days, the outlook is much sunnier. Various platforms, including Steam and PlayStation, now support this as a built-in feature. I play real-time action games this way, using an Android phone as client, with no trouble.


What is the minimum processing time for salsas?

Question: I found a recipe (Wonderful Salsa at Food.com) that called for it to be processed for 10 minutes.  I'm seeing now that other salsa recipes call for 15 or more minutes.  Is this true for all salsas, or is the 10-minute processing time based on the recipe and thus all right?
Comment: Is this the recipe you meant? http://www.food.com/recipe/wonderful-salsa-9272

According to the USDA food safety guidelines, 15 minutes is recommended for tomato salsas at your altitude.

http://nchfp.uga.edu/publications/usda/GUIDE%203%20Home%20Can.pdf
Comment: Possible duplicate of [What can I do if I didn't process my salsa long enough?](http://cooking.stackexchange.com/questions/28130/what-can-i-do-if-i-didnt-process-my-salsa-long-enough)
Comment: Depending on the acidity the processing time may change. Even if 15 min is a good rule of thumb for salsas, make sure you double check the instructions for each individual recipe.
Comment: Yes, that is the recipe.  My husband just wants to put them on the shelf and look carefully for signs of spoilage before using any.  Is that acceptable in terms of safety?  Is there a risk of not noticing spoilage if we pay attention to smell, taste and strength of seal whenever we open one?
Answer: Time is not a reliable indicator for for botulism safety. The critical factor is heat penetration which depends on container volume and shape as well as time and temperature.
I worked on the autoclaves in a salmon cannery. Pressure cooker times varied from 20 minutes to 60 minutes depending on the can volume. These times were determined by actual measurements of heat penetration into test cans.
"Looking carefully for signs of spoilage" is foolish. The toxin from 6 individual botulinum bacillus is enough to kill you. Follow authoritative recommendations.
Botulism kills.


How to monitor my home network traffic?

Question: I have an ATT U-Verse Wireless router supplying 5 computers throughout my home. It is hardwired to my main computer.
I have three children of all ages, one of which has had a tendency to make poor decisions on websites, email, and internet chatting.
We have discussed the issue, but I am of the 'trust but verify' mindset at this point
Comment: DNS solutions might resolve some of your issues at home. OpenDNS?
Answer: it will be a very good idea if you use a proxy server in your home network that will help you controlling web traffic and view the log file which contains the trace of connections I personally use Squid as a web Proxy and Sarg as a log analyzer .
Comment: This is the best answer so far, but unless you install a custom CA in all of the Web browsers, you won't be able to decrypt the ssl traffic to observe or block URLs
Answer: Ok, so - you have a few options here..
It is my understanding that you're interested in monitoring the history of visited URL's on all of the computers on your small home network. If this is the case, you're in luck because this kind of feature is usually integrated directly onto the router for management purposes. Just log into your router's interface and find the area that contains a list of recently visited websites. You should also be able to block/allow urls from here too, if you so desire. Check your routers documentation for information about how to log into your router and other useful information.
I suppose you could do this all manually by firing up Wireshark or any other packet sniffer and "watch the wire" for yourself. I don't think this is what you're looking for, but I just thought I'd mention it anyway.
Alternatively you could install software on each of the client computers on your network which you want to monitor which will record activity on said computer, possibly in the form of logs/email. I don't recommend this if you can use either option above instead.
Answer: If you have a spare computer lying around with a spare NIC card, you could install Sophos UTM, which would sit behind your router and act as a hardware firewall. Amongst other things, you can see all URLs visited from any machine on your network. You can then of course block individual URLs or filter on things etc.

Protect your Kids Web Surfing Habits - Use Web Filtering to stop sites
  from infecting you with viruses and spyware, keep your kids from
  surfing to bad sites, and get full reporting on the activity in your
  home.

How to monitor my home network traffic?


Is every additive monofunctor between abelian categories left exact?

Question: Is there an additive functor between abelian categories, which preserves monomorphisms, but is not left exact?
Answer: Consider an integral domain $R$ which is not a field, and choose $a \in R \setminus (\{0\} \cup R^*)$. Consider the functor $\mathsf{Mod}(R) \to \mathsf{Mod}(R)$ which maps an $R$-module $M$ to its submodule $aM$. Clearly this preserves monomorphisms, but it is not left exact: The exact sequence $0 \to R \to Q(R) \to Q(R)/R$ becomes $0 \to aR \to Q(R) \to Q(R)/R$ after applying the functor.
Alternatively, it suffices to give an additive functor between abelian categories which preserves epimorphisms, but is not right exact. Take an integral domain $R$, which is not a field, and consider the functor $\mathsf{Mod}(R) \to \mathsf{Mod}(R)$ which takes an $R$-module to its maximal torsionfree quotient, i.e. which mods out the torsion submodule. This functor preserves epimorphisms, but is not right exact: The exact sequence $R \to Q(R) \to Q(R)/R \to 0$ becomes $R \to Q(R) \to 0 \to 0$ after applying the functor.
Comment: Actually, both your examples work on both sides: they preserve both monomorphisms and epimorphisms, but are neither left exact nor right exact.
Answer: Here is a construction that generalises both examples in Martin Brandenburg's answer:
Lemma. Let $F, G \colon \mathscr A \to \mathscr B$ be additive functors between abelian categories, let $\eta \colon F \to G$ be a natural transformation, and let $H = \operatorname{im}(\eta)$.

The functor $H$ is additive. It preserves monomorphisms if $G$ does, and it preserves epimorphisms if $F$ does. (For example, these hypotheses are satisfied when $F$ is right exact and $G$ is left exact.)

If $F$ and $G$ are exact, then the following are equivalent:
i. $H$ is exact in the middle;
ii. $H$ is exact;
iii. $\ker(\eta)$ is right exact;
iv. $\operatorname{coker}(\eta)$ is left exact.

Proof. For any $A, B \in \mathscr A$, we get a commutative diagram
$$\begin{array}{ccc} F(A) \oplus F(B) & \twoheadrightarrow & H(A) \oplus H(B) & \hookrightarrow & G(A) \oplus G(B) \\ \wr\downarrow\  & & \downarrow & & \wr\downarrow\ \\ F(A \oplus B) & \twoheadrightarrow & H(A \oplus B) & \hookrightarrow & G(A \oplus B).\! \end{array}$$
We conclude that the middle vertical arrow is both monic and epic, hence an isomorphism. Now let $A \to B$ be a monomorphism in $\mathscr A$. If $G$ preserves monomorphisms, then the bottom and vertical arrows in the commutative diagram
$$\begin{array}{ccc}H(A) & \to & H(B) \\ \downarrow & & \downarrow \\ G(A) & \to & G(B) \end{array}$$
are monomorphisms, hence so is the top arrow. The statement about epimorphisms follows dually, finishing the proof of (1).
In (2), the equivalence i $\Leftrightarrow$ ii is clear from (1), as a middle exact functor that preserves monomorphisms and epimorphisms is exact. Write $K = \ker(\eta)$ and $Q = \operatorname{coker}(\eta)$. Let $0 \to A \to B \to C \to 0$ be a short exact sequence, giving a commutative diagram with exact rows
$$\begin{array}{ccccccccc} 0 & \to & F(A) & \to & F(B) & \to & F(C) & \to & 0 \\ & & \downarrow & & \downarrow & & \downarrow & & \\ 0 & \to & G(A) & \to & G(B) & \to & G(C) & \to & 0.\! \end{array}$$
By the snake lemma, we see that $K$ is left exact and $Q$ is right exact. If $K$ is moreover right exact, applying the same reasoning to $K \hookrightarrow F$ shows that $H = \operatorname{coker}(K \to F)$ is right exact, hence exact since it preserves monomorphisms (this also follows directly from the snake lemma since $K \to F$ is injective). This proves iii $\Rightarrow$ ii, and iv $\Rightarrow$ ii follows dually. Conversely, if $H$ is exact, applying the same reasoning to $F \twoheadrightarrow H$ shows that $K$ is right exact, and dually that $Q$ is left exact. $\square$
Examples. There are many interesting examples where $F$ and $G$ are right and left exact respectively:

Let $R$ be a domain that is not a field, and let $a \in R$ neither zero nor a unit. Let
$$F = G = \operatorname{id} \colon \mathbf{Mod}_R \to \mathbf{Mod}_R,$$
and $\eta \colon F \to G$ multiplication by $a$. Then $\operatorname{im}(\eta)(M) = aM$, which is an additive functor preserving monomorphisms and epimorphisms, but it is not exact since $M \mapsto M/aM = M \otimes_R R/(a)$ is not left exact.

Let $R$ be a domain that is not a field and let $Q$ be its field of fractions. Let $F = \operatorname{id} \cong (-) \otimes_R R$ and $G = (-) \otimes_R Q$, and $\eta \colon F \to G$ the natural transformation induced by $R \to Q$. Then $F$ and $G$ are exact, so $\operatorname{im}(\eta)(M) \cong M/M_{\operatorname{tors}}$ is additive and preserves monomorphisms and epimorphisms. But it is not exact, since $\ker(\eta) = (-)_{\operatorname{tors}}$ is not right exact, or since $\operatorname{coker}(\eta) = (-) \otimes_R Q/R$ is not left exact.

Let $P = [1]$ be the poset $\{0 < 1\}$, and let $\mathscr A = [P,\mathbf{Ab}]$. Then $\mathscr A$ comes with exact evaluation functors $\operatorname{ev}_i \colon \mathscr A \to \mathbf{Ab}$ as well as a natural transformation $\eta \colon \operatorname{ev}_0 \to \operatorname{ev}_1$ induced by the morphism $0 < 1$ in $P$. This is the example given here of an additive functor that is not exact in the middle.

Let $X$ be a topological space on which there exists a separated presheaf $\mathscr F$ that is not a sheaf. This is the case if and only if the opens in $X$ are not linearly ordered: as soon as $U = U_1 \cup U_2$ with $U_1, U_2 \subsetneq U$, then the presheaf image $\mathscr F$ of $\mathbf Z_{U_1} \oplus \mathbf Z_{U_2} \to \mathbf Z_U$ is separated (being a subpresheaf of a sheaf), but the local sections $1$ on $U_1$ and $U_2$ are in $\mathscr F$ whereas their glueing to $U$ is not.
Let $\mathscr A = \mathscr B = \mathbf{PSh}(X)$ and $F = \operatorname{id}$ and $G = \iota(-)^\#$, and $\eta \colon F \to G$ the unit of the adjunction $(-)^\# \colon \mathbf{PSh}(X) \leftrightarrows \mathbf{Sh}(X)\,\colon\!\iota$. Then $F$ is exact and $G$ is left exact, so by the lemma the image $H = \operatorname{im}(\eta)$ is additive and preserves monomorphisms and epimorphisms.
For a separated presheaf $\mathscr F$ that is not a sheaf, consider the short exact sequence
$$0 \to \mathscr F \to \iota\mathscr F^\# \to \mathscr G \to 0$$
of presheaves. Then $\mathscr G^\# = 0$ by exactness of sheafification, so applying $H$ gives
$$0 \to \mathscr F \to \iota\mathscr F^\# \to 0 \to 0,$$
which is not exact. Alternatively, $K = \ker(\eta)$ is zero on $\mathscr F$ and $\iota\mathscr F^\#$, but not on $\mathscr G$.


Stored used refrigerator & dishwasher

Question: I have a Viking counter depth refrigerator & a Fisher Paykel double dish drawer dishwasher. We have used them both since 2007, we had storm damage to our home & they both sat unplugged for over 9 months. Are they still going to work properly after being unplugged for that amount of time? We are worried about the cooling tubes in the walls of the refrigerator & if sediment from the water lines will affect the function of the frig. The refrigerator is about 14 years old, if not older. The dishwasher is about the same age. We have a lot of minerals in the water and are worried the sediment may affect the tubing inside the dish drawers. We are thinking we need new appliances
Comment: Were they closed or open for 9 months? Cleaned out or full of food / dirty dishes? Because I'd be a lot more concerned with the moldy mess they might be inside if they sat closed up for 9 months, perhaps with food rotting in them than with "sediment from the water lines."
Comment: Not only that, but were they properly cleaned and tested electrically after getting wet? If not, you cannot trust any of the electrical circuits and components now. Corrosion will have ruined them.
Comment: It could be a good time to get a new A++ energy-rated fridge. If you do, the old one should be disposed of somewhere that will properly remove the CFC refrigerant.
Answer: With flood waters I would be concerned about bacteria that was in the water, a good cleaning they both may be fine. Since it has been months water that got into the motor may have dried out the only way to know for sure is to use a meter called a megger (a high voltage ohm meter) checking the motor leads to ground. If this values is above ~15 mega ohms at 500v it would be safe to plug it in. Over my career I have flushed many motors and dried them out and they worked fine, many totally enclosed motors I open the case if no water comes out they are probably good to go (I do normally check with a megger) but on small ones many times just plug them in if dry. I would be more concerned with bacteria than the motors as cleaning interior enclosed areas is just about impossible.

Stored used refrigerator & dishwasher


ArcServer 10.1- Get Original Document location (mxd) from published web service using python

Question: I need to extract the document location of a published web service. Is there any way this can be accomplished in python?
I know where the maps are sitting on the server, and i know the name of the service and what mxd file they're based on, but i need to accomplish this programatically.
Comment: Do you refer to the source .mxd document you had open in ArcMap when publishing? If yes, this information is not maintained because the .mxd is copied to the server folder and no link to the source .mxd is maintained, so you cannot figure out which one you've used for publishing.
Answer: Unfortunately no. As Alex said, there is no real link between the original published mxd and the service (although there was in previous versions). You can however find a copy of the published mxd on your server in your ArcGIS Server directory at %arcgisserver root%\directories\arcgissystem\arcgisinput\%service folder name%\%service name%.MapServer\extracted\v101
Comment: Thanks Nate, that will at least give me a work around. I tried to extract the source mxd from the manifest.xml in the extracted folder, but that was not the most elegant solution.
Answer: You might also look in:
<code>%arcgisserver root%\directories\arcgissystem\arcgisinput\%service folder name%\%service name%.MapServer\
</code>
There is a manifest and in that there is "onPremiseConnectionString".
This might help you track down some info as it will have the location of the DB connection string that was used.
...
Answer: https://developers.arcgis.com/rest/enterprise-administration/server/servicemanifest.htm
You're looking for "resources" --> "onPremisePath" which should give you a record of the original MXD file path.


Compatibility of Comet with current technology

Question: I hear that I can use Comet as a server push technology along with my Ajax code to increase the performance of my web applications.
How mature this Comet technology?
Is it supported by all web servers, programming languages and browsers?
What are the disadvantages of using Comet?
Answer: It is mature, though I think you should consider it more of a technique than a technology.
All web servers support it as far as I know, though you will need to research and configure your particular web server if you are building a comet application as the demands on the resources are a bit different. Specifically, there will be far more simultaneous open connections to your server. In terms of programming language support, if your server language of choice has any sort of blocking or waiting mechanism, you can support server-push. All browsers support it as well, as from the perspective of a browser, this is simply an http(s) connection that takes a long time to return.
There are a couple of disadvantages, in the browser world, the biggest is probably the fact that some browsers limit the number of open connections to a specific URL to two. So if you have a server blocking connection open waiting for some pushed data, you are down to only one connection available for the browser to get data from the server. This can be mitigated by spreading your resources over a few second level domains to allow the browser to open more connections.
Comment: Will comet work on all browsers? Are there (old) browsers that does not load content into the DOM incrementally?
Answer: "Supported by all web servers" is a bit of an odd statement. Most implementations are a server in and of themselves, and you'll need to find a server that integrates with the language you want to use.
That said, I work at a company that built one to integrate with a server, specifically IIS.
If you don't want to bother dealing with the server integration (dealing with different languages, handling scaling, etc), check out websync - the service lets you integrate any language easily, since it's hosted, but supports proxying requests through your own server so you can add your own business logic, logging, permissioning, etc.
Answer: Comet was actually in use before all the hype about AJAX started: It's just a new name for an old idea. People have been using hidden iframes to emulate server pushing for a long time without problems.
Comment: Do you have a reference to "work for a long time without problems"? Will comet work on all browsers? Are there (old) browsers that does not load content into the DOM incrementally?


How to create an Organisation Structure in SharePoint 2013?

Question: I need to create an Organisation Structure for my organisation in SharePoint 2013. The feature of the Organisation structure should be as follows:
Whenever an employee clicks to view his Organistaion Structure on Department as well as Organisation level he should be able view the hierarchy of his supervisors and sub-ordinates.
Comment: What are you trying to do? Please provide a better description and detail what you have tried and how you think you should do it.
Answer: If you have User Profile Service Application up and running and synchronized with Active Directory (or any other Directory Service supported) you could implement MySite where you have Organizational Chart out of the box.
When implemented, it will reflect any changes in the Directory Service and doesn't need to be configured due to future organizational changes.

Org Chart
Displays an organization chart. The chart shows the user's position in the organization among management, peers, and direct reports. You can select other people from the chart to view their profiles.

Reference: Overview of My Sites in SharePoint Server 2013
Comment: @PriyankaRajput The org chart is hidden on your own about me page by default, but if you visit another member of your organization you will see it under their about me page
Comment: Hi Benny, Thanks for your reply. I have a customised mysite in my organisation. How to activate/implement organisation chart there.I can't find an option.


Sitecore, JSS and GraphQL: licensing question

Question: The question is pretty simple: can I use the GraphQL from JSS package without JSS license?
Answer: You don't need a JSS license to use the Sitecore.Services.GraphQL package, which is essentially the "core" part of using GraphQL with Sitecore. So you are free to create your own schemas, extenders, etc... or use the built-in options.
There is a Sitecore.JavaScriptServices.GraphQL package as well. This package is primarily used to provide a custom JSS extender as well as a GQL rendering contents resolver for Layout Service. I don't believe the package directly requires a license, but it's not going to be of much use outside of a JSS context.
Comment: To expand on this, the GraphQL pieces ship as part of the JSS package, but the GraphQL API is entirely assemblies and configuration files - no items. It'd be a bit of effort to extract the right ones from the JSS package, but it will work.
Comment: Thank you, guys, for explanation! Very appreciate.


Key Fragment chance reset rate

Question: AFAIK the chances for a player to get a key fragment decreases as soon as he/she gets each key fragment. How and when does it reset?
Answer: According to Wingfield, a Riot enployee,

Hey all,
Just want to help clarify some things about key drop rates:
Key drop rates are NOT linear and only wins have a chance of dropping
  a key. So you will earn key fragments much faster in your earlier wins
  than you will in your later wins. Or said another way, each
  incremental key fragment drop is harder than the last (on average...
  there is variance). This resets on a monthly basis for each player
  individually. The goal is to create a nice ebb and flow.
Grade does NOT impact key drop chance.
Premades DO increase drop chance.
Chests earned has no impact on key drop chance.
There is variance and randomness (with limits). It's unlikely that
  what happened to your friend will happen to you.
Hope that helps clarify :)

source
Answer: The big issue with the key drops that the communitie, was that people had a very low chance of getting one after wins. However, after the recent patches (6.8-6.9) the chance of getting a key shard has increased and is now available when winning a aram as well. (still have to win)

Key Fragment chance reset rate


Is it possible to fully protect a home Wi-Fi network from remote attacks?

Question: I've read that some ways to secure a home Wi-Fi network include encrypting the network using WPA2 Personal, and changing the default administrative username, password, and network name. But I'm not sure that those changes are enough to guarantee that the network is fully protected from remote attacks, specifically an attack that could change the Wi-Fi network's name or password.
Answer: If you want to protect the network itself, then using WPA2 with a strong passphrase is sufficient. This will not protect against remote attacks though, but only against a local attacker which is in range of the WiFi. And it only protects against access to the network, providing that the local attacker cannot somehow get access to the passphrase.
But this does not in any way protect the systems on the network against some external attacker on the internet. The most common attacks here phishing or malware mails, luring the victim into downloading and executing malware from the internet (like claiming it to be necessary software updates) or exposing internal services like remote desktop in an insecure way to the internet. Securing WiFi will not help in any way since these are not attacks relying on an insecure WiFi.


Uniform distribution with respect to Hausdorff measure

Question: Suppose I have some nicely defined "fractal" subset of (to make life simpler) Euclidean space $\mathbb{E}^n,$ of some arbitrary Hausdorff dimension $s,$ such that the corresponding Hausdorff measure $H_s$ has positive mass. The first question is whether it makes sense to talk of a "uniform sample" (or Poisson point process) with respect to $H_s$ (since it is only an outer measure), and second question is: if it makes sense, have people figured out how to generate uniform $H_s$ variates (in simple cases, like the von Koch snowflake, or the more interesting cases, like limit sets of Kleinian groups)?
Comment: What do you mean "only an outer measure"? Isn't it a measure on the  borel sets? Also, does "variate" here just mean an algorithm to produce uniform random variables? If so, it is easy in the case of the snowflake.
Comment: What Ori said.  Use a Borel set.  All the usual "nicely fractal" sets in Euclidean space are Borel sets.  Indeed, they are compact or at least sigma-compact.
Comment: I am a babe in the woods of measure theory... As for variates, yes, an algorithm. In particular, what is the "easy method" for the snowflake? And how do you go about proving that some algorithm gives uniform points (for snowflake or dynamically defined sets)?
Comment: Other people have answered, but still: To pick a uniform point on one side (out of three) of the snowflake, you just have to pick 1 of the 4 parts of the curve, then 1 of 4 parts of that part, etc.  It is really no different than picking a uniform point on $[0,1]$, by iteratively choosing halves of the interval.
Comment: @Ori: I sort of guessed that, but why is that true? What is the general version of the construction? Presumably, it's some iterated function system thing, but if I knew all there was to know about such, I would not be asking the question...
Answer: There is a standard map from the interval $[0,1]$ onto the
snowflake curve, that maps Lebesgue measure into (constant multiple of) Hausdorff measure.  So take a sample in $[0,1]$ and map it to the snowflake.
This works for all of the standard "self-similar" IFS constructions of fractals, when the IFS satisfies the open set condition.  There is a standard "parameter space" or "code space" with a well-understood measure on it that maps onto the fractal, and the image measure is (constant multiple of) Hausdorff measure, and also (constant multiple of) packing measure.
Comment: @Gerald: thanks, but saying that the construction is "standard" does not tell me what it is. Would you happen to have any references you would particularly recommend?
Comment: Ken Falconer's books are a great place to start.
Comment: @BSteinhurst: thanks, I have started looking at one of them already...
Comment: I could also plug my own book, *Measure, Topology, and Fractal Geometry*
Comment: @Gerald: I don't think there is anything morally wrong about suggesting your own book (especially if it is the best book on the subject :))
Answer: Given $A$ a loc. compact space and $\mu$ a loc. finite measure on $A$, there exists a unique Poisson point process $\eta$ with control measure $\mu$. (see for instance th.3.2.1 in "stochastic geometry", by Schneider & Weil, if there are no atoms, but it holds in full generality) .
If $A$ is your fractal and $\mu$ Hausdorff measure, then $\eta$ is what you are looking for, isn't it?
For the construction, everything depends on how you define your fractal set. The difficulty is exactly the same as drawing a uniform random point in a subset that has finite Hausdorff measure.
Comment: Firstly, thanks for the reference! As for "nicely defined", the canonical example is a limit set of a kleinian group, but again, the snowflake is a nice simple example...
Answer: If one interprets "nicely defined" correctly, the answer is "yes, duh!".
One possible interpretation is to be the attractor of a Horseshoe map. Then the dynamics on this attractor can be conjugated to symbolic dynamics and it is clear what "drawing a random point" means, and how to generate them numerically. Of course, one also needs to check that the invariant measure has maximal Hausdorff dimension.
In order to illustrate this, let me give the simplest example. Consider the map $f(x) = x^2 - c$ for $c > 4$. It is well known, that there exists an invariant set $\Sigma = f^{-1}(\Sigma)$ with Hausdorff dimension $\in (0,1)$. $\Sigma$ can be described as
$$
 \Sigma = \{x:\quad \exists C>0 \forall n\geq 1, |f^n(x)|\leq C\}
$$
so the set of points with bounded orbit. If you define for $x\in \Sigma$ the sequence
$$
 x_n = \begin{cases} 1 & f^n(x) > 0, \\\ - 1,& f^n(x) < 0 \end{cases}
$$
Then standard results imply that the Bernouilli measure on $\{-1,1\}^{\mathbb{N}}$ is conjugate to the measure of maximal Hausdorff dimension, which is ergodic with respect to $(\Sigma, f)$. Hence, picking a random point just amounts to choosing a random string of $\pm 1$.


about Prediction of dependent variable

Question: I have a dependent variable which I have to predict based on several independent variables. These independent variables are several types like one is numeric, one is categorical other is in terms of percentages another one in the units of dollars ,etc. Also,the dependent variable may be categorical , percentage, numeric or any other type. In all these situations is it correct apply any standardization method on all independent variables and then predictive model?
Answer: Ignoring the categorical variable for a moment: standardizing variables is only necessary when you have interaction terms where not doing so introduces multicollinearity.
Choosing to standardize only changes the interpretation of your coefficients.  Gelman has a nice post on whether to standardize or not here: http://andrewgelman.com/2010/04/12/a_question_abou_9/
Categorical variables logically can't be standardized but you can choose different coding schemes.  Again your choice of coding scheme (dummy, effect, orthogonal) won't change the results but will change the ease with which you can test hypotheses and interpret your results.  Here's a long worked example of regression using all three schemes: http://faculty.cas.usf.edu/mbrannick/regression/anova1.html

about Prediction of dependent variable


Get_or_create throwing intermittent tuple error not callable

Question: I'm using get_or_create as I iterate through a CSV file to read them into the database.  With logging enabled I use the object, created tuple to note how it's getting along in the logfile - that all works most of the time, except occasionally it throws a 'tuple object not callable' on the 'created' variable returned by get_or_create.  It doesn't seem to be consistent in where it throws it - if I run the same code on the same file, sometimes it goes past it and works fine, other times it sticks on (different) earlier lines of the CSV.
edit:  The error falls when I call 'created' - so on the  logger.debug(office.name section, for example.
As a workaround, I have a catchall exception that, as part of the 'except' function, retries the same get_or_create.  This fallback is working, and hasn't excepted yet (I'm up to 67k records, and it's thrown a different error), but it's a hatchet job, and very unpythonic. I'd much rather fix the fundamental problem - it feels like get_or_create is silently failing, which means that the tuple is broken, but I can't find any evidence of that; surely if that's the case, an exceptable (sp?) error would be thrown.  (There are no duplicates that would result in MultipleObjectsReturned, and I'm not getting an exception anyway).
Tl;dr - get_or_create works 99% of the time, and all the time if I put a fallback in, but doesn't fail in a helpful way.
Suggestions warmly welcomed.
Code is as below:
try:
    office, created = Office.objects.get_or_create(name=office_name)
    logger.debug(office)
    logger.debug(created)

    if created:
        logger.info("Office added to database:")
        logger.info(office.name)
    else:
        logger.info("Office already exists:")
        logger.info(office.name)
except: #catchall exception for now
    logger.error("Could not create: %s", office_name)
    office, created = Office.objects.get_or_create(name=office_name)
    if created:
         logger.info("Office added to database:")
         logger.info(str(office.name))
    else:
         logger.info("Office already exists:")
         logger.info(str(office.name))
         return office
    return office

Traceback (from logs only, apologies):
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/~/Django/OMS/core/views.py", line 28, in loadinitialstats
    load_stats_from_csv(location)
  File "/Users/~/Django/OMS/core/filehandling.py", line 139, in load_stats_from_csv
    home_office = fetch_or_create_office(row[2])
  File "/Users/~/Django/OMS/core/filehandling.py", line 13, in fetch_or_create_office
    logger.info(created)
TypeError: 'tuple' object is not callable

Comment: Sorry, that's my fault, I edited the text to take out identifiable names, it's a capital in the original.   Have added an edit to the question re: where the error is triggered.
Comment: it would really help to add a line numbers and function names + code where it actually raises that exception. Eg. I dont see that incriminated line `logger.info(created)` anywhere.
Answer: I think your diagnosis of this problem is wrong. The error is telling you that a tuple is not callable. Logging something does not mean calling it, and created is not a tuple (it's a bool).
I suspect that somewhere in your code you are accidentally doing something like this:
logging.info = my_tuple

instead of
logging.info(my_tuple)

which is causing info to refer to a tuple from that point on, rather than the original method.
Comment: It happens. The downsides of a completely dynamic language, unfortunately.
Comment: There's something in this - having changed the level that the logger calls at initially, it's stopped throwing that error: I can't find anywhere that i've accidentally assigned a tuple to logging.info though, but at least it's giving me a starting point to work back from.  Thanks.


Automatically install Microsoft Update utility

Question: I work in an environment with a variety of hardware, so we usually use automated installs and group policy instead of drive imaging for deployment of Windows 7. One step we always have to do manually is to open Windows Update and tell it to upgrade to Microsoft Update. How can I deploy Microsoft Update automatically?
Comment: Ever wondered why Microsoft considers it an add-on and it *always* needs to be installed manually, even on recent Windows systems. Great question.
Answer: WSUS can automatically install updates, including the Microsoft Update stuff.
Comment: I already use WSUS. But doesn't WSUS require Microsoft Update on the client computer in order to update Office and other non-windows components?
Comment: We use WSUS in our environment also and it works quite well.
Comment: I've never had that problem.
Answer: WSUS does not really solve the question. It only is the location the computer will download the Windows Update patches from. Normal Windows Update takes it from the Internet, versus WSUS with is a local server with a cached copy of Window Update patches. That said, if you have a moderate to large environment, a WSUS server can really reduce Internet traffic.
Some general info about GP and WU: Group policy can tell client computers to download and install patches, when to do it, and to use that WSUS server instead of going to the Internet.
Open the Group Policy Management console and click on "Default Domain Policy". Under Computer Configuration, right click Windows Settings and click edit. If it tells you that it can't find gpedit.msc, copy c:\windows\system32\gpedit.msc to c:\windows\SysWOW64.
From there you go to Computer Configuration>Administrative Templates>Windows Components>Windows Update and make any changes you want. Do a gpupdate /force on any computer you want. To change the location to a WSUS server, configure the "Specify intranet Microsoft update service location" option.
As far as your specific question, there does not seem to be a GP option to force the use of Microsoft Update (all products) rather than just updating Windows. This is certainly because it is not configuring something already installed, but rather, you have to go install it. Whatever the solution, it would involve scripting involving running the download package if you can find it. I looked high and low with no luck. I will keep looking and update if I find it.
Comment: WSUS *would* ultimately solve the problem though, because you can deploy stuff that would otherwise only be available when you install Microsoft Update.
Comment: True, I was so focused on the specific question.


What is mauvaise foi as it relates to ethics? Philosophy?

Question: The title says it all. I know it means 'bad faith' but I'm really looking for a more concrete explanation of what it means and how it relates to ethics. Additionally, it would be helpful to understand the existing theories about why it exists in the human condition.
Comment: Is the existentialism tag appropriate?
Answer: It's specifically a concept from the French existentialist work of Sartre and de Beauvoir, and refers to the unwillingess of people to take responsibility for their choices and the self they create through their actions.  It's difficult and frightening to admit we make our own choices, so we invent reasons to justify ourselves.  In Sartrean ethics you have absolute responsibility for yourself and the world around you, a responsibility that is in no way diminished by sharing it.
https://en.wikipedia.org/wiki/Bad_faith_%28existentialism%29


Get "Folder Access Permission" in WinJS

Question: I'm building an app that has projects. A project can have many files in it which are pointed to from a project file. Theses files are copied to the projects folder so I know where they will be but as far as I know in WinJS you can only get access to files the user directly give access to. The user will select the project file, I'll be able to read it but I'll have no way to access the projects files. I do know I can do something like package the project up as a single file and then extract the individual files in my apps local file system but doing so is sub-optimal to me and I'd prefer to do the folder based structure if I can.
Answer: I'm not entirely sure I get it, but I'll give it a shot. In a Windows Store app, you do have access to more than just what the user directly gives access to. If you want to pick a file from anywhere on the computer (our from other apps through the FilePicker contract) then, yes, the user has to pick them, but you app has full access to the isolated storage and if it declares access to the user's documents library and the user allows it, then you have access (to your declared file types) in there as well.
I think the choice of going to isolated storage versus the user's document library comes down to whether or not the user would expect to have the project files outside of your app. Might they email a project to a friend? Might they manipulate the project with another app? Might they want to back the project up? If so, then use their documents library. If not, then the data is more application data than user data and could be stored in the local app storage.
Hope that answers the question. If not, then please clarify.

Get "Folder Access Permission" in WinJS


Is there such a thing as a dictionary that lists all the words for a given morpheme?

Question: I've just discovered what a morpheme is. The article I read on the subject listed many morphemes and gave examples words of each type but the list of words for each morpheme was not exhaustive. I've Google searched for lists of words by morpheme and looked on Amazon to see if they sell dictionaries that might give such information, but I can't find any. I would find it interesting to be able to search for words in both directions i.e. I would like to have a list of words for each morpheme but I would also find it interesting to see each word that consists of morphemes being broken down into its constituent morphemes. Is anyone aware of any such listings and where they may be obtained?
Comment: This isn't an answer, but it may help.  If it does lead to an answer, can you can you share your discovery here, please. http://meta.english.stackexchange.com/questions/2573/what-good-reference-works-on-english-are-available-online
Comment: If such a thing exists, I'd expect it to be found in technical resources for linguists. So maybe you'll be able to find an answer on linguistics.SE.
Comment: Hugh, on:
http://meta.english.stackexchange.com/questions/2573/what-good-reference-works-on-english-are-available-online
under "corpora" > "Corpa Concordance English" you get directed to:
http://lextutor.ca/conc/eng/
which is very good for finding a string of letters contained (starting, within or ending) in a corpus of words so it can be used, for example, to find all words containing the string of letters "leg."
It's not perfect but it helps me identify the words that contain a given morpheme so thanks for putting me onto this.
Answer: The headmaster of the Maple Hayes school for dyslexic students is currently compiling a morpheme dictionary.
https://maplehayeshallschool.squarespace.com/about/
Comment: I think this is a potentially useful answer.  Do you know if the dictionary has been published?  You might edit to link to the other book the author has written https://www.youtube.com/watch?v=XjyjpVVmEkE or to the video explanation of morphemes linked on the school website. https://www.youtube.com/watch?v=XjyjpVVmEkE


Create a widget to use shortcode?

Question: I have a plugin (Social Warfare) that I love.  But, there's no widget available.  What is involved in creating a widget so that I can use the shortcode that seems to work fine on the pages and posts?
Answer: You can add a Shortcode using the built-in text widget. To get the widget to process Shortcodes, add the following filter in your theme's functions.php:
add_filter( 'widget_text', 'do_shortcode' );

This will result in widget text being passed thru do_shortcode, which will render any Shortcodes embedded in the text. Just note that this may not work for all Shortcodes, depending on what it actually does and if it needs a specific context to work properly.
Comment: Worked like a champ !!
Answer: You can find more information in the Widgets API

Create a widget to use shortcode?