Is the language $(a^n)^mb^n$ context free?

Question: $(a^n)^mb^n$  for $m,n\ge 1$
This can be rewritten as $a^{nm}b^n   $
i.e. number of $a$'s is a multiple of number of $b$'s, or for every m $a$'s there is one $b$. I thnk this language can be accepted by NPDA. For every m $a$'s one a can be pushed into the stack, and similarly one can be popped on encountering a $b$. But the NPDA needs to try this for every possible m, where m varies from 1 to maximum string length of $a$'s.
Comment: How would it work with only finite number of states?
Comment: @DmitriUrbanowicz I thought that since a similar problem for finding m exists for the language $ww^R$ where m in this case is the number of characters after which the NPDA has to begin the reverse string comparison by popping out symbols from the stack; so, since the above language is CFL, this might qualify as one too.
Comment: For $ww^r$ there are finite number of transitions that do something to the stack. What you propose requires infinite number of transitions for every $m$.
Answer: The difficulty of trying every possible $m$ is, in fact, insurmountable. That language is not context-free.
For the sake of contradiction, assume it is context-free. Let $p$ be its pumping length. Consider the word $a^{p^2p}b^{p^2}$. I will let you take it from here.


Does Solaris 11.4 support Solaris 11.3 branded zones?

Question: My gut feeling is "no", but an Oracle salesperson told me yes. I am not talking kernel zones here btw.
Answer: No, it only supports Solaris 10 branded zones.   Solaris 11.3 branded zones shouldn't be needed as 11.4 is a minor release, and application compatibility should be maintained for most applications.
Note that it is possible to run Solaris 11.3 in a kernel zone on Solaris 11.4, but that's full virtualization of a separate kernel, not a shared kernel as you get with branded zones.


How to make a link between interfaces, route and process

Question: I am using openvpn very happily, I have more than 50 vpn defined on a debian jessie machine.
I have a question regarding the ability to map some route to some process.
I would like to known which tun interface is mapped to which openvpn process.
At this time my only solution is to scan the syslog searching for some string like /ovpn-([^\[]*).*(tun\d+)/, where I can mostly retrieve every  things at boot time but it is not clean, and informations disappear as log get cleaned up.
So is there a way to map the tun device to the openvpn process ?
I can not find in /proc/{openvpn process}/*
Comment: Just out of curiosity: What exactly do you hope to achieve by using several VPNs at once? Depending on how your default route is set (check with `ip route`), you'll either use just one of them, or your internet connection will become unstable and drop packets, because it picks one of the routes randomly, which doesn't work for TCP. So very likely you are just using a single VPN anyway, even if you are connected to several ones.
Comment: Nope, I have no route problems. my set up is very clean, I am connecting to more than 50 externals sites that are not federated. So it is really 50 different VPN clients, and one VPN server. there IS a lot of openvpn process and I need to map "cleanly" each process to its tun interface.
Comment: If it's VPNs to dedicated sites, why not (a) identify the interface by its IP address (you should not which internal IP range each site uses), or (b) configure each OpenVPN a specific number, e.g. `tun100` to `tun150`? See `dev` argument in the configuration, `man openvpn` for details.
Comment: very nice.  I am using openvpn for years and I never noticed this option along all the version upgrade... too bad, but it is the most convenient way to  get around my issue.
Answer: If the VPNs connect to dedicated sites, why not (a) identify the interface by its IP address (you should not which internal IP range each site uses), or (b) configure each OpenVPN a specific number, e.g. tun100 to tun150? See dev argument in the configuration, man openvpn for details.
Answer: given this post How to find the connection between tap interface and its file descriptor?
I went with a solution with ps ax |awk '/[o]penvpn/{print $7" "$1;system("grep iff /proc/"$1"/fdinfo/*")}'


Problem with adding Tomcat server to spring tool suite in Ubuntu?

Question: I ma trying to add Tomcat server in to STS but I do am not able to do it. Some times the server name doesn't appear when I try to add Tomcat by selecting it from the list, I can't type in the server name myself as well and If that step works properly (I mean when the serve name appears automatically which it should when server is selected form the list); the Finished button is grayed out in the resource page which is the last step in adding the Tomcat server to STS.
Answer: I faced same annoying bug recently and found a solution for this. Here is the instructions,

Close Eclipse
In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings delete the following two files:
org.eclipse.wst.server.core.prefs

org.eclipse.jst.server.tomcat.core.prefs

Open Eclipse, Voila!

Reference


Installing Gallium 0.4 on SVGA3D; build: RELEASE; LLVM; Virtual machine

Question: I'm hoping good soul out there can help me with a graphics driver issue I'm having with a VM I created from a physical Ubnutu Gnome 17.04 64bit.
I'm running the VM in the latest Vmware player 12 but I'm having display scaling problems, and it looks as though the wrong graphics drivers are being used eg. this one - Gallium 0.4 on llvmpipe (LLVM 4.0, 256 bits)
I did a fresh Ubuntu VM install to compare and it's reporting Gallium 0.4 on SVGA3D; build: RELEASE; LLVM; which all works fine and dandy.
Can someone please tell me how to install - Gallium 0.4 on SVGA3D; build: RELEASE; LLVM;
I've looked at this link below but I'm a bit unsure. I need some guidance with the procedure.
https://lost-contact.mit.edu/afs/pdc.kth.se/roots/ilse/v0.7/pdc/vol/mesa/9.2.5/src/Mesa-9.2.5/docs/vmware-guest.html
I get as far as -
cd $TOP/vmwgfx
  make
  sudo make install
  sudo cp 00-vmwgfx.rules /etc/udev/rules.d
  sudo depmod -ae
But it gives errors -
cc1: some warnings being treated as errors
scripts/Makefile.build:290: recipe for target '/home/ubun/vmwgfx/drm_modes.o' failed
make[2]: * [/home/ubun/vmwgfx/drm_modes.o] Error 1
Makefile:1488: recipe for target 'module/home/ubun/vmwgfx' failed
make[1]: * [module/home/ubun/vmwgfx] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.9.0-040900rc1-generic'
Makefile:140: recipe for target 'modules' failed
make: *** [modules] Error 2
ubun@ubun-desktop:~/vmwgfx$   sudo make install
make -C /lib/modules/4.9.0-040900rc1-generic/build  KCPPFLAGS="-DVMWGFX_STANDALONE -DTTM_STANDALONE" SUBDIRS=/bin/pwd DRMSRCDIR=/bin/pwd modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.9.0-040900rc1-generic'
  DEPMOD  4.9.0-040900rc1-generic
make[1]: Leaving directory '/usr/src/linux-headers-4.9.0-040900rc1-generic'
ubun@ubun-desktop:~/vmwgfx$   sudo cp 00-vmwgfx.rules /etc/udev/rules.d
cp: cannot stat '00-vmwgfx.rules': No such file or directory
ubun@ubun-desktop:~/vmwgfx$   sudo depmod -ae
depmod: WARNING: -e needs -E or -F
Any help is much appreciated!
Answer: The solution can be found below
https://communities.vmware.com/message/2671936#2671936


Interfacing RS422 with microcontroller

Question: I want to use RS422 to communicate two MCUs. In a serial protocol, RX from MCU1 goes with TX from MCU2 and viceversa. RS422 is differencial, so I don't really know how to manage this. Where do I connect TX_P, TX_N, RX_P and RX_N in the microcontroller's pins? In my MCU I only have SCI_TX and SCI_RX. And how, after that, do I connect one MCU which another? How can I interface both? I need some isolation between both microcontrollers too. I don't understand the schema.
Comment: What data rate, how much isolation? Generally you would use dedicated hardware to interface between MCU tx/rx pins and 422 wires. Start with your isolation requirement, as that will drive your choice of interface components. 'Some' is not a specification. Why RS-422?
Comment: So, the order would be MCU - Driver - ISO or MCU - ISO - Driver? The isolation is not high voltage, maybe 50V. I was using MAX22025 but is half-duplex, I want that but with the four wires (dual).
Answer: RS422 is a hardware layer standard enabled by placing a RS422 transceiver (for example the classic MAX485) outside the microcontroller UART peripheral (also known as SCI in the NXP/Motorola world). You will need at least one per microcontroller.
Isolation is a separate matter. The best solution is usually to buy a separate digital isolator and place it outside the transceiver - since this gives you more BoM options. The alternative is to pick a transceiver with galvanic isolation built-in, but these are poorly standardized and so you end up "marrying" the silicon vendor.
Comment: (Although in the year 2023 when our clueless governments merrily have allowed all silicon vendors to merge and gain complete monopolies in their respective markets, designing electronics = marrying the silicon vendor. Not long ago I would perhaps have picked an Analog Devices part and specified Maxim as 2nd source... or even pitted them against each other to see where I could get the best price for equivalent parts.)
Comment: But could I connect the four signals (RT+, RX-, TX+, TX-) to a digital isolator without affecting the data?
Comment: @DevelopingElectronics You have to check rise/fall times in case you are using very high baudrates. You'd place the isolator on the logic side of the transceiver in most cases. There are also various niche digital isolators designed for specific buses in mind, here's an article: https://www.analog.com/en/analog-dialogue/articles/digital-isolators-protect-rs232-bus.html

Interfacing RS422 with microcontroller


How can I create many tables in my database using EF Core migrations

Question: I am doing a bookstore project and I first created one table for the adding book.
So I want to add login and signup pages and store to the database, but I am confused about how I can add another table or create tables related to my need using migrations. I have attached my DbContext class.
Forgive me my English is not so good. I am waiting for your answers. Thanks
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CODEwithZAKI.Data
{
    public class BookStoreContext : DbContext
    {
        public BookStoreContext(DbContextOptions<BookStoreContext> options)
            : base(options)
        {
        }

        public DbSet<Books> Books { get; set; }
    }
}

Dbcontext Class
Comment: Did you read the documentation? https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli
Comment: I have read it. but I want to how can I add more tables to my database using migration. how I can?
Answer: For how to add a new table to the database with ef core code first, you can follow the below steps:
1.Create your new table as a model
public class Author
{
    public int Id { get; set; }

    public string Name { get; set; }

    //other properties
}

2.Add its entry in DbContext class
public class BookStoreContext : DbContext
{
    public BookStoreContext(DbContextOptions<BookStoreContext> options)
        : base(options)
    {
    }

    public DbSet<Books> Books { get; set; }

    public DbSet<Author> Authors { get; set; }
}

3.Create a new migration with the addition of Posts in Package Manager Console
Add-Migration AuthorMigration

4.Update database
Update-Database

Answer: To add new tables to you database using migrations is simply a matter of extending your BookStoreContext with the new sets and then running the migration commands. As an example using dotnet command.
Generate the new migration script:
dotnet ef migrations add DESCRIPTION_OF_YOUR_MIGRATION

Run the migration:
dotnet ef database update

And that's it. Everytime you add new records to your BookStoreContext you just go through the above two commands to run the EF Core migration process.
PS For login/authentication/identity it is recommended to utilize ASP.NET Core Identity.


How do you measure neutron energy?

Question: I think you can detect a neutron event with a scintillator (neutron to photon), photomultiplier tube (photon to electric signal) system, but how would a fusion neutron's energy (2.45 MeV) be typically measured?
Comment: Thermal/cold neutrons, or fast/MeV neutrons? They are quite different.
Comment: Fusion neutrons (2.45MeV)... I'll edit the question
Comment: I thought about applying a [calibration] tag again. We don't have it yet, and there have only been a few questions where I wanted it. Any one have an opinion?
Answer: I'm going to answer for fairly energetic neutrons.
There are a several of parameters that you have to know and they are dependent on the details of your device to the point that you have to measure them; that is to say that you calibrate each device.
The parameters are

the fraction of the energy that gets transferred to fast charged particles (usually protons, but if helium is involved sometimes alphas).
the quenching factor that applies to the light generation from those fast particle
the acceptance and response of the PMTs as a function of the light energy

Actually these factors are multiplicative so you only have to know the product, but the usual method of calibration extract all three of these (you'll note that #3 is already a product and you may or may not bother to tease that one apart).
So, working backwards
(3) You calibrate with know energy photons or electrons (or muons). This is easiest if you have a stopping detector; without one you either need a really good Monte Carlo or to stick a well calibrated calorimeter behind your device during testing.
For in situ calibration it is often possible to use cosmic muons for this step, but in that case you do need to calculate the energy loss.
(2) You calibrate with known energy protons and/or alphas or if your detector has the resolutions you look very carefully and the end of heavy particle tracks (for that you do not need to know the incident energy very well). Stopping is not a big problem here unless your device is very thin.
(1) You use a combination of high quality Monte Carlo and the best known-energy neutron source you can get. (There are some really great neutron sources, but time on them can be hard to get and because the MCs are so good these days it is often enough to uses a CoTS neutron generator of known isotope source.)

If you have a bunch of devices of uniform design and constructed from the same batch of input materials (or you trust the uniformity of the supply for some reason), then numbers 1 and 2 should be pretty constant and aside from doing a little cross-checking it is only #3 that you have to adjust for all devices, and gain-matching was on the schedule anyway. No loss.
Comment: Is it possible to get any kind of energy calibration with a PuBe source?
Comment: Ben, I don't know that spectrum exactly (I've used AmBe) but I would think so. The difficulty is that those sources usually have a bunch of different energies (not a forest exactly, but at least a grove), so a good MC will help you sort out all the contributions.
Answer: There are many ways to measure the energy of neutrons, here a few:

Use a chopper and measure the time of flight for length L between two chopper blades. E= 1/2 m v^2 <=> E = 1/2 m L^2/t^2
Place a well known single crystal in a neutron diffractometer and apply Bragg's law
Evaluate the pulse form of an 3He detector tube.
Measure how far the neutrons fall down in the gravity field of the earth in a known distance.

How do you measure neutron energy?


Assembla Git project dependency/merge

Question: I am using assembla/git.
Goal:
I want to host 2 different projects on assembla: Common project and my NewProject.
Common is used by several developers and they might edit and commit changes to it.
Only I work on NewProject, this NewProject use Common as external resource, what i mean is that when I want to pull NewProject from assembla, I also want to get the latest Common files that are on different project in assembla.
Is this possible ? I think maybe the phrase is to "merge between projects" ?
I am new to git/assembla, used to work with tortoise SVN till now
Thanks
Answer: You can create a merge request from your main project to your personal project whether your project is in the same space or in another space.
To set this up you want to fork your main project to a new repo from your git tool under Fork Network.  Then when you are ready to merge from your main repo to your personal project, you want to go to submit code from your git tool of your main repo to setup the Merge Request.

Assembla Git project dependency/merge


What are correlations among between test statistics in multiple comparison procedures

Question: In the book Multiple Comparisons Using R Bretz et al write that their R package multcomp improves power above other multiple comparison procedures by "accounting for the structural correlations between the test statistics" (pg 41).  The default option for this multiple comparison procedure implements this and is called "single-step."
My questions are
1)What do they mean by "structural correlations" (their explanation eludes me)
2)Is their a standard way to refer to or cite this approach.  "Single-step" is what it is called in the call to their R function, but this is a general description of multiple comparisons.
In my field people are mostly familiar with the usual Bonferroni corrections and I'd like to avoid the critical eye of reviewers and also point readers toward work that can help them understand what is going on.
Answer: The Bonferroni procedure works for the worst case dependency between the involved single test statistics which is somehow negatively correlated. In contrast, the Sidák procedure works for independency between them. Clearly: You don't need to adjust if the multiple tests are copies from each other. Conversely, you have to adjust more, if one test tends to decide the opposite of the other one in order to meet the FWER.
In the special case of linear test statistics in normally distributed random variables (t-test), the dependency can pretty well be decribed by the correlation of the effect estimators. E.g. if you test simultaneously $ \mu_1 - \mu_2$ and $\mu_1 - \mu_3$, your test statistics will base on the respective means: $\bar{x}_1 - \bar{x}_2$ and $\bar{x}_1 - \bar{x}_3$. Both differences are correlated due to the structure of the hypotheses. Their covariance is the variance of $ \bar{x}_1$, and so the test statistics will likewise be (asyptotically, i.e. up to studentization) correlated. That's why Sidák cannot be used. But if you incorporate the dependency as Bretz et al. suggest, you will meet your FWER(strong) less conservative than if you would use Bonferroni.
Single step means that the local alpha will be calculated for all tests instateously. You can use these local alphas for simultaneous confidence intervals that convey the same decision as the tests would do. Stepwise (like Holm) means, that the local alphas depend on preceding test decisions. This means that the simultaneous confidence intervals would alsodepend on single test decisions! But confidence intervals are supposed to give information about their respective parameters, not about So if you have to supply confidence intervals, stepwise procedures are a bad choice.
Comment: 2 things: First, high positive correlation between tests doesn't usually mean the tests are exact "copies" of each other that don't require adjustment for multiple testing--in fact, there would be no point in doing multiple identical tests in the first place. Second, the Sidák procedure doesn't require independence--it only requires that there not be negative dependence.
Answer: This chapter is about the cases when some additional assumptions about the distribution of data are satisfied. For example, in linear regression setting due to the normality of errors the usial t-statistics for testing the significance of individual predictors not only have the univariate t-distribution each, but are jointly distributed according to the multivariate t (so their correlation could be explicitly estimated). I guess you could refer to this approach as a "parametric multiple testing procedure for linear regression" (or ANOVA, or whatever you are using). I don't think it has a more formal name.


Indicate that you cannot register with social media

Question: Is there a good way to show that you cannot register with a social media account, only login if you already have connected it to your normal account?
Screenshot of current design:
Comment: Can you elaborate the question a bit? Do you want to convey that Social Logins cannot be used for Registration purposes?
Answer: The underlying problem seems to be that your design is broken.
The point of providing an option to log in with Google or a social media account is to avoid users having to set up a separate account for your site.  Really, you should fix this if possible.
You may need to capture some extra information that isn't part of the user's external account, but you could have a process to capture only that information and not require a duplicate sign-up process.
Of course, I know in the real world it may not be possible to go back and make a fundamental change.
If major changes are not possible, I would suggest:
If people click on "Log in with Google" and enter an account that is not recognized, you could continue to display the log in page, with a message such as:

Google account not recognized.  Please log in with your normal account or create a new one to connect it to Google.

Note that I would assume that the user has an existing normal account with your site first (hence displaying this on the log in page rather than going to the registration page). If you assume they need to create a new account in this scenario, you run the risk of duplicate registrations.
It probably also makes sense to direct them immediately to the "connect Google account" functionality once they log in.
Comment: Thanks for the quick answer. Your arguments are excellent and they make a valid point. Recoding the underlying design is now on the agenda.  :)


Can I charge for closed source J2EE .ear module relying on GPLed EJBs?

Question: A customer asked me to add a (fairly generic monitoring and notifications) functionality to the in-house solution he has assembled on top of JBoss and couple of GPL-licensed components (downloadable from the open source vendor as EARs). I am using JMS and JMX to communicate with these components. Do I have to provide the source and redistribution rights to my customer to satisfy GPL restrictions? In other words, does configurable code that uses JMX and JMS mechanisms constitutes a derivative work? I would actually prefer to open source my code, but part of it relies on a patented third party logic that is unwilling to GPL it, but would gladly supply it to this customer. I am not asking for a legal advice, just for the opinion in terms of best practices / fair use.
Answer: Charging money has nothing to do with it.  Your real question is Do I have to provide the source and redistribution rights to my customer to satisfy GPL restrictions? In other words, does configurable code that uses JMX and JMS mechanisms constitutes a derivative work?
It's a gray area.  The FSF considers the manner in which one communicates with the GPL code relevant to its declaration as a derived work, but they are not specific about the manner in which that decision can be made, other than to say that the two programs must communicate "at arm's length," and that it must be apparent that the GPL program is not part of your work.
The relevant part of the GPL FAQ is here:

I'd like to incorporate GPL-covered software in my proprietary system. Can I do this?
In many cases you can distribute the GPL-covered software alongside
your proprietary system. To do this validly, you must make sure that
the free and non-free programs communicate at arms length, that they
are not combined in a way that would make them effectively a single
program.
The difference between this and "incorporating" the GPL-covered
software is partly a matter of substance and partly form. The
substantive part is this: if the two programs are combined so that
they become effectively two parts of one program, then you can't treat
them as two separate programs. So the GPL has to cover the whole
thing.
If the two programs remain well separated, like the compiler and the
kernel, or like an editor and a shell, then you can treat them as two
separate programs—but you have to do it properly. The issue is simply
one of form: how you describe what you are doing. Why do we care about
this? Because we want to make sure the users clearly understand the
free status of the GPL-covered software in the collection.
If people were to distribute GPL-covered software calling it "part of"
a system that users know is partly proprietary, users might be
uncertain of their rights regarding the GPL-covered software. But if
they know that what they have received is a free program plus another
program, side by side, their rights will be clear.
Comment: Thanks! I think, I can keep it closed source, in this particular case. My program (regardless of packaging, .ear or .dll does not matter) provides generic monitoring and sends notifications if certain criteria are met. It does not rely on these particular components to function and can be described as a generic J2EE module for monitoring/notifications purpose. It can be used with any other J2EE app server and JavaBeans, if they meet certain logical and broad requirements. Even more, I do not re-distribute or otherwise provide GPL-ed software with my package, only test with it.
Comment: Indeed. Using JMX or JMS to communicate is an irrelevant detail. Open source and closed source communicates all the time via HTTP, and the FSF has no problem with that. As long as the protocol is a standard protocol, it doesn't matter which protocol you use.


Disable collision on the fly in Box2D: does not work when entity is already colliding

Question: I'm writing a game with impactjs and i'm using Box2D as physics-engine (Box2DFlash to be specific). So there is a move off the player where he should not collide with the enemys. To achieve this Collision Filtering seems to be the best method.
So I set for the enemy fixture:
 var shapeDef = new b2.PolygonDef();
 shapeDef.filter.categoryBits = 0x0002;

And for the player:
var shapeDef = new b2.PolygonDef();
shapeDef.filter.categoryBits = 0x0004;

When I want to turn on/off the collision of the player with the enemys i call these functions:
ghost: function(){
 this.setMaskBits( 0x0001 ); // only collide with boundary
},
deghost: function () {
  this.setMaskBits( 0xFFFF ); // collide with everything
},
setMaskBits: function (bits) {
  this.body.GetShapeList().m_filter.maskBits = bits;
}

And it is working... but only when they are not colliding with each other. The same problem occurs when i'm facing a wall and I set the categoryBits to 0x0000.
UPDATE
Ok, I fixed it with a dirty hack:
The Problem was, that contacts were still existing, so I'd have to delete them somehow. I tried to delete them at first manually but failed.
In the Manual of Box2D is written:

Contacts are destroyed with the AABBs cease to overlap.

So I wrote a function that moves the player about 6px (the smallest amount that seem to work) in the directory he is facing (if he's not colliding with a wall at that moment), this would overlap the entities and solve the problem.
Here is the function in question:
  changePosition: function (x,y) {
    this.facingWall = false;
    this.collision(); // will set facingWall to true if he's facing a wall.
    if(!this.facingWall) {
      this.body.m_xf.position.x = x;
      this.body.m_xf.position.y = y;
    }
  }

Answer: You can call Refilter() on the fixtures for which the collision settings were changed.
Answer: Ok, I fixed it with a dirty hack:
The Problem was, that contacts were still existing, so I'd have to delete them somehow. I tried to delete them at first manually but failed.
In the Manual of Box2D is written:

Contacts are destroyed with the AABBs cease to overlap.

So I wrote a function that moves the player about 6px (the smallest amount that seem to work) in the directory he is facing (if he's not colliding with a wall at that moment), this would overlap the entities and solve the problem.
Here is the function in question:
  changePosition: function (x,y) {
    this.facingWall = false;
    this.collision(); // will set facingWall to true if he's facing a wall.
    if(!this.facingWall) {
      this.body.m_xf.position.x = x;
      this.body.m_xf.position.y = y;
    }
  }


Can PWM break a DC motor?

Question: I want to know if controlling the speed of a DC motor with PWM could break (burn out the DC motor. Sorry my English isn't that good.
Answer: Provided that the voltage specs of the motor are not violated, no. However, the inductance of the motor stands a very good chance of destroying the switch unless an appropriately-rated flyback diode is used.
Comment: I'm new to Arduino and electronics. I'm planning to use a H-bridge (l293d) with the dc motor, in the project nº 10 of the arduino projects book that comes with the arduino starter kit there is no flyback diode.
Comment: In another project of the book, where a MOSFET is used, I found the flyback diode, but the project that uses the l293d there is no diode.
Comment: The l293d has these diodes already inside the package.
Answer: Providing that you send the appropriate voltage this shouldn't break your motor. The creator of Arduino suggest this way of driving motor on his book.
Source: Massimo Banzi's book : "getting started with arduino" : chapter 5 Advanced Input and Output.

Can PWM break a DC motor?


Is it possible to turn off shared games from your friend?

Question: I have a game (Awesomenauts) that I can play because it's shared from my friend. This game became free for the weekend as well, but I was kicked off when my friend logged on even though it's free. I cannot start it again and it's definitely a bug, but I was thinking perhaps I can opt out of my friends library somehow, preferably temporarily?
Answer: Since you are family sharing, click on the steam icon in your tray, then click settings, then click the Family tab and you can then continue to opt out of this. If this is unavailable to you, you can tell your friend to remove your PC from the authorized PCs list on the same settings page.
As for being kicked out, you are kicked off of any multiplayer/online games if there is more than one person using it at a time when doing Family Sharing
Comment: Errrr... Wrong way around. He's not asking how to unshare from the sharer's side, he's looking to unshare from the recipient's (sharee) side.


Pro-unipotent radical (in Bruhat-Tits) vs. unipotent radical (and reference request)

Question: I'm a beginner in Bruhat-Tits theory, and the following phenomenon makes me puzzled.
So let $F$ be a $p$-adic field, with $\mathfrak{o}\supset \mathfrak{p}$ its ring of integers and maximal ideal, and $q$ its residue field order. Let $G$ be a connected reductive group over $F$. We assume $G$ to be quasi-split, and fix a Borel $B=TU$, $U$ the unipotent radical of $B$ and $T$ a maximal torus, all over $F$. Then we let $\Sigma=\Sigma(G,T_0)\subset X^*(T_0)_F$ be the root system ($T_0$ the split component of $T$).
Let $P$ be a standard $F$-parabolic subgroup (i.e. $P\supset B$), with its Levi decomposition $P=MN$ ($M$ a Levi and $N$ the unipotent radical), and $\bar{P}$ its opposite parabolic. Then we write $\Sigma(\bar{P})$ (resp. $\Sigma_{\mathrm{red}}(\bar{P})$) for the set of  roots (resp. reduced roots) appearing in the Lie algebra $\bar{\mathfrak{n}}:=\mathrm{Lie}(\bar{N})$.
Let $I_G$ be a "standard" Iwahori subgroup (I'm sorry that I have not yet understood the precise definition here, but roughly, $I_G$ should "match" $B$) with pro-unipotent radical $I_G^+$ (a notion which so far I didn't fully understand either; nor did I find a precise definition in the literature, for example, in Kaletha-Prasad's famous new book), and $K_G$ a special maximal compact subgroup of $G(F)$ containing $I_G$. The simplest example is: $G=\mathrm{GL}(n)$ and $B$ the standard upper triangular Borel. Then $K_G=\mathrm{GL}(n,\mathfrak{o})$, $I_G$ is
$$ \begin{bmatrix} \mathfrak{o} & \dots & \mathfrak{o}\\
                   & \ddots & \\
                    \mathfrak{p} & & \mathfrak{o} \end{bmatrix}$$
and $I_G^+$ is
$$ \begin{bmatrix} 1+\mathfrak{p} & \dots & \mathfrak{o}\\
                   & \ddots & \\
                    \mathfrak{p} & & 1+\mathfrak{p} \end{bmatrix}.$$
In this example it's very clear, and reasonable, that
$$(*) \prod_{\alpha\in \Sigma_{\mathrm{red}}(\bar{P})} [U_\alpha\cap K_G:U_\alpha\cap I_G^+]^{-1} = q^{-\dim \bar{\mathfrak{n}}}$$
for any standard parabolic $P$, where $U_{\alpha}$ is the root subgroup associated to $\alpha$. After all, the pro-unipotent radical $I_G^+$ should "contain some $\mathfrak{p}$ at negative root subgroups", and $K_G$ should "contain some $\mathfrak{o}$".
However, some "strange" phenomenon appears when the group is not split. There are examples of non-split, quasi-split $G$ with $P=MN$ such that
$$\quad  \prod_{\alpha\in \Sigma_{\mathrm{red}}(\bar{P})} [U_\alpha\cap K_G:U_\alpha\cap I_G^+]^{-1} \neq q^{-\dim \bar{\mathfrak{n}}}.$$
This looks somewhat weird. Why would such phenomena exist? This seems to mean that the pro-unipotent radical in BT-theory is very different from the "usual" unipotent radical. How do experts think about this?
Answer: A reference for the  "pro-unipotent radical" of a parahoric subgroup is given in
Moy, Allen; Prasad, Gopal; (1994). "Unrefined minimal K-types for p -adic groups." Inventiones Mathematicae 116(1): 393-408.
The definition is given at page 387. The authors use the terminology "pro-nil radical" instead of "pro-unipotent radical", but this is the same object.


Can I get the Custom Fit perk bonus while wearing a Dragon Priest mask?

Question: Is there any combination of heavy armor and a Dragon Priest mask that allows the Custom Fit perk to be active?
Answer: No, because as stated in @Nelson's answer, Custom Fit is a Light Armor perk.
However, there is an equivalent perk in the Heavy Armor tree called Matching Set:

Additional 25% Armor bonus if wearing a matched set of Heavy Armor.

This perk you can get while using a Dragon Priest Mask. All of the Dragon Priest Masks in the game (including the Wooden one) are classed as Daedric Armor - so wearing Daedric chest, hands and feet pieces along with any Dragon Priest Mask will fulfill the criteria to activate the perk.
Comment: As a side note, they also counterintuitively negate the "mage armor" perk when worn.   There are mods, of course, which change these to be classed as "clothing" to resolve this problem.
Answer: No armor involving any Heavy Armor will activate Custom Fit.
The reason is Custom Fit triggers only on all Light Armor.  Heavy Armor is obviously not Light Armor.

Custom Fit
25% Armor bonus if wearing all Light Armor: head, chest,
hands, feet.


Testing WIA without having a scanner/camera device

Question: I wrote a simple scanning code using WIA. I don't have a scanner device so I can't test it. Can I simulate a WIA device to testing it ?
Answer: This does definitely what you want: https://github.com/twain/wia-on-twain
I simulates a scanner and publishes a TWAIN and a WIA interface. Also the scanning of a graphical page is simulated, so you can try out different resolutions and colour schemes.
Answer: Not sure, but maybe http://scanworkssoftware.com/twainimporter.aspx will help you
or, Go to http://twain.org and under the "Fast Find" section click the last link titled "Sample Data Source & Application".  This will install TWAIN 2.0 and a sample source named "TWAIN2 FreeImage Software Scanner" which has some basic scanning features.  It does not have a driver interface but will let you preform scans and Get/Set some general properties.
Answer: With enough effort and the WIA SDK (and probably the Windows DDK as well) you probably can. But it will be a large amount of effort, especially compared to the price tag of a cheap scanner.
I'm assuming your time is worth something. If this is a hobby project, then compare the price of a cheap scanner to the time saved that can be spent working on the fun parts of the project. If this is a work project, then the time saved is more valuable to your customer than to you, but there should still be business case for buying hardware that will save more time than it cost.
Answer: I know this question is very old, but I'll post this as a reference.
Since Windows 10 Microsoft has made a GitHub repository with sample drivers, including the WIA ones:
https://github.com/Microsoft/Windows-driver-samples/tree/master/wia
I wasn't able to test them yet, but they should create a test device.
Answer: Well, try if this virtual webcam supports the WIA interface:  http://www.soundmorning.com/
If so, you are all set and ready to go.
You can also search for "Fake webcam", there are many versions.
Answer: One thing to be concerned about is that all WIA drivers are not created equally.  We recently had trouble using some Brother WIA drivers that were supposedly certified.  The driver would not allow access to the feeder tray.  We ended up having to write TWAIN integration also.
Answer: (1)
http://graphics.kodak.com/docimaging/US/en/Support_Center/Document_Scanners/Desktop/i65_Scanner/Support/Drivers_And_Downloads/i55_and_i65_Scanner_Driver/index.htm
InstallSoftware__v1.7.exe
(2)
http://sourceforge.net/projects/twain-samples/files/TWAIN%202%20Sample%20Application/
WIAonTWAIN_SDK.msi
(3)
For testing only you can also use the free demo version of the commercial file import TWAIN driver XPCTWAIN.
    Product info: http://www.jse.de/products.html#xpctwain
    Demo download: http://www.jse.de/download/setup_xd.exe
setup_xd.exe
Answer: Sounds like an occasion where writing the virtual device that is WIA compat might be the thing that needs to be given back to the community.


Do all my programs have owner rights to all my files?

Question: I'm worried about all my programs having full access to all my files.
Eg: My user is 'john'. I install some program, say Dropbox. Dropbox runs as 'john'. Therefore it not only has full rights on its files under ~/.dropbox, but to all files including ~.
1) Am I right? If so,
2) Should I worry about this?
3) Is there any way to fix this? Someone told me I could use chroot or setuid, but I'm not sure how to use them.
I'm using Ubuntu 12, in case it matters.
Answer: That is a reasonable thing to consider: other platforms, like MacOS-X, and applications, like Chrome, are using sandboxing to run whole applications or parts of applications in a way that they stop having full control equivalent to what you have.
So, in answer to 1, yes, if you start an application running as yourself, it has equivalent access to what you do: any file you can edit, it can edit, and so forth.  The one exception is if the application itself does things to restrict privileges.
In answer to 2, you should probably be vaguely concerned about it much more than you actively worry about it.  After all, every single application you run has the same access - the only thing that distinguishes DropBox is that it came from someone other than the upstream distribution.
So, 3: can you fix this?  The answer is "probably not".  It isn't that it is impossible, it is that it is likely to be hard to do in a way that satisfies your desires to use the applications or services.
Using chroot allows you to pretend that there is another "root directory" than the real one.  This isolates applications (like dropbox) from your real root - and might allow you to escape from the risk that it can read the rest of your home directory.  (Add a symlink from ~/.dropbox to ~/chroot/whatever/home/you/.dropbox and it isn't even all that inconvenient.
However, you need to be root, or use a tool like schroot to manage access to running the application, and the chroot only isolates a few parts of the system - files.  Applications with root inside that can still see outside, or escape.  Various other resources (IP ports, pids, etc) are still shared.
Also, I bet that DropBox has a UI component, and that doesn't work well chrooted.  Even if it does, that limitation hurts other applications.
The alternative, a setuid application, is a way that you can say "no matter who runs this, start it as this other user, not the user who started it".
This is most often used to allow applications that you, a normal user, start to run as root - for example, sudo.  However, it can set the user or group of the process to an unprivileged user too.
The problem with that is that it runs as a different user - just like you ran it with sudo -u another-user dropbox or whatever.  Which means that it doesn't have access to your home directory and, without working hard, you don't have access to the other users home directory.
You can work around that, but it is neither trivial nor convenient in the common case.  Typically, you would want to share a group, and try to arrange that files it can read are owned by that group rather than your standard group.  This isn't trivial to do, even with setuid directories (which change the group or owner of files created under them), in part because you need to manage your umask, and that is a pain under Linux.
Finally, you could use AppArmor or SELinux to secure the application.  I believe that AppArmor is what Ubuntu have chosen as their preferred option. While it is convincingly argued that it is less secure than SELinux, it is also conceptually simpler being based on visible names and paths more than secure labels.
You might find that an effective way to enhance your security without having to go down the more complex paths.  It should, in theory, allow you to restrict DropBox to exactly only the ~/.dropbox folder and nothing else without needing to run as a different user.
So, if you really want to improve your security there, look to the chroot path.  It is the least painful way to improve security of DropBox on Ubuntu - much less than a setuid application, at least.
That said, odds are your biggest risk of exposure is from an employee of DropBox - we know that they deduplicate even between users, so their systems can see the unencrypted content, which means that someone working for them could do the same.
You might consider using encfs instead to encrypt files before they ship up to DropBox...
Comment: Yes I'm already using encfs, thanks. So now I'm only worried about this other thing, which gets even worse given that dropbox is propietary and its code can't be reviewed.
Comment: *nod*  Then, indeed, I stand behind "a chroot is the most likely way to reduce your security exposure".  Though, I did forget that you could (theoretically) use SELinux or AppArmor to protect further...
Comment: Perfect, thanks a lot. I'm gonna read about all those things then.
Answer: 1) Yes.
2) In general no. You have to trust at least some of the software that you run not to mess things up.
3) The easiest way would probably be to run the software as a different user. If it doesn't need access to anything, you could run it as the "nobody" user who has basically no rights. Otherwise, you could change the owner of all the files the application has to access to the user it runs as. Note that this would make accessing the files more difficult for you and other programs though.
In general, I wouldn't worry too much about it. You have backups of your data that you could restore files from anyway, don't you.
Comment: Yes but I'm not so worried about programs deleting my files. I'm more worried about them being able to read them.
Answer: 1) Am I right?
Basically yes, but it is not "programs" that have access rights but the "user" that owns the "process" that runs the "program". So if you run Dropbox, Dropbox have your access rights. If someone else runs Dropbox, it has their access rights.
2) Should I worry about this?
Not really.


Madelung transformation

Question: What is the Madelung transformation and how is it used?
Answer: I googled "Madelung Transformation" in German and found the following answer in an article about the theory of super conductivity.
The Schrödinger equation is an axiom of quantum physics that is difficult to interpret i.a. because of its usage of complex numbers:
$i\hbar \frac{\partial}{\partial t}\Psi = \mathcal{H} \Psi$.
In the Kopenhagen interpretation $\Psi\Psi^*$ is known to describe the probability distribution of a particle. Erwin Madelung tried (already in 1926) to understand the nature of the Schrödinger equation from a different point of view. He substituted $\Psi = ae^{i\phi}$ and split the Schrödinger equation in its real part and its imaginary part (first and second Madelung equation).
Because $\Psi\Psi^* = a^2$, the second Madelung equation (see above reference) becomes a continuity equation of the probability density $a^2$. This equation can thus be interpreted in a more physical way than the Schrödinger equation and that's the point. Similar arguments hold for the first equation but these arguments are more involved (see above reference).
Comment: For a recent paper which compares the Bohmian and Madelung approaches see [this](http://arxiv.org/abs/0904.0723). Also contains all the math ! Cheers.
Comment: First, [Madelung equations](http://en.wikipedia.org/wiki/Madelung_equations). Second, this is not the transformation that is relevant to quantum fluid dynamics (at which mbq was hinting in the first comment under the question). The interesting one comes from nonlinear Schroedinger equation and is apparently somehow also related to KdV equation. Just google for papers. Still, I'll won't add this as an answer because I don't quite understand the stuff (I just looked at papers for a little while). And for the same reason I think Gerard's answer is pretty unsatisfactory.
Comment: @Marek It is related, you just do the same trick on Gross-Pitaevskii equation. Related paper: http://www.springerlink.com/content/0v2l261ru255n721/
Comment: This is extremely interesting - does the paper contain the expressions for the Madelung equations?
Comment: Isn't this essentially the path followed in the Bohmian approach towards quantum mechanics? ... To answer my own question, the wikipedia page on Bohm's theory says: "Around this time Erwin Madelung[29] also developed a hydrodynamic version of Schrödinger's equation which is incorrectly considered as a basis for the density current derivation of the de Broglie–Bohm theory. The Madelung equations, being quantum Euler equations (fluid dynamics), differ philosophically from the de Broglie–Bohm mechanics[30] and are the basis of the hydrodynamic interpretation of quantum mechanics."
Comment: @Sklivvz: yes it does.

Madelung transformation


Closed form representation of an irrational number

Question: Can an arbitrary non-terminating and non-repeating decimal be represented in any other way? For example if I construct such a number like 0.1 01 001 0001 ... (which is irrational by definition), can it be represented in a closed form using algebraic operators? Can it have any other representation for that matter?
Comment: Given that there are uncountably infinite real numbers, and only countably infinite closed form expressions, you can say that "most" real numbers do not have a closed form expression.
Comment: "Can it have any other representation for that matter?" - you could represent it as a simple continued fraction, or as an Engel/Pierce expansion, for instance...
Answer: In general, no, since, for one thing, there's an uncountable infinity of such decimals, and only a countable infinity of closed forms (under any reasonable definition).
Answer: Since $0.1 = \frac{1}{10}$, $0.001 = \frac{1}{10^3}$, $0.0000001 = \frac{1}{10^6}$. Making a guess that $n$-th term is $10^{-n(n+1)/2}$ the sum, representing the irrational number becomes
$$
  0.1010010001\ldots = \sum_{k=0}^\infty \frac{1}{10^{\frac{k(k+1)}{2}}} = \left.\frac{1}{2 q^{1/4}} \theta_2\left(0, q\right)-1\right|_{q=\frac{1}{\sqrt{10}}}
$$
where $\theta_2(u,q) =2 q^{1/4}  \sum_{n=0}^\infty q^{n(n+1)} \cos((2n+1)u)$ is the elliptic theta function.
Comment: what is $\theta_2$?
Comment: It's a theta function, q.v.
Answer: Some irrational numbers can be expressed in a closed form using algebraic operations; $\sqrt7$ is a very simple example. Some can be expressed in other ways, like $\pi$ for which a multitude of formulas is known. Most real numbers however cannot be expressed (using a finite amount of information, but that is implicit in "expressing") at all, since there are just too many of them.
Comment: Are there any references on the impossibility of representing all irrational numbers as products of algebraic or similar operations?


how to create Default Media Player in android

Question: I am developing an Music app in android which create MediaPlayer in android.Currently I have developed simple prototype for that it works well.
Now my main question is How can I set my mediaplayer to provide the default functionality to users or provide my media player in the list of application that are similar.
After reading on google I have found out that you have to use INTENT.setType() but how can I use that with service or when the user selects the file from filemanager of android.
Please provide some usefull pointers.
Thank you
Answer: I think you should take a look at intents and intent filters, here is the link to google developer website
http://developer.android.com/guide/components/intents-filters.html#Receiving
When the user clicks on the audio file from a file explorer program, if there is more than one program that could handling playing the file, the android os does intent resolution and brings up the list of compatible programs, and it is that the USER's choice to make an app the default, you cannot do this programmatically
Answer: Add this code in the manifest
<code>            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />

                <data android:scheme="file" />
                <data android:mimeType="audio/*" />
                <data android:mimeType="application/ogg" />
                <data android:mimeType="application/x-ogg" />
                <data android:mimeType="application/itunes" />
            </intent-filter>
</code>


what should i do so that messages from WhatsApp server to get delivered to appropriate recipient

Question: I have send some messages to recipient while she had deactivated her WhatsApp account but now she's back still those single-ticked haven't been delivered. I just need help to deliver those messages because I want her to know I have been messaging all these days.
Comment: Just send her your screenshots ;)
Answer: If she deactivated before 30 days the messages won't get delivered, because WhatsApp stores the message in the server for 30days. Read it here, Even I haven't tested -> Scroll to update section until it gets delivered.
If she activated within 30days probably with no DP or status she should have blocked you.
Answer: You can select the messages and click on the forward option. Then select her contact and send it again.


What are the state-of-the-art Person-Detektion / Human-Segmentation?

Question: I would like to use a deep learning approach to detect people in videos. I have found some freely accessible implementations like Human Segementation with Pytorch or BodyPix / DeepLab / Pixellib with Tensorflow. They all work well, but with many it happens that, for example, half hand is not detected or if a person is sitting in the picture only the legs and the head are detected. Are there other approaches to detect people who are freely accessible or is that state-of-the-art?
I had imagined such problems have been solved, but I don't know so much about it. Thanks for your answers.
Comment: Person detection and human segmentation should not be the same things. So, please, edit your post to clarify if you're looking for one or the other. Moreover, it may be a good idea to provide the links to the implementations/models you have found so far. In any case, note that asking for "software libraries" is off-topic. If you're looking for references (e.g. papers), that's ok, but clarify that in your post, please.
Answer: You can use any state of the art object detection such as DETR, EfficientDET, YOLO etc. since they have an object 'person' in them. But, if the density of people is high in the images, then, you should look at 'Finding Tiny Faces' which is good for that problem (this will help you detect faces only, think group photos). If you want to find the whole person even if they are occluded, then, it will be difficult (you can then think of segmentation techniques and then, try to find out the people but it will be more taxing).


restrict shipping of particluar item for paticular shipping zone

Question: Is there a module available to restrict the shipping of the particular product for particular shipping zone(country)?
so that the message would appear and cancel the checkout.
Answer: I'm fairly certain there isn't a module that does this. You can build this with rules, but the effect will be very rudimentary.
Create a rule reacting to order updates:

Checks for a particular product included in the order.
Checks to see if a shipping address condition is met.
For your action, display a system message.
Set the status of the order to cart or perhaps checkout:shipping.

That way you wouldn't be able to advance past the shipping status without having it fulfilled.
Not knowing your situation, cancelling an order is a bit extreme, but you could forward the user to a webform, change the status of the order to some new, internal value for review, or even just remove the product from the cart so that the customer can continue.
Comment: Yes, you are right.
I am correcting it, I would prefer to remove that product from the cart so that the user can continue.
Answer:
Add a field in variant for shipping restriction countries
Add a rule in with event Collecting shipping rates for an order
Add a php condition to get the line items details from $commerce_order
Check shipping restricted countries with shipping address countries in your php function
Remove the product by commerce_cart_order_product_line_item_delete()
Add an action to show the msg on site


Word meaning society ruled by Artificial General Intelligence?

Question: I remember reading a word once which had this meaning which starts with the letter 'a', like "agritocracy" or "autotocracy". I just can't remember the word now; it specifically means rule of a society by an artificial general intelligence. Mostly I'm creating this question for self-tracking. I already know such a word exists because I read it and looked up the meaning in the past. I just can't remember the word a few months later.
Comment: What's the difference between an artificial intelligence and an artificial *general* intelligence?
Comment: *Aristocracy*??
Comment: @Decapitated Soul Perhaps some might need a few more question marks.
Comment: No that's rule by aristocrats.
Comment: To rule a human society, a ruler must be prepared to use force. If the force is exercised by machines against people, you have a **mechanical dystopia**. If the force is exercised by people more loyal to a machine than to their fellow humans, you have a **theocracy**, which you could qualify with **AI**.  An imagined human society that does not require the occasional use of force against its members is essentially a **fantasyland**.
Comment: @nnnnnn I suggest you look it up on Wikipedia. These are two different terms with two different meanings. A chess AI is really good at chess. But it cannot drive a car. So it is an artificial intelligence but it is not an artificial general intelligence. The human brain, on the other hand, is an example of a general intelligence that is not artificial. Please keep the discussion on-topic and take off-topic questions to either our chat or Google. Thanks.
Answer: According to Wikipedia, "automata" (the plural of automaton) is a theoretical branch of computer science that has played a major role in artificial intelligence. The word you are looking for, therefore, would be "Automatocracy".  See Wikipedia link
Comment: An example of "automatocracy" being used in a sentence where it means "a government run by A.I." that I found is a writing prompt posted to Reddit. https://www.reddit.com/r/WritingPrompts/comments/4bt0qg/wp_we_now_live_in_a_democratic_automatocracy/
Answer: Though the following word doesn't begin with the letter 'a', Wiktionary lists

robotocracy (uncountable)
rule by robots

The robots involved would obviously have to possess intelligence at some level; [Wikipedia] licenses this (though the very existence of the word virtually demands it) here:

Robots can be autonomous

And in this article:

Autonomous robotics is usually considered to be a subfield of
artificial intelligence, robotics, and information engineering

though of course outward appearance need not be humanoid.
The term automatocracy is mentioned (with the equivalent of scare quotes) in this Wikipedia article on 'Political ideas in Science Fiction', but has a very limited circulation. Though it has been used outside the SF community; this Reddit article on politics uses the term. It is perhaps borderline acceptable, needing scare quotes outside SF at the moment.
Answer: The word I was trying to recall is algocracy. I realize this isn't so much rule by AGI, but moreso society where law is executed as code, which could include an AI program, but might also include blockchain smart-contract-based legal systems.
I know this must be the word because I was ran into this term in a transhumanist forum originally, so this adds up.
I do like people's answer automatocracy though; that seems like a much better word to describe rule by AGI specifically.


How would I go about creating a neural network that outputs a non-binary number?

Question: I would like to create a neural network, which, given the training data (e.g. 58, 2) outputs a non-binary number (e.g 100). Perhaps I am not searching for the correct thing, but all the examples I have found have shown classifiers using a sigmoid function (range of 1 to 0). I am looking for something that would output nonbinary numbers.
Answer: First of all, sigmoid does not output 0 or 1, it outputs any real number in the range between 0 and 1.
Furthermore, neural networks don't usually output binary values, unless the output layer uses the step function as an activation function (which is rare).
I'm not really sure if you want the neural network to be a classifier or regressor, but it sounds like you want a regressor.
Regression is when you are interested in the value of the output neuron(s) itself. A simple example is if you want the network to predict the sum of two input neurons.
If you want to change the network from a classifier to a regressor you should probably reduce the number of neurons in the output layer to 1, and change the activation function of that neuron from softmax to the identity function ($f(x)=x$; which is the same as no activation function at all).
Comment: @JessBullard: This answer is accurate. Generally for regression problems you would use a linear output at the final layer, and mean squared error for the loss function. You would still use non-linear in the hidden layers. Example in Keras: https://machinelearningmastery.com/regression-tutorial-keras-deep-learning-library-python/
Comment: @NeilSlater I looked at the code presented in the link. That appears to be similar to what I am looking for. How would I get it to output it's prediction given an input? I've seen many questions about this in the comments of his post but no solution has worked.
Comment: @JessBullard: that should just be `model.predict` See the Keras documentation here: https://keras.io/models/model/
Comment: @NeilSlater I do that but then it expects shape2 but was given shape1. All the solutions I've found have not worked.
Comment: @JessBullard: That is a mistake when using it. Probably you are passing in a single example and it expects an array of examples. If you cannot figure that out, ask a question on Data Science or Stack Overflow showing the relevant part of your code and the error message you get. Note this has probably already been answered multiple times on both sites, so try searching your goal and error message there first.


Boost internet by using multiple connectins

Question: after looking at some google, I realised that I can combine multiple internet connection to boost my one computer internet speed. But problem is that I don't have multiple device to connect to my pc. Is there another way of doing it? It of course needs to be done at ubuntu( i have ubuntu pc, in case if you are wondering, i have intel i7 6700k and gtx 1070 with 16gb ddr4 hyperx fury black, and msi h110m gaming motherboard. Plus, sum amazing be quiet cpu cooler with amazing corsair bronze 600w power supply. My case is xpredator x3 devil red with 2 custom fans. I get about 800 fps in minecraft, max settings.) After doing this, I can play minecraft multiplayer without LAG!! YAYAYAYAYAYAYAY
Comment: To be able to connect your computer to multiple networks which you might be able to use in parallel (don't know if or how that could work though), you definitely need the necessary hardware first. You can not connect to a network without a free network interface. Also, please don't include unrelated information into your questions, nobody cares about your graphics card, case or fans when asking a networking question. It only increases the effort needed to read and to understand what you actually want.
Comment: alrihghty sure :(
Comment: It's called `bonding` and Ubuntu can do it. I requires the loading of a special kernel module, at least 2 comm interfaces, and 2 separate routers (you can't double-connect to the same router), and setup of Network Manager's bonding profile.
Answer: Ok, allow me to boil this down for you.
Can you combine internet connections to increase overall connection speed?
Yes, this is called Link Aggregation
Will these extra connections allow me to play games with less latency (lag)?
In most cases, probably not
Why?
Becuase you are probably experiencing lag due to your ISP (Internet Service Provider) not providing you with enough bandwidth (data speed) or bandwidth latency (lag) to allow you to play with little lag. Combining internet connections on your local network will only increase your speed to the other devices on your network. Not the outside world. There are systems that would technically allow you to combine two outside internet connections to achieve this, but it's not as simple as plugging two cables in.
What should I do?
You should get in touch with your ISP and find out how much bandwidth you are paying for, then you should go to Speedtest.net and run a test to see how much you are getting out of the box. (So plug right into your modem) If for any reason you are not getting the speed you are paying for, there is a problem and you may need to have a technician come out and check things. But if you are getting what you pay for, then the only solution for you is to pay for more bandwidth. Sorry, but that's just how it works.


What do you call the activity where people mingle at a social event?

Question: My monolingual dictionaries tell me that the word "mingle" can only be used as a verb in English, something that is confirmed by various google searches. So, what could I use instead, to say "The party will begin with a mingle, and then there is a sit-down meal" in a more idiomatic way? Is there another noun for this activity, or do I have to rephrase completely? My bilingual dictionary is not of much help, since that suggests "mingle", used as a noun...
Comment: You can use it as a noun if you like and it'll be understood. If you're hesitant, just say it'll start with "some time to mingle".
Answer: "Mingle" really means to put yourself into a crowd. At a social event, 'mingling' suggests branching out and meeting new people rather than those you are already familiar with. We don't formally use "mingle" as a noun in the way you suggest, although an individual might informally say "I'm going for a mingle", perhaps? I don't believe there is a noun in popular use for a designated time like that.
I think you just need the word "socialise", or "socialising". The most common ways of saying this would probably be:

The party began with some socialising, followed by a sit-down meal.

or

The party began with some time to socialise, followed by a sit-down meal.

Perhaps at more formal parties, there might be "introductions" - where people are formally introduced to one another, and that word might be used to describe that time. Most people - although this much is perhaps opinion - find 'forced' introductions at social gatherings to be awkward, and prefer mingling to be a personal choice and introductions to happen naturally.
Answer: It's unnatural to put "mingling" as an event on a schedule, but you can put time for mingling on a schedule.

The party will begin with time for mingling, followed by a sit-down meal.

"A mingle" sounds like a whole social event in itself, like a gathering designed for people to meet new people and get to know each other, rather than part of a party.


Azure equivalent of AWS tags?

Question: Is there an equivalent of AWS EC2 tags for Azure? For example, if an account wanted to assign name=value pairs to an Azure machine and then subsequently query them.
Answer: Azure doesn't have resource tags. You'd need to implement something on your own e.g. maintain key/value tag list in Table storage (or any other store, really), updating whenever you add/remove a resource. That's something that can be incorporated into CLI/PowerShell scripts, or if you're automating via a program, you can manage tags via SDK calls.
EDIT Oct 2015 My original answer is outdated. Using Azure Resource Manager (ARM) for infrastructure deployments, resources may now be tagged. While these may be applied and queried via CLI/PowerShell, you may also manage tags via the portal. When you open a resource, you will see a "tag" icon in the upper-right. Clicking through, you'll see assigned tags and be able to create new ones.
Here's an example of one of my demo resources:

You can also pin a resource tag to the dashboard:

More info on resource tags is here, including instructions for PowerShell and REST API, and a snip from a billing report showing tagged resources.
Answer: Azure now supports tagging on preview (new) portal.
https://weblogs.asp.net/scottgu/azure-redis-cache-disaster-recovery-to-azure-tagging-support-elastic-scale-for-sqldb-docdb
Answer: Tags are now available in Azure Portal Preview and can be also managed using PowerShell
Using tags to organize your Azure resources : https://azure.microsoft.com/en-us/documentation/articles/resource-group-using-tags/
PowerShell cmlet to manage tags :

Get-AzureTag
New-AzureTag
Remove-AzureTag

Regards
Stanislas

Azure equivalent of AWS tags?


Find the partial derivatives of $x^TAx$

Question: $x$ is a vector and $A$ is a matrix and I'm confused as to how to find the partial derivatives of $x^TAx$ with respect to $x_1$, $x_2$, etc.
Comment: That question does not explain the process as to how a derivative is determined
Comment: Expand $x^T A x$ and compute the derivatives
Answer: I just learned a new trick when your independent variable is in more than two places within your formula: introduce a new (fake) parameter which will then disappear:
$$\frac{\partial}{\partial x} y^TAx = \frac{\partial y}{\partial x}[Ax]^T+y^TA $$
The transpose was to make the vector a row vector. Nothing deep there!
Now, if $y=x$ then
$$ \frac{d}{dx} x^TAx = x^TA^T+x^TA = x^T(A+A^T) \ . $$
Comment: How would you go about it for partial derivatives though?
Comment: So, if $b=(b_1,...,b_n)$ is a constant row vector, (here $y^TA$ plays that role for instance) then $bx$ is just a linear combination $\Sigma b_i x_i$, thus this real-valued function's gradient is simply $b$ itself.

Find the partial derivatives of $x^TAx$


Eclipse tooltip on Ubuntu 22.04 is always empty

Question: I'm using Ubuntu 22.04 and Eclipse IDE (09.22). Every time I show the tooltip (for javadocs or so) it's just empty.
I've seen people talking about similar problem and one of these solutions is to install gnome-color-chooser but I'm worried color-chooser is not right for jammy (Ubuntu 22.04) : I tried to install the deb but there are too many dependencies to be installed (who need dependencies on their own).
Does anyone have the same issue? or know how to solve it? thank you.
Answer: I had the same issue, so I ran Eclipse from the terminal and got the following whenever I hovered:
Failed to create GBM buffer of size 1x1: Invalid argument
src/nv_gbm.c:99: GBM-DRV error (nv_gbm_bo_create): DRM_IOCTL_NVIDIA_GEM_ALLOC_NVKMS_MEMORY failed (ret=-1)

According to this article, there is an issue with webkit and Nvidia: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2498
As proposed in the forum, I resolved the issue by setting the environment variable: WEBKIT_DISABLE_COMPOSITING_MODE=1


Omega theme responsive grid two break point

Question: I want to make responsive grid with Omega 3 theme. Grids will be 4 columns in large. 2 columns in normal width. 1 column in narrow devices. Is there a way with omega 3 with css classes?
Answer: Omega 3 uses the 960 grid, but you can alter it adding a custom 960.
Go to http://grids.herokuapp.com/ and design your grid and override the default one (on a sub-theme).
But I strongly recommend going with Omega 4. Is far more powerful and it is designed to give you the freedom to use any grid or presentation framework you like! If you don't like sass (bad for you) you can just alter the css directly.
Edit: As @Clive mention it, the Omega 5 alpha is out there! It's fantastic and follows all the html/css best practices + complies with D8 standard. Go test it, it's almost stable and your themes will be ready for D8.
Disclaimer: It has been ages since I use the Omega 3.
Comment: Omega 5 is allegedly stable(ish) too now, though I haven't tried it
Comment: @Clive I know and the future looks amazing (and D8 bulletproof)! But it's still on alpha and not rdy for production sites. Thnks for the comment, edit my answer adding Omega 5.


Did David kill Goliath twice?

Question: In 1 Samuel 17:50, it says David prevailed by striking down Goliath with a sling and stone and killing him. In the next sentence, it says David grabbed Goliath's sword and killed him.
Answer: I Sam 17:50, 51 says:

Thus David prevailed over the Philistine with a sling and a stone;
  without a sword in his hand he struck down the Philistine and killed
  him. David ran and stood over him. He grabbed the Philistine's sword
  and pulled it from its sheath and killed him; and he cut off his head
  with the sword.

Note what the text does NOT say:  It does not say that when Goliath was hit with the stone from a sling that he was killed.  It simply says that he was overcome or prevailed over.  The killing of Goliath occurred when he was beheaded.
Therefore, the simplest way to understand this passage is to suggest that when he was struck by the stone, Goliath was knocked unconscious and fell (V49).  David then took Goliath's sword and beheaded him, thus killing him.
However, the text is capable of meaning that the stone from the sling actually killed Goliath and that the beheading was to ensure that the giant was dead.  Either way, the giant did not die twice.  (I prefer the first interpretation but that is a matter of taste since no physician was there to monitor and document his health.)
Comment: Good answer.  It bears mentioning that this kind of "back-and-forth" is common in Hebrew; hence while we automatically read the first "killed him" to be connected to "without a sword," it is quite likely that the intention of the author with the "David ran [...] with the sowrd" clause was to elaborate on the first "killed him."
Answer:
So David prevailed over the Philistine with a sling and with a stone, and smote the Philistine, and slew him. [1 Samuel 17:50, KJV]

David 'smote' the giant with a stone.
Then 'slew' him with the giant's own sword.
Answer: It appears that while David did prevail over him with the sling, he did not kill him with the sling, but rather Goliath's own sword. Prevailing over does not necessarily have to mean "killing" while it probably means here a gain in the upper hand, due to the fact that Goliath is likely unconscious.
Another possibility is that Goliath is dead once being hit with the stone, yet the text simply grants the time of death to be when David beheads him.
Answer: Verses from ISA-2 Interlinear from scripture4all.org. [Some unwarranted -ing endings changed to present tense by me.]
1Sam. 17:49 – And-he-puts-(forth) David ath(-) hand-of-him to(-) the wallet and-he-takes-from-there stone and-he-slings and-he-smites [ik] ath(-) the-Philistine to(-) forehead-of-him and-she-sinks the-stone in-forehead-of-him and-he-falls on(-) faces-of-him earth-ward.
1Sam. 17:50 – And-he-holds-fast David from(-) the-Philistine in-sling and-in-stone and-he-smites [ik] ath(-) the-Philistine and-he-puts-to-death-him [u-imith-eu] and-sword (there)-is-no in-hand-of(-) David.
1Sam. 17:51 – And-he-runs David and-he-stands to(-) the-Philistine and-he-is-takes ath(-) sword-of-him and-he-draws-her from-scabbard-of-her and-he-puts-to-death-him [i-mthth-eu] and-he-cuts-(off)(-) in-her ath(-) head-of-him and-they-see the-Philistines that(-) he-(is)-dead [mth] masterful-(man)-of-them and-they-are-fleeing.

https://bbhchurchconnection.wordpress.com/2012/05/03/how-many-times-did-david-kill-goliath/

How Many Times Did David Kill Goliath? Date: May 3, 2012 Author: Louis
A common "difficulty" or contradiction cited in the Bible is the fact
  that the text tells us David "killed" Goliath twice. The passage is 1
  Samuel 17:50-51. Here's how it reads in the ESV.
So David prevailed over the Philistine with a sling and with a stone,
  and struck the Philistine and killed him. There was no sword in the
  hand of David. 51 Then David ran and stood over the Philistine and
  took his sword and drew it out of its sheath and killed him and cut
  off his head with it. When the Philistines saw that their champion was
  dead, they fled.
In my reading of Do Historical Matters Matter to Faith? Old Testament
  scholar Robert Chisholm offers the following explanation:
"The alleged 'double killing' of the Philistine in 17:50-51 can be
  explained reasonably when one takes a closer look at the Hebrew text.
In verse 50 a hiphil form of מוּת, 'die,' is collocated with 'he
  struck down,' while in verse 51 a polel form of מוּת is used to
  describe how David killed the Philistine with the sword. The
  collocation of verbs in verse 50 has the nuance 'dealt a mortal blow.'
The polel of מוּת (v. 51) is used in eight other passages in the Old
  Testament. In three poetic texts, it appears to mean, simply, 'kill,
  put to death' (Pss. 34:21; 109:16; Jer. 20:17). But in narrative (all
  in Judges-Samuel) it appears to have a specialized shade of meaning,
  referring to finishing off someone who is already mortally wounded
  (Judg. 9:54; 1 Sam. 14:13; 2 Sam. 1:9-10, 16).
Abimelech's statement (Judg. 9:54) is particularly instructive—he
  asked the armor bearer to kill him (polel) because otherwise people
  would say that a woman killed him (the verb is הָרַג, 'kill'). So who
  killed Abimelech? Two answers are possible and both are correct—the
  woman (she delivered a mortal blow that made death certain) and the
  armor bearer (he delivered the death blow in the technical sense =
  polel).
How did David kill the Philistine? Again two answers are possible and
  both are correct—with a sling stone (David delivered a mortal blow
  with the sling that made death certain) and with the Philistine's
  sword, which he used to deliver the deathblow in a technical sense (=
  polel)." (p. 195)....
Answer: David did not kill Goliath twice!

49 And David put his hand into his bag and took from it a stone and slung it, and smote the Philistine on his forehead. And the stone sank into his forehead, and he fell upon his face to the earth. 50 David smote the Philistine, and slew him with a sling and a stone, but there was no sword in David's hand. 51 Then David ran and stood upon the Philistine, and took his sword and drew it out of the sheath, and slew him, cutting off his head with it. When the Philistines saw that their champion was dead, they fled. (1 Samuel 17:49-51)

In verse 50 when it says that David slew the Philistine, it uses the Hebrew word 'hiphil' which means that he was 'dealt a mortal blow.' In verse 51 it uses the Hebrew word 'poel' which means to make death certain and immediate.
There is another story in the Bible that shows how these two words are used.
(Judges 9:50-56) Abimelech killed 70 of his brothers to become king over Shechem. And while Abimelech and his soldiers were fighting hard to reach the gate of a strong tower, to burn it with fire. A woman cast a piece of a millstone upon Abimelech's head and broke his skull. Then he called hastily to his young armor-bearer and said: "Draw thy sword and slay me that men say not of me, A woman slew him. And his young man thrust him through and he died.
You can see that the woman killed Abimelech, by 'dealing him a death blow when she crushed his skull open with a stone.' But the armor-bearer killed him quickly with a sword.
For more information about David and Goliath see: https://arkofthecovenant2.blogspot.com
Answer: Does it really say he took the Philistine's sword?
I thought it said he took "his" sword!
David ran over and took his sword.....
So as it mentions Dave ran over - the next part must mean his own sword. I don't think you can assume he took anyone else sword from that passage.
But Dave didn't have a sword.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Answer: 1 Samuel 17:23 AMP

As he (David) was talking with them, behold, the champion, the Philistine of GATH named Goliath, was coming up from the army of the Philistines, and he spoke these same words again; and David heard him.

In verse 51, David cut his head.
2 Samuel 21:19 AMP

There was war with the Philistines AGAIN at Gob, and ELHANAN the son of Jaare-oregim, a Bethlehemite, killed Goliath the GITTITE, whose spear shaft was like a weaver's beam.*

Take note of the bold and capitalised words. There were two Goliaths - David killed one, Goliath of Gath, and Elhanan, of David's tribe, killed the 2nd, Goliath the Gittite.
Answer: In this instance, instead to take into consideration factors as scribal mistakes, doubling of Goliath's character (according Layo Sobo), or an improbable 'dilution' of the meaning of the Hebrew verb מות ('to put to death', in this context) in "to be knocked unconscious" (according Dottard), is more useful to consider a special Hebrew language characteristic.
Prof. Peter J. Gentry [How to Read and Understand the Biblical Prophets, 2017, Crossway, Wheaton, Ill., U.S.A., chapter 1 (Calling the People Back to the Covenant > Illustration from Isaiah 5 and 6 > Hebrew Literature)] illustrates this peculiar style often utilized in the Bible (bold is mine, Italics is author's):
"[…] reading and studying the Bible may not be straight forward for readers with a modern and Western background in culture and language. […] the normal pattern of Hebrew literature is to consider topics in a recursive manner, which means that a topic is progressively repeated. Such an approach seems monotonous to those who do not know and understand how these texts communicate. Using the recursive approach, a Hebrew author begins a discourse on a particular topic, develops it from a particular perspective, and then concludes his conversation. Then he begins another conversation taking up the same topic again from a different point of view. When these two conversations or discourses on the same topic are heard in succession, they are like the left and right speakers of a stereo system. Do the speakers of a stereo system give the same music, or do they give different music? The answer is that the music they give is both different and the same. In one sense the music from the left speaker is identical to that of the right, yet in another way it is slightly different so that the effect is stereo[phonic] instead of just one-dimensional. Just so, in Hebrew literature the ideas presented can be experienced like 3-D Imax movies with Dolby surround sound – they are three-dimensional or full-orbed ideas."
Understood this point, how we may apply this peculiar Hebrew literature's style to the account at issue?
Before everything, as our frequent habit, now we get to quote 1 Sam 17:50-51 Hebrew text (I've boldened two terms which we speak about later.
ויחזק דוד מן־הפלשׁתי בקלע ובאבן ויך את־הפלשׁתי וימיתהו וחרב אין ביד־דוד
וירץ דוד ויעמד אל־הפלשׁתי ויקח את־חרבו וישׁלפה מתערה וימתתהו ויכרת־בה את־ראשׁו ויראו הפלשׁתים כי־מת גבורם וינסו
Another Hebrew language peculiarity is putting first into the sentence the term you wants to emphasize (the high flexibility of Hebrew synthax – compared to a lot of our Western languages - allowed this linguistic method). So now, if we pay attention to the first verb of each verses we can catch the idea that the writer wanted to enhance.
The first 'conversation' (using prof. Gentry terminology above) wants to enhance the fact that the young anointed king held firm [חזק] before Goliath, in spite of the unassailable advantages that the giant from Gath had over David (as regards Goliath's body frame and war expertise, compare 1 Sam 17:33).
The second 'conversation', also if it seems repeating the same things, really wants to enhance another slightly different concept: indeed, the first term, a form of the verb רץ ('to run'), emphasizes David's will to make certain - to him – the death of Goliath, to clinch it once and for all.
As we saw from this brief research, the Bible has nothing to fear from this deepening approach. Indeed, this latter method reveals that a number of so-called (Bible) 'discrepancies' are only illusory.
As 2 Tim 3:16-17 states, we can maintain a full trust in Holy Scriptures, since they are result of divine inspiration, "All Scripture is inspired by God, and useful for teaching, for reproof, for correction, for training in doing what is right, so that the man of God may be perfectly fit, thoroughly equipped for every good enterprise" (Williams)
Answer: What I perceive in  these portions of Holy Scripture is that David mortally wounded Goliath in verse 50 and finished killing him in verse 51. Same scene is seeing in Judges 9:54.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).

Did David kill Goliath twice?


When I use a multiclass move to choose Animal Companion, do I get Command for free?

Question: I want to make my Templar (modified Paladin) into a mounted knight using Animal Companion and Command.  Could I use a single instance of a multiclass move, or would I need to use two moves?
Comment: Excellent question. I was about to ask the same but for the wizard.
Answer: You would normally need two multiclass moves to take two moves, but Animal Companion and Command are starting moves that don't do anything without the other, so they depend on each other. In that case, they count as one for multiclassing (p. 31):

The multiclass moves allow you to gain moves from another class. You get to choose any move of your level or lower. For the purpose of multiclassing, any starting class moves that depend on each other count as one move—the wizard's cast a spell, spellbook, and prepare spells for example.

However, those two moves cover more (and are missing other things) than what you need to emulate a Paladin's holy mount, and they're definitely overblown for just a mundane mount but with a move to represent training. The Dungeon World Way here is to write a custom move. Especially since you're already working with a modified character class, a custom move is the most appropriate way to handle this. Talk with your GM and figure out what you want it to do, and consult the Advanced Delving chapter for advice on custom moves.
Alternatively, you could use already-created custom moves for handling mounts. The 3rd-party supplement Mounted Combat adds rules for mundane trained mounts (both in combat and out of combat, despite the name). I've found the rules themselves to be a fairly lightweight addition to the game, and can be used by any kind of character to model mounts using the new moves and mount statistics. (My only caveat is that the statistics for mounts overlap a bit with the new statistics and moves for followers in The Perilous Wilds 3rd-party supplement, so if you try to use those together and have any mounts modelled as followers, you'll have to resolve that conflict. I'm still experimenting with how to best handle that.)
Answer: This is too long for the comment forms.
Here's the move I made:

Mounted
If you gain a special bond with your horse, you may take this move instead of your class move, next time you level up.
You have a supernatural connection with your loyal horse. You can't talk to it per se but it always acts as you wish it to. Name your mount and choose a base:
• Ferocity +2, Cunning +1, 1 Armor, Instinct +1
• Ferocity +2, Cunning +2, 0 Armor, Instinct +1
• Ferocity +1, Cunning +2, 1 Armor, Instinct +1
• Ferocity +3, Cunning +1, 1 Armor, Instinct +2
Choose as many strengths as its ferocity:  Fast, burly, huge, calm, tireless, intimidating
Your horse is trained to fight humanoids. Choose as many additional trainings as its cunning:  fight monsters, labor, travel
Choose as many weaknesses as its instinct:  Flighty, slow, broken, frightening, forgetful, stubborn, lame
When mounted on your horse…
• …and you attack the same target, add its ferocity to your damage
• …and you track, add its cunning to your roll
• …and you take damage, add its armor to your armor
• …and you discern realities, add its cunning to your roll
• …and you parley, add its cunning to your roll
• …and someone interferes with you, add its instinct to their roll
Comment: This is the wrong place to give feedback on a move, but [if you come to chat](http://chat.stackexchange.com/rooms/7510/dungeon-world-custom-move-workshop), there are some things about this that can be improved.


Auto Stabilising Flight

Question: At the moment this project is purely hypothetical but my friend and I were looking to make a model airplane which could stabilize its flight to be a straight line. Basically, we want there to a button on the controller or a separate transmitter which, when activated, would cause the plane to fly in a straight, horizontal line in whichever direction it was facing. The instrumentation we believe we would need is a three axis accelerometer, so that it can level the plane to fly horizontally with the ground and keep the roll and yaw steady. My question is, would this work? When I talked it over with my dad (who does a lot of this kind of thing) he suggested that we might need a Kalman filter to keep the instrumentation from gradually drifting off course but, being a high school student, that sounds a little intimidating. Any comments on feasibility or improvements would be greatly appreciated.
Comment: Do you only want to use a accelerometer or could you also add GPS? Also you want the plane to keep facing in the same direction, or keep  its velocity pointing in the same direction (wind from the side can make these two different)?
Comment: A GPS could be added, and I think that is in our plans now. The idea would be to have it pointing to the same geographical location all the time so yes, wind would have to be accounted for.
Answer: 1- it would be better if you use a 9 DOF IMU (gyro, accelerometer, compass) and fuse the data to get a better estimate of the state of your model airplane
2- Then I would suggest that you study what is a PID controller so that you could control the variable of interest
3- The kalman filter your dad mentioned would be used to fuse the data of the IMU (point 1), it is indispensable as it would improve the state estimate
4- You could start without the kalman filter with a model that is not very stable and gradually improve it to employ a kalman filter (later you could even delve into particle filters)
5- It requires some work, as flight control is a bit tricky, but I think with some research you can do it (even though it is a little bit more advanced than high school level)
Comment: Exactly as @Andy said. For example if you want your airplane to follow a certain path, you would have to control several parameters (roll, pitch, etc.) in order to go from point A to point B (number of variables depends on the constraints you impose on the system, for example you may want the speed to be constant also). Thus the variable of interest would be the roll, pitch etc. (you would have more than one variable for an airplane as it is not a very simple system).
Comment: Thanks. This is just what I'm looking for. When you say "control the variable of interest" though, what do you mean by that?
Comment: @Ulthran The variable of interest would be whatever your goal is - to fly on a compass heading (maintain a direction/bearing), or as one of your comments implies, to fly towards a geographical location while correcting for wind (which is a bit more complex to define - does it circle when it reaches there?).

Auto Stabilising Flight


How to show windows only from the current workspace in Unity switcher?

Question: I would like to make the window switcher (typically invoked with Alt-Tab) in Unity to show only windows from the current workspace. Any help would be greatly appreciated.
Answer: For 12.04
This is the default behavior now!
For 11.10:
This isn't currently possible, however there is a workaround that you can set that will display the applications in your current workspace first, which means you can Alt-Tab to it quickly without having to go through applications in your other workspaces. Though this doesn't limit the switcher to the current desktop but it at least puts the apps on that desktop first:
First:

Install the CompizConfig Settings Manager
(CCSM).
Then go to the Switcher tab and select "Bias alt-tab sorting ...." and make sure you check the box.

How can I configure Unity?
Answer: You may not be able to use the current Alt+Tab switcher, but there are other ones accessible from compiz.
Try installing CompizConfigSettingsManager (package name: compizconfig-settings-manger). From there you can disable the Alt+Tab switcher from the Unity plugin.
After that you can enable one of the other window switcher (Application-Switcher, Static Application-Switcher, Shift-Switcher)
I chose to change the keybindings on Static Application Switcher to be Super+Tab
Hope that helps!
Answer: Currently there is a binding for that in scale, (Shift+Alt+↑) that you can use or change
And or  set an edge for cursor, use  bottom right here


Who would have been worshipped as the god of engineering in Ancient Rome?

Question: I am wondering who people, like the Roman architects that designed the aqueducts and other engineering marvels, would pray to to make sure their designs were good and would work?
Comment: This **is** (probably) on-topic here. However, this questions like this would likely get better responses on the Mythology site.
Comment: I am not sure that any such prayer would have taken place.  If it did, I think Fortuna as likely as Vulcan.  Religion was social & ritual, not devotional ( as fast as I know).  Also, questions should be supported with prior research, including why the information on Wikipedia is insufficient.
Comment: @T.E.D. Or even the Latin site.
Comment: Is this question reserved to Ancient Rome?
Answer: Vulcan was the Roman equivalent of the Greek Hephaestus (God of blacksmiths and fire) for engineering. And Minerva (Goddess of crafts and knowledge) was the Roman equivalent of Greek Athena for the science of architecture. Mercury was the Roman equivalent of Greek Hermes (God of travels) for transportation infrastructure? I guess.
(Also in Greek culture we have many water body gods under Poseidon, similar expectation for the Roman Neptune. Further each large river, Lake or source of water has its own deity, so each aqueducts source of water would have a deity/ies.)
Answer: Probably Vulcan, god of fire and metalworking, among other things.
Minerva might have some influence over works of great intellect, but most Roman engineering tended to be done by rule of thumb, rather than calculation. The large safety margins this approach demanded are responsible for the survival of so much Roman construction to the present day.
Comment: References would greatly improve this answer. Much Roman engineering was *military* (akin to mechanical engineering today), where this claim is nonsensical, rather than *civil*.


OAuth access token and page refreshes

Question: I can see OAuth working well for a fully Ajaxified application, as the local JS code can always replay the Bearer token to the server. However, what happens if we have a page refresh?  In that case I assume we lose the token and then go back through the OAuth redirect process to get yet a new access token issued. Is this correct, and are there patterns to avoid this, such as storing the access token in HTML5 local storage?
Answer: If you're talking OAuth 2.0 then you can probably request both a refresh token and access (or Bearer) token when you authenticate with the OAuth 2.0 provider.   The refresh token should be returned directly to the server hosting the web application, stored somehow (perhaps session state) and NOT ever exposed to the browser.   The browser can use the access token to make requests to secured services/endpoints which require it but it should have a short lifetime (regardless of whether or not there was a page refresh).   When it expires (again may or may not be due to a page refresh) the client application can make a request to the hosting server where the refresh token was delivered.  The server can then use the refresh token to get a new access token WITHOUT the user needing to login again.
There's a diagram of this in the refresh token section of the OAuth 2.0 spec.
There are several variations of how OAuth 2.0 can be used and details may vary with your particular scenario and implementation but hopefully that gives you a high-level idea of how you can avoid prompting the user to re-authenticate when the access token expires or on page reload.

OAuth access token and page refreshes


Strategy tournament vs. table

Question: How does the strategy that we play at a tournament differs from the strategy at a table? What should we do differently?
Comment: I don't agree Shwan is necessarily asking Tournament verse cash games, remember there are multi-table tournaments, sngs or satellites. I think there is merit and value here to discuss how to handle different tournament types and the strategies you should employ. I would very much like to see a rewording of the question and some answers rather than closing.
Answer: There is one big difference between cash games and tournaments:
In a tournament, a player's goal is to "cash" (reach a paid placement). On the other hand, a player in a cash game is strictly required to accumulate chips in order to win.
This means that to find success in tournaments, it is not necessarily required that a player win pots, although it would be beneficial if they did. As long as a player has a decent sized stack, a tight fold could have more value than putting chips into the pot.
Therefore, a fold in a tournament has value, while a fold in a cash game has no value. This is the key difference between tournaments and cash games.
In terms of strategies, I would suggest to have these goals in mind for every hand. It is a bit too general of a question for me to give specific strategies because a lot of situations can arise in different formats.
Answer: This is a very broad question and depends a lot on your own personal play style at a cash game to compare it to how you would play in a tournament so this is both an extremely broad and an extremely subjective question.
The first thing you need to realize is that your chip stack is constantly reducing in value in an MTT because the blinds are increasing. The only way to win a tournament is to win chips and you are racing the clock.
In a cash game, however, you can (generally) afford to take your time and make safer decisions, wait for spots or play tight if that is your cash game style.
There is also a significant difference in tournament versus cash Bankroll Management (BRM). I could provide links to get you started on each but that would be nothing more than a quick Google search could find you.
If you are really stuck and at least somewhat serious about poker start by reading some books! There is a great list: Here that I frequently point people toward and am working through myself.
I have tried to provide a broad and general answer to suit the question. pretty much every statement I have made has edge cases and exceptions so keep this in mind

EDIT:
For survival you need to play more exploitative in MTTs. In your average cash game, Playing more towards GTO (Game Theory Optimal) is usually profitable. your goal in a cash game is to profit, your goal in a tournament is to collect chips at a certain minimum rate to avoid being short stacked and remain in contention for cashing or even winning the tournament!

Strategy tournament vs. table