text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
Why not have every team of each conference have the Bye Week at the same time.. Long long long time ago someone told me why this was a bad idea but i forgot. I know it is bad for fantasy football. But I am not sure why it would be bad for the NFL.
I would say have one conference have the Bye on week 10 than have the other one have it week 13. Than switch every other year. The network or streaming service \(I am hoping that Netflix gets NFC and Hulu, Amazon or Youtube gets AFC\) that has the AFC games gets the NFC game of their choice during the AFC bye week, and vice versa.
Is there any obvious problems with this scheme. Still get 17 weeks for football and on top of that you will get crazy high ratings for the 4\-5 games played in the afternoon of Sunday. | 0non-cybersec
| Reddit |
Why do 9 ants get to live in an apartment for free?. Because they're not tenants | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How to get string from dataPackageView.GetDataAsync(). <p>I'm trying to get non-standard-format data from the clipboard using <code>DataPackageView.GetDataAsync</code>. I am stumped on converting the returned <code>system.__ComObject</code> to a string. </p>
<p><strong>Here is the code:</strong></p>
<pre><code>var dataPackageView = Windows.ApplicationModel.DataTransfer.Clipboard.GetContent();
if (dataPackageView.Contains("FileName"))
{
var data = await dataPackageView.GetDataAsync("FileName");
// How to convert data to string?
}
</code></pre>
<p>I am looking for a solution that will work with any non-standard clipboard format. "FileName" is an easily testable format as you can put it on the clipboard by copying a file in Windows Explorer.</p>
<p>In <code>C++/Win32</code>, I can get the clipboard data as follows:</p>
<pre><code>OpenClipboard(nullptr);
UINT clipboarFormat = RegisterClipboardFormat(L"FileName");
HANDLE hData = GetClipboardData(clipboarFormat);
char * pszText = static_cast<char*>(GlobalLock(hData));
GlobalUnlock(hData);
CloseClipboard();
</code></pre>
<p>In <code>C++</code>, the clipboard data is just an array of bytes. It must be possible to get the same array of bytes in C#, but I have no clue on unwrapping/converting the <code>system.__ComObject</code></p>
<p><strong>Edit: Rephrasing the question:</strong></p>
<p><strong>How do I get a string or array of byes out of the system.__ComObject returned by dataPackageView.GetDataAsync(someFormat), where someFormat is an arbitrary clipboard format created by another application?</strong></p>
<p>It is very clear to me how to get the data. The difficult part is using the data that is returned.</p>
<p>The accepted answer must show how to create a string or array of bytes from the "data" returned by</p>
<pre><code>var data = await dataPackageView.GetDataAsync(someFormat);
</code></pre>
| 0non-cybersec
| Stackexchange |
My computer does not use DCHP, it only uses default adress? No network access. <p>Recently one of my computer's network connection stopped to work. When I did an ipconfig I saw that the NIC was using the IP address outside the range of my DCHP server, something like "168.254.60.120(default), 255.255.0.0" instead of 192.168.1.74/24 witch the router has given the computer. All other computers on the network are working, so it is not an issue with the router. The troubled computer is indeed using DHCP and not the above /16 adress. I tried to hardcode the IP address under IPv4 settings but it doesent work.</p>
<p>Any ideas?</p>
<p>The computer is a laptop from Asus with a broadcom NIC, running Windows 7. </p>
| 0non-cybersec
| Stackexchange |
Red Robe, Me, Digital Painting, 2020. | 0non-cybersec
| Reddit |
One important information for all of you regarding having friends vs not having friends. Having friends can make your life harder than not having friends. There are some reasons for this. At first, friends sometimes trouble/bother us during our busy times as they might need to ask for our help. Also, when we ask for their help/advice, the things they give/do might not be helpful to us or even make matters worse. This is because they misunderstand either the current situation or what we ask for. This should be tolerated as well as possible since we are also sometimes doing mistakes to others. Lastly, friends sometimes argue with our opinions and make tasks harder due to long arguments. The worst case of arguments is if our friends’ opinions are not as good as ours when doing something together (e.g. group projects) and they try to defend their opinions.
Meanwhile, having no friends can be happier since we do not have anyone to care about and can focus more on our own business.
In conclusion, if you do not have friends, do not think that other people who have friends will live happier than you. Their life might be more difficult than you. | 0non-cybersec
| Reddit |
How to wake a CentOS 7.8 machine remotely after running “systemctl suspend?”. <p>I have CentOS 7.8 installed on my server. I found out that after I run command <code>systemctl suspend</code>, the screen turns black and the SSH connection is lost, but the fan connected to the motherboard is still running.</p>
<p>And I cannot wake the system up by sending magic packet on LAN or press the power button.</p>
<p>How should I debug this problem?</p>
| 0non-cybersec
| Stackexchange |
RIP my bank account. | 0non-cybersec
| Reddit |
Create a virtual directory between two machines. <p>I have two linode VPS. I want to create a virtual directory that can be read/write from both machines. The actual data should be stored in /var/myapp/data on two machines. I don't need any redundant data since reliability is not a concern here. All my data in virtual directory should be shared somehow between both my machines.</p>
<p>My PHP App should be able to read/write from the virtual directory
Both machines are Ubuntu 10.04.</p>
| 0non-cybersec
| Stackexchange |
So... Where's all the merchandise?. A Thrall action figure, Vanguard jacket patch, hunter cosplay cloak... anything? | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
In Context of Chomskhy classification of formal languages. <p>Is it possible that <code>an ambiguous context free language also be a liner context free</code>.<br>
I have doubt regarding <code>scope of ambiguous language</code> in below Venn-diagram. </p>
<p><img src="https://i.stack.imgur.com/5v9Sz.jpg" alt="enter image description here"> </p>
| 0non-cybersec
| Stackexchange |
Is there a way in R to detect how often a package is used?. <p>Recently, I found that there are many packages that I don't use much, and some of them may never be used again. I would like to delete these packages, but I am worrying that some packages that I often use may depend on these rarely used ones.</p>
<p>So I am wondering whether there is a way in R to detect how often a package is used?</p>
<p>Thank you!</p>
| 0non-cybersec
| Stackexchange |
Supaman -- Prayer Loop Song [Native American Rap]. | 0non-cybersec
| Reddit |
Propagate property changes through multiple classes. <p>I'm trying to figure out how to properly pass properties through multiple classes. I know I can just implement <code>INotifyPropertyChanged</code> in each class and listen for changes on the property, but this seems to be quite a lot of unnecessary code.</p>
<p>The situation:<br />
I have a class (let's call it <code>Class1</code>) with two dependency properties: <code>FilterStatement</code> (String) and <code>Filter</code> (Filter class). Setting the statement affects the filter and vice versa. <br />
The conversion logic between statement and filter, however, isn't located in <code>Class1</code>, but in <code>Class3</code> - which <code>Class1</code> doesn't know directly. In between there is <code>Class2</code> which just has to pass through the changes. (You can imagine class 1 to 3 beeing Viewmodel, Model and Repository, though in the real situation this doesn't completly match). </p>
<pre><code>public class Class1
{
public static readonly DependencyProperty FilterProperty = DependencyProperty.Register(
"Filter",
typeof(Filter),
typeof(Class1),
new FrameworkPropertyMetadata(null));
public static readonly DependencyProperty FilterStatementProperty = DependencyProperty.Register(
"FilterStatement",
typeof(String),
typeof(Class1),
new FrameworkPropertyMetadata(null));
public Filter Filter
{
get { return (Filter)GetValue(FilterProperty); }
set { SetValue(FilterProperty, value); }
}
public string FilterStatement
{
get { return (string)GetValue(FilterStatementProperty); }
set { SetValue(FilterStatementProperty, value); }
}
public Class2 MyClass2Instance { get; set; }
}
public class Class2
{
public Class3 MyClass3Instance { get; set; }
public void ChangeClass3Instance(object someParam) {
... // this can change the instance of MyClass3Instance and is called frome somewhere else
// when changed, the new Class3 instance has to get the property values of Class1
}
}
public class Class3
{
private Filter _filter; // here is where the filter set in Class 1 or determined by the statement set in class 1 has to be put
public string MyFilterToStatementConversionMemberFunction(Filter filter)
{
...
}
public Filter MyStatementToFilterConversionMemberFunction(string statement)
{
...
}
}
</code></pre>
<p>My naive solution would be to duplicate the properties across all three classes, implement <code>INotifyPropertyChanged</code> in <code>Class2</code> and <code>Class3</code> and listen to the changes, propagating everything down to <code>Class3</code> and in Result back up to <code>Class1</code>. Isn't there a better solution to this?</p>
| 0non-cybersec
| Stackexchange |
Upgrade to Ubuntu 20 breaking mysqlclient pip package. <pre><code>Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 16, in <module>
import MySQLdb as Database
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/MySQLdb/__init__.py", line 18, in <module>
from . import _mysql
ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/tom/.pyenv/versions/3.7.2/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/home/tom/.pyenv/versions/3.7.2/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 76, in raise_last_exception
raise _exception[1]
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 357, in execute
autoreload.check_errors(django.setup)()
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/contrib/auth/models.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/contrib/auth/base_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/db/models/base.py", line 121, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/db/models/base.py", line 325, in add_to_class
value.contribute_to_class(cls, name)
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/db/models/options.py", line 208, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/db/__init__.py", line 28, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/db/utils.py", line 207, in __getitem__
backend = load_backend(db['ENGINE'])
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/db/utils.py", line 111, in load_backend
return import_module('%s.base' % backend_name)
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 21, in <module>
) from err
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
</code></pre>
<p>Before the upgrade I had no issues with mysqlclient. When trying to run my django environment I get this error. I have tried everything I could find online but nothing has worked. I do have the pip package installed.</p>
<p>I have tried completely removing mysqlserver, reinstalling python-dev all the dependencies of the mysqlclient package mentioned on the PyPi page.</p>
| 0non-cybersec
| Stackexchange |
Keyboard layout related issue - fixed in GUI but receive error in terminal. <p>I run on Ubuntu 14.04. I have an issue related to the keyboard layout in GUI mode. I managed to fix it in the GUI by using:
<code>setxkbmap -layout us</code> [1]
and adding it to the <code>~/.bashrc</code>. That works fine. However, the problem I have now is that when I login to the text-mode terminal I receive an error - <code>Cannot display "default display"</code>. This is not surprising because this command does not work in text mode. </p>
<p>The question is: where should I put [1] and have no error in text mode terminal?</p>
| 0non-cybersec
| Stackexchange |
Css: Position element by it's bottom relative to it's container's top. <p>I have an <code>div</code> element with variable height which I need to be positioned by it's <code>bottom</code> relative to the containers top.</p>
<p>This must be done without changing the html.</p>
<p>e.g.</p>
<pre><code><div id="container">
<h1>Some Text<br/>more...</h1>
</div>
</code></pre>
<p><code>h1</code>'s bottom should be 100px below <code>#container</code>'s top.</p>
<p>Thanks a lot</p>
<p>EDIT:</p>
<p>So by Request what I did (or didn't) tried:</p>
<ul>
<li>Searching with Google for <code>css bottom top position relative</code> but that's not the best search terms in the world...</li>
<li>Normally I would put a container around <code>h1</code> and give it a height of 100px but then I would need to change the html and that I can't</li>
<li>using <code>bottom: somevalue</code> but that positions the element's <em>bottom</em> relative to the container's bottom.</li>
<li>slain some vampires</li>
</ul>
| 0non-cybersec
| Stackexchange |
I need help understanding how this for loop code works. I'm sorry if my post title is not written well. I was asked to observe this code:
var x = [1,5,7,13];
for(i=0; i < x.length; i++)
{
x[i] = x[3-i] + 2;
}
The output is [15, 9, 11, 17]
Can someone please explain to me as if I'm 5 years old or in layman's term how the output was reached? I'd really appreciate it. | 0non-cybersec
| Reddit |
A trans bathroom bill has been filed in TX. How many bills have been filed to ban sex offenders from bathrooms? ZERO. This has nothing to do with protecting women and kids. They want to use trans-folks as a scapegoat while ignoring the average of 70 reports/week of child sex abuse in US churches.. A bill has been filed in Texas that would, if passed, limit where transgender people can pee. [Link.](http://www.nytimes.com/2017/01/05/us/texas-transgender-bathroom-access.html?_r=0)
Their main argument is that women and children need to be protected from those pesky men in dresses.
First, that shows a clear lack of understanding regarding transgender people in the first place. **Do you really want someone who for all intents and purposes is female, has real boobs that grew thanks to hormone therapy, to go into the restroom with your sons instead of daughters?**
Also, where the fuck are the bills banning sex offenders from bathrooms? If we're truly concerned about the safety of women and children in restrooms, might we consider banning people **who have actually been fucking convicted of sex crimes** as opposed to poor transgender people who have never been convicted of any crime?
I suppose that's just too much logic for those poor bastards in the Texas legislature.
Honestly, and this is just my theory, but I think transgender folks are being used as a scapegoat here. No doubt we have an epidemic of child sexual abuse in this country. **But it ain't happening in bathrooms.... in fact, it's pretty damn common in church.**
On average, there are around 70 reports per week of children being abused sexually in American churches. [Link.](http://churchandstate.org.uk/2016/05/kids-more-likely-to-be-molested-at-church-than-in-transgender-bathrooms/)
Where are the laws banning clergy from public restrooms? Where are the laws banning sex offenders, you know people with an actual history of sex abuse, from bathrooms? FUCKING NO WHERE.
These asshats don't care about protecting the children. They want to distract you from the real problem.
If you live in TX and want to contact your senators regarding this legislation, you can find their contact information [here.](http://www.senate.state.tx.us/75r/Senate/Members.htm) Let them know you'd prefer they ban actual sex offenders from restrooms as opposed to innocent citizens. | 0non-cybersec
| Reddit |
Does $u\in H^{3/2}(\Omega)$ imply continuity of $\nabla u\cdot\overrightarrow{n}$ across an interior interface?. <p>When investigaing the regularity of certain functions, I encountered this problem:</p>
<p>if $u\in H^{3/2}([0,1]\times [0,1])$,
what can we say about the continuity of $\nabla u\cdot\overrightarrow{n}$
across a line segment inside the domain, where $\overrightarrow{n}$ is the unit normal ?</p>
<p>Without loss of generality, we formulate the problem as below:</p>
<blockquote>
<p>Let $\Omega$ be the unit square in two dimensions
and let $\gamma$ denote a vertical line segment inside $\Omega$.</p>
<p>If $u\in H^{3/2}(\Omega)$, can we deduce that
$$\frac{\partial u}{\partial x}|_{\gamma^+}=\frac{\partial u}{\partial x}|_{\gamma^-} \;\;\; ?$$ </p>
</blockquote>
<p>The subscripts $\gamma^+$ and $\gamma^-$ denote traces from left and right sides of $\gamma$, respectively.</p>
<p><strong>Here we assume that</strong>
$$ \frac{\partial u}{\partial x}|_{\gamma^+}\in L^2(\gamma),\quad
\frac{\partial u}{\partial x}|_{\gamma^-}\in L^2(\gamma).$$
Note that this assumption is not redundant because trace theorem does not hold for $H^{1/2}(\Omega)$ with index $1/2$.</p>
<p>What if the assumption above is weakened into:
$$ \frac{\partial u}{\partial x}|_{\gamma^+}\in H^{-1/2}(\gamma),\quad
\frac{\partial u}{\partial x}|_{\gamma^-}\in H^{-1/2}(\gamma) \;\;\; ?$$</p>
<p>The question was asked in MSE last year but there is still no response, so I plan to ask here.</p>
| 0non-cybersec
| Stackexchange |
Controlling Remote Processes from Linux Access Server. <p>I have constructed a HA web cluster in LXD with each major service run within its own container. I.e, 2 x Nginx servers in a container each, 2 x MySQL etc. </p>
<p>I would like to add a management container that I can ssh to, issue commands, for example, <code>service nginx restart</code> and have the command redirected to the appropriate container, the Nginx servers in this case.</p>
<p>The closest thing I have found is OpenShift but given that I don't want to create a full blown PaaS I would prefer to find something more lightweight.</p>
<p>Is what I want to achieve possible?</p>
| 0non-cybersec
| Stackexchange |
Pobelter & Doublelift weren't given a notice prior to being kicked. | 0non-cybersec
| Reddit |
Appendix heading suddenly becomes Chapter. <p>I have a couple of appendices all with multiple tables. The first two appendices are labeled "Appendix A" and Appendix B". At some point, tables in appendix B change their name to "Table 2.1" instead of "Table B.#". Then the next appendix is labeled "Chapter 3" </p>
<p>The document reads as follows</p>
<pre><code>\include{Chapter1}
\include{Chapter2}
\appendix
\include{appendix1}
\include{appendix2}
\include{appendix3}
\include{appendix4}
</code></pre>
<p>What can be causing this?</p>
| 0non-cybersec
| Stackexchange |
Turnpike Troubadours - Ringing in the Year [Red Dirt]. | 0non-cybersec
| Reddit |
Happy Sunday! Ballin’ out on the discount eighth B). | 0non-cybersec
| Reddit |
MRW I bomb my last exam but I know summer is right around the corner. | 0non-cybersec
| Reddit |
A very well summarized documentary on theranos and how Elizabeth Holmes almost fooled everyone about her company.. | 0non-cybersec
| Reddit |
Find the density of their average. <blockquote>
<p>If
$f_{X,Y,Z}(x,y,z)=e^{-(x+y+z)}I_{[0,\infty]}(x)I_{[0,\infty]}(y)I_{[0,\infty]}(z)$
find the density of their average $\frac{X+Y+Z}{3}$</p>
</blockquote>
<p>I'm a little lost on how to solve this exercise, $f_{X,Y,Z}(x,y,z)$ It looks like the product of three exponential random variables $X\sim exp(1),Y\sim exp(1),Z\sim exp(1)$. </p>
<p>This would be the case of making the transformation with Jacobian calling
$$A=\frac{X+Y+Z}{3},B=Y,C=Z$$
then finding $$f_{A,B,C}(a,b,c)$$
and finally $$f_A(a)=\int f_{A,B,C}(a,b,c)dbdc$$
this seems to me somewhat complicated and rather laborious</p>
| 0non-cybersec
| Stackexchange |
I really regret buying an FM transmitter now. About a month ago the auxiliary port on my car’s deck decided to call it quits. It had been a long time coming, as the audio has been cutting out for a while now. At first I thought it was just the cable, but after replacing three different audio cables, I knew it was the aux port itself. I tried listening to all of my old CDs, but that quickly grew tiresome and annoying to have to continually switch them out. I decided getting an FM transmitter was my cheapest option (to avoid spending over 200 bucks on a new deck). I found one on sale through Amazon and within a couple days my car audio troubles were solved.
A few days after I started using the FM transmitter was when things started getting weird. I’ve read stories here before about random radio stations and I’ve heard of EVP before (thanks to the shitty movie “White Noise”), but I’m not exactly sure about what’s been happening.
The first time anything happened, I had my phone plugged into the transmitter, but I was using my phone for a call. I had switched it to use the speaker rather than use my car’s audio. Mid conversation, static blasted through my car speakers. Nearly caused me to run off of the freaking road. I assumed it was just the FM transmitter going into sleep mode or something, but then I saw that the station had been changed to 88.5. I figured I must have bumped it by accident and changed it myself. Then, it suddenly switched back to the station I had it on originally. The same thing happened the next day, and then day after that.
The third time is when I remembered about EVP and, as sort of a joke, decided to leave it on for a little while and listen to the static. I heard something subtle break through the gurgles of electricity. I wasn’t entirely certain, but it sounded like someone said my name. I quickly turned my radio off, and then laughed about it moments later. I had just heard what I wanted to hear in the static, right?
This same pattern happened every day on my way to and from work. My transmitter would randomly switch to station 88.5, which never seemed to work. All that would come through the speakers was static. There were a few more times when I could have sworn that I heard my name through the static, but I just shrugged it off. There was no way I could really believe that was what I was actually hearing. I was just psyching myself out about it and my mind was playing tricks on me.
As it kept happening, I kept getting more intrigued. I looked at reviews online for the FM transmitter I bought, but none of them mentioned anything like what was happening to me. That was when I started paying attention to when it was happening. Like I said, it would happen when I was driving to work and then again when I was on my way home. I started paying attention to when it switched and when it would switch back. I wasn’t overly surprised when I noticed there was actually a pattern to what was happening.
On my way to work, I have to drive through an older part of town. Some of the houses are pretty run down and some are even boarded up and probably abandoned. As soon as I would hit that stretch of road, the station would switch to 88.5, and once I was out of the area, it would switch back. I decided to test this a little bit further and drove through the area slower than I normally would and found that the static seemed to be the loudest as I passed in front of one of the boarded up houses.
All of this has led up to today.
On my way to work this morning, I decided to stop in front of the house and listen to the static. It has been bothering me and I figured this would be the way to put my mind at ease. At least that was what I was hoping it would do.
I sat in my car listening to 88.5, switching my gaze between the blue screen that displayed the radio station and the house. There was a break in the static and I knew for sure it wasn’t my imagination. I heard my name through the choppiness of the radio.
The static cut back in.
Then I heard my name again, just like before.
I’m shivering just thinking of it, but the static broke one last time before I sped off and headed to work.
“We’re waiting for you.”
No.
Just no.
I told a couple friends and they suggested we go inside to see who is waiting for me. I told them to shove that idea up their asses. There is no way I’m going to go inside that building. I’ve been looking up online if it is possible for someone to use an FM transmitter from inside their house. Part way through, I realized something that worried me even greater: even if someone was transmitting their own signal, how did they know my name?
I’m really freaked out at this point and I’m currently trying to find out if anyone else has experienced this type of thing before.
Needless to say, I’ve gone back to listening to my CDs for now.
| 0non-cybersec
| Reddit |
Best Hostel You've Ever Stayed In?. Interested to hear everyone's opinions. I stayed in my first hostels last summer and loved my time at the Zermatt Youth Hostel. | 0non-cybersec
| Reddit |
Italian opera tenor serenades quarantined neighbors. | 0non-cybersec
| Reddit |
What is the divisor associated to this map?. <p>Suppose I have the map $\mathbb{P}^1 \to \mathbb{P}^2$ given by $(u,v) \mapsto (u^3, u^2v, v^3)$. What is the divisor associated to this map? I can't seem to figure it out. It seems the pullback of the $\infty$-divisor $V_+(z)$ is $(1,0)$ with multiplicity $3$. But then the map is given by $\mathcal{O}(3)$ which can't be true.</p>
| 0non-cybersec
| Stackexchange |
convert private key to bitcoin address using python or php. <p>I have private key like this <code>5JYJWrRd7sbqEzL9KR9dYTGrxyLqZEhPtnCtcvhC5t8ZvWgS9iC</code> how to convert to bicoin address using python or php?</p>
<p>example bitcoin address
<code>18V7u8YNHKwG944TCkzYYj32hb6fdFPvQf</code></p>
| 0non-cybersec
| Stackexchange |
High school AP calculus help. <p><img src="https://i.stack.imgur.com/eN2Um.jpg" alt="enter image description here">How do we solve this problem?</p>
<p>$$ \int_{0}^{1/2}\frac{x}{\sqrt{1-x^2}}\, dx$$</p>
<p>All I know is that i need to get the bottom part to equal $\sin^{-1} x$.</p>
| 0non-cybersec
| Stackexchange |
How to set the background color of a Row() in Flutter?. <p>I'm trying to set up a background color for a Row() widget, but Row itself has no background color or color attribute. I've been able to set the background color of a container to grey, right before the purple-backgrounded text, but the text itself does not fill the background completely and the following spacer does not take any color at all.</p>
<p>So how can I have the Row background set to the "HexColor(COLOR_LIGHT_GREY)" value so it spans over the whole row? </p>
<p>Any idea? Thanks a lot!</p>
<p><a href="https://i.stack.imgur.com/hCeM3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hCeM3.png" alt="enter image description here"></a></p>
<p>Here's the code that I have so far:</p>
<pre><code>import 'package:flutter/material.dart';
import '../manager/ShoppingListManager.dart';
import '../model/ShoppingListModel.dart';
import '../hexColor.dart';
import '../Constants.dart';
class ShoppingListWidget extends StatelessWidget {
final Color color = Colors.amberAccent;
final int shoppingListIndex;
ShoppingListWidget({this.shoppingListIndex});
@override
Widget build(BuildContext context) {
ShoppingListManager slm = new ShoppingListManager();
String shoppingListName =
slm.myShoppingLists.shoppingLists[shoppingListIndex].name;
int categoryCount =
slm.myShoppingLists.shoppingLists[shoppingListIndex].categories.length;
return Scaffold(
appBar: AppBar(
title: Text(shoppingListName),
automaticallyImplyLeading: true,
),
body: ListView.builder(
itemBuilder: (context, index) {
Category cat = slm.myShoppingLists.shoppingLists[shoppingListIndex]
.categories[index];
return Container(
decoration: new BoxDecoration(
border: new Border.all(color: Colors.grey[500]),
color: Colors.white,
),
child: new Column(
children: <Widget>[
getCategoryWidget(context, cat),
getCategoryItems(context, cat),
],
),
);
},
itemCount: categoryCount,
),
);
}
// Render the category "headline" row where I want to set the background color
// to HexColor(COLOR_LIGHT_GREY)
Widget getCategoryWidget(BuildContext context, Category cat) {
return new Row(
children: <Widget>[
new Container(height: 40.0, width: 10.0, color: HexColor(cat.color)),
new Container(
height: 40.0, width: 15.0, color: HexColor(COLOR_LIGHT_GREY)),
new Container(
child: new Text("Category", textAlign: TextAlign.start,
style: TextStyle(
fontFamily: 'Bold',
fontSize: 18.0,
color: Colors.black),
),
decoration: new BoxDecoration(
color: Colors.purple,
),
height: 40.0,
),
Spacer(),
CircleAvatar(
backgroundImage:
new AssetImage('assets/icons/food/food_settings.png'),
backgroundColor: HexColor(COLOR_LIGHT_GREY),
radius: 15.0,
),
new Container(height: 15.0, width: 10.0, color: Colors.transparent),
],
);
}
// render the category items
Widget getCategoryItems(BuildContext context, Category cat) {
return ListView.builder(
itemBuilder: (context, index) {
String itemName = "Subcategory";
return new Row(children: <Widget>[
new Container(height: 40.0, width: 5.0, color: HexColor(cat.color)),
new Container(height: 40.0, width: 20.0, color: Colors.white),
new Container(
child: new Text(itemName),
color: Colors.white,
),
Spacer()
]);
},
itemCount: cat.items.length,
shrinkWrap: true,
physics:
ClampingScrollPhysics(),
);
}
}
</code></pre>
| 0non-cybersec
| Stackexchange |
Doctors Have Restored The Sight of Two People in a Monumental World First. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
[OC] Paratha bites filled with Mexican fajita chicken served with Indian style mint chutney - perfect breakfast stop when in Dubai. 😍🍃💦 [3” x 5”] (Picture taken by iPhone X). | 0non-cybersec
| Reddit |
arXiv:q-bio/0403033v1 [q-bio.MN] 23 Mar 2004
ar
X
iv
:q
-b
io
/0
40
30
33
v1
[
q-
bi
o.
M
N
]
2
3
M
ar
2
00
4
Graphic requirements for multistationarity
Christophe Soulé
CNRS et Institut des Hautes Études Scientifiques
2-06-2003
IHÉS 35 Route de Chartres 91440 Bures-sur-Yvette France
Tel:33 1 60 92 66 00
Fax: 33 1 60 92 66 09
Email: [email protected]
1
http://arxiv.org/abs/q-bio/0403033v1
Abstract
We discuss properties which must be satisfied by a genetic network in order
for it to allow differentiation.
These conditions are expressed as follows in mathematical terms. Let F be
a differentiable mapping from a finite dimensional real vector space to itself.
The signs of the entries of the Jacobian matrix of F at a given point a define
an interaction graph, i.e. a finite oriented finite graph G(a) where each edge
is equipped with a sign. René Thomas conjectured twenty years ago that, if F
has at least two non degenerate zeroes, there exists a such that G(a) contains a
positive circuit. Different authors proved this in special cases, and we give here
a general proof of the conjecture. In particular, we get this way a necessary
condition for genetic networks to lead to multistationarity, and therefore to
differentiation.
We use for our proof the mathematical literature on global univalence, and
we show how to derive from it several variants of Thomas’ rule, some of which
had been anticipated by Kaufman and Thomas.
2
When studying interactions in a system of biochemical compounds, it is quite
rare that one obtains quantitative results. One can show that, in a given tissue,
(the product of) a gene A is an activator (or a repressor) of the expression of a
gene B, but the strength of this interaction, the concentrations and their kinetics
are usually unknown. The resulting information is essentially summarized by an
interaction graph G, by which one means a finite oriented graph together with
a sign for every edge. The vertices correspond to the members of the network,
and there is a positive (resp. negative) edge from A to B when A activates
(resp. represses) the synthesis of B. Note that there can exist both a positive
and a negative edge from A to B, since A can activate B at some concentration
and repress it at some other.
These interaction graphs can be quite complicated. It is therefore very desir-
able to find ways to use them to restrict the possible behaviour of the network
they represent. In this paper, we shall address the question of when the net-
work is susceptible to have several stationary states. A beautiful conjecture of
R. Thomas [13] asserts that a necessary condition for multistationarity is that
G has an (oriented) circuit C which is positive, i.e. such that the product of
the signs of the edges of C is positive, at least in part of phase space. This was
already proved in several cases [11] [12] [7] [3], and we shall present a proof in
the general case (Theorem 1).
To formulate the question in mathematical terms, we choose a continuous
model. Let n ≥ 1 be an integer, and let F be a differentiable map from Rn
to itself. The evolution of a network of n compounds can be modelled by the
differential system
dx
dt
= F (x) ,
where x is a differential path in Rn: the components of x(t) are the different con-
centrations at time t. To ask whether this system has several stationary states
amounts to ask whether F has several zeroes. Given any a ∈ Rn, the interaction
graph G(a) is defined from the signs of the partial derivatives (∂fi/∂xj)(a) of
the components of F = (fi) at a (see 2.1 below for a precise definition) : a
positive (resp. negative) sign indicates that j is an activator (resp. a repressor)
of i. The precise formulation of Thomas’ rule is then the following: if F has
at least two (non-degenerate) zeroes in Rn, there exists a ∈ Rn such that G(a)
contains a positive circuit.
The main remark leading to a proof of this assertion is the following. If F has
several zeroes, it cannot be univalent (i.e. one to one). Therefore, if we know
sufficient conditions for F to be univalent, their negation will give necessary
conditions for F to have several zeroes. And we might then deduce properties
of G(a) from these necessary conditions.
It turns out that finding sufficient conditions for F to be univalent is a
classical issue in mathematical economy, when one wants to know that the
factor prices are uniquely determined by the prices for goods. Several results
3
have been obtained with this application in mind. G. Gale and H. Nikaido [5]
gave an elegant criterion of univalence in terms of the Jacobian matrix J(x) =
(∂fi/∂xj)(x): assume that, for every x ∈ R
n, the principal minors (resp. the
determinant) of J(x) are nonnegative (resp. is positive); then F is univalent.
As we shall see, this result leads precisely to a proof of Thomas’ conjecture
(Theorem 1).
Following the same line of arguments, we can also apply variants of the theo-
rem of Gale-Nikaido, which are discussed for instance in the book of T. Partha-
sarathy [10]. A motivation for doing so is that one may want to restrict the
domain of F to be the closed positive quadrant (since a concentration cannot
be negative). In general, F will be defined on a product Ω of n intervals, open
or not. However, in this generality, there exist counter-examples to the condi-
tion of Thomas (see 3.5). But, when F has at least two zeroes, we can still
find properties of its interaction graphs (Theorem 5), as a consequence of a uni-
valence theorem of Gale-Nikaido ([5] , [10]). Furthermore, it is often the case
that, when defining the interaction graph of several biochemical compounds, the
degradation of each of them is not taken into account. We show in Theorem 6
that this makes Thomas’ rule valid in full generality.
Another refinement of the theorem of Gale-Nikaido, due to C.B. Garcia and
W.I. Zangwill [6], applies to the case where Ω is closed and bounded. This
leads to Theorem 7 which, in turn, for general Ω, gives some information on the
location of the zeroes of F (Theorem 8).
The economist P.A. Samuelson imagined a stronger univalence criterion that
those above. It is not true for general F , but L.A. Campbell proved it when
Ω = Rn and F is algebraic, e.g. when each component of F is the quotient of two
real polynomials. In Theorem 9 we translate his result in terms of properties of
the interaction graph.
One can expect more graphical requirements for multistationarity. One of
them is a conjecture of M. Kaufman and R. Thomas [15], which is stronger than
the original Thomas’ conjecture. We have been unable to prove this assertion,
but we obtained some evidence for it in Theorems 3, 4 and 5.
The paper is organized as follows. The first section gives definitions about
graphs, matrices and determinants. It shows basic lemmas, which are standard
knowledge in the literature on interaction graphs. In section two we define the
interaction graphs G(a) and we state the conjectures of Thomas and Kaufman-
Thomas. In the third paragraph we prove the conjecture of Thomas and we give
some (counter)examples. In section four we discuss the conjecture of Kaufman-
Thomas. Next, we give results when the domain Ω is not necessarily open, and
we refine them in section six. Finally, we discuss the case of an algebraic map
in the last section.
The literature on the question studied here is scattered in several different
journals, and it has been crucial for me to receive papers from different authors.
4
I want to thank for that J. Aracena, O. Cinquin, J. Demongeot, J.L. Gouzé,
M.S. Gowda, M. Kaufman, D. Thiéfry and R. Thomas. I am also grateful to
the participants of the “Séminaire d’initiation à la génomique fonctionnelle”
of IHÉS, and especially to F. Képès, who explained the importance of genetic
networks, and first mentioned to me the rule of Thomas. Finally, I am extremely
thankful to M. Kaufman and R. Thomas for several discussions, where they
patiently and carefully explained their ideas, provided examples and encouraged
me to do this work.
1 Graphs and matrices
1.1
An interaction graph G = (V,E, sgn) is a finite oriented graph (V,E) together
with a sign map sgn : E → {±1}. In other words, V (the vertices) and E (the
edges) are two finite sets and each edge e ∈ E has an origin o(e) ∈ V and an
endpoint t(e) ∈ V (it may happen that o(e) = t(e)).
A circuit in G is a sequence of edges e1, . . . , ek such that o(ei+1) = t(ei) for
all i = 1, . . . , k − 1 and t(ek) = o(e1).
A hooping is a collection C = {C1, . . . , Ck} of circuits such that, for all i 6= j,
Ci and Cj do not have a common vertex. A circuit is thus a special case of
hooping. We let V (C) =
k
∐
i=1
V (Ci) be the (unordered) set of vertices of C. This
set V (C) will also be called the support of C. A hooping is called Hamiltonian
when its set of vertices is maximal, i.e. V (C) = V . Note that hoopings are
called ”generalized circuits”, or ”g-circuits” in [4], and Hamiltonian ones are
called ”full circuits” in [15].
The sign of a circuit C is
sgn (C) =
∏
e∈C
sgn (e) ∈ {±1} .
When sgn(C) = +1 (resp. −1) we say that C is positive (resp. negative). The
sign of a hooping C is
sgn (C) = (−1)p+1 , (1)
where p is the number of positive circuits in C (cf. [4]).
Given any subset I ⊂ V we let τI G the interaction graph obtained from
G by changing the sign of every edge e ∈ E such that t(e) ∈ I. Given any
permutation σ ∈ Aut(V ) of the vertices, we let σG be the interaction graph
obtained from G by replacing each edge j → i by an edge j → σ(i), with the
same sign.
5
1.2
Let n ≥ 1 be an integer and A = (aij) an n by n real matrix. We can attach
to A an interaction graph G as follows. The set of vertices of G is {1, . . . , n}.
There is an edge e with o(e) = j and t(e) = i if and only if aij 6= 0. The sign of
e is the sign of aij .
Given any subset I ⊂ {1, . . . , n}, the principal minor of A with support I is
the real number det (AI), where AI is the square matrix (aij)i,j∈I . By definition
det (AI) =
∑
σ∈ΣI
ε(σ)
∏
i∈I
aiσ(i) , (2)
where ΣI is the group of permutations of I and ε(σ) is the signature of σ
(Recall that ε is defined by the equalities ε(σσ′) = ε(σ) ε(σ′) for all σ, σ′ ∈ ΣI
and ε(σ) = −1 when σ ∈ ΣI is a transposition).
For any σ ∈ ΣI we let
a(σ) = ε(σ)
∏
i∈I
aiσ(i) (3)
so that
det (AI) =
∑
σ∈ΣI
a(σ) .
When a(σ) 6= 0, we let sgn (a(σ)) = ±1 be its sign.
Let D = diag(d1, . . . , dn) be a diagonal n by n real matrix and I ⊂ Σ any
subset. It follows from the definition (2) that
det((A+D)I) =
∑
J⊂I
det(AJ )
∏
i∈I−J
di . (4)
Given I ⊂ V any subset, we let τI A be the matrix obtained from A by
replacing aij by −aij whenever i ∈ I. Given any σ ∈ Σn = Aut(V ) we let σA
be the product of A with the permutation matrix defined by σ. Clearly
G(τI A) = τI G(A)
and
G(σA) = σG(A) .
1.3
We keep the notation of the preceeding paragraph. Note that, given any per-
mutation σ ∈ ΣI , there is a unique decomposition
I = I1 ∐ I2 ∐ . . .∐ Ik
6
of I into a disjoint union of nonempty subsets such that the restriction σα of σ
to Iα is a cyclic permutation for all α = 1, . . . , k. Let C(σα) be the circuit of G
with edges (i, σα(i)), i ∈ Iα (note that aiσα(i) 6= 0 since a(σ) 6= 0). We denote
by C(σ) the hooping of G which is the disjoint union of the circuits C(σα),
α = 1, . . . , k.
When X is a finite set, we let # (X) be its cardinality. The following lemma
is due to J.Eisenfeld and C.DeLisi ([4], Appendix, Lemma 2), and is probably
at the origin of the definition (1).
Lemma 1. Let I ⊂ {1, . . . , n} be any subset and let σ ∈ ΣI be such that
a(σ) 6= 0. Then the following identity holds
sgn (C(σ)) = sgn (a(σ)) (−1)#(I)+1 .
Proof. Since ε(σ) =
k
∑
α=1
ε(σα) and I =
∐
α
Iα, we get from (3) that
a(σ) =
∏
α
a(σα) . (5)
For each α = 1, . . . , k, since σα is cyclic we have
ε(σα) = (−1)
#(Iα)+1 .
The circuit C(σα) is positive if and only if
∏
i∈Iα
aiσα(i) is positive, in which case
we get from (3) that
sgn (a(σα)) = (−1)
#(Iα)+1 . (6)
When C(σα) is negative we get
sgn (a(σα)) = (−1)
#(Iα) . (7)
Therefore, by (5), (6), (7), we get
sgn (a(σ)) = (−1)p (−1)
∑
α
#(Iα)
= (−1)p (−1)#(I) ,
where p is the number of positive circuits in C(σ). Since, by (1), sgn (C(σ)) =
(−1)p+1, the lemma follows.
1.4
From Lemma 1 we get the following:
Lemma 2. Let A be an n by n real matrix and let I ⊂ {1, . . . , n} be any subset.
7
i) Assume that det(−AI) is negative (resp. positive). Then there exists a positive
(resp. negative) hooping in G(A) with support I.
ii) Assume det(−AI) = 0. Then either there exist two hoopings in G(A) with
opposite signs and support I, or there is no hooping in G(A) with support I.
Proof. From (2) we get
det(−AI) = (−1)
#(I) det(AI) .
Therefore, by Lemma 1,
det(−AI) = −
∑
σ∈ΣI
sgn(C(σ))|a(σ)| . (8)
Assume det(−AI) is negative (resp. positive). Then, by (8), there exists σ ∈ ΣI
such that C(σ) is positive (resp. negative). This proves i).
If det(−AI) = 0, either there exist two summands with opposite signs on the
right hand side of (8), or a(σ) is zero for all σ ∈ ΣI . This proves ii), since every
hooping of G(A) with support I is of the form C(σ) for some σ ∈ ΣI .
2 Conjectures on multistability
2.1
Let Ωi be a nonempty interval in R:
Ωi = ]ai, bi[ , [ai, bi[ , ]ai, bi] or [ai, bi] ,
with ai ≥ −∞ and bi ≤ +∞. Denote by Ω ⊂ R
n the product Ω =
n
∏
i=1
Ωi.
Consider a map
F : Ω → Rn
which is differentiable, i.e. such that, for each i, j ∈ {1, . . . , n} and any a ∈ Ω,
the i-th component fi of F has a partial derivative
∂fi
∂xj
(a) at the point a and
fi(x) = fi(a) +
n
∑
j=1
∂fi
∂xj
(a)(xj − aj) + o(‖x− a‖) ,
where ‖x− a‖ is the norm of x− a and o is the Landau o-symbol (we could also
use a weaker notion of differentiability, see [8]). The map F is called C1 when
every partial derivative ∂fi/∂xj is continuous on Ω.
For any a ∈ Ω, the Jacobian of F at a is the n by n real matrix
J(a) = J(F )(a) =
(
∂fi
∂xj
(a)
)
.
8
For any a ∈ Ω we let
G(a) = G(J(a))
be the interaction graph of J(a), defined as in 1.2. We also let G(F ) be the
interaction graph defined as follows. Its set of vertices is V = {1, . . . , n}. Given
i and j in V , there is at most one positive (resp. negative) edge from j to i; it
exists if and only if there is a positive (resp. negative) path in G(a) for some
a ∈ Ω. In other words, G(F ) is the “superposition” of all the interaction graphs
G(a).
Given any subset I ⊂ V , we let τI F be the map obtained from F = (fi)
by replacing fi by −fi when i ∈ I. Given σ ∈ Σn, we let σF = (fσ−1(i)). The
interaction graphs of στI F are στI G(a), a ∈ Ω, and στI G(F ).
2.2
We shall be interested in the set of zeroes of F , i.e. the points a ∈ Ω such
that F (a) = 0. They can be viewed as the stationary states of the system of
differential equations
dx(t)
dt
= F (x) ,
where x(t) is a differentiable mapping from a real interval to Ω.
We say that a zero a of F is nondegenerate when det(J(a)) 6= 0.
2.3 Conjecture 1. (Thomas [13])
Assume that Ω is open and that F has at least two nondegenerate zeroes in Ω.
Then there exists a ∈ Ω such that G(a) contains a positive circuit.
Remark. This conjecture has already been proved in several cases. First, it is
known to hold when the signs of the entries in J(a) are independent of a ∈ Ω
[11] [7]; see also [12] and the remark in 5.2 below. It was also shown in [3] for
stable stationary states when Ω contains the positive quadrant and fi(x) > 0
whenever xi = 0.
2.4 Conjecture 2. (Kaufman-Thomas [15])
Under the same assumption as Conjecture 1,
i) Either there exist a ∈ Ω such thatG(a) has a positive Hamiltonian hooping
and a negative Hamiltonian hooping.
ii) Or there is a cyclic permutation σ of a subset of {1, . . . , n} and there exist
a, b ∈ Ω such that the circuit C(σ) in G(a) (resp. in G(b)) is positive (resp.
negative).
Note that Conjecture 2 for F implies Conjecture 1 for F . It is quite different
though, since positive and negative circuits play in it a symmetric role. In case
9
i) we shall say that ”G has two Hamiltonian hoopings of opposite signs” and
in case ii) we shall say that “G has an ambiguity”. In the latter case, G(F )
contains two circuits with the same ordered set of vertices and opposite signs
(but ii) is stronger than that statement).
3 A proof of Thomas’ Conjecture 1
3.1
Theorem 1. Assume Ω is open and F has at least two nondegenerate zeroes
in Ω. Then, for every I ⊂ V and every σ ∈ Σn, there exists a ∈ Ω such that
στI G(a) has a positive circuit. In particular, Thomas’ Conjecture 1 holds true.
Since στI G(x) = G(στIJ(x)) and since στI(F ) satisfies the hypotheses of
Theorem 1 if and only if −F does, we just have to check that, for some a ∈ Ω,
the interaction graph G(−J(a)) has a positive circuit. According to Lemma 2
i), it will be enough to show that, for some a ∈ Ω, a principal minor of −J(a)
is negative. In other words:
Theorem 1’. Assume that, for every a ∈ Ω, all the principal minors of −J(a)
are nonnegative. Then −F can have at most one nondegenerate zero.
3.2
For any positive real number λ let
φλ(x) = −F (x) + λx .
Since
J(φλ) = −J(F ) + diag(λ, . . . , λ) ,
it follows from (4) that, under the hypotheses of Theorem 1’, each principal
minor of J(φλ) is positive on Ω. According to Gale and Nikaido, [5] Theorem
4, this implies that φλ is univalent. The following proposition ends the proof of
Theorem 1’:
Proposition 1. Let φ = Ω → Rn be a differentiable map defined on an open
set Ω ⊂ Rn. Assume that, for all λ > 0, the map
φλ(x) = φ(x) + λx
is univalent. Then φ can have at most one nondegenerate zero in Ω.
10
3.3
The proof of Proposition 1 proceeds as [5] Theorem 4’ and [10], IV, Theorem
4, p. 35. Assume a and b are two nondegenerate zeroes of φ in Ω. According to
[1], XII, § 2.9, p. 477, we can choose open neighborhoods Ua and Ub of a and b
respectively such that Ua ∩ U b = ∅, Ua ⊂ Ω, Ub ⊂ Ω, a (resp. b) is the unique
zero of φ in Ua (resp. U b), and the degrees deg(φ, Ua, a) and deg(φ, U b, 0) are
equal to ±1. Arguing as in [10] (or [5]), loc.cit., we get
1 = deg(φ, Ua ∪ U b, 0) = deg(φ, Ua, 0) + deg(φ, U b, 0) ,
hence a contradiction. q.e.d.
3.4
The restriction to nondegenerate zeroes of F in Theorem 1 is necessary. For
example, if n = 2, Ω = R2 and
F (x, y) = (−xy2,−y)
we have
−JF (x, y) =
(
y2 2xy
0 1
)
.
Clearly G has no positive circuit. However F (x, 0) = 0 for any x ∈ R.
3.5
It is also essential that Ω be open. Let Ω be the set of (x, y) ∈ R2 such that
x ≥ 0 and y ≥ 0. Consider the map F : Ω → R2 defined by
F (x, y) = ((y − 2)2 − x2 − 1, 4x− 4xy) .
We get
−JF (x, y) =
(
2x 4− 2y
2y − 4 2x
)
.
Therefore, by (8), G(F ) does not have any positive circuit. On the other hand
both (0, 3) and (0, 1) are nondegenerate zeroes of F in Ω. We shall discuss the
case of an arbitrary Ω in sections five and six below.
4 On the conjecture of Kaufman-Thomas
4.1
We first assume that n = 2. Let Ω ⊂ R2 be as in 2.1 and open, with coordinates
x and y. For any h : Ω → R we write h ≡ 0 to mean that h(a) = 0 for every
11
a ∈ Ω. If h is differentiable, we let hx (resp. hy) be its partial derivative with
respect to the first (resp. second) variable.
Let
F = (f, g) : Ω → R2
be a differentiable mapping.
Theorem 2. Assume that F has at least two nondegenerate zeroes in Ω. Then,
one of the following conditions holds:
i) G has two Hamiltonian hoopings of opposite signs;
ii) G has an ambiguity;
iii) fx gy ≡ 0 but fx 6≡ 0 and gy 6≡ 0.
Proof. Assume that G has no ambiguity, and that its Hamiltonian hoopings
have all the same sign. If, in addition, fx gy 6≡ 0, since the sign of fx(a) (resp.
gy(a)) is independent of a, we can multiply f and g by ±1 to get to the case
where fx(a) ≥ 0 and gy(a) ≥ 0 for all a ∈ Ω. It follows that fx(a) gy(a) ≥ 0
and, since all Hamiltonian hoopings have the same sign, fy(a) gx(a) ≤ 0 (by
Lemma 1). Therefore Theorem 1’ applies to F and we conclude that F has at
most one nondegenerate zero.
Assume now that gy ≡ 0. After multiplying f and g by ±1 we can assume
that fx ≥ 0 and fy gx ≤ 0. Once again, Theorem 1’ implies that F has at most
one nondegerate zero. q.e.d.
4.2
With an additional assumption, Conjecture 2 is true for all n ≥ 2:
Theorem 3. Let F : Ω → Rn be a differentiable mapping such that Ω is
open and F has at least two nondegenerate zeroes. Then, one of the following
conditions holds:
i) G has two Hamiltonian hoopings with opposite signs;
ii) G has an ambiguity;
iii) for any point a ∈ Ω there exists i ∈ {1, . . . , n} such that G(a) does not
contain an edge from i to itself.
Proof. Assume that all Hamiltonian hoopings in G have the same sign, that
G has no ambiguity and that, for some a ∈ Ω, and for any i ∈ {1, . . . , n}, there
is an edge in G(a) from i to itself. The last condition means that all diagonal
entries in J(a) are nonzero. After multiplying each component of F by ±1 we
can assume that all diagonal entries of J(a) are positive. Let C be any hooping
12
in J(a), and let I be its set of vertices. The disjoint union of C with all the
circuits i → i, i ∈ {1, . . . , n} − I, is a Hamiltonian hooping of G(a). Its sign
must be the sign of the Hamiltonian hooping which is the disjoint union of all
the positive circuits i → i, i ∈ {1, . . . , n}, namely (−1)n+1. We conclude that
sgn (C) = (−1)#(I) .
By Lemma 1, this implies that C = C(σ) with sgn(a(σ)) = +1, σ ∈ ΣI . Since
G has no ambiguity, for any σ ∈ ΣI we have sgn (a(σ)) ≥ 0 in Ω. Therefore,
for any x ∈ Ω, all the principal minors of J(x) are nonnegative. Applying
Theorem 1’, we conclude that F has at most one nondegenerate zero.
4.3
Concerning the graph G(F ) (see 2.1) we can prove the following:
Theorem 4. Let F : Ω → Rn be a differentiable mapping such that Ω is open
and F has at least two nondegenerate zeroes. Then G(F ) has two Hamiltonian
hoopings with opposite signs.
Proof. We first remark that we can find a ∈ Ω and σ ∈ Σn such that none of
the diagonal entries in J(σF )(a) is zero. Indeed these entries are, by definition,
∂f
σ−1(j)
∂xj
(a), j = 1, . . . , n, and, when a is a non degenerate zero of F , it follows
from (1) that, for some σ ∈ Σn,
n
∏
i=1
∂fi
∂xσ(i)
(a) 6= 0.
This proves the claim.
We may then choose I such that all the diagonal entries in J(τI σF )(a) are
negative. In other words, for each i ∈ {1, . . . , n}, the interaction graph τI σG(a)
contains a negative edge i → i. On the other hand, by Theorem 1, there exists
b ∈ Ω such that τI σG(b) has a positive circuit C. In τI σG(F ) the disjoint union
of C with the negative edges i → i, i /∈ V (C), is a positive Hamiltonian hooping,
when the union of all the negative edges i → i, i ∈ {1, . . . , n}, is a negative one.
It is thus enough to show that, if τIG(F ) or σG(F ) has two Hamiltonian
hoopings with opposite signs, the same is true for G(F ). This is clear for τIG(F )
and, for σG(F ), it follows from Lemma 3 below.
4.4
Lemma 3. Let G be any interaction graph, σ ∈ Aut(V ) a permutation of its
vertices, and C an Hamiltonian hooping in G. The image of C in the interaction
graph σG is then an Hamiltonian hooping with sign ε(σ)sgn(G).
13
Proof. Recall from 1.1 that σG is obtained from G by replacing each edge
j → i by an edge j → σ(i), with the same sign. As a collection of edges, C has
a well defined image σC in σG. To check Lemma 3 we may assume that σ is
the transposition of two vertices i and j (transpositions span Aut(V )).
Assume first that i and j are in the same circuit C1 of C. Then all the circuits
in C other than C1 are fixed by σ. The image of C1 consists of two disjoints
circuits D1 and D2. More precisely, if the vertices of C1 are 1 2 . . . i . . . j . . .m
(as we can assume), we get
σC1 = D1
∐
D2
where the sequence of vertices in D1 (resp. D2) is 1 2 . . . i−1 j j+1 . . . k 1 (resp.
i i+1 . . . j−1 i). Furthermore, if C1 has an even (resp. odd) number of negative
edges, D1 and D2 will have the same (resp. a different) number of edges modulo
two. From this it follows that σC is a Hamiltonian hooping such that, with the
definition (1),
sgn(σC) = −sgn(C),
as was to be shown.
Note that we also have
C1 = σD1
∐
σD2,
therefore, by exchanging the roles of C and σC, the previous discussion applies
also to the case where i and j lie in two different circuits of C.
q.e.d.
5 The case of a domain which is not open
5.1
We keep the notation of 2.1, where Ω is an arbitrary product of intervals and
F : Ω → Rn is differentiable.
Theorem 5.
Assume that F is not univalent. Then:
1) For every σ ∈ Σn,
i) Either there exists a ∈ Ω and i ∈ V such that σG(a) does not contain any
edge from i to itself;
ii) Or, for any subset I ⊂ V , there exists a ∈ Ω such that τI σG(a) has a
positive circuit.
2) When the condition 1) i) above is not satisfied, G(F ) contains both a positive
and a negative Hamiltonian hooping.
Proof. The map F is univalent if and only if τI σF is. So, to prove 1), we can
restrict our attention to −F . Note also that i) is equivalent to the assertion
14
that there exists I ⊂ V such that σG(a) does not contain any hooping with
support I. According to Lemma 2 ii), if none of the conclusions in 1) is true, all
the principal minors of the Jacobian matrix of −F are positive on Ω. By the
Gale-Nikaido theorem, [5] Theorem 4, this implies that −F is univalent. This
proves 1).
To prove 2), by replacing F by τI F for an appropriate choice of I, we can
assume that, for each vertex i in G(F ), there is a negative edge from i to itself.
Since G(F ) also contains a positive circuit by 1), we get, as in 4.3 above, that
G(F ) contains both a positive and a negative Hamiltonian hooping.
Remark.Since the condition 1) i) is often satisfied, when Ω is open Theorem 5
is much weaker than Theorems 1 and 4.
5.2
Here is a variant of Theorem 5.
Theorem 6. Assume given, for every a ∈ Ω, a diagonal matrix D(a) with pos-
itive entries. Assume F is not univalent. Then, for some a ∈ Ω, the interaction
graph
H(a) = G(J(a) +D(a))
has a positive circuit.
Proof. Assume that, for any a ∈ Ω, none of the circuits of H(a) is positive.
We know from Lemma 2 i) that all the principal minors of −J(a) − D(a) are
nonnegative. From (4) this implies that all the principal minors of −J(a) are
positive, and, again by [5] Theorem 4, F must be univalent.
Remark. Theorem 6 applies to the situation considered for instance in [14]
and [9], where −D(a) comes from ”terms of decay”, which are not taken into
account when drawing the interaction graph. It was proven by Snoussi [12]
when the signs of the entries of J(a) are constant.
6 On the location of stationary states
6.1
Assume that Ω =
n
∏
i=1
[ai, bi] is a closed bounded subset of R
n. In that case,
Garcia and Zangwill got a stronger result that Gale-Nikaido ([6], see also [10],
V, Theorem 1, p. 41). For any I ⊂ V define Ic = V − I and, for any n by n real
matrix A, let
mI(A) = det(AIc)
and
mi(A) = m{i}(A)
15
for each i ∈ V . When x lies in Ω, we write mI(x) for mI(J(x)) and mi(x) =
mi(J(x)). Define I(x) ⊂ V as the set of vertices i such that xi = ai or xi = bi.
The result of Garcia-Zangwill is the following
Theorem 7’. Assume F is C1 and that, for every a ∈ Ω, and every subset
I ⊂ I(a),
mI(a)
∏
i∈I
mi(a) > 0 .
Then F is univalent.
In particular, when a ∈
◦
Ω=
n
∏
i=1
]ai, bi[, I(a) = ∅ and the only assertion made
is that detJ(a) > 0.
When F is only differentiable, see [8], p. 930, Remark.
6.2
Theorem 7’ implies the following refinement of Theorem 5:
Theorem 7. Assume that Ω is bounded and closed, and that F : Ω → Rn is
C1. If F is not univalent, for every σ ∈ Σn, one of the following conditions
holds true:
i) There exists a ∈ Ω and I ⊂ I(a) such that no hooping of σG(a) has support
Ic, or σG(a) contains two hoopings with support Ic and opposite signs.
ii) There exists a ∈ ∂Ω = Ω−
◦
Ω, I ⊂ I(a) and hoopings CI and Ci, for each
i ∈ I, in σG(a) such that #(I) ≥ 2, the support of CI (resp. Ci) is I
c (resp.
{i}c), and
sgn(CI)
∏
i∈I
sgn(Ci) > 0 .
Furthermore, either #(I) is even or there exist b ∈ ∂Ω, I ′ ⊂ I(b), CI′ , Cj,
j ∈ I ′, with similar properties as above and
sgn(CI′)
∏
j∈I′
sgn(Cj) < 0 .
Proof. Again, it is enough to treat the case σ = 1. When F is not univalent
we know from Theorem 7’ that there is a ∈ Ω and I ⊂ I(a) such that
mI(a)
∏
i∈I
mi(a) ≤ 0 .
Assume mI(a) = 0. Then, by Lemma 2 ii), the statement i) must hold.
Assume now, that, for all J ⊂ I(a), mJ (a) 6= 0. Since
mI(a)
∏
i∈I
mi(a) < 0
16
we must have #(I) ≥ 2. Furthermore, for every vertex k ∈ V , if we replace F by
τk F = τ{k} F the quantity mI(a) is multiplied by +1 (resp. −1) if k ∈ I (resp.
k ∈ Ic). Therefore, in all cases, mI(a)
∏
i∈I
mi(a) gets multiplied by (−1)
#(I). It
is thus invariant if and only if #(I) is even. If this number is odd, we apply the
same discussion to −F and we get b and I ′ such that
mI′(b)
∏
j∈I′
mj(b) > 0 .
Using (8), the statement i) follows.
6.3
Let Ω =
n
∏
i=1
Ωi be an arbitrary product of intervals as in 2.1 and let F : Ω → R
n
be a C1 map. From Theorem 7 one gets some information on where two zeroes
of F can be:
Theorem 8. Fix σ ∈ Σn. Assume that there exist two points a and b in Ω such
that F (a) = F (b). Assume furthermore that, when x lies in
◦
Ω, all hoopings of
σG(x) are negative. Then there exists x ∈ Ω such that, when xi ∈ ∂Ωi, the i-th
coordinate of a or b is equal to xi, and a subset I ⊂ I(x) such that no hooping
in σG(x) has support equal to Ic.
Proof. One can find a bounded closed product of intervals Ω′ ⊂ Ω containing
a and b and such that, whenever x ∈ Ω′ and xi ∈ ∂Ωi, the i-th coordinate of
a or b is equal to xi. Since the restriction of F to Ω
′ is not univalent, we can
apply Theorem 7. We are not in case ii) because, J(x) being continuous in x,
for every x ∈ Ω′ all the hoopings of G(x) are nonpositive.
Therefore Theorem 7 i) holds true for some x ∈ Ω′, hence the conclusion.
q.e.d.
7 The algebraic case
Assume now that Ω = Rn and that F is C1 and algebraic, by which we mean that
its graph {(x, F (x))} ⊂ Rn×Rn is the set of zeroes of a family of real polynomials
in 2n variables. This will be the case for instance when each component fi of
F is the quotient of two polynomials in n variables. In that case, a result of
Campbell [2] leads to a stronger conclusion than Theorem 5 1).
Theorem 9. Choose any ordering of V . Let
F : Rn → Rn
17
be a C1 map which is not univalent. Then we can choose k ≤ n such that, if I
consists of the first k vertices,
i) Either G(F ) has two hoopings of opposite signs and support equal to I;
ii) Or there exists a ∈ Rn such that none of the hoopings of G(a) has support
equal to I.
Proof. For any k ≤ n and a ∈ Rn we let
dk(a) = det(J(a)I) .
According to [2], if dk(a) > 0 for all k = 1, . . . , n, the map F is univalent.
Therefore, under our assumption, dk(a) ≤ 0 for some a and some k. When
dk(a) = 0, either i) or ii) is true (by Lemma 2 ii)). Given i ∈ V , when we
replace F by τi F , dk(a) gets multiplied by −1 (resp. +1) if i ≤ k (resp.
i > k). So we can assume that, for every I ⊂ V , there exist k and a such that
τI dk(a) < 0 (with obvious notation). By replacing F by τ1 F we see that we
can also assume that there exist k′ and b such that τI dk′(b) > 0.
Unless i) or ii) holds, we can assume (using Lemma 2 again) that for every
I ⊂ V and every k ≤ n the sign of τI dk(x) does not depend on x ∈ R
n. Let
then m be the maximum of all integers p such that, if i ≤ k ≤ p, dk(x) and d1(x)
have the same sign. When m < n, we can increase m by m+ 1 by replacing F
by τm+1 F . By repeating this process, we find I such that τI dk(x) has a fixed
sign for every k ≤ n and every x ∈ Rn. As we saw in the previous paragraph,
this cannot happen. q.e.d.
References
[1] P. Alexandroff, H. Hopf, Topologie, Band 1, Berichtigter Reprint,
Die Grundlehren der mathematischen Wissenschaften, Band 45, Berlin-
Heidelberg-New York, Springer-Verlag, XIII, (1974), 636 p.
[2] L.A. Campbell, Rational Samuelson maps are univalent , J. Pure Appl.
Algebra 92, No.3 (1994), 227-240.
[3] O. Cinquin, J. Demongeot, Positive and negative feedback: striking a bal-
ance between necessary antagonists, J. Theoretical Biology 216 (2002), 229-
241.
[4] J.Eisenfeld, C. DeLisi, On conditions for qualitative instability of regulatory
circuits with application to immunological control loops, in Mathematics
and Computers in Biomedical Applications, J.Eisenfeld and C.DeLisi eds.,
Elsevier, Amsterdam (1985), 39-53.
18
[5] D. Gale, H. Nikaido, The Jacobian matrix and global univalence of map-
pings, Math. Annalen 159 (1965), 81-93.
[6] C.B. Garcia, W.I. Zangwill, On univalence and P-matrices, Linear Algebra
Appl. 24, (1979), 239-250.
[7] J.-L. Gouzé, Positive and negative circuits in dynamical systems, J. Biol.
Sys. 6 (1998), 11-15.
[8] M.S. Gowda, G. Ravindran, Algebraic univalence theorems for nonsmooth
functions, J. Math. Anal. Appl. 252, No.2, (2000), 917-935.
[9] M. Kaufman, R. Thomas, Model analysis of the the bases of Multistation-
arity in the Humoral Immune Response, J. Theoretical Biology 129 (1987),
141-162.
[10] T. Parthasarathy, On global univalence theorems, Lecture Notes in Math-
ematics,977 (1983), Berlin-Heidelberg-New York, Springer-Verlag .
[11] E. Plahte, T. Mestl, W.S. Omholt, Feedback circuits, stability and multi-
stationarity in dynamical systems, J. Biol. Sys. 3 (1995), 409-413.
[12] E.H. Snoussi, Necessary conditions for multistationarity and stable period-
icity, J. Biol. Sys. 6 (1998), 3-9.
[13] R. Thomas, On the relation between the logical structure of systems and
their ability to generate multiple steady states or sustained oscillations,
Springer Series in Synergetics, 9 (1981), 180-193.
[14] R. Thomas, Logical description, analysis, and feedback loops, in Aspects of
Chemical Evolution, G. Nicolis ed., XVII-th Solvay Conference on Chem-
istry (1980), John Wiley and Sons, 247-282.
[15] R. Thomas, M. Kaufman, Multistationarity, the basis of cell differentia-
tion and memory. I. Structural conditions of multistationarity and other
nontrivial behaviour, Chaos 11 (2001), 170-179.
Keywords : interaction graph, multistationarity, Jacobian matrix, global
univalence.
19
| 0non-cybersec
| arXiv |
Unable to join windows server 2012 r2 domain. <p>Hi I'm using two virtual box machines one machine is win7 and other win server 2012 r2. When I try to join the domain it get the following message An Active directory Domain Controller (AD DC) could not be contacted.
I have done ipconfig/all if it helps
I did nslookup found the DNS request time out. So where to from here? How do I fix this issue?</p>
<p>P.S I'm new at this! </p>
<hr>
<p>Vbox network settings Internal cable is connected.</p>
<pre><code>C:\Users\Administrator>ipconfig/all
Windows IP Configuration
Host Name . . . . . . . . . . . . : SERVER2012VM_SH
Primary Dns Suffix . . . . . . . : nwk305sh.local
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : nwk305sh.local
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Desktop Adapter
Physical Address. . . . . . . . . : 08-00-27-50-1C-3F
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.1.10.2(Preferred)
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . : 10.1.10.1
DNS Servers . . . . . . . . . . . : 10.1.10.2
10.1.10.1
NetBIOS over Tcpip. . . . . . . . : Enabled
</code></pre>
<p>Win7 <code>ipconfig</code></p>
<pre><code>Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : NWK305sh.local
IPv4 Address. . . . . . . . . . . : 10.1.10.100
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . : 10.1.10.1
Tunnel adapter isatap.NWK305sh.local:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : NWK305sh.local
C:\Users\Win7-SH>
</code></pre>
| 0non-cybersec
| Stackexchange |
Tragedy after login Unity from unity-greeter (lightdm) launched from processing unity. <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://askubuntu.com/questions/73576/appearance-does-not-change-on-switching-the-theme">Appearance does not change on switching the theme</a> </p>
</blockquote>
<p><strong>Prorouge</strong> <em>:( Naughty Me haz launched unity-greeter (lightdm) on gnome-terminal with processing unity.</em></p>
<p>I accidentally login with the same user with my single click.</p>
<p><strong>Edit</strong> It seems it would be easier to figure it out by graphic:</p>
<p><img src="https://i.stack.imgur.com/iTK0O.png" alt="reproduce step"></p>
<p>Then I clicked the box and logged in.</p>
<p>The theme all sessions in the same user account changes like the following:</p>
<p><img src="https://i.stack.imgur.com/gcWRW.png" alt="problem shot"></p>
<p><img src="https://i.stack.imgur.com/2l6JO.png" alt="problem shot2"></p>
<p><img src="https://i.stack.imgur.com/IRkmB.png" alt="problem shot3"></p>
<p>In my opinion, this maybe a problem of mis-detection of icon-theme? or GTK+ theme? or Shell theme?</p>
<p>Or, worst, the broken behavior of whole system before login</p>
<p>I have try these steps but meaningless ( in my own user ):</p>
<blockquote>
<ol>
<li>reboot</li>
<li>unity --reset && reboot</li>
<li>rm -rf ~/.config/compiz && reboot</li>
<li>apply theme at System Setting > Appearance and reboot</li>
<li>reinstall unity-greeter, lightdm</li>
</ol>
</blockquote>
<p>Here are the facts I have found out:</p>
<blockquote>
<ol>
<li>ugly-themed interface in gnome3-fallback-session, Unity 2D, Unity with the same user</li>
<li>normal interface in Guest session</li>
<li>broken shutdown function in whole system EVEN before the broken user has been logged in ( in a new boot up process ).</li>
</ol>
</blockquote>
<p>According to fact#3, I weakly believe everything goes wrong before the broken user has been logged in.</p>
<p>Series of problems are brought out, something like</p>
<blockquote>
<ol>
<li>unable to unlock user (account) setting with disabled unlock button ( and add & delete button )</li>
<li>crash in ubuntu software center</li>
</ol>
</blockquote>
<p>Due to the fact that I have found out many 'complication', I believe that I would reinstall the whole system if it cannot be solved by fixing a little but major problem.</p>
<p>Thanks for involvement. :)</p>
| 0non-cybersec
| Stackexchange |
Killer Sweet Potato and Black Beans Combo. | 0non-cybersec
| Reddit |
Execute a script on package manager console via Tools > External tools. <p>I would like to be able to run Entity Framework Cores dbScaffold by using a shortcut. so far this works well if I use entity framework core's CLI tools and link that script as external tool (<a href="https://nickmeldrum.com/blog/how-to-run-powershell-scripts-from-solution-explorer-in-visual-studio-2010" rel="nofollow noreferrer">as described here</a>).</p>
<p>but this requires the EF tools to be installed. If I execute that script in package manager console just having the EF Core Design nuget package referenced is enough. </p>
<p>So my question is: Is there any way to execute a .ps1 script from Tools > External tools inside Visual studio 2019 on the package manager console?</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Thousand year of death monkey style.. | 0non-cybersec
| Reddit |
Microsoft Word - ARXIV-PQC-EXTENDED TRIPLE DECOMPOSITION PROBLEM v0.2.docx
PQC: Extended Triple Decomposition Problem
(XTDP) Applied To GL(d, Fp) – An Evolved
Framework For Canonical Non-Commutative
Cryptography
P. Hecht
1
Abstract— Post-Quantum Cryptography (PQC) attempts to find
cryptographic protocols resistant to attacks using Shor’s polynomial
time algorithm for numerical field problems or Grover’s search
algorithm. A mostly overlooked but valuable line of solutions is
provided by non-commutative algebraic structures, specifically
canonical protocols that rely on one-way trapdoor functions (OWTF).
Here we develop an evolved algebraic framework who could be
applied to different asymmetric protocols. The (canonic) trapdoor
one-way function here selected is a fortified version of the Triple
decomposition Problem (TDP) developed by Kurt. The original
protocol relies on two linear and one quadratic algebraic public
equation. As quadratic equations are much more difficult to
cryptanalyze, an Algebraic Span Attack (ASA) developed by Boaz
Tsaban, focus on the linear ones. This seems to break our previous
work. As countermeasure, we present here an Extended TDP (cited
as XTDP in this work). The main point is that the original public
linear equations are transformed into quadratic ones and the same is
accomplished for exchanged tokens between the entities. All details
not presented here, could be found at the cited references.
Keywords – Post-Quantum Cryptography, Non-Commutative
Cryptography, General Linear Group, Linear Algebra, Triple
Decomposition Problem, OWTF, IND-CCA2.
1. INTRODUCTION.
2. ALGEBRAIC SPAN ATTACK (ASA)
At time of publishing [6], we were not aware of the ASA
attack developed by Tsaban and others [8]. It seems a fruitful
way of cryptanalyzing non-commutative canonical protocols.
As that paper declares, TDP is the only canonical protocol that
is non-affected by earlier methods and that was also our own
idea about it and the motivation to adopt it.
ASA concentrates on a weak point of TDP. This protocol
manages public keys in format of two linear equations with
two unknowns each and a quadratic one with three unknowns.
Tsaban paper exposes the strong point of ASA: quadratic
equations may be very difficult to solve, so he targets the
linear equations with algebraic spans.
An obvious defense could be to extend TDP so that all
public components are quadratic and that is the main point and
purpose to present XTDP, an extension of the original
framework. Further study will support the ASA resistance
conjecture of XTDP or find an alternative way of
cryptanalyzing it, perhaps by a new algebraic attack.
3. TDP REVISITED.
Post-Quantum Cryptography (PQC) is a trend that has an
official NIST status [1,2] and which aims to be resistant to
quantum computers attacks like Shor [3] and Grover [4]
algorithms. NIST initiated last year a process to solicit,
evaluate, and standardize one or more quantum-resistant
public-key cryptographic algorithms [1]. Particularly Shor
algorithm provided a quantum way to break asymmetric
protocols.
Security of a canonical non-commutative protocol always
relies his security on a one-way trapdoor function (OWTF)
[5]. For instance, in an algebraic context, the conjugacy search
problem, decomposition problem, double coset problem,
triple decomposition problem, factorization search problem,
commutator based or simultaneous conjugacy search
problem. All are hard problems assumed to belong to AWPP
time-complexity (but out of BQP), which yield convenient
computational security against current quantum attacks.
In a previous work [6], we developed a framework based
on the GL(d, Fp), working with d-dimensional non-singular
matrices of elements in Zp and presented a full solution of a
KEM based on p=251 field and using Kurt’s TDP [5, 7]. More
details could be consulted on that paper.
1
Pedro Hecht: Maestría en Seguridad Informática, FCE-
FCEyN-FI (Universidad de Bs Aires) [email protected]
All details could be found at [5, 6, 7], but a short overview
will help as an introduction to XTDP.
The public platform is a monoid M with two separate sets
of five subsets each affected by invertibility and
commutativity restrictions. In our framework, all subsets
belongs to GL(d, Fp), the general linear group. The two sets
are defined as A and B and their subsets are:
A : {A1, A2, A3, X1, X2}
B : {B1, B2, B3, Y1, Y2}
Subjected to following restrictions:
(invertibility) {X1, X2, Y1, Y2} should be invertible. In
our specific platform, all subsets are invertible.
(commutativity) [A2,Y1]=[A3,Y2]=[B1,X1]=[B2,X2]=I in
terms of group commutators.
Alice and Bob agree on using respectively A and B. All
lowercase variables are random non-biased selections of
uppercase sets (i.e., ai E Ai).
The protocol goes as follows:
(1) Alice chooses {a1, a2, a3, x1, x2}and computes:
u=a1x1, v=x1
-1
a2x2, w=x2
-1
a3
The private key is (a1, a2, a3) and the public key is (u,
v, w).
(2) Bob chooses {b1, b2, b3, y1, y2}and computes:
p=b1y1, q=y1
-1
b2y2, r=y2
-1
b3
The private key is (b1, b2, b3) and the public key is
(p, q, r).
(3) Both exchange public keys and compute the common
key:
(Alice) KA = a1pa2qa3r = a1b1a2b2a3b3
(Bob) KB = ub1vb2wb3 = a1b1a2b2a3b3
As could be verified, {u, w, p, r} are lineal equations and
{v, q} are quadratic. ASA avoid attacking the non-linear
equations and target the linear ones.
4. XTDP.
This protocol transforms TDP into a stronger one changing all
linear public equations into quadratic ones in a mostly symmetric
way. This feature enforces true TDP solving of each public piece
to cryptanalyze it. As a drawback, in case of volatile or session
public keys, it needs a double pass of public information. Aside
from this not too disturbing disadvantage, the XTDP based
framework could be a fast and secure way to obtain a canonical
non-commutative PQC solution.
The public platform is the general linear group GL(d, Fp)
with two separate sets of seven disjoint subsets each affected
by commutativity restrictions, as invertibility is a-priori
assured. In our framework, the two sets are defined as A and
B and their subsets are:
A : {A1, A2, A3, X0, X1, X2, X3 }
B : {B1, B2, B3, Y0, Y1, Y2, Y3}
Subjected to following restrictions:
(commutativity)
[A1,Y0]=[A2,Y1]=[A3,Y2]=[B1,X1]=[B2,X2]=[B3,X3]=I in terms
of group commutators.
Alice and Bob agree on using respectively A and B. All
lowercase variables are random non-biased selections of
uppercase sets (i.e., ai E Ai). It is crucial to obtain IND-CCA2
semantic security that all instances are randomly selected.
(4) Alice chooses {a1, a2, a3, x0, x1, x2, x3}and computes:
u=x0
-1
a1x1, v=x1
-1
a2x2, w=x2
-1
a3 x3
The private key is (a1, a2, a3, x0, x1, x2, x3) and the
public key is (u, v, w).
(5) Bob chooses {b1, b2, b3, y0, y1, y2, y3}and computes:
p=y0
-1
b1y1, q=y1
-1
b2y2, r=y2
-1
b3 y3
The private key is (b1, b2, b3, y0, y1, y2, y3) and the
public key is (p, q, r).
(6) Both exchange public keys and compute the
following tokens
(Alice) tA = a1pa2qa3r =a1y0
-1
b1a2b2a3b3y3 = y0
-1
z y3
(Bob) tB = ub1vb2wb3 = x0
-1
a1b1a2b2a3x3b3 = x0
-1
z x3
where z= a1b1a2b2a3b3
(7) Both exchange the tokens and compute the common
key:
(Alice) KA = x0 tB x3
-1
(Bob) KB = y0 tA y3
-1
Neither Alice, Bob or Mallory (an adversary) could
obtain private key parts from the public ones unless
they solve triple decomposition problem.
(8) The computed session key could be used to cipher any
matrix belonging to the Modular d-dimensional
Matrix monoid (Md), using the Blind Conjugacy
Search Problem (BCSP) as OWTF [6]:
Computational BCSP:
Given G, a non-abelian group with solvable word
problem and given any element a e G, and an unknown
element b e G, find at least one element x e G such
that a = x-1 b x.
The described cryptosystem goes as:
��� ∈ ��
�� = ��
���� ��
��� = �� �� ��
� =
= �����
���� �����
� = ���
4. XTDP SAMPLE PROTOCOL
TABLE I
SYMBOLS AND DEFINITIONS
TABLE II
PUBLIC SETUP STEPS
�� = ��8, ����� –Modular matrix monoid, d=8 and prime=251
���8, ����� –General Linear Group
⊂ – strictly included into
∈ – belongs to
∈ – uniform distribution, randomly selected element in
∀≠ - strictly positive and non-repeating elements in alist.
�� , �� , … – diagonal matrices of eigenvalues with ∀≠ property
�$� … $�� – eigenvalues set, each one mentioned independent from others
[a,b] – commutator (=a-1b-1ab)
I – Identity matrix order 8
Sel – selects or reserves for her/him with agreement of the other party.
⟹ send publicly to the other entity
Public
parameters
(any entity
defines)
Subgroups {A1,A2,A3,X1,X2} ⊂ ��
Subgroups {A1,A2,A3,X0,X1,X2,X3} ⊂ GL(8,ℤ���)
Subgroups {B1,B2,B3,Y0,Y1,Y2,Y3} ⊂ GL(8,ℤ���)
Eigenvectors O assigned to A1, Y0 ; [A1,Y0]=I
Eigenvectors P assigned to A2, Y1 ; [A2,Y1]=I
Eigenvectors Q assigned to A3, Y2 ; [A3,Y2]=I
Eigenvectors R assigned to B1, X1 ; [B1,X1]=I
Eigenvectors S assigned to B2, X2 ; [B2,X2]=I
Eigenvectors T assigned to B3, X3 ; [B3,X3]=I
Eigenvectors public matrices
'(, ), *, +, ,, -. ∈ GL(8,ℤ���) ⟹
TABLE III
ADDITIONAL ENCRYPTION STEP (BCSP PROTECTED)
PRIVATE PROCEDURES
TABLE IV
PRIVATE KEYS
TABLE V
PUBLIC KEYS
TABLE VI
TOKEN GENERATION
commuting pairs are between brackets
TABLE VI I
COMMON SESSION KEY
TABLE VIII
ADDITIONAL ENCRYPTION STEP (BCSP PROTECTED)
TABLE IX
ALICE DECRYPTION STEP
It is easy to apply the same framework to other asymmetric
protocols. For example, defining power-sets of matrices, a
straightforward ElGamal solution is at hand. Also, extending
the GL() to a polynomial ring, a Maze et al. protocol could
be implemented. Changing of purpose, a ZKP authentication
protocol, a Baumslag et al. KEM (key encapsulation
mechanism) or a Digital Signature is almost trivial to design.
When powers of matrices are used new kind of weakness
could appear, the multiplicative order of the elements should
be sufficiently high to foil brute-force attacks. One could use
companion matrices of primitive polynomials as generators of
high order subgroups. Comparing different canonical
approaches, the BCSP application of this framework offer a
reasonable compromise solution between cryptographic
security and fast computation.
Supposing no other weakness at hand, full cracking a
private key depends on four d-dimensional diagonal
eigenvalues matrices, so a brute force search of the
commutative P8 subgroups of M8 involves the cardinal
|P8 |
4 =24932 =4.77 x 1076 ≈ 2255
For a real-life application, we suggest to use at least P8
or perhaps expanding the commutative subgroup to P16,
who implies a 510-bit level classical security. The
corresponding quantum security level is the respective
square roots of the key space cardinals [7]. The obvious
drawback is the corresponding increase in space, each
matrix in {P8, P16} occupies respectively {512, 2048} bits.
A corresponding computational session time should be
expected.
Against quantum-based attacks, the dimensional
increase foils Grover like attacks and no multiplicative (or
additive) cyclic order finding adaptation of Shor’s
algorithm is known and accessible against the present
protocol.
Further arguments of the framework security are
exposed in our previous work [6].
We designed XTDP to protect the framework against
Tsaban’s ASA attack [8]. No formal proof is provided, but
the presence of full quadratic public terms let us assume it.
As a final consequence, we infer that our proposed
framework could be gotten immune against brute-force
attacks, linear representation attacks, length-based attacks
and currently known quantum attacks.
5. SEMANTIC SECURITY (IND-CCA2)
The key point to assure semantic security is the
indistinguishability of encrypted information from random
one of same length [9].
ALICE BOB
Random
private
elements
Sel {A1,A2,A3,X0,X1,X2,X3}
∀≠ $� … $� ∈ ℤ���
∗
��� = �$� … $��
��� = �$� … $��
��0 = �$� … $��
�1� = �$� … $��
�1� = �$� … $��
�10 = �$� … $��
2� = (
���� (
2� = )
���� )
20 = *
���0 *
34 ∈ GL(8, ℤ���
∗ )
3� = +
��1� +
3� = ,
��1� ,
30 = -
��10 -
Sel {B1,B2,B3,Y0,Y1,Y2,Y3}
∀≠ λ� … λ� ∈6 ℤ���
∗
d8� = �λ� … λ��
d8� = �λ� … λ��
d80 = �λ� … λ��
d94 = �λ� … λ��
d9� = �λ� … λ��
d9� = �λ� … λ��
:� = +
���� +
:� = ,
���� ,
:0 = -
���0 -
;4 = (
��<4 (
;� = )
��<� )
;� = *
��<� *
;0 ∈6 GL(8, ℤ���
∗ )
ALICE BOB
Session
set of
Private
keys
2� , 2�, 20, 34 , 3�, 3�, 30 :�, :�, :0, ;4 , ;� , ;�, ;0
ALICE BOB
Public
keys:
1st
exchange
= = 34
�2� 3�
v = x�
�a� x�
A = 3�
�20 30
(u, v, w) ⟹
B = ;4
�:� ;�
C = ;�
�:� ;�
D = ;�
�:0 ;0
(p, q, r) ⟹
ALICE BOB
Token:
2nd
exchange
E� = 2� p 2� C 20 D=
[2�;4
�] :� [;�2�] ;�
�:�.
. [;�20] ;�
�:0 ;0 =
;4
� I ;0 ⟹
where
z = 2� :� 2� :� 20 :0
E� = u :� J :� A :0 =
34
�2� 3�[:� 3�
�] 2� 3�.
.[ :� 3�
�] 20 [30:0] =
34
� I 30 ⟹
where
z = 2� :� 2� :� 20 :0
ALICE BOB
Common
session
key
KALICE = x0 tB x3-1
KBOB = y0 tA y3
-1
��WXYZ = x0 E� x3
−1
= x034
� I 30x3
−1 = 2� :� 2� :� 20 :0
��[� = y0 E� y3
−1
= y0;4
� I ;0y3
−1 = 2� :� 2� :� 20 :0
\]^_`a = \bcb ≡ \
ALICE BOB
BOB
ciphers a
message
to
ALICE
��� ∈ ��
�� = ��[�
���� ��[�
�� ⟹
ALICE BOB
ALICE
recovers
the
message
���=
= ��WXYZ �� ��WXYZ
�
��� = ��WXYZ �� ��WXYZ
� =
= ��WXYZ���[�
���� ��[����WXYZ
� = ���
The presented framework is easily translatable to other
asymmetric protocols. For this reason, the following security
analysis is not limited to the present example and can be extended
in new contexts. To proceed with this analysis, two conjectures
are exposed.
DEFINITION (D1): interactive challenge-response
game by a verifier against an active adversary.
In this three-phase protocol, two entities, an adversary and a
verifier (or challenger) are involved. The verifier has a secret key
that he tries to hide from the adversary and allows the adversary
to pose questions to him that answers truthfully like an Oracle. In
a first phase, the adversary can raise all the questions that he
wants to try to obtain information about the secret key. In a
second phase, the verifier presents the secret key (k) to the
adversary next to another of equal length and format (* k)
randomly generated. Even during the second phase, the adversary
may continue to consult the verifier, except for questions linked
to the disclosure of the secret itself. In the third phase, the
adversary has a polynomial time stochastic algorithm and must
distinguish whether the secret is k or * k, with probability
negligibly greater than ½. If the opponent achieves the distinction
with that probability, he wins the game and loses it in the opposite
case.
CONJECTURE (C1): Indistinguishability of product
transformed random matrices.
The elements of ����, �e) are uniformly random integers of
prime modulus and d-dimension. It is a known fact that sum or
multiplication between random field integers, does not introduce
statistical bias into results. Therefore, linear transformed
matrices are statistically distributed as any random generated
ones. The consequence is that in an interactive challenge-
response protocol (Definition D1), an adversary does not achieve
the distinction raised with the required probability.
CONJECTURE (C2): the present framework adheres
to semantic security under IND-CCA2.
The TDP one-way trapdoor function with which the private
key is protected is, as previous exposed, not weakened by attacks
of probabilistically polynomial time, whether classical or
quantum that are in the public domain until today, forcing the
potential attacker to perform a systematic exploration of the
private key space (the diagonal matrices). Under this assumption
and considering the indistinguishability of randomly generated
matrices and enciphered ones, it is reasonable to assign to the
framework a security mark equivalent to IND-CCA2 (semantic
security under IND-CCA2) [9].
6. CONCLUSION.
We developed a fortified and supposedly ASA [8] resistant
version of our previous TDP framework. Evidence is provided to
adhere to IND-CCA2 semantic security.
7. ACKNOWLEDGMENT.
We are indebted to Boaz Tsaban and Yuval Beker for letting
us take contact with their work and the following discussions.
8. REFERENCES.
[1] NIST, “Post-Quantum Cryptography Standardization Program”,
https://csrc.nist.gov/Projects/Post-Quantum-Cryptography
[2] L. Chen et al, NISTIR 8105, “Report on Post-Quantum
Cryptography”,NIST,2006.
http://nvlpubs.nist.gov/nistpubs/ir/2016/NIST.IR.8105.pdf (consulted
February10, 2017)
[3] P. Shor, “Polynomial-time algorithms for prime factorization and discrete
logarithms on a quantum computer”, SIAM J. Comput., no. 5, pp. 1484-
1509, 1997.
[4] L. K. Grover, “A fast quantum mechanical algorithm for database
search”, In Proc. 28th Ann. ACM Symp. on Theory of Computing (ed.
Miller, G. L.) 212–219, ACM, 1996.
[5] A. Myasnikov, V. Shpilrain, A. Ushakov, “Non-commutative
Cryptography and Complexity of Group-theoretic Problems”,
Mathematical Surveys and Monographs, AMS Volume 177, 2011
[6] P. Hecht, “PQC: Triple Decomposition Problem Applied To GL(d, Fp) -
A Secure Framework For Canonical Non-Commutative Cryptography”,
arXiv:1810.08983v2 [cs.CR]
[7] Y. Kurt, “A new key exchange primitive based on the triple
decomposition problem”, preprint, Available at
http://eprint.iacr.org/2006/378
[8] A. Ben-Zvi, A. Kalka, B. Tsaban (2018) Cryptanalysis via Algebraic
Spans. In: Shacham H., Boldyreva A. (eds) Advances in Cryptology –
CRYPTO 2018. CRYPTO 2018. Lecture Notes in Computer Science, vol
10991. Springer, Cham
[9] J. Katz, Y. Lindell, “Introduction to Modern Cryptography”, Chapman &
Hall/CRC, 2008.
| 1cybersec
| arXiv |
Eating cheap and healthy in the UK?. Should probably mention I’m unemployed at the minute. Anybody in the UK got any tips on how to stay healthy while job searching? | 0non-cybersec
| Reddit |
Cannot line break in chemical equation in flowchart using mhchem and TikZ. <p>I can't seem to get a line break mid equation; in this example, to fit in a box (and not change the size of the box). my usual method of <code>\\</code> is not working.</p>
<pre><code>\documentclass[12pt]{report}
\usepackage{tikz}
\usepackage[version=3]{mhchem}
\usepackage{amsmath}
\begin{document}
\centering
\begin{figure}
\tikzstyle{1L} = [rectangle, draw, text width=8cm, text centered, fill=blue!20]
\tikzstyle{2L} = [rectangle, draw, text width=5cm, text centered, fill=blue!20]
\tikzstyle{arrow} = [thick,->,>=stealth,-to,shorten >=5pt, shorten <=2pt]
\begin{tikzpicture}[node distance=4cm]
\node (1L) [1L] {\underline{Oxidation}
\begin{equation} \ce{ $\underset{\text{Pyrite}}{\cf{FeS2}}$ + 3.5O2 + H2O -> Fe^2+ + 2SO4+2- + 2H+}
\end{equation}
};
\node (2L) [2L,below of=1L, minimum height=3em] {Fe$^{2+}$};
\draw [arrow] (1L)--(2L);
\end{tikzpicture}
\caption{Flowchart}
\end{figure}
\end{document}
</code></pre>
| 0non-cybersec
| Stackexchange |
How to use numba together with functools.reduce(). <p>I have the following code where I am trying to parallel loop using <code>numba</code>, <code>functools.reduce()</code> and <code>mul</code>:</p>
<pre><code>import numpy as np
from itertools import product
from functools import reduce
from operator import mul
from numba import jit, prange
lst = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
arr = np.array(lst)
n = 3
flat = np.ravel(arr).tolist()
gen = np.array([list(a) for a in product(flat, repeat=n)])
@jit(nopython=True, parallel=True)
def mtp(gen):
results = np.empty(gen.shape[0])
for i in prange(gen.shape[0]):
results[i] = reduce(mul, gen[i], initializer=None)
return results
mtp(gen)
</code></pre>
<p>But this is giving me an error:</p>
<pre><code>---------------------------------------------------------------------------
TypingError Traceback (most recent call last)
<ipython-input-503-cd6ef880fd4a> in <module>
10 results[i] = reduce(mul, gen[i], initializer=None)
11 return results
---> 12 mtp(gen)
~\Anaconda3\lib\site-packages\numba\dispatcher.py in _compile_for_args(self, *args, **kws)
399 e.patch_message(msg)
400
--> 401 error_rewrite(e, 'typing')
402 except errors.UnsupportedError as e:
403 # Something unsupported is present in the user code, add help info
~\Anaconda3\lib\site-packages\numba\dispatcher.py in error_rewrite(e, issue_type)
342 raise e
343 else:
--> 344 reraise(type(e), e, None)
345
346 argtypes = []
~\Anaconda3\lib\site-packages\numba\six.py in reraise(tp, value, tb)
666 value = tp()
667 if value.__traceback__ is not tb:
--> 668 raise value.with_traceback(tb)
669 raise value
670
TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<built-in function reduce>) with argument(s) of type(s): (Function(<built-in function mul>), array(int32, 1d, C), initializer=none)
* parameterized
In definition 0:
AssertionError:
raised from C:\Users\HP\Anaconda3\lib\site-packages\numba\parfor.py:4138
In definition 1:
AssertionError:
raised from C:\Users\HP\Anaconda3\lib\site-packages\numba\parfor.py:4138
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: Function(<built-in function reduce>)
[2] During: typing of call at <ipython-input-503-cd6ef880fd4a> (10)
File "<ipython-input-503-cd6ef880fd4a>", line 10:
def mtp(gen):
<source elided>
for i in prange(gen.shape[0]):
results[i] = reduce(mul, gen[i], initializer=None)
^
</code></pre>
<p>I am not sure where I have gone wrong. Can anyone point me to the right direction? Many thanks.</p>
| 0non-cybersec
| Stackexchange |
Society continues to value mothers over women who do not have children according to research. | 0non-cybersec
| Reddit |
Invertibility of a matrix whose entries are certain binomial coefficients. <p>Let $l$ be a positive integer. Does the matrix
$$
M_l \ := \ \left( \binom{l-(2p+1)}{j} \right)_{0\leq p,j \leq[(l-1)/2]}
$$
have nonzero determinant?</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
This Huge Strawberry. | 0non-cybersec
| Reddit |
Probability of drawing cards on specific draw counts. <blockquote>
<p>There is a deck of $30$ cards, each card labeled a number from $1$ to $15$, with exactly $2$ copies of a card for each number. You draw $8$ cards. What is the probability that you draw the number '$1$' card by the $5$th draw (on the $5$th draw or before that), AND also drawing the number '$2$' card on or before the $8$th draw?</p>
</blockquote>
<p>I know how to compute the probability of drawing both the cards on or before the $5$th draw:</p>
<p>$$\frac{\binom{2}{1}\cdot \binom{2}{1} \cdot \binom{26}{3}}{\binom{30}{5}}$$</p>
<p>Since there's $2$ ways to choose from each of the '$1$' and '$2$' cards, and then there's $26$ cards left after those $4$ cards so the other $3$ cards can be any of those $26$, and the total number of combinations you can draw $5$ cards from $30$.</p>
<p>But we want to expand this search to $8$ draws, and also at the same time want to have assumed that we have already drawn the '$1$' card on or before the $5$th draw (if we don't get the '$2$' card by the $5$th draw. How can I combine these ideas? Thanks</p>
| 0non-cybersec
| Stackexchange |
London Fletcher: "This will more than likely be my last season in the NFL". | 0non-cybersec
| Reddit |
color value drawable resource issue. <p>I have an image that is 1900*1200 in a folder called drawable-sw600dp that id like to have used on a nexus 7. When I try to run the app the main activity the screen is white and I get the following error:</p>
<pre><code>java.lang.NumberFormatException: Color value '@drawable-sw600dp/background5' must start with #
at com.android.layoutlib.bridge.impl.ResourceHelper.getColor(ResourceHelper.java:71)
at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:248)
at android.content.res.BridgeTypedArray.getDrawable(BridgeTypedArray.java:782)
</code></pre>
<p>Could it be that the image is too large to use? Or what could cause this error to happen?</p>
<p>This is in my activity_main.xml where the background is set:</p>
<p>
<pre><code>xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background5"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:id="@+id/MainLayout"
tools:context=".MainActivity">
</code></pre>
<p>In my other folders drawable-hdpi,-mdpi there is no problem. However I made the .jpg image a higher resolution and now it creates this error, thats why I suspect the high resolution is causing the issue.</p>
| 0non-cybersec
| Stackexchange |
How can I get rid of this invisible file?. <h2>Background</h2>
<p>I have a folder named <code>akorg✽</code>. That Unicode character causes headaches for me when software makes incorrect assumptions about the text encoding of my file paths, so I'd like to remove it from the name.</p>
<h2>The problem</h2>
<p>You'd think this would be easy:</p>
<pre><code>$ mv akorg✽ akorg
mv: cannot move ‘akorg✽’ to a subdirectory of itself, ‘akorg/akorg✽’
</code></pre>
<p>but—that's strange—it thinks a folder called <code>akorg</code> already exists. I'm pretty sure there isn't one:</p>
<pre><code>$ ls -la
total 699K
drwxr-xr-x 15 ak ak 15 Jun 12 17:34 .
drwxr-xr-x 57 ak ak 4.0K Jun 12 17:35 ..
drwxr-xr-x 11 ak ak 21 Jun 12 16:58 akorg✽
drwxr-xr-x 2 ak ak 2 May 28 20:47 Desktop
...
</code></pre>
<p>Still, <code>stat</code> says otherwise:</p>
<pre><code>$ stat akorg
File: ‘akorg’
Size: 21 Blocks: 33 IO Block: 1536 directory
Device: 15h/21d Inode: 292128 Links: 11
...
</code></pre>
<p>So apparently there is an invisible folder in the way. Whatever, I'll just remove it:</p>
<pre><code>$ rmdir akorg
rmdir: failed to remove ‘akorg’: No such file or directory
</code></pre>
<p>Right, then. What in the world is this thing?</p>
<h2>What I know so far</h2>
<ul>
<li>I'm using the <a href="https://launchpad.net/~zfs-native/+archive/stable" rel="nofollow">stable release</a> of <a href="http://zfsonlinux.org/" rel="nofollow">ZFS on Linux</a>. Here's the <a href="http://paste.ubuntu.com/5759985/" rel="nofollow">zpool status and zfs properties</a>.</li>
<li><p><code>stat</code> returns the same inode for both <code>akorg</code> and <code>akorg✽</code>. Searching by that inode returns only <code>akorg✽</code>:</p>
<pre><code>$ find . -maxdepth 1 -inum 292128
./akorg✽
</code></pre></li>
<li><p>More things that don't work on the "invisible" folder:</p>
<pre><code>$ rm akorg
rm: cannot remove ‘akorg’: Is a directory
$ unlink akorg
unlink: cannot unlink ‘akorg’: Is a directory
$ mv akorg akorg_temp
mv: cannot move ‘akorg’ to ‘akorg_temp’: No such file or directory
</code></pre></li>
<li>I get the same results in both Bash 4.2.45 and zsh 5.0.0. In both, tab-completion of <code>ak</code> returns only <code>akorg✽/</code>.</li>
<li>The <a href="http://paste.ubuntu.com/5762504/" rel="nofollow">strace</a> of my initial renaming attempt confirms that I'm typing the names correctly and that the attempt is thwarted by the preexistence of a folder named <code>akorg</code>.</li>
<li><p>This response to a more explicit renaming attempt is puzzling and scary:</p>
<pre><code>$ mv --verbose --no-target-directory --no-clobber akorg✽ akorg
removed ‘akorg✽’
</code></pre>
<p>I don't understand why it claims to have removed <code>akorg✽</code>, or why it would try. Fortunately, <code>ls</code> and <code>stat akorg akorg✽</code> reveal that nothing is actually gone. Here's the <a href="http://paste.ubuntu.com/5762743/" rel="nofollow">strace</a>.</p></li>
<li><p>To rule out encoding quirks as the cause of this, I've temporarily given <code>akorg✽</code> an intermediate name:</p>
<pre><code>$ mv --verbose --no-target-directory --no-clobber akorg✽ bananas
‘akorg✽’ -> ‘bananas’
</code></pre>
<p>That worked as expected,</p>
<pre><code>$ ls -la
total 715K
drwxr-xr-x 16 ak ak 16 Jun 13 15:11 .
drwxr-xr-x 57 ak ak 4.0K Jun 13 14:03 ..
drwxr-xr-x 11 ak ak 21 Jun 12 16:58 bananas
drwxr-xr-x 2 ak ak 2 May 28 20:47 Desktop
...
</code></pre>
<p>but the "invisible" folder is still present:</p>
<pre><code>$ stat bananas akorg
File: ‘bananas’
Size: 21 Blocks: 33 IO Block: 1536 directory
Device: 15h/21d Inode: 292128 Links: 11
...
File: ‘akorg’
Size: 21 Blocks: 33 IO Block: 1536 directory
Device: 15h/21d Inode: 292128 Links: 11
...
</code></pre>
<p>and <code>mv</code> still behaves strangely when I try to use the name <code>akorg</code>:</p>
<pre><code>$ mv --verbose --no-target-directory --no-clobber bananas akorg
removed ‘bananas’
</code></pre></li>
</ul>
| 0non-cybersec
| Stackexchange |
Shitty Ask MakeupAddiction. Inspired by /r/shittyaskscience and more recently a [Shitty Ask Fragrance](https://www.reddit.com/r/fragrance/comments/4vl8ll/shitty_ask_fragrance/) thread on /r/fragrance, let's do a Shitty Ask MakeupAddiction. Perfect for Text Only Tuesday.
The idea is simple... ask a shitty question and we'll give shitty answers. For example, [one of the recent threads](https://www.reddit.com/r/shittyaskscience/comments/4vres0/a_thermos_keeps_drinks_warm_in_winter_and_cold_in/) on /r/shittyaskscience is "A thermos keeps drinks warm in winter and cold in summer. But how does the thermos know when it's summer or winter?" One of the answers to the question is essentially "wild thermoses are warm blooded". | 0non-cybersec
| Reddit |
Earlier in this scene in Good Will Hunting, Robin Williams' character mentions that he bench presses 285 pounds which provides credibility as to why an ageing mathematician could physically restrain a younger, physically active Will Hunting.. | 0non-cybersec
| Reddit |
What kind of certificate to be used to consume web services?. <p>I have my own application. My client wants me to use their web service. This web service sends some data to my database. For this, my client wants a certificate from me. In this scenario, what kind of certificate should I provide?</p>
| 0non-cybersec
| Stackexchange |
How or is that possible to prove or falsify `forall (P Q : Prop), (P -> Q) -> (Q -> P) -> P = Q.` in Coq?. <p>I want to prove or falsify <code>forall (P Q : Prop), (P -> Q) -> (Q -> P) -> P = Q.</code> in Coq. Here is my approach.</p>
<pre><code>Inductive True2 : Prop :=
| One : True2
| Two : True2.
Lemma True_has_one : forall (t0 t1 : True), t0 = t1.
Proof.
intros.
destruct t0. destruct t1.
reflexivity.
Qed.
Lemma not_True2_has_one : (forall (t0 t1 : True2), t0 = t1) -> False.
Proof.
intros.
specialize (H One Two).
inversion H.
</code></pre>
<p>But, <code>inversion H</code> does nothing. I think maybe it's because the coq's proof independence (I'm not a native English speaker, and I don't know the exact words, please forgive my ignorance), and coq makes it impossible to prove One = Two -> False. But if so why has to coq eliminate the content of a proof?</p>
<p>Without the above proposition, I can't prove the followings or their negations.</p>
<pre><code>Lemma True_neq_True2 : True = True2 -> False.
Theorem iff_eq : forall (P Q : Prop), (P -> Q) -> (Q -> P) -> P = Q.
</code></pre>
<p>So my question is:</p>
<ol>
<li>How to or is that possible to prove or falsify <code>forall (P Q : Prop),
(P -> Q) -> (Q -> P) -> P = Q.</code> in Coq?</li>
<li>Why <code>inversion H</code> does nothing; does it's because the coq's proof independence, and if so, why does Coq waste energy in doing this.</li>
</ol>
| 0non-cybersec
| Stackexchange |
The evolution of Windows startup sounds, from Windows 3.1 to 10. | 0non-cybersec
| Reddit |
SQL-SERVER 2014: Recommended steps to move Database from one server to another. <p>I need to relocate a database running sql-server 2014 from one server to another. The source server has three instances with a few databases per instance all relating to the same application. Looking for recommended tips/steps to do this.
Thanks!</p>
| 0non-cybersec
| Stackexchange |
I'm a geology student in Australia. Interned this summer at an opal mine. They find theses opalized fossils there.. | 0non-cybersec
| Reddit |
The word "Decimate" comes from a Roman Army disciplinary practice of dividing soldiers into groups of 10 and drawing lots to choose which one gets killed by the other 9.. | 0non-cybersec
| Reddit |
when you burst a balloon full of water and photograph the instant before the water falls. | 0non-cybersec
| Reddit |
NP-Hard vs NP-Complete Why NP-complete so important?. <p>A problem <span class="math-container">$L$</span> is NP-complete when:-</p>
<ol>
<li><span class="math-container">$L\in \text{NP}$</span></li>
<li>For every problem <span class="math-container">$L' \in \text{NP}$</span>, <span class="math-container">$L'$</span> is polynomial time reducible to <span class="math-container">$L$</span></li>
</ol>
<blockquote>
<p>When at least property 2 is satisfied for a problem <span class="math-container">$L$</span> (but not
necessarily property 1), then <span class="math-container">$L \in \text{NP-Hard}$</span>.</p>
</blockquote>
<p>When a problem <span class="math-container">$L\in \text{NP-Complete}$</span> is shown to have a polynomial-time solution, we say <span class="math-container">$\text{P}=\text{NP}$</span> due to <a href="https://en.wikipedia.org/wiki/Cook%E2%80%93Levin_theorem" rel="nofollow noreferrer">Cook-Levin Theorom</a>.</p>
<blockquote>
<p>Wikipedia states:</p>
<p>An important consequence of the theorem is that if there exists a deterministic polynomial time algorithm for solving Boolean satisfiability, then there exists a deterministic polynomial time algorithm for solving all problems in NP. Crucially, the same follows for any NP complete problem.</p>
</blockquote>
<p>This can be attributed to transitivity property of polynomial-time reductions.</p>
<p>If we are able to show that a problem <span class="math-container">$L''$</span> already known to be in NP-complete to
be polynomial-time reducible to the problem <span class="math-container">$L$</span>, then <span class="math-container">$L$</span> satisfies property 2 by
transitivity.</p>
<p>Well as the <strong>property 2 is satisfied by the NP-Hard problems too.</strong></p>
<p>My assumptions -</p>
<ol>
<li>A known NP-Hard problem is polynomial-time reducible to a unknown problem <span class="math-container">$L$</span>. Then <span class="math-container">$L$</span> should satisfy property 2 too. So, <span class="math-container">$L$</span> is NP-Hard. If <span class="math-container">$L\in \text{NP}$</span> also true, then <span class="math-container">$L\in \text{NP-complete}$</span>.</li>
<li>If <span class="math-container">$L \in \text{NP-Hard}$</span> but not shown to be NP yet and we have a deterministic polynomial-time algorithm for <span class="math-container">$L$</span> then <span class="math-container">$\text{P}=\text{NP}$</span>.</li>
</ol>
<p>Now, my questions-</p>
<ol>
<li>Are my assumptions above true? - <a href="https://en.wikipedia.org/?title=NP-hard" rel="nofollow noreferrer">Wikipedia</a> says it is true. Please confirm and provide other good references to check my assumptions.</li>
<li>If above is true, why are the NP-Complete class considered so important when the answer to P=NP rests on existence of a deterministic polynomial-time algorithm to any NP-Hard problem (be it NP-Complete or not)?</li>
</ol>
| 0non-cybersec
| Stackexchange |
How do I solve quadratic equations when the coefficients are complex and real?. <p>I needed to solve this: $$x^2 + (2i-3)x + 2-4i = 0 $$</p>
<p>I tried the quadratic formula but it didn't work. So how do I solve this without "guessing" roots? If I guess $x=2$ it works; then I can divide the polynomial and find the other root; but I can't "guess" a root.</p>
<p>$b^2-4ac=4i-3$, now I have to work with $\sqrt{4-3i}$ which I don't know how. Apparently $4i-3$ is equal to $(1+2i)^2$, but I don't know how to get to this answer, so I am stuck.</p>
| 0non-cybersec
| Stackexchange |
can't browse secure sites, not chrome firefox or opera. <p>I can't browse any secure site in Ubuntu 13.04. And I mean any site! Even when sites use somethings like Google analytics, HTTPS, CSS or JavaScript or something, I have to refresh sometimes to see the site. </p>
<p>For example, I can't visit gmail, but I can browse the same site on a Windows 8 machine running through qemu on this Ubuntu!</p>
<p>I could visit HTTPS sites before, but beginning some days ago, I can't.</p>
<p>Any help is appreciated.</p>
| 0non-cybersec
| Stackexchange |
New York Bird Cage, August Ostberg, photography, 2020. | 0non-cybersec
| Reddit |
Completed my PC a few days ago!. https://imgur.com/gallery/MjMO1
I have completed this build a few days ago. Thanks everyone for helping me pick the parts and such!
Any suggestions on how to improve it would be awesome! | 0non-cybersec
| Reddit |
Guide to Fully Remove Infostealer.Dyre!g3 Trojan Horse Virus. | 1cybersec
| Reddit |
Is there a way to trigger gesture events on Mac OS X?. <p>I want to trigger multitouch gesture events on Mac OS X. Is there a way to do this? Mouse or keyboard events can be triggered with CGEventCreateMouseEvent and CGEventCreateKeyboardEvent. Is there similar low level function for multitouch events?</p>
<p>Rok</p>
<hr>
<p>Your suggestion is not working. I've tried this code:
<code><pre>- (void)rotateWithEvent:(NSEvent *)event {
NSLog(@"ROTATE");
}
-(IBAction)button:(id)sender {
CGEventSourceRef eventSource = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState);
CGEventRef event = CGEventCreate(eventSource);
CGEventSetType(event, NSEventTypeRotate);
CGEventPost(kCGHIDEventTap, event);
NSLog(@"POST EVENT");
}</pre></code></p>
<p>But function rotateWithEvent never gets called. Am I doing something wrong?</p>
| 0non-cybersec
| Stackexchange |
Question about elementary row operations with block matrices. <p>Given two <span class="math-container">$n \times n$</span> matrices <span class="math-container">$A$</span> and <span class="math-container">$B$</span>, form a new block matrix </p>
<p><span class="math-container">$$P := \begin{bmatrix}I_n&B\\-A&0\end{bmatrix}$$</span></p>
<p>Then by using only elementary row operations, show that <span class="math-container">$P$</span> can be transformed into</p>
<p><span class="math-container">$$P' := \begin{bmatrix}I_n&B\\0&AB\end{bmatrix} $$</span> </p>
<hr>
<p>The solution to this problem is:</p>
<p><span class="math-container">$$P = \begin{bmatrix}I_n&B\\-A&0\end{bmatrix} \sim \begin{bmatrix}I_n&B\\-A + AI_n &0 + AB\end{bmatrix} \sim \begin{bmatrix}I_n&B\\0&AB\end{bmatrix}$$</span></p>
<p>I don't understand this solution. Why can <span class="math-container">$A$</span> be multiplied from the left on the first half of the matrix and then be added to the second half of the matrix to form a sequence of elementary row operations?</p>
| 0non-cybersec
| Stackexchange |
Can I mount a share to an EMC array?. <p>I would like to mount an NFS share to an EMC array enlarging it's capacity until we can expand the EMC environment. I have a cheap Synology with 12TB of storage I would like to use to expand it for a short time. Is this possible?</p>
| 0non-cybersec
| Stackexchange |
Different menu for different tabs in tab+swipe application for android project. <p>I am a beginner to android applications and java, basically I am a PHP developer.</p>
<p>I've a project for a tab+swipe application,</p>
<h2><em><strong>Reseller.java</em></strong></h2>
<pre><code>package com.idevoc.onsitereseller;
import java.util.ArrayList;
import android.app.ActionBar;
import android.app.ActionBar.Tab;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;
import android.view.Menu;
import android.view.MenuInflater;
public class Reseller extends FragmentActivity {
FragmentTransaction transaction;
static ViewPager mViewPager;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reseller);
Fragment tabOneFragment = new TabOne();
Fragment tabTwoFragment = new TabTwo();
PagerAdapter mPagerAdapter = new PagerAdapter(getSupportFragmentManager());
mPagerAdapter.addFragment(tabOneFragment);
mPagerAdapter.addFragment(tabTwoFragment);
//transaction = getSupportFragmentManager().beginTransaction();
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mPagerAdapter);
mViewPager.setOffscreenPageLimit(2);
mViewPager.setCurrentItem(0);
mViewPager.setOnPageChangeListener(
new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageSelected(int position) {
// When swiping between pages, select the
// corresponding tab.
getActionBar().setSelectedNavigationItem(position);
}
});
ActionBar ab = getActionBar();
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
Tab tab1 = ab.newTab().setText("Tab One")
.setTabListener(new TabListener<TabOne>(
this, "tabone", TabOne.class));
Tab tab2 = ab.newTab().setText("Tab Two")
.setTabListener(new TabListener<TabTwo>(
this, "tabtwo", TabTwo.class));
ab.addTab(tab1);
ab.addTab(tab2);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu);
return true;
}
public static class TabListener<T extends Fragment> implements ActionBar.TabListener {
private Fragment mFragment;
private final Activity mActivity;
private final String mTag;
private final Class<T> mClass;
/** Constructor used each time a new tab is created.
* @param activity The host Activity, used to instantiate the fragment
* @param tag The identifier tag for the fragment
* @param clz The fragment's Class, used to instantiate the fragment
*/
public TabListener(Activity activity, String tag, Class<T> clz) {
mActivity = activity;
mTag = tag;
mClass = clz;
}
/* The following are each of the ActionBar.TabListener callbacks */
public void onTabSelected(Tab tab, FragmentTransaction ft) {
// Check if the fragment is already initialized
if (mFragment == null) {
// If not, instantiate and add it to the activity
mFragment = Fragment.instantiate(mActivity, mClass.getName());
ft.add(android.R.id.content, mFragment, mTag);
} else {
// If it exists, simply attach it in order to show it
ft.attach(mFragment);
}
}
public void onTabUnselected(Tab tab, FragmentTransaction ft) {
if (mFragment != null) {
// Detach the fragment, because another one is being attached
ft.detach(mFragment);
}
}
public void onTabReselected(Tab tab, FragmentTransaction ft) {
// User selected the already selected tab. Usually do nothing.
}
public void onTabReselected(Tab arg0,
android.app.FragmentTransaction arg1)
{
}
public void onTabSelected(Tab arg0, android.app.FragmentTransaction arg1)
{
mViewPager.setCurrentItem(arg0.getPosition());
}
public void onTabUnselected(Tab arg0,
android.app.FragmentTransaction arg1)
{
}
}
public class PagerAdapter extends FragmentPagerAdapter{
private final ArrayList<Fragment> mFragments = new ArrayList<Fragment>();
public PagerAdapter(FragmentManager manager){
super(manager);
}
public void addFragment(Fragment fragment){
mFragments.add(fragment);
notifyDataSetChanged();
}
@Override
public int getCount() {
return mFragments.size();
}
@Override
public Fragment getItem(int position) {
return mFragments.get(position);
}
}
}
</code></pre>
<h2><em><strong>TabOne.java</em></strong></h2>
<pre><code> package com.idevoc.onsitereseller;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class TabOne extends Fragment
{
public static final String ARG_SECTION_NUMBER = "section_number";
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
{
View view = inflater.inflate(R.layout.tab_a, container, false);
return view;
}
}
</code></pre>
<h2><em><strong>TabTwo.java</em></strong></h2>
<pre><code> package com.idevoc.onsitereseller;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class TabTwo extends Fragment
{
@Override
public void onActivityCreated(Bundle savedInstanceState){
super.onActivityCreated(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
{
View view = inflater.inflate(R.layout.tab_a, container, false);
return view;
}
}
</code></pre>
<p>Here I am loading two tabs for the application and loading a common menu, but I need to load a different menu for different tabs like:</p>
<p>if the tab is TabOne then load menu_a, if tab is TabTwo then load menu_b with different options.
I don't want to load the common menu. How can I do this?</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Highlight Peak Point Excel 2010. <p>In Excel 2010, I want to automatically highlight the peak point on this graph (the 3rd one from left to right), so it'll become red.</p>
<p><img src="https://i.stack.imgur.com/5um5D.png" alt="enter image description here"></p>
<p>What should I do?</p>
| 0non-cybersec
| Stackexchange |
What causes long sequences of consecutive 'collatz' paths to share the same length?. <p>I asked <a href="https://math.stackexchange.com/q/470782/20792">Longest known sequence of identical consecutive Collatz sequence lengths?</a> some time ago, but I don't feel like it really got to the bottom of things.</p>
<p>See, in the answers <a href="https://math.stackexchange.com/a/470820/20792">lopsy</a> find a sequence in the range of $596310 ... 596349$ and makes a heuristic argument:</p>
<blockquote>
<p>There's nothing special about these numbers, as far as I can see. In
fact, there are probably arbitrary long sequences of consecutive
numbers with identical Collatz lengths. Here's a heuristic argument:</p>
<p>A number $n$ usually takes on the order of ~$\text{log}(n)$ Collatz
steps to reach $1$.</p>
<p>Suppose all of the numbers between $1$ and $n$ have random Collatz
lengths between $1$ and ~$\text{log}(n)$. Then, if we choose a
starting point at random, the probability that the next $X$
consecutive numbers all have the same Collatz length is
~$\text{log}(n)^X$. There are ~$n$ possible starting points, so we
want $X$ so that the probability is $\text{log}(n)^X \cong
> \frac{1}{n}$. Then I'd expect the longest sequence to have around $X$
consecutive numbers.</p>
<p>As it turns out, $X=\frac{\text{log}(n)}{\text{log}\text{log}(n)}$
does the trick.</p>
</blockquote>
<p>Except in the comments exchanged afterwards I point out that:</p>
<blockquote>
<p>log(596349)/log(log(596349)) ~ 7, not 40</p>
</blockquote>
<p>(that should be <a href="https://www.google.co.uk/search?q=log(596310)%2Flog(log(596349))" rel="nofollow noreferrer"><code>log(596310)/log(log(596349))</code></a> but the comment holds)</p>
<p>So Heuristically we're expecting 33 fewer consecutive sequences of the same length, seem like a massive outlier.</p>
<p>So perhaps these sequences are <em>special</em>; what causes them to to arise?</p>
| 0non-cybersec
| Stackexchange |
Using a global object in React Context that is not related to state. <p>I want to have a global object that is available to my app where I can retrieve the value anywhere and also set a new value anywhere. Currently I have only used Context for values that are related to state i.e something needs to render again when the value changes. For example:</p>
<pre><code>import React from 'react';
const TokenContext = React.createContext({
token: null,
setToken: () => {}
});
export default TokenContext;
import React, { useState } from 'react';
import './App.css';
import Title from './Title';
import TokenContext from './TokenContext';
function App() {
const [token, setToken] = useState(null);
return(
<TokenContext.Provider value={{ token, setToken }}>
<Title />
</TokenContext.Provider>
);
}
export default App;
</code></pre>
<p>How would I approach this if I just want to store a JS object in context (not a state) and also change the value anywhere?</p>
| 0non-cybersec
| Stackexchange |
Secure password encryption/decryption of strings in PHP. <p>I wanted to know if there exists a somewhat simple, but secure, method to encrypt strings(not passwords), with a password which is not stored on the server, in PHP.</p>
<p>I've checked <a href="http://www.tonymarston.net/php-mysql/encryption.html">A reversible password encryption routine for PHP</a>, but I'm unsure if it is secure enough if intruders have access to the server and source.</p>
<p>We're talking about a automatic system where a computer sends a request to a server, which stores information in a log. So I'm thinking I could send the encryption password in the request header, preferably encrypted, but then it would be difficult to decrypt without storing the password somehow on the server. Wait, I think i might be complicating things a bit too much, but I hope you get the idea... It's meant to keep the information safe, even if hackers have full control over the server.</p>
| 0non-cybersec
| Stackexchange |
ar
X
iv
:c
on
d-
m
at
/0
40
24
75
v1
[
co
nd
-m
at
.o
th
er
]
1
8
F
eb
2
00
4
Interface-Localized Mode In Bilayer Film
Ferromagnetic Resonance Spectrum*
H. Puszkarski** and S. Mamica
Surface Physics Division, Faculty of Physics, Adam Mickiewicz University,
61-614 Poznań, ul. Umultowska 85, Poland
PACS numbers: 75.70.-i; 76.50.+g; 75.30.Ds
*To be published in ”Horizons in World Physics” Vol. 243 (Nova Science Publishers)
** Corresponding author: [email protected]
ABSTRACT
Ferromagnetic resonance (FMR) in exchange-coupled bilayer films has been the
subject of intensive studies in recent years. From the experimental viewpoint, a char-
acteristic feature of this FMR is that some specimens show single resonance, whereas
others show double resonance. Moreover, double resonance can exhibit a regular pat-
tern, in which the high-field (HF) line intensity surpasses that of the low-field (LF)
line, or it can exhibit an inverted pattern with the HF line less intense than the LF
line. There is a general agreement that the inverted FMR pattern occurs when the HF
line is an ’optic mode’, i.e. an out-of-phase composition of individual sublayer modes,
and the LF line is an ’acoustic mode’, or an in-phase mode composition. The exist-
ing theoretical explanations of bilayer ferromagnetic resonance are, as a rule, based
on phenomenological equation of motion of the magnetization vector. In this paper,
we propose a theory of FMR in ultrathin bilayers based on an entirely microscopic
approach, using the Heisenberg model of localized spins and assuming that the two fer-
romagnetic sublayers are exchange-coupled through their interface. Both the strength
and the sign of this interface coupling (Jint) is arbitrary (we admit ferromagnetic or
antiferromagnetic interface coupling). The Hamiltonian contains an exchange energy
and a Zeeman energy terms; the external field is assumed to be applied obliquely to the
film surface. We focus on the effects originating from the interface coupling, though the
system is assumed to exhibit also pinning effects, originating from surface anisotropy
on the outer surfaces of the film as well as from intrinsic interface anisotropy present
on internal interfaces. The latter anisotropy is assumed to consist of two components:
uni-directional ( ~Kint) and uni-axial (Dint). We show that the resonance spectrum in
symmetric bilayer is completely independent of Jint, but depends strongly on the ap-
plied static field configuration with respect to the interface normal (angle θ). A critical
angle θcrit is found to exist (as in the case of single-layer film) for which the multipeak
spectrum reduces to a single-peak one. This rigorous microscopic FMR theory does
explain the inverted pattern of the bilayer FMR spectrum by assuming the HF line to
correspond to an in-phase mode, but of interface-localized nature. The intensity of such
localized mode decreases with growing strength of its localization at the interface and,
when the localization becomes sufficiently strong, becomes lower than the intensity of
the other mode (which is of the bulk type). This gives a possibility to explore the HF
resonance line corresponding to the interface-localized mode as a potential source of
information concerning the bilayer interface.
1
http://arxiv.org/abs/cond-mat/0402475v1
Contents
1 Introduction 2
2 General planar thin film model 3
2.1 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 The Hamiltonian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Hamiltonian diagonalization procedure 5
3.1 Transformation to the local coordinate system . . . . . . . . . . . . . . 5
3.2 Transformation to second quantization operators . . . . . . . . . . . . . 6
3.3 Bi-linear Hamiltonian . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.4 Fourier transformation in the film plane . . . . . . . . . . . . . . . . . 8
3.5 Transformation along the surface normal . . . . . . . . . . . . . . . . . 9
4 The particular case: ferromagnetic bilayer film 10
4.1 General form of the bilayer Hamiltonian . . . . . . . . . . . . . . . . . 10
4.2 The effect of various surface cuts . . . . . . . . . . . . . . . . . . . . . 14
5 Ambiguity in existing interpretation of bilayer FMR spectra 16
6 The effect of interface coupling 16
7 Critical angle in bilayer resonance spectrum 22
7.1 The effect of uni-axial anisotropy . . . . . . . . . . . . . . . . . . . . . 22
7.2 The effect of uni-directional anisotropy . . . . . . . . . . . . . . . . . . 29
8 Conclusions 29
References 32
Appendix: Bilayer Hamiltonian matrix elements 34
1 Introduction
Magnetic multilayers have recently become the subject of intensive studies, both
theoretical and experimental, in which special attention is paid to interface parameters,
such as interface exchange coupling or interface anisotropy. This interest in interface
is due to its significant effect on the properties of the multilayer system as a whole.
One of the key methods of interface investigation is based on ferromagnetic resonance
(FMR). The interface coupling [1]–[3] as well as the interface anisotropy [4, 5] in a
multilayer can be studied by means of the FMR spectrum. In anisotropy studies,
angle relations play an important role [6]–[8]. Also, FMR has been recently used in
investigating magnetic particles size distribution [9].
From the experimental viewpoint, the FMR in bilayer films is characterized by the
fact that some specimens show single resonance, whereas others show double resonance.
2
Moreover, the double resonance can exhibit a regular pattern, in which the high-field
(HF) line possesses an intensity greater than that of the low-field (LF) line, or it can
exhibit an inverted pattern with a HF line less intense than the LF line. According to
a commonly accepted interpretation, the inverted FMR pattern occurs when the HF
line is an out-of-phase composition of the individual sublayer modes (”optic mode”)
and the LF line is an in-phase mode composition (”acoustic mode”). Here, consensus
seems to be due to the circumstance that out-of-phase modes, naturally, are associated
with lower net magnetization; this is invoked as an explanation of the lower intensity
of the HF resonance line in an inverted pattern. However, a perusal of the literature
shows that this interpretation lacks rigorous proof; its basic assumption - that between
the two lines observed always the HF line is out-of-phase and the LF line is in-phase -
has never, to our knowledge, been proved. This stimulated us to take a closer look at
the whole problem.
FMR spectra are commonly interpreted on the basis of macroscopic theories; in
Artman-Layadi theory [10]–[15], often applied to bilayer film FMR, sublayer magneti-
zations are regarded as classical vectors and appear as such in the key expression for free
energy of interactions between sublayer magnetizations. A microscopic theory of FMR
in thin films has been developed by some authors, including Ferchmin [16], Puszkarski
[17, 18] and Wojtczak [19, 20]. The Hamiltonian considered in their studies includes
the exchange interaction energy, Zeeman energy and the uni-axial anisotropy energy,
and is diagonalized by means of Tyablikov-Bogolyubov method [21]. The resulting
eigenvalues correspond to spin-wave energies, indicating the resonance line positions,
and the intensities of these resonance lines can be found from the corresponding eigen-
vectors. Thus, a full theoretical image of FMR spectrum is obtained by using this
method.
In this study, the FMR spectrum in a magnetic bilayer film is investigated as a
function of the interface coupling and the interface anisotropy, on the basis of the
theory developed by Puszkarski in [17, 18]. The Hamiltonian of non-homogeneous thin
film model is specified in Section 2 and diagonalized in Section 3. The Hamiltonian of
ferromagnetic bilayer film is diagonalized in Section 4. Section 5 refers to the bilayer
FMR spectra composed of two resonance lines, often reported in experimental studies;
as we mentioned above, in the most common interpretation the low-intensity line is
related to an optic mode, and the high-intensity line to an acoustic mode. However,
the FMR spectra computed in our model prove this interpretation is not always right.
In Section 6, we show that symmetric bilayer FMR spectrum does not depend on the
interface coupling value, and the effect of the interface anisotropy on the critical angle
appearance and value is studied in Section 7.
2 General planar thin film model
2.1 Assumptions
In the planar thin film model, referred to as Valenta model [22, 23], the thin
film specimen is assumed to be infinite and homogeneous in the directions parallel to
its surface, but finite and generally inhomogeneous along the surface normal. In the
3
x
y
z
L
L-1
L-2
3
2
l =1
⊥k
&
||k
&
z’
y’
x’
l: Jll, Dl, Sl
l': Jl’l’, Dl’, Sl’
Jll’
Figure 1: The planar thin film model.
latter direction, the inhomogeneous thin film can be divided into a number of lattice
planes parallel to the film surface (see Fig. 1). If all the lattice planes are assumed to
have identical crystallographic structure (the same plane lattice type and equal lattice
constant values), all atoms within a plane have identical neighbourhood, and thus are
in identical physical conditions. A spin is placed in each lattice node. Its position is
defined by the number of the plane to which the spin belongs (l) and the site vector
within this plane (~j); its nearest neighbours can lie not only in the same plane or
a neighbouring one, but in farther planes as well (this problem is more thoroughly
discussed in [24, 25, 26, 27]). The number of plane l′ spins being nearest neighbours of
a plane l spin shall be denoted by zll′. Both the spins and the exchange interactions are
assumed to be equal within a lattice plane (but they can differ from plane to plane).
Two types of coordinate system shall be used below. In the first one, xyz, related to
the crystal lattice, x and y axes are parallel to the film surface, the z axis being oriented
along the surface normal. Another coordinate system to be used, x′y′z′, is related to a
single lattice site; in this local system, the positive direction of z′ axis is defined by unit
vector ~γ
l~j
, indicating the direction of quantization of the spin in the considered site.
The direction of quantization follows that of the effective magnetic field in the spin
site. Three components contribute to this effective field: the applied magnetic field,
the demagnetization field and the anisotropy field, the latter usually due to the atomic
magnetic moment interactions with the crystal lattice electric field (the so-called crystal
field). The assumptions made within this model imply that the effective field within a
4
lattice plane is equal in all spin sites ( ~H
eff
l~j
≡ ~Heffl ), and consequently, all the spins
within a single plane have equal direction of quantization (~γ
l~j
≡ ~γl).
2.2 The Hamiltonian
We are going to consider a Heisenberg Hamiltonian of the following form:
Ĥ = −2
∑
l~j;l′~j′
J
l~j,l′~j′
~̂S
l~j
· ~̂S
l′~j′
− gµB
∑
l~j
~H
eff
l · ~̂Sl~j −
∑
l~j
Dl
(
Ŝz
l~j
)2
, (1)
J
l~j,l′~j′
denoting the exchange integral, g being the gyromagnetic ratio, and µB being
Bohr magneton. Vector ~j specifies the node position in plane l (~j ∈ l), and vector
~j′ plays the same role in plane l′ (~j′ ∈ l′). Symbol
∑
l~j;l′~j′ means the summation
involves all the spin pairs, each pair being considered once only. The three terms in
Hamiltonian (1) correspond to the exchange interactions energy, the Zeeman energy
and the single-ion anisotropy energy, respectively. The dynamic dipolar fields shall not
be taken explicitly into consideration here, since – as it has been shown by Krawczyk
[28] – their effect on the localized state existence conditions is minor.
Assuming that the exchange interactions occur between the nearest neighbours
only, and admitting that these interactions, though equal within a lattice plane, can be
different between spins lying in different planes (in this case, J
l~j,l′~j′
= Jll′), we obtain
the following form of the Hamiltonian:
Ĥ = −
∑
l,~j 6=l′,~j′
Jll′ ~̂Sl~j · ~̂Sl′,~j′ − gµB
∑
l,~j
~H
eff
l · ~̂Sl~j −
∑
l,~j
Dl
(
Ŝz
l~j
)2
. (2)
In order to find the inhomogeneous thin film eigenstates, Hamiltonian (2) must be
diagonalized.
3 Hamiltonian diagonalization procedure
Four transformations shall be performed [29], leading to the diagonal form of Hamil-
tonian (2): 1) transformation to the local coordinate system, 2) transformation to the
boson operators, 3) Fourier transformation in the film plane and 4) the transformation
along the film surface normal.
3.1 Transformation to the local coordinate system
First we shall transform Hamiltonian (2) from its form in the crystal lattice coor-
dinate system, xyz, to that in the local coordinate system, x′y′z′. This transformation
reads [21]:
~̂S
l~j
= ~γ
l~j
Ŝ ′
z
l~j +
1√
2
(
~A
l~j
Ŝ ′
+
l~j +
~A∗
l~j
Ŝ ′
−
l~j
)
, (3)
5
~γ
l~j
denoting the previously introduced quantization axis unit vector, and ~A
l~j
having
the following coordinates (provided that y′ lies in plane xy):
Ax
l~j
= −
1√
2
√
1−
(
γz
l~j
)2 (
γx
l~j
γz
l~j
+ iγ
y
l~j
)
,
A
y
l~j
= −
1√
2
√
1−
(
γz
l~j
)2 (
γ
y
l~j
γz
l~j
− iγx
l~j
)
, (4)
Az
l~j
=
1√
2
√
1−
(
γz
l~j
)2
.
Vectors ~γ
l~j
and ~A
l~j
fulfill the following relations:
~γ
l~j
= ~γ∗
l~j
, ~γ
l~j
· ~γ
l~j
= 1, ~A∗
l~j
· ~A
l~j
= 1,
~A
l~j
· ~γ
l~j
= 0, ~A∗
l~j
· ~γ
l~j
= 0, ~A
l~j
· ~A
l~j
= 0,
~γ
l~j
× ~A
l~j
= i ~A
l~j
, ~A
l~j
× ~A∗
l~j
= i~γ
l~j
.
(5)
3.2 Transformation to second quantization operators
In the second step, the spin operators (expressed in x′y′z′ coordinates) shall be
replaced with boson operators by means of Holstein-Primakoff transformation. In the
resulting Hamiltonian, only quadratic terms shall be retained, and all the terms of
other orders shall be omitted (however, the commutation rules should be taken into
consideration, and attention paid to the sequence of boson operators when omitting
the higher-order terms).
Holstein-Primakoff transformation reads [21]:
Ŝ ′
+
l~j =
√
2S
l~j
f̂
l~j
â
l~j
, Ŝ ′
−
l~j =
√
2S
l~j
â+
l~j
f̂
l~j
, Ŝ ′
z
l~j = Sl~j − â
+
l~j
â
l~j
,
f̂
l~j
=
√
1− â+
l~j
â
l~j
/2S
l~j
,
(6)
with operators of creation (â+
l~j
) and annihilation (â
l~j
) satisfying the following commu-
tation rules:
[â
l~j
, â+
l′~j′
] = δll′δ~j~j′, [âl~j , âl′~j′] = 0. (7)
Using the approximation of quasi-saturation, we obtain:
Ŝ ′
+
l~j =
√
2S
l~j
â
l~j
, Ŝ ′
−
l~j =
√
2S
l~j
â+
l~j
, Ŝ ′
z
l~j = Sl~j − â
+
l~j
â
l~j
. (8)
The above transformations shall be applied to the first two terms in the Hamiltonian,
i.e. the exchange (bi-ion) interaction term and the Zeeman (single-ion, linear) term.
The transformations to be applied to the remaining anisotropy term (single-ion, non-
6
linear), are as follows [30]:
Ŝ ′
−
l~jŜ
′
+
l~j = 2Sl~jâ
+
l~j
â
l~j
,
Ŝ ′
+
l~jŜ
′
−
l~j = 2Sl~j +
(
2S
l~j
− 2
)
â+
l~j
â
l~j
,
(
Ŝ ′
z
l~j
)2
= S
′2
l~j
−
(
2S
l~j
− 1
)
â+
l~j
â
l~j
,
Ŝ ′
+
l~jŜ
′
z
l~j =
√
2S
l~j
(
S
l~j
− 1
)
â
l~j
,
Ŝ ′
z
l~jŜ
′
+
l~j =
√
2S
l~j
S
l~j
â
l~j
,
Ŝ ′
−
l~jŜ
′
z
l~j =
√
2S
l~j
S
l~j
â+
l~j
,
Ŝ ′
z
l~jŜ
′
−
l~j =
√
2S
l~j
(
S
l~j
− 1
)
â+
l~j
,
Ŝ ′
+
l~jŜ
′
+
l~j =
√
2S
l~j
(
2S
l~j
− 1
)
â
l~j
â
l~j
,
Ŝ ′
−
l~jŜ
′
−
l~j =
√
2S
l~j
(
2S
l~j
− 1
)
â+
l~j
â+
l~j
.
(9)
After transformations (3), (8) and (9) Hamiltonian (2) becomes:
Ĥ = E0(~γl) +
∑
l,~j;l′,~j′
(
P
~j~j′
ll′ â
+
l~j
â
l′~j′
+
1
2
Q
~j~j′
ll′ âl~jâl′~j′ +
1
2
Q
∗~j~j′
ll′ â
+
l~j
â+
l′~j′
)
+
∑
l,~j
(
Rlâl~j +R
∗
l â
+
l~j
)
,
(10)
where:
E0(~γl) = −N
∑
ll′
zll′Jll′SlSl′~γl · ~γl′ −NgµB
∑
l
Sl ~H
eff
l · ~γl
−N
∑
l
DlSl
(
Sl cos
2 θ +
1
2
cos2 θ −
1
2
)
, (11)
P
~j~j′
ll′ =
2
∑
n zlnJlnSn~γl · ~γn + gµB ~H
eff
l · ~γl
−Dl(Sl − 12)(1− 3 cos
2 θ) for l~j = l′~j′,
−2
√
SlSl′Jll′A
∗
l · Al′ for l~j 6= l′~j′,
(12)
Q
~j~j′
ll′ =
−Dl
√
Sl(Sl − 12)(1− cos
2 θ) for l~j = l′~j′,
−2
√
SlSl′Jll′Al · Al′ for l~j 6= l′~j′,
(13)
Rl = −2
√
Sl
∑
n
zlnJlnSnAl · ~γn − gµB
√
Sl ~H
eff
l ·Al
−
1
2
√
2Sl(2Sl − 1) cos θ
√
1− cos2 θ. (14)
Symbol θ, appearing in the above equations, denotes the angle between the film mag-
netization vector and the surface normal; zll′, as previously defined, is the number of a
plane l spin nearest neighbours in plane l′. Equality Jll′ = Jl′l implies that P
~j′~j
l′l = P
∗~j~j′
ll′
and Q
~j′~j
l′l = Q
~j~j′
ll′ , which means that Hamiltonian (10) is Hermitian.
7
3.3 Bi-linear Hamiltonian
As mentioned above, only quadratic terms shall be retained in the considered
Hamiltonian:
Ĥ =
∑
l,~j;l′,~j′
(
P
~j~j′
ll′ â
+
l~j
â
l′~j′
+
1
2
Q
~j~j′
ll′ âl~j âl′~j′ +
1
2
Q
∗~j~j′
ll′ â
+
l~j
â+
l′~j′
)
. (15)
The terms of order zero, shifting uniformly the energy scale, are omitted. The first-
order terms vanish when the direction of ~γ corresponds to the minimum energy [30].
The fourth-order terms are related to the interactions between magnons, and their
omitting is justified by our previous assumptions.
The general method of quadratic form diagonalization was proposed by Tyablikov
and Bogolyubov, and applied to thin film and bilayer film by Puszkarski [31, 30]. The
procedure, analogical to that used by Ferchmin [16] and Corciovei [32], is based on two
Fourier transformations, performed in the film plane and along the direction normal to
the film surface. By these operations, boson operators â+
l~j
and â
l′~j′
, originally expressed
in the direct space, l~j, are transformed into the reciprocal space, ~k‖k⊥, in which the
Hamiltonian is diagonal.
3.4 Fourier transformation in the film plane
The transformation in the film plane reads [19, 16, 32]:
â
l~j
=
1√
N
∑
~k‖
exp(−i~k‖ ·~j)b̂~k‖l, (16)
â+
l~j
=
1√
N
∑
~k‖
exp(i~k‖ ·~j)b̂+~k‖l,
N denoting the total number of spins in a single lattice plane parallel to the surface,
and ~k‖ = [kx, ky] being a vector from the two-dimensional Brillouin zone (coordinates
kx and ky are quantized through imposing Born-Kármán cyclic boundary conditions in
the x and y directions). Operators b̂+ and b̂ satisfy the boson commutation rules:
[b̂~k‖l, b̂
+
~k′‖l
′
] = δ~k‖ ~k′‖
δll′, [b̂~k‖l, b̂~k′‖l′
] = 0. (17)
By transformation (16) Hamiltonian (15) becomes:
Ĥ =
∑
~k‖,ll
′
(
Pll′(~k‖)b̂
+
~k‖l
b̂~k‖l′
+
1
2
Qll′(~k‖)b̂~k‖l
b̂
−~k‖l
′ +
1
2
Q∗ll′(
~k‖)b̂
+
~k‖l
b̂+
−~k‖l
′
)
, (18)
where:
Pll′(~k‖) = −2
√
SlSl′Jll′A
∗
l · Al′Γ
~k‖
ll′ (19)
+δll′
[
2
∑
n
zlnJlnSn~γl · ~γn + gµB ~Heffl · ~γl −Dl
(
Sl −
1
2
)(
1− 3 cos2 θ
)]
,
8
Qll′(~k‖) = −2
√
SlSl′Jll′Al · Al′
(
Γ
~k‖
ll′
)∗
− δll′
Dl
√
Sl
(
Sl −
1
2
) (
1− cos2 θ
)
. (20)
Term Γ
~k‖
ll′ , referred to as structural sum, is defined as the following sum over spin
neighbours:
Γ
±~k‖
ll′ =
∑
~j′
e±i
~k‖·(
~j−~j′), (~j ∈ l, ~j′ ∈ l′), (21)
and satisfies the following relations:
Γ
∗~k‖
ll′ = Γ
−~k‖
ll′ , Γ
~k‖
l′l = Γ
∗~k‖
ll′ , Γ
0
ll′ = zll′. (22)
3.5 Transformation along the surface normal
In the last step of the diagonalization procedure, canonical Tyablikov-Bogolyubov
transformation [21] (along the film surface normal) shall be applied to Hamiltonian
(18):
b̂~k‖l
=
∑
k⊥
[
ul(k⊥)ξ̂~k‖k⊥
+ v∗l (−k⊥)ξ̂
+
−~k‖,−k⊥
]
, (23)
b̂+
−~k‖l
=
∑
k⊥
[
u∗l (−k⊥)ξ̂
+
−~k‖,−k⊥
+ vl(k⊥)ξ̂~k‖k⊥
]
,
where ξ̂+~k‖k⊥
and ξ̂~k‖k⊥
are operators of creation and annihilation, respectively, of a spin
wave with energy E(~k‖, k⊥) and wave vector ~k = [~k‖, k⊥], components ~k‖ and k⊥ being,
respectively, parallel and perpendicular to the surface. When expressed by operators
ξ̂~k‖k⊥ and ξ̂
+
~k‖k⊥
, the Hamiltonian becomes diagonal:
Ĥ =
∑
~k‖,k⊥
E(~k‖, k⊥)ξ̂
+
~k‖k⊥
ξ̂~k‖k⊥
+ const. (24)
Hamiltonian (24) is, by assumption, Hermitian, which implies thatE(~k‖, k⊥) = E
∗(~k‖, k⊥).
For transformation (23) to result in the diagonal form of the Hamiltonian, functions
ul(k⊥) and vl(k⊥) must satisfy the following conditions of orthonormality [33]:
∑
l
[ul(k⊥)u
∗
l (k
′
⊥)− vl(k⊥)v
∗
l (k
′
⊥)] = δk⊥k′⊥, (25)
∑
l
[ul(k⊥)vl(−k⊥)− vl(k⊥)ul(−k⊥)] = 0,
∑
k⊥
[ul(k⊥)u
∗
l′(k⊥)− vl′(−k⊥)v
∗
l (−k⊥)] = δll′,
∑
k⊥
[ul(k⊥)v
∗
l′(k⊥)− v
∗
l (−k⊥)ul′(−k⊥)] = 0,
and, moreover, they must be solutions of so-called Tyablikov-Bogolyubov equations.
9
In order to find functions ul(k⊥) and vl(k⊥) in their explicit forms, we shall write
the Heisenberg equations of motion for operators b̂~k‖l
, ξ̂~k‖k⊥
and ξ̂+~k‖k⊥
:
i
˙
b̂~k‖l
=
[
b̂~k‖l
, Ĥ
]
=
∑
l′
[
Pll′(~k‖)b̂~k‖l′
+Q∗ll′(
~k‖)b̂
+
−~k‖l
′
]
, (26)
i
˙
ξ̂~k‖k⊥
=
[
ξ̂~k‖k⊥
, Ĥ
]
= E(~k‖, k⊥) ˆξ~k‖k⊥
, (27)
i
˙
ξ̂+
−~k‖,−k⊥
=
[
ξ̂+
−~k‖,−k⊥
, Ĥ
]
= E(~k‖, k⊥) ˆξ~k‖k⊥
.
By inserting (23) into (26), and using (27), the following equation is obtained:
∑
k⊥
[
ul(k⊥)E(~k‖, k⊥)ξ̂~k‖k⊥
− v∗l (−k⊥)E(−~k‖,−k⊥)ξ̂
+
−~k‖,−k⊥
]
=
∑
k⊥
∑
l′
[
Pll′(~k‖)
(
ul′(k⊥)ξ̂~k‖k⊥
+ v∗l′(−k⊥)ξ̂
+
−~k‖,−k⊥
)
+
Q∗ll′(
~k‖)
(
u∗l′(−k⊥)ξ̂
+
−~k‖,−k⊥
+ vl′(k⊥)ξ̂~k‖k⊥
)]
,
equivalent to a set of 2L equations, if ξ̂~k‖k⊥
and ξ̂+
−~k‖,−k⊥
are linearly independent:
ul(k⊥)E(~k‖, k⊥) =
∑
l′
[
Pll′(~k‖)ul′(k⊥) +Q
∗
ll′(
~k‖)vl′(k⊥)
]
,
−v∗l (−k⊥)E(−~k‖,−k⊥) =
∑
l′
[
Pll′(~k‖)v
∗
l′(−k⊥) +Q
∗
ll′(
~k‖)u
∗
l′(−k⊥)
]
.
Reversing the direction of ~k in the second equation (~k‖ → −~k‖, k⊥ → −k⊥) finally
leads to:
ul(k⊥)E(~k‖, k⊥) =
∑
l′
[
Pll′(~k‖)ul′(k⊥) +Q
∗
ll′(
~k‖)vl′(k⊥)
]
, (28)
−vl(k⊥)E(~k‖, k⊥) =
∑
l′
[
P ∗ll′(−~k‖)vl′(k⊥) +Qll′(−~k‖)ul′(k⊥)
]
.
This is the set of Tyablikov-Bogolyubov equations corresponding to our problem. The
spin wave energy, E(~k‖, k⊥), as well as functions ul(k⊥) and vl(k⊥), describing the spin
wave precession, can be deduced from its solution.
4 The particular case: ferromagnetic bilayer film
4.1 General form of the bilayer Hamiltonian
Let us consider now a magnetic bilayer film, composed of two homogeneous sub-
layers A and B having identical crystallographic structure; each sublayer is assumed
to contain a number of lattice planes, NA and NB, respectively (Fig. 2). Moreover,
10
2
L-1
l =1
3
L-2
L = NA+NB
Kint
B, Dint
B JAB
Kint
A, Dint
A
l = NA
l = NA+1
Ks
B, Ds
B
Ks
A, Ds
A
SA, JA, DA, HA
eff
SB, JB, DB, HB
eff
A
B
Figure 2: The planar magnetic bilayer film model (see the text for detailed description).
the spins in the lattice nodes, as well as the exchange interactions between the near-
est neighbours, are assumed to be equal within each sublayer, though they can differ
between the sublayers. The same rule applies to the other parameters, such as the
bulk anisotropy constant and the effective field. Besides the standard notion of bulk
anisotropy, DA(B), two other quantities shall be used: surface anisotropy D
A(B)
s and
interface anisotropy D
A(B)
int .
The exchange interaction through the interface shall be described by introducing the
interface exchange integral, JAB, positive for ferromagnetic interface coupling, negative
for antiferromagnetic interface coupling, and zero in the case where no coupling is
present between the sublayers. In practice, a thin non-magnetic interlayer is inserted
between the ferromagnetic thin films A and B, and the interface properties (D
A(B)
int ,
JAB) are determined by the interlayer thickness and material.
11
With these assumptions, the matrix form of (28) is:
XA XAB
X
†
AB XB
Y
Y
XA XAB
X
†
AB XB
2L×2L
(
U
V
)
= E
(
U
−V
)
, (29)
U and V being defined as follows:
U =
U1
U2
...
ULA
ULA+1
...
UL−1
UL
, V =
V1
V2
...
VLA
VLA+1
...
VL−1
VL
. (30)
In films obtained from cubic crystal surface cuts (001), (110) or (111), the nearest
neighbours of a plane l spin lie in planes up to l+3 [24, 25, 26, 27], so the general form
of matrices X and Y is seven-diagonal:
XA =
RA − a0 CA DA FA
C∗A RA − a1 CA DA FA
D∗A C
∗
A RA − a2 CA DA FA
F ∗A D
∗
A C
∗
A RA CA DA FA
. . .
. . .
. . .
. . .
. . .
. . .
. . .
F ∗A D
∗
A C
∗
A RA CA DA FA
F ∗A D
∗
A C
∗
A RA − b2 CA DA
F ∗A D
∗
A C
∗
A RA − b1 CA
F ∗A D
∗
A C
∗
A RA − b0
LA×LA
,
(31)
XB =
RB − c0 CB DB FB
C∗B RB − c1 CB DB FB
D∗B C
∗
B RB − c2 CB DB FB
F ∗B D
∗
B C
∗
B RB CB DB FB
. . .
. . .
. . .
. . .
. . .
. . .
. . .
F ∗B D
∗
B C
∗
B RB CB DB FB
F ∗B D
∗
B C
∗
B RB − d2 CB DB
F ∗B D
∗
B C
∗
B RB − d1 CB
F ∗B D
∗
B C
∗
B RB − d0
LB×LB
,
(32)
12
XAB =
...
...
...
...
0 0 0 0 . . .
FAB 0 0 0 · · ·
DAB FAB 0 0 . . .
CAB DAB FAB 0 . . .
LA×LB
, (33)
Y =
R
y
A,s
R
y
A
. . .
R
y
A 0 0 F
y
AB
0 R
y
A 0 D
y
AB F
y
AB
0 0 R
y
A,int C
y
AB D
y
AB F
y
AB
(F
y
AB)
∗ (D
y
AB)
∗ (C
y
AB)
∗ R
y
B,int 0 0
(F
y
AB)
∗ (D
y
AB)
∗ 0 R
y
B 0
(F
y
AB)
∗ 0 0 R
y
B
. . .
R
y
B
R
y
B,s
L×L
.
(34)
The symbols used above are defined as follows:
Ci = −2SiJiΓ1,
Di = −2SiJiΓ2, (35)
Fi = −2SiJiΓ3,
Ri = −2SiJiΓ0 + gµB ~Heffi · ~γi +Di
(
Si −
1
2
) (
3 cos2 θi − 1
)
+2[zi0 + 2(z
i
1 + z
i
2 + z
i
3)]SiJi, (36)
R
y
i,(int,s) = −Di,(int,s)
√
Si
(
Si −
1
2
)
sin2 θi, (37)
where i = A;B, and:
CAB = −2
√
SASBJAB ~A
∗
A · ~ABΓ1,
DAB = −2
√
SASBJAB ~A
∗
A · ~ABΓ2, (38)
FAB = −2
√
SASBJAB ~A
∗
A · ~ABΓ3,
C
y
AB = −2
√
SASBJAB ~AA · ~ABΓ1,
D
y
AB = −2
√
SASBJAB ~AA · ~ABΓ2, (39)
F
y
AB = −2
√
SASBJAB ~AA · ~ABΓ3,
13
a0 = 2(z
A
1 + z
A
2 + z
A
3 )SAJA − gµB ~K
A
s · ~γA − (D
A
s −DA)(SA −
1
2
)(3 cos2 θA − 1),
a1 = 2(z
A
2 + z
A
3 )SAJA,
a2 = 2z
A
3 SAJA,
b2 = 2z
A
3 SAJA − 2z
B
3 SBJAB~γA · ~γB,
b1 = 2(z
A
2 + z
A
3 )SAJA − 2(z
B
2 + z
B
3 )SBJAB~γA · ~γB,
b0 = 2(z
A
1 + z
A
2 + z
A
3 )SAJA − 2(z
B
1 + z
B
2 + z
B
3 )SBJAB~γA · ~γB −
gµB ~K
A
int · ~γA − (D
A
int −DA)(SA −
1
2
)(3 cos2 θA − 1), (40)
c0 = 2(z
B
1 + z
B
2 + z
B
3 )SBJB − 2(z
A
1 + z
A
2 + z
A
3 )SAJAB~γA · ~γB −
gµB ~K
B
int · ~γB − (D
B
int −DB)(SB −
1
2
)(3 cos2 θB − 1),
c1 = 2(z
B
2 + z
B
3 )SBJB − 2(z
A
2 + z
A
3 )SAJAB~γA · ~γB,
c2 = 2z
B
3 SBJB − 2z
A
3 SAJAB~γA · ~γB,
d2 = 2z
B
3 SBJB,
d1 = 2(z
B
2 + z
B
3 )SBJB,
d0 = 2(z
B
1 + z
B
2 + z
B
3 )SBJB − gµB ~K
B
s · ~γB − (D
B
s −DB)(SB −
1
2
)(3 cos2 θB − 1).
As assumed previously, the direction of quantization appearing in the above formulae is
constant within a single sublayer, but can differ between the sublayers (i.e. ~γl = ~γA(B),
which implies ~Al = ~AA(B)).
4.2 The effect of various surface cuts
We shall henceforth consider a bilayer film whose both sublayers are made of the
same material (SA = SB ≡ S and JA = JB ≡ J), possible asymmetry being due only to
interface (DAint 6= DBint, ~KAint 6= ~KBint) or surface ( ~KAs 6= ~KBs ) conditions. In the simplest
case, the nearest neighbours of a plane l spin lie in either the same or a neighbouring
plane (l′ = l, l±1), which brings the Hamiltonian matrix to a three-diagonal form [34].
This situation takes place for surface cut (001) in all three cubic crystal types, and for
cut (110) in sc and bcc crystals. As our study is focused on ferromagnetic resonance,
in which standing spin waves only are observed, we assume ~k‖ = 0.
In order to simplify the problem, the bilayer spin precession shall be henceforth
assumed to be circular. The spin precession ellipticity is allowed for in (29) through
matrix Y (34), whose diagonal and out-of-diagonal elements are defined in (37) and
(39), respectively. If the quantization vector ~γ has the same direction in both sublayers,
then ~AA = ~AB, and the out-of-diagonal elements of Y vanish, since product ~AA · ~AB
is zero. The diagonal elements of Y can be divided into three groups, distinguishing
bulk, surface and interface elements. Their different values are due to the fact that the
ellipticity of spin precession on the surface and the interface differs from that in the
bulk. However, if the spin precession ellipticity is assumed approximately homogeneous
throughout the bilayer film, all the diagonal elements of Y become equal; as shown in
[30], this does not affect the relative intensities of the resonance lines, and thus matrix
14
Y , having no effect on the resonance spectrum, can be omitted (i.e. we can assume
Y ≡ 0). Hence, in the circular spin precession approximation, set of equations (29)
can be separated, and reduced to a simple eigenvalue problem with matrix X only.
With the above-specified assumptions, for cubic crystal surface cut (001) equation
(29), divided by 2SJΓ1, becomes:
2− AAsurf −1
−1 2 −1
. . .
. . .
. . .
−1 2 −1
−1 2−AAint −Jint
−Jint 2−ABint −1
−1 2 −1
. . .
. . .
. . .
−1 2 −1
−1 2−ABsurf
U = E ′U,
(41)
the Hamiltonian matrix elements being defined as follows:
A
A(B)
surf = 1−
gµB
2SJz⊥
(~γ · ~KA(B)s )
︸ ︷︷ ︸
as0
−
DA(B)s (S − 12)
2SJz⊥︸ ︷︷ ︸
as2
(3 cos2 θ − 1), (42)
A
A(B)
int = 1− Jint −
gµB
2SJz⊥
(~γ · ~KA(B)int )
︸ ︷︷ ︸
ai0
−
D
A(B)
int (S − 12)
2SJz⊥︸ ︷︷ ︸
ai2
(3 cos2 θ − 1), (43)
Jint = JAB/J. (44)
Properties of function Γ (22) imply that Γll′(~k‖ = 0) = zll′ , and thus
E ′ = E/(2SJz⊥), (45)
where z⊥ ≡ zl,l+1.
Considering symmetric surface or interface conditions, we shall henceforth omit
indices A and B in the respective sublayer parameter symbols, e.g. aAi2 = a
B
i2 ≡ ai2, or
AAsurf = A
B
surf ≡ Asurf .
Equation (41) provides the basis for our further investigation. The Hamiltonian
matrix corresponds to a simplified bilayer film model on which a spin-wave spectrum
can be studied as a function of three essential structural magnetic parameters: the
surface parameter, Asurf , the interface parameter, Aint, and the interface coupling,
Jint. Below, eigenvalue problem (41) shall be solved numerically only, assuming the
spin value equal to one (S=1).
15
5 Ambiguity in existing interpretation of bilayer
FMR spectra
In the ’reversed’ double-peak FMR spectrum, reported in bilayer films, the high-
intensity line is commonly interpreted as corresponding to an acoustic mode, the low-
intensity line being related to an optic mode [35, 36, 37, 38, 39]. This implies that such
’reversed’ spectrum should appear only in bilayers with antiferromagnetic interface
coupling. Fig. 3 shows examples of bilayer resonance spectra with inverse intensity
arrangement, resulting from our numerical computations; (a)-(c) were obtained assum-
ing antiferromagnetic interface coupling 1, while (d)-(f) correspond to bilayers in which
the interface coupling is ferromagnetic. Perpendicular configuration (θ = 0), as well
as the absence of the uni-directional anisotropy (ai0 = 0) were assumed in all cases.
The case depicted in Fig. 3(a) corresponds to the commonly used interpretation: optic
bulk mode n = 1 has lower intensity than acoustic mode n = 2. In case (b), the
high-intensity mode (n = 2) is still acoustic, but the low-intensity line (n = 1) corre-
sponds to an optic interface mode. Another possibility is shown in Fig. 3(c): both first
modes, n = 1 and n = 2, are of ’optic’ nature, n = 2 being an optic bulk mode and
n = 1 being an optic surface mode; the low intensity of the latter is due not only to its
optic character, but also to its localization at the surface (this case has already been
studied in [40]). If the interface coupling is ferromagnetic, three possibilities can occur,
their examples shown in Figs. 3(d)-(f). In case (d), the low-intensity peak (n = 1)
corresponds to an acoustic surface mode, while the high-intensity line (n = 3) is re-
lated to an acoustic bulk mode. In (e), the low-intensity mode (n = 1) is acoustic and
localized at the surface, and the high-intensity mode (n = 2) is acoustic and localized
at the interface. In (f), the low-intensity mode (n = 1) is acoustic and localized at the
interface, while the high-intensity peak (n = 3) corresponds to an acoustic bulk mode.
These results clearly indicate that, from the theoretical point of view, the commonly
used interpretation of the double-peak resonance spectra, relating the high-intensity
line to an acoustic mode, and the low-intensity line to an optic mode, is not always
legitimate.
6 The effect of interface coupling
In this Section we shall analyse ferromagnetic resonance spectra obtained in the
so-called perpendicular configuration, i.e. for θ = 0. For simplicity reasons, we shall
assume that there is no uni-directional anisotropy on the interface (ai0 = 0), and the
surface spins have ’natural’ freedom (Asurf ≡ 1), Thus, the only source of anisotropy
1This case (i.e. a bilayer with antiferromagnetic interface coupling) was also considered in our
previous paper [33]. However, as we have just recently realized, the numerical calculations performed
there - for this particular case only - were incorrect due to the faulty computational program used in
that paper. This resulted in misinterpretation of the energetically lowest mode as a symmetric one.
Our present correct numerical calculations show that, in fact, this mode is of antisymmetric nature.
This discrepancy leads to quantitatively different resonance spectra, however, it does not affect the
correctness of our main hypothesis formulated in [33] about the permissible interface-localized nature
of the first resonance mode.
16
1
2
3 6
UM
1
2
3
4
UM
n=1
n=2
n=3
n=4
n=1
n=2
n=3
n=4
(a)
Asurf
A = 0.5
Aint
A = -0.1
Aint
B = 0.9
Asurf
B = 0.5
ai2
A = 0.7
Jint = - 0.3
ai2
B = 0.2
(b)
Asurf
A = 1
Aint
A = 0.7
Aint
B = 1.5
Asurf
B = 1
ai2
A = 0.2
Jint = - 0.1
ai2
B = -0.2
ENERGY
ENERGY
Figure 3: Profiles of the first (i.e. having the lowest energies) bilayer modes and the
corresponding resonance spectra obtained for the parameter values specified in boxes
(the values of interface parameter Aint correspond to those assumed for Jint and ai2,
specified on the right of the bracket). The dashed line indicates the position of a
hypothetic uniform mode (UM) with ~k ≡ 0.
(a) Asymmetric interface, antiferromagnetic interface coupling.
(b) Asymmetric interface, interface coupling still antiferromagnetic, but weaker than
in (a). Note that the value of parameter aBi2 is negative.
17
2 3
4
1
UM
UM
1
2
3
4 5
n=1
n=2
n=3
n=4
n=1
n=2
n=3
n=4
(d)
Asurf
A = 1.5
Aint
A = 0.5
Aint
B = 0.9
Asurf
B = 1.5
ai2
A = 0.1
Jint = 0.3
ai2
B = -0.1
(c)
Asurf
A = 1
Aint
A = 0.9
Aint
B = 0.9
Asurf
B = 1.5
ai2
A = 0.1
Jint = - 0.1
ai2
B = 0.1
n=1
ENERGY
ENERGY
Figure 3: c, d
(c) Asymmetric surfaces, antiferromagnetic interface coupling.
(d) Asymmetric interface, ferromagnetic interface coupling.
18
n=1
n=2
n=3
n=4
UM
2
4
1
3 5
UM
3
7
1
n=1
n=2
n=3
n=4 (f)
Asurf
A = 0.5
Aint
A = 1.3
Aint
B = 1.3
Asurf
B = 0.6
ai2
A = -0.3
Jint = 0.3
ai2
B = -0.3
(e)
Asurf
A = 1
Aint
A = 0.9
Aint
B = 0.9
Asurf
B = 1.5
ai2
A = -0.1
Jint = 0.3
ai2
B = -0.1
n=1
ENERGY
ENERGY
Figure 3: e, f
(e) Asymmetric surfaces, ferromagnetic interface coupling.
(f) Asymmetric surfaces, ferromagnetic interface coupling.
19
-1.4 -1.0 -0.6 -0.2 0.2 0.6 1.0 1.4
Jint
n=1
n=1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
-1.0
-1.2
-0.6
-0.8
R
E
D
U
C
E
D
E
N
E
R
G
Y
ai2 = 0
Asurf =1
N =11
0
Figure 4: Energies of symmetric bilayer modes versus the interface coupling integral,
Jint. The solid lines correspond to antisymmetric modes, the dotted lines corresponding
to symmetric ones.
is the interface uni-axial anisotropy. Fig. 4 shows bilayer mode energies as functions
of the interface coupling integral in the absence of any interface anisotropy (ai2 = 0)
(this situation was studied in [33]). If the coupling is ferromagnetic, Jint has no effect
on the energy of the odd modes, while in the case of antiferromagnetic coupling, the
modes ’insensitive’ to Jint variations are even. This result fully corresponds to that
reported in [33] and [20]. An insight into these functions is provided by the mode
profiles analysed versus the interface coupling integral. Fig. 5(a) shows profiles of the
six lowest modes for five different Jint values. In the case of ferromagnetic coupling the
interface coupling integral is found to have little effect on the shape of these profiles.
Mode n = 1 is always a uniform mode; the even modes are antisymmetric (and as
such do not appear in the resonance spectrum), and all the odd modes except n = 1,
though symmetric in the bilayer, are antisymmetric within each sublayer and thus do
not appear in the resonance spectrum either. Hence, it is only the uniform mode that
is observed in the resonance spectrum (see Fig. 5(c)). When Jint < 0, the lowest
mode is localized at the interface (the localization becoming stronger as Jint absolute
value increases), while mode n = 2 is uniform. However, also in this case only one
resonance line is observed (n = 2, see Fig. 5(b)), as all the odd modes, including the
interface mode, are antisymmetric, and thus do not appear in the resonance spectrum.
Hence, the resonance spectrum is found to be insensitive to the interface coupling
20
1J int −= 0.3J int −= 0J int ≈ 0.5J int = 1J int =
n=1 (UM) n=2 (UM)
n=1
n=2
n=3
n=4
n=5
n=6
(a)
(b) FMR spectrum for Jint < 0 (c) FMR spectrum for Jint ≥ 0
ENERGY
Figure 5: (a) Profiles of the six lowest modes and (b, c) the corresponding FMR
spectra in a symmetric bilayer, computed assuming no interface anisotropy (ai2 = 0),
the surface spins having natural freedom (Asurf = 1), for different values of interface
exchange integral Jint. Each sublayer is composed of N = 11 lattice planes. UM
denotes the resonance line corresponding to the uniform mode excitation.
21
integral variations (since Jint has no effect on the symmetric modes, and affects only
the antisymmetric ones).
The above conclusion can be equally deduced in a different reasoning, based on
the notion of effective interface parameter, Aeff , introduced in [33]. In the considered
perpendicular configuration (θ = 0) this parameter is expressed as follows:
Aeff =
{
Aseff = 1− 2ai2, for symmetric modes,
Aaeff = 1− 2ai2 − 2Jint, for antisymmetric modes.
(46)
The above formulae directly indicate that only the antisymmetric modes depend on
Jint, the symmetric modes being unrelated to it. This remains valid also when ai2 6= 0,
as shown in Figs. 6 and 7. However, the FMR spectrum depicted there contains more
than one peak, the resonance lines corresponding exclusively to either odd or even
modes, for Jint > 0 or Jint < 0, respectively. In each case, as previously, the FMR
spectrum does not depend on Jint value.
7 Critical angle in bilayer resonance spectrum
The resonance spectra considered in the preceding sections were obtained for the
so-called perpendicular configuration, in which the magnetization vector is oriented
along the film surface normal. In this section, we are going to investigate configuration
effects in resonance spectrum, due to different orientation of the magnetization vector
with respect to the film surface. Our analysis shall be based on the effective interface
parameter, Aeff , a concept introduced in our earlier study [33]. In a symmetric bilayer
film, this parameter is expressed as follows:
Aeff =
{
Aseff = 1− ai0 − ai2(3 cos2 θ − 1) , for symmetric modes,
Aaeff = 1− ai0 − ai2(3 cos2 θ − 1)− 2Jint, for antisymmetric modes.
(47)
Bilayer resonance spectra are generally composed of several resonance lines (so-
called spin wave resonance - SWR), though in certain conditions the spectrum reduces
to a single peak. This occurs, for example, when angle θ between the magnetization
vector and the surface normal takes a particular value, referred to as critical angle. The
existence of the critical angle is due to the fact that the effective interface parameter
(47) is a function of θ. For simplicity reasons, in our investigation of the critical angle
effect we shall assume that the surface parameter, Asurf , does not depend on θ, and
that Asurf = 1 (i.e. the spins have ’natural’ freedom on both surfaces).
7.1 The effect of uni-axial anisotropy
In the first case to be considered, the effect of the uni-directional anisotropy shall
be neglected (ai0 = 0). Figs. 8(a) and 8(c) show the intensities of mode excitations
(in relation to that of the first symmetric mode, n = 1) as functions of angle θ in
a symmetric bilayer film (composed of 22 atomic planes, 11 planes in each sublayer)
with ferromagnetic interface coupling (Jint = 0.3). Graphs (a) and (c) were plotted
22
0.2J int −= 0.1J int −= 0.5J int = 0J int ≈ 4.0J int −=
n=1 (BM)
n=3
n=2 (BM)
n=4
n=1
n=2
n=3
n=4
n=5
n=6
(b) FMR spectrum for Jint < 0 (c) FMR spectrum for Jint ≥ 0
(a)
ENERGY
Figure 6: (a) Profiles of the six lowest modes and (b, c) the corresponding FMR spectra
in a symmetric bilayer, computed assuming interface anisotropy ai2 = 0.2, the surface
spins having natural freedom (Asurf = 1), for different values of interface exchange
integral Jint. Each sublayer is composed of N = 11 lattice planes. BM denotes a
resonance line corresponding to the symmetric bulk mode excitation.
23
0.1J int −= 0.1J int = 0.5J int = 0J int ≈ 5.0J int −=
n=1 (IM)
n=3
n=2 (IM)
n=4
n=1
n=2
n=3
n=4
n=5
n=6
(b) FMR spectrum for Jint < 0 (c) FMR spectrum for Jint ≥ 0
(a)
ENERGY
Figure 7: (a) Profiles of the six lowest modes and (b, c) the corresponding FMR
spectra in a symmetric bilayer, computed assuming interface anisotropy ai2 = −0.1,
the surface spins having natural freedom (Asurf = 1), for different values of interface
exchange integral Jint. Each sublayer is composed of N = 11 lattice planes. IM denotes
the resonance line corresponding to the symmetric interface mode excitation.
24
0 20 40 60 80
0 .0
0 .2
0 .4
0 .6
0 .8
1 .0
1 .2
1 .4 ai2
A = ai2
B = -0.3
In
te
ns
it
y
R
at
io
I n
/
I 1
n=3
n=5
⊥ ϑ Æ ||
0 20 40 60 80
0 .0
0 .1
0 .2
0 .3
0 .4
In
te
ns
it
y
R
at
io
I n
/
I 1
n=3
n=5
ai2
A = ai2
B = 0.3
⊥ ϑ Æ ||
ϑ = 40° ϑ = 70°
n=1
n=2
n=3
n=4
n=5
n=6
ϑ ≈ 54.7°
ϑ = 40° ϑ = 70°
n=1
n=2
n=3
n=4
n=5
n=6
ϑ ≈ 54.7°
a)
c) d)
b)
Figure 8: Resonance line relative intensities versus the configuration angle in a bilayer
film with symmetric interface boundary conditions and ferromagnetic coupling (Jint =
0.3). The other parameter values assumed: N = 11, ai0 = 0, Asurf = 1. Graphs (a)
and (c) show intensity ratio In/I1 plotted versus angle θ; the corresponding profiles of
the six lowest modes are shown in (b) and (d) for three different θ values.
25
assuming aAi2 = a
B
i2 = −0.3, and aAi2 = aBi2 = 0.3, respectively. The corresponding
profiles of the six lowest modes are depicted in Figs. 8(b) and 8(d), for three different
values of angle θ: 40o (θ < θcrit), 54.7
o (θ = θcrit) and 70
o (θ > θcrit). (Note that
in both cases the even modes, being antisymmetric, do not appear in the resonance
spectrum).
As shown in Fig. 8(b), for aAi2 = a
B
i2 = −0.3, mode n = 1, localized at the interface
when θ < θcrit, becomes a uniform mode for θ = θcrit, and a bulk mode when θ > θcrit.
The other modes are of bulk nature in all θ range. The resonance intensity of the first
bulk mode (n = 3), surpassing that of the interface mode at θ = 0o (see Fig. 8(a)),
decreases with growing θ and equals the interface mode intensity at θ ≈ 23.4o. As θ
continues to increase, the intensities of the bulk modes decrease still further to vanish
completely at θ = θcrit(≈ 54.7o), when mode n = 1 becomes uniform, and the only one
to appear in the SWR spectrum. When θ > θcrit, all the modes are of bulk character,
the intensities of modes n ≥ 3 being much lower than that of mode n = 1. Thus, the
critical angle is found to separate two regions in which the relative mode intensities
are radically different.
For aAi2 = a
B
i2 = 0.3 the situation is reversed (Figs. 8(c) and 8(d)). When θ < θcrit,
all the modes are of bulk character; mode n = 1 becomes uniform at θ = θcrit (the
intensities of all other modes being zero), and localized at the interface when θ > θcrit,
its intensity remaining the highest in all θ range. This case is a ’mirror image’ of that
depicted in Figs. 8(a) and 8(b); also here, the critical angle separates two regions in
which the relative mode intensities are completely different.
When the interface coupling becomes antiferromagnetic (Jint = −0.3, see Fig. 9),
the angle relations of the relative mode intensities (with respect to the intensity of the
first symmetric mode, n = 2) are in principle similar to those obtained in the case of
ferromagnetic coupling, the critical angle remaining 54.7o.
From the numerical analysis presented above we deduce that in the case of symmet-
ric bilayer with surface spins having natural freedom, the critical angle value is 54.7o
and does not depend on either the interface coupling, Jint, or the uni-axial anisotropy,
ai2. Its independence of the interface coupling is a consequence of the fact that Jint,
having no effect on the symmetric modes, does not affect the bilayer resonance spec-
trum, as shown in Section 6. As regards the uni-axial anisotropy, its variations, though
significantly modifying the SWR spectrum, do not change the θcrit value, as the critical
angle condition, Aseff = 1, is satisfied when cos
2 θ−1 = 0 (or θ = 54.7o) (47), ai2 being
uninvolved.
Let us now consider a bilayer film with asymmetric interface conditions. Fig. 10
shows the corresponding relative mode intensities plotted versus the configuration an-
gle, θ. In the considered asymmetric bilayer film, each sublayer is composed of 11
atomic planes, the interface coupling is antiferromagnetic (Jint = −0.3), and the as-
sumed interface uni-axial anisotropy values in sublayers A and B are aAi2 = −0.3 and
aBi2 = 0 or 0.2, respectively.
Asymmetric interface conditions are found to have a significant effect on the res-
onance spectrum. As the asymmetry becomes stronger, the relative intensities of the
quasi-antisymmetric modes increase, while those of the quasi-symmetric modes de-
crease, but the critical angle value remains unchanged and equal to 54.7o, as in the
26
0 20 40 60 80
0 .0
0 .2
0 .4
0 .6
0 .8
1 .0
1 .2
1 .4
ai2
A = ai2
B = -0.3
In
te
ns
it
y
R
at
io
I n
/
I 2
n=4
n=6
⊥ ϑ Æ ||
0 20 40 60 80
0 .0
0 .1
0 .2
0 .3
0 .4
In
te
ns
it
y
R
at
io
I n
/
I 2
n=4
n=6
ai2
A = ai2
B = 0.3
⊥ ϑ Æ ||
ϑ = 40° ϑ = 70°
n=1
n=2
n=3
n=4
n=5
n=6
ϑ ≈ 54.7°
ϑ = 40° ϑ = 70°
n=1
n=2
n=3
n=4
n=5
n=6
ϑ ≈ 54.7°
a)
c) d)
b)
Figure 9: Resonance line relative intensities versus the configuration angle in a bi-
layer film with symmetric interface boundary conditions and antiferromagnetic cou-
pling (Jint = −0.3). The other parameter values assumed: N = 11, ai0 = 0, Asurf = 1.
Graphs (a) and (c) show intensity ratio In/I2 plotted versus angle θ; the corresponding
profiles of the six lowest modes are shown in (b) and (d) for three different θ values.
27
0 20 40 60 80
0 .00
0 .05
0 .10
0 .15
0 .20
In
te
ns
it
y
R
at
io
I n
/
I 2
n=3
n=4
n=1
ai2
A = - 0.3; ai2
B = 0.2
0 20 40 60 80
0 .00
0 .05
0 .10
0 .15
n=1
In
te
ns
it
y
R
at
io
I n
/
I 2
n=4
n=3
ai2
A = - 0.3; ai2
B = 0
ϑ = 40° ϑ = 70°
n=1
n=2
n=3
n=4
ϑ ≈ 54.7°
ϑ = 40° ϑ = 70°
n=1
n=2
n=3
n=4
ϑ ≈ 54.7°
a)
c) d)
b)
⊥ ϑ Æ ||
⊥ ϑ Æ ||
Figure 10: Resonance line relative intensities versus the configuration angle in a bilayer
film with asymmetric interface boundary conditions and antiferromagnetic coupling
(aAi2 6= aBi2, Jint = −0.3). The other parameter values assumed: N = 11, ai0 = 0,
Asurf = 1. Graphs (a) and (c) show intensity ratio In/I2 plotted versus angle θ for two
different pairs aAi2, a
B
i2; the corresponding profiles of the six lowest modes are shown in
(b) and (d) for three different θ values.
28
case of symmetric bilayer film. This is due to the fact that in the critical configuration
a bilayer film must be fully symmetric.
Thus, in a ferromagnetic bilayer film with ’natural’ surfaces and the interface prop-
erties defined by two parameters only, namely the interface coupling and the interface
uni-axial anisotropy, the critical angle value is always 54.7o, for both symmetric and
asymmetric interface conditions.
7.2 The effect of uni-directional anisotropy
The effect of the uni-directional anisotropy on the critical angle value in symmetric
bilayer SWR spectrum is illustrated in Fig. 11. Each sublayer contains 11 atomic
planes, and the coupling between them is of ferromagnetic nature (Jint = 0.3). The
assumed values of interface uni-axial and uni-directional anisotropies are ai2 = −0.3
and ai0 = 0.2; −0.2, respectively.
The critical angle is found to strongly depend on the uni-directional anisotropy.
The exact relation, deduced from (47), is as follows:
θcrit = arccos
√
1
3
(
1−
ai0
ai2
)
. (48)
The above relation is plotted in Fig. 12 (bold line); in the same graph, intensity ratio
I3/I1 is plotted versus angle θ and uni-directional anisotropy ai0. Function (48) follows
exactly the line along which the value of function I3/I1(θ, ai0) vanishes.
Thus, a critical angle value different from 54.7o, found experimentally in a sym-
metric bilayer SWR spectrum, would provide evidence for co-existence of uni-axial and
uni-directional anisotropies in the studied sample, the ratio of these two anisotropy
types being deducible from the critical angle value (according to (48)).
8 Conclusions
The results of our theoretical investigation of bilayer FMR spectrum, presented in
this study, deny the interpretation commonly used in experimental studies reporting
double-peak FMR spectra in bilayer films. In this interpretation the low-intensity peak
is related to an optic mode, and the high-intensity line to an acoustic mode. However,
our theoretical study shows this is not always true, providing examples of double-peak
spectra in which both appearing modes are acoustic or, what is more, the high-intensity
peak corresponds to an optic mode. Thus, the interpretation of the observed modes
cannot be unambiguous a priori, as the intensity of a resonance line depends not only
on the phase shift in the sublayer magnetization precession, but also on the precession
amplitude distribution, and especially on its localization.
In the investigated symmetric bilayer SWR spectra both the position and the in-
tensity of the resonance lines are found to be independent of the interface coupling
integral value. The reason is that in symmetric bilayer film the effective interface pa-
rameter depends on the interface coupling integral for antisymmetric modes only, and
these modes do not appear in the SWR spectrum. Hence, symmetric bilayer film seems
29
ai0 = 0.2, ai2 = -0.3
n=3
n=5
n=3
n=5
ai0 = - 0.2, ai2 = -0.3
0 20 40 60 80
0 .0
0 .1
0 .2
0 .3
0 .4
0 .5
0 .6
0 .7
0 .8
In
te
ns
it
y
R
at
io
I
n
/
I 1
⊥ ϑ Æ ||
a)
0 20 40 60 80
0 .0
0 .5
1 .0
1 .5
2 .0
In
te
ns
it
y
R
at
io
I
n
/
I 1
⊥ ϑ Æ ||
c)
ϑ = 20° ϑ = 85°
n=1
n=2
n=3
n=4
n=5
n=6
ϑϑ ≈≈ 41.8°°
b)
ϑ = 20° ϑ = 85°
n=1
n=2
n=3
n=4
n=5
n=6
ϑϑ ≈≈ 70.5°°
d)
Figure 11: Resonance line relative intensities versus the configuration angle in a bilayer
film with symmetric interface boundary conditions and ferromagnetic coupling, assum-
ing non-zero uni-directional anisotropy (Jint = 0.3, ai0 6= 0). The other parameter
values assumed: N = 11, Asurf = 1. Graphs (a) and (c) show intensity ratio In/I1
plotted versus angle θ for two different values of ai0; the corresponding profiles of the
six lowest modes are shown in (b) and (d) for three different θ values.
30
����
�
���
�
��
��
��
��
�
�
�
�
����
�
���
�
�
�
�
I3/I1
⊥
ai0 θ
||
Figure 12: Intensity ratio I3/I1 of the two lowest symmetric modes (n = 1, 3) in a sym-
metric bilayer SWR spectrum, plotted versus the configuration angle (angle between
the film magnetization and the surface normal), θ, and the interface uni-directional
anisotropy, ai0. The ferromagnetic interface exchange coupling is assumed, with inter-
face uni-axial anisotropy value ai2 = −0.3. The bold line represents the critical angle,
θcrit, as a function of the interface uni-directional anisotropy, ai0.
31
to be particularly convenient for interface anisotropy studies. However, it should be
remembered that when the interface coupling is ferromagnetic the odd modes are sym-
metric, and the even modes are antisymmetric, while in the case of antiferromagnetic
coupling the situation is reversed: the odd modes (including the first one, with the
lowest energy) are antisymmetric, the even modes being symmetric.
Moreover, we show that the critical angle effect can occur in a bilayer film even
in the absence of surface anisotropy. In this case, this effect is totally due to the
interface, and if the interface anisotropy is purely uni-axial, the critical angle value is
always 54.7o and does not depend on the anisotropy value. Any deviation of the critical
angle value from 54.7o involves an additional source of interface anisotropy, namely the
uni-directional anisotropy.
ACKNOWLEDGEMENTS
This work was supported by the Polish State Committee for Scientific Research
through projects: KBN-2PO3B 120 23 and PBZ-KBN-044/PO3-2001.
References
[1] A. B. Drovosekov, D. I. Kholin, N. M. Kreines, O. V. Zhotikova and S. O.
Demokritov, J. Magn. Magn. Mater. 226-230, 1779 (2001).
[2] E. V. Shypil, A. M. Pogorily, D. I. Podyalovski and Y. A. Pogoryelov, Low
Temperature Physics 27, 650 (2001).
[3] J. Lindner, E. Kosubek, P. Poulopoulos, K. Baberschke and B. Heinrich, J. Magn.
Magn. Mater. 240, 220 (2002).
[4] S. M. Rezende, M. A. Lucena, A. Azevedo, A. B. Oliveira, F. M. de Aguiar and
W. F. Egelhoff Jr., J. Magn. Magn. Mater. 226-230, 1683 (2001).
[5] S. A. Haque, A. Matsuo, Y. Yamamoto and H. Hori, J. Magn. Magn. Mater.
247, 117 (2002).
[6] J. Geshev, L. G. Pereira and J. E. Schmidt, Phys. Rev. B 64, 184411 (2001).
[7] M. J. Pechan, D. Bennett, N. Teng, C. Leighton, J. Nogués and I. K. Schuller,
Phys. Rev. B 65, 064410 (2002).
[8] A. A. Jalali, S. Kahl, V. Denysenkov and A. M. Grishin, Phys. Rev. B 66, 104419
(2002).
[9] R. S. de Biasi and W. S. D. Folly, Physica B: Condensed Matter 321, 117 (2002).
[10] A. Layadi, J. O. Artman, J. Magn. Magn. Mater. 92, 143 (1990).
[11] A. Layadi, J. O. Artman, J. Magn. Magn. Mater. 176, 175 (1997).
[12] A. Layadi, J. Appl. Phys. 83, 3738 (1998).
32
[13] A. Layadi, J. Appl. Phys. 87, 1429 (2000).
[14] A. Layadi, J. Appl. Phys. 90, 4651 (2001).
[15] A. Layadi, Phys. Rev. B 63, 174410 (2001).
[16] A. R. Ferchmin, Phys. Letters 1, 281 (1962).
[17] H. Puszkarski, phys. stat. sol. 22, 355 (1967).
[18] H. Puszkarski, Solid State Commun. 72, 887 (1989).
[19] L. Wojtczak, J. de Physique 30, 578 (1969).
[20] F. L. Castillo Alvarado, J. H. Rutkowski, A. Urbaniak-Kucharczyk, L. Wojtczak,
Thin Solid Films 324, 225 (1998).
[21] S. V. Tyablikov, Methods of the Quantum Theory of Magnetism, Izd. Nauka,
Moscow 1975 (in Russian).
[22] L. Valenta, Czech. J. Phys. 7, 126 (1957).
[23] L. Valenta, phys. stat. sol. 2, 112 (1962).
[24] H. Puszkarski, J. C. S. Lévy and S. Mamica, Phys. Letters (A) 246, 347 (1998).
[25] S. Mamica, R. Józefowicz and H. Puszkarski Acta Phys. Polon. (A) 94, 79 (1998).
[26] S. Mamica, H. Puszkarski and J. C. S. Lévy, phys. stat. sol. (b) 218, 561 (2000).
[27] S. Mamica, H. Puszkarski and J. C. S. Lévy, Acta Phys. Polon. (A) 97, 483
(2000).
[28] M. Krawczyk, A study of magnon spectra in periodic magnetic composites: for-
bidden energy gaps, Doctoral Thesis, A. Mickiewicz University, Poznań 2001 (in
Polish).
[29] H. Puszkarski, Acta Phys. Polon. A 39, 597 (1971).
[30] H. Puszkarski, phys. stat. sol. (b) 96, 61 (1979).
[31] H. Puszkarski, Acta Phys. Polon. 34, 539 (1968).
[32] A. Corciovei, Phys. Rev. 130, 2223 (1963).
[33] H. Puszkarski, Surf. Sci. Rep. 20, 45 (1994).
[34] S. Mamica, Investigation of existence conditions of surface and interface spin
waves in magnetic thin films and multilayers, Doctoral Thesis, A. Mickiewicz
University, Poznań 2002 (in Polish).
[35] B. Heinrich, Z. Celinski, K. Myrtle, J. F. Cochran, A. S. Arrott, J. Kirschner, J.
Magn. Magn. Mater. 93, 75 (1991).
33
[36] Q. Y. Jin, H. R. Zhai, Y. B. Xu, Y. Zhai, M. Lu, S. M. Zhou, J. S. Payson, G.
L. Dunifer, R. Naik, G. W. Auner J. Appl. Phys. 77, 3971 (1995).
[37] K. Inomata, S. N. Okuno, Y. Saito, K. Yusu, J. Magn. Magn. Mater. 156, 219
(1996).
[38] L. Tong, M. Pan, J. Du, M. Lu, H. Zhai J. Magn. Magn. Mater. 198-199, 437
(1999).
[39] J. Lindner, Z. Kollonitsch, E. Kosubek, M. Farle, K. Baberschke, Phys. Rev. B
63, 4413 (2001).
[40] M. Jackson, D. Mercier, J. C. S. Lévy, J. S. S. Whiting, J. Magn. Magn. Mater.
170, 22 (1997).
Appendix: Bilayer Hamiltonian matrix elements
Below we specify the explicit form of Hamiltonian matrix elements for cubic crystal
surface cuts (001) and (110). Our formulae were derived for ~k‖ = 0, with the quanti-
zation vectors in both sublayers assumed to be identical (i.e. ~γA = ~γB, which implies
~AA = ~AB), and the spin precession to be circular. On these assumptions matrices (31),
(32) and (33) become:
XA =
RA − a CA
C∗A RA CA
. . .
. . .
. . .
C∗A RA CA
C∗A RA − b
;XB =
RB − c CB
C∗B RB CB
. . .
. . .
. . .
C∗B RB CB
C∗B RB − d
;
XAB =
...
...
0 0 . . .
Cint 0 . . .
.
In all the relations detailed below index i denotes the sublayer label (A or B).
sc(001) surface cut
Ri = 4SiJi + gµβ( ~H
eff
i · ~γ) +Di
(
Si −
1
2
)(
3 cos2 θ − 1
)
,
Ci = −2SiJi,
Cint = −2
√
SASBJint,
a = 2SAJA − gµB ~KAs · ~γ − (D
A
s −DA)(SA −
1
2
)(3 cos2 θ − 1),
b = 2SAJA − 2SBJint − gµB ~KAint · ~γ − (D
A
int −DA)(SA −
1
2
)(3 cos2 θ − 1),
34
c = 2SBJB − 2SAJint − gµB ~KBint · ~γ − (D
B
int −DB)(SB −
1
2
)(3 cos2 θ − 1),
d = 2SBJB − gµB ~KBs · ~γ − (D
B
s −DB)(SB −
1
2
)(3 cos2 θ − 1). (49)
bcc(001) surface cut
Ri = 16SiJi + gµβ( ~H
eff
i · ~γ) +Di
(
Si −
1
2
)(
3 cos2 θ − 1
)
,
Ci = −8SiJi,
Cint = −8
√
SASBJint,
a = 8SAJA − gµB ~KAs · ~γ − (D
A
s −DA)(SA −
1
2
)(3 cos2 θ − 1),
b = 8SAJA − 8SBJint − gµB ~KAint · ~γ − (D
A
int −DA)(SA −
1
2
)(3 cos2 θ − 1),
c = 8SBJB − 8SAJint − gµB ~KBint · ~γ − (D
B
int −DB)(SB −
1
2
)(3 cos2 θ − 1),
d = 8SBJB − gµB ~KBs · ~γ − (D
B
s −DB)(SB −
1
2
)(3 cos2 θ − 1). (50)
fcc(001) surface cut
Ri = 16SiJi + gµβ( ~H
eff
i · ~γ) +Di
(
Si −
1
2
)(
3 cos2 θ − 1
)
,
Ci = −8SiJi,
Cint = −8
√
SASBJint,
a = 8SAJA − gµB ~KAs · ~γ − (D
A
s −DA)(SA −
1
2
)(3 cos2 θ − 1),
b = 8SAJA − 8SBJint − gµB ~KAint · ~γ − (D
A
int −DA)(SA −
1
2
)(3 cos2 θ − 1),
c = 8SBJB − 8SAJint − gµB ~KBint · ~γ − (D
B
int −DB)(SB −
1
2
)(3 cos2 θ − 1),
d = 8SBJB − gµB ~KBs · ~γ − (D
B
s −DB)(SB −
1
2
)(3 cos2 θ − 1). (51)
sc(110) surface cut
Ri = 8SiJi + gµβ( ~H
eff
i · ~γ) +Di
(
Si −
1
2
)(
3 cos2 θ − 1
)
,
Ci = −4SiJi,
Cint = −4
√
SASBJint,
a = 4SAJA − gµB ~KAs · ~γ − (D
A
s −DA)(SA −
1
2
)(3 cos2 θ − 1),
b = 4SAJA − 4SBJint − gµB ~KAint · ~γ − (D
A
int −DA)(SA −
1
2
)(3 cos2 θ − 1),
35
c = 4SBJB − 4SAJint − gµB ~KBint · ~γ − (D
B
int −DB)(SB −
1
2
)(3 cos2 θ − 1),
d = 4SBJB − gµB ~KBs · ~γ − (D
B
s −DB)(SB −
1
2
)(3 cos2 θ − 1). (52)
bcc(110) surface cut
Ri = 4SiJi + gµβ( ~H
eff
i · ~γ) +Di
(
Si −
1
2
)(
3 cos2 θ − 1
)
,
Ci = −4SiJi,
Cint = −4
√
SASBJint,
a = 4SAJA − gµB ~KAs · ~γ − (D
A
s −DA)(SA −
1
2
)(3 cos2 θ − 1),
b = 4SAJA − 4SBJint − gµB ~KAint · ~γ − (D
A
int −DA)(SA −
1
2
)(3 cos2 θ − 1),
c = 4SBJB − 4SAJint − gµB ~KBint · ~γ − (D
B
int −DB)(SB −
1
2
)(3 cos2 θ − 1),
d = 4SBJB − gµB ~KBs · ~γ − (D
B
s −DB)(SB −
1
2
)(3 cos2 θ − 1). (53)
36
Introduction
General planar thin film model
Assumptions
The Hamiltonian
Hamiltonian diagonalization procedure
Transformation to the local coordinate system
Transformation to second quantization operators
Bi-linear Hamiltonian
Fourier transformation in the film plane
Transformation along the surface normal
The particular case: ferromagnetic bilayer film
General form of the bilayer Hamiltonian
The effect of various surface cuts
Ambiguity in existing interpretation of bilayer FMR spectra
The effect of interface coupling
Critical angle in bilayer resonance spectrum
The effect of uni-axial anisotropy
The effect of uni-directional anisotropy
Conclusions
References
Appendix: Bilayer Hamiltonian matrix elements
| 0non-cybersec
| arXiv |
Continuous Security Monitoring and Security Operations. Part 1: Architecting for threat detection. | 1cybersec
| Reddit |
This cat keeps showing up in my driveway. | 0non-cybersec
| Reddit |
internet explorer on ubuntu. <p>I need IE on my Ubuntu Karmic, better yet various versions of IE at the same time. What's the best and most reliable solution? Tx</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Any scenario for using both, OpenID Connect and OAuth 2.0?. <p>Since OpenID Connect builds on OAuth 2.0, I am assuming that everything that is possible with OAuth 2.0 is also possible with OpenID Connect.</p>
<p>In particular, say that my website stores some information that belongs to the user and implements OpenID Connect to authenticate users. When the user is authenticating through another website, that website can use the same OpenID Connect flow to obtain authorization from the user to give it access to that user's information on my website.</p>
<p>Is that statement correct? Could there be any scenario where I would need to implement OAuth 2.0 independently of OpenID Connect?</p>
| 0non-cybersec
| Stackexchange |
async & await - How to wait until all Tasks are done?. <p>ok. I made a simple console app to figure out how to make all this work. Once I have the basic outline working, then I'll apply it to the real application.</p>
<p>The idea is that we have a lot of database calls to execute that we know are going to take a long time. We do NOT want to (or have to) wait for one database call to be completed before we make the next. They can all run at the same time.</p>
<p>But, before making all of the calls, we need to perform a "starting" task. And when all of the calls are complete, we need to perform a "finished" task. </p>
<p>Here's where I'm at now:</p>
<pre><code>static void Main(string[] args)
{
Console.WriteLine("starting");
PrintAsync().Wait();
Console.WriteLine("ending"); // Must not fire until all tasks are finished
Console.Read();
}
// Missing an "await", I know. But what do I await for?
static async Task PrintAsync()
{
Task.Run(() => PrintOne());
Task.Run(() => PrintTwo());
}
static void PrintOne()
{
Console.WriteLine("one - start");
Thread.Sleep(3000);
Console.WriteLine("one - finish");
}
static void PrintTwo()
{
Console.WriteLine("two - start");
Thread.Sleep(3000);
Console.WriteLine("two - finish");
}
</code></pre>
<p>But no matter what I try, <code>Ending</code> always gets printed too early:</p>
<pre><code>starting
ending
one - start
two - start
one - finish
two - finish
</code></pre>
<p>What IS working right is that <code>PrintTwo()</code> starts before <code>PrintOne()</code> is done. But how do I properly wait for <code>PrintAsync()</code> to finish before doing anything else?</p>
| 0non-cybersec
| Stackexchange |
Coroner finds dingo took Australian baby. | 0non-cybersec
| Reddit |
2019 Apr 8 Stickied helpdesk thread - Do you need HELP? Do you need IDEAS? LOOK HERE!. [Link to last week's thread](https://www.reddit.com/r/raspberry_pi/comments/b8jh5q/2019_apr_2_stickied_helpdesk_thread_do_you_need/)
This thread is the place to ask your questions that Google couldn't help with!^(†) Looking for help with a project? Have a question that you need answered? Was it not answered last week? Did not get a satisfying answer? A question that you haven't done any research for? Maybe something you think everyone but you knows? Ask it here!
# [Check out the Frequently Asked Questions (FAQ) here](https://www.reddit.com/r/raspberry_pi/wiki/faq)
Perhaps you just want ideas of what to do with that Raspberry Pi that's been sitting in a drawer or maybe you haven't even purchased yet. Well look no further, [there's a huge list of ideas right here!](https://www.reddit.com/r/raspberry_pi/search?q=flair%3Atutorial+OR+flair%3Aproject&restrict_sr=on&sort=relevance&t=all) ([link for users using broken mobile apps](https://goo.gl/bX3HBn))
Before posting your question think about if it's really about the Raspberry Pi or not. If you were doing math homework using a Bic pen, would you ask on pen forums for math help? **There may be better places to ask your question**, such as /r/AskProgramming, /r/learnpython, /r/AskElectronics, or /r/linuxquestions. Asking in a forum more specific to your question will likely *get better answers*!
Questions should be on topic, concise, and answerable. Answers must be a real answer that solves the question.
Are you a regular of /r/raspberry_pi? [**Please don't downvote this thread just because you already know everything!**](https://xkcd.com/1053/) The more people that see this this helpdesk and idea thread the less the front page will be filled with questions like these:
* does anyone have any project ideas
* do I need 5 pis to do 5 things
* why won't windows read my SD card after it was in the Pi
* can I use another computer as a monitor
* can I replace the OS on the SD card with another OS
* can I upgrade the CPU or GPU or RAM
* why do I only get a blank screen
* how to tie a tie
* can I use this LCD as a screen
* what's a Raspberry Pi
* how do I ssh
* how do I watch Netflix
* can anyone google this for me
# If you're just looking for ideas, [there's a huge list of ideas right here!](https://www.reddit.com/r/raspberry_pi/search?q=flair%3Atutorial+OR+flair%3Aproject&restrict_sr=on&sort=relevance&t=all) ([link for users using broken mobile apps](https://goo.gl/bX3HBn))
---
† [See the /r/raspberry\_pi rules.](https://www.reddit.com/r/raspberry_pi/about/rules/) While /r/raspberry_pi should not be considered your personal search engine, some exceptions will be made in this help thread. | 0non-cybersec
| Reddit |
Is there a better/more efficient way to capture composite X windows in Linux?. <p>As per subject I have the following pseudo-code to setup window capture in X (Linux):</p>
<pre class="lang-cpp prettyprint-override"><code>xdisplay = XOpenDisplay(NULL);
win_capture = ...find the window to capture...
XCompositeRedirectWindow(xdisplay, win_capture, CompositeRedirectAutomatic);
XGetWindowAttributes(xdisplay, win_capture, &win_attr); // attributes used later
GLXFBConfig *configs = glXChooseFBConfig(xdisplay, win_attr.root, config_attrs, &nelem);
// cycle through the configs to
// find a valid one
...
win_pixmap = XCompositeNameWindowPixmap(xdisplay, win_capture);
const int pixmap_attrs[] = {GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
GLX_TEXTURE_FORMAT_EXT,
GLX_TEXTURE_FORMAT_RGBA_EXT, None};
gl_pixmap = glXCreatePixmap(xdisplay, config, win_pixmap, pixmap_attrs);
gl_ctx = glXCreateNewContext(xdisplay, config, GLX_RGBA_TYPE, 0, 1);
glXMakeCurrent(xdisplay, gl_pixmap, gl_ctx);
glEnable(GL_TEXTURE_2D);
glGenTextures(1, &gl_texmap);
glBindTexture(GL_TEXTURE_2D, gl_texmap);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, win_attr.width, win_attr.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
</code></pre>
<p>Then, much later on, this would be the loop to capture the frames:</p>
<pre class="lang-cpp prettyprint-override"><code>glXMakeCurrent(xdisplay, gl_pixmap, gl_ctx);
glBindTexture(GL_TEXTURE_2D, gl_texmap);
glXBindTexImageEXT(xdisplay, gl_pixmap, GLX_FRONT_LEFT_EXT, NULL);
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); // data is output RGBA buffer
glXReleaseTexImageEXT(xdisplay, gl_pixmap, GLX_FRONT_LEFT_EXT);
</code></pre>
<p>I basically do <code>glXBindTexImageEXT</code> -> <code>glGetTexImage</code> -> <code>glXReleaseTexImageEXT</code> so that I get an updated picture.
It does work, but not sure I'm doing the right/optimal thing.</p>
<p>Is there a better/more optimized way to get such picture/context?</p>
| 0non-cybersec
| Stackexchange |
Set a Max allocated size for a sellected storage path in db2. <p>I have a DB2 storage group with storage paths set like</p>
<p>C:\</p>
<p>D:\</p>
<p>E:\</p>
<p>Size of my C: drive is 100 GB and the other programs keep crashing because it fill data drive by one, even I can allocate more storage and extend this it first fill free space
In my c:\ drive and move to new storage, I like to know is it possible to give a max size for 1 particular drive(storage path) and how? </p>
<p>NOTE : If I can change the PathState to 'NotInUse' will it fix this , will it effect the editing of the existing data in that path ? </p>
<p>INFO: DB2 10.1</p>
<pre><code>C:\IBM\SQLLIB\BIN>db2pd -storagepaths -tablespaces -db DEMO
Database Member 0 -- Database DEMO -- Active -- Up 0 days 17:16:44 -- Date 02/09
/2016 11:06:24
Storage Group Configuration:
Address SGID Default DataTag Name
0x000007FFCCFCAE40 0 Yes 0 DEMOFORTEST
Storage Group Statistics:
Address SGID State Numpaths NumDropPen
0x000007FFCCFCAE40 0 0x00000000 2 0
Storage Group Paths:
Address SGID PathID PathState PathName
0x000007FFCCFF7560 0 0 InUse C:
0x000007FFCCFCAF60 0 1 InUse E:
Database Member 0 -- Database DEMO -- Active -- Up 0 days 17:16:44 -- Date 02/09
/2016 11:06:24
Tablespace Configuration:
Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDD
isk FSC NumCntrs MaxStripe LastConsecPg Name
0x000007FFC0018BC0 0 DMS Regular 32768 4 Yes 4 1 1
Off 1 0 3 SYSCATSPACE
0x000007FFC0021460 1 SMS SysTmp 32768 32 Yes 32 1 1
On 1 0 31 TEMPSPACE1
0x000007FFC002C360 2 DMS Large 32768 32 Yes 32 1 1
Off 1 0 31 USERSPACE1
0x000007FFC0035360 3 DMS Large 32768 4 Yes 4 1 1
Off 1 0 3 SYSTOOLSPACE
0x000007FFC003E300 4 DMS Regular 32768 16 No 16 1 1
Off 2 1 15 STORE_TS
0x000007FFC0047480 5 DMS Regular 32768 16 No 16 1 1
Off 2 1 15 INDEX_TS
0x000007FFC0055B00 6 DMS Large 32768 16 No 16 1 1
Off 2 1 15 LOB_TS
Tablespace Statistics:
Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs
HWM Max HWM State MinRecTime NQuiescers PathsDropped TrackmodStat
e
0x000007FFC0018BC0 0 7168 7164 6944 0 220
6944 6944 0x00000000 0 0 No n/a
0x000007FFC0021460 1 1 1 1 0 0
0 0 0x00000000 0 0 No n/a
0x000007FFC002C360 2 1024 992 96 0 896
96 96 0x00000000 0 0 No n/a
0x000007FFC0035360 3 1024 1020 80 0 940
80 80 0x00000000 0 0 No n/a
0x000007FFC003E300 4 1477648 1477616 1476624 0 992
1476624 1476624 0x00000000 0 0 No n/a
0x000007FFC0047480 5 248832 248800 247792 0 1008
247792 247792 0x00000000 0 0 No n/a
0x000007FFC0055B00 6 9134368 9134336 9134112 0 224
9134112 9134112 0x00000000 0 0 No n/a
Tablespace Autoresize Statistics:
Address Id AS AR InitSize IncSize IIP M
axSize LastResize LRF
0x000007FFC0018BC0 0 Yes Yes 33554432 -1 No N
one None No
0x000007FFC0021460 1 Yes No 0 0 No 0
None No
0x000007FFC002C360 2 Yes Yes 33554432 -1 No N
one None No
0x000007FFC0035360 3 Yes Yes 33554432 -1 No N
one None No
0x000007FFC003E300 4 Yes Yes 33554432 -1 No N
one 02/09/2016 10:12:09.687557 No
0x000007FFC0047480 5 Yes Yes 33554432 -1 No N
one 02/09/2016 10:52:17.557144 No
0x000007FFC0055B00 6 Yes Yes 33554432 -1 No N
one None No
Tablespace Storage Statistics:
Address Id DataTag Rebalance SGID SourceSGID
0x000007FFC0018BC0 0 0 No 0 -
0x000007FFC0021460 1 0 No 0 -
0x000007FFC002C360 2 -1 No 0 -
0x000007FFC0035360 3 -1 No 0 -
0x000007FFC003E300 4 -1 No 0 -
0x000007FFC0047480 5 -1 No 0 -
0x000007FFC0055B00 6 -1 No 0 -
Containers:
Address TspId ContainNum Type TotalPgs UseablePgs PathID Str
ipeSet Container
0x000007FFC00558C0 0 0 File 7168 7164 0 0
C:\DB2\NODE0000\DEMO\T0000000\C0000000.CAT
0x000007FFC002A080 1 0 Path 1 1 1 0
E:\DB2\NODE0000\DEMO\T0000001\C0000000.TMP
0x000007FFC00350A0 2 0 File 1024 992 0 0
C:\DB2\NODE0000\DEMO\T0000002\C0000000.LRG
0x000007FFC003E040 3 0 File 1024 1020 0 0
C:\DB2\NODE0000\DEMO\T0000003\C0000000.LRG
0x000007FFC0047040 4 0 File 1303568 1303552 0 0
C:\DB2\NODE0000\DEMO\T0000004\C0000000.USR
0x000007FFC0047250 4 1 File 174080 174064 1 1
E:\DB2\NODE0000\DEMO\T0000004\C0000001.USR
0x000007FFC0050220 5 0 File 164864 164848 0 0
C:\DB2\NODE0000\DEMO\T0000005\C0000000.USR
0x000007FFC0050430 5 1 File 83968 83952 1 1
E:\DB2\NODE0000\DEMO\T0000005\C0000001.USR
0x000007FFC0050BE0 6 0 File 6504736 6504720 0 0
C:\DB2\NODE0000\DEMO\T0000006\C0000000.LRG
0x000007FFC0050DF0 6 1 File 2629632 2629616 1 1
E:\DB2\NODE0000\DEMO\T0000006\C0000001.LRG
</code></pre>
| 0non-cybersec
| Stackexchange |
SerialPort not receiving any data. <p>I am developing program which need to interact with COM ports.</p>
<p>By learning from this Q&A: <a href="https://stackoverflow.com/questions/2281618/net-serialport-datareceived-event-not-firing">.NET SerialPort DataReceived event not firing</a>, I make my code like that.</p>
<pre><code>namespace ConsoleApplication1
{
class Program
{
static SerialPort ComPort;
public static void OnSerialDataReceived(object sender, SerialDataReceivedEventArgs args)
{
string data = ComPort.ReadExisting();
Console.Write(data.Replace("\r", "\n"));
}
static void Main(string[] args)
{
string port = "COM4";
int baud = 9600;
if (args.Length >= 1)
{
port = args[0];
}
if (args.Length >= 2)
{
baud = int.Parse(args[1]);
}
InitializeComPort(port, baud);
string text;
do
{
String[] mystring = System.IO.Ports.SerialPort.GetPortNames();
text = Console.ReadLine();
int STX = 0x2;
int ETX = 0x3;
ComPort.Write(Char.ConvertFromUtf32(STX) + text + Char.ConvertFromUtf32(ETX));
} while (text.ToLower() != "q");
}
private static void InitializeComPort(string port, int baud)
{
ComPort = new SerialPort(port, baud);
ComPort.PortName = port;
ComPort.BaudRate = baud;
ComPort.Parity = Parity.None;
ComPort.StopBits = StopBits.One;
ComPort.DataBits = 8;
ComPort.ReceivedBytesThreshold = 9;
ComPort.RtsEnable = true;
ComPort.DtrEnable = true;
ComPort.Handshake = System.IO.Ports.Handshake.XOnXOff;
ComPort.DataReceived += OnSerialDataReceived;
OpenPort(ComPort);
}
public static void OpenPort(SerialPort ComPort)
{
try
{
if (!ComPort.IsOpen)
{
ComPort.Open();
}
}
catch (Exception e)
{
throw e;
}
}
}
}
</code></pre>
<p>My problem is DataReceived event never gets fired.</p>
<p>My program specifications are:</p>
<ol>
<li>Just .net console programming</li>
<li>I use VSPE from <a href="http://www.eterlogic.com" rel="nofollow noreferrer">http://www.eterlogic.com</a></li>
<li>My computer has COM1 and COM2 ports already.</li>
<li>I created COM2 and COM4 by using VSPE.</li>
<li>I get output result from mystring array (COM1, COM2, COM3, COM4)</li>
</ol>
<p>But I still don't know why <code>DataReceived</code> event is not fired.</p>
<hr>
<h1>Updated</h1>
<p>Unfortunately, I still could not make to fire <code>DataReceived</code> event in any way.</p>
<p>So, I created new project by hoping that I will face a way to solve.</p>
<p>At that new project [just console application], I created a class...</p>
<pre><code>public class MyTest
{
public SerialPort SPCOM4;
public MyTest()
{
SPCOM4 = new SerialPort();
if(this.SerialPortOpen(SPCOM4, "4"))
{
this.SendToPort(SPCOM4, "com test...");
}
}
private bool SerialPortOpen(System.IO.Ports.SerialPort objCom, string portName)
{
bool blnOpenStatus = false;
try
{
objCom.PortName = "COM" + portName;
objCom.BaudRate = 9600;
objCom.DataBits = 8;
int SerParity = 2;
int SerStop = 0;
switch (SerParity)
{
case 0:
objCom.Parity = System.IO.Ports.Parity.Even;
break;
case 1:
objCom.Parity = System.IO.Ports.Parity.Odd;
break;
case 2:
objCom.Parity = System.IO.Ports.Parity.None;
break;
case 3:
objCom.Parity = System.IO.Ports.Parity.Mark;
break;
}
switch (SerStop)
{
case 0:
objCom.StopBits = System.IO.Ports.StopBits.One;
break;
case 1:
objCom.StopBits = System.IO.Ports.StopBits.Two;
break;
}
objCom.RtsEnable = false;
objCom.DtrEnable = false;
objCom.Handshake = System.IO.Ports.Handshake.XOnXOff;
objCom.Open();
blnOpenStatus = true;
}
catch (Exception ex)
{
throw ex;
}
return blnOpenStatus;
}
private bool SendToPort(System.IO.Ports.SerialPort objCom, string strText)
{
try
{
int STX = 0x2;
int ETX = 0x3;
if (objCom.IsOpen && strText != "")
{
objCom.Write(Char.ConvertFromUtf32(STX) + strText + Char.ConvertFromUtf32(ETX));
}
}
catch (Exception ex)
{
throw ex;
}
return true;
}
}
</code></pre>
<p>I am not sure that I face good luck or bad luck because this new class could make fire <code>DataReceived</code> event which is from older console application that is still running. It is miracle to me which I have no idea how this happen.</p>
<p>Let me tell you more detail so that you could give me suggestion for better way.</p>
<ol>
<li>Finally I created 2 console projects.</li>
<li>First project is the class which I posted as a question yesterday.</li>
<li>Second project is the class called MyTest which could make fire <code>DataReceived</code> event from First project, at the same time when two of the project is running.</li>
</ol>
<p>Could anyone give me suggestions on how could I combine these two projects as a single project?</p>
| 0non-cybersec
| Stackexchange |
Compute e^x for float values in System Verilog?. <p>I am building a neural network running on an FPGA, and the last piece of the puzzle is running a sigmoid function in hardware. This is either:</p>
<pre><code>1/(1 + e^-x)
</code></pre>
<p>or</p>
<pre><code>(atan(x) + 1) / 2
</code></pre>
<p>Unfortunately, x here is a float value (a <code>real</code> value in SystemVerilog). </p>
<p>Are there any tips on how to implement either of these functions in SystemVerilog?</p>
<p>This is really confusing to me since both of these functions are complex, and I don't even know where to begin implementing them due to the added complexity of being float values.</p>
| 0non-cybersec
| Stackexchange |
[Build Complete] - White Prodigy M on Air - 4670k/GTX 680. **Photos:** http://imgur.com/a/cWg13/
-------------------
Australian build commenced in October 2013, finished building in November 2013. Finished overclocking and testing on 1st of November.
**Name:** White Prodigy M on Air
**Size:** SFF mITX - Gaming PC
**Purpose:** Gaming - Overclocking - Video Editing
**Build Log Pictures :** http://imgur.com/a/cWg13/
**Final Build Log Video:**http://youtu.be/xR8a3SzjbzU
-------------------------
**Info**: Overclocked 4670K build, with the GTX 680 to punch out the games. All cooled on air, and fit tight in the Prodigy M.
**Research:** Mid/High-Range Gaming PC, bargain hunting and looking around for the right parts, the cheapest overclocking gear, and the fans to cool my rig. This is what i came up with. If you subbed out the $500 SSD, this would be a $1600 Rig.
**Shoutouts and Acknowledgements:**
* David Chen, Sam and Co. @ [ARC Computers Penrith](http://arc.com.au/pub.php) for sourcing as many parts as they could for my build
* Les/Pete/John for their DIY advice
* /u/karmapopsicle @ /r/buildapcforme where i mod
* [PCCaseGear](http://www.pccasegear.com) in Melbourne Australia
-----------------
**Build problems**:
* *Manouvering round the case* If i could give one piece of advice in building in the Prodigy M, it would be to install small components first (fans, usb 3.0 and cables), then RAM, then put the rest in after. Building it outside the rig is almost impossible, particularly when screwing down the motherboard, and the CPU cooler. SATA cables are literally IMPOSSIBLE to take the cable out. Have to have someone with small hands nearby.
* *Installing the Noctua NH-D14 Cooler:* Had to mount one of the fans higher, to provide allowance for RAM, and the thing definitely was a squeeze in this case. If you have to access anything around it you'll have to do it before installation
* *CABLE MANAGEMENT:* What a BITCH! There is nowhere really out of the way, besides the side panel to route your cables, but with the side panel I/O on the backside of the motherboard, it really becomes super limited. I didn't want to install the panel on the opening side, because disconnecting and reconnecting all those wires would be an even worse fate then death. So with all my might and about an hour of cable tying and routing, i managed all the cables with a Side Panel which needed a bit of force to put in place
-----------------
**The List**:
Type|Item|Price
:----|:----|:----
**CPU** | [Intel Core i5-4670K 3.4GHz Quad-Core Processor](http://au.pcpartpicker.com/part/intel-cpu-bx80646i54670k) | $278.72 @ ARC Penrith
**CPU Cooler** | [Noctua NH-D14 65.0 CFM CPU Cooler](http://au.pcpartpicker.com/part/noctua-cpu-cooler-nhd14) | $89.00 @ ARC Penrith
**Motherboard** | [Gigabyte GA-Z87M-D3HP Micro ATX LGA1150 Motherboard](http://au.pcpartpicker.com/part/gigabyte-motherboard-gaz87md3h10) | $129.00 @ PCCaseGear
**Fan Controller** | [Bitfenix Recon Fan Controller](https://www.google.com.au/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCsQFjAA&url=http%3A%2F%2Fwww.bitfenix.com%2Fglobal%2Fen%2Fproducts%2Faccessories%2Frecon%2F&ei=mS-TUpqpMqKjigeanoDABw&usg=AFQjCNEtUdW1SX4I2vwNtfwfkj299-HF9A&sig2=t0pP_C_bOVIWybxtC9IQ2g&bvm=bv.56988011,d.aGc) | $39.00 @ PCCaseGear
**Fan** | [Bitfenix Spectre Pro 230mm White LEDs](https://http://pcpartpicker.com/part/bitfenix-case-fan-bfflpro23030wrp) | $27.00 @ ARC Penrith
**Fan** | [Bitfenix Spectre Pro 140mm White LEDs](http://pcpartpicker.com/part/bitfenix-case-fan-bfflpro14025wrp) | $23.10 @ ARC Penrith
**Memory** | [Corsair Vengeance 8GB (2 x 4GB) DDR3-1600 Memory](http://au.pcpartpicker.com/part/corsair-memory-cmz8gx3m4x1600c9) | $53.33 @ eBay
**Storage** | [Samsung 840 Pro Series 512GB 2.5" Solid State Disk](http://au.pcpartpicker.com/part/samsung-internal-hard-drive-mz7pd512bw) | $450.00 @ eBay
**Video Card** | [EVGA GeForce GTX 680 2GB Video Card](http://au.pcpartpicker.com/part/evga-video-card-02gp43682kr) | $315.58 @ PLE Wangara
**Wireless Network Adapter** | [TP-Link TL-WN822N 802.11b/g/n USB 2.0 Wi-Fi Adapter](http://au.pcpartpicker.com/part/tp-link-wireless-network-card-tlwn822n) | $23.00 @ ARC Penrith
**Case** | [BitFenix Prodigy M Arctic White MicroATX Mini Tower Case](http://au.pcpartpicker.com/part/bitfenix-case-bfcprm300wwxkwrp) | $112.86 @ ARC Penrith
**Power Supply** | [Silverstone Strider Plus 600W 80+ Bronze Certified ATX Power Supply](http://au.pcpartpicker.com/part/silverstone-power-supply-st60fp) | $119.00 @ PCCaseGear
**Operating System** | [Microsoft Windows 8.1 Pro - 64-bit - OEM (64-bit)](http://au.pcpartpicker.com/part/microsoft-os-885370635003) | $61.00 @ ARC Penrith
**Keyboard** | [Cooler Master CM Storm QuickFire TK - Limited Edition White Wired Standard Keyboard](http://au.pcpartpicker.com/part/cooler-master-keyboard-sgk4020gkcr2us) | $130 @ eBay
**Mouse** | [Logitech G500s Laser Gaming Mouse Wired Laser Mouse](http://au.pcpartpicker.com/part/logitech-mouse-910003602) | $63.00 @ ARC Penrith
**Headphones** | [SteelSeries Siberia v2 Headset](http://au.pcpartpicker.com/part/steelseries-headphones-51104) | $69.00 @ Mwave Australia
| | **Total**
| Prices include shipping, taxes, and discounts when available. | $2012.88
| Generated by PCPartPicker 2013-11-25 21:59 EST+1100 |
**Results**: On that tiny cooler i managed to get the CPU to 4.0GHz with a fair voltage boost. However, any further it would throttle something fierce. Boot up at 4.2GHz max. I'm still playing around with testing to try and kick it to at least 4.2 stable. The Summer weather doesn't help
Waiting on that Black Friday Amazon BF4 Sale to really put it through its paces.
-----------------
**Questions:** Feel free to PM me or comment about anything to do with the build.
| 0non-cybersec
| Reddit |
When calling a function in debug mode, GDB is crashed. <p>I'm trying to make a c++ program on Windows using MinGW.</p>
<p>The built program runs fine, Nevertheless, the problem occurs while debugging.</p>
<p>When debugging, If I try to inspect a execution result of function or method, like screenshots below, GDB is forced terminated.</p>
<p>I've ran GDB as a command line, the result has been the same though.</p>
<p>I also changed MinGW to different version, but to no avail.</p>
<p>GDB on WSL is working fine without any problems by the same configurations.</p>
<p>It's not working only on native Windows.</p>
<p>I would appreciate if you let me know why.</p>
<hr>
<pre><code>Just before watching "add(2, 3)".
</code></pre>
<p><a href="https://i.stack.imgur.com/PkFM0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PkFM0.png" /></a></p>
<pre><code>ERROR: GDB exited unexpectedly. Debugging will now abort.
</code></pre>
<p><a href="https://i.stack.imgur.com/P0V2p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P0V2p.png" /></a></p>
<hr>
<pre><code>The same result of GDB command line.
"p v[1]", "p v.at(1)", "p v.empty()", "p v.size()", ... were failed,
"p add(2, 3)", "p my_obj.func()", ... were crashed.
</code></pre>
<p><a href="https://i.stack.imgur.com/hEfST.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hEfST.png" /></a></p>
<hr>
<pre><code>G++ version is 8.1.0
gdb version is 8.1
</code></pre>
<p><a href="https://i.stack.imgur.com/XWvJd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XWvJd.png" /></a></p>
| 0non-cybersec
| Stackexchange |
[Squat form] I have seriously long legs, and It's difficult to maintain proper form. [LINK TO GIF](http://gfycat.com/GroundedInnocentHerculesbeetle)
I've been squatting for about a year now, and while I've seen some strength gains (current 1RM is 95kg), I have a really hard time going to parallel with the heavier weight as my glutes go out really far and a lot of strain is put on my lower back.
Any advice on how to fix this/my squat form in general is greatly appreciated!
and yes I'm wearing girl trousers. | 0non-cybersec
| Reddit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.