How to compute input impedance?

Question: I use a Sallen-Key filter for a project at university and I need to know its input impedance. Is there a way to compute it theoretically ?
Here is my circuit:
Comment: Do you consider the ideal op-amp or the real TL071?
Comment: @clabacchio : the ideal op-amp
Answer: Calculating the input impedance by hand is almost certainly what you're supposed to do as the other answers have suggested.  I just wanted to show you how to go about getting some numbers out of a circuit simulator so you could check your work (or apply the same concept to a more complicated circuit).  Here's your Sallen-Key filter in CircuitLab:

And here's the frequency domain simulation showing the input impedance looking into the input:

(source: nerdkits.com)
You can open the circuit and change the parameters, configuration, op-amp model, etc.  Just hit F5 and you'll see the V(out)/V(in) Bode plot, as well as the input impedance plot that I've included a screenshot of above.  Using custom expressions in the simulator, like MAG(V(in)/I(R1.nB)), allows you to calculate quantities like small signal impedances quite quickly!
Using a test current source, rather than a test voltage source, makes sense for how I'd probably go about solving this on paper.  However, for simulation purposes, using a voltage source as the test input allows us to more easily understand the V(out)/V(in) Bode plot at the same time.
Answer: Yes, this is a standard circuit analysis problem.
Perform the analysis in the frequency domain (R and Xc) and connect a 1A ac current source at the input.  Solve for the input voltage as a function of frequency and that expression is the impedance.
I suggest using nodal analysis to perform the analysis.
Assume that the op amp is ideal and so the current into the +/- terminals is zero and the voltage at these terminals are equal.
Comment: I found $$ Z_{in}(\omega)=\frac{R_{24}(R_3+R_{23})+j\omega C(R_{23}R_4R_{24}+2R_3R_{23}R_{24}-R_3R_4R_5)+(j\omega)^2C^2R_3R_{23}R_4R_{24}}{R_{24}+j\omega C(2R_{23}R_{24}-R_4R_5)+(j\omega)^2C^2R_{23}R_4R_{24}} $$ which graph is the same (on Matlab) as the one in compumike's post (on CircuitLab)
Comment: How did you get to it?
Comment: @EgorTamarin It's a secret
Comment: I do ot know but the expected result is that the input impedance must be very very high
Answer: Use the extra element theorem, as explained in Wikipedia.  There are multiple paths to the solution with this approach (since any of the components may be made the "extra" one).  Choosing C4 as the extra element looks like one of the simpler choices.
In your circuit, the op amp complicates things a bit, but you can write down the currents and voltages on the schematic to compute the various impedances required.
Once you've mastered the extra element theorem, you can then proceed to the generalized N-Extra Element Theorem (NEET, originally developed by S. Sabharwal), which enables you to write down the answer by inspection and a bit of algebra on the schematic:
$$Z_{in}=(R3+R23) \frac{1+s[C5(R3||R23)+C4(R4+(R3||R23)-\frac{(1+R5/R24)}{1+R23/R3}R4)]+s^2C5C4(R3||R23)R4}{1+s[C5R23+C4(R4+R23-(1+R5/R24)R4)]+s^2C5C4R23R4}$$
Answer: @snickers
I pretty much just compute the Input Impedance, Zin in my Head.
Well you could solve for it using Ohm's Law and summing node equations, but after you've done it a few times, just do it in your head.
Step 1. Do a DC analysis
 Step 2. Do an AC analysis where f is >> fo(BPF)
Step 3. Figure out what happens at f=fo
so here we go.
1. Zin= R1 + R2
2. Zin= R1 (since C5= 0Ω)
3. Zin= open circuit due to cancellation of signals . i.e. no feedback and hence maximum gain.
So if you had one of those nice HP or Anritsu Vector Network Analyzers, you get Zin with a big spike at f0 on a flat line where Zin starts at 35.6kΩ & ends at 33.0kΩ or something close to that...
But I do like the beautiful simulation and graph done above by one of our astute young Engineers.
See it my way? or your way starting with
Comment: I get it but what I need is an analytical expression. Anyway useful to estimate it on the go.
Answer: You can obtain the input impedance of this active circuit using the fast analytical circuits techniques or FACTs. Install a test generator \$I_T\$ across the input terminals of your filter. The \$I_T\$ current is the stimulus while the voltage \$V_T\$ across the source is the response.
First, consider the circuit for \$s=0\$: open-circuit all caps. and inspect the circuit below.

The input resistance in this condition is simply \$R_0=R_3+R_{23}\$.
Now, reduce the excitation to 0 A and open-circuit the current source. Then "look" through the capacitor's connecting terminals to determine the associated time constants in this mode:

The first time constant is found by inspection while you need a few equations to get the second one involving \$C_4\$. You combine these time constants to form \$b_1=\tau_5+\tau_4\$. Then, short \$C_5\$ and "look" again through \$C_4\$'s terminals to get the new time constant. It's easy, its \$R_4C_4\$. You have \$b_2=\tau_5\tau_{54}\$. The denominator is equal to \$D(s)=1+sb_1+s^2b_2\$.
For the zeroes, consider a response \$V_T\$ across the current source equal to zero: we null the response. A zeroed response across a current source is similar to replacing the current source by a short circuit. There we go:

The maths are not difficult and you will determine \$\tau_{5N}\$, \$\tau_{4N}\$ and \$\tau_{54N}\$ in the same way as I did in the above lines. The numerator is obtained by combining these time constants together: \$N(s)=1+s(\tau_{4N}+\tau_{5N})+s^2(\tau_{5N}\tau_{54N})\$. Finally, the transfer function is \$Z_{in}(s)=R_0\frac{N(s)}{D(s)}\$.
I have captured these data in a Mathcad sheet:

and the plots are here:

A quick SPICE sim tells us this is correct:

Some more work can be done to rearrange a bit the transfer function with quality factors in \$N\$ and \$D\$ but nothing insurmountable. the FACTs are a powerful tool and gets you to the transfer function you want in a few steps that are all verifiable by a simulation.

How to compute input impedance?


Does anyone know how to build asynchronous mod 10 down counter using t flip flops?

Question: I know how to build asynchronous down counter , but it starts with F and ends at 0 and a need it to start at 9 and count to 0.The T flip flop has a set and reset and i need to use them so that it can count form 9 to 0.If anyone has any idea that would be helpful.
Comment: But: you'll need to show a bit of own attempt, explain what you've tried, what you've got stuck with. Like it is now, we can't tell where to start or stop explaining.
Comment: because that is the assignment... sadly
Comment: adding the [tag:homework] tag, in that case.
Comment: Does it need to count from 9 to 0 repeatedly, or do you provide an external signal to reset it to 9? First, figure out how to wire the set and reset lines to set the flip flops to 9. Then, figure out what gates can detect when it should reset.
Comment: yes it need to count from 9 to 0 repeatedly, well since the counter starts with F  i tried when the value  of the counter is 1111(F) to reset the counter , same when its 0000 (0) , but it doesn't work , also tried to reset only the second and third TFF  when the value is 1111 ( so the value  from 1111  changes to 1001 which is actually 9 and continues to count) but that also doesn't work
Answer: Up counter from 0-9
Assume we have 4-bit async. counter that counts up from 0 -> 15

One way to limit this counter would be to simulate the 1111 bit patteren whenever the current output is equal to 9
In other words, whenver the output is equal to 9 1001 we need to toggle OUT[3] and not to toggle OUT[1] the next clock cycle so we end up with a 0000
Assuming this is our T flip-flop model in verilog
module TFF (CLK,T,OUT);
  input CLK,T;
  output reg OUT=0;
  always @ ( posedge CLK ) begin
    if(T) OUT<=~OUT;
    else  OUT<=OUT;
  end
endmodule // TFF

And we have built some combinatorial logic circuit that checks the counter output if its equal to 9 it will make sure to toggle OUT[3] and to not toggle OUT[1] the next clock cycle
module NINE_YET (IN,OUT);
  input  [3:0] IN;
  output reg [1:0]OUT;
  always @ ( * ) begin
    if(IN==9) OUT<=2'b01; //Q[3] should be toggled the next cycle, Q[2] should not
    else OUT<={~IN[2],~IN[0]}; //just pass Q` of Tff[2] and Tff[0]
  end
endmodule // NINE_YET

And this is the top module where everything is connected
module TOP (CLK,OUT);
  input CLK;
  output [3:0] OUT;
  wire [1:0]nine_yet_op;
  NINE_YET m(OUT,nine_yet_op);

  TFF Q0(CLK,1'b1,OUT[0]);
  TFF Q1(nine_yet_op[0],1'b1,OUT[1]);
  TFF Q2(~OUT[1],1'b1,OUT[2]);
  TFF Q3(nine_yet_op[1],1'b1,OUT[3]);
endmodule // TOP

This is the same connection as the count-up counter that counts from 0 -> 15 but the only difference is that the CLK inputs of the 4th and 2nd flip flops are connected to the combinatorial circuit that checks if the output is 9 or not
And this is the result

I don't know why initially the flip flops output is set to 1111 i think i`m missing something in my testbench, but i hope you got the idea

Build a normal down-counter
Start inserting some combinatorial circuit that toggle the correct flip flop[s] the next cycle once the required bit pattern is detected
Comment: i don't how to make the T flip flops to go from 1111 directly to 1001 and then continue to count to 0 when i reset  the flip flops  from 1111 goes directly to 0000
Comment: Well assuming each flipflop initial value is zero would make more sense in this case your logic will handle who should be triggered the next cycle and who should not ending up with the first and the last flip flops being triggered with the pattern `1001`. But in case they are initially all set to 1 you need extra clock cycle to store the required bit pattern inside them and then they will count down till zero at this point your logic will handle who to trigger next and so on
Answer: Assuming you have an up counter 0->15.
IIRC, if you take the outputs from the !Q's instead of Q's you get a 15-0 down counter.
Then, you can build logic that when the count is zero will force the necessary T's such that the next step is 9 instead of 15 (on the !Q's outputs).
As input for that logic, you have available 4 Q's and 4 !Q's (just use the ones you need). Design the 0->9 logic in any way you know (e.g. Karnaugh map).


Notch filtering line noise outside of frequency band of interest

Question: Practically speaking, if one is interested in a frequency band well-separated from the line noise (say, for example, the 10-20 Hz band, with 60 Hz line noise), would it be advisable to notch out this line noise before bandpass filtering to the desired frequency range? It seems that, given of course an acceptable filter rolloff, it would be better not to perform an additional filtering step if it were not necessary; however, I'm wondering whether this may lead to some unforeseen problem.
Comment: If the stop band of your bandpass filter is sufficiently attenuated, then the notch filter won't be required. You'll have to determine the filter settings based on the maximum line noise that you observe by varying the experimental setup (distance between transmitter and receiver in case of wireless transmission). A stop-band attenuation of 20dB is usually sufficient. If you are implementing the filter in an embedded platform for real-time applications and need a low order filter, try an order 6 butterworth filter.
Answer: A general rule of thumb is to filter as little as necessary, because every filter distorts your desired signal, even if just a little bit. Also: a notch filter is advised in a situation where narrow-band interference is present within your signal's band. The notch filter will reject the interference while having minimal effect (ideally) in your signal.
In the problem you describe, my preferred approach would be to go with a low-pass filter only, and increase its order to achieve sufficient rejection of the 60 Hz noise.
Comment: I agree with this fully, and appreciate hearing your advice.


deploy replicas on multiple VMs

Question: How do you set up a multi-node replica set in Mongodb? I don't know where to start. I'm trying to set up a replica set of three members in three virtual machines, i.e. there will be a total of three members, one for each virtual machine.
Answer: Please follow the steps from the below links, If you face issues in setting up the replica set or any questions on the blog. Please add a comment with your issues.
How to Setup MongoDB Replication
Deploy a Replica Set

deploy replicas on multiple VMs


Add Linked In share button to askubuntu

Question: Would not it be nice if we could add LinkedIn between social networks to share links Askubuntu? Especially focus on the labor side that this network continues to provide.
Answer: The LinkedIn button was removed when StackExchange added the Google+ share button.
Also, as Nick Craver (one of the StackExchange staff said) on Meta Stackoverflow

As Jeff answered here those links were experimental.  The LinkedIn one simply wasn't being used, not to nearly the volume of the others...so we removed the extra clutter from the UI.
It will likely be replaced with Google+, given they ever provide an officially supported link-only way to share.
Comment: oh, that's a shame ... thanks for the answer

Add Linked In share button to askubuntu


Can .bash_profile be auto sourced after change?

Question: I'm always wondering if there's a way to do this. I don't want to type source after changing my .bash_profile all the time.
Comment: Log back in (if typing `source .bash_profile` is too much trouble)...
Comment: `. ~/.bash_profile` saves you a pair of keystrokes...
Comment: @jasonwryan I use alias now so I just want to know if auto source is possible...
Comment: @laike9m I doubt it. Bash doesn't monitor the configuration files. You'll have to use an alias or function of some form.
Answer: It is possible to make it happen automatically with a little work using PROMPT_COMMAND and -nt with a marker file. If you put this into your ~/.bash_profile file:
touch /tmp/bash_profile-$$
resource_profile() {
    [ ~/.bash_profile -nt /tmp/bash_profile-$$ ] && source ~/.bash_profile
}
PROMPT_COMMAND=resource_profile

then an empty marker file will be created in /tmp when the shell starts, named with the PID of the shell to identify it.
Before displaying the prompt every time the shell will run the resource_profile function, which will check whether ~/.bash_profile has changed (-nt) since the last time it was sourced and updated the marker file, and will automatically source ~/.bash_profile if it has changed. When the file is sourced it will update the marker file again for the next time.
This isn't foolproof - depending on the filesystem, changes made shortly after the file is sourced may not be detected. The file will only be checked after you run a command or press Enter, which is as close to immediate as it's possible to get, but not completely instantaneous.
Depending on the profile of your system you may prefer to put the marker file elsewhere where nobody else can access the directory. It's also possible to build something similar out of stat(1) if you have it, avoiding the marker file entirely.


How to permanently save powertop's suggestions?

Question: I run powertop then it suggests that I should disable xy, etc. However, after I exit powertop, reboot the pc, and start it again[powertop], it brings up the same tips again! So how can I permanently save the suggestions of powertop?
Comment: @Oli Can we please reopen this question? Due to edits to the linked question, *this* question is not a duplicate anymore. Especially not an *exact* duplicate. I'm facing this problem as well and need to find a solution soon.
Comment: Hi Lance - this was a duplicate of another question so I've refunded your bounty and linked question to the other. If you need more information you can put your bounty back on the other question.
Comment: Can someone please re-link the duplicate or comment on it here so that others can find it?
Comment: The duplicate linked is this. - http://askubuntu.com/questions/50242/why-does-echoing-these-parameters-with-sudo-not-work
Comment: Can you tell us what exactly the "stuff" it want's you to do is, so we can see any problems. For example, a specific command, or set of commands it want's run. How your running it, etc. Can we perhaps look at just one change it want you to make. It's very hard to tell why it's randomly not working without more data.
Answer: Quick answer :
You just need to save them in /etc/rc.local.

Detailed answer

In a terminal run:
sudo powertop --html=powertop.html

Step 1 generates a html file in your home directory. Click on that file so that it opens in your internet browser.
In the browser, go to "Tuning" tab. It gives all the tunings you have to tweak (on the left), and the commands that are implementing them (on the right).
Save these commands in /etc/rc.local.
To do that, in a terminal, run:
gksu gedit /etc/rc.local

Write the commands before the line that reads exit 0, and save the file.
Answer: Saving to rc.local as stagelll mentions is probably the simplest way to do it, but it's obviously only good for a local fix.
Another way would be to craft a udev rule that applies the setting for the device in question.  udev rules are more complicated to write but are safer to share with others.
For example, powertop suggested this:
echo 'on' > '/sys/bus/usb/devices/3-10/power/control';

which solved the particular issue I was interested in.  But 3-10 is a bus number that's going to vary from system to system, depending on how the usb devices are attached.  After a bit of research and fiddling, I made a file /etc/udev/rules.d/10-usb-avocent-kvm-pm.rules with this rule, which sets power/control to on for my devices, wherever it might be connected in the USB subsystem:
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0624", ATTR{idProduct}=="0013", ATTR{product}=="SC Secure KVM", TEST=="power/control", ATTR{power/control}:="on"

Comment: On [ArchWiki](https://wiki.archlinux.org/index.php/Power_saving#USB_autosuspend), I read `ATTR{power/control}="on"` without the colon before the equal sign. Perhaps you should correct?
Comment: No. According to the man usbdev page, using = sets a value, and using := sets a value such that it cannot be unset. Either is probably suitable here.
Answer: This doesn't exactly save your powertop settings, but it does  come with its own defaults which enable almost every powertop setting. It's called laptop-mode-tools.
Just run sudo apt-get install laptop-mode-tools and run powertop, see if you like it. This also enables you to edit the settings, which in turn, edit the powertop settings.
You can edit the settings by running sudo gedit /etc/laptop-mode/laptop-mode.conf Maybe someone else knows how to save the settings "specifically" from powertop.
Here is a link for more information http://samwel.tk/laptop_mode/
Comment: laptop-mode-tools was replaced by pm-utils-powersave-policy in 2010, and may have since been replaced by something else.  I don't think it's useful in current ubuntu releases.
Comment: hmmm very interesting. I use Ubuntu 12.10 and I con confirm laptop-mode-tools works just great and actually does function/shutdown things such as usb ports for a specific period of inactivity. However I will checkout this pm-utils.
Comment: does installing laptop-mode-utils still cause other things to get uninstalled?  It's possible that it got un-replaced or something...


Abstraction level for MVC mass versions of a view

Question: I have an MVC that serves a form to a view. I'm pondering the best approach to serving form content, that is form elements such as labels and form inputs such as selects. It is possible that the form elements will change often and will have many different versions spanning several pages.
I have thought about three approaches, each unsatisfactory to me.

Each version of the form will be fully written in html and saved as
a discreet view.

Pros: If I need a particular set of elements, I can call a view with one line of code from my controller.
Cons: I will end up with dozens upon dozens of views.

Shift the load to my controller, and pass an array of element names to my view array('select' => array('label' => "element 1", 'class => "big"), 'select', 'input', 'input'), which will take the array and parse it into the markup as form elements.

Pros: Allows me to have just one view, and I can specify the set of form elements I want loaded into the view at the controller level.
Cons: My controller will go from several lines of code to several hundred lines of array definitions pretty quick.

Serialize sets of elements and tuck them away into a database to be called whenever.

Pros: Several lines of code at my controller and one view file.
Cons: Making changes to any one set of form elements becomes a real pain. Anytime I have to include a new set or make changes, I have to access the database and unserialize and serialize.
So for templating different versions of the same form, and also allowing interchangeability of form elements, what is the approach do you guys suggest?
Comment: templates are not views.
Answer: You could build a library of form methods and extend the appropriate controllers.  I will usually build libraries or "helper" classes for any perpetual data, keeping my controllers uniform and tidy.  Doing so gives you the ability to simply extend a controller to class Form_Data where you could have dedicated methods that build individual form elements, also enforcing separation of concerns.


What is the Elance business model that allows workers from any country to work for firms based in the USA?

Question: What permits companies like Elance to employ freelancers from foreign countries without a visa requirement? Normally one needs a special type of visa to work for a company in USA.
Comment: Are you asking for the specific code and section? That may be more on topic for the Law.SE (in beta as well), but I don't see how that section would help freelancers in general... Can you [edit] to make your question a little more clear?
Comment: No. Just from a high level perspective. Also, I have re-worded my question.
Comment: I still don't see how this is a good fit for this site. It's not describing a problem you as a freelancer are experiencing, which is what this site is about. If anything, it also feels extremely broad/open ended, with no single right answer
Comment: @CanadianLuke, I think the answer should be very  objective,specific and not broad. I don't think the answer to my question should be subjective and based on opinions. I could perhaps move it to another Stack Exchange topic if you feel it does not belong here.
Comment: Question could have been simply "Is a visa necessary for freelancer on Elance!"
Answer:
What permits companies like Elance to employ freelancers from foreign
  countries without a visa requirement?

The TL;DR; answer is: Because (in the example you ask) the freelancer is not working IN the USA - they are supplying a service or delivering goods TO, or perhaps working FOR, a company based in the USA.
Visas permit the movement of people, and restrict what they do in a country.  You do not need a visa to work in your own country... just as you do not need a visa to post to any StackExchange website
Answer: What permits people to hire the services of contractors oversea without a visa?
Basically for the same reasons why they don't pay taxes or vote in other countries. It's also something that's very hard to control with internet now and most countries simply freely allow this service trade with selected "friendly" countries.
There's no real visa, but there's still a common set of rules they share and that act as a "worldwide visa" in a way; with the "non-friendly" countries, that freedom is not given so easily as the governments will monitor transactions and communication (or make all this impossible.) For example, I doubt there's any North Korean freelancers on Elance. The agreement of friendly countries is something like "manage your people, I'll manage mines and let's keep in touch." That's the easiest and cheapest way to manage international trade when there's no central power.
A visa is like a permission and also a guarantee that the person to who it's granted will get some protection but will also need to follow the laws and regulations of the country. It's like a temporary contract.
Technically, the reason why they don't need a real visa when doing freelance oversea is because the freelancer doesn't gain/require any benefits from the country of the buyer and doesn't have any extra right/protection in it either; the only protection of a freelancer in this case is the laws and regulations the buyers must submit to in his/her own country. The freelancer doesn't cost anything to the buyer's country if he follows the basic international rules (eg. no electronic fraud or money laundering or illegal trade.)
In theory, the freelancer doesn't have any obligation towards this country either, besides the special treaties and accords his/her own country has with the country his/her employer is located.
I'm not a lawyer but I guess that's the simplest way to explain why it's legal and doesn't require a real visa.


Extension of the method of characteristics

Question: Solve the pde (advection equation):
$$
u_t + c u_x = 0, \hspace{0.5cm} t>0, \hspace{0.5cm} x\in \mathbb{R}
$$
with the condition given on an arbitrary curve $t=\tau (x)$, that is:
$$
u(x,\tau (x))= \phi (x), \hspace{0.5cm} \hspace{0.5cm} x\in \mathbb{R}.
$$
How to generally approach this problem? I know the method of characteristics (in this example $x=ct + \xi$ and $u$ is constant on characteristics) but I have only solved problems with initial condition:
$$
u(x,0)=\phi(x)
$$
or the boundary condition:
$$
u(0,t)=\psi (t)
$$
Can someone explain to me (on this example) how to extend the method of characteristics to conditions of the mentioned form? Thanks in advance!
Answer: In fact, thanks to the method of characteristics (or other method), the general solution of the PDE is found on the form :
$$u(x,t)=F(x-ct)\quad\text{ any derivable function } F$$
The question now is to determine the particular function $F$ according to the particular boundary condition which is:
$$u\left(x\:,\: \tau(x) \right)=\phi(x) \quad \text{with known (given) functions } \tau(x) \text{ and } \phi(x)$$
So, the condition is :
$$\phi(x)=F\left(x-c\:\tau(x)\right)$$
With this equation and known $\tau(x)$ and known $\phi(x)$ we have to determine the unknown function $F$.
Let $\quad \theta=x-c\:\tau(x)=f(x)\quad$ Hense $f(x)$ is a known function.
The key point is here :  Whe have to consider the inverse function of $\quad \theta=f(x)\quad$ that is : $\quad x=f^{-1}(\theta)\quad$. Or in other words $x=$the root(s) of the equation  $\quad x-c\:\tau(x)-\theta=0\quad$ , that is $x$ as a function of $\theta$.
$$\phi\left(f^{-1}(\theta) \right)=F(\theta)$$
So, the function $F$ is determined. The solution, according to the boundary condition is :
$$u(x,t)=\phi\left(f^{-1}(x-ct) \right)$$
where $f^{-1}$ is the inverse function of $\quad f(x)=x+c\:\tau(x)$
Comment: Thank you for your answer. I have one question though: what exactly is $X = x-c \tau (x)$ - is it somehow connected to the characteristics equation? My typical approach for this kind of problems is to write system of diff. eq, namely:
$$
\frac{dX}{dt}, \hspace{0.5cm} X(0)=\xi
\\
\frac{dU}{dt} = 0, \hspace{0.5cm} U(0)=u(\xi,0)=\phi(\xi)
\\
\text{(for initial condition $u(x,0)=\phi(x)$)}
$$
where $U(t)$ is equal to $u(x,t)$ on characteristic, namely: $U(t)=u(X(t),t)$. I'm sorry if I made a mistake somewhere - I'm taking now first course in pde and just trying to figure this out.
Comment: Do not confuse my variable $X$ with your variable $X$. I will change of symbol in me first answer in order to avoid the confusion.
Comment: Ok thank you, but could you explain to me what is $\theta$ exactly?
Comment: $\theta=x-ct$ is a solution of the PDE $u_t+c\:u_x=0$ which takes the particular form $x-c\:\tau(x)=\phi(x)$ on the boundary $t=\tau(x)$ in the system $(x,t)$.


What happens if I develop a B&W film as color?

Question: My friend accidentally did it, and got very interesting pictures with an aspect that reminds something akin to pictorialism. I would like to know more about the actual chemical 'impact', what actually happens in technical terms when using developing techniques for color film when having an actual b&w film. I think my friend accidentally used a B&W 35mm film (ISO/ASA 100 or 200) and apparently use the same for the camera ISO/ASA.
Comment: Hi, thank you for your answer. Sure, this is the link to one picture.  https://drive.google.com/file/d/11VdiaNURlFz7cf8mBVspHueZuP7ZnnNC/view?usp=sharing
Comment: Did your friend develop the film at home or send to a lab? What specific film did your friend use?
Comment: Hi Juan, Welcome to Photography.StackExchange. We hope you enjoy sharing your knowledge and experience here with us.
Answer: Developing black-and-white film as color (C41 or E6) is usually expected to produce blank negatives because the bleach step removes the silver and leaves behind only dye.  Black-and-white film has no dye to leave behind.

A partial bleach might leave a faded looking image.  Skipped bleach might look like normal black-and-white processing.  (These are guesses because I haven't done any partial/skipped bleach processing on either color or black-and-white film.)
A different color process might produce different results, but this scenario is unlikely because they are not in common use.
Cross processing C41 black-and-white in E6 might produce unusual results. C41 black-and-white film does have dye in it.
tfb notes that the temperatures for color processes are much higher than black and white. This might cause "smeary horribleness / reticulation". Normally, such problems occur when there is significant temperature variation among the solutions.
Comment: Aren't C41 & E6 temperatures much higher than B/W too?  I'd expect lots of smeary horribleness / reticularion as well as the emulsion probably turns into goo at high temperature.  That might be the 'pictorialist' effect.
Comment: I just added a link to one picture. My friend does not remember the actual process she used.
Comment: Colour couplers change the silver image to a dye image during colour development after the first developer renders the silver image. I've done this countless times with b&w film.
Comment: Normal B&W film doesn't have dye couplers. Chromogenic B&W film does.
Answer: Developing a Black & White film as colour film will leave a dye image rather than a metallic silver one. The secret is in how colour coupling works on a silver image. In effect, you are going to produce a "stain" image similar to "pyrogallol"/"Pyrocatechin" developed images

The first developer works to provide the negative silver image.
Stop development at the appropriate time with stop bath.
Bleach the existing negative metallic silver image which will make it water soluble.
Expose the film to light or chemical fog to render the remaining undeveloped silver image (which is positive).
Re-develop the re-exposed image in colour developer (one with colour coupler(s) added) to completion. You have already removed the negative image. At this point, you are developing all the remaining silver that has not been bleached.
Fix to remove all the remaining silver leaving the dye image that was coupled to the silver in the second (colour) development.
Stabilize with "stabilizer" (whatever that is and does)
Wash and dry.
Admire your unique and beautiful work.

Have fun. Good luck.
Comment: Normal B&W film doesn't have dye couplers. Chromogenic B&W film does.
Comment: @ZeissIkon You've found me out! This is, in fact, how I made my first million. Big screen colour infographic presentations made in minutes, in house, without delay—for business presentations with sensitive data—predated digital graphics.
Comment: Developing conventional B&W film in any color negative or transparency process from the past 80 years will result in blank film if the process is completed.
Comment: Sorry, the answer didn't make it clear that you had to *add* the color couplers to the color developer.  I've long been aware of this as "color toning" of prints (usually a finished print, bleach and redevelop), but didn't see any good reason you'd do it to film.
Comment: I don't know that the comments are still needed, with the strong clarification in the answer text.  Good enough for me to change my vote, anyway.  BTW, in thinking about it, I can see this being a spiffy way to make slides from B&W stock -- develop, fog, redevelop w/ dye couplers, and bleach/fix, and you have dye image monochrome slides.  Use a clear-base stock and they won't be gray in the whites.
Answer: There's one "color" process that might have produced an image like the one shown (though it appears the negative was "distressed" in some manner as well): that's developing with any of the three developers, C-41, E-6 First Developer, or E-6 Color Developer, then stopping and fixing with non-bleaching fixer (like conventional B&W fixer or C-41 fixer, not blix), without going through the bleaching step (often combined with fixing in home color developing kits).  Any color developer will produce a silver image in any conventional film -- but standard color processes bleach away the silver to leave only the color dye clouds that form the final (either positive or negative) color image.
With no dye couplers in your B&W film, you won't get a dye cloud image, but if you don't bleach the silver, you'll still get a silver negative images, just like what you'd get in D-76 or Rodinal.
The only other way to get a B&W negative with a color process is to use a so-called "chromogenic" B&W film, like Ilford XP2 Super or the Kodak equivalent.  These are essentially color films, but instead of three layers with filtration and different dye couplers, these films have a single layer of sensitive emultion, no filter layer(s), and dye couplers balance to produce a black image (by producing all three dyes in visually equal amounts).  With these films, in a C-41 process, the silver image is bleached away and the dye cloud negative image remains, just as with C-41 color films.


i can't tighten the hinge screws on my aluminum swinging screen door, the screws just spin without tightening. how can this be remedied?

Question: i have an aluminum swinging screen door. the hinges are loose, but I can't tighten them, the screws just keep spinning. What should I do?
Answer: It depends on the frame.
If the frame is metal

remove screws one by one
take some bare copper wires and insert them into the hole
put the screw in the middle of the hole with the copper wires on the outside
screw down until just about flush then cut the excess length from wires before finishing.

The screw should jamb the copper wires into the metal hole and allow the screw to grab.
If the frame is wood you can use wood pieces to do a similar thing.  Golf tees, wood match sticks, small pieces split from shims will all work.
Comment: The door is aluminium.  I wouldn't use copper wires, as it would lead to galvanic corrosion, and the aluminium will take the hit.  Aluminium wire (if you can get any) would work, otherwise braided aluminium foil would help nicely.
Comment: If the frame is aluminium would aluminium wire work better?
Comment: Aluminum wires would be best but I don't think you'd have an issue with galvanic corrosion unless this is in a marine climate.  Galvanic corrosion requires a conductive liquid and rainwater is rather non-conductive assuming you even get any water at the fastener area of the door.
Answer: I assume that the metal at the screw is relatively very thin, say near 1/8" or so, and that is what is causing the screw to strip. Also the door piece is a hollow member and that you can't get to be back of it to place a nut on a bolt. I suggest trying JB Weld Aluminum (be sure to get the one for Aluminum). You can work it into the hole to fill in and get some behind the metal to make the threaded part deeper, and some on the threads to fill it in some there too. Then either let it dry and tap new threads, or put your hinge on w/ screw in place, make sure it's tight because you won't be able to adjust it later (you wanted it nice and fixed solid right?)


To what kind of religion is Hegels 'spirit' (Mind/Geist) most related?

Question: Hegel explains in his works how the Geist is evolving during history towards a kind of consciousfreedom. It seems to me initially that in the end our own minds has evolved to a rational God, but I'm not sure of this. But in what religion is the interpretation of a God similar to the definition of Geist according to Hegel?
Comment: See [Hegel and Religion](https://plato.stanford.edu/entries/hegel/#AbsSpi): "the implications of Hegel's philosophy for religious belief had been contentious since his rise to prominence in the 1820s. While officially declaring that philosophy and religion had the same *content* - God - Hegel claimed that the conceptual form of philosophy dealt with this concept in a more developed way than that which was achievable in the imagistic representational form of religion.  1/2
Comment: Why do you think it *might* be related to a specific religion? (Is there a specific passage you're reading that has made this an interesting problem in your study of philosophy?)
Comment: Many opponents were suspicious that the concept of God was emptied of its proper meaning in the process of Hegel's philosophical translations and Hegel was suspected by some of pantheism or atheism. Ultimately, then, the source of the corrosive effects of Hegel's philosophy on religion indeed could appear to be the insistence that the content of religious belief, like everything else, be grounded on rational, in fact *logical*, considerations—the logical coherence of the system of philosophy itself—rather than on anything like revelation." 2/2
Comment: marxism (boom tish)
Comment: I see Hegel as rejecting theism and groping towards the philosophy of Buddhism and the Perennial philosophy. His logic certainly takes us in this direction. This would be nondualism, which some would see as a form of religion.  The ur-text would the Upanishads.
Answer: Hegel seemed to believe that Christianity was the particular religion relatively closest to his rational religion ideal. Hegel was attracted to the structure of the Christian Trinity, the mystical union between God and Man, which appeared to match nicely the movement of Hegel's own trinitarian logic (the so called thesis - anti thesis - synthesis movement). The self-sacrifice of Jesus also fitted well with the idea of self-negation, which is the central operator of Hegel's logic. Hegel therefore thought that e.g. Judaism and Islam were less developed than Christianity. The following quotes are from Hegel's Smaller Logic.

It is no doubt to be remembered, that the result of independent thought harmonizes with the import of the Christian religion:—for the Christian religion is a revelation of reason...
But God, far from being a Being, even the highest, is the Being. This definition, however, though such a representation of God is an important and necessary stage in the growth of the religious consciousness, does not by any means exhaust the depth of the ordinary Christian idea of God. If we consider God as the Essence only, and nothing more, we know Him only as the universal and irresistible Power; in other words, as the Lord. Now the fear of the Lord is, doubtless, the beginning,--but only the beginning, of wisdom. To look at God in this light, as the Lord, and the Lord alone, is especially characteristic of Judaism and also of Mohammedanism...
The movement of the notion is as it were to be looked upon merely as play: the other which it sets up is in reality not another. Or, as it is expressed in the teaching of Christianity: not merely has God created a world which confronts Him as another; He has also from all eternity begotten a Son in whom He, a Spirit, is at home with Himself.
Answer: You have substituted god for spirit. What Hegel is referring to is the fundamental ability of humans to use and modify abstractions. Mind/Giest signifies the qualities of both mind and spirit that defines most of the subjective skills we pursue and possess as humans. Religion is another form of subjective abstraction that serves a cultural need to refine mind and spirit usage to adhere to actions within limitations of practices and beliefs. The abstraction of subjective religion fits within the distinction for Mind/Giest, but not the other way around.


How do I apply a gradient to the edges of a buffer?

Question: I have a series of buffered points. I want to apply a gradient to the buffer edge so it appears the buffer just fades away - no discrete line. How can I create this effect?
Comment: Note that 'fades away' can have multiple meanings. With the two methods below you'll still see an edge depending on what is underneath because they don't utilize transparency. However transparency in Arc is kind of tricky. A few related questions: http://gis.stackexchange.com/questions/83007/ and http://gis.stackexchange.com/questions/91537/ and http://gis.stackexchange.com/questions/94402/
Answer: In the symbol selector you can choose 'Circular Gradient' then select edit symbol, here you can select the color ramp style and outline type.

When selecting the outline type select 'Edit Symbol' again and choose the 'Null' option from the drop-down menu:

The result is a gradient buffer with no outline like this:

There may be other ways to accomplish this but this is one option.
Answer: For a raster-based approach, you can use the Euclidean Distance tool.  For this example, I changed the raster display to histogram equalized stretched (Layer Properties > Symbology > Stretch > Type : Histogram Equalize).  The stretch type will give you control on how the buffers appear--you may want to use a custom histogram.  Also, you will want to experiment with the proper cell size to find a balance between resolution and file size.


MathProg (AMPL) - Variable Array Sized by Another Variable

Question: I am writing my first GNU MathProg (AMPL) program to find the minimum switch (vertex) count instances of a HyperX topology (graph) for a given radix, number of hosts, and bisection bandwidth.  This is a simple first program because all of the equations have been described in the following paper: http://cal.snu.ac.kr/files/2009.sc.hyperx.pdf
I have read the specification and example programs, but I am stuck on a very simple syntax error.  I need to have the following two variables: L, the number of dimensions in the network, and an array S of length L, where each element of S is the number of switches in each dimension.  In my MathProg program, I express this as:
var L >= 1, integer;
var S{1 .. L} >= 2, integer;

However, when I run $ glpsol --check --math hyperx.mod, I get the following error:
hyperx.mod:28: operand following .. has invalid type
Context: ...isec ; param radix ; var L >= 1 , integer ; var S { 1 .. L }

If anybody can help explain how I should properly express this relationship, I will be grateful.  Also, I am including the entire program I have written for reference and extra help. I expect there to be many syntax errors in my program, but until I fix the first one, I have no way of finding the rest.
/*
 * A MathProg linear program to find an optimal HyperX topology of a
 *  given network size, switch radix, and bisection bandwidth.  Optimal
 *  is simplistically defined as minimum switch count network.
 *
 * A HyperX topology is a multi-dimensional network (graph) where, in
 *  each dimension, the switches are fully connected.  Every switch
 *  (vertex) is a point in an L-dimensional integer lattic.  Each switch
 *  is identified by a multi-index I = (I_1, ..., I_L) where 0 <= I_k <
 *  S_k for each k = 1..L, where S_k is the number of switches in each
 *  dimension.  A switch connects to all others whose multi-index is the
 *  same in all but one coordinate.
 */

/* Network size in number of hosts. */
param hosts;

/* Desired bisection bandwidth. */
param bisec;

/* Maximum switch radix. */
param radix;

/* The number of dimensions in the HyperX. */
var L >= 1, integer;

/* The number of switches in each dimension. */
var S{1 .. L} >= 2, integer;

/*
 * Relative bandwidth of the dimension, i.e., the number of links in a
 * given dimension.
 */
var K{1 .. L} >= 1, integer;

/* The number Terminals (hosts) per switch */
var T >= 1, integer;

/* Minimize the total number of switches. */
minimize cost: prod{i in 1..L} S[i];

/* The total number of links must be less than the switch radix. */
s.t. Radix: T + sum{i in 1..L} K[i] * (S[i] - 1) <= radix;

/* There must be enough hosts in the network. */
s.t. Hosts: T * prod{i in 1..L} S[i] >= hosts;

/* There must be enough bandwidth. */
s.t. Bandwidth: min{K[i]*S[i]} / (2 * T) >= bisec;

/* The order of the dimensions doesn't matter, so constrain them */
s.t. SwitchDimen: forall{i in 1..(L-1)} S[i] <= S[i+1];

/*
 * Bisection bandwidth depends on the smallest S_i * K_i, so we know
 * that the smallest switch count dimension needs the most links.
 */
s.t. LinkDimen: forall{i in 1..(L-1)} K[i] >= K[i+1];

# TODO: I would like to constrain the search such that the number of
# terminals, T, is bounded to T >= (hosts / O), where O is the switch
# count of the smallest switch count topology discovered so far, but I
# don't know how to do this.

/* Data section */
data;

param hosts := 32

param bisec := 0.5

param radix := 64

end;

Answer: Fixed number of variables in a problem is a common assumption in solvers and algebraic modelling languages including AMPL/MathProg. Therefore you can only use constant expressions, in particular parameters, not variables in indexing expressions. One possible solution is to make L a parameter, resolve your problem for different values of L and select the one that gives the best objective value. This can be done with a simple AMPL script.


Unable to disable apple music

Question: I found a setting to show or hide apple music (Music -> Show Apple Music). I turned it off, but now when I go to the music app it shows me the apple music ad with no buttons for ~2 seconds and then the app crashes. Restarting/Resetting the iPhone has no effect. When I re-enable apple music the app works again. I have iOS 9.3.5 on my iPhone 4S.
Answer: It's very likely a software issue – since iOS 9.3.5 is a relatively recent update, it is bound to have some bugs. If that's the case, you'll need to wait it out until the next update, which will probably be iOS 10 in September.
Comment: If that is true, that stinks because 9.3.5 is the last version for my phone :(

Unable to disable apple music


How to open  file to edit tw.pol in Ubuntu?

Question: How to open to in unknown encoding to edit (tw.pol) in Ubuntu?
Comment: @none111, If any of the answers here helped, could you mark them as accepted? If they didn't, maybe some insight on how we can better help you would aid in resolving this issue.
Answer: When all else fails, use the terminal.
Try asking for some info on the file
<code>$ file tw.pol
</code>
Open it in vi (emacs if you must)
<code>$ vim tw.pol
</code>
A quick google search tells me that .pol is a file extension used by Microsoft to manage registry keys.
Answer: If you cannot open a file with gedit, try the Gnome Hexadecimal Editor, which can be installed at the command line with:
sudo apt-get install ghex2
or search for hex editor in the ubuntu software center.


How to create a custom post type with additional fields?

Question: Beginner's question:
Looking for example how to create a custom post type with additional elements. What I mean is: in my code I have a basic stuff like 'title', 'editor' ... but I need also for example 'start', 'end' - date fields or 'color'.
How to achieve this?
Answer: You can use add_meta_box (see also User Contributed Notes for examples) to add custom fields to your custom post type. If you don't feel like adding the metaboxes by yourself, you can also use a custom fields plugin (E.g. Advanced Custom Fields, CMB2, Pods, Carbon Fields.. I'm not affiliated to any of these) to do it for you.
There are good articles, with code examples, about custom meta fields and custom post types on the developer handbook. You should check them out.
If you need to group the custom posts or do sorting or searching based on the extra information (color, maybe?), then consider using custom taxonomy instead.
Comment: Ooh thank you Antti, and no no no, I don't want use any plugins, I would like to learn how to do it programatically. :P


Cannot deploy contract in remix with my Metamask

Question: I'm following a token contract tutorial on Youtube and everytime I try to deploy the contract on the Kovan testnet (in the remix solidity editor), it sends it off but then fails later. I have sufficient KETH, wo why would this be? Would switching to Parity fix this problem, and what is the difference between Parity and Metamask? Sorry for the long question.
Comment: Does Metamask support Kovan? Could you clarify how your deployment fails?
Comment: @5chdn meta mask has the 'Kovan Testnet' and I could receive KETH without a problem. How the deployment fails is that it is sent to the block chain but I cannot view it on the kovan ether scan and then later it says rejected or cancelled.
Answer: Metamask uses INFURA ( https://infura.io/ ) as a backend. INFURA runs both Geth and Parity clients (for Kovan it's Parity).
We've been having some issues with Kovan recently. The peering has been bad, and our Kovan Parity clients sometimes only have 2 or 3 peers (around last Friday was the worst for some reason). This could affect the ability of transactions to move through the network and get mined. Also, running Parity 1.6.7 (then the most recent version) was even more problematic, so we had to switch back to 1.6.6 . The service should work be working better now, but some of these things are out of our control.


How to recover just deleted rows in mysql?

Question: Is it possible to restore table to last time with data if all data was deleted accidentally.
Comment: backups?.........
Comment: as an alternative to plain backups, implement reversible transactions and data history
Answer: There is another solution, if you have binary logs active on your server you can use mysqlbinlog
generate a sql file with it
mysqlbinlog binary_log_file > query_log.sql

then search for your missing rows.
If you don't have it active, no other solution. Make backups next time.
Comment: Path of binary_log_files? Where will these files be stored?
Comment: For more information: see [dev.mysql.com](http://dev.mysql.com/doc/refman/5.0/en/mysqlbinlog.html)
Comment: Good point - note that this might not include all your data, and you need to have had binary logging on *before* the accident (which is  not the default).
Comment: See also [Point-in-time recovery](http://dev.mysql.com/doc/refman/5.6/en/point-in-time-recovery.html)
Comment: You saved my life.
Answer: Sort of. Using phpMyAdmin I just deleted one row too many. But I caught it before I proceeded and had most of the data from the delete confirmation message. I was able to rebuild the record. But the confirmation message truncated some of a text comment.
Someone more knowledgeable than I regarding phpMyAdmin may know of a setting so that you can get a more complete echo of the delete confirmation message. With a complete delete message available, if you slow down and catch your error, you can restore the whole record.
(PS This app also sends an email of the submission that creates the record. If the client has a copy, I will be able to  restore the record completely)
Answer: As Mitch  mentioned, backing data up is the best method.
However, it maybe possible to extract the lost data partially depending on the situation or DB server used. For most part, you are out of luck if you don't have any backup.
Answer: I'm sorry, bu it's not posible, unless you made a backup file earlier.
EDIT: Actually it is possible, but it gets very tricky and you shouldn't think about it if data wasn't really, really important. You see: when data get's deleted from a computer it still remains in the same place on the disk, only its sectors are marked as empty. So data remains intact, except if it gets overwritten by new data. There are several programs designed for this purpose and there are companies who specialize in data recovery, though they are rather expensive.
Answer: For InnoDB tables, Percona has a recovery tool which may help. It is far from fail-safe or perfect, and how fast you stopped your MySQL server after the accidental deletes has a major impact. If you're quick enough, changes are you can recover quite a bit of data, but recovering all data is nigh impossible.
Of cours, proper daily backups, binlogs, and possibly a replication slave (which won't help for accidental deletes but does help in case of hardware failure) are the way to go, but this tool could enable you to save as much data as possible when you did not have those yet.
Comment: Created a script to automate recovery from innodb (`ibd` files) using Percona recovery tool: https://github.com/VanagaS/mysql-innodb-autorecover. PS: `The time between the deletion of rows and the database stop is crucial. If pages are reused you can't recover the data.`
Answer: No this is not possible. The only solution will be to have regular backups. This is very important.
Answer: Unfortunately, no. If you were running the server in default config, go get your backups (you have backups, right?) - generally, a database doesn't keep previous versions of your data, or a revision of changes: only the current state.
(Alternately, if you have deleted the data through a custom frontend, it is quite possible that the frontend doesn't actually issue a DELETE: many tables have a is_deleted field or similar, and this is simply toggled by the frontend. Note that this is a "soft delete" implemented in the frontend app - the data is not actually deleted in such cases; if you actually issued a DELETE, TRUNCATE or a similar SQL command, this is not applicable.)
Answer: If you're using binlog with binlog_format=ROW which both is by default as of mysql 8.0,
and haven't done a full backup within the lifespan of available binlog files, i.e. complete mysqldump after the configured time of binlog_expire_logs_seconds before now, to perform the suggested Point-in-Time Recovery,
then you can still try to recover deleted rows with only a binlog file that covers these deleted events and turn them into insert events with this approach in https://github.com/lefred/MyUndelete/issues/5 :

it's able to replace the event type with the original awk script in http://thenoyes.com/littlenoise/?p=307:
BEGIN { regexp = "$^" }

/^BINLOG/ {
  print;
  getline;
  regexp = "^" substr($0, 1, 5) "[CSiy][ABCD]" substr($0, 8, 4);
}

$0 ~ regexp {
  n = $0;
  $0 = substr(n, 1, 5)
  $0 = $0 substr("BRhx", index("CSiy", substr(n, 6, 1)), 1)
  $0 = $0 substr("4567", index("ABCD", substr(n, 7, 1)), 1)
  $0 = $0 substr(n, 8) ;
}

{ print; }

sudo mysqlbinlog --start-position=148418658 --stop-position=484776616 binlog.000117 | awk -f undelete.awk | mysql

Answer: If you use MyISAM tables, then you can recover any data you deleted, just
open file: mysql/data/[your_db]/[your_table].MYD
with any text editor
Comment: thanks you really, thats great solution for the just updated row, and i found my old data before updated


.Net WikiText to HTML Parser

Question: I know, I know, its sounds silly, but it seems that there are no opensource robust .NET libraries out there for parsing Wikitext to HTML.
Anybody know of a stable.robust .net Wikitext to HTML parser (i.e. codeplex projects that are still in beta mode do not count)
Answer: Take a look at ScrewTurnWiki. Core/Formatter.cs has the HTML renderer, AFAICT.
Comment: Link dead, try this (for now...) : https://stw.codeplex.com/
Comment: Cheers, I forgot all about just ripping apart another c# wiki
Answer: Just to add another option, the one used on codeplex has been made available as a .NET library:
http://wikiplex.codeplex.com/

.Net WikiText to HTML Parser


Programing another atmega8 running on 1MHZ internal RC oscillator using Arduino IDE

Question: I want to write code for another atmega8 running at 1MHz internal RC oscillator using the Arduino IDE and its libraries. I have an ISP programmer to burn the code. What are the things that I should care about? How can I compile the code for 1MHz instead of 16MHz?
Comment: I want to clarify about the problems that arises due to the change in the frequency...
Comment: duplicate of http://electronics.stackexchange.com/questions/23454/is-atmega8l-8pu-compatible-with-atmega-328-on-arduino-uno?
Answer: You would need to add a new hardware configuration. Here the procedure is explained for an ATMega328: http://arduino.cc/en/Tutorial/ArduinoToBreadboard
but you would need to adjust the example hardware config or maybe you'll find a working one.
Answer: It depends specifically on what compiler/library you're using to write the AVR code, but in general, so long as you compile the code with the proper preprocessor macros #define'd for the CPU speed, you should be good to go.
For example, in the avr-libc documentation, the delay functions and UART baud rates rely on the definition of the F_CPU macro.  The proper way to set the CPU speed in such a case is:
#define F_CPU 1000000UL     // 1 MHz, 16MHz is 16000000UL
#include <util/delay.h>     // Delay functions library, delay values based on F_CPU.
#include <util/setbaud.h>   // Automatically sets UART baud rate registers based on F_CPU.

I have also noted the use of #define FOSC to set the CPU speed in some architectures/libraries (in the same way as above, so you could also follow with #define FOSC F_CPU).  For this reason, note that the particular macro you need to define/re-define may differ.

If you're using an integrated development environment, setting the clock frequency in your project settings may automatically define the above variables during compile-time.  In that case, no settings should need to be made to the code, unless your code is using the wrong preprocessor macro (or hard-coded value) for the processor frequency.  To be sure, I would double-check what macro is being set by the IDE, and ensure your code uses the correct values.


Fundamental matrix of a particular system

Question: I'm interested of finding a closed formula for the fundamental matrix to the system
$$\eqalign{
  & y'(t) = a(t)z(t)  \cr
  & z'(t) = \delta a(t)y(t) \cr} $$
$$(y(0),z(0)) = ({y_0},{z_0})$$
where $\delta$ is some constant and $a$ is a regular function. Thank you.
Answer: Let $A(t)=\int_0^ta(s)\,ds$. The matrices
$$
\begin{pmatrix}0 & a\\ \delta\,a & 0\end{pmatrix}\text{ and }
\begin{pmatrix}0 & A\\ \delta\,A & 0\end{pmatrix}
$$
commute. The fundamental matrix is then
$$
\exp\left(\begin{pmatrix}0 & A\\ \delta\,A & 0\end{pmatrix}\right)\ .
$$
If $\delta=\mu^2>0$, this is
$$
\begin{pmatrix}\cosh(\mu\,A) & \dfrac{\sinh(\mu\,A)}{\mu}\\ \mu\sinh(\mu\,A) & \cosh(\mu\,A)\end{pmatrix}\ .
$$
If $\delta=-\mu^2<0$, then it is
$$
\begin{pmatrix}\cos(\mu\,A) & \dfrac{\sin(\mu\,A)}{\mu}\\ -\mu\sin(\mu\,A) & \cos(\mu\,A)\end{pmatrix}\ .
$$
Comment: Thank you sir .
Answer: Note, that the system has an invariant. The invariant is given by
$$\Phi(y,z) = \delta\cdot y^2-z^2=\text{const.}$$
You can use this to reduce the system to a scalar differential equation. If you have found the solution it should not be a problem to derive the fundamental matrix of this system.
Comment: Thank you for replying sir.


Disable radio buttons default in Woocommerce

Question: Sorry for my English. Can I disable the default choice radio buttons for shipping costs and payments in Woocommerce? I would like to have radio buttons blank. In short, the radio buttons are activated only when the user clicks. If a user does not fill in, example, the radio button of the shipment will go a window "Attention, choose the method of delivery." I hope I was clear. Thank you very much!
Answer: You can try this code snippet
<code>// To test this code, open a private/incognito window,
   add an item to the cart and then go to cart page.
// Once an option is choosen, it will be the default option
   from that moment onwards.

// Code to clear default shipping option.
add_filter( 'woocommerce_shipping_chosen_method', '__return_false');
</code>
Comment: I just removed the last ");"... it works.
Answer: WooCommerce automatically chooses the cheapest shipping method available if you do not have a default setup.
https://i.stack.imgur.com/XCm8a.png
See the Automatic option at the bottom of the Shipping Methods section? That ensures that it would always choose a radio button.
I'm not saying this is impossible, but it would involve changing the underlying code.
May I know the reason behind not having a default option set? It sounds inefficient in my opinion. If the user does not like the default option, they can easily change it. At least this way, you no longer have to worry about putting in a "Please Choose A Shipping Method" validation.
The default shipping saves clicks for most of your clients especially if you pick the right option as default. The least clicks the better. ;)
Cheers!
As an update based on our discussion below, here's an option to hide the default shipping option...
Say "Free Shipping" is the default option. All you have to do is to add this code to your css...
<code>#shipping_method_0_free_shipping{
display:none !important;
}
</code>
Then, the WooCommerce>Settings>Shipping Methods dashboard, remove the "Free Shipping" label and change it to a "." (if you make it blank, this will not work) so that no label will appear after the shipping button is handled.
However, this just makes sure that the default shipping method does not appear to the user.
https://i.stack.imgur.com/rX8tL.png
The system will still consider it existing. You still need to prevent the checkout from proceeding if "Free Shipping" was the chosen shipping method.
Comment: is a request made by my client.
He made this request because if the user clicks "forward, forward" without reading can make a wrong order.
I know it is absurd, but my client said he had the "radio buttons" empty and if in case the customer forgets the option to choose a screen "attention ....."
I do not know if I was clear, my english is bad!
Comment: I understand. :) I don't see an appropriate WooCommerce hook/filter for this. This usually means WooCommerce wants the feature present.    Check the explanation from one of the WooCommerce devs... https://github.com/woothemes/woocommerce/issues/4698   They require a default shipping option as a shipping method is always required. Can your client's desire be a result of an issue with the way the Shipping Methods are Setup? If he is afraid that the wrong shipping option is chosen for a particular product, he can limit the shipping method for a certain type of product.
Comment: Meanwhile, thanks for the explanations always friendly and detailed.
The site is an ecommerce electric bikes and nothing else.
the fact is that the owner of the site is "affectionate" to the type "old" sites where the radio buttons are all empty and the customer must choose from time to time.
I understand and agree with the reasons I said.
I just have to find the right way to explain the inability of owner. Tips?
Thank you very much :)
Comment: I don't want to assume things about your client... Have you gone over the way he sets up the products/payment/shipping? What exactly is his worry about "making the wrong order?" :) From what I can see with my WooCommerce setups, you can change the shipping and payment method up to the final point before you press the final Order button.
Comment: In fact ... that's what I tell myself. The customer can always change your choice of shipments (always before clicking order).
I am a bit in trouble!
Let's say the user who logs on to e-commerce is not always knows how to use the pc and "derivatives"
Comment: Best I can recommend is that to explain to him that Editing WooCommerce code that can't be accessed through WooCommerce Filters and Hooks is not recommended. Anything you change will disappear on the next update. It may also compromise other aspects of the system.
Comment: btw, I edited my answer with a 50% work around. It gives you half of your needs..(erase the default option). You still need to find a way for checkout to proceed only if the shipping option is not the default option. :)


How tall is the universe?

Question: Let's suppose that I am on a spaceship in low-earth orbit, if I rise my spaceship higher and higher and hover it upwards forever, will there ever come a point where I just can't get up any further or is the universe infinitely tall?
Comment: You can't have "tallness" for a universe. The observable universe is like a sphere, filled with galaxies and other celestial stuff in all directions.
Comment: If it's like a sphere (much like Earth) then we can use this example; let's suppose that I am at the core of the Earth, if I keep drilling upwards..I'll reach the surface but then if I keep going upwards by using a rocket, there will come a point where I will exit Earth. We can apply the same scenario on the universe (although not sure about the exit)
Comment: Then this question is the same as one which asks for the size of the universe. The observable universe has an approximate diameter of 93 billion light years centered at the Earth. This however, is not the entire universe. We can't observe anything beyond this general region because of cosmological expansion.
Answer: The top of the observable Universe it currently about 46 billion light years up. But the Earth is spherical, so which way is up changes depending where you are, and could be in any direction.
Because the Universe is expanding (in the sense of metric expansion), and because the observable Universe grows with time (because light has time to travel further), AND because the observable Universe is always centered on the observer you're interested in (in this case you, riding your spaceship), you will never be able to reach its edge.
And I feel compelled to link this image summarizing the contents of the Universe, by "height". Note that the scale is logarithmic, which is explained at the bottom of the image.
Answer: The way you've described it, you would call the universe infinitely tall. The observable universe isn't infinite in extent. Not be any means. The distance from here to the edge of the observable universe is about 46.6 billion light years right now. However, the reason I say it's infinite by your definition is that it is expanding fast enough that if you kept rising upwards forever, you would never hit the edge.
Let me be a bit more technical. There very well could be a physical edge. It isn't within our observable limits, but that doesn't mean there isn't an edge that can be bumped into. However, the rate that edge is receding from us (because it is outside our observable limits) makes it so that no matter how fast you move in its direction, the expansion of the universe would always make it move away from you faster. So in any practical sense, the universe is infinite in extent because we can travel forever and not hit a boundary of some kind. It may not actually be infinite in extent, but any boundary will always be farther away than we can travel to.

How tall is the universe?


Text input field with multiple options

Question: I have a medical app showing 3 input fields for drug dosage calculation. The middle field has 2 options, either to input the number of drug's ampules (as shown in the image), or to input thenumber of drug's milligrams. My current approach is to make the user click on the word "Ampules" to change it to "Milligrams", however the small arrow doesn't seem to be an enough indicator that this is possible. Besides, I'm considering to add a tooltip at the first run of the app as a tutorial for such behaviour. Can any one recommend me a better approach ?
Comment: Not related to the question but the design, is it just me or is there meant to be a button that triggers the calculation to be performed?
Comment: It's unclear: is the vertical purple bar some kind of cursor for input? It's a little hard to see what's going on.
Comment: @MichaelLai it's automatically calculated once the user begins to type any number.
Comment: @MikeM yes it's the default text input with material design and the vertical line is the cursor.
Answer: When you're dealing with Critical information like Drug doses, it's much better to be absolutely clear about the input. Generally, offscreen choices in a dropdown aren't great Luke W | Dropdowns Should be the UI of Last Resort.
Your current design with the subtle treatment of the Ampules/Milligrams is frankly, a little scary. I would HATE to have someone mis-dosed due to confusion. What you have here is MODALITY of the input entry, where altering a value somewhere else changes how the control works.
A simple example of modality is with an "Accelerator pedal". Most of the time, the accelerator pedal makes you go forwards, but when in "Reverse mode" you can go backwards. Since this modality could lead to accidents, vehicles try to make sure that the Reverse modality is SUPER clear - by having an indicator light on the dash.
In your example, assuming that the user can CHOOSE to populate any of the 3 inputs and then end up with the other 2 inputs populated by the entry, I would place the modality in a much more prominent area and make the user make a much earlier decision about the modality.

I'd also recommend pushing the "search" tool to a different screen - you're on Android, so use the back button to break up your app and make it easier to see only the necessary information on the screen.
Answer: You need to show two options (ampules vs. milligrams) and you need the user to pause and make a choice (not overlook either, because as another user said, the wrong setting could have serious consequences).
This is a better use case for radio buttons, especially those that are fortified with extra visual indicators. Here's an example.

Text input field with multiple options


DNS Name Server Caching

Question: I am trying to figure out a few things about DNS Client caching.  Specifically, I'd like to know how many name servers for a particular domain are cached when the client resolves a record for the first time, and what happens if the cached name server becomes unavailable when future requests are made.  Also, is there a way to display the NameServers in a client cache on a windows servers.  ipconfig/displaydns only seems to display the cached A and CNames, not the NameServers.
Comment: TTL and the relevant RFCs are your friend.
Comment: As @HopelessN00b stated in his answer, a DNS client doesn't query for nor cache name server records (AFAIK). That's the job of a DNS server. The DNS server will cache name server records in its DNS server cache.
Answer: Name servers are not cached.  The records they provide are.
Name servers are assigned on a per-connection basis.  In Windows, here are typically two name servers assigned to each network connection, though the upper bound for how many can be assigned is much larger.  The configured DNS servers are tried in order - the first one is queried first, if it is unavailable, the second one will be queried, and so on.
ipconfig /all will display a connection's currently configured nameservers, as will going into the connection properties through the GUI, but you will not be able to find a "nameserver cache" because one doesn't exist.
Comment: Thanks for the response. That provides more clarity for the answer I am seeking. To properly phrase my question, I'd like to know how many nameservers are cached in the upstream DNS resolver from my windows client. For example, if my windows client is using DNS server 18.104.22.168, and I query for foobar.com, which has 10 authorative name servers, how many of those authorative name servers will be cached on  22.214.171.124 when it resolves the address for me?
Comment: @Navis None.  `Name servers are not cached. The records they provide are.`
Comment: @HopelessNoob  I think you are mistaken, I have learned that NS records are indeed not cached at the client, but in fact ARE cached on DNS resolver servers.. Here is an except from rfc1034  6.3.3. Get the host address of poneria.ISI.EDU

This request would translate into a type A request for poneria.ISI.EDU.
The resolver would not find any cached data for this name, but would
find the NS RRs in the cache for ISI.EDU when it looks for foreign
servers to ask.  Using this data, it would construct a SLIST of the
form:
Answer: Servers are not cached.
Each DNS record (DNS-to-IP assignment) has a TTL (Time-To-Live) attribute (in seconds). So when you first connect server by name, you ask DNS server to provide IP address for DNS name, you get this DNS-to-IP assignment record cached by OS for some time (depends on this record's TTL). Also the time when you got this record from DNS stored in cache and this record's TTL.
If you connect again, OS checks if previous request was more than TTL seconds ago.

If TTL passed, OS clears cache record for this DNS-to-IP assignment and requests DNS server again
If TTL is not passed yet, OS returns DNS-to-IP assigned from cache.

You can force OS to forget all cached DNS-to-IP assignments using ipconfig /flushdns

DNS Name Server Caching


In Real-Time, where do we deploy Extensible Authentication Protocol(EAP) in Wireless Networks?

Question: I have heard that the EAP protocol has authentication capabilities for wireless networks too. But I am not able to get how it is deployed in real time as I know that whenever I need to connect to my router, I just type in the password and it's done but where EAP in that?
Answer: It's not in the average home Wi-Fi, not even in SOHO, it's mostly used in enterprise environment, hence the WPA/WPA2 Enterprise...
This is done when you try to authenticate to a WPA/WPA2 Enterprise AP, which mean you need to setup a RADIUS server to process the EAP Auth.
Sometimes also called 802.1x/EAP.
UPDATE FROM COMMENTS
This is in order to enhance security now that the AAA is done trough wired communication and not trough the air (The challenge/response can't be sniffed/cracked)
Comment: Thanks for the response!           But I was wondering what is the process like. Suppose I go to some enterprise and I want to connect to the Wifi Network. So I get the desired credentials and key in the credentials when asked by the authentication process. In this case am I getting the authenticated by the router or by some AAA server? Moreover, if I am being authenticated by some AAA, why can't the router just authenticate me, why would I need a special server for that?
Comment: It's the RADIUS server that does the AAA, and this is to **enhance security** as the RADIUS server is now connected trough cable and the traffic can't be sniffed with a monitor mode antennae. So the Challenge/Response can't be sniffed/cracked. That's how the IEEE Specification defines it, so... I'm not sure what you want to hear/read. I really hope this helps.


Maxwell's Equations-Relativity

Question: How did Maxwell develop the magnetic field without relativity? Was it purely experimental? I don't see how else he would have developed any understanding for the magnetic field.
Comment: He found a magnet.
Answer: A long time before Maxwell wrote down a unified theory, Oersted discovered a connection between electricity and magnetism. In the development of electromagnetism, there were many bits and pieces of partial knowledge that were discovered and formulated by many different scientists. The popular ones (after whom we've named partial "laws") that immediately come to mind are Faraday (who came up with the concept of a field), Ampere, Gauss, Coulomb, etc. In fact, Faraday put together electric and magentic fields to make motors and generators. If I recall the history correctly, Maxwell understood the connections and put together all these partial results into a coherent mathematical formulation.
As it happened, it was noticed that this theory was not invariant under Galiean transformations and the challenge was to figure out which of the two concepts to be modified. To make a long story short, there were many proposals and notable the Michelson-Morley experiment, but the one that we now know to be correct was Einstein's theory of Special Relativity.
Some references for the history of E&M

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-013-electromagnetics-and-applications-spring-2009/lecture-notes/MIT6_013S09_res_maxwell.pdf
http://digitalcommons.sacredheart.edu/cgi/viewcontent.cgi?article=1002&context=wac_prize
Comment: Two more references: [1] _Whittaker: A History of the theories of aether and electricity_, a very comprehensive book, [2] Shapiro I S "On the history of the discovery of the Maxwell equations" _Sov. Phys. Usp._ __15__ 651–659 (1973) http://ufn.ru/en/articles/1973/5/h/ - mostly addressing a displacement current notion.

Maxwell's Equations-Relativity


Difference between Datareader, DataAdapter, Dataset, DataView

Question: Can someone please explain the difference between a DataReader, a DataAdapter, a Dataset, and a DataView?
Answer: Quickly,

a DataReader is a forward-only iterator over a set of results.  It's usually the most efficient way to deal with records when you don't need random access (in other words you can't go backwards).  It is "scalable" to any number of records, at least in terms of memory pressure, since it only loads one record at a time.  One typical way to get a DataReader is by using the ExecuteReader method of a DbCommand.
a DataSet represents a set of DataTable objects.  More often than not, it will just contain one table, but if you do a query with multiple SELECT statements, the DataSet will contain a table for each.  Because this is an in-memory representation, you have to be careful about how much data you pull into a DataSet.  You can "Fill" a DataSet using the Fill method of a DataAdapter.
a DataAdapter is a kind of "pipe" that funnels data from a DB engine into a DataSet.  That's why you'll have one DataAdapter implementation for each DB provider type.  One DataSet, many providers.
a DataView is like a virtual subset of a DataTable.
Answer: DataReader
DataReader is used to read the data from database and it is a read and forward only connection oriented architecture during fetch the data from database. DataReader is used to iterate through resultset that came from server and it will read one record at a time because of that memory consumption will be less and it will fetch the data very fast when compared with dataset. Generally we will use ExecuteReader object to bind data to datareader.
DataSet
DataSet is a disconnected orient architecture that means there is no need of active connections during work with datasets and it is a collection of DataTables and relations between tables. It is used to hold multiple tables with data. You can select data form tables, create views based on table and ask child rows over relations. Also DataSet provides you with rich features like saving data as XML and loading XML data.
DataAdapter
DataAdapter will acts as a Bridge between DataSet and database. This dataadapter object is used to read the data from database and bind that data to dataset. Dataadapter is a disconnected oriented architecture.
Answer: I suggest you read the MSDN documentation or maybe buy a book. Here's a short answer:

A dataset is an in-memory representation of a database-like structure. It can have one or more datatables and define relations between them, key field etc.
A datatable is an in-memory representation of a single database table. You can think of it as having columns and rows in the same way.
A dataview is a view on a datatable, a bit like a sql view. It allows you to filter and sort the rows - often for binding to a windows form control.
Answer: DataReader
DataReader is like a forward only recordset. It fetches one row at a time so very less network cost compare to DataSet(Fethces all the rows at a time). DataReader is readonly so we can't do any transaction on them. DataReader will be the best choice where we need to show the data to the user which requires no transaction. As DataReader is forward only so we can't fetch data randomly. .NET Data Providers optimizes the datareader to handle huge amount of data.
DataSet
DataSet is an in memory representation of a collection of Database objects including tables of a relational database schemas.
DataSet is always a bulky object that requires a lot of memory space compare to DataReader. We can say that the DataSet is a small database because it stores the schema and data in the application memory area. DataSet fetches all data from the datasource at a time to its memory area. So we can traverse through the object to get the required data like querying database.


Short Stack All In Question

Question: 1-2 NL.  8 dealt, 1 call, 4 fold, dealer raises to $10.  Small blind goes all in for $12.50.  Big blind folds, guy who called decides he's going to shove $32 all in.  Is this legal?  Can you reraise when someone goes all in for less than double the original bet + blinds?  Is it legal for the small blind to go all in if his all in isn't at least $8 more than the original bet, $18?  This confused me because if someone bets $8 more than the blinds, doesn't the next raise have to be at least $8 on top?  I understand a short stack can call if his stack is less than the bet, but can he go all in for a little more than the original bet, and if he can, can someone behind reraise?
Answer: Possible duplicate, but in short, yes, because the raise from the button is what re-opens his option to re-raise.
If you were to switch it around, where the mid position raised, button called and SB went all-in for less than half the raise, the button would not be able to raise if the mid position just called.

Short Stack All In Question


Sharkskins in Far Cry 3

Question: I am attempting to find sharks in Far Cry 3, so that I might... ahem, "obtain" shark skins.  The guides I have seen list how to kill sharks, but now how to find them.  How do you find sharks to kill in Far Cry 3?
Answer: Sharks can be found in most open water areas in Far Cry 3.
Look for the shark symbol on the map, you should see several.
Comment: Thankfully your guns obey the "Saving Private Ryan" type physics, and not real world physics so you can shoot them in the water no matter how deep they are, from the shore. The answer above shows where to find them, use your binoculars and it will highlight them pretty easily too and you can blast away from safety.
Comment: Mmm, visual aid.
Answer: If you open the map, you will notice that there are animal symbols drawn on various locations. Simply head over to the location where the shark symbol is drawn and more likely than not an innocent shark is swimming around for you to cull.
Answer: Just get in a boat.  Something you can stand in and use a gun.  Not a jetsky.  Get a nice big boat, go out to sea wait for the sharks and shoot
 them.  Watch where there go and dive in, when no other sharks are about.  When I played Far Cry 3 for about the 7th time I decided to do all the hunting before following the story.  I got all the upgrades first, then I took on the story.  It made it much easier for me.  But like I say, 7th play through for me.  It takes me a while to work it out.
Answer: Basically just look around the island's shore, there are plenty of sharks everywhere.
Ideally, you get yourself a boat, too, for some easy travel.
The animal symbols usually help, but sharks really just appear anywhere in the open sea.

Sharkskins in Far Cry 3


Is there much of a difference between organic vs. regular olive oil?

Question: I have this idea that if I buy high quality olive oil from non-industrial producers then it doesn't need an "organic" label because olives are pretty resistant and don't require that much pesticide.
Is this correct?
Comment: We can't provide advice on what to buy. However, I'd say that the underlying question about how much regular olive oil is "treated" is probably on topic, so I've edited the question to fit with our guidelines.
Comment: In my experience, organic olive oils are often more rancid even when I first open the bottle! This is probably due to their having been harvested longer ago than the much-more-commonly-available non-organic oils.
Answer: Olive oil degrades over time so freshness is important.  Some of the higher priced olive oils sit on shelves for a very long time and by time they are sold they can be of lower quality than some mass produced olive oils.
I'd say you're in the right frame of mind and would recommend finding a brand with a local representative who can trust and know the source and timing of the oil.
Many smaller olive oil producers don't bother with organic certification because of cost, but they have same or better standards.  Therefore there is a sweet-spot where you can get quality olive oil similar to organics at decent prices.
Keep in mind good olive oil is produced in many places, including Greece, Spain, and Lebanon.  Not just Italy.
Comment: Thanks! Sorry I dont have enough credit to upvote yet...
Answer: "Organic" is not only about pesticides.
Other factors that would prevent something being labelled "organic" include:

use of inorganic fertilizers (mined phosphates etc)
use of farmland that has been non-organically fertilized in recent past
lack of record keeping to show that organic steps have been taken

It's entirely likely that olives for olive oil have been fertilized with inorganic fertilizer.
It's also not unusual for olive oil (and many other products) to be produced to 100% organic standards, but for the producers to not feel it worthwhile to spend the money and effort required to get certification.
Answer: It is not really correct that olives don't need pesticides. Olives are subject to be attacked and eventually destroyed by different kinds of parasites, for instance the olive fruit fly, one of the most serious pests in the cultivation of olives.
Also, olives tree can be attacked by fungus, bacteria, and parasites.
What is true, on the contrary, is that the olive trees are quite resistant to cold weather. They can go below freezing with no substantial damage (depending on the subspecies).
An "organic" label certifies that no synthetic chemical products are used. Of course, if you want to be completely sure that you are not using contaminated oil, you should avoid the possibility that pesticides are being used (i.e., it should have an organic label).
About the quantity of pesticide used, it's really difficult to give an answer. It depends on too many factors: where the olive trees are located, the laws of the country regarding pesticides, the 'common sense' of the producer.
In this interesting blog post (sorry it is in Italian, you can try with google translate) they explain that to have an organic oil you are allowed to use biological treatments (killer insects, biological pesticides, and so on) which guarantee that you have no residual pesticide in your oil.
This is the only guaranteed way to have organic oil.
Comment: Just because it says organic doesn't necessarily mean no chemical products were used. A lot of organic certification schemes allow pesticides that have been derived from 'natural' sources. I'll refrain from critiquing the inconsistencies of this approach as it's not really on topic.
Answer: Another advantage of organic olive oil is that the producers are required to use tinted glass for the bottles. Oil stored in tinted glass bottles has longer shelf life because such glass filters UV light which is principally responsible for the deterioration in oil quality especially the for loss of vitamin E over time. This is valid for Europe, I am not sure whether in the USA the same standards are in force.
Answer: I understand organic standard involves testing for adulteration (mixing lower quality and fake oils in) along with checking for pesticide residues etc. So organic can mean you are more likely to get 100% extra virgin. But scams happen with organic too, especially imports from other countries to the US.


Does anyone have insight into whether MonoDroid is really dead?

Question: My company just recently invested in the Mono for Android tools for Visual Studio as we have a lot of .NET developers and were impressed with how powerful the monodroid tools seemed. After reading the ZDNet Post I was saddened to see that this project may be dead. Is there anyone out there who might know anything more about this than what is listed in that article? Apparently legions of developers were let go from the mono project but I'm wondering if it's true. Any information would be greatly appreciated. We just bought the Enterprise 5 license, which was pretty costly and I'd be pretty mad if it died after I just bought this thing and started learning it!
Answer: There seems to be a conflict in the layoff announcement - all technology roadmaps remain intact vs. We have re-established Nuremburg as the headquarters of our SUSE business unit and the prioritization and resourcing of certain development efforts - including Mono - will now be determined by the business unit leaders there. (citation of Attachmate Group CEO)
Miguel de Icaza stated in his twitter account that: I'll have a blog post next Monday, I am tied up until then.
I would suggest waiting for the next Monday and check what comes out at [http://tirania.org/blog/]3.
UPDATE:
On Monday Miguel de Icaza announced that he and former members of the Mono team founded a new startup called Xamarin that will:

Build a new commercial .NET offering for iOS
Build a new commercial .NET offering for Android
Continue to contribute, maintain and develop the open source Mono and Moonlight components.
Explore the Moonlight opportunities in the mobile space and the Mac appstore.

They seems to plan to deliver a MonoTouch replacement. First version is expected to be available in 3-4 months time frame (Q3 2011).
Source: http://tirania.org/blog/archive/2011/May-16.html
UPDATE 2011-07-18:
Xamarin obtained a perpetual license to all the intellectual property of Mono, MonoTouch, Mono for Android, Mono for Visual Studio and will continue updating and selling those products.
Source: http://tirania.org/blog/archive/2011/Jul-18.html
Comment: Thank you for that info :: I will sit tight until next week.
Comment: So, it seems like it's going to be around for awhile more; that's excellent news.
Comment: In fact it even could be better for mono/mobile this way. Having been harbored in a company focused solely on this task vs being a part of big company with many different responsibilities. Can't wait for the first public release.


Do stunt jets use laser distance meters to align with one another to maintain formations?

Question: My question is about Jets/planes performing acrobatic formations to stay well-aligned with the other jets/planes in formation. I could see a laser-distance meter coming in handy.
Answer: No they don't. They rely on visual cues. Basically each pilot aligns features. For example, it could be the wingtip of the plane next to him/her to a letter or feature on another plane.

(YouTube) POV; the drawn circle is merely an illustration.
And they all follow the lead's commands via radio. As when to turn, when to pull, for how long (based on the tone of the voice), etc.
As a team gains experience, they start to bring the distance closer. Not usually noticeable by the crowd.

Source: Blue Angels: A Year in the Life
Comment: And all military pilot training includes heavy emphasis on formation flying. Demonstration teams carry this skill to a greater degree, and do maneuvers in formation that are not generally done fulfilling general military missions, but the skills involved are identical.
Comment: Also, they were doing such formation flying long before the use of laser meters became practical.  E.g. the US Navy's Blue Angels team was founded in 1946, and first used jets in 1949, per Google.  Lasers weren't invented until 1960.
Comment: They may use formation lights, which is basically your "visual cues", but with the visual cues specifically mounted to the aircraft in order to aid formation flying.


Unable to authenticate xml file with login credentials using apex and connect to sql

Question: Unable to integrate with salesforce and sql. I want to create an authentication details in xml file. can i authenticate xml file with login credentials using apex and connect to sql by uploadin in salesforce .
Answer: If I read the question correctly - you want to connect to a SQL database from Salesforce with Apex using credentials stored in an XML file.
Given that interpretation, then no, you can not do it. Apex can't directly callout to your SQL database.
If you want to integrate with external data in Salesforce you will need to work with a web based API. It could be REST or SOAP based.


Best way to view Tor logs and network stats using Tor via Homebrew?

Question: I have installed Tor using Homebrew and configured torrc for client and bridge relay usage. However I would like to be able to see stats similar to what is available in Vidalia network monitor and log viewer. I understand ARM should give me what I'm after but I am not sure how to run it. Also under /usr/local/Cellar/tor/... I can tail -f a number a files such as state and bridge-stats but this does not seem give me the rich detail that was available with Vidalia.
Answer: Edit (after realizing Homebrew is a osx only pakage manager):
on OS X:
To install arm:
Simply install arm using brew install arm.
To just view the logs:
var/log dir doesn't exist by defult. You need ot make it under /usr/local/Cellar/tor/{Tor version}/ and perhaps turn notices or debug logs on in your torrc. And Tor will print logs on /usr/local/Cellar/tor/{Tor version}/var/log/notices.log or /usr/local/Cellar/tor/{Tor version}/var/log/debug.log.
or point torrc to elsewhere to print the logs.

on linux:
I don't think if that's a good idea (or recommended) to install Tor using non-official package managers.
To install Tor:
See installation guide for Debian/Ubuntu or Fedora/CentOS to learn how to add official Tor package repository to your linux machine to get the latest versions first hand.
To install and run arm:
Once you added Tor repositories and installed latest version of Tor, you can install arm using sudo apt-get install tor-arm (if on Debian/Ubuntu) or sudo yum install tor-arm (if Fedora/CentOS) and then run arm with the same UID running/controlling Tor.
For example, run sudo -u debian-tor arm if installed from official repo on a Debian/Ubuntu machine.
To just see the logs:
You can control where Tor does write it's logs in your torrc. It must be /var/log/tor/log if you didn't change anything.
Comment: duh, I just realized Homebrew is a Mac OS X only package manager.
Comment: Yes and documented on Tor docs @ https://www.torproject.org/docs/tor-doc-osx.html.en However you pointed me in the right direction and after installing 'brew install arm' arm is now working which was my best case scenario. So answer accepted.
Comment: Could this answer be edited to reflect that 'brew install arm' will do it, since it's been accepted but is for Linux, not OS X?


Texas Drivers license, no residence in Texas

Question: I lived in Texas and moved to Germany. I am tired of using the addresses of various friends (who keep moving) for my license. Is there a way to have a Texas drivers license while living abroad with no specific Texas address?
Comment: The answer by David and the duplicate answer all presume you are not a member of the US military and are not married to a military member; the answer is different for the military.
Comment: @GerardAshton You are exactly correct.
Answer: This is a fairly common question. This SE page and the SE page cited in the "Already Answered" note cover the ground nicely.
In short: states issue drivers license to their residents. States define who's a resident and who's not in different ways. Licenses can often be renewed remotely, although doing so requires being able to receive mail in the state, or having an accommodating friend who'll let you use their address. There doesn't seem to be much (or any) state-level enforcement or investigation of the issue of residency.
The risk is that if it's easily seen that you don't actually live in the state for which you hold a license and therefore don't qualify for it, that someone might find it useful to argue the license isn't valid. You shouldn't have difficulty renting a car, say, but if there's an accident, damage, or civil dispute, insurance coverage on the rental car obtained with this license could be in jeopardy, as well as your ability to claim damages against the driver of another vehicle with which you're involved in an accident.


Can Helldivers be played cross-platform PS3 and PS4?

Question: I know it can be done with some PS3 / PS4 games, but can it be done with Helldivers, and if so, how?
Comment: I'm wondering if your question has already been answered. If so could you please accept the answer so that other people with the same question can see that there is an accepted answer available?
Answer: From what I've found it should be possible and here is how:

On PS4, you can see your PS3 friends in the main PS4 menu, and can see that they are playing Helldivers. Inside Helldivers, on the "Friends" screen you will see that your friend in Online, but it will not show their helldivers game info by default.  Highlight their name and press square to see their Helldivers info and then you can join.  Every now and then I get "Teleport boot failed" when my friend is on the bridge and I have to wait for them to start a mission before I can join.
From PS3, it's very similar, but you can't see if your PS4 friends are online from the XMB (unless it's changed recently). When you view your friends list from inside Helldivers, I don't think you see the PS4 friends as Online, but press square and the info will show up.

Hope this works for you
Source from above quote