What explanatory value does a prosodic word have?

Question: I understand that it is a prosodic word that dominates feet in a classic hierarchy -- but why do we need to refer to a prosodic word rather than just a word? I know they are different units, but what's the evidence that the "prosodic word" is something different than what we think of as a "word" (at least in European languages)?
Answer: This is "the big question", whether (and why) to distinguish a Phonological Word = Prosodic Word (henceforth Pwd), from any other kind. Is it the same as a Morphological Word or a Syntactic Word? Indeed, is "word" the same in syntax and morphology? (Is syntax different from morphology?). Is the construct "word" actually necessary in syntax, morphology or phonology?
The weakest (most unmotivated) of these distinctions is a difference between word in the morphological versus syntactic senses. In the old days, there were rewrite rules that turned N into "cat, dog, cabbage", and ones that introduced affixes ("→ have+en"), and it was all about rules inserting things. Then some guy came up with the idea of generalized "lexical insertion" so that you don't have rules that rewrite N as "cabbage", but you do have rules that introduce grammatical affixes. The main impediment to a clear understanding of morphology-syntax relations was the murkiness of the theory of morpho-syntactic features. Rather than assigning a syntactic terminal a feature-like property (such as "subject marking") and letting a word-formation process cash that out as an affix, we had syntactic rules that actually manipulated affixes, which could hop. Focusing on theories of the 80's and 90's, the unresolved question is "what the heck is a word, in syntax, and what about morphology".
Clitics played a major role in this debate. There are very many cases where some word, especially a verb, has an affix that seems to serve a syntactic function so it "must" be a syntactic unit of its own, and yet it seems clear that the stuff is part of some other word. Object pronouns are a classic example, where in a number of languages, verbs are inflected for object in some way, with stuff that is "on" the verb (example: Lushootseed ɬušudxʷ "will see", ɬušudubicid "will see you", where the pronoun object triggers inflectional allomorphy – I do not think that "clitic" is the right analysis here, but this is a good illustration of the kind of fact that leads to "Pwd"). English possessive 's is another example. The basic problem is that you have an affix whose distribution suggests (for some theories) that the thing is really a syntactic terminal, like an "object", but by other standards (especially the "subject to allomorphy" test) it seems to act like a morpheme within something else (word, obviously, since morphology puts together words, not combinations of words)
A proffered solution (mid 80's vintage) to the general problem is to say that there is a word in syntax, where you state the sentence-level distribution of "words", and then sometimes two elements (especially clitics plus "real" words) are restructured into a phonological construct Pwd. The transition to this thinking does involve many more entities, so we had Pwds and Clitic Groups for a moment, but it was eventually concluded that we could dispose of some of that baggage, and simply have Pwds, which you get when "other stuff" like clitics are combined with real words.
(I pause to mention that there is a solution to the clitic problem in HPSG, promulgated by Phil Miller, which incorporates the notion of "edge feature", whereby a feature goes down some edge of a constituent. English possessive 's is an example: is end up at the right edge of the relevant NP, and does not care what kind of word it is realized on, and that is why you have possessive marking on verbs in phrases like "The man who I helped's house is burning".)
In phonology, people got enamoured of the idea of building structure on top of phonemes, so we liked the idea of a representational thing that corresponds to "word". It had to be a special phonological thing, given the (mistaken) axiom that phonology has no access to grammatical structure. Consequently, lots of kinds of structure was posited. Inkelas in her dissertation, for example, gives a representational reconstruction of Lexical Phonology level ordering, where the stuff that is "Level 1" is really stuff dominated by α, stuff that is "Level 2" is dominated by β, and so on. McCarthy & Prince in their account of Axininca Campa ("Prosodic Morphology II") profitably exploit the idea of manipulating Pwd boundaries, and people soon realized that you can have all sorts of constituent breaks inside a "word" where the edges are nudged this way and that to satisfy some constraint. The literature on Bantu is replete with numerous named constituents, like the Stem, Macrostem, Derivational Stem, Inflectional Stem and so on.
There grew to be an "enough is enough" feeling, there being a problem with so many constituents. Ito & Mester moved things in the right general direction, by basically getting rid of most of the structural distinctions, having just "Word" and "Foot" (and syllable and mora), but allowing these to be recursive – and in a laudible move, did not posit a bar-level distinction (W0, W', Wmax) as a thing in the representation. Instead, rules / constraints might mention that the things are "in the same minimal W", or that the W is "a top W" (kind of an A-over-A for phonology), and that's it. The evidence is pretty decent that you don't need a big inventory of structures, you just need recursion.
We understand now that "Phonological word" is, simply, "word", and there isn't some other sense of "word" out there. There is a recognition that the syntactic relationship between word and what might influence the form of a word is complicated. The syntactic need for a special phonological concept of word as existed in the 80's has pretty much gone away, in the face of Minimalism now accepting the concept of features, with Derivation by Phase, and nano-syntactic analysis (to the extent that these are accepted).
So yeah, there isn't any need for the distinction anymore.
Answer: A normal word is actually very hard to define. Do we write "dog house" or "doghouse"? (Or use a hyphen?) And of relevance to other languages more than English, do particles or clitics get written as separate words, or do they get joined together? Sometimes even affixes can be written as separate words.
A phonological word has a clear and relatively uncontroversial definition. (Though edge cases in many languages will of course be debated.) None of these orthographic conventions, derived over the centuries when the words in question may not even have been pronounced the same, are relevant.
(And I think, though I'm not certain, that clitics, though they fit in between words and affixes from a morphosynactic perspective are just simple parts of phonological words.)
Comment: So the fact that hotdog  is one word and hot dog is two words is explicable with reference to phonological words but not lexical words?


Does number of backup tables hinder performance

Question: Our main database (MySQL) has about 50 tables with about 2 million records each, many of the columns are indexed.
Before doing any major change, we either copy the entire DB under a new name like "DB_MAIN_Nov112018" and just leave it there as an online backup/copy or we copy individual tables and use the same principle.
Does this hurt the performance of the database server as it has to do the indexing of the original DB as well as the many tables and databases that are used as backups?
Comment: Use mysqldump to create backups rather than making copies of the databases on the running server. If you need to restore things it's easy and quick to use the backups that you created.
Comment: Do you ask copying hurts performance or doing back up ?
Comment: The question is a little strange... Any (absolutely any!) additional operation (ever not DBServer-related) decreases performance.
Answer: As long as the database and its tables and many indexes are just sitting there, there is essentially no harm:

The extra db and tables have no impact on your ordinary queries.
Some meta operation involving the information_schema will notice them.
The copy takes disk space.  (So would a dump.)

An advantage over a dump:  You can quickly perform a query on the old copy.


Baseboard water Heater

Question: Gas hot water boiler not turning on past pilot light and click on thermostat for more heat. The flame on the furnace does not turn on. Changed out the Thermocoupler, After starting the pilot light, initially the flames came on, but did not stay on. and never turned on again.
Comment: What is the make and model of the boiler?
Answer: Thermocouples produce a minute amount of current with a minuscule voltage.  The connection to the gas valve where the new thermocouple is installed needs to be clean and free of debris or it will not be reliable.  Take the connection apart, carefully clean the contacts, and put it back together.  That may solve the problem.

Baseboard water Heater


It is not better to include in Documentation examples from Stack Overflow or create a linking system?

Question: I think it can be more useful to have the documentation to complete all the answers from Stack Overflow, not to replace them. Answers which were improved and viewed by a lot of users are more useful and complex than a quick new example can be.
What you think about this? Should it be permitted to add a new topic without example, if a link is included to a Stack Overflow solved question/problem?
Answer: I believe it would be ideal.
Most high level SO users can deal without the documentation. It will rarely teach them something new. Noobs, however, such as myself could benefit greatly from reading answers that deal with specific parts of the documentation.
Some of the answers may be inside questions that wouldn't be found unless they were explicitly shown in the section of documentation they belong to.


How to chose the correct hydraulic disc brake rotor size for touring bike?

Question: I have ordered a Shimano Deore M6000 disc brake set. What rotor size should I chose for my touring bike?
I am 85 kg and my bike is approximately 15-20 kg.
Comment: You said your bike originally had V-brakes (i.e., rim brakes), does the frame have mounts for disc brakes?  It is fairly rare for frames to have mountings for both disc and rim brakes
Comment: I assume you are building a bike up from a frame so do not have an existing disc.  What mass of luggage are you planning to put on the bike?
Comment: Maximum 5-10 kg.
I have a working bike, but I am gonna remove my V-brake and use disc brake instead.
Comment: as a point of reference, my tourer was sold with 160mm rotors for its *cable* discs and fitted with sintered pads as stock.  Stopping power is excellent (unless they get oily muck on them but that's another story) and wear is good.  At the bottom of a long descent stuck behind cars they can get really rather hot (sizzling if splashed with water, my plans to measure the temperature so far haven't been done)
Comment: Related  https://bicycles.stackexchange.com/questions/58770/how-do-i-know-what-brake-rotors-to-get-for-my-bike      possibly a dupe if you squint.
Answer: There's no one right answer.
Most get by with 160 front and rear. There can be some virtue in going to 180, especially in front, to help manage heat and ensure a good power level when descending mountains heavily loaded, if that's going to be a thing you do much. Not every frame/fork is strong enough or has clearance for 180, however. The forks on more MTB-ish/adventure/bikepacking type bikes will often be able to handle it, while more road type forks may chatter and flex too much.
Running 140 either front or back, as often see on road or cross bikes, would generally be not adequate for loaded use.
Comment: I've tried to use 180 rotor on my XC30 fork, but noticed massive vibration when braking (so yes, the fork is not string enough), so switched back to 160


Belize visa on arrival from the western border

Question: I am entering Belize from it western border with Guatemala. I have USA multiple entry visa, which I know means I get I can get a Belize visa on arrival (with 50 USD fee). However, is that possible from the border as well?
Comment: You mean as opposed to entering by air or sea? Or are you asking if the border crossing has an actual checkpoint and immigration office where you can get a visa?
Comment: I once crossed that border in a group, and if I remember correctly it was handled on-site.
Comment: @Flimzy Yes exactly. Or in other words I just wanted to make sure it can be handled there and I don't get turned back.
Comment: @Bernhard That is good enough for me. Thank you.
Comment: @EEBB Please cross check this, I am not 100% sure (otherwise I would have posted as an answer)
Comment: @EEBB what citizenship are you?
Answer: It is entirely possible to get a visa on arrival at the border, driving / crossing in from Guatemala.
However, note that for many countries, no visa is required for entrance. You can get a 90 day stay stamp basically without question.
For examples, stories, and pictures of the whole process, including some problems with border hopping, some bloggers have posted their experiences online, reenforcing that you can indeed get a visa on arrival.  Note, that it does depend on your country though, and you'll want to check the list above for yours.
Examples:

How to Cross the Guatemala – Belize Border. Plus, Meeting the Keystone Cops
Travel From Guatemala to Belize
Border Crossing: Melchor de Mencos (Gualemala/Belize)


How broad/narrow can research interests be on statement of purpose?

Question: I cannot understand how broad is too broad of a research interest. Honestly, I have a lot to learn and it is difficult for me to narrow it down on my statement of purpose. I know that I want to research applications of machine learning. Does my statement of purpose need to have a particular research question? I don't have one. If I say that I want to contribute to Professor X's research on Y, is it acceptable?
OR
For example, if I say that I'm interested in enhancing my spatial analysis knowledge by working with professor X and concentrating on Spatio-Temporal load balancing in sustainable IT, is this broad or narrow or alright?
Answer: This depends on where you are and what degree(s) you hold. For a bachelors holder in the US it needn't be very specific at all. Some subfield of CS, say: languages or AI.
For someone with a masters, it should be a bit more detailed. Working with (in the same area as) Prof. X should be fine, but you'd better know something about what that is. Thus, a narrow subfield. The one you suggest seems sufficiently narrow.
However, don't make it read as if this is the only thing you will consider. Keep some flexibility. This or That. If the preferred professor can't take you on for whatever reason, you want someone else to consider you.
There are places, perhaps Germany, where you are hired into a position and need to be pretty much self directing. There you might benefit from quite a lot of detail. You are more of a colleague than a student from the start.
Comment: I am applying to top programs in the US, for a Ph.D. in Statistics or a related field. For a Ph.D. statement of purpose, is my research interest fine?
Comment: Assuming there is someone at the place that has compatible interests, I'd think it is fine. But you seem to have that covered already.
Comment: Thank you for your feedback.


Can I email clients to let them know I'm leaving my position?

Question: I recently gave 2 weeks notice to my employer of 1.5 years. I work very closely with many clients and have built strong relationships with them. I emailed several of them letting them know I was leaving the position and that it has been a pleasure working with them. When my boss found out, she said that this was illegal. She claimed that I "stole client information". Is this true? My email was non-soliciting and very professional. However, my boss is angry that I contacted clients personally and is now claiming I did something illegal. Any advice or thoughts?
Comment: Did you leave your contacts your forwarding contact details?
Comment: Yes, I gave them my email addresss and phone number.
Answer: As an employee, it is not your place to tell clients you are leaving.
They are the company's clients not 'yours', no matter how long you've been working with them. It can be seen as personal use of a client list, which is a form of theft.
You need to apologize and not do it anymore.
If the company takes legal action then you should talk to a lawyer.
To you, it probably feels like you're just trying to say goodbye to people you've worked closely together with for a long time but it can be viewed as solicitation. By reaching out to these contacts, if you're giving them your contact details it implies you'd like to continue working with them, which is solicitation. Even if you're not mentioning your contact details, it can be seen as you trying to stimulate them to ask for your contact information which is again solicitation.
In the future, should you find yourself in a similar position, you should always check with your employer how they'd like to handle the transfer, because this is (or at least should be) covered by company policy.
Comment: Nonetheless, OP was still an employee of the company at the time he sent the emails.  Absent removal of client contact information from the company's control or actual solicitation for future business elsewhere, he was still acting as an agent of the company.  The company may not like what he did, but that rises to employee misbehavior at best, and they have the option of discipline or early termination.  If OP's question can be taken at face value, theft would be very difficult to prove.
Comment: @Blrfl OK you disagree.  I will hold with my answer.  Form of can take on lots of forms.
Comment: @paparazzo What if OP was an independent contractor instead of an employee? What if they are not actually clients (no money/services exchanged) but they are just prospects that you tried to do business with? How would hose factors affect this situation? Thx.
Answer: It all depends on whether or not you were actually stealing clients.  Telling them that you will be leaving, and giving them the name of a colleague as a new contact seems a reasonable thing to do.
Telling them that you will be leaving, and encouraging them to become customers of the new company you will be moving to is another matter.
Comment: Let the boss or new college send the email.
Answer: I can't address legality but I don't think it's good practice for you, as an individual, acting independently of your employer, to notify your employer's clients. It's really up to the employer to decide the method, content, and timing of that message. The relationship is theirs, not yours; especially now that you're leaving. They have to maintain the relationship once you're gone, not you. The transition is their business, not yours. They very were may want the email to come from you, but it shouldn't have come from you without their consent, and without including some sort of reference to the transition (ie "so-and-so is copied on this message and will be handling your relationship).
Even if you did not explicitly give them personal contact info or solicit their business at your new employer, it's pretty easy to see "hey I'm leaving!" and take it as a reason for them to follow up with you with respect to your new employer - especially since there wasn't an explicit hand off to someone else at your old employer to handle the account. You've left it totally open ended, which is going to be problematic for your old employer. Their clients are now in doubt and don't have a clear plan for going forwards.
All that said, I've had situations where I developed close, personal friendships with clients, and I spoke with them about changes in employment directly. However, that was done through "friendship" channels (meeting them for dinner, a personal call to a personal phone number after the work day was over, etc), not through professional channels (email from my work account, phone call during the work day from my work phone). If you don't know these clients well enough to be contacting them via personal channels after hours, you don't know them well enough to inform them of your departure without your employer's consent.
Answer: If you left your personal contact information then yes that is potentially bad for you, regardless of your true intentions. The company - and courts - could see it that you are stealing clients and you may be in violation of any contract and/or laws. Not only that if you contact those clients at your new job, regardless of intending to bring them to your new company, could put you and your new company in a heap of troubles.
Best to leave a memo like so:

Client A, I regret to inform you that I am departing from my current position to pursue new opportunities. It has been a pleasure working with you. Your new contact at company X is my colleague Z and his contact information is A, B, C, as well as CC'd on this email. Thank you.

Can I email clients to let them know I’m leaving my position?


Sore after work out - can't straighten arm

Question: I'm in good aerobic shape but never did strength training.  Yesterday, I did some basic strength work, using both dumbbells and machines.  Nothing too crazy - I started light and built my way up.  I feel fine today, with a moderate soreness.  But, the one heavy pain I have is that I can't straighten my arms.  I felt this immediately after working out, and it's only gotten worse.  I feel pain on the inside of my arm (opposite my elbow), even if my arm is relaxed, and if I try to straighten it, it gets very intense.
I warmed up and cooled down aerobically, but didn't do any real stretching.
What causes this? Does it have to do with machines versus dums? What should I do to avoid this next time?
Comment: This is normal, especially if you never trained. You'll have less problems as you build up the missing muscles (alternatively, you could push yourself less, but why do that?).
Answer: This is most likely DOMS which is normal. Just ice it, do very light stretching, massage the muscles gently and rest. Symptoms should get better and you should be feeling fine in a day or so. I've had the same thing and occasionally get a client who gets really bad DOMS that they can't fully extend their arms. It sucks but it never ever even comes close to being that bad again.
Having said all of that, there is a tiny chance this isn't DOMS so if your condition gets worse or you start getting severe sharp pain then you might want to consult a health professional.
Comment: Based on the information available, it's possible it's a muscle spasm that needs a bit of massage to clear up.  A LaCrosse ball can work wonders as you use it to massage the surrounding areas.
Comment: Thanks.  Why only in that one spot? My right arm is better now but my left arm is worse.
Comment: @S.RobertJames what lifts did you do? It seems like its your forearms that are sore. Did you do a lot of gripping? Did you have a mixed grip?
Comment: It is not DOMS. The OP said he felt pain immediately after working out. DOMS creeps in 24-48 hours after working out. He most likely injured himself in the gym.
Comment: "I felt this immediately after working out, and it's only gotten worse." Muscle soreness often happens immediately while/after training and later snowballs into full on DOMS. It's possible he injured himself but that's rare and he hasn't given a lot of information. @JoJo
Comment: @S.RobertJames never ignore left arm pain, especially worsening, if you're a male. Ever. Classic symptoms of occurring or near occurring heart failure. Not trying to freak you out, just saying. I know this is an old post, but just for future nfo.
Answer: What I think could have happened is a light pulling of some tendons in the elbow, due to incorrect form of exercising. Had the exact same thing happen to me about 3 weeks ago while doing some shoulder exercises.
Back started hurting right after the workout, got home, slept, woke up, stretched and couldn't move at all. Then while moving - real intense pain.
Im betting the same thing happened to you.
Solution - rest. Only thing that can help you right now is resting, maybe some ointment to ease the pain, but that is not going to help it heal.
IMO, just rest for a while.
Answer: Late to the party, but as per James's answer, there's a good chance this is tied to your tendons. You may have some variety of golfer's elbow. You mention that you were using dumbbells. One of the easy ways to inflame that tendon is putting it under stress while gripping something tightly, especially if you curl your wrist. Which, as you might guess, is pretty much a description of how many people do bicep curls initially, tightly gripping the dumbbell and curling their wrist as they left the weight and put strain on the tendon. I've been there before, right down to the arm largely feeling OK, but being unable to straighten my arm. It does pass within a few days. Over-the-counter anti-inflammatory and pain medication will make your life more bearable.
Comment: While I understand there's no obligation, is there any chance the downvoters can explain what I'm getting wrong?


What does "in the shuffle marketing wise" mean here?

Question: "Part of the reason that he wants an investor is to take the company's marketing up a notch. "We kind of got lost in the shuffle marketing wise," he said."
Source: https://www.forbes.com/sites/elizabethmacbride/2017/12/31/a-big-wave-surfer-takes-to-entrepreneurship-building-a-20-million-mattress-company/#2232577b43e5
Answer: Well, "lost in the shuffle" is an idiomatic expression that means that something is not getting the attention it deserves.  In this instance, the company is not getting the attention it deserves.  As for the "marketing wise" part, I disagree with the author of this article insofar as I believe he forgot to put a hyphen to connect the two words: marketing-wise is how I would have written it had I been the author of this article.  The reason for this is that both words are nouns and they're acting as though they were one adverb.

Marketing: Definition No. 2: The strategic functions involved in identifying and appealing to particular groups of consumers, often
  including activities such as advertising, branding, pricing, and
  sales. https://www.thefreedictionary.com/marketing.
Wise: Lemma 2: Method or manner of doing; way. https://www.thefreedictionary.com/wise

In essence, the author is saying that the company is not getting the attention it deserves by way of marketing.
I hope that might have helped you out.  Take care and good luck!
Comment: You're very welcome.
Comment: The construction also avoids acceptance of responsibility, like the infamous passive "Mistakes were made".  It is a way of saying, without saying, "We overlooked something" or "We did a damn poor job of marketing".


truffle/web3 event listeners returns nothing

Question: We have an event being triggered in a contract and our listeners on the client cant receive the return value.
https://gist.github.com/stupeters187/9529b54fe0d48ee606ad06ced6b16031
Update: metamask version 3.12.1 fixed the problem
Answer: Answer: your call to newbook() cannot return a value in javascript because it changes state.
Explanation:
Truffle distinguishes between functions that change state and functions that only read the blockchain. Every time you change state, you have to broadcast it to the network so that the miners can incorporate the change into the next block. In addition, every node has to update their copy of the blockchain. This is why state changes cost gas. It's also why you shouldn't expect a return value from a function that changes state because the operation is asynchronous and could take between 1 and 2 blocks to complete.
On the other hand, function calls that only read the existing state of the blockchain do not need to bother any miners or nodes. In fact if you run your own node then you need only query your local copy of the blockchain to execute such a function. This is why read only functions cost no gas. To signal to truffle that you're calling a free function (i.e. one that doesn't change state), you use the keyword call after the function call. E.G. Suppose you have a solidity function called getBalance() then you'd write
instance.getBalance.call()
in javascript.
In your example above, you'd need to separate the state change and the retrieval into 2 steps as follows:
ParentContract.deployed().then((instance) => {
            instance.NewBook().watch((err, res) => {
                if (err) console.log(err);
                console.log('contract address', res.address);
            });
            instance.newBook(weiPrice, issues, rateFormatted, {from: window.web3.eth.accounts[0]}).then((res) => {
                console.log('TX', res);
             return instance.getLatestBookId.call();
            }).then(res=>{
//res will have the id in there somewhere.
})
.catch((err) => console.log(err) );
        });

This assumes you have a solidity function called getLatestBookId() that looks something like

function getLatestBookId returns (uint id){
//DO NOT PUT STATE CHANGE OPERATIONS
}

Just bear in mind that mappings don't have a concept of length so getting the latest from a mapping isn't possible. You might need to rejig your datastructures a bit to make this possible.
Also remember that when I say state change, I refer to storage on the blockchain only. You can do what you want with local variables to your heart's (or solidity's strict heart's) content without incurring gas costs.
Answer:
*Please note the bottom update (this was our problem)


What Is The Dıfference Between npm node-sass and npm sass

Question: I've just learn I should use @use instead of @import in sass. But as I understood, I should use npm sass instead of npm node-sass to do that. What is the difference between these two ? Why @use and @forward doesn't work on node-sass
Answer: Popularity
Blue line is node-sass, orange is sass popularity.

The sass readme explains some of the differences:

Dart Sass, from which this package is compiled, can be used either as a stand-alone executable or as a Dart library. Running Dart Sass on the Dart VM is substantially faster than running the pure JavaScript version, so this may be appropriate for performance-sensitive applications. The Dart API is also (currently) more user-friendly than the JavaScript API. See the Dart Sass README for details on how to use it.
Node Sass, which is a wrapper around LibSass, the C++ implementation of Sass. Node Sass supports the same API as this package and is also faster (although it's usually a little slower than Dart Sass). However, it requires a native library which may be difficult to install, and it's generally slower to add features and fix bugs.

Performance
There are performance differences which are covered in answer, which compares the differences compiling Bootstrap 4:

In this particular case, two seconds is not a big deal; but consider Dart-Sass(JS) is nine times slower than Dart-Sass(Dart VM) and three times slower than node-sass.

This article has more details about this benchmark.
Maintenance
node-sass is considered deprecated, but you can see frequent updates are happening for both packages.
Why @use and @forward doesn't work on node-sass
Because node-sass uses LibSass which is implemented in C and does not receive updates as frequently as the Dart implementation.
Comment: Very minor, but the linked GitHub issue you mention says it's 'deprecated' not 'depreciated'.


Selenium webdriver java with jdbc

Question: I am using selenium webdriver with Java jdbc. Below are my queries.
First:  I am trying to login to the application with username and password from database (Using SQL Query). I am getting the username and password, but password is in encrypted format. So how to decrypt the password? and use it for login?.
Second: Suppose, if I want to login with all the username and password from the database then how to write the code or query.
Below is the code sample:
<code>import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import com.mysql.jdbc.ResultSet;
import com.mysql.jdbc.Statement;

public class Test123 {
     WebDriver driver;
     String url ="";
     @BeforeTest
public void setUp() throws Exception{
     driver = new FirefoxDriver();
     url = "localhost:12345/login.do";
     driver.get(url);
}
     @Test
     public void CreateDB() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException{
           String url1 ="jdbc:mysql://184.108.40.206:12345/actitime";
           String dbClass = "com.mysql.jdbc.Driver";
           Class.forName(dbClass).newInstance();
           Connection con = DriverManager.getConnection(url1,"test", "test1");
           Statement stmt = (Statement) con.createStatement();
           ResultSet result = (ResultSet) stmt.executeQuery("SELECT * FROM at_user where username='s'");
           if(result.next())
           {
                String id = result.getString(2);
                String info = result.getString(4);
                driver.getCurrentUrl();
                WebElement a = driver.findElement(By.id("username"));
                a.sendKeys(id);
                WebElement b = driver.findElement(By.xpath(".//*[@id='loginFormContainer']/tbody/tr[1]/td/table/tbody/tr[2]/td/input"));
                b.sendKeys(info);
                WebElement btnclick = driver.findElement(By.xpath(".//*[@id='loginButton']/div"));
                btnclick.click();
                System.out.print("Passed");
           }
     }
     @AfterTest
public void tearDown(){
     driver.close();
}
}
</code>
Username and Password are
s (Username)
03c7c0ace395d80182db07ae2c30f034 (Password)
Answer: First:
You have md5 encrypted passwords. When it is theoretically no way of decrypting md5 encrypted password there is a way to decrypt a MD5 hash, using a dictionary populated with strings and their MD5 counterpart. As most users use very simple passwords (like "123456", "password", "abc123", or in your case 's'), MD5 dictionaries make them very easy to retrieve. However if it is the case - it is major security issue and should be fixed by combining hash algorithms or adding "salt".
For more details consider looking into following pages:

http://en.wikipedia.org/wiki/MD5
http://md5.gromweb.com/

Second: The best way to handle multiple users within code is to create separate class for users and use a list of such objects, or, if you only need user names and passwords, to use dictionary where username is a key and password is a value with simple iteration based on that.
The best way is not to use application database directly (because on secure system you will not be able to  access user accounts anyway) but to create several test accounts with predefined usernames and passwords for your tests.
Comment: The Semantics of MD5 being a Hash is beyond the scope of the question and the post mentions there is no way to correctly 'decrypt' an MD5 hash. Upvoted because of the suggestion for the dictionary. Using test specific accounts will be the best option IMO.
Comment: MD5 is not an encryption algorithm; it is a hash algorithm.  Encryption is a reversible process (otherwise there is no point in encrypting); hashing is not reversible.
Comment: You're right indeed, however I just wanted to explain about "encryption" in terms of question

Selenium webdriver java with jdbc


Can't add or delete friend in Steam

Question: I'm trying to add a friend in Steam but it doesn't allow me because my friend slots are full. I am trying to delete one of my friends to open a slot but it doesn't work. It gives an error saying that it failed to delete the friend.
Comment: Have you tried removing them from both your client and from their profile pages?
Comment: Yes I have tried that.
Answer: Check if your Steam Family Sharing is active. Lot of functions is disabled while Family Sharing is enabled.
If isn't that you need to contact steam support.
Or just up a level to open 5 more friend slot.
Answer: I assume your account is limited?
This means you didn't bought something for at least 5$ in the steam market.
You can add no one and other things are limited. If your friend has got an unlimited one he can add you, because with a limited account you are still allowed to accept friend requests.
You can check here what you can do with a limited account and things you can not do.

Can't add or delete friend in Steam


Tutorial for SLComposeViewController sharing

Question: What are the steps I need to follow to use iOS 6's new SLComposeViewController to post to Facebook, Twitter or Sina Weibo?
Answer: For details on this framework please see Apple's Social Framework Class Reference
Additional tutorials:

http://soulwithmobiletechnology.blogspot.com/2012/07/tutorial-how-to-use-inbuilt.html
http://www.mobile.safilsunny.com/iphone/integrating-facebook-ios/
https://rudeboy-quickies.blogspot.com/2012/06/steps-to-integrate-facebook-in-ios6.html

For this example, we will be using the SLComposeViewController's SLServiceTypeFacebook. If you wish to use Twitter or SinaWeibo just change out the SLServiceType to one of the following:

SLServiceTypeFacebook
SLServiceTypeSinaWeibo
SLServiceTypeTwitter

iOS 6 has made it very easy to post directly to Facebook, Twitter or Sina Weibo using the SLComposeViewController. This works very similarly to iOS 5's TWTweetComposeViewController.
First, in your view controller's header file (.h) #import the Social Framework and the Accounts Framework.
#import <Social/Social.h>
#import <Accounts/Accounts.h>
Here we will declare a simple UIButton and an IBAction that we will later link to that button and a void (sharingStatus) which will be used to check that the selected sharing service is available.
@interface ViewController : UIViewController

@property (weak, nonatomic) IBOutlet UIButton *easyFacebookButton;
- (IBAction)facebookPost:(id)sender;
- (void)sharingStatus;
@end

@implementation ViewController

Then, in your implementation file (.m), we'll start by implementing the (sharingStatus) void that we declared in the header file. sharingStatus uses SLComposeViewController's isAvailableForServiceType BOOL to return whether or not you can post to the service specified in its argument. In this case, we will use the service type SLServiceTypeFacebook. If the service is available the post button will be enabled with an alpha value of 1.0f, and if the service isn't available the button will be disabled its alpha value set to 0.5f.
- (void)sharingStatus {
    if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {
        NSLog(@"service available");
        self.easyFacebookButton.enabled = YES;
        self.easyFacebookButton.alpha = 1.0f;
    } else {
        self.easyFacebookButton.enabled = NO;
        self.easyFacebookButton.alpha = 0.5f;
    }
}

Here we will set up the IBAction that will call up the composer. For good practice, we will check isAvailableForServiceType again to avoid calling up the composer for a service type that isn't available. (Incase something went wrong during the last check, or if availability somehow changed in the fraction of a second in between tapping the post button and the composers all/init. The code below has been set up to display a Facebook composers sheet with text, an image, and a link. This action also utilises a completion handler for the composer's cancelled and done results.
- (IBAction)facebookPost:(id)sender {

    if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {

        SLComposeViewController *mySLComposerSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];

        [mySLComposerSheet setInitialText:@"iOS 6 Social Framework test!"];

        [mySLComposerSheet addImage:[UIImage imageNamed:@"myImage.png"]];

        [mySLComposerSheet addURL:[NSURL URLWithString:@"http://stackoverflow.com/questions/12503287/tutorial-for-slcomposeviewcontroller-sharing"]];

        [mySLComposerSheet setCompletionHandler:^(SLComposeViewControllerResult result) {

             switch (result) {
                 case SLComposeViewControllerResultCancelled:
                     NSLog(@"Post Canceled");
                     break;
                 case SLComposeViewControllerResultDone:
                     NSLog(@"Post Sucessful");
                     break;

                 default:
                     break;
             }
         }];

        [self presentViewController:mySLComposerSheet animated:YES completion:nil];
    }
}

In viewWillAppear we will register an observer to ACAccountStoreDidChangeNotification so the application can be notified when account information changes. This observer will then be removed in viewDidDisappear.
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sharingStatus) name:ACAccountStoreDidChangeNotification object:nil];
}

- (void)viewDidDisappear:(BOOL)animated
{
    [super viewDidDisappear:animated];
    [[NSNotificationCenter defaultCenter] removeObserver:ACAccountStoreDidChangeNotification];
}

And finally, open up interface builder and add a UIButton which will be the post button. Then in the connections inspector link the IBOutlet and IBAction we created earlier to the button, and that's it! You're done!
Comment: There's no need to link to Accounts.framework when using Social.framework. Also it can be a disadvantage to check if a service is available since the OS will do this automatically and fail with an alert that has a Settings button.
Comment: @AbhinandanSahgal no, not with this class. However, when working properly the composer will detect if the user isn't logged in and present an alert to take them to the settings for the appropriate service to log in to their account.
Comment: Hi,

It was a nice answer,though i have small doubt,can we also present Login interface in case user's twitter/Facebook account is not set up?
Comment: @AbhinandanSahgal Sorry, but no I can't. This is build in behavior that should be working automatically if you aren't already logged in. Additionally, Apple used to offer API for sending the user to the preferences app, but it was removed in iOS 5.1 :(
Comment: Don't do the [SLComposeViewController isAvailableForServiceType:...] check and if that service is not set up in the Settings app, the framework will popup an alert stating that issue along with a button to go into settings.
Comment: Can you put a sample to take them to settings?
Comment: how to hide  location and audience option from this pop up?
Comment: @0x7fffffff why image is not getting upload in this code ?
Comment: In **iOS 11**, remove this line:
`if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {`
Answer: Just use this code to share on Facebook.
SLComposeViewController *controllerSLC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[controllerSLC setInitialText:@"First post from my iPhone app"];
[controllerSLC addURL:[NSURL URLWithString:@"http://www.appcoda.com"]];
[controllerSLC addImage:[UIImage imageNamed:@"test.jpg"]];
[self presentViewController:controllerSLC animated:YES completion:Nil];

If you want this for Twitter then just change SLServiceTypeTwitter.
Comment: when Facebook Account is empty in your device it shows the alert with settings and cancel button when i click on settings button it should go to settings page its working fine in up to IOS 6.01 but in IOS 7 settings button doesn't take me to settings page.so do u have any idea about this
Comment: Have you tested it on device?In simulator this issue comes in ios 6 too.
Comment: am getting Settings page issue with your code.
Comment: @sabir I didnt get you.Can you please explain it?
Comment: [controllerSLC setInitialText:@".."];       is deprecated now .
Comment: why image is not getting upload
Answer:
Safe Use of SLComposeViewController

if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
    {
        SLComposeViewController *fbPost = [SLComposeViewController
                                               composeViewControllerForServiceType: SLServiceTypeFacebook];
        [fbPost setInitialText:@"Text You want to Share"];
        [fbPost addImage:[UIImage imageNamed:@"shareImage.png"]];
        [self presentViewController:fbPost animated:YES completion:nil];
        [fbPost setCompletionHandler:^(SLComposeViewControllerResult result) {
            switch (result) {
                case SLComposeViewControllerResultCancelled:
                    NSLog(@"Post Canceled");
                    break;
                case SLComposeViewControllerResultDone:
                    NSLog(@"Post Sucessful");
                    break;
                default:
                    break;
            }
            [self dismissViewControllerAnimated:YES completion:nil];
        }];
    }


Drop Cap option in Word 2007 is unavailable (gray'd out)

Question: I've inherited a Word 2007 document from somewhere (dont know the source), where I'm trying to add a Drop Cap to the first paragraph and can't do it. I've found dozens of help sites and articles on how to add a drop cap and understand that it is formatting and framing and how it works and all of that... got it!
I've removed ALL formatting from my text paragraph, even clicked the "remove all formatting" button in a new test paragraph - no good.
I've Drop Capped a test paragraph in a NEW document (that worked), then tried to paste that paragraph into this document - no good.
Any help on how to re-enable the Drop Cap feature? even just for the one paragraph?
thanks,
j
Answer: nevermind - I just figured out that the whole document is a GIANT TABLE. Removed the table - no issues.


How are iPhone and Android applications developed?

Question: I would like to know:

What frameworks are available
Which language is useful for Android /iPhone apps (.NET ,JAVA,C++)
Answer: Android development is in Java. See this link for useful resources. You can also look around that site to find out how to install the SDK and all that stuff.
I don't know much about iPhone development, but I know it uses Objective-C for coding and that you have to be on a Mac to be able to develop for it. I'm sure some other people are going to be able to share some links that will point you in the right direction.
Answer: iPhone Apps are developed in Xcode, which will only run on Apple Machines. Apps are coded in Objective c. You need to join the Mac iOS developer program to sell through the Apple store:
http://developer.apple.com/programs/ios/


Roots of unity?

Question:
The $n$th roots of unity are the complex numbers: $1,w,w^2,...,w^{n-1}$, where $w = e^{\frac{2\pi i} {n}}$. If $n$ is even:

The $n$th roots are plus-minus paired, $w^{\frac{n}{2}+j} = -w^j$.

Squaring them produces the $\frac{n}{2}$nd roots of of unity.

Could someone explain the first statement? I understand why the $n$ roots are plus-minus paired (if $n$ is even), but what does the equation mean? An explanation of the equation will be appreciated.

The statement states $w^0$ (or $1$) is a root of unity. Which root is it? Aside from the obvious fact that $1$ is a always a root of $1$, doesn't $w...w^{n-1}$ cover every root? What specific root is $w^0$ referring to?
Comment: I think it's a good idea to draw these on the complex plane for small $n$.
Answer: Since $\omega=\exp\left(\frac{2\pi i}{n}\right)$, we have $\omega^{n/2}=\exp\left(\frac{2\pi i}{n}\frac{n}{2}\right)=\exp(\pi i)=-1$.  This and the law $\omega^{a+b}=\omega^a\omega^b$ give the formula you ask about in your first question.  In words: multiplying a complex number by $\omega$ rotates the vector in the complex plane corresponding to that number by $360^\circ/n$.  Repeating $n$ times brings the vector back to its starting position; repeating only $n/2$ times rotates by $180^\circ$, which is the same as multiplying by $-1$.
As to your second question, when $n$ is odd, $\omega^0=1$ is the only real root; it's the root we already knew about before we learned about complex numbers; all other roots have an imaginary part.  When $n$ is even, there are two real roots, $1$ and $-1=\omega^{n/2}$.  Again, we knew both of these roots before we learned complex numbers.  (E.g. the two real sixth roots of 1 are $1$ and $-1$.)  All other roots have an imaginary part.
Answer:
Think of the roots as points on a circle equally spaced apart. The negative of a root is the root on the entire opposite side of the circle, which means you have to traverse half the roots to get from any particular rotos to its negative. Traversing half the circle means cycling forward (or backwards, if you wanted) $n/2$ roots, which means (if we're considering the root $\omega^j$), we have that $-\omega^j=\omega^{j+n/2}$. This can also be seen by simply noticing that $-1$ must be the $n/2$th root on the cirlce, being halfway around, and computing $-\omega^j=\omega^{n/2}\omega^j=\omega^{n/2+j}$. Ultimately this tells you not only that the roots are plus-minus pairs, but it explicitly tells you which root is the negative of any given one, where the given one is in the form $\omega^j$.
Of course $\omega^0=1$. None of the other powers of $\omega$ - that is, none of $\omega^1,\omega^2,\cdots,\omega^{n-1}$ - can also be the number $1$. For if, say, $\omega^k=1$ with $k\in\{1,2,\cdots,n-1\}$, then we have $e^{2\pi i (k/n)}=1$, or in other words that $1$ on the unit circle has argument $2\pi\cdot k/n$, which is not an integer multiple of the full circle, $2\pi$, and hence is geometrically impossible. This should be rather obvious if you actually draw roots on a circle: the root $\omega$ is the first counterclockwise from $1$ and $\omega^{n-1}=\omega^{-1}$, being the reflection of $\omega$ across the real axis, must be the last one right before the root $1$.

Roots of unity?


Best way to do savings in India?

Question: I have started to earn a year ago. All my funds are currently in banks.
Is there any better way save money than leaving it in a bank account?
Answer: There are quite a few options. Suggest you put a mix of things and begin investing into Mutual Funds.

Open a PPF / NPS account. The returns are decent and secured, but there is a long time lock-in
Open Fixed Deposits
Start investing small amounts in Mutual Funds, start with Index funds and then into Diversified equities before going into other type of funds
Some point when you are comfortable start into shares directly.
Answer: To begin with, let's get one thing straight saving is not investing. However, the best way to save money is surely Investing.
There are some basic rules to save which we all know but maybe not applying. I have listed the following in brief but each and every point has equal importance.
Spend less than you Earn - It is said one should save 50% of your income. Well, If you can't do this, save more than you spend.
Everyone must invest in SIPs as of today. Have an Investment plan. If you are ready to take a risk then do some research and invest in equity.
Avoid loans as much as possible. You plan to buy a car or a superbike in 2 years then start saving accordingly from today. You won't regret it later. If you save the heavy interests on EMI that will be your best saving and numbers will speak for themselves.
Always try to keep your EMIs within manageable limits.
Do budgeting and keep an eye on your monthly expenses. Rightly said, one that can't be measured can't be controlled.
Most importantly, Pay off your outstanding credit card bill every month before the due date. Never carry a balance or pay any interest on the outstanding bill.
Do invest in Term Insurance and a Health Insurance plan for yourself and your family. Bad health or accidents never happen with a warning.
Have a separate fund for Emergency purposes for those unforeseen circumstances. If you start building your emergency fund by adding a little part of your earnings to it, you will be saved from the financial burden to quite an extent.
Eventually, all the Savings are for our old days so that we have a happy retirement phase. But, it's always advisable to Save and Plan for Retirement.
Invest in Tax Savings Instruments so that you can save the maximum. In India, the Public Provident Fund ( PPF) is the most recommended instrument. The invested amount is tax-exempt and Returns are fixed & tax-free.

Best way to do savings in India?


What do I do with a bitcoin I recieved?

Question: I was given 1 bitcoin in a paper wallet as a gift.
How do I now convert this bitcoin to spend it?
Answer: You can buy all kinds of things from https://www.bitcoinstore.com/
You could also buy gift cards using bitcoin at http://www.gyft.com/
Finally if you want to sell your bitcoin for your local currency, you'd need to open an account at a Bitcoin exchange such as https://www.bitstamp.net/ - however this is the solution I like less because they require you to send them some personal information like your ID or bank account information to overcome fraud.
Answer: You can spend it on wide variety of products on www.overstock.com
Look for other places accepting bitcoin using http://coinmap.org/
Or as already suggested, use an exchange like bitstamp or btc-e.
But first you would probably want to import your paper wallet to make a transfer. Take a look at https://blockchain.info/pl/wallet/paper-tutorial
Answer: There's a nice video here that shows how to pull the BTC from the paper wallet to a Mycelium Android wallet.
https://www.youtube.com/watch?v=1pDSzOiFgIk
I would recommend you only pull out what you need to spend at the appropriate time, or follow the instructions in Mycelium to backup the wallet, just in case you lose your phone you don't want to lose 1 BTC with it.

What do I do with a bitcoin I recieved?


Extraction between cyanex 923 and phenol

Question: I want to remove phenol from wastewater so I used the cyanex923 as an extractant or carrier to extract phenol from the wastewater (the name of the process is non-dispersive solvent extraction) but the problem is that I don't know what to do at the last step when the complex cyanex923-phenol is formed. I know that I need a stripping step to separate these two components and when I googled, I see some people said that NaOH can be used and some people said NaCl but I don't know exactly how it works, like what happens when NaOH or NaCl is added, please can anyone help me to explain the process because I'm totally lost
Comment: Wouild help if you told us what cyanex923 is, and what it dissolves in
Comment: I want to remove phenol from wastewater so I used the cyanex923 as an extractant or carrier to extract phenol from the wastewater but the problem is that I don't know what to do at the last step when the complex cyanex923-phenol is formed. I know that I need a stripping step to separate these two components and when I googled, I see many people said that NaOH can be used but I don't know exactly how it works, like what happens when NaOH is added, please help me
Comment: Phenol is acidic enough that it will form the water soluble sodium salt when treated with NaOH
Comment: So you mean that when NaOH is added to the complex cyanex923-phenol, water soluble sodium salt will form? Can you please explain a bit more? I'm not good at chemistry
Comment: Phenol is really pretty acidic with a pKa 10, so any basic solution over pH11 or stronger will completely form the sodium salt. Dissolve your complex up in a water-immiscible solvent (see my answer below) and wash that solution with aqueous sodium hydroxide
Comment: Thank you so much for your explanation and suggestion, I really appreciate it
Comment: Please accept the answer if you are happy with it
Answer: So far as I can see from Google, Cyanex 923 is a liquid mixture of trialkyl phosphine oxides. This should be soluble in the standard range of organic solvents (ethyl acetate, diethyl ether, methyl t-butyl ether) so washing a solution of the cyanex923-phenol complex with aqueous sodium hydroxide will remove phenol without the cyanex going into aqueous. Usual drying, filtration and solvent evaporation under reduced pressure will give the cleaned cyanex
Answer: Based on the original question, I can only speculate if further detail about the composition of cyanex923 may be helpful for the OP, or not.
On the other hand, there is at least one scientific publication about this complexant's compositon by a Polish group deploying GC-MS.  (Sounds like determining the secret of WD40.)  To paraphrase the publication, 18 peaks were identified, four of them about these major components: trihexylphosphine oxide (8.5%), octyldihexylphosphine oxide (30.4%), dioctylhexylphosphine oxide (37.4%), and trioctylphosphine oxide (16.1%) summing up to 92.4%, and mostly n-alkyl groups.
Beside cyanex923, sibling formulations cyanex925, 921 and Topo -- at time of the study all tradenames of products by then American Cyanamide Company (defunct since 1994) are equally surveyed.
Reference:  Dziwinski and Szymanowski in Solvent Extraction and Ion Exchange,
16, 1998, 1515-1525, doi 10.1080/07366299808934592 at Taylor & Francis (or here at ResearchGate).
Addition

There is an open-access publication by the same group about properties of  cyanex923, including the determination of extraction isotherms for various phenols between water and octane or toluene like depicted in the following figure (unsubstituted phenol is described by the squares):

(reference: Polish Journal of Chemical Technology, 12, 2010, 19-23,
doi 10.2478/v10026-010-0027-9)

Still by same group, the extraction performance of cyanex923 deployed in membrane extractors was compared with amberlite and trioctylamine in hollow fiber modules.  Cyanex923 performed much better than the other two, as for example depicted in the following figure:

(reference: Environmental Science & Technology, 36,  2002, 2088-2093, doi 10.1021/es010910w)
Answer: After I've done some researches I think it works like the following:
We need an extraction module and a stripping module. The organic stream in the extraction module containing the phenol–cyanex complex is sent to the stripping module. The complex diffuses across the microporous wall filled with organic solution to the stripping–organic interface and I think in the stripping module we have NaOH which reacting to the phenol and form PhONa (sodium phenolate) (according to the article, this step occurs in a hollow fibre membrane contactor and I wonder why can't we just use a tank?).
This means that at the interface cyanex is regenerated and recycled back to the extraction module. The solute (sodium phenolate) is then released into the aqueous stripping solution. I'm not sure what they mean by "the aqueous solution" but anyway, we have the PhONa and need to be converted back to the phenol so that we can use phenol again and I think we can do it in acidification condition.
Some study researches mentioned that we can add HCl to lower pH and when the the pH drops the phenol associates and forms an organic phase separated from a saline aqueous phase.
This is what I've understood from some articles that I've read, please correct me if I'm wrong
Comment: Among the papers around the original one co-authored Szymanowski, there are at least two potentially relevant to your question.  Have a look at them.


What is the convention for linking to books?

Question: I've seen links to Amazon, ISFDB, Wikipedia, author's websites and publisher's websites. Is there a community preference or convention for linking to books?
Answer: I recommend linking to Wikipedia if there's an article, since all the useful information tends to be there: basic bibliographic details, plot summaries, cultural relevance, link to the author's biography, links to vendors, …
For written SF (excluding comics) in English, just about any book or story is referenced in the Internet Speculative Fiction Database (ISFDB). ISFDB has detailed bibliographic information and links to Wikipedia when they exist. I recommend using ISFDB when there is no Wikipedia article or when discussion publications (especially for short stories).
If the author has a web site, that's a good alternative to ISFDB.
If there's no ISFDB entry (for example because it's a comic book), you can link to Wikipedia's book source facility: http://en.wikipedia.org/wiki/Special:BookSources/0123456789.
Some people link to Amazon, which is automatically turned into a Stack Exchange, Inc. affiliate link. I don't like to favor any particular vendor, so I won't do it and encourage others not to.
Comment: One advantage that Amazon has is that you can "search inside" many books.  This generally means that you can read any quoted material in context, without having to own a copy of the book.  (This is the only reason that I use Amazon links here).
Comment: @Tony: That's a good point. Is Amazon the best for searches in SF books? I've never tried Google Books for recent, non-technical books.
Comment: I honestly don't know. The Google Books in-book searching is more limited than Amazon in my experience (although you can link to a page with the quote, which beats Amazon).  The B&N version requires Flash, which I don't have installed, so I've never tried it.  I don't know if anyone else offers this functionality with a large library.
Answer: I like to use LibraryThing, because it lists all editions of a book, not just the currently-available one (like on Amazon). It includes reviews and descriptions like Wikipedia, though sometimes they're harder to find. It's also not trying to sell you anything, which I think is a point in its favor.
Comment: Bibliography-wise, how complete is LibraryThing, compared with ISFDB (within ISFDB's scope, of course)? LibraryThing is selling something, just not books (they charge you for filling their database!).
Comment: @Gilles, a basic account is free. The limitation is that a free account's library can contain only up to 200 books. As far as bibliography, there are fields for pretty much everything you could possibly think of, plus some more. Whether they're already filled out for a particular book/work is a different matter.
Comment: Sorry this hasnt anything to do with your answer Martha i just wanted to say thank you for defending me during my exile, i dont know how to chat so this is the best i cand do
Answer: I think it would depend on the context.  If you're linking to information contained in the book, Wikipedia frequently has that information.  If someone is looking for an answer to story identification, Amazon would be appropriate, as they'd probably want to purchase it.


An upper bound for the G.C.D. of $\binom{a}{3}$ and $\binom{b}{3}$

Question: I can't seem to find anything in the literature on how to estimate the g.c.d. of $\binom{a}{k}$ and $\binom{b}{k}$. In particular, I would like to know why $\gcd(\binom{a}{3}, \binom{b}{3})\leq b \binom{a-b}{3}$ for $a-b\geq 4$. I'm confident it's true (computer search).
Comment: Cross-posted at MSE [here](https://math.stackexchange.com/questions/3556468/an-upper-bound-for-the-g-c-d-of-binoma3-and-binomb3).
Answer: Here is a similar looking result.
Lemma. For any positive integers $a$ and $b$ satisfying $a-b\geq 2$,
$$\gcd\left(\binom{a}{3}, \binom{b}{3}\right)\qquad\text{divides}\qquad (a+b-2)\binom{a-b+1}{3}.$$
Proof. The statement follows readily from the identity
$$(2a-b-1)\binom{b}{3}-(2b-a-1)\binom{a}{3}\ =\ (a+b-2)\binom{a-b+1}{3}.$$
Comment: Very nice! (Not quite directly helpful but I upvoted it anyway).
Answer: I will hopefully prove this statement below modulo a finite check (I believe this will also work to show that $\gcd(\binom{b}{3}, \binom{a}{3}) \le \varepsilon b(a-b)^3$ for any $\varepsilon > 0$ except for a finite set of counterexamples).
Denote for simplicity $a - b = c$ and $\gcd(\binom{b}{3}, \binom{a}{3}) = d$.
First we will show that $d \ll c^5$. Indeed, each divisor of $d$ comes from one of the pairs $(a-k, b - l)$, where $k, l = 0,1, 2$. Each such pair gives us as a contribution a divisor of $a - b + l - k$ and there are five such numbers from $a - b - 2$ to $a - b + 2$. Note also that (up to a finite number of divisors like extra $6$ or so) different pairs with the same $l - k$ will contribute to the different prime divisors of $a - b + l - k $ because it will otherwise divide $\gcd(a - k, a - k_1) | (k - k_1)$. So we get $\ll (a - b - 2)\ldots (a - b + 2) \ll c^5$.
Therefore, if $c \le \delta \sqrt{a}$, then we are done. Indeed, in that case $d \ll c^5 \le c^3\delta^2 a$ while $b\binom{c}{3} \asymp ac^3$. Thus, $c \ge \delta \sqrt{a}$ for some fixed positive $\delta$.
Now assume that $c \ge C a^{2/3}$ for big enough $C$. Then $b\binom{c}{3} \gg C^3ba^2 \gg C^3b^3$ which is bigger than $\binom{b}{3}$ for big enough $C$ and we are done (here we used the obvious fact that $d\le \binom{b}{3}$). So $c \le Ca^{2/3}$ for some fixed positive $C$. In particular, $c = o(a)$ so $b \sim a$.
Now we will use the ingenious observation of GH from MO that
$$(2a - b - 1)\binom{b}{3} - (2b - a - 1)\binom{a}{3} = (a + b - 2)\binom{c + 1}{3}.$$
Note that if $\gcd(2a-b-1, 2b - a - 1) \ge C$ then we are done. Indeed, in that case we can divide by this $\gcd$ and get that $d \ll \frac{(a+b-2)c^3}{C}$. Since now $a\sim b$ we get that this is $\ll \frac{bc^3}{C}$ which is what we need for big enough $C$ (being a bit more careful we can show that it is enough to consider cases with $\gcd(2a-b-1, 2b-a-1) \le  2$).
We have $$\gcd(2a-b-1, 2b - a - 1) = \gcd(2a-b-1, 3(a-b)) \ge \gcd(2a-b-1, a-b)=\\ =\gcd(a-1, a - b) =\gcd(a-1, b-1).$$
Thus, $a-1$ and $b-1$ are almost coprime.
Similar to the above computation we can get that (up to the division by some uniformly bounded number) $d = (a+b-2)\binom{c+1}{3}$. We have here four factors: $(c-1), c, c+1, a+b-2$.
$c-1$ can come from gcd of $a-1,b$ or  gcd of $a-2, b-1$.
$c$ can come from  gcd of $a, b$; $a-2, b-2$ or $a-1, b-1$, but the last case can be excluded since $\gcd(a-1, b-1) \le C$.
$c + 1$ can come from gcd of $a, b-1$ or gcd of $a-1, b-2$.
Finally, $a+b-2$ can come from gcd of $a, b-2$; $a-2, b$ or $a-1, b-1$, but the last case we can again exclude.
Assume that $c-1$ splits between gcd of $a-1, b$ and gcd of $a-2, b-1$ as $r_1$ and $s_1$. Similarly for the next ones we would have $r_2, s_2$, $r_3, s_3$ and $r_4, s_4$.
Observe that different numbers among $r_1, \ldots , s_4$ corresponding to the same number among $a, a-1, a-2, b, b-1, b-2$ will be almost coprime in a sense that their $gcd$ is at most some constant (for $r_1, \ldots , s_3$ it is obvious because $c-k, c-l$ are almost coprime and with $r_4, s_4$ e.g. when we look at $r_1$ and $s_4$ corresponding to $b$ we have $\gcd(r_1, s_4) \mid \gcd(a-b-1, b, a+b-2) = 1$. Other cases are similar).
Note that $r_1s_1 \sim r_2s_2 \sim r_3s_3 \sim c$ and $r_4s_4 \sim a$.
Let's look at the numbers $b, b-2, a, a-2$:
For $b$ we have by almost coprimeness $r_1r_2s_4 \ll a$,
For $b-2$ we have $s_2s_3r_4 \ll a$,
For $a$ we have $r_2r_3r_4 \ll a$,
For $a-2$ we have $s_1s_2s_4 \ll a$.
Multiplying these inequalities we get $c^4a^2 \ll a^4$, that is $c \ll \sqrt{a}$.
So, after all this reasoning, we got that $\sqrt{a} \ll c \ll \sqrt{a}$ so $c\sim \sqrt{a}$! I guess one can reach the same conclusion from the assumption $d \ll \varepsilon b\binom{c}{3}$.
Now, we have two numbers which are (almost) divisible by our gcd: $\binom{c+2}{5}$ and $(a+b-2)\binom{c+1}{3}$. Note that both of them are proportional to the required $b\binom{c}{3}$. Thus, they are almost the same in a sense that $n\binom{c+2}{5} = m(a+b-2)\binom{c+1}{3}$ for some integers $n, m \le C$. Dividing by $\binom{c+1}{3}$ we get
$r(c+2)(c-2) = (a+b-2)$ for some $r\in \mathbb{Q}$, $r > 0$ with bounded denominator and numerator. So $a$ and $b$ are some second degree polynomials of $c$:
$$a = \frac{r(c+2)(c-2) + c + 2}{2}, b = \frac{r(c+2)(c-2)-c+2}{2}.$$
Therefore $\binom{a}{3}$ and $\binom{b}{3}$ are polynomials of degree $6$ in $c$. It remains to show that their $\gcd$ (as polynomials in $\mathbb{Q}[x]$) has degree at most $4$ – in that case $\gcd(\binom{a}{3}, \binom{b}{3}) \ll c^4$ while $b\binom{c}{3} \sim c^5$.
Since $\binom{a}{3}$ is a product of three quadratic polynomials, if $\gcd$ has degree at least $5$ then all factors should be used, in particular $a-1 = \frac{r(c+2)(c-2) + c}{2}$. If it is not coprime to some $b-k$ then their $\gcd$ divides their difference which is $\frac{2c + 2k - 2}{2}$. Thus, $c = 1 - k$ is a root of $a-1$ for $k = 0$, $k = 1$ or $k = 2$. Case $c = 0$ gives us $r = 0$, $c = -1$ gives us $r = -\frac{1}{3}$ and $c = 1$ gives us $r = \frac{1}{3}$. In all three cases the degree of gcd is at most $4$ and the proof is complete.


Why is the Hydra Biologically Immortal?

Question: I have heard that the Hydra organism is biologically immortal (later I found that there are more immortal organisms). Now I know that its immortality is related to its telomerase. The thing is that we all have telomerase, but we age and Hydra don't. What are the proteins (especially telomerase) related to aging in humans and Hydra and how do they work differently?
Comment: Could you define "hydra" or find a picture of it? The only "hydra" I'm well aware of is the fictional one from Greek myths.
Comment: Dear MCM, go to [this link](http://en.wikipedia.org/wiki/Hydra_%28genus%29)
Answer:
Hydra are just one of the many organisms which are immortal.  That is to say all their cells divide forever - there is no senescence (planned cell death) in any of their cells. Interestingly Hydrae that reproduce sexually age and die, but asexual reproduction appear to be immortal.  Animals that are immortal more often reproduce asexually... this may only be because immortality became unpopular in evolution early on and may have not developed senescence in the way other animals have, or lost it when it was not so integral to life.

Although immortal Hydra also appears to share the (TTAGGG)n telomere repeat, there is as yet no data on how or whether they avoid chromosome end depletion. These data suggest the possibility that senescence or death of asexual individuals and colonies may in part result from a failure to maintain chromosome ends that are restored by going through a sexually reproductive cycle .

So its not clear if the telomeres are protected in hydrae and other immortal animals.  I would guess they probably don't have active telomerase if they are truly immortal, though its possible the telomeres are shortened and are repaired.
There are other factors which are supposed to be important for immortality.  Yeast and single eukaryotes are not individually immortal; an individual mother cell can only divide a limited number of times. While hydrae are not a popular focus of research, there has been a concerted effort in trying to understand yeast mortality and there are more than one mechanism being pointed to.
Since there is no germline in single celled organisms, (they only have one copy of their genome to reproduce from) telomeric shortening would not be a useful mechanism for aging; Calorie restriction has been shown to prolong fission and budding yeast by activating pathways which slow aging by protecting against stress, and slowing down reproduction.  All of these findings have strong parallels in work in aging in animals which is a hot topic now.
Finding these pathways is encouraging strong thought that aging and senescence are an evolutionary adaptation rather than a biological necessity.

Our current knowledge suggests that an apoptotic program has evolved in microorganisms as a survival strategy beneficial to the group. This program is dependent on cellular pathways like the Sch9, Tor1, and Ras/PKA pathways and its activation reduces cell protection and maintenance and raises the level of superoxide production, which in turn contributes to cell damage and death. Superoxide also elevates DNA damage and mutation frequency in the aging cultures ... Aging and apoptosis are intrinsically related in yeast and the mechanisms that cause them have just begun to be elucidated. ...  will provide important information to understand the fundamental biology of aging in other species and investigate the controversial hypothesis that an "aging program" might be conserved in higher eukaryotes.

There is an open question as to whether an immortal yeast could be engineered to be immortal.  A team at Max Planck Institute did a lot of foot work and found a strain which they claim does not seem to experience individual mortality either.
So this does indicates that immortality might not be a necessity for any cell or maybe even for animals.  Occasionally, even animal and human cells can be coaxed to revert to an immortalized state, though usually it is the result of cancerous rearrangements of the genome.
This is a rich field and there are lots of telomerase focused ideas too.  Maybe someone can post something along those lines.
Comment: it sounded like this isn't a sure thing yet so I decided not to emphasize it.  there are other wierd cases too.  nobody knows why sharks do not appear to get cancer either, even if they have a more typical planned cell death mechanism.  Lots left to understand.  its certainly possible that some mechainism for immortalizing animals will be discovered.  there is lots of work in that direction.
Comment: @It isn't correct to say that yeast cells are immortal. See [here](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2190697/) for example. I spent two years working alongside a postdoc who spent all of her time watching yeast cells age and die!
Comment: more complex organisms also have very little senescence - e.g. lobsters (http://www.ncbi.nlm.nih.gov/pubmed/9849895?dopt=AbstractPlus & http://www.fightaging.org/archives/2007/06/ageless-animals-the-lobster-edition.php) - which is linked to constant (near constant) levels of telomerase expression throughout life. From the abstract to the above paper: "We conclude that telomerase activation is a conserved mechanism for maintaining long-term cell proliferation capacity and preventing senescence, not only in cellular models or embryonic life stages but also in adult multicellular organisms.  "
Comment: @shigeta now I have to search those sharks!
Comment: here's a start : http://news.nationalgeographic.com/news/2003/08/0820_030820_sharkcancer.html
Comment: @AlanBoyd you're right I'd forgotten that.  Did find some exceptions and it turned into a nice section of the post.
Answer: Actually, most adult cells do not express telomerase or express it only at a very low levels. Telmoerase is highly expressed only in cells that need to divide (e.g. stem cells), thus "immortalizing" them.
In fact, human cell lines which scientists work with can be "immortalized" by activation of telomerase (along with other things).
So you may ask yourself: why not have telomerase activated all the time in all cells? Well, allowing a cell to reproduce easily can be a pretty bad thing... that is exactly what cancer does. Indeed, one of the things a cancer has to do is to activate the telomerases in order to be able to grow. This is also why cancer cell lines are "immortal". This also suggests a potential cancer therapy - targeting telomerase - which is currently being pursued experimentally.
Comment: Thank you, Can you add some reliable articles to your answer please?
Comment: @mysky I added a link to the Wikipedia article on telomerase, which has much of this information included. I don't know if you call that "reliable" though and what technical level you would like.
Answer: Telomerase activity is just one (probably minor) facet of aging.  It takes a lot more than just basic end repair of DNA to keep a complex organism alive, especially mammals.  Just a few issues off the top of my head:

repairing oxidative stress to DNA and proteins
repairing UV damage to DNA
keeping cells clean of debris like protein aggregate buildup (think amyloid deposits like in Alzheimer's)
replacing dead cells without compromising the tissue they're in

For a solidly scientific, short, but very readable book on the subject, I personally liked "Understanding Ageing" by Robin Holliday.  For being published in 1995, it's still relevant. He had a later book that wasn't quite as good (Aging: The Paradox of Life: Why We Age, published in 2010). In large part it's because it was fairly redundant to the first one; we've known about these problems for a long time and have made fairly little progress on them.
http://www.amazon.com/gp/product/0521478022/ref=oh_details_o03_s00_i00?ie=UTF8&psc=1
Part of how hydra can get away with apparent immortality is their constant proliferation of stem cells and their ability to regenerate entire body parts. This circumvents a lot of the issues above (theoretically, but I'm not an expert on hydras). Many copies of the DNA are separately housed, so if a copy gets damaged irreversibly, it can just get trashed. Most (if not all) human organs have similar reserves of active stem cells. There isn't a single universal source (outside of the sperm and eggs), but this is less important so long as the entire stem cell supply isn't compromised by some gross organ damage.
The second part is much, much harder for humans though. While some tissues (say muscle) can easily replace dead cells, it's much harder in others, like the brain. You don't just have to replace a dead cell, but all of its connections to every other cell. And really, the brain is what this all comes down to, and an identity crisis in humans.  I don't care if you replace my liver and my left arm times, but how do you replace the brain?  I would speculate that we spend a lot more time keeping individual cells alive, because we can't replace them.
If you chop a starfish in half, you get two starfish, and would have trouble saying which was the original. Is it the same starfish if you've replaced the arms 3 times and the body twice?
If you chopped a human in half down the center, and we could magically regenerate everything, you would get two very different people from each other and the original. The problem being that there's no way to reconstruct the connections; you'd just get a blank brain to fill up.

Why is the Hydra Biologically Immortal?


Will a mobile hotspot booster work for an Xbox One?

Question: My AT&T mobile hotspot isn't compatible to support the internet connection on my Xbox One. So I'm wondering if I get a mobile hotspot booster, will it let me use my mobile hotspot with the Xbox?
Comment: I'm voting to close this question as off-topic because it is about mobile networking, not gaming.
Comment: I'm voting to leave this question open because the Xbox One is gaming specific hardware.
Answer: No. If your mobile data connection is not allowing you to use Xbox Live, it will be because of your phone or provider's limitations, not because of the signal strength. If it was a signal strength issue a better solution would be to plug your phone into the console directly and use it like that.
It's worth noting that even if you could use your mobile data for your Xbox, this would be a bad idea. Updates will use a large amount of mobile data and that's assuming you don't try to download any games (which can be 10s of GB in size). This would leave you with either no mobile data left, or a very large unexpected phone bill.


Saturated Boolean algebras in terms of model theory and in terms of partitions

Question: Let $\kappa$ be an infinite cardinal. A Boolean algebra $\mathbb{B}$ is said to be $\kappa$-saturated if there is no partition (i.e., collection of elements of $\mathbb{B}$ whose pairwise meet is $0$ and least upper bound is $1$) of $\mathbb{B}$, say $W$, of size $\kappa$. Is there any relationship between this and the model theoretic meaning of $\kappa$-saturated (namely that all types over sets of parameters of size $<\kappa$ are realized)?
Comment: I thought it was kind of funny that you gave it a name, $W$, only to say that no such thing exists :)
Comment: In their book "Models and Ultraproducts", Bell & Slomson discuss boolean algebras in Chapter 1, and saturated products in Chapter 11. The last section of 11 has historical and bibliographical remarks. I think if there were a relationship between the two uses of "saturated" they would mention it somewhere, but they don't seem to.
Answer: As far as I know, there is no connection; it's just an unfortunate clash of terminology.  It's especially unfortunate because the model-theoretic notion of saturation comes up in the theory of Boolean algebras.  For example, the Boolean algebra of subsets of the natural numbers modulo finite sets is $\aleph_1$-saturated but (by a definitely non-trivial result of Hausdorff) not $\aleph_2$-saturated, in the model-theoretic sense, even if the cardinality of the continuum is large.
When (complete) Boolean algebras are used in connection with forcing, it is customary to say "$\kappa$-chain condition" instead of "$\kappa$-saturated" in the antichain sense.


openSUSE not starting up after failed update

Question: More than failed it was a partial update, when I was updating there was a power failure and my laptop shutdown (battery is broken). Now when I try switching my system on, it shows the chameleon and then it just shows a small cursor at the top left of the screen and stays there forever. Any help to recover?
Comment: tried running run level 3, worked, did a zypper update, it gave me a bunch of programs that wont be installed and said nothing to do. Any solution please?
Answer: Just a thought:

insert installation CD in the drive
reboot
start installation
at the second stage, when the hardware is initialized go to console
mount your harddisk
mount CD
cp -av /your_cd_mount_point /your_harddrive/INSTALLCD
when done, eject CD, reboot
run system in runlevel 3
rpm -qa --last > installed_recently_rpms
go to repositories management
disable all repositories
add local repo from HDD (the one you just installed)
accept, run software managemet
find all packages which were recently updated (see point above), choose "update unconditionally"
accept
wait and pray
reboot

Good luck!
Comment: guess what, i tried a lot of solutions, nothing worked. Re installed suse, still same problem !!!! now what ?


Internal memory full

Question: I am using Micromax tablet for the last 4 years. As internal memory had become full, I removed many apps. Still same was the problem. I thought by factory res-setting the tablet, the problem would go away. Even after factory reset, it shows    internal memory is full even after factory reset . What should be done?
Answer: You might do Hard Reset that will help you. Sometimes Normal Reset Does not work.

First of all switch off the device by pressing the Power button.
In the next step hold down Volume Up + Power button for about 10 seconds.
You can release held keys when you see the Android Robot.
To enter the Recovery Mode hold down the Power key for a short while.
From the menu choose "Wipe Data/Factory Reset" by using Volume buttons to scroll and Power button to select options.
Tap "yes" to confirm the operation if you are certain you want to clear all your data.
Use the Power button to accept the option "reboot system now".
Well done!

This will surely help you. otherwise, your hard disk might get somehow corrupted.
Answer:
Micromax tabs usually come with multiple bloatware, if you are ok with root, then you can remove all those apps. It should free up significant memory.
Installing and moving apps to SD card will also help.
Remove unused/ less frequently used apps

Hope this helps

Internal memory full


If a hot Jupiter collides with the parent star, does it enhance or reduce the life of the star?

Question: Suppose a hot Jupiter is collided into parent star due to tidal force, does the life of the star becomes longer due to extra hydrogen, or becomes shorter due to extra mass?
Comment: Is the life of massive stars _in general_ longer due to the extra hydrogen, or shorter due to the extra mass?
Comment: If they're roughly the same metallicity then I would say the extra mass causes the star to burn slightly quicker, but I would add that this is probably negligible over the lifetime of the star itself.
Comment: Quicker would be my answer too.  More mass = shorter stellar lifespan.  That's a general rule with stars.
Answer: The short answer is pela's comment: more mass equals shorter life.
For a bit of a longer explanation...
The only way the life of the star could be prolonged is if the new material can be transported to the core.  This requires convection.  Most stars are not fully convective, having distinct layers of either convective or radiative zones. The net effect of the collision in this case is to simply add more mass to the star as a whole while adding no new fuel to the core (or a burning shell); ergo, shorter lifespan.
But some stars do (or may) have fully convective stages, such as the main sequences of very small (aka red dwarf) stars and very large stars with enough metals for a dominant CNO cycle.  So in such a situation the material of the colliding body would be transported to (and from) the core, giving more fuel to burn.  However, the star still has the same, increased mass, regardless of where the "new mass" currently is inside the star, resulting in higher core temperature. The net effect of which is that the increase to the fusion rate exceeds the proportional mass increase.  So, shorter lifespan.
The basic rule here being that core temperatures are dictated by the gravity well of the star, which is dictated by the mass (and a few other GR contributions, but usually predominantly mass).  The more mass, the deeper the well. So adding more mass just means the core (and areas near it) are in a deeper gravity well, meaning the temperatures go up.  Stellar fusion reaction rates are approximately non-linear polynomials in the temperature; some go as far as being proportional to $T^{40}$, the 40-th power of the temperature!  It's this non-linearity which results in the fundamental relation of the short answer: more mass equals shorter life.  Increasing the mass by a given proportion increases the fusion rates by a (much) larger proportion.


How to vary lambda in exponentially distributed numbers

Question: I am implementing an exponentially distributed random number generator (RNG) based on George Marsaglia's Ziggurat algorithm. I previously used the algorithm to create a normally distributed RNG. By the nature of the algorithm, the standard deviation is 1 and the mean is zero. In order to modify the curve, all one needs to do is multiply by the desired standard deviation and/or add the desired mean.
However, it doesn't appear to be quite as simple in the case of an exponential distribution, where I want to vary lambda. Yes, simply multiplying my X values from the RNG by some constant modifies its Y-intercept, but the X-intercept remains the same.
So my question to you is how can I modify the lambda of a set of exponentially distributed values whose original lambda is equal to 1? Thanks
Answer: If the random variable $X$ is standard exponential with density $\mathrm e^{-x}\mathbf 1_{x\geqslant0}$ and if $\lambda$ is positive then the random variable $Y=X/\lambda$ is exponential with parameter $\lambda$ and density $\lambda\mathrm e^{-\lambda y}\mathbf 1_{y\geqslant0}$.
Comment: so just divide x by lambda?


Using Permissions bukkit. How do I add a player through chat command?

Question: I think it's a bit annoying to open up config.yml for permissions every time I want to add someone to the server. As default, no one has permissions to do anything, they need to be in the user group. Is there a way to do this through the in game console?
Answer: You can use the following command to set a player's group with PermissionsBukkit:
/permissions player setgroup <player> <group>

So, this would set a player named Bob to the 'user' group:
/permissions player setgroup Bob user

Just make sure that you have the permissions.player.setgroup permission node set to true. You can also just use permissions.player.* or just permissions.* to get that permission as well.
Comment: Maybe merge the two answers to create a 2 way solution?
Answer: I use a plugin called setrank to achieve this. There are two versions, one for PEX here http://dev.bukkit.org/server-mods/setrankpex/
and one for bukkitperms here
http://dev.bukkit.org/server-mods/setrankpb/
(I think you want the second one)
It's quite easy to set up and use and if you want to let users buy ranks it can be configured (they use the /promo command)
Answer: I have tried to use /permissions player setgroup, but it didn't work on my server.  I suggest using /promote <player> for smaller servers. I also had to remove my whitelist/blacklist to make this plugin work.


Receiving range of ham radio on SSB with a portable radio receiver

Question: I'm learning about shortwave listening. I want to listen to amateur/ham radio on a portable radio (eg a XHDATA d-808) with SSB, I hear SSB is the main place hams would be on. I know it's hard to give an exact figure on range as conditions vary. But how far in kilometers am I likely to hear hams from with my portable radio? I live in Southern England, in the UK, in an urban area. Thanks
Comment: Hello and welcome to ham.stackexchange.com!
Comment: Would you please edit your question to mention what country you live in, and whether you live in an urban, suburban, or rural area?
Answer: The range of ham radio communications ranges from zero to unlimited. At the longer range of the scale, some hams direct their signal at the moon, where it's reflected back and received back on Earth. That's a round-trip distance of about 477,000 miles or 768,000 km. Communication over longer distances would be possible, but as far as I know there's nothing far enough away.
Unless you are using some very old, or very terrible equipment, range is limited not by your radio but by your antenna and the noise in your area, as well as the frequency and time you are listening on which will affect how well or not the signal can propagate over long distances.
It's likely if you are interested in hams far away, perhaps as far as the opposite side of the planet, you will be most interested in the frequencies that fall in the HF band. Even within that band, the effective range varies by time of day, time of year, and the particular frequency. The best way to discover which frequencies work over what areas at what times is to use a prediction tool like VOACAP.
Being in an urban environment, noise will probably be your biggest challenge. The best thing you could do would be to move (at least temporarily) to a very rural area. But if you can't do that, focus your efforts on getting an antenna outside and high up, and as far away from buildings and power lines as you can. If you have room for a directional antenna that will help a lot.
Knowing the best frequencies and times to listen, and with some attempt to get a good antenna up, you should be able to occasionally hear stations on the opposite side of the planet. There are periodic contests where hams try to get the most points for making the most contacts with the most stations that are the most far away, during one of these would be a good time to listen as many more hams with powerful stations will be transmitting.
Comment: If you like an answer @Emma32, please consider upvoting it.
Comment: Thanks Phil Frost.
Comment: Recently, was listening to W1AW code practice, when signal strength dramatically increased. A check on **spaceweather.com** showed that a solar flare had flashed, which energized our ionosphere. The sun's activity influences radio propagation greatly and makes even a mediocre receiver seem brilliant. Look forward to a more active sun over the next 5 years, peaking in 2025 (perhaps).
Answer: The range of amateur radio SSB over HF "shortwave" can be between a few meters to over 20000 kilometers, depending on frequency band, transmit power, antenna type/height/polarization/aim, solar weather (including sunspot cycle, solar flares, etc.), other ionospheric conditions, time of day, local RF noise floor (including your household electronics), and etc.
Some major sources of likely distance limitations for urban area shortwave listening are, first, not being able to put up a large enough high enough antenna with respect to the wavelength of interest, and second, local RF noise from poorly shielded or malfunctioning electronics (power transformers, USB chargers, LED lights, solar panels, etc.) within your neighborhood or building.  This RF noise can drown out distant signals of interest.
Comment: I can occasionally pick up shortwave SSB signals from halfway around the world (or possibly farther via long path), and at other times can't receive a signal from a local QRPp station a few blocks away (just over a small hill).
Comment: OK, thanks hotpaw, when you say pick up ham radio over a range of a few meters to 2000 kilometers, do you mean using a portable radio receiver something like XHDATA d-808 I mention? Or are you using some more powerful receiving equipment? I particulary want to know what range of amateur ham radio i'm likely to receive on a portable radio receiver as that's what I'm thinking of buying, thanks.
Comment: Random reviews on eham seem to suggest that it has decent sensitivity.  Likely not as good as a larger more expensive communications receiver, but also not significantly worse for urban SWL.  There may be other possible issues, so buyer beware.


How to implement Semantic Search in R or Python

Question: I have a task to provide semantic searching capabilities. For example, if I have a dataset of resume and if I search for "machine learning" than it should return me all resumes which have data science-related skills despite of missing "machine learning" keyword. How do we search the data through its meaning and related keywords I wonder? I have checked many algorithms also Like LSA, LDA, LSI but cannot find a resource which gives the implementation of the above.
Answer: There are many possible options.
One option is to create a dictionary of related terms. Then look for documents that contain those related terms.
This can be done with built-in data structures like Python's dict and pattern matching tools like regular expression (regex).
Answer: I can see two ways to do this:

Rule based approach:

You can create a list of keywords such as following:
keywords = ['machine-learning', 'machine learning', 'AI', ...]
And then you can search through the documents that you have.

BERT based approach:

Here is some base code that you might use:
from transformers import AutoTokenizer, AutoModel
import torch

tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased')
model = AutoModel.from_pretrained('bert-base-uncased')

def encode(text):
    inputs = tokenizer.encode_plus(text, return_tensors='pt', max_length=512, truncation=True)
    outputs = model(**inputs)
    return outputs.last_hidden_state[:, 0, :].detach().numpy()

resumes = [...]  # list of resumes
resume_vectors = [encode(resume) for resume in resumes]
query_vector = encode("machine learning")

from sklearn.metrics.pairwise import cosine_similarity

similarities = [cosine_similarity(query_vector, resume_vector) for resume_vector in resume_vectors]

top_resumes = sorted(zip(resumes, similarities), key=lambda x: x[1], reverse=True)

You can use this approach to find similar words from the resumes using cosine similarity.


sorting by smallest value in array inside of array in php

Question: I have an array of menus (breakfast, lunch, dinner) with their start times (08:00:00, 11:00:00, 16:00:00), and I need to pull out the menu closest to now() in the future and know which menu it is. This is what I have:
$menus = array(
    array("breakfast", "08:00:00"),
    array("lunch", "11:00:00"),
    array("dinner", "16:00:00")
    );

This is how I've been getting the soonest menu (assuming it's before 8am).
foreach($menus as $a) {
     $menu[] = $a[0];
     $time[] = $a[1];
}
echo min($time);

This gets me the soonest time 08:00:00, but I can't figure out how to attach the menu to this realization. Let's say it echoes 08:00:00, how can I get the $menu in there so I can also know that 08:00:00 corresponds to "breakfast"?
Comment: possible duplicate of [Sorting arrays numerically](http://stackoverflow.com/questions/1818514/sorting-arrays-numerically)
Answer: why not
$menus = array(
    '08:00:00' => 'breakfast'
    ...
    '16:00:00' => 'dinner'
)

Times are the key, values are the menu attached to that time.
If you inside on using the two-array structure, then as long as your keys in both arrays have 1:1 correspondence in positions, you can find the key for that value, then look up in the other array:
$min = min($time);
$key = array_keys($time, $min);
$menu = $menu[$key];

Answer: While I that the array structure can be made better, I was just curious to check how to do it with your specific data-set, so here goes:
    $menus = array(
        array("breakfast","08:00:00"),
        array("lunch","11:00:00"),
        array("dinner","16:00:00")
    );

    foreach($menus as $a) {
       $menu[] = $a[0];
       $time[] = $a[1];
    }

Considering this is how far you have reached so far, you can complete it by having a simple iterative function:
    function getMenu($time,$menus)
    {
        foreach($menus as $menu)
        {
            if($menu[1] == $time) return($menu[0]);
        }
    }

And you can call it so: echo getMenu(min($time),$menus);
Not optimal, and the data structure leaves much to be desired, but will get the job done...
Answer: To sort the array by the lowest value, preserving the rest the keys, you can try the following:
uasort($menus, function($a, $b) {
    return $a[1] - $b[1];
});

For example, if you run the above for the following array
$menus = array(
    array("dinner", "16:00:00"),
    array("breakfast", "08:00:00"),
    array("lunch", "11:00:00"),
    array("brunch", "09:30:00")
    );

you will get the following result:
array(4) {
  [1]=>
  array(2) {
    [0]=>
    string(9) "breakfast"
    [1]=>
    string(8) "08:00:00"
  }
  [3]=>
  array(2) {
    [0]=>
    string(6) "brunch"
    [1]=>
    string(8) "09:30:00"
  }
  [2]=>
  array(2) {
    [0]=>
    string(5) "lunch"
    [1]=>
    string(8) "11:00:00"
  }
  [0]=>
  array(2) {
    [0]=>
    string(6) "dinner"
    [1]=>
    string(8) "16:00:00"
  }
}