Nefesh Chaya in Bereshit and Rashi

Question: In Parashat Bereshit, Rashi comments 3 times the words Nefesh Chaya נפש חיה (Bereshit 1:20 ; 1:21 and 1:24) the same way which is:
"נפש חיה: שיש בה חיות", translated by www.chabad.org "living creatures: That there should be life in them".
Why is Rashi repeating the same thing 2 other times? What do we learn from these repetitions?
Any help to understand Rashi's comment would be appreciated.
Comment: In case you just forgot.
Comment: Here is the joker!
Comment: What if someone isn't learning in order and happens to be learning one of the latter two pesukim, so he has to comment on all three. The real question is why in some places where things are repeated (ex: the aseret hadbrot) Rashi DOESN'T repeat his comments
Answer: The Gur Aryeh (Genesis 1:20) explains that Rashi's intent is that נפש חיה doesn't mean 'the nefesh of a haya', but rather 'a nefesh that is haya'. That is, 'haya' is an adjective; not a noun. would one read it as a noun (which would be an easy mistake to make, given that the word חיה is frequently a noun, not a verb), it would mean that hayot are the subject of the verse. This is incorrect, as the Gur Aryeh notes, since the subject is fish; not hayot. Therefore, Rashi clarifies that 'haya' is an adjective, not the subject of the sentence.
Regarding the repetition, the Gur Aryeh explains that Rashi decided to repeat the comment, since although one would realise that in the first verse 'haya' is a not a noun, one would not necessarily realise this in the next verse. In the first verse, the term 'nefesh haya' is used to refer to what has already been describes as 'sherets'. However, the next verse does not describe it as 'sherets', and therefore one might have thought that the subject of the verse is a 'haya'. Therefore, he again has to clarify the 'haya' is not a noun. The reason that 'sherets' differs from 'haya' seems to be that it connotes an animal that is close to the ground as Rashi explains in verse 20. A typical 'haya' is larger, and therefore one would be more likely to make the mistake that 'haya' is a noun, and the subject in verse 20.
Furthermore Rashi has to repeat himself a third time, since the mistake would be easiest to make in verse 24. There the verse actually deals with land animals as opposed to fish, so reading 'haya' as a noun, would be an even easier mistake.

Nefesh Chaya in Bereshit and Rashi


Is there a standard for writing a command synopsis?

Question: It appears to me that everyone has their own idea on how to write a synopsis describing command usage for the end user.
For example, this is the format from man grep:
grep [OPTIONS] PATTERN [FILE...]
grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]

Now this has some syntax that appears in other manpages.  [] is recognized as optional, and ... makes sense as multiple of the same input.
But people use | or / for OR and there are others that will reverse what [] means. Or they do not give any indication as to where [OPTIONS] goes.
I would like to follow a standard for what I write, but every website I look at tells me something different.
Is there an actual standard way of writing synopses, or is the convention just what people have been doing over time?
Comment: For some reason I don't think that would help.  Every person would have there own standard, and then nothing would ever get done about it.
Comment: Pick one and stick with it.
Answer: The classic standard for this is from POSIX, Utility Argument Syntax (thanks to @illuminÉ for the updated link). It describes the syntax to be used in man pages, for example
utility_name[-a][-b][-c option_argument]
    [-d|-e][-f[option_argument]][operand...]

Being classic, it recommends using single-character options, with -W recommended for use by vendors, and that is how multi-character options are accommodated (see, for example, gcc Option Summary).
GNU software introduced multi-character options that start with --. Some guidelines from GNU for formatting man pages with those options can be found in the help2man reference.
Answer: Actually one answer can be found looking for SYNOPSIS (surprise!) in man 7 man-pages; it says:
       SYNOPSIS      A brief summary of the command or function's interface.

                     For commands, this shows the syntax of  the  command  and
                     its  arguments  (including options); boldface is used for
                     as-is text and italics are used to  indicate  replaceable
                     arguments.   Brackets  ([])  surround optional arguments,
                     vertical bars (|) separate choices,  and  ellipses  (...)
                     can  be  repeated.   For functions, it shows any required
                     data declarations or #include directives, followed by the
                     function declaration.

                     Where  a  feature  test macro must be defined in order to
                     obtain the declaration of a function (or a variable) from
                     a header file, then the SYNOPSIS should indicate this, as
                     described in feature_test_macros(7).


What do you call these little bits of the sky you see through a forest?

Question:
What do you call these little bits of the sky you see through a forest? Is there a word for it? Would you just use a word like little clear areas or holes? I am not sure how to express this.
Comment: I think I've seen "patches of sky" in that context.
Answer: I don't know of a single word for this idea. Nor do I know a standard phrase. English speakers trying to express this idea just describe it. "The sky visible between the trees", "the sky seen through the forest", etc.
We get a lot of questions on here about "what is a single word meaning ..." Maybe other languages often have single words to describe very specific ideas. But routinely in English, when we want to describe something specific, we use several words. Like we don't have separate words for "father's mother" and "mother's mother". We just say "father's mother" and "mother's mother".
Sometimes there is a single word, but it's rarely used, or only used in technical discussions.
Comment: ...or 'paternal' and 'maternal grandmother'!
Comment: @KateBunting Sure.
Answer: We don't have a phrase for the holes, but we do have a phrase for the light:

Dappled light refers to that spotted light which typically comes through gaps in a tree canopy.

"Dappled" means covered in spots, and is often also used for horses and ponies.
A word with similar meaning is "mottled light".


How to calculate avaerage of the average

Question: I am having data of 10 schools, each school is having different no of sections. Each section students attended different no of computer classes. How to calculate the average no of computer classes attended by 10 school students.
I tried to calcluated the overall average in following steps.
First i calculated average of each school by taking the sum of no of computer classes taken in the school divided by no of sections.
in second step, i added all the averages and divided the sum by no of schools(i.e.10). is it correct method. please suggest if anyother method available to solve this problem.
Comment: You should probably multiply each average by the number of students, add them up and deivide by the number of students. If you think about it, this is the _total_ number of classes divided by the _total_ number of students, i.e., the overall average.
Answer: In general, the average of averages is not the average. This was discussed before: Is the average of the averages equal to the average of all the numbers originally averaged?
The correct method is to undo the averaging over schools, as vonbrand suggested: find the total number of classes taken by the students of each school. Add those numbers together, and divide by the sum of total enrollments of the schools.


Give a serious explanation of the difference between an equation and a function.

Question: What's the difference between an equation and a function? I mean, I am not seeking for a high school-like answer like "an equation has an equals sign". I want to know what is the fundamental difference between the two. Why we need these two concepts, that seems to me to be the same thing? In physics we heard a lot about equations, but if we call all them functions, wouldn't we be right?
Comment: An equation has a number of solutions (between $0$ and $\infty$). A function maps each value in a given domain to a value in a given range. I'm kind of asking myself what's the non-difference between an equation and a function, because there doesn't seem to be anything in common between them. It's like asking about the difference between a cat and a table.
Comment: A function is a rule that assigns an object (output) to an object (input).  An equation is a statement the expresses the equality of two expressions.
Comment: @barakmanos +1 for the "cat and a table" comment hahaha
Comment: @DanielW.Farlow: Thanks, but I'm starting to think that it might sound a little disrespecting in a way. To OP - no disrespect meant, there's just very little room for comparison.
Comment: @barakmanos I just think it highlights the main problem in a rather amusing way--perhaps OP could be more clear about what is tripping him/her up.
Comment: @DanielW.Farlow: Yep, I agree. "not seeking for a high school-like answer" doesn't quite contribute to understanding what kind of answer he or she are expecting.
Answer: A function is something that yields a well-defined output for any appropriate input. Some, but not all, functions can be represented by equations, and not every equation naturally represents a function. In order to see an equation as a function, you have to decide what the output (the dependent variable) is supposed to be, and then you have to determine whether that has a unique value, given inputs that fill in the rest of the blanks in the equation.
Consider the equation $w=z^2$. We could interpret this equation as giving us a formula for $w$, as a function of $z$, because for a given $z$ value, we can say exactly what $w$ must be.
On the other hand, that same equation doesn't give us a formula for $z$ as a function of $w$. That's because, using the value $w=1$, it's impossible to say whether our output should be $z=1$ or $z=-1$.
I hope that this answer addresses your question appropriately.
Answer: They are the same in a sense. A function is technically an "equation", but an equation is not necessarily a function. It is incontrovertibly true; however, to say that any two values separated by an equals sign is considered an equation.  $5=2+3$ is an equation, but not a function. $y=2x+3$ or equivalently, $f(x)=2x+3$ is a function, but also an equation because it involves an equals sign.  Functions are equations that have both constants and variables which arrange in some way to map the function's value about those variables' dimensions.
Comment: 5 = 2 + 3 is an equality. An equation must contain at least one variable.
Comment: I think maybe it's the opposite: every equation is a function but not every function is an equation (some functions don't have a clear set of calculations to perform it).
Answer: In many cases, the distinction is subtle. A function is formally defined as a mapping between two sets $X$ and $Y$ in which each element of $X$ is assigned (that is, maps to) an element in $Y$. An equation is a statement about the equivalent value of two expressions. In this sense, a function $f$ is an equation because the symbol $f(x)$ is equivalent to some expression, probably involving $x$. A subtlety is that while we often express a function as $f(x)=...$, this is an equation while the function is more properly denoted $f$ (without reference of $x$). An example (from physics, for your sake) which would not (I think) be appropriately called a function is $$\nabla\cdot E=\frac{\rho}{\varepsilon_0}.$$ This is one of Maxwell's equations which is certainly not (as written) a mapping between sets.
Comment: Saying that a function is defined as $f(x)=x^2+5$ is really a high school answer. An equation is really just part of a function definition. For example
$$f:D\rightarrow R:\text{such that for every } x\in D \text{ there exists } f(x)\in R\text{ such that } f(x)=x^2+5$$
Unfortunately though, when pressed, a high school teacher will usually just say that "$x$ is just a *dummy* variable".

+1 Thank you for pointing out that the function is properly referred to just as $f$, instead of $f(x)$.
Comment: Yes. But I  preferr "there exists an y such that y = x^2 + 5".


Commenting or replying a specific node without the possibility of commenting others?

Question: I built a website sort of like an online directory for restaurants in my home town, and I am letting the users to leave their reviews about a specific restaurant, and what I need is to give access to the manager or owner of a specific restaurant to reply those reviews or to leave a comment on his node "restaurant", and he cannot reply or comments other restaurants except his.
is their any way to achieve that?
Answer: IMO the Message module would be a possible solution to answer this question. Using this module, you can create your own custom "Reviews", which can be used to store (save) the data about them in relevant (custom) fields such as dates, contact info, scores and what not).
About Message types: think of them as equivalent to Content types, whereas you create messages (instead of nodes) of a specific Message type (instead of Content type).
Example included in Commerce Kickstart
A great sample of this can be found in Commerce Kickstart, which uses the Commerce Message module, to create "Events logging". In that case in the format of an Order History, as shown in this screenprint (from this module's project page).
More info about the Message module
The Message module is an amazing module, it is fully entity based, which implies that it perfectly (out of the box) integrates with modules such as Views, etc. And there is also quite a few questions about it on drupal.SE, many of them tagged with message-stack.
Though there is not a lot of documentation about it (which is what makes it a hidden gem ...). A possible way to get started with it, and to get an idea of the kind of things it can be used for, is to have a look at the answers to:

How to create a basic message - notifications system displaying a real time message counter badge?
How to show message view containing own and following activity?
How to integrate messaging into a custom module?
Is there a simple way to notify users about new posts on the site?

Tutorials:

What is Drupal's Message Stack and how do its modules work together?
How to allow users to manage their own Message Stack messages?
What's the purpose of "Replacement tokens" of a Message type?


Can someone recommend a Java ebook maker for mobile on Ubuntu 12.04?

Question: Can someone recommend a Java ebook maker for mobiles? I want to create 176x220 or 240x320 ebooks for my personal use. I am using Ubuntu 12.04. I found a couple of softwares for Windows but I don't want to use Wine and windows dlls in my pc.
Thanks
Comment: Why does it need to be in Java?
Comment: Calibre is good, but it's not in Java
Comment: Because I need .jar file for my old style mobile.
Answer: I'd recommend Sigil (http://code.google.com/p/sigil/). I don't think Sigil is java based, but I also don't see the problem with this as you can compile sigil on any platform running ubuntu even if it has no x86 based architecture, if this is your problem (but I don't think so as you were talking about installing wine which is only possible when using a x86 based architecture, so you can simply download ).
By the way: Calibre is not a program for making ebooks but for managing and converting it.
If you have a x86 based processor (if windows is able to run on your system, the answer to this question is yes, however you can find out by typing uname -m on the command line, if the result contains "86" you have this kind of processor) then you can install sigil from a ppa by typing three commands on the command line:

sudo add-apt-repository ppa:rgibert/ebook this will ask you for your password
sudo apt-get update
sudo apt-get install sigil

Otherwise you could compile it from source.


When an image is uploaded to the Media Library, how long does that image stay on the Recently Updated Images list before it falls off the list?

Question: I think the answer is "it stays recent until the media cache is clear".  However, I am not 100% sure that is the best answer.
Comment: Can you share a screenshot of which dialog you mean?
Answer: As per my findings, this shows you the images from the system on the basis of some criteria. It doesn't mean that it will get removed if you clear the cache.
So to clarify it more, when you try to add an image in the image field, you can choose the image based on some criteria given on the left side of the Select Media dialogue like below.

Now if you go to the core database, you will get to know from where these criteria are defined. So go to the core database and on this location
/sitecore/client/Applications/Dialogs/SelectMediaDialog/PageSettings/SearchConfigs

you will get all the SearchConfigs that it is using to filter out the results. And on each config you will get some criteria.
Like for the "Recently Uploaded Images", you will see that it has a field checked called "CreatedWithin7Days" that shows you the images those were created with in 7 days.

If you uncheck this, you will see the filter will not work and you will get all the images when you click on the Recently Uploaded Images option.
So for each of the criteria on the left, there is a SearchConfig define in the core database and if you want to extend the functionality of any of these configs then you need to extend the pipeline that is holding this functionality.
Hope this makes sense.
Comment: Thanks for the time you took to write this.  The post is very helpful.
Comment: @ChristopherW Kindly accept the answer if you think it resolves your query. Thanks
Answer: When you use "Recently uploaded images" option, there is a query sent to Solr:
?q=(((_path:(3d6658d8a0bf4e75b3e2d050fabcf4e1) AND _language:(en)) AND __smallcreateddate_tdt:[2022-10-07T07:31:54Z TO 2022-10-15T07:31:54Z]) AND (_template:(f1828a2c7e5d4bbd98ca320474871548) OR _template:(daf085e8602e43a68299038ff171349f) OR _template:(c97ba92380094858bdd5d8be5fccecf7) OR _template:(eb3fb96cd56b4ac997f8f07b24bb9bf7))) AND _val_:__boost&start=0&rows=20&fl=*,score&fq=_indexname:(sitecore_master_index)&wt=xml

Notice the part
__smallcreateddate_tdt:[2022-10-07T07:31:54Z TO 2022-10-15T07:31:54Z])

While in theory, as per Sumit answer, it should take last 7 days, in fact it returns images where __Created is within last 8 days from now.
Comment: Thanks for the time you took to write this.  The post is very helpful.


Should unit test classes be kept under version control with the rest of the code?

Question: If I create a test suite for a development project, should those classes be kept under version control with the rest of the project code?
Answer: Yes, there is no reason not to put them in source control.  What if the tests change?  What if the interfaces change, necessitating that the tests change?
Comment: Ideally, you change the tests to demonstrate your change (and fail), then make your change to your code to pass the test.  Once the tests are passing again, check it all back into source control. That's test-driven development.
Answer: Yes, all the same reasons you put production code in to source control still apply to any unit tests you write.
It's the classic who, where and why questions:

Who changed the code?
When did they change it?
What did they change it for?

These questions are just as pertinent to testing code as they are to production code. You absolutely should put your unit testing code in to the repository.
Answer: Absolutely. Test classes must stay up-to-date with the code. This means checking it in and running the tests under continuous integration.
Answer: Absolutely! Test classes are source code and should be managed like any other source code. You will need to modify them and keep track of versions and you want to know the maintenance history.
You should also keep test data under source control unless it is massively large.
Answer: Unit tests should be tied to a code base in your repository.
For no other reason than if you have to produce a maintenance release for a previous version, you can guarantee that, by the metric of your unit tests, you code is no worse than it was before (and hopefully is now better).
Answer: Indeed yes. How could anyone ever think otherwise?
If you use code branches, you should try and make your testing code naturally fit under the main codeline so when you branch, the right versions of the tests branch too.
Answer: Yes they should.  People checking out the latest release should be able to unit test the code on their machine.  This will help to identify missing dependencies and can also provide them with unofficial documentation on how the code works.
Answer: Yes.
Test code is a code. It should be maintained, refactored, and versioned. It is a part of your system source.
Answer: Absolutely, they should be treated as first class citizens of your code base. They'll need all the love and care ie maintenance as any piece of code does.
Answer: Yes they should.  You should be checking the tests out and running them whenever you make code changes.  If you put them somewhere else that is that much more trouble to go through to run them.
Answer: Yes.  For all of the other reasons mentioned here, plus also the fact that as functionality changes, your test suite will change, and it should be easy to get the right test suite for any given release, branch, etc. and having the tests not only in version control but the same repository as your code is the way to achieve that.
Answer: Absolutely. You'll likely find that as your code changes your tests may need to change as well, so you'll likely want to have a record of those changes, especially if the tests or code all of a sudden stop working. ;-)
Also, the unit testcases should be kept as close as possible to the actual code they are testing (the bottom of the same file seems to be the standard). It's as much for convenience as it is for maintenance.
For some additional reading about what makes a good unit test, check out this stackoverflow post.
Answer: Yes for all the reasons above also if you are using a continuous integration server that is "watching" your source control you can have it run the latest unit tests on every commit.
This means that a broken build results from unit tests failing as well as from code not compiling.


Do we see planet venus everyday?

Question: Do we see planet Venus every day? (Just before sun sets or Just after sun sets) throughout year? or some days we don't see it?
Answer: No. Some days Venus is an evening star, visible for up to a few hours after the Sun sets. Some days it is a morning star, visible for a few hours before the Sun rises. Some days it is so close to the Sun in the sky that we can't see it at all (or even actually behind the Sun).
Venus can also be seen in daylight, if it is above the horizon, not too close to the Sun and the sky is clear. You need to know where to look for it, though, it's only a little brighter than the sky.
Comment: FWIW, a few years ago, Venus was close to its maximum brightness and very close to the Moon, so it was easy to locate. I was fortunate to have clear skies all day and I was able to see Venus with the naked eye every hour of that day, even though my eyes aren't as sharp as they were 4 or 5 decades ago. I must admit that I have spent a lot of time trying to spot Venus before sunset, and I guess that helped.
Comment: @PM2Ring you could see Venus at midday? Were you in a spaceship? ;-)
Comment: @Chappo Yes, I saw Venus at midday. At that time I was at home, on the mid-north coast of New South Wales, Australia. An hour or so later I was at the beach, and I saw Venus from there, too.
Comment: I'm impressed! You realise I will now have to scan the skies tomorrow - weather permitting - to see if I can spot it! I think it's close to maximum brightness at the moment.
Answer: Venus goes through a 19 month synodic cycle as seen from Earth, roughly:

8 months as an evening star
1 month passing in front of the Sun
8 months as a morning star
2 months passing behind the Sun

In any given month, Venus can be an evening star all month, be a morning star all month, be too close to the Sun, or pass from one state to the next.

Do we see planet venus everyday?


How do we specify the quality of Sound Juicer copied CD tracks?

Question: In Sound Juicer's Preferences the user can specify with which filetype to copy the CD data, but how do you specify the desired bit rate, i.e. audio quality?
Comment: You mean Sound juicer? Please update your question if needed, and then you find the answer here https://help.gnome.org/users/sound-juicer/stable/preferences.html.en
Comment: Thank you for alerting me to my titular error and sharing these clarifications with me, but that page does not directly answer my question: Am I to infer that there is no need to specify the bit rate of the file format, e.g. that ogg and mp4 will automatically make it as small as possible? (I am accustomed to iTunes or perhaps Windows Media Player in which one selects a bit rate (or amount of compression?) from a drop-down menu for a given file type. I was thinking this feature would or should be included in any popular CD data-extraction software.) Incidentally, Ogg Opus is on my PC, not WAV.
Comment: I always used Sound Juicer to rip to FLAC, for best quality. But then to play on my mp3 player that would not read FLAC used sound converter to convert to mp3. Last did this several years ago, but back then conversion & save to player was faster than conversion & then copy to player.
Comment: I do not have Sound Juicer installed anymore, but the link indicates you must change/add sound profiles in gstreamer in order to use these in Sound Juicer. Indeed, no friendly interface to change encoding parameters is available in Sound Juicer. You have to go in the basement to change these.
Answer: Default quality settings in Sound Juicer have always been flaky. In the early days, there was just a checkmark on what format you wanted to use without any possibility to change encoding parameters. Later, one was allowed to edit arcane gstreamer lines. An edit button in the preferences dialog allowed to edit Sound Juicer profiles. Currently, that possibility appears to be gone, leaving the original author of Sound Juicer to comment on a Reddit thread in which someone complained that removing the codec-editing option made it a Useless Piece of Crap.
So probably the advice is, as given for many years on many fora, to move on and find a better sound ripper.


Azure - Table Storage modeling

Question: Is there an reference about how to properly design Table Storage data? What to put in the partition and what in the table? Are there any principals to follow(like ER model in SQL)?
Answer: In general, you need to ensure that your content-searching will be efficient. Data is stored based on partition key and indexed on row key. If, say, you have app ID as partition key and customer ID as row key, you'd have very fast searching for a customer. However: Imagine having to search by customer's last name (another property). Now you'd need to do a table scan within the app's partition. You might need a second table to map customer's last name (as row key) to customer ID (a property).
To see some real-world guidance, take a look at this msdn article.
Answer: Another perspective is to envisage the Partition + Row Key as analogous to a Primary Key (stored in clustered index form) of a SQL Server database.
Determine the Primary Key as a composite key, of one or more sub keys (depending on your query needs) and then split the primary key into a partition segment and a row segment appropriately, depending on the scalability requirements of your application.

Azure - Table Storage modeling


I'm trying to integrate Bitbucket into AWS Code Pipeline? What is the best approach?

Question: I want to integrate my code from Bitbucket into AWS Code Pipeline. I unable to find proper examples on the same. My source code is in .Net.
Can someone please guide me.
Thanks.
Comment: the only source options i see available so far are github, codecommit and s3. it might be possible to use a Bitbucket pipeline to push code to S3 or upstream to CodeCommit and then use that source.
Comment: Ya thats what i've also come across. But at this stage I can't change my code source to CodeCommit.
Comment: Everybody here is assuming you're talking about Cloud Bitbucket. Can you update the question to clarify it is not the Self Hosted version you're talking about?
Comment: @einarc I just checked there is a different tag for bitbucket server
Comment: @NigelFds I can't see it: https://github.com/aws-quickstart/quickstart-git2s3/tree/master
Comment: @einarc I'm pretty sure the self-hosted version of Bitbucket - previously Atlassian Stash was rebranded Bitbucket server well after OP posted this question.
And NigelFds is referring to stackoverflow tags on this question, not in the AWS docs.
Comment: @OllyTheNinja Got it, thanks!! Then the correct answer is. Bitbucket Cloud is now supported by CodePipeline and CodeBuild.
Answer: You can integrate Bitbucket with AWS CodePipeline by using webhooks that call to an AWS API Gateway, which invokes a Lambda function (which calls into CodePipeline).  There is an AWS blog that walks you thru this: Integrating Git with AWS CodePipeline
Comment: I've followed this guide to setup Bitbucket integration via S3 into CodePipeline.  Works well.  The only issue I have is that I can't setup separate branches to run through the pipe; 'develop' to a test environment, 'master' to production environment.
Comment: We tried this on Bitbucket server. You lose a lot of the advantages of git. If you're on server might as well use Bamboo to generate and submit to ECR and then use ECR as a source. That is of course, only if you're using micro services, which is what we're looking at.
Comment: ok I'm having a couple of issue with Code Pipeline since I'm using .Net C#  and have a lot of configurations.
Comment: That tutorial's code has been updated to process Bitbucket webhook events, but only for the cloud version. The OP did not specify if he's in a private repo or using Bitbucket Cloud.
Answer: Follow up for anyone finding this now:
AWS CodeBuild now supports Atlassian Bitbucket Cloud as a Source Type, making it the fourth alongside the existing supported sources: AWS CodeCommit, Amazon S3, and GitHub.
This means you no longer need to implement a lambda function as suggested in @Kirkaiya's link to integrate with Bitbucket - it is still a valid solution depending on your use case or if you're integrating with the non-cloud version of Bitbucket.
Posted on the AWS blog Aug 10, 2017 -
https://aws.amazon.com/about-aws/whats-new/2017/08/aws-codebuild-now-supports-atlassian-bitbucket-cloud-as-a-source-type/
And to clarify for the commenters, this link talks about integrating with CodeBuild not CodePipeline: you still need to find a way to trigger the pipeline, but when it is triggered CodeBuild will pull the code from BitBucket rather than having to copy the code to S3 or AWS CodeCommit before triggering the pipeline.
Comment: But the question is about CodePipeline, not CodeBuild
Comment: I've tried the proposed solution. It's true you can configure AWS CodeBuild to use BitBucket as source. But it won't allow to use this configured AWS CodeBuild step as part of the CodePipeline.
The message is:  AWS CodePipeline does not support Bitbucket
AWS CodePipeline cannot build source code stored in Bitbucket. If you want AWS CodePipeline to use this build project, choose a different source provider.
Comment: A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](//meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it's there, then quote the most relevant part of the page you're linking to in case the target page is unavailable. [Answers that are little more than a link may be deleted.](//stackoverflow.com/help/deleted-answers)
Comment: As long as I understand AWS CodePipeline will use the preconfigured AWS CodeBuild as a source.
Comment: You don't know if the OP or who's reading this is using Cloud Bitbucket or their own Bitbucket server. While the first case is supported, the second isn't.
Comment: @einarc I'm pretty sure the self-hosted version of Bitbucket - previously Atlassian Stash was rebranded Bitbucket Server well after OP posted this question. Pretty sure OP would have referred to it as "Atlassian Stash" if that's what they were using at the time.
Comment: @OllyTheNinja You're correct. The web hook response from Bitbucket Server is similar, so you can use a Lambda to parse it and put on S3 and then use that as a Codepipeline source, albeit somewhat complex and losing most of the advantages of git. So you're better off using Bamboo to submit to ECR and using ECR as the source for Codepipeline, Bitbucket Server integration with Bamboo suffices for the Build part of the process, it's the deploy part of CI/CD that Bamboo lacks(chicken and egg problem).
Comment: @einarc why are you still talking about Bitbucket Server? We've established OP was referring to what is now Bitbucket Cloud.
Answer: BitBucket has a service called PipeLines which can deploy code to AWS services. Use Pipelines to package and push updates from your master branch to an S3 bucket which is hooked up to CodePipeline
Note:

You must enable PipeLines in your repository
PipeLines expects a file named bitbucket-pipelines.yml which must be placed inside your project
Ensure you set your accounts AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the BitBucket Pipelines UI. This comes with an option to encrypt so all is safe and secure

Here is an example bitbucket-pipelines.yml which copies the contents of a directory named DynamoDb to an S3 bucket
pipelines:
  branches:
    master:
      - step:
          script:
            - apt-get update # required to install zip
            - apt-get install -y zip # required if you want to zip repository objects
            - zip -r DynamoDb.zip .
            - apt-get install -y python-pip
            - pip install boto3==1.3.0 # required for s3_upload.py
            # the first argument is the name of the existing S3 bucket to upload the artefact to
            # the second argument is the artefact to be uploaded
            # the third argument is the the bucket key
            - python s3_upload.py LandingBucketName DynamoDb.zip DynamoDb.zip # run the deployment script

Here is a working example of a Python upload script which should be deployed alongside the bitbucket-pipelines.yml file in your project. Above I have named my Python script s3_upload.py:
from __future__ import print_function
import os
import sys
import argparse
import boto3
from botocore.exceptions import ClientError

def upload_to_s3(bucket, artefact, bucket_key):
    """
    Uploads an artefact to Amazon S3
    """
    try:
        client = boto3.client('s3')
    except ClientError as err:
        print("Failed to create boto3 client.\n" + str(err))
        return False
    try:
        client.put_object(
            Body=open(artefact, 'rb'),
            Bucket=bucket,
            Key=bucket_key
        )
    except ClientError as err:
        print("Failed to upload artefact to S3.\n" + str(err))
        return False
    except IOError as err:
        print("Failed to access artefact in this directory.\n" + str(err))
        return False
    return True

def main():

    parser = argparse.ArgumentParser()
    parser.add_argument("bucket", help="Name of the existing S3 bucket")
    parser.add_argument("artefact", help="Name of the artefact to be uploaded to S3")
    parser.add_argument("bucket_key", help="Name of the S3 Bucket key")
    args = parser.parse_args()

    if not upload_to_s3(args.bucket, args.artefact, args.bucket_key):
        sys.exit(1)

if __name__ == "__main__":
    main()

Here is an example CodePipeline with only one Source stage (you may want to add more):
Pipeline:
  Type: "AWS::CodePipeline::Pipeline"
  Properties:
    ArtifactStore:
      # Where codepipeline copies and unpacks the uploaded artifact
      # Must be versioned
      Location: !Ref "StagingBucket"
      Type: "S3"
    DisableInboundStageTransitions: []
    RoleArn:
      !GetAtt "CodePipelineRole.Arn"
    Stages:
      - Name: "Source"
        Actions:
          - Name: "SourceTemplate"
            ActionTypeId:
              Category: "Source"
              Owner: "AWS"
              Provider: "S3"
              Version: "1"
            Configuration:
              # Where PipeLines uploads the artifact
              # Must be versioned
              S3Bucket: !Ref "LandingBucket"
              S3ObjectKey: "DynamoDb.zip" # Zip file that is uploaded
            OutputArtifacts:
              - Name: "DynamoDbArtifactSource"
            RunOrder: "1"

LandingBucket:
  Type: "AWS::S3::Bucket"
  Properties:
    AccessControl: "Private"
    VersioningConfiguration:
      Status: "Enabled"
StagingBucket:
  Type: "AWS::S3::Bucket"
  Properties:
    AccessControl: "Private"
    VersioningConfiguration:
      Status: "Enabled"

Reference to this Python code along with other examples can be found here: https://bitbucket.org/account/user/awslabs/projects/BP
Comment: Note - Bitbucket Pipelines is only supported by Bitbucket Cloud, not Bitbucket Server (self-hosted).
Comment: Thank you for the contribution. Why not use aws cli and install it with `pip install awscli` which gives you `aws s3 sync` among other tools which intergrate well with AWS?
Comment: BitBucket integration is now fully supported by CodePipeline: https://aws.amazon.com/about-aws/whats-new/2019/12/aws-codepipeline-now-supports-atlassian-bitbucket-cloud/
Answer: If you are looking for a way to automate your build deploy process using AWS CodePipeline with source as bitbucket without using lambdas do the following steps.

Create CodeBuild which supports BitBucket as of now. https://docs.aws.amazon.com/codebuild/latest/userguide/sample-bitbucket-pull-request.html
Also create a web-hook which rebuilds every time a code is pushed to repository.
You cannot use a web-hook if you use a public Bitbucket repository.
Code Build will trigger automatically on commit,and will create a zip file and store it in s3 bucket.
Create Code Pipeline with source as S3,and deploy it using codeDeploy. As S3 is a valid source.

Note -1. In order to create a webhook , you need to have bitbucket admin access
So the process from commit to deployment is totally automated.
2. As of now(April'19) CodeBuild does not support webhook on Pull request merge.If you want you can create trigger which will trigger code build say every day.
You can also create triggers to build code periodically https://docs.aws.amazon.com/codebuild/latest/userguide/trigger-create.html
Update - (June'19) - Pull Request builds for PR_Merge is supported in CodeBuild now. Reference: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-bitbucket-pull-request.html#sample-bitbucket-pull-request-filter-webhook-events.
Answer: an alternative to the answer of @binary, and clarification to @OllyTheNinja's answer:
in short: let CodeBuild listen to Bitbucket's Webhook and write to an S3 object. in the pipeline listen to the update event of the latter.
In AWS codesuite

define a CodeBuild project, with

Source: Bitbucket that uses its WebHook to listen to git-push events.
Buildspec: build the project according to buildspec.yml
Artifact  store output of the build directly to an S3 container.

define the pipeline:

Source: listen to updates to the previously defined S3 object
remove Build step
add other steps, configure deploy step
Answer: AWS CodeBuild Now Supports Building Bitbucket Pull Requests, and we can make use of this for a better solution without using webhooks/API Gateway/Lambda
You can use a CodeBuild to zip your code to s3 and use that as a source in your CodePipeline
https://lgallardo.com/2018/09/07/codepipeline-bitbucket
Comment: You can have a BitBucket PR trigger a CodeBuild now but, at this time, I think you can only do this from the UI not from CloudFormation.
Answer: For me, the best way to integrate Bitbucket with any AWS Service, is to use Pipelines to mirror any commit into a (mirror) AWS CodeCommit repo. From there, you have prime integration into any service on AWS.
You can find an excellent how-to: here :
Answer: In 12/2019 AWS launched a support for Atlassian Bitbucket Cloud in beta mode.
So now you can natively integrate your AWS CodePipeline with Bitbucket Cloud


Rational $3$-torsion points of an elliptic curve.

Question: Let $E$ be an elliptic curve defined over $\mathbb{Q}$ with equation $y^2=x^3+(ax+b)^2$, where $a,b \in \mathbb{Q}$.
I have to prove that $0$ and $(0, \pm b)$ are the rational $3$-torsion points of $E$.
I know that if $Q$ is a $3$-torsion point then $[2]Q=-Q$ and that the $x$-coordinate of a $3$-torsion point satisfies $x(3x^3+4a^2x^2+12abx+12b^2)=0$
Now, clearly $0$ is a $3$-torsion point and if I choose $x=0$ and I plug it into the equation of $E$ I get $y^2=b^2$, thus $y= \pm b$.
But now I don't know to continue and prove that there are no other rational $3$-torsion points (for example if $a,b \in \mathbb{Z}$ I would have used the rational root theorem, but I don't know in this case..)
Comment: Over the algebraic closure $\overline{\Bbb{Q}}$ the curve has the full 3-torsion of eight points ($E[3]\simeq C_3\times C_3$). If you are familiar with the Weil pairing then the claim follows easily. For if $E[3]$ is rational over a field $K$, then $K$ must contain the values of the Weil pairing, that is, the third roots of unity. This rules out the possibility that $E(\Bbb{Q})$ could ever contain the full 3-torsion subgroup.
Comment: That's maybe helpful.. since $3x^3+4a^2x^2+12abx+12b^2=3(x^3+a^2x^2+2abx+b^2)+a^2x^2+6axb+9b^2=3y^2+(ax+3b)^2$ and this is $0$ iff $y=0$ and $x=-\frac{3b}{a}$
Comment: I know that on $\overline{\mathbb{Q}}$ there are nine $3$-torsion points (the roots of $\psi_3^2$ and $0$), but I don't know Weil pairing, and I haven't proved anything yet about the group structure of $E[m]$
Comment: Mind you, that curve has a singularity at $(-4,0)$ if $a=3,b=4$. In that case (probably also for other pairs $(a,b)$) you don¨t have an elliptic curve, This may be needed to rule out eventual other zeros of $\psi_3$.
Answer: Now $\Delta_E=16b(4a^3b^2-27b^3)$.
We want to find the solution for $3x^3+4a^2x^2+12abx+12b^2=0$ and we can rewrite it as
$3(x^3+a^2x^2+2abx+b^2)+a^2x^2+6abx+9b^2=3y^2+(ax+b)^2$ and this is equal to $0$ iff $y=0$ and $x=-\frac{3b}{a}$.
Thus, if we plug those values to the equation of $E$ we get $0=-\frac{27b^3}{a^3}+4b^2 \Leftrightarrow 4a^3b^2-27b^3=0 \Leftrightarrow \Delta_E=0 $ but then we get a singular curve, hence it cannot be.


Lambda as function parameter

Question: What's the notation for declaring a lambda variable, or function parameter, without the use of auto or templates? Is there any way to do so? Or does the compiler define a unique class object for each lambda whose name is unknown to the programmer before compile time? If so, why? Can't they just be passed as some sort of function pointer? It would be a major disappointment if that were not possible.
Comment: "*It would be a major disappointment if that were not possible.*" Why? How could that possibly be useful?
Comment: @ildjarn For runtime lambda!
Answer: Lambdas may hold state (like captured references from the surrounding context); if they don't, they can be stored in a function pointer. If they do, they have to be stored as a function object (because there is no where to keep state in a function pointer).
// No state, can be a function pointer:
int (*func_pointer) (int) = [](int a) { return a; };

// One with state:
int b = 3;
std::function<int (int)> func_obj = [&](int a) { return a*b; };

Comment: Actually a string literal is a `const char[N]` where N is the number of characters in it plus one.
Comment: Oh, I get it. So that's why they're of undetermined type, because they could be a function object with a few member variables?
Comment: I suspect having an indeterminate type is more a C++ standard thing; IIRC, most of the literals in c++ don't actually have a defined "type", rather, they are a literal that can convert to different types (like, a string literal is not a const char *. It can become a const char * or a char *). I suspect this gives implementations some leeway? But certainly one of the benefits of this is it allows a literal to become multiple types. (some of this is on shaky memories of the standard though, so reader bewarned)
Comment: The second solution does seem to violate the "without templates" part of the question. That's unavoidable, though: the type of a lambda cannot be named, so you either have to use a _standard_ conversion to another type or use templates. (User-defined, non-template conversions can't name the lambda source type either). So, as it happens the only conversion from lambda types that does not involve templates is to a function pointer.
Answer: You can use a polymorphic wrapper for a function object. For example:
#include <functional>

std::function<double (double, double)> f = [](double a, double b) { return a*b };

Lambda as function parameter


When i press "CTRL + C" at "caffeinate -i" I get a non 0 exit status. Why?

Question: If I press CTRL + C at caffeinate -i I have a non 0 exit status.

My terminal prompt shows me with red x that the previous command had a not 0 exist status. Why is that?
Comment: The simple answer is "because `caffeinate` is programmed to return a non-zero exit code if interrupted". Which practical problem are you trying to solve here?
Answer: Because 0 indicates normal exit with a success status. Any other way to exit (with an error report, or an abnormal exit) causes a nonzero status.
There are two ways a program can end: either because it explicitly asked to exit (with the exit system call or equivalent), or because it was killed by a signal. If the program exits, it indicates its exit status as an argument to the exit system call, which is conventionally 0 for success and a number between 1 and 255 for errors. (What happens with higher values, or whether even higher values are possible, depends on the operating system, so very few programs even try.) If the program is killed by a signal, there is no exit status from the program (it didn't get a chance to set one), but instead the exit status indicates which signal killed the program.
The program's exit status is conveyed to the program's parent process via the wait system call (or equivalent). It encodes both the explicit exit status for normal termination (if the program called exit), and the signal number for abnormal termination (if the program was killed by a signal). In the shell, the status information, available in the special variable $?, is blended somewhat: it's the program's exit status for a normal termination, and the signal number plus 128 for abnormal termination. All signal numbers are in the range [1, 127], so $? is 0 for success, (normally) 1 to 127 for a normal exit indicating failure, and 129 to 255 for a signal.
Pressing Ctrl+C sends the signal SIGINT. If the program dies from it, its shell exit status is 130 (128 + SIGINT, and SIGINT = 2 on macOS).
Some programs catch signals and run some cleanup code so that events like Ctrl+C cause a clean shutdown. Normally, once they've finished cleaning up, they disable the signal handler and re-raise the signal (rather than calling exit), so that the reason for termination is reflected in their exit status.
Comment: Great answer... amazing that it's gotten no upvotes in a year.
Answer: The source is at opensource.apple.com. Basically caffeinate -i ends up in a call to dispatch_main() which never returns (so it only can be interrupted).


Does saying "he uses" imply volition?

Question: A recent L.A. Times brief mentioned that the horse California Chrome's qualification for a race was in question because "he uses nasal strips."  The phrasing caught my eye because, to me, saying "he uses" implies that it is the horse's decision (as opposed to that of his trainers or other people).  Was the paper correct?
Comment: My nephew's car uses about a quart of oil a week.
Comment: In the horse racing industry, the horse is always the subject. The jocky, owner, and everyone else are inconsequential. This kind of thing creates jargon, where words are used oddly for a specific context.
Comment: There are contexts where using something implies volition, but volition is not an inherent part of the definition.
Answer: They also have an article entitled "California Chrome permitted to use nasal strip in Belmont Stakes", suggesting that it's the horse that will not be prevented, and as such has an even greater implication of volition.
There are some uses of use that are clearly not implying volition on the part of the subject.

Plants use photosynthesis.
Webservers use caching.

I do though agree that the wording here does seem to imply volition, though implication is a tricky matter in defining words by dint of being an implication rather than a direct meaning.
I'd say the use wasn't "wrong" exactly, but was still infelicitous.
Many people have a tendency to personify, to speak of an animal or even an inanimate object as if they were a person. The effect can range from the deeply inarticulate through to the beautifully poetic (the latter more often when one is deliberate in doing so). I would suggest that the writer here was somewhere between these two extremes. The very jarring quality that at least some readers (myself and the OP at least) found in the phrasing comes precisely from it being neither a very good or very bad case, and so neither being immediately absorbed as they intended nor immediately rejected as gibberish, but somewhere between the two.
Comment: In that headline, might 'California Chrome' not be a metonym for the whole team - horse, jockey and trainers? For me, having an explicit 'he' implies volition more strongly.
Comment: @djb, I wondered if they could be using it of the team, but the wording in the rest of the article seemed to very much use that name only of the horse himself. You have made me think of something I should add to my answer though.
Answer: This sounds as though the horse decided to use nasal strips, which is obviously absurd.
If you were to be pedantic about it you could say that if the horse derives benefit from the strips, then it is 'using' them in that sense. But the writer should have taken care not to hide such a (relatively) obscure meaning underneath an obviously silly one.
Answer: I'm sure you understood that it's not the horse's choice to use nasal strips, and I'm pretty sure most of the other readers did as well. The point of language is to communicate, and in certain venues, communication must be brief. This may be one of those instances.
It would have been unwieldy to write "The horse's trainer uses nasal strips on California Chrome."
This kind of construction isn't wrong if it still communicates correctly. The fact is that nasal strips are used, and it's not the trainers who are wearing them, it's the horse.
Comment: They could very easily just have done what many other sites have done and [used _wear_ instead of _use_](http://www.bloodhorse.com/horse-racing/articles/85161/can-chrome-wear-nasal-strip-in-belmont). That implies no volition and is only one letter longer (and a syllable shorter).
Comment: @JanusBahsJacquet - to me, *wears* also seems to imply volition, not so much as *use*, perhaps, but not terribly different.
Comment: This may all be true, but in this case, they did ask the horse and the horse both nodded agreement and stomped his hoof once for "yes".  So it actually was the horse's choice.
Answer: No. In horse racing, the horse, its trainer and its jockey (and any other handlers/stakeholders etc) are considered one entity. It is implied that when one talks about the horse they are talking about the team itself as a single entity.
The 'horse' in this sense doesn't have an understanding of what it's handlers did, nor whether using the nasal strips was 'right' or 'wrong'. It can't assume sole responsibility for the act.

A similar comparison could be made with ships/boats being referred to as 'she'. Someone waiting for a ship to arrive might say:

"She'll be coming around the headland any second now"

Does this imply the ship will be turning into port of its own volition? No, unless its some sort of automated ship (but lets assume for this scenario that it isn't). The ship, it's crew and cargo are considered as 'one entity'.
One could also say

"She lost half her cargo in the storm"

Is it the ships fault? No, because the ship doesn't have an understanding of what it lost, nor does it have an understanding that storms = bad or losing cargo = bad. It would be unfair to place the blame solely on the ship.

Thus, saying 'he uses' in this case does not imply volition of the horse directly, as 'he' in this case is including the horse's personnel/trainers and other stakeholders.

Does saying "he uses" imply volition?


How to force player to ride in a minecart?

Question: How can I make players automatically get into a minecart when they are near it without right-clicking? I need this for my server.
Comment: yes it's a bukkit server.
Comment: Have you tried anything yourself?
Comment: I have traincraft but it sometimes crashes the server.
Comment: Are you using Bukkit?
Comment: Or what are _all_ the plugins you have?
Answer: The only possible way would be to write your own plugin, or..
Use RailCraft mod.
RailCraft has embarking track, which is able to load entities into minecarts. When track is applied the redstone power, it will take the entity near and will load it into minecart. There is also reverse track, which disembarks from minecarts.

Description

By harnessing the latent powers of the mysterious Ender Pearl we were
  able to develop a track capable streamlining the loading process of
  both passengers and animals!
This astounding breakthrough is capable of teleporting, yes
  teleporting, any nearby living being directly into an empty cart!
The range of this wonderful device can be adjusted by right-clicking
  the track with a crowbar. Additionally, because our R&D guys were
  tired of being teleported willy nilly while working on the device,
  they were able to tune it such that the specific molecular resonance
  of the trusty Crowbar will disrupt the teleportation field. Just hold
  it in front of you like a charm and you need not fear the whims of
  spacetime!

With TrainCraft, you probably will have hard times to do so, because that mod has maybe fancy models and textures, but....well, it is reaaally inferior with features. RailCraft is really better in doing automatization with your trains. It has all loading/unloading automatization, you can use semaphores and routing for automatically let trains drive between stations and way more. I doubt that TrainCraft has that. And one more thing - RailCraft is way more maintained, updated and so: There is already (not really finished) beta version for MC 1.10.2 .
If you have crashes with TrainCraft, you may want to know that it is nearly abandoned and those things won't get fixed, probably. However one cannot say anything without seeing crash-reports(but not here, because Arqade does not provide technical support for modded games), it might not be because of Traincraft at all....Really, Railcraft has way better support and active development, it only is oriented for vanilla-like style of models, compared to TrainCraft.
Edit: One note - it is possible that if TrainCraft is written with good manners, that RailCraft tracks will be compatible with TrainCraft carts. But I don't really know, if that is a thing.
Comment: When I saw this perfect answer... I thought that maybe I'll retract my close vote (just kidding)
Comment: Well, there was no need to close, really. Asking for features of mods is really okay. Btw don't you want to go playing mc on our server, Rudolf?
Comment: Actually, I didn't close-vote, as I agree with you. And I would be happy to play on your server, but please note, that I won't be at my computer for the next 6 days, only on my phone - I can't join you server for the following six days, and additionally, I can't post comments, since my phone doesn't support advanced JavaScript. So see you later!
Comment: @Antonie Aaaand... I'm back -- could I get the IP of your server, or the name? I'm really interested.
Comment: @RudolfL.Jelínek We have modded server that in fact has Railcraft installed, thus anyone reading this can try it out, with our own modpack. However by now, we have it kinda "hidden" from website and so, so only interested people know about it and play there. But soon it will be released publicly, probably. All info and discussion are held on our Discord server, in #industry channel (look also at pinned messages). We can continue our discussion there. https://discordapp.com/invite/tX2ze
Comment: Oh sorry, I totally forgot about you - could you resend the invite? :)
Comment: @RudolfL.Jelínek Oh, I thought that I put there time-unlimited link, sorry! I will edit the link by today's evening, so just check it here then! :)
Comment: @RudolfL.Jelínek https://discord.gg/kAT9BYb
Comment: Yay! Clicking... (in 2 mins)
Comment: Not seeing you there still xD


Applications of RSAES-OAEP Cryptography

Question: I am trying to do a project on RSAES-OAEP cryptography.Can anyone advice me any good applications where this can be used where there will be a lot to learn about in a programming and application perspective?
Answer: RSA is good for short messages, so think about applications involving short messages. e.g.

Key encryption. i.e. use RSA to encrypt an AES key for transport
Credit card data. i.e. encrypting a credit card number for transmission

Applications of RSAES-OAEP Cryptography


Why is it that the preview in the video editor is different from the render?

Question: I'm making a video for my Youtube, don't ask why I use blender for it, but for some reason the preview is completely different from the render output. In my video, I used one long clip and cut it into many pieces while in edit, but in the render, it seems blender just used the original clip playing, without the cuts. This is weird because all the other effects I have work as I wanted, but the this clip here doesn't seem to match the render at all. Here, the render (frame 2189) is seen next to the preview of the same frame. Why is it different?
(Ill also note that switching to older versions like 2.7 fix this issue.)
Comment: Sounds like a bug…
Comment: Check your source file if it has vfr(variable frame rate) in MediaInfo: https://mediaarea.net/en/MediaInfo If this is the case you'll have to convert it to cfr and then select all of strips one by one and change the source file in the sidebar source panel.  Most NLE's can't deal with vfr, and needs the footage converted either internally or externally to cfr.
Answer: I've just had this issue in Blender 3.0. It was due to the screen recording footage I had being a variable frame rate.
You can check if yours has variable frame rate (and amend it to be constant) using ffmpeg
Checking if you have variable frame rate: https://www.addictivetips.com/windows-tips/check-video-variable-framerate-on-windows-10/
Fixing it: https://trac.ffmpeg.org/wiki/ChangingFrameRate
Comment: I think I figured it out actually. I'll try to explain it in an answer
Comment: Awesome, this worked! I found that the audio didn't quite sync up with the video when I converted a variable frame rate to a constant 30. However I managed to get around this issue with multiple cuts. Any ideas as to why the audio is not synced?
Comment: It may be that your video wasn't 30fps. I think mine ended up at something like 29.94fps, which over a longer period of time would get out of sync
Answer: Did you check in the Properties tab, on the icon that looks like a printer, at the Post Processing section if either the Compositing or Sequencer box is checked?
The Compositing outputs the Compositor Editor or the 3D Viewport camera while the Sequencer outputs the VSE/Video Sequencer.
Answer: Ok, I figured it out i think. I was using 100% proxies, and for some reason the proxy footage didn't match the actual footage after I edited the proxy.


Appearance --> Menu -not showing on my main page

Question: I have created menus (Appearance ---> Menu) and they are not showing up on my website. I am running the Kingdom Theme. Please help and keep in mind i am new to this. Thanks in advance!
Comment: have you contacted support for the kingdom theme?
Answer: Once you create the menu (in Appearence, Menu), you have to tell the theme to use that menu. That is usually in Appearance, Customize, which should then have a choice somewhere (depending on where the theme author put it) that you can specify a menu you built. Some theme's Customization let you directly create/change/specify a menu.
Just creating the menu doesn't apply it to the theme. You have to 'tell' the theme (through Customize) what menu to use (you can create more than one; and some themes allow you to have different menus in different places).
Comment: I think that is the issue, although i cant find how do make this happen. In the customize area there is nothing that "points" the menu to the Homepage.
Comment: You define the menu, and the menu 'elements' in the Appearance, Menu page. You tell the theme which menu to use somewhere in their Appearance, Customize area. You'll have to try all of the options in the Customize area to see where they theme developer put it. You might also find where to 'use' the menu on the Appearance, Menu - then the Manage Locations tab. The actual spot depends on how your theme was built, so look at every option in Customize to figure it out.


Why can't I use null values in joins?

Question: I have solved the query problem by using ...row_number() over (partition by... this is a more general question on why we cannot use columns with null values in joins. Why can't a null be equal to a null for the sake of a join?
Answer:
Why can't a null be equal to a null for the sake of a join?

Just tell Oracle to do that:
select *
from one t1
  join two t2 on coalesce(t1.id, -1) = coalesce(t2.id, -1);

(Note that in standard SQL you could use t1.id is not distinct from t2.id to get a null-safe equality operator, but Oracle does not support that)
But this will only work if the replacement value (-1 in the example above) does not actually appear in the table. Finding such a "magic" value for numbers might be possible, but it will be very difficult for character values (especially because Oracle treats an empty string as null as well)
Plus: no index on the id columns will be used (you could define a function based index with the coalesce() expression though).
Another option that works for all types, without magic values:
              on t1.id = t2.id or (t1.id is null and t2.id is null)

But the real question is: does this make sense?
Consider the following sample data:
Table one
id
----
1
2
(null)
(null)

Table two
id
----
1
2
(null)
(null)
(null)

Which of combination of null values should be chosen in the join? My above example will result in something like a cross join for all null values.
T1_ID  | T2_ID
-------+-------
     1 |      1
     2 |      2
(null) | (null)
(null) | (null)
(null) | (null)
(null) | (null)
(null) | (null)
(null) | (null)

Answer: Alternatively you can make two nulls match each other using INTERSECT as an equality operator:
SELECT
  *
FROM
  t1
  INNER JOIN t2
    ON EXISTS (SELECT t1.ID FROM DUAL INTERSECT SELECT t2.ID FROM DUAL)
;

See this DBFiddle demo for an illustration.
Of course, this looks quite a mouthful, although it is actually not much longer than BriteSponge's suggestion. However, it is certainly not a match, if you pardon the pun, to the conciseness of the mentioned earlier in comments standard way, which is the IS NOT DISTINCT FROM operator, not yet supported in Oracle.
Answer: You can join null values using decode:
on decode(t1.id, t2.id, 1, 0) = 1

decode treats nulls as equal, so this works without "magic" numbers. The two columns must have the same data type.
It won't make the most readable code, but probably still better than t1.id = t2.id or (t1.id is null and t2.id is null)
Answer: Just for completeness I will mention that the function SYS_OP_MAP_NONNULL can now safely be used to compare values that are null as it is now documented in the 12c documentation. This means Oracle won't just randomly remove it and break your code.
SELECT *
FROM   one t1
       JOIN two t2
         ON SYS_OP_MAP_NONNULL(t1.id) = SYS_OP_MAP_NONNULL(t2.id)

The advantage being that you don't come across the 'magic' number problem.
The reference in the Oracle docs is at Basic Materialized Views – Choosing Indexes for Materialized Views.
Comment: So it is documented now? Because [AskTom (in 2003)](https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1274000564279) stated: *"**- it's undocumented, and therefore poses a risk of going away or changing
functionality**

that is enough said that should make people just "stop reading"

go there and you might be really mad in the next release.

the only CORRECT way is:

`where (a = b or (a is null and b is null))`

period. that is my thoughts on it. I would not consider using `sys_op_map_nonnull`, ignore that man behind the curtain."*
Comment: If you have link, please add it to the question. I haven't found mention in [12c Functions](https://docs.oracle.com/database/121/SQLRF/functions002.htm#SQLRF51178) but searching for Oracle documentation and specific version is rather hard.
Answer: Why can't you use null values in joins? In Oracle, both of the following don't evaluate to true:

NULL = NULL
NULL <> NULL

That's why we have IS NULL / IS NOT NULL to check for null values.
To test this, you can simply do:
SELECT * FROM table_name WHERE NULL = NULL

Joins are evaluating a boolean condition, and they didn't program them to operate any differently. You can put a greater-than sign in the join condition and add other conditions; it just evaluates it as a boolean expression.
I guess a null can't be equal to a null in joins for the sake of consistency. It would defy the usual behavior of the comparison operator.
Comment: `NULL = anything` results in `NULL` because the SQL standard says so. A row satisfies the join condition only if the expression is true.
Comment: Beyond the literal implementation detail (which isn't always the case: some DBs have the option to equate NULL to NULL for some/all purposes) there is a logical reason: NULL is unknown. When you compare NULL to NULL you are asking "is this unknown thing equal to this other unknown thing" to which the only reasonable answer is "unknown" - another NULL (which is mapped to false in a comparison situation).
Answer: A null value in most relational databases is considered UNKNOWN.  It is not to be confused with all HEX zeros.  if something contains null (unknown,) you cannot compare it.
Unknown = Known False
Unknown = Unknown False
Unknown >= Known False
Known >= Unknown False

Which means, anytime you have a null as an operand in a boolean expression, the else part will always be true.
Contrary to the general hatred towards null by the developers, null has its place.  If something is unknown, use null.
Comment: Actually all the example comparisons you have, yield `UNKNOWN`, not `FALSE` ;)
Comment: You are right, however the purpose of a boolean expression is to result true or false only, so, let's not get crazy here :).

Why can't I use null values in joins?


What does "You have reached your question limit" mean when asking a question?

Question: Haven't been getting breaks at work and need them
The user can't ask a new question. I'm trying to understand why that is.
Comment: Thanks for looking out for a newbie --- and, nice hat!
Answer: It looks like the user tripped a brief throttle, blocking him for one day.  He has another question, which was downvoted, closed, and deleted, so that contributed.  I don't know the details of the throttling algorithm (I believe it's intentionally kept secret), but I see no question block on this account now.  He should be able to ask another question.
Comment: @JoeStrazzere I believe the point is to prevent new users who don't yet understand how SE works from flooding a site with poor questions.  While a throttle is frustrating, having the ten questions you ask in an afternoon downvoted and closed is probably *more* frustrating for the asker, and is frustrating for the community.  (I hope they get a link to relevant help topics in the "you can't ask right now" message.  I don't know exactly what that text is.)
Comment: @TheMuffinMan I believe the system nudges them toward editing their existing posts to fix the problems.  If you want to see changes in the temporary blocks, you should bring it up in a new post where people will see and can vote.
Comment: Maybe good to note that the throttle-system is SE-wide. I've had it where I asked a couple of questions on one site only to not be able to on all others for a while.
Comment: Odd. What is the point of the "throttle"?
Comment: @JoeStrazzere see [Aren't new users throttled asking questions anymore?](http://meta.stackoverflow.com/a/322265/839601) "[Rolling rate-limits](http://meta.stackexchange.com/q/243460/165773) kick in faster. Like, _immediately_. If your first question is downvoted and you try to ask another one 40 minutes later, you'll be forced to wait at least a day. That's potentially very harsh... But probably also better than penalizing _everyone_ for the behavior of a few. We'd always intended rolling rate-limits to supplant the new-user rate-limits, and this will hopefully allow them to do so..."
Comment: While I agree that some form of throttling is a good idea it's potentially frustrating when you're new and don't quite have the hang of things to be prevented from trying again after learning and trying to improve. It's like getting on a skateboard for the first time, losing your balance and then having to wait a day to try again in the hopes that you watch some video's on how to ride it properly.I suggest that if the throttling takes place the next question requires review from the community before it can be shown on the site and feedback can be given if it's really that bad.
Answer: Copied from SE meta

Why am I getting this message?
As stated in the about links on every page, Stack Exchange is a
network of question and answer sites, not help forums. This implies
that all posts are expected to have some value for later visitors too.
To enforce that, and to prevent help vampires making the answerers
turn away from the communities, low-quality questions and answers are
blocked. This includes posts from:
users who can't be bothered to form sentences users who don't do the
most basic kinds of research themselves users who barely even explain
what it is they are trying to do An automatic filter is in place to
ban questions and/or answers from IP addresses or accounts with a
history of extremely poor posts.
To avoid bypassing the filter its internal rules are a secret, but it
is partly based on downvotes cast by other members of the communities.
If the other members of the site consistently give your posts a low
ranking, you should try to identify the reason(s) for this.
Once you have posted too many poorly-received questions or answers,
you will be banned from posting more, and you will see the error
message.
Are deleted posts taken into account too?
If a post was poorly-received (downvoted or closed), that will
continue to count against your account even if the post is deleted!
Whenever possible, try to fix posts instead of deleting them.
Additionally, deletion itself counts against questions if less than 30
days old when deleted if others have invested time into answering or
moderating the question.
Finally, deleted answers always count towards an automatic ban on new
accounts.
It's not a problem to have deleted posts. But if a large percentage of
your posts are deleted by yourself or the community, then apparently
they are not suitable for the site. Posting them consumes time from
users who read them, edit them, or respond to them. Therefore deleted
posts have an effect on the filter, among many other factors.
Beware that an account might very well have many deleted posts,
including auto-deleted old low-score questions, all of which are only
visible to moderators.
Is a question/answer ban the same as a suspension?
No, a suspension is a manual, temporary penalty during which a user
cannot ask questions, nor post answers. All other privileges,
including commenting and voting, are also revoked by temporarily
setting the reputation to 1. Such suspension is publicly visible to
other users.
A post ban is enforced automatically, and only prevents posting
questions or answers. It is invisible to others.
How do I avoid getting a question ban?
Read the pages in the Help Center, particularly those about asking and
the Stack Exchange model. Investigate and search before you ask. Put
some effort in your questions.
All questions are expected to have some value for later visitors too.
So if many of your questions do not get any answer, are downvoted,
closed, or deleted by yourself or the community, then apparently they
did not meet the required quality. Be sure to understand why that
happens, and learn from that. Don't simply repost the same question
again.
If you're not sure what qualifies as a "good question", there are some
hints and tips available:
How to Ask from the Stack Overflow Help Center Writing the perfect
question by Jon Skeet How to Ask Questions The Smart Way by Eric S.
Raymond Getting Answers by Mike Ash To learn about formatting:
Formatting help How do I format my code blocks? Try for yourself in
the formatting sandbox How long do I have to wait before I can post
again? What can I do to release the ban? How can I reactivate my
account?
Automatic bans never expire or "time out." This means that you cannot
simply wait for a certain amount of time. If you do not take action,
you will never be allowed to post again. The only way for the ban to
be lifted is by contributing positively to the site in other ways.
Moderators cannot lift the ban.
Before you do anything else, fix your existing posts! As noted above,
down-votes cast by the rest of the community factor into the ban - so
the single best thing you can do to get it lifted is to address any
objections raised by others. Were your past questions unclear? Did
they fail to show any effort on your part? Poorly worded, titled,
formatted, and overly long or short? Then fix them!
Note the emphasis on fixing. Do not delete your posts. As explained
above, deleted questions (if less than 30 days old when deleted) do
still count towards the question ban. Deleting your posts does not
help to lift the ban. Only fixing does! Under some conditions you can
see a list of your own deleted questions and answers.
If you are banned from asking questions, then writing a few quality
answers that get upvoted might enable you to ask questions again. But
as the internals of the filter are secret, there is no way to know for
sure.
If you really, really think the ban is an error, then email the team
directly using the "contact us" link provided at the bottom of every
page. But note that reactivation of banned accounts is not a high
priority.
Can I simply create a new account?
No. The automatic ban is at a lower level than account.
I'll just ask somewhere else on the SE network, and they'll migrate my
question to the correct site!
Migrations are not possible if your account is banned from asking
questions on the destination site. The question will simply be closed
as off topic, but not migrated.
Does this apply to Meta Stack Exchange too?
Yes, but the threshold of votes in the auto ban calculation is reduced
because downvotes can be more common on meta.
My account is in good standing. Why am I still blocked?
The ban also takes in account the IP address. If you browse from a
shared computer, or from a location that gives the same IP address to
many end users, it's enough that another user who was banned or
triggers the ban, will affect everyone else accessing from the same
location.
To help rectify this, browse from a different location.


Recommended size of icon for Google Chrome Extension

Question: This page explain 19*19 and 38*38.
http://developer.chrome.com/extensions/browserAction.html#icon
But this page explain 16*16 and 48*48, 128*128.
http://developer.chrome.com/extensions/manifest/icons.html
Which is correct?
Comment: I'm sorry.I marked it now.
Answer: Both are correct ! They are for different sections/features:
The former refers to the browser-action icon (displayed on the top-right corner of your browser-window, next to the address bar). It is only displayed if your extension registers a browser-action.
The latter refers to icons used throughout the extension and browser, as is explained quite clearly in the link you provide:
(emphasis mine)

One or more icons that represent the extension, app, or theme. You should always provide a 128x128 icon; it's used during installation and by the Chrome Web Store. Extensions should also provide a 48x48 icon, which is used in the extensions management page (chrome://extensions). You can also specify a 16x16 icon to be used as the favicon for an extension's pages. The 16x16 icon is also displayed in the experimental extension infobar feature.

BTW, that second link mentions icon as the property name, which was replaced in Manifest v2 by default_icon.
("Migration to Manifest v2" guide)
Comment: did the spec change in this short period of time? i dont see 19 or 38 mentioned at all in the doc links provided by https://stackoverflow.com/users/2860966/hucuhy.
Comment: It is not impossible. 5.5 years is not a short period of time :D
Answer: To elaborate on ExpertSystem's answer, here is an example manifest excerpt with all of the image sizes:
  "browser_action": {
    "default_icon": {
      "19": "images/icon19.png",
      "38": "images/icon38.png"
    },
    "default_popup": "popup.html"
  },
  "icons": { "16": "images/icon16.png",
           "48": "images/icon48.png",
          "128": "images/icon128.png" }, ...

Notice how the 19/38 icons are for the browser action, and the 16/48/128 are at the icons level.
I think it is best therefore to create the image as a vector graphic (e.g. svg file) and then save to a bitmap (e.g. png file) for each of the sizes.
Answer:
2020 Update:
I was researching this recently.  Here is what I found:
These sizes seem to cover most scenarios: 16, 24, 32, 48, 128
These sizes seem to be outdated: 19, 38

Icons - Recommended Sizes:
16, 24, 32, 48, 128.
Size:   Manifest - Icons:   chrome.browserAction:

16      Yes                 Yes
24      No                  Yes
32      Yes                 Yes
48      Yes                 No
128     Yes                 No

Manifest - Icons: https://developer.chrome.com/extensions/manifest/icons
chrome.browserAction: https://developer.chrome.com/extensions/browserAction

Icons - Outdated Sizes:
19, 38.
Size:   Manifest - Icons:   chrome.browserAction:

19      No                  Outdated
38      No                  Outdated

chrome.browserAction: https://chrome-apps-doc2.appspot.com/extensions/browserAction.html
Answer: For browser action, we just need a 16x16 icon now, as

The browser action icons in Chrome are 16 dips (device-independent pixels) wide and high.


Which account should be used for the SQL Server Service logon account where the server has been added to a domain?

Question: I have installed SQL Server 2017 Express onto Windows Server 2012 R2. I need to add a self signed certificate to SQL Server Protocols in order to enable wire encryption. This comes with a requirement that the SQL Server logon account has full control permissions over the certificate. The server machine is on a domain. When I try to grant full control over the certificate to the default "NT Service\MSSQL$InstanceName" account, it throws an unrecognised name error. Should this issue be resolved by changing the SQL Server logon account to a domain account with administrator permissions? Are there any potential hazards associated with this practice or is this the recommended solution to this problem?
Answer: What I have seen implemented in a few enterprise size companies is to have an Active Directory  managed service account created on a per server or cluster basis which runs the database and agent services.
Depending on group policies in place you may have to also request that AD group policies or local security policies be modified to allow the right to "logon as a service".  There is no need to grant extra privileges to the account.
Ideally you would add this account during the setup of a new install so the permissions on the SQL Server executables are granted automatically.
This benefits security policy as auditors can see that the password policy of the domain is applied to the account and that the account has privileges only on the server/cluster that are appropriate to run the database and nothing else.
I recommend a managed service account to do this because if you are at the stage where you are implementing encryption you might as well do all the right things from a security standpoint now so you don't have to go back and redo them later.  A well named dedicated account will allow you apply a complex password that can be changed as required by company standards without wondering about where else you used that account.
Comment: When SQL Server 2016 was originally deployed onto this server, I don't recall there being a problem assigning full control over the certificate to the built-in SQL Server service logon account. Perhaps a local admin account was used to implement this which has since been disabled. Does a domain account necessarily need to be used in this case or is there another built-in service account that is suitable? I have a generic admin domain account which possibly has the right to "logon as a service". If so, would this account be suitable or would you specifically recommend using an MSA?


What does it mean "differentiation with respect to the coordinates of particle 1 or 2"?

Question: I was reading Introduction to Quantum Mechanics by Griffiths. In Chapter 5, Identical Particles, I came across the notation $\nabla_1$ and $\nabla_2$. Griffiths writes that it means "differentiation with respect to the coordinates of particle 1 or particle 2", which I am unable to understand. Could anyone please help me out with it?
Answer: Let $\mathbf{r}_i = x_i \hat x + y_i \hat y + z_i \hat z$ label the coordinates of particle $i$. $\nabla_i$ therefore means $\hat x \frac{\partial}{\partial x_i} + \hat y\frac{\partial}{\partial y_i} + \hat z \frac{\partial}{\partial z_i}$.
Comment: In Hamiltonian operator Laplasian operator $\nabla^2$ is used, meaning that it is second order derivatives over position vector
Answer: Hamiltonian operator is defined as sum of kinetic and potential energies operators of system:
$$ {\displaystyle {\hat {H}}={\hat {T}}+{\hat {V}}} $$
In many particles system :
$$ {\hat {T}}=\sum _{n=1}^{N}{\hat {T}}_{n}, \\
{\displaystyle \hat{V}=V(\mathbf {r} _{1},\mathbf {r} _{2},\ldots ,\mathbf {r} _{N},t)}
 $$
Putting all this together and with exact particle kinetic energy expression, we get :
$$ \hat {H} = \sum _{n=1}^{N}\left({-{\frac {\hbar ^{2}}{2m_{n}}}\nabla^{2}_{n}}\right) + V(\mathbf {r} _{1},\mathbf {r} _{2},\ldots ,\mathbf {r} _{N},t)$$
Because you have only 2 particles, this simplifies to :
$$ \hat {H_{2}} = {-{\frac {\hbar ^{2}}{2m_{1}}}\nabla^{2}_{1}}
{-{\frac {\hbar ^{2}}{2m_{2}}}\nabla^{2}_{2}}
 + V(\mathbf {r} _{1},\mathbf {r} _{2},t)$$
Answer: It might help to think of this problem in just one dimension first: Suppose particle 1 is located at the position $x_1$, and that particle 2 is located at the position $x_2$.
The key idea here is that even though there is only 1 dimension, you need to describe the position of two particles by using a coordinate system with two coordinates (one for each particle).
If you think of each particle separately, imagining they don't interact at all, you would think that they should each have some wavefunction $\psi_j(x_j)$ for $j\in\{1,2\}$ which each satisfy the free time-independent Schrodinger equations
$$
- \frac{\hbar^2}{2m} \frac{d^2\psi_j(x_j)}{dx_j^2} = E \psi_j(x_j) \ .
$$
Instead if you think of them as a combined system, there is now an overall wavefunction $\Psi(x_1,x_2)$ which describes the two particles, satisfying an equation
$$
- \frac{\hbar^2}{2m} \frac{d^2\Psi(x_1,x_2)}{dx_1^2} - \frac{\hbar^2}{2m} \frac{d^2\Psi(x_1,x_2)}{dx_2^2} = E \Psi(x_1,x_2) \ .
$$
This is easy to solve because you can use the method of seperation of variables to reduce the above equation to the previous ones.
Finally, adding an interaction means to include some potential $V(x_1, x_2)$ where
$$
- \frac{\hbar^2}{2m} \frac{d^2\Psi(x_1,x_2)}{dx_1^2} - \frac{\hbar^2}{2m} \frac{d^2\Psi(x_1,x_2)}{dx_2^2} + V(x_1,x_2) \Psi(x_1,x_2) = E \Psi(x_1,x_2) \ .
$$
For example, you could make $V(x_1,x_2)$ the Coulomb potential where
$$
V(x_1,x_2) \propto \frac{1}{|x_1 - x_2|}
$$
and now the particles are talking to each other (although obviously the equation is now harder to solve).
When working in 3D you just swap $x_1 \to \mathbf{r}_1$ and $x_2 \to \mathbf{r}_2$ in the obvious way, and you need to track a total of 6 coordinates now to full describe the positions of each of the two particles.


How to crack password hashed using SSHA?

Question: Is it possible to crack a password hashed using SSHA if I know the salt? How can I do it?
Comment: Depending on the format, you might have to convert the hash/salt to/from hex/base64 for JtR or Hashcat to work on them.
Answer: SSHA,  or more commonly known as salted SHA1  can be easily cracked with John the Ripper.
Comment: @user1028 A salt is added for 2 reasons.  1,  to prevent two passwords from yielding the same hash.  2,  to prevent pre-computed attacks like rainbowtables.  You can provide JTR the salt as an argument, so its is exactly the same speed as if it didn't have a salt.
Comment: @USER1028 haha,  that is a funny one.  I don't think you understand why a salt is used.  SHA1 is a very fast hash function,  this will crack very quickly.
Comment: If you've got a GPU with OpenCL or CUDA support, you should use [oclHashcat](http://hashcat.net/) - it'll be hundreds of times faster than your CPU.
Comment: @Polynomial JTR has gpu support.
Comment: as i know it is very hard to crack it because of salt. i used to crack md5, sha,... using online decryptors , but no online dycryptor for ssha
Comment: salt is something added to original password then it is hashed. salt used to make it hard to crack it ,right?
Answer: SSHA is a variant of SHA-1 with a salt included in the computation. This algorithm is used in some LDAP servers and originally comes from a Netscape internal draft specification. There are apparently several variants; see this page for a description of one used by an Oracle product, and that page for some PHP code which purports to compute the same function. They differ by the size of the salt (64 bits vs 32 bits). However, they have the same structure: a single SHA-1 computation over the concatenation of the password and the salt, and some encoding on the resulting value (some Base64, with the salt, and a recognizable header).
The function is salted; that's good. This is effective against precomputed tables, in particular the much touted rainbow tables.
The function is not iterated; that's bad. For an attacker knowing the hash, "trying" a potential password is a matter of a single SHA-1 computation over a short input (less than the 64 bytes of an elementary internal SHA-1 block size), and that can be computed real fast. A single SHA-1 computation is about one thousand 32-bit operations. A basic x86 core will need 500 clock cycles for that (at most); with SSE2 opcodes, in the context of password cracking, this falls to about 200 clock cycles per SHA-1. Thus, a quad-core Core2 at 2.4 GHz will try 48 million passwords per second (that's what my code achieved, at least). A good GPU will be much better, since GPU are very good at 32-bit operations; one billion password hashes per second is a realistic figure.
There are not many passwords which resist cracking attempts which can try one billion passwords per second. Even famous methods for generating passwords with 44 bits of entropy will last two or three hours on average.
Answer: U could also use, Cain and Able to crack password encrypted with that encryption algorithm.
Comment: Hashing is not encryption since it does not have inverse function nor a secret involved.


HTML 5 and XHTML 1.1

Question: I am learning HTML 5 and have a question:
Can HTML 5 be used in XHTML 1.1 documents?
If yes, then could anybody give an example?
Comment: What parts of HTML5? New features, markup?
Answer: Do not confuse XHTML and HTML.
XHTML is HTML ruled to be a valid XML document. Actually the XHTML 1.1 standard does not apply to HTML 5 but to HTML 4.01.
What does it mean? You can pick a valid XHTML 1.1 document and it'll be a valid HTML 5 document but the counter-part is not always true. For example:
<code><button disabled></button>
</code>
It's valid HTML code (it doesn't matter which version) but it's not a valid XML statement (then it's not a valid XHTML document) because of the empty attribute. World is full of these examples (just Google), HTML is very relaxed about syntax (and HTML 5 didn't change this direction) and there are some other differences too (here, for an example). Moreover the HTML 5 standard introduced new tags that aren't part of XHTML 1.1 standard so a fully featured HTML 5 document (despite the syntax) won't be a valid XHTML 1.1 document.
References
Here a short list of good reference about this topic, selected from SO answers:

HTML/XHTML and MIME type: a short answer about content type and markup syntax.
All-in-one about HTML and XHTML: a long list of QA that covers different aspects of HTML/XHTML compatibility.
What to use: a question about what is better to use between HTML and XHTML (of course the answer is it depends but the answer itself is good).
XHTML/HTML for mobiles: some nice tips about HTML5/XHTML with Apple's devices.
Answer: theoretically no, because the standard sets of xhtml and html are different.
However, if it is working is totally depending on the browser you use and most modern browser will show the other set of tags as well as the standard you have defined.

HTML 5 and XHTML 1.1


Sharing dynamic client and server-side content between JSP's

Question: I've done quite a lot of searching about capabilities of JSPs and have been unable to find a concise answer to my issue.
I am currently writing a web application which uses a single jsp (with an imported CSS) to build a site with multiple functionalities. Specifically, the application has the ability to read and write data from/to an external server, as well as update user content and info.
For the sake of aesthetics and clarity, it makes the most sense to designate different areas of the site to each of these tasks, one at a time. Rather than attempt to use page divisions and conditional statements to control their visibility and execution, I want to essentially "cut up" the logic behind this dynamic content and spread it across multiple JSPs to allow for more organized editing, testing, and modification of the code by both a web developer and programmer, without either necessarily having to collaborate.
Assuming that all of the JSPs involved have the appropriate imports, are there any essential measures I need to take to allow seamless sharing of content between these JSPs? For example, if a user writes to the server and stores their data as some entity, (from a page with tools from one jsp) will the functions used to query the database work if I simply copy that code into another jsp and have the user navigate to that page in order to access that persisted data?
Thank you for your feedback!
Answer: Learn the design pattern Model–view–controller. It'll great to help you solve many of your project problems. And your architecture will more maintainable and scalable. You can see here and here for more information about the implementation of this pattern with JSP.
Comment: Thank you! I've come across MVC several times and didn't give it much thought, but that's probably the way to go. I appreciate the advice!


CCSprite Touch Event!

Question: I am using Cocos2d and CCSprite to create sprites in my application. I am wondering if there is any easier way to implement the touch event on the CCSprite object. I know the menuitem provides the selector but what does CCSprite provides to handle the touch events.
Answer: I'm really just starting out with Cocos2D, so I may be wrong, but as far as I've understood, CCSprite doesn't actually have any built-in touch handling, and you need to handle it yourself. Usually this is done by keeping a reference of all sprites in an NSMutableArray which you then, on the touch event, iterate through, doing coordinate checks for each sprite.
Let me know if you need some example code.
Comment: Yup! I think you are right! And that is how I am doing it right now using the pythagorus theorm.

CCSprite Touch Event!