What happens if you swab positive for a drug sample at Canadian airports even if you don't have anything on you?

Question: I'm a mom of one and don't use or associate with any drug stuff. I recently bought a backpack off a buy and sell and after I got it home I noticed it smelled like cigarettes. So I went through all the pockets and found a small bag of what appeared to look like a small amount of residue of hard drugs. I called the police and they came and picked it up from me to dispose of it. But I couldn't confirm what it was. And then I washed the backpack on hot.
I'm wondering if I can still travel with this backpack. I bought it specifically for my trip to carry it on and really want to use it. Someone warned me not to take it in case there was still a scent or residue in the bag. They felt I could get in a lot of trouble. Common sense tells me that I couldn't possibly be kept from my flight or get in trouble since there wouldn't be anything they'd find. But I wanted to ask if anyone knows for sure about this.
Is it likely that a scanner or swab or whatever those silver wand things are would pick up any trace of that stuff? And if so what would happen?
I've washed the bag. Is there anything else I can do to ensure it's totally cleaned up?
Comment: The wands look for explosives.  Dogs are used for drugs.  Also, there are probably more drug residues on the bills in your wallet.
Comment: Related but not quite a duplicate: [Airport security: what if I carry an item with traces of explosive?](https://travel.stackexchange.com/questions/30325/airport-security-what-if-i-carry-an-item-with-traces-of-explosive)
Comment: You are probably fine if it is domestic flight.  If worst comes to worst, you would just need to call an attorney.  If it is an international flight, I would use a different bag because crimes like that, which harm the entire society, are actually punishable by death in many places that Canadair flies.  It costs less than 100 US dollars to prevent problems like that completely.
Comment: @npl Not true. They do swab bags for drugs. They stick it in this machine and if positive it tells you what drug it picked up. However, that will mostly just trigger a thorough search and if they fail to find anything you are good to go. Unless of course you are acting super suspicious.
Comment: @npl:  Note that Canada switched completely to polymer banknotes in 2013, and I would guess (though I haven't found confirmation online) that drug residue doesn't "stick" to them as much as it does to traditional paper bills.
Comment: @MichaelSeifert some people travel in Canada with paper banknotes from other places.  I did this myself a couple of weeks ago.
Comment: The hair from my cat, who liked to lie on my suitcase, was frequently detected as some sort of precursor chemical for years after she had died. I didn't wash the suitcase since it was the last connection we had. (When a search turned up nothing, I was on my way.)
Answer: Just because your bag is triggered doesn't mean you will be in trouble. I bought a backpack at Heathrow duty free while in transit to the US which triggered a positive hit on the explosive wand - while it was still in the plastic.
It got swiped twice, detected twice, and then the inspector looked at it and just let me through, no muss no fuss.
In your case, I would get a copy of the police report as an extra assurance, but I would not worry about it.
Many things will trigger positive, such as remnants of poppy seed bagels and inspectors are trained to look for these and make a holistic determination as to the passenger's risk profile.
Comment: "*get a copy of the police report as an extra assurance*" That's **exactly** what I'd do.
Comment: And bring some extra time.
Comment: @Voo cops -- even Canadian cops -- can be... unpredictable.  If the dog smells drugs on the backpack, they might listen to OPs story, or... having heard so much BS so many times it would make your head swim, they might decide OP is lying dig through **everything**, including bodily cavities.
Comment: Would a police report from some time ago stating that the OP had volunteered some drugs but they took no further action actually help? This bag held drugs at some point, but the police then didn't do anything, so of course it must be OK now, mustn't it, officer?
Comment: @RonJohn I'm confused why. Is it illegal in Canada to use drugs in a jurisdiction where it is legal? If not, why would "this backpack contained drugs at some non-determinate point in time" be a problem in any case? Sure, they'll make extra sure that you don't carry drugs right now (so extra time sounds sensible), but I don't see what else they'd want from you.
Comment: @voo it is illegal to transport across national boundaries many things which are legal in both countries. *coughporncough*  By the way, one of the reasons is some materials require special customs or duties, e.g. you can't transport homebrew biodiesel because all highway motor fuel refineries need a ton-pile of licensure and corporate status to pay road tax.  It is impossible for citizens to pay road tax on homebrew biodiesel because the tax authority simply isn't set up to talk to 10,000 small producers.
Comment: @AndrewLeach - I was thinking this as well and, going by the advice in the answer, would be more inclined to bring the remnants of poppy seed bagels than the police report.
Comment: @Harper Yes nothing new there. But the point is, it's obviously illegal to transport illegal substances across the border or to transport things that require customs declarations and so on. But what isn't illegal is to cross the border with a perfectly valid bag that might have had illegal substances at some point in the past. (it won't be the most pleasant trip with or without some additional document, but oh well).
Comment: @user79730 I didn't think I had to be that explicit. Did everybody forget the usual mantra of "don't volunteer unnecessary information?". If for some miracle you do get stopped and asked about it (as if), it'll simply depend on your demeanor and if the officer had a good or bad day. Providing a (almost certainly) unverifiable "police report" will just arouse additional suspicions.
Answer:
Is it likely that a scanner or swab or whatever those silver wand things are would pick up any trace of that stuff?

Both drug detecting machines and sniffer dogs operate within the physical realities of our world rather than in a magical CSI-like universe. Therefore unless your backpack still has a sealed compartment with hidden drugs, it is extremely unlikely any sensor would be able to pick up any traces after you've throughly washed it in a washing machine. Remember that pretty much anything contains a trace of drugs these days, so even if a machine is sensitive enough to figure out drugs have been in your possession at some point of time, it would likely be set to a higher threshold to avoid false positives from the majority of travelers.
Relax and enjoy your backpack.
Comment: @Tom The matter is not if the dogs can technically smell it but rather if they are trained to react to such small traces.
Comment: @Tom if the dog is sensitive enough to smell trace amounts of a drug on a backpack that was thoroughly washed, its going to smell false positives **everywhere**. They're also far less effective than claimed by the authorities (see my links for references).
Comment: If this "mom of one" named Elizabeth is in actuality figity, nervous, brown and named Elizabeta, she might get scrutinized a bit more.  Or not, if the cops fear a lawsuit.  Better to be safe than sorry.
Comment: I think you underestimate the sensitive of some animals and machines. Especially smell is something where animals can and do surprise us constantly.
Comment: They're not magical for sure. However, I assure you that cats **can** still smell some things after washing it once with regular detergent (as was done here). I would be surprised if dogs were very different, but I don't own a sniffer dog.
Comment: The question was if she should be worried or not. I don't think she should, but blankly stating that after one washing all traces of smell will surely be gone is a bit too optimistic.
Answer: They do have swabs and machines that can detect traces of hard drugs at Canadian airports, but they're going to be most likely checking on arrival (that may change after October 17, 2018) and you have what is likely a good enough story assuming there's nothing there to find.
You'd have to be very unlucky (or be doing something to stand out) to even get that treatment unless they're suspicious for some other reason. The only time I've seen them is on the Border Security TV show, whereas I've been swabbed for explosives a couple times and often have my carry on rifled through because of all the weird things I carry. People I know have had problems because of residue on their shoes and clothes (from various legitimate activities) that light up the explosives detectors.
Comment: I used to trigger the explosives detectors every flight when still using slide film. The celluloid film base was similar enough to nitrocelluloid based explosives to set off the equipment. Never had a problem, they knew the false positives well enough
Comment: What's so special about October 17th?
Comment: @BurhanKhalid  Pot becomes (federally) legal in Canada on that day, so there may be more vigilance in preventing export. I believe the Netherlands has some such controls. If they're looking for pot, they'll look for illegal drugs too.
Answer: In Montreal, as I went through the full body scan machine and my baggage and backpack through the baggage scan, something was set off. I then was patted down by a female agent, all my baggage was searched by a young male agent, each rolled-up article of clothing unrolled, all my camera equipment, each part of the baggage and articles.
Finally, when I asked they said it was probably a "trace" of some chemical, "Tetracyl or Tetraxyl" was found. When they asked where and at what job I worked and heard I was a nurse at a large health centre in Montreal, they said that must be it! (in psychiatry but I do give liquid long-acting injectable antipsychotics, so maybe that was it).
They also asked what medication I take... Fortunately, I arrived at the airport early but I was in shock after and barely got to my gate! It did not help that in the past the procedure of placing stuff in bins mixed up with others meant my laptop was picked up by someone else! So I was already anxious so maintain your cool!
Answer: Domestic travel:
Swabbing is primarily for explosive residue.  With the changing laws, swabbing for drugs at the terminal entrance would not be practical.
International travel into Canada:
Perhaps nothing or you can be denied entry under the suspicion that you will use drugs in the country.
If you can find it, there is a TV show Border Patrol where you will see this scenario come up several times.
The traveler is always thoroughly searched, then the border officers will make a decision.
Comment: @jpatokal This has been on the show.  CBP freely says that while cannabis is legal to posses and use in Canada, it's still illegal to cross the border so the traveler still gets searched.  OP mentioned specifically 'hard drugs' though which would still be treated as such.
Comment: If the residue in question is marijuana, that's now legal in Canada.
Comment: The OP does not say they're crossing the border.
Comment: @jpatokal You are right.  Swab + drugs most frequently means a border inspection as swabbing in domestic travel is primarily for explosive residue.

What happens if you swab positive for a drug sample at Canadian airports even if you don’t have anything on you?


jQuery ajax calls only works in localhost

Question: Hi all i have a simple jQuery ajax call in a site i'm currently developing. When I try to call it in "localhost" domain everything works fine in every browser, but when I host the site or load the site using my network name (in locahost) this jQuery call does not work. in firebug console, the ajax call just turn in to red and nothing returns. please advice me.
Answer: You haven't provided a code sample so it is a bit hard to say, but a likely possibility is the Same Origin policy for AJAX calls. That is, you can't normally send an AJAX request from a page hosted on Localhost to another domain.
Use a technology like JSONP to get around this.
If you show your code and the error message from the script I can probably give you a more precise diagnosis.


How can I fetch data from another website to my wordpress website with mysql database

Question: I can make wordpress website but I have an issue with this. I want to fetch data from another third party website to my own wordpress site with the mysql database.
I want to fetch only one table with the dynamic entries form the third party website.
Answer: You can set up a new connection from function:
<code>$wpdb_b = new wpdb( "user", "password", "brian_db", "localhost" );
$wpdb_b->get_results( "SELECT * FROM brian_table" );
</code>
Happy Coding
Answer: You should have a remote mysql option in your cpanel to allow you to do that if not then you may ask your hosting provider for more assistance after that:
Use the following configuration settings for connecting to your database:
Host name = (use the server IP address)
Database name = (cpanelUsername_databaseName)
Database username = (cpanelUsername_databaseUsername)
Database password = (the password you entered for that database user)
MySQL Connection Port = 3306


Looking for the name of a 90's coin op game where you played a barbarian with an axe. Not Golden Axe

Question: I'm looking for the name of a 90's coin op game. It was a platformer and you controlled a barbarian with an axe. Holding down the fire button made the axe power up for one powerful hit. There were enemies that curl into balls and bounced around. You also attacked larger enemies, possibly end of level bosses. I think the name of the game was a single word. It's not Rastan, Rygar or Golden Axe.
Comment: @Tommy you should provide that as an answer not as a comment and then it can be approved because apparently it's the right answer.
Comment: This is definitely a coin op — no chance of confusion there? Otherwise I'd suggest Legendary Axe, a home game for the PC Engine: https://youtu.be/9Ucw8ceyRYs?t=1286
Comment: Wow! So the arcade box contained a PC Engine inside? This was in South Africa btw. Thanks a million!
Comment: @RowanHawkins sure; I hadn't quite figured out the arcade angle until today, but done.
Answer: The game was The Legendary Axe, in principle an exclusive to the PC Engine home console, but it appears that a company called TourVision created and distributed a bootleg version of the PC Engine for arcade use, allowing players to purchase time rather than the more conventional credits or continues.


How to Merge guest quote items to customer quote(if customer log in) by magento 2 rest API

Question: If any one is add products in cart by guest and after that login then how it will merge guest cart to customer login cart items by Rest API.
if anyone found this solutions, please help me.
Answer: You can do this by using following api endpoint
<code>Method - PUT
{URL}/rest/V1/guest-carts/{guest-card-id}
Param - {
  "customerId": 3,
  "storeId": 1
}
Authorization -"Bearer {user-token}"
</code>
There is also a known issue https://github.com/magento/magento2/issues/24808. It will be fixed in Magento 2.3.4.
I created an extension to fix this issue for the Magento version < 2.3.4. https://github.com/troublediehard/plab-cartsmergefix


How do high-voltage DC/DC converters power themselves?

Question: For example, a 600 V DC/DC converter is powered only from its HV input, yet it somehow can run its internal electronics (I guess 3.3 V or something like that). Do they use a small DC/DC converter for this? How would that small converter work?
Answer: Once common method uses a depletion mode (normally "on") FET connected to the high voltage to start the controller, then an auxiliary winding on the main transformer (for isolated topologies) starts up a "housekeeping" supply and shuts off the FET to keep power dissipation down. Then the control circuitry runs from the low voltage housekeeping supply.
Alternately a large value resistor and zener can provide a trickle current to start the controller, which then runs off of the aux winding after it's up and running. Not as power efficient as the depletion FET though.
Comment: This; some even integrate the FET/resistor, either on a separate pin, or tapping off the internal switch drain pin itself (see LNK623 and friends for example).  Small ones can even be entirely self-powered this way since the control current is so small (the LNKs can be used this way).


What software do they use to create textbooks or board game manuals?

Question: I'm wondering if there is some free software in which I could quite easily compose a book with a lot of images, something like textbooks for children for learning foreign languages (an example: https://thumbs.img-sprzedajemy.pl/1000x901c/33/3f/6b/english-file-beginner-students-book-and-workbook-527649125.jpg ) or board game manuals. I tried doing it in MS Word and I found it terrible (aligning, putting images and text with correct spaces...). I saw recommendations of LaTeX and Scrivener here: Good tools for writing (game) manuals and sourcebooks . But I think it's easier to create such a book in Word than in LaTeX; Scrivener is not free. What do people who do it on daily basis use?
Comment: I'm voting to close this question because it belongs on https://softwarerecs.stackexchange.com/
Comment: Check out [desktop publishing software](https://en.wikipedia.org/wiki/List_of_desktop_publishing_software)
Answer: People who do it every day for a job pay for good software.Even as a volunteer for a charity, I paid for good DTP software. It took me about twenty-five hours to create each publication. I paid thirty pounds for professional software (it was nearly twenty years ago) and bought a graphics tablet. The two saved me hours and hours of effort.
Yes, you can create books using Word (which, by the way, costs) but you have to fiddle for long periods of time to get a reasonable result. (I have also run across formatting problems that can't be solved using forums and support -- things that take time in themselves.) If my time is worth say £30 per hour and I save three hours creating a publication using paid-for software, the maths soon becomes clear.
Whether you pay for InDesign is another question. I will be putting to my management that Adobe Cloud is not worth the money and we should buy an alternative. However, I have possibly invested somewhere between ten and twenty hours in learning InDesign. If I rate myselft at twenty pounds an hour (I haven't calculate my hourly rate for my present job), that means I will be throwing away at least £200. You have to factor in learning time and learning resources.
Finally, consider Scribus as a free alternative to paid-for products.


What is the name of extremely porous concrete for water runoff solutions?

Question: I have seen extremely porous concrete that water drains through very well.  Narrow strips of this may be put across a driveway to limit excess water runoff.  What is the name of extremely porous concrete?  How does one make it?  Where would one buy it?
Comment: It appears as if you meant to edit the question you asked, but instead asked the question again.  If this was the case, could you please delete one of the questions (or flag it for moderator attention, and they can delete it for you). Thanks.
Answer: It goes by many different commercial names, but the generic terms is "Permious" or "Pervious" concrete.
http://en.wikipedia.org/wiki/Pervious_concrete
Answer: Dry pack it what I learned to call it. It is a regular mix of concrete, but it has just enough water added to it to get the concrete to "kick". This amount of water is so small, it is just enough to get the concrete to hold together when compressed in you hand with a strong squeeze.
Comment: I don't mean to whine but drypack IS a very porous concrete that allows water to readily run through. If you have mixed it and it hasn't then you did not do it properly...
Answer: "no fines concrete", eg no sand is not used when making the concrete.

No-Fines Concrete is a method of producing light concrete by omitting
  the fines from conventional concrete. No-fines concrete as the term
  implies, is a kind of concrete from which the fine aggregate fraction
  has been omitted. This concrete is made up of only coarse aggregate,
  cement and water. Very often only single sized coarse aggregate, of
  size passing through 20 mm retained on 10 mm is used. No-fines
  concrete is becoming popular because of some of the advantages it
  possesses over the conventional concrete.

Quoted from NO-FINES CONCRETE & ITS MIX PROPORTION in theconstructor.org
Comment: @Jack, Compared to what?   It is a lot more stable then gravel, clearly you would not use it for the floors in the towerblock, but it is good be drainable footpaths, or behind retaining walls.
Comment: Doesn't need to be compared to anything. When it is used in a shower pan the water readily flows through it. The water does not stand at all. The dry pack shower bases I have done require wetting, after it has set up, it just runs right through. Still really porous. The guy was asking for what types of concrete are really porous, this is the one I knew of. Not high tech but old school, strong and porous.
Comment: From what I read, this is a very weak mix.


Mirror StdError stream to a log file

Question: I would like to be able to log all console output from my application into a text file.
I've implemented a ConsoleTraceListener and TextWriterTraceListener as described in the following post:
Mirroring console output to a file
This works well for all normal console output. However, I would also like for the StdError stream to show up in the log file. I tested with some simple code that eventually throws a DivideByZeroException (code shown below). With the implementation suggested in the above post, the error message shows up in the console but not in the log file.
Does anyone have suggestions for how to this can be achieved? Please note I'm not looking to redirect the Stderror stream. Ideally, the error message will show up in both the console and the log file.
Thanks in advance for any suggestions!
Trace.Listeners.Clear();
string logfilePath = @"Q:\logfile.txt";
TextWriterTraceListener log_tracer = new TextWriterTraceListener(logfilePath);
log_tracer.TraceOutputOptions = TraceOptions.ThreadId | TraceOptions.DateTime;
ConsoleTraceListener console_tracer = new ConsoleTraceListener(false);
console_tracer.TraceOutputOptions = TraceOptions.DateTime;
Trace.Listeners.Add(log_tracer);
Trace.Listeners.Add(console_tracer);
Trace.AutoFlush = true;

Trace.WriteLine("HELLO THIS IS TO TEST THE TRACE LISTENER");
for (int a = 5; a >= 0; a--) {
    Trace.WriteLine(50 / a);
}

Comment: how about showing the code block that you use where the DivideByZeroException is being thrown..
Answer: For the benefit of anyone with the same question, here's how I ended up working my way around the problem:
I basically implemented an exception handler and placed the Trace.WriteLine() inside of the catch part of the code. For example:
try {
    // Code that can potentially create StdError message
}
catch (Exception ex) {
    Trace.WriteLine(ex.ToString());
}

Hope that helps, in case anyone had the same problem!

Mirror StdError stream to a log file


iPhone will not connect to my wifi

Question: My iPhone says its connected to wifi but it won't let me surf the web. My iPad is using the same connection and I don't have a problem with it. Does anyone have any ideas what is wrong?
Comment: Is this a home wifi, or a public wifi at a restaurant (or something similar)?
Answer: Is there any IP address assigned? And if so, does it come from your router? (e.g., is it in the same range as a computer or other device that is connected to the same router? ) If it happens to start with 169.254.x.x, then there probably is something wrong with one of the router settings (probably DHCP not configured properly), as that indicates that your iPhone has a self-assigned IP-address.
You can check the IP-address by opening the Settings app, tapping Wi-Fi, and tap the blue information-icon (i) next to the connected Wi-Fi network. And are the iPad and iPhone the only two devices connected to that router? Or are there other devices that are successfully connected as well?
Answer: The network settings may be corrupt on your iPhone.
Open the Settings app and choose >> General >> Reset >> Reset Network Settings
This will wipe all previous settings for any wifi networks you've joined in the past and remove any cell tower connection history your phone has stored in memory.  Once the phone reboots it will look for the closest cell tower.  Then join your home WIFI as you normally would.
If that doesn't work its possible you may have more serious issues with your phone.  Can you join other WIFI networks?

iPhone will not connect to my wifi


Can I use a waffle iron as a Panini press?

Question: I have a basic but serviceable waffle iron I bought at a charity shop for a fiver. If I don't mind a waffle pattern on my sandwich, is there any real need for a Panini press?
Comment: check if your plates switch over to a smooth side: my sister's charity shop iron did. I noticed a sm lever/clip thing and voila
Comment: I use my cast iron waffle maker, unhinged, with a brick
Comment: @Jay: Giving it weight to press with, without having to push down on the top of a hot waffle iron.
Comment: @rfusca Whats the brick for?
Comment: You mean you guys don't have heat resistant skin? That's too bad.
Comment: Personally, I use a grill pan and a bacon press.  Works great.
Answer: Maybe! There's one big potential issue: panini presses are hinged differently. There's a bit of variation exactly how, but the effect is that the entire top can lift up, so that it can press down flat on whatever you stick in there. Waffle irons are just designed to be filled, so they hinge at the back. If your sandwich is much smaller than the waffle iron, you can put it in the front part (as far from the hinge as possible), and it won't matter too much, but if it takes up a decent fraction of the area, it'll be squeezed pretty tight at the back compared to the front. This will probably make it cook unevenly, and depending on what you've got in there, might squeeze things out.
Some panini presses also have better temperature controls than waffle irons, but that's probably not as much of a concern.
So I'd give it a shot and see how it works, plan on possibly flipping your sandwich around halfway through, and don't be too upset if it's not pretty!
(rfusca's comment above is also good - if you're able to take off the hinge, you'd avoid the whole problem.)
Comment: I'll try mini-paninis on those round sourdough loaves rather than full-sized sandwich bread :D I could just make twice as many sandwiches at half the size
Answer: I have a small waffle maker and I easily made a "waffle" toasted sandwich using two buttered pieces and bread, chopped tomatoes, cilantro and slice of mozzarella cheese. It turned out great. I slowly closed the lid and gently pressed until the bread was toasty and done. Had to wait a couple minutes for the cheese to cool but it was crunchy and yummy. I think this would be great for a quick meal anytime.
Answer: Pillsbury croissant roll dough, two triangles pinched together to make a "slice" put your cheese meat and cheese layer between two squares of dough and put that into your waffle maker.
I set mine on high, took it about 4 minutes to make it golden, another minute super crunchy and delicious.
Answer: Sure, you can this.  I use fresh croissants, sliced lengthwise, fill with scrambled eggs, your choice of sliced cheese and meat.  Place in waffle iron for 4-5 minutes.  Absolutely delicious!!!!
Comment: Your answer is acceptable, although I would provide a concrete answer to the question.  For example in this case you could say: yea I do this all the time or sure you can, this is what I do.  People like to hear that you have actually tried it or that you have seen it done or know website that depicts the act or such.


Coolant and How much

Question: I was wondering how much coolant my 2014 Chevy Spark LS needs. I have one gallon in my garage but is that enough.
Comment: Check the type of coolant you have make sure it is the correct color. Coolant is sold in 2 concentrations. Some is premixed with water in a 50/50 ratio. You add it right from the jug. The other variety requires you to mix it with water. The advantage of the premix is that the water is of known good quality and the ratio will be correct.
Answer: It has 5 US quarts coolant.
You can check HERE as a reference

Coolant and How much


Incorrectly taking something facetious seriously

Question: Is there a word for taking something that's meant tongue in cheek seriously? For example trying to prove someone wrong after they taunt you by saying "You couldn't fight your way out of a paper bag".
Answer: Perhaps something along the lines of being too literal-minded, if you're evaluating their expression at its face value instead of with its idiomatic meaning.
Answer: You might think of this as a visual pun:

visual pun When a phrase which is usually used as a metaphor is instead done, and shown as being performed literally.

For example:

In one of the The Naked Gun films the main character, Frank, says to a bartender "give me the strongest thing you've got", provoking a VERY muscular and oily man in a thong to walk in, flexing his arms. Frank decides against this, and instead asks for a "Black Russian". The bartender just looks at the camera and shakes his head.


Do monthly contact lenses have to be discarded 30 days from opening them even if they haven't been used?

Question: I'm -8.00(OD) & -7.25(OS) and thinking of getting contacts lenses for the very first time. I plan on getting the monthly disposable type. I'll be wearing them once or twice a week mostly when I head out. Since I will be using them maybe 8 times a month, and since they're designed to be used for 30 days, can I keep wearing them till they reach 30 uses, or do I need to dispose them 30 days after I've taken them out of their packaging?
Comment: This is a question for the manufacturer of the lenses since we can't be sure any answer applies equally to all lenses.
Answer: From this FAQ (question 37):

Does monthly contact lens mean 30 wears?
Monthly disposable contact lenses should be thrown away precisely 30 days after opening the blister pack, regardless of the number of times you have worn them.

Here is another article that quotes:

Also called "extended wear lenses" or "monthly contact lenses," continuous wear lenses are soft contact lenses that are approved by the FDA for up to 30 consecutive days of continuous day-and-night wear without removal.

So basically, it doesn't matter if you didn't wear the contact lenses as much; you'll still need to dispose them after 30 days of opening the package.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


What are the speeds of the Eagle and Mark IX Hawks on Space: 1999?

Question: What are the speeds of the Eagles and Hawks spacecraft in Space:1999? I have some information on space: 1999 Wiki not sure how accurate that is. On the episode Wargames the speed was given "at V 14.2" Koening replies "nearly twice the speed of our Eagles." So what speed is V 14.2?
Comment: It was approved and authorised by Gerry Anderson productions, so it's probably as canon as you'll get. Space: 1999 was not terribly consistent on numbers in general though.
Comment: The Moonbase Alpha Technical Handbook gives the speed of an Eagle as 0.15 lightspeed. How this relates to "a speed of 7" (about half of 14.2), I don't know.
Comment: Is that handbook considered canon?
Answer: In 1977 Starlog published the "Moonbase Alpha Technical Notebook". It came in a 3-ring binder, and claimed to be "the only authorized version approved by Gerry Anderson Productions and ITC Entertainment". This probably makes it as canonical as possible for anything that is not directly referenced in the episodes themselves.
The original notebook did not contain technical specifications of the Eagle and Hawk spacecraft, but these were published subsequently in Starlog so that enthusiasts could cut them out and clip them into the binder. The plans for the Eagle were published in Starlog #7 (August 1977), and for the Hawk in Starlog #32 (March 1980). I have not been able to find an online version of Starlog #7, but I believe the blueprints are the same as those given in the updated version of the Technical Notebook (the Technical Notebook Fan Edition) and the later  Moonbase Alpha Technical Operation Manual, released in 2021.

The numbers given are: the Eagle's speed 0.15 c, and the Hawk's speed 0.22 c. These numbers are also quoted by the Space:1999 wiki.
As to the lines from Wargames:

DAVID: "Alien ships approaching at speed fourteen point two."
KOENIG: "That's nearly twice the speed of our Eagles."

I think we can only speculate. But out of interest, if we set the speed of light to be 50 in some set of units, then the speed of an Eagle would be 7.5 in those units. An alien ship moving at 14.2 would indeed have a speed nearly twice that of an Eagle. This is surely over-analysing it though.
Comment: @Michael My fat fingers...
Comment: If The Expanse series taught us anything, it's that some form of basic physics apply to space travel with rockets and those Eagles aren't accelerating (and decelerating) enough to reach .15 lightspeed. But any deep analysis of Space: 1999 would surely result in space madness...
Comment: The image you've put up states 0.22c for the Hawk, but you say 0.33c in the text - am I missing something?
Answer: The Moon seemed to pass close to a star system with planets every week or every month of fictional time which elapsed on the Moon.
If the Moon was traveling at almost the speed of light, time dilation could make many years of travel between star systems seem like only days, weeks, or months on Moonbase Alpha.
If the Moon was travelling at almost the speed of light, the Eagles would need to decelerated from almost the speed of light to match velocities with a star system and land on a planet there.  Then they would have to take off and accelerate to almost the speed of light to get back to Moonbase Alpha.
So this line of deduction indicates that there is a strong probability that the eagles could accelerate to almost the speed of light.
And if the eagles had such advanced propulsion methods, I have to wonder why the people in Moonbased Alpha didn't simply use the eagles to return to Earth immediately after the Moon was blasted out of Earth orbit.
Comment: If you start trying to analyse it accurately, those kinds of velocities are going to cause some major relativistic effects that would have been visible over the course of the show.


Linking Multiple Minecraft Worlds Together

Question: Is there a way for me to be able to access one world from another using Minecraft Forge 1.10.2? (Not Bukkit)
If there isn't, is there a way for me to run Bukkit plugins in Minecraft Forge?
Comment: Are you trying to use the same character on multiple worlds, like in Terraria?
Answer: As far as I know, no. There are probably not any mods that can do this, and you cannot run bukkit plugins with forge.
But you can get bukkit plugins for a bukkit server (which are pretty easy to make) That can do the job.
You can download a craftbukkit server from here: https://getbukkit.org/craftbukkit
although if you haven't made an mc server before, you will probably have to do the port forwarding in which case you can watch a youtube video and there are some pretty helpful tutorials on the subject.
Though if you do not want to go to the trouble, then there is no other way as far as I know.
Answer: Untested! If you use a filesystem which supports symbolic links (i.e. Mac or Linux, not Windows) you should be able to link the End dimension of the two worlds. This means that the seperate worlds will share the same End. Since you're playing with mods, you don't have to use the End, you could use a mod like MystCraft, Aether or the one with dimlets and dialling (forgot what it's called, sorry) to create more dimensions, and link one of those.
"Why can't I link the Nether instead of the End? It will be a lot easier to access."
You could. But because of the way that nether portals work, you'll have a hard time. Much safer to use the End or a modded dimension.
True, you don't get to access the entire world from the other. But this is the best alternative that I can think of.
Answer: I came up with a way to do it on a server using BungeeCord. However, it needs multiple Minecraft servers to run at once.
The best way I came up with to run plugins with Forge is to use Sponge. However, it doesn't work with normal Bukkit/Spigot plugins.


Undo reset on subscript and superscript tags in CSS

Question: We use a CSS reset file that names every element from html to p to img, etc. and resets the margins, heights, sizes, etc.  A pretty standard reset file.  However, a client noticed that their  and  tags were not appearing as subscript and superscript should.  So, I removed the  and  tag references from the reset file in hopes of this fixing the problem.  It has fixed it in FireFox and Safari but it still remains in IE6 and IE7.
Is there something I'm missing here?  Are these tags inheriting their styles from another tag in the reset?  And, is there any way to use CSS to re-do whatever may have been undone to the  and  tags in the reset?  Thanks for your help.
Comment: You're still missing an occurrence of `` and ``.
Answer: sup {vertical-align: super; }
sub { vertical-align: sub; }

Answer: Since css reset may affect your font sizes, I did it this way:
sub {
    vertical-align: sub;
}
sup {
    vertical-align: super;
}
sub, sup {
    font-size: 0.5em;
    line-height: 100%;
}

Maybe you should try different vertical-align values on sub, depending on your browser.
Answer: Without seeing your reset file, it's hard to say for certain.  The easiest way to debug this is to load your reset file into an otherwise boring page, break out firebug, and see exactly what the computed style looks like.  There may also be some CSS hacks in your reset file that apply only to IE.
You could use vertical-align and font adjustments to bring back the original appearance, but I'm inclined to say it's better to just remove the rules affecting these elements if that part of the reset isn't desired.


How do I keep an S-Corporation open when it has no revenues

Question: I have an S-Corporation using which I used to do consulting work a few years back. Now, the revenues from that corporation has come down to zero. I hate to close it down in case I want to consult again. For the whole of 2011, I have been filing zero revenue tax returns to various government agencies. I would like to stop that as well but still keep the corp itself open with the option to restart everything in the future if so desired. How do I go about doing this? The S-corporation is registered in Illinois. I do not mind paying the yearly corporate filing fee of $100.00 to keep it open. Thanks.
Answer: If you have no net income or loss, you can usually get away without filing a tax return.  In Illinois, the standard is:

Filing Requirements
  You must file Form IL-1120 if you are a corporation that
  has net income or loss as defined under the IITA; or
  is qualified to do business in the state of Illinois and is required to file a federal income tax return (regardless of net income or loss).
  http://tax.illinois.gov/Businesses/TaxInformation/Income/corporate.htm

Just keep your filing fee and any business licenses up to date, paying those fees personally and not out of business money (that would make for a net loss and trigger needing a tax return).  Frankly, with how easy it is to register a new corp, especially an LLC which has many simplicity advantages from an S-corp in certain cases, you might still be better off shutting it down until that time.
Comment: I disagree: it's best to avoid mixing personal and corporate money. The corporation should pay its own fees.
Comment: Yes, completely agree, it is best to avoid whenever possible.  But, in that event, his goal won't be achieved.  That is why I state that shutting it down and then starting a new entity might be easier.  Keeping a non-running corporation afloat provides little benefit and lots of silly little complications like the one that paying to keep it afloat will beget activity to require more reporting, etc.


Minecraft- Connecting with a friend far away

Question: Me and my cousin want to connect when shes at her house and im at mine. Is there a possible way we can connect
Comment: to each others world
Answer: If you want to join another player's Minecraft world, you'll need to do a few steps.
First of all, you need to friend them. To do this, go into the "Friends" tab (After pressing the play button on the Title Screen) and select "Add friend". To add them as a friend, all you have to do is type in their Gamertag. This is pretty much what their name is in the game.
Once you do this, make sure that the other person does the same, but with your Gamertag (or your in game character name).
Then, open up a world, and they should be able to join it through the friends tab.
Answer: https://itunes.apple.com/gb/app/multiplayer-for-minecraft-pe/id609704981?mt=8
That link will send you to the app store. I used to use the app until i got a pc and started playing the pc version
Answer: You will need to setup a minecraft-pe server. You can use a free software called pocketmine https://www.pocketmine.net/
Comment: How would you use this program to solve the problem?  Just pointing at a piece of software that could do the trick, while a good start, isn't very helpful.  You need to add steps on how to use it for this to be a good answer.
Comment: And for answers to be valid here, you need to provide that information. This barely qualifies as an answer without it.
Comment: The pocket-mine index has enough details to cover every question. Looks like downvoting is a sport for you.
Comment: I am downvoting because this constitutes as a link only answer. please summarize what is in the link (particularly the instructions @Frank mentions) should the site go down and invalidate the answer (as the software can normally be found elsewhere)


Any ideas on implementation of a certain image process?

Question: I recently found this music video. While the music is mislabeled, the video part caught my eye. It seems to be transitioning between two images based on shape? I think its a fade-in/fade-out with the images being streched and transformed, but it seems to be specific on the shape in the image. This may be manual, but anybody have ideas on how one might go about something like this automatically? I was thinking it could be possible if you find the "flow" of an image by assigning pixels vectors based on their color compared to their neighbor's colors.
Answer: The first effect that appears at the video is a hue change. Later this is morphing, which is a feature based operation.
It seems like some similarity between images is used to set the morphing points (looking at the consecutive changes the points that do not move are chosen separately per transition).
The part of comparing two images (your last sentence) is used to make transition smoother, otherwise it would resemble warp. This is known as the Temporal Coherence, another technique includes Structural Similarity. Techniques yielding the best results are semi-automatic or manual due to a big complexity involved in finding smooth, minimal transition well perceived by people and also lack of good formula evaluating "how natural" transition looks like. The optimal transition calculated as minimal sum of changes does not yield nice looking morphing.
Sometimes a motion blur is added on top of the morphing (between patches) to make transition look better.
Comment: Very helpful, thank you! You wouldn't happen to know about a decent way to automate selecting control points? I tried finding some, but methods are mostly for human faces. Thinking of machine learning for something like this, not sure how I'd auto-verify for training though.
Comment: I have added two ideas of automatic morphing (not limited to the faces). As far as I know, it is still ongoing research to develop fully automatic method that works without manual post-processing. For now it does matter what you are morphing to pick the best automatic method. For the rest the standard trick is in blurring and other techniques hidding imperfections.


on cutting edge technologies / with cutting edge technologies

Question: I was making my resume and wanted to include the line "Looking to work __ cutting-edge technologies" but was confused whether to use with or on in the blank space.
Comment: The preposition could make the whole difference to what you intend to say. It is not about grammar but meaning.
Answer: The two phases are very different!
Option 1: "Looking to work WITH cutting-edge technologies" would normally mean that the employer will have such technologies available in the workplace to assist staff with their jobs.
Option 2: "Looking to work ON cutting-edge technologies" would normally mean that you want to be the developer of such technologies.
Example 1:
A surgeon applying for a surgical job is hoping that the hospital will have available leading edge scanners, robotic arms, AI diagnosis tools, etc.
Example 2:
An super-bright engineer straight out of uni is hoping that the employer will give her the opportunities to write AI diagnostic software, develop medical micro-robots, etc.
In the first example, you would use WITH.  In the second example you would use ON.
Comment: +1 for the combination of username and avatar. As well as the answer. ;)
Answer: Are you wanting to use the technology as a tool = "with"
Are you wanting to develop new technologies and be at the forefront of research = "on"


Different definitions of unit step signal

Question: While I was learning signal theory, I have come across different definitions for the unit step signal. For example.
$u(t)=\begin{cases}
1 & t\geq0\\
0 & t<0\\
\end{cases}$
$u(t)=\begin{cases}
1 & t>0\\
0 & t<0\\
\frac{1}{2} & t=0\\
\end{cases}$
$u(t)=\begin{cases}
1 & t>0\\
0 & t\leq0\\
\end{cases}$
However, in the context of LTI systems the outputs are not different.
i.e LTI systems with these inputs produce same outputs. How can one justify this?
Comment: Compute $\int_{-1}^1 u(t) \mathrm dt$ for the three definitions of $u(t)$ and report back on the difference. The integral is the output (at $t=0$) of a (non causal) short-term integrator, which is an example of an LTI system.
Comment: @Dilip-I agree what u say but that does not justify for all LTI systems.
Comment: And that is why I did not write an answer to your question but merely posted a comment. Note that what you wish to prove is false for all LTI systems that are pure delays.
Comment: @Dilip- the integral result is **1** by the way, I forgot to add. Please don't mind.
Comment: @Dilip-Thanks. So, we can say for all (LCCDE) continuous LTI systems this is true.  I mean systems whose i/p-o/p relation can be represented as Linear Constant-Coefficient Differential Equation.
Answer: The Wikipedia article on Heaviside has a section that discusses the 3 different conventions on $H(0)$:
https://en.wikipedia.org/wiki/Heaviside_step_function
Essentially, the step function is used in probability theory as well but is called something different.
I believe that the "symmetric" $H(0)=\frac{1}{2}$ version is probably most suitable in Linear Systems Theory. In discussions on the Gibbs phenomena, the truncated Fourier series interpolates discontinuities at the mid-value which in this case is $\frac{1}{2}$.
Also, if you look at the article, there are a number of limits of continuous functions like Erf, that approach the step as some parameter approaches some value. If you were to set up a physical experiment, you would never be able to realize an ideal step function, you would need infinite bandwidth, so in reality, the best you could achieve would be something like a one of those continuous functions.  $H(0)=1/2$ is a vestige of physical realizability.
Answer: $$\begin{align}
u(t) &= \begin{cases}
1 & t\geq0\\
0 & t<0\\
\end{cases} \\
\\
u(t) &= \begin{cases}
1 & t>0\\
0 & t<0\\
\tfrac{1}{2} & t=0\\
\end{cases} \\
\\
u(t) &= \begin{cases}
1 & t>0\\
0 & t\leq0\\
\end{cases}
\end{align}$$
the reason these all produce the same output when $u(t)$ is used as an input or when $u(t)$ multiplies something else that doesn't have a dirac impulse $\delta(t)$ at $t=0$, is because this expression will find itself in an integral, specifically the convolution integral.
there is zero difference between those three expressions in the integral.  there is zero area underneath the point $u(t)\Big|_{t=0}$ no matter what the value is of $u(0)$.
Comment: (+1) recently in a question I had to **sample** the unit step function $u(t)$ and I did it as $u[n]$ which didn't of course work. Then I redefined $u[0]=0.5$ then it worked ok. Of course $u(t)$ is **not a bandlimited** signal. But in some problems where one has to discretize an analog equation you find yourself in need of replacing $u(t)$ with something discrete?
Comment: usually the discrete-time unit step is $$ u[n] = \begin{cases}
1 & n \ge 0\\
0 & n < 0\\
\end{cases} \qquad n \in \mathbb{Z} \\
 $$ which works with sampling the top definition of $u(t)$  if you wanted a bandlimited continuous-time unit step, it would have to be the integral of a sinc function and would be equal to $\tfrac12$ at $t=0$.  or, i s'pose, you could reconstruct a $u(t)$ directly with the sum of sinc functions and the definition of the samples $u[n]$ above.


Can I re apply for UK visa after getting refused under V4.2 and V3.6?

Question:

What do I do to get approval to my uk visit visa?
Comment: Do you have any favorable response to their statement your letter about employment was untrue?
Answer: Okay so you were refused under V3.6 (a) and V4.2 of the Appendix V of Immigration Rules, although the 4.2 is not important here, so let us bring up V3.6 for reference as this, is the onus of your refusal:

V 3.6 An application will be refused where:
(a) false representations
  have been made or false documents or information have been submitted
  (whether or not material to the application, and whether or not to the
  applicant's knowledge);

This is a very serious refusal as this means that they have got you on providing false information which is about the worst thing you a visa applicant can do. The letter also goes to explain that any future application may refused under V3.7 of the same appendix which would attract automatic 10 year ban.
So your next application will not only fight an uphill struggle as the refusal under 3.6 will be read by the ECO who will be handling it and because of it will receive extra scrutiny, but also if it's not successful you may attract the ban. Because of that you should find a practising solicitor who specialises in such cases, this is something that will be expensive, likely well into thousands of pounds, if you can even find a solicitor who would be willing to take your case.
What you really do not want to do is file another application without such representation, and do not try to hire some "immigration specialists" or other "travel agents" who do not have a registered practice in the UK as they will likely take your money away and do nothing good for your case.
Answer: Engage an immigration solicitor, preferably from the UK, before you make any new application.
You are on a knife edge and only an expert in the field of U.K. immigration can prevent a 10 year ban now.
It won't be cheap.
Your only alternative is to forget visiting the UK for the foreseeable future.
Comment: If the letter was fake and the OP knew it (which seems to be the case here), he won't be going to the UK for the next 10 years.
Comment: @uberqe there is no ban *yet* but they will be looking for an excuse on the next application to enact one off the back of this.
Comment: @Moo, I don't think that is quite right. Under V3.7 they need no new excuse to ban the OP, the V3.6 refusal provides that (via V3.9). What they would need with the next application is evidence that the V3.6 refusal was unfounded, the ECO was mistaken in that finding and there is a perfectly reasonable explanation for the document (e.g. the person they talked to at the employer was mistaken). The only reason the OP isn't banned already is the possibility that such an explanation exists. If the document was in fact a fake then no such explanation will exist and the ban is a certainty.
Comment: @Dennis and that's the excuse they are looking for. This discussion has been had on here before - a ban is highly likely but not *guaranteed*, and there are other grounds where a ban won't be put in place (e.g. humanitarian) but that sort of application will only succeed with the backing of an immigration specialist, hence my answer.


How can I turn off automatically, say after a fixed number of cycles, a 555 in astable mode?

Question: I looked at the answer to "How to turn a 555 in astable mode into a decaying square wave" but this is really for an input to a speaker.
  I want the input to go into a counter to count the number of square wave pulses.
  I thought of using 2 555s the first one generates a square wave
the second in monostable mode generates a square wave of some length ( acting as a modulator envelope). Then combining them with an AND operator. What do you think of this idea or is there a simpler way?
   I should explain in more detail what I am trying to do. I have a 4 digit Digital Counter panel meter.

There are 2 input leads when the input is high the counter increases by 1 . It also can increase by1 if I connect the input to a switch. When the switch is closed the counter also increases by 1. What I want to do is have the counter increase by fixed number. So say the switch is closed and I want the counter to go up by 5  or see set number.
Comment: This is a rather "foreign" question. A counter can easily count and stop.  "iOS" is an Apple operating system.   Define all inputs and outputs in your question.  f, counts, driver V,I
Comment: If you are going to add a counter you might as well program a microcontroller. Do it all with one device and have complete flexibility.
Comment: For numbers less than 10 you could use a 74HC4017 to inhibit the 555, but using a micro makes a lot more sense.
Answer: You can do this with a pair of 555s, or a 556 (just two 555s in a single package), by using one as a monostable to enable the other, acting as an astable, for a period that generates the number of pulses.
If I were doing it, it's probably cheaper and simpler to program a PIC or similar to do this, there are plenty of 50 cent microcontrollers that will do this - plus you could use another pin or two for up-down adjustment of the pulse number.
Comment: Appreciate the suggestion to a pair of 555s.  I will try it and after I get it to work and ask again how to use another pin or two for up-down adjustment of the pulse number.


Why is there a SHA256 pre-compiled contract when SHA256 is also an opcode?

Question: The question is in the title :). Trying to understand why there is both an opcode and pre-compiled contract for SHA256. To execute the computation, would people canonically "CALL" into the pre-compiled contract or just use the SHA256 opcode directly?
Answer: As far as I'm aware there is no SHA256 opcode. I tried finding one but couldn't find - not listed at least in, for example, this list: https://github.com/crytic/evm-opcodes
Maybe you're mixing it up with sha3 (keccak256)? It's a different algorithm.
So if you want to use SHA256 you need to call the precompiled contract. But if you're worried about gas costs there are cheaper alternatives around as well, quick googling found at least this: Gas cost of a sha256 hash
Comment: Follow-up question: what is the reason for implementing an operation as an opcode vs as a precompiled contract? The predicted frequency of uses only? Or is there a fundamental reason why sha256 couldn't be implemented as an opcode?
Comment: please post a new question if you have a new question


Postgres: New created user can't work with database

Question: I'm trying to create a new postgres user so I don't have to give my personal credentials to another developer. I want this new user to have access to only one database (there are db and db_dev databases)
The problem is that shell_plus says that he doesn't have permissions for particular relation.
What I have done:
sudo -u postgres psql
CREATE USER guest WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE db_dev TO guest;

Then I tried:
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO guest;

But shell keeps raising this error:
>>> User.objects.all()
>>> ProgrammingError: permission denied for relation auth_user

The similar error is being raised when trying to run development server.
Do you know what to do to make it work?
Answer: Have you granted connect permission on dev_db database to your guest user and usage privilege on public schema


Check if boost is used in a binary

Question: I'm having problems writing a plugin as a dylib for a poorly documented application on osx and I'm wondering if its because of a missmatch in boost libraries used in my .dylib and the application. Does anybody know of any way to check if boost was used and if so what version?
Its a long shot I know
Answer: try
<code>$ nm some.dylib | grep boost
</code>
but I'm in doubt that you'll find an exact version...

Check if boost is used in a binary


GPU ATI Radeon Sapphire HD 6850

Question: Good evening. Put your system for the first time, what driver to put for the video card ATI Radeon Sapphire HD 6850? Thank you!
Comment: Linux comes with opensource drivers for that card. I have had the best luck with AMD cards running on the opensource driver. I suggest you keep it and not try to install the driver from the AMD website.
Answer: Your card is already supported by the open source drivers included in Elementary OS.
To install updated drivers for all hardware run the following command in a terminal and reboot your system once it completes, reference:
sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04
To get the latest stable graphics drivers (for better performance and compatibility with newer games) you can add this PPA to your system.

GPU ATI Radeon Sapphire HD 6850


Highest point from DEM

Question: I generated the next DEM abd Orthomosaic and I am interested in extract the highest point of each building, is there any workwflow that I could implement in QGIS or SAGAGIS
Answer: I think the function you are looking for is "Grid Statistics for Polygons"
However, to get there you need Polygon Features of your buildings. If you don't have them already (you can probably get them from your local administration), the easiest way probably is to digitize your buildings in QGIS.
If you a.) don't have your buildings boundaries as vector data and b.) need to do this not only for one image but for many, you need to "detect" your buildings automatically, which could be, depending on your data, a more complicated task. In this case, a slope based Raster Filter could probably do the trick, see: Is there an automatic way to find buildings in a raster file?

Highest point from DEM


How to move the Gimp plugins folder to the D drive

Question: How do I move the Gimp plugins folder to my D drive?  I don't have room on my C drive for all of the plugins that I want to use.
Answer: You can configure the folder locations for plug-ins - and other resources like patterns, palettes, brushes - in GIMP's preferences. Expand the Folders entry at the end of the preferences list, and you'll see.
Answer: You can use NTFS junctions to move files within a folder to another drive. Normally you would need to pop open a command prompt to do this, but there is a tool called SteamMover which does all the commands for you. This tool was originally intended for moving Steam games, but it works as a general purpose NTFS junction tool as well. You can retrieve it at: http://www.traynier.com/software/steammover
After you download and open it, navigate to just one level above the plugins folder on the source drive, then choose a destination directory on your alternate drive. Click on the plugins folder, then click the right arrow to move it. You'll see a command prompt window opening up and doing things - this is normal, as the program is doing all necessary commands for you. Don't interrupt it, even if it takes a little bit depending on how big of a plugin collection you have. Once it disappears, your plugins folder will be on your alternate drive. GIMP can still access them as if nothing happened.


When only caring for several algorithms relative performance, would I be better off forcing Java to never JIT compile my methods?

Question: When comparing two different algorithm implementations (thus, not caring for their absolute, but only relative performance) am I better off forcing Java to only run interpreted code?
That is, would I be better off with the <code>-Xint</code> flag on?
Answer: I don't think you'd be better disabling JIT.
Either you decide to measure the abstract, asymptotical performance (and in this case you definitely want the big-O notation), or you decide to measure the performance of a given implementation on a given machine for given input data.
If you decide to go for the latter, then it would be pointless to disable JIT: what you want is to measure performance in a realistic environment, and in a realistic environment you'd generally have JIT compilation.
Answer: From a theoretical standpoint, yes, that should guarantee that you'll get accurate results about how efficient one is compared to the other. And if one takes much less time, the result is pretty obvious.
However, it's possible in some cases (though I don't think very likely) that the algorithm you thought was slower will be more suited to JITing, and it will be faster when Java is allowed to optimize it.
The usual way to measure performance in Java is to let it "warm up" first - run the algorithm a few times (see -XX:CompileThreshold) first to get it to compile, and then time it.
Answer: Both.
If you are performing a benchmark, you want to have information of which environment settings affect performance.
You may not be able to run your algorithms with all the computer configurations available, but seeing the effect of turning on/off JIT should be considered.
Comment: Why exactly would I want to profile with a setting I'm **never** going to actually run in production? Seems completely pointless to me...
Answer: the question is...will you be disabling JIT in production as well...the art in performance analysis is ensuring you are indeed measuring the same very thing (model) that you are trying to observer, understand and optimize.
if you want to compare algorithms without actually profiling their behavior under realistic conditions (load, env, state,...) then you could use the tried and tested method of creating a cost table for each execution cost driver and then summing those costs across executions (or walkthroughs) of the test.


Issue with DataRow state in DataTable

Question: I have a very strange requirement using DataTable. I have a datatable with some columns. Nwo whenever there is any change in any of the DataRow in the datatable; then the state of DataRow is set to modified. That is OK. But for one exceptional column I don't want this behavior. I want that any change in any row for this particular column should not change the state of datarow. Please help me to solve this issue.
Answer: I am not an expert here however I don't think you can forbid the event to be triggered.
However you can change the way you handle this event.
Something like "if the modified cell is on the column XXX then leave; else continue the event handling".
hope it helps,

Issue with DataRow state in DataTable


Neutralize the Grox

Question: In the game Spore, is there a non-cheat way to neutralize the Grox, whether by allying with them, utterly defeating them, or some other method?
Answer: You can both ally with them, or utterly defeat them.
Allying with the Grox is not taken lightly in the Galactic Community, and will result in upsetting all spacefaring nations.
To be able to utterly defeat them, you will need an official mod/patch (use save-as) and have gained secret at the center of the universe. Also, This will take some time, as they have have 2400 systems (a total of about 5000 planets) at the start of the game.
more details (including spoilers and exact methods) can be found at the Grok entry in the Spore Wiki
Answer: There are three ways you can kill all the Grox (though all 3 of them are very time consuming).

Buy out all the Grox planets using trade routes.
Improve the T-Score of all their planets to at least one (They will start a war with you, but they are at war with you when you first meet them, so. . .).
Destroy all their planets using military force (just like #2, they will start a war with you, but of course, they probably already are).

Neutralize the Grox


To what extent do gonads affect differences in gendered behaviour?

Question: I'm not sure whether this question makes sense, but someone said that they result in gender differentiation on an organisational level in the brain. I'm wondering how important these changes are, in terms of magnitude of average differences in neural structure between males and females?
Comment: Can you specify whether you refer to humans? Because in different species (e.g. lizards vs mosquitoes) the importance of the gonads on behaviour changes  quite dramatically.
Comment: @havefun I was referring to humans, but would you be able to explain the other factors involved for lizards - and how the gonadal hormones play a role?
Answer: Yes
During embryonic life,there is formation of new synapses by a process termed as exuberant synaptogenesis.
Their differential formation in the males and females could be due to the effect produced by the gene PCDH11X/Y located in the allosomes.

PCDH11Y is a gene unique to human males that encodes Protocadherin 11Y, aprotein that guides the development of nerve cells. PCDH11X, located on the X chromosome, is common, in both sexes, to humans and our nearest relative, thechimpanzee; however, PCDH11Y, located on the Y chromosome, is unique to males.[3]
  ...PCDH11X/Y are cadherin family genes. They make proteins, involved in signalling, that attach to the surface of nerve cells.[4] PCDH11X and PCDH11Y, respond in different ways to Retinoic acid, a chemical involved in the development of embryos. The acid stimulates the activity of PCDH11Y but suppresses PCDH11X. This is likely one of the explanations for the differences between the brains of men and women.[3]
  [source]

About the parts of the brain which are deemed"sexually dimorphised" a few of them are:
1.hemispherical differences due to which inter hemispherical functioning is better is females
 whereas intra hemispherical functioning in males
2.hippocampal and amygdaloid laterisation

on average males had larger grey matter volume in bilateral amygdalae,hippocampi, anterior parahippocampal gyri, posterior cingulate gyri, precuneus,putamen and temporal poles, areas in the left posterior and anterior cingulate gyri
  ...females on average had larger grey matter volume at the rightfrontal pole, inferior and middle frontal gyri, pars triangularis, planum temporale/parietal operculum, anterior cingulate gyrus, insular cortex, and Heschl's gyrus; bilateral thalami andprecuneus; the left parahippocampal gyrus and lateral occipital cortex
  Source:Neuroscience of sex differences

Furthur,since synaptogenesis may occur throughout one's lifespan perhaps not as greatly as during embryonic life and as receptors for gonadal hormones are present in the brain it can be said that the gonads may affect the phenomenon,though mainly after puberty when their concentrations are higher than during childhood.
Comment: Regarding the third Wikipedia link, it would be best if you could include some significant passages. Links die, or the content might be removed, and it really is best to have relevant content available in the answer itself. You don't have to go overboard, but making the answer a bit lengthy isn't a problem if it's a _good_ answer.
Comment: @Harris Weinstein thank u for ur suggestion..i will brief them.hope it helps.


Scheduled Job Type C

Question: I can see a job of type "C" running in my Prod org and its id begins with "02L". Unfortunately I can not find what 02L means from here, so it isn't something standard, and there is no mention of a job type C here.
Is it a missed documentation?
Can anyone throw some light on this?
Comment: Daniel Ballinger has a fantastic resource that lists obscure ID prefixes, which you'll find [here](https://www.fishofprey.com/2011/09/obscure-salesforce-object-key-prefixes.html#02L) (link set to highlight 02L). This is "DataflowVersion /MH_CUSTOMER_CRITERION". This makes me wonder if this is a scheduled execution for a flow?
Comment: Thanks for the link @Phil W, very helpful. I am not sure if it is a flow, all the flows we have are coming up as type "Scheduled Flow" in Scheduled Job List
Answer: My best guess is that this is an internal type that Salesforce uses.
I've tried to divine this by the following.
Describe Picklist Values
for(PicklistEntry value: CronJobDetail.JobType.getDescribe().getPicklistValues()) {
    System.debug(value.getValue()+':'+value.getLabel());
}

Value "C" doesn't appear in my list (but try it in your org, it might work).
Id Sniffing
I've tried everything from my bag of tricks in this answer, and nothing turns up.
So, it must be something internal to Salesforce, or related to a feature you've enabled, or might even be a pilot/prerelease feature. Unfortunately, I don't think we have much more we can offer you.
However, you may not want to accept this answer quite yet; maybe someone can come up with an alternative solution or might happen to know more. You might also want to contact support if you need to know more, they might be able to help.
Comment: Thanks @sfdcfox, both for this answer and the link to the other one, very helpful. as for PicklistEntries, my org too returns only the documented ones, i.e. till A, Reporting Notification. I have now raised a case with Salesforce.
Answer: It stands for Scheduled ELT Dataflow and is related to Dataflow for Tableau CRM. This was documented under JobType for CronJobDetail, but seems to have disappeared from being mentioned after API 46.
Answer: We have a similar thing in our Salsforce org.  Looking at the job create date and previous/next run time this appears to be tied to data refreshes that happen in the Tableau CRM Analytics Studio (https://[your org domain].lightning.force.com/analytics/home).
We don't really use it, but the "B2B Marketing Analytics App", which uses Tableau CRM Analytics Studio, was enabled as part of our Pardot implementation.

Scheduled Job Type C


Row/Column operations of a parity check/generator matrix for a linear code

Question: Given a linear code C with generator matrix G and parity matrix H. Would permuting rows and/or columns of these matricies produce a different linear code?
I am under the impression that the resulting linear code would be equivalent to the original linear code.
However when using Sage Maths, the set of codewords generated by the generator matrix seem to be different.
Could anyone explain what is going?
Answer: Some of this is going to depend on what definitions you are using. Hill, A First Course in Coding Theory, page 49, says a generator matrix for a linear code is a matrix whose rows form a basis for the code. With that definition, if you permute the rows of a generator matrix, you do not affect the code, but if you permute the columns then in general you will get a different code.
But you also use the word, "equivalent," in your question. Two codes can be different, but still be equivalent. Indeed, on the next page of Hill, Theorem 5.4 asserts that whether you permute the rows or the columns, you still get an equivalent code.
Comment: How do you define equivalent? When i permute the rows, I get the same set of codewords, however if i permute the columns, I get very different sets of codewords
Comment: Hill says "two linear codes over GF$(q)$ are called equivalent if one can be obtained from the other by a combination of operations of the following types: (A) permutation of the positions of the code; (B) multiplication of the symbols appearing in a fixed position by a non-zero scalar."
Comment: In order to obtain a parity check matrix from a generator, it is required to first put the generator in the standard form [I _k | P], then it follows the parity check matrix is [-P^T | I_n-k]. Should the conversion to standard form be done using purely row operations to preserve the code? Would column operations lead to an incorrect parity check matrix?
Comment: Column operations would (in general) lead to a different code. A parity check matrix for one code can't be a parity check matrix for a different code, can it? But if you have more questions, you should post them as questions, not as comments on an answer.
Answer: Consider the (rather silly) generator matrix $G=\pmatrix{ 1 &0 &0 \\ 0 & 1 & 0}$. This corresponds to a $(3,2)$ linear code, which has 4 codewords of length 3. These codewords correspond to all the posible 2-binary tuples, plus a trailing zero.
If you permute the rows (or, also, make a linear  combination), the resulting code is the same? Well, the mapping of raw inputs to codewords is not the same (in this same, it's not the same code), but the set of codewords (the codebook) is the same (in this sense, it's the same code: usually these are called "equivalent" codes).
What if you permute the columnsof $G$? This reflects on a permutation of the bits positions in the codewords. So the codebooks are different, and the codes are not "equivalent". However, many properties of the code (eg, distance) are the same, the permutation is like a relabelling of the coordinates axis. For a channel without memory (the time index does not matter), the codes could still be consider equivalent. In general, they are not considered equivalent. (For example, column permutation would not preserve cyclically; and burst errors detection would be altered)
Comment: According to the definition given in the Hill textbook, as quoted in a comment on my answer, permuting the columns *does* yield an equivalent code. But I'm not up-to-date on these things, and perhaps Hill's is a minority opinion.
Comment: Thanks for the explanation! From what you say, does this imply that not all Codes / codebooks have a standard form generator matrix? i.e. a matrix [I_k | P] where I_k is the k-by-k identity matrix


Using JDBCTemplate with a Hibernate SessionFactory?

Question: We have a Spring/Hibernate app and would like to add a small amount of JDBC for reasons involving performance and development time.  I can make this dao subclass HibernateDaoSupport and use the session's connection to perform my JDBC, but I'd rather use JdbcTemplate.  JdbcTemplate, however is initialized using a java.sql.Datasource.  How can I use my existing Hibernate SessionFactory to initialize it?
Answer: Aren't you required to provide a DataSource to the SessionFactory implementation?  Why don't you wire that in to the JDBC Template?
Which SessionFactory implementation are you using?  If you're using the Spring implementations, see AbstractSessionFactoryBean.html#getDataSource()
Comment: What is your custom SessionFactoryBean doing to build the SessionFactory?

In the worst case, are you at least providing the JDBC driver name and connection URL in the hibernate properties? If so, you should be able to instantiate a DataSource from that.  Better yet, build a DataSource and share it between the SessionFactoryBean and the JDBCTemplate
Comment: Our session factory was created using AnnotationSessionFactoryBean initialized with hibernate properties.  We didn't create and initialize a DataSource. I can't pull the DataSource from the SessionFactoryBean because I don't get to keep a reference to it:

...
hibernateSessionFactory is a SessionFactory.  How would I get a reference to the SessionFactoryBean?
Comment: The custom FactoryBean is unreleated to this issue.  It's a subclass of AnnotationSessionFactoryBean. I don't wan't to introduce another datasource for maintaince reasons, and extracting a datasource from our hibernate configuration seems like a lot of work for what I need.  In retrospect, it should have been created that way in the first place, but the app was essentially converted to Spring after the fact.  I'm just going to use hibernate's createSQLQuery() rather than JdbcTemplate.  Thanks for the help.
Answer: You can always use a hibernate session's doWork method - this gives you a java.sql.Connection. You can use this connection to construct a construct a SingleConnectionDataSource (note: the second argument should always be true as you don't want to close the underlying connection) and pass this datasource to your JDBCTemplate...
Answer:
"extracting a datasource from our
  hibernate configuration seems like a
  lot of work for what I need"

I don't see why it would take that much work. It's just a matter of creating, cut-and-copying a couple of tags and properties.
For example:
<code><bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
      <property name="dataSource">
          <ref bean="dataSource"/>
      </property>
...
</bean>
</code>

"Which SessionFactory implementation
  are you using? If you're using the
  Spring implementations, see
  AbstractSessionFactoryBean.html#getDataSource()"

Apparently, getDataSource() is only available for Spring 2.5. Here's the reference: Click here
Spring 2.0 doesn't have the getDataSource(). Here's the reference: Click here

Our session factory was created using
  AnnotationSessionFactoryBean
  initialized with hibernate properties
  ...
  hibernateSessionFactory is a
  SessionFactory. How would I get a
  reference to the SessionFactoryBean?

I'm wondering why you used a SessionFactory instead of a LocalSessionFactoryBean which is a subclass of AnnotationSessionFactoryBean?
Isn't the line bean id="hibernateSessionFactory" references the SessionFactoryBean already?
Comment: I guess "a lot of work" is a relative term. In my case, I would need to create a c3p0-based data source and translate all our settings from the original properties file to this one. Property names change on some settings between Hibernate and c3p0, so I would need to verify them all. It would probably take about an hour to do and verify, but considering the gain is simply use of JDBCTemplate in one dao, it's not worth the time.

AnnotationSessionFactoryBean subclasses LocalSessionFactoryBean.

The reference to the session factory doesn't help me initialize JDBCTemplate.  I need the datasource.


Fundamental frequency of a material and its Young's modulus

Question: I wonder if there is a connection between fundamental frequency and Young's modulus of a material. For example, how to calculate the Young's modulus of a glass bar by knowing its frequency spectrum?
Answer: The frequency is a function of the dimensions of the bar and its Young's modulus.
You need to know what mode of oscillation you are exciting in your bar - there is a hug difference between the flexural and longitudinal modes.
If the rod is bending, you can find the formulas here. The derivation goes on and on... but you should be able to use the formula on the first page (for free-free):
$$f = \frac{1}{2\pi}\left(\frac{22.373}{L^2}\right)\sqrt{\frac{EI}{\rho}}$$
In this formula, $I$ is the second moment of area of the rod - see the wiki article for an explanation and to find the appropriate value for the shape of your rod.
If you have a higher mode, you can find the position of two fixed nodes and use the fixed-fixed equation instead.
And if you have longitudinal vibration, the answer is much simpler - you just have to look at the transit time of the sound wave from end to end. One round trip corresponds to the fundamental frequency, so
$$f = \frac{v}{2L} = \sqrt{\frac{E}{4L^2\rho}}\\
E = \rho\; \left(\;2\;L\;f\;\right)^2$$
Comment: Closely related, the classic way to measure crystal elastic constants is ultrasound resonances along different crystal orientations.
Comment: This is a good answer, but I think it would be good to also point out that, depending on the geometry and the mode of vibration, moduli other than Young's modulus (e.g. the shear and uniaxial strain moduli, which for isotropic materials can be expressed in terms of E and the Poisson ratio) will come into play. There's a lot more to material stiffness than Young's modulus. Specifically, if the aspect ratio is not much more than 1, both these expressions have problems.


How does an electron absorb or emit light?

Question: It's a common understanding that atoms emit or absorb light when the energy of the photons is equal to the the difference in the energy levels in the atom. What I don't understand is how does an electron absorb light inside an atom? Is it that the atom as a whole absorbs light or the individual electrons absorb the light packets?
Also I would like to know, what does one mean when you say that an electron absorbs photon. How does an electron absorb a photon??
Comment: Electrons do not absorb light.   Bound states of electrons and nuclei absorb light.  That's a big difference
Comment: From what I know, energy goes back the the field where it comes from.
Comment: I don't think we can really say "how" it happens.  We can describe the atom before and after the absorption.   In between is not well described.
Comment: @GeorgeHerold Do you mean *I don't think we can really say "how" it happens, **currently***? By the improving techniques and technology it may be possible to understand how.
Comment: An atom is a system with an electrons and a nucleus, whereby the electrons are bound to the nucleus.  This is much like a mass attached to a spring, and in this system there is  a discrete resonance.  The atom is very similar and has a resonance.  The key difference relates to certain quantized parameters (angular momentum, etc) that complicate things.
Answer: An atom is nothing but a bounded state of electrons and a positively charged core called nucleus. The electrons in the atom are in bound state and so their energy levels are quantized. Also, it is possible to have quantized rotational and vibrational energy levels of the molecules. The way in which they differ is in the difference in the energy characterizing the transition from one state to another.

Possible ways in which a photon is absorbed by an atom or a molecule

If the energy level of the incoming photon is such that the electrons can have a transition from a state to some higher permissible state, then the photon energy level will be in the visible or ultraviolet range and we make use of this principle in electronic spectroscopy.
Suppose, a particular electron is in the energy state with energy eigenvalue $E_i$. There exists a higher energy level $E_f$. If the energy levels of the electron bound states are such that it precisely matches with the energy of the photon:  $h\nu=E_f-E_i$, then the electron will get excited to the energy state $E_f$.
Now, if the incident photon energy matches the difference in the vibrational energy levels of any pair of states of the molecule, then it can cause transition from that vibrational energy state to the higher energy state. This energy usually lies in the infrared region and the technique is used in infrared spectroscopy.
For example, in the case of diatomic molecules, the vibrational energy levels are quantized and in a good sense they can be approximated to that of a harmonic oscillator: $E_n=\left(n+\frac{1}{2}\right)\bar{h}\omega$.  So, if the photon energy is such that $h\nu=E_f-E_i$, the electron transits from the state $E_i$ to $E_f$, where $E_i$ and $E_f$ are given by the above equation of the harmonic oscillator and the states are defined by the quantum number $n=i$ and $n=f$.
Now, if the absorption of a photon can only affect the rotational energy levels of the molecule, then the absorbed photon will be in the microwave region. The spectroscopic technique making use of this principle is the microwave spectroscopy.
For example, the rotational energy levels of a diatomic molecule are given by: $\displaystyle{E_j=\frac{j(j+1){\bar{h}}^2}{2I}}$, where $I$ is the moment of inertia and $j$ is the angular momentum quantum number.  In such a case, we can write: $h\nu=E_f-E_i$ and the bound state absorbs the photon and will get excited to the state with energy $E_f$, with $E_f$ and $E_i$ determined by the quantum number $j=f$ and $j=i$.
Now, the energy can be absorbed by the nuclei also. It can be elastic nuclei scattering (analog to very low energy Compton scattering by an electron. In this process, a photon interacts with a nucleon in such a manner that a photon is re-emitted with the same energy), inelastic nuclei scattering (the nucleus is raised to an excited level by absorbing a photon. The excited nucleus subsequently de-excites by emitting a photon of equal or lower energy) and Delbruck scattering (the phenomenon of photon scattering by the Coulomb field of a nucleus, also called nuclear potential scattering, which can be thought of as virtual pair production in the field of the nucleus. i.e., pair production followed by annihilation of the created pair). However, these processes are negligible in photon interactions.

Conclusion:

Absorption of a photon will occur only when the quantum energy of the photon precisely matches the energy gap between the initial and final states of the system. (the atom or a molecule as a whole) i.e., by the absorption of a photon, the system could access to some higher permissible quantum mechanical energy state. If there is no pair of energy states such that the photon energy can elevate the system from the lower to the upper energy state, then the matter will be transparent to that radiation.
So, if any of the above types of energy transition take place, that will affect the quantum state of the system as a whole (transits the system from one state to another). So one could say, as @annav pointed out, it is the atom (or the molecule) that absorbs the radiation and changes the energy levels of its constituent particles, depending on the energy absorbed. Anyway, a change in energy level of the electron, or rotational or vibrational energy levels of the molecules can be seen as changing the quantum state of the molecule. So, it's better to stick with the concept of the molecule as a whole absorbs the energy and changes its state to some higher energy state by changing the quantum state of its constituent particles.
Comment: I think it confuses the issue to keep talking of an electron absorbing the photon.  The whole atom absorbs the energy. Take a hydrogen atom absorbing a photon. You could as well say that the proton absorbed the pboton, but it would be equally fuzzy. In my opinion one should stress that the WHOLE ATOM absorbs the photon and changes energy level for its constituent particles.
Comment: I would add in the first phrase "Because the mass of the nucleus of an atom, even of a simple hydrogen atom, is more than a thousand times larger  than the electron mass, it is usual to describe atoms as the electrons occupying the energy levels, even though the energy levels belong to the total atom and the photon transition happens with the total atom."  or some such. I agree that we talk of "electron orbitals" again assuming a stationary nucleus, so it is not wrong, just needs clarification. One should be aware that it is the kinematics of the center of mass that gives a bias to electrons.
Comment: "Absorption of a photon will occur only when the quantum energy of the photon precisely matches the energy gap between the initial and final states", this phrase has caused misunderstanding. Transitions have finite widths for a number of reasons.
Comment: I understand that...!! The main point is, what do you mean when you say that an electron absorbs the photon?? How does an electron absorbs photon??
Comment: @annav: Is there anything that I need to add or remove in my answer. I realize an atom as a bound state of it's constituent particles.  But I'am new to the idea that a proton in the nucleus could get interacted with a photon. I knew that it works if the proton is isolated, because a proton is nothing ut a point charge. But inside the nucleus, is that possible?
Comment: @RobJeffries: I know, but I'am afraid, in that sense, I have to describe all the possible ways in which matter interact with radiation, which is too broad to answer
Answer: I will leave others to comment on the detailed mechanisms involved - all of which are simply mathematical models that we use to understand the process and which can be accessed at various levels of complexity.
What is certainly true though is that an isolated electron cannot completely absorb a photon (partial absorption is possible and is known as Compton Scattering). There is just no way that both energy and momentum could be conserved in such a process. Therefore the absorption of a photon takes place in the context of the atom as a whole, where the various conservation laws can be satisfied. At its simplest it is perhaps best to think of the atom as an oscillator with discrete energy levels that can be excited or de-excited between these modes by interacting with the electromagnetic field of the light (or alternatively by absorbing or emitting the energy of the photon).
Comment: Compton scattering is an inelastic scattering, even though the collision is elastic. It can be visualized a an elastic collision between between two particles. But how does this account for absorption of a photon? Scattering and absorption are two different processes.
Comment: @Unnikrishnan Compton scattering is the "partial absorption" of a photon by an electron -  something that you said cannot occur. It does not address the question asked, which is why I wrote it in brackets. However, you have also said that the electron absorbs a photon, failing to correct the OPs misconception. The electron does not and cannot absorb a photon.
Comment: But I still don't understand, how scattering$\implies$ partial absorption
Comment: I haven't mentioned electron can absorb photon. I stated electron bound states absorb photon
Answer: From a physical particle perspective, an electron (free or bound to an atom) cannot and does not absorb a photon. The atom absorbs the photon and takes its kinetic energy. That kinetic energy causes increased vibration of the atom which can emit another photon and/or emit a loosely held/ bound electron and/or that vibration can be transmitted to nearby atoms.
Answer: The electron absorbs energy only when it exactly matches with its energy gap you can apply here conservation of momentum. The wavelength of photon matches nearly with that of electron that's why you can say that electron absorbs energy.
Comment: It's not the case that photon and electron wavelengths must "match" for an energy exchange to occur.
Comment: "Fall in its range" Are you saying that the deBroglie wavelength of an electron should be approximately close to that of an incoming photon if the electron is going to absorb the photon? That's not true. The energy corresponding to the photon's wavelength must be at least as much as the electron needs to be excited to the next energy level. In general, you'll find that electrons can absorb photons with wavelengths much longer than their deBroglie wavelength
Comment: I m not saying that it must match but it should fall in its range
Comment: Sorry for my comment i agree with u Jim


Is it Gerund or present participle?

Question: 1) Setting goal may appear easy but it is quite challenging.
2) Quantifying goals provide specific ways to track progress 3)  Finding the right footing,precisely mastering the skills and getting to the next place,all depend on how we approach and tackle the problem.                                                  4)I like reading more than writing.                                                5)We are planning to execute our strategies.
Comment: I wouldn't worry too much about whether they are gerunds or present participles. Modern grammar doesn't use these terms, but simply lumps them together and calls them "gerund-participles". All the _ing_ forms in your examples are verbs (except "challenging" which is an adjective); that's really all you need to know.
Answer: 1) "Setting" is a gerund. "challenging" is an adjective.
2) "Quantifying" is a gerund.
3) "Finding", "mastering" and "getting" are all gerunds. "footing" is just a noun.
4) "reading" and "writing" are both gerunds.
5) "planning" is a present participle.

Is it Gerund or present participle?


Beaker and suspended ball weight measured by spring balance

Question: Can someone explain to me why when we suspended a ball with a density greater than that of water in water by the help of a string why is the weight measured by the spring balance=Weight of beaker + Bouyant force acting on the ball . Why shouldn't it be weight of beaker + Weight of ball - Bouyant force on the ball.
Comment: What result would you expect if you had exactly the same set-up but without the water, so buoyancy force was effectively zero ?
Answer: When the ball is suspended, the weight of the ball is balanced by the tension in the string and the buoyancy force. Here buoyancy force on the ball has an equal and opposite reaction on the water itself thus this extra force must be accounted for.

Why shouldn't it be weight of beaker + Weight of ball - Bouyant force on the ball

This would be the case if the ball was not suspended and is at equilibrium at the bottom of the container . The apparent weight of the ball will be "Weight of ball - Bouyant force on the ball" The apparent weight + the container weight is the result you have arrived to.
Comment: This helps a lot thanks but one more thing I don't understand is that wouldn't there also be a normal force acting in the block due to water which wil have a equal and opposite reaction as well?
Comment: The normal force is equal in magnitude to the apparent weight whose equivalent opposite force increases the reading on the scale. But note we also have to account for the buoyant force on the container thus the overall effect will be the weight of the container +weight of the ball. Should have clarified in the answer mistake on my side. Ping me if anything is still not clear.
Answer: No matter how much denser the ball is than the water, when held submerged but not sank to the bottom, the weight of the beaker on a scale will only increase by the weight of the volume of water the ball displaces, its buoyant force,  per Archimedes principle of buoyancy. The tension on the string will support the extra amount of the ball's weight that is greater than that of the water displaced. You can see that the water level rises when the ball is submerged. It rises by the amount it would rise if the same volume of water as the ball's volume was added instead of the ball.
Answer: Newton's Third Law: action begets reaction.
As the water exerts a buoyant force on the ball, the water exerts an opposite force on the beaker, thus scales. It's a classic part of density determination for irregularly shaped bodies.