How do you version your Oracle database changes?

Question: I am interested to know what methods other people are using to keep track of changes made to the database including table definition changes, new objects, packages changes, etc.  Do you use flat files with an external version control system?  Triggers? Other software?
Comment: This is really similar to http://dba.stackexchange.com/questions/2/keeping-track-of-schema-changes - you might get some non-Oracle-specific ideas for this from there!
Comment: @Gaurav I saw that, but I wanted some Oracle specific answers.
Comment: Not what you were asking for but related: [edition based redefinition](http://stackoverflow.com/questions/2146211/suggestions-for-an-oracle-version-control-system/2146848#2146848)
Answer: At the sites I've worked at, any changes that need to be made to the production instance(s) must be scripted as change scripts that will run in SQL*Plus; in addition, scripts needed to recreate all schema objects from scratch must be kept up-to-date. All these scripts are checked into change control, and are migrated from there.
You can audit DDL changes or use DDL triggers to pick up changes, or even use diff software to compare two instances, but these methods are indiscriminate; often a developer will make and undo a number of changes to a schema (e.g. little test changes, creating dummy tables to test out concepts, etc) before working out what exactly needs to be changed.
Comment: My workplace has a similar workflow to the one mentioned here
Answer: I have thought and read a lot about this topic. This is a broad topic of configuration control and change management strategy. CMMI has a domain in this topic. Even in companies which has a accreditation of CMMI 3-5, they sometimes do not version control their databases.
This question should be answered while keeping in mind following constraints.

You have a keeper and every DDL is executed by this keeper.
Other People have ability to execute DDL statements.
You need only to log what changes has been done but you do not need to compare vast differences.
Your database design is done via external tool then is published to database. This external tool can be DDL scripts in source control even. But key point is you source control this then publish to database.
You do not need to know instantaneous changes but from time to time: i.e. hourly, daily.
You have a defined server structure: Development, Test, Production. And a good testing strategy.

Answer 1

if 1 ,4,6 is true then you can use an external source control. For example

Embercadero has a database change management tool (http://www.embarcadero.com/products/db-change-manager-xe). Which has ability to reverse engineer a database (Oracle) and put it in their source control. Then any number of developer, dba can reach this schema and make changes to it.
Oracle SQL Designer is similar to this approach.
Putting you create table scripts to source control (svn, mercurial etc) and maintaining them also same thing.
http://www.liquibase.org is automated approach of above.
I wrote code generator which generated DAL (Data Access Layer), DDL (Create Table) statements. We put them source control and maintained there. I think dedicated solution like liquibase may work better.

This approach works well if have 6. You put DDL statements,which is also a code, in source control  and maintain it. Nobody will change Test and Production Servers without due consideration.
Disadvantages is if you make any changes to production or test servers for any reason, a quick bug fix, primary key change etc. You need to roll that changes to development server also. Since actually Development server is your GROUND TRUTH. Not other way around.
This is a very developer oriented approach. But when you first developing a new module it works pretty well.
Answer 2
 - if 1 and 6 true:
Similar approach to answer 1 is maintaining a development server. Everybody uses it changes it. Than when time comes to update. You use a database comparison tool. Get these as scripts , put it under source control.
<code>- Red Gate Schema Compare supports Oracle
- Embercadero has similar tool
- https://github.com/carbonfive/db-migration
- http://www.sumsoftsolutions.com/svco/ (I have not used this product but I believe it belongs to this category.)
- Rails Active Migration (http://www.oracle.com/technetwork/articles/kern-rails-migrations-100756.html)
</code>
Difference between Answer 1 and Answer 2 is, in answer 1 you collect DDL statements for entire database and you store them. In answer 2 you need to store every version of change.

Start
V1
V2
V3
...

If you put a column to a table and later decide to remove it. You scripts will show this in answer2 while in answer1 you will only see last version. And you need to compare V2 and V1 to see differences. Personally I like answer 1 better since I can easily compare Start and V3, V1 and V3. In answer2, I need to look for all changes.
Also in answer 2 script in source control tends to be a big bang, complex script. Hard to find information.
Answer 3
If 3 is true. Note that in this situation you do not have constraint 6 , that is : you do not have Development, Test, Product servers. Only production server. You can use DDL triggers to log what changes has been done. This is mostly used to discourage people from abusing their DDL grants. If any problem occurs, you can find responsible. For this to work every person should connect with their user account and Application account should not have any DDL grants. Since every developer knows Application account and can use it.
Answer 4
If you have 3 and 5. Note that in this situation you do not have constraint 6 , that is : you do not have Development, Test, Product servers. Only production server.
Instead of trigger to store changes.
You use an external tool find changes and store DDL scripts in the source control.
If these tool has an ability to record who has done changes, it would be useful. Note that in this solution you loose extra DDL which are done in intervals.
Answer: Just found an interesting tutorial on using Liquibase to version Oracle.
Answer: On some of our databases we are using DDL triggers to catch changes and save them to a table.  We then have a web interface to pull up these previous versions.  It has severe drawbacks, which is why I am looking for alternatives, but it is easy and is better than no version control.
Answer: We have used Schema Version Control for our 11g databases, but have had some problems with the software on 11.2.  If it weren't for those problems which we are still working through, it would be a great product.
Answer: We used to work with Oracle SQL Designer, which (I guess) has been replaced with SQL Developer Data Modeler now. http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html
That was quite nice, esp. the ability to set DOMAINs for columns and save a lot of time creating common columns (mtime, ctime etc).
Answer: We use oracle-ddl2svn set of tools (which I am the author of) for automatization storing of oracle DDL schema in SVN.
Answer: I've never used it, but http://blog.gitora.com/ is another option.
Answer: Have a look on DBmaestro TeamWork which its database enforced change management approach.

disclosure: I work for dbMaestro


Does systemd still know about runlevels?

Question: Does systemd still have the concept of runlevels? For example is it pointless to use telinit <number>?
Comment: Possible duplicate of [Change runlevel with systemd](https://unix.stackexchange.com/questions/498210/change-runlevel-with-systemd)
Comment: i don't know about the answers below, but in RHEL/Centos 7.6  `init 1` or `init 3` or `init 5` or `init 6` or `init 0` or `runlevel` still behave as they always have, and that's all I care about.  Much easier syntax then `systemctl blabla blabla.blabla`
Answer: SystemD Run-Level Low-Down
Within the SystemD(aemon), runlevels are exposed as "Targets." The concept is still there, but the workflow to produce the desired result for your requirement is different.
The attached should clarify this issue.
How do I change the current runlevel?
$ systemctl isolate runlevelX.target

How do I change the default runlevel for next-boot?
# Create a symlink
$ ln -sf /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target

ln -sf TARGET DESTINATION
-s creates symbolic link
-f removes the existing destination file

OR (as @centimane suggested) simply use the "blessed" systemd command:
systemctl set-default [target name].target

How do I identify the current runlevel?
$ systemctl list-units --type=target

Comment: To change the default target you should use `systemctl set-default [target name].target` rather than manually creating the link.
Comment: If your systemd package is built with SysV compat support, it will include a telinit symlink to the systemd binary, which, when called as telinit, will map runlevels 0-6 to systemd targets - check telinit(8) for a list of those mappings.
Comment: `systemctl list-units --type=target` does not identify the current runlevel, it lists all the active .target units though.
Comment: Can I still use the init command to switch between runlevels?
Answer: No.  As the systemd people themselves wrote twice over, once in their telinit manual and once in their runlevel manual, runlevels are "obsolete".  You can forget about runlevels.
These things do not actually exist in systemd at all, outwith a few compatibility shims.

There are some symbolic links for target names, but these targets are never actually used by systemd proper.

Rather, the bootstrap process employs a default.target (and thence one or both of a graphical.target and a multi-user.target), a rescue.target, or an emergency.target.  And the shutdown process involves a shutdown.target, a reboot.target, a halt.target, or a poweroff.target.  No run-level targets are involved in either bootstrap or shutdown.
The telinit command, which one might think uses the compatibility symbolic links to map its command-line arguments, does not do that either.  There's a hardwired table in the source code of the telinit program, and the numbers 2, 3, 4, and 5 as arguments to the command are hardwired to map to multi-user.target and graphical.target.
systemd-update-utmp also has an internal hardwired table.

There is no "init table" of runlevel stuff.  systemd is only compatible with van Smoorenburg rc, not with van Smoorenburg init.
There is no "current run level" value maintained by systemd itself.  Rather, the almost wholly undocumented systemd-update-utmp command operates internally in terms of the activation states of rescue.target, multi-user.target, and graphical.target.
systemd-sysv-generator, systemd's backwards compatibility service unit generator,  merges the /etc/rc[234].d directories into just the one Wanted-By relationship to multi-user.target in generated service units.  There is no actual reference to run levels in the generated service units.  (There used to be, years ago, but the systemd people found that this went wrong, because they weren't being referenced anywhere else.)

If one is a user of a system that builds systemd as did Arch Linux for the questioner at "Why does `init 0` result in "Excess Arguments" on Arch install?", one does not even get the compatibility shims, and commands such as init 0 result in the "native" systemd behaviour, which is to complain that the command has been incorrectly invoked.
Further reading

Lennart Poettering et al.. runlevel.  systemd manual pages.  Freedesktop.org.
Lennart Poettering et al.. telinit.  systemd manual pages.  Freedesktop.org.
Lennart Poettering et al.. bootup.  systemd manual pages.  Freedesktop.org.
Lennart Poettering (2015-02-08). everywhere: remove configurability of sysv runlevel to target mapping.  systemd.  github.
https://unix.stackexchange.com/a/196014/5132
https://unix.stackexchange.com/a/196197/5132
https://unix.stackexchange.com/a/233581/5132
https://unix.stackexchange.com/a/211927/5132
https://unix.stackexchange.com/a/392612/5132
Jonathan de Boyne Pollard (2015).  /etc/inittab is a thing of the past..  Frequently Given Answers.
Answer: Thanks very much. So, if I understood correctly:
For example:
ls -ll /usr/lib/systemd/system/runlevel*.target

Output:
/usr/lib/systemd/system/runlevel0.target -> poweroff.target
/usr/lib/systemd/system/runlevel1.target -> rescue.target
/usr/lib/systemd/system/runlevel2.target -> multi-user.target
/usr/lib/systemd/system/runlevel3.target -> multi-user.target
/usr/lib/systemd/system/runlevel4.target -> multi-user.target
/usr/lib/systemd/system/runlevel5.target -> graphical.target
/usr/lib/systemd/system/runlevel6.target -> reboot.target

So as you can see, the concept of runlevels do exists, but it is quite obsolete due to the fact that the runlevel.target files are not actually "real" files but soft-links to the new, modern, better named files scheme which systemd likes to call them "targets".
So, if you would like to do sth like telinit 5 it would be like this: systemctl isolate runlevel5.target
which is identical with: systemctl isolate graphical.target (recommended in my opinion).
Just in case you are interested to know all the possible targets:
ls /usr/lib/systemd/system/*.target

Comment: Yes, I believe that you are understanding this correctly. I will be a late adopter of SystemD, as the procedural, step-step-step, INIT.D system is what I am most familiar with... I applaud that you are exploring SystemD. The best part of SystemD is its parallel multi-threading, which enables faster boot.

Multi-Threading boot can be accomplished with INIT.D, but requires strong BASH scripting.
Comment: BTW, `ls -ll` is equivalent to `ls -l`.  You might want to get into the habit of using `ls -ld`.
Comment: `telinit 0` / `telinit 6` still work. Since this helps with migration, and I think most distros still don't see a reason to drop the support yet. `isolate` clearly aspired to mimic how run-levels work, but there are various evil edge cases.  I highly recommend ignoring all instructions to `isolate runlevel5.target` or even `isolate graphical.target`. Example edge case: https://github.com/systemd/systemd/issues/6505
Answer: systemd introduced targets as a counterpart for runlevels in sysV init system. sytemd developers made it almost compatible with most of the sysV scripts. Same happens for
telinit <runlevel>. This is translated into systemd equivalent.
For example telinit 0 powers off the machine. systemd has poweroff.target to do the same as runlevel 0. So telinit 0 is translated by systemd to activate poweroff.target.
But some compatibility problems are there with sytemd and sysV init systems-> https://www.freedesktop.org/wiki/Software/systemd/Incompatibilities.


Is it haraam to take medicine that contains alcohol?

Question: Just like the title states, is it haraam to take medicine that contains alcohol?
Comment: Things tagged haraam is haraam, be it in infinitesimal quantity or in bulk. There is no shifa in haraam.
Answer: Short Answer:
No, it's not haraam to take medicine that contains alcohol, but haram to use alcohol itself as a medicine.

Completion:
That's because when melted with water (or medicine) in small amounts (for example, 5% alcohol), alcohol will dissolve and the result will not cause person to be drunk, which is why alcohol is prohibited (causing one to be drunk), and once the prohibition reason is gone, then prohibition itself is gone, too.
Here is a quotation from one major fiqh book (of the Shafei school):

محل الخلاف في التداوي بها – يعني بالخمر - بصرفها ، أما الترياق المعجون
بها ونحوه مما تستهلك فيه ، فيجوز التداوي به عند فقد ما يقوم مقامه ،
مما يحصل به التداوي من الطاهرات ، كالتداوي بنجس ، كلحم حية ، وبول ,
ولو كان التداوي بذلك لتعجيل شفاء ، بشرط إخبار طبيب مسلم عدل بذلك ، أو
معرفته للتداوي به
It's disputed whether it's allowed or prohibited to use pure
alcohol in treatment. But for antidote (and the like) that it's melted
with and dissolved, then it's allowed to use it in treatment if
there's no (alcohol-free) immaculate replacements that are usually
used in treatment. It's like when treating with impure things, like snake
meat, or urine. It's allowed to use it in treatment even it that was
only to hurry up the healing. But under the condition of telling an
upright muslim doctor about that.
Mughni Al Muhtaj By Al-Khateeb Al-Sharbini (may Allah be merciful to
him), 518/5.

Also there are fatwas about this issue:
International Islamic Fiqh Academy, conference #3, decision #11, question #12:

Q: There are a lot of medicine that contains different amounts of
alcohol that varies between 0.01% and 25%, and most of them are
medicine for cold, sore throat, cough, and other popular diseases. The
medicine that contains alcohol is about 95% of the medicine in this
field, so obtaining alcohol-free medicine becomes very difficult or
impossible, can we get these (alcohol-containing) medicine?
A: A muslim patient can get medicine that contain percentage of
alcohol if there is no alcohol-free replacement available, at the
prescription of an honest muslim doctor.

Islamic Fiqh Council of the Muslim World League MWL, conference #16, decision #6:

Using pure alcohol in treatment is not allowed in any case, because The Prophet (PBUH) said: (Allah didn't put your treatment in what he
prohibited you) Sahih Bukhari, and The Prophet (PBUH) said: (Allah
created medicine for every disease so you have to get treatment, and
don't use haraam (things) in treatment) Ibn Dauood in his sunan, and
Ibn Assuni, and Abu Na'im. And he (The Prophet) told Tariq bin Swaid
when he asked him about using alcohol in treatment: (It's not a
treatment, but a disease) Ibn Majah in his sunan, and Aub Na'im.

It's allowed to use in treatment medicine that contains percentage of alcohol that dissolve and are important for the medical industry
and have no replacement. Under the prescription of an upright doctor.
It's also allowed to use alcohol as an outside antiseptic for wounds,
and germs killer, and in (outer) kreams.

The Islamic Fiqh Council recommends medical industry companies and pharmacists in Islamic countries, and medicine importers, to make the
best they can to exclude alcohol from medicine and alcohol containing
medicine, and use alternative medicine.

The Council also recommends doctors to avoid prescribing alcohol-containing medicine.

This is the main source of the answer (it depends on the same evidences).
Hope that's clarifying enough.
P.S: sorry for typos and bad translation, any edit is most welcome :)
Answer: Short answer is : Doing so knowingly is haram.
Alcohol in general is haram. Based on your question you probably already knew that.
Reference is [2:219]

They ask you about wine and gambling. Say, "In them is great sin and [yet, some] benefit for people. But their sin is greater than their benefit." And they ask you what they should spend. Say, "The excess [beyond needs]." Thus Allah makes clear to you the verses [of revelation] that you might give thought.

If this is the only medicine that can treat your ailment, with no non-alcoholic medicine available, you probably can use it to treat yourself based on the necessity principle, however do consult a scholar if you can.
You can eat forbidden foods due to necessity. Reference: [2:173]

He has only forbidden to you dead animals, blood, the flesh of swine, and that which has been dedicated to other than Allah . But whoever is forced [by necessity], neither desiring [it] nor transgressing [its limit], there is no sin upon him. Indeed, Allah is Forgiving and Merciful.
Answer: A translated fatwa from my country (Malaysia, Shafi'i):
(I'm not going to translate the word Arak here, as the english word for alcohol is used for the drink as well as the chemical. In context, the word Arak here means a drink that is used as an intoxicant.)

All Arak contains alcohol. Not all alcohol is a component of Arak. Alcohol from the process of Arak creation is haraam and najis, but alcohol that is not from the process of Arak creaion is not najis, but haram to drink.

Drinks that are created from the same process of Arak creation, whether it contains a little alcohol or the alcohol is removed is haraam.

Drinks that are not intended to be Arak or intoxicants and not created in the same method are halal.

Tapai is halal.

Alcohol as a byproduct of food creation is not a najis and can be eaten.

Medicine and perfumes that contain alcohol are permitted.

(Personally disagree with point 2 as other scholars have said that non-alcoholic beer and wine vinegar is halal, but just translating)
Source: http://www.e-fatwa.gov.my/fatwa-kebangsaan/alkohol-menurut-pandangan-islam
Another less formal source on this:

If alcohol is derived from grapes or dates, it will be haram and impure. If it is from anything else besides dates and grapes and it does not intoxicate directly or through a mixture, then it is permissible.

Some research turns up this point of view as a common one in other parts of the world, but this is the most formal version I could find.
Source: http://central-mosque.com/index.php/General-Fiqh/alcohol-its-kinds-usage-and-rulings.html
Answer: It is haram,  many people said it is haram including Dr. Zakir Naik
Comment: What about necessity makes haram things persmissible? You can never declare something haram generally unless there's an option left.
Answer: I am no scholar, nor am I a sheik or imam.  I'm just a Muslim whom is blessed with understanding.
At the time of our beloved prophet (pbuh), alcohol along with other intoxicants were banned in Islam unto today. Why would anything which Allah (stw) commanded the prophet (pbuh) to be banned be legal in islam now? There are forms of fruits and other foods which the prophet consumed which scientists are now discovering the benefit. Not everyone is educated and understanding to know about health, but it's simple by following the sunnah.  Meaning you can pray dua, and  eat and live like the prophet (pbuh) and that's it.
On YouTube, there are videos on foods of the prophet you can even research the benefits of the food. Alcohol in medication are simply to speed up the blood circulation the body will speed up causing the medication to work. But still the alcohol acts like alcohol. Drink medication without alcohol and exercise or sleep with a blanket the heat will cause the blood to be thinned and the medication will work just fine. I'm not a doctor either.  I'm just blessed by Allah.


How to detect traffic incidents in set of GPS traces?

Question: I have a large database of gps traces (long, lat, timestamp) and would like to see if I can detect when congestion occurs on roads from that data.
Any ideas or pointers on good algorithms to use?
I've seen loads of stuff using fixed point collectors (ANPR systems, video cameras, infra-red detectors, etc) but not from GPS traces.
Answer: Automated Traffic Incident Detection with GPS
Equipped Probe Vehicles
"This paper discusses the results of a proof-of-concept
study in which a transit vehicle fleet was used as the
probe system for traffic incident detection."
Results:
"The results indicate highly successful Detection Rate
(DR) with low False Alarm Rate (FAR). The techniques
also yield an average Time to Detect (TTD) of 30 seconds
to 3 minutes depending on the probe vehicle population
size, incident characteristics, and GPS performance"
http://plan.geomatics.ucalgary.ca/papers/Basnayake%20GNSS2004_Footer.pdf
Credit to Chaminda Basnayake
See the 'Travel Time' algorithm on  page 4.
Answer: I have been doing something similar lately with AIS vessel tracks and modelling navigational risk. The best place to start is to consider your software and whether you want to use GIS or analyse these potential collisions using some SQL analysis instead.
What is it you want to eventually produce?...traffic DENSITY is a good indicator for congestion based in time, maybe create some 90th percentiles or my colleagues have been VERY impressed with using the animation within ArcScene to display pinch points and movement.


Why is the value field 8 bytes in transaction output when it can be achieved with 7 bytes?

Question: Bitcoin uses a 8 bytes value field in the transaction output. However, the total supply of bitcoin is capped at 21M. Theoretically, even if all the 21M bitcoins are transferred to a single address, the output, after converting to satoshis, can be effectively represented with 7 bytes of data. This means, we are adding at least 2 bytes of redundant data (one for the spend address and other for change address) for every transaction stored in the blockchain. Is there a particular reason why a size of 8 bytes was chosen or was this a design flaw that was overlooked by Satoshi? Is it possible to bring a change to this via a soft-fork or does changing this require a hard-fork?
Answer:
Is there a particular reason why a size of 8 bytes was chosen

Probably not.
In the original Bitcoin source code, many of the primitives used in data structures were simply the in-memory representations of those primitives. For integers, this is a 32 bit (4 byte) little endian integer. However 32 bits is not enough to represent all of the satoshis that exist in Bitcoin. The next primitive that can be used is a long, aka a 64 bit integer. Since this was just serialized as it is represented in memory, the amounts end up being 64 bit little endian values.

Is it possible to bring a change to this via a soft-fork or does changing this require a hard-fork?

The serialiation format used for computing the weight and hashes can only be changed via a hard fork.
However you can transmit a transaction using whatever serialization you want so long as that format contains all of the necessary information to construct the serialization necessary for computing weight and hash. This would not require any fork because it is not a consensus change.
Answer: Yes, transaction format has unused bytes. One other example is encoding utxo index in four bytes. Nobody cares. We can not change the format without hard-fork. And we do not want to do it. Live with it.
Comment: @UgamKamat There are many more redundancies in the protocol (sizes, DER encoding for sigs, predictable locktimes and sequence numbers, standard script templates, redundant scripts in P2SH-wrapper segwit spends, ...), which could be avoided using a specialized compression scheme. I have done some work on this, but it's not very high priority. Also, it's mostly a bandwidth savings; if the blockchain size is an issue, just run a pruning node.
Comment: I disagree that we don't care, or can't change it without a hard fork. It's trivial to design more efficient ways to store and communicate transactions and blocks; only the data fed to hash functions for txids and other commitments needs to remain consistent without forking.
Comment: @UgamKamat You'd just negotiate a newer protocol version in which the 8th byte is gone. This protocol would only be used between two peers which support it. It's important to realize that while transactions and blocks are often thought of a bytes, they're really just abstract structures, and you can encode them anyway you like - as long as all participants in the communication can still compute the correct hashes (which are defined in terms of one particular serialization).
Comment: I disagree on UTXO. 1MB block limit was sneaked in later by Satoshi in July 2010. So before that you could have had number of outputs. So the number of outputs that could have been possible would be capped by the 4 bytes of vout index.
Comment: @PieterWuille If you change the output value size to 7 bytes, won't the nodes that are running an older version of Bitcoin Core consider those transactions as invalid, resulting in a fork?
Comment: @PieterWuille That was a good explanation as to how we can reduce it to 7 bytes. Is reducing redundant sizes on the roster in future releases? We can reduce a good percentage of the blockchain size going forward.


How long do raw chestnuts keep?

Question: I bought some chestnuts in the fall for Christmas but haven't used them all yet. How long do they keep? How would I tell if they 'went bad'? They look just like they did when I bought them (no blemishes) but may weigh less (they seem light) and seem harder to the touch (but I may be misremembering).
Comment: One way to tell that they have "gone bad" is through the sense of smell, the essential or natural oil in the chestnuts will go rancid, which will also give them an off taste (bitter) similar to the taste of the skins of the chestnuts just much stronger.
Answer: According to Chestnuts for Sale:

Chestnut storage is not the same as most nuts. Fresh chestnuts should
  be stored like carrots. Chestnuts are comprised of about 40-50% water
  and thus if not stored properly, they will spoil. Therefore, chestnuts
  should be stored with great care and attention. The ideal storage
  conditions for chestnuts are 33-35 degrees Fahrenheit and 85-90%
  humidity. We recommend storing chestnuts in covered containers in the
  coldest part of the refrigerator. Stored properly in the refrigerator,
  chestnuts can have a shelf life of approximately 2-3 weeks.   If you
  plan to use the chestnuts soon after receiving them, simply place them
  in a covered container in the coldest part of the refrigerator. The
  colder, the better.

Otherwise, they recommend freezing them (preferably par-cooked), and provide information at the link above.
Washington Chestnut offers the following information about storing chestnuts, to prevent molding to which they indicate the chestnuts are susceptible due to their high water content:

Do not let fresch chestnuts freeze and thaw (except if you are freezing for a purpose)
Never store chestnuts in a sealed plastic bag (except dried or frozen)
Keep chestnuts refrigerated unless drying or sweetening the chestnuts
If black molds have entered into the chestnut kernel, do not eat the chestnut
Chestnuts can be stored in the refrigerator for 2 to 3 weeks
Cooked chestnuts must also be refrigerated if not consumed right away
Never bathe the chestnuts in plain water - this causes mold spores to be transferred to all the chestnuts passing though the bath water -
  instead, wash in clean running tap water
Try to purchase fresh chestnuts close to the time you want to eat them
Answer: I raise and sell fresh chestnuts. The secret of long storage is the proper handling of chestnuts in the first 24 hours after harvest before any deterioration starts to occur. Within that 24 hours our nuts our cleaned, sized, graded and put under refrigeration [32 degrees F.] with controlled humidity [85-90%]. Due to seasonal demand we usually put unsold fresh nuts in the drying room about December 15th for use with dried products the next year. The nuts are still fine at that closing date. Always try to buy farm direct from a US producer. Last year we ate fresh nuts stored our veggie crisper every night until our personal cache ran out which was the first of April. I will have give properly stored nuts a longer shelf life than 2-3 weeks.
Answer: Chestnuts spoil in two ways: they go moldy and they dry out and become pretty much impossible to eat when roasted. It's possible that when they are hard and dried out, they could be ground into flour or something; I've never tried that.
Being light is a really good indication that they've dried out. Some chestnuts are moldy when I buy them, and I am pretty sure the ones I bought before Xmas that are still on my counter are either moldy or hard right now. The good news is you can't miss the mold when you take the shells off the cooked chestnuts and you often spot it when you cut the X before you cook them. Don't eat moldy ones. The hardness won't hurt you, so give them a quick bake and see if you actually have any nice ones still (you probably don't.) But don't save them for Valentines!
Answer: I find they tend to dry going stale rather than rot, quite quickly too.  They will get harder and lighter, and the shells more brittle and apparent gaps between shell and nut, allowing a depression to be made that springs back.  The nuts inside shrivel as they dry, which causes that.  It's usually immediately obvious when cutting the crosses in the shells for roasting which ones are affected.
When they are like that, they roast very hard and dry and often the shells are hard to remove - not very nice all round, though you could probably grind them still if chestnut flour was the order of the day.  Takes a fair while before the flavour is rancid.  In short, if you are using them whole or chopped, try to use the heavier ones that feel entirely solid and do not leave them too long.  I find the best before dates in the shops are usually within a week or so of purchase and that is not a bad estimate for when they start to get stale.
Answer: Place chestnuts in a sink of water...the floaters are the spoiled ones...the good ones are heavier and will sink.
Answer: I purchased some last  November 2014, I have kept them in the little refrigerator in my office.  It cycles between 25 and 35 degrees. Today April ninth I took 2 out to check I peeled both of them there was no black mold or any mold nor are they dried out and gotten hard, I ate one and it tasted good.  It appears as though that the temperature rotating between freezing and slightly above freezing has kept them fresh and good.
Comment: You ate raw chestnuts?

How long do raw chestnuts keep?


How can I check for drywall behind wood panelling?

Question: What's the best way for me to know whether there is drywall behind wood panelling walls?
The wood panelling looks inexpensive, and it's in a big room (a converted garage).
Answer: If there are electrical outlets, remove one and look. otherwise you need to remove a section of panelling or drill a hole and observe what comes out. Odds are pretty good it's just panelling, speaking to typical practices in garage remodels.
Answer: Drill a screw in the wall.  Pull it out.  See if it has white flakes on it.
Answer: Like drywall, many types of wood paneling come in 4' x 8' panels. That means you should have seams with finishing nails along every third stud. You could try carefully popping out a few nails in the middle of a panel to see what's behind it. If you're careful enough, you can just tap the nails back in when you're done. But use caution: those finishing nails usually have shanks.


Polarizing filter: question regarding quality

Question: I can buy a Vivitar brand polarizing filter from Walmart for less than $13, or I can buy a different brand from a photo store in the range of $60 to up over a $100. Instinct tells me that the Vivitar filter will not be as good, but why? Does it have to do with coating or is there another reason? Why should I avoid using the Vivitar brand filter? They seem like a reputable company, no?
Comment: Also, note that [Vivitar hasn't actually existed as anything other than a branding badge since 2008](https://en.wikipedia.org/wiki/Vivitar#History).
Comment: Have you looked at http://photo.stackexchange.com/questions/3632/how-do-i-choose-a-polarizer ?
Comment: @PinhollowEuri You don't need to comment when you edit your answer. That will a)  be marked on the answer itself and b) bump the post up to the front page again so people will notice.
Answer: A filter may be not neutral (either at all or with respect to certain "filter vs light polarization plane" orientations) - that is, white balance will be shifted sideways.
A filter may be not coated - that is, the image contrast will be lower in certain conditions.
A filter may be not circular - that is, may cause problems with AF of specific cameras (and this is not the case - the filter which you gave link to is linear+circular).
However, I am using some cheap polarizer for casual photographs and I did not regret it even once, even with sun shining inside frame.
I have also checked the claim about light transmission from this answer. My cheap "Green.L" filter (not even coated) looses 1,32 stop of light. It is almost same as Hoya HD (which looses same amount of light judging by some reviews). It may be different with other models though.


kernel_task consumes 500% CPU on AC power, sometimes

Question: Typically, my kernel_task process uses 1-4% CPU and 100-700MB of memory. However, sometimes when I have the power adapter plugged in, the CPU usage jumps to around 500% (8 cores) and stays there until I unplug the power adapter. I can plug it back in and everything is fine for a few seconds or a few days, then it eventually happens again. How can I stop this from happening?
Answer: In my experience this has always been due to a hardware fault. However before doing anything else reset the SMC as detailed here: http://support.apple.com/kb/HT3964 as its power related.
This appears to happen when the Mac is struggling to communicate with hardware. Which Mac is it? How old is the battery? Is your battery life still good? Has the Mac had any damage - dropped? Liquid? Have you tried a different power adapter?
Comment: MBP 2011, as old as the laptop, yes, no, no, yes.
Answer: I got this issue once on my 15-inch Mid 2012 MBP running 10.8.4 because the audio input had switched to the internal microphone and it was picking up the constant noise of my fan.  Switched the audio input to Line In and cpu usage dropped from 524% to 3%
Comment: Disabling ambient noise cancelling seems to make it go away for me, in addition to removing power adapter (for now), will see if it continues to stay fixed.
Comment: What this during FaceTime or Skype or did this happen all th etime?
Comment: This saved my life. I disabled ambient noise cancelling and it worked. Perfect storm of: plug in AC adapter, fan goes high to help with heat control, microphone software goes mad trying to cancel the noise of the fan. @nic-contrell, this happened all the time, even when playing a game that didn't need the microphone.
Answer: http://www.rdoxenham.com/?p=259 covers disabling the kernel extension responsible for triggering this misbehavior. However, doing so also disables some other thermal management functionality.
Comment: This is interesting, but you have to ask what is causing the problem in the first place. Something isn't right. As I said, everytime I've seen this, there has been a hardware fault.
Comment: For me this analysis doesn't explain correctly the origin of the problem. Moreover, I'm deeply convinced through other cases that the overheating and the `kernel_task` eating all the CPU are just correlated consequences of the same causing problem.
Stupid loops within a kernel can only lead to overheating.
Answer: The folks who observed "AC power" contributes are on to something.
High chassis temperature from charging together with peripherals plugged in can cause this issue. Simply moving the charging cable from the left to the right ports can be enough to cool the hotspot and resolve the problem. On a machine with MagSafe try unplugging peripherals from the left ports until the battery is full.
CPU usage has nothing to do with this. A hot CPU is throttled by reducing its clockspeed not by scheduling no-op load.
See https://apple.stackexchange.com/a/363933/27135 for causal proof.
Answer: my kernel_task issue (cpu at -> 500% for ever) was blutooth related:
http://droolfactory.blogspot.com.es/2012/08/mac-os-x-lion-kerneltask-with-high-cpu.html
Comment: You should provide at least a short summary of the article you are referencing. The goal is to make Ask Different a self-sufficient resource.
Answer: Please have a look at this typical problem: kernel_task at 300%
and the suggested method of analysis: diagnosis of a CPU hog.
The Activity Manager isn't acurate enough to help you see that there are
other processes indirectly loading the Kernel. top will unveil these hogs.
To display processes sorted starting with the biggest CPU consummer:
top -o cpu

...sorted starting with the biggest virtual memory consummer:
top -o vsize

...sorted starting with the process making the more context switches
(being started and stopped with a huge frequency, sometimes the result of 2 processes talking together, not letting the other processes
the freedom to get the cpu):
top -o csw

Comment: How do you use `top` to unveil these hogs?


Courses for non-IT people to study testing?

Question: I am a non-IT student, but I want to enter into the IT world. Which courses do I have to study to get job in testing? What is the difference between QA tester and ISTQB tester? Which is the best ones?
Comment: Has ISTQB started marketing term "ISTQB Tester" now?
Comment: I would have modified this question to be nicer and more useful, and, but these are not really questions that can be answered without context here. Try contacting some local testing association if there is one to get ideas. Or read some testing books or online material to get better understanding of testing field.
Comment: Those tags are really confusing and have no confirmation in the question wording.
Answer: Welcome to SQA, Rosa.  I am not sure your question makes sense; QA is an abbreviation for "Quality Assurance", and often is used as a synonym for testing.  ISTQB is a type of certification for testers.
See also Do ISTQB/ISEB Testing Certificates prove that someone can test? and http://en.wikipedia.org/wiki/Caps_lock.
Answer: I assume you are currently a University student? Have you checked in with your advisors and/or the placement office at your school? I wonder what kind of advice schools are offering these days, and if they are capable of guiding you...
Have you considered transferring into an IT program? That's very often a good way of gaining a useful background that could lead to a testing career. A degree in CS or an IT-related program is one of the things that I look for in a resume.
Answer: You can start from reading the 'Software Testing' book written by Ron Patton.
Then you can test something, that you use frequently (for example, an email client etc).
Then you can practice on the uTest.com and earn some money (definetly, you won't make a fortune, but you'll gain rich experience).
Have a nice start ))


How to add an existing non-Administrator to the Administrators group?

Question: A friend popped round their family laptop after discovering that his wife's user account fails to logon with the following error message (it's a Dell Inspiron N5050 running Windows 7 Home Premium Edition):

The User Profile Service failed the logon

His wife's user account is the one created when Windows was first setup during the initial Dell OEM first-time Out of Box Experience. This account is a Windows administrator and is the only administrator. There is another account used by their son which does not have administrator rights.
I followed the steps that apply to this scenario described in this article to try to enable the regular Administrator account using net user administrator password /active:yes:

I receive error message: The user profile service failed the logon. User profile cannot be loaded

i.e. I've booted from the Windows installation disk, launched the recovery tools and started a command prompt. I then typed net user administrator [some_password] /active:yes which tells me the command ran successfully. However when I restart Windows (in safe mode or normally) I don't see an Administrator account at the logon screen.
I have to do this because for some reason I can't boot to a Safe Mode command prompt, Windows just boots straight to the logon screen.
As already mentioned there is another account on the machine but it's not a member of the Administrators group but I can logon. Using this account I have tried to runas a new command prompt as both Administrator and his wife's account but get an error message saying that the username or password are invalid.
I think something has clobbered his Wife's user account because when I navigate the filesystem using the recovery console command prompt I don't see this account's folder in the user profile folder but do see one for the other non-administrator account.
I've also tried to restore to a previous system recover point (via booting from the Windows DVD and starting the recovery tools). There was in fact one created on the morning that this problem manifested itself after a Windows Update. However after around 10 or so minutes of telling me it was Finalizing the Restore I was then presented with an error dialogue stating that:

System Restore did not complete successfully. Your computer's system files and settings were not changed.
Details:
An unspecified error occurred during System Restore (0x80070002).

I also tried an earlier one but end up with the same result.
I've also tried creating a new Windows account in the command prompt launched by the recovery tools but I can't add that user to the Administrators group because the Workstation service isn't running (and won't start in recovery mode).
Is there anything else I can try or am I going to have to flatten rebuild this machine? Is there any other way for me to elevate the existing non-Administrator account to become a member of the Administrators group?
Comment: Have you tried running a `sfc /scannow` or a `chkdsk`? With multiple errors like that, it sounds like something is missing/corrupted.
Comment: @moses I did, no errors :/
Answer: It's very easy to create a new administrator account by booting your computer from Hiren's Boot CD. This article Using Hiren's Boot CD to Create Admin User Accounts details all the steps.
Comment: I had no idea that was still around. Will give it a go.
Comment: If you have problem of creating a new admin, you can choose to boot from PCUnlocker Boot CD and it can help you promote a standard user account to administrator.


Why does it take a different time to generate a different pattern of the same length in vanitygen?

Question: I've been looking at generating some vanity addresses today, and I found it surprising that the program generating the address predicts that it will take a different amount of tries to compute a vanity address of the same length, but with a different pattern. For example, generating "11..." takes 256 tries, while "12..." takes 23. Shouldn't it takes the same amount of tries to generate both of them, or am I missing some important detail?
Comment: Why should it take the same amount of tries to generate both of them? Do you think there are the same number of hashes that yield a "11" as there are hashes that yield a "12"? Wouldn't that be an *amazing* coincidence? (Since the hashes live in a power of two space and the accounts live in a power of 58 space it would be shocking if they perfectly lined up like that.)
Comment: Shocking if it was perfectly equal, but '11...' takes over 10 times longer than '12...'.  That seems more shocking to me.
Comment: @ChrisMoore Bitcoin treats leading 1s specially. '11' only occurs when the leading byte is zero.
Comment: @ChrisMoore: How many seven-digit numbers between one million and two million inclusive start with 2? Only one of them. How many start with 1? All the rest of them. There's nothing surprising about a 10-to-1 ratio.
Answer: Each leading 1 in an address after the first 1 represents a leading zero byte in the 160 bit hash of the public key, and so makes the search 256 times harder.  See the wiki page for Base58Check encoding for details.  Whereas any other character makes the search only around 56 times harder.
Every version 0 bitcoin address begins with a 1.  And 1 in 256 of them begin with two 1's.  However, I don't know where the 23 comes from.  Perhaps it's a result of Benford's law - we're changing to base 58, and so can expect more addresses to start with '12' than any other 2 characters.
To see this, suppose there were 256 addresses, from 0x00 to 0xFF, and that we converted them to base 10 to make addresses.  There are 256 different addresses, and 111 of the 256 begin with a '1' (1, 10, 11, ..., 19, 100, 101, ..., 199).  In bitcoin's base58 encoding, value 1 is encoded by character '2'.
Edit: the above is kind of convincing until you see that:

'12' through '16' all have difficulty 23,
'17' through '1P' have difficulty 22,
'1Q' has difficulty 65 and
'1R' through '1z' have difficulty 1353.


How to test an in-app purchase of an iOS app

Question: I have to test an iOS app for in-app purchase functionality. I'm doing it first time and I don't have any idea about it. So anyone please tell me the possible test area of it?
Answer: Firstly you need to become a member of Apple's developer program, and understand how in app purchase works. As a starting point you should look to Apple's documentation here: https://developer.apple.com/in-app-purchase/.
Apple provides sandbox environments to facilitate testing, and it is all covered in the documents and past WWDC sessions.
Once you understand that, you should develop test cases based on your product offerings and verify them with a test account.
Answer: You can figure out the possible test area by asking a few questions to your team. Such as how many products should be offered, what their prices are, and if their purchase is restrained in some way (time window, inventory limit, account status, etc). From this you can start making tests that canvas the in-app purchase functionality.
Answer: First of all you would need a sandbox user for testing In App purchase. Once its available you can start testing. I would like to mention some of the test cases I followed for In App Purchase:

Check if user is able to buy the app on entering correct credentials
Check user is NOT able to buy the app on entering incorrect credentials
Check the status of the app when user enters correct credentials, In App purchase is started and meanwhile connection to Network is lost
Follow test case 3 first and when Network connection is back then check the status of the In App purchase
Do In App purchase of the app on one device, Delete the App, Re-Install the app and then check In App purchase again. In this case app should not charge money for same In App purchase that's like Restoring the In App purchase.
Check In App purchase using sandbox users from different countries like create sandbox users those have permission to buy app from particular country app store only and check the In App purchase for these sandbox users.

Hope you will find this helpful.


Compile Matlab Code

Question: I am new to gnu Emacs and have a question.  I created an M file to run in Matlab and I got it working fine.  My question is, is there a way to compile my code in the Emacs editor or test out my program?  I tried the to use the "make" command and it gave me this error: Compilation exited abnormally with code.  Thank you in advance for your help.
Comment: By compilation, do you mean simply running the matlab script? `matlab-mode` comes with matlab shell. You simply launch the shell and run the script as you would do in the consol in Matlab GUI.
Comment: Yes, I want to run the matlab script.  Where can I find matlab-mode or the matlab shell?  Sorry I am brand new at this!
Comment: When I was working in Matlab, the matlab-mode was not maintained any more and I simply copied the one my school provided to [my init](https://github.com/kaushalmodi/.emacs.d/tree/master/elisp/matlab-emacs) and it has worked fine till date (the latest Matlab version I tried on it was 2014). [This version by pronobis](https://github.com/pronobis/matlab-mode) has a lot more updates to the version I use but I haven't tried it yet. I can write a detailed answer at a later time.
Comment: Thank you!  It seems sourgeforce has one but the site is down.  I will try your links.  Thank you again!
Answer: I don't use MATLAB, but this sounded like a problem I had when first starting to use emacs.
Did you originally try M-x compile to compile your code? That will run the shell command specified by the next input. The default is make,  which is used for c programming. Here's the documentation: http://www.gnu.org/software/emacs/manual/html_node/emacs/Compilation.html#Compilation
Instead, you want to use the command line program that compiles your MATLAB code. (Is it mcc?). So the input after M-x compile should be something like
mcc [-options] mfile1

What ever the command, it needs to be in your path variable.
Answer: Start by installing el-get; then, juts el-get-install and select matlab-mode. Then, have a look to INSTALL and README. Here you'll find all you need. Don't forget to
(require 'matlab-load)

At this point, you'll be able to launch the matlab shell as an inferior process, evaluate regions, lines, etc., and use mlint to check your code.
Note that you may achieve the same using the provided matlab-mode package when using melpa instead of el-get. No instruction files in this case, though.
Comment: Is this the same as the matlab-mode that's available in melpa?
Comment: Reading `el-get`'s and `melpa`'s recipes, they come from the same source. Is there an advantage to using `el-get` instead of `package-install`? If not, maybe this answer should suggest that instead, it seems to be the more "official" alternative
Comment: They are pretty similar, except that `melpa` version is more compact, no project
files, no makefiles ... and not INSTALL or README files. This is why I privilege
`el-get`.
Answer: You can run bash in a new buffer in Emacs by pressing C-x 2 (or C-x 3). Then go to that buffer and press M-x shell to run bash.
In order to run matlab in console mode you need to do the following in bash:
matlab -nodisplay -nosplash -nodesktop -r "run('yourfile.m');exit"

It's better to write the above command in a shell script that accepts the matlab file as an input.
Answer: If matlab-mode isn't installed, by default .m files are loaded in octave mode.  If you aren't familiar with octave, it can run most matlab code. (Functions from some of the toolboxes aren't implemented, and some newer features are absent.  For most basic things though, matlab code will run as-is in octave).  This is a good option if matlab isn't available.
To get a console, use the command run-octave, which will open a command line instance in a new window.  Running scripts can be done in several ways, as others have mentioned running a shell within emacs works quite well, but emacs compilation mode provides some helpful functions.
Start compilation-mode with the compile function. You need to change the compile-command to be octave <<filename>>.  You can also set the compile command on a per-file basis by a line similar to ## -*- compile-command: "octave test.m"; -*- as the first line in the file.  I would strongly suggest creating a keybinding for compile.

Compile Matlab Code


How to make sharp and rounded corners

Question: I'm trying all kinds of options to make sharp edges and rounded corners for an excavator arm. Apart from just using bevel, I also have tried to use "make sharp" and "edge crease", but it doesn't look nice. Any suggestion have I can improve my model with more edges and where to put them or any other approach to make rounded corners with sharp edges?
Answer: If you're modeling using subdivision, at its simplest, this sort of topology will give you a rounded corner: supporting loops close to the sharp edges, and looser on the round corner. You have a degree of control over the tightness of the corner by sliding the edges on either side of it.
[

However, if, for example, you you wanted a perfect circular arc in the corner, breaking instantly to perfectly orthogonal edges, you might choose a bevel, as suggested by atek.
Answer: With the knife tool cut this way

To make an edge. With the edge selected Press Ctrl+B to bevel and with the mouse wheel make the segments and how much round shape you need

How to make sharp and rounded corners


What are the best types of cardio exercise for someone with bad knees?

Question: I'm looking for some good types of cardio exercises that are good for someone with knee problems, especially knees that have patella dislocation problems. I've tried the elliptical machine and found it to be far too boring for me to want to use on a regular basis. I also used to surf a lot, but that's really painful for my knees. So, I need something new to try that won't be boring and won't cause me excess knee pain.
Answer: Any type of low-impact cardio, but swimming would be the best since there is zero-impact. Stay away from any type of jumping or rotating activities as jumping notoriously leads to dislocated patellas.
Comment: I second the recommendation for swimming.  Considering you used to surf a lot, it might be perfect for you--and it's not as boring as staying in one place the whole time.
Answer: Other than exercises recommended by @Alison S answer, you can also try upper body cardio exercises, such as rowing (or rowing machine) or kranking.
Plus they will also improve your upper body.
Answer: You might swim with a pull buoy : www.youtube.com%2Fwatch%3Fv%3DITK0chbKegI&usg=AOvVaw16R0fot4UEMgQmyP75U7sr
Otherwise if your patella problem still allow you to walk or run you should definitively try with minimalist shoes (you can see brands like Merell, Vibram for Vivo Barefoot for this).
This allows to have a natural biomecanic movement, and thus, not letting all the power of your steps traumatizing your knees.
Indeed, you will have shorter, easier, lighter footsteps. The impact will be absorbed by your calves muscles. Your ankles will be free to play their roles (stabilizing). Your feelings and feeback will be much more pleasant.
But beware ! This is a very different effort and your calves will be very sollicitated. You need to re-learn to run with them. Begin very low and go progressively.
If you are interested, I strongly advise you to follow this guide : https://us.vibram.com/on/demandware.static/-/Sites-VibramUS-Library/default/dw5f33655e/natural-training-guide.pdf
In any case, you really should ask to a sport professional to do a checkup and go progressively. Good luck.
Comment: I really want to stress how important it is to go slow when you go barefoot style. The transition might take anywhere from six months to over a year. It is a great way to walk and run, but it is hard and you will have setbacks. Other than that: go for it
Answer: Try cycling. I ran for years, on whatever I wanted, including lots of concrete. One day I went from an 8–14 mile run/week to barely being able to walk down stairs thanks to extreme knee pain. I took up cycling 10 years ago and never looked back. I could never get into indoor trainers (though recent digital/social accompaniments look to make it more interesting) opting instead for anything outdoors, especially in nature. I'm talking mountain biking, gravel biking, road biking, and everything in between. I have absolutely no knee pain anymore and can ride huge distances / elevations, maintain conversations with friends, get to work, etc. Highly recommended.
Answer: Swimming is excellent for this. But I advise combining it with a legs training program on a gym, per example, because it's necessary to you have some impact to keep your bones strong.


again, i object to the median filter question being closed

Question: i don't get why people close virtually good questions about salient topics to signal processing.  an efficient median filter is definitely a salient topic to DSP.
Comment: Yeah, I'm not really sure why that would be considered off-topic. I guess it did read a little like a "gimme the c0dez" question, but I don't think that was the OP's intent in this case.
Comment: well, whatever the OP's intent (and i do not object to posting code), it's a legit topic.
Comment: There's no objection to posting code as long as the focus is mostly on the signal processing and not just on some API (for example). And that seems to be the case here.
Comment: yeah, the guy wants to know how to do a sliding median filter.  and so do i.  (i actually know how to do a bone-head sliding median filter and am just now learning how to do an efficient one that is $O(\log_2(N)$).
Comment: It's this question right: https://dsp.stackexchange.com/questions/36348/how-to-build-a-median-filter-function
Comment: yes @OlliNiemitalo
Comment: Link to the question in question?
Answer: Robert, I closed it because, as the close reason states,

Questions requesting working code written to a specification are off-topic as they are unlikely to benefit anyone else. Instead, describe the problem you're solving and where you're stuck.

The OP gave no motivation, showed no interest in letting us know how far they'd gotten, or whether they even understood what a median filter was.
To me, this question is the perfect exemplar of questions that should be closed for this reason.
Feel free to edit it to address these issues.
Comment: Oh I completely get why you closed it. Thanks for the excellent explanation of what I obliquely referred to as a "gimme the c0dez" question. In this case, with just a slight amount of effort, it could become a very good question. I'll leave it to you to make the call on when that standard has been met.
Comment: Could we allow requests for code for general-purpose algorithms? For them the reason to close: "unlikely to benefit anyone else" does not apply I think. Source code can often be employed easier than math or verbal descriptions. Coincidentally, I happen to need a sliding median filter too (really!).
Comment: @OlliNiemitalo : I'm not averse to "reference implementations".  I'm just not sure how to distinguish between that and "give me teh codez" sorts of questions.  I tend to try to give implementations of algorithms that I answer with; I find if I don't then I miss something about the question. :-)
Comment: Legitimate closing!!
Comment: so because the OP didn't ask nicely and was clueless for how to begin, no one other than me gets to answer that question.
Comment: No, @robertbristow-johnson  I be glad to spend some time answering it if it's  edited
Comment: @robertbristow-johnson I believe you shouldn't have answers it without further no clarification. So, to answer your question: yes.
Comment: Ah, I see help center says "specific requests for reference implementations of signal processing algorithms are on-topic". I'll try to edit the question.
Answer: How to build a median filter function in 1D can be quite legitimate: nature of the samples (from few bits to double-float), off-line or on-line, $\mathcal{O}(1)$ and constant-time algorithms, using prior or histograms, a comparison between the performance wrt languages or memory, build it from stack filters, etc.
Closing a question can be  a question of rules, habits and mood, so it is not 100% logical. I did not vote to close it (but I could have done so if fast enough and in a bad mood), and I am not sure that off-topic is a perfect match, but tickable reasons for closing are limited.
But this question, at least in the present version, is quite poor. We shall extrapolate that it is a running median. Easy. Apart from that, in my opinion, it is written written like mandatory  (I need to build one) homework (without using medfilt1 or any matlab funct) unthought (How to build a median vs 1D median filter algorithm) request (Help me). The OP does not make a distinction between the median definition, algorithm or its implementation. I do teach DSP, and I ask students on the first day to implement, by themselves and from scratch, a running mean and a running median, to evaluate their abstraction, validation, coding and efficiency skills.
With such a question, you can ignore, edit or close. Putting ignore aside, to me the options for improving the quality of SE.DSP are either:

edit ANY question, because ANY question can be turned into a good question, and answer it the best you can,
comment, flag, close, and offer the OP a chance for improvement.

The limit between the two options belongs to your power of interpretation.
As a side note, your present question does not seem to be a question:

Neither the title nor the body contain a question: you object, ok, that is a personal position, you don't get, a matter of fact
The title is about something quite specific (i object to the median filter question being closed) and the body is quite  generic, so very different: why people close virtually good questions.

Yet I agree,  an efficient median filter is definitely a salient topic to DSP. So what should I do with you question? I did not ignore it. Should I edit it? Flag it?
I do love recursive arguments and embeddings.
Comment: Laurent, in [this answer](http://dsp.stackexchange.com/questions/3494/sliding-window-minimum-and-maximum-filter-in-matlab/32253#32253) i have some very simple, yet efficient C code for computing a sliding max that is $O\big(\log_2(N)\big)$ in computational cost.  it can be simply modified to perform sliding min.  since i have seen some efficient median algorithms that are $O\big(\log_2(N)\big)$, but there is a lot of indirection in the code that, while proportional to $O\big(\log_2(N)\big)$ would slow it down, in my opinion.
Comment: the way i might do it is to maintain **two** buffers, a sliding max, operating on the data that is below the median, and a sliding min, operating on the data that is above the median.  both buffers are long enough for the entire window, but in the *lower buffer* all of the samples that are above the median will be assigned something like -1.0e38 and in the *upper buffer* all of the samples that are below the median would be assigned +1.0e38.  that way, the sliding min or sliding max always gives us the two samples sitting right next to the median.
Comment: @robert bristow-johnson I believe that most of the discussion is about the question, not your answer
Comment: so, when a sample comes in, you have to decide which buffer (the lower or upper) it goes into (and $\pm$1.0e38 goes into the other buffer.  then if the sample that falls offa the edge is in the same buffer, there need be no transfer between the upper and lower.  but if the sample that falls offa the edge is in the opposite buffer than the new sample coming in, then a transfer must be made.


Is there any point answering/commenting/voting on old posts?

Question: Say a post has been inactive for a period of time, what happens if you answer, comment or even vote on that question: who sees what you've done? Is voting good practice on inactive questions as it keeps them 'alive' so to speak. Is the OP alerted if any of this occurs. I've read this 'bumps' the question back onto the front page, does this happen every time one answers, comments or votes on an old question?
Comment: The point: to get the Necromancer badge!  (Actually I got the badge by answering a question not realizing it was old.)
Comment: These older discussions seem to be related, at least to some extent: [What is the protocol (if any) for answering old questions?](http://meta.math.stackexchange.com/questions/1391/what-is-the-protocol-if-any-for-answering-old-questions) and [Resurrecting old questions?](http://meta.math.stackexchange.com/questions/6403/resurrecting-old-questions).
Comment: @MartinSleziak Thanks for your links, they are very helpful. One bugbear someone made on the links was "Another problematic situation that comes up is when outdated information is resurrected, which can confuse/mislead people who don't know it's outdated." But to me this seems a small price worth paying, the date of old posts should be noted and readers keep an open mind surrounding changes that may have been made in the meantime (it's called progress!).
Answer: The whole point of stack exchange is to build a high quality collection of questions and answers for a given subject. If you think of things in these terms, it is irrelevant how old a question is. If you can improve the corpora with a better answer, add it.
Comment: Also consider that answering old questions improves the signal-to-noise ratio of the website; it is very frustrating to search for a hint on a problem, only to find old, unanswered stackexchange posts :)
Comment: Great, I've learned so much from MSE, it truly is a great resource. One of the reasons I posted this question was I spent a while putting together an answer to a question about a Khan Academy primes+cryptography page from a few years ago, I think, just because the OP was so confused by the Khan page, which even though they will have moved on someone else would hopefully be helped.
Answer: Answering bumps the question but (I think) only for those who have clicked the "active" option, not for those who are using "recent". Commenting notifies the person who posted the question. Commenting on an answer also notifies the person who posted the answer. Commenting may also notify a few others who have contributed to the question/answer – see the related posts about comment notification for details. Voting only notifies the person you have voted on.
Also, anyone who stumbles across the question at some future date benefits from your answer/comment/vote, and I think that's the main point in taking these actions on old posts.
Comment: I think you mean "newest" when you say  "recent"; You are right, in this view all that counts is the date the question was first answered.One might add users that favorited the question to those that have a reasonable chance to note acitivity. (IIRC they'll see answers and edits and comments to the question).
Comment: "first answered" should be "first asked" in my comment. Sorry for the noise.
Comment: @Gerry Myerson Thanks, that cleared up some points. So we should feel free to get stuck into a 4 year old debate if there's something new to say. I guess with the comprehensive search this makes sense.
Answer: My first post was quite recent, answering an OP that was about one and half years old. It got an immediate response which was quite gratifying and made me feel welcome on the site. However, my post was more of a comment, though I posted it as an answer, not knowing any better. Apparently I would not have bumped the question up to active if I'd followed the guidelines and just commented. But then, my 'comment' ended up correcting a mistake that resulted in a better answer. It's possible that many users that came across the old discussion were confused by it. So, if anything, commenting on/answering old posts should be a priority!
Answer: As noted, commenting (resp. answering) serves as a "message": you can notify an answerer/commenter (resp. OP) of your thoughts on the question. In this sense, there is certainly a point. Don't worry much about bumping as the bump is very temporary and is not caused by comments. As far as votes go, there isn't even a counterargument, really. It requires little effort on your part and doesn't bother anyone (unless you're downvoting, in which case standard etiquette applies).
There is also another thing to keep in mind, if you want your comments or answers to receive significant attention: is the question popular? If it's popular, your contribution, in the near or long-term future, will likely receive substantial views. On the other hand, more obscure posts may not; indeed, perhaps you may never receive a reply or a thumbs up.
You should still post, however. Certain topics require specialized knowledge and hence are less popular. However, twenty years down the road, maybe a graduate student is working on a complex problem in a specialized field and stumbles on a helpful contribution of yours. In this situation, posting a comment or answer for this one hypothetical graduate student would be reason enough to post.
Comment: The bit about specialist knowledge makes a lot of sense, since as you say down the line someone can google and find your answer, which of course won't be the most popular question site wise but will do its bit for the site. Now where did I put my specialist knowledge ;-)


remove or hide Link Relationship (XFN) form Menus tab

Question: I'm looking for how hide or remove Link Relationship (XFN) from Menus tab (In red on the picture below)
Comment: On the top right of the menu screen you can find Screen Options where you can hide it
Comment: Thanks. But i want it to be permenant for all users with out go to the top screen each time a new users is created.
Answer: In Menu Section On Top Bar Screen Option, there is Option to Hide or Show Link Relationship Tab. Please Check Below Screenshot
Comment: Thanks. But i want it to be permenant for all users without go to the top screen each time a new users is created.
Answer: I did some research and I don't think there are options to remove these "advanced screen options". You can however remove the entire screen options tab . If you really want to remove just that option you should be able to do it with css or jquery to hide/remove the options.
jQuery solution
place the following in your functions.php
function abc_load_scripts_on_admin() {

    $screen = get_current_screen();

    if( $screen->ID == 'nav-menus' ) {

        wp_enqueue_script( 'abc_remove_xfn', get_stylesheet_directory_uri(). '/remove_xfn.js' );
    }
}
add_action( 'admin_enqueue_scripts', 'abc_load_scripts_on_admin' );

create a file in your theme with the name remove_xfn.js.
Add the following jQuery to newly created file
jQuery( document ).ready( function() {

   jQuery( '#xfn-hide' ).parent().remove();
   jQuery( '.field-xfn' ).remove();
});

this removes both the xfn option in the screen settings and the actual setting for each menu item if its somehow turned on.
I also found the plugin Adminize wich might do what you want but I haven't tried it yet.
Answer: You can hide field using jquery, put below code into your functions.php file. Also, You can hide other field using the same function to modification some changes.
function customize_nav_menu_screen_option() {
?>

<?php
}
add_action( 'admin_footer','customize_nav_menu_screen_option' );


Mean Power Inequality

Question: Most of the proofs of mean power inequality are based on jensen's inequality. Can the mean power inequality be prooved without use of one?
Mean Power Inequality: http://www.artofproblemsolving.com/Wiki/index.php/Power_Mean_Inequality
Answer: As stated there,
$$
\left(\frac1n\sum_{i=1}^na_i^{k_1}\right)^{1/k_1}\ge\left(\frac1n\sum_{i=1}^na_i^{k_2}\right)^{1/k_2}\tag{1}
$$
when $k_1\ge k_2$ is almost directly Jensen's Inequality since $x^{k_1/k_2}$ is a convex function.
However, Hölder's inequality yields
$$
\begin{align}
\sum_{i=1}^na_i^{k_2}1
&\le\left(\sum_{i=1}^n\left(a_i^{k_2}\right)^{k_1/k_2}\right)^{k_2/k_1}\left(\sum_{i=1}^n1^{k_1/(k_1-k_2)}\right)^{(k_1-k_2)/k_1}\\
&=\left(\sum_{i=1}^na_i^{k_1}\right)^{k_2/k_1}n^{(k_1-k_2)/k_1}\tag{2}
\end{align}
$$
Which leads to $(1)$ after some simple algebra.
Comment: Note that Hölder's inequality can be proven using Jensen's inequality, but not vice-versa, so Hölder is essentially weaker than Jensen.
Comment: Thanks! That was really helpful.
Answer: It is hard to avoid Jensen, as the inequality does follow from convexity, but I'll give an elementary proof that doesn't use it explicitly.
Step 1: reduce the inequality to the case $k_2 = 1$. How is it done? Raise both sides of $M(k_1) \ge M(k_2)$ to the $k_2$'th power, and you'll get $M(\frac{k_1}{k_2}) \ge M(1)$, with $a_i' = a_i^{k_2}$.
Step 2: reduce the inequality to the case where $a_1 + \cdots + a_n = n$. It is "OK" to do so because $M(t)$ is homogeneous in the $a_i$'s.
Step 3: Lemma (the convexity argument) - $x+y = 2 \implies x^k+y^k \ge 2$ for any $k \ge 1$. Proof: let $x=1+\varepsilon, y=1-\varepsilon$ (WLOG $\varepsilon >0$). We then use Newton's binomial expansion:
$$x^k+y^k = (1+\varepsilon)^k+(1-\varepsilon)^k = 2(\sum_{i=0}^{\infty} \varepsilon^{2i}\binom{k}{2i}) \ge 2$$
We even see that the inequality is strict unless $x=y=1$.
Step 4: We need to show that for any $k \ge 1: \sum_{i=1}^{n} a_i = n \implies \sum_{i=1}^{n} a_i^k \ge n$. The multivariate function $f(a_1,\cdots,a_n)=\sum a_i^k$ achieves a minimum on the compact set $\{a_i \ge 0 | \sum a_i = n\}$. We we'll show it occurs when $\forall i: a_i=1$. If, for contradiction's sake, we assume it occurs on $(a_1, \cdots ,a_n)$ when not all $a_i$'s are equal, we can replace it with the following better option: if WLOG $a_1$ is maximal and $a_n$ is minimal, we can replace them with their average:
$$a_n' = a_1' = \frac{a_1+a_n}{2}$$
and we get a smaller value of $f$ -
$$f(a_1,\cdots,a_n)-f(a_1',\cdots,a_n') = a_1^k + a_n^k - 2(\frac{a_1+a_n}{2})^k $$
$$= (\frac{a_1+a_n}{2})^k ((\frac{2a_1}{a_1+a_2})^k + (\frac{2a_2}{a_1+a_2})^k - 2) $$
and this is positive (by our lemma), giving a contradiction.

Mean Power Inequality


How to split a dataset into train and test sets for time series (multiple step-multiple output forecasting)?

Question: I am trying to use an LSTM neural net to do multiple step / multiple output forecasting (I predict multiple values in one time knowing some values in the past). But, I have realized that I must be careful when splitting my univariate series into training and test sets. In this post, I am going to share what must be done in my opinion, but I really would like to have yours.

$(X_k)_{1\leq k\leq N}$ denotes my univariate time serie.

So basically, multiple output models are complex as they are trained to learn the dependencies between inputs and outputs as well as between outputs. This can be a problem as I transform my time serie like that :
$ D = (x=(X_k, ..., X_{k+p-1}) , y=(X_{k+p},..., X_{k+p+n-1}))_k $
with $p$ my number of steps and $n$ my number of outputs ($1 \leq k\leq N + 1 - (n+p)$). I want to split it into training and test sets. So, I must get :
$ D_{\text{train}} = (x=(X_j, ..., X_{j+p-1}) , y=(X_{j+p},..., X_{j+p+n-1}))_j $ where $j \leq N  - 2(n+1) - p$
$ D_{\text{test}} = (x=(X_i, ..., X_{i+p-1}) , y=(X_{i+p},..., X_{i+p+n-1}))_i $ where $i+p+n-1=N$
In this case, I can avoid overfitting due to a naive splitting of my dataset $D = D_{\text{train}} + D_{\text{test}}$ where $+$ denotes a concatenation operator (preserving the timeline). Indeed, this would lead to over-fitting in my opinion as I would have in my train some part of my test.
For a better understanding, let's take an example :
My univariate series is denoted as $(X_1,...,X_6)$. I want to predict $n=2$ values in the future knowing $p=2$ values of the nearest past. So, I transform my dataset as:
$ D = (x=[(X_1,X_2),(X_2,X_3), (X_3,X_4)] , y=[(X_3,X_4),(X_4,X_5), (X_5,X_6)])$
I split it naively, I get:
$ D_{\text{train}} = (x=[(X_1,X_2),(X_2,X_3)] , y=[(X_3,X_4)])$
$ D_{\text{test}} = (x=[(X_3,X_4)], y=[(X_4, X_5)]) $
I am afraid that it will lead to overfitting as the data $(X_3, X_4)$ is in both datasets. Maybe I am wrong, that's I want to know :)
Would you like to tell me if I am wrong and what do you think about?
Thanks.
** Edits are written in bold **
Answer: Assuming you have sales data for 36 month and you want to forecast for next 6 or 9
months. Lets create the train and test data at 70 and 30.

train data= 36*70/100= 26(rounding value of 25.2)
  test data= 10(leftout sample)

Now we'll build a model on train data and forecast values on test data(those 10 points), to measure model performance we use MAE or MSE, always MAE or MSE values should be less. Once you model is doing good then forecast for future 6 to 9 months. i.e multiple output in one time prediction.
Comment: Sorry but you seem to not understand what I said. I know how to classically split a dataset. But in case of multi step/multi output forecasting (I mean in one time prediction) I must verify that some part of my test are not in my train. If I don't I am afraid that I would over-fit. (See my edited post for a better understanding).


What does the word לאַטקעס (latkes) mean?

Question: לאַטקעס is the Yiddish word used for the potato pancakes commonly and commemoratively eaten on Chanukah. Where does the word לאַטקעס come from originally? What exactly does it mean?
Comment: Similar: http://judaism.stackexchange.com/q/6168
Answer: Etymonline gives it as from Russian латка, "pastry", which may have come eventually from Ancient Greek ἐλαία, "olive" (or maybe it means modern Greek ελαία, "olive". I'm not sure).
Comment: Hence, we should fry them in olive oil!
Comment: @DoubleAA I don't know the exact derivation from _ἐλαία_ (or _ελαία_): possibly it came from having been fried in olive oil, but perhaps it came via some other route (e.g., maybe early pastries were olive-shaped). Compare http://judaism.stackexchange.com/questions/6168/etymology-of-krepel#comment7340_6174.
Comment: Where does it say the Russian came from the Greek? It looks like an alternative etymology, either Russian or Greek?
Comment: @Curiouser, no, I think I read it correctly. (Also, Yiddish having derived from Greek is much less likely in general than Yiddish from Russian and Russian from Greek.)
Comment: @msh210 In any case, the OED says Russian and leaves it there, no mention of Greek.  So I think you are exaggerating when you say "comes eventually from". The website you linked to says "but", indicating that only Watkins traced it further to Greek but it is not necessarily accepted as such.
Comment: @Curiouser, true; thanks; I'll edit the answer.
Answer: Etymonline seems to be essentially correct. Two other sources discussed in Balashon's article here describe the journey a little more explicitly:
Yiddish latke, from either Russian latka or Ukrainian oladka, both derived (I assume) from Old Russian оладья, olad'ya. This is then apparently derived from the Greek ελαδια, eladia, "olive-y things", ultimately from Greek elaia, "olive". The original intent, as I understand it, referred to cheese pancakes or fritters fried in olive oil. Matthew Goodman suggests (in the Forward article linked in the Balashon post) that as Jews migrated eastward into Ashkenazi Europe the preferred frying agent shifted from olive oil to schmaltz (chicken fat) and thus cheese pancakes became simple buckwheat or flour pancakes (what the Russian/Ukrainian words refer to now). As the potato was introduced to Europe in the 17th century, it was slowly adopted, becoming popular in the first half of the 19th century.
Derekh agav/An aside: eating cheese/dairy on Hanukkah is an old tradition to honour Judith, who in the midrashic tradition defeats Holofernes by feeding him salty cheese and slaking his thirst with wine (while in the Apocryphal version there is no cheese, just wine); see Noam Zion's comments here, with citations from the Rama and the Kol Bo re: cheese on Hanukkah.


Cyclical time in Buddhism

Question: I've been learning about time and the varyous perspectives that it is viewed through, and it seems like there are two main ways of thought. The first, generally associated as a western mindset, is that time is linear. The second, and this is generally considered more eastern, is that time is considered cyclical. I'm pretty sure that this is also a common way-of-thought in Hunduism, but I'm, in particular, wanting to learn more about the nature of time from a buddhist perspective. Of what I have read sutra-wise (pretty much just the Lotus Sutra), I have only seen time's cyclality being alluded to once, when Shakyamuni Buddha is saying that, at the end of a kalpa, when the world is consumed by fire, his pure land will, although appearing to burn with the rest of the world, stay safe and untouched. I assume from this that at the end of kalpas, it was considered that the world would burn (maybe signifying the start of a new cycle). Anyhow, I'm just wanting to know more about the nuances of Buddhist-cyclical time and how one can comprehend/view the world in such a way.
Answer: Cyclicality and Linearity are both alluded to in Buddhism. Essentially many beings are trapped in Samsara living their lives and doing similar things over and over through the aeons because they are chasing after the same endless desires and suffering the same afflictions. However, it is also linear in the fact that progress is possible, you can transcends Samsara by practicing the Noble Eightfold Path. The future is by no means fixed that you are required to repeat the past. The world have many internal cycles but it is also moving forward. You can see day turn into night into day, and each day we do many similar things we have already done before, but it is also not quite the same day, and you will certainly be a different person 10 years from now.
The ultimate goal of Mahayana Buddhism is to liberate all beings, turning the world into a Pure Land of peace and joy. Yes, such a goal is very distant but never the less they strive towards that goal.
Answer: There is the cyclical nature of life in Samsara. The doctrine of Paticcasamuppāda (Pāli) states that when certain conditions are present, they give rise to subsequent conditions, which in turn give rise to other conditions. This is the cyclical nature of life in Samsara. If you read the Mā Puñña Bhāyī Sutta – It.22 it can be said that even time is cyclical.
Buddha had the ability to see the past up to infinite time such as many Sanvatta Kalpa, Vivatta Kalpa, and Sanvatta Vivatta Kalpa. Sanvatta kalpa means the time that takes the world to be destroyed after countless years. Vivatta kalpa means, time of the beginning of the world. In the Mā Puñña Bhāyī Sutta – It.22, Buddha says that:

…when it was the time of the world's destruction, He was born in the Ābassara divine world. And when it was the time of the beginning of the world, He was born in a beings-free Brahma abode as a Brahma divine being. The Buddha also said that He was born as the Mahā Brahma in the Brahma realm for seven times and as the Sakkra who is the head of all deities in Cātum Māhārājika and Thāvatinsa divine worlds for thirty six times.

Cyclical time in Buddhism


Don't generate db but map to existing tables

Question: We'd like to use model first to generate clean EF models for our application but instead of having the model generate a new db schema we'd like to then manually do a table mapping within the entity to an existing database table or tables. Is there a mechanism for this?
Answer: Sure is.
This is called Entity Framework Code-First and this is a good tutorial to help getting you started.
The idea is that you create some POCO classes seperate to your Repository/Database class. In this Repository/Database class, you define all the relationships between your POCO's. Fortunately, Entity Framework has a number of conventions which you can leverage off, which means you might not need to define every relationship and rule.
Eg. If your class is called User, then it will assume (by default, unless you override this) that the database table is called Users and the primary key identity field in the POCO will be UserId and the same in the database table.
Answer: Not sure if I understand the question, but when you use the wizard to create a new Entity data model, the first step allows you to "Generate from database", just point it to your existing DB. You can then cut out the tables you don't want and/or modify the table mappings manually. There's also the option to pick and choose which tables you want represented in your model in the first place.
Comment: In an entperrise level application when you have 750 tables and 500 procs etc you want to generate clean models without having to import your whole database. Cutting it apart and even viewing it are very problematic. So what the user is asking is a really valid question in enterprise level applications.  You want to define clean models that you can then attach to appropriate tables in the db.  From what I can tell you cannot use model first to do this unfortunately but I am actually researching the same issue now for a large enterprise level application.
Answer: I also looked for this option using EF Model first with EF 4.0.   I also wanted to start with a small clean model because we have a huge enterprise level application in which we cannot import everything into one edmx because it is not even viewable due to the scale of our database.
So we wanted to consider model first as an option to build smaller, cleaner models and then map them to our existing tables in our db.
This is what we learned.
Model first generates the db schema that will go into an "existing db".  It is somewhat misleading initially because people think that it creates a new db. It does not actually create the db itself.  The db must exist and then model first generates the t-sql scripts that will go into the db.
It generates these scripts in a new .sql file in your project which you can then view or send off to a dba if you have one.
It will generate these scripts as CREATES for tables assuming that your tables do not exist.
So, as an example, if you created a "Customer" entity in the model, it will generate a script (*.sql) file containing CREATE TABLE T-sql to create the customer table for your customer entity that you can then run on an existing sql database.
So this is what it is designed to do, generate clean tables for a new model basically.
Does this mean that you can't use it at all if your tables already exist?  No, you can use it. You just wouldnt run the Create scripts that it generates.  I don't believe it was really designed for this but we tested this and it did work.
Where you may run into additional problems with model first, and a limitation we have found, is that because model first is designed to generate new db schema, you cannot map to existing stored procedures. This was a problem for us and so we eliminated model first as an option for our architecture.
We are reviewing code first and db first right now as options for an enterprise level system and right now we are leaning toward code first at this time. Code first allows you to create small, manageable contexts that you can work with and this seems very beneficial in a large enterprise level application.


Issues with mix-minus setup on Xenyx Q1002USB with dbx 286s

Question: My setup is simple and complicated at the same time:
My mixer is a Behringer Xenyx Q1002 USB Premium.

 1. I have a XLR microphone going into a dbx 286s Mic Preamp/Processor. The processed audio is output through a 1/4" to 1/8" cable, with a 1/8" adapter into the mixer on line 1.

My PC audio goes out of the motherboard, leading via 1/8" to 1/4" cable to the mixer on lines 5/6.
I have another 1/8" to 1/4" cable leading from the back of a TV into the mixer on lines 9/10 for whenever an HDMI device is connected to the TV.
I have a 1/8" to 1/4" cable going out of the FX Send into the PC. (Line 1 has FX send turned on so I can have the isolated microphone audio available for recording)
I have a pair of headphones connected to the Phones Out for monitoring.

This setup would allow me to have PC and TV sound coming in through the headphones, as well as monitoring for the mic.
The problem is as such:
I used to run 1/8" to 2x 1/4" unbalanced audio cables from the PC and TV into the mixer, but with the addition of the dbx 286s, it generated lots of noise that appeared to be coming off of lines 5/6 and 9/10, with the microphone appearing to be in perfect quality on the monitoring headphones and on recordings on the PC.

I suspected that this might be a ground loop issue or interference from the equipment, since the unbalanced cables are susceptible to it.
I replaced the unbalanced cables with 1/8" to 1/4" cables, thinking that would fix it.
However, now the fidelity of the sound is ruined. Particular frequencies play at regular volume, while others are extremely low or mute. Spoken word is muffled and music can barely be heard, except for particular instances where it pops in and out for a split second. Different programs seem to have different reactions, as music being played through foobar2000 seems to not be effected as much.
My question now is, is there something I could do to either:
a. Make the setup work with the new balanced audio cables and restore the fidelity of the audio.
b. Change the setup in a way that the 1/8" to 2x 1/4" unbalanced audio cables will work and not generate noise in monitoring.
The spare parts I currently have are a male XLR to 1/4" cable, the two 1/8" to 2x 1/4" unbalanced audio cables, a female XLR to 1/8" cable and USB cords that can connect the mixer to the PC via USB. A ground loop isolator is also in transit and should be delivered in about a week, so I can work that in potentially.
Answer:
a. Make the setup work with the new balanced audio cables and restore the fidelity of the audio.

You don't have new balanced audio; you have unbalanced stereo going into a balanced input which does not work and is why the audio sounds horrible and like things are missing. (Because they are.)

b. Change the setup in a way that the 1/8" to 2x 1/4" unbalanced audio cables will work and not generate noise in monitoring.

If it is the preamp that introduces the buzz try to plug all the equipment into the same power strip. Do you have a device plugged into a different outlet across the room? Also try to connect a DI box between the preamp and the Behringer and lift the ground switch of the DI.
Answer:
I replaced the unbalanced cables with 1/8" to 1/4" cables, thinking that would fix it.

That's still an unbalanced cable. Your PC output is unbalanced, any cable connected to it will be unbalanced.
You could insert a DI between the PC output and the mixer. Use a passive DI or an active DI with a power supply. Experiment with the Ground lift switch.

However, now the fidelity of the sound is ruined.

It is possible that one of the jacks is not fully inserted. I can create this effect by pulling a 1/8" jack from its socket by just the right amount.


Find out the name of constants and var in IDA pro

Question: I'm trying to search with IDA pro constants of type "#define SIZE 100" and normal local variables from a gcc-compiled binary file. I know there are a lot of open threads on the subject but I can't quite figure it out.
For example, this tutorial is very close to what I want, but I don't understand how I can display them graphically in IDA pro.
I'm new at this, thanks.
Answer: Generally speaking, this is not possible with any reverse engineering tool. If the programmer created custom <code>#define</code> statements to associate numbers with symbolic names, this information will be destroyed by the compiler very early into the compilation process, long before the binary is ultimately created. Local variable names are also not preserved in the final binary, unless the binary contains debug information (or you have external debug information that you can apply to the binary). However, if this were the case, IDA would have already applied the information, and you would already see the proper names.
TL;DR compilation destroys all symbolic names, and generally speaking, they cannot be recovered without debug information.
Comment: Compilation destroys the names of **everything**: `#define`s, `const` literals, function names, local/global variable names, `goto` label names, structure names, structure field names, `typedef` names, module names, `enum` element names. The only time you'll see a name from the original source code in a binary is if it's an imported or exported name (a function or data item), or if the binary was compiled with debug information/RTTI, as described in my answer.
Comment: I compile with the following options:
`gcc -Og main.c -o main -no-pie -fno-guess-branch-probability`

The contents of the int constants are not shown to me, but the "#define msn "Hello" constants are shown in .rdata. But my program only has integer constants / literals.

Of the variables I can only describe that I can find them in the form "var_XXX" and I can't know the name of the variable, is it true?
Comment: What would be the best way to compile with debugging information? I would have to do it this way: `gcc -g -Wall -o main_es main_es.c`


Using a local MTA as gateway to Sendgrid

Question: I am setting up an email system using Interspire Email Marketer with 5 user accounts, and each user has their own Sendgrid account.
We are trying to build a fast system, so we have a dedicated MySQL server with lots of RAM, a web server to host the Interspire software, and our current problem: a MTA server.
We want the MTA server to act as a gateway to Sendgrid since it can process emails in parallel instead of directly from Interspire with the PHP limitations. From what I've heard Postfix will not be able to be used since we all have our own Sendgrid accounts, and when Postfix is configured to act as a gateway, it only allows one set of credentials.
My question is, how can we still setup/use our own Sendgrid accounts, but pipe the emails via a MTA server to Sendgrid? Are there any alternatives?
I would almost like to have the MTA intercept the smtp requests from the web server (which includes the smtp authentication details) and then take over the delivery. Since the MTA is also a local server it should be quite fast.
Answer: Charlie, you can use sender dependent SASL auth in postfix to use different relayhosts for different users. http://www.postfix.org/SASL_README.html#client_sasl_sender
Comment: That's what I thought too, but I am being told that I can only use one set of credentials per unique relayhost. I need 5 separate credentials all for one relayhost (sendgrid).