Force plugin to be activated only from multisite network dashboard

Question: Is there a way to allow plugin to be activated only from NETWORK DASHBOARD (if using Multisite).
In not multisite, allow to be activated normally.
Answer: You can specify that a plugin is Network Only in the plugin's header information.
/*
Plugin Name: Name of Plugin
Plugin URI: Link to plugin information
Description: Plugin Description
[...]
Network: Optional. Specify "Network: true" to require that a plugin is activated
       across all sites in an installation. This will prevent a plugin from being
       activated on a single site when Multisite is enabled.
*/

See get_plugin_data().
Network: true in a non-multisite plugin will allow the plugin to work (quick test on my local installation confirms that).
You could also try using the all_plugins filter to hide it from the plugin list if your site is a Multisite installation and the user isn't in the Network admin screen:
add_filter( 'all_plugins', 'wpse257256_hide_my_plugin' );
function wpse257256_hide_my_plugin( $plugins ) {
    if ( is_multisite() && ! is_network_admin() ) {
        unset( $plugins['my-plugin-name/my-plugin-file.php'] );
    }
    return $plugins;
}

Reference

all_plugins filter
is_multisite()
is_network_admin()
Comment: Wow!  I'd never seen the `Network: true` header before reading this.  I tested it seems to work in both multisite and non-multisite.  Thanx!
Comment: @Paul'SparrowHawk'Biron -- I'd never noticed the `Network: true` header before either, but then I'd never needed it before. (I found it by accident: I was searching the Developer Guide for `is_network_admin()` and the search suggestions included [`is_network_only_plugin()`](https://developer.wordpress.org/reference/functions/is_network_only_plugin/).)
Comment: This right here is what makes SE so great. This is exactly what I needed!


MPS in (2+1) D quantum many body system (QMBS)

Question: Can the Matrix Product State (MPS) simulator of the QISKIT be used to solve (2+1) D problems? I have seen this paper using the MPS simulator for a (2+1) D problem. However, my understanding is that an MPS can only work efficiently for 1+1 D problems due to the issue of entanglement. My question is whether or not the results obtained from the MPS simulator in a (2+1) D model can be trusted?
Comment: It's a good question. In that paper they are looking at a 1D boundary, but seem to be expecting (and numerically finding) a power-law decay in correlations on that boundary. It's not clear how they find that with an MPS simulation because no real details are provided.
Answer: After discussing the topic with more experienced individuals, including Yael Ben-Haim in the Qiskit Slack channel, I gained some insight into why Matrix Product States (MPS) can be utilized in higher dimensions. Even though MPS is efficient in 1D systems, it has the potential to function in any dimension. However, it appears that the bond dimension must be increased in cases of increased entanglement, such as near critical points or, as in this case, simply due to the increased connectivity in higher dimensions. Consequently, this will likely make the MPS more time-consuming in higher dimensions, potentially negating any advantages it may have over other classical techniques.


Solar Panel to Battery Question

Question: If I am charging a battery from a solar panel, how do I switch the current away from the battery when the battery is completely charged?
Comment: Best solution is to use a maximum power point tracking charge controller (for your battery chemistry) that will pull the maximum possible power from the solar panel AND manage the charging of your battery.
Comment: @DaveTweed: "AND manage the charging of your battery" would include knowing when to disconnect the PV array.
Comment: Usually you don't switch the current "away from" the battery; you just disconnect the solar panel from the battery so no current flows.
Comment: @JohnD: But that doesn't answer the question -- you still get to the point where the battery doesn't need *any* power from the panel.
Answer: The simplest way is to use a FET in series between panel and battery. Add some circuitry to sense battery voltage (VBATT). When VBATT > VBATT_MAX, you turn off the FET. When VBATT < (VBATT_MAX - V_HYST) you turn the FET on.
VBATT_MAX depends on the battery chemistry. V_HYST could be maybe 1 to 3V, depending on many factors. The reason for using V_HYST is to avoid switching fast. When you disconnect the charger from the battery, the battery voltage will fall a certain amount rapidly, and you don't want to instantly turn it back on.
Using a MPPT solar charge controller is a decent idea, though, so give it some consideration. An MPPT can let you use a smaller panel and get the same amount of power out of it as a larger one, utilized less efficiently.
"HYST" is meant to stand for "hysteresis," which you can look up if you are not already familiar with it.

Solar Panel to Battery Question


Things to check before getting a second hand car

Question: I plan to buy a pre-owned hatch back automatic transmission car. What are the things which I should check before making the deal? Also should I go to the Company owned showroom and ask them to give me a report of the car health?
Answer: Most automotive shops can do a full inspection for $100-$140, have one done before you buy the car. If you are checking the car yourself, the main things you need to worry about are the engine (compression test, $15 tool), the transmission (rough shifts while driving), is the car driving straight on a flat road (alignment), is the AC blowing cold air (turn it on and wait a few minutes), is the battery holding a decent charge (12.6V with the car off, $15 multimeter set to 20VDC with the probes at the battery terminals), is the alternator providing a charge (14V with the car on and all accessories off, at least 13V with headlights, heater and rear defrost on, same tool and procedure as the battery test, yes you test the alternator by measuring the battery).
These are the things that could cause the car to break down unexpectedly.
Answer: In addition to tlhIngan's answer;
Get the VIN number of the car you're looking at, and get the vehicle history report. Compare it with anything the owner tells you.
Find out how long the previous owner has had the car - longer is better, and if they've owned it less than 6 months, be even more thorough on your checks - they may be trying to offload a lemon.
Look at the local area that your buying the car from, and the people you're buying from. if you don't feel comfortable, walk away. Honest people sell honest cars.
If you don't feel confident checking the mechanicals, ask for an inspection to be made. At least, get an MOT / Safety Inspection done before buying.


How can I find a challenge/dilemma for my robot character?

Question: So...I'm playing in this game as an android that is a hacker and electrically skill based. It is not designed for front line combat and has a control chip which makes it obey the commands of it's human crew. It however has sentience, just no control when issued a direct order. It also has a moderate understanding of emotions, but cannot feel them, and some memory loss from a chest injury. As mentioned before, it's fighting in a group of human pirates.
How can I give this character a goal or a challenge that isn't combat based?
Comment: Since you've been absent since posting this and confusion over the details of your situation is showing up in answers, I'm voting to put this "on hold" until you're back and can clear up the confusion and flesh out the question's situation a bit more. ("Hold" just prevents people from answering while a question is being fixed up.)
Comment: This sounds like a forum/chat freeform game. Is that accurate?
Answer: Non-robotic characters' goals come from a mix of logical decision-making and emotional connection. So, you might want to destroy the Evil Empire (for instance) because destroying the Evil Empire will bring you fame, fortune, and safety, and also because the Emperor killed your family.
Robotic characters' goals can only really come from logical decision-making, unless they've had emotions programmed in (which your character doesn't). It still makes sense for a robot to want to stop the Evil Empire because of the security it will bring, or perhaps because they turn normal robots into twisted killing machines and you don't that to happen to you. Or - more to your case - you're an advanced robot, and have the ability to learn, so perhaps you want to keep hacking because it improves your hacking, ad infinitum.
It will help to pinpoint something you want your character to do/get better at/achieve in the game, and work backwards, finding a logical or rational reason for it.
Answer: I'm not sure what kind of robot your character is; I don't know if it has true A.I. (i.e. the capacity to learn infinitely and improve upon itself) or "limited" A.I. (the concept of an artificial intelligence that is limited in capacity, usually to human-ish levels).
"Emotion" is more emergent from logical decisions than some people might think. For instance, your robot would be described by virtually any bystander as "curious" if it prioritizes learning and acquiring knowledge. It has very logical reasons for doing so, but that doesn't stop it from "instinctually" doing it; it's part of the robot's fundamental programming. However, emotions don't drive a robot's decision-making.
I've seen several interesting takes on the disposition and personality of a hypothetical A.I. Here are a few:

A strong bond with its creator; much like a dog might appreciate its master, although obviously less primitive in showing it.
Bizarre and unnatural obsessions. If you've ever played Earthsiege, the plot of that game is that an A.I. is at war with the human race after it perceived a betrayal from its creator (more on that below). It self-replicated into various machines, and many of them have strange fixations on biological processes. One of them was absolutely enthralled with the biological function of "eating," despite not being able to feel anything from it, and ate recovered slain humans' heads.
Insanity and unpredictable behavior based on unforeseen programming errors or corruption over time. This ties into the A.I. mentioned above (that's where the perceived betrayal came from). Another popular example is the Halo series' lore. "Smart" A.I.s like Cortana eventually corrupt themselves by nature of the simulated neural processes and go insane after about 7 years.


Calibration when characteristic function is not known

Question: The prices of the call and put options can be quickly calculated using many methods using the form of the characteristic function. But how to calibrate a model when we don't know the characteristic function? Actually, what models do not provide us a characteristic function?
Comment: I think as(for *any* random variable) the CF always exists for real argument, we should be able to obtain a CF for any option pricing model / distribution assumption. Whether or not that may be cumbersome is a different story, though...
Answer: You are likely thinking of affine stochastic volatility (SV) or Levy models which have characteristic functions that can be obtained via semi-analytic expression. For these types of models Fourier approaches are of the most efficient known approaches.
There are other types of non-affine models that are used for pricing that don't have known characteristic functions, but have their own pricing/calibration algorithms.
For instance local volatility models, where the volatility component is calibrated using approaches like Dupire's method. There are also local SV (LSV) models with their own calibration method. Another example would be in the SABR approach which prices options using a singular perturbation approach (not CF)


Adding calendar events on iPhone

Question: The calendar new event page which you say should have a "Done"  only has cancel or add buttons. Press either and what you have written disappears. No way to save calendar event that I can see
Comment: Which iOS version are you running? Can you add a screenshot?
Answer: The "Add" button is the one you want.
Your phone likely has multiple calendars. It seems like you are currently adding new events to a calendar that is not visible.
First open the calendars app and note the word "calendars" on the bottom center (directly above the home button).  Tap the word to configure which calendars are "visible".  The calendar that you are currently adding events to is not visible.  You can make all calendars visible simultaneously and you should find the events that "disappeared" as you created them.
The second setting to be aware of is "Settings > Mail, Contacts, Calendars > default calendar"  (currently the last entry on that screen).  This determines which calendar new events are added.

Adding calendar events on iPhone


Can't get any quests from Skyrim innkeepers except for Rising at Dawn

Question: I trying to find some quests to do, so I asked an innkeeper for rumors and I got Rising at Dawn. The trouble is, this is the quest that would cure my vampirism, and I don't want to do that. I figure that if I complete the quest anyways, I could still become a vampire again and then maybe I could get some new quests, but what if I get Rising Dawn again? I'd have to do it all over. Am I stuck with this, or have the innkeepers simply run out of quests for me?
Comment: Hmm, I waited three days and all of the innkeepers are giving the same quest.
Comment: Most of the inn keepers have one or other Quest for you..some shrot and some big and needs more than one location to visit.
Answer: Innkeepers mostly give Radiant-generated generic quests, such as killing a giant or a bandit leader. Moreover, you don't need to complete a quest given by an innkeeper before getting another quest from an innkeeper. If you don't mind the Rising at Dawn quest sticking around your quest log, you can simply go to another innkeeper or revisit the innkeeper that gave you that quest after a few days to get more quests.


bridge tap and internet connection?

Question: we have a problem with our internet connection. it is not stable and not as fast as it can be...
Our provider suggested we contact an electrician to " break" (?) The bridge tap. According to him, it can help.
Before I contact an electrician, I wish to understand a little bit about that and to be sure it makes sense?
Thank you for your help!
Comment: Hello, and welcome to Stack Exchange. We'd need more information: what type of provider do you have (cable, fiber, DLS)? Who's your provider? Where are you?
Comment: hi, we have a DLS and we are located in switzerland. the thing is that the connection was fine and suddenly it is bad. and the internet provider cannot explain it. they suggested we contact an electrician to take care of the "bridge tap".... i was trying to look for some information on the internet but didn't find anything... thanks !
Comment: ... whoops... I meant "DSL", and I'm guessing you meant the same...
Answer: The bridge tap basically just means that you have your DSL modem connected to a pair of phone wires that also branches off to (probably) other jacks in your home. All of those jacks are "bridged" together. This could literally be crimped or twisted connections inside your walls, or you might have a wiring closet with more structure, such as all the wires screwed down to posts on a bus.  This is presuming that you're not on a party line and don't have law enforcement or a nosy neighbor physically tapping your phone line (humor?).
Have you recently plugged anything else into any other phone jacks in your home? If you have, then unplug it and see if your performance improves.
Even without other devices plugged into the extension jacks, a "bridge tap" can cause reflections echoing around on the wires which can interfere with the performance of your DSL modem.
What they're really telling you to do is to have a single, unbranched, dedicated phone line for your DSL modem (2 twisted wires technically, but I'd just think of it as a single thin phone cable).
An electrician or knowledgeable friend could help you with this. This is low-voltage, so the installer doesn't really have to be a licensed electrician unless your locality requires it.
Comment: thanks craig for your helpful and explicatif answer (-: i will try to find someone who has some knowledge with those "lines" and tap...
Comment: hi  , i'm still struggling with this issue.... to fix this bridge tap issue, is it in the house or outside normally? do you know where i can find photos or videos which might help? i have tried to look for on the internet and couldn't find something ... my husband is good with this kind of stuff and he has already tried to do some adjustments, but he is not sure as well what he is looking for. he looked at the lines in the house but it didn't give much. hope to get you help!!! thank you.
Answer: Since you said the connection was fine and now suddenly is not, I don't think their suggestion is worthwhile. Even if it was it seems more of a phone company issue rather than electrician but maybe that's different in Switzerland. See https://en.wikipedia.org/wiki/Bridge_tap
I would suspect either your modem (and/or router if a separate component) has developed an issue (I've had several over the years that have degraded over time - possibly due to heat) or a phone line issue (I've had to have our line repaired at least twice in the 20 years we've been here). Could possibly be the filter used on the phone line but I've never heard of one of those going bad.
If you have not already done it, power off your modem and router. Wait 30 seconds and power on the modem. Once it has fully connected, power on the router. If that doesn't fix anything, see if you can borrow a friend's to test.
Comment: yes, i have tried all the basic solutions... and i have asked for a new modem. if that doesn't work, i will try the phone line lead you have given me....as far as i understood, the bridge tap thing might help the quality of the connection but has nothing to do with the stability of the line... thanks a lot for your help! cheers

bridge tap and internet connection?


Speed of electromagnetic waves in vacuum

Question: Why is the speed of all electromagnetic waves the same in vacuum? Please try to explain in a simple manner.
Answer: This comes as a direct result of Maxwell's equations for electromagnetic fields, according to which the speed of an electromagnetic waves depends on the permeability and permittivity of vacuum.
It does not depend on what kind of electromagnetic wave it is.
Different electromagnetic waves will have different frequencies and wavelengths but their speed in vacuum only depends on permeability and permittivity of vaccuum and hence will be the same for all electromagnetic waves


Lightning Component undefined record Id

Question: I am trying to override the standard button on the related list of Quote object using a lightning component [compA]. For some reason, the record id is undefined even if I have force:recordId and an attribute. I would need the recordId to prepopulate a field on my lightning component form and for redirection after the user hits save button. I created another lightning component that displays the record Id and placed it on the Quote record page just for testing and it successfully displays the id. Is there a way for me to get the record Id on my lightning component [compA]?
Answer: You'll have to pass the record Id to your aura component to have it.
Why?
hasRecordId

When your component is invoked in a record context in Lightning Experience or the Salesforce mobile app, the recordId is set to the ID of the record being viewed.

Clicking the "new" button on a related list opens a new page context (it'll be in its own tab) - in this case, it opens the Aura component away from the record (Quote). It no longer has the context of a record page and that is why you have no record Id.
Your test (LWC on Quote record page), which has a record context, and your situation (button on related list that opens new tab) are not the same conditions - hence, why you get different results.

You'd have to leverage a URL button (List Button) on the related list for this to work in that capacity. On the related list, you'd show your custom button and and hide the standard new button.
To do the URL part, you need to leverage IsUrlAddressable so you can use a link to call your Aura component with values - so you'll pass the record Id before it re-directs to your URL from the related list.
Your URL will be /lightning/cmp/c__componentname?c__quoteId={!Quote.Id}

<aura:component implements="lightning:isUrlAddressable,flexipage:availableForAllPageTypes">
<aura:attribute name="quoteId" type="String" />

    <aura:handler name="init" value="{!this}" action="{!c.onPageReferenceChange}"/>

    <aura:handler name="change" value="{!v.pageReference}" action="{!c.onPageReferenceChange}"/>

({
    onPageReferenceChange: function(cmp, evt, helper) {
        var myPageRef = cmp.get("v.pageReference");
        var quoteId = myPageRef.state.c__quoteId;
        cmp.set("v.quoteId", quoteId);
    }
})

Comment: Hi @Kris thank you for your answer! I tried the approach above but whenever my button is clicked, I am being redirected to a page with "This page isn't available in Salesforce Lightning Experience or mobile app". Though I am seeing in the url that it has the correct account Id. Any idea what could went wrong?
Comment: Did you implement isUrlAddressable on the aura component? ``
Comment: Yes I included it as well
Comment: apologies, I edited the answer. You just need to implement `flexipage:availableForAllPageTypes` as well.

Lightning Component undefined record Id


Are school fee receipts good enough as proof of ties for a Canadian Visitor Visa with Family?

Question: I'm applying for a Canadian Visiting Visa with my family. Can I submit the most recent school fees receipt of my kids as part of the documents to prove that we will not remain in Canada after the stipulated period we are applying for?
Comment: You can submit pretty much anything you like if you think it will help your case. Proof that you have paid for schooling in advance will probably help your case, and certainly not hurt it.
Comment: Why do you think you can't?
Comment: I think where you're a citizen would play a big role in this.
Answer: What the government is looking for in the application process is evidence that you plan to return and not try and overstay in Canada.
Any and all evidence that you think might help (Eg school fees indicate your kids are at school in your home country), a letter from your work, maybe a lease agreement - can help.  They may ignore some of it, but more evidence is usually better than too little.


If $u+A$ is a unit in $R/A$, show that $u$ is a unit in $R$.

Question: From this problem we have that $A$ is an ideal of $R$ consisting of nilpotent elements.
Then multiplication is well-defined in the factor ring and $(u+A)(s+A) = 1+A$ for some $s \in R$. So $us+A = 1+A$ and $us-1 \in A$. By hypothesis, $(us-1)^n = 0$ for some $n \in \mathbb{N}$. I am stuck because I know that $R$ is not necessarily a division ring so I can't just use inverses to deduce that $us-1=0$ and $us=1$ which implies that $u$ is a unit in $R$. Help?
Comment: Hint: Do you know that 1 plus a nilpotent is a unit? If so, then the fact that $us$ and $su$ are both units (being 1 more than nilpotents) is sufficient to conclude that $u$ is also a unit. The product must be checked in both orders, because the ring $R$ might not be Dedekind-finite.
Answer: You already arrived at $us = 1- t$ where $t$ is an element of $A$, hence nilpotent.
It is then clear that $1 - t$ is a unit in $R$: $$(1-t)(1+t+t^2+\dotsc)=1.$$
Note that the "infinite sum" is in fact a finite sum, due to the fact that $t$ is nilpotent.


Remove 2nd DC role from Exchange 2016

Question: I have an Exchange 2016 server with the DC role installed (server 2016).
This DC is the 2d DC.
Now a want to remove de DC role from the Exchange 2016 server.
I have already installed an 3th DC.
Are there problemen to remove the DC role from the Exchange 2016 server?
Answer: You cant remove the DC role when Exchange is installed on top of it.
Its a bad practice to do install both role on a server and
Exchange warn in the install to not do so.
Install a second Exchange to migrate all the data, after remove Exchange and the DC role after from that server.
From the doc; https://docs.microsoft.com/en-us/exchange/plan-and-deploy/deployment-ref/ms-exch-setupreadiness-warninginstallexchangerolesondomaincontroller

Demoting a domain controller to a member server isn't supported.
Answer:
Installing Exchange on a domain controller is not recommended by Microsoft.
You can Demoting Domain Controllers and Domains. But removing the AD DS roles with Dism.exe or the Windows PowerShell DISM module after promotion to a Domain Controller is not supported and will prevent the server from booting normally.

I agree with @yagmoth555, like he said, install a second Exchange to migrate all the data first, and then remove the Exchange and the AD DS roles from that server.

Remove 2nd DC role from Exchange 2016


How to use "aggregate" chart feature on Google Sheets

Question: Line graphs and most other types in Google Sheets have a checkbox for "aggregate" in the setup tab.  I've tried looking through the instructions but I can't find any documentation on how to use this feature.  Can anyone point me in the right direction?  An example data set where it's useful would be really helpful.
I've tried enabling it on various charts with different data, but it never changes anything.
Answer: The aggregate feature allows you to aggregate all values that share an identical x-axis key.
Normally, if you have duplicate x-axis keys, your chart will look something like this, with values having the same key forming vertical lines:

(I've increased the width of the lines to make it easier to see what's happening.)
But perhaps this isn't the behavior you want. Perhaps, instead, you want all y-values with the same x-value to be summed, and only the summation to be plotted. The aggregate feature lets you do this.
First, turn on the aggregate feature, and select the desired aggregation method:

After making these edits, instead of y-values with identical x-values resulting in vertical bars, the aggregation of the y-values for a given x-values will be graphed:
Comment: Worked like a charm.
Answer: Also, if using date or datetime, it disables the proportional plotting over the x-axis.
Comment: I guess in this context it is pegging each date to midnight which makes them equispaced
Answer: Excel calls this a "category axis", which was how their 2-1/2-D charts worked. It was always (category, x, y), and only x & y acted like numeric ranges. Their 3-D plot is just a tuple of 2-D plots, rather than a 3-D array. I think you're right that the axis gets transformed. Good find.
I also noticed it reformatted my axis to diagonal after adding in lots of labels for all my minor ticks. (I bet major & minor don't mean anything for an aggregate/category axis).


Coat Of Arms And Goblin Tokens

Question: I currently have a Goblin deck, it constantly racks up 1/1 goblin creatures. I now place Coat Of Arms onto the battlefield. I have 100 1/1 goblin tokens on the battlefield, a goblin warrior and a goblin shaman does this mean each goblin creature gets +3/+3? Do goblin tokens count?
Answer: Each of your creatures (including the token goblins) get +101/+101. I hope your opponent has a sweeper.
I think your confusion comes from misreading the things that are being counted. You don't count the number of different types: each creature counts the number of other creatures that share at least one subtype. (In the card's example, the two Goblin Warriors and Goblin Shaman share the subtype Goblin.)
And yes, the tokens count. They may not be cards (technically they don't count as cards even if you use token-cards), but they are permanents, creatures, and goblins.
Answer: If you have 100 goblin tokens, a goblin warrior, a goblin shaman, and no other player has goblins, warriors and shamans, all your creatures will have +101/+101.
Coat of Arms affects all creatures on the battlefields, counting the number of creatures that share a type, so in your case warrior and shaman don't matter, because each goblin will see 101 other goblins and get +1/+1 for each other goblin. If another player were playing goblins, they would get the same bonus, and it would be bigger. If another player were playing warriors, your goblin warrior would get a bonus from the other player's warriors, but they would get a bonus from your goblin warrior (not the 100s, since those came from being goblins.) A creature with changeling would get a bonus from all creatures on the board, since the changeling has all types.
Door of Destinies is a similar card that cares about casted creatures of a chosen type, not creatures in play. For Door of Destinies, the cast does not need to be successful, just have the right type to add power, and tokens would not add to the size, but would get the bonus, since they are never cast.

Coat Of Arms And Goblin Tokens


What is the difference between "raise" and "rise"?

Question: What is the difference between raise and rise? When and how should I use each one?
Answer: "Raise" when used as a verb is transitive:  it requires that you have a direct object, a noun of some kind that you are applying the verb to.  For example, "I must raise an objection"—"an objection" is the object that the subject (I) is using the verb to act upon.
"Rise" on the other hand, is an intransitive verb:  it does not require a direct object; your sentence can be complete without one.  "Please rise" is entirely correct and complete.
Comment: just curious, are they etymologically related?
Answer: Another data point:
Americans, if they are good workers, get a raise in pay. The British, however, get a rise.


Hiding property of Elgamal-like bit commitment

Question: An Elgamal-like bit commitment scheme:
Let $\langle g \rangle$ be a group of order $n$, where $n$ is a large prime.
Let $h\in_{R}\langle g \rangle\setminus\{1\}$ denotes a random group element such that $\log_{g} h$ is not know to any party, neither the sender nor the receiver.
$commit(u,x):=(g^{u},h^{u+x})$, where $u\in_{R}\mathbb{Z}_{n}$ and $x$ is the value we want to commit to it.

Elgamal-like bit commitment scheme is computationally hiding. The question is, "Is Elgamal-like bit commitment scheme computationally hiding under the discrete logarithm assumption, or decisional Diffie-Hellman (DDH) assumption?"
Comment: Where are you stuck in thinking about this? What information would be most helpful?
Comment: Are you sure you haven't swapped the role of $x$ and $u$?
Comment: @Mikero  yes, I did. I edit it.
Comment: @MarcIlunga I think the scheme is computationally hiding based on discrete logarithm assumption, but I doubt. Maybe knowing discrete logarithm of $u$ be sufficient, but it's not necessary, i.e., it's computationally hiding based on decisional Diffie-Hellman (DDH) assumption.
Answer: Breaking DDH would allow verifying the opening of a commitment x without knowing u. If the space of possible x values is small (EG:{0,1}) then guess and check using DDH is sufficient.
Assume there is some algorithm for opening a commitment. It produces x from the commitment tuple. Given x we can compute H^u = H^(u+x)/H^x. H has a discrete log in base G so this is analogous to the DH assumption set with G^a=H, G^b=G^u and G^(a*b)=H^u=G^(a*u). An algorithm for opening a commitment must find G^(a*b) from G^a and G^b breaking CDH while verifying without u involves deciding if a given G^(a*b) value is correct requiring a solution to the DDH problem.
In the general case with the domain of x being large enough to make guess and check impractical hiding only breaks if the attacker can break DLOG. Either CDH or DLOG gets them H^u which allows finding H^x and then they need DLOG to recover x from that.
Comment: Your general case misses the point; if an attacker can compute the answer to "is this commitment a commitment to the value A", the commitment scheme is considered broken, just as much as a symmetric scheme would be if, an attacker given an encryption of A or encryption of B, could tell which it is.  Practically speaking (as in the case that the committed value has large entropy), it could be safe - however we do have commitment schemes that are secure even if the value only has 1 bit of entropy, so there's little reason to use weaker schemes
Comment: This answer is partially correct and mentions the connection between DDH assumption and the hiding property of this commitment scheme well. I've found a lecture notes that examines this question.
Answer: The decisional Diffie-Hellman (DDH) assumption is needed to prove hiding property of this ElGamal-like bit commitment scheme. This question was examined by this lecture notes [Lecture Notes Cryptographic Protocols, Version 1.8, February 4, 2023 Berry Schoenmakers]

Let $h\in_{R}\langle g \rangle\setminus\{1\}$ denotes a random group element such that $\log_{g} h$ is not known to any party, neither the sender nor the receiver.

Let say $h=g^r$ for some $r\in\mathbb{Z}_{n}$.
Now the reciever tries to obtain some information about $x$ from commit value $commit(u,x)=(g^{u},h^{u+x})$ where $u\in_{R}\mathbb{Z}_{n}$ and $x\in\{0,1\}$.
If $x=0$, $commit(u,x)=(g^{u},h^{u})$ that in DDH tuple form we can write $(h=g^{r},g^{u},h^{u}=g^{ru})$.
If $x=1$, $commit(u,x)=(g^{u},h^{u+1})$ that in tuple form we can write $(h=g^{r},g^{u},h^{u+1}=g^{ru}g^{r})$.
Since nobody knows discrete logarithm of $h=g^{r}$, we can look at $h^{u+1}=g^{ru}g^{r}=g^{ru}h$ as a random element $g^{z}\in\langle g \rangle$ too.
So the receiver ends up to distinguish $(h=g^{r},g^{u},h^{u}=g^{ru})$ from $(h=g^{r},g^{u},h^{u+1}=g^{z})$, i.e., the decidsional Diffie-Helman (DDH) problem.
Comment: DDH and CDH are strictly stronger assumptions than DL in the sense that if the DL assumption breaks then CDH and DDH also fail. The CDH assumption contains DL since an attacker that can find discrete logs can calculate `G^(a*b)` by finding `a` and `b`, The DDH assumption contains CDH since an attacker can verify `G^(a*b)` by recomputing the value with their CDH oracle.
Comment: @RichardThiessen so it means that this scheme is computationally hiding based on DDH assumption?
Comment: Yes, you're exactly right.
Comment: @RichardThiessen I've edited the answer. Is it correct? Specially, the part that tries to connect the attack to DDH assumption.
Comment: Yup, that's correct.


How to bypass a firewall which asks for username and password

Question: Here in my college we have a firewall installed by Fortinet.
Whenever we open Firefox it asks for a username and password ...
Once we enter that, accessing the internet is possible but with very very limited sites. Can you help in finding out a way to bypass this firewall.
I cannot even open the websites which teaches how to make the openvpn server. So it may be Thankful if you may give the description on your page only ,rather pointing a link to do the same
Answer: I think your college knows why they restrict your web access.
If you nonetheless want to hack this, some useful links are found below. The method described (via the proxytunnel program) requires some effort on your side to minimize the preconditions on corporate side:

DAG: Tunneling SSH over HTTP(S)
SSL support with Apache and Proxytunnel

proxytunnel probably is one of the most general and elaborate methods known today to bypass any corporate firewall/web proxy. It even works when a full layer-7 firewall is in effect allowing access to any website, any protocol and any port.
Comment: I tried the Second Method .. but that requires downloading a proxytunnel ...and that is just not possible with the Firewall active on the server .. Anyways i will try to see the first link, which you gave , from other place ! hope I might get a solution there ...


How to convert a sound file to Opus

Question: For testing, I want to convert an MP3 and WAV file I have to Opus, what are the steps to doing this?
Comment: @EvanCarroll "automatic detection of speech or music to decide which encoding mode to use" from http://opus-codec.org/. And of course you will incur a loss in quality. That's why it's a lossy codec. You said that this was never justifiable though and I gave you a good example where size is a huge issue, quality of secondary importance and a lossless source not available.
Comment: @EvanCarroll That depends on what you want to achieve and the quality of the input material. If you're looking for an absolute audiophile solution, you probably never want to consider Opus in the first place. Saying it is a horrible idea is just a horrible statement, when there is no explanation.
Comment: @EvanCarroll Opus has specialized support for speech, MP3 doesn't. This means that you can reduce your podcasts and audiobooks *significantly* in size without any noticeable loss in quality. I fail to see how that is a horrible idea.
Comment: @EvanCarroll Hence the part that says "For testing" ;)
Comment: @LiveWireBT Says that encoding an mp3 in opus is not a horrible idea unless you're looking for an absolute audiophile solution is just a horrible statement, when there is no explanation.
Comment: re: the top. Encoding an mp3 in Opus is a bad idea because you compound the failures of both formats. If you assume MP3 is ABX %5 at 128 kbps, then the Opus is 2% ABX at 128 kbps, the final stream is significantly higher than the 2% rate by Opus, or the 5% rate by MP3. Moreover, it's likely that file has no size advantages whatsoever, and the encoding time is compounded by the second encoding. You get **no benefits whatsoever if you have the mp3 input.** And, **with the original, you get no benefits by using MP3 as an intermediary format.**
Comment: Converting an mp3 to an opus is a horrible idea.
Comment: @Christian Opus deos not have *specialized support* for speech. And, the problems of compounded failures still persist: anytime you encode in opus, you'll incur a loss in quality whether or not it is noticeable is subjective.
Answer: In newer Ubuntu releases the Opus codec is included in the libavcodec libraries that will be installed with ffmpeg. Audio encoding is then done with
ffmpeg -i infile.ext <options> outfile.opus

The audio converter shipped with the opus-tools can convert audio in raw, wave or AIFF format. The minimal syntax uses default settings:
opusenc input.wav output.opus

We may want to add a better bitrate as the default 96 kbps with the option --bitrate N.nnn (for all options consult the manpage for opusenc).
To convert mp3 "on the fly". i.e. without creating a temporary file we can pipe the output from ffmpeg to opusenc like this:
ffmpeg -i input.mp3 -f wav - | opusenc --bitrate 256 - output.opus

Comment: @shevy: it comes with the **opus-tools**.
Comment: To do this on a bunch of flac files: `for f in *.flac; do ffmpeg -i "$f" -f wav - | opusenc --bitrate 140 - "${f%.flac}.opus"; done` (I chose 140 as a bitrate because according to [this](https://wiki.xiph.org/Opus_Recommended_Settings) it's more than enough for stereo files.
Comment: @darkdragon: thank you, added this. Actually libopus was already included in libavcodec from 16.04.
Comment: Where to obtain "opusenc"?
Comment: @shevy:  $ sudo apt install opus-tools
Comment: In Ubuntu 20.04, it works directly with `ffmpeg -i input.mp3 -f opus output.opus`. `sudo apt install ffmpeg` (which includes `libopus0`).
Comment: This isn't Ubuntu related but might be good for Windows users that end up here via Google: piping from ffmpeg to opusenc works on Windows too, but in my case *only* in cmd.exe, not in Powershell.
Answer: Ubuntu 14.04 and Debian 8 ship with version 9 of libav-tools in their repositories, and it has built-in support for Opus through the package libopus0.
Example 1: Reencode an audio file as opus
With version 9 of libav-tools and libopus0 installed you can simply, for example, do:
avconv -i file.mp3 -map 0:a -codec:a opus -b:a 100k -vbr on file.opus

What the options do

-i file.mp3 sets the input file.
-map 0:a will select all audio streams (a) from the input file 0. Read more about -map on https://libav.org/avconv.html#Advanced-options
-codec:a opus selects the opus encoder for the audio streams (a). Read more about -codec on https://libav.org/avconv.html#Main-options.
-b:a 100k sets the audio's bitrate to 100 kilobit/s. Read more about -b on https://libav.org/avconv.html#Codec-AVOptions
-vbr on turns on variable bitrate. This is an option specific for libopus. Here are all options for libopus:
$ avconv -h full | grep opus -A 11
avconv version 9.11-6:9.11-3+b2, Copyright (c) 2000-2013 the Libav developers
  built on Apr  6 2014 17:45:45 with gcc 4.8 (Debian 4.8.2-16)
libopus AVOptions:
-application       <int>   E..A. Intended application type
   voip                    E..A. Favor improved speech intelligibility
   audio                   E..A. Favor faithfulness to the input
   lowdelay                E..A. Restrict to only the lowest delay modes
-frame_duration    <float> E..A. Duration of a frame in milliseconds
-packet_loss       <int>   E..A. Expected packet loss percentage
-vbr               <int>   E..A. Variable bit rate mode
   off                     E..A. Use constant bit rate
   on                      E..A. Use variable bit rate
   constrained             E..A. Use constrained VBR

file.opus sets the output file.

Example 2: Grab the audio from a video file and encode it as opus
Take the second stream of the first input (-map 0:1), which is the audio stream. Encode it with libopus at 100 kbit/s with variable bitrate on:
$ avconv -stats -i linuxactionshowep309-432p.mp4 -map 0:1 -c libopus -b 100k linuxactionshowep309-432p-audio-only.opus
avconv version 9.11-6:9.11-3+b2, Copyright (c) 2000-2013 the Libav developers
  built on Apr  6 2014 17:45:45 with gcc 4.8 (Debian 4.8.2-16)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'linuxactionshowep309-432p.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.33.100
  Duration: 01:14:48.45, start: 0.042667, bitrate: 466 kb/s
    Stream #0.0(und): Video: h264 (High), yuv420p, 768x432 [PAR 1:1 DAR 16:9], 330 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
    Stream #0.1(und): Audio: aac, 48000 Hz, stereo, fltp, 128 kb/s
Output #0, ogg, to 'linuxactionshowep309-432p-audio-only.opus':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.20.3
    Stream #0.0(und): Audio: libopus, 48000 Hz, stereo, flt, 100 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (aac -> libopus)
Press ctrl-c to stop encoding
size=   54360kB time=4488.47 bitrate=  99.2kbits/s
video:0kB audio:53875kB global headers:0kB muxing overhead 0.900602%

With the package mediainfo installed:
$ mediainfo linuxactionshowep309-432p-audio-only.opus
General
Complete name                            : linuxactionshowep309-432p-audio-only.opus
Format                                   : OGG
File size                                : 53.1 MiB
Duration                                 : 1h 14mn
Overall bit rate                         : 99.2 Kbps
Writing application                      : Lavf54.20.3
major_brand                              : isom
minor_version                            : 512
compatible_brands                        : isomiso2avc1mp41

Audio
ID                                       : 2104437746 (0x7D6F2BF2)
Format                                   : Opus
Duration                                 : 1h 14mn
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Writing library                          : Lavf54.20.3

Comment: Works on Ubuntu 14.04 perfectly! Could you explain what `-map 0:a` does? (And maybe detail the entire line?)
Comment: @piña I have updated the answer with an explanation of the arguments and an additional example.
Answer: Opus on 12.04
On 12.04 (Precise), however, there are dependency problems with installing the opus codecs and tools, so I have found by far the best solution is the one that has become available very recently: compile the opus audio encoder and decoder as noted here, and build ffmpeg with opus support by adding --enable-opus to the configure options of ffmpeg (as listed on the compilation guide).
I know that ffmpeg is deprecated in Ubuntu in favour of Libav, but compiling  is a good way to get a fully functioning opus encoder/decoder integrated into ffmpeg itself. You can then use it to convert files (first to wav) and then to .opus. The documentation installed with libopus and ffmpeg will reveal all the options that can be used to convert files.
When converting files with ffmpeg after compilation, you must specify -acodec libopus or ffmpeg will not use the opus codec:
ffmpeg -i pc.wav -ar 48000 -ac 2 -acodec libopus -ab 256k man.opus

You can then test the file created with
ffplay man.opus

Compilation Tips
There's no need to reproduce the guide here in its entirety, but it's worth noting one or two things:

You should first install the dependencies as listed (I omit yasm from the list: see my second point):
 sudo apt-get -y install autoconf build-essential checkinstall git libass-dev libfaac-dev libgpac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev

There is one issue that should be pointed out: the git build seems to want yasm-1.2, and that is not available, so you have to compile the source from the official site, but it is simple. Just remove any installed versions of yasm, then unpack the downloaded archive, cd to the folder, run ./configure && make and then sudo checkinstall.
If any other builds require the earlier version, you can just remove this version and install the repository version.
It is necessary to remove any existing libav, ffmpeg, x264, libvpx, or fdk-aac packages before you start compiling.
It is critical that you compile and install x264, fdk-aac, libvpx and opus before you build ffmpeg, as those libraries will be used in the build.
Do not forget to add --enable-opus to the configure options when you run the ffmpeg compilation.
The version of opus compiled was 1.1alpha, so you may need to re-compile the opus library and ffmpeg in the future again when a new version is released.
You can use ffplay to play any opus files you create.
Comment: @EvanCarroll What do you mean by this? It's only someone's decision to deprecate it: ffmpeg is still as good as libav, which is just a fork of it.
Comment: A great answer, and thanks for the reminder on the Yasm requirement. x264 increased the minimum version to 1.2.0 on their last push. Guide updated with Yasm instructions.
Comment: ffmpeg is a bad solution for anything there is a replacement for.
Comment: @Mik I think he wanted to say that the stand alone encoder will give better results.
Comment: I saw some people mentioned having "opus not found" error when following the instructions to compile ffmpeg. I had the same issue in Ubuntu 12.04, and later found out the PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" needs a slash at the end.
Answer: That's how I do it:

First, open a terminal in the same directory where your audio files are.
Then, type this command:

$ opusenc --bitrate 320 --max-delay 10 "18 - Soul Asylum - Runaway Train (Album Version).flac" "18 - Soul Asylum - Runaway Train (Album Version).opus"
EDIT:
For Audiophiles:
$ opusenc --bitrate 510 --max-delay 10 "18 - Soul Asylum - Runaway Train (Album Version).flac" "18 - Soul Asylum - Runaway Train (Album Version).opus"
No need to specify --maxdelay 10 option because opusenc do this by default.
Console Output for this file conversion (--bitrate 320):
    Encoding using libopus 1.1.2 (audio)
    -----------------------------------------------------
       Input: 44.1kHz 2 channels
      Output: 2 channels (2 coupled)
          20ms packets, 320kbit/sec VBR
     Preskip: 356

    Encoding complete
    -----------------------------------------------------
           Encoded: 4 minutes and 22.4 seconds
           Runtime: 8 seconds
                    (32.8x realtime)
             Wrote: 10955530 bytes, 13120 packets, 13124 pages
           Bitrate: 317.691kbit/s (without overhead)
     Instant rates: 1.2kbit/s to 510.4kbit/s
                    (3 to 1276 bytes per packet)
          Overhead: 4.89% (container+metadata)

It's super fast! Less than 8 seconds with a complexity of 10 (Encoding computational complexity (0-10, default: 10). Zero gives the fastest encodes but lower quality, while 10 gives the highest quality but slower encoding) and a maximum delay time of 10ms (Maximum container delay in milliseconds (0-1000, default: 1000)), so if you skip time in a song, the clipping effect will have a duration of 10ms so it is inperceptible (try with 1000 and hear the difference skipping time with your mouse). Bitrate is VBR by default. 320kbps worked for me so is optional, play with this number:
--bitrate N.nnn => Target bitrate in kbit/sec (6-256 per channel)
By the way, encoding from MP3 to OPUS is not a good idea, it's not going to sound better, their compression algorithms are way too different. But from FLAC or WAV or any other Lossless Audio Format, that's another story.
Note: To encode another file, just press the Up Arrow in the same terminal to call the last command and change the name of the input and output files.
If you are looking for a ffmpeg/avconv GUI, maybe TraGtor is what you need.
You can also check the spectogram differences between Lossless and Lossy formats at high bitrates with Spek or Audacity.
Comment: It didn't work for me. I get `Error parsing input file: Hardvapour remix-.mp3` I'm using 16.04
Comment: The question is about mp3, not flac.
Answer: If only the mp3 to opus route is needed, mpg123 can do the decoding to wav/pcm.
mpg123 -w - input.mp3 | opusenc - output.opus

For the unfamiliar the dash "-" functions as stdout on the left to be piped to opusencs stdin on the right.
Of course ffmpeg is excellent for general media conversion and editing, but its install size and usual distribution dependencies also have a bigger footprint.
Answer:
Find a CD (or flac with CDEMU) with the same content as mp3.
Instal opus-tools and Audex.
Open Audex and add a new profile called Opus, add Command pattern;
opusenc $i --comment="TRACKNUMBER="$trackno""  --artist "$artist" --album "$title" --title "$ttitle" --date "$date" --picture "$cover" $o

and suffix opus

let it rip!

How to convert a sound file to Opus


I didn't think you'd care about what I think/thought/would think of you

Question: What form of the verb "think" should I use in the sentence I didn't think you'd care about what I _____(think) of you. to express "my" disbelief in "your" interest in "my" opinion about "you."?
Answer: I didn't think you'd care about what I _____(think) of you.

think   [A general statement]
or
thought   [at a point in time]
or
was thinking   [ongoing in the past].

Other examples:

Would you care what I think if I hated the movie?
Would you care what I thought of you then?
Would you care what I was thinking during the class?
Answer: Both "think" and "thought" are possible, as is "am thinking"
The tense carries meaning, and so if you mean "What I in general think about you now" you would use the present.  If you mean "What I thought about out at a past time" then use thought.  The present continuous is unlikely in context, but not ungrammatical: "What I am thinking about you right now (unlike what I generally think about you)"
(In theory "will think", "am going to think" are also possible)


Normal for WS2812B LED's to turn on immediately when powered?

Question: Is it normal for all the LED's on a programmable LED strip to turn on as soon as power is applied?   I have 3 strips of WS28182B's, and they're all behaving exactly the same way - the 300 LED's all go to white color, full brightness the instant 5V is connected to the red and white wires.  The green data wire is left open, but grounding it makes no difference.  Neither does a 10uf capacitor across the power leads.  I'm now having an argument with the vendor who claims this is normal behavior.  From everything I've seen and tried in the past, this is not normal, and these are defective strips.   Does anyone have info to the contrary?
Comment: have you in the mean time found an answer to this? I struggle at the moment with the same problem :(
Comment: Can you still control them with a controller?
Comment: Reasonable question, but difficult answer.  My application never requires all 300 LED's to be simultaneously turned on, so my power supply isn't rated for that much current.  Thus, it current-limits as soon as I apply power to the string, which means I can't verify whether the LED's are controllable or not.  So, my question is really whether this LED behavior is sufficient proof that the string is defective, or is there a scenario where a properly functioning strip would default to fully-on at power up?
Comment: @Tobi I changed your question to a comment. You will be able to do that when you get slightly more reputation.
Answer: Yes, this is normal behavior, not all "magic" Leds are the same. They work the same but some of them will start white, this is feature, because You can test them without applying control signal.


Raspberry Pi 2 7" touchscreen display white screen error

Question: I am making a tablet with a Raspberry Pi 2 Model B for a school project. The problem which I have is the screen is blank white. I have checked the wiring with the jumper cable, the ribbon cable is in correctly, and the copper connectors are fitted correctly. I believe it is a driver problem although I can not find any drivers for 7" display. and I would really appreciate if someone can answer my questions.
Comment: I'm sure you must have followed official guide for running it. Posting it anyway. https://www.raspberrypi.org/blog/the-eagerly-awaited-raspberry-pi-display/
Comment: Is this the official RPi display?
Comment: "I am making a tablet with a Raspberry Pi 2 Model B for a school project." That is, frankly, a bad idea.  The raspberry pi's processor is intended for a set-top box with a line power supply, not mobile usage.  And it lacks an LCD interface for direct, native connection to a typical LCD which wants either parallel RGB, or in rare cases LVDS.  There's a reason tablets use the chips they do, and they aren't the one the pi uses.  But regardless of inefficiency, your question is not answerable without the *specifics* of the display *and interface board* being used.
Comment: Yes, this is the official RPi Display
Comment: Finally, I have gotten the screen to work, by re-assembling the Pi and flashing the Micro-SD card, thank you to all who help me solve this issue, Good luck to those who have this problem!
Answer:
I believe it is a driver problem although I can not find any drivers for 7" display

That is not surprising if the only official documentation is this near non-entity, which literally just says plug it in and run apt-get get update.
You are not the first person to have this problem and report it here recently.  I searched through the Foundation's documentation portal on github and "touchscreen" is barely mentioned.  From the troubleshooting page:

My touchscreen doesn't work, or works intermittently

Make sure you've updated Raspbian, see above for steps.
Check the smaller ribbon cable is seated properly

Assuming you've done the first thing, which would be hard to get wrong without knowing it, make absolutely sure about the second one, which would be much easier to be mistaken about; I have done this the camera before.
If none of that works, post a comment on that blog/doc/announcement and ask for suggestions about debugging this problem.  At the very least, if enough people do that they make take notice.
You may also have better luck here by asking specifically what the name of the driver module for the board is, which would provide a clue about what to look for in logs, etc.


CD tray opens by itself

Question: Upgraded from 10.04 lts amd64 to 12.04 lts amd64 on a system running without a glitch for years. Now my CD-ROM burner opens by itself like in the bottom question that was closed by a moderator. A DVD burner is also installed in the system and works correctly. Both are recognized and work in the system. No event is recorded in the event log of the tray opening, which happens randomly.
Closed question:
What is opening/closing CD tray?
I have a fresh install of Ubuntu 11.04, and the CD tray opens and closes all by itself. I cannot detect any pattern to when, or why.
How can I determine what is causing this, and how can I stop it?
Answer: Sounds like a hardware problem from here - you very likely have an intermittent short or a mechanical issue in the button on the front of the drive.  Replace the drive.

CD tray opens by itself


How do I find the ABI/JSON Interface for an ETH/ERC20 contract?

Question: I sent TUSD to my Bittrex holdings to trade for other coins, but it never went into my account with Bittrex. They claim that I sent it to the wrong address. I am trying to recover these tokens so that I don't become homeless again, but as a novice, am finding this to be extremely difficult. I am presently trying to send these same ETH/ERC20 tokens back to my Nano Ledger X via MyEtherWallet.com, but I need the ABI/JSONInterface and don't know where to find that. I am not including the TXID or the EtherScan.io URL here because, as a novice, I don't know if that is a security risk. Thank you in advance for any help that you may be able to provide.
Comment: You can get the TUSD ABI from Etherscan https://etherscan.io/address/0x8dd5fbce2f6a956c3022ba3663759011dd51e73e#code.
Answer: The ERC-20 is a public standard which means contracts all have to support the identical ABI. You'll find the ERC-20 ABI on many places online, e.g., https://ethereumdev.io/abi-for-erc20-contract-on-ethereum/.
As a general rule, if you want to communicate with a contract that does not follow any standards, you will need the ABI from the creator of the contract somehow. Verified contracts on Etherscan provide the ABI under the 'Contract' tab.

I am not including the TXID or the EtherScan.io URL here because, as a novice, I don't know if that is a security risk.

That's all public information and not a security risk.
Comment: Thank you very much! I just found it before finding your response, following these steps, (for anyone else reading this thread):
Comment: Thank you very much Markus! I just found it before finding your response, following these steps provided to me by a coder, (for the benefit of anyone else reading this thread): 1. click on etherscan link (etherscan.io) Thank you also Markus, for letting me know that sharing the URL for the "report" at EtherScan.io is not a security risk.
2. click on hypertext link under the "To:" row.
3. in the new page, click on the "Contract" tab which has a little green checkmark
4. scroll down and you will see a section titled "Contract ABI" with abi underneath
Comment: While the TXID is "public information", the connection to the asker's SO account is not. Might not be much of a security risk, but certainly a privacy risk.


Lease mismatch LeaseExpiredException

Question: I have seen some posts on this topic, but I could not figure the fix to my problem. I am using Hadoop version Hadoop 2.0.0-cdh4.2.0, and java version "1.7.0_09-icedtea".  I am running a program that utilizes counters to control interations in a simple mapreduce example. I also employ sequence files for communicating data. The code is simple: It starts with a number, say, 3. The mapper doesn't modify the number, but simply transmits the value; the reducer reduces the number by 1 each time it runs. The counter is increamented, if the number is greater than zero. Eventually, the nummber must decrease to 0, and the program should stop at that point. However, I always get the following error after the first iteration (during the second iteration):
" Running job: job_201304151408_0181
13/05/10 18:55:54 INFO mapred.JobClient:  map 0% reduce 0%
13/05/10 18:56:03 INFO mapred.JobClient:  map 100% reduce 0%
13/05/10 18:56:10 INFO mapred.JobClient:  map 100% reduce 33%

13/05/10 18:56:11 INFO mapred.JobClient: Task Id : attempt_201304151408_0181_r_000002_0, Status : FAILED
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.LeaseExpiredException): Lease mismatch on /user/harsha/iterone/import/data owned by DFSClient_NONMAPREDUCE_-592566041_1 but is accessed by DFSClient_NONMAPREDUCE_-965911637_1"

Can anyone please help? Thank you.
Regards...
Answer: Usually Lease Mismatch happens if we are trying to write into a file which is not existing.
Please check if /user/harsha/iterone/import/data is in hdfs.
Is that a file?

Lease mismatch LeaseExpiredException


Is the $\infty$-category of stable $\infty$-categories stable?

Question: More generally, are there any remarkable properties enjoyed by the $\infty$-category of stable $\infty$-categories?
Comment: @Fernando: The categories of DGAs or ring spectra aren't stable, but these aren't the same as the categories of functors between their module categories.  E.g. the category of R-S bimodules (which is stable) maps to the category of functors S-mod -> R-mod.
Comment: Problably not, the problem is with the multiplicative structure (composition), e.g. the categories of DGAs or ring spectra are not stable.
Comment: @Fernando: Can you explain your comment? Are you saying that a DGA (or a ring spectrum) is somehow analogous to a stable $\infty$-category?
Comment: @Tom: I'm thinking of the $\infty$-category of $\infty$-categories as a non-additive analog of the Morita model category of DG-algebras, or more generally DG-categories. This idea links up with Tyler's comment.

@Tyler: you're right, but somehow bimodules represent morphisms, so the stable $\infty$-categories or morphisms in the $\infty$-category of $\infty$-categories would be stable, but not necessarily the $\infty$-category of $\infty$-categories itself. (This looks like a tongue twister!).

I'll try to think of how to properly explain what I mean. I might eventually produce a (counter)exm.
Answer: No.  It's pointed by the zero category, but then taking loops of a stable category C (in the sense of the pullback of 0 --> C along itself) always gives the zero category, so loops is definitely not an equivalence.
One important structural feature of the category of stable categories along these lines is that it has some nice cofiber sequences (Verdier localization sequences), but I'm not sure the categorical properties these satisfy have been axiomatized (into a possible definition of ``stable (infty,2)-category''?)
Comment: To elaborate on Dustin's second paragraph, if $A\to B\to C$ is a Verdier localization sequence, then the square
$$\matrix{A&\longrightarrow&B\cr \downarrow &&\downarrow\cr 0&\longrightarrow&C}$$ is both a pushout square and a pullback square, a suggestively stable property. I am curious which squares of stable categories should be considered exact. In a stable category, the question of exact squares reduces to exact sequences, but I don't see any symmetric way of making such a definition for squares of stable categories.
Comment: As pretriangulated dg-categories are models for k-linear stable (infinity,1)-categories (for k being a field of characteristic zero), maybe it is of some relevance to compare what Tamarkin and Batanin had to say in their works on the question "What the dg-categories make ?"


Why should I call self=[super init]

Question: Let's say I create my class and its init method. Why should I call and return value of superclass init assigned to self? Which cases it covers?
I would appreciate examples why would I need it for Cocoa superclass and non-Cocoa.
Answer: You mean why
self = [super init];

rather than
[super init];

Two reasons:

in initialisation, failure is indicated by returning nil.  You need to know if initialisation of the super object failed.
the super class might choose to replace the self returned by +alloc with a different object.  This is rare but happens most frequently with class clusters.

Edited in response to Michael's comment:

I can understand why I need to save and return [super init]. But is it just convention and good looking makes us use self as a temporary variable to pass result along?

No.  Instance variables are accessed relative to the self pointer, so in the following:
-(id) init
{
    self = [super init];
    if (self != nil)
    {
        myBoolIvar = YES;
       // The above is an implicit version of self->myBoolIvar = YES;
    }
    return self;
}

self has clearly got to point to the right block of memory i.e. the one you are going to return.

The other point is that if super init returns different class instance then the rest of the code after that line may not even make sense, lead to memory leaks and crashes, not even talking about the object instantiated from that class.

That could be a problem.  If I subclassed NSNumber and [super init] decided to return an NSString (which it could - there's nothing to stop it) that would clearly be a disaster.  Whatever super returns from -init must be "compatible" with the subclass in the sense of providing space for ivars and being further subclassible or it's a horrendous bug (unless, of course, the problem is documented).  So, in general, you don't need to worry about checking the class.  However, do read the documentation.  See for instance the section on subclassing NSString in NSString's docs.
Comment: Good catch with the much overlooked reason two. Nice answer!
Comment: so there are two points I would like to clarify. To bubble `init` results from top to my class and my subclasses, I can understand why I need to save and return `[super init]`. But is it just convention and good looking makes us use self as a temporary variable to pass result along? The other point is that if `super init` returns different class instance then the rest of the code after that line may not even make sense, lead to memory leaks and crashes, not even talking about the object instantiated from that class. So I may also need to check the class returned by `super init`.
Comment: thanks for update indeed. That explains and made a lot more clear for me. Will need to ask couple more questions to draw full picture in my head, will do that in separate question.
Answer: I know it is a little bit late for my answer, but I cannot stop myself from posting a link which I found very useful in clearing my doubt about this problem.
Matt Gallagher: What does it mean when you assign [super init] to self?
EDIT: As per the comments, here are the essential points in the link
To understand why self=[super init]; we need to consider many points. Let's tackle it one by one.
What is self
Every method has two hidden parameters: self and _cmd. So the method call
- (id)initWithString:(NSString *)aString

is changed by compiler into a function call like this
id initWithString(id self, SEL _cmd, NSString *aString);

Why do we need self?
The reality is that the compiler uses the self parameter to resolve any reference to an instance variable inside a method.
Suppose that we have a method setValueToZero and value is an instance variable of the class it belongs to, then the implementation
- (void)setValueToZero
{
    value = 0;
}

will be converted by the compiler into a function like this
void setValueToZero(id self, SEL _cmd)
{
    self->value = 0;
}

Do self already have a value when init is called?
Following is an example of a typical object creation and initialization.
[[MyClass alloc] initWithString:@"someString"]

Here, by the time we get into the initWithString method, self will have the newly allocated object as its value (i.e., the return value from [MyClass alloc]). In fact, it is almost guaranteed to be the correct, final value.
Why self = [super init];?
It is because [super init] is permitted to do one of the three things:

Return its own receiver (the self pointer doesn't change) with inherited instance values initialized.
Return a different object with inherited instance values initialized.
Return nil, indicating failure.

In the first case, assignment has no effect on self. In the third case, the initialization has failed, self is set to nil and it is returned.
The reason behind assignment to self is with the second case. Consider the following
- (id)initWithString:(NSString *)aString
{
    self = [super init];
    if (self)
    {
        instanceString = [aString retain];
    }
    return self;
}

We want the conversion from
instanceString = [aString retain];

to
self->instanceString = [aString retain];

to act on the correct value and thus we have to change the value of self.
When would [super init] return a different object?
In one of the following situations

Singleton object (always returns the singleton instead of any subsequent allocation)
Other unique objects ([NSNumber numberWithInteger:0] always returns the global "zero" object)
Class clusters substitute private subclasses when you initialize an instance of the superclass.
Classes which choose to reallocate the same (or compatible) class based on parameters passed into the initializer.

In all but the final case, continuing to initialize the returned object if it changes is a mistake — the returned object is already completely initialized and isn't necessary related to your class anymore. So a better init approach will be as follows
- (id)initWithString:(NSString *)aString
{
    id result = [super init];
    if (self == result)
    {
        instanceString = [aString retain];
    }
    return result;
}

Conclusion
You don't need to assign [super init] to self to make most classes work. In some obscure cases, it is actually the wrong thing to do.
So why do we continue to assign to self? It's the traditional template for an initializer, and although it's wrong in some cases, it is right in other cases which have been written to expect this approach.
Comment: As per Josh's comment, please can you include the essential parts of the linked article in your answer, and provide the [link for reference](http://meta.stackexchange.com/q/8259). Failing to do that leaves the answer at risk from link rot and deletion.
Comment: Great answer except for the *a better init approach*.  That is completely wrong;  it is not safe to assume that the different object will be initialized.   Look at `NSString`;  the `init` methods pretty much always return a different instance, but they *are not pre-existing instances*.   If you are looking to enforce singletons, then *that must be done prior to the call to `init` and *must* be outside initialization flow *or* your subclass initializers must be aware of the singleton pattern employed.
Answer: Basically every Objective-C class is a subclass. It's either some class you've specified or NSObject.
In the subclass (your class that you're working on) you call
self = [super init]
What this basically does is calls the super class's (the ones I mentioned above) init method (the constructor) and assigns it to the current class.
This makes sure that the superclasses' initializing method is called.
Now for
If(self)
This basically checks if the above piece of code worked.
This is done to insure that if you call some Instance Variable of the super class, you'll be able to do so.
Answer: In most cases, setting self to [super init] does nothing since [super init] will wind up returning self anyway. There are some rare cases, however, where [super init] will return something different. It may return nil if it fails to initialize the superclass for some reason or it may decide to return a completely different object.
Answer: Source

Implementing The Designated Initializer
**
self
**
Inside a method, self is an implicit local variable. There is no need to declare it, and it is automatically set to point to the object that was sent the message. (Something like this in Android programming.) Typically, self is used that an object can send a message to itself. Example here:
 return self;

**
super
**
When we overriding a method, we want to keep what method of the superclass is doing and have your subclass add something new on that. To make it easier, there is compiler directive in Objective-C called super.
How does super work? Usually when you send a message to an object, the search for a method of that name starts in the object's class. If there is no such method, the search continues in the superclass of the object. The search will continue up the inheritance hierarchy until a suitable method is found. (If it gets to the top of the hierarchy and no method is found, an exception is thrown).
When we send a message to super, we are sending message to self, but the search for the method skips the object's class and start at the superclass. In the above case, we send init message to super. This calls NSObject's init method.
Answer: Because you have to initialize the object somehow, and presumably you want to do any initialization a superclass required be done, since you're descending from it.
Comment: If you `return [super init]` you might as well not bother with an init method at all - then `[super init]` will effectively be called directly.
Comment: And what is self then? You are saying "I am now the object that `[super init]` returns."
Comment: then why can't I just call `[super init]` without returning the result as self? self is modified locally anyway as far as I understand.
Comment: so doing `return [super init]` is not valid? If I modify self it will be only in the scope of `init` method

Why should I call self=[super init]


Citizenship status and work application

Question: I am within one to two weeks from taking an oath of citizenship in Canada and was applying for work that favours applicants with citizenship. When the application website asks what is my citizenship status, should I click "citizenship"?
Comment: Yes, you should mark yourself down as having citizenship if you will have it very soon. If you can add a note, you should just mark down what date you will have it on.
Comment: The number of jobs in Canada that are *allowed* to selectively hire based on citizenship is very small. Pretty much has to be a sensitive government job.
Answer: Click yes and add a note (if possible) that mentions the date.
Your citizenship status with expected date should be on your resume anyway so you are providing complete information to the potential employer (who may or may not look at it).
If you want to be extra safe: If they contact you BEFORE you get the citizenship, just mention the upcoming festivities to your first contact person.
Answer: There is no black and white when it comes to "lying". I think this is one of those situations where being truthful is actually misleading.
If you would have citizenship when you would potentially be working, I think that's a trivially defensible decision to indicate you are a citizen during the application process, because for all intents and purposes you are a citizen.
If you can, you should add a small note somewhere in the application that indicates the expected date of citizenship.
Answer: There may be Legal implications for ticking the box that you are a Citizen, when you aren't technically yet a Citizen - depending on the finer details of the application.
It's also generally not a good idea to lie or otherwise mislead on a Job Application.
That all said...
My completely non-legal opinion is that if you've done all the Paperwork, Paid the fee, had the checks done, met the requirements and are merely waiting on the formality of the Oath to the King (still feels weird not saying Queen) and getting the certificate and you have a set date to do those, it's probably fine to tick the box.
Comment: Also note that the field is probably about if the candidate will need a special visa to work. As it's unlikely the candidate will be starting work within two weeks, the most correct answer is probably: citizen.

Citizenship status and work application


How can RSA be used to compactly sign and encrypt?

Question: How can RSA be used for digital signature with message recovery and encryption, providing transmission of a small message with confidentiality and authentication simultaneously, small cryptogram size, and little or no reliance on symmetric/hybrid encryption?
Comment: What is the source of this question? What did you search on our site and not clear for you?
Answer: Re-using RSA key pairs for both encryption and signing is catastrophic, since it leaks the private key. So two pairs of keys will be needed.
RSAES-OAEP is a system that allows RSA to encrypt short (shorter than the modulus) messages. It's slow, and the length restriction is a big limit, but it does work.
RSASSA-PSS is a system for signing messages using RSA.
So encrypt using RSAES-OAEP and the recipient's encryption public key, then sign the ciphertext using RSASSA-PSS and the sender's private key.
A better solution is to use static-ephemeral ECDH to  create a shared secret between the recipient's static key and the sender's ephemeral key, then encrypt the message using an AEAD like AES-GCM-SIV, and sign the whole ciphertext+IV+Tag using RSASSA-PSS.
Comment: Using an RSA key for both encryption and signing is a bad idea, but it isn't catastrophic. All the PKCS#1 modes of operation have domain separation so a ciphertext is never equal to a signature. Even without domain separation, it wouldn't leak the key. However, using a single private/public key pair for confidentiality and authenticity of the same message doesn't work (regardless of the scheme) as a public-key scheme since the decryptor needs a private key and the verifier needs a public key — hence the two-key-pair approach you describe.
Comment: If they're using the private key to generate signatures, and to read RSA encrypted messages (that someone else encrypted with the public key), they have no need to send the private key to anyone.  That is the normal meaning of "using the same key for encryption and signatures".
Comment: Right, *if* they're using appropriate padding & modes of operation. But if they're re-using a key pair for signing and encryption (and thus giving away the private key to the decryptor) it's pretty damn catastrophic.
Answer: Digital signature with message recovery does not provide confidentiality. It transmits a message with proof of origin and assurance of integrity, in a more compact way than transmitting the message and its signature separately. It happens that the message is unintelligible without the signer's public key, but since it is public, there's no assurance of confidentiality. In order to add confidentiality, we need encryption, and that requires another public/private key pair, this time owned by the receiver, for the additional encryption.

Say Alice wants to send a short message $M$ to Bob, signed and encrypted. I'll describe one option: encrypt-then-sign, with encrypt per RSAES-OAEP, and signature per textbook RSA signature (that is, with message recovery), which can be secure in this case.
Preliminaries:

Parties agree on an RSA modulus bit size $\ell$ (say 4096-bit) and RSAES-OAEP parameters (say SHA-512 hash, MGF1 with that hash, empty label). These choices define cryptogram size $k=\left\lceil\ell/8\right\rceil\,$bytes and maximum length of the message $k-2\,\text{hLen}-2\,$bytes (here 512-byte cryptogram holding up-to-382-byte message).
Alice draws a Public/Private RSA signature key pair $(n_{\text{As}},e_{\text{As}})$/$(n_{\text{As}},d_{\text{As}})$, with $3\cdot2^{\ell-2}<n_{\text{As}}<2^\ell$.
Bob draws a Public/Private RSA encryption key pair $(n_{\text{Be}},e_{\text{Be}})$/$(n_{\text{Be}},d_{\text{Be}})$, with $2^{\ell-1}<n_{\text{Be}}<3\cdot2^{\ell-2}$, thus $2^{\ell-1}<n_{\text{Be}}<n_{\text{As}}<2^\ell$, which we'll need for correctness.
Bob obtains Alice's $(n_{\text{As}},e_{\text{As}})$ in a way insuring he can trust it (that could be in a public-key certificate).
Alice obtains Bob's $(n_{\text{Be}},e_{\text{Be}})$ in a way insuring she can trust it (that could be in a public-key certificate).

Encryption and signature:

Alice encrypts $M$ per RSAES-OAEP with Bob's public encryption key $(n_{\text{Be}},e_{\text{Be}})$, stopping after step 3b. That yields integer $c\gets m(M,\text{PS})^{e_{\text{Be}}}\bmod n_{\text{Be}}$, where $m$ has applied OAEP padding to $M$ with randomness $\text{PS}$.
Alice textbook-RSA-signs $c$ as $s\gets c^{d_{\text{As}}}\bmod n_{\text{As}}$.
Alice transforms $s$ to bytestring $S$ and outputs it, as in RSAES-OAEP encryption steps 3c and 4, and sends it to Bob in a manner such that he can presume the message is from Alice.

Signature verification and decryption

Bob gets the alleged $S$ and that it is allegedly from Alice, thus fetches the corresponding trusted public key $(n_{\text{As}},e_{\text{As}})$
Bob checks $S$ is $k$-byte as in RSAES-OAEP decryption step 1b
Bob decodes $S$ into into $s$ as in RSAES-OAEP decryption step 2a
Bob checks $s<n_{\text{As}}$
Bob computes $c\gets s^{e_{\text{As}}}\bmod n_{\text{As}}$
Bob performs RSAES-OAEP decryption with 1b and 2a modified as above, yielding $M$ or an error indication.

Bob has insurance that $M$ is from Alice and has been neither tampered with nor intercepted. Argument: after step 1 of encryption, $c$ is indistinguishable from random in range $[0,n_{\text{Be}})$ by anyone but Bob. That $c$ is thus in $[0,n_{\text{As}})$, so that textbok-RSA signature is correctly undone in decryption step 5; and is is sufficiently random in that interval for security of textbook-RSA signature followed by the stringent redundancy check of RSAES-OAEP operating on a different modulus.

As is, each participant needs a different key pair for signature and encryption. This is the academically correct way (one function, one key). But some practitioners want a single key pair for each participant.
Simplest:

Alice ensures that she's not encrypting with an $n_{\text B}$ matching her $n_{\text{A}}$, for that could break the confidentiality. This implies Alice can't encrypt toward herself (which is sometime useful, e.g. for a password, or the symmetric key of a large file).
Encryption step 1 is repeated until $c<n_{\text{A}}$.

One folklore method with the same limitation against encrypting to self, but avoiding iteration of encryption:

Signature step 2 is changed to $s\gets\left(\min\left(c,n_\text{B}-c\right)\right)^{d_{\text{A}}}\bmod n_{\text{A}}$
Conversely, in verification step 6, after step 2b of RSAES-OAEP decryption, it should be performed $m\gets\min(m,n_\text{B}-m)$. That will ensure decryption succeeds. But Bob should be careful not to leak information about $m$ in this extra step, in particular no measurable time dependency on the high-order bytes of $m$, otherwise a minor adaptation of Daniel Bleichenbacher's Chosen ciphertext attacks against protocols based on the RSA encryption standard PKCS #1 (in proceedings of Crypto 1998) can be used to decipher messages encrypted to Bob, or forge a signature by Bob.


Unequal distribution of dependent variable

Question: I performed a logistic regression on my data where the dependent binary variable $Y$ have $0$ & $1$ values and the independent variables $X$ being binary as well as continuous. The regression results suggest that none of my three $X$ variables have $p<0.05$ which is very disappointing as I strongly believed them to be affecting the outcome of $Y$. Stratifying the data makes no difference as well. I can't help but think there might be some problem with my data. So I noticed that only $13\%$ of the observations $(n = 4080)$ actually have $1$ as $Y$ value. So a huge majority have $0$ and maybe this is causing the regression to show no statistically significant relation? Also all $X$ variables are different from each other so there is no multi colinearity. I'm new to statistics so I just want to make sure the data is not the issue here. Or is it that I was wrong all along and there might not be a relation after all. Any thoughts?
Answer: You're right, you should be slightly concerned about the power of your analysis. In general, 50% 1s and 0s will lead to more power.. but that's only half the story. 400 successes and 3600 failures is typically a LOT of power, depending on the distribution of the $X$ values.
Cross tabulate values of each $X$ variable and $Y$ as well (assuming $X$ is categorical as well). ``A chain is only as strong as its weakest link'' comes to mind: the power of the logistic regression model to detect an association will generally be greatly limited by the smallest cell count in the model.
This is because for a log odds ratio (natural parameter for a logistic regression model, in the $2 \times 2$ contingency table for outcomes:
$$ \begin{array}{c|cc} & Y & \bar{Y}  \\ \hline X & A & B \\ \bar{X} & C& D \\ \end{array}$$
the log odds ratio $LOR = \log \frac{AD}{BC}$ has standard error:
$\mbox{se} ( LOR)^2 = 1/ A + 1/B + 1/C + 1/D$
So, the larger $A, B, C$ and $D$ are, the closer those fractions are to 0, and the mutual se is closer to 0.
Comment: I think you are correct, crosstabs doesn't show any statistical significance as well. 70% of observations with Y value 0 have X value 0 but also same 70% of observations with Y value 1 have X value 0. So no relation I guess.
Comment: @Salman are there 0 counts in these cells? Or counts of, say, less than 10?
Comment: No there are no such small counts. The minimum count is 127
Comment: @Salman then you should have high power. That means the results strongly suggest there is no association, unless you've run your model incorrectly.
Answer: From my understanding of Logistic regression, you want to check that each category of yes/no's or 1/0's has a count >10*(p-1), where p is the number of covariates + 1 (for the intercept). If this holds true, you should be good as far as your dependent variables go. There is good reasoning to have closer to a 50/50 ratio of 1/0's but you don't have to.
Have you considered checking for Goodness of Fit using a Hosmer-Lemeshow test Statistic to see if logistic regression is appropriate with your covariates?  To do in R, you can use this code
<code>library(ResourceSelection)
hoslem.test()$p.value #look up the parameters in R's help file
</code>
If you aren't using R, I'm not sure how to do this test.
Comment: Hmmm, my data does not have the 50/50 distribution but it satisfies the condition you mentioned easily. Yes Hosmer Lemershow test also shows a 0.129 which is a good fit i guess? But it doesn't change the fact that there is still no statistical significance shown by logistic regression.
Comment: P value > than alpha means there is no evidence against the usefulness of logistic regression, i.e. your data passes the Homser-Lemeshow test.  As far as your covariates go, how are you checking for statistical significance?


Reference request: neocortex creating 11 dimensional structures

Question: I've come across several pop science articles like this one that vaguely describe a method of analyzing brain tissue involving algebraic topology and 11 dimensional structures. They all seem to cite each other. One of the researchers involved was Kathryn Hess. I've searched the web, a community college library, and the UCLA library and haven't been able to find the original paper. Does anyone know where I could learn more about their methods?
Comment: Welcome to Biology.SE! You say `They all seem to cite each other`. It would help if you could directly tell us what papers you found and eventually why it feels like they all just cite each other.
Answer: I finally found the work. It was in the sources of the sources of the article that I gave as an example.
Comment: you should edit your question not answer it, especially just to add and not answer.
Answer: New Frontiers is surrounded by controversy mostly becasue they have no restrictions about what they publish regardless of methodology or ethics. They also fired a bunch of their editors for trying to impose some scientific integrity. The fact the "journal" is owned by the first authors to publish in it is another bad sign. You can safely assume anything published by Frontiers is garbage.
Comment: That's a shame I thought the mathematical model that the researchers developed was really cool. I didn't pay much attention to their methods though.


What is the maximum number of attribute points and ability points?

Question: Trying to plan my ability trees and stats, including points received from books and any other source I don't know, how many points can be obtained without modding the game?
Answer: 150/154* attribute points and 51/53 talent points:

147 attribute points and 49 talent points from leveling to the cap of 50
3 attribute points and 2 talent points from Tomes of Mortal Vessel and Tomes of Technique, respectively

The Black Emporium DLC includes the following:

4 attribute points and 1 talent point from the same types of tomes mentioned above
1 talent point from either the Elixir of Arcane Technique or the Elixir of Physical Technique. Like the tomes in Dragon Age: Origins, these items are class restricted so you can't use both.

I asterisked the number because you can gain additional attribute points and talent points from the following:
Act I:

 Completing the quest Dark Epiphany to receive Avernus's Experimental Draught nets you 2 attribute points. This quest is only available if you've played Dragon Age: Origins, completed the Warden's Keep DLC, and spared Avernus at the end.

Act II:

 Completing the quest Night Terrors can lead to receiving 4 attribute points for solving puzzles and, depending on your dialogue choices, an additional 6 attribute points or 1 talent point.

 Reading any of the evil tomes in the quest Forbidden Knowledge nets you 2 attribute points. Once you use this option, it won't appear in any of the other books.

Act III:
Nothing of note.
Comment: Does your first spoiler for Act 2 account for the puzzles, or just the dialogue? I believe the puzzles can net you even more than that.
Comment: @Sapph just the dialogue, but I've added the puzzles as well. Thanks for the heads up.
Answer: The "hard" level cap might be 50, but a normal play through won't go anywhere near that.  Expect to finish at level ~22/23.  To be safe, let us assume level 22.  That means 21*3 for 63 attribute points from leveling, and 21 ability points from leveling.  Anything beyond that is gravy.
Mark Trapp correctly lists the availability of bought items to increase stats.  So, add points as appropriate to your game.
However, he neglects a quests which can also reward the player with more attribute and (less commonly) ability points.  I think you get earn 6-8 more attributes, but I only one additional ability point.
Comment: I was going to comment on the absence of that quest line in the previous answer, but wasn't sure how to add spoiler tags to a comment.
Comment: @anthony137 and @Damon: I'm pretty sure I got all three quests that yield possible point gains. If I'm missing something else, I'd love to know what quest you're referring to.
Comment: @Mark The second Act II spoiler is what I was thinking of.


Carnage Amongst The Tribes/Amongst the Stars Tagging?

Question: This is sort of an anal question, but is there a better tag for Carnage Amongst the Tribes/Stars than [catt]? [carnage-amongst-the-tribes] is too long. I updated my answer to the release date question and got all fussy; feel free to claim I'm being too nitpicky here. :)
Answer: You're being too nitpicky.  I don't think we can/should police tags for all 2000+ RPGs in existence.  I assume if someone is posting for some fringe game, they're more in trouch with how its adherents abbreviate/refer to it than we are.  At most we just need to merge dupes.
Answer: What about "threesixteen"?  Isn't that better, since they're the same game?


How am I able to export all of my applications' names on my Mac into a CSV or TXT file?

Question: How am I able to export all of my applications' names on my Mac into a CSV or TXT file? I am currently running OS X Yosemite 10.10.3.
Comment: When you say _"all of my applications"_, do you mean in the `/Applications` folder or all executables on the filesystem everywhere?
Comment: I mean the `/Applications` folder.
Comment: It is possible to select all of the applications, copy them, then paste into a text file.
Answer: In a Terminal:
mdfind kMDItemKind="Application" > ~/Desktop/apps.txt

This will create a file named apps.txt on your Desktop, containing the full paths for everything that OS X considers to be an "Application" on your system.
This is might be a lot more than you want. You can limit the search to a given folder by adding -onlyin <dir>, so:
mdfind -onlyin /Applications kMDItemKind="Application" > ~/Desktop/apps.txt

will limit the search to the /Applications folder (and its subfolders). Note that you might also have apps under ~/Applications, i.e., inside your Home folder.
In which case, you would call onlyin again:
mdfind -onlyin /Applications -onlyin ~/Applications kMDItemKind="Application" > ~/Desktop/apps.txt

Answer:
Within Finder, open the application folder
Select All (command+A) and then Copy (command+C)
Open a new document in TextEdit
Now go to Edit > Paste and Match Style (or use optionshiftcommand+V)
Save the text file
Comment: simple & accurate answer.


What is the best way to lock down a terminal services user (via RDP) on 2008 Server

Question: I want my RDP users into Terminal Services to be able to open only one specific program for now and that's it.  I don't want them going to Control Panel, Other program etc.  What is the best way to do this?  I have looked into the LGPE for Software Restriction Policies but that doesn't seem to be that great. Any thoughts?  Also, we don't have active directory, it's not a domain of any kind, it's just a stand-alone 2008 Std Win Server.
Answer: Software Restriction Policies - More info in that link, links at the bottom for help getting started.