What part of the blueberry bush forms the blueberry?

Question: Does anyone know what part of the blueberry bush turns into the actual berry? Is it the flower, the bud, or something else? What should I be looking for?
Comment: Oh, just noticed: "bud" is a pretty vague term, there are "flower buds" -> that will grow into a flower and "leaf buds" -> growing into leaves. Just for future posts.
Answer: The berry can develop when pollen is deposited on the stigma of the style in the pistil forming the Gynoecium or female part of the flower. The pollen then grows a tube that reaches the ovules within the ovary and the fertilized ovary develops into the fleshy fruit containing the seeds.
So if your blueberry bush flowers and the flowers get pollinated by bees (or more likely bumblebees) carrying pollen from flower to flower, the base of the flower can grow into blueberries.

Edit with photos as requested (click to enlarge).
Note the three future berries right in the centre: you can see they lost their petals, one style has dried and shrivelled, the other (younger) on the right is still light green. The ovum facing away fom the camera has started to swell to form the berry:

Here you see a cluster of immature berries, petals in various degrees of wilting and ovae transforming into berries.

If you buy blueberries you will sometimes find some remains of the style (like a thin thread in the center of the crown-shaped dimple) - see first picture - and dried petals that didn't fall off completely - see second picture.

And before you have to ask: it's the same for all types of fruit including nuts, from blueberries to pumpkins. But we do not only eat fruit, but also roots (think carrots, beets and radishes) and storage organs like bulbs (onions), tubers (potatoes, sunchokes), corms (taro) and rhizomes (ginger) or leaves (lettuce, spinach) of plants.
Comment: @blackthumb  Not the whole flower, just the petals. The base should stay. If the base and the short stem fall off, the flower was not pollinated and the plant discards it.
Comment: Can you provide pictures with the blueberry bush, because I'm worried that the flowers falling off the blueberry bushes will prevent production of berries?
Comment: @blackthumb -  Erm, no? Mine have just started blooming, so why don't you add pictures to your question and let the comunity have a look?
Comment: Aaaaaalright, I found some. Edited as requested.
Comment: So after the flower falls off the berry starts to form?


Hide dock bar permanently

Question: Is it possible to hide dock bar permanently? I know we can make dock bar hide/appear automatically. But I don't want dock bar to appear even when the arrow moves on it.
Answer: You can try hiding it and then setting a long delay before it appears.
Something like:
defaults write com.apple.Dock autohide-delay -float 10000 && killall Dock

Hide dock bar permanently


How to read in XML files with multiple root elements in R?

Question: I've been thrust a bunch of XML files which are not well formed. They all have multiple root elements. Both xmlParse in XML and read_xml in xml2 packages barf when I try to use them to read them in with Error: 1: Extra content at the end of the document. Is there a package that makes reading multiple root elements easy, or do I need to resort to more brutish methods?
Answer: xml standard does not support multiple root messages.
I would advice you to read this content as a string, wrap with single root and pass to any of xml r libraries.
Answer: Try read_html in the xml2 package can read it adding some tags.  Here is an example:
library(xml2)
s <- "<xyz>1</xyz><xyz>2</xyz>"
doc <- read_html(s)

giving:
> doc
{xml_document}

[1] \n  <xyz>1</xyz>\n  <xyz>2</xyz>\n

Now we can operate on doc, e.g.
> xml_find_all(doc, "//xyz")
{xml_nodeset (2)}
[1] <xyz>1</xyz>
[2] <xyz>2</xyz>

This also works with the XML package:
library(XML)
doc <- htmlTreeParse(s, asText= TRUE, useInternal = TRUE)
xpathSApply(xmlRoot(doc), "//xyz", xmlValue)

giving:
[1] "1" "2"


How was curvature originally defined and calculated?

Question: I am interested in the early history of curvature. Who defined it first and when, who came up with the name, how was it calculated before mathematicians used calculus to define $k=|α''(s)|$? Are there books or articles containing such early calculations?
Comment: If you can form your question into something that shows research and thought then you may ask on math.stackexchange.com instead.
Comment: Previously asked at math.stackexchange.com: http://math.stackexchange.com/q/1502999/18398
Answer: Apollonius (c. 262–190 BC) "calculated" curvature of conic sections implicitly when solving the problem of drawing normals to them in book V of Conica, but he did not think of it as a property of a curve, and his "calculations" are constructions of segments. The first person to "see" curvature was Oresme (c. 1320-1382), Descartes's precursor in introducing coordinates. He described it as a local measure of curve's bending, and christened it with the Latin "curvitas". Later he proposed that for circles it can be quantified by the reciprocal of the radius, our modern convention. Kepler vaguely suggested how to define curvature for general curves by considering the "closest" circle at a point, named osculating ("kissing") circle by Leibniz in 1680s. But it was Huygens, who first found a way to calculate curvature for general curves, and Newton who gave the concept its modern form.
The calculus was yet to be invented so Huygens relied on Descartes's ideas about multiplicity of intersections and Fermat's ideas of infinitely small. Descartes in Geometry (1637) gives a method of drawing tangents and normals to a curve by finding circles with centers on the axis, whose two intersection points with the curve "coalesce", and so intersection gives a double root. This was a foundation of Descartes's algebraic calculus, that preceded Newton's and Leibniz's. Huygens realized in 1653-4 that for any point on a curve one can consider two "coalescing" normals, and gave a semi-geometric way to calculate their point of intersection. That of course was the center of curvature, and its distance to the curve was the radius of curvature, although Huygens did not use these terms. Van Schooten included the method in appendices to the second edition of Descartes' Geometry (1659), which is where Newton learned it from. Later in a remarkable tour de force of Horologium Oscillatorum (1673) Huygens named the locus of the centers of curvature to a curve its evolute, and showed how to construct a perfect pendulum, whose period does not depend on its amplitude. The construction was based on the fact that evolute to a cycloid is congruent to it.
It was Newton who developed Huygens's ideas into a general method for computing curvature (which he initially called "crookedness") in 1664. He used that two nearby normals "coalescing" is equivalent to three nearby intersection points with the circle "coalescing" on the curve, and used Descartes's method, with Hudde's 1659 improvements to find its center by looking for a triple root. Newton also realized that at inflexion points, where the radius of curvature "blows up", one should assign to curvature value zero. Later in the Method of Fluxions and Infinite Series; with its Applications to the Geometry of Curve-Lines (1671) he transformed the algebraic approach to curvature into a more recognizable one of calculus. But it is interesting that Newton was well aware, and facile with, the "lost" algebraic calculus when developing his own. Some modern textbooks, e.g. Struik's Lectures on Classical Differential Geometry, still use the language of coalescing points and normals when defining curvature.
Lodder's Curvature in Calculus Curriculum gives a step by step guide through Huygens's calculation of curvature and evolute of the cycloid, he also describes Euler's 1760 calculation of the principal curvatures of a surface. An overview of early history (with some inaccuracies) is given in Curvature of Surfaces in 3-Space, the source is Margalit's History of Curvature. Nauenberg's Huygens and Newton on Curvature and its Applications to Dynamics gives a detailed account based on original sources, it briefly describes Newton's alternative method for calculating curvature a la Descartes.
Answer: From Curvature of Surfaces in 3-Space by Michael Garman & Jessica Bonnie published in Verge 6:

The notion of curvature first began with the discovery and refinement of the principles of geometry by the ancient Greecks circa 800-600 BCE. Curvature was originally defined as a property of the two classical Greek curves, the line and the circle.

It was noted that lines do not curve amd that every point on a circle curves the same amount. The actual study of curvature began when Aristotle expanded upon these two points and declared that there are three kinds of loci: straight, circular and mixed. It was from this premise that the true study of curvature began.

Appollonius of Perga devised methods for calculating the radius of curvature in the 3rd BCE. These methods were similar to Newton and Huygens (discovered some 2,000 years ago later) ...

The next momentous advancement in the study of curvature came from Nicole Orseme in the 14C. Oresme was the first person to hint at an actual definition of curvature. He also assumed that there was a specific measure of twist which he called 'curvitas'. By observing multiple curves at once, Oresme eventually proposed that the curvature of a circle was proportional to the multiplicative inverse of its radius. This would eventually provide the driving force behind the quest of finding the curvature of a general curve ...

Johannes Kepler made the next contribution to the notion of curvature. While working on the problem of al Hazin, (finding the image of a brilliant point when reflected off a circle), Kepler arrived at the notion of using a circle to measure the general curvature at a point of reflection. This approximating circle would come to be known as a curvea 'circle of curvature' at a point ...

After this Huygens, Newton & Liebniz reified Keplers discovery through calculus into the modern notion of a curvature of a curve. A similar definition can be given for the curvature of a surface. But in higher dimensions a scalar measure of curvature isn't sufficient and tensors are required. This was Riemann's achievement after Gauss discovered his eponymous curvature. It's worth noting that calculus in Newton's hands actually began, as Garman & Bonnie note, with his study of curvature rather than that of motion as is commonly assumed.


Birthday campaign with Mobile connect(sms)

Question: My team was working on a SMS birthday campaign which expected to use Mobile Connect and the Automation studio send out daily.
So far we successfully fire the event hence the data extension in Email could import as a list in Mobile connect by import definitions.
But the problem is when I try to set up a Birthday campaign, I found the filter is different from the email's one.
Email data extension filter

Mobile connect filter

In email, you may use anniversary as the condition, and when it =today to filter the date of birth while in mobile connect the filter condition is not found.
We are expecting to filter out birthday=today in mobile connect and run in automation daily after it is set up.
But at the moment seems we can only manually update the date filter daily to make sure we have the correct audience list in sms send out. Automation studio can not set up as refresh the list and schedule send out sms.
We have tried to filter on the email side(extension) first, but mobile connect seems only able to recognize standard extension ONLY but not filtered extension.
Please let us know if there is anyone who knows the solution or come across the situation before.
Answer: As far as i'm aware, Salesforce recognizes Today() /with or without parenthesis/ as a usable variable, at least for reports. So it might work out for you there


Why is DPLL better than brute force?

Question: I understand that by being clever about the way we navigate the search space of the SAT problem we're going to get better performance than by randomly choosing and testing solutions, though of course both methods have $O(2^n)$ time complexity. What are the specific reasons that DPLL gives better performance than brute-force (sequentially testing solutions from FALSE-FALSE-FALSE.... to TRUE-TRUE-TRUE....)?
Comment: What research have you done?  What resources have you read?  There are lots of standard descriptions of DPLL (e.g., in textbooks), and in my experience they all explain why it is better than brute-force trying all possibilities (hint: pruning...)  We expect you to do a significant amount of research/self-study before asking here, and to tell us in the question what you've tried.
Comment: Worst-case complexity alone does not capture relevant properties of an algorithm. A brute force approach like constructing a truth table would require exponential time on all instances. Algorithms in the DPLL-family have polynomial runtime on 2SAT problems. One way to think of DPLL is decomposing an arbitrary SAT problem into efficiently solvable instances. Modern techniques control the size of the decomposition.
Comment: this shows some of the difference between empirical and theoretical/ abstract complexity. theoretically they have identical worse case complexity. on actual instances, on average, DPLL will "finish sooner". so "performance" empircally comes down to "how many (frequent?) worse case instances are in the test set". and some concept of this "difference" can be found in study of statistics. essentially, imagine different runtime profiles as different probability distributions.
Answer: Local (stochastic) search is all about clever navigation of the search space.  DPLL's advantage is pruning the search space of large swaths of assignments that provably cannot satisfy the formula.  DPLL does this by incrementally building partial assignments (some variables assigned values, some left unassigned), applying the unit propagation and pure literal rules and then checking if the resulting formula is trivially unsatisfiable.  If the simplified formula implied by the partial assignment contains an empty clause, DPLL need not try assigning values to the remaining unassigned variables since the empty clause represents a clause that can never be satisfied under the partial assignment.  The time saved is exponential to the number of unassigned variables, and those skipped assignments are where DPLL improves on brute force sequential search.

Why is DPLL better than brute force?


Weight factor - control via keyboard

Question: I have a question regarding Weight Paint mode.
I would like to have control over Weight factor via keyboard. Specifically I would like to assign value "1" of that factor to the one key and value "0" to another. I don't see that kind of shortcuts in User Preferences panel (in the Input section I found only ShiftK for Set Weight). There's Add New button there but I don't know how to define mentioned values "1" and "0" for Weight factor. If you could help me with that, I would be very grateful.
Answer: To change the Weight value press W (being in Weight Paint mode) and drag the cursor inward/outwards the small circle showing the weight value. After pressing W you may also type the value using numerical keyboard (e.g. you press W, then 1) and the weight value changes to 1).

Remember that you may also use shortcuts to change the Radius (press F) and Strenght values (press Shift+F). Use these to work faster.
Answer: Thank you very much Paul for your time and (very) quick answer. Unfortunately this is not exactly what I'm chasing. I know about possibilities hidden behind W key (as well as F and Shift + F) and it's quite fast. Especially combination "W" and "1" to set weight factor to "1". It is closest to what I would like to have. But... to set it to "0" I have to move my hand over whole keyboard to "0", which is not so fast and require constant hand movement... instead of only fingers movement with wrist based on the edge of my laptop. It seems to be not a big deal, but... I'm simply trying to achieve the fastest and most ergonomic workflow.
Ideally I would like to have something similar to my settings in Gimp when I'm drawing in grayscale - set "Z" (or some other key close to left bottom of a keyboard) to maximum Weight and "X" to minimum Weight. And then quickly switching between them without moving whole hand over the keyboard (with adjustments of Strength from time to time and "enabled tablet pressure sensitivity for strength").
Anyway - thank you again for taking time and trying to help me. If my most desired setting won't possible, then probably the next closest workflow will be combination W and 1 / W and 0.
Best Regards
Jonatan
Answer: Binding a key press to set a property to a certain value
You can bind a key press to set a property value using one of the wm.context_set_XXX operators; in this case wm.context_set_float, since Weight is a float value.  For the full list of operators, see the latest version of the Blender documentation.
The context set operators take a data path and a value.  The data path, also called context attribute, in this case would be tool_settings.unified_paint_settings.weight, which can be found by right-clicking on the Weight value in the user interface and selecting Copy Data Path.
Comment: Thank you - looks like a step in desired direction. I've assigned 0 to Z and 1 to X and it works perfectly.. but only once..
It looks like that: I'm starting new file and default value for Weight is 1. When I press Z it changes to 0. When I press X - it changes back to 1 and thats it. When I press Z again, the value stays 1. When I change it manually to 0 and then I press either Z or X it changes to 1 and stays like that. After reloading startup file - the same story: it works once and then stops working. What I could've do wrong?
Thank you in advance for your help.

Jonatan
Comment: I've assigned those keys and it seems to override the defaults I had setup on those keys.  I am unable to replicate your fault unfortunately, it works flawlessly for me on Z and X.  Have you got the correct values set in the sliders?  Is Relative checked by accident?  Are you using Unified Weight settings across all brushes?
Comment: Yes - the values are set to 0 for Z and 1 for X. Relative is not checked. I have Weight box checked for "Unified Settings" under "Options" menu (I assume that this is what you meant) but when I unchecked it, Z/X stopped work completely (not even once)...

Weight factor - control via keyboard


Export unmodified originals from Photos.app and NOT creating duplicates

Question: I have all my photos in Photos.app. I also maintain them in Dropbox.
My workflow is:

Import from camera/iPhone into Photos
Organize photos into albums - some into new albums, some into existing albums.
Export unmodified originals from Photos to a folder structure that matches the album layout in Photos using File > Export > Export Unmodified Original

New albums are easy. Exporting the entire album is no problem since they are all new files. If I add images to an existing Photos album, I'd like to be able to simply export all of the photos in that album to the Dropbox folder. But if I do that, Photos makes a second copy of the image named "image000(1).jpg".  I don't get prompted to overwrite or not overwrite existing files.
Is there a way to have Photos.app prompt me to overwrite existing files instead of creating duplicates?  Perhaps a hidden plist setting somewhere I can modify...
Answer: In my version of Dropbox for OS X, v3.4.3 (not the latest), it has a feature to automatically upload photos whenever you connect your devices.
It is in Dropbox's preferences, under IMPORT tab, first option
Enable camera uploads for [photos and videos].


Keys-space for a restricted substitution cipher

Question: How can one calculate the key-space for a restricted substitution cipher? A restricted substitution cipher is one where no letter is assigned to itself. For an alphabet with 26  letters how many keys are there for a restricted substitution cipher? What is the correct way to approach this question? I have been adviced to look into cycle notations, Markov chains and the structure of the symmetric group and its conjugacy classes.
Comment: isn't it 25!. Simply you have 25 for the first position, then 24 for the second, and so on.
Comment: @kelalaka Alright, let's say that 'a' can be assigned in 25 ways because we can't fix 'a' with 'A', and 'b' can be assigned in 24 ways because 'a' is already assigned with one and 'b' can't be assigned with 'B'. But, what if 'a' was assigned with 'B', this would make the number of options to be 25.
Answer: It is called derangement, see Wikipedia.
Also, in Mathematics Stack Exchange 1, 2
Number of derangements of n elements $=\sum\limits_{k = 0}^{n}(-1)^k\frac{n!}{k!}$
When n = 26 the result is 148362637348470135821287825 $\approx 2^{87} $
Comment: That seems a bit too much. The derangement can be approximated as !n = (n!/e), and for n = 26, that's of the order of 26, not 87 as you said.
Comment: $\mathcal{O}(2^n) \in \mathcal{O}(n!)$ but  $\mathcal{O}(n!) \notin \mathcal{O}(2^n)$


How much base is needed for small retaining wall?

Question: Using crestone blocks 3.5 inches tall by 11.5 w and 7.5 deep. I will be doing two levels plus caps. What base depth should base material be? I know base brick should sit 1 inch deep for every 8 inches of wall, but how deep should base be?
Answer: The depth of your 'foundation' should be 4" compacted crushed gravel plus one row of your CMU (concrete modular units).  Behind that wall and sitting below the gravel is a perforated 4" pipe wrapped in landscape fabric and back filled with drain rock.  Daylight down slope and there should be a down slope so you control the surface water.  Do not drain onto your neighbor's property.  I've always had to install a simple drywell; a pit with landscape fabric, drainrock (rounded cobble) another layer of landscape fabric then covered with a thin layer of drainrock.  The size of the pit is determined by the surcharge behind you wall and the length of your wall and your area or zone.
Make sure each of  your walls are no more than 3' or you shall be eligible for permit fines if they find out.  One wall no more than 4'.  Check your codes.  Behind the two walls make sure you slope the soil away from the wall about a foot or so down into a little 'swale' to collect surface water and drain towards that drywell pit as well...so bigger pit: Say 4'X6'X3'?  Or more?
Do you have enough depth to your property you could make at least 4 maybe 6' bed between the walls with a mini swale such as the one I described behind the top wall?  If you want to plant that first wall you should put as much space as you are able.  Install perf drain pipe behind both walls.  How much surcharge is behind those walls or slope?  Send a picture.  Drainage will make or break your all your work.  I am not kidding.  I am glad you are doing a cap.  I don't know if you've already selected your cmu but I would suggest as a profession to use ONLY grey with a light grey or concrete cap.  The wall should be 30 % dark grey to make it look more natural.  That cap should be a very light concrete color.  Any color will LOOK DIY.  Reds, browns will look like your wall is dirty or  has a very nasty infection.  Just some tried and true tips from a licensed landscape architect and construction install project manager...blah blah blah.  Dove grey is the only color I ever use for architectural structures in the landscape.  Comes from my background in Japanese garden design principles.  Gravel, concrete, decks, pergolas, arbors and garden walls are always dove grey to allow your plants to be the focus, not say, the fire engine red fence?  Grins.
UPDATE:  Glad you gave more information.  Wish I could just draw you a section, I'm sure I could but dissed learning CAD, I learned to design by paper.
It has always been a no no to use your home's foundation drain as well as storm sewers to direct excess water.  Perhaps your codes are different but the reason for that is you do not want to encourage MORE water to travel to any foundation or concrete.  Water is pretty destructive.  I've had a hard time with the rules for not being able to use the storm drains.  That is why I love dry wells.  Check your codes but it isn't a good idea to ever encourage water to drain towards your home's foundation even if it is into a pipe.
Then I need to know the distance between your wall (the radius is it based on your CMU's for a curvature)? Is there a scale I could use or did I miss that?  I am disturbed there is a slope between you and your home.  That means water is not only draining through the soil towards your wall but towards your home's foundation.  Do you know there is a decent foundation perimeter drain?  Do you have a basement?  Do you know if your foundation has asphalt emulsion between soil and concrete?  Is there a drain in your basement if so where does that go?  And this sump pump.  Now that really worries me.  Tell me more about this pump; where is it, what is its purpose, how often do you have to use it?  Sump pump just tells me a band aid is in place to cover up a problem that you might be exacerbating?  Also, that perf pipe should be on the same level as the bottom of your gravel foundation, not an inch or two above.  It might not be a big deal if I knew more but if you've not installed this pipe try to do so.  Back fill is NOT soil, it should be drainrock.  You want to encourage water to go towards the pipe that allows excess water to flow en mass to a proper spot.  What will the elevation of the patio at the foot of your wall be?  Why 2 walls that close to your home.  Shoot.  I need more information.  How about a picture of the area, excavation in relation to your home's foundation?  Get back to me, okay?  This could be a beautiful addition to your home and if done correctly will add big value to your home.  What planting do you imagine above that wall.  Is it really going to take two walls to accommodate that slope?  Pictures.  I'd rather do this on site but am learning to try being 'virtual'...
Comment: Thanks for the response. So you think a french drain is needed even for a smaller sized retaining wall? Figured it was only necessary for the taller ones around 2ft or higher. This should only be a foot or less.
Comment: Btw, I had asked this questions here:  https://diy.stackexchange.com/questions/114619/installing-retaining-wall-for-pool-sump-pump-drain-line-in-area?noredirect=1#comment176736_114619 Can you please take a look. Thank you.
Comment: If there was surcharge behind 2' walls you bet I would.  Surcharge means there is uphill slope behind the wall and with that there is mass soil that gets charged with water, causes huge force against that wall.  I always drain at the base of a wall as well as on the surface with a swale.  I've seen and have redone walls where they had no drainage and a poor foundation.  I'll check out your link.


Is it possible to change your spawn point?

Question: Is it possible to change the location you beam to on a planet? I've been to a couple of planets that have no usable resources near the spawn point and everything is a good distance East or West. It would be nice to be able to always beam down to there instead.
Answer: It is not yet possible to change your spawn point. The developers have stated in a blog post that it will be included in a future release.
Comment: There's still no in-universe way to do it, but it looks like you can set your spawn point on a planet by using `/admin` and `/setspawnpoint`
Comment: I don't have any primary sources, but there are a few mentions of it in [this thread](http://community.playstarbound.com/index.php?threads/beam-down-bacon.33794/)
Comment: fair enough, I guess "not at present" is a valid answer in itself :)
Comment: Yeah, I don't like leaving this kind of answer, but its the only correct one right now. As soon as the item is implemented, I'll come back and change this (and if I forget, post a comment on it and I'll see it), so whether you want to accept this or wait til then is up to you.
Comment: Has there been any update on this?
Answer: You can change the location you beam down to on a planet by using a Human Flag:

Human Flag is a decorative object available in the basic crafting menu to all Human characters immediately after beginning the game. Each race has a unique flag available.
Flags act as teleporter bookmarks. Once placed, interacting with a flag opens the bookmark window and the location can be saved. Flags do not allow the player to teleport to other bookmarks or their ship, they can only be teleported to from either a ship or a full size teleportation pad.
Comment: Don't all races have their own flags?
Answer: It is not currently possible to change the original spawn point.
You can use Flags or teleporters to create custom spawn points.
In a future release they might introduce Space navigation overhaul:
http://playstarbound.com/spaceoff/
And seems that this might make possible to choose the landing zone
Answer: yes, create platform around 100 blocks above where you spawned, simply obstructing the location.. and sb will give you new spawnpoint... I accidentally did that.. glad I hasn't make much but the new spawn point is not desired :/
Also /admin and /setspawnpoint
Answer: yes you can change you spawn list by going to your player folder every player has a folder and if you found your player you will need to match the file name with a file name hipworld  at the end of the file name. to change the spawn you will need another file and change the hipworld to your hipworld file name and then your can change the whole world


1020x1080 Touchscreen driver

Question: I want to install the LCD-show driver to my raspberry Pi. But the touchscreen I have to use has a 1920 x 1080 resolution. I havent found a way to get the driver for this resolution.
Is there somekind of an alternative?
Comment: the LCD-show drivers are for specific screens, you need to know what the driver is for the touch screen you are using first and install or enable that, then you need to calibrate it. the LCD-show just makes this easy by knowing what to set up for specific screens
Comment: I use a Dell S2240T 21.5 Multi-Touch Monitor. I haven't found a linux driver for this screen.
Comment: you may find that it is supported already, have you tried just plugging it in? what OS are you using? if its plugged in and you right click something to get a context menu up, if you then touch the screen does the menu disappear?
Answer: I now used this driver from git. It works perfectly fine with the Dell Monitor and the desired resolution.

1020x1080 Touchscreen driver


chroot ssh users

Question: I am using CentOS 7.
I need to give shell access to ssh users but restrict them in a jail. I have used jailkit to set up the jail. I have copied all necessary libraries, binaries that are needed for the user in the jailed environment.
The jail directory structure looks like this:
[root@server jail]# pwd

/var/jail

[root@server jail]# ls -l

total 8

drwxr-xr-x. 2 root root   26 May 28 16:17 bin

drwxr-xr-x. 2 root root   41 May 28 16:18 dev

drwxr-xr-x. 3 root root 4096 May 28 16:22 etc

drwxr-xr-x. 3 root root   19 May 28 16:14 home

drwxr-xr-x. 2 root root 4096 May 28 16:09 lib

lrwxrwxrwx. 1 root root    9 May 28 16:14 lib64 -> usr/lib64

drwxr-xr-x. 7 root root   65 May 28 16:18 usr

I have used 'jk_jailuser' to move user home directory to /var/jail/home.
However, when the user logs in, he can cd into other directories in the jailed environment. I want the user to be restricted to his/her home directory and not be able to cd to any other directory.
I have tried to use the Match group directive in sshd_config as follows:
      Match group sshusers

          ChrootDirectory /var/jail/

          X11Forwarding no

          AllowTcpForwarding no

but this is the error I get when I try to login through ssh after setting it:
Could not chdir to home directory /var/jail/./home/user: No such file or directory

/usr/sbin/jk_chrootsh: No such file or directory

and I can't login
I am really stuck here. I can't figure out how to resolve this problem. can someone please help? How can I restrict SSH users to their home directories in a jailed environment?
Answer: The home directory of the user should be relative to the chroot path.
If you want to use /var/jail/home/user as the home directory, you will have to set the user's home to /home/user.
Comment: The user's home directory is set to: /var/jail/./home/user in /etc/passwd

And it is set to /home/user in /var/jail/etc/passwd

chroot ssh users


How to get the opening price of all NSE equities before the market close?

Question: NSE Bhavcopy (csv file with OLHC info of all the equities) are available here. However, it is made available only after the market is closed. So, is there any way to get the open price of all NSE equities before the market close?
Answer: There is currently no such option available for Public. The current file has opening as well as closing prices and hence can only be made available after markets close.
Comment: yup, but i dont need the bhavcopy. I want only the open price. is it possible?
Answer: This is not really a personal finance question but I will try and answer it. As indicated Bhav Copy is only available after the market is closed. If you want it during the market is open, you have to write routines to get the prices by querying the NSE web site some 1500 times (once for each stock) programatically. There is of course another way of buying NSE feed for 12,00,000/- INR per year & querying that feed once.
So, choices are between wait for End of day, screen scrape NSE site 1500 times a day or pay 12,00,000/- INR/annum - thanks


pageblock is null when accessed from the action function called on click of a button present within the pageblock using Dynamic Apex

Question: I have an apex:dynamicComponent binded to a pageBlock. In the apex controller, I add dynamic apex components like text boxes, checkboxes and command buttons to a dynamic panelGrid and then add the panel grid to the pageBlock binded to the apex:dynamicComponent.
In a certain case when i click a button (the remove button) present in the dynamic pageBlock I need to remove certain components(textboxes and other fields) rendered on the screen. For doing this, I used an apex action function which is called on click of the 'remove' button. And the action function called another apex function which is supposed to do the do the removing of certain UI components based on the id of the button which is passed as a parameter by the action function.
In this function when I try to access the dynamic pageBlock (which is declared as a public transient data member of the apex controller) I get a reference to null error. Basically the pageBlock value is null.
But when i try to access the dynamic pageBlock in an access function called on a click of a button that is not present within the same dynamic pageBlock but outside the pageBlock, I don't get that error and am able to access its components and values.
Is there any solution to this problem?
I want to access the rendered pageBlockPanel in an action function called from a button click within the panel itself. After I can access the pageBlockPanel, I can remove certain UI Components from it nad then re-Render the pageBlockPanel with only the required values.
Visualforce page having a binding to the apex variable 'pageBlockPanel'.
<apex:dynamicComponent componentValue="{!pageBlockPanel}"  id="interviewPanel" />
Declaration of the variable in Apex.
public transient Component.Apex.pageBlock pageBlockPanel{get;set;}
Answer: These dynamic components can't be made part of the view state (unlike their static tag-based counterparts) because they are not serializable (by design according to Salesforce support). This means that e.g. when there are errors on fields the behaviour you get is not perfect. And it drives the need for the reference being transient.
Consequently the Apex function that "do(es) the removing of certain UI components based on the id of the button" will have to rebuild the dynamic component tree from scratch (and leave out the relevant UI components in the process) because your pageBlockPanel field will be null. Hopefully you will not lose too much state in the process.
I've used these components in one application and would not use them again.
I do not understand why your logic works in one case and not the other though.


difference between "to grouse" and "to complain"?

Question: I've just discovered the verb "to grouse", and while I understand its meaning, I do not understand the difference with its counterpart "to complain". I've looked it up in a few dictionaries around, but most state both verbs as synonyms, and what explanations are given state they can be used interchangeably. I've also looked up the etymology of grouse, out of curiosity, and etymonline.com state the term used to be a british slang of unclear origin. Is there any particular rule regarding the usage of both verbs, nowadays? In what circumstances should I use one or the other?
Comment: @Knotell - it is clear that the OP has looked the term in a few dictionaries, plus they cite Etymonline, so I don't see any real reason to CV this question.
Comment: Please ***include*** your research in your question, don't just mention. For example, include the names of which dictionaries you consulted.
Answer: To grouse  is to complain mainly about trivial things:

to complain, often about unimportant things.

(Macmillan Dictionary)
as  Vocabulary.com notes:

People's excitement about the rise of the Internet has been largely replaced by disappointment that it's turned out to be essentially a forum for people to grouse. No disappointment is too small to grouse about on the Internet. Did you stub your toe? Grouse about it in your blog! Did your sister tattletale? Get online and start grousing. "I grouse, therefore I am," might be the motto of the Internet.
Comment: From www.etymonline.com, "complain," 1885 (implied in agent noun grouser), British Army slang, of uncertain origin. OED notes "a curious resemblance" to Normandy French dialectal groucer, from Old French groucier, grocier "to murmur, grumble, complain," which is of imitative origin (compare Greek gru "a grunt," gruzein "to grumble;" also see grutch). Related: Groused; grousing. As a noun from 1918, from the verb.


Why is my transaction not visible on ropsten.etherscan

Question: I am testing a contract on a Ropsten network using geth 1.8.8 with command line:
geth --testnet --datadir=""

In order to connect to geth I use web3js version 1, beta 34 running from node.js.
Compiler I use is solc 4.24 release. I was able to publish the contract, where I was able to verify source so you can see it:
https://ropsten.etherscan.io/address/0x62e461ba21ae18cd412eaa4935532da9e519f7d3
After submitting first transaction after creation geth returned the middle and next line:
INFO [05-30|10:31:56] Mining too far in the future             wait=2s
INFO [05-30|10:31:59] Submitted transaction                    fullhash=0x124d796b68a454711b41fb00afda704f92e834db15d392b34857fe79c155eaa8 recipient=0x62e461Ba21AE18cd412eaA4935532Da9E519F7D3
INFO [05-30|10:32:08] Imported new chain segment               blocks=1   txs=4    mgas=0.145   elapsed=16.977ms  mgasps=8.570   number=3339069 hash=89c612…2f245e cache=21.43mB

More lines followed. I am kind of suspicious of the first line but I got same issue in the past even without it.
Searching for transaction returned nothing after two hours:
https://ropsten.etherscan.io/tx/0x124d796b68a454711b41fb00afda704f92e834db15d392b34857fe79c155eaa8
I set gas price to 4 gwei and that was a mistake on my side, but I had transactions execute regardless. I fixed it to 40 gwei and repeated transaction, new one is:
https://ropsten.etherscan.io/tx/0x8e5580b0b7b5b0b4e6493071363a44d59aa43321292e941b6cb057925562aaa6
First error I received in both cases was from inside my webapp soon after geth received 50 new blocks:
Error: Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!

Let me state that this happens relatively often even with a stable internet connection.
Answer: It seems that I had to reduce value I added to nonce from 100 back to 0.


Cannondale 24 Speed BIke

Question: Anyone knows this bike? I only know this is 24 speed. Model name please?
I know this picture is blurry, but this is the only pic.
Comment: http://vintagecannondale.com/info/serial_numbers/
Comment: Planning on stealing it? It seems awful nice of the owner to leave it in front of a supermarket unlocked. I hope that if you are planning on stealing it, that the serial number isn't registered on BikeIndex.org or other registry.
Answer: The cantilevered dropouts date it from 1989 to 1996, the threadless headset to the later end of that. Based on a quick look through the catalogs here, it looks like a 1995 R700, their entry level triathlon/TT bike, which was sold that year with a polished aluminum frame and black fork. That's making the assumption that it wasn't converted to tri-bars later in it's life. It was had a 2x8 (16 speed) drivetrain, not 3x8 (24 speed), but looking at the picture it looks like you may have miscounted the speeds, I see a double not a triple. The brake levers also don't match, but that's an easy switch so they could be aftermarket.

Cannondale 24 Speed BIke


Refrigerated sugar cookie dough

Question: If my sugar cookie dough has been in the fridge for a few days how long should it sit out before I attempt to roll it out?
Comment: There's such a wide variety of sugar cookie recipes, and we don't know what shape/thickness you have it in the fridge. This is often a case of 'try it and see what happens'.  You can always cut a bit off, and try rolling just that bit out
Answer: Assuming your sugar cookie dough is roughly like the one I make for cutting out cookies the be ideal and decorated: not very long.
A few minutes at room temperature should make it malleable enough to roll out this enough for cutting, and the process of working the dough with a rolling pin will warm it a bit more. The warmer the dough, the easier it is for the shapes to deform when moving to a baking sheet -- so you don't want to let it warm too much before you start to work with it.

Refrigerated sugar cookie dough


How to know whether an incoming request is from a search engine robot?

Question: Does anyone know how to detect whether an incoming request is from a search engine robot? Do HTML headers contain any specific info for that?
Answer: You can usually use a combination of IP and the user agent in the HTTP headers to figure it out.  There is an article all about it here: http://www.jafsoft.com/searchengines/spider_hunting.html
Answer: You can use jQuery to check the user agent from the request.
You can get to this information through $.browser
Keep in mind, though, that this is easily spoofed.
Answer: HTTP request has a field named 'user agent'. This field specifies if the request came from Mozilla or internet explorer or some search engine bot. Java, php each has its own command to read this user agent field.


圧が強い what's the meaning?

Question: What exactly means to describe someone saying "圧が強い" (atsu ga tsuyoi) . I know that's something related with "the person has a strong pressure" or "the pressure in that person is strong" but I was wondering about what is the real connotation for this expression.
Comment: Aside from its literal meaning, it has some tricky uses as slang, and it's hard to write a good answer without proper context. Please provide the full context including the full sentence.
Comment: 「あの人圧が強いですね」
actually was in a very casual situation when someone was commenting absently about other person. I thought it could be a slang because I couldn't exactly the meaning. They are close friends so I don't believe is a bad thing.
Answer: Basically this 圧 is a figurative and humorous expression that refers to one's "energy" or "aura". The implication of 圧が強い depends on the context. If it's negative, it implies "oppressing", "noisy and annoying", "scary", "over-confident and rude", etc. If it's neutral or positive, it implies "eager", "looks full of confidence", "has strong presence", etc. This is a rather recent slangy expression, and it's probably not included in a serious dictionary.
Comment: Thank you! I'm having some problems with slangs lately. I started to learn the Formal language but the daily language is being hard to understand.

圧が強い what's the meaning?


How to manually type in handles for anchor in Adobe Illustrator?

Question: In Illustrator CS 5.1, I would like to manually type in the points for handles on an anchor point, as I need to be more exact than moving them with my mouse. How can I do this?
Answer: Bezier handles aren't exposed in the UI for numeric positioning, but if you're looking for better precision for geometry and/or symmetry, try turning on the Grid and Snap to Grid under the View menu. If you adjust the grid to the resolution you need (under Preferences > Guides & Grid) you may have the solution. The Bezier handles will snap to the grid.
If that's not the issue, expand the question with a bit more detail about the exact problem you're trying to solve. There are several very knowledgeable Illustrator folks here who can likely point you to a good workaround.
Answer: The Path Scribe tool by Astute Graphics allows for manual input of bezier curves.
Answer: Place some other dummy object there (i.e. some rectangle) using precise positioning, then use snapping while dragging the bezier points. After that, dispose of the dummy objects.
Answer: It can be useful to set things very precisely like this. I don't know of any perfect way, but here are three imperfect methods that come close:

Open and watch the info window. When you have an anchor handle selected, it gives you all the information about how many points it is from the anchor horizontally and vertically, and what the exact angle is. You can't just type these in, but if the goal is to make sure lots of points rigidly follow a certain pattern more accurately than eyeballing it, this will at least give you reliable objective guidance.
Use a script. The closest to this that I know of are Wundes' Set All The Things and Hiroyuki Sato's Extend Handles. There might be better scripts out there, or these may be enough.
If the goal is simply to make sure anchor points are exactly the same, or exact mirrors of each other, a better approach is probably to simply select the anchor point in question, copy that anchor point and only it in isolation, then flip, rotate, transform as appropriate and Join the points or use the Pathfinder window to join it in with the rest of your shape. Joining very precise paths perfectly smoothly can be a pain, here's a potentially helpful tip if it proves troublesome.


MacBook Air serial number

Question: I am seeking to find a Macbook Air serial number from within the backup files created by the Mountain Lion operating system and stored on an external hard drive. Exactly which file do I need to be looking at? I made the presumption that the backup created by time machine would store the uuid to ensure that the physical MAC address (7 layer OSI model) would be the one that received the backed up files of the MacBook Air. Perhaps in Extended Firmware Interface (EFI) folder although I did see a file mentioned; in a post elsewhere which was com.apple.TimeMachine.MachineID.plist. The same post also said that a sparse bundle created by time machine contained the hardware UUID (effectively the serial number?).
Comment: I'm not aware of a [place even on the boot drive](http://apple.stackexchange.com/questions/84480/retrieve-previous-computer-serial-number-from-old-ext-hard-drive) where the serial gets logged as a matter of routine or standard practice. What precise backup mechanism is in place in case it perhaps adds this tidbit somewhere? Time Machine?
Comment: Cant you check online against the registered apple ID?
Answer: The UUID is not the same as the serial number.
When you use any Mac, some machine-specific preference files are created in your Library/Preferences/ByHost/ directory.  The filenames are of the form
com.apple.app.UUID.plist

So, if you really want the UUID of a previously used machine, you can probably dig it up from some backups in that way.  I don't know how useful that would be though.
I think TimeMachine stores UUIDs of the filesystem, but not the computer itself.  Checking the logs on one of our servers here, I see several fsUUID and eventDBUUID but nothing for the machine.
Comment: Thanks to "Kent" I found the RootVolumeUUID in this file MacintoshHD/Library/Preferences/com.apple.TimeMachine.plist which is something to give the police as opposed to a serial number.
Answer: The serial number isn't read from a system file. It's a hardware information read directly from the hardware.
Comment: Can you expand on this? How does the System Information app display the serial number?
Comment: This is (very) low level programming : It's read from a hardware memory space, probably the EFI which is located in the computer and not the hard drive.
Answer: It could be written to the disk if you had previously run the system profiler. This is the same as "About this Mac" except information is dumped into the Terminal. You could save the report thusly:
system_profiler > ~/systeminfo.txt
Otherwise the serial as mentioned is read directly from the logic board and generally not logged to disk.
Answer: Run in Terminal:
system_profiler SPHardwareDataType

which would print your Hardware UUID and Serial Number.

MacBook Air serial number


What does tor proxy and tor directory stores?

Question: Does tor proxy includes keys that it shares with all tor nodes for encryption?who stores information about all tor nodes in the route?
Answer: No One stores the keys of the Onion Routers making the Virtual Circuit except the Tor Client.
The Tor Client download the list of Onion Routers online. It creates the virtual circuit incrementally by selecting three nodes out of that list. What I mean by incrementally here is that it selects one node and gets its public key and use this key to contact second node and so forth. Thus in the end it's only the client who knows about all the nodes consisting the virtual circuit while all Onion Routers know only the  two nodes adjacent to them.
For more details check this paper, The TOR data communication system.


Two phone numbers (one USA, one Qatari) same phone, calls and text over cell data. Any suggestions on how to accomplish this?

Question: I need your advice and ideas. I am moving to Qatar in a couple days for work and I am trying to figure out the best cellphone situation. Currently I have a Google Nexus 5 which is fabulous, on AT&T which is less than fabulous (but that is beside the point).
My goal is to have my Nexus 5 with a US phone number (doesn't need to be the same one I currently have) that my friends here can call and text me on, and a Qatari number that my coworkers can call and text me on.
Here is where I am at:

Ruled out AT&T completely because their international plans are absurd.
Getting a Vodafone or Oreedo sim and using it my Nexus 5 (this wouldn't have any way for US friends to cheaply call/text though, so I don't think it is the best option)
Going with a t-mobile sim (they have unlimited data and text in Qatar). I would need some way to have two numbers (one US, one Qatari) that could make calls and send texts over cell data. Google voice is one option but I think it only supports one number.

Anyways, any advice would be appreciated. I have thought about this a lot and done some research but I can't find a way to easily and cheaply do it.
Also, if this question could be better answered or belongs on a different stackexchange site, please let me know.
Thanks!
Answer: Android supports VOIP built in. You could get a US # from someone like callcentric.


port address translation

Question: I was reading about different type of NETWORK ADDRESS TRANSLATION (NAT) techniques from a book, and was reading about a special type of NAT that is called port address translation, and it's known that whenever an incoming packet comes from a host to a router(NAT) the router changes it's source ip by its own ip address and removes it's original port number(source) by an arbitrary generated port number by the NAT device,now my question is why do we need to change the source port number? can't a nat router keep  original source port unchanged and just only change the source ip?
Comment: PAT (Port Address Translation) is a vendor-specific term for NAPT (Network Address Port Translation). See _[RFC 2663, IP Network Address Translator (NAT) Terminology and Considerations](https://tools.ietf.org/html/rfc2663)_, among others.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
Answer: Usually, NAT routers provide connectivity for multiple (private address) nodes. Since these nodes don't coordinate the source ports they use, they may use the same source port number simultaneously, even to the same destination.
Since that destination would see the same source IP address (the NAT router's) and the same source port (incidentally), all datagrams would be regarded to belong to the same L4 connection (socket). For TCP as the transport layer protocol, the merged sockets would produce a high number of segment errors, likely killing the connections.
Also, the NAT router would be unable to properly separate the incoming traffic to the original nodes, breaking their connections.
So, most NA(P)T routers use a separate source port for each connection they translate. That ensures that connections can work reliably and simplifies NAT connection management.
Answer: Assuming router is deployed in network and configure for NAT   translation traffic , and is configured with a source NAT which translates any IP address on the Inside network to public ip configure on ergress interface of router IP .Assuming local iP range  10.230.10.0/24 to the public  IP address 188.8.131.52 .when outbound traffic is intiàted from inside network of any pc packets with souce ip arrives at router before packet goes outside souce ip is get translated with public ip , and router makes note of the attributes of the original and translated packet in the router's NAT table
For clear understanding assuming PC1 PC2,  each send a packet. They each use their own, unique Private IP address as the Source IP address, and they each randomly select a Source Port.
From  65,500 port numbers that can be chosen, and it is entirely feasible for two different PCs  to randomly select the same source port
However  configuration of the source NAT does not include  a port number. Even though the ports are not explicitly set in the Router's configuration, this translation is still classified as a PAT because the port is dynamically changed by the NAT device, upon receiving  packet, the router translates the source IP address of each packet to 126.96.36.199 and randomly selects a new, unique source port number for each packet 6578, 6543,  The router translated the port (PAT) and the Router selected the new source port dynamically every souce ip translated randomly selected port mapping is stored in router NAT table for reference for reverse traffic of same session . When reverse traffic of same session arrive on router router again checks in NAT table and send packet to specific PC on this way responce traffic reaches correct PC in internal network..
If souce port is not allocated randomly by router while translating packet . Responce traffic cannot  be destined to correct souce ip in inside network from where traffic is intiàted
Answer: Let's assume, your private range is 192.168.0.0/24 and you're public IP address is 18.104.22.168.
Your router/modem uses 22.214.171.124 to NAT/PAT out your private range IP address.
As per your question, If PC-1, 192.168.0.1, wants to go out to a website(HTTP - TCP 80), in that case, your router will use 18.104.22.168:80, then what will router use when PC-2, 192.168.0.2, needs to go out to a website(HTTP - TCP 80)? If it uses the same source port, then how will it identify the return traffic belongs to PC-1 or PC-2?
To resolve the issue, the router/modem tag each device with a unique port number. In my example, the request from PC-1 will be sent out as 188.8.131.52:1111 and the request from PC-2 as 188.8.131.52:2222. Therefore, in the return traffic, the router looks at the destination port and identifies whether it belongs to PC-1 or PC-2.
Note: IP address: Port Number
Answer: There is an answer to your question in this post:
https://networkengineering.stackexchange.com/a/47522/3675
I'll paste the relevant content here:

You are likely referring to a Dynamic PAT -- which is a type
of translation which allows any number of internal hosts to share one
or more public IP addresses:

In the illustration above, notice all three hosts initiate connections
to a destination on the Internet. All three hosts (A, B, and C) select
their own source ports randomly (2222, 3333, and 3333, respectively).
When their packets traverse the translation device, the router selects
new source ports (7777, 8888, 9999, respectively).
This is crucial, because the re-writing of the source port is what
allows the return traffic to be forwarded back to the correct
initiating host:

The Router made note of the mapping between initial source port and
post-translation source port, and uses that to correctly return the
response traffic to the correct host.
Had the Router NOT re-written the source ports, both Host B and Host
C's return packets would have been to the same destination port:

When those packets would make their way back to the Router, there
would be no way for the Router to know which packet should have gone
to Host B and which packet should have gone to Host C.
Hence, it is crucial for the Dynamic PAT device to also re-write the
source port to ensure the return traffic can be successfully returned
to the original host.
To learn more about Dynamic PAT's operation, check out the Dynamic
PAT Article in the Network Address Translation article Series

port address translation


Storing Data as XML

Question: In which cases storing data as XML is preferable to RDBMS and why?
Can you give any analogy?
Comment: Neither of these answers are complete. Won't you consider volume of data or any other thing...?
Comment: Neither is the question :) How would you answer the qustion without any more details?
Comment: I wasn't talking about data-transfer. I was talking about data storage. either temporary or permanent storage.
Answer: Summary
If you don't have much data and you're in total control of it (no dependent 3rd parties), XML is a nice option. Otherwise, RDBMS - see below for more reasons.
Analogy
If RDBMS is a filing cabinet (drawers of same-sized records organized by some index) then XML is a back-pack (not-necessarily-organized bag of randomly-sized records, may stick out at the corners).
Reasons for XML
1) Flexibility
If your schema is either very loose or changes over time, XML is preferable as versioning RDMS is hard once there's data inside it. In my experience, XML Serialization, XSLT and XPath queries are resilient to changes in the XML schema and can continue to work for old/new clients. For example, you can add some new elements into a document and an older EXE that reads that document will just ignore those elements. An RDBMS query that does 'SELECT * FROM table' where you just added a column will have undefined results.
2) Deployment
Easy - just ship your EXE.
3) Debugability
Easy to 'debug' the data - the XML could be human-readable already; if not, XSLT may make it more readable.
4) Interoperability
You can hand the XML off to other systems and not care what platform/technology they use.
Reasons for RDBMS
1) Performance
If you have a lot of data, then the indexing features of a RDBMS will give you best performance. Reading a large XML (> 1000 records) is expensive if you're fundamentally just trying to find the record with ID=123, which RDBMS can do in a snap. Stored Procedures would make this even better.
2) Security
You can secure parts of RDBMS through permissions - e.g. grant/deny SELECT access to various users.
3) Business Tools
There are many RDBMS tools for things such as OLAP and reporting.
Answer: If the data can naturally be described in a tree like structure, XML could be OK. I'd prefer a lighter alternative, though. YAML and JSON are candidates.
Comment: I would always be careful with too deep nested trees in xml. Pure, deeply nested trees should not be mapped one-to-one to a xml representation, or disaster will ensue, sooner or later.
Comment: Sure, all nesting should come to an end. If you don't know in advance, how deep the tree will be, an XML like syntax has some merits over mapping to tables in a RDB, though.
Comment: RDMS can do trees too - look up CTE's.
Answer: I would never favour storing many XML files worth of data over a database anytime.
XML is good for readable and extendable file formats - e.g. when you save in an application. XML is preferable as it allows anyone else to use that file format.
Another time XML is preferable is for configuration settings. For example, I do a lot of game programming and it would be madness for myself to store gameplay settings in a database. An XML (or any file for that matter) is much easier.
However given records (data in records) such as products, or customers you would be very wrong to favour something other than  a database to store this data. Back up, speed and scalability being three examples why.
So the answer is - it depends.
You have to be the judge and make the right call.
As for an analogy:

"XML is like tupperware. If you went shopping and got home, yes you could put each item in a custom made tupperware box, but at the end of the day its probably easier just to put stuff in the fridge."

XML has its place though, as I menetioned above.
Answer: I would be very careful because XML is not a data storage device.  XML is a meta-language, a language for creating languages.  XML is frequently misused as a data storage device, but that frequency does not provide credence to a faulty understanding of the technology.
I have heard somebody attempt to argue this claiming that meta-language means a language of data about data, which is still not a data storage device.  A language created to represent a description upon the structure of data is not a language of the data itself, and while an instance of the language may be a structure created of data the language itself is not.
If your intent is not to create a language or to represent a language for a class of data I would not recommend using XML as the result will be bloated, slow, and you will not likely use any of the assisting technologies that make XML truly powerful.  As alternatives others have mentioned YAML and JSON, which are considerably lighter.  I would recommend trying one of those.  If the meta data, and its structure/relationships, is more important to you than the data itself then I would stick with XML because because the potential for processing and manipulation is incredibly extensible.
Answer: If you have to move them around in a compatible, human accessible format, or if the conceptual model of your data does not follow easily the relational model.
Also, if your application wants to store data in an easy to parse, but still extensible format. Take for example a browser. I would store the bookmarks data in an XML file, not in a relational table.
Answer: I would store XML in a database if I already get it as XML (like from a web service call or something) and need to keep the "original" data copy somewhere.
I might also store something in XML that's highly hierarchical and/or only semi-structured, something that's just awkward and tricky to express in rows/columns that a normal RDBMS table excels at.
Typically, whenever you need to process the information in your database or apps using your database, it's easier to do if it's in relational tables. So unless you really have good reason to use XML, don't just use it because you're too lazy to create a few tables.
XML has its merits and all - but it's in general rather verbose, a bit cumbersome to handle at times (it's much easier to SELECT on a column in your table than reaching into the XML to grab out a value), and overall typically slower than using relational tables straight away.
SELECT fieldName
FROM table

is easier to use and read and comprehend than
SELECT
   xmlData.value('(xpath-expression)[1]', 'int') as 'Field'
FROM table

So, to sum up: use it if you really see a need and benefit, but don't overdo it (just because you can or because it's cool or sexy). Use with caution and with good reasons.
Marc
Comment: How is SELECT 'easier'? what are you comparing with here?
Comment: it's easier to say "SELECT fieldName FROM table" rather than having to do "SELECT xmlData.value('(xpath-expression)[1]', 'int')" and so forth
Comment: I think the original question refers to storing data in an XML file on disk, not an XML column in a database.
Comment: @Todd: could be - right. So my "rant" only applies to storing data in relational tables vs. storing the same data as XML in the database :-)
Answer: Mostly XML is preferred over database for writing application preferences/settings.
I assume it because,
1. It is easier to corrupt database files
2. XML support cross platform portability.
Answer: I assume you mean "XML in a sequential text file". Otherwise it's not really an either/or question: you could store XML in a relational database, you could export a relational database to XML, etc. That said ...
XML is great for complex data streams with unpredictable data. Like a text file: at any point it could be meaningful to start a new chapter, include a footnote, switch to italics etc. You would not normally expect every chapter to have the same number of footnotes, or even that every text document would include footnotes. You would not expect every document to have six words of plain text followed by three words in italics followed by a footnote, etc. XML allows tags to occur in a very flexible way.
Relational databases are great for data in consistent formats. For, say, a customer order, you would expect to have a customer name, address, item ordered, price, etc. An order with no customer specified is almost surely not processable.
Many people today are using XML for all data storage and transfer. I think this is a big mistake. XML is not only very cumbersome for data that comes in predictable formats -- the so-called "bracket tax" -- but it also creates all sorts of opportunities for error. A fixed format like CSV provides no way to even say that you want two customer names on the same order. There's only one place to put it, there's no way to put it twice. But in XML you could include two "customer" tags or attributes. CSV gives no way to specify undefined attributes. There's no way that the customer name is in italics or the price is in kilograms. But in XML there could be any arbitrary set of attributes. Thus a program trying to process an XML stream for fixed data has to deal with all sorts of possible errors that would not even come up in other formats.
Answer: I use XML by hard. In Addition with http://commons.apache.org/digester/ it is an powerful source. Just my 2 Cents.
Answer: Lots of good responses here, but they all miss the most important point. The big problem a relational database solves for you is synchronizing multiuser access. For a single user program, you can read everything into memory from a set of XML files at startup and write it all out again on save - if you can find a market for single-user software in the first place. For the general case of multiuser access, that solution won't work, and if you start messing around with fine-grained locking, you're basically setting out to redo about 30 years of work that is already done for you if you use a relational database.

Storing Data as XML


Sheep that speaks the day of your death

Question: I once heard a myth which went along the lines that somewhere in the North of England there was a sheep (or other animal) which, if approached at the correct time (probably midnight) and date, would speak the day of your death (I'm not sure exactly how it went though).  Unfortunately when I've tried to find out about this my searches have drawn a blank.  Does anyone know of a myth like this, or did I just imagine it?
Comment: See [Mioritza](http://en.wikipedia.org/wiki/Mioritza).
Answer: It is very likely that you didn't imagine it: in the folklore of the British Isles beings of different shapes (often shape-shifting) who foretell one's death are extremely common. What you describe seems like a variation (perhaps very local?) of various legendary creatures attested in Northern England. Here are few examples which are somewhat reminiscent of your description:

Padfoot (from "The Encyclopedia of Celtic Mythology and Folklore" by Patricia Monaghan):

In Yorkshire, this strange donkey-sized  creature appeared as an omen of death; it looked like an amorphous shaggy ball with eyes or a wooly white dog.

Barguest (from "A Dictionary of English Folklore" by Jacqueline Simpson and Steve Roud):

This is the name for a
particularly alarming shape-changing bogey
animal in the folklore of Yorkshire, Lancashire, and other northern areas, which might be encountered at stiles and in dark lanes, or near churchyards. Sometimes it was only heard, not seen; it howled and shrieked, and to hear it was an omen of someone's approaching death—possibly one's own.

Guytrash (from "A Dictionary of English Folklore" by Jacqueline Simpson and Steve Roud):

A frightening shapechanging
apparition, usually in animal form,
in the folklore of northern England. [...] (It) appears mostly as 'a black dog dragging a chain, a dusky calf, nay, even a rolling stone' [...] a North-of-England spirit, called a Gytrash, which, in the form of horse, mule or
large dog, haunted solitary ways [...] Another possible form is that of a large cow; to see it is an omen of death, for oneself or another.

Shotton Dobby (from "A Dictionary of English Folklore" by Jacqueline Simpson and Steve Roud):

In County Durham, the Shotton Dobby appeared
at births or deaths in the village, as a goose,
dog, horse, donkey, or cow.

Unfortunately, none of these completely matches your description, but it should give you an idea of how abundant such folk motifs are in Northern England, and how likely it is that the myth you heard belongs to this category.

Sheep that speaks the day of your death


Spotlight Euro Exchange rate seems stuck to 2 weeks ago

Question: I use Spotlight to currency conversions several times a day.
E.g. I type into Spotlight
100 EUR to GBP
or
500 USD to CZK
However I have just noticed that the exchange rate is stuck to that of 2-3 weeks ago
For example, spotlight returns:
1 GBP = 1.34 EUR ---> should be ---> 1 GBP = 1.39 EUR
1 USD = 0.66 GBP ---> this is correct
1 EUR = 136.45 YEN ---> should be ---> 1 EUR = 132.19 YEN
The strange thing is that Spotlight's data source is Yahoo, but checking directly the exchange rate with Yahoo the correct rate is returned. So it seems like there's an issue with Spotlight.
Can anyone try it from their end? And if it's only an issue that affects me, any ideas of what to do to get it fixed?
Comment: Insane that this is still an issue in macOS 12.6. The lack of "Last update" date makes Spotlight dangerous to use for this purpose.
Answer: Rebooting the machine sorted out the issue, but not sure if it's only at bootup that OS X refreshes the exchange rates. So the problem might happen again if I don't reboot the machine for a long time


What is the word on the executive's face, and why is it there?

Question: The guy who runs Armadyne has a word like "RICH E" or "RICHE" on his face. What exactly is the word, and why is it on his face?
Answer: The word on John Carlyle's face is RICHE, which is French for rich. He also has some sort of "branding" on his forehead, so I believe that these are a form of body modification (the proof of citizenship branded on the characters' arms appear to be of the same type).
Director Blomkamp explains in an interview about product placements, "We did make up our own brands because we couldn't get enough of them," Blomkamp explains of labels such as "Riche," a moniker that is branded onto the skin of characters who have partaken of a beauty enhancement. "We had a binder with thousands of fake brands and awesome logos. But they don't mean anything to people, they just look like future brands. It doesn't have the same resonance."

Image courtesy of armadyne.net
It is my interpretation that language is used as a device to further separate the two classes;  Jessica Delacourt spoke French while at the social gathering. The wealthy citizens of Elysium speak French, while the poor citizens of Earth speak Spanish.
Comment: Indeed, the French seemed like a nice detail distinguishing the upper class from the others, like a reference to the English aristocrats following the Normannic invasion that persisted to speak French at the court during the middle ages. Yet the Spanish on earth was probably more a regional effect of the plot being set in *Los Angeles* (an *L.A.* merged even more with Hispannic culture than today's).
Comment: Given that *Armadyne* was one of the few *Elysians* that actually worked on earth, he had even more reason to distinguish himself from the "scum", therefore this "tattoo".
Answer: RICHE appears to be a fictional luxury brand. As you can see from this image from the "Art of the Film" book, the bio-beds evidently had the ability to sculpt customised faces designed by various luxury brand makers like Rolex and Prada.
Note that in the film version, they apparently used a mixture of real and fake brands for cinematic reasons:

Elysium citizen flesh design exploration, we did hundreds of these,
  here were a few
Comment: I feel like this needs hand-drawn circles to highlight the important bits.
Answer: The word "riche" has implications beyond just wealth.  It also has connotations of power, authority, dominion, etc. I think this supports the theory that having the word embossed in one's skin is a cultural status symbol rather than a fictional brand.
Rich people love rich brands, but I don't think they love them enough to embed them in their skin, seems like something they would find tacky.  Admittedly, they would probably feel the same having any word embossed in their skin - but it serves as a quick device to tell the viewer more about the character's motivations.  They were able to secure other brands for the movie, so it stands to reason that we would have seen "BVLGARI" or a Bugatti logo on the skin if it was intended as a show of brand loyalty.  Carlyle did "drive" a Bugatti afterall.
I also noticed that President Patel in the movie has another word on the same spot of his face.  I wasn't able to make out what the word is, but it definitely looks to be a different word.  Discerning that word could be the key to a definitive answer.


How to embed a single photo from Google+ into a blog

Question: I've created photo galleries on my blog. I used tables and it was easy to embed pics from Picasa. I did some complicated thing to embed pics from Google+ not too long ago but I cannot figure it out again. So, how can I embed a single photo from Google+?
Answer: Depending on how streamlined you want this process, it seems to be fairly trivial to get the public URL of individual photos using the tools in your browser.
When you are viewing the photo (either full screen or just the thumbnail) on Google+ you can select "Copy image URL" (Chrome) or "Copy Image Location" (Firefox) from the right-mouse/context menu. You can then use this URL on your blog/website.
All images on Google+ are publicly accessible (not even sure you can make them private?) - only hidden behind an obscure/hard to guess URL - so there are no permissions that need to be changed.


Well issues, losing water overnight

Question: So, basic back story, well pump was done in 2012, approx 7 years old. House is 1992 built, 3 bathrooms, 4 kids, 2 adults. The kids shower almost every night back to back, which recently became an issue as water pressure drops to the point of nothing.  This goes on for months, and if you let the system sit turned on overnight, water pressure is back to normal in the morning. Well is 280' deep, static depth is marked as 10' deep on the well tank. Well pressure tank as far as I can tell is original to the house, I have not changed it since I moved in, 2006. Well Xtrol 20 gallon pressure tank.  I had checked the air pressure when the problem first arose this summer, and found it to be ~15psi. I readjusted it to 28.  I had a plumber come check the system to determine the fault. They said the well pump was failing and drawing 4 amps which they said is abnormal. They replaced the pressure switch because I had installed one with a shutoff.  After receiving a ridiculous quote for $2400 to replace the pump, I decided to replace the pump myself with the same unit.  3/4hp, Goulds. Same exact unit that we had before.  Pain in the ass dragging 280' of line and the pump up by hand, but somehow got it done. Replaced the pump and motor assembly, torque arrestor, spacers, and lots of electrical tape.  Everything I got from the supply house was awesome and well priced.  Since replacing the pump, anytime we call on a significant amount of water, ie; 4 kids showering back to back, the water will randomly lose pressure and die completely.  I will leave everything on overnight and in the morning, approx 8 hours later, the water is back to normal. 50-60 psi. The thing I have noticed is the amount of sediment. We have two water filters for sediment, one is larger than the other.  The first larger one is getting very dirty very quickly. It used to take a good 3-6 months to get really dirty so that water pressure dropped, but now it seems to only take a couple weeks.   I'm at wits end and really just want this water issue fixed!  Looking for advice on what to do next.  Thank you!
Comment: I would be surprised that a 230v pump would pump at all with 120v. I have found when you over draw a well or pull it down hard more sediment gets in so that makes sense to me. I would want to verify the pump voltage because I would not expect it to run at 120v but there are 120v 3/4 horse pumps and if you hit a 120v pump with 240v it would let the magic smoke out. To solve your issue you may need to get a large holding tank this is how many homes deal with low flow problems.
Comment: Apparently 280' isn't deep enough. Amperage should decrease if it's running the well dry. Got an ammeter? If the amperage goes up, the pump can't deal with the head pressure, which why not to run a 220 pump on 110. Or there's crap in there.
Comment: I forgot to mention one aspect of the system that confuses me.  I was checking the pump control box last night after the water had stopped working.  Found out that although it was hanging on the wall, it wasn't wired to be working. The wires come from the pressure switch and go through the control box right to the well head.  The contacts in the box are not being used.  Since it's a 2 wire pump, I believe that is ok, a pump controller is not needed.  But if the well pump is rated for 230 volts, is running it on 120 volts working properly?
Comment: This is really hard to read and I'm having difficulty finding the question.  Perhaps you could edit?
Comment: Chris Cudmore, I tried to give my backstory so all the info is there and I don't have to answer multiple questions about what I have or what has been changed.   Long story short, my water pressure drops after my 4 kids take showers back to back. Let the system sit overnight and water pressure is back to normal.
Comment: If your static depth is really 10 feet, you should be able to see water from the top of the well - did you see it when you changed the pump?
Answer: Looking at the timing of the question, you may have already solved your issue(s), but in the event that you didn't, here's a few tips.
1) Water systems are meant to be used, even if it involves kids who like long showers. I personally like a nice long, hot shower, so in our situation it would have been a test of self-control. Besides, who would purchase a 2-ton truck and be told that you could only put 300lbs in it? Plus, the previous answer estimated 15 litres a minute for a shower - that's a lot more water than any shower I have used. In the U.S., most shower heads limit the flow to under 2 gallons per minute (gpm), which would equate to roughly less than 8 litres per minute.
2) Could be the pump, but the impact of that would be felt much more rapidly. It would probably start to show as soon as the pressure tank lost it's capacity on about the first shower.
3) The sediment is probably coming from exhausting the capacity of your well. I picture the pump sucking water out of the water table until it starts running dry and then getting sediment from the empty cavity. Overnight the well replenishes itself and fills the pressure tank.
What will solve almost all of your problems is a reserve tank, sometime called a cistern. This is just a big poly tank of roughly 1000 gallons, that acts as your main water source. The existing pump supplies the reserve tank with a capacity switch that turns on when it reaches a low level and a separate surface pump supplies your current pressure tank. This will put a lot less strain on your well, well pump and provide constant water supply to your house. It will also make it easier to filter the sediment.
If you are able to change out a well pump at 280', then you can install a reserve tank and surface pump. It's not a complex task and you can save a lot of money by doing it yourself. I built a small shed around the tank to dress it up a bit, leaving enough room for the surface pump and a shelf of replacement filters. The surface pump should be available at the same location you purchased the other pump.
My neighbor also installed a reserve tank and put in two pressure tanks, as he wanted the pressure to remain more constant while he was using it. In any event, this should solve all of your capacity issues and make filtering a lot easier.
Answer: With a significant sediment issue I can recommend (happy user, not in any way connected) a type of filter that spins out the bulk of sediment by a vortex action to a reservoir where it can be removed (by opening a valve) without needing to change the actual filter element, (which in my case is a washable screen element) at least as a pre-filter before any other sort of filter that could get clogged up. "Spin Out" or "Spin Down" are reasonable search terms to find that type of filter.
A two-wire 240V pump is normally just wired with 2 wires carrying 240V (+ a grounding wire) - using two wires does not mean it's running on 120V unless you measured the voltage at 120V, and in that case it had better be a 120V pump (unlikely with a 3/4 horsepower, possible with a 1/2 horsepower) or someone did something wrong. One possible thing someone did wrong was specifying the pump that you replaced with "the exact same model" in the first place - its obviously not the original pump if there's a 3-wire pump control box hanging around. There are many variations in pumps and the related pump curves - yours may not be ideal, or else you really are overdrawing the well (assuming a 6" casing [you didn't specify] and 10 foot static depth, with a pump set at 280 ft, you should have ~400 gallons of reserve capacity, which seems like it should be plenty.)
Answer: Several things:

Re-train the kids to a 3 minute shower: (Australia uses shower timers and so do showers in swimming pools etc) A shower should be get wet, water off soap on, then rinse off... Not a 20 minute marathon...
Why give the motor 120V when it is designed for 240V? Have you checked the voltage being delivered?
The lowering of the water level may have put the intake in a "dirtier" position, so you should check.

If, back in 2012, there were only 2 of you, then the water use has increased from say 400 litres to 1200 litres per day, assuming 200 litres per person.
If you think of a shower at 15 litres a minute, then a 3 minute shower is 45 litres but a 20 minute shower is 300 litres then multiplied by 4 kids 1200 litres just for showers without the rest of the use.
Comment: That's my question, is it ok to run the pump on 120 volts, which is what I measured with a dmm. Even though it's rated at 230 volts.   And we have been limiting showers to 5 min a piece, but sometimes after 2-3 showers, the water has quit.

Well issues, losing water overnight


How to Fix DNS Leak with VPN

Question: So Im using Juno and I can't get my NordVPN to work correctly. I keep getting DNS Leaks. I'm pretty sure the issue has to do with the OpenVPN protocol. Anyone know how to fix this problem? Thanks.
Answer: Hi This is a bug in openVPN. If you want to fix DNS leak you need to use Nordvpn linux client. You can connect to nordvpn with terminal command nordvpn connect <server name> after installing the nordvpn client. See website of nordvpn how to install on linux.

How to Fix DNS Leak with VPN


How do I interface 3.3 volt devices like (MCP4725 - DAC, A4989 - stepper controller, etc) to raspberry pi WITHOUT using its internal 3.3V power supply

Question: I want to connect MCP4725 breakout to Rpi. The datasheet of MCP4725 says that "the SDA and SCL pins are open drain N channel drivers. Therefore they need pull-up resistors from the Vdd line." The raspberry pi pins 3,5 have their own pull-ups so i must connect them directly to the SDA and SCL pins of the MCP4725 (by cutting the traces on the breakout to disconnect the pull-ups on the breakout). But these means that I have to power the MCP4725 using the internal 3.3V supply of raspberry pi. I don't like doing this since I would like to connect many 3.3V devices to Rpi, and I don't want to load the pi's internal power supply. I want to connect these devices using external 3.3 volt power supply. I don't know how to keep this external power supply from interfering with the pi's internal one. Please advice.
Comment: Your Raspberry Pi already has pull-up resistors on pin#3 (GPIO2/SDA) & pin#5(GPIO3/SCL). Snip off any resistors on your MCP4725 breakout board. You have no other option because resistors in parallel have reduced resistance and that could destroy your RPI.
Answer: I don't see how disabling pullups would cause any problems.
In general you can access an I²C device powered by 5V provided there are no pullup to 5V.
How much current do these unnamed devices use?
I doubt it would exceed the ~800mA the Pi can safely supply.
Answer: Answer
I would suggest the following workaround:

Power MCP4715 and other I2C devices with an external 3V3 power supply.

It is true that MCP4725 SDA and SCL pins need pull up resistors, BUT since RPI SDA and SCL pins already have on board pull ups (strong 1k8 pullups), then MCP4725 now shares Rpi's built in pullups.
In other words, there is no need for any redundant pullups at the MCP4725 side.

The external 3V3 PSU would NOT interfere with Rpi's 3V3 power rail.

You might like to draw a schematic to make 100% sure you do understand my suggestion.

One more thing - your MCP4725 breaqkout/module/board usually already has on board SMD pullups (usually 4k7, not so usually 10k), then it is a good idea to remove them, so not to load the I2C bus with too much impedance/capacitance and exceed the standard I2C bus's 400pF limit, causing instability. (6) Yes, ALL on bus's modules pullbups can be removed.

References
(1) 12-Bit Digital-to-Analog Converter with EEPROM Memory in SOT-23-6 - MicroChip
(2) How can Rpi3/4 interface multiple ADS1015/ADS1115 ADCs? - Asked 2019apr12, Viewed 544 times
(3) Change I2C address for ADS1015 (with example on how to remove I2C devices's SMD on board pull up resistor - RpiSE 2011jun10
(4) Rpi3 Interfacing MCP4725 12-bit DAC Problem - Asked 2018apr28, Viewed 836 times

Appendices
Appendix A - How to remove the on board pullups of an I2C device breakout module.

Appendix B - MCP4725 Wiring Example

Appendix C - MCP4725 Demo Program
MCP4725 Demo Program V0.1


Publishing an XNA project on Windows Store

Question: I have made an application in XNA that I want to sell on Windows Store. When it comes to uploading in the Windows Store dashboard it says files need to be in the format xap, .appx, .appxbundle or .appxupload but I can't figure out how to create these files.
The best information I could find is https://msdn.microsoft.com/en-us/library/hh454036.aspx but I don't have "Store" in my Project menu. I am using Visual Studio 2015 and XNA 4.0.5
Comment: You might try rewriting your game as a native C++/DirectX Universal Windows Platform (UWP) project. Or you could wait for the Win32 wrapper Microsoft is working on yo be finished. Applications found on te store no longer have the .exe format. The targeted the UWP API and not the old Win32 API.
Answer: XNA games aren't directly support in the Windows Store. The "appx" file types are generated when building a Windows Store app (it's one of the project options when you are creating a new project). As "rlam12" mentioned in his comment, there is a Win32 wrapper being worked on that can take a regular .exe and convert it into a Windows Store app. However, this won't be out for some time.
If you want to avoid re-writing your game from scratch into C++/DirectX, you could look into using MonoGame and then build a Windows Store MonoGame project. MonoGame is basically the open source version of XNA from when it stopped development back several years ago. I haven't used MonoGame is a long time, but it should hopefully not be a difficult transition. Here's a link to a short tutorial on how to get started with MonoGame and Windows 10 Store App development:
http://www.codeproject.com/Tips/1015929/XNA-Basics-Windows-and-MonoGame
Comment: It is a little iconic that you need to use the open source alternative to publish on Windows Store.
Comment: Since XNA hasn't been supported for almost 5+ years, it's not horribly unreasonable. I'm glad MonoGame has come to fill the void of XNA, but it is unfortunate that it has been dropped in favor of things like Unity.
Comment: XNA Game Studio has a number of limitations that make it unsuited to both the Universal Windows Platform (UWP), Xbox One, and the Windows 8 Store: It uses Direct3D 9 (unsupported), D3DX9 (deprecated), is x86 32-bit only (i.e. no x64 native or ARM), and a number of other technical issues. Monogame, SharpDX/SlimDX, Unity, etc. have all stepped in to fully support C#-based DirectX game development years ago. The ability to support non-Microsoft platforms is also a benefit these alternative solutions provide that XNA Game Studio cannot.


Can I reproduce a trademarked logo in my blog?

Question: I have a blog about marketing. I am writing a new post where I talk about different Apple logos. Can I make a screen shot from Apple website and include that image in my blog? I just want to illustrate my text and help the reader follow what I am explaining.
Comment: Which country(ies) are you writing and hosting your blog in?
Comment: @Andrew: I am in Spain now. But does it matter? My blog is in English and most of my readers are in US.
Comment: It matters because Fair Use laws differ in different jurisdictions. It doesn't matter where your readers are; it matters where you are and (possibly) where your servers are located.
Answer: Yes.
You only ask if you can. Yes, you can.
I'm assuming your question is more about if you violate any trademarks. In which case what you are doing sounds like it will fit into common exceptions to copyright law viz free speech and criticism.
The worst that will likely happen is you get a cease and desist letter.


2005 Prius-After replacing 12 volt battery, door won't open, but car runs

Question: After replacing the 12 volt battery, hatchback door still won't open, however I drove the car several miles, only it lost power, the red triangle light cut back on, along with HV battery fans. Display also showed that symbol on the energy light, which went from green to red, with the picture of a broken car, or so it appears to me.
Is it the 12 volt battery that is bad, although brand new from NAPA, or something more serious?
Thanks a bunch!
Comment: I'd be surprised if the new 12 V battery was bad. It may not be something "more serious" - but I don't know enough about hybrids to comment on what could be going on. Do you know anything about the health of the HV battery.
Answer: The battery is probably not the problem... it sounds like the 12V battery charging device (the actual name is DC Converter/Inverter-- it's what priuses are using instead of alternators) is the problem. You can have the guys at most auto parts stores check your alternator (for free), and I would expect the test to be the about the same for whatever you use to charge a 12v battery. You basically need about 14 volts for charging a 12 volt battery.

Of course, most autopart stores also have diagnosatic code readers, so that might be helpful to diagnose the electrical problem.
Note: the size of the battery is important. Look in the owners manual to see what exact RC rating that your 12v battery is... if your new battery is the wrong size that might explain the warning light.
Regarding the door issue, I would look for problems with the door, not the battery. While I'm not very familiar with prius(es?), I've never heard of a car battery causing a problem with a car door opening... the battery in the key fob could cause a problem.
Comment: The Prius does not have an alternator. The 12 battery is charged with a DC-DC converter that is located in the main inverter housing.
Comment: @FredWilson I revised my answer.


Hands when playing Omaha

Question: When playing Omaha If the community cards have 3 nines come up and I hold the 4th nine can I claim four of a kind?
Answer: Yes.  You must use exactly two cards from your hand to make your best 5-card poker hand, so if there were three 9's on the board your best hand would use the 9 and the highest ranked other card from your hand.  For example, if you held KQ97 and the board were 999AJ, your best hand would use the 9 and K, for a best hand of 9999K. Of course, in this case the kicker is meaningless, since no other player can also have quad 9's.
Answer: The answer is yes.
And although you didnt ask here is some side info :
Kickers do not matter with Quads in Omaha.
When you hold quads you can only loose to a straight / royal flush or higher quads.
I think the odds of losing with Quads is around 1 in 56,000

Hands when playing Omaha


Is the number of feature maps equal to the number of kernels in the LeNet 5 architecture?

Question: In LeNet 5's first layer, the number of feature maps is equal to the number of kernels. However, the second convolutional layer has a depth different from the 3rd layer. Does the filter size dictate the number of feature maps?
Comment: Which LeNet5's picture are you looking at?
Comment: https://medium.com/@shahariarrabby/lenet-5-alexnet-vgg-16-from-deeplearning-ai-2a4fa5f26344

in short my doubt is this. does the filter size dictates the number of feature maps or the vice versa?
Answer: The # of kernels will be the channel length, looking at the image you posted in your comment from post, I do not understand where you see the inconsistency.
Answer:
In this case, each kernel has the same depth as the depth of the input cuboid. In the architecture above, we have an (input) cuboid of dimension $14 \times 14 \times 6$, where $6$ is the depth, which is followed by an (output) cuboid of dimension $10 \times 10 \times 16$, where $16$ is the depth, which is the number of (output) feature maps (or channels) and it is also equal to the number of kernels applied to the (input) cuboid of dimensions $14 \times 14 \times 6$. Each of these $16$ kernels has a depth of $6$. So, each of these $16$ kernels has a shape of $5\times 5 \times 6$.
In general, the depth of the input cuboid can be different than the depth of the output cuboid, which is often equal to the number of kernels applied to the input cuboid (but this is not always the case). Furthermore, the depth of each kernel (applied to the input cuboid) has (often) the same depth as the input cuboid.
Comment: Source of the image: [https://harangdev.github.io/deep-learning/convolutional-neural-networks/25/](https://harangdev.github.io/deep-learning/convolutional-neural-networks/25/).


Shaving in Islam

Question: Assalamualaikum, I am 15 and I have just found out about the ruling of shaving the pubic hair (men's). I wanted to know if you could simply just cut it very short with scissors rather than shaving it and also how should we approach removing hair from areas around the back passage?
Answer: Please read this and this also.
In addition, I will give you some tips.

Shave every two weeks
Don't wear tight underwear after shaving for 2-3 days. So its better to shave on Friday night and walk freely on the weekends.
There will be small cuts here and there. Remember that the skin on your scrotum is very hard and not easily cut by a blade.
Don't use aftershave lotion. Use a mix of 1 spoon honey and 2 drops lemon juice. Its good for the skin and small cuts.
Initially it might take you 1-2 hours. With practice you can do it in under 10 minutes.

It's really no big deal. All the best.

Shaving in Islam


Having single parent list and multiple (different) child lists using lookUp column

Question: My name is George and I am new to Sharepoint.
I started using Sharepoint 2013 foundation and I want to make a relation between a parent list which has a lookup column (something like 'Type') and more than three child lists, different lists, which have the column that specify the 'Type'.
How could i make this kind of relation? I read about one to one relation by adding a web part - the child list, but what happens when i have more than one child list? is there anyone who can help me on this issue?
Thanks,
Answer: At site collection level, create a site lookup column(Say, TestColumnX) that refers to your list Say "TestListA" and point to the title field.
On your child site, go to you desired list settings and add a new column based from an existing one. Pick the one you just created.