What is the sense of μέτρου at John 3:34?

Question: According to John 3:34 how are we to understand μέτρου when describing Gods gift of spirit?
Comment: This is an interesting question in that it suggests that PNEUMA is a commodity of sorts, doesn't it? I mean, it suggests that more is better which might make some unsettled. +1
Comment: Context is key.  The discussion in John. 3:34 was the unlimited or fullness of the Spirit given to Christ, the Son of God.  "for God giveth not the Spirit by measure unto him."  As opposed to the measure or portion poured out to the newly baptized on the day of Pentecost in Acts c. 2, Christ received the fullness of the Spirit.
Comment: @Ruminator - good comment - but the whole thrust of the comment is that the Spirit is given without measure.
Comment: So, are you saying that we are either mature, or immature? That there is nothing in between? No spiritual childhood and/or teenage years? No desert walk, or fight to conquer our spiritual promised land?
Comment: Or, are you saying that all our growing is to be equated with a potter's making of a clay vessel. That the cup needs to be shaped and dried before the Spirit can be poured in?
Answer: "metron" (BDAG gives "the result of measuring", ie, measure) in John 3:34 is modified by the negative "ou".  Because this word here is genitive, the literal meaning is "not by measure", that is, not limited, as much as needed, without limit.
Thus, the sense of the phrase means that God gives the Spirit without limit, that is, not measured (or metered) out.  Thus we have:

NIV: for God gives the Spirit without limit.
ESV: God, for he gives the Spirit without measure.
NASB: God; for He gives the Spirit without measure.
CSB: since he gives the Spirit without measure.
ISV: because God does not give the Spirit in limited measure to him.
KJV2000: for he giveth not the Spirit by measure.
YLT: for not by measure doth God give the Spirit;

It is interesting that other passages also discuss metering out the Spirit in some sense such as:

2 Kings 2:9 where Elisha requests a double portion of the spirit of Elijah
1 Cor 12:4 discusses the Spirit dividing  to every man severally as He will

Thus, the sense in John 3:34 is the Spirit arriving with fullness.  This is contradistinction to John 7:39 about the Spirit not yet being [fully] given and the promise in John 16:13 about the Spirit teaching about Jesus.  Compare Act 1:2, 4, 8, and Acts :1-4 for the fulfilment of Jesus prophecy about the giving of the Spirit without limit/measure.
Answer: Short Answer
The short answer is that I read this passage as saying that God does not "dole out" his wisdom to him but rather has deposited within him ALL of his treasures of wisdom and knowledge.
Who is the subject and who is the object?
The question is related to the "sense" (IE: of the meaning, the nuance) of "οὐ γὰρ ἐκ μέτρου" in John 3:34:

ΚΑΤΑ ΙΩΑΝΝΗΝ 3:34 SBL Greek New Testament (SBLGNT)
  34 ὃν γὰρ ἀπέστειλεν ὁ θεὸς τὰ ῥήματα τοῦ θεοῦ λαλεῖ, οὐ γὰρ ἐκ μέτρου [a]δίδωσιν τὸ πνεῦμα.
Footnotes:
  ΚΑΤΑ ΙΩΑΝΝΗΝ 3:34 δίδωσιν WH NIV ] + ὁ θεὸς Treg RP
  SBL Greek New Testament (SBLGNT)
  Scripture quotations marked SBLGNT are from the The Greek New Testament: SBL Edition. Copyright © 2010 by Society of Biblical Literature and Logos Bible Software

According to the footnote some versions have ὁ θεὸς in the text indicating that it is God that does not give the spirit, not Jesus. This indicates to me that either:

"God does not give" was original but "God" was dropped somewhere along the line
Or, "he does not give" was original but "God" was added to make it clearer that it is God that does not give

In addition the words "to him" do not appear in the Greek so it is ambiguous again if it is God who gives to Christ or Christ who gives to those who believe.
However, by understanding the import of the passage it becomes clear that it is God [IE: God is the subject] who does not give "the Spirit" out of a measuring device to Christ.
The meaning of the phrase
BDAG comments on this passage:

...οὐκ ἐκ μέτρου J 3:34, an expr. not found elsewh. in the Gk. language, must mean in its context not from a measure, without (using a) measure (the opp. is ἐν μέτρῳ Ezk 4:11, 16; Jdth 7:21)
Arndt, W., Danker, F. W., Bauer, W., & Gingrich, F. W. (2000). A Greek-English lexicon of the New Testament and other early Christian literature (3rd ed., p. 644). Chicago: University of Chicago Press.

It literally says, basically "out of a measuring cup". Since this construct is not seen elsewhere it is not possible to say from the literature whether or not this would have been a recognized idiomatic usage, or if it might mean "some of". However, in the context, it is to me an obvious metaphor for "not doling". In other words, John is testifying that what Jesus says are God's words because God doesn't just dole information out to him on an as-needed basis. Rather, God has deposited within Christ all of the treasures of his wisdom and knowledge. In fact, he not only deposited them there but he concealed them in there so that the only way one can gain these treasures is through Christ:

Col 2:2-3 KJV - 2 That their hearts might be comforted, being knit together in love, and unto all riches of the full assurance of understanding, to the acknowledgement of the mystery of God, and of the Father, and of Christ; 3 In whom are hid all the treasures of wisdom and knowledge.
Col 1:19 KJV - 19 For it pleased the Father that in him should all fulness dwell;

The aspect of "give"
It is very tempting to overlook the significance of the present aspect of "give". Is it:

present: "God currently doesn't give the spirit from a cup..."
gnomic: "God never gives the spirit from a cup..."
continuous: "God does not continuously give the spirit from a cup..."

Notice that it does not say that "God did not give him the Spirit out of a cup" but that he "does not" (now, and ongoing) do so.
Examples of what I mean are:

Fort Knox vs an ATM
A well "springing up" from inside you vs a well in the ground where you have to draw it over and over

IE: Jesus had become God's "Fort Knox", and did not make him receive his "water" from a well in the ground.
Recap
John is saying that whenever Jesus speaks it is God's words because God has embodied in Jesus all the treasures of his wisdom and knowledge. When Jesus needs to deal with a situation he doesn't go ask his Father because his Father (God) has already infused him with a spirit of wisdom and knowledge and thus all of the treasures. If you want to know anything about God, ask Jesus because he has all the answers and no one else does (except of course God who gave him the knowledge).
Update
The passage is extremely important because it specifically describes the relationship between God, Jesus and the Holy Spirit:

God gives the spirit
the spirit gives Jesus God's treasures of wisdom
so when Jesus speaks it is for all intents and purposes the same as God speaking because Jesus only speaks what he has learned from listening to God:

Jhn 15:15 NIV - 15 I no longer call you servants, because a servant does not know his master's business. Instead, I have called you friends, for everything that I learned from my Father I have made known to you.

Hence his sheep recognize his Father's "voice".
Jesus is God's means of communication (John 1, Hebrews 1:1-3).
Update 2
Just to be clear, I don't intend to suggest that God's brain and Jesus' brain are identical. God knows things that he has NOT deposited with Christ. As an example:

Mar 13:32 KJV - 32 But of that day and that hour knoweth no man, no, not the angels which are in heaven, neither the Son, but the Father.

But everything that the believer needs to know is revealed to Christ and through Christ. Obviously, Jesus did not even know if his return was to be in the summer or winter since he encourages prayer that it NOT be in winter.
We also have the example of the Revelation that God gave to Jesus so that he would give it the saints. Perhaps we are to understand that in that Revelation the details of the time and manner of his arrival were given.
But that Jesus is limited in what he says to only that which his God and Father has taught him:

John 8:28 KJV - 28 Then said Jesus unto them, When ye have lifted up the Son of man, then shall ye know that I am he, and that I do nothing of myself; but as my Father hath taught me, I speak these things.

In this way he provides a good example of what he expects of the believer:

Num 24:13 KJV - 13 If Balak would give me his house full of silver and gold, I cannot go beyond the commandment of the LORD, to do either good or bad of mine own mind; but what the LORD saith, that will I speak?
Luk 10:26 KJV - 26  He said unto him, What is written in the law? how readest thou?
Isa 8:20 KJV - 20 To the law and to the testimony: if they speak not according to this word, it is because there is no light in them.

I should also point out that I read "he did not give Jesus the spirit by measure" is referring by implication to wisdom. IE: That to give one "the spirit" implies, I think that he is to be understood to be imparting revelation because the spirit is the "organ" and/or "medium" by which communication is made (IE: "breath").
Comment: Context seems to be important in this usage. Considering the comment in Jo 3;8, although not in context as to time, could vs 34 shed light on or perhaps clarify vs8?  ps, not sure if this is within the scope of this site, if not, please advise.  ty
Comment: It appears to be a visual allusion to Ecclesiastes 11:5!: Ecc 11:5 KJV - 5 As thou knowest not what is the way of the spirit, nor how the bones do grow in the womb of her that is with child: even so thou knowest not the works of God who maketh all.


Can all neurons fire at the same time?

Question: I'm trying to find a paper that states otherwise -- that we can't have all neurons fire simultaneously, but all I can find is Quora questions (like this) which mentions that if all neurons will fire together we will have a seizure.
Comment: What does "simultaneously" mean? What's the purpose of the question/what will it help you accomplish or understand?
Comment: "simultaneously" means at the same time. I assume that all neurons are being used in general at some point, but my question is, can there be a given time when they are all active at the same time.  The link I shared from Quora states that there isn't such time, as this will result in a seizure. I'm trying to find a publishable paper that states the same (or the opposite).
Comment: But why does it matter if they can or not? In principle, nothing prevents it, but also it would just never happen, so I don't see any purpose in asking the question.
Comment: If they don't it raises some interesting ideas from a computational side. I'm writing a paper and need to ensure that the ideas are based on a real phenomena (and not an assumption). But I do understand your reasoning and appreciate the help on this!
Comment: Why does it raise interesting ideas from a computational side? Imagine, if neurons are firing at 100Hz (very fast, unusually fast for neurons, but it'll help us get to simultaneity), and you consider firing within a 1 ms window to be simultaneous (which isn't actually simultaneous, which is why I asked "what does simultaneously mean?"), the chance of all N neurons firing at the same time is equal to 1/0.1^N - you'll see that once you have a few neurons, this chance is very small, let alone 10s of billions. Nothing interesting there, just simple probability.
Answer: Note: this answer is imprecise; read its comments below.
"...based on the Hodgkin–Huxley model calculates by the method of ion counting and power integration that an action potential consumes 2.468 × 10−7 J of biological energy produced by the hydrolysis of Adenosine triphosphate (ATP)..." (ref. https://link.springer.com/article/10.1007/s11571-018-9503-3)
Supposing we have 100 billion neurons in the brain, the total energy consumed would be:
1E11 * 2.468E-7 J = 2.468E4 J
So 24KJ to generate a single action potential for each neuron of the brain.
To lift an apple 1 meter requires roughly 1 J. So the energy needed to make each single neuron fire once would be enough to lift 24 thousand apples 1 meter, all at the same time.
So that is why it is impossible: the brain would catch fire. An we would starve.
Comment: Lastly, the HH model is based on the giant squid; humans don't have giant squid neurons, we have human neurons, and mammalian neurons have some very important modifications like voltage-gated potassium channels that greatly minimize the metabolic costs of single action potentials by limiting the counter-currents during the rising phase of the action potential.
Comment: Few things wrong with this answer... First of all, action potentials are almost entirely passive. They are powered by pre-existing electrical gradients; yes, it takes energy to maintain those gradients over the long run, but this maintenance occurs over seconds to minutes; the precise timing of a spike doesn't matter. Further, all neurons of the brain are spiking all the time, some might be as slow as 1 Hz but others as fast as 100 Hz. There's no additional energy expenditure for every neuron of the brain to fire at once within, say, a second, versus firing at once within, say, 1 ms.
Comment: This paper https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4189373/ references another that estimates 0.66 J released per minute per gram of brain tissue. Most metabolic activity in the brain is synaptic currents rather than action potentials - action potentials are inexpensive energetically: what's metabolically expensive is when lots of ions move across membranes. Very few ions need to move for an AP; lots of ions move when you have competing excitatory and inhibitory conductances. I don't know what the ratio is or what you'd estimate a single spike to cost, though.
Comment: @BryanKrause - Thank you for your constructive comments, and I would like to read a correct answer from you. From what you wrote, each neuron still needs/dissipates some amount of energy when firing (either during the spike process of before that). How much is that?

Can all neurons fire at the same time?


Stackoverflow is becoming less and less noob friendly nowadays

Question: Stack overflow is not the same what it used to be one year before. Experience is very bad for noobs. Moderators are rigid. Recently, they closed one of my question on assembly. They gave me two links to show that my question is duplicate. I can just laugh on those links. first one is about the assembler to use. I commented that I can't use MASM but that hardly makes any difference to them. They just want to close the question as soon as possible.
The final comment is best. Where the mod wrote "There are emulators out there such as SPIMS for MIPS.". But can anybody tell me how a noob can know there are emulators for assembly? He could have put that for answer.
The first comment is also great, "Which book is best is completely subjective". but I never asked for the best book. I just want a book for 64 bit assembly. I think they assume lots of thing in their mind. nowadays I hardly visits stack overflow for these reasons. This site is not for noobs anymore.
Comment: it's closer to 4k questions/day -- see http://stackexchange.com/sites?expand=true
Comment: "terribly easy to Google.". No brother. It is not terribly easy. There are assemblers for 64 bit. But hardly anyone one of them can be used by a new user. I googled and found that FASM can be used for this. But I did not get any noob friendly tutorials for FASM. and if google the answer can be an answer, 90% questions in SO can be closed.
Comment: I understand, but consider that Stack Overflow gets 3000 new questions a day. If a question doesn't stick to the site's basic rules, there will be very little willingness to help the asker out. Paul's first suggestion sounds like a good way to do this to me
Comment: I'm not familiar with the field but I tend to agree somewhat. The question *was* very broad, but it does show a scenario that isn't answered in either of the dupes ... *if* 64 bit requires a special kind of assembler, which I don't know
Comment: ... on the other hand (as shown by @Paul below) this information is terribly, terribly easy to Google.
Comment: @Eat : The question may be very broad. But I got surprised by their eagerness to close the question instead of providing solution. First he lold that my question is subjective. When I answered for that. He gave me another reason that the question is duplicate. The mod himself is unable to find a link which has answered my question.
Comment: I can't get who is Paul here?
Comment: I mean the Paul who answered your question below.
Answer: See
https://stackoverflow.com/questions/how-to-ask
first of all.
This is the entire text of your question:

I want to learn assembly language programming. I have a 64 bit pc with windows 7. Which book and assembler I should use for this purpose?

How much research effort did you put into your question? And how much of that research effort did you demonstrate and share in the question itself?
(do note that the first link is a mandatory clickthrough page for all new users when they ask questions, as well...)
You want effort from us? You put effort into your questions first, or with all due respect, take it elsewhere.
Comment: @Michael: SO is **not** _yet another internet forum_.
Comment: @nara the best way to not waste your time and *ours* is for you to put some research effort into your questions. In the time it took you to type that "question" into Stack Overflow **you could have found the answer for yourself already**.
Comment: ... especially if you factor in the time spent on asking *this* question here!
Comment: we don't want lazy askers, is what we don't want. You have to give to get. Meet us halfway. Heck meet us a quarter of the friggin' way.
Comment: THe whole idea of internet forums is that some one has a question, they have the answer.
He never asked anyone to research the bloody thing, he was hoping that some one new off the top his head.

Now this all works nicely because in the futur, some one may google a similar question, and guess what! THe answer will be on stackoverflow!!
Yay for all!

But then you get the cronies around here, who don't want discusion, vague posts.. or heck any info at all!
Comment: @Jeff Atwood : "take it elsewhere". Yes this is the best suggestion. I should have googled the answer instead of wasting my time at SO. But you should calculate first what requires more effort? Giving wrong reasons and closing the question or just waiting for someone with senses to answer the question.
Answer: Your question was rightly closed as not constructive. It wasn't closed because it had a duplicate. It was the kind of question that shows no research effort, and can receive opinions for answers rather than fact. It would have been much better if you had searched the internet for some information on "64 bit Windows assembler" you'll be headed in the right direction. Then if you're torn in between two, ask something like:

What are the pros and cons of these two assemblers?

Which will be more likely to receive facts as answers than asking a question in the form of:

Which of these two assemblers is better?

or:

Which assembler should I use?

Which will both likely be answered by people's opinions.
Comment: -1 can't agree with any of your three proposed questions. Without very specific details, they all three are completely subjective.
Comment: All the three suggestions will be closed within 5 minutes.
Comment: @Mat I don't think you read my post right. I didn't propose 3 questions, I showed two examples of questions that are like his, and one suggestion of a question that will get facts as answers. Obviously none od those one-liners were meant to be stand-alone either. They are examples.
Comment: +1 fair enough - this is indeed easy enough to Google.
Comment: Even your preferred format will still get people's opinions.
Comment: @Paul: I still disagree. "Pros and Cons" / "Does and Donts" / "Better / Worse" all require a _lot_ of context not to be subjective in general, so much so that they are near impossible to get right for SO.  They also fall rapidly into "list of stuff" type questions with N different answers, none objectively correct or incorrect.
Comment: @Mat Alright. I see that too, but I think people can generally make a list of pros and cons and keep it subjective. For example look at the list of advantages and disadvantages on YASM's wikipedia page: http://en.wikipedia.org/wiki/Yasm


Process Builder and Flows

Question: I have a custom field which has a lookup to contact. How do i extract the Id of the lookup and pass it on in a flow using a process builder ?
Answer: You can create a variable in your flow as input only. Lets say AccountId. In your process builder when you select action as Execute Flow and choose the invokable flow with no screens elements, this variable will be available in your process builder to assign and you can assign this value using a reference value type.

Process Builder and Flows


SecTrustSetAnchorCertificates with client certificate

Question: I am developing iOS Application. We have custom certificate authority with self-signed ca-cert. Certification authority issues certificates both for users and for https server too. I would like to create iOS application which can authenticate https server using ca certificate and also can communicate to https server using client certificate. I already have the code for communicating with https server using client certificate, but I need to have ca-certificate imported to system keyring. I would like to have ca certificate hard-coded into application. My code looks like this:
<code>- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace {

    bool result=NO;
    if ([protectionSpace authenticationMethod] == NSURLAuthenticationMethodServerTrust) {
        result= YES;
    } else if([protectionSpace authenticationMethod] ==     NSURLAuthenticationMethodClientCertificate) {
        result = YES;
    }
    return result;
}

- (BOOL)shouldTrustProtectionSpace:(NSURLProtectionSpace *)protectionSpace {
    CFDataRef certDataRef = (__bridge_retained CFDataRef)self.rootCertData;
    SecCertificateRef cert = SecCertificateCreateWithData(NULL, certDataRef);

    SecTrustRef serverTrust = protectionSpace.serverTrust;

    CFArrayRef certArrayRef = CFArrayCreate(NULL, (void *)&cert, 1, NULL);
    SecTrustSetAnchorCertificates(serverTrust, certArrayRef);

    SecTrustResultType trustResult;
    SecTrustEvaluate(serverTrust, &trustResult);

    return  trustResult == kSecTrustResultUnspecified;
}

- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {

    NSLog(@"Did receive auth challange %@",[challenge debugDescription]);

    NSURLProtectionSpace *protectionSpace = [challenge protectionSpace];

    NSString *authMethod = [protectionSpace authenticationMethod];
    if(authMethod == NSURLAuthenticationMethodServerTrust ) {
        NSLog(@"Verifying The Trust");

        NSURLCredential* cred=[NSURLCredential credentialForTrust:[protectionSpace serverTrust]];
        if ([self shouldTrustProtectionSpace:challenge.protectionSpace]) {
            [[challenge sender] useCredential:cred forAuthenticationChallenge:challenge];
            NSLog(@"OK");
        } else {
            NSLog(@"FAILED");
            [challenge.sender performDefaultHandlingForAuthenticationChallenge:challenge];
        }

    }
    if(authMethod == NSURLAuthenticationMethodClientCertificate ) {
        NSLog(@"Trying Certificate");
        .....
</code>
Everything works like a charm, until server does not require client certificate. At this moment I will receive error The certificate for this server is invalid and execution will never reach point
<code> NSLog(@"Trying Certificate");
</code>
When I have .der ca-cert loaded into system keyring, everything works, even client certificate is sent to server, and server can recognize user. I thing that
<code>SecTrustSetAnchorCertificates(serverTrust, certArrayRef);
</code>
affects somehow trust, cause when I skip this call, I can simply do:
<code>[[challenge sender] useCredential:cred forAuthenticationChallenge:challenge];
</code>
without any error, but I'm not able to verify certificate in this case.
What am I doing wrong?
Big thanks,
Adam
Answer: Have a look at this code
https://github.com/dirkx/Security-Pinning-by-CA
which does both by fairly carefully keeping the two trust blocks separate (which you seem to be mixing).


LRU Cache design in C with of limited size

Question: I'm now working on a software in mobile platform where memory is very small. In a I/O bottleneck function, I need read some bytes from a img file using seek operation(You can assume that seek is slower about 10 times than read directly from memmry). In my test, this function is called 7480325 times and read bytes from bytes_offset 6800 to 130000, so every byte is read 100 times on average(some bytes are read 3~4 times, some more than 1000 times).
Below is my statistics.
<code>bytes offset 6800 ~ 6900: 170884 times
bytes offset 6900 ~ 7000: 220944 times
bytes offset 7000 ~ 7100: 24216 times
bytes offset 7100 ~ 7200: 9576 times
bytes offset 7200 ~ 7300: 14813 times
bytes offset 7300 ~ 7400: 22109 times
bytes offset 7400 ~ 7500: 19748 times
bytes offset 7500 ~ 7600: 43110 times
bytes offset 7600 ~ 7700: 157976 times
...
bytes offset 121200 ~ 121300: 1514 times
bytes offset 121300 ~ 121400: 802 times
bytes offset 121400 ~ 121500: 606 times
bytes offset 121500 ~ 121600: 444 times
bytes offset 121600 ~ 121700: 398 times

max_bytes_offset 121703
min_bytes_offset 6848
</code>
Then I want to build a cache using LRU schema to make the I/O performance better. In some others' question, I find hashtable + doubly-linked list is a good way. But how to make a structure to improve my issue in the best way? I plan to build 1300 buckets, and every bucket own a doubly-linked list with max size 10. Then total memory it takes is about 13KB. It is simple to implemented and maintain, but I think the efficiency is not the best.
In my statistics, some bytes offset interval have more hits ratio while some interval have less. How can I build a structure to adapt my statistics?
And when I search for a key, I need traversal the whole list with size 10. Is there any other method with higher efficiency in searching?
In some mobile platform more memory can be used for cache while other platform allows less. How can I make my cache to adapt the allowed memory changes, except changing the size of buckets?
It seems that caf's method is better. Using a big doubly-linked list and a big hash table mapping keys to node entries makes more sense and takes more advantage of LRU. But designing hash function is becoming a hard problem.
I'm waiting for your suggestion, thank you~
Comment: Is there an expected locality-of-reference bias? Any statistics on that?
Comment: You mean the relationship between two read bytes? You can assume that there is no relation between them because the img file store some tree structure.
Comment: I made a mistake-_-. There is an expected locality-of-reference, I'm studying its statistics
Answer: If you're only going to have a maximum of 10 entries in each bucket, then you will likely be better off dispensing with the doubly-linked list and just making each bucket a circular array (which is just 10 entries and a "top of list" index).
You may well even be better off discarding the 10-way set associative design and going with a direct-mapped cache (where you have a larger hash table, with each bucket storing only one entry).  Set associative designs are good in hardware, where you can use dedicated hardware to do the n-way comparisons in parallel, but not so much in software (unless you have a vector unit you can leverage for this).
One way to adapt to your statistics is to design your hash function so that it maps a different size address range onto each bucket, such that each bucket gets a roughly equal frequency of access.
Changing the size of the hash table is the other obvious way of scaling the size of the cache.
Comment: You mean using a hashtable to indicate the elements in the doubly-linked list? It sounds a good method but not easy to design my hash function. I'll try. And I can only implement the cache in software:-(


How to connect laptop as monitor to RPi Zero

Question: I have a non-WiFi RPi Zero and no monitor, but I have a laptop. I saw on YouTube only for WiFi versions. Are there methods to connect it to laptop for that?
Comment: Welcome -- I removed the "cheap displays" bit because shopping requests are explicitly [off-topic](http://raspberrypi.stackexchange.com/help/on-topic)  here.  Also, the Pi Zero has a (mini-) HDMI output.  With a mini-HDMI to HDMI adapter you can plug it into any HDMI display, and you can hunt for cheap HDMI displays easily yourself.  The adapters  are < $5 and also easy to find.  Beware there is a *micro* HDMI that is not the same!
Comment: Also beware *you cannot connect it to your laptop* via the HDMI jack, because your laptop's HDMI jack (if it has one) is an output, not an input.
Comment: If you add a network adaptor, then there a several protocols to do it over the network.
Comment: Yeah! Good! So I will search for very very cheap display. So... Write this answer!
Comment: If you did buy a cheap display, can you tell us which one?
Answer:
How to connect laptop as monitor to RPi Zero

You can't, unless you have an unusual laptop.  You cannot connect a normal laptop as a monitor to anything, because a normal laptop only has video outputs, not inputs.
Note that the Pi Zero has a (mini-) HDMI output. With a mini-HDMI to HDMI adapter cable you can plug it into any HDMI display. The adapter cables are < $5 and should be easy to find.
Beware there is a micro HDMI that is not the same!
You could connect it to the laptop using a USB ethernet adapter and a cable, but if you are going to do that you might as well get a wifi adapter.
Answer: The RPi Zero is slightly different from the other pis in that it doesn't have a Display Serial Interface. So when choosing a screen you need to make sure that those are not required for the monitor you choose.
https://www.sainsmart.com/products/3-2-tft-lcd-touch-screen-with-sd-slot is a good example of one that could work. It uses SPI and some GPIO pins though, so you may need to solder the headers onto the board.
Also, if you do choose to go with this screen, this link has some info on setup:
https://www.element14.com/community/message/136013/l/re-sainsmart-lcd-tft-pi-32#136013
Answer:
HDMI to USB capture converter.

There is "video capture devices" that captures the HDMI signal and give you a video stream in your laptop. They are some times also called "Video recorders"
Use a search engine and search for "HDMI usb converter capture"

VNC.

If you have VNC server running on the Raspberry Pi Zero and a VNC client on your Laptop, then you can remotely control the Raspberry Pi over IP/WiFi from your laptop.


Does it ever make sense NOT to condense one to one relationships?

Question: If we have Table A that has a one to one relationship with Table B, does it ever make sense to keep them apart? Or does it never hurt to combine them into a single table? Do either of these scenarios (two tables vs one combined table) impact anything with respect to its normal form (1NF, 2NF, 3NF, etc)?
Comment: Do you mean 1-to-1 or 1-to-0-or-1?
Answer: Yes, there are tons of reasons why this may be the better design.
You may have an inheritence/extension relationship, e.g. you might have a User table and then an Administrator table which has more fields.  Both tables may have a primary key of User ID (and therefore have a 1:1 relationship) but not all users will have a record in the Administrator table.  You would need something similar if you are supporting a workflow, e.g. a ScheduledTask table and CompletedTask table.
You may want to have a lightweight table for commonly-used data User and then a larger table for details you don't need very often UserDetails.  This can improve performance because you'll be able to fit more records into a single data page.
You may want different permissions to the tables, e.g. User and UserCredentials
You may want different backup strategies and therefore put two tables on different partitions, e.g. Transaction and TransactionArchive
You may need more columns than can be supported in a single table, e.g. if there are a lot of large text columns that you need to be able to index and your DB platform is limited to 4K data pages or whathaveyou.
Comment: [Link](https://www.techopedia.com/definition/25123/one-to-one-relationship) "A one-to-one relationship in a relational database occurs when one parent record or field has **either zero or one** child record only."
Comment: Agreed... I'm trying for an exhaustive list, not editorializing on each reason.
Comment: Physical = having to do with physical constraints such as server performance, page size, indexing, clustering, backups, etc. none of which should affect the logical design.  From a purely logical perspective, a single entity should be conceptualized as a single tuple or row within a single table.
Comment: Wait... "one-to-one" does not mean "one-to-one?"  I'm agape.
Comment: If your table has more columns than can be supported by the database system, you have a design problem.  But otherwise, your answer is sound.
Comment: What is your background in workflows?  Do you have specific software you use?  Have you rolled your own workflow system?
Comment: Does any of this impact the normalization of the tables?
Comment: @The29thSaltshaker: http://dba.stackexchange.com/q/15403/920
Comment: Normalization is a logical design concern, the reasons I have listed pretty much have to do with physical design.
Comment: Wait, what?  Normalization is not a *physical* design concern?  (assuming, by "physical design concern" you mean the way the tables are designed and arranged)
Comment: Several of these are not 1-to-1 relationships. They're 1-to-0-or-1 relationships.
Comment: @WayneConrad: I guess "one-to-one" is just a more handy term than "one-to-zero-or-one" relationship. And to my experience, real "exactly-one-to-exactly-one" relationships are much rarer than the former.
Comment: Another reason for separating columns would be to separate columns that have a high update rate from tombstone data that is rarely updated.  These would be in 1:1 relationship  1:0-1 realationships are common for records with sub-types.
Answer: Adding to the excelent answer by @john-wu another, another reason is when you have A BLOB type of column like a picture.
You want to have that BLOB column in a separate table, not only for queries on the user table be quicker but also because you could move the table containing the blob to a different tablespace on cheaper, slower storage, keeping the most queried data in the main tablespace on a faster storage.
Answer: One to one relationships only really make sense when you want the related record in Table B to be optional.
Sometimes what you want is a variant record or Tagged Union.  That means you have multiple tables containing different information, but all relating back to Table A in one-to-one relationships.  You then choose which table to associate based on a field in Table A
For example:
type Transaction(The_Type: PaymentType := Cash) is record

    Amount: Integer;

    case The_Type is
        when Cash =>
            Discount: boolean;
        when Check =>
            CheckNumber: Positive;
        when Credit =>
            CardNumber: String(1..5);
            Expiration: String(1..5);
    end case;
end record;

Comment: If it's optional how is this different from it all being in one table and just selecting the columns you want?
Comment: You take the cost of having those additional fields in the main table, even if there's nothing in them.  If there are several tables in your variant record, you might have 100 columns in a single table, most of which aren't used most of the time.
Answer: In business modeling, two entities A and B which logically are separate from a business point of view typically map to different tables.
For example, when doing business modeling with object oriented means, you typically have some kind of object-relational mapping in place. You might start with an object model and derive your relational model from that. So imagine in your object model you have created classes A and B, which, though the objects have a 1:1 correspondence, should stay separated because of the single responsibility principle. Note in your object model, these classes are not just tables with attributes, they might represent business objects, with some behaviour implemented in methods. And when you map those classes now straightforward to a relational model, you get separate tables A and B with 1:1 relationship.
To my experience, when creating a business or OO data model, this logical separation is far more more typical for 1:1 relationships than "physical" reasons like performance, individual security or partitioning.
Comment: Can you give a concrete example of what you mean?


Will 98 inch * 24 inch * 1.5 inch solid birch desk sag if it's only supported by two Ikea alex drawers on each end?

Question: Deciding if I need to add a support beam in the middle or if it will be fine on its own.
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comment: How much weight is this thing being loaded with?
Comment: @whatsisname I implied that when I said it would bend if I sat on it. The magic comment deleter passed by.
Answer: According to Ikea, an Alex drawer bank cabinet is slightly over 14 inches wide. So 28 inches of the 96-inch desktop will be supported, leaving a 68-inch span open between the Alexes.
According to a shelf sag calculator website, https://woodbin.com/calcs/sagulator/, entering a 68-inch span of 24-inch-wide and 1-1/2-inch-thick birch, then entering a weight on the middle of the 'shelf' yields:
no weight, no sag
40 pounds in the middle, 1/8" sag
100 pounds in the middle, 1/4" sag
So how much sag depends on what gets put on the desk and where. If you don't plan to load the desk with more than a monitor, keyboard, mouse and elbows, there will be almost no visible sag.
An Alex is 27 1/2 inches tall, so there is room for an edge along the front and back of  the desktop to stiffen the desktop if desired and still have 24-25 inches of vertical knee space. A 2 inch by 3/4 inch strip of suitable wood on edge attached as a facia on front and back will considerably stiffen against visible sagging. Even strips of 1 or 1-1/2 inch L-angle aluminum will help against visible sag.
Unless you're planning this desk to hold a lawyer's worth of law books, you should not need a separate center support.
Answer: If the desk sags more than you'd like when loaded, you could turn it over every so often (e.g., once or rwice a year). That would also equalize exposure of both sides to light so as to even out fading effects.
Answer: Does is already have a natural bow in one direction? If it does, you could put the crown side up and call it a day. Otherwise, I think I would put a small beam on the side opposite the one where you sit or stand.
Answer: I would definitely add reinforcement.  8 feet is a long clear span...it's almost guaranteed to sag over time, even with modest loads.


Is there a way to create 9995000 spendable BTC on regtest?

Question: I'm doing to a large stress test on 1000 node network where each node sends transactions to one another at a specific rate, and I need a way to create the funds for running it, enough so that each transaction is above the dust limit. I need a way to generate 9995000 spendable bitcoins to distribute to each address. At some point, 120 transactions will be sent per second on the network, which is why a lot of bitcoins are needed. Is there a way to get these many bitcoins to each node, which has its own address (~9800 BTC for each node, which each has one receiving address) without generating a lot of blocks and changing the subsidy variables in the source code? I'm unfamiliar with Core/bitcoind's codebase, and I might break something. Any simple solution would be appreciated.
Answer: This is not possible because the regtest network is limited to 15000 regtest BTC. Unlike mainnet and testnet, it's halving interval is 150 blocks which limits the number of regtest BTC on one chain to 15000 (actually just under that).
On regtest, you don't actually need to make outputs which reach the dust threshold. The default behavior is to allow non-standard transactions be relayed and mined on regtest and testnet. So you can just make outputs as small as you want and they should still be relayed and mineable. Furthermore, Bitcoin can actually have 0 value outputs, so you can make transactions which don't even send money, thereby removing the need to get any significant amount of regtest Bitcoin.
If for some reason regtest transactions are being rejected for being below the dust threshold, you can lower the dust threshold by using the -dustrelayfee=<amt> option. With this, you set the feerate that the dust threshold is calculated at. Since it is in BTC/kB, you can set it to be 1 satoshi per kB with -dustrelayfee=0.00000001, which is 0.0001 satoshis per byte. This should reduce the dust threshold to less than 1 satoshi allowing you to have outputs that are 1 satoshi.
Comment: I did not know about the "dustrelayfee" option, thank you!
Comment: why does the halving interval dictate the amount of BTC created, shouldn't the reward half for the next 150 blocks then?
Comment: @Alberts It is a combination of the initial block reward amount and the halving interval that determines the total amount for the chain. Since the initial block reward is the same for regtest, testnet, and mainnet, the halving interval is what ends up controlling the total supply. If the halving interval is larger, then more blocks with each reward value will be created, thus increasing the total amount. If it is smaller, then fewer blocks at each reward value will be created, thus decreasing the total amount.


MySQL Master-Slave Replication Cross Database

Question: I am setting up Replication for cross Database as i have set 2 variables in Slave' s my.cnf as replicate-do-db=database_name and
Replicate-wild-do-table=database_name.% ,But i am not able to get cross Database updates from master to slave . Please Help me to resolve the issue.
Comment: This might help: http://forums.mysql.com/read.php?26,171776,205870#msg-205870
Answer: I addressed something like back on June 14, 2012 : Configured MySQL replication but its not working
The basic problem may be the queries you are using
If you have a query that looks like this
INSERT INTO db1.tb SELECT * FROM db2.tb;

You could be potentially blocking queries of this nature
Queries like this:
USE db1
INSERT INTO tb SELECT * FROM db2.tb;

should work if you have replicate-do-db=db1 and Replicate-wild-do-table=db.%
To be sure, check out the replication filtering rules to make sure your queries are allowing your current settings to work on the Slave.
According to the replication filtering rules

To make it easier to determine what effect an option set will have, it
is recommended that you avoid mixing "do" and "ignore" options, or
wildcard and nonwildcard options. An example of the latter that may
have unintended effects is the use of --replicate-do-db and
--replicate-wild-do-table together, where --replicate-wild-do-table uses a pattern for the database name that matches the name given for
--replicate-do-db. Suppose a replication slave is started with --replicate-do-db=dbx --replicate-wild-do-table=db%.t1. Then, suppose that on the master, you issue the statement CREATE DATABASE dbx.
Although you might expect it, this statement is not replicated because
it does not reference a table named t1.

Perhaps you need to get rid of one of those rules on the Slave and restart mysql on the Slave.
Comment: what i am trying to say is when i insert value to db1.table from another database using simple query as use db2 ;insert into db1.table values (''); the values are not being inserted in db1.table on slave
Comment: Updated my answer...
Comment: You mean to say if i will use both variables as replicate-do-db and replicate-wild-do-table then MySQL will ignore the insertion/updation of data as ignoring on the basis Database Level
Comment: According the documentation : `An example of the latter that may have unintended effects is the use of --replicate-do-db and --replicate-wild-do-table together, where --replicate-wild-do-table uses a pattern for the database name that matches the name given for --replicate-do-db.`. One filtering is interfering with the other.


LAX Terminal Transit

Question: I arrive at LAX Tom Bradley International Terminal on Air New Zealand and depart from Terminal 5 on an American Airlines domestic flight. I do not have any checked luggage. Can I transfer from TBIT to T5 without having to go landside? Would I still need to go through TSA in T5?
Answer: Nope.
You need to go through Immigration and Customs in LAX, and you can only exit land side.
Comment: @Leslie Everyone has to go landside. But if you got a single booking then the airline thinks you have enough time to make your flight.
Answer: I'm not sure what you mean by "landside", but if you mean going through immigration and customs, everyone arriving in the US at any airport, even for international-to-international transit, must immediately go through immigration and customs (unless they already went through US immigration and customs at a preclearance airport abroad). There is no departure waiting area for people who have not gone through immigration in the US.
After going through immigration and customs, at every airport, you have to go through a security checkpoint if you are connecting to another flight (domestic or international), but depending on the airport, there is often a dedicated security checkpoint for people connecting from international flights, which does not have long lines like the checkpoints for people coming in from outside the airport.
There are post-security corridors connecting TBIT with terminals 4, 5, 6, 7, and 8 at LAX, so if you go through security at TBIT, you can get to your gate in Terminal 5 without going through security again.
Comment: Landside vs airside, in  other words, outside of the secure area.

LAX Terminal Transit


Redirect to Facebook page tab after authentication

Question: I have a facebook page where I have added a tab of my application. I use to check that the user is authenticated or not using the following code:-
<?php
     $app_id = "MY APP ID";

     $canvas_page = "MY CANVAS PAGE";

     $auth_url = "https://www.facebook.com/dialog/oauth?client_id="
            . $app_id . "&redirect_uri=" . urlencode($canvas_page);

     $signed_request = $_REQUEST["signed_request"];

     list($encoded_sig, $payload) = explode('.', $signed_request, 2);

     $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);

     if (empty($data["user_id"])) {
            echo("");
     } else {
            echo("");
     }
?>

Now as CANVAS PAGE has to be the same CANVAS PAGE I have changed in the application, after logging in page redirects to https://apps.facebook.com/myappname/, but I want it to redirect to my Facebook page tab; To this one - https://www.facebook.com/myfbpage/app_82136128736123.
Answer: You are correct.  The redirect_uri has to be a URL that is "owned" by the application.  That means that it is listed in the applications settings.
Your canvas page will have to use a JavaScript redirect (like the one you are using).  The only difference is that you need to remember that your application is running inside of an iframe.  You'll have to change the location property of top as opposed to the document.  Top references the top most frame on the page and that is the only way for an application to perform a proper redirect.
echo "";
exit();

It's ugly and many people refuse to believe that this is the correct way to do it, but I am yet to find an alternative.


How many vowels in each syllable?

Question: I'm trying to improve my spelling, and I came across this article, which states that "Every syllable has one vowel'.
How can this be true while words like room, pain, eat, grow, etc. Have one syllable and two vowels?
Comment: I think that what is meant is that every syllable has at least one vowel.
Comment: Your source appears to be constructing simple rules for English learners. But much depends on the definitions concerned and there are clearly exceptions to the rule, such as diphthongs: https://en.wikipedia.org/wiki/Diphthong
Comment: The so-called rules on the site you cite are gross oversimplifications, the kind given to young children because they are unlikely to encounter exceptions (ahem, *cwm*, *tsk*, *celt*, *gestalt*, *qi*, *pel*, *beatnik*, *k.d. lang*), though some are demonstrably incorrect even to someone with a limited vocabulary (3. *girl*; 7. *coke*). It's more useful to say a syllable has one vowel *sound*, but that informs no one of anything about how it should be spelled.
Comment: That is not true at all. We don't count syllables from spelling. It's not necessary for a syllable to have a vowel. For example, in words like 'rythm' ['ɹɪðm̩], we have two syllables but we have only one vowel. Why's that? It's because we have syllabic consonants (vowel-like consonants such as *m, n* and *l*), which form a syllable on their own.
Comment: I suggest you stop using that site. Because it's not accurate and reliable. That site also writes **/j/** for /d͡ʒ/. /j/ is a *completely* different phoneme. Furthermore, they don't mention any exceptions to the rules they've given and there are lots and lots of exceptions to those *general guidelines*.
Comment: "Eat" and "room" have one [syllable](https://en.wikipedia.org/wiki/Syllable) and one [vowel](https://en.wikipedia.org/wiki/Vowel).
Answer:
Every syllable has one vowel

This is an overgeneralization and is misleading. This may be true in some languages, but not in English.
In English, a syllable can be composed of a diphtong, which is a unit that is a combination two vowels. A long vowel may also be considered as a instance of two vowels.
An English syllable also doesn't always have a vowel since liquids and nasals can be a syllable peak. See link.
Answer: The link is for children learning to write at age 4. (or rather for their parents and teachers). It isn't really directed at non-native learners.
Children are taught to break a word into syllables and sound out each syllable in order to attempt to spell the word.  Syllables in English can be a single vowel or dipthong.  "V"  or combined with consonants "CV" or "CVC" The "V" may be a single vowel, like /a/ or /i:/  (spelled "ee" or "ea" for example") or a dipthong like /ai/ or /ei/,  which might be spelled "i" or "a". However a syllable can't contain two vowel/diphongs separated by a consonant.  "VCV" must be two syllables. And single consonants are not (normally) sylablles. Also the consonant might be a digraph ("th", "sh") or a blend ("st", or "bl").
If you look hard, you will find exceptions to these, but this is good enough for a five year old!
So to spell an unknown word, the child is encouraged to break it down and spell out each syllable phonetically.  "computer" could become "kom" "pyoo" "ta" and then spell each one: "kompyoota"  That is a good first attempt.

How many vowels in each syllable?


Raphael Position

Question: How can I get the position of an object in Raphael? I can get the size using getBBox(), but there appears to be no way to get the position?
Comment: The problem may first be a definition of "position" of an object. If you mean the "gravity center" of the object, that must currently be computed by application code as it depends on the kind of object. Right now, it seems there is no library code to get the center of common shapes. For arbitrary shapes, I guess it may need be defined at the application level anyway, and the bounding box allows to compute it.

If by position you mean the classical top-left corner position, the bounding box's (x, y) attributes is the result, as @b_dubb mentioned.
Answer: getBBox() should give you position as well as x and y properties.
var bbox = el.getBBox();
alert([bbox.x, bbox.y]);

Comment: It is in the Raphael documentation
Comment: thanks but it would be great if you could add those tips in the documentation of raphaeljs.
Answer: getBBox() returns an object with 5 properties.  they are:

x
y
width
height
toString()

if you set getBBox( false ) it will return coordinate data for the object's position AFTER a transformation.  set it to getBBox( true ) to return coordinates for the object prior to transformation
use like this ...
paper.Raphael(10,10,300,300);
circle.paper( 30, 55, 15 );
var circleBBox = circle.getBBox( false );

edit: just downloaded R 2.1 and i believe it has added x2 and y2 to the properties returned by getBBox()
Answer: Depending on what kind of shape it is, the documentation seems to say it can be accessed using the .attr() function. So, if it's a circle...
var x = myCircle.attr('cx'); //cx is the center-x-coordinate of the circle
var y = myCircle.attr('cy'); //same, for y
var r = myCircle.attr('r'); //Radius of circle.

A square would have attrs of x, y, width, height. Check the documentation for more info.
Comment: el.getBBox is the correct approach. Please see Dmitry's answer.
Answer: you may also access the x and y values this way:
var x = myCircle.attrs.x;
var y = myCircle.attrs.y

Answer: attributes x, y are those within the set. The issue here is that if the set gets translated somewhere else, the x and y given in by .getBBOx() do not account for the translation.
Raphael.transformPath(path, transform) can help by applying the same transforms that the set has...
to translate that point you can:
tp = Raphael.transformPath("M"+x+","+y, set.attr('transform'))
x = tp[0][1]
y = tp[0][2]

Raphael Position


Organic hydrocarbons

Question: Why new double bond or triple bond creates to the center always? When pentan-2-ol reacts with $\ce{Al2O3}$ ∆ the double bond creates to the 2nd carbon. Can't it create on the 1st carbon?
Comment: https://en.wikipedia.org/wiki/Zaitsev's_rule
Answer: It can and will form a double bond to the 1st carbon, however it will much more likely form one to the second carbon.
You will get a mixture of both 1-pentene and both cis- and trans-2-pentene.  The major component will be the trans-2-pentene because that is the most stable compound.  Remember, more substituents on a double bond mean the bond is more stabilized for a couple reasons.  Steric interferences mean that trans- is more stable as well.
Since the product is more stable, the transition state to form that product is more stable and therefore easiest to form, generally.
Answer: You can eliminate pentan-2-ol to both pent-1-ene and pent-2-ene (and to both stereoisomers of the latter).
To a certain degree, the reagents you use determine which product you get. If you turn the alcohol into a leaving group and then add a strong, sterically demanding base, the pent-1-ene content will increase. If you add a small, mild base, you will observe more pent-2-ene. Careful tuning of reaction conditions often allows for these differences in reactivity.

Organic hydrocarbons


Why can I manually manage the GPU cache, but not the CPU cache?

Question: On the GPU, each thread has access to "shared" or "local" memory, which is analogous to cache on the CPU. So instead of just caching the most recent page, I can tell my program which pieces of memory will be accessed most frequently and manually keep those in cache. My question is: why do CPU designers not allow an analogous operation? I.e. why can't I say to the CPU, "OK, the nodes of this tree aren't on the same page in memory, but I need to access them a lot, so malloc them in the cache for me"?
Comment: Because GPU local memory *isn't* a cache.  It's a kind of non-uniform accessible memory.  If your CPU had a [non-uniform memory access](https://en.wikipedia.org/wiki/Non-uniform_memory_access) architecture, that would have operations for determining what kind of memory to store what data on, too.
Comment: @Jules: Smells like an answer!
Comment: @jules I see now my question wasn't clear, feel free to edit it... What I'm asking is, why are non-uniform access architectures not widespread? And instead caching is the norm. When I said "cache" I meant "faster memory", not "cached memory"
Answer: This kind of memory management: telling the cpu (in advance) what content is frequently accessed, is really hard to do for a wide array of programming problems, where data structures involve pointers and such.
Yet it is (by comparison) easier to do for certain parallel sliced algorithms, such as found in the graphics domain.  In the graphics domain, you're dealing with large chunks of contiguous (numeric) data and vastly fewer pointers.
So, modern CPUs opt to do their cache management automatically, using multi-level caches that ultimately ends with disc-based memory.  Each level of the cache is noticing how often some cached portion of memory is used, and uses that information when it decides to evict something from that level of the cache.  Each level has a different "page" size (called line size on the upper levels).
So, there's virtually no way for a programmer to inform the CPU of what to keep and what to evict, because of the combination of multi-level and varying cache line/page sizes at each level.  Ok, so that's bad enough, but now, throw in that the same program wants to run on multiple different cpus of different performance (where much of that performance difference comes by increasing cache sizes, number of cache levels, etc..), and, then this becomes an intractable problem for the programmer dealing with general purpose algorithms and data structures.
What programmer can do, then, instead of informing the cpu what to keep/evict, is attempt to co-locate related items (e.g. A and B) so that across all the possible variations of cpus and multi-level caches, if A is in the cache, then so is B.  (There are other things programmers can attempt to keep programs cache friendly, you can google "cache friendly" data structure or algorithms.)
Another difference is that the GPU memory is separated from the CPU memory, so programming the GPU necessarily involves moving memory back and forth.  Whereas the CPU has cache misses and page faults that automatically load memory that is not close to the CPU, the GPU (historically) doesn't have these mechanisms and the programmers of the GPU have to constantly instruct the GPU to copy memory back and forth between GPU memory and CPU memory.  This has been and is ever increasingly a problem as we use GPUs for more problem solving, so eventually we'll see more and more hardware breaking down the barrier between CPU memory and GPU memory, resulting in unification at higher levels of the cache hierarchy.
Comment: Agreed that generalized programming models (as opposed to the vectorized, SIMD restriction on the GPU) require multi-way associative caches as opposed to manually managed scratchpad SRAM. Note though that [we're contemplating](https://github.com/keean/zenscript/issues/41#issuecomment-407587313) an Actor-like generalized programming model which can enable the compiler to tell the caches when to evict and when to do a cache-to-cache transfer.
Answer: There are many reasons why CPUs use a cache rather than simply a block of faster memory. But I'd say that the biggest one is this.
Caches were invented primarily as a means of optimization for memory accesses. And that could only work if it can happen transparently, to programs that have already been written and compiled. Therefore, forcing a program to manually do caching would not be helpful.
Caching was designed to be transparent. It allows programs to benefit from different cache sizes and architectures without having to be explicitly written for them. What you want is something less than transparent, something that only really works well if you program for a specific architecture.
Which is why you do sometimes see this sort of thing... in embedded CPUs. Specialized embedded CPUs have been known to provide access to a small amount of fast SRAM, in some cases by sacrificing a percentage of the data cache. This is done precisely because they are embedded; the code written for these circumstances is specialized and not meant to be cross-platform.
Also, to correct some misinformation:

On the GPU, each thread has access to "shared" or "local" memory, which is analogous to cache on the CPU.

No, it's not analogous to a CPU cache. At all. When GPUs perform memory accesses, they usually do so through caches, just like CPUs do.
Workgroup-local memory is not meant to be a cache. It primarily exists for fast intercommunication between invocations within a workgroup. That's why all threads in a workgroup get to see the same local variable declarations. Sure, you can divide it up and use it as additional per-thread memory. But that's not its main purpose.
Comment: @RenéG: I think you're misunderstanding my point. Programs that don't know about the special memory won't get any benefit, even with your "spans the two memories" approach. And since that is 100% of all programs that existed before this memory was introduced, you would have created hardware that does nothing. CPU makers hate making features that don't get used. Consider the slow adoption of SSE-style instructions.
Comment: You mention that GPUs use caches as well... I'm pretty sure shared memory isn't cached, actually (global is), I could be wrong... anyway, my objection is that transparency need not suffer. CPUs could provide two types of memory and provide caches for both. Then programs that don't exploit the faster memory would just use the regular pointer space, no problem. Programs that want to use the faster memory could use special malloc/free functions for two separate spaces. Caching would still happen regardless.
Comment: @RenéG: "*I'm pretty sure shared memory isn't cached*" I never said that it was. "*Then programs that don't exploit the faster memory would just use the regular pointer space, no problem.*" From a CPU-designer's POV, there's a problem: you have a lot of hardware that is *not being used*. You could have put that silicon into stuff that existing programs would actually use. Furthermore, what's the point of caching small memory like that? The whole point is that it's *fast memory*; you only cache memory accesses if they're slow.
Comment: "hardware not being used" you misunderstand. Regular programs would use a pointer space that spans the two memories.
Comment: And ya, I meant you provide a cache for the slow memory as well as providing manual fast memory. Just like on the GPU.
Comment: @RenéG: "*Regular programs would use a pointer space that spans the two memories.*" How does this make your program any faster? `malloc` cannot tell how you intend to use a particular piece of memory. Therefore, it is entirely possible that you will allocate fast memory and only touch it once every 20 seconds. All other allocations might go into the regular memory. And so you gain *nothing* performance-wise from it. CPU designers would have done better to add more general cache or ALUs or cores or *anything else*. You cannot benefit from fast memory without tailoring your algorithm to it.
Comment: For programs using the special memory, there would be two malloc functions, just like for GPU programming, that return pointers in the fast or slow space as desired.


add images to listbox (visual basic)

Question: I have sets of web hosted images that I need my user to be able to select 1 from each. I thought a listbox would work for this, but I can't figure out add an image to one. Is this possible? better way of doing this? I am using the latest free vb.
Answer: Use the Listview control instead, it provides better functionality, and doesn't suffer from an annoying resize bug. The listbox is carried over from VB6 days. The listview supports column headers, groupings and a bit more.
Add a Imagelist control to your form, to store the images; set it's ColorDepth property to 32-bit, and set the Listview's LargeImagelist property to the imagelist control you just added (this can all be done in code as well).
Add images to the Imagelist via this code:
ImageList1.Images.Add("imagekey", Image.FromStream(yourimagestream))

Add items to the Listview via this code:
ListView1.Items.Add("list item title", "imagekey")

The "imagekey" is a way to tell the Listview which image to use. You can also use indexes for icons, but specifying an index that doesn't exist will give an index out of range exception, whereas a key that doesn't exist, will just use no image instead.
Oh you also want to set the Listview Multiselect property to False (if you only want them to select one at a time), and access the SelectedIndexChanged() and ItemActivate() events for when the user clicks / double-clicks on items respectively.
Comment: How do you add items to a list view, where there is just one column that takes up the entire width of the listview, and one item per row? everytime I do it, it adds multiple items per row....
Comment: Multiple items per row, sounds like multiple columns you have there. Check you add to the items array and not columns.
Answer: Set ListBox1.DrawMode to DrawMode.OwnerDrawFixed or DrawMode.OwnerDrawVariable, and add a handler for drawing the images.
Private Sub listBox1_DrawItem(ByVal sender As System.Object, ByVal e As   System.Windows.Forms.DrawItemEventArgs) Handles ListBox1.DrawItem
Dim img As Image
img = sender.items(e.Index)
e.Graphics.DrawImage(img, targetsize)
End Sub

You can add the images to the listbox items collection.
Dim img As Image
img = Image.FromFile("c:\tmp.jpg") ' or whatever
ListBox1.Items.Add(img)
...

Answer: Yes, this is possible:
Dim imgList As New ImageList

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ListView1.View = View.Details
    ListView1.Width = 500

    ListView1.Columns.Add("Gender", 75, HorizontalAlignment.Left)
    ListView1.Columns.Add("Name", 100, HorizontalAlignment.Left)
    ListView1.Columns.Add("Notes", 350, HorizontalAlignment.Left)
    ListView1.AllowColumnReorder = True

    ListView1.Columns(0).DisplayIndex = 1

    imgList.Images.Add("Male", Image.FromFile("C:\Users\Joe\Pictures\Male-Symbol.jpg"))
    imgList.Images.Add("Female", Image.FromFile("C:\Users\Joe\Pictures\Female-Symbol.jpg"))
    ListView1.SmallImageList = imgList
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim index As Integer
    Select Case True
        Case RadioButton1.Checked
            index = 0
        Case RadioButton2.Checked
            index = 1
    End Select

    Dim lvi As New ListViewItem
    lvi.ImageIndex = index
    lvi.SubItems.Add(TextBox1.Text)
    ListView1.Items.Add(lvi)
End Sub

Comment: Seems to work, yet image is 16x16. How can we resize the image? :|
Answer: To resize the image use:
imgList.ImageSize = New Size(100, 14)

Comment: The question requires adding image but your answer is about resizing the image.

add images to listbox (visual basic)


Charging system in a Lancair Columbia 350

Question: The bus volts indication on my G1000 is pegged at 29.2 volts for both the left and right bus. I have a 24 volt system.  What might that mean?
Comment: Welcome to Av.SE!
Answer: the output voltage of a 24 volt system will be slightly less than 24V. the charge voltage will be significantly higher than 24 volts in order to push the charge into the battery. It therefore sounds like the battery charging circuit is stuck "on" where what it should be doing instead is continuously cycling on and off, on and off as the engine runs at cruise to keep the battery "topped off".
The charge system is regulated by either a mechanical relay or an electronic switch that senses system voltage and engages the charge function whenever the system voltage drops below a fixed threshold, indicating that the battery needs charging. If this system has failed, then either the charge system is on all the time (which is bad for the battery) or off all the time (which will let the battery run down and go flat).
Note that it is common for the charge circuit to run at 100% duty cycle right after starting the engine, because the charge state of the battery will be slightly depleted after a start. Then after several minutes of charging, the charge circuit will begin intermittently cutting out as the battery comes back to full charge until at equilibrium, the system voltage will jump momentarily up to 29 and then jump back to 24 for a while, then spike briefly at 29, then go back to 24, etc. indicating that the battery is once again fully charged.


Configurable Product Missing After Reindexing

Question: I have imported products using data migration tool from M1 to M2. But some products does not show on frontend. When I save the product manually it appears on frontend but after reindexing it again vanishes. I am not getting what could be the reason for the same.
Answer: Mind the changes that occur in 'cataloginventory_stock_status' table after reindexing. In my case, Reindexing added a row like - 1-0-2(product_id-website_id-stock_id) while i had already a row like 1-1-2(product_id-website_id-stock_id).
So, I fired query - Delete from 'cataloginventory_stock_status' where website='0' and stock_id=2`. This worked in mine case.
Make suitable changes and its going to work. Always take backup before any changes.
This is not a good solution but its all i got.


"Lock & Erase" feature on my android phone

Question: I lost my android phone and tried using Android Device Manager.  Normally when you got to Android Device Manage it gives you three choices:  "Ring", "Lock", and "Erase".
For some reason, on the phone that I am looking for, it only gives you two choices:  "Ring" and "Lock & Erase".  Here are my questions:
1.  If I select "Lock & Erase", will it give me a choice between the two?
2.  If I select "Lock & Erase", and it doesn't give me a choice will it ask me "Are you sure" before proceeding?
3.  If the Android Device Manage "erases" and puts the phone back to factory default, will the "finder" of my phone be able to re-activate the phone?
Thanks!
Comment: About that third point: see  what is the meaning of [tag:factory-reset]?
Comment: Can you please edit your answer to include a screenshot of what you see on Android Device Manager?
Answer: The Android Device Manager is only able to work if:
1 .You enabled it on your phone.
2. Your phone has an active connection to the internet.
3. At the time its connected to the internet, your google account is still signed into the phone. If your finder performs a hard reset on your phone or resets it to factory default settings, your google account is erased effectively rendering ring lock or erase useless.
Are you using a web browser to access the ring lock and erase feature?


What is the difference between LCD/DLP/HD Projectors?

Question: What are the differences between LCD/DLP/HD projectors?
Which one would you recommend to hook up to a computer to do light-duty projection - e.g. light video, web-browsing, etc?
Answer: I would buy an DLP over LCD. That is because I have very good experiences with DLPs. However, either one will do for what you need. You also think ahead when buying an item like this. Plan for what you might use it in the future. Not just for what you need or want at the moment.
Get it from an expert: DLP and LCD Projector Technology Explained -- Project Point
Quick Review of Disadvantages and Advantages of each... Reference
LCD Projectors: Strengths
- Richer color dynamics for better results in rooms with ample ambient light
- Draw less power
- Throw less heat
- No color filter wheel = No "rainbow effect"
- Slightly quieter Seemingly sharper image on data
DLP Projectors: Strengths
- Smoother video
- Smaller box
- Pixels far less visible, (although normally not an issue for business use)
- More "filmlike" on DVD and HDTV
- Generate "blacker" blacks
- Higher contrast
LCD Projectors: Disadvantages
- More visible pixels
- Some screen door effect on certain video images
- Physically larger - Even for the same number of lumens
- Poorer contrast
- Blacks come out lighter gray than DLP projectors
DLP Projectors: Disadvantages
- Rainbow effect bothers some
- More moving parts (color filter wheel)
- Color filter wheel often produces soft but audible whine
- Poorer reds and yellows at full power
- Color saturation
- Need more lumens than LCD, for rich colors, when dealing with ambient light
Answer: LCD and DLP are different technologies that basically do the same job.
HD just means high definition - some projectors are high definition (like your computer screen or most new TVs) some aren't (like your DVD player or a very old computer screen).
When buying a projector, the most important considerations are:

Native Resolution (how sharp the picture is, you probably want at least e.g. 1280 x 720 or 1024 x 768 for web browsing - higher is sharper)
Brightness (e.g.: 2000 Lumens can be seen pretty clearly in a somewhat lit room but looks best in a dark one, higher is brighter)
Contrast (e.g.: 2000:1 - higher is sort of "clearer" or more "realistic". Good plasmas have millions:1 contrast ratios, so projectors aren't fabulous at this - though they work well in a dark room.)


SWAP reducing SSD write speed?

Question: My SolusVM graphs have been showing 8Gb Swap usage even though the RAM is never over 50% used. Is it possible that virtual machines going into swap will reduce the IO of the SSD?
Comment: Your first action should be that you set the swappiness parameter to 0 - i.e. swap only on out-of-memory condition. Furtheron you should avoid swapping to ssd or any other flash device, because wear leveling will reduce the lifetime of your device.
Answer: If you're swapping to the SSD, yes. Swap uses IOs; even SSDs, while not seek limited, still have IO limits. Granted, pageins/pageouts from SSDs are going to be very quick, so unless a VM is thrashing, it's not likely to affect IO that much. A thrashing vm might do more than 1k IOPs. Your SSD is probably rated for >30k IOPs. Then again, your SSD also has a finite write durability, so even under limits, it's not preferable to allow that.
Comment: Is there any way to prevent/limit IO of OpenVZ virtual machines? I have an IOPriority of 4 set in SolusVM, but I do believe there are certain users completely abusing the IO.
Comment: That's a completely different question, but depending on your kernel version, yes. Look into linux cgroups, specifically the blkio controller ([linux kernel docs for cgroups blkio](https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt)). I don't know openvz's particular mechanism for installing cgroup limits, but I know it enables them by default in newer userspaces (/proc/vz/{cgroupstuff}). To check where they are use `mount | grep cgroup`. You should be able to add a controller to a process in-flight, if needed, assuming it doesn't have that controller from another group.

SWAP reducing SSD write speed?


Would have never VS have/had never

Question: What's the difference between "I would've never believed that he would win that match" VS "I had/have never believed that he would win that match"
Answer: The first one would be used if the person had won the match, and you were expressing surprise. "I would never have believed..." is the more usual version.
Your second example is not very idiomatic, but it's just a statement of your opinion.

Would have never VS have/had never


If I had an average Bachelor degree and a year of working experience can I apply for a Master's Program?

Question: I have a Bachelor's Degree in Electrical Engineering and my GPA is 2.6/4 (German scale, so it was like 2.9/4 in American GPA), mainly due to years of depressions and a bad break up. If I picked up work for a year or two in software development, is there a chance (and if it so, how far it is) to get accepted for a Master in Data Science in the US/Canada?
Comment: Apply and find out... We can't guess.
Comment: What's 2.6 German scale??
Comment: @user2705196 The German scale is 1 to 5 with 1 being the best and 5 being the falling grade. 4.0 in German mean the lowest you get to pass. It's a clusterfuck and way more complicated than he linear aproach, but you get the idea. 2.5 in German scale is "good" and equals the 75% percent requirement of many university.
Comment: In the US there are many legitimate masters degrees that are less "competitive" than they are "expensive" (even at large, 'top' institutions) - a well put together application and an ability to pay $10k-$40k USD per year, with applications to multiple programs, and your chance of acceptance somewhere is quite high, especially if you have some related work experience to show you have the basic skills already. So I would suggest that "chance of acceptance" should not really be the criteria that concerns you much, unless you only want to apply to the single most famous program you know.
Comment: Your question is probably too broad to be answerable. You'd have to check each university for their application requirements. I'd venture to guess that some place will take you, especially considering that Master's programs in the US/Canada charge significant fees. Regarding your "translation" of a german grade into an American GPA: grades can mean vastly different things, e.g. as a performance relative to other students, and similarly the "absolute" level of performance required to get a certain grade at your university might be vastly different compared to a school in the US/Canada.
Answer: You will probably need to take the GRE and get a solid score. It also depends how you did in particular courses. E.g. did you bomb all the hard classes and ace a bunch of easy ones to pass overall? In grad school they may all be hard classes. Not to discourage you too much though. If you apply far and wide you may be able to get in somewhere with just about any background.
The concern of the school admissions is not just some competitive cutoff for merit, but that you will fail out and waste your time and money. There are definitely benefits of working, and it will help you. Especially if you get a job that uses some of the skills you need for your Master's program, like programming. If you can get a job precisely in "Data science" it may help significantly.
Answer: Yes.  But, it will depend on you "building a case" that your GPA is not the important part of your story.  Good letters of recommendation, good essays on the application, good test scores, etc. will help show that your GPA is not all there is to know about you.
Another good route to take (worked for me) is to take a grad-level course that would be a natural way to talk to a professor in the program.  Do well, and you have another part of the story that you are not the same student that you were.  AND, you may have a recommendation from a professor in that program (and potential advisor).  The downside is that you are likely to have to shell out for that course, unless you can get your work to pay for it.  (Check your employee benefits.  I was a teacher, and continuing education was important enough that the district would help foot the cost for grad courses that were directly applicable.)
Don't focus too much on the metric of the GPA.  It is only one of the ways that universities evaluate potential students.


Disappearing Conky

Question: Every time I launch my conky, and I click anywhere on the desktop, it disappears, and I have to keep relaunching it, does anyone have a solution?
Comment: post your config
Answer: Open your conkyrc file with
nano .conkyrc

and then
made the changes for the following lines
own_window yes
own_window_class Conky
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes

Then kill your conky and try again launching.
let us know if any issues.
credit goes here
Comment: Thanks, this is exactly what I've found out too to fix this.
Answer: {own_window_type panel}
also seems to work, but omits the window border et. al. present if you use
{own_window_type normal}
The important thing is that somehow either one does prevent the conky window from being covered by the desktop.
When you do a File Save on .conkyrc then conky will reload without need of a formal kill and restart.
Answer: I tried every option for own_window_type to get Conky to persist on my desktop, all to no avail. I finally found that setting
background=false;

in .conkyrc and making sure to not autostart conky with the -d flag did the trick once and for all.

Disappearing Conky


How to create circle texture

Question: In the nodes we use checker texture and it creates checker (square) pattern. Is there anyway to have some circle, or polygon type of pattern. Any suggestion or help. Thanks
Comment: The third image in this answer https://blender.stackexchange.com/a/99462/29586 shows a method of generating a repeating circle texture using maths nodes. If this fits the bill I can add an answer based on that. Note that the linked answer is based on compositor nodes but the maths will translate into shader nodes.
Comment: What about voronoi?
Comment: @miceterminator i want circle or poly shape other than the square or checker pattern
Comment: To make any kind of repeating pattern, you might be best off creating a tile-able image
Answer: You can manipulate the coordinates of any texture. The coordinates are like gradients going from 0 to infinity in x, y and z axis in positive and negative(from 0 to negative infinity) directions. You can separate them and then you can repeat a part of each one using maths - modulo operation in this case and compensating for the 'intensity' apropriatley. You can then draw a circle by taking a section of a spcherical gradiant with 'greater than' maths operation. This might make more sense if you have a look at the nodes:

Here is the .blend file:

Other shapes get more complicated, however you can construct whatever shapes you imagine using math and existing nodes. If you are interested, you can have a look at this other example with pentagons. Obviously, there are many ways to make patterns with pentagons and since you have not specified what you want exactly, this is just an example that might help you come up with a way to achieve what you need:

It might be a lot easier to draw shapes in an image editor or render them out with Blender to use as image textures instead of choosing the procedural way. It is possible to mix bitmap images with procedural textures any way you wish as well.
Comment: Looks good with the circle its ok. But how with the penta shape. (a question) cube has only green and orange why you have the black background. Thanks for the reply
Comment: No reason, you can make the background any color. You can use ColorRamp to recolor it.
Comment: I updated the answer with an example using a pentagon.
Answer: The "Magic" texture is one of the most "ordered" ones, so I would use it to start:
a node layout like this one:

yields this result:

There are several settings you can play with for creative results:

Note that the circles here are not exactly circles!

How to create circle texture


Automatically copy a certain folder from each of remote machine to a main machine

Question: I have one main machine and a group of remote ones. I want to keep a track of a certain folder on each of the remote machines and copy its content to a certain folder in my main machine. The remote machines shouldn't communicate between themselves. What's a better way to do that? I figure it's rsync. If so, should I install and run it a) on my main machine and do pull or b) instead run it on each of the remote machines and do push? Is there a big difference between these 2 options? Or are there better options apart from rsync?
Comment: What OSs are you using? How often do you want to sync? How many systems are you trying to sync? How much data are you trying to sync, and to what kind of backing storage? What networking limitations do you have?
Answer: Pull vs. push is largely a matter of expectations.  Which of these scenarios do you consider to be more likely or to occur more frequently?

The source system is up, but the destination system is down
The destination system is up, but the source system is down

Assuming one of your goals is to reduce the rate of failure of the sync, then if the answer is 1., then you should consider using a pulling model and if the answer is 2., then you should consider using a pushing model.
As for whether your syncing tool is rsync or something else, this is largely a matter of opinion and we probably can't provide good answers without more details on your particular setup and scenario.


42114 (6x6 Volvo Articulated Hauler) doesn't operate bucket and also doesn't drive

Question: My 42114: 6x6 Volvo Articulated Hauler drives in first gear for a moment, then stops completely; same thing with 2nd and 3rd gear. It doesn't operate the bucket either. I suspect I forgot to add a pin to the L motor and the orange gear shifter - how can I fix this the easiest way possible? I've calibrated about a hundred times already: sometimes it works for a few seconds then stops completely.
Comment: Exactly *how* does it stop ? What do you observe when that happens ? Is the motor still running (do you hear it) ? Do you hear and/or see any skipping gears or other horrible noises ? Can you see at what point the movement from the motor stops being transferred (is it a gear that no longer connects, or a shifter that became misaligned, or ...) ? If you found where the issue occurs exactly, can you take a picture, and include it in your question (ideally with an arrow pointing to the issue) ? Etc.
Answer: It might be the case that the batteries can only supply the required power to move such a heavy model in the first few seconds, then their voltage drops below the required limit for the motors to keep on running. Can you try or have you tried using new, non-rechargeable* batteries?
Adding a missing pin might be trivial in one case and might require a complete teardown and rebuild in the other case. Without knowing which pin did you forget (if any) it is impossible to tell which one applies to your situation.
*: the non-rechargeable ones have 1.5V as nominal voltage, whereas the rechargeable ones commonly top out at 1.2V, which then drops further as they get empty.

42114 (6x6 Volvo Articulated Hauler) doesn’t operate bucket and also doesn’t drive


Can a kraken cast wizard spells which require verbal and somatic components?

Question: The Kraken, according to the monster manual, can "Understand Abyssal, Celestial, Infernal, And Primordial But Can't Speak, Telepathy 120 Ft." The Kraken also does not have hands. It seems as if the Kraken can barely cast any spells at all. Can these factors be somehow overcome or explained away, ideally whilst staying within the basic 5e rules?
Comment: Where did the idea "Kraken can cast wizard spells" come from?
Comment: I've rolled back the recent edit, we prefer to keep it at one question per question.
Comment: okay, I may try to re-add the edit later in a way that keeps within the one-question rule.
Comment: What kraken, [this one](https://www.dndbeyond.com/monsters/kraken)? Its statblock doesn't have spellcasting at all...
Comment: this is asking about a kraken that has class levels
Answer: If you can't speak, you can't perform verbal components.
The rules for verbal components say:

Most spells require the chanting of mystic words. The words themselves aren't the source of the spell's power; rather, the particular combination of sounds, with specific pitch and resonance, sets the threads of magic in motion. Thus, a character who is gagged or in an area of silence, such as one created by the silence spell, can't cast a spell with a verbal component.

No speaking, no mystical words.
The DM can do whatever they want, so make it psionic.
The DM can make monster's do whatever they want to, and don't even have to justify it with logic, especially for something like a boss monster. Just give it innate Spellcasting:

A monster with the innate ability to cast spells has the Innate Spellcasting special trait. Unless noted otherwise, an innate spell of 1st level or higher is always cast at its lowest possible level and can't be cast at a higher level. If a monster has a cantrip where its level matters and no level is given, use the monster's challenge rating.

Monsters with innate Spellcasting often have the ability to cast their spells without components because they're inherently magical creatures. Just make you kraken an innate spellcaster (often called psionic).


Merging Kali with Tails

Question: I want to get into Linux penetration testing, but still want to have the benefits from anonymous surfing.
Is it possible to setup a good and 'secure' (Yes I know, TOR!=security, blabla) merge from Kali and Tails, starting with Kali?
And how?
Comment: Start with `Ubuntu` instead. Then create a virtual machine for `Kali` if you want to try it. `Tails` is not "security", it's for "anonymity". A professional will choose your tools specifically for the task he wants to do, not trying to merge them together in some kind of swiss-knife hybrid. The `Kali` linux distribution is specifically targeted, not intended for general use. For example, it only has `root` user and let you log in as such, sacrificing a lot of security on your machine in order to let you be a bit faster because you don't have to type `sudo`.
Answer: It is possible.
Using a Kali Linux LIVE USB key in forensic mode and using a script to route everything through Tor, and two scripts to wipe RAM on halt and secure-delete (srm or shred) files on halt.
Heres a complete writeup, you should really check it out :
http://homeofbannedhacker.blogspot.fr/2015/07/merging-kali-linux-with-tails-improving.html?m=1
Answer: Well, I had the same problem as you did. At first I struggled for about a day or two trying to get Qube's ISO image to read when I found I didn't have the right hardware in the first place. I liked the whole "security through isolation" idea of the Cube OS, of having each of my own work spaces neatly separated.
So, I came up with another plan;  I simply installed Tails as the main OS, and then installed VirtualBox , and then I went ahead and downloaded kali linux for work related projects, and for entertainment I went ahead and threw Linux mint into virtualbox.  Now, the whole idea here was that even though both Kali and Mint run off of Debian, Linux mint is used for entertainment purposes such as; movies, gaming, etc. Of course, if at any time I'd click on the wrong link I'd compromise my security, but not to the entire system. In such an event I would easily delete linux mint and re-install back in to VirtualBox.
The same would go for Kali, if I'm compromised, then poof. All would be hosted under a secure Tor encrypted Tails environment.
Now, I know that both Kali and Mint are both Debian based distros,and are known to be very secure, but I've had a slight run in with some malware and ransom-ware when running Mint alone, so I just wanted to take some precaution this time around. We'll, thank's for listening everyone and I hope some of this information helped.
Answer: There is AttackVector, "Linux distro for anonymized penetration based on Kali and TAILS". I don't know if it still up to date, but seem what you're looking for.
Answer: Seems like you answered your own question - start with Kali.
All these different distros are (definitely simplifying here) essentially a base Linux OS with various compile options and applications configured within. So in the case of Tails you are looking at specific configurations/applications geared towards trying to maintain anonymity.
If your primary goal is pen testing then, as you mentioned, you should start with Kali. You will then need to work on the individual tools found in Tails and try to implement them into that base OS. I say try as you may run into issues fully implementing them depending on your desired results. For example, if you are trying to bounce your traffic through a proxy to remain anonymous, a directed pen test may not work as expected. If you are going to keep your browsing (anonymous) and pen testing (direct) separate then this might be easier for you to do.
As far as I know, there is no current distro that combines both pursuits into a single package. Although that does sound like a worthwhile pursuit... maybe this will be your new distro!
Personally, I would stick to using the best tool for each task, using Kali for my pen testing learning (which I would do in an internal network anyway) and running a separate system for my anonymous browsing.

Merging Kali with Tails


How does an individual feature affect predictions in neural network classification problem?

Question: In the literature, I've come across statements like "People with higher income and with long working hours are more likely to be diagnosed with chronic diseases such as stroke". The above-mentioned study (p. 8) explores the association between behavioral habits and chronic diseases using ANN.
I am unable to figure out how to make such conclusions with feature study in neural networks or other machine learning techniques.
Secondly, is there a way to quantify the likelihood in ANN similar to logistic regression wherein regression coefficients give the change in the log odds of the outcome for a one unit increase in the predictor variable?
Answer: A technique called LIME - Local Interpretable Model-Agnostic Explanations helps assess the contribution of individual predictors to the NN. Specifically, it answers the question: 'do I trust that a certain prediction from the model is correct?' This might be something you're interested in.
Answer: Disclosure: I initially saw and answered the copy of this question on the Data Science site. Below is a copy of my answer on DS site.

Is there a way to quantify the likelihood in ANN similar to logistic regression wherein regression coefficients give the change in the log odds of the outcome for a one unit increase in the predictor variable?

Good question.
Yes, there is a way. The approach that can help you is called partial dependence plot (PDP), see the links below for further details and examples.
The approach is model agnostic, i.e. works well for any predictive model, powerful yet simple.
The main steps for one-dimensional partial dependence plot are as follows

Fit your model as usual
Select the predictor of interest and a set of values to be investigated (e.g. income as in the article you refer to and values of say 50k, 70k, 80k, ..., 120k)
For all observations in your dataset replace the values of your predictor with the first value from the set above (50k).
Calculate the model output for the modified dataset from the previous step and calculate the average over all observations.
Repeat steps 3-4 for the remaining values (70k, 80k, ...) and plot the values of your predictor along X axis and the corresponding averaged model predictions along Y axis.

With one-dimensional PDP described above you can easily see the marginal impact of a predictor being analysed on the model output. Furthermore, one can use similar technique to perform multi-dimensional analysis, e.g. to investigate the impact of interactions.
partial dependence plots- scikit-learn documentation
partial dependence plot - tutorial by Dans Becker on Kaggle
Comment: Working with PDPs and GAMs I have come to the realisation that their insights are almost the same. Sometimes I even fit a GAM first quickly and then I fit my big-cool ML model (say Extreme Randomized Trees). The performance of the ML model will be better but the PDP of it will be effectively the one from the GAM.


How to copy Key Value Elements from one Hash Table to the other HT

Question: I am trying to copy first 5 key value pair from Hash Table 1 to Hash Table 2
and Then next 6 to 10th Key value pair from Hash Table 1 to Hash Table 3.
I am not able to get this going,, can any one has any hint please share it with me
Comment: sorry but I don't really see how that can cause difficulties. Can you show have you tried so far and explained why it doesn't work instead ?
Comment: Hashtable entries are generally unordered. Can you explain what you mean by "first 5 key value pair"? First in what order?
Comment: @Matt, Before I copy, eveyr time i add the entries into the Hash table,
Answer: Try something like this.
Hashtable h = new Hashtable();
Hashtable h1 = new Hashtable();
Hashtable h2 = new Hashtable();
Set s = h.keySet();
int i = 0;
for (Object key : s) {
    if ( i++ < 3) {
        h1.put(key, h.get(key));
    } else {
        h2.put(key, h.get(key));
    }
}

Add generics etc. as appropriate.
Answer: First of all, you need to know that a Hashtable does not maintain the order in which elements are inserted, so the first 5 can be whatever.
If you want the insertion order to be preserved, use a LinkedHashMap (perhaps wrapping it in a Collections.synchronizedMap() if you want it to be thread-safe).
Besides, there's also a nice interface called NavigableMap, implemented by TreeMap, which offers methods like subMap(), but you need to know from which key to which key (instead of using indices). And this will also hold your entries sorted by the key.
If you can rely only on indices, aside from using a LinkedHashMap, I would suggest you go for a generic solution like the following:
<K, V> Collection<Map<K, V>> splitMap(Map<K, V> map, int count) {
    if (count <= 0) {
        throw new IllegalArgumentException("zero or negative count");
    }
    List<Map<K, V>> list = new ArrayList<Map<K, V>>();
    Iterator<Entry<K, V>> entries = map.entrySet().iterator();
    while (entries.hasNext()) {
        list.add(subMap(entries, count));
    }
    return list;
}

<K, V> Map<K, V> subMap(Iterator<Entry<K, V>> iterator, int count) {
    Map<K, V> map = new LinkedHashMap<K, V>();
    for (int i = 0; i < count && iterator.hasNext(); i++) {
        Entry<K, V> entry = iterator.next();
        map.put(entry.getKey(), entry.getValue());
    }
    return map;
}

Then just call splitMap(yourMap, 5) in order to get the collection (actually a list) of maps containing 5 entries each (or less for the last one if there are not enough entries in the initial map).