A class which represents an SQL table

Question: I'm representing DB tables as classes (in this case PHP classes). This has the goal of modeling every section of the web page, where you will get inputs from the user.
My actual base design is:

One class per table and every row is represented by an Object of this class.
The constructors asks for what they need in order to get the table row which they will represent:
info = $this->getRowFromVideos($id);
    }
}

The way I access the DB is not important here.
Every field of the table is stored as an array in an $info variable. And I have a method to access for the whole row or just a field.
    function getInfo($key = false){
        if($key) return $this->info[$key];
        else return $this->info;
    }

For composed tables like Players who needs an User and a Game ID, the query would be like this:
SELECT * FROM players WHERE userID = 'xxxxxx' AND gameID = 'SC2'

And the constructor class asks for an User object and Game object:
class Player extends DB {
    private $info = array();
    private $user;
    private $game;

    public function __construct($user, $game){
        $this->user = $user;
        $this->game = $game;
        $this->info =
              $this->getRowFromPlayers($user->getInfo("userID"),$game->getInfo("gameID"));
    }
}

Of course, these classes are not designed to satisfy CRUD needs, like inserting a new user or deleting a video. Those responsibilities would be encapsulated in other classes.
I cannot see which problems may appear with this design in the future if the web page gets really big.
Answer: Take a look at
Object Relational Mapping,
especially
Object-relational impedance mismatch
on Wikipedia.
Basically there problems with this as soon as it gets a bit more
complicated and you need to query e.g. a lot of objects at once, or you
have joins, and so on.
Let's take $this->getRowFromPlayers.  I'm assuming, that that method
will fetch one row from the database.  So you already have a
bottleneck here because you'll have to run n separate queries for
each of your n IDs when you want to get like a list of objects by
their IDs, which is very inefficient.  So you'll have to construct
objects from the outside, mapping a result of multiple rows from the
database to newly constructed (or cached) objects.
Another problem often comes up in that your objects don't exactly are
the table rows, they are just mapped onto objects, so testing by
identity is mostly meaningless unless you keep track of objects and
return the same object for the same row of a table.  It gets complicated
very fast.
Obviously there are already solutions for this, so I suggest you take a
look at existing PHP libraries for this.
Answer:
I'm representing DB tables as classes

No, you're not. You are representing objects as classes - the same objects that you store as rows in your database tables. In other words, you are using classes as data structures. Consider this:
class Player extends DB {
    ...
}

This is wrong: a player is not a database (and a database is not a table). So I suggest to rename your DB class to, for example, Row or PODS (Plain Old Data Structure)
You would be representing DB tables as classes if you had a class like this (pseudocode):
class Table {
    private Column[] columns;
    private Index[] indexes;
    ...
    public addColumn(column);
    public drop();
    ...
}

Answer: When OOP becomes Oops...
We have this very powerful tool, called SQL, to access a database. It can do efficient and complex actions on a relational database. But what do you do? You throw all of this away and you create a set of classes with very limited capability. Why do you do this?
The answer eludes me. Do you find SQL too ugly, or too difficult to learn? Do you not like normal data, or do you feel a need to make everything into objects? I can only guess.
There are alternatives, even in OOP (Object Oriented Programming). Wouldn't it be far more powerful to model SQL in classes? This has been done many times and can be found in most frameworks, here are just some examples.
They don't limit what you can do. At their best they help you to write better SQL commands. In Laravel your query would look something like this:
$userID = $user->getInfo('userID');
$gameID = $game->getInfo('gameID');
$info   = DB::table('players')->where('userID','=',$userID)
                              ->where('gameID','=',$gameID)
                              ->get();

Now this may, on the surface, not look better than your example, but it is far more flexible. There are fewer limitation build into this code, see the documentation.
Your approach would fail miserably when you have to retrieve data from more than one table, which often happens in many projects. You would have to perform many look-ups where SQL, even in the OOP versions, can do it in one.
Personally I often still prefer the normal SQL strings:
$SQL = 'SELECT * FROM players WHERE userID = :userID AND gameID = :gameID';

but there are conditions in which the OOP approach, of writing a SQL command, has its benefits. In the past, when a SQL command depended on many conditions writing the SQL string could become a mesh. The OOP approach to SQL can really help there.
My advice would be to learn OOP by starting at the beginning, with simple examples. Get a feel for what it can, and cannot do. Read a book, try the examples, build something simple yourself. Be creative, but never use OOP for the shake of using OOP.

A class which represents an SQL table


Are unused Start Worlds shuffled into the card supply?

Question: When you begin play and randomly hand out the start worlds, do you shuffle the remaining start worlds into the deck?
Answer: Yes: per the Setup section of the rulebook:

Find and shuffle the five start worlds. Deal one world face up to each
  player. These form  each player's initial card tableau.
Shuffle the unused start worlds together with the game cards. Deal six face down cards to each  player. Each player then examines these
  cards and discards two cards face down to the discard  pile. The
  remaining game cards form the initial card supply.

[Bolded by me for emphasis.]
Comment: My group eventually put card sleeves on the cards, and used different-colored card sleeves for the starting cards.  We *really* didn't like hunting through the deck for the starting cards.
Comment: Note that as you add expansions, fishing the start worlds back out of the deck after you play becomes a bigger pain in the rear, so sometimes my group just skips this part and leaves the extras out for expedience.


Oneness of different Indian philosophical thoughts

Question: Do six schools of Indian Philosophy accommodate each other or are they watertight compartments each to the exclusion of other?
Comment: None of the answers have been satisfactory.The answer failed to address the fundamental aspect of the question.
Comment: that's because this is not a simple question/answer.. it's like asking to prove fermat's last theorem in a internet forum. You could learn Brahma Sutras from an acharya (by personally visiting and serving them humbly), if you're truly inclined. It details all different schools and how to refute and arrive at conclusion.
Answer: Historically, Indians had always accepted a diversity of traditions. Unfortunately, in the Kali Yug, tolerance is at it's end.
For example, let's us take the issue of Beef eating:

Vedic Age: Male Cows were sacrificed and eaten as Prasadam -https://archive.org/details/textswhiteyajur00grifgoog
300 BC: Emperor Ashok published edict not to eat Cows
1st millenium AD: Defying Vedic scripture, a new caste was created specifically for beef eaters, hunters, butchers, executioners & fishermen:   Asprasya (Untouchables) -https://www.pahujalawacademy.com/lectures-of-history/
British Raj: Asprasya were discriminated against, and named as Dalit. -http://ijmsrr.com/downloads/1704201665.pdf
2017 AD: People are murdered for being suspected of killing a Cow. -https://en.wikipedia.org/wiki/Cow_vigilante_violence_in_India_since_2014

The "watertight compartments" are not philosophical barriers, but the modern definition of Castes and Sub-Castes(Jats).
Comment: This doesn't answer the question, What's the need to mention Cows here?
Comment: What, Vedic tradition does not allow eating cows.
Comment: The idea that a new caste was created solely for the exclusion of certain members of the community exemplifies tolerance in Kali Yug.
Comment: Vedic Tradation only prohibits the eating of Milk-giving cows; NOT all cows.
Comment: " 43) Here have the cows been called to us, the goats and sheep have been called near,
And in our home we have addressed the meath that sweeteneth our food.
I come to thee for safety and for quiet. May joy be ours, felicity, and blessing.
44) We invocate the Maruts, the voracious, eaters of their foes, Delightiug in their mess of meal.
45) We expiate by sacrifice each sinful act that we have done,
 Whether in village or the wild, in company or corporeal sense. !Swaha! "
-YAJURVEDA, as translated by RALPH T. H. GRIFFIT


How does Unity call "update()" in the scripts?

Question: I understand that you can expose your C++ code to a scripting language such as ChaiScript. From this you can call code that you've made in C++. In Unity, however, they have functions in the script, such as Update() that get called. In other words, how do I call script functions from C++?
Answer: Scripting languages often expose a set of API functions that allow you to inspect and determine attributes about a loaded script, in your case what functions are defined.  This varies by scripting language naturally and will also depend on your native language to scripting language bindings.
In Lua for example, I can load a script and then check whether a particular function is declared.  I've often done this for Update() and other methods so that if defined, I create a mapping that will then be invoked during the game simulation for those scripts that have overloaded that callback.
In the case of Unity, their MonoBehavior is a contract they've defined and they simply look to see whether you've overwritten specific functions from the contract and if so, then the callback is invoked at the appropriate times during game simulation.
Answer: Unity uses its own messaging system to call methods like Update. You can use it as well with for example Component.SendMessage.
I think that the underlying implementation of the message system uses some form of reflection to determine what methods a class has and call the appropriate ones.
(This post's answer explains it better)
Answer: C++ and C# can interact quite easily. (In the practice C++ issues relative to name mangling often force to have an intermediate C layer)
There are several resources you can have a look such as Mono P/Invoke docs and unity docs on native plugins.
Calling a C# function from C++ code is simply as using a function pointer (a C# delegate can be marshalled to be used this way).

For what concern how Unity handles callbacks it's another question. I don't know the exact underlying implementation but most MonoBehaviours hooks like Update aren't virtual|abstract method, nor implement any interface.
Why? Not sure, I often asked my self why (honestly I prefer a more explicit approach like implementing an interface like ISerializationCallbackReceiver).
On how the binding between function pointer and C# method happens, it's probably creating a delegate instance.
The problem is really different between SendMessage and Update.
I guess Unity is forced to use Reflection for SendMessage, because the method name is know only at runtime. Use it carefully because reflection is really expensive.
For the others Update, Start, etc.. the problem is simpler because method name, signature and target object are know. So the expensive binding process can be used only once in initialization. Here's a nice article.
Comment: If they had implemented their "event methods" as either interfaces or via base class, then you could actually call them yourself through a reference, and these event methods wouldn't be distinguishable from your own public interface. For example: component.LateUpdate() or component.Awake() would be legal. Granted, most Unity devs will make those methods public (like everything else), but they needn't and shouldn't be. At least for virtual methods it's also a matter of performance.


No Mans's Sky galactic map details

Question: Has anyone found out what the galactic map looks like in the final version? Is there a search function for stellar bodies, I.E. can I find a certain solar system and figure out how to fly to it, similar to Elite: Dangerous? Are there any parameters for stars that can be set to find only certain planets or stars? I want to find some general knowledge since the wiki is still in it's infancy.
Comment: I mean, I'm guessing the answer to this is "not yet". I do know that there's no way to specifically fly to a specific system, nor specifically search for things without just panning through the map.
Answer: As the game as been out for a while, I'm going you assume this question has been answered by the wiki.
For those who are wondering, the answer is no. There is currently no way to search the galaxy, aside from the left/right on the d-pad after searching for discoveries, which shows you discoveries nearby from other players. There is also no way to set waypoints to things you have already discovered, nor planets, unless you can find them on the galactic map, in which case you can by pressing square.

No Mans's Sky galactic map details


get product Id using product SKU

Question: I am trying to get the product Id but below are given the conditions through which I want to get Id of the product.
I have SKU of the product. but using that sku I want to get Id of that product.
It is necessary condition to get product Id using SKU no other way I want....
Answer: use the product factory as explained here, then just use the <code>$product->getIdBySku($sku)</code> method.
Comment: thank you Diana Botean..Your quick response save my time a lot.
Comment: you're most welcome!

get product Id using product SKU


Is it possible or worth it doing quests marked as red in Witcher 3?

Question: It seems that the rewards for slightly higher level quests are for that level or that they're adjusted for the current level. Is there a way to get a slightly OP weapon or piece of gear by expertly dodging for a half hour?
Comment: Possible? Yes. Worth it? Up to you to decide, it's your time, and the ultimate goal is having fun. If you're having fun beating those nearly impossible fights, keep doing it. Not having fun? Wait until you reach proper level. Personally I had some fun in the beginning, but after failing some of those, it stopped being fun and I found that I got tons of other things to do anyway. :)
Answer: I'd say it's not worth it.
Even if it was true that the weapon is slightly more OP, there is no point torturing yourself with 30 minutes of dodging and doing few points of damage. Why?

The weapon/armor you will receive will almost certainly be locked out until you get the level that the quest actually required, so you will end up carrying a huge piece of metal in your backpack/chest that you won't be able to use at all, and with stats that might be scaled for your current level.
As I did some research, most sources say that weapons and armors do scale, but with crappy random rates, and you will never be sure what this 30 minutes of dodging will give you.

Why don't you want to fully enjoy what game has to offer and do other (non-red) side quests or proceed with main plot? And when you have higher level the previously-red-quest is going to be enjoyable too... So unless you are some kind of masochist or achiever, I would discourage such gameplay.
Comment: I ended up taking like 30-40 minutes to kill an earth golem in one of those random encounter places. Didn't get hit once. I'm a masochist like that, I enjoy a challenge and W3 highest difficulty isn't particularly challenging for me... this is the Dark Souls player speaking here.

You are absolutely correct though, I got a piece of loot scaled to my level that was much worse than the Emmentaler with 3 stun runes I already have on there giving it 21+3+3 percent stun.
Answer: It is not worth it for the gear. However, you might get more XPs doing the quest. This might be a quicker way to level. Although, there are plenty of questions at your level which provide XPs aplenty so even that does not sound like a good reason to slug it out.
Comment: Battering through higher-level quests to level up quicker is a little self-defeating.  If you level up on Red quests, and your Green quests turn Gray, they'll only reward 1xp up on completion.
Comment: @Liesmith: I think we agree there...


Will my fast still count if I had thoughts on breaking it?

Question: I was feeling extreme thirst while fasting today. I did not feel sick but I woke up only one hour before suhoor and I did not get to drink that much water. I had thoughts about breaking my fast to drink some or to drink a little and then continue fasting. I wasn't sure but after a while I was about to, and then later on I changed my mind. I asked people online about it  and when someone told me it is not a valid reason to, I decided not to and to just wait until maghrib. I am now continuing with my fast but I'm concerned if thinking this already broke it. Is my fast still valid?
Answer: Absolutely, your fast is still valid. It is a very good thing to have changed your mind. Your fast would have been invalid if you would have drank even any amount of water voluntarily.


How big is the world in Minecraft Pocket Edition?

Question: I'm currently building a town in Minecraft Pocket Edition and I'm wondering how many blocks long and how many blocks wide the world is.
Comment: How long is what? What are you trying to build? If you're just trying to build a house, it doesn't matter what the dimensions are so long as you like it. If you're trying to build a particular thing, you're going to have to be more specific than "the platform".
Comment: Your question is very vague. What platform are you looking for the dimensions of?
Comment: I just mean how long is it from side to side and is it an even square?
Comment: When you say "the platform" do you mean the size of the actual entire world?  (If so, I'm guessing you don't speak English natively...calling this 'the platform' is very confusing)
Comment: yes I mean the entire world what are the dimensions
Answer: This question is quite vague, however I believe that you are asking what size the entire world is in Minecraft pocket edition.
According to Minecraft Wiki:

The Pocket Edition world is 255x255 blocks.

Please note that as of version 0.9.0, the world is infinite.
Comment: Not a problem, please mark the ticket answer as accepted so its not listed as open. Hopefully this will help others wondering aswell. Thanks :)
Comment: thanks so much in pockey edition i'm build a 255x255 floor above the world t build a town on and I wanted the center to be marked
Comment: Strange, I thought it would be doubled numbers, like this, 2, 4, 8, 16, 32, 64, 128, **256**
Comment: Also, this information is outdated as of the recent 0.9.0 update.
Answer: As of the 0.9.0 update, worlds are infinite. This means that the farther you walk out, the more chunks you load. Unfortunately, there is a "limit" of sorts. This is called the farlands. After traveling out 12,550,745 blocks, you'll be at the very edge of the farlands. It's rather unlikely you'll ever reach that point though, due to these factors.

Gaps between chunks at about 100,000 blocks out.

Jitteriness in player movement at about 700,000 blocks out.

The world crashes regularly and is completely unplayable at about 900,000 blocks out.

If you go truly quite a distance to 32,000,000 blocks out, you'll encounter what Tommasso Checchi has dubbed, the Stripe Lands. Blocks past this point are "fake" and you can fall right through them.
If you choose to make an "old", or limited size world, the world size is x1000 y128 s1000.

Farlands

Stripe lands
Answer: The height is set at 64 blocks high.
Comment: The asker only needed the height and width.
Answer: The Old world type is very small and contains just a few biomes, while the Infinite world type, like its name says, is somehow infinite, because of the Far Lands still existing. According to the wiki, the Far Lands have the classic format in the north and just an ocean in the south. I am sure that the Infinite world is infinite from north to south,but I am not sure if it's the same from west to east. The height limit is just below the clouds.
Answer: Its 246 by 246 blocks I count it. 0.5.0
Answer: In version 0.3.3 Alpha it is 266x266
Comment: Source?  This doesn't sound plausible, due it not being a binary multiplier.
Comment: @fbueckert It's definitely plausible, but pretty unlikely.  More likely would be that the above is a typo, and Matt meant 255x255.


The difference between statistical models and estimation methods, for example GLS and GLM

Question: I was checking out Genarlised Least Squares on Wikipedia and wondered if it had anything to do with Generalised Linear Models, which I have been using for quite a while. The Wikipedia showed me that one was a model and the other a method of estimation (see picture below). Although I perhaps at a very basic level understand the difference (I guess one is about the relation you describe, where the other is about how you calculate the coefficients), I am wondering if anyone would be willing to give a more elaborate explanation about models and estimation and how they relate. As an example, are some estimation methods exclusively connected to some models? And does GLM have any relation to GLS?
Answer: Yeah I definitely get the confusion. Generalized Linear Models estimate the parameters via maximizing likelihood which, when assuming normality, is equal to OLS estimated typically via the closed solution:
GLS on the other hand is there to address certain inefficiencies.  Directly from the wiki:
"In statistics, generalized least squares (GLS) is a technique for estimating the unknown parameters in a linear regression model when there is a certain degree of correlation between the residuals in a regression model. In these cases, ordinary least squares and weighted least squares can be statistically inefficient, or even give misleading inferences."
One example is heteroskedasticity and using WLS to address it.  WLS is just a specific case of GLS.  But basically all we do with GLS is to introduce a weighting matrix in our OLS formula which can, in the presence of these inefficiencies, attempt to reconcile the problems and allow us to interpret the results as usual.  So GLS introduces this omega:

And  depending on the problem we can adjust how omega is calculated.
To answer your larger question: Yes, a lot of methods are exclusively related to certain models because of the nature of the model. Methods are ways to estimate the parameters of the model like the coefficients, but models don't always have the same parameters or the same assumptions on the nature of the data. For example, we can't use OLS to solve for the coefficients of a Logistic regression.


How can I refactor Clojure source code?

Question: Doing 4clojure exercices, one goal is to provide a correct answer and an optional goal is to provide the shortest solution as possible (spaces are not counted in), a.k.a code golf. You can then compare to the others solutions.
When doing an exercice I first find a correct answer. Then I apply a manual refactoring to my source code, which consists in renaming variables names into a single character. For instance, after applying this basic step, my code may look like this.
(fn f[s]
   (if (empty? s)
     {}
     (let [[k & r] s
        [v n] (split-with number? r)]
        (assoc (f n) k v))))

Quite unreadable for a human, but score better in 4Clojure code golf contest since it saves a lot of characters.
For the sake of curiosity how would you do in emacs to automate that? Is there refactoring functions in clojure.core which could help? I did not find any.
Answer: Learn the libraries. For example, it looks like you could use if-let or seq. If you don't consider using a static analysis tool "cheating", check out Kibit
Comment: Yeh thnx for if-let or seq, I know them. Actually the extracted code here is only for illustration purpose. Thank you for the link to Kibit. Actually I am looking into its source code, and discovering new functions I didn't know: walk and prewalk. From the doc it really smell like it's what I was looking for. Thanks :-)
Answer: clojure-refactoring could help apparently.

How can I refactor Clojure source code?


Need to change font color in "difference"

Question: Working in Photoshop, I have a background with 3 different colors and needed the text to adjust accordingly, set to "difference" and the text over the black and white portions of the background did as I wanted, but the text over the blue part of the background is orange. Can I change it to be either black or white like the rest of the text? Example in picture.
Answer:
Put your text into a layer group. (White text only)
Set the text layer to difference.
Create a "Black and White" adjustment layer above that group
(not inside the group).
In the properties of the adjustment layer, click the button at the
bottom that applies the adjustment layer to only the object directly
below in the layer stack (as shown).
Configure the black and white adjustment layer as show, with every
color maxed at 300.
Final Result:
Comment: Thanks! I tried this but I must have done something wrong...
Comment: Are you in RGB  color mode?
Comment: Yes, I am. Do I need to be in CMYK?
Comment: AHA! I didn't have the text in a group layer, fixed! Thanks a ton!!
Comment: RGB color mode is probably necessary. It would be much appreciated if you could mark my answer as correct. Thanks!
Answer: You can add a Hue/Saturation adjustment layer, which affects to orange making it black.

Whitening needs smarter tricks or brute force. The latter means: Have both white and black texts. Add to the upper text layer a layer mask, which kills the wanted areas. An example:

The layer mask is done by making a color range selection (text layers closed) and then adding a layer mask to the top text layer. The mask forms from the selection.


Can a switched single speed fan (no light) be converted to 3 speed via different toggle switch?

Question: Can a basic single speed shop fan (no light) be converted to 3 speed via different type toggle switch?
Comment: Hello, and welcome to Home Improvement. Not without rewiring, or a specialized speed control. And, you should probably [take our tour](//diy.stackexchange.com/tour) so you'll know how best to participate here.
Comment: No. You could use a fan-speed control, though.
Answer: I bring up variacs as my first reason to meet current code if your AHJ doesn't have the exceptions my state now has for devices known to cause tripping.
If the fan is a single speed or has only 1 winding, there are only 2 ways I know of to make it variable speed. The first is a variac - this is a variable ac transformer, kind of expensive and larger than most single gang boxes used in homes. The good part is since fans are low current devices there are models that can do the job and fit in a double gang box ( but be prepared for sticker shock).
The second and more common method is an electronic speed controller, much like a light dimmer but rated for motors. These will usually fit in a single gang box and cost less than variacs.
Now the part that most don't know. Electronic controllers create harmonics on the electrical system and may cause nuisance tripping of both AFCI & GFCI breakers, I have not had a variac cause a trip and years ago only used them 2x when a contract required less harmonic noise than could be done with electronic controls. Luckily, my state allowed circuits that had troubles with GFCIs and AFCIs to be omitted if dedicated. I have installed several more variacs for a homeowner that wanted cleaner house hold power with cost not being an issue. I had to add stops for the low speed side of the variac so the fan would spin plus a little buffer, but it works quite well on the fans I installed with a variac rated at 5 amps when the fans were 3-4 amps max, but they are larger and require a double gang box. The pump actually required a much larger box but this is about fans so speed can be varied by electronic means (solid state) or with a variac, a variable AC transformer.


How is "chromium-chromedriver" package used?

Question: Firefox selenium driver seems to be crashing (perhaps because I'm on Firefox-beta ppa?):
>>> from selenium import webdriver
>>> webdriver.Firefox
<class 'selenium.webdriver.firefox.webdriver.WebDriver'>
>>> webdriver.Firefox()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 59, in __init__
    self.binary, timeout),
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
    self.binary.launch_browser(self.profile)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 66, in launch_browser
    self._wait_until_connectable()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 100, in _wait_until_connectable
    raise WebDriverException("The browser appears to have exited "
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.

So I tried installing the chromium driver but it still fails with selenium:
>>> webdriver.Chrome()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 59, in __init__
    self.service.start()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/service.py", line 66, in start
    "ChromeDriver executable needs to be available in the path. "
selenium.common.exceptions.WebDriverException: Message: ChromeDriver executable needs to be available in the path. Please download from http://chromedriver.storage.googleapis.com/index.html and read up at http://code.google.com/p/selenium/wiki/ChromeDriver

Am I missing something or is this package completely broken? I have both Chromium and Google Chrome installed for testing, if that matters.
Comment: Welcome to Ask Ubuntu. Please, could you put some of your time to read [What should I do when someone answers my question?](http://askubuntu.com/help/someone-answers)
Answer:
The Firefox webdriver failed with this message:

"The browser appears to have exited before we could connect"

Which means that selenium managed to find it. I also believe that beta versions can be the root cause as it works out of the box for me using the repo version.
For Chromium, you have to install the following packages:
sudo apt-get install python-selenium chromium-chromedriver

And fix the libui_base.so library path (See Chromedriver on Ubuntu 14.04 - error while loading shared libraries: libui_base.so)
To use the Chrome webdriver install the following dependency:
sudo apt-get install python-selenium

And download the Chromedriver from here, select the one corresponding to your architecture e.g:
http://chromedriver.storage.googleapis.com/2.14/chromedriver_linux64.zip
or http://chromedriver.storage.googleapis.com/2.14/chromedriver_linux32.zip
Extract the chromedriver file for example in your $HOME folder.
Then to start the chromedriver from python, open a terminal and type:
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> from selenium import webdriver
>>> driver = webdriver.Chrome(os.path.expanduser('~/chromedriver'))

Finally I'd recommend to use the package version of python-selenium available from the Ubuntu repositories to avoid installation in /usr/local/lib.
Comment: `sudo pip install --upgrade selenium` should do it.


How to disable auto create customer profile after edit order?

Question: When I edit order (at url admin/commerce/orders/1/edit) and save order, a new custom profile will be created. I don't want that. How can I disable that?
Answer: This is happening because the inline customer profile form has the country selected, which is all that's required for a field value to be present. I believe we should add a fix to Drupal Commerce core to prevent this, but I don't know off the top of my head if there's already an issue in the queue for it. Feel free to search at https://www.drupal.org/project/issues/commerce and file an issue if you don't see it already. Thanks!
Comment: I was created issue at [here](https://www.drupal.org/node/2853428).


My cat runs from me all of a sudden when eating

Question: I have a 3 yr  old female that I have been spoon feeding wet food since we got her as a kitten. Back then it was the only way she would eat, so it became a habit. Lately she takes a few bites then runs away like I hurt her. She even gives me this look. What do I do?
Comment: Maybe get a vet to examine her teeth?
Comment: Is then when she's eating wet food or dry food? Is she eating at all?
Comment: Yes,I think she's still nibbling on her dry. I also forgot to add when I spoon feed her I would talk to her. Same thing now.If I say anything she heads for the hills.What gets me is this happened all of a sudden. I wish I could teach her to eat wet food on her own.
Comment: My 14 year old cat just started doing the same thing! Ears a bite or two, then runs away, tail down like something scared him or hurts. He ears dry food so teeth are not the problem. Have another cat who sits beside him and continues to eat uninterrupted.
Answer: I have recently encountered the same thing with my cat, suddenly running away if I walk too close while he is eating.  Through my personal experience (having had many kitty cat pets since I was about 4) and through recent research, the best plausible reasoning and conclusion I have come to is this:

Cats are, by nature, prone to feeling vunerable when eating (this stems from their natural instincts of "staying alert" whilst in a "vunerable state" in the wild, from any predators) even when they are primarily indoor cats.
They are for some reason associating that particular time or situation with something bad, scary, or threatening. So now the problem is figuring out what that "something" is. This can be tricky, because it could be a number of things, from a loud noise being made when they were eating, to something you did personally (unknowingly) that has them nervous and wary of you particularly when they're eating (due to reason No.1). The fact that even if it wasn't something you did while they were eating, they still feel more nervous and vunerable during this time regardless.
Comment: While you are pointing out possible causes of this behaviour, it doesn't provide an answer to the question on how to deal with this. Do you have any pointers?
Answer: First of all, is there anything else that's different with your cat? perhaps a trip to the vet can at least clear up any possible health concern?
If the issue is not medical, to test @Melanie's theory, you could try feeding your cat in a different location? perhaps move to a smaller and more secure place (like the bathroom). And see if she will start eating?
Also, you didn't mention whether you have other cats in the house, they could be threatening her.
Since the "old" way of you feeding her is not working, perhaps now it's an opportunity to get her to eat by herself? (honestly, I admire your patience to hand-feed her for 3 years!!). Same thing with my suggestion above, leave the cat and the food in a small, safe (by her standard), and quiet space and leave her to eat by herself. Check on her after a few moments to see if she eats.


How would you deal with a colleague who arranges meeting with your manager to discuss team processes?

Question: I have a teammate who pings our boss quite often behind my back (I'm lead for my teammate) and it is okay for our boss to be pinged quite often (just a character). This time he arranged a meeting behind my back with my boss to discuss processes in the team. Well, firstly, he should discuss them with me. Secondly, he should not ping our boss to discuss that matters - at least there are other managers around with a lower-rank who can be involved. Thirdly, he is doing it behind my back without informing me. How would you handle this situation?
Comment: Are you "a lead" or "the team leader"? You're talking about "our boss" and "a colleague", therefore I assume the first. Please clarify the hierarchy in your question.
Answer: You talk to your manager. You say

Hi. Do you know why <teammate> is asking you about these issues, and is it something I can deal with?

At this point, either your manager redirects the issues to you, problem solved, or your manager explains why it is appropriate for your teammate to talk to him directly. If nothing else, staff always have a right to escalate things up the management chain if they don't like the answer they're getting at the first level.


does second harmonic generation (SHG) take place in amorphous materials or disordered molecular assembly?

Question: A review paper claims that SHG can take place in biological samples, that is when the endogenous molecules assemble themselves reasonably in order, such as collagen fibril in connective tissues. I wonder if there is a reason why a degree of order is necessary for SHG to take place, besides the requirement of non-centrosymmetry.
Answer: A degree of order is required so that the polarisation elements (the spatially localised sources for the SHG) can coherently add to form a propagating wave.


Connecting Windows iSCSI initiator to Centos iSCSI target

Question: Goal: To have my Linux VPS serve as an iSCSI disk for a Windows
Why: Management of the storage space on a Linux box and to reduce cost of licensing.
OS:
Centos 6 (Target)
Windows Server 2012 (Initiator)
Previously followed guides:
http://www.server-world.info/en/note?os=CentOS_6&p=iscsi
Now at this point I am unable to connect to the iSCSI box, I have made my .img file for 5 GB
I feel I am missing a simple step the snippet is included below (Identifying information has been removed for security)
<code><target iqn.2014-08.actualdomainthatpings.com:target00>
    # provided devicce as a iSCSI target
    backing-store /iscsi_disks/disk01.img
    # iSCSI Initiator's IP address you allow to connect
    initiator-address 192.168.0.3
    initiator-address 192.168.2.3
    # authentication info ( set anyone you like for "username", "password" )
    incominguser TEST\adminuser password
    incominguser adminuser password
</target>
</code>
And the output from the server is as below
<code>[root@Srv ~]# ll -h /iscsi_disks/disk01.img
-rw-r--r--. 1 root root 5.0G Apr 16 11:41 /iscsi_disks/disk01.img
</code>
And the "sample" IP my server would be on yet a different c-class.
192.168.20.2 for instance.
I differentiated the classes where needed.
On my Windows server upon trying to connect I see I am also getting
The error is authentication, though I must be missing where I am able to enter the authentication, it recognizes it is a iSCSI but does not appear to ask for credentials.
Answer: [Moderators please feel free to downgrade this to a comment if you feel that is appropriate.]
Set it up with CHAP authentication:
http://opentodo.net/2012/10/setup-iscsi-target-initiator-on-centos-6/
https://technet.microsoft.com/en-us/library/ee338480(v=ws.10).aspx
http://blog.migrationking.com/2011/04/how-to-setup-iscsi-on-windows-2008-r2.html


Monitoring DB setup in a way convenient for DBA

Question: Our DBA is very eager to help us with monitoring DB status. We had recently some problems with buggy deployments scripts (both manual and automated) that set up DB incorrectly or incompletely. So his idea is to have SELECT queries that will check the status of DB to provide quick feedback, e.g.
<code>SELECT count(*) > 0 FROM user_table;
</code>
Obviously, many DB problems will be discovered by end-to-end tests, but having a number of tests cases checking directly DB will help us with troubleshooting and shorten the feedback loop.
I would like to add such DB checks as Jenkins jobs and provide to DBA some way (natural for him) to express such test cases. I found two approaches to do that:

Translate SQL queries to JUnit tests, e.g. using DBAssert library:
<code>//Set condition to search record by.
dbAssert.table("authors").where("id", 123).and("last_name", "Coupland") ;

// assert customers _name_ column equals Douglas value in database.
dbAssert.assert_column("name", "Douglas");
</code>
Embed SQL queries into bash scripts, as proposed here:
<code>#!/bin/bash -l
CHECK=`mysql -u jenkins -ppassword -h 192.168.56.101 -BNe 'SELECT COUNT(*) FROM foo_db.jobs WHERE depth >= 100'`
exit ${CHECK}
</code>

The choice will depend on our DBA, obviously. Though, I believe, the second approach is easier as it requires no Java skills.
Any other ideas?
Answer: If it were me, I would use a bash or python script that reads from a properties file and reads/executes each query from the file and prints the query string and its return value (your link says Jenkins has email notifications, which is good for this)
Then show the DBA how to edit the properties file to add/edit/remove queries.
I would think it would be convenient for the DBA because they only have to add sql statements and read the email notification.


Constructing an $n\times n$ matrix with one eigenvalue

Question: If there is an $n\times n$ matrix with one eigenvalue, that must mean that the equation $(A-λI)=0$ vector has only one nontrivial solution. But how would I find a matrix $A$ like that?
Comment: Maybe play with diagonal matrices first?
Answer: the $0$ matrix works.${}{}{}{}{}$
Comment: why was I downvoted so harshly? please be kind with ur fellow human
Answer: A diagonal matrix with only $\lambda$ on the diagonal. But you should be more general with $(A-\lambda I)^n=0$ instead. Then you might be able to put some $1$'s right above the diagonal. Try a bunch of those.
Answer: Let's say we are working in $n$ dimensional space. We need to be clear about what we mean by one eigenvalue. Do you mean a single eigenvalue with geometric multiplicity $n$? In which case the matrix $cI$ fits the bill: it has only one eigenvalue, $c$, and the corresponding eigenspace is dimension $n$. I believe this is what you mean because you wrote that you want $A-\lambda I=0$ to have only one solution in $\lambda$, in which case $A=\lambda I$, where we just get to pick the constant. However, note that we don't find eigenvalues by finding solutions to $A-\lambda I = 0$, but rather finding solutions to $\det(A-\lambda I)=0$, this is an important distinction.
Or do you mean a single eigenvalue with geometric multiplicity $1$, in which case the matrix with $c$ along diagonal and $1$ along super diagonal is what we want. It's only going to have a one-dimensional eigenspace and there will be no other eigenvalues.


Doing part time work for a company that my full time employer has invested in

Question: I presently am doing part time work for a company that is privately owned that Venture Capitalists have invested in. My full time employer has invested in the venture capital firm and I was wondering if it is a conflict of interest. My full time employer is not involved in the management of the company what so ever but is an investor considered a business partner?
Comment: Are you doing this part-time work of your own accord and in exchange for a wage from that company (as opposed to your full-time employer)?
Answer: What you've described isn't completely unheard of, especially with startups which are somehow related to an established business. It can be very hard for a startup to find relevant talent in the early stage, as well as to have enough cash flow or working capital to pay full-time salaries.
The best way to handle this is for everyone involved -- both employers, and possibly even if the VCs if you're still at the Angel Investor level -- to be aware of the relationships. If the startup is still receiving money from actual angel investors (less than a few millions of dollars) they may feel good about the fact you're working for them part-time since you've proven you have the skills. Individual investors are a lot more attached to their own personal money than venture capitalists are to other people's money. If that makes sense.
There is a risk to both employers that you'll leave the full-time job should the startup be able to pay you. But again, that may well be what your current full-time employer hopes will happen and would be more than happy for you to do so.
Answer: If anything, it is the opposite of a conflict of interest, at least as far as holding down two simultaneous jobs at different corporations gets.  Your part-time employer wishes to succeed.  Your full-time employer wishes for your part-time employer to succeed.  In both cases, they would wish for you to serve the part-time employer well.
The issue with business partners is that money moves from one to the other.  If one of your employers was a supplier to the other, for example, you might be tempted to manipulate the relationship inappropriately to the benefit of one or the other.  In a case like that, the appropriate response would be to avoid being in a position where you could influence such decisions on either side, or be exposed to potentially exploitable information (recusing yourself as necessary).  As it stands, no problem.
Of course, that could change.  It's possible that your full-time employer will become a business partner as well (causing conflict of interest on their side as well as yours) or that you might see some ugly politics among the stakeholders in the part-time company.  In that case, you could find yourself in a somewhat awkward situation, and need to start recusing yourself appropriately.  Assuming all goes well, though, there's a good chance it won't be a problem.


Synchronizing the IIS 7 across two app servers

Question: I am using the Shared IIS feature of IIS7 i have taken the config files of one server and put it in a shared location..in the second server i m using these config file from the shared location.I am able to synchronize this but the issue is whenever i m adding a new application in the IIS server of first server the other server doesn't show the latest application...in the second server i am just able to see the Virtual directory and not the application.
Can any1 help me on synchronising the two servers i.e when i add any new application in first server the other server should automatically show the changes.
My business requirement requires runtime generation of the applications in the IIS(which i have completed) the only problem is synchronisation.
Thanks,
Sajesh Nambiar
Answer: You need MS WebDeploy to do this implicitly.
http://www.iis.net/download/WebDeploy


How to turn off the prompts for additional participants in event registration

Question: I have an event with a $10/head admission fee.  I have "register multiple participants" and "same email address" boxes checked in the setup.  The profile is just first name, last name and email.  The problem is that each registrant is still taken to a profile screen for each person they are registering.  So if Suzie is buying 6 tickets, she will be prompted to enter data on all six people.  They may be optional, but they are still annoying to the user.  How do you turn that off so Suzie can just say she wants 6 tickets, enter her own data, pay the fee and be done?
Answer: Create a price set with options set at 1 Ticket $10, 2 Tickets $20, 3 Tickets $30 and so on.
Uncheck Register Multiple Participants, and use the price set you just created.
Answer: You can also create one option field of "Input Field Type" Text/numeric quantity.  Suzie can then just enter in 6.


What file do I have to edit to make static DNS server in CentOS?

Question: Almost every distro I know will wipe /etc/resolv.conf on reboot (I think DHCP does this) and thus the place to add static DHCP entries varies per distro. How do I add static DNS servers to a CentOS server, so that I know that my entries will survive a reboot?
Comment: check out this question on SU http://superuser.com/questions/82337/slackware-change-dns-permanently
Answer: For CentOS it looks like you add PEERDNS=no to /etc/sysconfig/network-scripts/ifcfg-eth0 (see the documentation).

More generically, iIf you're using dhclient then put the following in your dhclient.conf file:
interface "eth0" {
 supersede domain-name-servers 18.104.22.168, 220.127.116.11;
}

For dhcpcd you add the -R option to the command line to stop it changing /etc/resolv.conf.
Finally pump uses the -d option on the command line to stop it changing /etc/resolv.conf.
Answer: It would really just come down to how you configure your dhcp client.
From the link provided, it seems the relevant file will be
/etc/sysconfig/network-scripts/ifcfg-eth0


what kinds of font licenses are compatible with creative commons?

Question: I want to create ONLY images which have a creative commons license.  I will need to use fonts in these images. What kinds of font licenses (noncommercial or commercial) would be compatible and allow me to do this? I live in the US and want to use Creative Commons Attribution-NonCommercial 4.0 International license. (CC BY-NC 4.0)  I know that the SIL Open Font license on Google fonts allows this. Are there any kinds of licenses that would work as well?
Answer: Disclaimer: I am not a lawyer, and what follows is not legal advice.
If you have a font licence to use a font (whether it's a paid font or not) you can legally use it to create an artwork that is creative commons, or you can even copyright it as you are the creator of the image.  This includes all of the fonts that came pre-installed on your computer. You can basically use them for anything you want.
If this were not the case, graphic designers would not be able to copyright logos or their work if they contain any text written using a font, nor would they be able to sell copyrights to their clients. There would literally be no point buying a font licence if the font could not be used to make something.
Commercial (paid for) font licenses generally exist to prevent people from redistributing font files (like re-selling them, or giving them to third parties) or from altering or copying the font files, not to prevent their use in commercial or non-commercial artwork/images/documents. Using a font to make an image/document does not mean you are sharing the font file itself, so it doesn't break the terms of the licence. The font is only being used. So you are not limited to using only open fonts to create images you want to release under creative commons.
Open font licences generally exist to allow people to share font files, and often to modify the font files or create derivative font files. Again, this does not prohibit their use in artwork/documents, for either commercial or non-commercial work.
Some free fonts may come with a licence that prevents commercial use, and you would need to buy a licensed version of the font to use them commercially. You always need to check the licence to find out what you can and can't do with a font.
To answer your question more directly re open fonts, there are SIL OpenFont, Apache, and MIT font licences. There may be more, but those are ones I am familiar with.
Another source of open fonts is fontlibrary.org - Note: I have no affiliation with fontlibrary.
Comment: Thanks for the great and exhaustive answer.  It can be hard to disentangle these licensing issues, and I'm sure this answer will help other people searching for this question...
Comment: @idiotprogrammer I know the language in these licences is difficult.  Just remember there is a difference between the font file (which is copyright), and merely using the font.  Sometimes licences say very little about the latter, and just assume people will know that usage is allowed.  I thought my answer was a bit rambling to be honest, but glad you found something useful in it.


Suspecting that the universe is even more bigger

Question: Is it plausible that a possible extraterestrial scientist from a galaxy 13 bilion light years from us sees this part of the universe nothing else than just background cosmic radiation... and even more intriging in the oposite direction he sees an enormous portion of the universe filled with galaxies and stars that are not visible to us due to space expansion greater than the speed of light regarding Earth?Ofcourse his sight in the oposite direction finishes also at a CBMR signal.
Answer: Yes. It is completely plausible that the universe is infinite in spatial extent, despite the fact that any observer can observe only a finite part of it. In fact, current standard cosmological models generally assume that it is infinitely large, because observations are consistent with zero spatial curvature. (There is nonzero spacetime curvature.) You can read about a $k=0$ Friedmann universe.
If the universe actually has positive spatial curvature, then it has finite size. But the spatial curvature has to be so small to match observations that the whole universe would be much larger than the part we can see.
Comment: @SeñorO what obvious problems? The Big Bang is a singularity no matter the shape of the universe.
Comment: Current models assume it's infinitely large because it's an easy approximation, not because picking an arbitrarily large size contradicts with observation. While observations don't favor infinite or finite/large, there are obvious problems with there being an infinite universe and an initial singularity.
Comment: @Javier so is the idea then that the bing bang singularity existed at a particular point inside an already infinite volume of "empty" space?
Comment: @SeñorO Definitely not.
Comment: @SeñorO see https://physics.stackexchange.com/questions/136860/did-the-big-bang-happen-at-a-point
Answer: No, it is not plausible that the extraterrestrial scientists would see such differences when they look in opposite directions.
The Friedmann universes describing our expanding space are derived under the assumption that the universe is homogeneous and isotropic. In other words, it is the same wherever you are  and in whichever direction you look. In this respect, it doesn't matter if the universe is infinite or finite.
Because you mention galaxies 13 billion light years apart, and that happens to be the approximate age of the universe, I think you probably believe that is the size of the observable universe. However, due to the universe's expansion, that is not the case. It's more like 42 billion light years in radius. (See the answer to this question for a good explanation: Size of the universe)
I'm also assuming that you are asking what someone at the edge of our observable universe would see, not realizing that we are also at the edge of their observable universe. Again, the answer is that observers anywhere in the universe would all see the same sorts of things (ignoring small-scale variations, of course).
Comment: I wasn't clear enough so I must add that he doesn't see the CBR only from our part of the universe but he also has his shell of the observable universe of 13 B light years.
Comment: @ Krešimir Bradvica I don't quite understand your comment. Are you assuming that the extraterrestrials can see things from two distant vantage points? It doesn't actually matter though. Under homogeneous & isotropic assumptions, the two views should be the same.


aerodynamic forces on an engine cowling

Question: In Mendenhall's book about the Gee Bee racers, he describes that on the Models Z, R-1, and R-2, there was a strong tendency for the engine cowl to get pulled forward and into the prop during races, requiring reinforcement of the cowl attachment points to the engine & airframe- which puzzles me to no end. Can someone please explain the pressure distribution right behind the prop that would cause this?
Comment: IF that's the case, then there must have been an imbalance of  pressure on the forward and back side of the cowling.  It might be more intuitive to think about the cowling being *pushed* forward from high pressure behind the cowling than being pulled.
Comment: I have not done any sort of aerodynamic analysis of this but I'm speculating that another factor might be a lower-pressure region behind the center area of the propeller caused by the centrifugal force of the swirling airflow.  This is likely negligible for "normal" propeller-driven aircraft but the GB racers push the envelope of performance.
Comment: On airplanes with sliding teardrop bubble canopies, the aerodynamic forces can sometimes push the canopy forward and if they are unlatched they just sit there.
Comment: This has a lot to do with proper understanding of engine compartment air flow and should be studied further.
Answer: You are looking for 'cowl lip suction' or 'lip thrust'.  This is a phenemona that also happens on jet engine cowls when they have lots of spillage.
When the cowl flaps are (nearly) closed, the engine bay approaches stagnation pressure.  Many of the streamlines that would otherwise go into the front of the cowl instead are diverted around the outside -- this is a situation similar to engine spillage (when mass flow can't go through the engine, it goes around).
This air is forced to rapidly accelerate around the cowl lip -- this region of high acceleration leads to high velocities which lead to a local suction.
Here is a panel code solution demonstrating this.
The magenta represents the inside of a blocked engine -- the pressure there reaches the stagnation pressure for the flow.
The green and blue around the cowl lip represent high velocities and strong suction pressure -- some of that area has a forward-pointing outward normal vector.  This means that the local suction will resolve into a thrust.
If the cowl were truncated somewhere on the constant-diameter section of this nacelle (and you can imagine the entire engine compartment is at stagnation pressure (magenta) then you can see how the cowl would have a net forward force on it.
Comment: Rob, really appreciate your explanations, and I followed this up until the last sentence, which seems to suggest that the right shape can provide thrust for free (once whatever speed is initially attained). Does the "net forward force" exclude the rearward force on the magenta area, or is something else going on here to preclude the free lunch scenario?
Comment: @RalphJ "this region of high acceleration ... leads to local suction", you know, like wings and propellers?

aerodynamic forces on an engine cowling


Does both switch and router have to be gigabit for higher speeds?

Question: If you have a gigabit switch connected to non-gigabit router, will the internal network transfer rates be gigabit when the devices are connected to the switch, or will the router also have to have a gigabit port?
Comment: I edited the question to be on-topic; however, you should ask questions about consumer networking equipment on [su]
Answer: Do you have VLAN segmentation?  If so - I would assume the 'routing point' for your network is the router, in which case any traffic going between VLANs would traverse the uplink from the GIG switch to the non-gig router.  I'm also assuming the speed of your 'non-gig' router is 100mb?  Depending on what the network is being used for, and how many users - that 100mb link can be adequate bandwidth or it can be saturated constantly.  The only sure way to know would be to check interface statistics during peak transfer periods - on a Cisco Device:
<code> show interface Fa0/x
 show interface Gi0/x
</code>
If the traffic flow is not between VLANs (hosts that are plugged into the switch are all on the same VLANs) - then they would not be using that link to the router as they are all on the same broadcast domain.  Assuming all ports negotiated at 1 Gig -  you would get 1 Gig speeds.
If this is (as Mike P. classified off topic) a home router/switch question - then I would think the bottleneck would be the ISP speed (unless you've got Gig speeds there).
Answer: If 2 hosts have gigabit interfaces and connected both to the same gigabit switch and both ports belong to the same VLAN then it will be gigabit connection. Traffic through 100M router will be 100M


How to enable hardware based encryption on Samsung 850 Pro

Question: I have a new Samsung 850 pro which touts hardware-based encryption. According to that page I should just go in my bios and set a hard-drive password (no problem right). The only relevant thread I found on the issue also says something along those same lines. I have no such option in my BIOS (I have a Gigabyte board with a Z87 chipset, model number escaping me at this time). If I were to buy a new motherboard to get this to work, what feature(s) does the board need to support?
Answer: As the "someone" working on "msed", it now has the ability enable the OPAL locking, write a PBA to an OPAL 2.0 drive and chain-load the real OS after unlocking the drive on bios based motherboards. No special motherboard support is needed. Yes, it is still early in it's development cycle and it currently does not support sleep to ram as that requires OS hooks.
Answer: Depends on what you mean by "get this to work". That drive support OPAL 2.0, which allows various software managed encryption schemes to use hardware accelerated encryption. It also allows for pre-boot authentication (PBA) for encryption, such as BIOS/EFI schemes. If you want to use PBA (ie a password/pin at the BIOS/EFI) then you'll have to switch to a motherboard that supports it (I couldn't say which as I don't use PBA, I use BitLocker, which I highly recommend in Windows environments).
TL;DR If you're running Windows, use BitLocker, it will automatically use the hardware acceleration.
Edit:
As of April 2014, OPAL is not supported by Linux. There was someone working on "msed", but it wasn't finished or production worthy. I don't know the current status or future of OPAL support in Linux.
Edit 2:
There are also various UEFI products that can manage OPAL compatible drives allowing for a variety of PBAs if your BIOS/EFI doesn't support it directly. The only one I've vaguely familiar with allows companies to setup an authentication servers for PBA over the Internet. It might work with local credentials as well, I'm not sure. It's also very expensive. Food for thought if nothing else.
Comment: Excellent.  I am not using Windows, it's ubuntu 14 with LVM encryption enabled via the installer option.  Sooo maybe that's taking advantage of the hardware acceleration already and the answer is do nothing and profit?
Answer: TexasDex is correct.  Your motherboard BIOS must support an ATA Password option (this is distinct and in  addition to the BIOS password).  Now the interesting bit . . . no one mentions this feature.  Not in mobo reviews, comparisons, and certainly not in the advertisements and listings of the mobo manufacturers.  Why not?  Millions upon millions of Samsung EVO and Intel SSDs are ready to have ultrafast and ultrasecure hardware encryption enabled, all they need is a BIOS with ATA Password support.
The only answer I could find is that Mobo makers are afraid a few noobs will forget their passwords, and since this encryption is so reliable, no one AT ALL will be able to help.
I had an ASRock Extreme6 mobo, and thinking it was the latest and greatest, of course it would have this feature.  Not.  However, I wrote to ASRock in Taiwan and in a week they emailed me the 1.70B version of their BIOS with an ATA Password option.  However, it's still not available on their website, you have to ASK for it (?!).  This may be the case with your mobo makers as well.
Comment: Does this BIOS support suspend to RAM sleep mode? Does it unlock the drive while resuming from sleep?
Answer: It's possible to use the hdparm command in Linux to enable ATA Security Extensions, which will set the AT password on the drive, thereby encrypting it.
Unfortunately, if your BIOS doesn't support hard disk passwords then there's no way to boot after you do that, since you can't use the hdparm unlock command until after you're done booting, and you can't unlock and boot off the drive until after you unlock it.  Kind of a chicken/egg problem.  That's why they sometimes put disk password support in the BIOS, so it can run without needing an OS.
If you have the /boot or / partition on a separate device you might be able to set up a script that uses the hdparm command somewhere in the init process.  This isn't easy, and kind of defeats the purpose of having the SSD for fast booting and such.
My only other idea would be to have a thumb drive with a super-minimal distro of Linux that does nothing but prompt for the password, run the hdparm ata unlock command, and reboot, allowing the OS to load from your unlocked drive (I believe soft reboots generally don't re-lock drives).  This is not ideal, but it's the best available solution if your motherboard doesn't support ATA passwords.
Answer:
Storage type must be ACHI.
The computer must always boot natively from UEFI.
The computer must have the Compatibility Support Module (CSM) disabled in UEFI.
The computer must be UEFI 2.3.1 based and have the EFI_STORAGE_SECURITY_COMMAND_PROTOCOL defined. (This protocol is used to allow programs running in the EFI boot services environment to send security protocol commands to the drive).
TPM chip is optional.
Secure boot is optional.
GPT and MBR are both supported.
If there is RST software/drivers, it has to be at least version 188.8.131.520.

This can be done with 2 disks or one.
From a Windows install that meets the above criteria:

Set state to ready to enable via Samsung Magician.
Make a secure erase USB (for DOS).
Reboot PC, change boot mode to BIOS boot (for the secure erase USB)
Boot into secure erase, erase
Reboot PC, change BIOS boot settings to EFI again. (Do not let the PC start booting from the drive or you might start the process from the beginning.)
Boot back to Windows disk and check via Samsung magician or install Windows to your secure erased disk.


Nagios and Rails Monitoring

Question: We want to use Nagios for monitoring a Rails app. The reason is we just don't have a Rails app; we have Java and .Net apps and we want to use Nagios for all different apps; to have a centralized monitoring system. I know there are some great monitoring tools such as New Relic,Monit,etc. out there but they didn't want to go with anything different than Nagios. I am looking for a Nagios plugin to check the latency(uptime,downtime, how long does it take a page to load,response time,etc.) of our Rails app and couldn't find a good Nagios plugin. Does anybody know of a good Nagios plugin for monitoring latency in a Rails App? Thank you very much in advance for your help.
Answer: Uptime, downtime, response_time is handled by almost every nagios plugin.  The standard check_http plugin should work.  Be sure to test a real page (for example, a dynamic page) for the response time.  If you test a static page, it might not hit the database etc and your response times will be incorrect (too perfect).  If you run rails on a non-standard port, you can override the port it checks on with -p:
http://nagiosplugins.org/man/check_http
A long time ago, in a previous life, I used Nagios for up/down but used Cacti for trending.
Also, this should be moved to serverfault.
Answer: An alternative to Nagios would be its fork, Icinga. Differs mainly in its new dynamic web interface, database flexibility and development style. It is compatible with Nagios plugins and configs, so the above would work too.

Nagios and Rails Monitoring


XCode 8 keeps freezing at startup when loading index

Question: My xCode 8 keeps freezing at startup when loading the index of the project. I have to delete the derived folder data everytime to make XCode not freezing (and thus it has to rebuild the index everytime).  I always had this problem since XCode8 has released and there has not been a fix yet. The problem did not exist when I use XCode7 (even though indexing was also very slow, it did not freeze and will eventually finish).
I suspect that loading the index may take too much memory (my dev machine has 8GB of RAM). Does anyone notice the same problem and is there a solution for it?
Our company's project is decently large (around 200-300 source files).
My XCode is the AppStore public version: Version 8.0 (8A218a).
Comment: Do you have the app store version?
Comment: Yes, this is the app store public version, not the GM or Beta.
Answer: cd ~/Library/Developer/Xcode/DerivedData/ProjectName-xxxxxxxxxxxxxxxxxxx/
rm -f Index

Answer: I run into this issue, and my solution is:
Restart my Xcode, then there is no Loading index...


Convert Laravel into PWA

Question: I want to convert my laravel application (e-commerce store) into a progressive web application (pwa). How do I do that? Does it need a complete SPA in vue or it can be done using blade template engine (blade view files)? What is the proper way to do it ?
Comment: You might look at how the admin generators work, that could give you a clue what to implement. Maybe? https://laravel-news.com/laravel-vue-js-adminpanel-generator
Answer: It really depends on what's the current state of your application, however you can start one step at the time with making your web a PWA.
Couple of things you need are:

SSL certificate, because the service worker

Using service worker you can hijack connections, fabricate, and filter responses. Powerful stuff. While you would use these powers for good, a man-in-the-middle might not. To avoid this, you can only register service workers on pages served over HTTPS, so we know the service worker the browser receives hasn't been tampered with during its journey through the network.

Don't required on your local while you are developing stuff.

A service worker you can read more about this on the link.

For the service worker there a few options out there to help you getting started with different caching strategies for sections of your page.
A great example of this is: https://developers.google.com/web/tools/workbox/
You have a full list detailed here with the full list of things you need to cover.
Another thing is with PWA it does not have to be all your site to work online working iteratively it's great as you can start with a simple page to show a message when you don't have connection to the internet and after that start adding more features.
As mentioned above Google has a great list of resources for this at:

https://developers.google.com/web/progressive-web-apps/

In the context of Laravel as long as your views are rendered (blade) you can cache the responses or specific content with the service worker.

Convert Laravel into PWA


PE file - data directory

Question: If you remove "data directory" from a "PE file" what will happen ?
I think loader will give an error, but I'm not sure. Please try to correct me.
Comment: you mean `.data` and not directory you mean `Section` or `Segment` right? deleting it is pretty simple just get a PEditor by yoda and delete it, you won't be able to run the program it will just say `is not a valid Win32 application`
Comment: Thanks for the reply. But I'm talking about 16 data directories(128 bytes) in Optional header of a PE file. All other things like data section, section table and other section will be intact, but i'm just deleting the Data directories from PE optional header. So what will happen will loading this PE file ? Any help will be appreciated ..
Answer: You can't exactly "delete" this directory, however you can set the NumberOfRvaAndSizes field to 0 and then the system loader won't use the entries from it. From the TinyPE page:

The PE specification says that the number of data directories is
  specified in the NumberOfRvaAndSizes header field and the size of the
  PE optional header is variable. If we set NumberOfRvaAndSizes to 0 and
  decrease SizeOfOptionalHeader, we can remove the data directories from
  the file.

However, the resulting file won't work in Windows 2000 "because the loader tries to call a function from KERNEL32, but KERNEL32.DLL is not loaded". So normally you should add at least an Import Table directory, which needs NumberOfRvaAndSizes to be at least 2. (You also need an import directory if you want your file to do anything useful, like call functions from other DLLs :)
Comment: @SerG: because import directory is index #1
Comment: Why is "at least 2" for only an Import Table directory?
Comment: I'm sure you CAN delete this directory, after setting the NumberOfRvaAndSizes to 0, you cut the next 128 bytes and move every following byte to the left 128. Oh, and is Windows2000 still a thing?
Answer: I haven't done this since the early days of MSDOS filenames in 8.3 form.  If you edit the dard disc directory area with a hex editor and change the flag byte(s) which signify that a file is an extended directory then you can open that file as if it was a file.  I don't know what happens with later Ms DOSs, though.  Easy enough to test with WinHex, if you want.
Comment: This is completely irrelevant to PE file format.

PE file - data directory


Why is thawing in warm water bad for fish and meat

Question: This question has been asked before but no one addresses this point: If I defrost meat or fish, say salmon fillets, and cook them directly after, wouldn't that kill the bacteria that might have grown when the food was in the "danger zone" . People go on to say, it must be less than a certain thickness. But why would any of that matter? If I leave a salmon fillet under warm water, or de-thaw ground beef under warm water, or anything really, and cook it right away, in the case of salmon the bacteria would be killed in the frying pan, and same with the ground beef, same with a steak. Am I missing something?
Answer: Bacteria also produce a lot of waste as they consume the food they grow on. In many cases, it's not the bacteria that will hurt you (many will not even survive the trip through the stomach if you ate the food raw) but the chemicals in their waste are poisonous to humans and many are extremely resilient to heat. For example, salmonella toxin can easily survive temperatures well in excess of 100°C.
The other problem is that not all bacteria can be eradicated by heat. For example, botulism-causing bacteria and the botulinum toxin they produce are both heat sensitive, but their spores are extremely resilient, surviving for 6 hours or longer at 100°C. Once you consume the spores they will find a perfect environment to grow into new bacteria and product fresh toxin.
Not to mention, the "done" temperature of most meats is well below 100°C. Fish is generally considered cooked at only 62.8°C, even poultry is only 73.9°C. So even if a toxin can be destroyed at high heat (like botulinum toxin which requires 5 minutes at 100°C to destroy) you are unlikely to want to eat the resulting food after holding it at that temperature for that long.
Water has incredible thermal capacity in addition to its conductivity properties. If you have good thermal contact, you can thaw meat surprisingly quickly in a water bath. A half kg (3cm thick) pack of vacuum sealed ground beef can thaw in a 4 liter water bath at 4°C in the refrigerator in a little over an hour. If you absolutely need it thawed faster, you can change the water out 2-3 times, always keeping it at or under 4°C.
Comment: Thank you for this, where can I read more and learn about Bacteria on food.


How to get KATE's Spell Checker to show all misspelled words?

Question: I have Kubuntu 16.04 installed.  My recollection is that automatic spell checking was working fine under Kubuntu 14.04, with all the misspelled words it found underlined.  But now since I've upgraded, it doesn't...
Under the Configure-Kate-dialog, I have selected a bright red line for Fonts & Colors [colors tab] spelling mistake line so it should be visible.  And under that dialogs Editing section, within the Spellcheck tab, I have selected [x]Automatic spell checking enable by default, to no avail.  And I've tried toggling on and off this other option under the spellcheck tab [x]Automatic spell checking enabled by default, and [x]Enable auto-detection of language, to no avail.
Outside of the configure-kate-dialog, under the main menu's TOOLS>spelling> [x]automatic spell checking has been toggled on and off, to no avail. Any ideas what's going on?
==ADDED INFORMATION==
apt-cache policy aspell:
aspell:
  Installed: 0.60.7~20110707-3build1
  Candidate: 0.60.7~20110707-3build1
  Version table:
 *** 0.60.7~20110707-3build1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64

Comment: It's working here in 16.04. Can you give the output of `apt-cache policy aspell`?
Comment: aspell:
  Installed: 0.60.7~20110707-3build1
  Candidate: 0.60.7~20110707-3build1
  Version table:
 *** 0.60.7~20110707-3build1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
Answer: I found several reports of this bug. Listing here, here and here.
However, there is a workaround. You need to disable Enable autodetection of language from Settings -> Configure Kate -> Editing -> Spellcheck tab.
Then it will detect the error if you go to Tools -> Spelling -> Spelling. But auto-detection doesn't work sometimes. You can make this menu a shortcut by using Settings -> Configure Shortcuts menu.
Comment: That's almost as good.
Answer: Coherent howto for the example of the German language:
(because English might benefit ftom specific default preferences)
(1) ++"Settings" ... ++"Configure Kate" ... ++"Fonts & Colors" ...
goto headline: "Text decoration" ... --- goto sub-line: "spelling mistake line"
--- select a typical color like "dark red"
(2) ++"Settings" ... ++"Configure Kate" ... ++"Editing" ... ++"Spellcheck"
in "Standard language" (DE "Standardsprache") select:
   ++"German (Germany)"    (DE : "Deutsch (Deutschland)"
=== === and now the most important setting: === ===
set to "OFF": "automatic language detection" (DE : "Automatische Erkennung der Sprache")
This is the setting which creates all the trouble. "Automatic" sounda good but then spellchecking does not work - a bug.
(3) The 3 following feature options: (Capitals etc.): ...   you might set them all to:  "ON"
(4) ++"Apply" ... ++"ok"
(5) back into the editor / file to edit:  ++"Tools" ... ++"Spelling" ....
and there:  ++"Automatic Spelling"
(6) change the language:     ++"Tools" ... ++"Spelling" ...: ++"Change Dictionary"
Result: on the bottom of the KATE window - search field - will appear the option selector.
You can opt for any language available on your PC.
(7) Hopeful that you will be successful, too. (done on UBUNTU 16.4 )
(Improvement suggestions if any, especially for languages DE FR ES EN , please to the email address: ok Q infos7.com )


Can I safely store and/or use greywater in my garden?

Question: A friend is doing some remodeling in his house and he realized that he could easily redirect and store some of the greywater from the kitchen and bathroom to the garden. Either using it immediately or storing it for later use.
Can this water be used directly or does it need some filtering?
Comment: I would not use grey water for my garden unless I absolutely had to.  To be able to do this responsibly you'd need MSGS sheets on every product you put down that drain.  Naw.  Plants need the best we humans can provide and grey water is not at all a good idea.
Comment: Check your local codes concerning the use of grey water. In Florida grey water can only be used to flush toilets and urinals. http://edis.ifas.ufl.edu/m/#publication?id=AE453
Answer: You can use grey water on the garden, but storing it is not a good idea without strong chemical treatments. It  contains bacteria, so if you're going to use it, it needs to be immediate. There are lots of Q & As on this subject on the site already, but more information on why it isn't particularly environmentally friendly to store grey water here http://info.cat.org.uk/questions/water-and-sewage/can-i-store-and-use-grey-water-my-bathroom-and-sinks/
Answer: Though Bamboo is correct that graywater storage can become odiferous and messy, that is not the end of the story.  There are underground storage systems for graywater and in ground systems that have plant treating the water and so that what you use in the garden is not sludge.  Your system just needs to remove nitrogen fast enough before the bacteria get at it.  The problem with these systems is that the usually the metabolic of the cleaning plants can't keep up with the supply once winter hits; so you end up with a mixed system using sewage system in winter and graywater system solution for the rest of year.
Local and state/provincial governments often don't have statutes to deal with graywater, but you should poke around for laws in your area, I advise you to do this on the quiet.  All statutes are online typically so research should be easy and private.
I have seen graywater systems in the Yucatan that were marvelous, but they have warm weather all year around.  Here in Massachusets, there is a green house based sewage based system that is fascinating and is used in rest stops in Vermont and by corporations.  A graywater system simply needs to remove


Not leaving blank pages

Question: I want to force Adobe Indesign cs5 to begin any chapter of a book file on any page, odd or even, how can I do this? In other words, not leaving any blank page.
Thank you,
Ed
Comment: Doesn't your text automatically fall on the next page? InDesign will not put in a blank page by itself; you have to insert one.
Comment: Not certain what you mean. InDesign doesn't just randomly throw in blank pages.
Comment: Let me be more explicit. What I tried to mean is related to the beginning of a chapter after the preceding one. You can set Indesign to display the beginning of chapters on odd or even pages. For example, If you select on a odd page, and one chapter ended on a odd page, ID leaves the next page, even, blank in order to start the next chapter on the next odd page. What I really want is to starting any chapter on any page, odd or even, so that no blank page is left between two consecutive chapters. How can I accomplish that using ID?
Answer: It depends on how you added those page breaks in the first place.

Manually with "Insert Odd Page Break" and/or "Insert Even Page Break": add a regular "Page Break" (without 'odd' or 'even') immediately after the current page break, then delete the previous break. (Do it in this order so you cannot accidentally paste the previous and next paragraphs together, which will mess up your paragraph styles.)
See the Online Help: Add column, frame, and page breaks.
With a paragraph style: change the style's Keep Options, "Start Paragraph" from "On Next Odd Page" or "On Next Even Page" to plain "On Next Page".
See the Online Help: Control paragraph breaks using Keep Options
Manually through Keep Options: go manually through each of your chapters and adjust the Keep Options of the first paragraph.
While you are doing that, ponder upon the positive points of using styles. For that, see the Online Help: Paragraph and character styles.
With multiple documents in a Book: in the flyout menu of the Book Panel, go to "Book Page Numbering Options". Instead of "Continue on next odd page" or "Continue on next even page", choose "Continue from previous document". Make sure the checkbox to update existing page numbering is checked. If you previously added blank pages this way, you need to remove them manually after changing this setting -- InDesign does not automatically "remember" it added them earlier on.
See the Online Help: Number pages, chapters, and paragraphs in a book , subsection "Start numbering on an odd or even page".

Not leaving blank pages


Running Cucumber JS in Browser

Question: Is there a way to run CucumberJS in the browser. I mean, without nodejs? I am hoping to find a way similar to the Jasmine standalone. http://pivotal.github.io/jasmine/
Answer: Yes, you can. Please checkout this example HTML code for basic ideas.
Here's the steps on how to run the example with node runtime:
$ git clone https://github.com/cucumber/cucumber-js.git
$ cd cucumber-js/example
$ npm install
$ node server.js

Then open your browser and navigate to http://localhost:9797/, click the button Run feature. you should see the test result in green background.
Notice that the node is used to provide a web server to host all resources for your browser.
If you're interested in details, check out this blog post
Comment: I upvoted but think this answer could be more detailed.
Comment: @user254694 updated my answer. and more details can be found from my blog post.
Answer: I had, in the past, used the HTML example that @shawnzhu provided, but found the requirement to actually defined the features and steps in a script a disruption to my already current workflow of having features and steps (and support) in separate files.
As such, I create cucumberjs-browser CLI tool that bundles those files (using browserify) to be run in the browser using the browser-based CucumberJS library.
You can find the project here: https://github.com/bustardcelly/cucumberjs-browser
As well, I have a post about the available browser-based solutions: http://custardbelly.com/blog/blog-posts/2014/02/10/cucumberjs-tests-browser/index.html
Hope that helps.

Running Cucumber JS in Browser


Migrating All Product Images in Magento from PNGs to JPEGs

Question: As we have found our website is using PNG images and has page sizes ranging from 1 MB up to 2 MB sometimes, I did a comparison using small images.. and have found PNG size is 36 KB, while JPEGs with the same quality/size are just 6-7 KB. Since we have a lot products, is there an way to do such changes in bulk/automatically using a script or plugin?
Comment: yes, currently into png and we want to go with jpeg.
Answer: Magento handles resize of your images from and back to the format they were uploaded in. You can re-format your images in PHP using the GD library with the following function:
Reformat with PHP:
// Quality is a number between 0 (best compression) and 100 (best quality)
function png2jpg($originalFile, $outputFile, $quality) {
    $image = imagecreatefrompng($originalFile);
    imagejpeg($image, $outputFile, $quality);
    imagedestroy($image);
}

This function uses the imagecreatefrompng() and the imagejpeg() functions from the GD library.
Source: https://stackoverflow.com/questions/1201798/use-php-to-convert-png-to-jpg-with-compression
Reformat to JPG on disk via shell command:
You can do all on-disk at once, but it will require you to use something like Imagemagick
convert image.png image.jpg

The problem here is that you can't just go about changing the files and their extensions on your Magento install willy-nilly. You'll have to notify Magento of the change either by editing the entry directly in the db (don't do this) or re-uploading all of them.
Source: https://superuser.com/questions/71028/batch-converting-png-to-jpg-in-linux
Smush.it
Alternatively, use a webservice like Smush.it to optimize your PNGs for you. The Magento Wiki has a little command-line hack at the bottom of this image optimization post to give you some direction about getting a list of all of your images and you can paste that list directly into Smush.it.
I have a feeling that at 36kb apiece, your PNGs are not optimized, or you're not using Magento's built-in resize in your theme. You should be doing both.
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/resizing_images_en-masse_in_order_to_improve_page_load_times
Updating within Magento
So, you've done the above. Now you have to update Magento. Assuming that all image names remained the same, with the only difference being the suffix (file extension) being changed from ".png" to ".jpg" you can do the following in a standalone script, executed from the command line:
<?php

require('app/Mage.php');
Mage::app();

$collection = Mage::getModel('catalog/product')
    ->getCollection()
    ->addFieldToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
$backendModel = $collection->getResource()->getAttribute('media_gallery')->getBackend();

foreach ($collection as $product){
    $backendModel->afterLoad($product); // Load the media gallery images for the product
    foreach($product->getMediaGalleryImages() as $image){
        $image->setPath(str_ireplace('.png', '.jpg', $image->getPath()));
        $image->setUrl(str_ireplace('.png', '.jpg', $image->getUrl()));
        $image->setFile(str_ireplace('.png', '.jpg', $image->getFile()));
    }

    if($image->hasDataChanges()){
        $image->save();
    }
}

Execute with the following:
php update-image-names.php
I advise strongly not to do this on your live production server - do it offline in a maintenance window or on a staging box that you can migrate or promote the database changes into production.
There's a high chance that you could run out of PHP memory while running this if you have a large catalog - you may want to call an ini_set at the top to increase your memory_limit to something more substantial than the recommended 256MB.
Comment: I am not 100% sure, but I have the feeling OP asks how to update actual DB values of assigned images. Because converting PNGs to JPGs with reasonable quality is task that a Photoshop script will do better than PHP GD, but placing them in correct spot in Magento and updating database is the harder part. In my opinion
Comment: I know about ImageMagick convert tool, that is how I did comparsion of png to jpeg, but is here an way to get it automatically done ???? for example..

1. execute an sql request to get all product images inside db...
2. then convert image from png to jpeg... and update extension inside database... for that file, etc.. execute till all files will be processes, do you know which magento table store that data ?

Petar Dzhambazov = you exactly right...!
Comment: See updated answer. Thanks for the clarification - I thought this was a bit off-topic... trying to help out a first-timer here...
Comment: so...

1. I doing recursive search of product images... and conveting them with convert for example..
2. running php script which you mention in order to update filename extension inside db, right ?

please confirm, and thanks for that script :)
Comment: Yes, you've got it.
Comment: There is no  $image->save(); method. At least not in Magento 1.9 :/
Answer: You can process in the following way:

Collect all png images from Magento.
Mass convert them into jpeg.
Put all jpeg images in media/import folder.
reimport all products by replacing images extension.
Comment: Why is this voted down? This seems a much simpler way to me thanks to Magento's ability to resize everything according to view.xml configuration. Plus, as someone else mentioned, Photoshop can handle this just fine en masse.


Basement floor is damp and the top of my foundation is cracking after air sealing the attic?

Question: Two months after having my attic professionally air sealed and insulated, the basement floor became damp and the top of the foundation started to show signs of horizontal cracking.  Humidity levels in the living space are also high.  The house is a one story ranch with a brick veneer.  A gas hot water heater and dryer vent were also added to basement.
Comment: All the humidity that used to escape through the roof has been trapped inside, therefore, indoor humidity has gone up to the point where it's condensing on your cool basement floor. It's hard to tell from the wording of your question - does the dryer now vent _into_ the basement, or just through the basement wall somewhere? If it vents _into_ the basement, that **A)** seems like a bad idea in general, and **B)** will pump additional warm, moist air into the house, exacerbating the problem.
Comment: Why did you have your attic air sealed?
Comment: How long have you been in the house? This sounds like typical seasonal moisture to me, and I doubt the concrete cracks are related to the attic thing.
Comment: Dryer used to vent into the basement and it was dry down there then.  We lived in the house for two years with none of these issues.  After we converted to high efficiency gas furnace and ac and had the attic air sealed as recommended by s home energy audit, humidity in the home increased and the cracking foundation started.  The humidity is high in the house year round now.  Help anyone...
Comment: Related: [90% Humidity @ 23 Celsius direct from Air Conditioning Outlet](http://diy.stackexchange.com/questions/49630/90-humididty-23-celsius-direct-from-air-conditioning-outlet)
Answer: Horizontal cracking? That's odd, and I think that's unrelated to your moisture problem (even with a picture, I'm not sure I'd comment on that).
Well, you've air sealed your house, which means that now you have to actually pay attention to the V in HVAC: Ventilation. In a hermetically sealed house, I strongly suggest seeking a better filter system.
I'll take a wild guess that you lack a suitably sized fresh air intake for the furnace, as well as a make-up air inlet for the house (because most houses don't have either).
But you probably just need to look into buying a dehumidifier. Assuming that none of your power-vented equipment is over powering any of your gas-fired natural draft equipment, or that any other item like a fireplace is doing so (hopefully your CO detector will notify you of that).

Your A/C is over-sized or improperly charged. Have a tech come out to diagnose the unit. Hire whoever can explain the difference between superheat and subcooling to you, and what a wet-bulb temperature is.
And explain to them that, you need the A/C unit tweaked to run longer, whether it be from reducing the fan speed, or monkeying with the pressure to make it less efficient, with the goal being to drop out excess moisture from the air.
Central AC system not reducing the humidity in the air? –dslreports.com

a standard AC unit will drop out more humidity the longer it runs - if it is oversized you will be too cold before it has a chance to do the job - the too large coil will make the air cold too quickly and the unit will cut off before it has time to drop out the moisture. A slower fan speed would help some because it gives the air more time at the evaporator coil and will let the unit run longer

The thread goes on about relative vs. absolute humidity for a while...

Going back to the OP, if the AC is cooling down the house too quickly, then open up some window shades [or room doors] and give the house some heat to force the AC to run longer. This will give more time for the AC to pull moisture out of the air and lower the relative humidity. Having a proper moisture barrier is important though. Never open a window or turn on an exhaust fan. By doing so, you are pulling humidity into your home and as it hits your cool air, it will condense and feed mold.

However if it's not all that hot outside but it's really humid, "Agreed with others in that you are sort of in the 'screwed zone'."
Comment: Well hvac company adjusted airflow lower on unit.  Thanks for your answers.  Hope this helps the situation.  Now onto the foundation mystery
Comment: Does anyone use their A/C somehow as a dehumidifier, or is that less efficient than a little stand-up guy in the basement?
Comment: running a dehumidifier in the basement already.  You were correct on the lack of make up air inlet.  But wouldn't that just add more moisture to the house it is typically a humid climate here.  Spoke with an engineer who thought horizontal cracking at the top of foundation could be coming from either air being pulled thru what was small openings that have now opened up since the house can't pull in air thru the attic anymore after being sealed.  Can't I just remove the air sealing from the attic and return things to there original state.
Comment: @Miley - Well, I still don't know about your foundation, but I think your A/C isn't running right and you need someone who *really* knows what they're doing to take a look at it. Please see the edit.