advanced hotspot settings in android 5.1

Question: After upgrading to Android 5.1.1 I have some issues with the hotspot. It works, most of the time, however at what seem to be random times it just switches off. I once half saw a message as this happened, but I only saw "Switching of hotspot because...". So I think it's a feature, not a bug. It might be related to my phone losing internet connection, as I use the hotspot on the train with poor connection quality.
In previous Android versions, I knew how to find advanced Hotspot settings. In this version, I only find very basic settings, like network name and password.
I have CyanogenOS 12.1 / Android 5.1.1 on a 1+1.
Sorry if this question has been asked before, I did not find anything recent anywhere.
Update: I saw the message on switching off now. My cell phone loses network connection, and the hotspot remains on. When it is back within cover the message reads "Switching off hotspot because SIM service change". So I'm guessing it's some kind of protection against getting overcharged for data use.
(Andyes, the laptop remains connected to the hotspot until it gets turned off)
Answer: Aparently this is a known bug in the latest Cyanogen (12.1) which should be fixed in the next release.
http://forum.cyanogenmod.org/topic/116964-hotspot-disabled-due-to-sim-subscription-change/


How is base damage calculated?

Question: Despite searching the whole book I did only find modifications for the base damage but not how it is calculated originally.
Thus my question how is it calculated originally?
Answer: It defaults to 0 unless you have Gifts, Entitlements and so on that affect it.
Comment: Thanks for contributing an answer! Could it be enhanced by adding a reference to where in the book this is established, or what reasoning otherwise leads to this conclusion? (You can [edit] to add such improvements to a post.)
Comment: @SevenSidedDie In the meantime I found one review myself stating the same with the cvomment that it is indicated a few times.....but never mentioned explicitely. So not sure if a reference by Eloy will be possible there. although.....he looks like th emaker of the game (picture and also nickwise)?

How is base damage calculated?


Experience with Geoserver's GML Extension

Question: I'd like to know if Geoserver's GML extension works (well) with GeoServer 2.1-RC2 and whether it will enable uploading of GML files via REST API.
Answer: Unfortunately the GML extension has more or less been abandoned due to lack of a maintainer for that extension. That said you can still upload GML as part of a WFS transaction. So a recipe that could work is to create a new empty layer (in postgis or something) via the REST api, and then issue WFS transactions to populate it.
Comment: Thanks jdeolive. I'm trying to avoid creation of a PostGIS layer just for the sake of displaying the GML contents (that may change with each request).


/bin/sh: 1: arm-linux-gnueabi-gcc: not found

Question: I'm working on eclipse indigo on Ubuntu 12.04. And I'm trying to cross compile so I downloaded gcc-4.4-arm-linux-gnueabiarm-linux-gnueabi-4.4 and I changed the C/C++ Build setting and I added includes and library to my path. But it tells me that it doesn't find the arm-linux-gnueabi-gcc. can somebody help me out? I would greatly appreciate it.
Answer: You'll need the gcc-arm-linux-gnueabi package, rather than just gcc-4.4-arm-linux-gnueabi; the former supplies the arm-linux-gnueabi-gcc symlink.


How to create a Drupal database on the server if you only have access via an FTP client

Question: I am a bit confused about how to set up server database,because my host provider(is a university site),only provided me with a ftp client username and password. I don't have access to phpmyadmin.:/
Answer: You need to ask your server admin to create a database and a user for that database to be able to install drupal. You don't need phpmyadmin but you do need a database/user.
Answer: You will have to get a username and password generated by administrator as well and maybe the computer name where the database is installed it is usually on a localhost but that depends on the way the network is setup


Crash utility exit with error in Rhel6.6

Question: Crash utility fails with below error.
crash /usr/lib/debug/lib/modules/2.6.32-504.el6.x86_64.debug/vmlinux vmcore
crash 6.1.0-5.el6
Copyright (C) 2002-2012  Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
Copyright (C) 1999-2006  Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011  NEC Corporation
Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions.  Enter "help copying" to see the conditions.
This program has absolutely no warranty.  Enter "help warranty" for details.
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...
crash: page excluded: kernel virtual address: ffffffff81587180  type: "cpu_possible_mask"
I installed "kernel-debug-debuginfo-2.6.32-504.el6.x86_64.rpm" and its dependend packages. kernel verion of vm is 2.6.32-504.
Answer: I had the same problem on 7.1.5-2.el7:

crash: page excluded: kernel virtual address: ffffffff818129b0  type: >"cpu_possible_mask"

and upgrading crash version to crash 7.2.3-8.el7 helped.


Macbook won't turn on

Question: I have a 2008 aluminium unibody Macbook and after being off for about a month won't turn on. It is full charged (it has a battery indicator on the side). I've tried an SMC reset and the like but am really very stumped. Does anyone have any ideas?
Comment: what does it do, anything ? nothing! anything on the screen ? where was it stored? what does it do with power cable plugged in ?,
Comment: The screen does nothing, pushing the power button does nothing. When I plug a charger in the light on the charger turns red as it charges and the battery indicator in the side shows it charging, other than that...nothing. It was just sitting on my desk.
Answer: Since you did not specify what  have you tried this is going to be a guess game:
1***Take the battery out and put it back in.
That usually solves the problem of "oxidized" connectors.
You can try to clean the connectors but normally just in and out does it.
2*** try the power button, by pressing in rapid sequence or holding it for 10 seconds.
Since you just disclosed that when plugged in the battery shows to be charging, and before you said it is fully charged, so give it time and see if the charging light goes off.
Comment: Thanks, sadly I've tried that the battery connections are fine.

Macbook won't turn on


How does neutral in single phase AC work?

Question: How does neutral in a normal one-phase outlet work? I looked on the internet and I know it carries the current back to the source, but does it do that in the inverse of the phase or does it provide no voltage at all?
Answer:

simulate this circuit – Schematic created using CircuitLab
Figure 1. Left: AC supply without earth connection. Right: AC supply with earth connection.
The circuit on the left is floating with respect to ground. Current that goes out on one line returns on the other. If you were to clamp an AC ammeter around the two wires it would read 0 A because the feed and return would cancel each other out.
The circuit on the right is identical except that the lower wire has been "neutralised" by connecting it to earth. That means that the voltage on that line should stay very low - rising to a couple of volts if there is high current running through it.
Again the sum of currents will be zero.
Answer:
How does neutral in an normal one-phase outlet work? I know it carries the current back to the source. But does it do that in the inverse of the phase

For low frequencies and circuit lengths that are well-below wavelength distances, the current that flows in the neutral line is in-phase with the current that flows in the live line (in that the two currents rise and fall together).
However, because the live and neutral wires are usually quite close physically, you can regard the live current and neutral current as in opposition to each other because they travel in opposing directions.

does it provide no voltage at all?

All conductors drop voltage when there is load current so, there may appear to be a small voltage on the neutral wire relative to true ground/earth.


Extending Optimum WiFi range

Question: How would one go about extending an optimum wifi connection? I would assume a bridge would be better than a repeater so the network wouldn't suffer from reduced bandwidth, however I have learned I would need to know the MAC address of their router which I do not have access to... what would you suggest?
Comment: Unfortunately, questions from an end-user of a corporate network are specifically off-topic. You will need to ask this of the network administrators.
Comment: Welcome to NE, we hope you will both contribute to and learn from this community. Questions by end users of a network not within their control or of a service provider network are considered off topic by this community. Please see [What topics can I ask about here?](http://networkengineering.stackexchange.com/help/on-topic) for more details.
Answer: You run a cable to the network and add an access point; you did say optimum, and optimum is carried on wires (and fibers) until it reaches an AP which is physically near the end user devices.

Extending Optimum WiFi range


SharePoint Online - User Exist in UserProfile but not in _api/web/siteusers

Question: By a Rest query I consult .../_api/web/siteusers to obtain the ID of all users and then I consult UserProfile to obtain more information about each user. But sometimes there are users does not exist in SiteUsers but if they exist in UserProfile. How do I do those users appear in SiteUsers? Why does this problem happen?
Answer: Users are added to User Profiles when then are imported from Active Directory, so you will generally find all users there.
Users are added to a Site Collection's site users collection when:

They have been granted explicit permissions to the a site in the Site Collection.
They are a Site Collection Administrator or a Site Owner.
They are members of an AD group, AND, have also visited the site at least once.
They are members of a SharePoint Group in that Site Collection.

Be aware that there are three collections of users for each web site (SPWeb).

There are three user collections available from SPWeb:
.Users, .AllUsers and .SiteUsers.

web.Users:
SPWeb.Users gets the collection of user objects that are explicitly assigned permissions in the Web site. It will not return users who have access through a group.
web.AllUsers:
SPWeb.AllUsers gets the collection of user objects that represents all users who are either members of the site collection or who have browsed to the site as authenticated members of a domain group in the site.
web.SiteUsers:
SPWeb.SiteUsers gets the collection of all users that belong to the site collection.

In the example below showing users in the SPWeb collections:

Jane has was assigned directly to a permission level, so she is in Users, AllUsers and SiteUsers
Luis is a Site Collection Administrator from the parent of this site and he has never visited this site, so he is in SiteUsers. If he visits the site he will then be in AllUsers
Sam is the Owner of this site, so he is in AllUsers and SiteUsers
Richard is member of the Members group, so he is in AllUsers, SiteUsers
Jesse is in the domain group "MAXSP2007\IT", but has never visited the site and does not show up in any user collection.
.Users:     MAXSP2007\janec
.AllUsers:  MAXSP2007\janec
.AllUsers:  MAXSP2007\richardm
.AllUsers:  MAXSP2007\samc
.AllUsers:  SHAREPOINT\system
.SiteUsers: MAXSP2007\janec
.SiteUsers: MAXSP2007\luisb
.SiteUsers: MAXSP2007\richardm
.SiteUsers: MAXSP2007\samc
.SiteUsers: NT AUTHORITY\local service
.SiteUsers: SHAREPOINT\system
Group: Sub Site Visitor:   MAXSP2007\IT
Group: Sub Site Members:   MAXSP2007\richardm
Group: Sub Site Owners:    MAXSP2007\samc
Comment: Tank you. You saved my life.
Answer: in SharePoint REST API /_api/web/siteusers endpoint only provides the list of users has permission on current web. Since, you are fetching the users using Site Permissions, there are high chances that all users doesn't have permission.
Also in SharePoint REST API endpoint for user profile, there is no direct way to fetch all the users. But you can use Search REST API endpoint to query against UserProfile and get the list of users.
Comment: Tank you.  You saved my life


Running a Probit on Survival-Time Data?

Question: Can I run a probit on survival time data? It's discrete-round, and I want to look at whether lagged variables affect the failure event. I am, however, getting negative coefficients for a probit regression, and I'm not sure that should be happening. Help?
Comment: Can you write the model?
Answer: Surely, you could run a logit, probit, or a cloglog model; in fact any appropriate binary model works well. The logit model (and to some extent the cloglog) model tend to be used more often, but this is only because of the familiarity of the users with these models.
See the following link for more details:
https://files.nyu.edu/mrg217/public/btscs.pdf
Comment: So what's the benefit (difference) of a survival model vs simply running a probit / logit on whether the event happens in this period?
Comment: It is not because of somebody's familiarity with these models. It is because these models have nice substantive interpretations. The logit model is the proportional odds model (you are effectively modeling the odds of the failure vs. survival in the next discrete time period), and the cloglog model is the proportional hazards model (a discrete version of the semi-parametric Cox model which requires fewer assumptions about the data than the parametric models like Weibull: you can assume that all subjects in the study only differ from each other in their hazard rates by multiplicative factors).
Comment: And here's an additional link: https://www.iser.essex.ac.uk/resources/survival-analysis-with-stata, see especially Jenkins' lesson 6.

Running a Probit on Survival-Time Data?


Computer will not stay connected to wifi

Question: Our wifi password at work recently changed.
I edited the old connection to have to new password by
$ nmcli connection edit "Internet"
$ set wifi-sec.psk <password>
$ save persistent
$ activate

Everything was fine for about five minutes. but after that the connection went down. I can re start it  but it continues to go down every 1-5 minutes or so (I had to restart wifi four times while typing this question). I sometimes get an error message when trying to restart the connection but even when the error occurs the connection will successfully restart.
$ nmcli connection up "Internet"
Passwords or encryption keys are required to access the wireless network 'Internet'.
Warning: password for '802-11-wireless-security.psk' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
Error: Connection activation failed.

I've tried resetting the password for the connection again, and removing and recreating the connection all with the same results.
Is this an nmcli issue or a driver issue or something else?
Computer is a Dell Latitude E6230,
Ubuntu version is 16.04.3,
lshw gives:
description: Wireless interface
       product: Centrino Advanced-N 6205 [Taylor Peak]
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 34
       serial: 84:3a:4b:9c:b5:f0
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-112-generic firmware=18.104.22.168 ip=192.168.xx.xx latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
       resources: irq:31 memory:f7d00000-f7d01fff

iwconfig gives:
wlp2s0    IEEE

 802.11abgn  ESSID:"Our Internet"
          Mode:Managed  Frequency:5.785 GHz  Access Point: 70:8B:CD:CD:6A:04
          Bit Rate=216 Mb/s   Tx-Power=15 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=47/70  Signal level=-63 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:13  Invalid misc:101   Missed beacon:0

iwlist scan gives:
wlp2s0    Scan completed :
          Cell 01 - Address: 70:8B:CD:CD:6A:04
                    Channel:157
                    Frequency:5.785 GHz
                    Quality=45/70  Signal level=-65 dBm
                    Encryption key:on
                    ESSID:"Our Internet"
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=00000027b06e54a4
                    Extra: Last beacon: 48164ms ago
                    IE: Unknown: 000C4F757220496E7465726E6574
                    IE: Unknown: 01088C129824B048606C
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 2D1AEF0917FFFFFF0000000000000000000000000000000000000000
                    IE: Unknown: 3D169D0D1500000000000000000000000000000000000000
                    IE: Unknown: 7F080000000000000040
                    IE: Unknown: BF0CB259820FEAFF0000EAFF0000
                    IE: Unknown: C005019B000000
                    IE: Unknown: C30402020202
                    IE: Unknown: DD09001018020E001C0000
                    IE: Unknown: DD180050F2020101840003A4000027A4000042435E0062322F00

Comment: Please post the output of iwconfig to see the link quality, signal strength, errors.  Any noisy neighbors on your channel? Check with sudo iwilist scan.
Comment: I'm not quite sure how to interpret the output of iwlist scan but the wifi generally worked up until the password change so I would assume it's not an external factor. I feel like it may be something to do with the password not getting saved correctly? But I'm not sure how to check this
Comment: A connection shows the password is OK.  Use sudo on the iwlist scan to get all the other accesspoints within range, and check the frequency and  quality.  Any other access points on your channel is not good.  If they are stronger than yours, thats really bad.  Any local changes like repositioniing your pc or hub to improve signal strength might help.
Comment: Oh wow, so it looks like we have four access points all with the same ESSID, one on its own channel, one on a channel shared with two other access points of about the same strength, and two on a channel thats shared with about a dozen other access points of varying strengths. I can't physically move since I'm in a office but is there a way I can tell nmcli to only connect to the access point on its own channel and ignore the others?
Comment: Try setting the BSSID to the access point address you want (the address shown just after "Cell"  on the scan list, first line.  Try blocking other accesspoints with metal objects, like aluminum foil on a notebook placed near your PC.  Can you change your ESSID to something non-conflicting?
Answer: I had a similar problem. It solved when I restarted the NetworkManager.
In my system:
systemctl restart NetworkManager

Maybe it's some kind of password caching. I hope it helps


Single Purpose Educational Android Tablet

Question: This question is not very technical but I had to ask it somewhere, and this was a promising place to get answers. Please help.
I have to provide Educational-Tablets to High-School Students. We want to make sure that those tablets are not misused and only 2 application (developed by us) run on the tablet. I went through many MDM (Mobile Device Management) solutions but none seemed promising. Is there any way (Any Android Native Functionality) to ensure the "Single Purpose Use" of the Tablet?
Comment: You would need some sort of app locker that runs as a device administrator ... You would only need to run as an administrator to stop it from being uninstalled without a password ! ..   Their are a few open source app lockers that you could use, but their not very secure when it comes to uninstalling them !..... An easier alternative would be to build a simple launcher that only has your two apps in it ! .. And use another application to lock settings, Locking settings is the only way to stop uninstalling apps
Comment: Modern Android versions support "Guest Mode". Use it.
Answer: There are a few good business and educational solutions out there which are either free or at very low cost to achieve this. My company makes one, and you can find out more on our website -> look for Android Kiosk Mode. If you have any questions, please do not hesitate to contact me.
Answer: There is no native functionality to lock down tablets, There's Screen pinning on Android devices (5.0 and above) which lets you lock down the device to an app screen, but this feature has its limitations, users can unpin it and access other apps and content on the device just as easy. That's why we made it a point to offer a powerful Kiosk mode on our MDM solution. We have whole school districts with tablets deployed in Kiosk mode with Hexnode MDM. You can lock down the devices to single app or a set of applications of your choice. You can choose to have an app auto-launch in fixed time intervals, selectively enable various settings toggles, seamlessly update Kiosk apps and more. I'm pretty sure you'll fall in love.


How to easily add cloth seam channel to a model

Question:
Hi i made this tabi sock model but now I would like to know an easy way to add that seam like I did to the right, the right one is sculpted but retopology doesn't seem to work with such small seam channels at least with retopoflow. I tried knife project with a nurb curve but it just looks weird. I tried boolean which isn't like expected. Any help is much appreciated!
Answer: The easy way is to simply draw it on a bump map.  Are you doing a 1mm flyby of your foot?  Are you carefully lighting the scene for your tabi seam to catch dramatic shadows?  Unless you are, geometry is pointless, save your verts for somewhere they matter.
But I dunno, maybe you're doing a foot flyby.  The way to do it with geometry is to first fix the topo on your mesh-- you need an edge flow that follows the seams, something that is not yet present on your image.  What you want is topo where there is some edge loop that you can cleanly select that represents the seam.
Once you have that topo, it's pretty trivial.  Select your seam loop and start with a bevel-- mouse wheel up to get an extra edge loop in the center:

Ctrl numpad - to shrink your selection to only the central loop of the bevel, ctrl , to set pivot point to median, alt-s to scale along normals, scale to taste and confirm, and you have a seam.
Comment: Ok thanks, I will retopo again. This time following the seams!


Syntax error on Dreamweaver when using boilerplate

Question: I am a relatively new web site designer and I've used boilerplate about 4-5 times. It's great and I love all the problems it solves. Thanks for that!
However, every time I use it to create a page and then create a template from that page, Dreamweaver shows the following error:
"There is a syntax error on line (line number). Code hinting may not work until you fix this error."
No matter what site I've built, the error always directs me to the line with this code on it:

It only shows the code when I create the template. Then it flags it in every page I create from that template.
First, I'm not that great with jQuery. Can someone please tell me what this code is saying?
Second, is there some way to keep the error from occurring?
Thanks in advance,
Katherine
Answer: It's probably the nested

Answer: Dreamwever is too stupid to recognize nested SCRIPT tags. You may need to break them up so it doesn't see them.


Connecting two MacBooks over USB-C for transferring video signal from one to the other

Question: I have two MacBooks (a Pro and an Air).  Both are modern and have USB-C.
I would like to run the video output from one MacBook into the other, using USB-C, and then use the second Mac to stream the video using OBS.  Is this possible without putting some converter in the middle?  It feels like it should be...
Answer: No, target display mode doesn't work over USB-C.
You'll want to screen share over point to point network for this.

https://www.airsquirrels.com/airparrot/

The latency for screen sharing is very good now. You might have better luck with an iPad for this and sidecar or dedicated hardware to get it into OBS.

https://shop.astropad.com/collections/luna-display-mac-and-pc
Comment: Thanks! Can I set the point to point network over the USB-C link? Any chance you could add it to your answer if so!
Comment: I don't think USB offers a network interface. Thunderbolt does as does ethernet and WiFi - I would need to test this to make sure drivers and bandwidth works. Be careful. USB-C is mostly a connector. The protocol could be USB 3 or Thunderbolt 3 or USB 4 for that physical connector type. @tomh
Answer: Have you tried just connecting the two computers together by a USB-C or Thunderbolt cable to see if they network?  I know Thunderbolt supports this, a USB-C port lacking Thunderbolt might not.  Even so just as long as there is a network between the computers there is software to share the screen from one to the other.  The faster the network the better.  Built-in to the macOS is AirPlay and VNC for sharing the screen so there should be no need to buy any hardware or software.  The network can be WiFi, Bluetooth, Ethernet, or whatever.
There are USB "transfer cables' that are petty much just two Ethernet adapters in a single cable.  These are often faster (5 Gnps) and cheaper (under $40) than two Ethernet adapters so consider looking for that if other options are too slow or simply not available.  I mention the term "transfer cable" since that is a common name for them. Another common name is the genericized trademark "LapLink cable", and there is a company called LapLink that has been making cables like these for decades.
There's general purpose video capture devices you can try, if all else fails.  These are USB 3.x devices that take an HDMI input.  These will cost something like $200.  Just using WiFi and screen sharing that's built-in is free, but there can be issues of quality that drive people to spend over $200 on getting the best video.
You are correct that this is possible without some converter in the middle.  Getting the best results might require some hardware though.


Datebase-comparing tool that supports schema and data

Question: I'm looking for a tool which is able to compare schema as well as data of a database. Ideally for some Sybase SQLAnywhere. All what I've found was only for schema.
Answer: Take a look at SchemaCrawler, which is ideally suited to this purpose. SchemaCrawler can generate human-readable database schema and data "snapshots", which are designed to be compared using plain-text file comparison (that is, standard diff) tools. SchemaCrawler is database and operating system independent, free, open-source, and can be invoked from the command-line, as well as through a Java API.
Sualeh Fatehi, SchemaCrawler


[embed]Using Wordpress 5.5.1 there is no embed option after the video is uploaded

Question: I have looked at many posts explaining how to embed a video mp4 from my computer to Wordpress and they invariably show a box with the option to embed the video. In my Wordpress version 5.5.1 this never shows. All I am left with is a link which when clicked downloads the video in extreme bottom left of screen withe the necessity to click "Open"  or "Open when finished". Why am I not seeing the option to embed?
Answer: Can use html5 for video playing embed or Manually enter embed code.
How to Embed a Video to your WordPress Post
Or use directly
<code> <video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</code>


Passing user-defined types to a child swf in AS2

Question: I have an AS2 swf file which loads a child swf and would like to pass some structured data to the child. I can pass primitive types by just setting properties on the child MC, but complex types lose their values - i.e.:
in parent:
var testObject = new Object();
testObject.valueName = "value";

child_mc.stringProperty = "test";
child_mc.objectProperty = testObject;

in child:
trace(_root.stringProperty); // traces "test". Hooray!
trace(_root.objectProperty.valueName); // traces "undefined". Boo!

Interestingly if I trace out all the property names of _root.objectProperty using for .. in then the child swf does report that the object has a value called valueName, but the data associated with it is lost in the transition. I've tried using a class rather than an simple object type, and using the indexer syntax for reading/writing the properties, but to no avail.
Answer: Try using a local SharedObject or a LocalConnection object


Minimum number of support vectors?

Question: I'm learning SVM and its written everywhere that the minimal number of support vectors is 2? But I couldn't find any formal proofs of that. Why cant there be less than 2 support vectors? Can somebody give an intuitive way of understanding that and a formal explanation?
Answer: You have a training dataset of points $x_1,\dots,x_n$, say in $V:=\mathbb R^d$, each classified as green or blue (say). The dataset is linearly separable if there is a hyperplane $H$ in $V$ such that all the green data points are in one open half-space (say $H^+$) bounded by $H$ and all the blue data points are in the other open half-space (say $H^-$) bounded by $H$. Suppose that such a separating hyperplane $H$ indeed exists. (Otherwise, a standard remedy is to map (possibly nonlinearly) the dataset into another space, possibly of a higher dimension.) The separating hyperplane $H$ is called the maximum-margin hyperplane if the minimal distance $d(H):=\min_i d(x_i,H)$ from the dataset points $x_i$ to $H$ is maximal over all choices of separating hyperplanes; we are assuming here that the green and blue subsets of the dataset are each nonempty. See the picture in Section "Linear SVM". The points $x_i$ of the dataset  that are the closest ones to the maximum-margin hyperplane $H$ are called the support vectors. Clearly, there is at least one such vector in each of the open half-spaces, $H^\pm$. (In the picture, the boundaries of the corresponding dots are highlighted as black.) So, there are at least two support vectors: at least one of them on either side of the maximum-margin hyperplane.

Minimum number of support vectors?


Share guest internet connection with other guests in VMware

Question: I have a guest computer with internet access through the NAT option in VMware. I also have a connection to VMnet2. What I need to do now is share that internet connection to the guests in VMnet2 (since they are stuck there, can't put them in another net but I need an internet connection on them). How do I do this? The guest connected to the internet can be Linux or Windows, I don't care I just need it to work.
Comment: Do you want to have a shared  internet connection between the two guests? Or have them networked so that they can communicate?
Comment: Yes, I want to share the internet connection in guest1 to guest2. I already have the network connected. Guest1 has one connection to the internet through the host and one connection to vmnet 2 where the other guests are located.
Answer: Reading
http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1006480 and http://www.vmware.com/support/ws55/doc/ws_net_configurations_common.html explains that the three types of networks are actually virtual ethernet "switches" which can be configured in one of three ways - host only, bridge, or NAT.
Virtual machines assigned to the same switch can see each other, and are effectively on the same (virtual) Ethernet segment. The type of "switch" determines the behavior when connecting to the outside world.

In the NAT mode, there is a virtual NAT router between the virtual switch and the host machine's internet connection, which prevents the virtual machines from being seen by others on the host network, but doesn't affect the ability to reach the other hosts via the VM.
In the host-only mode, the virtual switch is on a different Ethernet segment entirely, with connectivity to other virtual machines assigned to the same switch, and to the host itself.
In the bridged mode, it's as if the virtual switch was physically plugged into the same ethernet segment as the host's ethernet connection. The machines have IPs on the same network, and are fully accessible to virtual and physical hosts sharing that segment.

Depending on your security requirements, you can either assign the other machines to the same NAT "switch", or set up secondary virtual interfaces on all the machines in host-only mode, and configure one of the virtual machines to be on both the NAT switch and the host-only switch and act as a gateway, in the same way you'd do with a physical network, ie, iptables on Linux, or ICS or third party software on Windows.
Comment: I believe you are wrong in suggesting on assigning the machines to the same NAT "switch". In VirtualBox, each machine with NAT connection type is isolated to the host and other guest machines and the Internet in that the "outside world" can't see it, unless port-forwarding is configured.
Comment: Thanks for your answer. I feel I need to elaborate a little. The guests in vmnet2 are actually real computers so I cannot right click and add another virtual NIC on them. What I need to do is use guest1 (wich is virtual, and again has one NIC to the internet and one to VMnet2) as a gateway for the machines on VMnet2, I've tried this with a linux machine and did not get it to work, im going to try with a Windows machine now and see if I can use the option "share this internet connection blabla".
Comment: @WikiWitz According to VMWare's documentation, the default behavior puts the guests on different switches, but it's possible to assign them manually to the same one. Now, I wouldn't put it past them to have errors in their documentation, but that's what the documentation claims :)
Comment: I think I know what I missed now. In the gateway I need to do a NAT between VMnet2 and the NAT-VMnet since they are on different networks.
Comment: @Ebin Jast Great - if that works for you please add it as an answer and accept it. :)


Find all polynomials that fix $\mathbb Q$ and the irrationals

Question: Problem: Describe all polynomials $\mathbb{R}\rightarrow\mathbb{R}$ with coefficients in $\mathbb C$ which send rational numbers to rational numbers and irrational numbers to irrational numbers.
Answer: Take a polynomial $f=a_nx^n+a_{n-1}x^{n-1}+...+a_1x+a_0$, and assume $f$ satisfies the problem conditions.
Since $f(1),f(2),f(3),...,f(n)$ are all rationals, we can use them to get $n$ independent equations in the variables $a_i$. Then, we can solve for all the $a_i$ with linear algebra. Linear algebra tells us that this equation-solving uses only +,-,*, and /, so all coefficients $a_i$ of the polynomial must be rational.
Now, multiply $f$ by all the denominators of all the $a_i$ to get a new polynomial $g=b_nx^n+b_{n-1}x^{n-1}+...+b_1x+b_0$ with integer coefficients. Clearly $g$ satisfies the problem conditions as well.
Consider all values $x$ for which $g(x)$ is an integer. By the Rational Root Theorem, any such $x$ can be expressed as $\frac{k}{b_n}$ for some integer $k$. From this we deduce that any two values $x$ for which $g(x)$ is an integer are spaced at least $\frac{1}{b_n}$ apart.
But if the polynomial $g(x)$ has degree at least $2$, it attains arbitrarily large slope as $x$ goes to $\infty$. In particular, we can pick $x$ so large that $g(x+\frac{1}{b_n})>g(x)+100$. But then $g$ attains many integer values between $x$ and $x+\frac{1}{b_n}$, violating the deduction in the previous paragraph. Therefore, $g$ has degree at most $1$.
After proving this, we are done: the only polynomials $f$ that work are the ones in the form $a_1x+a_0$, where both $a_1$ and $a_0$ are rational.
Comment: @Potato how do you determine the roots must all be rational? I agree there are no irrational *real* roots, but why should there be no complex roots?
Comment: Ooh, that's slick.
Answer: Answer: $f(x) = ax+b$, where $a, b\in \mathbb{Q}$ and $a\neq 0$.
It's obvious that functions $f(x) = ax+b$ satisfy the condition. It's also easy to see that no other linear functions satisfy the condition. So we will only prove that no polynomials of degree greater than one satisfy the condition.
Definition. Let $\cal F$ be the family of polynomials that send $\mathbb Q$ to $\mathbb Q$.
Claim 1. $\cal F$ is a linear space over $\mathbb Q$.
Proof: We need to prove that $f+g\in \cal F$ if $f,g\in \cal F$ and $\alpha f\in \cal F$ when $\alpha\in {\mathbb Q}$ and $f\in \cal F$. Both statements are obvious. QED
Lemma 2. Suppose that $p(x) \in \cal F$ then the leading coefficient of $p(x)$ is a rational number.
Sketch of a proof: Let $k = \deg p$. Let $p(x) = c x^k + \dots $ . It is known that there exist rational numbers $\alpha_i$ ($1\leq i \leq k+1$) s.t. $\sum_{i=1}^{k+1} \alpha_i i^t = 0$ for $t\in \{0,\dots, k-1\}$ but $\sum_{i=1}^{k+1} \alpha_i i^{k} \neq 0$ (in particular, that follows from the Vandermonde determinant formula).
We have  $\sum_{i=1}^{k+1} \alpha_i p(i) =  \sum_{i=1}^{k+1} \alpha_i c i^k = c(\sum_{i=1}^{k+1} \alpha_i i^k)$. Note that $\sum_{i=1}^{k+1} \alpha_i p(i)\in \mathbb Q$ since $p(x)\in \cal F$, and $\sum_{i=1}^{k+1} \alpha_i i^k\in \mathbb Q$. Therefore, $c\in \mathbb Q$. QED
Corollary 3. Suppose that $p(x) \in \cal F$ then all coefficients of $p$ are rational.
Proof: We prove this by induction. The leading coefficient $c$ of $p(x)$ is rational by Lemma 2. Now $p(x) - c x^k\in \cal F$ by Claim 1. The polynomial $p(x) - c x^k\in \cal F$ has degree at most $k-1$. By the induction hypothesis all its coefficients are rational. Thus all coefficients of $p(x)$ are also rational. QED
Now suppose that $p(x)$ satisfies the condition of the question but $\deg p(x) > 1$.
We proved that $p(x) = \sum_{i=0}^k a_i x^i$ where all $a_i\in \mathbb Q$. Without loss of generality we may assume that all coefficients $a_i$ are integer and coprime, $a_k > 0$, and that $a_0 = 0$.
Let $r$ be a sufficiently large prime number (we will let $r$ "go to infinity"). Note that $p(x) - r$ has a real root since $p(0) < 0$ but $p(x) \to +\infty$ as $x\to +\infty$. The root $\rho$ of $p(x) - r$ must be a rational number as otherwise $p(x)$ would send an irrational number $\rho$ to $0$ and thus violate the condition. Denote the root by $u/v$ where $u$ and $v$ are coprime integers. Note that if $r$ is sufficiently large, it is coprime with $a_k$. Thus $u$ divides $r$ and $v$ divides $a_k$. If $r > \max_{t\in[-1,1]} p(t)$ then $|u/v| > 1$ thus $u > 1$. So $u=r$ or $u=-r$. We get $|u/v| \geq r/a_k$. We get,
$$a_k |u/v| \geq r = p(u/v) = (1+o(1)) \cdot a_k (u/v)^k,$$
which is impossible for $r\to \infty$ if $k > 1$. We conclude that $k=1$.
Answer: Any polynomial of the form $\prod (x-r_i)$, where the $r_i$ are rational, will do it. If a polynomial has an irrational root (i.e., the real or imaginary part is irrational), then it maps that irrational number to zero, which is rational.
Therefore, the polynomial must be of the form stated above.
This seems too easy and simple. So, what is wrong?
Comment: For instance, $x^2$ will map $\sqrt{2}$ to $2$, and therefore be a counterexample.
Comment: Duh! I deserve that slap upside my head.


What is best Solution architecture

Question: I have 3 Physical servers. and i want to utilise for SharePoint 2016 , i want to utilise in best possible way

Server 1 - 8 lCPU, 8GB RAM
Server 2 - 4 lCPU, 16GB RAM
Server 3 - 8 lCPU, 32GB RAM
Comment: How much data/traffic/users/applications have you got? Do you need to serve little data very fast? Or should you focus on HA and redundancy?
Comment: i am want to host one public facing SharePoint site , i want to configure in Best Possibly way using HA
Answer: 3 servers that asymmetrical: no the best case to start with.
Anyway, I would definitely use Server 3 (32GB RAM) to host the SQL database: SQL Server will most benefit a high memory by loading/caching data.
(note: there's no HA for SQL Server here...)
If the expected number of users/requests is not too high (let's say less than 1000 users and/or less than 30 requests par minute), Server 2 (16 GB) may handle the load by itself. This way, you cant keep Server 1 for handover if Server 2 fails.
Server 1 would still be part of the initial farm, completely up and running, but would not necessarily be part of the load-balancing if you can't afford actual load-balancing. Failover would occur manually, e.g. by changing DNS configuration.
In all cases, this is far from ideal.

What is best Solution architecture


daisy chain more outlets; wiring

Question: I have an outlet in a bedroom and want to add a couple more outlets in the room adjacent... I'll be running 12/2 wire for the new outlets the problem is that the outlet in going to tap into has two white and two black do I simply make two complete pig tails one for the exiting outlet one white one black and then the second pig tail for the new outlet?
Answer: I'm not sure I understand your proposed installation, but this is what you do, assuming the outlet is not switched in any way. I understand the two pairs of wire are both physically connected to the outlet. This sounds like a North American installation, I am assuming such, but instructions should apply to other areas, just that what each color does may vary. One pair is in coming power, the other continues on to feed other outlets or lights.
Remove all the wires from the outlet. Always connect all blacks together and all whites together (and bare grounds together). Each wire nut connection will have the two original wires, the new wire feeding new outlets, and a short pigtail wire. The pigtail is connected to the original outlet. Black wire connects to the yellow or brass colored screw side. The white connects to the silver colored screw side, usually marked as "neutral" (in North America).
I recommend properly binding the wire to the screws instead of using the convenient push-in connectors if you have a choice. IMO, you get a much more reliable connection this way, but the connection must be properly made up.
Answer:
Don't use a larger or smaller gauge wire than the size used for the existing circuit. If the existing wire is #14 adding to it with #12 is not an advantage it's a disadvantage.
Always try to tap into a circuit where you're not going to overcrowd a box. 7 wires plus the receptacle is a code violation. And the reason will become apparent when you try to cram all of that into the box. If you found the last receptacle on the circuit it would only have 2 wires in it.
Comment: Seven conductors is in no way an immediate violation. In a newer home it is perfectly reasonable that the box may be big enough for three 2-wire cables. In an older home all bets are off on this.
Comment: I know. I was going to qualify that by saying something like, "is possibly a code violation," but I changed my mind because I was being called for dinner and, with an adjacent room that doesn't have enough receptacles, it does sound like an older home

daisy chain more outlets; wiring


Adding dynamic text to SVG

Question: I'm looking for an easy way to add a bit of dynamic text to a svg graphic. Basically, I need to change a few characters (<50) next to a logo, and have it display in the correct font. Anyone done this with EE?
Comment: Can you show us an excerpt of the SVG file around the text you want to change? And how do you plan to include the SVG on HTML?
Comment: ^^ This, we need examples!! :D
Answer: Just a wild, out there, not an answer but an idea,...
Could you not just load the SVG graphic as a background (something like http://www.html5rocks.com/en/tutorials/svg/mobile_fundamentals/), then overlay the SVG text on top?
Answer: Your options are:

Best choice is to have the SVG raw in the EE template, then you can inject the dynamic text exactly where you want it. Negatives are that it increases the initial DOM filesize. See below for example.
Edit the SVG in editing software and add the text in there - not viable as not dynamic, unless there's a limited amount of variations.
As Blatant suggested, overlay another DOM object over the top. Although could be tricky with positioning in various browsers and responsive. And if using an SVG object, then you'd need it dynamic, so loaded in via the template, not external
Save JS variables in the EE template, then on pageload you can access the SVG object (raw JavaScript only - not JQuery) to inject the relevant DOM items into the SVG. Negatives with this approach is the SEO value could be diluted as the text is injected after pageload.
Way more complex and not worth the effort, but write an add-on to edit the SVG external file and injecting the dynamic text before loading. Including all options here, however far out!

EE template:
<code>EE template before

<svg  version="1.1" id="whatever" class="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="612px" height="502.174px" viewBox="0 65.326 612 502.174" enable-background="new 0 65.326 612 502.174" xml:space="preserve">

  <your logo or shapes here>
  {ee_text_here}

</svg>

EE template after
</code>
See SVG example code here.

Adding dynamic text to SVG


Log user activity - which is better

Question: I am using Action Filter Attributes for loging user activity on certain action which has SQL database interaction. Similarly I can log the activity in the SQL tables using triggers on tables during each activity on the tables. I would like to know which of the above two methods is a best practice ( perfomance wise )
Answer: I think that the actionfilter is certainly the cleanest and best practice appraoch since it is in the application layer. Part of the benefit of being there is its managed code and if something breaks you can easily locate the problem. There is also the benefit that all your code is in one spot too.
Database triggers are a big no no in many companies since they have a habit of causing infinite loop well an unknowing programmer creates some logic that steps on the trigger over and over again causing the database to fail. Some companies do allow triggers but very well documented and very lightly used. Hope this helps.
Answer: Performance of logging depends greatly on the system architecture.  If you have 3 load balanced web servers hitting one main database, triggers would have to handle all the load while Action Filters would split the load in three.  In that scenario, Action Filters would be better.
In terms of best practices, I wouldn't use either of those approaches.  I would set up Transactional Replication to another SQL server.  This approach would run without impacting performance at all.  The transaction log is already being generated and replication would just spin up a separate process that's reading that log.

Log user activity - which is better


Converting Fortran to Matlab

Question: good night;
I am trying to convert some fortran code to matlab and I do not understand what
ist = grp%brp%faceIndicatorArray(-20)
ien = grp%brp%faceIndicatorArray(-19)

means in the following subroutine. I am not used to negative indices in matlab so this (-20) and (-19) corresponds to which element or what in the array?? Here is the all subroutine:
subroutine calculateLiftAndDrag(grp,ivd,lift,drag,momentum)
! as the name says
IMPLICIT NONE

type(GridSolverData) :: grp
type(InputVariablesData) :: ivd
real :: lift,drag,momentum
integer :: i,ist,ien,ip
real :: flowTangent(2),flowNormal(2),wallTangent(2),wallNormal(2),r(2)
real :: p,tau_t,tau_n,PI,alphaRad,sum

lift = 0.0
drag = 0.0
momentum = 0.0
PI = 4.0*atan(1.0)
alphaRad = ivd%alpha*PI/180.
flowTangent(1) = cos(alphaRad)
flowTangent(2) = sin(alphaRad)
flowNormal(1) = - flowTangent(2)
flowNormal(2) = flowTangent(1)

! inviscid faces
ist = grp%brp%faceIndicatorArray(-20)
ien = grp%brp%faceIndicatorArray(-19)
do i=ist,ien
  ip = grp%brp%faceIndicatorArray(i)
  wallTangent(1) = grp%brp%faceTangentArray(ip,1)
  wallTangent(2) = grp%brp%faceTangentArray(ip,2)
  wallNormal(1) = -wallTangent(2)
  wallNormal(2) = wallTangent(1)
  p = grp%p(ip)
  r = grp%coordinates(ip,:)-ivd%momentumPoint
  lift = lift - 2.0*grp%wallLength(ip)*p(wallNormal(1)*flowNormal(1)+wallNormal(2)*flowNormal(2))
  drag = drag - 2.0*grp%wallLength(ip)*p*(wallNormal(1)*flowTangent(1)+wallNormal(2)*flowTangent(2))
  momentum = momentum - 2.0*grp%wallLength(ip)*p*(r(1)*wallNormal(2)-r(2)*wallNormal(1))
end do

If anyone can help, I would be glad. Thank you in advance.
Comment: see http://www.mathworks.com/matlabcentral/fileexchange/5260-f2matlab for a converter
Comment: Is `faceIndicatorArray` actually an array, or a function? Can you please show its declaration in whatever type `brp` is.
Answer: Knowing the full definition of type(GridSolverData) will help. Fortran allows zero and negative array indices, but matlab does not.
When I convert this type of thing, I just end up adding (|the largest negative index used| + 1) to all indices of this array in matlab. For example, this fortran:
ist = grp%brp%faceIndicatorArray(-20);

ien = grp%brp%faceIndicatorArray(-19);

might become this in matlab:
ist = grp.brp.faceIndicatorArray(-20+20+1);

ien = grp.brp.faceIndicatorArray(-19+20+1);

And just do this throughout the subroutine. For example this would also change:
ip = grp%brp%faceIndicatorArray(i)

to
ip = grp.brp.faceIndicatorArray(i+20+1);

Answer: You face an interesting quandary.  The very fact that you are moving from Fortran 90/95 (unless the .faceIndicatorArray is part of a F2003 object and thus this is all more complicated) which is based on loops to matrix based system like MATLAB means that you are going to lose a lot of efficiency if you don't change the math involved.  Assuming this efficiency loss is acceptable, then consider an alternative to clean up the code and make it easier to convert to something more flexible in the future.
When I've seen negative negative array indices like this in Fortran 90/95 simulation code it is a holdover from FORTRAN 77 code that was directly translated.  Most of the time in the codes I've worked with the negative indices indicate ancillary data that isn't part of the data set, but due to the fact that FORTRAN 77 didn't have data structures, it kept the actual data and the ancillary data together.  You can tell almost immediately that this code was directly converted from FORTRAN from the variable names:
IMPLICIT NONE

Was done relatively recently along with the declaring of the variables:
integer :: i, ist, ien, ip

Which falls into the default of:
REAL(A-H, O-Z), INTEGER(I-N)

Armed with this knowledge, it should become pretty apparent that this was quickly converted to be used with the type structures.
Since I don't know what the entire set of structures that are represented in the GridSolverData type and the types it contains, I can only give you vague suggestions.  The brp element likely stands for "brep" which is a common file type for this type of solver.  I don't know what the rest of your negative array indices do, but it would be beneficial to split off the ancillary values into other arrays as it makes sense and use a classdef with a get/put method to switch what gets accessed when you use negative array indices.
This approach would, in the future, allow you to ween the code off of the use of these negative values in time after you more fully understand it, while allowing you to replicate the current capabilities.

Converting Fortran to Matlab


Setting kernelmodule-options permanently? (fix touchpad scrolling error)

Question: I was looking for a solution here and the answers were only to open the 'System Settings' and to change the settings there. This was no help for me but then I found this: Touchpad not working on Dell XPS L501x
I followed the instructions and reloading the kernelmodule with that specific option helped me out (I run Oneiric on a Sony VPCEB1S1E). Now the question: how to set his Option permanently?
Answer: You can create a new file in /etc/modprobe.d, e.g. /etc/modprobe.d/psmouse.conf and put this line into it:
options psmouse proto=imps

In case you don't know how to edit a file as root, you can use this command in a terminal:
gksudo gedit /etc/modprobe.d/psmouse.conf


Anonimity for users?

Question: There are many users who need to make a new account to ask questions here in order to separate their personal stuff.
I would like to suggest creators/devs of this site to get one option for anonymous post . It would really help many users
Comment: Please read http://meta.stackexchange.com/q/79390/154443
Comment: so should I delete my post? @RoryAlsop
Answer: This site is part of a network called Stack Exchange. As a single site, there is nothing a moderator can do to implement such a change. This would need to be a network-wide option, and as such should be proposed on Stack Exchange's Meta site.
For individuals who want anonymity, one can always create a new account under a different name. Simply log out of your account and create a new one, or just post as a guest.
Please note that for any user with more than one account, the two accounts must remain entirely separate, that is, one account cannot vote on the other, etc. That kind of action would result in a suspension (or worse) of both accounts.
Comment: hmmm... creating a new account takes a while(like 10 minutes or so) but I completely forgot that you can post questions as guest :P

Anonimity for users?


$E=hf$ true for all implies $E=pv$ true for all?

Question: In the answer to this question:
Can I apply $E=hf$ to a particle having mass?
It was stated that $E=hf$ is true for all particles. If so, doesn't this imply that $E=$momentum x velocity is true for all particles? Because
$$E=hf=hv/\lambda=(h/\lambda)v=pv~?$$
 I'm representing frequency with $f$ and velocity with $v$ here.
Comment: The $v$ in your expression is the [phase velocity](https://en.wikipedia.org/wiki/Phase_velocity) of the wave, however the velocity of the particle is associated with the wave's [group velocity](https://en.wikipedia.org/wiki/Group_velocity)
Answer: I will try to explain this a bit differently.
First, please allow me to briefly mention two concepts here. A group velocity and a phase velocity. For an ordinary sinusoidal wave, if I ask you the velocity of that wave you will have no confusion on giving that velocity a meaning. However, consider a wave which is not sinusoidal but a mixture of two sinusoidal waves. You can now visualize two different types of velocities --one at which a specific "crest/trough" travels and one at which the "overall shape" of the wave itself travels. The former is called phase velocity and the latter is called the group velocity. I have linked the Wikipedia entries for both concepts in case you have never encountered them before and want to drill into them further. This diagram, also from those articles, illustrates this difference rather well:

Now you can see that $v = f\lambda$ actually applies to the phase velocity. So, why am I writing about all this? How is the group velocity relevant here?
Consider now, what we mean when we say particles behave as waves. We actually believe that for these entities that we thought were particles, there is a wavefunction (a mathematical function that when plotted on a graphing paper looks like a wave) which gives interesting insights into the particle's physical properties. For example, the wavefunction $\psi(x,y,z)$ when expressed in position-space (i.e., as a function of $x$, $y$, and $z$) can be used to determine the probability of "finding" the particle within a region of space (say between $x$ and $x + \Delta x$). Technically, this probability distribution function comes out to $|\psi|^2$, where I have used the mod sign because $\psi$, as you may know, can be complex valued. This is basically the amplitude of the wave. The higher the wave's amplitude, the higher the probability of locating the particle in that neighbourhood. And the speed with which this amplitude travels through space is tied to our classical notion of the particle's velocity.
To summarize, the $v$ that goes in your formula $v = f\lambda$ and the $v$ that goes into momentum formula are two different concepts altogether and cannot be compared in that way.
There is also another conceptual problem with comparing energy and momentum that way. In QM formulation you will find that the Hamiltonian operator (which is the operator you apply to a wave function to determine the particle's energy) does not always commute with the momentum operator (the operator you will apply to that wave function to determine the particle's momentum). All this means that you cannot always determine the energy and momentum exactly for the particle in question simulatenously. So the relation that $E = pv$ is not universal in that sense. One case where you can measure $E$ and $p$ simulatenously is that of a free particle (i.e., a particle not subject to any force field). In that case $E = p^2/2m$ --non-relativistic case.
Answer: No, $E^2=(pc)^2+(mc^2)^2$.
At low speeds, $p \approx mv$, but at high speed the full relativistic formula for momentum must be used. For a particle with non-zero mass, that's
$p=mv\gamma$, where $\left(\frac 1{\gamma}\right)^2=1-\left(\frac v c \right)^2$;
for massless particles we can use $p=E/c$.
Comment: Ok? Did I use p=mv somewhere without realising it?
Comment: @AbrarFaiyaz No, you didn't. The main point of this answer was to show the relativistic formula relating energy, momentum and mass. I added that info about momentum for the benefit of other readers who may not be familiar with special relativity. I almost posted this answer as a comment, but the mods don't like it when we do that. ;)
Answer: It's rather $E = hf = hu/\lambda,$ where $u = c^2/v$ is the phase velocity. This gives
$$E = hc^2/(v\lambda) = (h/\lambda)c^2/v = pc^2/v.$$
Now, since $p = mv$ (with $m$ being the relativistic mass), we get
$$E = mc^2 = \gamma m_0 c^2,$$
where $m_0$ is the invariant mass (often called rest mass) and $\gamma = 1/\sqrt{1-v^2/c^2}.$
Answer: No this is not the case. For a massive particle $f \neq v/\lambda$ do the derivation does not hold in ge eral.


websites in which I can look for professors in specific field

Question: I am looking for useful websites like "findmyprof.org" in which I can search and find professors who work on specific field, categorized by country. The problem with "findmyprof.org" is that it does not separate European country.
Answer: The instruction of findmyprof.org states:

the structor is "keyword +country website code"
  example: Climate change +ac.uk --> search only websites located in england

I searched for

atmospheric science +.ch

and received results only for Switzerland.
Answer: Whenever you use findmyprof.org website, the search query result list down the websites that matches your request. Note that you can set a window size for the first 10 or 50 professors in that domain. From that list you can lookup the hyperlinks and by looking at the end of that links, you can assume if it in uk or us ...etc.


The name 'EntityState' does not exist in the current context

Question: In Entity Framework, this sometimes occurs when the System.data.entity assembly is not added into the Project. But, why I didn't have this error before in other MVC project.
it occurs sometimes but frequently and I have to add it manually in Add References. What can I do?
Comment: Did you check the version of your entity framework? Take a look in here too: http://stackoverflow.com/a/17843055/1384539
Answer: Try changing
e.g.
System.Data.EntityState.Modified;

to
System.Data.Entity.EntityState.Modified;

(Not sure what's going on. Did Microsoft change the package?)
Answer: I fixed this issue as below
Namespace
using System.Data;
using System.Data.Entity;

I was working earlier in ASP.Net MVC C# application working fine for me.
I fixed this issue as below
using System.Data;

I was working earlier in ASP.Net MVC C# application working fine for me
_context.Entry(_Teach).State = System.Data.EntityState.Modified;

Now, same method using in simple c#, WCF but it giving me issue then I did this in a way as below:
_context.Entry(_Teach).State = EntityState.Modified;

Answer: I fixed this problem by including the namespace it's from:
using System.Data.Entity;
Answer: When I had this problem, I fixed it by including the namespace it's from:
using System.Data;

More info:
http://msdn.microsoft.com/en-us/library/system.data.entitystate.aspx
Answer: This was resolved for me when I added
using Microsoft.EntityFrameworkCore;

Maybe that will work?
Answer: You should make changes as below in code.
 public ActionResult Edit(Album album)
    {
        if (ModelState.IsValid)
        {
            db.Entry(album).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
            return RedirectToAction("Index");
        }
        ViewBag.ArtistId = new SelectList(db.Artist, "ArtistId", "Name", album.ArtistId);
        ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId);
        return View(album);
    }

Answer:
Make sure you have added reference to System.Data.Entity

Right click on "References" under your project library > Add Reference...


Is is possible to change MAC address of a WiMAX USB adapter?

Question: Wondering if it is possible to change the MAC address of a WiMAX USB adapter (read WiMAX, not Wi-Fi) manufactured by Motorola, ZTE, Intel etc. I've tried a few tools that did changed the MAC address of the adapter to another valid MAC address (that I coped from another equipment made by same company) but then I was not able to connect to the network, the connection software took long time stating "obtaining IP address"; then few seconds after it got one said "lost IP address". Wondering if changing MAC address of such devices actually work.
Answer: It is possible to change the MAC address with the motorola WiMax dongles that use the Motorola Connection manager. There is a hidden menu, and it can be changed in there. I don't remember the exact command to change it, and I don't have the software installed currently, but to access the hidden menu, go to the Profiles menu then hit: Ctrl + Shift + Alt + ~
Also, Intel only makes internal cards. It is not possible(unless you have the development tools, that are only available for intel employees)  to change the mac.
Answer: It is quite surprising that you would want to change the MAC for your USB Adapter.
Is there a good reason for attempting that?
However, it is a very interesting requirement (for whatever reason) and I am intrigued to know if this can be done. I think it cannot be done -- unless the manufacturer introduced a low-level path to support that maybe... and, what need would that be based on?
There is one discussion on the subject at this Ubuntuforums thread,
USB Wi-Fi Adaptor for MAC Address Change
See if it helps you.
One suggestion is to check the manufacturer site for supporting instructions or software.
ps: one more reference on the same lines.

Update:
If they gave you a complementary USB Adapter for the service, they should have a mechanism to allow binding both for authentication. They should be able to regulate your access to allow only one at a time. Otherwise the complementary device has no use. Check with them on this.
Comment: My internet service provider gave me two devices: a regular WiMAX router and a complimentary USB WiMAX adapter (to carry around with my laptop). Now that they've implemented MAC address authentication I was asked to provide MAC address of the "preferred" device so that they can "bind" my account with that MAC address and I cannot therefore use the USB adapter anymore. I need to use the USB device on occasions such as when I am traveling therefore trying to "spoof" the same MAC address as that of the router (but I'll use one device at a time).
Answer: As for Windows, some NIC drivers will let you manually enter a MAC.  The Intel NIC driver for my PC does (see pic below).  Check the properties of your NIC from the Control Panel\Network and Internet\Network Connections

If you can not do it from there, there are other methods.  This article gives you some options for a variety of OSs.


Thevenin equivalent of circuit with no voltage sources

Question:
I need to find the Thevenin Equivalent left of the >> symbols.
Due to the lack of voltage sources I tried finding the Norton Equivalent first and came up with \$Rn=R_O\$, \$v_{th}=i_S \cdot R_O\$. Is that correct? If not how does one handle this case?
Comment: It is trivial to go from Norton to Thevenin and vice versa.
Comment: Also, I guarantee you that \$R_N = R_O\$ is incorrect. You haven't accounted for the VCCS, which is configured to act just like another resistor in parallel with \$R_O\$.
Comment: -oldfart; I know but doing that in this case yields a result which is independent of g, so i suppose i am missing something
Comment: what you've tried is correct but it's just an intermediate result: a Thevenin source connected to a dependent current source. Now use it to determine short circuit current and open circuit voltage
Comment: Can you find the open-circuit output voltage and short-circuit output current of the circuit?
Comment: wait, is correct to say that v sub x is equal to Vth?
Answer:

To find Rth, open circuit all independent current sources, short all independent voltage sources.
Connect a fictitious 1V source at the open ckt terminal.
Find the current driven by 1V source.
If I is the current driven by 1V source, then \$\frac{V}{I} = \frac{1}{I}\$ is the load seen by the voltage source. i.e., Rth.
$$I = I_{Ro} + gv_x$$
vx = voltage across Ro = 1V
$$\implies I = \frac{1}{Ro}+g = \frac{(1+gRo)}{Ro}$$
$$\therefore R_{th} = 1/I = \frac{Ro}{(1+gRo)} $$
To find Vth, go back to the original ckt.

Vth is the voltage drop across Ro which is same as vx.

Write ohms law equation for voltage across Ro
$$(i_s-gv_x)Ro= v_x$$
$$\implies v_x = i_s\frac{Ro}{(1+gRo)} = V_{th}$$


limit of floor function

Question: $$\large\lim_{x\to2}[-x^2+4x+3]~?$$
Do I have to get both $x\to2^+$ and $x\to2^-$? Then how can I get those limits? If $x\to2^+,x=2+h$ do I have to pull it in that formula? (ahh, I can't describe well ;( understand me I'm Korean) I can solve the question by drawing a graph, so please don't answer it. I really want to know how to solve it. And the answer is 6 (not 7).
Comment: Does it help you to note that $-x^2+4x+3=-(x-2)^2+7$?
Comment: For future reference: writing your entire post in capital letters with surplus exclamation points and question marks is the internet equivalent of waltzing into your professor's office and then screaming your lungs out until everyone's ears are bleeding. That isn't the best way to ask for help, is it? :)
Comment: Note that $\lfloor 7 - (x-2)^2 \rfloor = \lfloor 7 -(2 \pm h - 2)^2 \rfloor = \lfloor 7 - h^2 \rfloor = 6.$
Answer: Hint: $-x^2+4x+3=7-(x-2)^2$; therefore, no matter how $x$ approaches $2$, you have $-x^2+4x+3<7$.
Answer: Recalling that
$$
[x+n]=[x] + n \quad (n \in \mathbb{N} )
$$
then we rearrange:
$${\lim_{x\to2}[-x^2+4x+3]=\lim_{x\to2}[-(x-2)^2+7]=\lim_{x\to2}[-(x-2)^2]+7 =7+\lim_{x\to2}[-(x-2)^2]}$$
Now, we can focus exclusively on the limit:
$$x\to2 ⇒0<|x-2|<\delta⇒0<(x-2)^2<\delta^2<\delta$$
(the square is a positive infinitesimal).
Thus
$$\lim_{x\to2}[-(x-2)^2]=-1$$
And finally
$$\lim_{x\to2}[-x^2+4x+3]=7-1=6$$

limit of floor function


Why are there two local maximums on some CL vs AOA curves?

Question: I know what a stall is but I don't understand why there are in some cases two local maximums on the $C_L$ vs AOA curve of some airfoils. What is the reason for the mini stall that occurs before the main stall?
Comment: Related Q&A: [Does a Stalled Wing Exhibit No Circulation](https://aviation.stackexchange.com/q/58206/14897)
Comment: Note that the plot is up to 90°, which corresponds to the aircraft flying with the nose pointing straight up—or the aircraft falling straight down with the nose horizontal.
Answer: The mini stall is the stall that we normally talk about when considering the flight of an aeroplane, and is therefore the main stall. Below the AoA where the first stall occurs, the wing profile is reasonably aligned with the airflow, and flow at the upper wing surface can remain attached. When upper surface flow detaches:

upper surface suction force decreases, causing the "mini-stall";
air resistance rises dramatically due to the stalled upper surface flow;
lift is still generated by the lower surface deflecting the airflow downwards, like a flat plate does.

So beyond the normal range stall the wing still generates lift, and increasing AoA produces even more lift. The reason why aeroplanes cannot fly in the region beyond the first stall can be found from considering aerodynamic drag as function of AoA as well.

From this answer: $C_d$ of a NACA 0012 profile staling at 11º. The jump in drag is dramatic, and would usually be impossible to compensate for with engine power. Drag is the reason why we want to remain at low wing AoA.
Comment: Also, below the main stall the flow is behaving in a linear way. Above, nonlinear behavior, resulting in positive damping, can ruin your day.
Comment: Thank you so much!
Comment: Welcome to the site @user217340: consider [pressing the check mark (✓)](https://aviation.stackexchange.com/help/someone-answers) if the answer worked for you.


Copy a directory using NSIS .

Question: I can't seem to find any information about how to copy a directory using NSIS ?, i know there is a file command but is there any command to copy a directory .
Answer: The syntax is same for both directory and file, except that you need to specify a directory by providing a \ at the end. File command copies the directory if the specified argument is a directory. For eg, you can do:
SetOutPath "outputPath"
File "myDirectory\" #note back slash at the end

But that copies only the top level directory. To recursively do it, you have /r switch
SetOutPath "outputPath"
File /nonfatal /a /r "myDirectory\" #note back slash at the end

which copies the contents of myDirectory (but not myDirectory folder itself). /nonfatal ignores without an error if there is no particular directory. /a copies file attributes as well. /x switch is used to exclude files.
Otherwise,
SetOutPath "outputPath\myDirectory"
File /nonfatal /a /r "myDirectory\" #note back slash at the end

copies all the contents of myDirectory including myDirectory folder to outputPath.
Comment: Thanks! The last example doesn't seem to work though... To create the folder, I have to use
SetOutPath $INSTDIR\myDirectory
and then
File /a /r "myDirectory\"
Comment: @nawfal, THANK YOU so much for stressing the '\' at the end. It was driving me CRAZY!! I didn't see anything referencing that in the NSIS documentation.
Comment: Important to say it will have a side effect as does pack the directory inside the installer executable on compilation stage.
Answer: I found how to do it , sorry for the trouble .
Extract the files to a directory which can't exist beforehand
CreateDirectory $Installdir\extracting

SetOutPath $Installdir\extracting

File Directory\*

Comment: `SetOutPath` already creates the passed directory and subdirectories, so calling CreateDirectory first is not necessary.
Answer: The File instruction extracts files from your installer and CopyFiles copies files and/or directories that already exist on the end-users system (You can use $EXEDIR if you need to copy files off a dvd where your installer is also located...)
Answer: The star to match the whole content after the back slash is mandatory. The syntax is the following.
See the manual section 18.104.22.168
SetOutPath "outputPath\myDirectory"
File /nonfatal /a /r "myDirectory\*"

Comment: Why do you mention the star is mandatory after the backslash, but it's not in the code sample you provide?

Copy a directory using NSIS .


Furlough/partial-unemployment and demand by employer to perform different role than hired for

Question: An acquaintance is employed for a role in housekeeping and is currently on furlough but receiving benefits and unemployment plus federal supplement. Employer called today and demanded they come back to work in landscape (completely different job than they were hired for) and threatened them with loss of employment and refusal to rehire in the future if they don't accept. Is this legal, and if they refuse and lose their job, how does it affect eligibility for unemployment benefits? Location is Virginia, USA.
Answer: A person might have an employment contract with specific start and stop dates, but otherwise in the US an employee can be fired at any time for any reason. An employment contract might specifically spell out particular duties, so if they are hired to weld, they cannot be required to program computers under the conditions of the contract. Explicit contracts with job security and limits on duties that can be assigned are often negotiated for employees by their union. In lieu of any contractual obligations to the contrary, a person can be hired and fired for any or no reason, so a person who is furloughed can be fired, if they don't come back and do something totally different, if that's what the boss requires.
In Virginia, you have to seek employment and accept it if suitable employment is available. Refusing to take a different job would normally disqualify you for unemployment benefits. If the requirements of the employment are impossible to satisfy (e.g. requires an unreasonable commute), you would not be disqualified. It is possible that a landscaping job would not be "suitable" for a person working housekeeping, but far from guaranteed. It is not a valid reason to refuse an offer "because I don't like that job", but "I physically can't lift more than 10 lbs" would be valid, if the replacement position involves lifting 80 lb stones.


Sequel Pro - Socket connection failed

Question: I use Sequel Pro and MAMP on my Mac to develop wordpress sites locally. This morning when I tried to start up Sequel Pro it kept asking for my password to make changes (it has never done this before). I first tried rebooting my machine but it kept asking so I entered my password to allow (unknown) changes to be made.
Big mistake!
Now when I try to connect via socket I get the error message

Socket connection failed!
Unable to connect via the socket, or the request timed out.
Double-check that the socket path is correct and that you have the necessary privileges, and that the server is running.
MySQL said: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

When I check MAMP the Apache Server light is red, and the MySQL server light is green.
I am a complete novice when it comes to back-end stuff like this, a lot of the answers I have browsed list console commands but I have never used the console before.
I have found a file that is reference in the error - "mysql.sock". This is located in Applications > MAMP > tmp > mysql > mysql.sock
But im not sure what to do with this file (if anything!).
I also found this error log:

130312 11:07:29 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
130312 11:07:29 [Warning] You have forced lower_case_table_names to 0 through a command-line option, even though your file system '/Applications/MAMP/db/mysql/' is case insensitive.  This means > that you can corrupt a MyISAM table by accessing it with different cases. You should consider changing lower_case_table_names to 1 or 2
130312 11:07:29 [Warning] One can only use the --user switch if running as root
130312 11:07:29 [Note] Plugin 'FEDERATED' is disabled.
130312 11:07:29 [Note] Plugin 'ndbcluster' is disabled.
130312 11:07:29  InnoDB: Started; log sequence number 0 15469736
130312 11:07:30 [Note] Event Scheduler: Loaded 0 events
130312 11:07:30 [Note] /Applications/MAMP/Library/libexec/mysqld: ready for connections.
Version: '5.1.37'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 8889  Source distribution
130312 11:09:37 mysqld_safe A mysqld process already exists

I just dont know what to do with any of the info! Any help is greatly appreciated!
Answer: I have the same problem just go and on or start your MAMP and then connect
via socket in Sequel Pro it will work.

Sequel Pro - Socket connection failed


How to add custom site installer to plesk?

Question: I have my custom framework and I want to create lots of website with my framework.
I use Plesk to manage my host , so I want to know if we can create a custom site installer like Plesk built in feature for Wordpress.
I want to give my customer this feature to create their website themselves.
And also I want that if I upgrade my framework , copy new files to my customers website without notice them. so because there is lots of website I cant copy to their website one by one , I want if there is a way to copy file from a source to them with Plesk ?
Answer: Plesk uses APS standard to pack web applications.
You can create your own APS package(it's a zip archive created by standard rules with meta description) like for WordPress package https://dev.apsstandard.org/apps/1.2/wordpress.org/WordPress/Plesk/
Pay attention that Plesk doesn't support APS 2.0 and not all features of APS 1.2
When you create you own package you can upload it in Plesk > Tools&Settings > Application and it become available for installation on sites.
Pay attention that WordPress APS package and WordPress Toolkit - it's a two different technologies. Toolkit just uses APS package for WordPress installation and basic configuration.


My Orchid plant is developing blisters on leaves

Question: I have observed that one side of the orchid plant has developed these blisters with faded color leaves.

While the other side seems to be completely healthy. Can you tell me what could be the reason?
Answer: Are you watering your orchids too much? Or, is your soil or growing medium remains soggy?
From your pictures, it looks like orchid edema. However, I may also be caused by excess heat or sunburn.
Orchids are relatively delicate and prefers moist environments. However, too much watering would harm them just like any other plant. Adapted to shadowy undergrowth of forests, they cannot tolerate too much sunlight. Blister-like abnormalities form on orchid leaves when the plant is over-watered or the particular leaves are exposed to high heat or sunlight.
However, sometimes it may be pests also. If an insect pest has caused the blisters, there would be noticeable patterns in the damaged leaves. And, although very small, the culprit insects would be visible to the naked eye.
So, check whether you are over-watering or exposing your orchid to an unfavorable degree of sunlight. If none of these are true, then check for signs of insect infestation. If it is caused by over-watering or sunlight exposure, remove the causes of the problem, and over time, the orchid will return to its healthy self. Removing insects are harder, and you might require using pesticides.


The detail of select producer and how to persuade other to vote for you?

Question: I'm curious about the documentation referring to block producers. However none of the documentation concretely describes how to vote or how to become a block producer. It may be explained in the code, but I find that really hard to understand.
Comment: you just need to call the system contract to register yourself as producer
Answer: From the docs, to register yourself you can use $ cleos system regproducer:
$ cleos system regproducer

Positional Arguments

account TEXT - The account to register as a producer
producer_key TEXT - The producer's public key
url TEXT - URL where info about producer can be found
location UINT - Relative location for purpose of nearest neighbor scheduling

 $ cleos system regproducer accountname1 EOS1234534... http://producer.site Antarctica

Similarly, to vote producers, the docs mention $ cleos system voteproducer
$ cleos system voteproducer prods someproducr1 someproducr2 someproducr3 someproducr4

There's no on-chain mechanism to persuade others to vote for you as far as I know*, so promotion needs to be done off-chain.
* I guess you could airdrop and send custom memos to encourage recipients to vote for you or something


Is there a translation of the words of Ben Sira?

Question: Is there an authoritative translation into English of the works of Ben Sira (his wisdom, his alphabet)?
Comment: Are you looking for the traditional Latin/English/Christian version, or one that is translated from the recently rediscovered Hebrew?
Answer: There's a version online here. It seems that they have a few different translations from the drop-down menu (the one on display is KJV).
Comment: I did not mean that, no. I was merely providing a (I hope) helpful pointer for seekers.
Comment: If one's looking for Christian translations, he should note that it's also called "Ecclesiasticus".
Comment: @msh210 Are you saying I shouldn't have given a Christian translation because if the questioner wanted it he would have asked for "Ecclesiasticus"? "Ben Sira" seems to also be the non-Jewish way of referring to it (though I guess the questioner could ([?](http://judaism.stackexchange.com/questions/9869/is-a-jew-allowed-to-participate-on-christianity-se)) have asked on Christianity.SE)
Answer: I believe Aaronson Press has a book containing the entire Apocrypha in English.


I have cisco asa 5508 and setup as dhcp for 4 networks segments and 3 servers connected to dmz ,the asa 5508 is working for a while then stop

Question: I try to use asa 5508 on my network with 480 workstations.I connect interface1(192.168.1.0/24) to a swith with 3 linux servers,interface 2( (192.168.3.0/24) to a 48 manged switch, interface 3 (192.168.4.0/24) and interface 4(192.168.4.0/24) and interface 5 (192.168.5.0/24),Of course each segment has swith and ap connected to it.ASA 5508 act as dhcp server in each segment.It works for a day or so, then stop no one can access to the internet nor the server.My question is :Is it the right way to use asa 5508 as dhcp server for 480 clients? Can I use my linux server on dmz to be a main dhcp server for the other interfaces? Thanks for your help!!
Comment: you don't have anything in ASA's logs? do you run the latest ASA software?
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: You can and it would be better to use a DHCP Linux server for your entire network. I would place it in your Linux DMZ/interface 1.
Keep in mind that as DHCP was designed as a network broadcast domain protocol, the DHCP requests have to be forwarded to your DHCP server; at the moment you have a different design, which is known as a multi homed DHCP server.
As such you have to configure DHCP relaying in each network. DHCP relaying will forward DHCP requests from each network to the specified DHCP server.
ASA DHCP Relay Configuration Example
I would also start planning the future evolution and data usage of your network (in 2-3 years time, maybe sooner). Albeit the theoretical backplane of the 5508 is 8Gbps, depending on the firewall and NAT rules, often with ASA equipments, the speed the backbone withstands can get to half of that.
Comment: Thanks for suggestions, I will try this asap and see if it solve my issues.


Captcha Handling Technique

Question: How to work with a selenium script where the if found captcha is in the mid of the script. Is it possible to pass the captcha and continue the automation script?
Answer: The Selenium website is full of documentation. They have a section called Test Practices which contains encouraged  and discouraged practices. One of the discouraging practices talk about CAPTCHAS
Discouraged practices are things to avoid when using test automation. It's a myth that everything can be automated or should be automated. In fact, not everything can be or should be automated. There are a number of factors that should be considered when writing test automation.
When it comes to CAPTCHAS, Selenium documentation says:

CAPTCHA, short for Completely Automated Public Turing test to tell Computers and Humans Apart, is explicitly designed to prevent automation, so do not try! There are two primary strategies to get around CAPTCHA checks:

Disable CAPTCHAs in your test environment
Add a hook to allow tests to bypass the CAPTCHA

So, what does this mean? It means you can't use a computer to bypass a CAPTCHA.
In your test environment, it's a good practice to disable CAPTCHAs. If your application uses them, you really only need to test the integration of the CAPTCHA library, not the implementation of the CAPTCHA library. Once the integration is tested, you can safely disable it in your test and stage environments. CAPTCHAs are only effective in a production environment. This can be done via a feature flag.
Comment: This is the correct answer IMO.
Comment: Thanks, @ChrisKenst. I appreciate the support!
Answer: My view points to handle captcha :

This is one of the limitation of automation to automate or handle captcha
There is not straight way to handle captcha or discard, by pass like popups, alerts
As it is mandatory step, even if you just avoid captcha somehow with hackish way, still you can not progress to test actual flow and scenario

On top of this for testing purpose there are few possible work around [Not recommended] as follows :

By disabling Captchas in test environments
By clicking the reCAPTCHA checkbox in Selenium
By adding a delay in your selenium script and manually solving Captcha while running

Note - If you are interested for more details for those work around. Please refer this.
Comment: Can you explain more about why the listed "workarounds" are not recommended?
Comment: yes because when we are trying to implement end to end UI automation those are from end user prospective. If we add any work around then its not the exact end user scenario

Captcha Handling Technique


on-state voltage

Question: I am trying to study an ever-on IGBT. in other words, IGBT is tried to be on in a long time. To this purpose, a +15V constant dc voltage is applied to the gate-emitter. But, when connecting a +2V voltage to the collector-emitter in this condition, voltmeter show Vce equal to 0.05V! It should be equal to 2V, shouldn't it? What is the problem?
Answer: You didn't actually connect 2V to the collector-emitter, obviously. You connected a power supply that had 2V out until it was connected, then it dropped.
So the IGBT is pulling down whatever power supply you have. Which is to be expected, you're shorting it out with the IGBT. Either that or the IGBT might burn out, 2V is a fairly high voltage for an IGBT Vce(on).

on-state voltage


Changing soundtrack in a movie clip

Question: What is the easiest way to change soundtrack of a movie clip? We recorded a clip using our camera, but the sound is not very interesting, hence we would like to use some music instead (we have an mp3 file). How can we swap the original sound in the clip for the one from mp3?
Comment: You have a huge selection of video editing software available for this. They range from simple to complicated. Depending on your system, you could check your repositories for some software.
Comment: @MaxMackie, I am looking for a really easy way. I am a bit worried that if I just start looking at a random software, it will be one of the more complicated ones, with gzillion options, etc.
Comment: Do you mean something akin to Windows Movie Maker? Or even more simple?
Comment: @MaxMackie, it could be even a command line tool, but I would appreciate an example in which I just need to substitute file names :)
Answer: You should be able to replace the audio track of a video file using mencoder.
mencoder input.avi -o output.avi -ovc copy -oac copy -audiofile track.mp3

Warning: untested command.
Answer: I ended up using Kdenlive, which is a nice gui. It can do lots of other things, but I managed to figure out in a few minutes how to do this particular thing.

Changing soundtrack in a movie clip


Difference between a inline function and a view

Question: I am a newbie in using functions and it appears to me that an inline function is very similar to a view. Am I correct?
Also, can I have UPDATE statements within a function?
Answer: After reading many of the answers here, I'd like to note that there is a big difference between an inline table-valued function and any other kind of function (scalar or multi-line TVF).
An inline TVF is simply a parameterized view.  It can be expanded and optimized away just like a view.  It is not required to materialize anything before "returning results" or anything like that (although, unfortunately, the syntax has a RETURN.
A big benefit I've found of an inline TVF over a view is that it does force required parameterization whereas with a view, you have to assume that the caller will appropriately join or restrict the usage of the view.
For example, we have many large fact tables in DW with a typical Kimball star model.  I have a view on a fact table-centered model, which called without any restriction, will return hundreds of millions of rows.  By using an inline TVF with appropriate parameterization, users are unable to accidentally ask for all the rows.  Performance is largely indistinguishable between the two.
Answer: No difference. They are both expanded/unnested into the containing query.
Note: indexed views are considered differently but still may be expanded, and multi-valued table functions are black boxes to the containing query.
Tony Rogerson: VIEWS - they offer no optimisation benefits; they are simply inline macros - use sparingly
Adam Machanic: Scalar functions, inlining, and performance: An entertaining title for a boring post
Related SO question: Does query plan optimizer works well with joined/filtered table-valued functions?
Scary DBA (at the end)
Finally, writes to tables are not allowed in functions
Edit, after Eric Z Beard's comment and downvote...
The question and answers (not just mine) are not about scalar udfs. "Inline" means "inline table valued functions". Very different concepts...
Comment: That's not correct for functions, not for Sql Server.  Functions are a black box, and don't get expanded into the containing query - that's why performance is horrific if you use functions that query anything.  It turns into a bad nested loop since the function is handled separately for each row.
Comment: @Eric: for inline table valued function, what I said is correct. I said multi valued TVFs are black boxes. The question and my answer do not refer to "scalar udfs" whichare black boxes.
Answer: Update: Looks like I missed the "inline" part. However, I'm leaving the answer here in case someone wants to read about difference between VIEWs and regular functions.
If you only have a function that does SELECT and output the data, then they are similar. However, even then, they are not the same because VIEWs can be optimized by the engine. For example, if you run SELECT * FROM view1 WHERE x = 10; and you have index on table field that maps to X, then it will be used. On the other hand, function builds a result set prior to searching, so you would have to move WHERE inside it - however, this is not easy because you might have many columns and you cannot ORDER BY all of those in the same select statement.
Therefore, if you compare views and functions for the same task of giving a "view" over data, then VIEWs are a better choice.
BUT, functions can do much more. You can do multiple queries without needing to join tables with JOINS or UNIONs. You can do some complex calculations with the results, run additional queries and output data to the user. Functions are more like stored procedures that are able to return datasets, then they are like views.
Answer: Nobody seems to have mentioned this aspect.
You can't have Update statements in an inline function but you can write Update statements against them just as though they were an updatable view.
Answer: One big difference is that a function can take parameters whereas a VIEW cannot.
I tend to favour VIEWs, being a Standard and therefore portable implementation. I use functions when the equivalent VIEW would be meaningless without a WHERE clause.
For example, I have a function that queries a relatively large valid-time state table ('history' table). If this was a VIEW and you tried to query it without a WHERE clause you'd get a whole lot of fairly data (eventually!) Using a function establishes a contract that if you want the data then you must supply a customer ID, a start date and an end date and the function is how I establish this contact. Why not a stored proc? Well, I expect a user to want to JOIN the resultset to further data (tables, VIEWs, functions, etc) and a function is IMO the best way of doing this rather then, say, requiring the user to write the resultset to a temporary table.
Answer: Answering your question about updates in a function (msdn):

The only changes that can be made by
  the statements in the function are
  changes to objects local to the
  function, such as local cursors or
  variables. Modifications to database
  tables, operations on cursors that are
  not local to the function, sending
  e-mail, attempting a catalog
  modification, and generating a result
  set that is returned to the user are
  examples of actions that cannot be
  performed in a function.
Answer: A view is a "view" of data that is returned from a query, almost a pseudo-table.  A function returns a value/table usually derived from querying the data.  You can run any sql statement in a function provided the function eventually returns a value/table.
Answer: A function allows you to pass in parameters to create a more specific view.  Lets say you wanted to have grab customers based on state.  A function would allow you to pass in the state you are looking for and give you all the customers by that state.  A view can't do that.
Comment: But a view can expose that state, and you can then filter using a where clause.
Comment: That's true. But a function looks better to a programmer reading the code.  Select * FROM CustomersByState('Iowa') is easier to read than SELECT * FROM vCustomers WHERE State = 'Iowa'.  That's just my opinion though.
Answer: A function performs a task, or many tasks.  A view retrieves data via a query.  What ever fits in that query is what you are limited too.  In a function I can update, select, create table variables, delete some data, send an email, interact with a CLR that I create, etc.  Way more powerful than a lowly view!
Comment: But you should always prefer a view over a function where possible, for maximum performance and portability.


GIMP: Change image color with different shades

Question: How I can change the colour shaded here to green, dark green, and light green in Gimp?
Answer: Not a GIMP expert here but you can probably achieve what you are looking for by changing the settings from Colors -> Hue / Saturation -> Select "Master" -> change the values according to your needs.
The folowing screenshot should give you an idea:
Answer: Here is another way to do it with GIMP to get dark green, green and light green instead of an undifferentiated green pattern like this.

Here are the settings I used to get an interesting effect with a variety of different shades of green.
Filters -> G'MIC -> Colors -> Channel processing
This exaggerates the contrast between the different shades of turquoise in the original picture.
The G'MIC GIMP Plugin does not come with the standard GIMP package, but it can be easily installed in Ubuntu from the Ubuntu Software Center where GMIC's package name is gimp-gmic. For other platforms G'MIC can be downloaded from the G'MIC website.

Colors -> Colorize
This changes the dominant color from turquoise to green.