qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
7,876,493 | I have a boolean field called `a` and two methods `void setA(String a)` and `boolean isA()`. I have set `@XmlAccessorType(XmlAccessType.NONE)` and used `@XmlAttribute` for the setter.
Because the getter returns a boolean value but the setter expects a string JAX-B just ignores this setter. This is the cause for all ki... | 2011/10/24 | [
"https://Stackoverflow.com/questions/7876493",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/643742/"
] | I would recommend using `@XmlAccessType.FIELD` as suggested by [Kevin](https://stackoverflow.com/questions/7876493/jax-b-is-interpreting-to-much-while-unmarshalling/7877036#7877036) combined with an `XmlAdapter` to get the behaviour you are looking for:
**Root**
To get this example to work with the JAXB-RI I need to ... | Given that you're already using XmlAccessorType annotation, I guess you already know that you can use `@XmlAccessType.FIELD` and have JAXB look at the class fields rather than setter methods when deciding what to marshal/unmarshal?
With your current configuration you presumably have a `@XmlElement` annotation on a set... |
5,720,463 | I have an ecommerce site, and I want to enable https only on the ecommerce section of the site located at <https://mysite.com/buy>
Since all of the links on my pages are relative, when someone visits <http://mysite.com> and clicks on Buy, they are taken to <http://mysite.com/buy>
Also, if they visit <https://mysite.c... | 2011/04/19 | [
"https://Stackoverflow.com/questions/5720463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/408244/"
] | Try this in your .htaccess file:
```
Options +FollowSymLinks
RewriteEngine on
# redirect for http /buy page
RewriteCond %{SERVER_PORT} =80
RewriteRule ^buy/?$ https://mysite.com/buy [R=301,QSA,L,NE]
# redirect for https non /buy pages
RewriteCond %{SERVER_PORT} =443
RewriteCond %{REQUEST_URI} !^/buy [NC]
RewriteRule... | I don't have hands on experience, but from what I see, it looks like the htaccess configuration file should impact only the files in the folder in which the file is stored.
So you should be able to do something like this:
<http://www.besthostratings.com/articles/force-ssl-htaccess.html>
And put it in the /buy folder... |
5,720,463 | I have an ecommerce site, and I want to enable https only on the ecommerce section of the site located at <https://mysite.com/buy>
Since all of the links on my pages are relative, when someone visits <http://mysite.com> and clicks on Buy, they are taken to <http://mysite.com/buy>
Also, if they visit <https://mysite.c... | 2011/04/19 | [
"https://Stackoverflow.com/questions/5720463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/408244/"
] | Try this in your .htaccess file:
```
Options +FollowSymLinks
RewriteEngine on
# redirect for http /buy page
RewriteCond %{SERVER_PORT} =80
RewriteRule ^buy/?$ https://mysite.com/buy [R=301,QSA,L,NE]
# redirect for https non /buy pages
RewriteCond %{SERVER_PORT} =443
RewriteCond %{REQUEST_URI} !^/buy [NC]
RewriteRule... | If your web page is hosted on `9001` port just enable any port on your linux box and make these changes in `/etc/httpd/conf.d/ssl.conf`.Then set your Listen Port to `9002` and create SSL certificate and key and put following configuration in your *httpd.conf* file
```
Listen 9001
<VirtualHost *:9001>
ServerAdmin root... |
23,135,014 | I set up an [OpenShift](https://www.openshift.com/) application and set up my local PuTTY to connect to the server via SSH. Everything works fine, but I don't know how to run a few commands (mainly `alias`) after I connected to the server automatically (I don't want to copy&paste the same commands everytime I connect).... | 2014/04/17 | [
"https://Stackoverflow.com/questions/23135014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1682509/"
] | You can use your `.bash_profile` located in your $OPENSHIFT\_DATA\_DIR. | This has to be done in **.bashrc or .profile or .bash\_profile** files. As you say they don't work then you can have a script in a file, scp that file to the remote server and then run when you ssh in a single command.
I have not used openshift but have used aws ec2 instances alot with ruby scripts,
```
ssh ubuntu@e... |
1,175,074 | I have written a custom login module for JBoss that authenticates/authorizes requests to a web service. The first call to the service authenticates fine. I can connect a debugger to the login module and trace the code execution. However, all subsequent calls to the web service skip the login module entirely. It appears... | 2009/07/23 | [
"https://Stackoverflow.com/questions/1175074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/114487/"
] | I figured it out. I was trying to setup cookie based authentication. Apparently, JBoss/Jaas caches successful authentications based on username and password and cookies are ignored. To get things working, I dropped the cookie from the web service request and replaced it with a username and password in the authenticatio... | Is the authentication/authorization associated with a session object? How have you set the timeout/invalidation of the session?
JBOSS is probably caching the credential somehow. You *want* it to skip the login module in that case. You should only invalidate it if you log out or timeout the session.
Did you test it w... |
39,407,593 | I am currently working on a Chat Application and ran into a slight hiccup, I want a message that is addressed to a user to only be visible to the user and the sender.
```
<script>
//PRIVATE MESSAGE
var username = '<?=$_SESSION['username'];?>'.toUpperCase();
$('#chatbox').children('.msgln').each(function(){
... | 2016/09/09 | [
"https://Stackoverflow.com/questions/39407593",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5146958/"
] | As pointed out by everyone, you're going about things the wrong way.
However, there are some serious problems with your `if()` statement. This code:
```
if(username = receiver) {
/* code */
}
```
is exactly equivalent to the following:
```
username = receiver;
if(username) {
/* code */
}
```
If you want ... | Your question is not comprehensive. I would like to see the result of what you have done so far if at all the sample you gave works. And as a matter of fact, you need to sieve your codes (code structuring is important) so that I'll be able to help you.
file\_name.php
```
<?php //your PHP codes here ?>
```
file\_nam... |
5,753,975 | I'm developing a Windows Phone app.
I have a listbox with this C# source code:
```
System.Collections.Generic.IEnumerable<OpenGame> items;
...
GamesList.ItemsSource = items;
```
If I want to add a new item (a new **OpenGame** object) to the **GameList**, how can I do it? | 2011/04/22 | [
"https://Stackoverflow.com/questions/5753975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/68571/"
] | Use ObservableCollection rather than IEnumerable then you can use the Add method.
IEnumerable is for static lists where you don't want to add or remove members.
ObservableCollection is designed for lists bound to ListBoxes and similar controls. As well as allowing you to add and remove items it will notify the list... | I think you can find you're answer with explanations in this thread:
[How can I add an item to a IEnumerable<T> collection?](https://stackoverflow.com/questions/1210295/how-can-i-add-an-item-to-a-ienumerablet-collection) |
71,053,428 | as I stated above, I need help with my c# code which I'm using in unity to make a 3D game.
When I click on an object it should change color and if there was previously another object selected, I need it to be deselected automatically.
I already wrote a code which is supposed to at least help me select(change a material... | 2022/02/09 | [
"https://Stackoverflow.com/questions/71053428",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18163126/"
] | First you should check if there is a Collider on the Selectable. If not add one. Because you are asking for a Ray that hits a collider and if there's no Collider it will return always null
then this
```
Selectable selectable = hit.collider.gameObject.GetComponent<Selectable>();
if (selectable)
... | To expand a bit on [this answer](https://stackoverflow.com/a/71056396/7111561), once you get the raycast itself to work properly, you want to store the current selection so you can fire deselect where necessary.
I would keep this information in the `Selectable` class itself like e.g.
```
public class Selectable : Mon... |
43,985,796 | Example:
I have the following string
```
a125A@@THISSTRING@@.test123
```
I need to find `THISSTRING`. There are many strings which are nearly the same so I'd like to check if there is a digit or letter before the `@@` and also if there is a dot (`.`) after the `@@`.
I have tried something like:
```
([a-zA-Z0-9]+@... | 2017/05/15 | [
"https://Stackoverflow.com/questions/43985796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7093010/"
] | You can use look behind and look ahead:
```
(?<=[a-zA-Z0-9]@@).*?(?=@@\.)
```
<https://regex101.com/r/i3RzFJ/2> | >
> But I am unable to get it working.
>
>
>
Let's deconstruct what your regex `([a-zA-Z0-9]+@@?)(.+?)(.@@)` says.
`([a-zA-Z0-9]+@@?)` match **as many `[a-zA-Z0-9]`** followed by a `@` followed by **optional `@`**.
`(.+?)` any character as much as possible but fewer times.
`(.@@)` any character followed by two ... |
43,985,796 | Example:
I have the following string
```
a125A@@THISSTRING@@.test123
```
I need to find `THISSTRING`. There are many strings which are nearly the same so I'd like to check if there is a digit or letter before the `@@` and also if there is a dot (`.`) after the `@@`.
I have tried something like:
```
([a-zA-Z0-9]+@... | 2017/05/15 | [
"https://Stackoverflow.com/questions/43985796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7093010/"
] | You can use look behind and look ahead:
```
(?<=[a-zA-Z0-9]@@).*?(?=@@\.)
```
<https://regex101.com/r/i3RzFJ/2> | You wrote:
>
> check if there is a digit or letter before the @@
>
>
>
I assume you mean a digit / letter before the **first** `@@` and
check for a dot after the **second** `@@` (as in your example).
You can use the following regex:
```
[a-z0-9]+ # Chars before "@@", except the last
(?: # Last char bef... |
38,073,729 | These code lines filter all of the people that are over 50.
```
SELECT birthday FROM table_name
WHERE birthday < now() - '50 years'::interval
```
Together with this, I need to create an additional column, which shows the actual age.
Es.
```
birthday age
2000-06-28 16
```
The column "age" shall be creat... | 2016/06/28 | [
"https://Stackoverflow.com/questions/38073729",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6509481/"
] | You simply want `coalesce()`:
```
order by coalesce(nickname, first_name)
```
This assumes that the blank values are `NULL`. If they are actually empty strings, then:
```
order by coalesce(nullif(nickname, ''), first_name)
``` | Use this;)
```
order by (concat(coalesce(nickname, ''), coalesce(first_name, ''), coalesce(last_name, '')))
```
[SQLFiddle](http://sqlfiddle.com/#!9/e14bae/2) |
23,319 | In checkers If I see my opponent can make a jump and they don't see the jump should I tell them? What if I have a plan for after they make the jump and they don't take it. That spoils my plan. | 2015/03/08 | [
"https://boardgames.stackexchange.com/questions/23319",
"https://boardgames.stackexchange.com",
"https://boardgames.stackexchange.com/users/12039/"
] | It depends on if you are playing with mandatory capture rules or not. If you are playing with mandatory capture and they make a move instead of capturing a piece then you should tell them because they would be required to make the capture instead of another move. If you are not playing with mandatory capture then it do... | If a Jump is available and the opponent doesn't see it, You have the CHOICE of forcing the jump or taking the checker for not jumping. |
179,906 | I have a new PC that comes with USB but without PS2 adapter. I need to install Windows XP 64 bit incl. SP1. The keyboard works in the BIOS and during the installation of Windows XP. But when the XP login screen appears, I obviously don't know anything about the USB keyboard.
Can I use the recovery console to configur... | 2010/08/24 | [
"https://superuser.com/questions/179906",
"https://superuser.com",
"https://superuser.com/users/45542/"
] | Look into the "Device Manager" and disable the device or check "Mouse" for options to turn it off. Also, expand the system tray, there you may find an icon for the touch pad where you can control it. | According to Aaron Digulla's method, you'll be able to disable your touchpad only when an external mouse is attached. To disable your touchpad otherwise. install teh Synaptics touchpad drivers along with Scrybe, and you can do it from the system tray anytime. Bonus: You also get a host of multi-touch features! |
179,906 | I have a new PC that comes with USB but without PS2 adapter. I need to install Windows XP 64 bit incl. SP1. The keyboard works in the BIOS and during the installation of Windows XP. But when the XP login screen appears, I obviously don't know anything about the USB keyboard.
Can I use the recovery console to configur... | 2010/08/24 | [
"https://superuser.com/questions/179906",
"https://superuser.com",
"https://superuser.com/users/45542/"
] | Look into the "Device Manager" and disable the device or check "Mouse" for options to turn it off. Also, expand the system tray, there you may find an icon for the touch pad where you can control it. | Physically disconnect it. I forget if those are accessible from the top or bottom, but connection isn't too hard to get at. If not looking for such a thorough disconnect, the bios likely has a setting that will disable the touchpad if a mouse is detected. |
51,877,479 | I'm successfully excluding a whole feature file from my chrome runs, using the code below, but I have one specific test in a different feature file failing. I want to exclude the one failing scenario rather than the whole file. Is this possible?
```
capabilities: [
{
os: "Windows",
os_version: "10",... | 2018/08/16 | [
"https://Stackoverflow.com/questions/51877479",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1050230/"
] | No, it's not possible to exclude scenarios in that way. Instead, you could use tags to skip a particular scenario, similar to [how it's done via the cucumber-boilerplate webdriverio project](https://github.com/webdriverio/cucumber-boilerplate/blob/master/wdio.conf.js#L166):
```
cucumberOpts: {
tagExpression: 'not ... | You may add tag to this scenario e.g. @KnownIssue and exclude this tag by config
```
cucumberOpts:
{
....
tagExpression: "not @KnownIssue"
.....
}
``` |
22,192,252 | In java Regex i want to replace all the special characters to escape sequence.how can i do.
Example ::
```
//special chars ex "dd[u]i.* " to "dd//[u//]i//.//*"
``` | 2014/03/05 | [
"https://Stackoverflow.com/questions/22192252",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2413387/"
] | To escape all special regexp control characters this method can be used:
```
Matcher.quoteReplacement(String s)
```
It returns a regular expression that matches exact `s`.
This comes from the javadoc:
*Returns a literal replacement String for the specified String. This method produces a String that will work as a ... | To split or treat special characters in java pattern as normal one. You have to backshlas it.
`\\.`; `\\*` it might be treat now as '.' and '\*'. |
4,984,871 | I have an Account entity and an AccountTransaction entity.
Account 1 <----> n AccountTransaction
In my AccountTransaction.hbm.xml I specify a many-to-one relationship:
```
<hibernate-mapping>
<class name="com.walshk.accountmanager.domain.AccountTransaction" table="AccountTransaction">
<id name="id" type="long"... | 2011/02/13 | [
"https://Stackoverflow.com/questions/4984871",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/344079/"
] | If you add a One-to-Many association in your Account class hibernate mapping, you will get:
```
List<AccountTransaction> getTransactions();
```
from any ORM creation tool.
One of the parameters of this association is the loading type - I am not familiar with the exact syntax in XML mapping, as we use annotations, bu... | in Order to work with Lazy Loading, You should have Open Session in view enabled.
If you are using Spring integration that you have OpenSesionInViewIntereptor/OpenSessionInViewFilter
If you are using native Hibernate without Spring integration, then you can implement it by yourself.
Please read the following:
<http... |
3,308,538 | I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto suggest field suppose should not contain anything for this ID anymore, but it will still retrieve data from its cache. do anyone know how to clear... | 2010/07/22 | [
"https://Stackoverflow.com/questions/3308538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376024/"
] | I had this problem once before. This is probably something you can fix in your server settings. What the server does is get a server request, build the answer, and when the same request is done again it sends the same response it built before.
To easily avoid this problem, I added an extra request parameter (a UID).
s... | you could use http headers to prevent the response from being cached:
```
Cache-Control: no-cache
Expires: Mon, 24 Oct 2005 16:13:22 GMT
```
Another option is to add another parameter to the url that varies everytime (for example the current time in millis), that way for the browser you ask another url and the cache... |
3,308,538 | I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto suggest field suppose should not contain anything for this ID anymore, but it will still retrieve data from its cache. do anyone know how to clear... | 2010/07/22 | [
"https://Stackoverflow.com/questions/3308538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376024/"
] | Works with IE8
```
xmlHttp.open("GET", URL, true);
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
xmlHttp.setRequestHeader("Pragma", "no-cache");
xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
``` | you could use http headers to prevent the response from being cached:
```
Cache-Control: no-cache
Expires: Mon, 24 Oct 2005 16:13:22 GMT
```
Another option is to add another parameter to the url that varies everytime (for example the current time in millis), that way for the browser you ask another url and the cache... |
3,308,538 | I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto suggest field suppose should not contain anything for this ID anymore, but it will still retrieve data from its cache. do anyone know how to clear... | 2010/07/22 | [
"https://Stackoverflow.com/questions/3308538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376024/"
] | I had this problem once before. This is probably something you can fix in your server settings. What the server does is get a server request, build the answer, and when the same request is done again it sends the same response it built before.
To easily avoid this problem, I added an extra request parameter (a UID).
s... | Easiest thing to do is use jQuery#ajax and disable caching.
jQuery will suffix a parameter `?somenumber` to your ajax call which just is sufficient to persuade the browser it cannot use cached data.
I came across this once. Here's the answer I got: [Why does jQuery.ajax() add a parameter to the url?](https://stackov... |
3,308,538 | I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto suggest field suppose should not contain anything for this ID anymore, but it will still retrieve data from its cache. do anyone know how to clear... | 2010/07/22 | [
"https://Stackoverflow.com/questions/3308538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376024/"
] | I had this problem once before. This is probably something you can fix in your server settings. What the server does is get a server request, build the answer, and when the same request is done again it sends the same response it built before.
To easily avoid this problem, I added an extra request parameter (a UID).
s... | Works with IE8
```
xmlHttp.open("GET", URL, true);
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
xmlHttp.setRequestHeader("Pragma", "no-cache");
xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
``` |
3,308,538 | I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto suggest field suppose should not contain anything for this ID anymore, but it will still retrieve data from its cache. do anyone know how to clear... | 2010/07/22 | [
"https://Stackoverflow.com/questions/3308538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376024/"
] | I had this problem once before. This is probably something you can fix in your server settings. What the server does is get a server request, build the answer, and when the same request is done again it sends the same response it built before.
To easily avoid this problem, I added an extra request parameter (a UID).
s... | No code provided but some guidance that can help you manage account state consistently across many potential tabs, history, devices, etc:
First, the more condensed version in one long paragraph:
If you want a consistent view for an account, regardless of history back/forward buttons, extra tabs or extra windows (even... |
3,308,538 | I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto suggest field suppose should not contain anything for this ID anymore, but it will still retrieve data from its cache. do anyone know how to clear... | 2010/07/22 | [
"https://Stackoverflow.com/questions/3308538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376024/"
] | I had this problem once before. This is probably something you can fix in your server settings. What the server does is get a server request, build the answer, and when the same request is done again it sends the same response it built before.
To easily avoid this problem, I added an extra request parameter (a UID).
s... | I know that an answer has been accepted, but it didn't worked in my case. I already had no-cache header added. In my case this was the solution that really worked, because if you add a code after the request, it might not get executed in time for the second piece of code to run successfully:
```
x = new XMLHttpRequest... |
3,308,538 | I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto suggest field suppose should not contain anything for this ID anymore, but it will still retrieve data from its cache. do anyone know how to clear... | 2010/07/22 | [
"https://Stackoverflow.com/questions/3308538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376024/"
] | Works with IE8
```
xmlHttp.open("GET", URL, true);
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
xmlHttp.setRequestHeader("Pragma", "no-cache");
xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
``` | Easiest thing to do is use jQuery#ajax and disable caching.
jQuery will suffix a parameter `?somenumber` to your ajax call which just is sufficient to persuade the browser it cannot use cached data.
I came across this once. Here's the answer I got: [Why does jQuery.ajax() add a parameter to the url?](https://stackov... |
3,308,538 | I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto suggest field suppose should not contain anything for this ID anymore, but it will still retrieve data from its cache. do anyone know how to clear... | 2010/07/22 | [
"https://Stackoverflow.com/questions/3308538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376024/"
] | Works with IE8
```
xmlHttp.open("GET", URL, true);
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
xmlHttp.setRequestHeader("Pragma", "no-cache");
xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
``` | No code provided but some guidance that can help you manage account state consistently across many potential tabs, history, devices, etc:
First, the more condensed version in one long paragraph:
If you want a consistent view for an account, regardless of history back/forward buttons, extra tabs or extra windows (even... |
3,308,538 | I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto suggest field suppose should not contain anything for this ID anymore, but it will still retrieve data from its cache. do anyone know how to clear... | 2010/07/22 | [
"https://Stackoverflow.com/questions/3308538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376024/"
] | Works with IE8
```
xmlHttp.open("GET", URL, true);
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
xmlHttp.setRequestHeader("Pragma", "no-cache");
xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
``` | I know that an answer has been accepted, but it didn't worked in my case. I already had no-cache header added. In my case this was the solution that really worked, because if you add a code after the request, it might not get executed in time for the second piece of code to run successfully:
```
x = new XMLHttpRequest... |
15,107,632 | Hi i have one plain table view. On top there is header ..i want to scroll only cells not header ..is any solution
I also see this but it is not working [Is it possible to disable floating headers in UITableView with UITableViewStylePlain?](https://stackoverflow.com/questions/1074006/is-it-possible-to-disable-floating-... | 2013/02/27 | [
"https://Stackoverflow.com/questions/15107632",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/712144/"
] | you can do like this as mention babyPanda like you have to take one `UIView` and `UItableview` into Your XIB.
Like bellow image"-

i just create a Demo for you please check bellow link and try, Hope its helps you
<http://www.sendspace.com/file/xguy... | One possible alternative (might not be called a "solution"), is to make the view of headers the first cell in a section.
Note: If you try to fix header of the first section, then the only possible method might be, making it a view, whose frame is right above the table view. |
164,442 | The company I work for, CompanyA, was recently taken over by CompanyB and all CompanyA employees were asked to sign new contracts which gave us better benefits than we previously had with CompanyA. On the contract it was defined as a contract between myself and CompanyB. I was happy with the contract so signed it and r... | 2020/09/28 | [
"https://workplace.stackexchange.com/questions/164442",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/121665/"
] | Yes. Change of anything major within companies is usually followed by THE layoff. That includes rebranding, change of hands, merger-splitter. If I were you, instead of worrying about my current position I would already start searching for a new one. Think about IBM, first step to the rebranding was laying off their cur... | There is big overhaul going on, large changes are usually followed by layoffs, so yes, you should be worried.
I am speaking from own experience. My previous company had a merger and about 30% of staff was laid off. Now add all the economic mess caused by COVID19 and you are looking at the layoff. |
164,442 | The company I work for, CompanyA, was recently taken over by CompanyB and all CompanyA employees were asked to sign new contracts which gave us better benefits than we previously had with CompanyA. On the contract it was defined as a contract between myself and CompanyB. I was happy with the contract so signed it and r... | 2020/09/28 | [
"https://workplace.stackexchange.com/questions/164442",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/121665/"
] | You did not state a country, but just one important thing from **Germany**:
At my old company they changed from CompanyA to CompanyB as well. I was the only one who refused to sign the new contract. It was the same salary and the same benefits, so why would I sign it? Half of my team got layed off with minimum notice ... | There is big overhaul going on, large changes are usually followed by layoffs, so yes, you should be worried.
I am speaking from own experience. My previous company had a merger and about 30% of staff was laid off. Now add all the economic mess caused by COVID19 and you are looking at the layoff. |
164,442 | The company I work for, CompanyA, was recently taken over by CompanyB and all CompanyA employees were asked to sign new contracts which gave us better benefits than we previously had with CompanyA. On the contract it was defined as a contract between myself and CompanyB. I was happy with the contract so signed it and r... | 2020/09/28 | [
"https://workplace.stackexchange.com/questions/164442",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/121665/"
] | I suspect that was just an oversight on the part of the HR/legal department preparing the new contracts. Maybe HR in CompanyB was requested to send the replacement contracts to your company but forgot to change the contract's header. The HR in your company didn't catch this or maybe thought this is how it works.
After... | There is big overhaul going on, large changes are usually followed by layoffs, so yes, you should be worried.
I am speaking from own experience. My previous company had a merger and about 30% of staff was laid off. Now add all the economic mess caused by COVID19 and you are looking at the layoff. |
164,442 | The company I work for, CompanyA, was recently taken over by CompanyB and all CompanyA employees were asked to sign new contracts which gave us better benefits than we previously had with CompanyA. On the contract it was defined as a contract between myself and CompanyB. I was happy with the contract so signed it and r... | 2020/09/28 | [
"https://workplace.stackexchange.com/questions/164442",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/121665/"
] | If company A still exists, then it suggests the "takeover" was company B buying all the shares of company A, rather than companies A and B being merged into a new larger company B.
If that's the case, then the problem at the moment is that you aren't actually an employee of the company you are working for. You're an e... | There is big overhaul going on, large changes are usually followed by layoffs, so yes, you should be worried.
I am speaking from own experience. My previous company had a merger and about 30% of staff was laid off. Now add all the economic mess caused by COVID19 and you are looking at the layoff. |
164,442 | The company I work for, CompanyA, was recently taken over by CompanyB and all CompanyA employees were asked to sign new contracts which gave us better benefits than we previously had with CompanyA. On the contract it was defined as a contract between myself and CompanyB. I was happy with the contract so signed it and r... | 2020/09/28 | [
"https://workplace.stackexchange.com/questions/164442",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/121665/"
] | You did not state a country, but just one important thing from **Germany**:
At my old company they changed from CompanyA to CompanyB as well. I was the only one who refused to sign the new contract. It was the same salary and the same benefits, so why would I sign it? Half of my team got layed off with minimum notice ... | Yes. Change of anything major within companies is usually followed by THE layoff. That includes rebranding, change of hands, merger-splitter. If I were you, instead of worrying about my current position I would already start searching for a new one. Think about IBM, first step to the rebranding was laying off their cur... |
164,442 | The company I work for, CompanyA, was recently taken over by CompanyB and all CompanyA employees were asked to sign new contracts which gave us better benefits than we previously had with CompanyA. On the contract it was defined as a contract between myself and CompanyB. I was happy with the contract so signed it and r... | 2020/09/28 | [
"https://workplace.stackexchange.com/questions/164442",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/121665/"
] | You did not state a country, but just one important thing from **Germany**:
At my old company they changed from CompanyA to CompanyB as well. I was the only one who refused to sign the new contract. It was the same salary and the same benefits, so why would I sign it? Half of my team got layed off with minimum notice ... | I suspect that was just an oversight on the part of the HR/legal department preparing the new contracts. Maybe HR in CompanyB was requested to send the replacement contracts to your company but forgot to change the contract's header. The HR in your company didn't catch this or maybe thought this is how it works.
After... |
164,442 | The company I work for, CompanyA, was recently taken over by CompanyB and all CompanyA employees were asked to sign new contracts which gave us better benefits than we previously had with CompanyA. On the contract it was defined as a contract between myself and CompanyB. I was happy with the contract so signed it and r... | 2020/09/28 | [
"https://workplace.stackexchange.com/questions/164442",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/121665/"
] | You did not state a country, but just one important thing from **Germany**:
At my old company they changed from CompanyA to CompanyB as well. I was the only one who refused to sign the new contract. It was the same salary and the same benefits, so why would I sign it? Half of my team got layed off with minimum notice ... | If company A still exists, then it suggests the "takeover" was company B buying all the shares of company A, rather than companies A and B being merged into a new larger company B.
If that's the case, then the problem at the moment is that you aren't actually an employee of the company you are working for. You're an e... |
37,006,539 | I have a query that gets results immediately without `EXEC sp_executesql`,
but when I use `sp_executesql` sql server uses a different executaion plan and it takes over 5 mins to get result.
I also tried `EXEC sp_updatestats` and `dbcc freeproccache` and yet `sp_executesql` chooses the wrong execution plan.
When I use... | 2016/05/03 | [
"https://Stackoverflow.com/questions/37006539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3026997/"
] | The problem that you're describing is probably a result of [parameter sniffing](https://www.brentozar.com/archive/2013/06/the-elephant-and-the-mouse-or-parameter-sniffing-in-sql-server/). You should check out some of these existing posts on this topic:
* [SQL Parameter Sniffing Possible Workaround](https://dba.stackex... | My index was a **filtered index** and it seems `sp_executesql` can not use **filtered indexes**! i removed the filter from my index and recreated it and my problem was solved. |
20,163,949 | This is my code:
```
<html>
<h1 id="hg">
<h2>11</h2>
<h2>22</h2>
<h2>33</h2>
</h1>
<script>
var h = document.getElementById("hg").getElementsByTagName("h2");
alert(h.length);
</script>
</html>
```
I have looked up the manual, it seems that `getElementById` returns an `HTMLHeadingElement` in th... | 2013/11/23 | [
"https://Stackoverflow.com/questions/20163949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1720634/"
] | You'll find that a [`<h1>`](http://www.w3.org/TR/html-markup/h1.html) cannot contain *another* heading (the only valid content of an `h1`, and other headings, is [phrasing content](http://www.w3.org/TR/html-markup/terminology.html#phrasing-content), which restricts content to, very simplistically, in-line elements and ... | you need to change your html to this for example:
```
<div id="hg">
<h2>11</h2>
<h2>22</h2>
<h2>33</h2>
</div>
```
[**DEMO**](http://jsfiddle.net/85hPn/) |
421 | What would be a good license for computable data models? Technically they're source code, but they're always constrained and transformed to other artifacts before being used in actual software. At the moment we're using CC-BY-SA, which industry is wary about because of the -SA clause. CC is also not quite right because... | 2015/06/26 | [
"https://opensource.stackexchange.com/questions/421",
"https://opensource.stackexchange.com",
"https://opensource.stackexchange.com/users/59/"
] | This question would be easier to understand if you explained what these *archetypes* actually are.
I [read](http://openehr.org/what_is_openehr) that «Within this approach, archetypes and templates are definitive models of semantics, without commitment to specific messaging or document standards, or other technologies.... | I'm not entirely sure what computable data (google searches give me how to compute and what not), so I'll be using the assumption that your data is like software source code. Please correct me if I am wrong in doing this.
As you would like a software license, Creative Commons should be out of the question. Their licen... |
421 | What would be a good license for computable data models? Technically they're source code, but they're always constrained and transformed to other artifacts before being used in actual software. At the moment we're using CC-BY-SA, which industry is wary about because of the -SA clause. CC is also not quite right because... | 2015/06/26 | [
"https://opensource.stackexchange.com/questions/421",
"https://opensource.stackexchange.com",
"https://opensource.stackexchange.com/users/59/"
] | This question would be easier to understand if you explained what these *archetypes* actually are.
I [read](http://openehr.org/what_is_openehr) that «Within this approach, archetypes and templates are definitive models of semantics, without commitment to specific messaging or document standards, or other technologies.... | **Summary:** If you can define something (say an XML file) as your *source code*, then you could apply the LGPL license to your archetypes, and treat them as *software libraries*. Your archetypes can then be modified and/or included in any work (including a proprietary work), as long as that work are distributed with a... |
421 | What would be a good license for computable data models? Technically they're source code, but they're always constrained and transformed to other artifacts before being used in actual software. At the moment we're using CC-BY-SA, which industry is wary about because of the -SA clause. CC is also not quite right because... | 2015/06/26 | [
"https://opensource.stackexchange.com/questions/421",
"https://opensource.stackexchange.com",
"https://opensource.stackexchange.com/users/59/"
] | This question would be easier to understand if you explained what these *archetypes* actually are.
I [read](http://openehr.org/what_is_openehr) that «Within this approach, archetypes and templates are definitive models of semantics, without commitment to specific messaging or document standards, or other technologies.... | For an archetype that is used to automatically create code, it's important to note that there is no creative act in converting the archetype to the code. Therefor, the same license conditions that cover the archetype will cover the generated code.
This makes it difficult to license the generated code more restrictivel... |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | Sounds like a bug!
There is [a similar bug (396542)](https://bugzilla.mozilla.org/show_bug.cgi?id=396542) open with Mozilla, saying that the cursor *should* blink in `readonly` inputs — but that behavior feels wrong, a blinking cursor is supposed to mean, “you can type here.”
You should comment on that bug and/or fil... | If you change the `readonly` attribute to `disabled`, you won't be able to click into the input box and thus won't have a cursor.
Depending on the browser, you may not be able to select the text either though.
I've provided examples of the various input states here: <http://jsfiddle.net/hqBsW/1/>
Another alternativ... |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | My solution, from nikmd23's jQuery snippet but with the blur() function that seems to work better
```
$('input[readonly]').focus(function(){
this.blur();
});
```
[Example here: http://jsfiddle.net/eAZa2/](http://jsfiddle.net/eAZa2/)
Don't use the attribute "disabled" because the input would not be submitted whe... | You can set the style attribute of your tag or you can add a css class to your tag by setting the class attribute's value. Your problem can be solved by setting the cursor. You can read more [here](http://www.echoecho.com/csscursors.htm). Also, if you have some rules which set the cursor of this tag you can add !import... |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | My solution, from nikmd23's jQuery snippet but with the blur() function that seems to work better
```
$('input[readonly]').focus(function(){
this.blur();
});
```
[Example here: http://jsfiddle.net/eAZa2/](http://jsfiddle.net/eAZa2/)
Don't use the attribute "disabled" because the input would not be submitted whe... | You can use `css`:
```
input {pointer-events:none;}
```
Reference: <https://developer.mozilla.org/pt-BR/docs/Web/CSS/pointer-events> |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | If you change the `readonly` attribute to `disabled`, you won't be able to click into the input box and thus won't have a cursor.
Depending on the browser, you may not be able to select the text either though.
I've provided examples of the various input states here: <http://jsfiddle.net/hqBsW/1/>
Another alternativ... | You can use `css`:
```
input {pointer-events:none;}
```
Reference: <https://developer.mozilla.org/pt-BR/docs/Web/CSS/pointer-events> |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | For a `CSS` only fix, use :
```
input[readonly] {
pointer-events: none;
}
``` | You can use `css`:
```
input {pointer-events:none;}
```
Reference: <https://developer.mozilla.org/pt-BR/docs/Web/CSS/pointer-events> |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | If you change the `readonly` attribute to `disabled`, you won't be able to click into the input box and thus won't have a cursor.
Depending on the browser, you may not be able to select the text either though.
I've provided examples of the various input states here: <http://jsfiddle.net/hqBsW/1/>
Another alternativ... | the only way i found for this was
```
//FIREFOX
$('INPUT_SELECTOR').focus(function () {
$(this).blur();
});
//INTERNET EXPLORER
$('INPUT_SELECTOR').attr('unselectable', 'on');
KENDO
$('.k-ff .k-combobox>span>.k-input').focus(function () {
$(this).blur();
});
$('.... |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | Sounds like a bug!
There is [a similar bug (396542)](https://bugzilla.mozilla.org/show_bug.cgi?id=396542) open with Mozilla, saying that the cursor *should* blink in `readonly` inputs — but that behavior feels wrong, a blinking cursor is supposed to mean, “you can type here.”
You should comment on that bug and/or fil... | For a `CSS` only fix, use :
```
input[readonly] {
pointer-events: none;
}
``` |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | the only way i found for this was
```
//FIREFOX
$('INPUT_SELECTOR').focus(function () {
$(this).blur();
});
//INTERNET EXPLORER
$('INPUT_SELECTOR').attr('unselectable', 'on');
KENDO
$('.k-ff .k-combobox>span>.k-input').focus(function () {
$(this).blur();
});
$('.... | You can set the style attribute of your tag or you can add a css class to your tag by setting the class attribute's value. Your problem can be solved by setting the cursor. You can read more [here](http://www.echoecho.com/csscursors.htm). Also, if you have some rules which set the cursor of this tag you can add !import... |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | If you change the `readonly` attribute to `disabled`, you won't be able to click into the input box and thus won't have a cursor.
Depending on the browser, you may not be able to select the text either though.
I've provided examples of the various input states here: <http://jsfiddle.net/hqBsW/1/>
Another alternativ... | For a `CSS` only fix, use :
```
input[readonly] {
pointer-events: none;
}
``` |
7,917,597 | Suppose I have in Matlab a symbolic equation like this
```
syms x y z real
T = 2*x^2 + k*y^2 + 6*k*x*y
```
How can I find the matrix B such that
```
T = [x y] * B * [x y]'
```
Thanks for your help. | 2011/10/27 | [
"https://Stackoverflow.com/questions/7917597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/173787/"
] | Sounds like a bug!
There is [a similar bug (396542)](https://bugzilla.mozilla.org/show_bug.cgi?id=396542) open with Mozilla, saying that the cursor *should* blink in `readonly` inputs — but that behavior feels wrong, a blinking cursor is supposed to mean, “you can type here.”
You should comment on that bug and/or fil... | the only way i found for this was
```
//FIREFOX
$('INPUT_SELECTOR').focus(function () {
$(this).blur();
});
//INTERNET EXPLORER
$('INPUT_SELECTOR').attr('unselectable', 'on');
KENDO
$('.k-ff .k-combobox>span>.k-input').focus(function () {
$(this).blur();
});
$('.... |
3,048,484 | I'm using the dropdownlist html helper and would like to perform an ajax call to the server when the value changes. I have seen the jquery code dropdownlist.change...
The problem I have is that I have a series of dropdownlist's name dropdownlist\_1, dropdownlist\_2, ...
I would like to be able to specify the same jqu... | 2010/06/15 | [
"https://Stackoverflow.com/questions/3048484",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/367633/"
] | Instead of attempting to specify it in the HtmlHelper, add a class name to each of your dropdown lists:
```
<%=Html.DropDownList("ddlName", new {@class="ajaxDropDown"})%>
```
or
```
<select class="ajaxDropDown" id="ddlOne">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<select class="ajax... | try this:
```
<%=Html.DropDownList("TopItemsList", ViewData["ListData"], new { @onchange="javascript();" })%>
```
you can call the function you want. |
74,417 | I currently have a hybrid bike with a flat handlebar that I ride on roads for exercise and leisure. I want to replace it with a bike with an IGH and coaster brake so that less maintanence is required, but all bikes I can find with that are "city" bikes. I've ridden a few city bikes before and they are much harder to pe... | 2021/01/09 | [
"https://bicycles.stackexchange.com/questions/74417",
"https://bicycles.stackexchange.com",
"https://bicycles.stackexchange.com/users/38701/"
] | There is no formal definition of city bike or hybrid bike so this question is hard to answer, especially as 'hybrid' can mean many very different styles, some of which are slower than some 'city' bikes.
This is a more recognized style, the 'Dutch bike'
[ suggests the answer to your question will be different for the UK and for continental Europe:

---
In an attempt to answer your question more direct... | Birkhoff and Mac Lane's 1941 "Survey of Modern Algebra" had a chapter on "The Algebra of Matrices". That book was influential in US curricula, and it would be a good place to look.
That answer is consistent with the influence of quantum mechanics, since quantum mechanics at Gottingen (as with Heisenberg) influenced al... |
185,954 | The story about Heisenberg inventing matrices and matrix multiplication in 1925 is very well known and well documented. A few weeks later, Born and Jordan read this work and recognized matrix multiplication, because one of them happened to take a course in "hypercomplex numbers" in his youth. This is how modern quantum... | 2014/11/01 | [
"https://mathoverflow.net/questions/185954",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25510/"
] | The article by J.-L. Dorier in [On the Teaching of Linear Algebra](http://books.google.nl/books?id=afW8TGIMuigC) suggests the answer to your question will be different for the UK and for continental Europe:

---
In an attempt to answer your question more direct... | TL;DR: In the US, matrices and matrix multiplication probably became an expected part of the curriculum for engineering majors ca. 1970, and I would guess that the reason for this was its applications in electrical engineering and materials science.
**19th Century:**
Through the 19th century, most physicists customar... |
185,954 | The story about Heisenberg inventing matrices and matrix multiplication in 1925 is very well known and well documented. A few weeks later, Born and Jordan read this work and recognized matrix multiplication, because one of them happened to take a course in "hypercomplex numbers" in his youth. This is how modern quantum... | 2014/11/01 | [
"https://mathoverflow.net/questions/185954",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25510/"
] | The article by J.-L. Dorier in [On the Teaching of Linear Algebra](http://books.google.nl/books?id=afW8TGIMuigC) suggests the answer to your question will be different for the UK and for continental Europe:

---
In an attempt to answer your question more direct... | There are some historical UK high school syllabuses at <http://www.cambridgeassessment.org.uk/our-research/archives-service/past-exam-material/>. Two by two matrices are in the 1984 O Level (taken at age 16) but not in the 1974 O Level or A Level (the latter taken at age 18). I don't know where you would find good data... |
185,954 | The story about Heisenberg inventing matrices and matrix multiplication in 1925 is very well known and well documented. A few weeks later, Born and Jordan read this work and recognized matrix multiplication, because one of them happened to take a course in "hypercomplex numbers" in his youth. This is how modern quantum... | 2014/11/01 | [
"https://mathoverflow.net/questions/185954",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25510/"
] | The article by J.-L. Dorier in [On the Teaching of Linear Algebra](http://books.google.nl/books?id=afW8TGIMuigC) suggests the answer to your question will be different for the UK and for continental Europe:

---
In an attempt to answer your question more direct... | Too long for a comment, but this premise of the question:
>
> I know that matrix multiplication was introduced by Cayley (correct me if I am wrong)
>
>
>
is indeed wrong. Gauss in *Disquisitiones Arithmeticae* (1801) has something called not matrix multiplication but ***combination of substitutions*** — e.g. he w... |
185,954 | The story about Heisenberg inventing matrices and matrix multiplication in 1925 is very well known and well documented. A few weeks later, Born and Jordan read this work and recognized matrix multiplication, because one of them happened to take a course in "hypercomplex numbers" in his youth. This is how modern quantum... | 2014/11/01 | [
"https://mathoverflow.net/questions/185954",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25510/"
] | Birkhoff and Mac Lane's 1941 "Survey of Modern Algebra" had a chapter on "The Algebra of Matrices". That book was influential in US curricula, and it would be a good place to look.
That answer is consistent with the influence of quantum mechanics, since quantum mechanics at Gottingen (as with Heisenberg) influenced al... | TL;DR: In the US, matrices and matrix multiplication probably became an expected part of the curriculum for engineering majors ca. 1970, and I would guess that the reason for this was its applications in electrical engineering and materials science.
**19th Century:**
Through the 19th century, most physicists customar... |
185,954 | The story about Heisenberg inventing matrices and matrix multiplication in 1925 is very well known and well documented. A few weeks later, Born and Jordan read this work and recognized matrix multiplication, because one of them happened to take a course in "hypercomplex numbers" in his youth. This is how modern quantum... | 2014/11/01 | [
"https://mathoverflow.net/questions/185954",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25510/"
] | Birkhoff and Mac Lane's 1941 "Survey of Modern Algebra" had a chapter on "The Algebra of Matrices". That book was influential in US curricula, and it would be a good place to look.
That answer is consistent with the influence of quantum mechanics, since quantum mechanics at Gottingen (as with Heisenberg) influenced al... | There are some historical UK high school syllabuses at <http://www.cambridgeassessment.org.uk/our-research/archives-service/past-exam-material/>. Two by two matrices are in the 1984 O Level (taken at age 16) but not in the 1974 O Level or A Level (the latter taken at age 18). I don't know where you would find good data... |
185,954 | The story about Heisenberg inventing matrices and matrix multiplication in 1925 is very well known and well documented. A few weeks later, Born and Jordan read this work and recognized matrix multiplication, because one of them happened to take a course in "hypercomplex numbers" in his youth. This is how modern quantum... | 2014/11/01 | [
"https://mathoverflow.net/questions/185954",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25510/"
] | Too long for a comment, but this premise of the question:
>
> I know that matrix multiplication was introduced by Cayley (correct me if I am wrong)
>
>
>
is indeed wrong. Gauss in *Disquisitiones Arithmeticae* (1801) has something called not matrix multiplication but ***combination of substitutions*** — e.g. he w... | TL;DR: In the US, matrices and matrix multiplication probably became an expected part of the curriculum for engineering majors ca. 1970, and I would guess that the reason for this was its applications in electrical engineering and materials science.
**19th Century:**
Through the 19th century, most physicists customar... |
185,954 | The story about Heisenberg inventing matrices and matrix multiplication in 1925 is very well known and well documented. A few weeks later, Born and Jordan read this work and recognized matrix multiplication, because one of them happened to take a course in "hypercomplex numbers" in his youth. This is how modern quantum... | 2014/11/01 | [
"https://mathoverflow.net/questions/185954",
"https://mathoverflow.net",
"https://mathoverflow.net/users/25510/"
] | Too long for a comment, but this premise of the question:
>
> I know that matrix multiplication was introduced by Cayley (correct me if I am wrong)
>
>
>
is indeed wrong. Gauss in *Disquisitiones Arithmeticae* (1801) has something called not matrix multiplication but ***combination of substitutions*** — e.g. he w... | There are some historical UK high school syllabuses at <http://www.cambridgeassessment.org.uk/our-research/archives-service/past-exam-material/>. Two by two matrices are in the 1984 O Level (taken at age 16) but not in the 1974 O Level or A Level (the latter taken at age 18). I don't know where you would find good data... |
50,758,351 | could anyone help me out here? Just trying to embed a simple Skype button in my react app, but due to my apparent lack of understanding of modules, imports, webpack, and how create-react-app actually does what it does, I can't access the Skype object. It's not defined.
I have followed instructions
```
https://www.sk... | 2018/06/08 | [
"https://Stackoverflow.com/questions/50758351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/798719/"
] | You misunderstood the guarantees that post-increment offers. It guarantees that the location in which `x` is stored will be calculated using the old value of `i`. It absolutely does not guarantee that `x` will be stored before the updated value is stored in `i`.
The compiler is perfectly at liberty to convert the code... | When reading and writing the same variable from different threads, you *must* use some synchronization mechanism, e.g. a `mutex` or an `atomic` variable (if you want to synchronize just a single variable). Platforms other than x86 are much less forgiving in this sense.
In addition, when more than one variable is being... |
30,348,614 | I am facing while merging two files in one (with common content)
```
public class myFileReader {
public static void main(String[] args) throws Exception {
List<String> firstFileList = new ArrayList<String>();
List<String> secondFileList = new ArrayList<String>();
List<String> missingReco... | 2015/05/20 | [
"https://Stackoverflow.com/questions/30348614",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4828183/"
] | While it is not possible to receive a notification directly from Amazon EC2 when an instance is terminated, there are a couple of ways this could be accomplished:
**Auto Scaling** can send a notification when an instance *managed by Auto Scaling* is terminated. See: [Configure Your Auto Scaling Group to Send Notificat... | Now AWS introduced "rules" Under "Events" in AWS CloudWatch. In your case, you can select EC2 as Event Selector and SNS or SQS as Targets.
<https://aws.amazon.com/blogs/aws/new-cloudwatch-events-track-and-respond-to-changes-to-your-aws-resources/> |
30,348,614 | I am facing while merging two files in one (with common content)
```
public class myFileReader {
public static void main(String[] args) throws Exception {
List<String> firstFileList = new ArrayList<String>();
List<String> secondFileList = new ArrayList<String>();
List<String> missingReco... | 2015/05/20 | [
"https://Stackoverflow.com/questions/30348614",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4828183/"
] | While it is not possible to receive a notification directly from Amazon EC2 when an instance is terminated, there are a couple of ways this could be accomplished:
**Auto Scaling** can send a notification when an instance *managed by Auto Scaling* is terminated. See: [Configure Your Auto Scaling Group to Send Notificat... | According to the [AWS doc: Spot Instance Interruptions](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html), it is possible to pool the instance-metadata in order to get an approximation of the termination time. You can build any custom monitoring solution around that.
```
> curl http://169.25... |
6,227,275 | Is there a way to convert pptx to an image? My aim is to finally generate an PDF file.
I try with Aspose but there are some issue. With Apache POI, it don't support PPTX. Any other idea? | 2011/06/03 | [
"https://Stackoverflow.com/questions/6227275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/779995/"
] | **Note that you should not add the brackets if you don't need them!** It makes it unnecessary complex.
In your posted code there is no indication that you need those brackets. You normally add them if you have several input fields with the same name and you want PHP to create an array. For more information please ref... | While Felix's answer will work in most (all?) browsers, it should be noted that HTML names and IDs are supposed to be valid identifiers, which cannot contain square brackets. The correct solution is to not use square brackets in your names and IDs.
**EDIT:** I stand corrected. In HTML 4, The 'id' attribute is type ID,... |
6,227,275 | Is there a way to convert pptx to an image? My aim is to finally generate an PDF file.
I try with Aspose but there are some issue. With Apache POI, it don't support PPTX. Any other idea? | 2011/06/03 | [
"https://Stackoverflow.com/questions/6227275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/779995/"
] | **Note that you should not add the brackets if you don't need them!** It makes it unnecessary complex.
In your posted code there is no indication that you need those brackets. You normally add them if you have several input fields with the same name and you want PHP to create an array. For more information please ref... | I would add an 'id' attribute to the third box (third input) and give the id a value without square brackets.
Use the 'id' attribute to select the DOM element in your javascript code. And let the 'name' attribute keeps its square brackets. |
6,227,275 | Is there a way to convert pptx to an image? My aim is to finally generate an PDF file.
I try with Aspose but there are some issue. With Apache POI, it don't support PPTX. Any other idea? | 2011/06/03 | [
"https://Stackoverflow.com/questions/6227275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/779995/"
] | **Note that you should not add the brackets if you don't need them!** It makes it unnecessary complex.
In your posted code there is no indication that you need those brackets. You normally add them if you have several input fields with the same name and you want PHP to create an array. For more information please ref... | 1. Add id to textarea
`<input size="4" type=text name="Area" id="someid" readonly="true">`
2. Put value by id
`document.getElementById('someid').value = (one * 1) * (two * 1);` |
6,227,275 | Is there a way to convert pptx to an image? My aim is to finally generate an PDF file.
I try with Aspose but there are some issue. With Apache POI, it don't support PPTX. Any other idea? | 2011/06/03 | [
"https://Stackoverflow.com/questions/6227275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/779995/"
] | While Felix's answer will work in most (all?) browsers, it should be noted that HTML names and IDs are supposed to be valid identifiers, which cannot contain square brackets. The correct solution is to not use square brackets in your names and IDs.
**EDIT:** I stand corrected. In HTML 4, The 'id' attribute is type ID,... | I would add an 'id' attribute to the third box (third input) and give the id a value without square brackets.
Use the 'id' attribute to select the DOM element in your javascript code. And let the 'name' attribute keeps its square brackets. |
6,227,275 | Is there a way to convert pptx to an image? My aim is to finally generate an PDF file.
I try with Aspose but there are some issue. With Apache POI, it don't support PPTX. Any other idea? | 2011/06/03 | [
"https://Stackoverflow.com/questions/6227275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/779995/"
] | 1. Add id to textarea
`<input size="4" type=text name="Area" id="someid" readonly="true">`
2. Put value by id
`document.getElementById('someid').value = (one * 1) * (two * 1);` | I would add an 'id' attribute to the third box (third input) and give the id a value without square brackets.
Use the 'id' attribute to select the DOM element in your javascript code. And let the 'name' attribute keeps its square brackets. |
52,888,014 | Im learning kotlin. I followed a tutorial where i should put some random text into the editText box. However whenever i put too many lines of text into the texbox, everything on the layout shrinks into the top left cornor.
I tried to invalid the cache, and also to change to another api but with no luck so far. any ide... | 2018/10/19 | [
"https://Stackoverflow.com/questions/52888014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9347132/"
] | A few problems here:
1. You do not separate conditions using a comma, instead you use `AND`
2. You cannot check a password hash like that as it will be different every time as the salt is generated dynamically. Instead you should get the password from the row and use the password compare function `password_verify()`.
... | `password_hash` generates every time a new hash, even with the same value.
Your Query should only query for the email and then execute `password_verify($password, $passwordFromQuery)`.
More about `password_hash()` [here](http://php.net/manual/de/function.password-hash.php) and about `password_verify()` [here](http:/... |
52,888,014 | Im learning kotlin. I followed a tutorial where i should put some random text into the editText box. However whenever i put too many lines of text into the texbox, everything on the layout shrinks into the top left cornor.
I tried to invalid the cache, and also to change to another api but with no luck so far. any ide... | 2018/10/19 | [
"https://Stackoverflow.com/questions/52888014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9347132/"
] | A few problems here:
1. You do not separate conditions using a comma, instead you use `AND`
2. You cannot check a password hash like that as it will be different every time as the salt is generated dynamically. Instead you should get the password from the row and use the password compare function `password_verify()`.
... | Try this
```
$sql="SELECT account_type, email and password FROM $tbl_name WHERE email='".$email."', password='".$hash."'";
$mysqli_result=mysqli_query($mysqli, $sql) or die(mysqli_error($mysqli));
``` |
29,190,593 | i am running a Jenkins script for building a Jenkins program and preparing it's environment.
i posted the section of the script where it hangs. it hangs in the `while [[ "$ENDPOINT_STATUS" != 0 && (( $COUNTER < 5 )) ]]` line. could anyone please tell me what is the problem ?
```
##############
## wait until config w... | 2015/03/22 | [
"https://Stackoverflow.com/questions/29190593",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2178376/"
] | The issue is that you do not call the super in all of your constructors. you must do so.
instead of:
```
public Triangle(String status, double width, double height)
{
this.status = status;
this.width = width;
this.height = height;
}
public Triangle(double size)
{
}
```
do this:
```
public Triangle(String status,... | You initialized array polygons as
```
TwoDPolygon polygons[] = new TwoDPolygon[3];
```
Yet when you access the elements from the array, you are calling a method in subclass Triangle. You can't call a Triangle-only method from a TwoDPolygon.
Initialize the array as Triangle elements or move getStatus() to class Two... |
29,190,593 | i am running a Jenkins script for building a Jenkins program and preparing it's environment.
i posted the section of the script where it hangs. it hangs in the `while [[ "$ENDPOINT_STATUS" != 0 && (( $COUNTER < 5 )) ]]` line. could anyone please tell me what is the problem ?
```
##############
## wait until config w... | 2015/03/22 | [
"https://Stackoverflow.com/questions/29190593",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2178376/"
] | Because the type of polygons[] is TwoDPolygon `TwoDPolygon polygons[] = new TwoDPolygon[3];`, it searches for the method getStatus() in the class declaration of TwoDPolygon, not Triangle, even though the elements are instantiated as Triangle.
You have several options to fix this:
1. change the declaration to Triangle... | You initialized array polygons as
```
TwoDPolygon polygons[] = new TwoDPolygon[3];
```
Yet when you access the elements from the array, you are calling a method in subclass Triangle. You can't call a Triangle-only method from a TwoDPolygon.
Initialize the array as Triangle elements or move getStatus() to class Two... |
5,474,970 | Our production logs are long and contain a lot more than just errors. I'd like a second log file with just the errors/exceptions in.
Is this possible?
We're using rails 2.x
Thanks. | 2011/03/29 | [
"https://Stackoverflow.com/questions/5474970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/134595/"
] | Take a look at the following FAQ page:
<http://www.faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html#INIT-AND-CLEANUP>
It describes `_init/_fini` as dangerous and obsolete, and recommends that `__attribute__ ((constructor))` and `__attribute__ ((destructor))` are used instead.
From the [`gcc` manual](http://gcc.g... | 1) You can write your own \_init or main:
GNU GCC allows you to define your own function of the same name as an existing symbol. When linking, you provide an argument of `-Xlinker --wrap=<symName>`. Pretending you did this to main, you can call the real main via `__real_main(...)`:
```
int main(int argc, void *argv)
... |
5,474,970 | Our production logs are long and contain a lot more than just errors. I'd like a second log file with just the errors/exceptions in.
Is this possible?
We're using rails 2.x
Thanks. | 2011/03/29 | [
"https://Stackoverflow.com/questions/5474970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/134595/"
] | Take a look at the following FAQ page:
<http://www.faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html#INIT-AND-CLEANUP>
It describes `_init/_fini` as dangerous and obsolete, and recommends that `__attribute__ ((constructor))` and `__attribute__ ((destructor))` are used instead.
From the [`gcc` manual](http://gcc.g... | To overcome that error compile the code as `gcc -nostartfiles memory2.c -o memory2`, here we are skipping the constructor and destructor.
But it is not recommended to override these. |
5,474,970 | Our production logs are long and contain a lot more than just errors. I'd like a second log file with just the errors/exceptions in.
Is this possible?
We're using rails 2.x
Thanks. | 2011/03/29 | [
"https://Stackoverflow.com/questions/5474970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/134595/"
] | 1) You can write your own \_init or main:
GNU GCC allows you to define your own function of the same name as an existing symbol. When linking, you provide an argument of `-Xlinker --wrap=<symName>`. Pretending you did this to main, you can call the real main via `__real_main(...)`:
```
int main(int argc, void *argv)
... | To overcome that error compile the code as `gcc -nostartfiles memory2.c -o memory2`, here we are skipping the constructor and destructor.
But it is not recommended to override these. |
56,248,795 | How to handle this kind of error message? Why is it coming? Is that issue? I called below method every 10 seconds.
```
checkQuick(String url, String token) async {
result =
(await HelperDatabase1().displayGetUserPreference()).elementAt(0)?.data;
final response = await http.get(
'$url/nativeapi... | 2019/05/22 | [
"https://Stackoverflow.com/questions/56248795",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Check the response.statusCode before if it is 200.
Looks like the response.body is empty because the call failed, so json.decode(response.body) throws an exception. | It might be from the server end. I used to work with a ruby backend that requires '.json' added at the end of url path. Give that a try. |
58,070,512 | I have the following code
```
export function featureReady(feature: BaseFeatureService) {
return pipe(
zip(feature.loading$),
filter(([inputObject, loading]) => !loading),
map(([inputObject, loading]) => {
return inputObject;
})
);
}
```
And I wish to consume it like this.
```
observable$.... | 2019/09/23 | [
"https://Stackoverflow.com/questions/58070512",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6946339/"
] | There is no good way for Guava's Cache -- or any on-heap cache implementation, honestly -- to do what you ask. Soft references may appear to work, but are much more likely to cause awful behavior -- e.g. your JVM may perform continuous, constant full garbage collections.
The best way to address this issue is really an... | If your objective is to avoid running out of memory JVM-wide, then the garbage collector is the right guy for the job. I suggest you use [soft-values](https://guava.dev/releases/snapshot/api/docs/com/google/common/cache/CacheBuilder.html#softValues--), like so:
```
Cache<String, Cache<String, List<String>>> cache = Ca... |
27,951,192 | I am trying to study a multi-client chat server. As i'm new in Java, I am unable to run this two .java files in Net beans. I have two java projects and put I these files under them. Server project runs successfully but client project shows:
```
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at... | 2015/01/14 | [
"https://Stackoverflow.com/questions/27951192",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3224936/"
] | If you look at your client's constructor you'll see that it requires two arguments:
```
chatClient(String LoginName, String chatwith)
```
a login and with whom to chat.
I think you don't specify them so the following line throws an exception because there aren't any and `args` is empty:
```
chatClient Client1 = ne... | The java arguments you pass from the command line are actually an array of String. If you do not type anything into the command line (or the NetBeans equivalent you will get an ArrrayIndexOutOfBoundsException. Therefore you get an exception because you try to pass an array of strings into chatClient method without ther... |
56,780,336 | Calling `fprintf(stderr,...)` from MPI processes never gives interleaved results for me.
Order of messages from different MPI processes is arbitrary of course.
But no two `fprintf`-s get intermingled.
I.e., each single `fprintf` behaves as if it were atomic.
Is this behavior guaranteed by a standard? On Windows? On ... | 2019/06/26 | [
"https://Stackoverflow.com/questions/56780336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2052436/"
] | Sounds like you are trying to compress your first definition into a single function -- i.e. you just need to shuffle some working code around. Haskell is great at this.
I would personally keep `gab1` separate, since it has a couple special cases. Typically it would be written in curried form
```
gab1 :: Char -> Int -... | You are almost there, the solution is fine, sub Tasks / sub Functions are healthy to programmers eyes, so, don't worry, you can create another extra function by compose them:
```
gab2 :: [(Char, Int)] -> String
gab2 = foldr(\x acc -> gab1 x ++ acc) []
finalGab :: [Char] -> String
finalGab = gab2 . gab0
``` |
19,864,347 | In HTML is there a way to redirect to a different web page without there being a notification? I really need this for a website so that people cannot access work in progress pages and are redirected to the home page. But everything I have tried is an optional redirection. | 2013/11/08 | [
"https://Stackoverflow.com/questions/19864347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2947476/"
] | ```
StateListDrawable gradientDrawable = (StateListDrawable) inflatedView.getBackground();
DrawableContainerState drawableContainerState = (DrawableContainerState) gradientDrawable.getConstantState();
Drawable[] children = drawableContainerState.getChildren();
LayerDrawable selectedItem = (LayerDrawabl... | I have below selector **round\_circle\_blue.xml** shape xml
```
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<size android:width="@dimen/_50sdp" android:height="@dimen/_50sdp" />
<solid android:color="@color/color_blue" />
<stroke... |
19,864,347 | In HTML is there a way to redirect to a different web page without there being a notification? I really need this for a website so that people cannot access work in progress pages and are redirected to the home page. But everything I have tried is an optional redirection. | 2013/11/08 | [
"https://Stackoverflow.com/questions/19864347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2947476/"
] | ```
StateListDrawable gradientDrawable = (StateListDrawable) inflatedView.getBackground();
DrawableContainerState drawableContainerState = (DrawableContainerState) gradientDrawable.getConstantState();
Drawable[] children = drawableContainerState.getChildren();
LayerDrawable selectedItem = (LayerDrawabl... | This is the Kotlin version of the [@Borja's answer](https://stackoverflow.com/a/25038966/7090806) with drawable resource
```
val drawableRes: Drawable? = ResourcesCompat.getDrawable(mContext.resources, R.drawable.drawable_res_id, null)
val drawableContainerState: DrawableContainer.DrawableContainerState = drawableRes... |
19,864,347 | In HTML is there a way to redirect to a different web page without there being a notification? I really need this for a website so that people cannot access work in progress pages and are redirected to the home page. But everything I have tried is an optional redirection. | 2013/11/08 | [
"https://Stackoverflow.com/questions/19864347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2947476/"
] | This is the Kotlin version of the [@Borja's answer](https://stackoverflow.com/a/25038966/7090806) with drawable resource
```
val drawableRes: Drawable? = ResourcesCompat.getDrawable(mContext.resources, R.drawable.drawable_res_id, null)
val drawableContainerState: DrawableContainer.DrawableContainerState = drawableRes... | I have below selector **round\_circle\_blue.xml** shape xml
```
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<size android:width="@dimen/_50sdp" android:height="@dimen/_50sdp" />
<solid android:color="@color/color_blue" />
<stroke... |
10,524,836 | When my Activity don't get data from the DB, I show a Toast message saying about this. Then I recharge the previous Activity but this charge very fast and the Toast message still there a few seconds. I want this message duration but I don't know how to retard the init of the Activity that I want to start after message.... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10524836",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1046551/"
] | Inside the "else" I added a thread that sleeps while Toast message is showing and after starts the next Activity.
```
...}else{
Toast.makeText(this.getApplicationContext(), "NO hay datos", Toast.LENGTH_LONG).show();
final Intent intent = new Intent(this, OtherActivity.class); ... | as far as i know , the duration of the toast can only be set of one of two values (long and short) , both can be user defined.
in order to set your own time and also be notified when it's over , you will need to create your own mechanism instead of the built in toast ...
try to use either a dialog (maybe progressDial... |
10,524,836 | When my Activity don't get data from the DB, I show a Toast message saying about this. Then I recharge the previous Activity but this charge very fast and the Toast message still there a few seconds. I want this message duration but I don't know how to retard the init of the Activity that I want to start after message.... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10524836",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1046551/"
] | Inside the "else" I added a thread that sleeps while Toast message is showing and after starts the next Activity.
```
...}else{
Toast.makeText(this.getApplicationContext(), "NO hay datos", Toast.LENGTH_LONG).show();
final Intent intent = new Intent(this, OtherActivity.class); ... | ```
Toast.makeText(this, "your message", Toast.LENGTH_LONG).show();
(new Handler())
.postDelayed(
new Runnable() {
public void run() {
// launch your activity here
}
}, timeInMillisecondTheToastIsShowingFor);
```
This will delay launching the activity for however long you'd like |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | `a` `Enter` `Esc` to split to the right of the cursor, or `i` `Enter` `Esc` to split to the left. | Here are a few tips and starting points, with some overlap on existing answers:
* wrap current line after 70+ characters (on a word boundary): `:s/.\{-70,\} */&^M/g`
+ note: `{-70,}` is the [non-greedy quantifier](http://vimdoc.sourceforge.net/htmldoc/pattern.html)
+ the `^M` is `ctrl`+`v` `ctrl`+`m` (a "return")
+... |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | No, there's no built-in command for that.
When I want to split on a `<Space>`, I do `r<CR>`.
--- EDIT ---
@keith-nicholas' comment reminded me about this question. FWIW I came up with an hopefully "universal" method in the mean time:
```
function! BreakHere()
s/^\(\s*\)\(.\{-}\)\(\s*\)\(\%#\)\(\s*\)\(.*\)/\1\2\... | You can record a macro:
in normal mode type "q+" to start the record.
press "i", the macro you want to record.
then press "q" again to stop recording.
to use the macro go to normal mode and type "@+letter".
in my case I used the "b" to use this macro:
to record type in normal mode "qbiq"
to use type in normal mode "... |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | The easiest way I've found to split lines in Vim is the normal mode command `gq` (type both letters in quick succession in normal or visual mode):
* In visual mode, it will split whatever is selected.
* In normal mode, you follow `gq` with a motion.
For example, `gql` will split one line to the currently set width. T... | You can use the `s` substitute request with the `\r` carriage return. Consider a file with this sentence at line one:
```
This is sentence one. This is sentence two.
```
Then this will split the sentences into two lines:
```
:1s/\. /\r/
``` |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | `a` `Enter` `Esc` to split to the right of the cursor, or `i` `Enter` `Esc` to split to the left. | You can record a macro:
in normal mode type "q+" to start the record.
press "i", the macro you want to record.
then press "q" again to stop recording.
to use the macro go to normal mode and type "@+letter".
in my case I used the "b" to use this macro:
to record type in normal mode "qbiq"
to use type in normal mode "... |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | No, there's no built-in command for that.
When I want to split on a `<Space>`, I do `r<CR>`.
--- EDIT ---
@keith-nicholas' comment reminded me about this question. FWIW I came up with an hopefully "universal" method in the mean time:
```
function! BreakHere()
s/^\(\s*\)\(.\{-}\)\(\s*\)\(\%#\)\(\s*\)\(.*\)/\1\2\... | You can use the `s` substitute request with the `\r` carriage return. Consider a file with this sentence at line one:
```
This is sentence one. This is sentence two.
```
Then this will split the sentences into two lines:
```
:1s/\. /\r/
``` |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | No, there's no built-in command for that.
When I want to split on a `<Space>`, I do `r<CR>`.
--- EDIT ---
@keith-nicholas' comment reminded me about this question. FWIW I came up with an hopefully "universal" method in the mean time:
```
function! BreakHere()
s/^\(\s*\)\(.\{-}\)\(\s*\)\(\%#\)\(\s*\)\(.*\)/\1\2\... | Here are a few tips and starting points, with some overlap on existing answers:
* wrap current line after 70+ characters (on a word boundary): `:s/.\{-70,\} */&^M/g`
+ note: `{-70,}` is the [non-greedy quantifier](http://vimdoc.sourceforge.net/htmldoc/pattern.html)
+ the `^M` is `ctrl`+`v` `ctrl`+`m` (a "return")
+... |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | You can use the `s` substitute request with the `\r` carriage return. Consider a file with this sentence at line one:
```
This is sentence one. This is sentence two.
```
Then this will split the sentences into two lines:
```
:1s/\. /\r/
``` | Here are a few tips and starting points, with some overlap on existing answers:
* wrap current line after 70+ characters (on a word boundary): `:s/.\{-70,\} */&^M/g`
+ note: `{-70,}` is the [non-greedy quantifier](http://vimdoc.sourceforge.net/htmldoc/pattern.html)
+ the `^M` is `ctrl`+`v` `ctrl`+`m` (a "return")
+... |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | The easiest way I've found to split lines in Vim is the normal mode command `gq` (type both letters in quick succession in normal or visual mode):
* In visual mode, it will split whatever is selected.
* In normal mode, you follow `gq` with a motion.
For example, `gql` will split one line to the currently set width. T... | You could define your own using map. To define z as the command for example:
```
:map z i<CTRL+m>
``` |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | The easiest way I've found to split lines in Vim is the normal mode command `gq` (type both letters in quick succession in normal or visual mode):
* In visual mode, it will split whatever is selected.
* In normal mode, you follow `gq` with a motion.
For example, `gql` will split one line to the currently set width. T... | You can record a macro:
in normal mode type "q+" to start the record.
press "i", the macro you want to record.
then press "q" again to stop recording.
to use the macro go to normal mode and type "@+letter".
in my case I used the "b" to use this macro:
to record type in normal mode "qbiq"
to use type in normal mode "... |
611,410 | In Vim, the `J` key joins two lines together. Is there a similar, built-in, key combination to split lines with a newline (at the cursor position, or similar)?
Alternatively, what would be the most robust way to define a key combination to do that (in normal mode, not insert mode)? | 2013/06/24 | [
"https://superuser.com/questions/611410",
"https://superuser.com",
"https://superuser.com/users/3021/"
] | You could define your own using map. To define z as the command for example:
```
:map z i<CTRL+m>
``` | You can record a macro:
in normal mode type "q+" to start the record.
press "i", the macro you want to record.
then press "q" again to stop recording.
to use the macro go to normal mode and type "@+letter".
in my case I used the "b" to use this macro:
to record type in normal mode "qbiq"
to use type in normal mode "... |
31,433,230 | We need to adapt a huge number of existing traces, printf-like, to LTTNG. One of the issues we are foreseeing is that we will need a catch-all tracepoint with the format of args plus a char\* string. We are trying to find a way to avoid having to compose the string before calling the LTTNG tracepoint. Is there any way ... | 2015/07/15 | [
"https://Stackoverflow.com/questions/31433230",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5119826/"
] | Use `tracepoint_enabled()` and `do_tracepoint()` macros as following, code copied from [man page](https://github.com/lttng/lttng-ust/blob/9493af145a30229f5369c9d902b1badc0ce7deba/doc/man/lttng-ust.3):
```
if (tracepoint_enabled(ust_tests_hello, tptest)) {
/* prepare arguments */
do_tracepoint(ust_tests_hello, ... | You could technically query the status of the tracing session through [liblttng-ctl](http://lttng.org/docs/#doc-liblttng-ctl-lttng). However if your goal is to improve performance, I am not sure doing a lookup through this library every time you hit a tracepoint will be more efficient than a string formatting. You woul... |
17,876,473 | I am using C#. I need time slots to be inserted in database at the interval of 15 min (from 7am to 10pm). I have used this code:
```
for (int i = 0; i < 61; i++){
TimeSpan curtime = new TimeSpan(7, y, 00);
y=y+15;}
```
But this returns me the slots in 24 hrs i.e from 7:00:00 to 22:00:... | 2013/07/26 | [
"https://Stackoverflow.com/questions/17876473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1451610/"
] | A [DateTime column in a database](http://www.sql-server-performance.com/2004/datetime-datatype/) (as for SQL Server) is stored as a pair of four byte numeric value where the first 4 bytes are the number of days from a specific base time (1900/1/1) and the second four bytes are the number of milliseconds from midnight. ... | The DateTime <http://msdn.microsoft.com/en-us/library/system.datetime.aspx> structure will be helpful , because TimeSpan <http://msdn.microsoft.com/en-us/library/system.timespan.aspx> represents a time interval not a time of day
Else try this out
```
var time = DateTime.ParseExact("17:00", "HH:mm", null).ToString("h... |
17,876,473 | I am using C#. I need time slots to be inserted in database at the interval of 15 min (from 7am to 10pm). I have used this code:
```
for (int i = 0; i < 61; i++){
TimeSpan curtime = new TimeSpan(7, y, 00);
y=y+15;}
```
But this returns me the slots in 24 hrs i.e from 7:00:00 to 22:00:... | 2013/07/26 | [
"https://Stackoverflow.com/questions/17876473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1451610/"
] | A [DateTime column in a database](http://www.sql-server-performance.com/2004/datetime-datatype/) (as for SQL Server) is stored as a pair of four byte numeric value where the first 4 bytes are the number of days from a specific base time (1900/1/1) and the second four bytes are the number of milliseconds from midnight. ... | you can use some thing like
```
Datetime.Now.AddMinutes(15)
```
replase DateTime.Now with your variale |
17,876,473 | I am using C#. I need time slots to be inserted in database at the interval of 15 min (from 7am to 10pm). I have used this code:
```
for (int i = 0; i < 61; i++){
TimeSpan curtime = new TimeSpan(7, y, 00);
y=y+15;}
```
But this returns me the slots in 24 hrs i.e from 7:00:00 to 22:00:... | 2013/07/26 | [
"https://Stackoverflow.com/questions/17876473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1451610/"
] | A [DateTime column in a database](http://www.sql-server-performance.com/2004/datetime-datatype/) (as for SQL Server) is stored as a pair of four byte numeric value where the first 4 bytes are the number of days from a specific base time (1900/1/1) and the second four bytes are the number of milliseconds from midnight. ... | A `TimeSpan` is for a duration, you should use a `DateTime` (and the [DateTime.ToString(String)](http://msdn.microsoft.com/en-us/library/zdtaw1bw.aspx) method) if you want to format the Output in 12-hour-format |
1,274,710 | I am using accordion menu on an e-commerce site. The menu stays open with the options until the product page. On that page I am trying to use the breadcrumbs to match text in the menu and then apply a class to open the menu to the correct category for the page.
Here is my code:
```
$(document).ready(function(){
var ... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | ```
$('ul#accordion a').filter(':contains(' + bctext + ')'
```
is now preferred to the [deprecated](http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality)
```
$('ul#accordion a').contains(bctext);
```
(as commented by Crescent Fresh) | This is a **special-character-save** version, that uses **filter** instead of the deprecated **contains** method.
`$('ul#accordion a').filter(function () { return $(this).text() == bctext; })` |
1,274,710 | I am using accordion menu on an e-commerce site. The menu stays open with the options until the product page. On that page I am trying to use the breadcrumbs to match text in the menu and then apply a class to open the menu to the correct category for the page.
Here is my code:
```
$(document).ready(function(){
var ... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Try:
```
$('ul#accordion a:contains(' + bctext + ')')
``` | ```
$('ul#accordion a').filter(':contains(' + bctext + ')'
```
is now preferred to the [deprecated](http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality)
```
$('ul#accordion a').contains(bctext);
```
(as commented by Crescent Fresh) |
1,274,710 | I am using accordion menu on an e-commerce site. The menu stays open with the options until the product page. On that page I am trying to use the breadcrumbs to match text in the menu and then apply a class to open the menu to the correct category for the page.
Here is my code:
```
$(document).ready(function(){
var ... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You could use [Traversing/contains](http://docs.jquery.com/Traversing/contains) also:
```
$('ul#accordion a').contains(bctext);
``` | Change:
```
$('ul#accordion a:contains(bctext)').parent().parent().addClass('special');
```
to:
```
$('ul#accordion a:contains(' + bctext + ')').parent().parent().addClass('special');
```
The first way, the way you had it, is telling JavaScript to use the string 'bctext' as the contains parameter. What you actual... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.