Create more than one artboard when document is already saved?

Question: I'm already working with an artboard, but i need two more, how can I add additional artboards to my document in Illustrator?
Answer: New artboards can be added by either of the two:

Pick the Artboard Tool and click-drag it in the canvas area of the Illustrator document.
Pick the Artboard Tool, click on the New Artboard in the Control Panel, select the desired size from the list of Artboard Presets in the Control Panel and click in the desired area of the canvas to add a new Artboard.

You will get determined help in Adobe community - as below..
The Artboards panel allows you to perform various artboard operations such as:

Add, reorder, rearrange, and delete artboards
Reorder and renumber artboards
Select and navigate through multiple artboards
Specify artboard options such as presets, Artboard size, and relative
artboard position.

To access the Artboards panel, click Window > Artboards.

To add artboards:

Click New Artboard at the bottom of the Artboards panel, OR
Select the New Artboard option from the Artboards panel menu (flyout
menu) of the Artboards panel.

To delete artboards:

Select the artboard to delete. To delete multiple artboards, press Shift and click the artboards listed in the Artboards panel.
Click the Delete Artboard icon at the bottom of the Artboards panel or select the Delete option from the Artboards panel menu (flyout menu). To delete multiple non-contiguous artboards, press Ctrl(Windows) or Cmd(Mac OS) and click the artboards from the Artboards panel.

To rearrange artboards in the Artboards panel, select the Rearrange Artboards option from the Artboards panel menu (flyout menu). Notice, however, that rearranging the artboards does not change the order the artboards.
To duplicate artboards:

Select the artboard that you want to duplicate. You can also
duplicate artboards by dragging one or more artboards on to the new
artboard button in Artboards panel.
From the Artboards panel menu, select Duplicate.

If you want to reset the artboard options, such as presets, artboard position, and display. Select Artboards Options from the Artboards panel menu (flyout menu).
Comment: Nidha, you've provided great information, but it may be of more help if you broke down the answer and summarized it as opposed to copy/pasting it. Also, I've edited it to change the answers to not be placed in code formatting which was unreadable and horizontally scrolling.
Comment: Thanks Adam for suggestion. I will take care of this in future..
Answer: It's easy to add new artboards in Illustrator. The Artboard tool will help you to do that. Select it form the toolbar menu or pres Shift+O. The actual artboard will be highlighted and all you have to do in order to add a new one is to simple draw a rectangular shape and the new artboard will be automatically added.


How to decrypt a SHA-256 encrypted string?

Question: I have a string that was salted, hashed with SHA-256, then base64 encoded. Is there a way to decode this string back to its original value?
Answer: SHA-256 is a cryptographic (one-way) hash function, so there is no direct way to decode it. The entire purpose of a cryptographic hash function is that you can't undo it.
One thing you can do is a brute-force strategy, where you guess what was hashed, then hash it with the same function and see if it matches. Unless the hashed data is very easy to guess, it could take a long time though.
You may find the question "Difference between hashing a password and encrypting it" interesting.
Comment: To put it another way, if you could invert this function easily, that would be a really bad thing.
Comment: @Safeer They have a list of the outputs of the hash function and then lookup what the input was. They're not actually decrypting; they're essentially guessing and then keeping track of the results.
Comment: If its so hard to regenerate the actual data or you are saying it Brute-force strategy for regeneration then how http://md5decrypt.net/en/ & number of other online tools regenerates the actual string?
Comment: @Safeer: To add to the other comments is also the fact that MD5 has been cryptographically compromised years ago.
Comment: Yes, hashing is one way only and for a long string probably brute force is not feasible. That said if a hash is a password there are different strategies one can use to work out what the original clear text was. It usually involves some kind of precomputed list of hashes for well-known passwords, a whole dictionary or rainbow tables.
There are a number of services dedicated to doing exactly that. https://crypto.apitools.zone/sha256-decode.html will do precisely that and has handy restful API.
Answer: It should be noted - Sha256 does not encrypt the data/content of your string, it instead generates a fixed size hash, using your input string as a seed.
This being the case - I could feed in the content of an encyclopedia, which would be easilly 100 mb in size of text, but the resulting string would still be 256 bits in size.
Its impossible for you to reverse the hash, to get that 100mb of data back out of the fixed size hash, the best you can do, is try to guess / compute the seed data, hash, and then see if the hash matches the hash your trying to break.
If you could reverse the hash, you would have the greatest form of compression to date.
Comment: "If you could reverse the hash, you would have the greatest form of compression to date."

No, not really. "Reversing the hash functions" refers to finding collisions. Nobody really cares about finding the exact original input. So you reversing the hash function just gives you a gibberish generator.
Comment: While yes - a collision may statistically occur from different inputs for any hashing algorithm, most notably sha-1 and md5 , some older hashing routines.They just haven't occurred yet in the sha2 family.
Given a mp4 - Thor Ragnarok, which is 1GB in size
When you sha256 it - you get a 256 bit hash
If you could get the 1GB back out of that 256bit hash
Your taking 256bits of data, getting 1GB of data back.
If it worked - then it would be equivalent to a form of compression.
It just wont though ever work though. Verifying the hash is correct requires the content, which defeats the purpose.
Comment: Sha256 is an approximation of a perfect hash function, so you can expect every possible output to have on average one other input with a length of 256 bits that maps to that output. There is no reason why a successful reverse would go as far as returning the original 1GB input when it can just return one of the ~256 bit inputs that returns that output, i.e. you will get a small chunk of gibberish. So even if you could reverse, you would never be able to use that for any kind of compression.
Answer: SHA* is a hash function. It creates a representation (hash) of the original data. This hash is never intended to be used to recreate the original data. Thus it's not encryption. Rather the same hash function can be used at 2 different locations on the same original data to see if the same hash is produced. This method is commonly used for password verification.
Answer: You've done the correct thing by using a salt aka SSHA.
SHA and SHA-2 (or SHA-256) by itself without a salt are NOT considered secure anymore! Salting a SHA hash is called Salted SHA or SSHA.
Below is a simple example on how easily it is to de-hash SHA-1. The same can be done for SHA-2 without much effort as well.
Enter a password into this URL:
http://www.xorbin.com/tools/sha1-hash-calculator
Copy paste the hash into this URL:
https://hashes.com/en/decrypt/hash
Here's a page which de-hashes SHA-2. The way this pages works is somebody must have hashed your password before, otherwise it won't find it:
md5hashing dot net/hashing/sha256
Here's a page that claims to have complete SHA-2 tables available for download for a "donation" (I haven't tried it yet):
crackstation dot net/buy-crackstation-wordlist-password-cracking-dictionary.htm
Here's a good article that explains why you have to use SSHA over SHA:
crackstation dot net/hashing-security.htm


How To capitalize The First Letter Of Every Word In The Post Title

Question: Hello i wonder if you can help me. How do you make to post titles capitalize the first letter of every word?
Is there a way to do it in wordpress?
Comment: Then there's CSS: `.entry-title { text-transform: capitalize; }`
Answer: The code below was assembled of different pieces I've found around and it was not tested. Consider it as an idea only.
<?php
add_filter( 'the_title', 'my_capitalize_title', 10, 2 );

function my_capitalize_title( $title, $id ) {

    // get separate words
    $words = preg_split( '/[^\w]*([\s]+[^\w]*|$)/', $title, NULL, PREG_SPLIT_NO_EMPTY );

    $stop_words = array(
        'the', //
        'a',
        'and',
        'of',
    );

    $title_case = '';

    foreach( $words as $word ) {
        // concatenate stop word intact
        if ( in_array( $word, $stop_words ) ) {
            $title_case .= $word;
        }
        // or concatenate capitalized word
        $title_case .=  ucfirst( $word );
    }

    return $title_case;
}

You have to polish the idea: you don't want "The Simpsons" to become "the Simpsons".
Answer: Is this for <title></title> or output title?
If output title, call your title as echo ucwords( get_the_title() ); on your page.
If <title></title>, you can do the same as above by applying a filter to wpseo_title in your functions file.
Answer: WordPress is based on PHP. So, a better question might be, "Is there a PHP function that will do this?" The answer given above ucwords; is correct. However, there may be words you don't want capitalized, such as "a", "an" or "the". If that is the case, there needs to be a filter that prevents these words from being capitalized. However, that is beyond the scope of this question.


Advantages of using distribution-specific configuration files over generic start-up scripts?

Question: For example in case of Debian, one can specify network configuration in distribution-specific configuration file /etc/network/interfaces or one could use generic Sys-V scripts where network configuration can be specified with generic tools like ip and ifconfig. I would prefer latter option as I don't need to learn the structure and syntax of the distribution-specific configuration file. However, are there any advantages of using distribution-specific configuration files over start-up scripts?
Answer: I would suggest using the distribution specific files because they're often used in less obvious ways by other tools within the distribution. So typically what happens is you'll find yourself often having to work against these configurations and creating a nice little mess for yourself.
I can share an experience I had with Fedora/Redhat with the networking setup. You can manually add these in the /etc/sysconfig/network-scripts directory using simple files such as ifcfg-eth0.
However if you try and get these and NetworkManager to co-exist together you'll start to find that you're having to periodically go in to fix you setup customizations that it's not really worth going off the path.
There are examples that I can dig up if you need more convincing, but in general it's best to work with the distro rather than work against it.
Comment: Very much this advice.  As much as I **hate** how some of the Linux distributions set up their startup and configuration scripts, trying to work around them leads to *more* pain.
Answer: Using distribution-specific configuration files has the advantage that you can leverage the automation provided by your distribution. For example Debian packages store scripts in /etc/network/if-up.d/ and siblings that are executed when a network interface is brought up or down. These scripts update DNS sources, flush mail queues, tell services to listen to the new interface, synchronize the system time, perform automounts, etc. If you use low-level tools such as ifconfig and ip instead of distribution-specific tools such as ifup and /etc/network/interfaces, you lose the benefit of all this automation. You're likely to waste more time recreating this automation in a portable way than leveraging what's already there and expressing your configuration in terms of available facilities.
If you're administering a heterogeneous network, you'll have to cope at least with different package managers, different installers, and different init scripts. Next to this, using distribution-specific network configuration scripts is not much effort.
Answer: The distribution-specific configuration files can enable a much faster boot. For example, the Arch linux systemd units lead to a boot that takes only 20 seconds or so. Previously, Arch used a BSD or Slackware like set of scripts. While Arch used to boot rapidly, the systemd units take much less time.


Cannot connect Rapoo S 100 bluetooth headset on Windows 7

Question: I am trying to connect Rapoo s100 bluetooth headset to my Fujitsu laptop.
Initially the headset got discovered in "Add a bluetooth device" window, I connected it, but there was no sound.
Then I connected the device by USB cable, and windows installed the drivers from it. The sound came through the USB cable, but the device disappeared from the devices window.
I restarted the Windows computer, but nothing changed.
It is discovered on the Macbook, on iPhone and on Sony mobile phone, but not on Windows 7. Also, the laptop sees all 3 other devices, and also other bluetooth headsets I have, but not the Rapoo headset.
Answer: Disconnect and "forget" the bluetooth device. Reinstall the drivers, then reconnect the bluetooth. I had a similar problem with a different bluetooth device and this worked for me.


How are the ranks of the first class fares with Alaska Airlines used?

Question: I see in this Alaska Airlines Fare Chart (mirror) that the first class fares have ranks with Alaska Airlines. From my understanding, ranks for the coach fares are used to prioritize which passengers to upgrade to first, but how are the ranks of the first class fares with Alaska Airlines used?
Answer: Quite generally (not specific to Alaska Airlines, and some may not apply in their case)…
Priority for upgrades is just one of the many attributes of a fare.
First and foremost, the biggest difference is price, and the relationship to fare buckets which dictates availability of which fares on which flight.
Then there may be rules associated to the fares, like flexibility for refunds and exchanges, advance purchase requirements, minimum/maximum stay, the need to spend the week-end, and more.
Then you may have different mileage accrual rates, priority when you need/want to be rebooked on other flights, etc.
Comment: Thanks, does the rank have any use in itself?
Comment: Use for whom? For you, or for the airline?
Comment: @GregHewgill either myself or the airline


Can unsigned and signed (two's complement) multiplication be performed on the same hardware?

Question: I know they can for addition and subtraction, but I'm not quite sure if they can for multiplication.
Comment: See https://stackoverflow.com/questions/16966636 and https://stackoverflow.com/questions/50605
Answer: As far as hardware goes, unsigned multiplication and signed multiplication are exactly the same (ignoring flags). When you multiply 11111111 and 11111111, the result is 00000001, regardless of whether the inputs are considered to mean -1 or 255.
That said, I don't know if the two operations would have a different effect on the carry and overflow flags, and how the difference is dealt with if so.
Comment: This is only true for non-widening multiply, like x86 `imul reg, r/m` and `imul reg, r/m, imm`.  The widening forms that do 32x32 => 64-bit *are* different in the high half for signed vs. unsigned, and the FLAGS output also differs.  This answer has unfortunately misled multiple people who linked it from SO questions or comments, e.g. [this question](https://stackoverflow.com/posts/comments/127777288) and [this comment](https://stackoverflow.com/posts/comments/89038552).
Comment: Re. flags, on x86, I believe both `mul` (unsigned multiply two n-bit integers, giving 2n-bit result) and `imul` (signed or unsigned multiply two n-bit integers, giving n-bit result) have the same effect on the carry and overflow flags: 0 if the upper word of the un-truncated result is 0, 1 otherwise.
Comment: Same for ARM smull / umull, and RISC-V instructions to generate the high-half of a signed or unsigned multiply (and even `mulhsu` to do a signed * unsigned product).  See also [How many least-significant bits are the same for both an unsigned and a signed multiplication?](https://stackoverflow.com/a/72309286).  Of course there's only one instruction for non-widening multiply on most ISAs, because if you do it C style, like `uint64_t prod = a * (uint64_t)b;` widening the inputs before multiply, then yes this answer is true for 2's complement systems.
Answer:
Can unsigned and signed (two's complement) multiplication be performed on the same hardware?

Assume an N bit width.
The trick is that the hardware can do a signed N+1 * N+1 wide multiplication, thus re-using most of the hardware when doing unsigned*unsigned, signed*signed or mixed signed multiplication.
2's complement N+1 operands can handle the entire range of intN_t and uintN_t.
The final 2's complement 2*N + 1 product can simply save the desired bits into a 2*N destination.
Comment: What is the source of this information? It is certainly correct that the problem could be solved this way. (This is exactly how it is done in FPGAs). But I'm trying to confirm if it actually is done this way in practical microprocessor implementations.
Comment: My survey at the time indicated HW multiplication handled N+1.  Six years later, the situation may differ.


Rblpapi millisecond resolution

Question: I'm using Rblapi to get tick data, using the nice getTicks function. Much to my dismay the index is rounded to the second, while milliseconds time stamp could be provided. Tried returnsAs xts, fts(?) or matrix, but no luck.
Anyone has an idea about how to make it work?
Comment: Sure. Something like: `oil <- getTicks(c("CO1 Comdty", "CL1 Comdty",returnas="xts")` (I don't have BB in front of me ATM, so it's from memory,sorry). The issue is actually especially acute when one needst to align ticks movements in a merged xts (or fts, or matrix) since there are obviously a lot of trades every seconds at time. The Bloomberg support says the historical API calls are only granular at the second, though, so I think I'm out of luck. This is quite frankly very disapointing and make the tick data a bit useless for high frequency studies
Comment: could you provide an example of the call?
Comment: Ok, I checked this ... the synthax that you provide does not work because "xts" is not a return typ. What if you contact the package author directly? I think he is quite responsive.
Comment: Did You find any way to get ticks with milli/microseconds to R from bloomberg? I've got an official answer that microseconds are supported and You can check it yourself keeping mouse over timestamp in QRM
Answer: I got an answer from BLOOMBERG and it is officialy possible to get data with precision up to 6 digits. I had to upgrade my bloomberg desktop API (just download ZIP and unpack to BLP folder). There You got a new Bloomberg API Demo Tool where You can test different formulas and if they work, they work in api. And they do work without problem getting ticks with microseconds. Now i think the problem stays on the side of RBLPAPI developers to use the new c++ api in RBLPAPI plugin and pass timestamps with microseconds to R.
Comment: please could you elaborate about what "official answer from Bloomberg" means? I contacted Bloomberg support today and the answer was "we are sorry, only timestamp at second resolution is available". it sucks

Rblpapi millisecond resolution


Skyrim Museum Quest in Dawnstar

Question: I knew that I had the quest to visit the Museum and get the quest, "Pieces of the Past" but when I looked through to find it it was gone. I looked through all the quests I had completed to see if I had failed it, but it was not there. Is it a bug or a glitch? I have killed a few guards in order to complete the dark brotherhood quest line but I don't think that I killed the owner of the Museum. Please provide an explanation if possible.
Comment: Well, the latter half of the Dark Brotherhood has you coming and going to/form Dawnstar on a regular basis, and in my experience that town is #1 on every single dragon's "Top 10 towns you must attack before the Dragonborn absorbs your soul" list. It is entirely plausible he died in a dragon attack as you were coming/going.
Comment: You should specify what platform you are using, so we can suggest actions for you
Answer: To begin to answer this, you must establish the status of the NPC.
Moving yourself to that NPC's location would be a start
In the console enter
<code>player.moveto XXXXXX
</code>
where

xxxxxx

is 000240CE, as found here the RefID for Silus Vesuius.
After this, if you find that the specific NPC is dead, then you may resurrect the character and resume your questing. To resurrect and reset you the character in question, you should try the procedure listed here resurrecting and resetting characters

Skyrim Museum Quest in Dawnstar


Vector interpretation of Kepler's 2nd law ( r X a = 0 )

Question: I just  read the vector interpretation of Kepler's second law and the conclusion put me in a confusion.
The interpretation concludes by demonstrating that r X a = 0, where boldfaced r and a are respectively position vector of the planet from the sun and  the acceleration of the movement. The demonstration is interpretated as r and a being parallel to each other, which I understand but in the opposite direction and thus acceleration is directed towards the center is what I don't. How can we deduce  whether any two vectors are parallel in the same or the opposite direction just by analyzing the cross product?
Comment: We cannot deduce whether any two vectors are parallel in the same or the opposite direction just by analyzing the cross product. For another example, if ab=0 and a,b are real, then we cannot deduce that a=0 or b=0 or both are zero.
Comment: If it is so then how is it interpreted that the acceleration acts in the direction opposite to the position vector?
Comment: By Newton gravity law.
Comment: Kepler Second  Law, that "the line joining a planet and the Sun sweeps out equal areas during equal intervals of time", is this the same a geometric interpretation of  Newton's conclusion that under a central force the motion is on a plane with constant angular momentum. So there is no need to "interpret this interpretation" by the trivial result that the vector product of two collinear vectors is zero.
Answer: The cross product of two vectors is the area of a parallelogram defined by those vectors. If the angle is 90 degrees then the cross product is simply the magnitude of vector 1 multiplied by the magnitude of vector 2 (i.e are of a rectangle). another way of writing the cross product is |v||u|sin(theta). If theta is 0 (both pointing in same direction) or 180 (opposite direction) then sin(theta) = 0. There is no area defined by them.
Here you can see which area i'm talking about
Comment: thanks for the input. Yeah as I have written I understand that cross vector 0 means they have to be parallel. The only problem was I didn't understand how the author of the lesson that I read interpret that **a** is acting in the opposite direction (180 degrees) to **r**. Maybe as someone told he directly used Newton's Law.
Comment: ohh, well **a**=**F**/m The force vector is towards the sun so  a is towards the sun.


sharpdevelop .exe not working

Question: I'm a kind of newbie in c sharp , so i need some help on a issue i stumbled upon.I have written a small program which keeps my OfficeComunicator on status "available" when i lock the workstatiion ( instead of switching to status "away").Now i am using SharpDevelop tool and as soon as i compile the program and the exe comes up , its working beautifully.When i close the tool and just try to run the same .exe  from teh /bin/Debug directory its not working , which puzzles me , any suggestions where the issue could be ? Thanks in advance
Comment: Chances are the problem is in your code which you didn't show so we could only be guessing.
Answer: Are using .NET or Mono as your run time?
If you use Mono you would need to make a Batch file to run the program.

sharpdevelop .exe not working


Why is first-order logic defined as a collection of formal systems?

Question: I think I understand what a formal system is and what formal languages are. But I have trouble grasping why first-order logic  is referred  to as a collection of formal systems whereas propositional calculus is considered just a formal system.
What makes the difference? What is the reason behind this definition? What does "a collection of formal systems" mean?
Comment: Would you have a reference where the two different descriptions are used?  This might help provide an answer.
Comment: @FrankHubeny I've added references to wikipedia pages that make this distinciton
Comment: Propositional calculus is just one form of first order logic, (standard) predicate calculus is another, so are [natural deduction](https://en.wikipedia.org/wiki/Natural_deduction) and [sequent calculus](https://en.wikipedia.org/wiki/Sequent_calculus). They differ by syntax of expressions, axioms, inference rules, etc.
Answer: FOL is the "natural" logic environment to formalize mathematical theories.
Propositional calculus, instead, is only a "toy": it is based on a very simplified "model" of language that is not useful to develop interesting theories, but can be used efficiently to study the basic properties of a formal system : consistency, completeness, etc.
With FOL we have the "logical engine", i.e. the language with axioms and rules, and we usually study it in a similar way to the study of propositional calculus, in order to understand the basic meta-logic properties.
But, in addition to it, we are interested to add to the "logical engine" suitable non-logical constants, like ∈ ("in"), the binary relation of set theory, or + and × ("plus" and "times"), the basic arithmetical operations, with suitable axioms that govern their behaviour.
Thus, according to the specific mathematical symbols and axioms introduced, we have different formal mathematical theories : first order arithmetic, first-order set theory, and so on, all based on the same underlying logic : first-order predicate calculus with equality.

See also List of first-order theories.
Comment: "*FOL is the "natural" logic environment to formalize mathematical theories. Propositional calculus, instead, is only a "toy": it is based on a very simplified "model" of language that is not useful to develop interesting theories.*" This is a philosophical viewpoint or persuasion, not a de facto principle of modern logic.


what is the difference and advantage of usecase based testing and system testing

Question: In what way usecase based testing is differen from system testing ?
Can we consider system tesing as a subset of usecase based tesing , (ie)system testing consider only usecase of components or sub system with in the system.
Answer: I think you are mixing two terms. System testing is a testing phase while Use Case Testing is technique of designing test cases based on use cases, that can be used on many testing levels. For example:
1) In Use Case Testing you create Test Cases based on Use cases. The system, or at least components involved in given use case should be developed, build and integrated. One may want to check if two modules involved in given Use Case are working together properly. So in your Integration Test you prepare test case based on use case that exposes cooperation of those two modules.
2) When you are doing System Tests as part of them you can do Use Case Testing - to confirm that behavior specified by Use Case works as it should. But as Robert Harvey pointed out, System testing is to examine compliance with requirements so it makes both positive testing and negative testing. Therefore System Testing not only covers expected  behavior described in Use Cases, but also tries to 'break' the system from specific requirement point of view.
3) Additionally it should be mentioned that as Use Cases contain some expected user actions they make good starting point for User Acceptance Testing. On the other hand as user don't want to check Login Use Case but rather Login and do some stuff and observe some effects part of their business process so merely checking Use Cases is not enough. Use Cases Are some starting point but UAT usually will require tests going deeper into the buisness process that given software should support.
Answer: System testing of software or hardware is testing conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. System testing falls within the scope of black box testing, and as such, should require no knowledge of the inner design of the code or logic.
As a rule, system testing takes, as its input, all of the "integrated" software components that have successfully passed integration testing and also the software system itself integrated with any applicable hardware system(s). The purpose of integration testing is to detect any inconsistencies between the software units that are integrated together (called assemblages) or between any of the assemblages and the hardware. System testing is a more limiting type of testing; it seeks to detect defects both within the "inter-assemblages" and also within the system as a whole.
System testing is an investigatory testing phase, where the focus is to have almost a destructive attitude and tests not only the design, but also the behaviour and even the believed expectations of the customer. It is also intended to test up to and beyond the bounds defined in the software/hardware requirements specification(s).
Use Case testing is a specialized form of Verification and Validation testing, where the use cases become the test cases.  The purpose of this kind of testing is to see if the software does what it is supposed to do; ie. i meets its functional specifications.
Verification: The process of evaluating software to determine whether the products of a given development phase satisfy the conditions imposed at the start of that phase.
Validation: The process of evaluating software during or at the end of the development process to determine whether it satisfies specified requirements.
In other words, validation ensures that the product actually meets the user's needs, and that the specifications were correct in the first place, while verification is ensuring that the product has been built according to the requirements and design specifications. Validation ensures that 'you built the right thing'. Verification ensures that 'you built it right'. Validation confirms that the product, as provided, will fulfil its intended use.
Comment: Hi Robert
After going through the answer I got a feeling that Use Case testing is a specialized Validation and System testing is verification .

But got confused When we say "Use Case testing is a specialized form of Verification and Validation testing".

One more point ST and Usecase are created at the same level right?
I mean from System requirement Specification .
or is it like Usecase are created before SRS
Comment: There is quite a bit of overlap among these terms.  I think the distinctions are: whether or not you are testing against use cases or functional specifications, and whether or not those specifications are the ones set forth at the beginning of a project, or the ones at the end of the project that have been modified as a result of the iterative process.


Beginning a formal essay with a spoiler alert?

Question: I'm writing a literary analysis piece on Shirley Jackson's The Haunting of Hill House. Online, such analyses are often preceded by a warning that the contents of the page contains detailed information about the plot so that someone who hasn't read the book yet would know not to read it if they don't want the plot spoiled. Does such a "spoiler warning" have a place in a formal essay? The format of the essay is MLA.
Comment: Absolutely not.  Anyone reading a literary analysis certainly expects that the piece will discuss key aspects of the work, including major plot points.  That applies even when the analysis is presented on the web, supposing it is labeled as what it is.  A spoiler warning would be out of place inside the piece itself.
Comment: Formal essays typically have enough in their titles and format to not require spoiler alerts. Hypothetical example: "Analysis of the ending of Some Soap Opera, Episode 1." People who are part of the intended audience of formal essays probably don't care about spoiler alerts - if they are reading the essay, they have probably searched for it intentionally.
Comment: What does "MLA" mean?
Comment: @TrevorD 'MLA' means 'Modern Language Association'. OP is referring to its established style (http://www.mla.org/MLA-Style) for presentation and referencing.
Answer: If by 'formal' you mean that your essay will be academically assessed or published, then it would be inappropriate to include a spoiler warning.  That would literally make your piece look amateurish.
Spoiler warnings are suitably considerate in the perfectly legitimate realm where enthusiasts discuss a text and people primarily hope to enjoy the plot.  When I am chatting about a text in the pub, I am speaking in this way as an amateur or enthusiast, and I strive not to reveal plot points.
When writing academically-orientated material, however, that would not be an appropriate consideration.  I would look amateurishly clumsy if I were to write about Hamlet while coyly skirting the fact that (almost) everyone dies by the end.  I expect readers to be familiar with the text we are discussing.  If their primary concern is enjoying the plot, then they have simply selected an inappropriate piece to read.
We can all write as both enthusiasts/fans and academics, depending on circumstances.  The two types of material work differently.
Answer:
"Does such a "spoiler warning" have a place in a formal essay?"

It is courteous and considerate of you to ask this question, but unless you plan to informally publish your essay (online, for instance), you may assume that your reader has already read the book and that no "spoiler alert" is required. In short, such an alert would be inappropriate in a formal essay.


Are Truecrypt volumes safe from the government agencies?

Question: I have some Truecrypt volumes stored on my USB drive and I would like to know if they are safe from being cracked by the FBI or any government agencies? Some people say Full Disk Encryption will prevent the FBI from snooping through your files but I would like to know if Truecrypt volumes are just as safe and can provide enough protection from your files being accessed. I know about dictionary attacks, bruteforce attacks, and cold boot attacks. But with a strong password be enough for the FBI not to get into my files? Also, how do I prevent a cold boot attack on a Truecrypt flash drive volume? Some say making a volume itself is not safe and government agencies will still access your files and you should use full disk encryption instead, but I wanna know if that is the case or not. Thanks.
Comment: So what do you want to hide from us? - The NSA
Answer:
Also, how do I prevent a cold boot attack on a Truecrypt flash drive volume?

You don't. The sensitive areas are sanitized if the system is shut down properly, while any cleartext data will still be available and decay exponentially with time. So either make sure that no one will access your system for a few minutes after a shutdown, or re-boot again from a CD using MemTest to perform a R/W test of the whole DRAM. That will completely erase any traces from dynamic memory.
Regarding MemTest and similar tools, you want to perform the fastest test that will overwrite the whole memory. Thoroughly testing 1000 times each kilobyte might result in a 30-seconds test, which, if interrupted at once, will only have overwritten maybe the first 200M of RAM, leaving the rest intact. Testing once the whole RAM will overwrite everything in 30 milliseconds, and with RAM, a single overwrite is enough.
A good UPS can prevent unexpected shutdowns and reinstate the possibility of booting a cleanup CD.
There are also kits to extend the boot sequence. A write-and-check routine could pass for a reasonable precaution against hardware faults, and be a very good countermeasure against coldboot attacks (provided it's not known beforehand). You can make it so, unless you boot with both SHIFT keys pressed, the boot is slightly slowed down - we're talking a couple of seconds here - by a complete DRAM overwrite. Or you can always have an overwrite performed, just in case, without displaying anything.
This will still not protect against an attacker dumping the computer in liquid nitrogen, removing the RAM and mounting them in a different harness.
As for data security, volumes or whole disks are really similar for all practical purposes in your scenario, unless you go to great lengths to ensure "plausible deniability" (i.e. maintain an outer disk with a credible history, which is actually a lot of work). A can of strong acid and an external disk that will fit inside without sploshing might be a better solution.
However, lacking other information, this looks like a webcomic situation.
Try first determining your actual threat model. If men in black may really seize your disks, then chances are that they are able and willing to seize you. In that case, what you really should want is a password that's easy to remember (so you don't accidentally tell a wrong one to the nice guy with the helpful smile), or start thinking along the lines of "cyanide pill".
("Plausible deniability" using two passwords is only okay if you invest an inordinate amount of time in maintaining the deniable maskirovka, and actually the deniable partition is your main drive).
Strong encryption in your scenario looks like either too much, too soon, or too little, too late.
Comment: I would actually advise against using MemTest or variations. When the system is immediately rebooted, the RAM is powered up again and anything not lost is refreshed and will continue to exist until MemTest finally wipes those addresses. It's very possible that simply letting the system stay off will result in memory being wiped faster than if you immediately reboot into MemTest.
Comment: @forest good point. Amending answer.
Answer:
Non technically, it really depends on what country you live in.  A three letter agency might not be able to crack the encryption, but they might be able to legally force you to give them the key.  In United States, recent precedent seems to say that if the authorities have a reasonable idea of WHAT is encrypted, they can force you to give them the key.  If they do not have a reasonable idea of what is encrypted, then they are "fishing" and you can't be forced to incriminate yourself.   Again depending on the country and the vigilance of the citizenry, they could also extra-legally force you to give them the key via torture.  Both of these methods are variations of the rubber-hose attack and it works against most encryption.  Experts suggest that the protection against these this non-technical vulnerability is to hide the fact that there is encryption in the first place. For example, have an encrypted volume that contains another, hidden encrypted volume.  You will gladly hand over the key to the outside volume and pray that the inner, hidden one is not found.
From a purely technical perspective, TrueCrypt has been considered safe but there is an ongoing comprehensive audit of TrueCrypt  to see how safe it really is.  I haven't seen any findings that there is a way to break either whole disk encryption or encryption of a USB.  That is, the encryption can not be broken.  Clever attackers, when confronted with unbreakable encryption will go around it.  You should read up on ways to capture the encryption key in memory as truecrypt will generally keep the key in memory for fast access to the encrypted volume.  If the system is captured in this state, then the key can be captured.  Also, if the system is compromised, the keystrokes used to enter the encryption key can be captured.

So, the short answer is that the encryption part of TrueCrypt is currently considered solid but your question of "can the government read your USB" is subject to the above.  TrueCrypt has also considered these things and has features such as Hidden Volume and Hidden Operating System.
Answer: There are plenty of ways to get in besides the ones you mentioned (dictionary attacks, brute-force attacks, and cold boot attacks). Since the NSA has been reported to keep hidden security exploits to themselves, they probably have ways to get into even a fully-patched operating system and software running in it. You post implies a situation where the NSA, FBI, or ZYX have physical access to the Truecrypt volumes stored on your USB drive. In that case, by law #3 the 10 immutable laws of Security, your data is compromised. In fact, it might be easier for them to install malware on the computer while it's running (remotely) or while it's off (physically) than to take the USB drives from you. You can read about the laws here on Meta: https://security.meta.stackexchange.com/a/988/42975.

10 Immutable Laws of Security
…

Law #3: If a bad guy has unrestricted physical access to your computer, it's not your
    computer anymore

…

Your data storage devices are very much a part of your computer as it's not useable without one anyway.
Comment: +1 for physical access. Even if you lock up your computer or cover the motherboard with epoxy to prevent tampering something as simple as a hidden camera could still capture your keystrokes.
Answer:
But with a strong password be enough for the FBI not to get into my files?

That is correct. A brute force is impossible due to the immense key space. Look at the math if you'd like to verify this https://crypto.stackexchange.com/questions/6390/aes-key-ciphertext-space-sizes
While AES is technically broken (there is a faster method to getting the key than a brute force attack) it would still take trillions of years. http://www.theregister.co.uk/2011/08/19/aes_crypto_attack/

Also, how do I prevent a cold boot attack on a Truecrypt flash drive volume?

One method of cold booting it to plug in a USB drive with a live system on it and quickly reboot into that. The first thing is to lock down your bios with a password and only allow booting from devices you trust.
The second method of cold booting is to freeze the RAM chips which can make the contents last for several minutes and then swap them out into a computer the attacker controls.
To defend against this make it difficult to access the RAM in the first place. Consider putting a padlock on your computer case for example.
The third threat is if you need to leave in a hurry. Even if you shutdown the machine someone can boot it back up quickly. The first two defenses will work against this too but additionally there is the option of clearing ram on shutdown.
If your intention is to hide from the state, make sure you understand how key disclosure laws can affect you where you live. This is basically the reason Truecrypt hidden volumes were created. http://en.wikipedia.org/wiki/Key_disclosure_law


If $f=u+iv$ is a holomorphic function on the open unit disc with $v(0)=0$ and $|u|<1$ what is the largest possible value of $v(1/2)$

Question: This is a question from an old qualifying exam.
Let $f=u+iv$ be a holomorphic function on the open unit disc into the complex plane. Among all holomorphic functions $f$ with $v(0) = 0$ and $|u|<1$ what is the largest possible value of $v(1/2)$.
Attempt:
My initial idea was to let $g = e^f$ so that $|g(z)| = e^{u(z)}$ and $$r = \frac{z-e^{u(0)}}{e-\frac{1}{e}e^{u(0)}z}.$$ Then letting $h = r\circ g$, which is a holomorphic map from the unit disc into the unit disc with $h(0) = 0$, we can apply Schwarz's Lemma to conclude that $|h(1/2)| \leq 1/2$.
This seems to be a standard way to approach these types of problems, however I wasn't able to find an upper bound on $v(1/2)$ using this method.
Comment: [Here](http://math.stackexchange.com/q/319407/) is a way to bound $|g(1/2)|$, this implies the bound for $|v(1/2)|$ which I think will be sharp.
Answer: Schwarz lemma states that the equality of $|f(z)|\le |z|$ holds iff $f$ is a rotation. Use this.


What happens if both DoH and DoT are enabled?

Question: If I have DNS over HTTPS and DNS over TLS activated simultaneously (router has DoT activated and smartphone browser has DoH activated, so I see on https://184.108.40.206/help DoH: yes and DoT: yes), which one is used?
Answer: Both are services offered by some parties, like your router.
Which one is used? Both, either, or none. This all depends on the applications and the OS. They could even do DoH/DoT towards other resources externally.
AFAIK browsers do DoH, in different ways (automatically or not, only for some nameservers or not, etc.), but not DoT. The underlying OS and/or local resolver may be using DoT as forwarding for example to other external resolvers.

then I wonder how the site 22.214.171.124/help can even detect that my rooter has DoT enabled

Most DNS tests on the web do use the same technique: include (through an image for example) a link to a resource on an hostname you control, and it being random and unique. Then as you control the authoritative nameservers you can watch if requests do come (and since you are using a random name, you are not influenced by DNS TTLs and caching) and control them somehow (like a request expected to be DoH would only be served over DoH endpoint and not over standard DNS, etc.)
For this page if you look at network traffic you see requests being made to names like:

$GUID.is-cf.help.every1dns.net
$GUID.is-dot.help.every1dns.net
$GUID.is-doh.help.every1dns.net

I think the names themselves do hint on how they are used in the test.
Comment: So the client determines in the end, so if I have DoH enabled in the browser, then I wonder how the site https://188.8.131.52/help can even detect that my rooter has DoT enabled


Returns on actively trading bonds compared to equity?

Question:
Long term equities outperform bonds (equity premium puzzle).
However this kind of misses the nature of returns: in equity it is mostly the total return from "the principal" (and a little from dividends); in bonds it is principally income from coupons (assuming holding to maturity).
What if you trade bonds actively (utilising changes in interest rates, credit worthiness, etc.)? Could you expect ~10 % analogous to what you see in some equity strategies?
Answer: Theoretically, actively trading bonds versus passively holding bonds shouldn't result in extra expected returns, assuming that you are holding on average more or less the same amount of bonds as before.  In other words , the expected returns on timing the marketplace with respect to interest rates and credit spreads are theoretically zero in an efficient market.  Obviously there are a lot of active fund managers around who disagree with that, otherwise they wouldn't be in business.  However there are also a lot of managers in many asset classes who have failed to beat a simple long only strategy in recent years.
Comment: Indeed, the most liquidly traded Treasuries (on-the-runs) underperform off-the-run issues because they command a premium...


Are employees 'brand ambassador's of the company?

Question: When a company says that 'all employees should act like brand ambassadors for the company', is it fair or legally correct?  I agree that every employee should be focused entirely to act in the interests of the company during his 'work hours', but does the company have a stake/say on how the employee acts 'outside office hours'?  If the company wants the employee to be 'brand ambassador of the company' shouldn't the job description specify the same?
Comment: At the minimum, you cannot act in a way that diminishes the company's good name and reputation during your off-hours.
Answer: Most job descriptions have a phrase that says, "other duties as assigned."  This is one of those other duties.  You would need to ask your boss exactly what the company expects, but I would imagine it would be something along the lines of:
Behaving properly in public, especially at any event where you are known to be an employee of the company (such as evening events at a conference).
Not doing anything embarrassing or illegal while wearing company provided clothing such as t-shirts or polo shirts.
If the company makes physical products, not using the products that are made by competitors. An Apple employee shouldn't be using an Android phone for instance. ON the plus side, you can usually get a discount in buying the products of your company.
Not saying anything offensive in a public place (including Facebook) that disparages the company or other employees or is offensive to others (it would be embarrassing to Apple if you were a Neo-Nazi for instance) especially if your current company is attached to your profile. Basically, they don't want anything embarrassing to show up if someone searches for their company name. And depending on the country, it can be quite legal to fire people for bad Facebook use, I know of one case where the person said something racist about a co-worker and not only did she get fired but every Facebook friend she had in the company got asked why they had not reported it (well clearly one did).
This is all quite ordinary. After all, your behavior does reflect on the company you work for.
Answer: Your question is pretty broad and can't be answered without knowing some simple info like: which country is it in, what's your position in that company, what's your contract states about this etc.
And as always, questions like: is it fair or legally correct? can't really be answered here, you need a lawyer to ask law related questions.
But let's just simplify this, since even if you're right and it's not a legal agreement to represent your company, the employer could just refuse to hire you if you confront him/her on that basis.
So to simplify: if the company wants you to act a certain way in your working hours that is not offensive/discriminatory to you - you probably should. Outside of working hours you can do whatever you want that is not a breach of your NDA and interest violation contract (if signed) - for example working for a competitor etc.
And do remember, although the company legally can't fire you for X, Y or Z action, they can just find a different reason if they don't like you or what you do. That's more of a problem that the company is very controlling and maybe you don't want to permanently assign yourself to a company that get's it's nose into your own business or makes your uncomfortable working hours or not.
Comment: In the UK, several people have lost their jobs for "damaging the reputation" of their company. Often after Facebook posts.
Comment: yes, that is more in line with what I asked.  I am not referring to 'moonlighting', but for example, it could be as simple wearing a t-shirt of another company or mobile phone of another company, using a personal laptop with another microprocessor etc.  You can see job descriptions ('brand ambassador') even in LinkedIn now.  For me, the question is 'brand ambassador' itself is so broad!
Comment: @RaghuramanR you have to use your own judgement. Do you have other options job-wise? So I can't say "just drop their job-offer", but if there are other companies that do want you - think if you'll be comfortable in a company that so controlling.
Comment: It likely also depends on the nature of your job. If you're someone who customers are likely to encounter as an employee of your company, then restrictions make more sense than if you aren't.
Comment: I can understand the same clause as I mentioned ('brand ambassador') if I am in sales/marketing, but I am not and never had been.  I also feel that company retains certain clauses across all job descriptions and do not see if it is applicable to the relevant position.  It could also mean that the company could use such clauses when they want to fire employees!  For example, firing based on 'facebook posts' looks a bit sad and seems to indicate that the company is trigger happy!


Inverse of special type of symmetric block matrix

Question: $W = \begin{pmatrix}A & B &B &\cdots&B\\
B& A & B &\cdots &B\\
\vdots & \vdots & \vdots & \ddots &\vdots &\\
B& B & B &\cdots &A \end{pmatrix} $
where $A$ and $B$ are symmetric matrices of appropriate order. In fact $B = aJ$, where $J$ is the matrix of all ones. Is there any compact form of $W^{-1}$ ?. Thanks
Comment: Is $A$ known to be invertible? ($B=aJ$ is a rank-one matrix and is not invertible.)
Comment: Yes, $A$ is invertible.
Comment: @SatyaPrakash use \ddots to get diagonal dots. just so you can apply this in the future!!
Answer: To make the answer below easier to read, I will write the block matrix of interest as $\mathbf{W}$; furthermore, I'll denote elements of block matrices using indices $I,J$ (for regular matrices I'll just use $i,j$). For specificity, I will also assume that $\mathbf{W}$ is block $n$-by-$n$ and $A,B$ are $k$-by-$k$. (If you had other symbols in mind for these dimensions, let me know.) Finally, for later convenience I will define $u_n$ to be the column $n$-vector of ones and $J_n$ the $n$-by-$n$ matrix of ones.
Using the above conventions, the block matrix of interest has elements $$(\mathbf{W})_{IJ}=A \delta_{IJ}+B(1-\delta_{IJ})=(A-B)\delta_{IJ}+B$$ where $\delta_{IJ}$ is the Kronecker delta. If we recall the definition of the Kronecker product and consider the form of $B=aJ_k$, these two terms can be compactly represented as $$\mathbf{W}=I_n\otimes (A-B)+J_n\otimes B=I_n\otimes (A-a J_k)+a J_n\otimes J_k.$$
Furthermore, since $J_n=u_nu_n ^T$ we can write $$J_n\otimes J_k=u_nu_n^T\otimes u_ku_k^T = (u_n\otimes u_k)(u_k^T\otimes u_k^T)=\mathbf{u}\mathbf{u}^T$$ where $\mathbf{u}$ is the column $nk$-vector of ones. But this is a rank-one matrix, so we can express $\mathbf{W}^{-1}$ via the Sherman-Morrison formula:
\begin{align}
\mathbf{W}^{-1}
&=\left[I_n\otimes (A-a J)+a \mathbf{u}\mathbf{u}^T\right]^{-1}\\
&=[I_n\otimes (A-a J_k)]^{-1}-\frac{[I_n\otimes (A-a J_k)]^{-1}a\mathbf{u}\mathbf{u}^T[I_n\otimes (A-a J_k)]^{-1}}{1+a\mathbf{u}^T (I_n\otimes (A-a J_k)^{-1})\mathbf{u}}.\\
&=I_n\otimes (A-a J_k)^{-1}-\frac{(I_n\otimes (A-a J_k)^{-1})(J_n\otimes aJ_k)(I_n\otimes (A-a J_k)^{-1})}{1+a(u_n^T\otimes u_k^T) (I_n\otimes (A-a J_k)^{-1})(u_n\otimes u_k)}.\\
&=I_n\otimes (A-a J_k)^{-1}-\frac{J_n\otimes[(A-a J_k)^{-1}J_k(A-a J_k)^{-1}]}{1+na\cdot u_k^T(A-aJ_k)^{-1}u_k}.
\end{align}
Since $J_k=u_ku_k^T$ is itself a rank-one matrix, we can again appeal to Sherman-Morrison to get $$(A-aJ_k)^{-1}=A^{-1}+A^{-1}\frac{au_ku_k^T}{1-a u_k^TA^{-1}u_k}A^{-1}.$$
This simplifies the product in the denominator to
$$u_k^T(A-aJ_k)^{-1}u_k=u_k^T A^{-1}u_k+(u_k^T A^{-1}u_k)\frac{a}{1-a u_k^TA^{-1}u_k}(u_k^T A^{-1}u_k)=\frac{u_k^T A^{-1}u_k}{1-a u_k^TA^{-1}u_k}.$$
It's possible one could simplify this further but for the time being I'll call it quits here. However, note that $\mathbf{W}^{-1}$ been expressed entirely in terms of $u$ and the matrix inverse $A^{-1}$. (In particular, $u_k^T A^{-1}u_k$ is just the sum of all elements of $A^{-1}$.) So if we already knew $A^{-1}$ then we could compute $\mathbf{W}^{-1}$ directly from the above.
Comment: Note: I've tried to ensure that the signs and such are right, but there's always the chance I missed something. So the reader is advised to check the algebra themself.
Comment: Thanks a lot. It's a great help.
Comment: Hi, I am not sure about the third equality in $W^{-1}$. Since the product of  $I_{n}$ and $uu^{T}$ not defined. They have different sizes. Please let me know, I think I am missing something.
Comment: You're right. But I think the source of the problem is earlier: In writing $\mathbf{B}=aJ\otimes J$, I proceeded as though each entry were of the same dimension. But if $\mathbf{B}$ is block $k$-by-$k$, then one of those should really be a $n$-by-$n$ matrix of ones (not $J$, which is $k$-by-$k$). So I'll need to rewrite the answer to remove the ambiguity.
Comment: Okay, it should be consistent now. In particular, one has $I_n u_n u_n^T=u_n u_n^T$ as expected for the product with an identity matrix.


convert discrete function into continuous

Question: I have a function defined at discrete points which I need to convert into continuous so that I can get approximate values of function at points where it does not have value.Is there any function which can convert it into continuous.
Comment: https://en.wikipedia.org/wiki/Interpolation
Answer: There are infinitely many continuous functions that pass through your discrete points. And that is the problem. Which function do you want to use? This depends on what other properties you need the function to possess.
If continuity is your only criterion, then linear interpolation is the simplest. (Since you didn't say, I am going to assume you mean a function from $\Bbb R \to \Bbb R$, not higher dimensions.) If your points are $$\{(x_i, y_i) \mid 0\le i \le n, x_0 < x_1 < ... < x_n\}$$
Then you can define your function $f$ by:
$$f(x) = \begin{cases}y_0 & x \le x_0\\\frac{y_1 - y_0}{x_1 - x_0}(x - x_0) + y_0 & x_0 < x < x_1\\\vdots\\\frac{y_n - y_{n-1}}{x_n - x_{n-1}}(x - x_{n-1}) + y_{n-1} & x_{n-1} < x \le x_n\\y_n & x_n < x\end{cases}$$
This gives a function with a saw-tooth shape, with vertices at each of your points.
If you want your function to be a polynomial, then you could find the Lagrange Polynomial. But be warned, this will often swing wildly back and forth between your points. So for example if $(0, 1)$ and $(1,2)$ are adjacent points in your data, it can occur that the value of the Lagrange polynomial at $1/2$ is on the order of 1,000, or even 1,000,000. If you want the heights of nearby points to be consistent, the Lagrange polynomial is not a good choice.
If you need your function to vary smoothly instead of having jagged corners like linearly interpolation, but also not swing wildly like the Lagrange polynomial, then cubic splines are your best bet.


battery management protection component

Question: I have been looking at a lot at Battery management system/protection circuits lately and there are components that I can't identify. Can anyone tell what is the name and function of the component I encircled in the image? I am thinking that that these are fuses but I might be wrong.
Comment: shunt resistors to measure current.
Answer: Those look like bus bars to me -- essentially very low-resistance, high-current capacity interconnects commonly found on a PCB. In a battery pack, especially one capable of hundreds of amperes, the difference between a 1mOhm and 2mOhm could be 10W dissipated vs. 20W dissipated.
Answer: The wires you see are probably not copper but a material chosen for temperature invariance .It could be manganon or phosphor bronze or some alloy designed to hopefully have a near zero temp co of resistance .These materials have much more resistance than copper .Copper has a significant tempco like most metals.The voltage developed across the shunt can now accurately be used for current measurement as long as the currents are not too small where opamp offsets would spoil things .Its all a comprimise because low resistance means low losses and higher resistance gives better low end accuracy .This is why the better equipment uses the more expensive hall effect devices.
Answer: It looks like a current shunt resistor. It is used to calculate the current flowing through the circuit by measuring the voltage drop across the shunt resistor. Shunt resistors have very less resistance but are rated for higher power rating. They have resistance anywhere between 10 to a few 100 micro ohm.

battery management protection component


Are there any Ebook libraries in UAE?

Question: Are there any Ebook libraries in UAE or more specifically in Ras Al Khaimah?
Comment: Removed 'Is anyone interested in starting one?' this part of the question is out of scope for the QA part of this site. You can talk about it in chat.
Answer: I'm honestly not sure if it will work where you live. But Google libgen
Maybe you can change your region if it doesn't work there.
Answer: Unfortunately, you don't have any option in RAK. There are two options:

University of Ras Al Khaimah Library has a collection of 300,000 ebooks. You can check more details here
https://www.aurak.ac.ae/life-at-aurak/library

You can become member of libraries in Dubai and Abu Dhabi and you could be eligible to use their elibrary remotely.

Are there any Ebook libraries in UAE?


Digital Signature using symmetric key cryptography

Question: Generally digital signature is a public key cryptography concept.But it needs high overhead.
So is there any publication or link available where 'digital signature using symmetric key' has been explained?
Can one generate an algorithm combining the public key and private key of RSA algorithm to make it a symmetric key?
Comment: I don't get your question. What do you mean by symmetric key digital signature? A MAC? Or are you talking about an asymmetric scheme built from symmetric primitives (like hash signatures?)
Comment: It is what MACs are for. They allow you to authenticate a message with a shared secret. Keywords: MAC, HMAC, keyed hash function.
Comment: Would [Lamport signature](https://en.wikipedia.org/wiki/Lamport_signature) fit? It's digital signature built from a hash, which is symmetric key cryptography.
Comment: Read this blog article: http://blog.cryptographyengineering.com/2014/02/cryptographic-obfuscation-and.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+AFewThoughtsOnCryptographicEngineering+%28A+Few+Thoughts+on+Cryptographic+Engineering%29
Comment: In the last part, the paragraph, titled "
Indistinguishability Obfuscation" it links a paper which uses obfuscation to turn private crypto into public. I have not read the paper entirely, but they seem to straight into the matter.
Comment: "turn private crypto into public" requires *black box obfuscation*, which is impossible to achieve. Concerning the question: It's not clear what you actually want. If one party should be able to sign and everyone else to verify, then this is public key crypto, you can't achieve this with symmetric schemes.
Answer: You may be interested in reading up on the The TESLA Broadcast Authentication Protocol which uses the one-way key chain concept to achieve authentication.
The basic idea of the key chain is to hash a secret key value repeatedly and use the hashes or "keys" in the reverse order for authentication. A simple example would be for Alice to compute
$$H(H(H(H(\text{secret key}))))$$
and send this value securely to Bob. Next, Alice disclose the value of
$$H(H(H(\text{secret key}))).$$
Since the hash function, H(.) is assumed to be one-way then any party with knowledge of the pre-image is assumed to be Alice.
The sender uses the most recent value from the one-way chain as a cryptographic key to compute a MAC. Each receiver can verify that the disclosed key is correct (using self-authentication and previously released keys). The authors state that any key of the key chain can serve as a key chain commitment and is similar to a public key of a digital signature
Answer: I have some thoughts about it.
If two persons Alice and Bob are sharing secret symmetric key, which known only by them, then if Bob will send to Alice encrypted with key K, message M, it will be enough for proof that M was really created by Bob. Because only Bob knows secret key K, so only he could to encrypt message M with this key.
Only one problem for Alice and Bob is how to share key K. So if this problem does not exist, than all public key cryptography would not be needed.
But because all conversations between Alice and Bob can be modified by Man in the middle, they have no opportunity to exchange secret key K.
And that is why they are using public key cryptography.
Bob shared his public key and Alice can use it to proof is received message was created by him.
Regarding your question, you can use symmetric key K for proof that message was created by specific person(for example MAC), but for this you first need to share key. And for this you need to use public key or trusted Key distribution center(which is not as convenience as public key crypto).
Answer: Some of the most commonly used signatures are symmetric.
If two parties have a shared secret (a random value), then as a signature they can use the hash of the combination of the message and the key. To verify the signature, the other party generates their own signature for the message and then checks that both signatures match.
This is the principle of the HMAC-SHA256 signing algorithm used for most JSON Web Tokens, e.g. for OIDC authentication with federated online identity providers. It is also the basis of AWS SigV4 protocol, for signed requests used to authorise any control of resources across some of the largest cloud datacentres.
Comment: The term for your example is called "MAC" - message authentication code. While both MAC and DSS ensure authenticity and integrity, they're distinct.
Comment: DSS has the property that verifiers cannot produce valid signatures due to them not having the private signing key, this is a key difference between DSS and MAC. The so-called "signature" produced by MAC algorithms are known as "tags". Also, HMAC isn't the only MAC out there.
Comment: Also, can you tell me how to sign a digital transaction using HMAC without others forging transactions against your will? This is a key functional difference between DSS and MAC. The article you linked is simplifying things, but sadly, it's causing some confusions obviously.
Comment: @DannyNiu are you trying to make a semantic point? Obviously asymmetric signatures are different from HMACs, but HMACs *are* also widely referred to as "signatures" despite lacking asymmetry. (E.g. in any of the JWT specs, [etc](https://auth0.com/blog/json-web-token-signing-algorithms-overview/#Common-JWT-Signing-Algorithms))


How often does Addar II happen?

Question: I was sitting over dinner with the mispaha (family) talking about the calendar and I said that Addar 2 happens every seven years, but my dad said that it happens every four. So, my question is: how often is there an Addar II?
Comment: Hey Moises, welcome to Mi Yodeya! Thanks for bringing your question here. I have to say, I *love* the placement of your hat :)
Comment: I hope you don't mind that I edited your question lightly for clarity's sake -- if I've changed anything you don't like, you can always [edit] the question yourself.
Comment: @Shokhet not a problem. I thought that this would be the place to ask a question about anything Jewish. and about the edit, thanks. I think that you did a great job thanks for that too.
Comment: http://judaism.stackexchange.com/questions/6376/how-do-i-know-if-its-a-hebrew-leap-year
Comment: Yup, this is the place to ask about anything to do with Judaism :) ....I hope you stick around and enjoy it!
Answer: The extra Adar happens when there is a leap year -- we add a month to preserve the lunar properties of the calendar.  Seven in nineteen years are leap years, so every 2-3 years on average.
From Judaism 101:

Adar I is added in the 3rd, 6th, 8th, 11th, 14th, 17th and 19th years of the cycle.

(Technically it is Adar I (aka Adar Alef) that's the additional month, and Adar II (Adar Bet) is the last month of every year.  But in a year with just one it's just Adar.)
Answer: I am assuming that your question refers to the current "fixed" calendar, so it seems that you have numerous answers on that.
I wanted to add that historically, this was not always the situation during the time that the Sanhedrin existed and prior to that. I just completed a class on the history and the workings of the Judaic calendar, which you will find via a link on my blog. The 1st or 2nd entry has a link to a Google shared drive, and you can view the PowerPoint file in the "Session 2" folder.
In summary - The Sanhedrin's main concern was to ensure that 16 Nissan (2nd day of Passover) occurs after the Spring equinox. If not, an extra month was added.
While that was the main criteria, Sanhedrin could also declare a leap year if the barley crop had not yet ripened, if the fruit trees did not bloom, or if the roads were muddy and / or bridges were washed out because of heavy rains during the rainy season. There are a few other reasons, as well, which I mention in the blog. I gleaned most of my materials from Maimonides Hilchot Kiddush Hachodesh.
Answer: Jewish leap years don't happen every seven or every four -- they happen as part of a nineteen year cycle.
For example, see the answers to this question, about how to tell which year is a Jewish leap year -- I really liked this answer to that question :)
Answer: In the fixed calendar it happens 7 times in 19 years.
The lunar month, according to our tradition (we announce the "molad") in fact is exactly 29 days, 12 hours, 44 minutes and one "chalak", an 18th of a minute, or 42524 minutes + 1 chalak, or 765433 chalakim. (Hey, almost an easy number to remember, isn't that).
If we ignore "leap seconds" and we know that the Gregorian calendar is 365.2425 days which is 525949.2 minutes or 9467085.6 chalakim.
Divide these numbers and we get 12.36827469, the actual number of months in a year. Now I, as a mathematician, know what a recurring fraction is, and that give good approximations.
The first few are:
12
25/2
37/3
99/8
136/11
235/19
when you get to this point the next factor is 18. A high factor means you have a good approximation.
Our calendar does actually drift forward a bit. (Remember we usually still follow the Julian calendar, e.g. when we start saying V'Tein Tal Umatar outside Israel and when we recite Birchat Hachama). However our calender doesn't drift forward to the extent the Julian calendar does.
The next value is 4366/353 which means if we really wanted to stop the drift then, after 18 cycles of 19 years, we should insert a cycle of 11 years, then resume as before.
Using the Julian calendar our target would be 12.36852866 and 235/19 is (as I mentioned) slightly shorter so we'd have to add in more extra months. Actually 25 of lots of 19 then a run of 8, giving us 5974 months in 483 years.

How often does Addar II happen?


How would you describe the relationship of science and philosophy of science?

Question: How would you describe the relationship of science and philosophy of science? Is it a worldview that sets a tone to scientific jargon? I mean that statements of eg. physics are under submission of the worldview of philosophy of science?
Comment: +1 Interesting question with a lot of potential. Could you develop it a bit more?
Answer: Philosophy of science is the science about science, or to put it differently the theory of science. It is a meta-science which determines which endeavors are scientific in the first place and not merely pseudoscience.
So basically, it asks what science is. What do we have to assume to conduct science? Can we know anything (for sure) and, if so, what can we know? What rules one should apply in science? Which standard should we adhere to, strict or pragmatic? Is there such a thing as scientific progress? Are there different fields which require a different methodology, e.g.: Can we conduct "physics" in the same way we conduct "sociology"? Can science influence our sense of morality? Can it affect ethics or is that something else entirely?
It is a very broad field, and for me philosophy of science is quite frankly the king of all sciences.
Comment: But many philosophers would disagree. They somewhy try to use the argument that if science tries to justify itself, it's circular. Metaphilosophy is circular too.
Comment: At least four of the example questions you give belong in metaphysics.
Comment: @PeterJ Only if you are a proponent of metaphysics though. There are philosophies objecting that metaphysics is even possible, and there are others claiming metaphysics is either meaningless or that its statement may have truth values that cannot be known.
Comment: Yes. All these arguments come from people who admit they do not understand metaphysics. This should make you wonder. These four examples belong in metaphysics whatever you and I think. It's just how things are.
Answer: Philosophy of Science is the study of the assumptions, foundations, and implications of natural science (which is usually taken to mean biology, chemistry, physics, earth science and astronomy, as opposed to social science which deals with human behavior and society).
It asks questions like:
"What is science?",
"What are the aims of science" and
"How one  interpret the results of science?".

Scientism is the broad-based belief that the assumptions and methods of research of the physical and natural sciences are equally appropriate (or even essential) to all other disciplines, including philosophy, the humanities, and the social sciences.
Positivism is the closely related philosophy which holds that the only authentic knowledge is scientific knowledge, and that such knowledge can only come from positive affirmation of theories through strict scientific method (which means the collection of data through observation and experimentation, and the formulation and testing of hypotheses).

One of the central questions in the Philosophy of Science is distinguishing science from non-science, although many regard the problem as unsolvable or moot.
Historically, the main point of contention was between science and religion and, even today, many opponents of intelligent design claim that it does not meet the criteria of science and should thus not be treated on equal footing as evolution.

The criteria for science typically include:
  •   the formulation of hypotheses that meet the logical criteria of contingency (i.e. not logically necessarily true or false), falsifiability (i.e. capable of being proved false) and testability (i.e. there is some real hope of establishing whether it is true or false)

•   a grounding in empirical evidence
•   the use of the scientific method

Empiricism (and, later, Positivism and Logical Positivism) grounded science in observation, and campaigned for a systematic reduction of all human knowledge to logical and scientific foundations.

Non-science, on the other hand, (e.g. Metaphysics and Philosophy of Religion) was non-observational and hence meaningless, a theory also known as Verificationism.
Karl Popper (1902 - 1994), in response to the Logical Positivists, recognized that a theory might well be meaningful without being scientific, and that the central feature of science was that it aims at falsifiable claims (i.e. claims that can be proven false, at least in theory), which he called Falsificationism.

The American Thomas Kuhn (1922 - 1996) pointed out that most science was what he called normal science (problem solving work within the bounds of current theory and knowledge).

However, when many anomalies are generated during the process of doing normal science, it may become accepted that the work is actually extraordinary (or revolutionary) science within the current scientific paradigm.
There may then occur a paradigm shift (such as the shift from Newtonian science to Einsteinian science) until the new paradigm is accepted as the norm by the scientific community and integrated into their previous work.
ref.-

https://www.philosophybasics.com/branch_philosophy_of_science.html
Answer: Wolfgang Smith answers very intelligently on this
"It is difficult, almost impossible, in fact, for the scientific community to recognize the fact that Cartesian bifurcation is a philosophic postulate, for which there is absolutely no scientific basis [...] It is not that they can conceive or imagine a scientific proof of that hypothesis; it is rather that they are unable to conceive that it might not be true."
― Wolfgang Smith
"It behooves us ... to consider the fateful formula E = mc2, which almost everyone in the world attributes to Albert Einstein's theory [of relativity]. Despite the fact, however, that Einstein did derive this formula from his special theory of relativity, it stems actually from [the] classical part [of the theory]: i.e., from the Maxwell equations for electromagnetic fields, which goes back to 1865. The famous formula has consequently no bearing whatsoever on relativistic physics, a fact Einstein himself admitted in 1950. Obviously, however, in the interim that fateful formula came to be viewed worldwide as the consummate vindication of Einstein's theory: what indeed could be more convincing than the explosion of an atom bomb?"
― Wolfgang Smith, Physique et métaphysique
"THE DIFFICULTIES AND INDEED PERPLEXITIES which beset us the moment we try to make philosophic sense out of the findings of quantum theory are caused, not just by the complexity and subtlety of the microworld, but first and foremost by an adhesion to certain false metaphysical premises, which have occupied a position of intellectual dominance since the time of René Descartes."
― Wolfgang Smith, The Quantum Enigma: Finding the Hidden Key
"I find it surprising that [Eddington] seems not to recognize the incongruity of sitting on [a chair described as] an aggregate of quantum particles, especially after we have been told that these aggregates are 'partly subjective': how can one sit on a 'partly subjective' chair? And for that matter, how can one sit on a 'mathematical structure'? My colleagues in mathematics would find this hard to comprehend. What is missing in mathematical structures, of course, is substance: the very thing that has been 'filtered out' by the physicist. A chair without substance, it turns out, cannot be sat upon."
― Wolfgang Smith, Ancient Wisdom and Modern Misconceptions: A Critique of Contemporary Scientism
"Even the tiniest plant that blooms for a fortnight and then is seen no more is vaster in its metaphysical roots than the entire cosmos in its visible form: for these roots extend into eternity. And how much more does this apply to man! "Before I formed thee in the womb, I knew the" (Jer. 1:5)"
― Wolfgang Smith
Answer: You want the great scientist and philosopher of science, Michael Polanyi.
"So long as we use a certain language, all questions that we can ask will have to be formulated in it and will thereby confirm the theory of the universe which is implied in the vocabulary and structure of the language."
"The amount of knowledge which we can justify from evidence directly available to us can never be large. The overwhelming proportion of our factual beliefs continue therefore to be held at second hand through trusting others, and in the great majority of cases our trust is placed in the authority of comparatively few people of widely acknowledged standing."
"a series of observations which at one time were held to be important scientific facts, were a few years later completely discredited and committed to oblivion, without ever having been disproved or indeed newly tested, simply because the conceptual framework of science had meanwhile so altered that the facts no longer appeared credible."


How can I get all the comments, added to shared link of my website on Facebook?

Question: Question:
I have a "like" button on my website, someone clicks it and shares url of my website with his comment.This is posted to Facebook. Some users add comments to this post with shared url.
Can I get all those comments?
If yes,then how?
Answer: If the user has authenticated with your application and granted read_stream permission you could by requesting /me/feed and looking for your site.  But otherwise, no, not just by them sharing/liking your page.


How to sell product's access on a blockchain based marketplace?

Question: I want to sell a product's access (URL so that it can be downloaded) using smart contract on blockchain. I dont think I can add that URL on the product's specification contract as that would be visible to everybody that is looking at the contract. How can I sell the product so that everyone can review that product was sold (blockchain use-case) but nobody can access that access url but the buyer (not really blockchain use-case) ?
Answer: In your product contract you can store the download link and the address of the buyer. When the buyer wants to download the product, he can follow the download link and send a request to the download server signed with his private key. The download server will deliver the product only if the signature matches the address stored in the contract.
Answer: I think after a transaction is complete the server must send the link to the client. That link should contain a command to tigger a process which would create an additional record on the blockchain that the link was used and thus a product considered downloaded, ok?


VHDL - Cheapest-Fastest unsigned to signed binary number converter

Question: We know that to convert unsigned to signed (precisely, I want to convert a pure binary into CA2 number) we must negate the unsigned number adding, then, + 1. In VHDL I can implement an inverter and an adder that manages the carry in. I have two numbers of 32 bits. Is there another way to implement the sum + 1 using anything cheaper? Is there a solution to manage the carry in using only logic gates?
Comment: CA2 : In French it would be "Complément à 2"="Two's complement".
Comment: No, that's for taking the negative of a number. Changing the signedness doesn't involve changing the bit pattern.
Comment: Yeah I know that the pattern is the same, but I need of negative number, I need to see it like a CA2 number
Comment: CA2, CA-2 or CA II may refer to :

    Carbonic anhydrase II, a human gene
    California's 2nd congressional district
    Hummel CA-2, an ultralight aircraft
    California State Route 2
    Ca II, a singly-ionized calcium that produces the H and K lines in the spectrum of many stars
Comment: In other words, what (precisely) is a "CA2 number"? It is not a common technical idiom.
Answer: It really isn't worth worrying too much about this detail. Adding 1 to a number is such a common idiom in HDL that synthesis tools have highly-evolved methods for dealing wtih it. Also, most modern FPGAs have dedicated, hard-wired fast carry logic that does not consume logic cells, and that synthesis tools know how to take advantage of.
Comment: Thank you for answer. So, do u suggest to implement it in behavioral way and leave everything to synthesizer?
Answer: If it's unsigned, it is by definition positive, therefore it's 2's complement equivalent is also positive, therefore the bit pattern representation is the same.
The one difficulty arises if its MSB is already set : then it is an unsigned too large to represent as a signed number of the same size. So the completely general answer is to sign-extend it into a 2's complement number at least 1 bit wider :
my_signed <= '0' & my_unsigned;


How did "classic" and "classical" come to mean "historic"?

Question: I assume the words classic and classical have a basis in the word class — which is to say, of a category. Why do we use those words to mean old or historically important?
Answer: Here's a shot at it, not sure if this is accurate but is logical.
Two definitions of the word can combine to form this meaning of Historic.
The first is

of the first or highest quality, class, or rank

The second is

serving as a standard, model, or guide.

I would say, the classic model is also the highest quality model.  You can't know the classic model unless it is in the past.  Thus, the usage of the word describes something of high quality, in the past.
A classic model for economic growth would be one that is proven to work because of its high quality, It is possible that the fact that it has taken place in the past serves its base for being an historical word.
Possibly.
These and other definitions of classic: dictionary.reference.com/browse/classic?s=t
Comment: From Online Etymology Dictionary [link](http://www.etymonline.com/index.php?allowed_in_frame=0&search=classic&searchmode=none): "classic (adj.)
1610s, from Fr. classique (17c.), from L. classicus 'relating to the (highest) classes of the Roman people,' hence, 'superior,' from classis (see class). Originally in English 'of the first class;' meaning 'belonging to standard authors of Greek and Roman antiquity' is attested from 1620s. Classics is 1711, and is the earliest form of the word to be used as a noun."
Comment: You should include this in your answer. I good answer gives references to back up what's been stated.
Comment: Do you have any references?
Comment: Definitions of classic: http://dictionary.reference.com/browse/classic?s=t
Answer: Historically important usually has some values to the place or item in place. Values as in something to do with its history and it being old.
Definition of classical
adjective
<code>- relating to ancient Greek or Latin literature, art, or culture:
</code>
Definition of classic
adjective
<code>- judged over a period of time to be of the highest quality and outstanding of its kind:
  a classic novel a classic car
</code>
noun
<code>- work of art of recognized and established value: his books have become classics
- garment of a simple, elegant, and long-lasting style.
- thing which is memorable and a very good example of its kind: he's hoping that
  tomorrow's game will be a classic.
</code>
References:

<code>http://oxforddictionaries.com/definition/english/classical
http://oxforddictionaries.com/definition/english/classic
http://www.merriam-webster.com/dictionary/classic
http://www.merriam-webster.com/dictionary/classical
</code>

How did “classic” and “classical” come to mean “historic”?


Fixing line breaks in cartoDB infowindow?

Question: I am having trouble with my cartoDB infowindow, the text breaks no matter if I resize the window. Please, take a look at the screen shot below. How can I resolve the issue? Where should I work, dataset or carto map editor?
Answer: This behavior should have recently been fixed, but you can also implement the fix with the following:
Find this bit of code in your pop up HTML:

And alter it to include this:

Do this for every h4 class.
Comment: It's a good idea to take a look (I mean inspect) at the CSS classes available on other existing elements so you can learn how to change easily some styles to make them closer to the rest of the UI styles.


Theming a content type

Question: What's the best way to theme a content type? Is there an effective way? Can I just use my page template, resave it with a different name and do it that way?
Comment: you most probably should be looking into the node templates
Comment: Would that have any material differences from a page template?
Answer: It depends on what you want/need. Not only for content types, for theming generally; my suggestions:

For little/cosmetic changes(font, color etc.) and basic layout settings you can use node-type-yourcontenttypename class and style with CSS.
For moderate+ structural and visual needs you can use Views, Context, Panels  etc. alone or combined(and CSS of course).
For the things you can't achieve without dirtying your hands; you can create special template files for pages, nodes, block, views etc.
For the things you can't achieve with above ways; you can hack core, module, theme files. But this would be last and worst way to go.

You can do lot of things with 1, most of things with 1+2 and almost everything with 1+2+3.
Answer: The best way is to create a different template for each content type. For example, you would make a node--product.tpl.php template in your theme's template folder to theme all content with the "Product" content type. Once you flush your site's cache, all Product content will follow the new template, and all new Product nodes will follow it as well.
Answer: Visit this link- https://api.drupal.org/api/drupal/modules!node!node.tpl.php/7 . You can copy node.tpl.php into your theme folder and then modify the code to control the output.
Answer: There is couple ways/modules to do that:
If you dont want to code use Display Suite: https://drupal.org/project/ds (you can change fields markup, rearange them and put into regions)
OR
If you want only to change field markup us https://drupal.org/project/semantic_fields , and them rearange code them in node--[contenttypename].tpl.php
OR (my personal favourite)
Turn on Devel module. Put dsm($node) in node--[contenttypename].tpl.php - you'll see the node object and can reach for raw field values. Print them with your markup around.
Answer: Using Display Suite is my preferred method. https://drupal.org/project/ds
You can create multiple view modes for each content type. For each one, you can control the layout, which fields to display, and the markup for those fields. You can then choose which view mode to use when displaying them in Views. All of the Display Suite configuration is exportable, so it works well with the Features module.

Theming a content type


3d Print pops off before complete

Question: I recently got my first 3D printer, however when I print taller objects, sometimes the piece pops off the build plate and moves around before the print is finished, the piece then is missing the top few layers and is burnt from the nozzle, Just wondering why this happens and how to fix it...
Here are some pictures:
Comment: It's unclear what your question is: if it is about how to improve adhesion, you should provide more details.  What printer, what filament, what type of printing bed, what temperatures, etc...  Or maybe the question is about why it happens at the top of the print?
Comment: I have updated the post, sorry about that! I also believe that it was due to bed leveling as the first layer did not have a lot of contact to the print surface...
Answer: The issue you are having is with bed adhesion.  Basically your print is not sticking well enough to the printer bed for it to resist the mechanical forces the part is being subject to during print.
This the most common issue in FDM 3D printing and you can find a lot of material online on how to mitigate the problem.  Just as a "teaser":

You need to ensure your printing bed is dead flat and at the right distance from your nozzle.  Search online for: "3D printer bed leveling": the procedure is normally the same for most printers, but if your model is a common one, chances are you will find a video/how-to/blog post for it.
You should use print settings that facilitate bonding of the plastic to the bed (typically: slow speed, no cooling fan, a bit of overextrusion...)
You can tell the slicer to add a brim or a raft to your part, to increase the amount of material holding down the print.
You have the option to cover your printing bed with some material that increases the bonding of the plastic (this is type-of-plastic specific but typically: PVA glue or painter's tape work well for PLA, and kapton tape or ABS sludge for ABS).
If you have a heated bed, use it (each filament brand has their own recommendations, but typically 50-60°C works well for PLA).

As for why your problem is happening towards the end of the print, there are a series of factors contributing to it:

The tallest the print, the more mechanical advantage (leverage) the nozzle has over the adhesion surface.
It looks like your top layers are progressively small, so they print very fast and this in turn the does not allow for the plastic to completely cool down before going to the following layer, so when the nozzle prints on top of it the still-warm layer is "pulled up" by the action of the nozzle, creates a blob that sticks to the nozzle and that only makes situation worse.  Snowball effect.  Most slicers have an option "minimum layer time" that delays the print of a layer until X seconds have passed from the start of the previous one.
It may be possible that the Z axis is inaccurate and the nozzle catches on a previous layer.  Most printer have some kind of accuracy issue with the Z axis the furthest up the head is, especially if the Z-axis has only one threaded rod (as for example in the Creality CR-10).  Another source of inaccuracy (see comments below) could be the movement multiplier for the Z being slightly off, causing the nozzle to dig into the print if there's overextrusion and enough cumulative error.  Z axis inaccuracies are however unlikely to be the primary source of troubles for you, but it's a "nice to know" thing to know about 3D FDM printers, nevertheless.
Comment: *printing bed should* be **heated bed**?

In addition to the Z axis inaccuracy, the movement multiplier for the Z axis might be off, causing the nozzle to dig into the print if there's overextrusion and enough cumulative error.
Comment: @onno -  thanks, fixed! will add your comment in the answer when not on mobile! :)

3d Print pops off before complete


Tails manual upgrade persistence lost

Question: I did a manual upgrade per the instructions on the tails website and I lost my persistence folder. I don't see any persistence folder
I had my original tails on a 8gb drive and the intermediary was 16gb.
Why am I not seeing any persistence folder?
Answer: Firstly you should know that once in a while this happens since there are many tails, maybe the persistence.conf file got broken. But there is a way out to fix the difficulties your facing.
Try this:
-Boot Tails and enable persistence.
-Use the Tails file manager to look into the directory where the persistence volume is mounted to see if your files are still present.
-Top left menu bar > Places > Computer > File System > live > persistence > TailsData_unlocked
-There should be a number of directories with your saved data contained in them:
 electrum,
 gnupg,
 Persistent

(others depending on your configuration)
      If those directories are present, you may be able to fix your problem by simply re-running the persistence configuration tool.
-Applications > Tails > configure persistent volume
-Enable the same options that you had before.
-Reboot.
Hopefully your persistence volume will now be mounted properly.
However to prevent this;
Always shutdown your Tails system normally. Do not pull the drive out of the machine to shut it down. That is only to be used in an emergency and could cause data loss.
As a safety measure, keep you backups current.
Answer: This is a known issue, check out this dedicated documentation:
https://tails.boum.org/support/known_issues/index.en.html#index16h2
Good luck!

Persistent folder disappears and data of the Persistent Storage is unavailable
Sometimes, the Persistent folder is missing and all the data of the Persistent Storage is unavailable.
Most likely this means that the persistence.conf file has disappeared. However, the files in the Persistent folder and all the other data in the Persistent Storage should still exist.
If you encounter this problem:

Unlock the Persistent Storage in the Welcome Screen when starting Tails.
Choose Applications ▸ Tails ▸ Configure persistent volume.
If you are asked to enter a passphrase, enter the same passphrase that you use to unlock your Persistent Storage.
Turn on the features of the Persistent Storage that you had turned on previously.
Click Save, then restart Tails.

Your Persistent folder and all the data of the Persistent Storage should be restored.
If the above instructions do not fix the problem, you might need to fix the ownership of TailsData_unlocked.
To fix the ownership of TailsData_unlocked, set an administration password and execute the following command in a terminal:
sudo chown root:root /live/persistence/TailsData_unlocked`

Answer: Had a similiar issue today after unexpected shutdown during boot (after persistent storage was already unlocked). Tried the sudo chown but it didn't work. Luckily I had a cloned version on another USB-Stick from where I could still access the files when inserted the original stick as a regular USB while running the clone. I than updated the original from the clone than > configure persistent storage > turned off/on personal storage > save. Folder showed up again.

Tails manual upgrade persistence lost


ASP.NET MVC 3 Rendering a view "polymorphically" using DisplayFor(TBase o)-like syntax

Question: Using ASP.NET MVC 3 I would like to render different "templates" (i.e. partial views or whatever you want to call them) to my views based upon the type of the view model (or a property on the view model) supplied at runtime.
I understand the out-of-the-box ASP.NET MVC functionality enables the addition of a UIHint attribute to a property or field on the viewmodel supplied to the view, but as far as I can tell this doesn't meet my needs as I won't know the template required until runtime.
AFAICT ASP.NET doesn't support generic viewmodels of type T either, so my idea is to take the ASP.NET MVC3 source code and write my own DisplayFor method that accepts a viewmodel instance (specified by it's  abstract base type in the view), which resolves the actual type at runtime and uses this to find the template name by convention.
Does this sound feasible/worthwhile?

The view would look thus (note specification of base type, a concrete instance would be supplied at runtime):
<code>@model MyViewModelBase

@{ DisplayFor(Model); }
</code>
Viewmodel:
<code>public class MyMagicalViewModel : MyViewModelBase {}
</code>
Invocation of this view would look thus:
<code>...
return View("MyView", MyMagicalViewModel);
...
</code>
...and this would return html corresponding to the MyMagicalViewModelPartialView.cshtml
Answer: Have you looked into Html.EditorFor?


How can I observe my own actions via terminal

Question: To understand Linux better I want to see which commands run in background. For example when I create new file via GUI, is there any way to see the which command runs in terminal?
Answer: If you create something via a GUI, normally the only command that runs is the GUI, it doesn't call other commands that you would invoke from the commandline.
E.g. if the GUI is used to create a directory, it calls the C function mkdir(), not the command mkdir that you would use on the commandline (mkdir uses mkdir() as well and they both rely on a system call to actually create the directory on the filesystem).
You could try to run your GUI under strace to see what system calls it makes , but you have to make sure it stays in the foreground.
Comment: This isn't usually true.