Best practice for daily iOS app to cloud sync?

Question: I have a background app that has to upload small amount of data (several kb) to the cloud every day.
In your opinion what is the best way to trigger the upload?
Should I trigger it at specific time of the day or at some other event?
What if the upload fails (airplane mode) - how long should I wait before I try again?
My app gets awaken every time the phone detects a region change (cell tower change), so I could use that as event. My main concern is battery usage.
Thanks,
Ventsi
Answer: Do it every 24 hours. In case it fails (no coverage?), try again on cell tower change. If this has succeeded once, revert back to 24 hour timer.


insufficient space?

Question: I have an android next book tablet. I have a 16 GB SD card in it. Why is it still telling me I have insufficient space? How can I make things download straight to the SD card and not the internal storage?
Answer: Prior to Android 4.4 (KitKat), apps that are too large for internal storage could automatically load themselves into external storage, as long as the app supports loading into external storage (not all do!). That doesn't mean you would never run out of internal storage, though. It's quite possible, between apps, caches, and stored data that you could not have enough space even to download the APK. You have to manage this yourself by moving apps to external storage.
KitKat changes a significant portion of this by making the SD card essentially read-only, assuming your device has enough internal storage to do what you need. Most devices come with some sort of file manager that will allow you to move photos, videos, and other files off to the SD card, but most apps cannot do that themselves. Instead, a directory within internal storage is used by default. More importantly, as user GiantTree notes in a comment, even apps no longer get moved to the external card.
Adding an SD card doesn't magically expand memory. It's a separate storage area that you usually have to manage, especially with KitKat and probably Lollipop.
Comment: As a side note: beginning with Android 4.4 you can't move apps to your external SD card anymore. The SD card you are moving them to is your internal SD or simply your device storage that seems to be independent of the internal/application storage.
Comment: Didn't even think of that. Updated the answer. Thank you!

insufficient space?


How to calculate Longitude from Right Ascension?

Question: Considering that a star of certain declination is crossing the local meridian at the observer's zenith at an unknown location on the earth. Here, the declination of the star is equal to the observer's latitude. Knowing the Right Ascension of the star, how could the observer calculate his longitude?
Example: The star Miaplacidus (Dec: -69° 42' and RA: 9h 13m) crossing at the observer's zenith!
Latitude = 69° 42' S
[ Longitude= RA(Decimal Conversion) X 15° ... I'm not sure how to proceed from here ... ]
Comment: You need a clock. Do you have one for this exercise?
Comment: Nope :/ Perhaps proceed with a time or consider september 21 midnight... ST=LT
Answer: In other "words", the connection between the time of transit $t_\mathrm{tr}$ of an object, its right ascension $\alpha$ and the geographical longitude of an observer $l$ is the (apparent) siderial time at Greenwich $\theta_0$ (if you know your local siderial time $\theta$, you don't need $\theta_0$ or $l$):
$$t_\mathrm{tr} = \alpha - \theta_0 - l = \alpha - \theta.$$
Answer: Let's think it is september 21 midnight AT GREENWHICH (you didn't specify midnight where).
Let's go to http://www.csgnetwork.com/siderealjuliantimecalc.html
There input september 21, midnight at Greenwich. It says Sidereal time (ST) is 00:00:6.62 or, in hours, 0.001839h
This number is the difference between any star RA and its Azimuth at Greenwich.
Miaplacidus has a RA of 9h13min (9,216667h) so its Azimuth at Greenwich is 9,218506 at that moment.
Since the star is at Azimuth 0 for you, you are -9,218506h away from greenwich, that is (multiplying by 15) -138,27759º away from Greenwich. This is your Longitude.


Check engine light 2005 Toyota Corolla

Question: I have a Toyota Corolla. The check engine light came on and the car does not accelerate. It starts, but it won't go faster than 5 mph.
Comment: You're going to need to get a scan tool (or someone that has one) to read the trouble codes.  Any answer you get without that will be a guess at best.  If the check engine light is flashing, don't drive the car.
Answer: Is it a Manual Transmission or an Automatic?  First you should check to see if your brakes are not locked up.  When you turn the car on and press the brake is it really hard to get the pedal to go down?  If your pedal goes all the way down and you get a whaut sound when releasing the brake pedal? You could have a bad Power Brake Booster which could cause your brake pistons to close but will not allow them to retract thus causing you to accelerate more to pickup speed because the rotors are heating up and swelling against your already locked brake pads & pistons. if you have a Manual transmission your problem could be A worn Clutch.  If it is an Automatic Transmission your problem could be your transmission torque converter.  There is no true diagnosis here without an on sight inspection of the vehicle.  I urge you to watch some videos on the subjects I mentioned here. A good idea is to purchase a cheap $50. vehicle scanner at your local Auto Parts Store.  I keep one in my car incase anything goes wrong I can plug it into my vehicle wherever I'm at and just use my phone to Google the scanner codes for their definitions which will tell me what's wrong with the car. This is how I help Friends, neighbors, and drivers on the road.  The cheap scanners will only give you the code but the more expensive scanners can go as far as telling you what part you need to replace

Check engine light 2005 Toyota Corolla


What happens to reputation when someone flags a post?

Question: I know flagging a post is the way to let moderators know something is wrong, but does this impact reputation at all?  If I flag an offensive post, for example, does the user who made the post loose any reputation, or are there any negative consequences to the offender?  Do I gain reputation from raising helpful flags?
Comment: In short: you don't gain any reputation whatsoever from flags. Authors of offensive or spam posts lose 100 reputation only if the post got 6 such flags.
Answer: There is no gain/loss of reputation points from a single flag anywhere on the Stack Exchange network, for either the flagger or the flaggee.
As noted in the comments, if a post gets 6 spam or offensive flags, its author will lose 100 points, but that's the only reputation effect.
Raising flags impacts only four things.

Raising the daily cap on the number of flags you can raise on a given site.

Up to a maximum of 100 flags/day on a given site.

Your personal flagging statistics.

Not rep points, but it can be kind of addictive to see that number inch up.  I'm almost at 2,000 on Server Fault... just 11 more to go!
If you ever run in a moderator election, your flagging history is a prominent statistic that many people will use to determine your mod-worthiness.

Obtaining the flag-related badges.

Citizen Patrol, Deputy and Marshall

Review queues.

Flagging a post as very low quality, or not an answer, for example, will put it into the Low Quality queue for other users to review.
Comment: "There is no gain/loss of reputation points from a single flag" - that is not true. Single spam/offensive flag cause automatic downvote, cast by Community. So such a flag has -2 instant rep impact. (And yes, it allows "double downvote" by same user.)


Merge the [salutations] tag to the [greetings] tag

Question: We should merge salutations (1 question) to greetings (3 questions) and make the former a synonym for the latter.  (Currently there are not enough high-rep users to do this without moderator actions.)
Comment: In the cases where we don't have enough high rep users I have been putting the same text in each tag and included boilerplate text about the intention to merge with which tag.
Comment: @YOU: Thanks! .
Answer: This was completed (we like to have an answer so this does not show up as unanswered..)


Free U2 album doesn't show up in artist folder under U2

Question: The album is instead in my iTunes artist list filed under 'G'?! So my artist list looks like this: Green Day, U2, David Guetta. I do have a song by Green Day and U2 which also appears here but don't know why Songs of Innocence isn't filed under U2 with the other albums of theirs. What is going on and how do I fix it, please?
Answer: Check the Songs list, sort by Artist & see if the same happens; then shift/select the entire album tracklist, hit  Cmd  +  I  & make sure both Artist & Album Artist say U2.


How do I make all dialog popups display on secondary monitor?

Question: So I've been learning how to use Adobe Photoshop and I came across a unique problem. At first I thought Photoshop was bugging out and was getting frustrated considering I just bought Adobe Photoshop CC and your required to subscribe for one year (monthly payments). I noticed when I was trying to use image resize and my mouse turned square but the dialog box didn't popup, I kept force closing thinking it was a bug or something. Finally I restarted my computer and told it to NOT reopen windows. I opened photoshop, moved photoshop to my larger secondary monitor and tried again. And there the image dialog box was it had been popping under windows. I am using Adobe Photoshop CC 2017 on macOS and want to know if there is an option I can select to force all dialog popups for photoshop to open on the secondary monitor and not under other windows on my primary monitor.
Answer: I don't believe you can control where dialog boxes appear initially, other than to reset them so they all appear on the primary monitor.
For most dialog boxes you can drag them to the secondary monitor after they pop up. Then when they appear subsequently, they should pop up at the location you moved them to (on the second monitor).
However, there will still be some dialogs that present themselves on the primary monitor. You just have to get used to looking there if you don't see a dialog you expect to see.


How to completely remove Ubuntu 12.04 after restoring computer to factory settings?

Question: I have reset my computer to factory settings (without knowing that Ubuntu will not be uninstalled). After setting up, Ubuntu was still listed at the start up boot manager, when I selected it, it gave me errors. Ubuntu 12.04 also stole my 18GB hard drive. Now, I can't find Ubuntu uninstaller in my programs nor I can't find Ubuntu files in my C drive. By the way, I installed Ubuntu 12.04 with WUBI installer. How do I completely remove Ubuntu from my computer? Please help me fix this problem.
Answer: How to completely remove Ubuntu installed with Wubi...
Normal uninstall
Uninstall it by going to the control panel, Add/Remove programs and find the Ubuntu entry and double click to automatically uninstall.
Manual Uninstall
If the normal uninstall didn't work for some reason e.g. you already manually deleted the \ubuntu directory manually or did a factory restore) you should follow the instructions in the Wubi guide to manually uninstall.
If you think that there's still some space 'stolen' from your drive, then you should run chkdsk /f (note that this requires a reboot if you're running it on the C: drive). After that, look in the hidden, protected folder \found.000 (or .001 etc.) and look within that for any file that is Gigabytes in size and remove it. (If you had important data you lost, don't remove it, you can probably recover the data... but that's another topic).
One area that is fiddly is the BCD store for Windows Vista/7. If you've tried to manually remove Ubuntu or done that factory restore, but the Ubuntu entry remains, then it's simple to remove it using bcdedit:
To use bcdedit, run cmd.exe (Run as administrator), then enter bcdedit to show all boot entries, note the {GUID} specified for the Ubuntu entry, and then remove it: bcdedit /delete {GUID}
Here's an example:
C:\Windows\system32>bcdedit

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume2
description             Windows Boot Manager
locale                  en-us
inherit                 {globalsettings}
default                 {current}
resumeobject            {6529eb15-62be-11e0-b237-a8486d1f5063}
displayorder            {current}
                        {c001df0c-5ec0-11e1-a466-005056c00008}
toolsdisplayorder       {memdiag}
timeout                 10

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-us
inherit                 {bootloadersettings}
recoverysequence        {6529eb17-62be-11e0-b237-a8486d1f5063}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {6529eb15-62be-11e0-b237-a8486d1f5063}
nx                      OptIn

Real-mode Boot Sector
---------------------
identifier              {c001df0c-5ec0-11e1-a466-005056c00008}
device                  partition=C:
path                    \ubuntu\winboot\wubildr.mbr
description             Ubuntu

C:\Windows\system32>bcdedit /delete {c001df0c-5ec0-11e1-a466-005056c00008}

Make sure you run cmd.exe as an administrator (not logged in an administrator account... there is a difference).
Comment: Well informed tutorials, this was what I was looking for. Thank you :-)
Answer: You can go online to here on a different computer and download the Ubuntu Live CD software. Install it to a USB drive or burn it to a disk following the instructions. Boot up your computer using that. If you need to copy your files to save them (if you don't have a backup) then get an external hard disk (I'm not sure if a flash drive can handle the size of your files) and copy all your files to it. Then, after that is done, on the Live CD (you should have been doing all these steps on the Ubuntu Live CD by the way) start a clean install of Ubuntu. If you DON'T want Ubuntu anymore, use the Live CD to reformat your disk. You should be fine, after that.
Comment: Not a problem. Just create a bootable USB drive instead:
http://www.ubuntu.com/download/help/try-ubuntu-before-you-install
Comment: Thank for your comment but my computer is a netbook and doesn't have a external cd drive :'(
Comment: I get errors after ubuntu logo...


Where is the Apps key on a standard Microsoft keyboard?

Question: ConEmu has a shortcut for renaming the current tab. It's Apps+R. I have never seen an Apps key on any keyboard. Where is it?
Comment: Who is reading documentation, really? http://code.google.com/p/conemu-maximus5/wiki/AppsKey
Comment: Honestly, it's right next to the 'Any' key.
Comment: Reference to it by [Autohotkey](http://www.autohotkey.com/docs/misc/Remap.htm): "Makes the right Alt key become the Apps key (which is the key that opens the context menu)." :)
Comment: New link (rip google code) https://conemu.github.io/en/AppsKey.html
Answer:
In computing, the menu key or application key ≣ Menu
is a key found on Microsoft Windows-oriented computer keyboards,
introduced at the same time as the Windows logo  key. Its symbol is usually a small icon depicting
a pointer hovering above a menu, and it is typically found on the
right side of the keyboard between the right Windows logo key
 and the right Ctrl key
(or between the right Alt key and the right Ctrl
key).
While the Windows key is present on the vast majority of
keyboards intended for use with the Windows operating system, the menu
key is frequently omitted in the interest of space, particularly on
portable and laptop keyboards.
The key's primary function is to
launch a context menu with the keyboard rather than with the usual
right-mouse button. It can be used when the right-mouse button is not
present on a mouse.
Some Windows public terminals do not have a ≣ Menu key on their keyboard
to prevent users from right clicking; however, in many Windows
applications, a similar functionality can be invoked with the ⇧
Shift+F10 keyboard shortcut, or sometimes Ctrl+⇧ Shift+F10.
Some laptop computers include a menu function on the Fn key
(usually
operated by typing ⇧ Shift+Fn); however, this generally invokes
functions built into the vendor's software and is not the same as the
key described above. For example, the Logitech Illuminated Keyboard
has an FN key where the menu key is usually found.
Pressing FN together with the keyboard's print screen key
PrtScr, above Home
produces the ≣ Menu key function.
Programmers using the Windows API can intercept this key by looking
for a WM_KEYDOWN message with wParam VK_APPS (defined as 0x5D in
winuser.h). It has key code 117 (0x75).

Source: Wikipedia - Menu key

Where is the key located on the keyboard?

On most keyboards it's between the Fn and Ctrl keys.
The key in question typically looks like the following:
Comment: @Wolfpack'08 - I did indeed quote and cite an external source.  If you feel there is a problem with this answer.  My suggestion would be to flag it for a moderator to handle. However, this answer was actually submitted 15 seconds before the other answer, which references the same Wikipedia article, so I don't believe it to be a duplicate.
Comment: @Wolfpack'08 - I appreciate the feedback
Answer: It's another name for the Menu Key. (http://en.wikipedia.org/wiki/Menu_key)
It typically has a picture of a right-click menu on it.
Answer: From the ConEmu documentation:
Answer: The "APPS" Key is also known as the "Context Menu Key". This may clarify (1) that it does what a right mouse click does, reveal the context menu for the current context and (2) that what you see depends on the context - what has the focus (active in-focus window, selected file/directory tree item, etc.) and (3) for those who sometimes DO make intentional use of the context menu function, what sort of things might be accomplished through the use of the "APPS" key. Also (4) it may suggest the oft-ignored methods for adding more to, or altering the performance of, the context menu's options for the current context.
bon appetite
Answer: On my Pavilion g7 it just shows the menu icon without the mouse pointer, but acts exactly like a right mouse click. And yes it is between the right Alt & Ctrl keys.
Comment: This does not really answer the authors question


Can a free hydrogen atom constitute ionizing radiation?

Question: Radiation is basically just particles flying around, right? Are free hydrogen atoms just typically not moving fast enough to be considered "radiation"?
Answer: The key question here is "At what temperature?".
Room temperature corresponds to a mean energy of about 1/40 eV and the tail just doesn't go high enough to be interesting.
Once a significant portion of the atoms have a few eV, then they could begin ionizing some materials but the per atom dose will be tiny and there will be no penetration to speak of. Once they have close to 13 eV a large fraction of the hydrogen will be ionized and you'll have a plasma.
We typically talk about ionizing radiation having at least tens of eV and preferably rather more than that.
Comment: You are preoccupied with thermal motion too. Think of a high-speed probe in interstellar space.
Answer: A hydrogen atom is a neutral object, and even if it somehow acquired large energy it would still not ionize measurably , as a neutron does not ionize. The term ionize means electrons are kicked out of other neutral atoms making them positively charged for a while.
Hydrogen is composed of an electron and a proton. If hydrogen is hit by ionizing radiation and becomes a free electron  and a proton, those  are certainly part of what is termed ionizing radiation, if they can gain from the impact enough energy not to recombine to a neutral hydrogen atom.
Radiation  is a more inclusive term, and encompasses ionizing radiation, but also includes neutral objects with high enough energy to penetrate bulk materials and cause radiation damage from scatterings with nuclei, which then produce high energy ionizing ( charged) radiation products, as neutrons do. Hydrogen is neither a scattering product from such scatters nor easily accelerated to energies high enough to penetrate materials without losing its electron and becoming a proton, nor a byproduct of nuclear decays.
See also the other  answers .
Comment: Any atom (e.g. a hydrogen atom) can break on impact and both split itself and ionize surrounding matter. Although the question is not clear, the answer is utterly misleading.
Comment: By the way, "hydrogen atoms as a ionizing radiation" would be **a practical concern,** for example, during an (interstellar) flight through a molecular hydrogen cloud. "…nor easily accelerated to energies high enough to penetrate materials…" is a very narrow-minded statement.


Is there a way to loop in some way, the w slider on 4D nodes?

Question: I have a little procedural nodes animation that has a wavering 4d noise texture made by adding the #frame driver to the W value. I would like it to loop, but since the W value is like a random seed, there's obviously not some distant number it can go to that will be the same. I've also thought about having the w value go up, to a certain point and then back down, but I think that would be too noticeable. I know I will probably have to use something other than the W value but any ideas would help.
Comment: Depending on what effect you are looking for a mapping node with one rotation channel keyframed could do the trick (rotations loop every 360 degrees). If you could add a little more info about your setup, node tree, etc
Comment: As @Gorgious says,  for a loop, rather than a ping-pong you want the coordinates to follow some kind of circle.. [This loops in 2D space as well](https://blender.stackexchange.com/a/195316/35559), but you could give that up to loop in time only.
Answer: Full Method
This method isn't perfect for everything, but perhaps it will get you started.
Create a segment of animation of the length you desire, where the effect fades in, runs for a length of time, fades out, and the parameters of the animation are reset to the beginning values while invisible.
Select these nodes and duplicate them, and then you can G + X Grab all of the newly created nodes' keyframes in the dopesheet and Constrain to the X-axis to offset the animation timing by a number of frames.
With a sufficient number of "channels" of animation, perhaps rotated or scaled differently, you should be able to create an animation where the fade of one channel is obscured by the activity of the others.
Here's a video explaining the process.  I think it's better than cluttering this page with gifs.
Simplified Method for Quick Results
You can use a 3d texture and animate the movement of the coordinate space.
I have a sample scene here with a large plane that is just meant to show how the coordinate plane is moving, and a cube representing your object.  Right now they both have Object Coordinates showing.

Using a Mapping node, we can rotate the coordinate space.  If you use these coordinates to generate noise and animate the z rotation, the noise will be rotating about your object.

If you don't want rotation but instead a more linear movement, you can add a second mapping node in front to offset the origin and thus offset the point of rotation.  Doing them both in one mapping node still rotates from the center.

From here, every 360 degree rotation still puts you right back where you started, but indeed you could map out any movement you wanted.
If you find the effect is not to your liking from some angles, I bet it would be possible to combine this with a W value that climbs to a certain value and falls back down, and it may not appear such a sudden change.
Answer: Similar issue. This ones just a fireflies tut on you tube. But Ive done a few other Tutorials and faced pretty much the exact same issue with the Noise Texture 4d drivers example - frame/1500. Just trying to add some animation to these vidz.
Anyways, here's my config
Fireflies Geometry Nodes None Looper:

Here is the blender file:
https://drive.google.com/file/d/1b7trBDKuzAjXUdE9R9lBSUJ7sJNzLvPo/view?usp=sharing
Youtube Tutorial  Reference:
https://www.youtube.com/watch?v=tedaXMgMYts&t=614s


What is a "grand slam single"?

Question: MLB calls this a "grand slam single." How is that possible?
Comment: Is there any reason you haven't signed up for a full account? You seem to have created four or five different unregistered accounts by this point, which will make it impossible for you to track responses and answers to the questions you've posted previously.
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Answer: In a tie game in extra innings and the home team is at bat, the game is over as soon as the winning run is scored. So even though the batter hit a homerun and the bases are loaded (hence a "grand slam"), once the runner crosses home plate and the batter reaches first, there's no reason for the other runners continuing. You can see the team celebrating with the batter in the field and because he didn't touch all the bases, so it was officially scored as a single.
Comment: The rule about the game ending immediately after the winning run scores was changed in 1920 to allow batters hitting a home run to be credited with a home run. Ventura was only credited with a single because he failed to run out the bases, not just because the winning run scored.
Answer: "grand slam single" isn't an official term.  As the batter hit a home run with the bases loaded, he would normally be allowed to touch all the bases and have all 4 runners score (7.02(g)(3)).
But after the ball was struck, teammates came onto the field to celebrate and prevented him from continuing to second base.  You can see a quick shot Ventura waving to keep them away so he could finish, but they didn't depart.
Per the approved ruling, if the batter does something to cause him to be out (in this case 5.09(b)(2), abandoning an effort to touch the next base after having touched first base), then the game is over after the winning run scores.  The batter is credited with a single and (in this case) one RBI.

What is a "grand slam single"?


Find all tables without foreign keys in a database

Question: In SQL Server, how do we find all tables which do not have either of:

foreign key constraints
references by other tables' foreign keys
Answer: SwapnilBhate's answer will return tables that are referenced by a foreign key. Adding a further LEFT JOIN will exclude these:
SELECT tbl.name
FROM sys.tables AS tbl
    LEFT JOIN sys.foreign_key_columns AS fKey
        ON tbl.object_id = fKey.parent_object_id
    LEFT JOIN sys.foreign_key_columns AS rKey
        ON tbl.object_id = rKey.referenced_object_id
WHERE fKey.parent_object_id IS NULL
    AND rKey.referenced_object_id IS NULL;

Answer: You can make use of the sp_fkeys procedure to get the logical foreign key information. But the limitation is you have to execute is by passing the table name as the input parameter. More info for the same can be found at below MSDN library.
sp_fkeys
Alternatively you can make use of below query to get all the tables from sys.tables and check if the same table object_id exists in the sys.foreign_key_columns.
SELECT tbl.name
FROM sys.tables AS tbl
    LEFT JOIN sys.foreign_key_columns AS fKey
    ON tbl.object_id = fKey.parent_object_id
WHERE fKey.parent_object_id IS NULL

Answer: For the sake of completeness, you can also query sys.foreign_keys instead of sys.foreign_key_columns to find tables that are both unreferenced and not referencing others:
SELECT
  schema_name = s.name,
  table_name  = t.name
FROM
  sys.tables AS t
  INNER JOIN sys.schemas AS s ON t.schema_id = s.schema_id
  LEFT JOIN sys.foreign_keys AS fk
    ON t.object_id IN (fk.parent_object_id, fk.referenced_object_id)
WHERE
  t.is_ms_shipped = 0
  AND fk.object_id IS NULL
;

The query additionally shows each table' schema name, because sometimes systems are built using more than just the default dbo schema.
I have also included the is_ms_shipped = 0 filter in the query because I am assuming you want to exclude predefined/system tables from the search.
Answer: This will also give you the referenced table:
SELECT TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS Where COLUMN_NAME like '%id' AND  COLUMN_NAME <> 'Id' AND DATA_TYPE = 'int'
    AND TABLE_NAME + COLUMN_NAME NOT IN (SELECT OBJECT_NAME(fk.parent_object_id) + cpa.name
                                        FROM   sys.foreign_keys fk
                                        INNER JOIN sys.foreign_key_columns fkc ON  fkc.constraint_object_id = fk.object_id
                                        INNER JOIN sys.columns cpa ON  fkc.parent_object_id = cpa.object_id AND fkc.parent_column_id = cpa.column_id
                                        INNER JOIN sys.columns cref ON  fkc.referenced_object_id = cref.object_id AND fkc.referenced_column_id = cref.column_id)
    order by TABLE_NAME, COLUMN_NAME


Inverted mirror/live duplicate

Question: When mirroring the mirrored side of the object gets inverted (just like a normal mirror). I need the mirrored object to be exactly the same as the other one. Much more like a live duplicate so when I edit the first object the same thing gets applied to the duplicate. How would I do this? If there is no way using the UI then there sure must be a way to do this in a script, right?
Answer: You can press Alt + D to create an instance (live duplicate as I called it in the question)
Answer: Or,  you can apply an array modifier set the offset to what you want  and  then start doing  what you want on the original mesh. After you're  done hit apply

Inverted mirror/live duplicate


Android Developer taxes in the UK

Question: I'm living in the UK and doing some after hours experiments with Android OS. Some of my apps started getting money. I still haven't entered my bank details in Merchant account, so every time after login I see a warning that earnings are postponed because of this. My question is should I and how do I pay taxes on these earnings which are around £100-500 per month. I do have full-time job so my company does all the tax work from my primary earnings. Maybe there is a way to convert these directly to Google Checkout or Paypal so I could spend them on Amazon?
Comment: I highly recommend setting up your self-employed status (and get UTR from HMRC). This could seem complicated but it's not! You are making a decent amount of money and who knows that with a little effort this could be your primary source of income! You could also create a separate business banking account (though it's not required)---HSBC has a free business banking for 18 months.
Answer: Legally you are obliged to pay income tax and possibly self-employed National Insurance contributions on these earnings - see this page for details of how HMRC will handle this. You should write to HMRC after the end of each tax year to inform them of the extra income - you may well end up having to complete a tax return, which is quite straightforward.

Android Developer taxes in the UK


How to find a string in an NSArray?

Question: This feels like such a stupid question, but how can I find a string in an NSArray?
I tried using
[array indexOfObjectIdenticalTo:myString]

but that requires the sting to have the same address.
Does anyone have any tips on how to do this?
Answer: You want the indexOfObject: method, which looks for the object by sending each object in the array an isEqual: message.
Answer: Peter's answer is correct.
One additional note;  if you have tons and tons of strings in the array, -indexOfObject: is going to do a linear search.   This may prove to be a performance bottleneck for which you should consider using a different container;  an NSSet or NSDictionary, possibly (depending on what the strings mean).
Another gotcha is if the strings are all relatively similar and/or relatively long.
Of course, don't bother optimizing anything until you have used the analysis tools to prove that you have a performance issue.
Answer: You can use NSOrderSet as the container, the over view in NSOrderedSet Class Reference is below:

NSOrderedSet and its subclass, NSMutableOrderedSet, declare the programmatic interfaces to an ordered collection of objects.
NSOrderedSet declares the programmatic interface for static sets of distinct objects. You >establish a static set's entries when it's created, and thereafter the entries can't be >modified. NSMutableOrderedSet, on the other hand, declares a programmatic interface for >dynamic sets of distinct objects. A dynamic—or mutable—set allows the addition and deletion >of entries at any time, automatically allocating memory as needed.
You can use ordered sets as an alternative to arrays when the order of elements is important >and performance in testing whether an object is contained in the set is a consideration— >testing for membership of an array is slower than testing for membership of a set.

Visit http://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSOrderedSet_Class/Reference/Reference.html
Answer: containsObject:
Returns a Boolean value that indicates whether a given object is present in the array.

(BOOL)containsObject:(id)anObject
Parameters
anObject
An object.

Return Value
YES if anObject is present in the array, otherwise NO.
Discussion
This method determines whether anObject is present in the array by sending an isEqual: message to each of the array's objects (and passing anObject as the parameter to each isEqual: message).
Declared In
NSArray.h

How to find a string in an NSArray?


How to turn an activity into a service in android?

Question: I am new to android and I have written a program that displays the location of the android user and also sends it via a web service to a server. In my application I wanted this to run in the background while a list of names and other processes are going on the screen. I have searched this and found that a service can be run in the background and I was wondering if anyone had any suggestions  on how to turn this into a service?
Answer: A service would not be the best use for this.  Services run in the background, but they run on the same thread as the main UI thread of the application.  This is fine if the user is not directly interacting with the application.  For example, if you have an app that loads a file to a server, you can have a button that starts the service to load the file and close the activity for the app while the service continues to run in the background.  Once the file is loaded, you can pop up a notification that the file was loaded or just shut the service down.
Service that run while the activity is running in the foreground can block the activity.  Thus, you don't want to use a Service for this purpose as the UI won't update while a service is downloading or uploading something to a server
What you want is an AsyncTask.  AsyncTask is a one-shot thread handler that allows you to do high-intensive work while updating the UI.
http://developer.android.com/reference/android/os/AsyncTask.html
If you want to do this continuously, then AsyncTask may not work.  In this case, you can use Java timers or standard Java threads to handle continuous work.  Just note that you NEVER want to update the UI from any other thread than the UI thread.  It will make your app crash eventually.
Answer: Read the Service class documentation in the SDK, it has all you want to know plus examples.


Download from app store

Question: When I want to download from App Store it is asking me to switch to US store or KWT or Saudi store.how I can get rid of this?
Answer: You see the prompt if the App Store is set to a country which is different from your iTunes account. Your option is to either sign in (with an existing or create a new ) iTunes account belonging to that country. There is another option which is to change your current iTunes account's country to that country, but you'll LOSE any credit balance.
Comment: I once requested support for country switching thing. And there's a lot of things and details, so if you are to switch your account to another country, I recommend STRONGLY to request a support and have someone explain all the details.
Comment: Agree 100% with Shane, highly recommend you do this at an Apple Retail (not Online) Store if possible so there's an Apple Genius to help walk you through the steps.

Download from app store


Why are the leaves on my pink Aglaonema fading and turning yellow?

Question: My Aglaonema is fading rapidly. The leaves are pale in appearance and are turning yellow. Can you tell me what is happening?
Comment: assuming it's indoors, how long have you had it? Does it receive direct sunlight? And a photo would be very helpful
Comment: Possibly helpful: http://gardening.stackexchange.com/questions/9265/why-are-my-aglaonemas-leaves-turning-yellow-rapidly
Answer: Truly have to have a picture so my answer is that of a blind person, okay?  These plants do so well in shade otherwise I'd say it needed more light.  So it is more likely a chemical deficiency.  Have you fertilized this plant?  Is it in potting soil?  One of the chemicals (I hate the word nutrients, nutrition or food because these chemicals are NOT food...plants make their own food) would be manganese.  We need to know if you, again, have ever fertilized, if so when was the last time, what was the formulation of this fertilizer?  These are all questions we will ask even after we see your picture.
The fix is to spray Manganese Chelate right on the leaves but do not do that willy nilly.  You have to know for sure that this is the problem.  If you've never fertilized I would go get OSMOCOTE 15-5-10 as this is meant for foliage.  Otherwise OSMOCOTE 14-14-14 is more all around and can be used for foliage plants as well as flowering/vegetables.  I am NOT a Scott's company fan at all and this is the ONLY product I would purchase from them.  Tried and true and simple and lasts a long time.  I wouldn't use it more than twice per year, same amount that is in the directions but only twice per year not 4 times per year.  Doesn't have manganese that I could find, so I would look for that separately.  Try Osmocote and wait a week or two and if your plant hasn't colored up then go get the manganese spray.  Go to a cannabis store, they've got the best products, more fine tuned products, professional versus mass produced, and their staff usually KNOW what they are talking about concerning plants, not just cannabis!
Do read the label and material closely to see if there are any added micro chemicals...I know the label says FOOD for plants and FEEDING but they are trying to sell product to those who don't understand.  More is NOT better!!
Send a picture we might have to change answers, add to the answers so this is just a place to start as a blind person...thankscare of aglonema http://alphabotanical.com/aglaonema.php#content_3
Go to the second page for the blurb on manganese but don't get into 'misting', doesn't work.  I do however put my house plants in the shower every 3 months or so to water and wash off all the dust. Cold water okay?  Misting has been clearly shown to NOT improve the humidity at all and could cause problems with too much water and thus fungus.


Can I store exposed film in the fridge (when it was stored before shooting, too)?

Question: Let's say I store color film in the fridge. I shoot a lot, and I rarely have time to develop, so the exposed films accumulate. Can I store them in the fridge again? Is there a problem with this method? Won't the temperature changes affect the film? I normally use films with ISO around 100 or 200?
Answer: If you have exposed film waiting to be developed, storing it in the fridge is better than storing it at room temperature. Even better than storing it in the fridge is to make time to have it developed promptly.
Here is a quote from the Kodak publication Storage and Care of KODAK Photographic Materials:
"Once you have exposed your film, paper, or material, it is important to minimize changes in the latent (unprocessed) image. For consistent results, process the film, paper, or material promptly after exposure. This is particularly important with professional color films, because they are optimized for processing soon after exposure. Storage at a low temperature after exposure will retard latent-image changes. You can keep exposed, unprocessed film in a refrigerator for a few days when necessary. Put the film in a sealed container, and allow the unopened container to reach room temperature before removing the film for processing."
Edit: I should have added - the reason for the sealed container and allowing it to reach room temperature before removing the film for processing is to reduce the chance of condensation forming on the film, which you don't want. Film should always be sealed when refrigerating/freezing. For refrigerating/freezing unexposed film, the plastic canister (35mm film) or foil wrapping (medium format film) that the film comes in should be fine.
Answer: Storing in the fridge is preferred. Temperature changes only really affect film at higher temps, not lower ones. Though probably best not to freeze the stuff.
Answer: Exposed film, awaiting processing, will degrade. This is called laten image shifting. Best if exposed film is stored in the freezer compartment. Wrap the exposed film in foil and place in a zip-lock bag and then in the in a freezer. When ready to process, remove from the freezer and set aside. Allow film to come to room temperature before opening. Otherwise, it may be spoiled by water droplets condensing on cold film.
For many years I supervised the making of test film used to calibrate automatic photo printing machines. We exposed films in a prescribed manor and allowed these exposed rolls to sit at room temperature for several days. Most laten imaging shifting occurs in this initial period. Next, we froze the film to arrest further laten image shifting. These test films were used worldwide to adjust color balance setting for the various types of film in common use.


HBA card status

Question: Is it possible somehow to get status of a HBA card using PowerShell or any other API instead of logging to a server and run "powermt display path"?
Comment: Which make/model of HBA?
Answer: You can also use PowerShell Remoting to run the command on remote machines.
Answer: You could try using PsExec and execute it remotely. You can even wrap it in PowerShell to run against a host of machines.
Comment: You don't need to wrap it in Powershell. PsExec can address multiple machines.
Answer: There can be quite a bit of data within wmi about hba\san info.  the following commands can lead you down the path.
gwmi -namespace "root" -class "__Namespace" |   Select Name
gwmi -namespace "root\wmi" -list
if you use the -comp paramter it can be used against remote servers.
search on hba or lun.
bettter yet consulting with the manufacture might give you some insight as to whats doable.
another link to stuff is http://www.microsoft.com/whdc/device/storage/FCTopology.mspx
good luck

HBA card status


Lenovo Thinkpad X270 issue with NVMe disk

Question: I bought a Lenovo Thinkpad X270 2 month ago and I needed to use Windows and OpenBSD on 2 differents hard drive. Fortunately, this Thinkpad had a free PCI-e port available NVMe compatible (M.2 2242 format), I bought a Transcend TS256GMTS400.

Samsung NVMe SSD with Windows 10
Transcend SATA SSD with OpenBSD-current (FDE + UEFI support)

After 3 weeks without any kind of issue, the Transcend seemed defectuous and after a simple smartctl test, my system (running OpenBSD at this time) crashed. The Transcend hard disk was not usable anymore and my OpenBSD data was gone.
I decided to try another brand, I bought this time a Toshiba RC100 240G. I installed OpenBSD on it for a first time, but, this new disk did not appear when I press the F12 key at startup for choosing the boot device. Strange thing, because the transcend was present on the boot list. So, I decided to try to reinstall OpenBSD a second time: same issue. I tried to install Linux Mint and... I still can't see the disk on the boot device list!
After that I:

installed OpenBSD (1) with Full Disk Encryption (FDE) with UEFI support
installed OpenBSD (2) without FDE with UEFI support
installed OpenBSD (3) without UEFI support (classical installation)
installed Linux Mint (classical installation)
updated the BIOS firmware
updated the Toshiba firmware to the last version
plugged/unplugged the Toshiba SSD (2 times)
installed the Toshiba SSD Utility tool: all is good
after installed Linux on the toshiba hard drive, the default boot loader is not windows anymore, but grub, I don't know why
reset the BIOS with default configuration
sent a hater tweet and waiting for some computer gods (should I sacrify something?!)
after another reboot, I can now see a "ubuntu" in the boot list. To be honest, I don't know what I did... We'll see if another OpenBSD installation will change something.
used installboot(8) manually on the toshiba hard drive

For your information, if I plug an USB drive, I can see it on the boot device list, I can also the other NVMe disk (samsung), my first transcend disk was also present on this list.
The disk is present during the BIOS diagnostic at startup, but I cannot choose it when I want to select my bootable device. I tried different configuration on the BIOS with UEFI, Legacy method and nothing work.
Do you have an idea why? Maybe I missed something during the configuration or NVMe devices are not seen like a disk by the bios?
Installing bootstrap on first NVMe disk
I don't find a clean solution, and does't solve my first issue: where is my NVMe hard drive in the boot list, but it gives the opportunity to switch from windows to OpenBSD on the UEFI boot list.
On Windows, I used diskpart tool to mount the EFI partition and remove ubuntu directory, moved also Boot directory to Boot.old. I did not touch the Windows directory.
C:\> DISKPART
DISKPART> sel disk 0
DISKPART> sel volume 2
DISKPART> assign letter Z:

On OpenBSD, or whatever unix system, I created a Boot directory in EFI partition and copied the file bootx64.efi in it. I can now boot on the Toshiba hard drive with the Samsung one. I did the same with an USB flash drive, and work.
# mount /dev/sd2i /mnt
# cd /mnt/EFI
# mv Boot Boot.old
# rm -rf ubuntu
# mkdir Boot
# cp /usr/mdec/BOOTX64.EFI Boot

At boot, you should see the OpenBSD bootprompt, you must set manually your booting device, sr drive for NVMe. Here the code sample:
boot> set device sr0a
boot> boot

Only one NVMe disk can boot
If you have 2 NVMe disks on your Thinkpad X270, it seems you can only boot on one of them, here the solution given by incidentflux on the Lenovo Forum:

A dual drive SSD config is possible as follows:
Option 1 - 500MBps/Value - SATA (AHCI)
With SATA (AHCI) cable:
  1. Drive 1 in 2.5 inch bay: 2.5 inch SSD with SATA connector cable
  2. Drive 2 in WWAN slot: m.2 2242 SSD (look up B or M keying)
FRUs Required: 01HW968, CRU ID:2, FRU HDD Cable for SATA HDD/SSD,
  01HY565 CRU ID:N FRU M.2 Adapter&HDD Bracket ASM
Option 2 - Fastest/Pricey - m.2 (PCIe) Or with an M.2 (PCIe) cable:

Drive 1 in 2.5 inch bay: m.2 NVMe (m.2 cradle inside a 2.5" caddy)
Drive 2 in WWAN slot: m.2 2242 SSD (look up it's B or M keying)

FRUs Required:  01HW969, CRU ID:2, - FRU HDD Cable for PCIe SSD,
  01HY565 CRU ID:N FRU M.2 Adapter&HDD Bracket ASM
When ordering, the SATA or m.2 NVMe option, the cable  Lenovo
  provides, for m.2 nvme SSD is key to your future expansion.
SATA cable is provided with SATA Webstore option and m.2 cable is
  provided with m.2 Webstore option.
I think that's why its not in self service (See pages 55, 56, 77, 78
  of HMM). Major FRU Part numbers 8a, 8b, 9a, 9b, 10a, 10b.

Does not answer my question, but give you some hints of you need to buy a Lenovo Thinkpad X270 and add another drive. Anyway, if you are like me and don't really understand what is B or M keying, you can find more information about that on Republic of Gamers website. The big picture: it is the numbers of pins (socket) on the PCI-e connector of your NVMe SSD.
Answer: I would check the X270 Hardware Maintenance Manual. It seems that it is possible to have 2 NVMe, a person has described his solution on Lenovo Forums site here.
Comment: You're right, my first Transcend SSD was not NVMe but was using SATA interface. I don't have another M.2 2242 format to test that. I will correct my question, thanks.
Comment: Only a partial answer. their no solution actually to boot with 2 NVMe disk, so their no solution actually. But I will add a summary of the link.
Comment: It seems the WWAN port does NOT support nvme. Can anyone confirm?
Comment: I can confirm that an "M" key 2242 NVMe SSD will not fit into the WWAN port on the X270. I tried, and was disappointed. I can use a M+B keyed M.2 SATA SSD in there however.
Comment: Thank you for exploring the case, and adding the summary, Mathieu! I would have done it, but my laptop is not X270, so I restrained myself from giving advises that could proof useless afterwards.


Best to import assets from CDNs or bundle them together with custom code?

Question: I usually bundle my CSS as one minimized file using Gulp then import assets like FontAwesome, Google fonts or plugin files separately from CDNs. Is that the best option or is it even better performance-wise to download these third party assets then bundle them together with our code as one file?
Answer: So the 1st point here is why we use CDN:
A Content Delivery Network (CDN) works by providing alternative server nodes for users to download resources (usually static content like images and JavaScript). These nodes spread throughout the world, therefore being geographically closer to your users, ensuring a faster response and download time of content due to reduced latency.
so if you're planning to host your website across globe than I must say better you use CDN.
alternate thing is you can download and bundle using gulp as you are doing it right now but put your css file to some cdn. It will increase your performance. (and it's cheap)
here's amazon cloud front link :
https://aws.amazon.com/cloudfront/pricing/
Answer: Like so many other great answers to great questions, we begin with the nearly ubiquitous opening, "It depends..."

How important is the performance of your website?
What time interval are you choosing as a meaningful measure of latency (microseconds, tenths, seconds?)
How big are the assets?
Who is your audience?
Where is your audience?
Which devices is your audience using?
How often do your resources update/change?
Etc.

I also try to compress the resources and minimize the number of network requests to reduce load times. However, I tend to test various bundling strategies to see if the changes actually produce faster results. That's because there are so many variables to consider (e.g., is the resource already in the users cache, such as jQuery; is the CDN speed fast enough to counteract the reduction in network requests; etc.)
In your example, I like the minimization your doing for your CSS. And, I like that you're considering the potential benefits of bundling your assets. Try putting this setup to the test and get some numbers.
My hunch is that users not near a particular node of your CDN could experience a benefit (i.e., fewer network requests, taking advantage of HTTP pipelining, etc.) However, that depends on the quality of your CDN; how often the resources in the CDN are used on other sites (as noted by @Ryan, if the CDN resources are already cached, the CDN avoids redundant downloads); how many assets you're using; the size of the assets (e.g., bundling essential elements like the main style sheet with large files could slow down the rendering of the page); and in terms of perception, if the progressive rendering of your page is something that users would notice in the latency without bundling (i.e., if a user sees a default font for a split second but then sees the Google font, is it jarring enough to matter, or was their attention elsewhere.)
Finally, if you do test the bundling, please post a comment. We're curious, too :)
Answer: If you are using common shared CDN files e.g. https://code.jquery.com/jquery-3.2.1.min.js it is likely that the user already has that version cached in there browser because jQuery is used on a high percentage of websites. What this mean is that when they visit your website they do not have to download jQuery again, leading to faster load times.
If you use for example CloudFront this doesn't have the above benefit but it does mean that the static files will be closer to your users, meaning a lower latency for retrieving the files, therefore quicker load times from the user point of view.
However, I usually like to use shared CDN files and also include local fallbacks - see here


Dual internet 2xWAN (RRAS Nat) worked, but teaming does not work

Question: I have setup a server and I have 2 internet connections, I have tried several attempts at getting this to work properly.
In the RRAS I have successfully added into NAT 2x WAN NICs and a LAN NIC and I was seeing traffic being Sent & Received from both Internet WAN Routers, it was a little chaotic and believe had a lot of lost packets as I kept having to F5 websites..
but nonetheless it worked well enough to give me impressions of a faster internet.. (4pm-11pm internet here is horrid! so the 2nd connection helped I could see the benefit... Just F5 a few times tho!)
When I configure RRAS to have the 1 Teamed WAN for some reason the 2nd NIC wont receive any data. I can see it sending packets when browsing websites but nothing is received. I can see what NIC is doing what from the Team Configuration window.
I read a great document about NIC teaming but am still unclear on a few things. I have tried several IP configurations.
I hope to have a few questions answered.
for clarity I am using windows server 2016, NIC Teaming is Switch Independent Mode, Dynamic.
Questions.

Do Both WAN Internet routers need to be on the same Subnet Mask? eg 255.255.255.0
Does the LAN need to be on the same Subnet mask as WAN? eg 255.255.255.0
Should both WAN Routers be on the same IP Address Range or Different, EG
WAN 1 Router IP:192.168.0.1 / SN:255.255.255.0 / GW:192.168.0.1 and have
WAN 2 Router 192.168.0.2 / SN:255.255.255.0 / GW:192.168.0.2
or should WAN 2 Router be
WAN 2 Router 192.168.1.1 / SN:255.255.255.0 / GW:192.168.1.1

I am hoping to get the right answer so I can correctly configure my routers and network and then properly troubleshoot why it doesn't work.
Thankyou Kindly,.
Shaun
Answer: So after much trial and error, I ended up disabling the TEAMING and installed pfSense in favor of load balancing and it worked fine.. I now have both networks contributing


Focus CMAX 2.0 Petrol 2006 replacement autogearbox - does it require to recode the vehicle?

Question: I've to replace automatic gearbox on Focus CMAX 2.0 Petrol 2006. I just wanted to know does it also require re-programming the vehicle or any part of it.
Answer: As far as I know, the transmission is not "serialized" to the Transmission Control Module (TCM).
HOWEVER, I'm guessing you have a Durashift or a [less likely]  Ford Powershift.  In the first case, Ford has a HUGE problem with these transmissions, much of which they tried to rememdy with software changes (TCM reflash).  In the sceond (Powershift) case, not as much - but this is a semi-automatic transmission.  Some clarification on exactly what transmission in in your 2006 CMAX and I can possibly provide a more accurate specific answer.
SO...     The answer to your simple question I beleive is "no".   But the answer to a bigger picture question is perhaps "yes, although not required, you may want the new TCM software that may mitigate the problem that caused your transmission failure in the first place (?!)"


Friday the 13th future possible

Question: A year normally has at most three Fridays the 13th. Year 2015 has three such days. What is the next year that has three Fridays the 13th again for the first time?
Answer: If you look at the property of the 13th day of each month, you will see that only Feb, March and November are the months that can have the same weekday occurring on the 13th of those months, and that too, only in a non-leap year. All other 13th's in the rest of the non-leap year (and all 13th's in leap years) represent weekdays whose frequency within that year (of occurring on 13th) is atmost 2.
This is apparent in the below tables, where the last column represents the difference between the weekday occurring on 13th of the 'n'th month vis-a-vis 13th Jan, and the same difference occurring for multiple values of 'n' indicates that the 13th's of those months fall on the same weekday -

Cumulative difference between 13th of any month and 13th January in a NON-LEAP year.

Cumulative difference between 13th of any month and 13th January in a LEAP year.

Once, this is clear, the problem reduces to finding the next NON-LEAP year when 13th Feb falls on a Friday. Rest should be easy.
Answer: A year with $365$ days may have three Fridays the $13$th only on February, March and November.
A year with $366$ days cannot have three Fridays the $13$th, hence the next year with three Fridays the $13$th is $\color{red}{2026}$.
Comment: Hi, can you provide the line of thought that could be used to deduce these two statements easily? Thanks.

Friday the 13th future possible


Vaermina quest in skyrim

Question: During vaermina quest in skyrim I could either get 'skull of corruption' or make Erandur follow me.... Is there a way to make it both to get the deadric artifact also make Erandur follow me?
Answer: Yes and no.  If you are trying for the Oblivion Walker achievement you will need to collect the skull of corruption (or take advantage of a bug in another quest).
If you just want one to play around while saving Erandur, you can just use a console command if you are on the PC to give yourself one:

player.additem 35066 1
Answer: You can only get one or the other. I killed Erandur and got the skull on my latest playthrough so that I could get the oblivion walker achievement, but if you don't want the achievement I would advise sparing Erandur because the skull of corruption is a trash weapon anyway, it has 20 base damage (which can be increased to 50, but if you have good one handed, two handed or destruction that's still not great).

Vaermina quest in skyrim


How to run nginx and gunicorn in same docker container

Question: I am trying to deploy a python flask application with gunicorn and nginx . I am trying to run both gunicorn(wsgi) and nginx in same container . But my nginx is not started . By login into container I am able to start nginx.
Below is my dockerfile

RUN apt-get clean && apt-get -y update

RUN apt-get -y install \
    nginx \
    python3-dev \
    curl \
    vim \
    build-essential \
    procps

WORKDIR /app

COPY requirements.txt /app/requirements.txt
COPY nginx-conf  /etc/nginx/sites-available/default
RUN pip install -r requirements.txt --src /usr/local/src

COPY . .

EXPOSE 8000
EXPOSE 80
CMD ["bash" , "server.sh"]

server.sh file looks like

# turn on bash's job control
set -m

gunicorn  --bind  :8000  --workers 3 wsgi:app
service nginx start or /etc/init.d/nginx

gunicorn is started by server.sh but nginx is not started.
My aim is to later run these containers in kubernetes. Should  i) I run both nginx and gunicorn in separate pod or ii) run it in same pod with separate container or iii) run in same container in same pod
Answer:
My aim is to later run these containers in kubernetes. Should i) I run both nginx and gunicorn in separate pod

Yes, this.  This is very straightforward to set up (considering YAML files with dozens of lines "straightforward"): write a Deployment and a matching (ClusterIP-type) Service for the GUnicorn backend, and then write a separate Deployment and matching (NodePort- or LoadBalancer-type) Service for the Nginx proxy.  In the Nginx configuration, use a proxy_pass directive, pointing at the name of the GUnicorn Service as the backend host name.
There's a couple of advantages to doing this.  If the Python service fails for whatever reason, you don't have to restart the Nginx proxy as well.  If you're handling enough load that you need to scale up the application, you can run a minimum number of lightweight Nginx proxies (maybe 3 for redundancy) with a larger number of backends depending on the load.  If you update the application, Kubernetes will delete and recreate the Deployment-managed Pods for you, and again, using a separate Deployment for the proxies and backends means you won't have to restart the proxies if only the application code changes.
So, to address the first part of the question:

I am trying to deploy a python flask application with gunicorn and nginx.

In plain Docker, for similar reasons, you can run two separate containers.  You could manage this in Docker Compose, which has a much simpler YAML file layout; it would look something like
version: '3.8'
services:
  backend:
    build: . # Dockerfile just installs GUnicorn, CMD starts it
  proxy:
    image: nginx
    volumes:
      - ./nginx-conf:/etc/nginx/conf.d # could build a custom image too
        # configuration specifies `proxy_pass http://backend:8000`
    ports:
      - '8888:80'

This sidesteps all of the trouble of trying to get multiple processes running in the same container.  You can simplify the Dockerfile you show:
# Dockerfile
FROM python:3.9
RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive \
    apt-get install --no-install-recommends --assume-yes \
    python3-dev \
    build-essential
# (don't install irrelevant packages like vim or procps)
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
# (don't need a shell script wrapper)
CMD gunicorn --bind :8000 --workers 3 wsgi:app

Comment: great answer. you are missing a RUN directive on line BTW :)
Comment: I was missing a backslash; fixed.  (For layer-caching reasons it's important to `RUN apt-get update && apt-get install` in a single `RUN` command.)
Comment: ah ok, gotcha, thanks for clarification.
Answer: About choosing how to split containers between pods, that really depends on the use-case. If they talk to each other but perform separate tasks, I would go with two containers and one pod.
Also, about your server.sh file, the reason gunicorn starts but nginx doesn't is that gunicorn doesn't run in daemon mode by default. If you run gunicorn --help you see this:
  -D, --daemon          Daemonize the Gunicorn process. [False]

I still think it's better to separate the containers but if you want it to just work, change it to this:
# turn on bash's job control
set -m

gunicorn  --bind  :8000  --workers 3 wsgi:app -D
service nginx start or /etc/init.d/nginx

Comment: if I run gunicorn  --bind  :8000  --workers 3 wsgi:app -D . docker container does not start
Comment: Same file or multiple docker containers?
Answer: To answer your question regarding Kubernetes:
It depends on what you want to do.
Containers within the same Pod share the same network namespace, meaning that 2 containers in the same Pod can communicate with each other by contacting localhost. This means your packages never get send around and communication is always gonna be possible.
If you split them up into separate Pods you will want to create a Service object and let them communicate via that Service object. Having them in two Pods allows you to scale them up and down individually and overall gives you more options to configure them individually, for example by setting different kind of security mechanisms.
Which option you choose depends on your architecture and what you want to accomplish.
Having two containers in the same Pod is usually only done when it follows a "Sidecar" pattern, which basically means that there is a "main" container doing the work and the others in the Pod simply assist the "main" container and have no reason whatsoever to exist on their own.


Measuring macroeconomic variables more frequently

Question: What would be the costs and benefits of collecting and releasing macroeconomic data, say, monthly instead of quarterly, or weekly instead of monthly? And what are the barriers to doing so?
Comment: Of interest may be the case in Brazil where the Central Bank of Brazil produces a monthly GDP figure while the National Statistics Office produce a quarterly GDP figure. I'm not an expert on the Brazilian economy, but some details can be found in this Federal Reserve Board Discussion Series [paper](http://www.federalreserve.gov/econresdata/feds/2014/files/201494pap.pdf). The title of paper is *The Importance of Updating: Evidence from a Brazilian Nowcasting Model*. An important point is whether or not the same body or same methodology would be used to produce the higher frequency estimate.
Answer: Looking at the US Economy,  the US Bureau of Economic Analysis (BEA) and specifically ch. 3 p. 49 of the Handbok of NIPA (National Income and Product Accounts), we read

"The data that BEA uses are collected from a variety of sources and are
  usually collected for purposes other than for incorporation into BEA's
  estimates. Data collected by federal government agencies provide the
  backbone of the estimates; these data are supplemented by data from
  trade associations, businesses, international organizations, and other
  sources. The Government data are from a number of agencies, including
  the Commerce Department's Census Bureau, the Labor Department's Bureau
  of Labor Statistics (BLS), the Treasury Department, the Office of
  Management and Budget, and the Agriculture Department.
  "Administrative" data are data that are tabulated by federal
  government and by state and local government agencies as a byproduct
  of administering their programs—such as processing corporate tax
  returns, regulating public utilities, and issuing building permits.
"Statistical" data are data collected by the federal statistical
  agencies, such as the Census Bureau and BLS. These data consist of
  periodic economic and population censuses and a wide range of sample
  surveys, such as those that collect data on manufacturing and trade,
  employment, and prices. The relatively few surveys that BEA conducts
  cover international trade in services and international direct
  investment, both by foreign companies in the United States and by U.S.
  companies in foreign countries. The source data available to BEA are not always ideal for the preparation of the
  NIPAs. BEA must develop methods that transform the best available data into estimates that are consistent with the NIPA concepts and framework and that fill gaps in the
  coverage of the source data."

Macro-data are not just micro-data simply sitting out there and only needing adding up. So "collecting macroeconomic data" is a misleading term : "laboriously producing macroeconomic data", where collection is just a first step, moving on to selection, clean-up, adjustment, homogenization, and estimation, is more like it. This is a vast enterprise, even with today's Information Technology capabilities, even for smaller economies than US.
Increasing the frequency of macro-data amounts to increasing the total output from this data-production function, which looks convincingly like a huge increase in input factors absorption. So to do it, it would increase costs substantially.
Moreover, the "collected for reasons other than..." part, indicates that a lot of procedures should be disrupted and changed in order to achieve that. Also, the number of different primary sources implies too many people and institutions should change their way of doing things. These are significant barriers on their own, irrespective of cost-issues.
What could be the benefits?
One could think that it would permit a "better" fine-tuning of the economy? -to the degree that one believes that an economy can really be fine-tuned by its Government (it can certainly be affected, but fine-tuning is a whole different game).
What about the benefits to the private sector? It is indeed the case that, say, Gross Domestic Output is produced every day. Assume that in some magical way, GDP was recorded and published every day. So we could follow GDP as we follow the Stock Market. We will be able to observe the everyday variability of output. Would that be beneficial? No, on the contrary, it would be misleading. Why? Because, although GDP is produced everyday, it mostly is produced based on structural relations (contracts, technologies, customs, knowledge etc) that have a lower frequency of change -and for reasons other than lack of data. So its everyday variability would be mostly due to pure randomness or exogenous factors like the weather -and observing it would only torment us towards trying futilely to do something about it (at our own micro-level).
What about the benefits to the discipline of Economics? Presumably, more data is always better. Is it? By increasing the number of instances of "asking for" and recording data about an economic variable, we increase the instances for which we may have measurement error - and this may very well degrade the overall quality of our data. It is a standard wisdom departed in undergraduate statistics classes, that even if we could conceivably run a census than just collecting a sample from the population under study, it would be better to have just the sample, because the error of representability would most likely be smaller than the error of measurement we would have if we attempted to record the whole population.
That would offset the perceived benefits of having pushed the magnifying glass closer to the object of study. And sometimes, it is better to look from a certain distance, anyway.
Closing, by a "Laffer-curve" style of argument, one could argue that there must exist some optimal frequency to have available macro-data. I am not saying that what we do have now is this optimal frequency, but I doubt making the frequency higher is the way to go (my opinion is that modern economies of the western world at least would be tracked better under a three four-month cycle - Jan-Apr, May-Aug, Sep-Dec -it seems to me that this scheme combines better the seasons with the social aspects of life and economic activity).
Answer: Deciding on whether to use monthly,quarterly or yearly data depends on over what period you wish to investigate for potential policy intervention.
The term costs and benefits solely depends on what type of data you are looking at. If you want to figure out if the crime rate that is currently being experienced by a given city is normal currently, yearly data  is probably not the best for investigating such phenomenon.
Quarterly or monthly data is probably better because controls for seasonality can be applied, however for yearly data you cant implement seasonal dummies because there is no rationale for doing so.
On the other hand,recall the more often you sample macroeconomic data the "noisier" it gets, so sampling more often than a monthly basis can add unnecessary noise which can make your data more difficult to interpret.


Shorashim Identifier for Rashi on Tanach

Question: I am trying to identify Shorashim from Pesukim and Rashi. Finding the ones from the Pesukim is easy - I use the concordance from alhatorah. But finding the root of words used in Rashi is not always so simple. Do you have any advice?
Comment: Please clarify @Burt.  By "root of words used in Rashi" do you refer to how Rashi defines roots in the words of Tanach or do you mean roots of words within the actual text of Rashi's writings (eg. in the first Rashi on the Chumash when he writes "שֶׁהִיא מִצְוָה רִאשׁוֹנָה שֶׁנִּצְטַוּוּ בָּהּ יִשׂרָאֵל", you would want היא for שֶׁהִיא and צוה for מִצְוָה)?
Comment: @EraserX the actual text in Rashi's writing
Answer: This is an old set, but may provide you with what you are looking for. It contains indices verb tables, etc.
https://www.ebay.com/itm/374183394229?mkcid=16&mkevt=1&mkrid=711-127632-2357-0&ssspo=gcO1BBVlT8a&sssrc=2349624&ssuid=mz7vpjlmqb6&var=&widget_ver=artemis&media=MORE
It was first published in the 1980's by the World Zionist Organization in Hebrew and English and authored by Dr. Sampson A Isserhoff under the title, An Introduction to Rashi's Grammatical Explanations.
He collected all the explanations of grammar found scattered throughout Rashi's commentaries and published them separately. The original set covered all of Chumash and a few volumes of Nach. If you can find it, it is a surprisingly handy text to help in comprehending the Hebrew language.
What follows is the approbation which was written by Rabbi Ahron Soloveichik in 1990.
Answer: While the online version of Mikraos Gedolos HaKeter doesn't offer a breakdown of each and every word, you can search there within meforshim (and select Rashi if you only want Rashi) and when entering search terms, specify that you are searching on a root.


Customer Access Token

Question: I am trying to get the customers Access Token while they are logged in to our Magento 2.1.8 site while using a custom module I am developing.
I have been following the official Magento 2 tutorials to do this and it says that to get the token I must send the user's username and password to the appropriate API endpoint. When the Access Token is required, the user is already signed in.
How do I get the logged in users Customers Access Token without using their Username and Password?
Magento 2 Tutorial:
http://devdocs.magento.com/guides/v2.1/get-started/order-tutorial/order-create-customer.html
Answer: Searching around a bit from when I was trying to get around the "/me" endpoint 'fix'.
This may help - https://community.magento.com/t5/Programming-Questions/REST-API-call-to-get-logged-in-customer-ID/m-p/62092/highlight/true#M1813

Customer Access Token


Is there a weather app that can be moved to an SD card, with a separate widget program?

Question: In know some apps offer separate widget apps so you can move the main app to the SD card.  Is there any weather apps designed like this?  I haven't been able to find one, so does anyone know if one exists?
Comment: You can move any of them to SD card... only their Widgets wouldn't work.
Comment: @SachinShekhar Edited the question to take that into account.
Comment: @SachinShekhar Are you sure 'bout that? I know that I can on my CM device, but I have that s2e app installed which allows me to. Can you store any app to your SD card by default?
Comment: @Steven For "by Default" thing, there's a glitch... the question is asking different thing.
Comment: @Steven And, that statement was for weather apps.. There are other things than widgets which can screw things up..
Answer: Separate widget app may be available in case when wigdet covers only a small subset of the main application functionality. However, for the weather app and weather app widget the main difference is the screen representation, the processing routines are almost the same. I'm sorry to say, but it's very unlikely to find the weather application with the separate widget.
Moreover, with the Froyo/Eclair moving into the obsolescence quite steady and newer version of Android having "unlimited" app storage in the range of 8-16GB, it's very unlikely the new developers will ever be inclined to make that kind of widget app.
Comment: What do you mean by unlimited app storage?  You can only store as much as you have room for, unless you don't have to store the app on your phone.
Comment: by "unlimited app storage" I meant "any contemporary android device comes equipped with 8-16GB of internal storage, where you may store your programs, which renders completely unnecessary moving content to SD or vice versa"


Watercolor Art Work Prepared for Screen Printing on Fabric

Question: Can watercolor artwork be printed on fabric, noting that the fabric is white? if yes how can it be prepared and if not what options do i have? Thank you
Comment: Hi Mona, welcome to GD.SE, this posible duplicate question has a big explanation about how to prepare an artwork for screen-printing.
Answer: If it will be printed using screenprint technique, then you need to do a color separation. The Separations are converted to halftone by the printer. Screenprinting and colorseparations are covered in another post here.
There is also a good guide to this on: http://popculturetees.com/2008/09/17/gradients-and-halftones-in-screen-printing/
I hope this is helpful.


Oracle localized sequence

Question: Can I have a sequence on a column which restarts itself depending on the value of another columnn i.e if column2 has a sequence, then for same values of column1, the sequence is maintained, for different value of column1 the sequence again starts from 0 and so on..
Answer: I think you can't because a sequence allows many users to create unique integers, so it cannot have dependencies.
If, for example, user A restarts the sequence (for a different value in col1) and then user B wants to add another row for prev value of col1 then col2 will not be unique...
You can do something like that programmatically and use MAX(col2)+1, but then you must maintain locks.
If all the values on col1 are known, maybe you can use different sequences for each value (but IMHO this is really ugly)

Oracle localized sequence


Was Darth Sidious already scarred and deformed to begin with?

Question: The Jedi attempt on his life left him "scarred and deformed". However, has he always been this way since becoming a Sith Lord and being physically twisted by the dark side, such that the normal-looking facade we see during the prequels is a product of Sith sorcery? Or did he sacrifice his original, very real good looks to seduce Anakin to the dark side?
Comment: @Valorum Mother Talzin has demonstrated that her dark side sorcery - ways that Sidious had learnt - are capable of altering one's physical appearance while in effect, as demonstrated when Ventress attempted to assassinate Dooku, and especially within Savage Opress. Who knows what the full power of the dark side is capable of?
Comment: Related: [Does Sidious consider himself separate from Palpatine?](https://scifi.stackexchange.com/questions/119512), [Why didn't Luke become disfigured when he was electrocuted by the Emperor?](https://scifi.stackexchange.com/questions/6769)
Comment: Huh? Are you asking whether he was using the Force to conceal his true looks? Because I'm pretty sure you can't do that, at least within the main canon.
Answer: Sidious' face apparently looked that way before getting hit by lightning in canon, and definitely did in Legends.
Canon
In the 2017 Darth Maul comic series, which takes place before Episode I, Maul has a conversation with Darth Sidious, who appears to already look like the Emperor post-duel:

Later in the series, they talk again, and this time Sidious has visibly yellow eyes:

So there is canon evidence that Sidious looked that way already, and the comic seems to imply that this is Sidious' "true" face that he only shows to Darth Maul. As far as I know, this is all we really have to go on within current canon (aside from the ROTS novelization), since in The Phantom Menace what we see of his Sidious face looks relatively normal.
Semi-canon
In the Revenge of the Sith novelization, Palpatine examines his face after Mace Windu has been hurled out the window (page 361, emphasis mine):

Palpatine examined the damage to his face in a broad expanse of wall mirror. Anakin couldn't tell if his expression might be revulsion, or if this were merely the new shape of his features. Palpatine lifted one tentative hand to the misshapen horror that he now saw in the mirror, then simply shrugged.
"And so the mask becomes the man," he sighed with a hint of philosophical melancholy. "I shall miss the face of Palpatine, I think; but for our purpose, the face of Sidious will serve. Yes, it will serve."

This seems to heavily imply that this new face, "the face of Sidious", is really his true face.
Legends
In Clone Wars, his face as Sidious seems to have crooked teeth and more lines, where his face as Chancellor Palpatine does not:

Also, the ambiguously-EU-canon comic Sithisis is about Palpatine performing some sort of ritual, during which he looks like the Emperor/Sidious:

[...]

Finally, if Wizards' Star Wars Roleplaying Game is an acceptable EU source:

Palpatine, who has delved extensively into Sith lore, was using an almost-forgotten technique to hide his true self.

This explanation cites two Star Wars Insider answers, and comes up with a Sith Alchemy ability that masks the user's true appearance (emphasis mine).

[The] real Palpatine is the one who bursts forth at a calculated moment . . . That is when the true person comes out, letting the evil fully manifest itself. The Emperor . . . looks like he does because he's very old and very evil -- it is what he always looked like. [Star Wars Insider 82 (page 58)]
[It's] the intensity of reflected lightning and the channeling of such raw dark side power that are the catalysts for Palpatine's transformation. Perhaps the face that boils up to the surface is shaped by his dark side corruption, but the lightning is definitely the cause. [Star Wars Insider 83 (page 32)]
[...]
Just as Sith alchemical techniques can be used to make a subject appear more horrific, they can be used to conceal its true appearance. [...] However, the mask can be dispelled by dark side energy: If the subject takes damage from a dark side Force skill, the subject must make a Fortitude save (DC 5 + damage dealt) or the mask is removed and the subject's true face reappears.
Comment: *"Now, it should be noted that George Lucas, lan McDiarmid, and other crewmembers described the makeup effect (dubbed the Mask of Evil during production) — as Palpetine's "true face" and the Chancellor's features as the mask. I'd caution against taking that too literally. I can probably point to interviews in the same vein with Christian Bale describing Bruce Wayne as the mask and Batman as the true face, but no-one would take that literally.* - Pablo Hidalgo: Star Wars Insider 083
Comment: I don't really buy your assertion in the canon portion (the moire in the image makes it even harder to tell). But some of Legends (most notably the [Witches of Dathomir](http://starwars.wikia.com/wiki/Witches_of_Dathomir)) make it out that going full Dark Side can result in disfigurement
Comment: @Machavity Looking closer at the scene, you're right. I've edited the film part out of my answer.
Comment: Of course, it's also possible this is just supposed to be ambiguous... https://twitter.com/pablohidalgo/status/717491543007866880
Comment: "And so the mask becomes the man," seems to imply what was a fake mask image before he burned his face became the truth.  Though all of the images of Sideous in comics and cartoons are likely just being dumbed down for the audience.   In Phantom Menace film he does NOT look burned.
Comment: Because Ian didn't need makeup back then, as I said in my answer. Look at Palpatine's face in Return of the Jedi: https://static.wikia.nocookie.net/villains/images/4/46/Emperor_Palpatine_instructs.png/revision/latest?cb=20180809191453, and imagine only his mouth being shown, and he wouldn't look different from his The Phantom Menace!Sidious: https://static.wikia.nocookie.net/villains/images/2/2f/Darth_Sidious.jpg/revision/latest?cb=20110918233212
Comment: @lucasbachmann I think this is "becomes" in the more archaic sense, meaning "the mask suits the man", but it could be read either way.
Answer: Yes, he was always "scarred and deformed". Put in quotation marks because he wasn't: That's his true form. Every time we see Sidious in The Phantom Menace, Attack of the Clones and The Clone Wars, he's in his "scarred" form. The reason Ian didn't wear any makeup was because he was old enough and the hood already covered his face enough, plus make-up is very time-consuming (I read somewhere that back in Return of the Jedi, it took 5 hours for Ian to finish the makeup). Not to mention the few times that Sidious appeared outside of holograms in The Phantom Menace and Attack of the Clones, he was always in very dark places:

Sidious' face being "scarred" all along is also why he could play both sides without being caught: No one could tell that the wrinkly Sidious is Chancellor Palpatine. Look at Palpatine's face in Return of the Jedi:

Then imagine only his mouth being shown, and he wouldn't look different from Sidious in The Phantom Menace:

Put his scene with Maul in The Phantom Menace and his scene with Vader in Revenge of the Sith side-by-side and you would see the resemblance:

While Sidious may look more pale in the latter screenshot, it's because of the light. There are times that we see him with human-like skin:

Notice how Ian wore makeup on his hands when playing the Emperor in Return of the Jedi:

Yet when playing the "scarred" Sidious in Revenge of the Sith, he clearly didn't wear any, save for barely-noticeable fingernails:

Let's compare Sidious' post-"disfigurement" voice to his pre-"disfigurement" one. This is him in The Phantom Menace:

As you can see, Sidious' voice remained the same before and after his "disfigurement", because it's his real voice. Plus one thing is certain: Due to Sidious being a Sith, whenever we see him in The Phantom Menace, Attack of the Clones and The Clone Wars, his eyes are yellow even though we only barely see them in The Clone Wars. If Sidious could mask his eyes, I don't see why he couldn't also mask his face. Notice how even after revealing himself as the Sith Lord, Palpatine's eyes didn't turn yellow until the "disfigurement":

Obviously the yellow eyes weren't due to the lightning but due to them being his actual eyes, so the same is implied to apply to his face. For further evidence, here's Sidious in The Clone Wars:

Look at his face closely and you would see the "disfigurement", especially when comparing it to a vision of the "disfigured" Emperor in the episode Ghosts of Mortis:

And here's Palpatine in the Special Edition of The Empire Strikes Back:

Imagine his face except for his mouth being obscured and you would see the resemblance to Sidious in The Phantom Menace. Lastly, Ian explicitly stated in an interview that Sidious was indeed "disfigured" all along:

"[Lucas] said this casually, 'You should think of Palpatine's eyes as contact lenses...' So there's Palpatine's eyes and my eyes and that was very interesting. So, in fact, his face, which is the same as mine, was the unreal aspect. My own face was the mask. And then when I get into the mask, that is the evil person - that's the real face."
—Empire, "The Emperor Speaks: Ian McDiarmid Interview"
Comment: He looks noticeably gray in the second screenshot, although it could be the lighting. Do you have any sources explicitly saying that his pre-ROTS appearance as Sidious is meant to look different from his appearance as Chancellor wearing a hood?
Comment: It's due to the lighting. Here's him in his office: https://cheesecake.articleassets.meaww.com/395831/uploads/a4ba7dc0-215a-11ea-9d42-2d0f11d5ecba_800_420.jpeg. There's no way the "disfigured" scene was added for no reason, plus it doesn't make sense for him to keep his "scarred" form just to prove that the Jedi attacked him - there would still be multiple theories in-universe for that. Not to mention Ian himself said it: https://www.empireonline.com/movies/features/star-wars-archive-ian-mcdiarmid-interview/
Comment: As for why Sidious' face was covered: Dramatic, plain and simple. He was a hidden enemy in the prequel trilogy era, so keeping his face shrouded gives him a scary aura, though people who watched the OT first already knew what he looked like. The same reason Ozai's face was shrouded in the first 2 seasons of ATLA. It had nothing to do with Sidious being Chancellor Palpatine like we assumed.
Comment: I don't disagree with your conclusion (my answer concludes the same thing), but your answer would benefit from more supporting sources (such as the interview you found) - as it stands, it's mostly speculation. Here's a good Meta post about how to write speculative answers with canon support: https://scifi.meta.stackexchange.com/a/4868/21154
Comment: Fixed. Hopefully the answer is much better now.
Comment: You've made a lot of edits to this answer, that's not a problem in itself as we encourage edits which improve posts. However, you might want to try  and make larger more comprehensive edits rather than lots of smaller ones!
Comment: Yeah, sorry, I'm in a half-sleep state so I couldn't control myself.


Can sick villagers die?

Question: Whenever I play ACNL, I find my villagers are sick, but if they get too sick, can they die? I have tried testing this on an undesirable but  forgot to play and when I came back they were gone from my town. Although, before they got sick they had been planning to leave so I think they may have just left.
Comment: I never saw someone die in Animal Crossing. I can't say that I'm 100% sure about that, but most of the time, you can help heal them just for the sake of deepening your friendship with them and win some presents.
If they are sick and you don't give them anything, they will just be sick for a couple of days and then be healthy again.
It would be weird for them to die in Animal Crossing ^^
Comment: Thanks, I wasn't sure if they could die or not. I was guessing that they would move out to another town where someone would help them if they couldn't die.
Answer: No
The sickness will last from one to fourteen days, or until you give them medicine.
Your villagers will never die.
Source:
http://animalcrossing.wikia.com/wiki/Sickness
Answer: No, in this game no characters die. A good indication of this is by the PEGI rating (or ESRB rating) that the game has, PEGI 3 (or E from the ESRB). This indicates the game is suitable for children up to 3 years of age. Death is not an easy term to explain to children at this age.
Answer: It is impossible for a villager to "die".

In Wild World, your charater can die and will just look like a gyroid and have devil like horns.
In New leaf - they can't.
In City Folk - they might even lose their keys and you must dig them up!

Can sick villagers die?


Separating images from a downloaded vector file

Question: I have downloaded vector images from shutterstock. There are many images on the page and I want to break them apart. I am able to get the direct selection to highlight sections of the multi-part image, copy and paste to a new board. This is great, however i just want a part of the multi part image, is this possible? Part of it does just highlight but when I go to copy a box comes up around the entire thing. Specifically, I am working with vintage  Chalk typography, calligraphic design elements, page decoration and labels of drawing with chalk on blackboard . Thanks so much for any help!
Comment: Hi kara, and welcome to GDSE. I'm trying to understand your question better, but to do so it would be helpful if you explained the composition of your layers in your vector file and the program you are working with (Illustrator or Inkscape?). In the file are their different layers for the different elements?
Comment: I'm glad you asked this, as I ran into the same thing. Thanks to Adam for the answer! Choose "A" (direct selection too), then shift-drag to select the desired graphic from among potentially dozens is a super easy solution. Then, just create a new document, paste, and export it!
Answer: As I understand the question, you want to select only part of a vector group/mask.
A simple way to do this is to use the Direct Selection tool (Hotkey: A) and select only the nodes of the part you want to select. You can select multiple notes by holding down the Shift key. You should be able to copy just the selected nodes to the clipboard.
EDIT: You can also select the entire vector and press Ctrl/Cmd + Shift + G to ungroup the vector (if it is a group), or as mentioned before, try looking at the layers panel.
Answer: I'm not sure if I fully understand your problem, but have you tried doubleclicking the parts that you want? The layers may be grouped together, and doubleclicking them usually makes you move into that group, so you can select each part separately.
This is only for Adobe Illustrator though, I don't know how other programs handle this.
Answer: The vector is probably contained in a clipping mask. Select the vector and right click over it, if the option is shown to "release clipping mask" click it and then you will have access to the layers. It's either groups or clipping mask.
Answer: If you are using illustrator, the layers palette is a great way of understanding how the image is constructed. Some parts might be grouped or masked. By expanding the layers and groups, you can see which are which, and even select the parts you want.
Answer: I had the same problem but if you are using Illustrator CS6, after you paste the vectors in your project:

Make sure the image is selected
Click on the button at the top that says Edit Original next to image trace button.

This will open the vectors in another page and you will be able to copy the individual vectors and go paste it back in the project you were working on...
I hope this is helpful.
Comment: Thank you Thadei. I had the same problem and your answer fixed it!


Error while displaying crystal reports from VisualStudio2010

Question: Dear Colleagues,
I have a problem with displaying reports which are generated by VisualStudio2010.
I have prepered all reports  and they works fine but when i try to generate reports from another computer then I receive error: "string is excepted here"
I am very dissapointed because some copupters display raports properly but not all and I do not know why :(.
Anyway, i have checked formula which causes this error. It looks like:
<code>"if ({parametry_extra.prx_konta_wirtualne}) <> true then {faktura_vat.nkn_nazwa_banku}&" nr "&{faktura_vat.nkn_nr_konta} else {faktura_vat.nkn_nazwa_banku}&" nr "&{faktura_vat.konto1}&" "&{faktura_vat.konto2}"
</code>
Above formule is correct but why it doesnot work on diffrents computers? I suppose that some computers try to thread boolean value as string("true"/"false"), bool (true/false) or int (1/0)?
Do You know how to resolve this issue?
Many thanks in advance for help.
Answer: I found solution.
The problem was in data sources. In "Advanced options" in panel "DataTypeOptions" I disabled  value "Bools as Char" and now it works propelry.


Prove that a intergral over $\mathbb R$ is finite

Question: Let $K\in \mathcal L_1(\mathbb R)$ and $f$ be measurable and bounded on $\mathbb R$ such that $\lim_{|x|\to \infty} f(x)=0$. Define $$F(x):= \int _{\mathbb R} K(x-s)f(s)\;ds \qquad (x\in \mathbb R)$$
Prove that $F(x)$ is finite for all $x\in \mathbb R$ and that $\lim_{|x|\to \infty} F(x)=0$. I was told that the proof would probably include the use of the Fubini's theorem or Tonelli's Theorem, but I don't see how they apply here...
Comment: Note that $F = K * f$, so if you know the properties of convolution it should be easy. You are probably not allowed to use them though
Comment: That wasn't covered in the lectures so probably not
Answer: For the first part, since $f$ is bounded:
$$
|F(x)| = \left|\int_{\mathbb R} K(x-s)f(s)\,ds\right| =
\left| \int_{\mathbb R} f(x-s)K(s)\,ds \right| \le M \int_\mathbb R |K(s)|\,ds
$$
where $M = \sup_\mathbb{R} |f|$. (The absolute values are missing in @Ant's solution.)
For the second part,
\begin{align}
\lim_{x \to \pm\infty} F(x) &=
\lim_{x \to \pm\infty} \int_{\mathbb{R}} K(x-s)f(s)\,ds \\
&= \lim_{x \to \pm\infty} \int_{\mathbb{R}} f(x-s)K(s)\,ds \\
&= \int_{\mathbb{R}} \lim_{x \to \pm\infty} f(x-s)K(s)\,ds = 0
\end{align}
by dominated convergence. (Note that $|f(x-s)K(s)| \le M |K(s)|$ for all $x$, and the right hand side in the inequality is $L^1$.)
Answer: Note that $f$ is bounded on $\mathbb R$, so set $M = \sup |f(x)|$, then $$F(x) = \int_\mathbb R K(x-s)f(s)ds  = \int_\mathbb Rf(x-s)K(s)ds\le M \int_\mathbb R K(s)ds$$
and since $K \in \mathcal L^1(\mathbb R)$ you are done.
To show that $\lim_{x \to \infty} F(x) = 0$, note that for every $\varepsilon > 0$, exists $N > 0$ such that for every $x > N$, $|f(x)| < \varepsilon$. But this also implies that $$\left|\int_\mathbb R K(x-s)f(s)ds\right| \le \int_\mathbb R \left | K(x-s)f(s)ds\right| =  \int_\mathbb R |K(x-s)| \cdot |f(s)| ds \le \varepsilon \int_\mathbb R |K(x-s)|ds$$
Since $K \in \mathcal L^1(\mathbb R)$, set $L = \int_\mathbb R |K(x-s)|ds \in \mathbb R$. This is the exact definition of $\lim_{x \to \infty} F(x) = 0$ !
That is to say, for every $\varepsilon > 0$ exists $N$ such that for every $x > N$ we have $$|F(x)| = \left|\int_\mathbb R K(x-s)f(s)ds\right| \le \varepsilon L$$
(note that the fact that $\varepsilon$ is multiplied by a constant does not change anything )
Comment: They are but sine you integrate over whole $\mathbb R$ you must also consider the behaviour of $f$ where $x\leq N$, doesn't the argument fall apart there?
Comment: The last inequality in the second displayed formula looks suspicious. ($|f(s)|$ is only small when $|s|$ is large, and you are integrating over all of $\mathbb{R}$)
Comment: Here you use the fact that $f(s)<\varepsilon$ however you have a $x$ such that $f(x)<\varepsilon$. We don't know anything about $f(s)$
Comment: Do not be confused with the letters! $f(x)$ is a function, its variable is $x$. But $f(s)$ is the same function, this time the variable is $s$! If I tell you that $f(x) = e^{-x^2}$ is going to $0$ as $x \to \infty$, do you think that the behaviour of $f(s) = e^{-s^2}$ will be  different? Since both $x$ and $s$ are independent variables writing $f(x)$ or $f(s)$ is the exact same thing
Comment: @D.Vente You just need to consider $x \to -\infty$, not on the whole real line. And for $x \to -\infty$ one can make the exact same argument, because $\lim_{x \to \pm \infty} f(x) = 0$ (changing some signs of course, but it is pretty much the same thing. You may want to try do write it down yourself! :-) )
Comment: @mrf Oh right! Thanks.. I'll try to fix it!
Comment: @D.Vente Now I see your point! I'm sorry if I didn't understand it :) Yes you are right, I'll try to fix it. Even though the mrf solution is rather elegant