Water spots inside brand new lens? Normal or reason to return?

Question: I bought a new lens, and discovered two stains/spots which look like water spots on the rear side (side which is plugged to the body). These stains are from the inside.
I have taken a couple of pictures but so far not discovered any problem. In some articles I read that a certain amount of dust comes ever with new lenses.
Is it normal to have such spots even in a brand new lens (original Fuji)? Or shall I rather request an exchange of the lens?
Comment: 1.No it is not normal to have water spots or any spots on a new lens 2.Return if it makes you feel uncomfortable and returns are easy.
Comment: It looks like a dried water droplet. I'll try to take a picture of it...
Comment: Could you take a picture of the spots on the lens and post it? Could you take a picture of the spots on the images(using the lens in question) and post it? Does the lens look like the one in this question: [Why does fungus form in lenses, and how to get rid of it?](http://photo.stackexchange.com/questions/14794/why-does-fungus-form-in-lenses-and-how-to-get-rid-of-it)
Answer: The water spots could be from anything. Suggestion would be to return the lens and exchange for one which does not have any defects.
All of the "water spots" I've seen on the rear lens elements of my lenses were from my own mistakes, where a tiny droplet of water (breath, mist, cleaning solution, etc) landed on the element and was left there unnoticed. Some of them can be cleaned with a wipe, but others cannot. Depends on the coating formulation and on what liquid came in contact with the lens.
Since you just bought it, return it for another lens that doesn't have the defect. Ask to open the box and check when you buy the lens. Bring your camera, etc.
Comment: @ChinmayKanchi - Yeah, I couldn't really tell if that is what he meant or not because he also said "look like water spots on the rear side". But yes if the spots are internal, don't disassemble the brand new lens!
Comment: That is a safe bet(returning). But really if it is just a single water drop, using a cloth that is safe on lens elements will be an easy fix taking all of 2 seconds. This is risking the assumption that the lens didn't actually take on water or have any other defects.
Comment: He says the stains are on the inside though. In that case, he'd have to disassemble the lens and will probably void his warranty while doing so.
Answer: Before cleaning I would document the appearance of the lens when you unpacked it from the box. The sooner you do that the better so that the seller or warranty department doesn't think the spots could have been caused in your course of using the lens.
If the spots are on the outside surface of the rear lens element I would try cleaning them off with a pec-pad moistened with lens cleaner and followed by a dry pec-pad. If there doesn't appear to be any chemical residue on the pad from cleaning the lens it was probably just condensation.
Going from a cold to a warm/moist environment will cause condensation to form on lens elements. If the rear cap wasn't on tight and the lens was shipped via air cargo this could very well be the source of the water spots. When the water evaporates the dust that was in the water is left as residue. If it looks like there was condensed moisture at other places inside the lens I would strongly consider returning it. Use a flashlight to inspect the interior of the lens by shining at an angle through the front of the lens and looking through the back of the lens. Then do the reverse. (You will see dust. All lenses have dust in them.)
This issue is one reason it is important to insulate your gear when moving from a cooler to warmer environment. Always pack your gear before moving to the warm environment and then give it enough time to warm slowly before opening your bag. It is also important to pay attention to the temperature and dew point when shooting in cooler weather.
Many years ago I shot a lunar eclipse on a warm, moist night. By the time I went inside the dew was practically dripping off my camera and lens. Since it was cooler and dryer in my house with the A/C running I figured it would be okay to just wipe them down and leave them out to dry. The camera (a film EOS) was fine. The lens (a consumer grade Sigma 70-300), on the other hand would no longer auto focus. The moisture had apparently damaged the focus motor.


Dependency injection in MVC

Question: I'm trying to create simple MVC skeleton and I'm stuck with dependencies.
This is what I have now:
<code>$config = new Config();
$database = new Database($config);
$uri = new Uri('article/5');
$request = new Request($uri);
$response = new Response;
$router = new Router;
$dispatcher = new Dispatcher($request, $response, $router);

$dispatcher->dispatch(); // Routing, instantiate controller, execute action, send response
</code>
The question is: how can any object get access to any dependency?
Some examples:

Controller may need Config to get output formatting options.
Mapper may need Database to perform queries.
Any Controller / Helper needs access to Log.
Helper may need any number of dependencies (ex.:Uri_Helper needs Router).

The only possibility I can think of is to use Registry, but this violates Law of Demeter (ask what you really need).
Answer: You write factories(excellen article). This could be totally boring(like the article mentions) so you could use a DI-framework like for example:

Symfony DIC: See Juraj's post.
PD
Yadif
Drip(PHP4): but hasn't been updated in a while.

Also I would like to point out that Misko's blog is very interesting and has a lot of good reads on how to do testing properly. Especially the guide to writing testable code is a must read.
P.S: I think you should be writing factories, because PHP is a scripting language and you should use as little code as possible to make your site fast. That's the problem with some PHP frameworks.
Rasmus Ledorf(PHP inventor) 's quote:

Many frameworks may look very
  appealing at first glance because they
  seem to reduce web application
  development to a couple of trivial
  steps leading to some code generation
  and often automatic schema detection,
  but these same shortcuts are likely to
  be your bottlenecks as well since they
  achieve this simplicity by sacrifizing
  flexibility and performance. Nothing
  is going to build your application for
  you, no matter what it promises. You
  are going to have to build it
  yourself. Instead of starting by
  fixing the mistakes in some foreign
  framework and refactoring all the
  things that don't apply to your
  environment spend your time building a
  lean and reusable pattern that fits
  your requirements directly. In the end
  I think you will find that your
  homegrown small framework has saved
  you time and aggravation and you end
  up with a better product.
Answer: You may use a dependency injection container like Symfony DIC. You define your objects, configuration and wiring inside the container, which than takes care of instantiation.

Dependency injection in MVC


Any way to use Android tethering over USB for Kali Linux WiFi hacking?

Question: Okay, let's try and make this short enough. I have a desktop PC that I use myself, and I have Kali on a USB flash drive. I am a hobbyist penetration tester, and I'd like to know; is there any way that I could possibly use aircrack-ng or other WiFi exploitation tools over Android tethering through my USB cable?
Answer: I don't see how.  If your network connection so far as your desktop knows comes from the USB cable (as a network interface), aircrack-ng will probably see it as an ethernet (or other non-wireless) interface.
Comment: Well, I was thinking the same thing, but I'm curious, isn't there maybe any plugin that works over USB debugging or ADB to communicate with the phone's WiFi adapter? (though that'd be very complicated)
Comment: You'd be better served just rooting the phone and using `aircrack-ng` on the wireless interface directly (presuming the package is available or the source compilable for your Android hardware).
Comment: Sure you could try to hack together some way to pass the radio interface capabilities and command set over the USB to Kali so you can run the utilities from Kali machine instead of on the android device. You could also hack the Microsoft Hyper-V code to run the hypervisor under Wine on Linux...but it's an awful lot of work for a one off solution that already has better alternatives available. https://www.kali.org/kali-linux-nethunter/ and https://forums.kali.org/showthread.php?31435-WiFi-adapter-for-Kali-Linux-on-a-Raspberry-Pi top the google list...


SQL Server 2008 R2 - Change distributor schedule

Question: We have configured SQL Server 2008 R2 replication. Distributor is configured in continuous mode, publisher is scheduler is set to execute after every six hours.
Now we want to change distributor schedule from continuous to schedule frequency without re-creating new replication.
We have tried below stored procedure, but it throws an error. Please help to distributor settings.
<code>EXEC sp_changepublication
@publication = 'your_publication_name',
@property = 'allow_anonymous',
@value = 'false'
GO

EXEC sp_changepublication
@publication = 'your_publication_name',
@property = 'immediate_sync',
@value = 'false'
</code>
Comment: Please include the error messages you received.
Answer: Right click distributor job and change its schedule.


Is it possible to make a user-specific gallery?

Question: I want to make a website where everyone makes their own private/public galleries so that when they log into the website with their own account, they can find their listed galleries.
If you have a plugin or a theme solution, please link that theme/plugin in your answer.
Answer: You could do this by adding custom fields to user profile pages, I would use Advanced Custom Fields and make a repeater field that shows on profile pages.
Also, this plugin or this one seem to do what your looking for.


Does anyone have a strategy for Call of Duty Black Ops Zombie mode?

Question: I realize there is no point to the zombie mode except to see how long you can last; but we play this game like crazy. I was wondering if anyone has any tips on how to last longer. We consistently last to round 10. once we get the power on we don't really know what to do from there. we run around and turn on traps but it doesn't seem like there's really anything else to do. what is the point of the transporter? and when you look at the map on the wall and the green light appears, what does that mean?
Comment: The strategy would be different for each map, which map are you talking about?
Answer: The transporter takes you (and your party if applicable) to a room with the PACK A PUNCH machine, which will upgrade any weapon you put into it into a new (usually better) version of that weapon. If memory serves properly it costs 5000 per weapon upgraded this way.
The green light on the map is where the 'Box' is. The 'Box' is an awesome little contraption where you feed it 950 points and it gives you a random weapon. The 'Box' has a craptton of weapons that you CANNOT OTHERWISE get from the walls. You always want to find and use the box until you get your weapon of choice, and since your rather new (level 10 ain't nuthin, talk to some people who get to the upper 70s), I wont spoil some of the AWESOME weapons the box can give you, I'll just say keep using it and eventually you will be pleasantly surprised.
As for lasting longer most people use either a 'red' or 'blue' route. Which is to say, they only open one half of the available areas and run in a big circle around the compound.

That pic should help you understand what I mean. Generally one stands on the stage until the waves start coming, makes their way from the stage to the starting room, then either up the stairs or out to the alleyway. Only stop to shoot your pursuers in the starting room as they all crowd around the 'island' right outside the door to the auditorium, as thats arguably the best choke point in the level. If you have friends a good idea is to designate 2 of you to watch for oncoming zombies while the other 2 mow down your pursuers. Make sure you reguarly trade off jobs so everyone gets points for the Pack a Punch. If you need more thoughts or ideas or tips feel free to drop a comment or if applicable a whole new question if you need a different topic answered.
Edit:  I totally forgot about the soda's. After you turn the power on you can purchase 4 different sodas from machines scattered about the map, and these sodas give you perks when purchased. They are marked on the map with < P >. Of all of these JUGGERNOG is probably the most important and a MUST HAVE once the power is turned on. It costs 2500 I think, (its been awhile since I specifically played black ops zombies), and severely increases the amount of punishment you can take before the zombies take you down, allowing for the occasional mistake as you run.
The other perks gained from the sodas are also usefull but not as usefull as JUGGERNOG.
Note: When playing solo, the quick revive perk which is available in the starting room, is always active, even with the power off. And unlike the multiplayer version which makes it so you can revive your friends faster, in solo mode it makes it so you can revive yourself when you go down, however you can only buy it 3 times in any given solo game.


Data at Rest vs Data in Storage

Question: I have a question about regulatory compliance. If I am required to have data at rest secured (encrypted), what are they looking for? Should my database files be encrypted, or is data at rest referring to my actual disk drives being fully encrypted? Or maybe both?
Answer: You might want to ask your company lawyer to help define what that means in your specific circumstances.
As for the usual definition of the term "data at rest": It means "stored data which isn't currently being accessed". So, for example, data at rest would be data sitting on a server's hard drives while the server is turned off, or data on backup tapes, or data sitting in a file that isn't opened by any of the running processes on a system, and so on.
So I'd say that what you need to do is encrypt all the data that falls under the requirement to be secured when it is at rest. Depending on what your data is, it might be enough to just encrypt the contents of a database before you store them in the database, or you might need to encrypt the file system the database sits on.
Edit: If you just encrypted the file system, but not the application data itself, you'd also need to make sure that backups of your application data, which also constitute data at rest, are encrypted, and so on.
For example, if you only encrypt text fields in a relational database, that might not be enough, because the relations between records would still be accessible. If you only encrypted your filesystem and then took a backup of the data while the filesystem was mounted and the plaintext data accessible, you'd then also need to encrypt the backup.
Like I said, do have legal counsel define it; your circumstances might vary, and security.stackexchange.com isn't law.stackexchange.com.
Answer: Having data at rest secured can refer to both confidentiality and integrity. Encryption can be an answer to the former but not to the latter.
That's the reason why best practices recommend to have offline archives of sensitive data in a different center that the one where the data is normally used. That way, in case of a major disaster (earthquake, bombs, hacking), the data can be restored from the offline copies.
Comment: A very good point to add integrity; I didn't think of that. But isn't your answer more about availability instead (which I also forgot, and which is also very important?) Wouldn't integrity also consist of detecting modifications and data corruptions?

Data at Rest vs Data in Storage


How is the work done along an equipotential line zero?

Question: If a charge is brought from some distance to a point which lies on the equatorial line of an electric dipole, the work done is 0 and so is the electric potential. But how should I imagine this?
Comment: You should imagine it as a symmetry plane where (+) and (-) cancel, leaving you to roam freely.
Answer: There are several ways to think about this. Maybe you find the case of gravity more intuitive.
In that case, we can imagine the dipole as a hill (positive charge) and a valley (negative charge) lying next to each other. Now, if you climb the hill, you will gain potential energy. If you go down to the valley, you would lose potential energy.
However, if there are no cliffs (discontinuities), there must exist a path in which you don't have to move either upwards or downwards (the mean value theorem). This is the equatorial line. If you are on this path, you have not gained or lost any potential energy. Hence, you spent a net zero amount of work.
See this image for an example of such a path.
Comment: Thank you, it helped but can u please share a link or an image to visualize this. So that I can view that line or area where there are no ups or downs in curve
Comment: But when the charge is at equatorial line, it is in electric field which is in opposite direction of dipole then how can it stay or roam freely.
Comment: You are correct. There is an electric field perpendicular to the equipotential line. It will act with a force on the charge and it can not "stay" or "roam freely" in any direction. However, if the charge moves along the line, then this does not require any work. In such a case, the displacement is perpendicular to the force.
Comment: But in that case the charge will not reach that point where I want it to be, I have to apply a variable force opposite to the direction of field.


How do Philosophy students deal with archaic and old English in Philosophy books?

Question: I am from India and English is my third language. When I tried to get into Philosophy, the first book I picked up was Meditations by Marcus Aurelius. Even though I liked the book, the archaic grammar and vocabulary of the book started to get on me. Philosophy is already hard and to make it worse, it is translated mostly by authors of 19th or 20th century which makes it hard to read and understand. I am an intermediate English reader, but reading old English is very difficult for me. How do you guys deal with it?
Comment: with more experience of reading and parsing philosophy and EL literature (rather than the EL itself) i have found it much easier to simply google unusual words and plug their definition into the phrase etc.. i find this with poetry also, and it is partly confidence etc., and partly fluency with the form, rather than the EL itself (i'm a native speaker). hth
Answer: Philosophy is an endeavor that ranges across time and space, and as you have noted language. On the downside, using complex or more archaic English can be bothersome for the student of philosophy. Some writers like Searle are rather clear and seem to value the advice of Strunk and White. Other writers like to embellish. On the upside, take heart there's an English translation so you don't have to read it in the original tongue of Marcus Aurelius, Latin!

Part of your strategy has to be to take it on the chin. There's a certain requirement that reading philosophy in any language means dealing with very literate people and translations and you're going to have to learn the literary constructions. There's no getting around that. You can use English SE if you have questions. I consider myself quite literate, and there are questions that come across the site that I routinely learn from. If your questions are simpler, there's also English Language Learner SE.

Find more contemporary translations. For some works, and I'd be surprised if this wasn't the case for an author like Marcus Aurelius, you can find more contemporary versions, sometimes with annotations. Your go-to is to use books.google.com in order to find contemporary works. For instance, try this search, and the first book on the list is Meditations: A New Translation (2002).

Find a literate native speaker to ask questions! This forum, for instance, has a site chat.stackexchange.com. I for one have never declined a conversation regarding philosophy or language here. Many people just like to skim, but some of the denizens of our forum are looking for more active dialogue. Feel free to hit me up! There are other fora, of course.


Do any cryptography algorithms work on numbers besides primes?

Question: I know prime numbers are important for several algorithms and protocols. Are there any algorithms and protocols that don't require primes?
Comment: Yes, very large primes, and I know my question is quite broad. I guess this is equivalent to asking if there are other very hard one-way math functions besides those based on primes. that don't rely on the fact that composites of two large primes are easy to create but hard to factor. And why am I asking? I'm writing a story about a mathematician who finds an easy way to factor **some** numbers, so people want to switch to other cryptographic algorithms. Being a conscientious writer, I want to get the facts right. Thanks.
Comment: Can we assume you mean asymmetric primitives here? Most block ciphers and hash functions don't require primes. But I guess that most post-quantum asymmetric primitives also don't use primes (for security anyway - the number two is also a prime).
Comment: Yes, Maarten, I mean asymmetric primitives as well as symmetric ones. Thanks.
Comment: OK, that's a *very* broad question. Do you mean if they rely on primes for security - i.e. large primes? Any particular reason why you are asking this?
Comment: Could you integrate the information in this comment into the question?
Answer:
Yes, very large primes, and I know my question is quite broad. I guess this is equivalent to asking if there are other very hard one-way math functions besides those based on primes. that don't rely on the fact that composites of two large primes are easy to create but hard to factor.

I don't think you should call them one way math functions. If RSA was one way then it wouldn't be possible to create RSA (only) encryption. More information here. RSA relies on a trapdoor function and traveling back without "a stair" is expected to be a hard problem. ECC also relies on primes to be secure, so it would also be affected.
Factoring and the RSA trapdoor function is already threatened by quantum cryptography. So generally you can simply look at post-quantum cryptography. So yes, there are problems that don't rely on primes for their security. Lattice based crypto is one of the most promising theories. Within this problem space a promising algorithm seems to be Ring-LWE. This is an algorithm based on the idea that . You can read a story about lattice based crypto here; as a writer you'll love the way it is written. So with regards to scientific research the impact would probably be minimal. A host of new students should be thought harder to learn primitives, but otherwise we already have replacement algorithms and protocols.
Being able to factor numbers won't affect most common symmetric primitives. So stream ciphers, block ciphers and hash functions would not be affected. Neither would any algorithms build from those such as message authentication codes (MAC), deterministic random bit generators and the like.
So what would be affected? Basically signature schemes used for authentication and non-repudiation. Asymmetric encryption (including hybrid encryption) and key agreement would be affected as well. That means that without RSA and ECC the whole PKI infrastructure would break down until an alternative such as lattice based crypto could be introduced.
So impact on the security landscape would be huge. Smart cards contain keys build on RSA and ECC. In general many quantum resistant algorithms have large memory requirements as well, so it may not be a simple task of replacing cards with new cards. SSL/TLS uses PKI for authentication, so the whole PKI eco-system would have to be renewed. A lot of hardware security modules (HSM's, devices used by e.g. banks and certificate authorities used to keep their keys secure) do not have any asymmetric primitives other than RSA or ECC. Embedded systems would need to be upgraded.
Basically if you currently would introduce an algorithm that would allow us to factor some numbers, the effect would be that the large institutions would try and migrate to other numbers still thought to be secure. There would certainly be a panic and a lot of speculation if those numbers would actually be secure. It would probably take some 3-5 years before we could completely migrate away from our current infrastructure to something that would not rely on prime numbers. The reluctance to move away from SHA-1 should be considered a strong warning about the resistance to change by the security industry.
This is one reason why NIST is already moving away from ECC crypto, even though quantum computing is still in its infancy.

Anyway, enough information to write a story about, although that story would be more a story about mayhem in the security world than a story about some genius coming up with a new algorithm to try and avoid it. That's what I would speculate to happen anyway.
Comment: The story is partially about the cybersecurity mayhem that ensues planet wide when people discover some numbers are vulnerable. Thank you!
Comment: @RichS Mind you, it takes a lot of work to create actual mayhem. Security companies would be in trouble. But if I order something from a web shop from my home computer I've got little to worry about. To be a man-in-the-middle you first need to be *in the middle*. That shouldn't stop a good novel though :)
Answer: Most symmetric encryption algorithms do not rely on primes, take a look at AES as an example, it relies on confusion, diffusion and substitution.
Further data is usually encrypted with symmetric encryption. Asymmetric encryption is mainly used to encrypt symmetric encryption keys. HTTPS (TLS) is an example of this usage.
Answer: Shamir secret sharing scheme is one of the examples.
Comment: Nit: Shamir secret sharing is based on a field, which always has a prime characteristic...
Answer: Bitcoin blockchain cryptography algorithm is based on hash function. Finding next coin/block in block chain is equivalent to finding next payload resulting in hash having sufficient amount of leading zeros (adjusting difficult y is based on adjusting value of amount of zeros)
Comment: That's interesting to know, but how does that relate to prime number cryptography? Are you saying the BitCoin block chains use prime numbers?
Comment: The question I read is "Are there any algorithms and protocols that don't require primes?". IMHO bitcoin blockchain can be considered both: algorithm and protocol, and as I presented, does not require primes, not even use them ;).


Which proton is more acidic in this compound?

Question: I'm having trouble determining which of these protons is more acidic. I was thinking the solution had something to do with the double bond in the aromatic ring, but I'm still not sure.
Comment: This should be a $C_2$ symmetric molecule, making the $\ce{N-H}$ protons equivalent. Generally, they are more acidic than $\ce{C-H}$ protons.
Comment: Well, I think the OP had a confusion regarding the difference in acidity of the the 2 $\ce{N}$-bonded protons (that explains asking 'more' and not 'most'), and the difference in number of double bonds in each ring is what troubles him, i.e. he feels the '2' double bonds in the right ring(as in figure) of naphthalene can create a difference with the '3' in other.
Answer: You could start by drawing the resonance structure of the naphthalene ring, this gives a compound in which the conditions on the two nitrogen atoms are interchanged, thus both nitrogen atoms are equivalent. As $\ce{N-H}$ bonded protons are more acidic than $\ce{C=C-H}$ protons and $\ce{N-C-H}$ protons, the answer must be the hydrogen atom bonded to the nitrogen atom, as both nitrogen atoms are equivalent, either of the hydrogen atoms is a valid answer (as they are equivalent).


In which file should I write db_add_field function

Question: I am writing a module for which I have to add a field to my database. So I need to use  db_add_filed function, So in which file I should use this function? I mean should it be in .module file or .inc file?
Answer: I think you should write your code for adding new field in DB in your .module file.
Here is the code for you :
<code>function xyz_schema_alter(&$schema) {
  // Add field to existing schema.
  $schema['node']['fields']['show_in_inbox'] = array(
    'type' => 'int',
    'length' => '4',
    'default' => '1',
    'not null' => TRUE,
    'unsigned' => TRUE,
    'description' => 'Field added by xyz module',
  );
}

function xyz_enable(){
    if (!db_field_exists('node', 'show_in_inbox')) {
        $schema = drupal_get_schema('node');
        db_add_field('node', 'show_in_inbox', $schema['fields']['show_in_inbox']);
    }
}
</code>
The new field will be added in your existing database on enabling this module.
Comment: Thank you so much Astha chauhan, I added my filed to comment table, do you know which schema should I use now to show my new added filed in comment form page?
Answer: If the field is static, I should think you want to create any db tables as part of the install (https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_install/7). Just don't forget to remove it as part of an uninstall.
If it's being created dynamically, then the point at which it needs to be created should dictate where and when to place the code.


Can you export deck composition to a text format?

Question: Is it possible to export you card collection and deck composition into text format?
Comment: There doesn't appear to be a way to do this.  I'm going to do a bit of reverse-engineering and packet sniffing on this.  Maybe I can write a tool to pull this info from their system.  I am, however, doubtful that I'll be able to do this without doing something that may break the TOS.
Comment: Further comment... it looks like much of scrolls is built on top of IRC.  I didn't discover this by the aforementioned packet-sniffing but by other research into scrolls.  Later, when I get the chance, I'll see if I can tap into an IRC channel and make some calls to a system bot and see if it can return this data in an easily consumable manner.
Comment: Do you mean that there is nothing saved locally on the PC but it is all retrieved from their servers?
Comment: Drake: There is some binary data that I was able to find on the windows and mac variations that is stored in user folders.  I haven't compared the two sets of files yet, but it doesn't look like this information is dynamic.  It's more a bunch of static information to the user's experience or, one-time loaded data that is specific to your user account.
Answer: I'll update my response when we get additional information that's a bit more official.
In the mean time, according to the Scrolls Guide pseudo-official Scrolls Blog there is a mod update in the works for "a few weeks from now", which will hopefully translate into mid-July update.
From the very coy blog post, it looks like there will be a deck importation feature, as well as a previous match summary report.  Hopefully if there is a deck importer, there is a deck exporter.
Knowing Mojang's track record and general friendliness to the external dev community, I'd reasonably speculate that if an export function exists, it will be in a text-readable format and will most likely be XML.
UPDATE
Summoner, the unofficial mod-loader from Scrolls Guide is out.  (Get it here.)  This mod allows for the import and export of deck information and is available for Windows and OS X.


How do I import registry settings using TeamCity?

Question: I'm having trouble importing settings from a .reg file using TeamCity. The app in question has a lot of registry settings which change fairly regulary so it is vital to have it as a build step.
I'm using the following command:
regedit /s "C:\app\params\epm\epm_tlp\trunk\csr_vsm_tlp_exl.reg"

The path is fine (I checked several times). When I run this command manually, it works. However, when run from TeamCity, it doesn't seem to do anything. Here's the log:
[16:01:13]: Checking for changes
[16:01:16]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[16:01:16]: Checkout directory: C:\app
[16:01:16]: Updating sources: server side checkout... (1s)
[16:01:16]: [Updating sources: server side checkout...] Building incremental patch for VCS root: NEP-content
[16:01:18]: [Updating sources: server side checkout...] Repository sources transferred
[16:01:18]: Step 1/2
[16:01:18]: [Step 1/2] Using runner: simpleRunner
[16:01:18]: [Step 1/2] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script1107617910631593889.cmd
[16:01:18]: [Step 1/2] in directory: C:\app\params\epm\epm_tlp\trunk
[16:01:18]: [Step 1/2] C:\app\params\epm\epm_tlp\trunk>regedit /s "C:\app\params\epm\epm_tlp\trunk\csr_vsm_tlp_exl.reg"
[16:01:18]: [Step 1/2] Process exited with code 0
[16:01:18]: Step 2/2
[16:01:18]: [Step 2/2] Using runner: simpleRunner
[16:01:18]: [Step 2/2] Starting: c:\app\exe\startup.exe
[16:01:18]: [Step 2/2] in directory: C:\app\exe
[16:01:18]: [Step 2/2] Process exited with code -1073741515
[16:01:18]: [Step 2/2] Step failed
[16:01:18]: Publishing artifacts
[16:01:18]: [Publishing artifacts] Paths to publish: [teamcity-info.xml]
[16:01:18]: [Publishing artifacts] Sending files
[16:01:18]: Build finished

This is the first time I'm trying out TeamCity, so I have no idea where to start looking for trouble, why would this command fail? Could there be any security causes? Are TeamCity runners running as another user?
Comment: Have you tried 'REG.EXE IMPORT' instead? Since it's a console application, it might output a useful error message.
Comment: @RogerLipscombe: I did not try that, no. Currently I don't have the time to "play" with TC again, but when I do I'll try and let you know. Thanks!
Answer: Most likely, you have TeamCity build agent running as a Windows service. Please make sure this windows service is run under windows account, which has sufficient privileges.
Comment: I have actually thought of this this morning, so I've checked it out. I've switched it from running as a system account to the administrator account and it didn't help :-/ One thing I don't understand is regedit exiting with code 0...shouldn't it fail?
Comment: Just to double check - did you change the user for TeamCity build agent service (and not TeamCity server service?)


Preimage of continuous one-to-one function on connected domain is not continuous.

Question: I know that given $B$, a compact subset of $\mathbb{R}^n$, and $f : B \to \mathbb{R}^m$, a continuous injective (one-to-one) function, $f^{-1}$ is continuous on $f(B)$. (This true).
I also know that image $f(X)$ of a connected subset $X$ is connected under a continuous function.
Now let $X$ be a connected (non-compact) subset of $\mathbb{R}^n$, and $f : X \to \mathbb{R}^m$ be a continuous injective (one-to-one) function.
I am trying (and struggling) to provide a counterexample in which mapping $f^{-1} : f(X) \mapsto X$ is not continuous on $f(X)$. (A rigorous, parametrized example).
Thank you in advance!
Answer: How about this one:
$f:[0,2\pi)\to S^1\subset \mathbb{R}^2$ such that $f(x)=(\mathrm{cos}(x),\mathrm{sin}(x))$


Equivalent resistance of this circuit

Question: The circuit below has a equivalent resistance but I couldn't find it, I found it interesting because it seems a trciky configuration, how would you solve it? The equivalent resistance gotta be $R$, (I know it because I used a simulator).
Answer: Hint:
This following circuit can be thought of as Wheatstone bridge, in which the middlemost resistor has no current flowing akin to your $2R$, in the question.
Comment: Thank you! I see your point, I didn't realise this was alike a Wheatstone bridge.
Answer: This one does look tricky at first glance. However, you can use the symmetry of the circuit to come to a conclusion.
Because the outer paths (going through the top and right; and through the bottom and left resistors, respectively), are completely equivalent, the current through these two paths must be the same. But then the voltage drop across the top $R$ and the leftmost $R$ are also identical, meaning there is no potential difference across the central resistor with $2R$.
So this is like the two outermost paths connected in parallel, giving
$$\frac{1}{R_\text{total}} = \frac{1}{2R} + \frac{1}{2R} = \frac{1}{R}\\
R_\text{total} = R$$
Comment: Well, I see. thank you. It's difficult to me realising if a resistor has current or not. I guess I have to practice more
Comment: Shouldn't $R_{eq} = (R+R) \| (2R) \| (R+R) = \frac{2R}{3}$, since both $R$ pairs are connected in series, and both are connected in parallel to $2R$?
Comment: From symmetry there is no current across $2R$, so we might as well treat that as an open line. They are also not both in parallel with the $2R$, the current through $2R$ would have to pass through one of the $R$ on either side.

Equivalent resistance of this circuit


Documents automatically checked in

Question: I have a records center with 3 document libraries. Each library has "Require Check Out" set to "Yes" and Versioning to create major versions. I also have Workflows on each library (variants of a content approval-like workflow). The Workflows should kick off when a document is edited/changed. However, when I upload a document it automatically uploads the document in a 'checked-in' state which autofires the Workflows as well. I seem to be having the opposite effect of what should be happening with the above mentioned settings I have enabled. How do I get an upload to remain 'checked-out' until the user checks the document in?
Answer: I think the solution is quite simple. Check the document's version in the workflow, and do not execute the approval process if it is 1.0.
Comment: That's a great idea and I will apply that to the workflow. But if it uploads in a checked in state then everyone can see the document immediately. Would i have to also enable content approval required and work modifying that status in the workflow as well?
Comment: You can enable minor version and then configure the library to display only the published versions to users who have only "read" permissions.
Answer: Usually the content approval workflow fires when a major version of the file is published. In your case , it seems you have enabled versioning to create major versions only. This will create a new version every time you upload or make changes to documents. Try enable versioning with minor versions in the document library.

Documents automatically checked in


Where is the sender name for iMessages set? I need to change it on an iPhone 4 (iOS 5)

Question: The sender id as it displays on the recipients iMessage is what I would like to reset. However, I cannot find where it is set on the sending device (iPhone 4). It seems to be device dependent as sending iMessages from my iPad 2 displays a different sender name although both devices use the same Appleid.
Answer: I hope I understood your question correctly. Try this: go to settings>>messages>>caller id. Choose the email address that is associated with the name you want the recipients to see
Comment: Yep. If you set it to the Apple ID (or associated email address) you want to use, that'll be the "from" in every iMessage you send, and before long your iMessageable friends will be automatically configured to reply to that rather than to your phone number.
Comment: I have an old IPhone and when I go into Settings>messages> it does not show CallerID
but show preview or repeat alert or MMS Messaging or show subject field (they are all On and Off buttons Where do I go now?
Answer: I'm pretty sure that it's set in the contact for that person's AppleID/Email Address. Take a look in that persons info in Contacts.app.
Comment: I may not be asking my question clearly.  I am trying to modify the name the message recipient sees when I send them an iMessage.  If I send someone an imessage from my iPhone, the recipient sees it as coming from DANI.  If I send the same person an iMessage from my iPad 2, they see it as being sent by Bill.
Comment: @Bill I'm going to assume it's the same iCloud account. In that case, it's probably buried in the iCloud account settings. (same as your Appstore)
Comment: Hmmm.  Yes, same iCloud account.  I upgraded both devices to ios5 within an hour of each each other but never specified any names for the devices.  They have to be buried somewhere in the device but I can't figure out where.
Comment: Have you looked into the other person's phone? Maybe he has your email saved as both Bill et Dani.


Bay window removal

Question: We are considering removing our bay windows to create a larger kitchen in the adjacent sunroom (we do plan to add insulation throughout the floor, walls, and roof). Through some online research, we are seeing most bay windows are constructed with an overhead beam spanning the entire width of the bay window, rather than including any studs between the individual bays. Is that standard construction or is there a possibility of load bearing studs between the bays? We plan to fill in the door with standard framing so if the end king stud is in fact located between the door and bay window, that will remain.
Answer: The "overhead beam spanning the entire width of the bay window" is called a "header" and yes, you'll have one over the window bay opening, over the door opening and over every other window and door in the house.
It looks like the floor is cantilevered out to fill the bay and that there's no ledge underneath the windows. In that case, yes, there will also be some load bearing studs between the individual windows in the bay. They'll be carrying the (relatively small) load of whatever kind of roof there is over the top of the bay down to either the foundation/footing under the bay, or to the floor joists that cantilever over the foundation to support the bottom of the bay.
AIUI, you're looking to make the bay a large opening into an existing sun room on the other side of the glass. My assumption is that this sun room was an earlier addition to the house because one doesn't normally have a bay window on an interior wall. Even with those assumptions, the statements above still stand, because this is how the house would have been build prior to the sun room addition.
TL;DR:
Yes, this is standard construction, and yes, it's likely that there are some sort of load bearing studs between the windows, but they can, most likely be removed.
NOTE:
Your best bet when modifying load bearing walls in an existing structure is to get your plan reviewed by a licensed Structural Engineer. It might be required by your locale to get a building permit (though this would probably fall under "renovation" and may not need a permit). Your insurance company would probably love you if you don't get your plans reviewed, because they could use that as an excuse to deny a claim should something ever go wrong.
Answer: Your pic shows what is obviously a header spanning over the door to the left and continuing over the bay windows.
The bay would be on an outside wall so that the header would be supporting the roof or floor above (the major load).
Since you want to remove the bay windows, do an exploratory removal of the drywall over the center window.  That opening will tell you if there is any other structural support, or if there is just the normal framing for the windows. (most likely).  You will probably find some studs tied into floor joists or roof rafter tails, depending on whether you have a second story above the bay.
Most likely the windows can be removed. Bay window framing does not have good loadbearing properties for much anything other that a light load such as some plywood and shingles over the bay.

Bay window removal


Set that contains all its accumulation points is closed

Question: I am taking a course in complex analysis and have an exam next week. I am trying to solve some past exam questions. One question asks to prove that a set that contains all its accumulation points is closed. I know from studying topology course that this is true because this is kind of the definition of a closed set but I am not sure how to prove this in the context of complex analysis. All that we have learnt about closed and open sets is that a set of the sort $|z-1|<1$ is open while the set $|z-1|\leq1$ is closed. How to prove that set that contains all its accumulation points is closed in the context of complex analysis.
Answer: Let $S$ be the given set. Suppose $S$ is not closed. Then $S^c$ is not open. Hence there exists $z \in S^c$ such that $B(z,\dfrac{1}{n}) \cap S \ne \phi$. Let $z_n \in \left(B(z,\dfrac{1}{n}) \right) \cap S$. Then $z_n \to z$ and $z_n \in S$. By the assumption, $z$ must be in $S$. But this cannot happen since $z$ was chosen from $S^c$. This is a contradiction. Hence $S$ is closed.
Answer: You can show that the complement of such a set $S$ is open. Suppose the complement $U$of $S$ is not open, there exists $u\in U$ such that for every integer $n>0,
\{|z-u|<1/n\}\cap S$ is not empty. Let $u_n$ in $\{|z-u|<1/n\}\cap S$, $lim_nu_n=u$ and $u$ not in $S$ contradiction.


Area calculations returning negative values

Question: I have created a shapefile with some polygons and am now trying to calculate the area of these polygons. The original CRS was WGS84, I have reprojected it to WGS 84 / World Mercator so unit is metres. On-the-fly projection is on. If I'm now using the field calculator to calculate the area of the polygons using $area, I first get some really weird values in my output column (far too high) and if I click 'save' or end the toggle mode, the values change to negative values which are the same for all polygons.
Switching to another CRS and reprojecting the file again e.g. to GDA94/MGA55 EPSG:28355 and calculating the area creates again funny values, some of them negative.
Where is the problem?
Answer: If the values are first very big and then negative, you are most likely running into an integer overflow problem. Are the polygons very big in reality? Maybe you shouldn't calculate square meters but at least kilometers.

Load the orginal file in WGS84, don't change anything
Save as ... with a target CRS in meters (e.g. UTM depending on your area of interest)
Load the new file and then calculate the area:

for km²:     $area / 1000000
for ha:     $area / 10000
On-the-fly reprojection is not needed for this task.
Answer: If you are getting negative values in area, I will recommend you to first clean your shapefile. Reproject your shapefile in equal area projection and then use calculator $area function to get area.
Answer: A suggestion:  I too have had GPS'd polygons return negative area values before.  I finally figured out why.  When I zoomed in really close to a cluster of odd dangles, I found that a few vertices were overlapping themselves, creating the negative value.  If you delete the odd nodes, then it becomes a whole polygon and should have a positive value for the area calculation.
Answer: I have this problem when I'm using topological editing on a shapefile or spatialite layer and on the fly (OTF) reprojection is enabled. The 'avoid intersections' function does not work consistently and some polygons' nodes are unselectable (though the polygon can still be selected and deleted). This also affects the 'Save As...' function: some polygons are not exported. These problem polygons are not necessarily identified with the 'Check Geometry Validity..." tool.
Disabling OTF and recalculating the area solves the problem on my machine.
Try that with both of your reprojections.
I am using QGIS 2.10.1 on Debian 8.1.


Garage door opener installation - hardwired vs. outlet power?

Question: I'm installing an opener for my garage door, and need to run some new wiring in order to get power to the unit. The unit can be hardwired or plugged into an outlet. I'm leaning toward the outlet option for now since it seems more versatile. Is this simply a matter of personal preference, or are there compelling reasons for choosing one option over the other?
Comment: Make sure to NOT wire it to a light switch, like someone in the past did to the house we currently own :-/
Answer: Personally, I'd prefer my garage door opener to be outlet powered so that I can unplug the thing when I need to do something with it, instead of going to find a breaker. Other than ease of disabling, I don't think there is any compelling operational reason to do one or the other.
Of course, if your next opener can't be hardwired, that might be a reason to not hardwire this one (the outlet will already be in the right spot next time).
Comment: I added an outlet to the ceiling right above the garage door opener; the extra plug for an extension cord has come in handy more than once also.
Comment: I had similar thoughts, though admittedly I didn't consider the next opener. I'll cross that bridge when I come to it! Thanks for the insight.
Answer: In some countries (Sweden for one) it's illegal to hardwire electrics unless you're an authorized electrician.
So, outlets are simpler & safer to work with.
Hardwiring looks better, OTOH, and can't be tampered with as easily. :)
Comment: Still doesn't help if there is no outlet to begin with :)
Comment: Interesting note about Sweden, I learned something new today :). I agree that hardwired might look better, but I think the versatility of an outlet is going to win out for me. Thanks for your input though!
Comment: @gregmac: True. ;) In that case you'd need an electrician to connect the outlet somewhere. I believe you can do most of the wiring & installation yourself, just not connect it to the mains fuse box.
Answer: Check your local code--it may be illegal to have a permanently-installed device plugged into an outlet.
I don't understand the reasoning behind this but it's true of, e.g., installed lighting in some municipalities.
Comment: The original reason probably has to do with idiots running extension cords behind walls and other foolishness. The house next to the one I grew up in burned down (losing one child) due to previous owners having 'finished' the basement and running extension cords behind the paneling instead of wiring it properly. I'd definitely check the codes, but my guess is that in situations where the outlet is appropriate (as in, right next to the garage door opener), then it's probably allowed.
Comment: @ArtOfWarfare - because extension cords are seldom rated for normal outlet loads (in the US at least, outlets are mostly rated for 15 amps, and electrical cords seldom are up to handling those loads), and generally aren't constructed in such a way that you can leave them in place permanently (among other issues, their flexibility may mean that they move or rub on things behind the wall as the house shifts and things vibrate). Basically, they aren't designed for it, and the failure modes can be tragic.
Comment: @MichaelKohne - I don't understand... why would running extension cords behind the wall cause any problems that hard wiring wouldn't?
Answer: All garage receptacles are now required to be GFCI protected (NEC 2005 was the last year where there was an exception for outlets not readily accessible).  If for any reason the GFCI is kicked then you may not be able to access your garage.
Comment: It sounds like your recommendation is to hard wire the opener into a junction box.  If so, it's worth saying that in your answer to make it clearer.
Comment: @NiallC. - I agree this answer needs to be more clear - I'd never heard the acronym GFCI before. GFCI (Ground Fault Circuit Interrupter) protected means that power should be cut if it's detected that more current is leaving than returning through the source (IE, because it's running through a person and into the ground). I don't think they were suggesting that you should hardwire, though... really, this doesn't seem to be an answer at all to me. It's just a tangentially related BTW.


Does this result for inverses of linear transformation holds for infinite dimensional case.

Question: Q.If V is an arbitrary vector space over $F$ and if $T$ belongs $Hom(V,V)$ is right-invertible with a unique right inverse, prove that its invertible. This was question asked in Topics in Algebra by I.N. Herstein.
I was able to prove this result by using the argument by contradiction, let us assume $T$ is not invertible and So there exist a $S\not=0$ such that $ST=TS=0$ and let $S_1$ is unique right inverse, now $ S_1TS=IS=S=0$, which is a contradiction. I had question if the vector space is not finite dimensional does the statement holds true? If yes, does my argument above holds.
Answer: In general the statement is not true. The problem is that $S_1T$ is the identity on the image of $T$ which could be smaller than $V$. Think for example in the space of polynomial ring the multiplication by $x$ which is linear and has an inverse in the image (i.e. divide by $x$ by shifting all the coefficient) but clearly is not invertible on the all space (a polynomial of degree zero has not pre image)
Comment: This provide some light, but could uniqueness of right inverse have some effect on the statement in infinite dimensional case?


Image Slideshow with audio

Question: I have a requirement that I want to play an audio  file and meanwhile I should get slideshow of images stored in array.
Can any one suggest me the way to do this?
Thanks in Advance,
Tejaswi Marakini
Answer: you could have a class called Slide that extends view, inside the Slide class could be the drawable image and the playable audiofile. Then in your main class you could change the slides and put in a delay or whatnot.

Image Slideshow with audio


How to avoid a build and deployment of dependencies which have no code changes

Question: I'm doing a proof of concept on continuous integration and whether our development team will benefit from automated builds and automated deployments to reduce human error.
I've already come quite far in the process but have some questions on how to configure our incremental builds to avoid rebuilding of dependencies that had no code changes.
In addition I'd like our deployment tool to identify and deploy only assemblies rebuilt as a result of a code change.
We already use Microsoft products like TFS for source control, Visual Studio for development and Team Foundation Build for continuous integration builds. We're currently leaning toward InRelease for deployment as it seem to integrate well with Team Foundation Build.
But first, here is our current setup...

There are 200+ C# solution files, each containing one or more projects.  It is not practical in the environment to combine these projects into less solutions, i.e. by design. Projects within a solution uses project references to resolve dependencies and file references to projects in other solutions. As far as I know, this is the recommended approach by Microsoft when dealing with a large amount of projects.
We use a "branch by feature" strategy e.g. isolated development on concurrent features branches which is merged up to a stable Main branch when complete. When it's time for a release, a release is branched from main and isolated for hotfixes and deployment. The feature branches and main branch have a CI build triggered by code check-ins. Releases will mostly like be manually executed from InRelease against a selected release branch. A release will be deployed through various environments including INTEGRATION/TEST, UAT and ultimately to all our clients. We're still fleshing out the details of branching strategy, but that's a question for another time.

The current problems to solve:
1. Avoid rebuilding of dependencies that have no code changes...
When we deploy new functionality or a patch to a client, we want to push the absolute minimum in files. Our company has a very large customer base (thousands of customers) with sometimes slow internet connections, so doing a full deployment of all assemblies (200+) to every customer is not an option. I've partially solved the problem by setting up incremental builds which correctly rebuilds only changed projects as expected but also rebuilds all the dependent projects even though NO CODE CHANGES were made to them. This results in both the changed assemblies and dependencies having new timestamps. If we use the change of timestamp to identify which assemblies to deploy, then this would result  in deployment of functionally unchanged assemblies. The goal here is to deploy only assemblies where the code has changed and assemblies where breaking changes occur.
For example:
Solution B, has a project called Project B
Solution A, has a project called Project A
Project B -> Project A  (where Project A has a file dependency on Project B)
When a non-breaking change is made in Project A, say to the interior of a method, then the expected result is: only A is built and therefore a candidate for deployment.
When a breaking change is made in Project A then that will break Project B, the expected result is: Both A and B is built and therefore a candidate for deployment.
Currently MSBuild rebuilds all dependents regardless, which is not what we want.
2. Automatically identify which assemblies should be deployed...
I have a partial solution to the problem.
When a build is performed, my build process template is configured to run a MSBuild script containing a list of solutions to build in a particular order.
This operation is performed in the build agent's workspace. Every time a new build is performed the build process template creates an unique drop folder in the format  and copies the binaries from the build agent workspace to the drop folder. This is out of the box functionality taken care of by the standard build process template. The build has been configured not to clear the build agent workspace, so the first time it runs it will build all projects within a solution but subsequent builds will only build projects that have code changes or is dependent on other projects (incremental build?). Therefore unchanged assemblies will have the original time stamps and changed assemblies will have new timestamps.
We have a tool that can do folder comparisons between drop folders and output the results to a txt file. This allows us to identify which binaries have been added/changed/removed since the last deployment. It also gives us the added benefit of comparing the list of actual artefacts to a manifest of expected artefacts as defined by the developer. This will ensure that no assemblies get deployed that has not been specified and proven to be unit tested.
The question is how can be we leverage InRelease to deploy only the required files as per the example above and not all files in the drop folder?
Answer:
Install a TFS Proxy in before your build machine, this reduce the net traffic
You will start with a branch strategy like Service Pack, you can read a documentation about in ALM Rangers guidance... And adapt you process template to build just the part of code changed. I think in BRD Lite, another guidance by ALM Rangers, you will found more information.


How to sniff USB3 and Ethernet signals on the PCB?

Question: I want to sniff USB3 and Ethernet diff lines without affecting communication on my PCB. But I couldn't figure out how to do that with a small form factor.
Comment: are you able to do it with large form factor?
Comment: Can you sniff USB3 and Ethernet signals in general? At what speeds, and at what level must you sniff them? The level gives an approximate ballpark if you need equiment that costs approximately as much as a computer, a car, or a house.
Comment: do you already have the necessary high-speed signal / logic analyzer, and this is about probing (if so, what do you have?), or do you intend to build the sniffer yourself?
Comment: @jsotola I mean equiments
Comment: @Justme 1gbit ethernet and 5gbps USB signals.
Comment: @MarcusMüller I want to build the sniffer myself on the PCB, is it possible to sniff with an rf splitter?
Comment: @devscg Sounds like if you want to do it in hardware, it will be expensive. Why can't you sniff the data transmission in software, running packet captue software on your PC while it is communicating with the hardware?
Answer: Inductive pickup is one way to do it. It may introduce less of a discontinuity than a differential amplifier input would. Back when I was doing it, I did need the galvanically isolated pickup. You may not need it though. The signal degradation due to a galvanically connected high speed diff-amp may well be acceptable with modern parts. Decades ago, in my application, it wasn't the case.
So, you could try with a pair of pogo pins touching exposed traces, and a fast diff—amp.
I've made such things in the past - like 30 years ago - and it was quite a bit of work to get usable signals. Maybe I was going the hard way about it, but in the end it worked.
I used a tiny inductive pickup – a solenoid with its axis perpendicular to the differential pair run. It was mounted very symmetrically on top of the gap between the differential traces. This was done under a microscope with an XY stage to position it prior to gluing.
The coils needed were tiny - grain-of-sand sizes. IIRC would wind 50AWG wire on a 40AWG "core". That takes some custom tooling as the wire just rips if you try to handle it manually. It was like watchmaking on steroids – not very practical but work it did.
Right next to the solenoid was a high speed amplifier/buffer. I'd end up needing custom emphasis/"cleanup" after the preamp, to bring the signal back to a form that a PHY was able to deal with.
These days I'd try with a magnetoresistive head from a hard drive as a pickup. They have the feature sizes that should work well for this, and are made to handle high bandwidth signals. They also have ready-to-use analog preamplifiers close by. Those may be reusable as-is. The head gap would be oriented along the differential pair, centered between the traces. For highest signal there may be a need for slight shimming – or de-shimming.
If you are laying out the PCB to facilitate such probing, make a window in the soldermask at the probe points. The shim thickness may need to be smaller than the soldermask thickness. Non-conductive shims are probably best, although you'd need to experiment. Thin Mylar films would be probably a good shim material. Tweak the shim thickness for maximum signal amplitude.
Another way to shim that is to leverage the smooth surface of the head and put a couple of very small non-plated through holes centered between the differential pair conductors. Those would make a slight discontinuity, but would let you push air at adjustable pressure/flow from the opposite side of the board, and use the head float as a shim adjustment.
Comment: Thank you so much for your answer. Do you think an RF splitter would achieve this?


Do I need to turn off my HVAC system while drywall project going on?

Question: Do I need to turn off my HVAC system when dry wall guys hanging and finishing dry wall.
its 5-7 days work. I don't want HVAC to sucks drywall's dust. I can't simply block the return vent in basement.
Comment: Put in a pleated filter. The white kind, not the fiberglass. Also, a box fan and a filter stuck on the back makes a good temporary dust collector.
Comment: This is what our HVAC guy recommends. He actually has a couple of old furnaces that he keeps and loans out to people who are building. He'll install an old one as a temporary heat source if it's needed when drywall is being done during cold weather, then pull it and install their new/permanent one, once the work is done.
Answer: I did and generally recommend it.
If they are good, they will be creating a negative pressure situation where air is being pulled through the work location and blowing out a window or door to stop drywall dust form going everywhere as it will regardless of whether your HVAC is on or not (it is insidious).   But unless you have a hepa level filter in your system, it is going to suck in drywall dust if it is running.  And good filters will get clogged with drywall dust quickly. If you have air blowing out vents in that area and a return pulling in air, you are going to have drywall dust going through your air duct system.


Disable Ctrl + spacebar MATE

Question: I have MATE on my Ubuntu computer but I have a little and simple problem. I play games in fullscreen and when I press Ctrl+Spacebar it uncaptures the mouse. How can I disable this function of Ctrl+Spacebar?
Answer: Go to System > Control Center and, in the filter bar, type 'Keyboard Shortcuts'. Click on the resulting configuration tool to open a new window listing all your keyboard shortcuts. Find the 'Ctrl+Space' shortcut, select it, and hit backspace. The shortcut will now be disabled.
Comment: I don't see it there. Maybe it's just a feature that's made into MATE or something? Does ti happen to you, or is it just me?
Comment: Nothing happens when I press Ctrl + Space. This is kind of a long-shot but... are you running Ubuntu MATE virtually by any chance? (using Virtualbox or some other program?)
Comment: Nope. Not virtual. When you said it didn't do anything, did you have your mouse captured in something like a game? If you don't have it captured, it doesn't do anything.
Comment: I have found a solution! I am making it into an answer...
Comment: @FuzzyToothpaste Great!
Answer: I had Ctrl +Space set to "next input method" (whatever that means) in my IBus Preferences. It said space, so I took all that out and left it an empty field. The IBus Preferences is also called "Input Method" or "Keyboard Input Methods" in the MATE Control Center menus.

Disable Ctrl + spacebar MATE


Ubuntu 13.04 hangs on reboot (shutdown works fine)

Question: I have Ubuntu 13.04 on a Lenovo Thinkpad SL510. Since upgrading to 13.04, the computer hangs on the Ubuntu loading screen (the changing white and orange dots) when rebooting. Turning on and off however works fine.
Comment: You should try this again, then copy syslog and dmesg.0 (dmesg is the log from the current session, dmesg.0 from the one before) from /var/log to wherever you want and inspect them. Please add the last lines the system hangs on to your question.
Answer: I have this issue on 5 different 13.04 systems they all get stuck in run level 1 if you use sudo reboot now, this is a serious issue, I don't want to have to physically reboot all remote servers I manage.
The solution is to use sudo shutdown -r now which works and reboots.


MyISAM or InnoDB, for safety of data, which should I choose?

Question: MyISAM or InnoDB, for safety of data, which should I choose?
Comment: Y'know, I think the general idea is to put a summary of the question in the title, then flesh it out a bit in the body :-)
Answer: InnoDB is a safer ACID compliant engine with some integrity features that MyISAM lacks.
http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html
Clearly, if you are concerned with de safety of your data I would use InnoDB. Would you use an engine that does not support transactions?
MyISAM is used for performance reasons.
Answer: InnoDB has better respect of constraints, data integrity and reliability. It supports foreign key constraints and transactions for instance... The documentation compares transaction and nontransation engines.
Answer: See, developer and site lard are expecting only safety, but users are expecting fast retrieval.
Only, in InnoDB there is no fulltext support, so we manage in that situtaion.
Is there alternate constraints there, or is there any tips?
Example,
I have postcode file in my table,
I have around 100000 postcodes,
I have autocomplete for postcode, in this situtaion, if I use the MyISAM, I make the filed
as fulltext, so my user will not experience a performance issue.
So is there any idea for this creteria?
Basically I am not a database engineer, I am a developer.


How to add controls to a Tab control

Question: I am using a Tab control in my GUI app and I know how to add and remove tabs from it (TCM_INSERTITEM, etc.) but I cannot figure out how to add other controls to a tab like Buttons, etc. How do you add controls to a tab? (Note that I am not a PropertySheet control, but a Tab control.)
Answer: If you are talking about adding controls to the body of the tab control: You don't.
What you do is create a child styled dialog control for each tab, which will have the controls for that tab on it. As each tab is selected, you handle the notification from the tab control to create and show the appropriate page control. The page dialogs are normally parented to the parent of the tab control, not the tab control itself.
Answer: While you can certainly specify a tab control as the parent of another control, this isn't going to help you. The tab control will not be aware of its (newly added) children and so it cannot arrange itself to accomodate them.
So the short answer is: You cannot.
The long answer is that you have two choices:
1) Build your own tab control which can support children.
2) Arrange the other controls along with the tab control such that they fit together, but do not overlap.
Comment: If a Tab cannot have children that it shows when it is selected and hides when another Tab is selected, what is the point of having them?  What is there purpose?
Comment: @Sergei: Oh, I see your confusion now, after reading your comment and Chris' answer. You don't want to add children to a tab control, you want to add children to a **tab page**. Chris has the correct answer.
Comment: @Sergei: Read "the manual" here: http://msdn.microsoft.com/en-us/library/bb760551.aspx

How to add controls to a Tab control


What is the highest online ranking achievable?

Question: I know that as you make your way through ranked matches that you slowly rise from E5 to higher ranks, but what is the highest rank you can get to? Is it A1, or can I raise my rank even higher than that?
Answer: I believe A1 is the highest rank you can get, but this isn't accomplished by just playing a lot.
The breakdown is something like this:
- Losing a match as an E rank gives you +40 points or so
- Losing a match as a D rank gives you -10 points
I haven't gotten to C rank, but presumably each rank gets harder and harder to maintain. If you play all the time and always lose, I suspect you will get stuck between E1 and D5 rank as losing in E will move you up, but losing in D will move you down.
If you lose with an A rank it probably subtracts a good deal of rank progress, likely kicking you back down to B.
If anyone can confirm this, that would be awesome. In the meantime I guess I'll just keep playing until I get to C :D
Comment: I'm fairly certain the amount of points you win or lose is dependent on the level of your opponent.
Comment: It's probably modified by that in some way, but the base points are  certainly based on your own rank. As soon as I got to D rank I started getting -10pts for losing a match.


Broken window balance has window stuck

Question: I need to order new balances for my window. Embossed in corner pane is  MSCC.
Who is the manufacturer? Dated 02-06.
How do you unstick the bottom window?
Thanks!
Answer: I may not be able to tell you who the manufacturer is, for the letters you found on the glass may be the insulated glass manufacturers initials, not the window makers. There should be someplace on the window, a window manufacturers label or something.
The window, since the ballast has broken on one side has in essence, has tilted to one side, even though it may not be obvious. The ballast is trying to lift one side and the window, being quite heavy is wanting to stay closed on the other side.
To counter effect what the window is wanting to do, you need to push up on only the side the ballast is broke, and pull down on the side the ballast is working. Of course you need to push up harder than you are holding down the other side, or it won't work. Depending on how bad it is jammed, you may only need to push up on the upper corner where the frame (sash) around the glass give an edge to push up by. You may also need to pull down hard on the ballast side to set the window down all the way, so you can then try the other things I mentioned earlier.

Broken window balance has window stuck


How to not pull string down while pressing it

Question: I have bought my first electric guitar but I have a small problem. When I press strings, I noticed that I pull them a little bit down, like I intend to bend it a little. What does it called and how can I solve it? Thanks!
Answer: This is common for beginners, especially on the low strings. There is not a specific name for it. My observation after teaching many beginners is that people sometimes tend to think of pressing down a string as being a squeezing motion. When you squeeze something your fingers bend inwards, which on a guitar neck translates into pressing and pulling down at the same time.
In order to avoid this you want to think of your fingers as going directly into the fingerboard, even with a slightly upward motion. kind of like extending your fingers towards the neck instead of curving them more as you press. You want to keep your fingers a bit more straight as you press as opposed to curving them
Answer: It's actually very good that you are noticing this as a beginner and that it bothers you. It is common issue and it takes some targeted practice to limit this.
But first of all I'd start from looking at the setup and string gauge in your guitar. We're all different and some have lighter touch others have heavier grip so it is worth experimenting a bit with string action and gauge to suit your attitude and touch.
Then even practicing regular scales across the neck but with paying attention to press string as light as possible and without any lateral shift/bend will improve the situation in time. It is also important to look at the same issue when playing chords, especially harder one where there is a tendency to grip harder and practice this with the focus on stabilizing hand position and using less force.


Why did my fireworks photo turn out as "pegs"?

Question: I was trying to take a photo of some fireworks, but it turned out like "pegs". I'm not sure what happened - this was my first time using manual on my Canon Rebel t6 and I was hoping they turned out better. What should I have done differently?
Comment: What would "better" mean to you in this context - were you after something more like the ["traditional" fireworks photo](https://colchester-events.co.uk/wp-content/uploads/2017/07/fireworks-1080x675.jpg)? (random photo from the Internet, taken from [Colchester Events](https://www.colchester-events.co.uk/event/king-coels-kittens-fireworks-spectacular/))
Comment: Possible duplicate of [What settings should I be using to photograph fireworks?](https://photo.stackexchange.com/questions/4375/what-settings-should-i-be-using-to-photograph-fireworks)
Comment: It might also help us if you described what you actually did (tripod, timer, shutter release cable) and if you posted some of the EXIF information, including the exposure settings (iso, aperture, shutter speed).
Answer: There are two things happening here.
Firstly, they're out of focus. That's why the lines are so wide. It's asking a lot of a camera to auto-focus on fireworks. If you want the fireworks to be sharp, either use manual focus and a bit of trial and error; or auto-focus on a static well-lit object at the right distance and then switch to manual focus. Of course, you might well make the artistic decision not to have them sharp: focus blur sometimes works quite nicely with fireworks if your lens has good bokeh.
Secondly, I understand your reference to "pegs" to refer mainly to the length of the lines. This is down to exposure time. If you want something looking more like points than lines then you need to drop the exposure time by three or four stops, and compensate with aperture and ISO. If you want longer lines, you need to increase the exposure time by a few stops, again compensating with aperture and ISO.
Comment: For the "traditional" fireworks photo, you'd generally want an even longer exposure time than this to capture the whole trail.
Comment: @PhilipKendall, ah, I may have misinterpreted the question.
Comment: Well, the question isn't very clear as to what would make a "better" photo... but if you want something like the one I've linked in a comment then a longer exposure is needed.
Comment: ... and a tripod, because we are talking about a good second of exposure. But some fireworks can produce a lasting trail and are better shot with a short exposure, but you have you know them in advance...
Answer: You did well in framing and focused fairly well for your first time attempting fireworks.
You did well in terms of selecting an aperture and ISO value that exposed the glow from the burning powder nicely bright without losing the color by overexposing.
You didn't leave the shutter open long enough.
Shooting fireworks against a black sky is a lot like using flash in a dark room. The length of time the shutter is open does not affect how bright the image is. The amount of power put out by the flash over a much shorter period of time does that.
With fireworks, the bright parts of the picture are constantly moving. Leaving the shutter open longer doesn't usually make the image that much brighter, it just shows the glowing fireworks along a longer portion of their travel. Now obviously, if you left the shutter open for several minutes the background light and the number of fireworks crossing the same spot of your sensor over and over would eventually overexpose your image.
I normally shoot fireworks using a wired remote cable release and the camera set to 'Bulb' mode. With your Rebel T6/1300D you access 'Bulb' mode by using Manual exposure mode and setting the shutter speed (Tv) past the setting for 30 seconds to "B" for 'Bulb'.  The shutter opens when either the camera's shutter button or the button on the remote is pressed and closes when the button you used is released. I use a tripod to shoot fireworks. This allows exposure times in the range of about  one to five seconds.
You pick a spot of sky to point at, focus manually at infinity (or just a tad shy of it), and you wait until the show starts to see if you're pointed in the right direction. Adjust your aim as needed. Don't forget to refocus if you zoom in or out. I find manual focus works best for me. Once I've got the camera pointed in the right direction and focused where I want it, I don't even bother with the viewfinder (or LV). I just watch the show with my own eyes and use the wired remote to open and close the shutter, occasionally glancing at the image previews on the LCD after a shot to be sure exposure, focus, etc. is still where I want it to be.
When using 'Bulb' mode you can anticipate a shell before it bursts (by watching it climb - the trail of the climb usually goes dark a half second or so before the shell breaks) and you can already have the shutter open when it "breaks." You can then hold down the button until the glowing powder has spread out or fallen.

Canon EOS 5D Mark II + EF 24-105mm f/4 L IS @24mm, ISO 100, f/10, 1 second (Bulb - EXIF only reports in whole seconds, so it could have been anything from just shy of 2 seconds or shorter to less than 1 second).
Some folks prefer to include the shell's climb in the image. I prefer to leave it out and open the shutter just as the shell breaks or just after it breaks.
Sometimes, if there are multiple burts going off at once, like in the "big finish' of a professional display, you'll go ahead and close the shutter before every burst spreads completely out to prevent areas with multiple breaks going off very quickly from washing out those parts of the frame.

Canon EOS 7D + EF 70-200mm f/2.8 L IS II @ 70mm, ISO 100, f/8, 1 second (Bulb)
If you are shooting wider to catch the surroundings as well as the bursts, you have to pay more attention to length of exposure combined with aperture and ISO. Keep in mind that everything else is a constant brightness, while the fireworks is very bright but constantly moving so that it only lights up a particular part in the frame for a short instant as it takes several seconds to move across parts of the frame.
I'd like to have been able to hold the shutter open a bit longer for this one to catch more of the foreground, but I did not have a tripod at the time. I wasn't even planning on shooting fireworks at the end of an airshow I'd been shooting all day. While walking back to my car a long distance from the main crowd area, I saw the reflections of the fireworks on the antique planes parked on the tarmac. I feverishly dug my cameras back out of my backpack, swapped lenses, moved a QC2 plate from the 7D to the 5D Mark II, mounted the camera on my monopod (tripod was in the car 3/4 mile away) and started shooting about 3 minutes before the end of the display. That limited my shutter time to about 1/5 second with a non-stabilized lens at 35mm on a monopod. The higher ISO definitely had an impact on washing out the colors and blew out the center of the shell breaks. ISO 1600 is 4 stops from ISO 100, which reduces the full well capacity of the sensor by a factor of 16 and reduces the dynamic range. But I got the shot I wanted.

Canon EOS 5D Mark II + EF 24-70mm f/2.8 @ 34mm, ISO 1600, f/3.5, 1/5 second.
After trying it a few times, you'll find getting the wide, generic full burst shots will become old hat. For something different, try shooting tighter and seeing what kinds of abstract shapes and colors you get. You're basically shooting "blind", even if using Live View, because you won't be able to see the entire image captured over several seconds until after you've closed the shutter and the camera shows you a preview image.

EOS 7D + EF 70-200mm f/2.8 L IS II at 70mm, ISO 100, f/8, 3 seconds (Bulb).
Catching the very end of one burst and the very beginning of another can be fun. I called this one 'Hyperdrive tractor beam.'

EOS 7D + EF 70-200mm f/2.8 L IS II at 70mm, ISO 100, f/8, 1 second (Bulb).
Pulling focus during a burst takes a lot of practice, but the results can be unique. I generally focus at a very close distance and pull focus to infinity as the the shell breaks. Live View can be helpful here, and a tripod is an absolute necessity. Even with the tripod, the camera movement caused by zooming the lens is evidenced by the 'squiggles' as the focus was moved.

EOS 5D Mark II + EF 24-105mm f/4 L IS @ 80mm, ISO 100, f/4, 1 second (Bulb). I used the wider aperture to get more blur when defocused.

EOS 5D Mark II + EF 24-105mm f/4 L IS @ 80mm, ISO 100, f/4, 2 seconds (Bulb). I used the wider aperture to get more blur when defocused.
Stopping down a little for the big finale allows you to leave the shutter open a bit longer and fill the frame with various types of shells as the break.

EOS 7D + EF 70-200mm f/2.8 L IS II at 70mm, ISO 100, f/8, 1 second (Bulb). Exposure reduced 2/3 stop in post.
Comment: great shots and detailed explanation


Automatically restarting a Python program

Question: I have a very long running Python program that I can manually start (and stop) from the command line.  I do not want this program started automatically during system boot.  But, after I manually start it running, I would like a way for my Pi to restart this Python program running again if it ever stops or exits for any reason, even if I'm logged out of my Pi.  How can I do this?
Answer: If you have something you want to run for a long period you can use a terminal multiplexer like screen or tmux. They will continue to run after you have been disconnected from your Pi. As for keeping a process running for long running jobs you will want to wrap the command in a simple shell script. If you want to keep it a pure python code base you may want the process to run as a daemon. This is a great and very well documented example


Variation in the price of bond

Question: The price of a bond can vary because:

the yield curve changes
the flow of time (the time to maturity is reducing, for example compare a 1 year ZC bond with a 0.5 year ZC bond)

How can I quantify the effect of each precisely?
Answer: Modified Duration and Convexity measure a bond's first- and second-order sensitivity to yields. With small changes in yield, duration is often sufficient since the change due to convexity will be much smaller. With larger yield changes, convexity can have a impact.
Sensitivity to time is more complicated mathematically, and there's not as much practical application, but in general, bonds tend to move toward par (100%) as time passes, all else being equal. So if the current price is close to par, there won't be much sensitivity to time passing.
Answer: There is no way to write anything in mathematical notation on this exchange.  If it were me I would either construct regressions using the method of maximum likelihood or a Bayesian method because you could incorporate the present value formula directly in the regression.  You cannot run separate regressions because it would be inaccurate.
Answer: Consider Bond A and Bond B both with the same coupon and the same redemption date. But send Bond B forward in time as closer to redemption.
Calculate the price of the Bond A with the yield of Bond B and note the change in price. Then calculate the price of the original Bond A with the remaining time of Bond B and note the change in price.
The results begin two separate graphs. One graph of Bond A price changing with yield and another graph of Bond A price changing with time.
Calculating bond price is not too difficult. Calculating yield from bond price is more difficult and therefor I previously posted an alternative bond pricing method that has a direct inverse. But an alternative bond pricing only works within its own system.

Variation in the price of bond


How do I uninstall an addon in opera (for Mac)?

Question: Decided to give the Opera browser a try today, since I do believe that competition between different browsers is a Good Thing. Anyway, I managed to mess up a bit and installed the wrong "ad-blocking" addon (Addblockplus instead of Add-block...).
So, how on earth do I get rid of that addon? I can find no way to get rid of it. Google does not help me; I cannot find it anywhere. Any ideas?
Answer: Found the answer while writing the question: Window -> Extensions. From there you can easily get rid of it. Stupid user? Mayhaps. :)


Do mutiny and mutation have a common root?

Question:

These words sound similar and the meaning is close, too - in both cases something is changing.
Etymology I found implies they are not connected to each other, but I'm still curious.
Comment: Although both words indicate change, the *way* in which that change happens is opposite. One is adaptive, the other confrontational.
Answer: While they have separate roots, it's worth noting a couple of points.
First, among the obsolete senses of "mutation" noted by the OED is "revolution" or "civil insurrection".   According to the OED, this sense of "mutation" may be at least partly a borrowing from French "meutation", "meute", which comes from Latin "movere":

In sense 'revolution' (see sense 1b) perhaps partly after Middle French meutacion riot, revolt (early 15th cent.) < meute uprising

The similarity of movo, movere and muto, mutare is noted by the Dictionnaire Étymologique de la Langue Latine (A. Ernout & A. Meillet, 1932), but they ultimately dismiss any etymological link:

L'idée de changement est inséparable de celle de mouvement et les sujets parlants ont souvent associé muto à moveo; de là des emplois comme ceux qu'on rencontre dans Plaute, Am. 274 ... et dans les langues romanes; cf v. ital. mutare "voyager", fr. remuer, etc. à côté de muer "changer [de peau]" etc.); ... Ces emplois et ce sens ont donné lieu à l'étymologie mouitare  > mutare "mouvoir fréquemment, déplacer", puis "changer".  Mais, d'une part, le fréquentatif de mouere est motare et, d'autre part, le sens premier de mutare est bien "changer", comme le prouvent le dérivé mutuus et les composés commutare, permutare; et la forme commoetacula enseigne que l'u de mutare est issu d'un ancien oi.

In other words:

The idea of change is inseparable from that of movement, and speakers have often associated muto with moveo; whence such uses as we meet in Plautus, Am. 274 ... and in Romance languages; cf. Old Italian mutare "travel", French remuer "move", etc. alongside muer "change [one's skin]" etc. ... These uses and this meaning have given rise to the etymology mouitare > mutare "move frequently, move" then "change".  But first of all, the frequentative of mouere is motare, and secondly, the original sense of mutare is indeed "change", as proved by the derivative mutuus and the compounds commutare, permutare; and we learn from the form commoetacula that the u of mutare derives from an archaic oi.
Comment: "You've come a long way," is how I would describe someone who has changed a lot. Movement is probably the most common metaphor for change.
Comment: @jpmc26 for there to be a change, there must be a movement from a previous state to another. It makes sense to me..
Comment: "The idea of change is inseparable from that of movement." While I don't doubt the historicity of this notion, it sounds archaic to my modern ears. But perhaps I'm alone in that.
Comment: @Shautieh Not saying you *can't* make sense of it. I'm just saying that I don't think that, as a society, we strongly associate the notion of change with movement anymore.
Answer: The Online Etymology Dictionary traces both words back to different Proto-Indo-European roots. The word "mutiny" goes back to a root "meue" meaning "to push away." The word "mutate" goes back to a root "mei" meaning "to change, move, or go." The two meanings are related in that both involve motion or change, and there is similarity in pronunciation. It is plausible, therefore, to speculate that ultimately the two words are both derived from a common root. But that speculation has no historical evidence. A common root, if there is one, precedes the development of Proto-Indo-European. For at least the last 4000 years, the words have had different histories.


TestFlight questions popup not appearing

Question: The TestFlight SDK documentation says all you have to do in order to add a modal questions screen to your app is to add the question via the web interface and associate it with a checkpoint that's already in your app. I did this a couple days ago, but have still yet to see a questions popup appear. Has anyone else used the TestFlight questions interface before? Am I missing a step?
Comment: I am having this problem as well, there support is a bit slow.
Comment: Have you followed all of the steps under the "Integration" heading at: https://testflightapp.com/sdk/doc/1.1/ ?
Comment: Yes, I have followed all of those steps.
Answer: I had the same problem, but their support team told me that my problem is a bug in their platform about the version number. If you upload a build many times with the same version number, they will put a "#" near version, this is the problem, the sdk don't show questions correctly in build with "#" version. To fix the problem you should upload a build with new version number or delete the old one before upload new build.