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 |
|---|---|---|---|---|---|
10,563,177 | I am trying to search if char from alpabet array is equal to the textCharArray's element. And if so do some math: char number from alphabet to add to arrayList value. But I getting an error:
**java.lang.ArrayIndexOutOfBoundsException**
The problem should be in for cicles. But I don't know how to fix it corectly.
The ... | 2012/05/12 | [
"https://Stackoverflow.com/questions/10563177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1319195/"
] | I would recommend reading the [PythonSoftwareFoundationFAQ](http://wiki.python.org/moin/PythonSoftwareFoundationLicenseFaq#If_I_bundle_Python_with_my_application.2C_what_do_I_need_to_include_in_my_software_and.2BAC8-or_printed_documentation.3F). This is probably what you are looking for:
>
> You must retain all copyr... | I'm not a lawyer, but just on common sense I'm pretty sure that when you're distributing a big collection of copyrighted documents covered by numerous licenses that you would have to clearly communicate what licenses cover what documents in order for the licensees to know what license conditions they have to adhere to.... |
3,992,187 | An example of what I'm talking about is similar to Google Calendar. When a new recurring task is created.
After creating the recurring task "template" - which all of the individual tasks are based on, do you create all of the individual tasks and store them in the database? or do you just store the "template" recurri... | 2010/10/21 | [
"https://Stackoverflow.com/questions/3992187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/367657/"
] | I went through the same problem a while back and instead of reinventing the wheel, I used Google Calendar APIs. (http://code.google.com/apis/calendar/data/2.0/developers\_guide.html)
You create a Google Account and access the calendar information. There are APIs to create/edit/delete a recurring entry. Also, you can s... | >
> If the user requests a "month" view, and you want to display all of the events/tasks, it seems like creating the output in real time from the template, and including all of the exceptions would be a lot more resource intensive then if each individual recurring tasks was created from the template and inserted into ... |
3,992,187 | An example of what I'm talking about is similar to Google Calendar. When a new recurring task is created.
After creating the recurring task "template" - which all of the individual tasks are based on, do you create all of the individual tasks and store them in the database? or do you just store the "template" recurri... | 2010/10/21 | [
"https://Stackoverflow.com/questions/3992187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/367657/"
] | Store it all in the database.
You want to have a "Task Template" table and a "Task" table where there is a one->many relationship.
When the user indicates they want a task to reoccur, create a "Task Template" record and then create as many "Tasks" as the user has indicated (don't allow a user to create tasks too far ... | >
> If the user requests a "month" view, and you want to display all of the events/tasks, it seems like creating the output in real time from the template, and including all of the exceptions would be a lot more resource intensive then if each individual recurring tasks was created from the template and inserted into ... |
3,992,187 | An example of what I'm talking about is similar to Google Calendar. When a new recurring task is created.
After creating the recurring task "template" - which all of the individual tasks are based on, do you create all of the individual tasks and store them in the database? or do you just store the "template" recurri... | 2010/10/21 | [
"https://Stackoverflow.com/questions/3992187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/367657/"
] | For recurring events I did the following a while back:
1. When a user entered an event I stored the event's date pattern GNU date style - the keyword for PHP is [relative date formats](http://www.php.net/manual/de/datetime.formats.relative.php).
2. Then I started off by creating events for e.g. the next year. And crea... | >
> If the user requests a "month" view, and you want to display all of the events/tasks, it seems like creating the output in real time from the template, and including all of the exceptions would be a lot more resource intensive then if each individual recurring tasks was created from the template and inserted into ... |
3,992,187 | An example of what I'm talking about is similar to Google Calendar. When a new recurring task is created.
After creating the recurring task "template" - which all of the individual tasks are based on, do you create all of the individual tasks and store them in the database? or do you just store the "template" recurri... | 2010/10/21 | [
"https://Stackoverflow.com/questions/3992187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/367657/"
] | Store it all in the database.
You want to have a "Task Template" table and a "Task" table where there is a one->many relationship.
When the user indicates they want a task to reoccur, create a "Task Template" record and then create as many "Tasks" as the user has indicated (don't allow a user to create tasks too far ... | I went through the same problem a while back and instead of reinventing the wheel, I used Google Calendar APIs. (http://code.google.com/apis/calendar/data/2.0/developers\_guide.html)
You create a Google Account and access the calendar information. There are APIs to create/edit/delete a recurring entry. Also, you can s... |
3,992,187 | An example of what I'm talking about is similar to Google Calendar. When a new recurring task is created.
After creating the recurring task "template" - which all of the individual tasks are based on, do you create all of the individual tasks and store them in the database? or do you just store the "template" recurri... | 2010/10/21 | [
"https://Stackoverflow.com/questions/3992187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/367657/"
] | For recurring events I did the following a while back:
1. When a user entered an event I stored the event's date pattern GNU date style - the keyword for PHP is [relative date formats](http://www.php.net/manual/de/datetime.formats.relative.php).
2. Then I started off by creating events for e.g. the next year. And crea... | I went through the same problem a while back and instead of reinventing the wheel, I used Google Calendar APIs. (http://code.google.com/apis/calendar/data/2.0/developers\_guide.html)
You create a Google Account and access the calendar information. There are APIs to create/edit/delete a recurring entry. Also, you can s... |
3,992,187 | An example of what I'm talking about is similar to Google Calendar. When a new recurring task is created.
After creating the recurring task "template" - which all of the individual tasks are based on, do you create all of the individual tasks and store them in the database? or do you just store the "template" recurri... | 2010/10/21 | [
"https://Stackoverflow.com/questions/3992187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/367657/"
] | Store it all in the database.
You want to have a "Task Template" table and a "Task" table where there is a one->many relationship.
When the user indicates they want a task to reoccur, create a "Task Template" record and then create as many "Tasks" as the user has indicated (don't allow a user to create tasks too far ... | For recurring events I did the following a while back:
1. When a user entered an event I stored the event's date pattern GNU date style - the keyword for PHP is [relative date formats](http://www.php.net/manual/de/datetime.formats.relative.php).
2. Then I started off by creating events for e.g. the next year. And crea... |
43,342,354 | I want to connect to database from my c# windows forms application. I tried using
```
using(SqlConnection conn = new SqlConnection()) {
conn.ConnectionString = "Data Source=localhost; User Id=root; Password=; Initial Catalog=dbName";
conn.Open();
}
```
and when I build my project I get an error that `server wasn'... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43342354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4043273/"
] | You're trying to connect to Microsoft SQL Server.
```
using System;
using System.Data;
using MySql.Data;
using MySql.Data.MySqlClient;
public class Tutorial1
{
public static void Main()
{
string connStr = "server=localhost;user=root;database=world;port=3306;password=******;";
MySqlConnection ... | You would need to use a `MySqlConnection` to connect to a MySQL database, see answer here
[How to connect to MySQL Database?](https://stackoverflow.com/questions/21618015/how-to-connect-to-mysql-database) |
26,715,112 | I have a button which is added dynamically
```
<button id="btnSubmit">Button 1</button>
$(document).ready(function(){
$('#btnSubmit').on('click', function(){
alert('Button 1');
var button2 = '<button id="btn2" >Button 2</button>';
$('#btnSubmit').after('<p></p>' + button2);
});... | 2014/11/03 | [
"https://Stackoverflow.com/questions/26715112",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/544079/"
] | You are adding `btn2` for every click of `btnSubmit`, this will create multiple buttons with same `id` and it is not acceptible with jQuery.
Use unique `id` or `class` for every dynamic button adde, and use `.on()` to bind click event to button, see below code
HTML
```
<button id="btnSubmit">Button 1</button>
```
... | ```
$(document).ready(function(){
$('#btnSubmit').on('click', function(){
alert('Button 1');
var button2 = '<button id="btn2" >Button 2</button>';
$('#btnSubmit').after('<p></p>' + button2);
$(document).bind('#btn2', 'click', function(){
alert('Button2 clicked');
});
});
});
```
try this code ... |
13,262,804 | How to organize a file downloading from server database and open it on the client machine?
my code works only when the page is opened on the server:
```
OracleCommand oracleCom = new OracleCommand();
oracleCom.Connection = oraConnect;
oracleCom.CommandText = "Select m_content, f_extension From... | 2012/11/07 | [
"https://Stackoverflow.com/questions/13262804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1555931/"
] | I don't know if this is still an issue for you but I had a similar problem and found that I had not decorated one of my DTOs with `[DataContract]` and `[DataMember]` attributes, as described on the [SOAP Support wiki page](https://github.com/ServiceStack/ServiceStack/wiki/SOAP-support). Once you have added these to you... | Have a look at using `[DataContract (Namespace = "YOUR NAMESPACE")]` on top of your DTO's. This is how my objects are referenced.
```
[DataContract(Namespace = "My.WS.DTO")]
public class Account{
}
```
I also use this in my service model. [System.ServiceModel.ServiceContract()] and [System.ServiceModel.OperationCon... |
13,262,804 | How to organize a file downloading from server database and open it on the client machine?
my code works only when the page is opened on the server:
```
OracleCommand oracleCom = new OracleCommand();
oracleCom.Connection = oraConnect;
oracleCom.CommandText = "Select m_content, f_extension From... | 2012/11/07 | [
"https://Stackoverflow.com/questions/13262804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1555931/"
] | I don't know if this is still an issue for you but I had a similar problem and found that I had not decorated one of my DTOs with `[DataContract]` and `[DataMember]` attributes, as described on the [SOAP Support wiki page](https://github.com/ServiceStack/ServiceStack/wiki/SOAP-support). Once you have added these to you... | I know this is an old question, but I had to add SOAP support for a 3rd party that refused to support REST very recently to my ServiceStack implementation so it could still be relevant to other people still having this issue.
I had the same issue you were having:
>
> Unable to import binding 'BasicHttpBinding\_ISync... |
4,164,820 | Suppose we need to embed a widget in third party page. This widget might use jquery for instance so widget carries a jquery library with itself.
Suppose third party page also uses jquery but a different version.
How to prevent clash between them when embedding widgets? jquery.noConflict is not an option because it's re... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/82189/"
] | Actually, I think [jQuery.noConflict](http://api.jquery.com/jQuery.noConflict/) is precisely what you want to use. If I understand its [implementation](https://github.com/jquery/jquery/blob/master/src/core.js#L376) correctly, your code should look like this:
```
(function () {
var my$;
// your copy of the minified jQ... | Instead of looking for methods like no conflict, you can very well call full URL of the Google API on jQuery so that it can work in the application. |
4,164,820 | Suppose we need to embed a widget in third party page. This widget might use jquery for instance so widget carries a jquery library with itself.
Suppose third party page also uses jquery but a different version.
How to prevent clash between them when embedding widgets? jquery.noConflict is not an option because it's re... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/82189/"
] | `Function(...)` makes an eval inside your function, it isn't any better.
Why not use the `iframe` they provide a default sandboxing for third party content.
And for friendly ones you can share text data, between them and your page, using `parent.postMessage` for modern browser or the `window.name` hack for the olders... | Instead of looking for methods like no conflict, you can very well call full URL of the Google API on jQuery so that it can work in the application. |
4,164,820 | Suppose we need to embed a widget in third party page. This widget might use jquery for instance so widget carries a jquery library with itself.
Suppose third party page also uses jquery but a different version.
How to prevent clash between them when embedding widgets? jquery.noConflict is not an option because it's re... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/82189/"
] | I built a library to solve this very problem. I am not sure if it will help you of course, because the code still has to be aware of the problem and use the library in the first place, so it will help only if you are able to change your code to use the library.
The library in question is called [Packages JS](http://pa... | Instead of looking for methods like no conflict, you can very well call full URL of the Google API on jQuery so that it can work in the application. |
4,164,820 | Suppose we need to embed a widget in third party page. This widget might use jquery for instance so widget carries a jquery library with itself.
Suppose third party page also uses jquery but a different version.
How to prevent clash between them when embedding widgets? jquery.noConflict is not an option because it's re... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/82189/"
] | Actually, I think [jQuery.noConflict](http://api.jquery.com/jQuery.noConflict/) is precisely what you want to use. If I understand its [implementation](https://github.com/jquery/jquery/blob/master/src/core.js#L376) correctly, your code should look like this:
```
(function () {
var my$;
// your copy of the minified jQ... | I built a library to solve this very problem. I am not sure if it will help you of course, because the code still has to be aware of the problem and use the library in the first place, so it will help only if you are able to change your code to use the library.
The library in question is called [Packages JS](http://pa... |
4,164,820 | Suppose we need to embed a widget in third party page. This widget might use jquery for instance so widget carries a jquery library with itself.
Suppose third party page also uses jquery but a different version.
How to prevent clash between them when embedding widgets? jquery.noConflict is not an option because it's re... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/82189/"
] | Actually, I think [jQuery.noConflict](http://api.jquery.com/jQuery.noConflict/) is precisely what you want to use. If I understand its [implementation](https://github.com/jquery/jquery/blob/master/src/core.js#L376) correctly, your code should look like this:
```
(function () {
var my$;
// your copy of the minified jQ... | ```
<script src="myjquery.min.js"></script>
<script>window.myjQuery = window.jQuery.noConflict();</script>
...
<script src='...'></script> //another widget using an old versioned jquery
<script>
(function($){
//...
//now you can access your own jquery here, without conflict
})(window.myjQuery);
delete window.my... |
4,164,820 | Suppose we need to embed a widget in third party page. This widget might use jquery for instance so widget carries a jquery library with itself.
Suppose third party page also uses jquery but a different version.
How to prevent clash between them when embedding widgets? jquery.noConflict is not an option because it's re... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/82189/"
] | `Function(...)` makes an eval inside your function, it isn't any better.
Why not use the `iframe` they provide a default sandboxing for third party content.
And for friendly ones you can share text data, between them and your page, using `parent.postMessage` for modern browser or the `window.name` hack for the olders... | I built a library to solve this very problem. I am not sure if it will help you of course, because the code still has to be aware of the problem and use the library in the first place, so it will help only if you are able to change your code to use the library.
The library in question is called [Packages JS](http://pa... |
4,164,820 | Suppose we need to embed a widget in third party page. This widget might use jquery for instance so widget carries a jquery library with itself.
Suppose third party page also uses jquery but a different version.
How to prevent clash between them when embedding widgets? jquery.noConflict is not an option because it's re... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/82189/"
] | `Function(...)` makes an eval inside your function, it isn't any better.
Why not use the `iframe` they provide a default sandboxing for third party content.
And for friendly ones you can share text data, between them and your page, using `parent.postMessage` for modern browser or the `window.name` hack for the olders... | ```
<script src="myjquery.min.js"></script>
<script>window.myjQuery = window.jQuery.noConflict();</script>
...
<script src='...'></script> //another widget using an old versioned jquery
<script>
(function($){
//...
//now you can access your own jquery here, without conflict
})(window.myjQuery);
delete window.my... |
4,164,820 | Suppose we need to embed a widget in third party page. This widget might use jquery for instance so widget carries a jquery library with itself.
Suppose third party page also uses jquery but a different version.
How to prevent clash between them when embedding widgets? jquery.noConflict is not an option because it's re... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4164820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/82189/"
] | I built a library to solve this very problem. I am not sure if it will help you of course, because the code still has to be aware of the problem and use the library in the first place, so it will help only if you are able to change your code to use the library.
The library in question is called [Packages JS](http://pa... | ```
<script src="myjquery.min.js"></script>
<script>window.myjQuery = window.jQuery.noConflict();</script>
...
<script src='...'></script> //another widget using an old versioned jquery
<script>
(function($){
//...
//now you can access your own jquery here, without conflict
})(window.myjQuery);
delete window.my... |
372,771 | I have a grid I would like to make some changes to it but have no idea.
My minimal example:
```
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\draw[step=2cm,color=gray,rotate=45] (-1,-1) grid (9,9);
\node at (-0.5,+0.5) {A};
\end{t... | 2017/06/01 | [
"https://tex.stackexchange.com/questions/372771",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/120078/"
] | The question is not very clear. I was preparing this solution, when I saw that marsupilam already aswered something very similar. The main difference in my solution is the inclusion of a `\path[clip]` to remove the unwanted parts:
```
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{ti... | Welcome to TeX.SX !
Edited version
--------------
### The output
Closer to your pic. Is this better ?
[](https://i.stack.imgur.com/pVjnA.png)
### The code
```
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{calc}
\begin{document}
... |
372,771 | I have a grid I would like to make some changes to it but have no idea.
My minimal example:
```
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\draw[step=2cm,color=gray,rotate=45] (-1,-1) grid (9,9);
\node at (-0.5,+0.5) {A};
\end{t... | 2017/06/01 | [
"https://tex.stackexchange.com/questions/372771",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/120078/"
] | The question is not very clear. I was preparing this solution, when I saw that marsupilam already aswered something very similar. The main difference in my solution is the inclusion of a `\path[clip]` to remove the unwanted parts:
```
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{ti... | Update
------
With clip, and no coordinate label
```
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\path[clip] (-10,-4) rectangle +(8,8);
\begin{scope}[rotate=45]
\draw[step=4cm,color=blue, thick] (-15,-15) grid (9,9);
\draw[st... |
52,305,417 | I have succeeded in cobbling together pieces of code that achieve my goal. However, I would like some advice from more advanced vanilla JS programmers on how I can go about reaching my goal in a better way.
To start, I want to introduce my problem. I have a piece of text on my website where a portion is designed to c... | 2018/09/13 | [
"https://Stackoverflow.com/questions/52305417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5791718/"
] | You can implement the same logic using recursion.
```
function recursify(phrases, index = 0) {
header_txt.textContent = phrases[index];
setTimeout(function () {
recursify(phrases, index < phrases.length - 1 ? index + 1 : 0);
}, 300)
}
recursify(header_phrases);
```
The function 'recursify' will ... | If I understand your requirement correctly, you want top populate an element from an array of values.
A simple way to do this is:
```
doLoop();
function doLoop() {
var phraseNo=0;
setTimeout(next,21000);
next();
function next() {
header_txt.textContent = header_phrases[phraseNo++];
if... |
52,305,417 | I have succeeded in cobbling together pieces of code that achieve my goal. However, I would like some advice from more advanced vanilla JS programmers on how I can go about reaching my goal in a better way.
To start, I want to introduce my problem. I have a piece of text on my website where a portion is designed to c... | 2018/09/13 | [
"https://Stackoverflow.com/questions/52305417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5791718/"
] | You can implement the same logic using recursion.
```
function recursify(phrases, index = 0) {
header_txt.textContent = phrases[index];
setTimeout(function () {
recursify(phrases, index < phrases.length - 1 ? index + 1 : 0);
}, 300)
}
recursify(header_phrases);
```
The function 'recursify' will ... | this is assuming that `header_txt` and `header_phrases` are not global vars. using global vars isn't a good idea.
```
var repeatIn = 3000;
phraseUpdater();
function phraseUpdater() {
var updateCount = 0,
phrasesCount = header_phrases.length;
setHeader();
setTimeout(setHeader, repeatIn);
func... |
73,194,227 | How can I get printed console object value to HTML?
I have JavaScript fetch code like this:
```
const comments = fetch("https://api.github.com/repos/pieceofdiy/comments/issues/1")
.then((response) => response.json())
.then((labels) => {
return labels.comments;
});
const printComments = () => {
comments.t... | 2022/08/01 | [
"https://Stackoverflow.com/questions/73194227",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19666472/"
] | You can put the class into a factory function:
```py
def make_DDN(Base):
class DDN(Base):
def other_methods(self):
...
return DDN
```
Now you can make new classes:
`DDN1 = make_DDN(BN)`
etc | The working field of your program is unclear to me, and it is unclear what objects and their methods should be able to do, so this is a suggestion, not an answer. But it's too big for a comment.
```
class BN:
def method(self):
return self.data*2
class QBN(BN):
def method(self,classic=False):
... |
19,177,967 | the format is:
19 digits followed by an underscore followed by 4 digits ,followed by an underscore ,followed by 1 digit, followed by an underscore, followed by 1 capital letter, followed by an underscore, followed by 4 digits, followed by a dash, followed by 2 digits, followed by a dash, followed by 2 digits, followed... | 2013/10/04 | [
"https://Stackoverflow.com/questions/19177967",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2845977/"
] | `\d{19}_\d{4}_\d_[A-Z]_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}\.db`
<http://gskinner.com/RegExr/> - a website to test your RegEx
but I noticed that for example, in the middle you have sth like `_0002_`
Do you accept any 4 digits or those that start with "000"? | ```
\d{19}_\d{4}_\d_[A-Z]_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}\.db
```
This one also does a **basic** check on the date/time part (assuming date YYYY-MM-DD):
```
\d{19}_\d{4}_\d_[A-Z]_\d{4}-(0(?!0)|1(?=[0-2]))\d-(0(?!0)|[1-2]|3(?=[0-1]))\d_([0-1]|2(?=[0-3]))\d(-[0-5]\d){2}\.db
```
**Basic** check means you can stil... |
19,177,967 | the format is:
19 digits followed by an underscore followed by 4 digits ,followed by an underscore ,followed by 1 digit, followed by an underscore, followed by 1 capital letter, followed by an underscore, followed by 4 digits, followed by a dash, followed by 2 digits, followed by a dash, followed by 2 digits, followed... | 2013/10/04 | [
"https://Stackoverflow.com/questions/19177967",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2845977/"
] | `\d{19}_\d{4}_\d_[A-Z]_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}\.db`
<http://gskinner.com/RegExr/> - a website to test your RegEx
but I noticed that for example, in the middle you have sth like `_0002_`
Do you accept any 4 digits or those that start with "000"? | Based on your data:
```
\d{19}_0+\d_0_(V|E)?_(-?(\d{2}|\d{4}))+_(-?\d{2})+\.db
```
If seeking more generic:
```
\d{19}_\d+_\d_[A-Z]?_\d{4}(-\d{2}){2}_(-?\d{2})+\.db
```
HTH
EDIT: On a side note, I would rather split this string with `_`, and then validate each section individually based on some pattern and/or pr... |
15,922 | I need to change the content within a `[count]` number of braces for each line in my buffer.
```
1 {Lorem} ipsum dolor {amet} blah blah {change this text} more blah blah
2 Hello. The {sun} rises in {the} east. blah {blah}. {also change this text}. final blah
```
In `line 1`, I need to substitute the content within t... | 2018/04/14 | [
"https://vi.stackexchange.com/questions/15922",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/8408/"
] | The [answer from @RubenWesterberg](https://vi.stackexchange.com/posts/15923/edit) is a correct sequence of Normal mode commands to do what you want. But I read your request to not move the cursor a little more literally. Also, if you need to make substitutions like this frequently you probably want something a bit less... | Execute the following in normal mode on the first line:
```
2f{ci{REPLACEMENT_TEXT<ESC>0
```
This will find the target brace, change the content to REPLACEMENT\_TEXT and then return the cursor back to the beginning of the line.
For the second line:
```
4f{ci{REPLACEMENT_TEXT<ESC>0
```
Note that the exact number ... |
31,914,083 | I want to know is there any way to connect my android app with MS SQL Server 2012 and retrieve data from there instead of using `phpmyAdmin.` i know same type of question has been asked already but that was not clear and answers were not helpful as well. i'm searching for full tutorial as I'm pretty new to this thing. ... | 2015/08/10 | [
"https://Stackoverflow.com/questions/31914083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4627060/"
] | You should use radiobuttons in this way.
```css
body {
font-family: sans-serif;
font-weight: normal;
margin: 10px;
color: #999;
background-color: #eee;
}
form {
margin: 40px 0;
}
div {
clear: both;
margin: 0 50px;
}
label {
width: 200px;
border-radius: 3px;
border: 1px solid #D1D3D4
... | `Button` are used for buttons
```
<div class="btn-group btn-group-lg">
<input type="radio" class="btn btn-primary" value="Apple" name="radio"> Apple
<input type="radio" class="btn btn-primary" value= "Samsung" name="radio"> Samsung
<input type="radio" class="btn btn-primary" value "Sony"... |
31,914,083 | I want to know is there any way to connect my android app with MS SQL Server 2012 and retrieve data from there instead of using `phpmyAdmin.` i know same type of question has been asked already but that was not clear and answers were not helpful as well. i'm searching for full tutorial as I'm pretty new to this thing. ... | 2015/08/10 | [
"https://Stackoverflow.com/questions/31914083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4627060/"
] | This seems to be exactly what are you searching for.
```
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="options" id="option1" checked> Apple
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Samsung
... | You should use radiobuttons in this way.
```css
body {
font-family: sans-serif;
font-weight: normal;
margin: 10px;
color: #999;
background-color: #eee;
}
form {
margin: 40px 0;
}
div {
clear: both;
margin: 0 50px;
}
label {
width: 200px;
border-radius: 3px;
border: 1px solid #D1D3D4
... |
31,914,083 | I want to know is there any way to connect my android app with MS SQL Server 2012 and retrieve data from there instead of using `phpmyAdmin.` i know same type of question has been asked already but that was not clear and answers were not helpful as well. i'm searching for full tutorial as I'm pretty new to this thing. ... | 2015/08/10 | [
"https://Stackoverflow.com/questions/31914083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4627060/"
] | You should use radiobuttons in this way.
```css
body {
font-family: sans-serif;
font-weight: normal;
margin: 10px;
color: #999;
background-color: #eee;
}
form {
margin: 40px 0;
}
div {
clear: both;
margin: 0 50px;
}
label {
width: 200px;
border-radius: 3px;
border: 1px solid #D1D3D4
... | For Bootstrap 4:
```
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary active">
<input type="radio" name="options" id="option1" autocomplete="off" checked> Active
</label>
<label class="btn btn-secondary">
<input type="radio" name="options" id="option2" autoco... |
31,914,083 | I want to know is there any way to connect my android app with MS SQL Server 2012 and retrieve data from there instead of using `phpmyAdmin.` i know same type of question has been asked already but that was not clear and answers were not helpful as well. i'm searching for full tutorial as I'm pretty new to this thing. ... | 2015/08/10 | [
"https://Stackoverflow.com/questions/31914083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4627060/"
] | This seems to be exactly what are you searching for.
```
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="options" id="option1" checked> Apple
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Samsung
... | `Button` are used for buttons
```
<div class="btn-group btn-group-lg">
<input type="radio" class="btn btn-primary" value="Apple" name="radio"> Apple
<input type="radio" class="btn btn-primary" value= "Samsung" name="radio"> Samsung
<input type="radio" class="btn btn-primary" value "Sony"... |
31,914,083 | I want to know is there any way to connect my android app with MS SQL Server 2012 and retrieve data from there instead of using `phpmyAdmin.` i know same type of question has been asked already but that was not clear and answers were not helpful as well. i'm searching for full tutorial as I'm pretty new to this thing. ... | 2015/08/10 | [
"https://Stackoverflow.com/questions/31914083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4627060/"
] | For Bootstrap 4:
```
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary active">
<input type="radio" name="options" id="option1" autocomplete="off" checked> Active
</label>
<label class="btn btn-secondary">
<input type="radio" name="options" id="option2" autoco... | `Button` are used for buttons
```
<div class="btn-group btn-group-lg">
<input type="radio" class="btn btn-primary" value="Apple" name="radio"> Apple
<input type="radio" class="btn btn-primary" value= "Samsung" name="radio"> Samsung
<input type="radio" class="btn btn-primary" value "Sony"... |
31,914,083 | I want to know is there any way to connect my android app with MS SQL Server 2012 and retrieve data from there instead of using `phpmyAdmin.` i know same type of question has been asked already but that was not clear and answers were not helpful as well. i'm searching for full tutorial as I'm pretty new to this thing. ... | 2015/08/10 | [
"https://Stackoverflow.com/questions/31914083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4627060/"
] | This seems to be exactly what are you searching for.
```
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="options" id="option1" checked> Apple
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Samsung
... | For Bootstrap 4:
```
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary active">
<input type="radio" name="options" id="option1" autocomplete="off" checked> Active
</label>
<label class="btn btn-secondary">
<input type="radio" name="options" id="option2" autoco... |
2,941,351 | 1. Suppose that **$f: A→B$** and **$g:B→C$** are functions such that **$g◦f$** is *injective*. **Prove** that **$f$** must be *injective.*
2. Construct a *bijective* function $f:R→ (R\setminus \{0\})$. **Prove** that your function is actually a *bijective* function.
Can someone help me on how do I prove it? | 2018/10/03 | [
"https://math.stackexchange.com/questions/2941351",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/584006/"
] | Set $x=-1+h\;$ ($h\to 0$) and use the binomial approximation:
* $\sqrt[3]{1+2(-1+h)}+1=1-\sqrt[3]{1-2h}=1-\bigl(1-\frac23 h+o(h)\bigl)=\frac23 h+o(h)$,
* $\sqrt{2+(-1+h)}-1+h=\sqrt{1+h}-1+h=1+\frac12h+o(h)-1+h=\frac32h+o(h),$
so $\;\dfrac{\sqrt[3]{1+2x}+1}{\sqrt{2+x} + x}=\dfrac{\frac23 h+o(h)}{\frac32h+o(h)})=\dfrac{... | L'Hospital works:
$$\lim\_{x\to{-1}} \frac{\sqrt[3]{1+2x}+1}{\sqrt{2+x} + x}=\lim\_{x\to{-1}} \frac{\dfrac2{3(\sqrt[3]{1+2x})^2}}{\dfrac1{2\sqrt{2+x}} + 1}=\frac49.$$ |
2,941,351 | 1. Suppose that **$f: A→B$** and **$g:B→C$** are functions such that **$g◦f$** is *injective*. **Prove** that **$f$** must be *injective.*
2. Construct a *bijective* function $f:R→ (R\setminus \{0\})$. **Prove** that your function is actually a *bijective* function.
Can someone help me on how do I prove it? | 2018/10/03 | [
"https://math.stackexchange.com/questions/2941351",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/584006/"
] | Recall the formulas:
$$
\begin{align}
a^2 -b^2 &= (a - b)(a + b)\\
a^3 + b^3 &= (a + b)(a^2 - ab + b^2)
\end{align}
$$
Using them we can get the following:
$$
\begin{align}
\sqrt[3]{1+2x} + 1 &=
\frac{1 + 2x + 1}{{\sqrt[3]{1+2x}}^2 - \sqrt[3]{1+2x} + 1} =
\frac{2(x + 1)}{{\sqrt[3]{1+2x}}^2 - \sqrt[3]{1+2x} + 1} \\
\sq... | L'Hospital works:
$$\lim\_{x\to{-1}} \frac{\sqrt[3]{1+2x}+1}{\sqrt{2+x} + x}=\lim\_{x\to{-1}} \frac{\dfrac2{3(\sqrt[3]{1+2x})^2}}{\dfrac1{2\sqrt{2+x}} + 1}=\frac49.$$ |
67,106,912 | I have a pandas dataframe where 'Column1' and 'Column2' contain lists of words in every row. I need to create a new column with the number of words repeated in Column1's list and Column2's list for every row. For example, in an especific row I could have ['apple', 'banana'] in Column1, ['banana', 'orange'] in Column2, ... | 2021/04/15 | [
"https://Stackoverflow.com/questions/67106912",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14484895/"
] | In the end, the only way I could find to fix the issue is to use the choose element instead of validate-jwt, with custom code (which is what I was hoping to avoid any way). Basically I am saving the validated JWT Token to a variable and then using if / elseif to determine if the token is acceptable. Working relevant co... | As you mentioned the token may contain either the `scp` cllaim or `roles` claim, it seems your token sometimes generated in "Delegated" type and sometimes generated in "Application" type. You just need to configure the `<validate-jwt>` policy like below screenshot, add both of the claims in it and choose "**Any claim**... |
112,580 | I work in the USA and was recently placed on a 90-day performance improvement plan (PIP) with my company. Just shy of my 60-day PIP review, I was terminated. I was only with the company for 7 months, but they very graciously gave me a *3-and-a-half month* severance package with full salary and benefits. That's not a ty... | 2018/05/20 | [
"https://workplace.stackexchange.com/questions/112580",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/66509/"
] | >
> Furthermore, is this appropriate to bring up in future interviews?
>
>
>
No.
Future employers won't care about your severance package.
And you don't really know why you got the severance that you did. It might be because you were an outstanding worker. Or it might just be standard procedure. Future employer... | >
> Furthermore, is this appropriate to bring up in future interviews?
>
>
>
No.
Nobody but your bank manager and your close family care about your severance package.
You can ask why you got the severance package you did - and you should, because it will be educational for you.
At a guess, you worked at Netf... |
112,580 | I work in the USA and was recently placed on a 90-day performance improvement plan (PIP) with my company. Just shy of my 60-day PIP review, I was terminated. I was only with the company for 7 months, but they very graciously gave me a *3-and-a-half month* severance package with full salary and benefits. That's not a ty... | 2018/05/20 | [
"https://workplace.stackexchange.com/questions/112580",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/66509/"
] | >
> Furthermore, is this appropriate to bring up in future interviews?
>
>
>
No.
Future employers won't care about your severance package.
And you don't really know why you got the severance that you did. It might be because you were an outstanding worker. Or it might just be standard procedure. Future employer... | **No**
I know it's been answered already, but just to throw in a new reason for the "No".
If they thought highly of you, they'd keep you on! It's unlikely that they thought you were a bad employee, but such a nice guy that they'd give you a nice golden parachute unless you happened to be great friends with/have some... |
112,580 | I work in the USA and was recently placed on a 90-day performance improvement plan (PIP) with my company. Just shy of my 60-day PIP review, I was terminated. I was only with the company for 7 months, but they very graciously gave me a *3-and-a-half month* severance package with full salary and benefits. That's not a ty... | 2018/05/20 | [
"https://workplace.stackexchange.com/questions/112580",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/66509/"
] | >
> Furthermore, is this appropriate to bring up in future interviews?
>
>
>
No.
Future employers won't care about your severance package.
And you don't really know why you got the severance that you did. It might be because you were an outstanding worker. Or it might just be standard procedure. Future employer... | Short answer, **NO**
Longer answer
This is becoming more and more common of a practice, as it's extending to paying people to quit. [Amazon](http://www.msn.com/en-us/money/companies/why-amazon-pays-employees-dollar5000-to-quit/ar-AAxAqrT?ocid=ientp), for example, sees this as beneficial to the company to get rid of p... |
112,580 | I work in the USA and was recently placed on a 90-day performance improvement plan (PIP) with my company. Just shy of my 60-day PIP review, I was terminated. I was only with the company for 7 months, but they very graciously gave me a *3-and-a-half month* severance package with full salary and benefits. That's not a ty... | 2018/05/20 | [
"https://workplace.stackexchange.com/questions/112580",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/66509/"
] | >
> Furthermore, is this appropriate to bring up in future interviews?
>
>
>
No.
Future employers won't care about your severance package.
And you don't really know why you got the severance that you did. It might be because you were an outstanding worker. Or it might just be standard procedure. Future employer... | If I were a hiring manager and you told me that story, I'd probably assume you must've done something really bad if they're willing to dole out that kind of free money just to get you out the door. I'd say, don't mention the severance or the PIP. Instead just say something like,
>
> "There were some discrepancies be... |
112,580 | I work in the USA and was recently placed on a 90-day performance improvement plan (PIP) with my company. Just shy of my 60-day PIP review, I was terminated. I was only with the company for 7 months, but they very graciously gave me a *3-and-a-half month* severance package with full salary and benefits. That's not a ty... | 2018/05/20 | [
"https://workplace.stackexchange.com/questions/112580",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/66509/"
] | >
> Furthermore, is this appropriate to bring up in future interviews?
>
>
>
No.
Nobody but your bank manager and your close family care about your severance package.
You can ask why you got the severance package you did - and you should, because it will be educational for you.
At a guess, you worked at Netf... | **No**
I know it's been answered already, but just to throw in a new reason for the "No".
If they thought highly of you, they'd keep you on! It's unlikely that they thought you were a bad employee, but such a nice guy that they'd give you a nice golden parachute unless you happened to be great friends with/have some... |
112,580 | I work in the USA and was recently placed on a 90-day performance improvement plan (PIP) with my company. Just shy of my 60-day PIP review, I was terminated. I was only with the company for 7 months, but they very graciously gave me a *3-and-a-half month* severance package with full salary and benefits. That's not a ty... | 2018/05/20 | [
"https://workplace.stackexchange.com/questions/112580",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/66509/"
] | >
> Furthermore, is this appropriate to bring up in future interviews?
>
>
>
No.
Nobody but your bank manager and your close family care about your severance package.
You can ask why you got the severance package you did - and you should, because it will be educational for you.
At a guess, you worked at Netf... | Short answer, **NO**
Longer answer
This is becoming more and more common of a practice, as it's extending to paying people to quit. [Amazon](http://www.msn.com/en-us/money/companies/why-amazon-pays-employees-dollar5000-to-quit/ar-AAxAqrT?ocid=ientp), for example, sees this as beneficial to the company to get rid of p... |
112,580 | I work in the USA and was recently placed on a 90-day performance improvement plan (PIP) with my company. Just shy of my 60-day PIP review, I was terminated. I was only with the company for 7 months, but they very graciously gave me a *3-and-a-half month* severance package with full salary and benefits. That's not a ty... | 2018/05/20 | [
"https://workplace.stackexchange.com/questions/112580",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/66509/"
] | >
> Furthermore, is this appropriate to bring up in future interviews?
>
>
>
No.
Nobody but your bank manager and your close family care about your severance package.
You can ask why you got the severance package you did - and you should, because it will be educational for you.
At a guess, you worked at Netf... | If I were a hiring manager and you told me that story, I'd probably assume you must've done something really bad if they're willing to dole out that kind of free money just to get you out the door. I'd say, don't mention the severance or the PIP. Instead just say something like,
>
> "There were some discrepancies be... |
112,580 | I work in the USA and was recently placed on a 90-day performance improvement plan (PIP) with my company. Just shy of my 60-day PIP review, I was terminated. I was only with the company for 7 months, but they very graciously gave me a *3-and-a-half month* severance package with full salary and benefits. That's not a ty... | 2018/05/20 | [
"https://workplace.stackexchange.com/questions/112580",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/66509/"
] | Short answer, **NO**
Longer answer
This is becoming more and more common of a practice, as it's extending to paying people to quit. [Amazon](http://www.msn.com/en-us/money/companies/why-amazon-pays-employees-dollar5000-to-quit/ar-AAxAqrT?ocid=ientp), for example, sees this as beneficial to the company to get rid of p... | **No**
I know it's been answered already, but just to throw in a new reason for the "No".
If they thought highly of you, they'd keep you on! It's unlikely that they thought you were a bad employee, but such a nice guy that they'd give you a nice golden parachute unless you happened to be great friends with/have some... |
112,580 | I work in the USA and was recently placed on a 90-day performance improvement plan (PIP) with my company. Just shy of my 60-day PIP review, I was terminated. I was only with the company for 7 months, but they very graciously gave me a *3-and-a-half month* severance package with full salary and benefits. That's not a ty... | 2018/05/20 | [
"https://workplace.stackexchange.com/questions/112580",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/66509/"
] | If I were a hiring manager and you told me that story, I'd probably assume you must've done something really bad if they're willing to dole out that kind of free money just to get you out the door. I'd say, don't mention the severance or the PIP. Instead just say something like,
>
> "There were some discrepancies be... | **No**
I know it's been answered already, but just to throw in a new reason for the "No".
If they thought highly of you, they'd keep you on! It's unlikely that they thought you were a bad employee, but such a nice guy that they'd give you a nice golden parachute unless you happened to be great friends with/have some... |
81,793 | In 2012, Canon introduced remote radio control into its flashes with the introduction of the 600EX-RT speedlite. Canon master/slaves flashes in this system now include:
* 600EX-RT
* 600EX-RT II
* 430EX III-RT
And there's a headless transmitter (master) unit, the ST-E3-RT.
3rd-party speedlights and transmitter/receiv... | 2016/08/09 | [
"https://photo.stackexchange.com/questions/81793",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/27440/"
] | At the time of this writing, Nikon's radio flash system is only in the preliminary stages; it's more the groundwork for a system than an actual system, and is not a practical choice for most current Nikon shooters.
* The only flash in the system is the SB-5000 (released 2016). It is RF slave only.
* The SB-5000 can on... | The Nikon SB-5000 flash and the D500 and D5 cameras support radio. |
81,793 | In 2012, Canon introduced remote radio control into its flashes with the introduction of the 600EX-RT speedlite. Canon master/slaves flashes in this system now include:
* 600EX-RT
* 600EX-RT II
* 430EX III-RT
And there's a headless transmitter (master) unit, the ST-E3-RT.
3rd-party speedlights and transmitter/receiv... | 2016/08/09 | [
"https://photo.stackexchange.com/questions/81793",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/27440/"
] | At the time of this writing, Nikon's radio flash system is only in the preliminary stages; it's more the groundwork for a system than an actual system, and is not a practical choice for most current Nikon shooters.
* The only flash in the system is the SB-5000 (released 2016). It is RF slave only.
* The SB-5000 can on... | As of 1/2018 there is still no transmitter for the SB-5000 flashes. Even with firmware updates to include other cameras like the D810 that I own a pair of, they will not pair with the WR-R10 on the D810. Nikon said it is because the body does not have built in radio, but that is the reason why one would buy a WR-R10/A1... |
2,481,804 | Let $C\_p([0,1])$ denote the set of continuous functions $[0,1]\to\mathbb R$ with the subspace topology coming from the product $\mathbb R^{[0,1]}.$ The "p" stands for pointwise. Is this space a continuous image of $\mathbb R$?
---
Some observations:
* $C\_p([0,1])$ is not locally compact
* To be an image of $\mathb... | 2017/10/20 | [
"https://math.stackexchange.com/questions/2481804",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/467147/"
] | Hint: use this$x^TAx=(x^TAx)^T=x^TA^Tx=-x^TAx$.
$x^TAx=(x^TAx)^T$ since $x^TAx$ is a scalar. | a classic exercise :$A$ real $n\times n$ antisymmetric if and only if $x^TAx=0$ for all $x\in {\mathbb{R}}^n$. One sense is easy the second (the question asked) follows from $x^T(A+A^T)x=0$ for all $x\in {\mathbb{R}}^n$ which means $A+A^T=0$ because it is real symmetric. |
28,381,458 | What is meant by application porting. when iam reading about log4net i came across this line "**Log4Net is an open source a .NET based set of assemblies, ported from the Apache Log4j java classes, to provide a configurable logging framework.**". what is meant by ported from apache log4J.
can any one explain how a sof... | 2015/02/07 | [
"https://Stackoverflow.com/questions/28381458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4449555/"
] | Actually USB Host actually similar with OTG,since we can check the USB Host feature programically, here are my solution,hope this help you.
```
/**
* Check the device whether has USB-HOST feature.
*/
public static boolean hasUsbHostFeature(Context context) {
return context.getPackageManager().hasSystemFeatur... | your **answer** is here : <https://stackoverflow.com/a/34691806/3818437>
add a `<uses-feature>` element to your `manifest`, indicating that you are interested in the `android.hardware.usb.host` feature.
**OR** use `PackageManager, hasSystemFeature(), and FEATURE_USB_HOST`. `FEATURE_USB_HOST` is defined as the same st... |
35,977,064 | I am having a weird problem with intellij. A handful of people in here, had similar issues in the past but none of the proposed solutions worked for me.
So I am trying to view the javadoc for a builtin class(in my example java.io.FileReader) but I am only getting information about the signature, not details about the ... | 2016/03/13 | [
"https://Stackoverflow.com/questions/35977064",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163085/"
] | Looks like Eclipse uses a different approach for the documentation. Also I had a non-fully document API and thats, combined, the reason it was not working.
The solution is as follows: File -> Project structure -> SDKs -> Documentation paths -> Click the add button, with the earth on it -> Add an online documentation ... | `Ctrl + Q`
This assumes you have the JDK (with documentation) downloaded and configured with IntelliJ for the relevant object/class/method.
Edit:
Turned out it was a problem with the Users' JDK.
The JDK source files didn't contain any comments (which IntelliJ uses to show JDK Documentation). This was resolved b... |
80,273 | Let $G\_d$ be the group with the following presentation
$$\langle x,y \mid x^{2^{d+1}}=1, x^4=y^2, [x,y,x]=x^{2^{d}}, [x,y,y]=1\rangle,$$
where $d>2$ is an integer.
It is clear that $G\_d$ is a finite $2$-group of nilpotency class at most $3$.
It is easy to see that $[x,y]^2=1$ and since the quaternion group $Q\_8$ of ... | 2011/11/07 | [
"https://mathoverflow.net/questions/80273",
"https://mathoverflow.net",
"https://mathoverflow.net/users/19075/"
] | The nilpotency class of $G\_d$ is indeed always 3. One way to see this is to rewrite the presentation of $G\_d$ in such a way to exhibit that it is a polycyclic group. For this purpose, let $z:=[x,y]$ and $w:=y^{2^{d-1}}=x^{2^d}$. Clearly $w$ lies in the center of $G\_d$. With a little more effort we see that
$$ G\_d \... | If the nilpotency class is $2$, then we must have $[a,b,c]=1$ for all $a,b,c\in G\_d$. But
we have $[x,y,x]=x^{2^d}\neq 1$ from the presentation. |
80,273 | Let $G\_d$ be the group with the following presentation
$$\langle x,y \mid x^{2^{d+1}}=1, x^4=y^2, [x,y,x]=x^{2^{d}}, [x,y,y]=1\rangle,$$
where $d>2$ is an integer.
It is clear that $G\_d$ is a finite $2$-group of nilpotency class at most $3$.
It is easy to see that $[x,y]^2=1$ and since the quaternion group $Q\_8$ of ... | 2011/11/07 | [
"https://mathoverflow.net/questions/80273",
"https://mathoverflow.net",
"https://mathoverflow.net/users/19075/"
] | To show $w$ is nontrivial in Max's presentation, note first that the group $H\_d$ formed by the "subpresentation" $\langle y,z,w \mid y^{2^{d-1}} = w, w^2=z^2=1, z^y=z, w^z=w \rangle$
is equal to the abelian group $\langle y \rangle \times \langle z \rangle$ of order $2^{d+1}$, and $w$ is certainly a nontrivial element... | If the nilpotency class is $2$, then we must have $[a,b,c]=1$ for all $a,b,c\in G\_d$. But
we have $[x,y,x]=x^{2^d}\neq 1$ from the presentation. |
52,834,531 | I have set up IIS on my Windows 7 PC and can access a basic HTML Web Page like so:
```
http://MY.LOCAL.IP.ADDRESS/home.html
```
Now I have created a folder:
C:\inetpub\wwwroot\videos and copied in a small mp4 video file:
```
C:\inetpub\wwwroot\videos\test.mp4
```
I want to access this video file like so:
```
<p... | 2018/10/16 | [
"https://Stackoverflow.com/questions/52834531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2339664/"
] | You may use
```
grep -Po 'Speed\s*\K\d+'
```
Or, to also get the fractional part if it is necessary
```
grep -Po 'Speed\s*\K\d+(\.\d+)?'
```
See the [online demo](https://ideone.com/qZzz5A)
**Details**
* `Speed` - a literal substring
* `\s*` - 0+ whitespaces
* `\K` - a match reset operator (discarding all text ... | ```
awk 'match($0,"Speed [0-9]+.?[0-9]*"){print substr($0,RSTART+6,RLENGTH-6)}'
sed '/Speed/s/.*Speed \([^ ]*\).*/\1/'
```
and if each line is always the same way formatted, you can do:
```
awk '{print $6}' file
```
This means, that every line always has the word speed in column 5 and you want to print column 6. |
52,834,531 | I have set up IIS on my Windows 7 PC and can access a basic HTML Web Page like so:
```
http://MY.LOCAL.IP.ADDRESS/home.html
```
Now I have created a folder:
C:\inetpub\wwwroot\videos and copied in a small mp4 video file:
```
C:\inetpub\wwwroot\videos\test.mp4
```
I want to access this video file like so:
```
<p... | 2018/10/16 | [
"https://Stackoverflow.com/questions/52834531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2339664/"
] | You may use
```
grep -Po 'Speed\s*\K\d+'
```
Or, to also get the fractional part if it is necessary
```
grep -Po 'Speed\s*\K\d+(\.\d+)?'
```
See the [online demo](https://ideone.com/qZzz5A)
**Details**
* `Speed` - a literal substring
* `\s*` - 0+ whitespaces
* `\K` - a match reset operator (discarding all text ... | If the output it *always* like that (i.e. not extra lines in between), a simple `cut -d' ' -f6` will do the job. |
52,834,531 | I have set up IIS on my Windows 7 PC and can access a basic HTML Web Page like so:
```
http://MY.LOCAL.IP.ADDRESS/home.html
```
Now I have created a folder:
C:\inetpub\wwwroot\videos and copied in a small mp4 video file:
```
C:\inetpub\wwwroot\videos\test.mp4
```
I want to access this video file like so:
```
<p... | 2018/10/16 | [
"https://Stackoverflow.com/questions/52834531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2339664/"
] | You may use
```
grep -Po 'Speed\s*\K\d+'
```
Or, to also get the fractional part if it is necessary
```
grep -Po 'Speed\s*\K\d+(\.\d+)?'
```
See the [online demo](https://ideone.com/qZzz5A)
**Details**
* `Speed` - a literal substring
* `\s*` - 0+ whitespaces
* `\K` - a match reset operator (discarding all text ... | Could you please try following. Considering that your Input\_file is same as shown samples.
```
awk '{sub(/.*Speed /,"");sub(/ .*/,"")} 1' Input_file
```
In case you want to save output into Input\_file itself then try following.
```
awk '{sub(/.*Speed /,"");sub(/ .*/,"")} 1' Input_file > temp_file && mv temp_file ... |
52,834,531 | I have set up IIS on my Windows 7 PC and can access a basic HTML Web Page like so:
```
http://MY.LOCAL.IP.ADDRESS/home.html
```
Now I have created a folder:
C:\inetpub\wwwroot\videos and copied in a small mp4 video file:
```
C:\inetpub\wwwroot\videos\test.mp4
```
I want to access this video file like so:
```
<p... | 2018/10/16 | [
"https://Stackoverflow.com/questions/52834531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2339664/"
] | You may use
```
grep -Po 'Speed\s*\K\d+'
```
Or, to also get the fractional part if it is necessary
```
grep -Po 'Speed\s*\K\d+(\.\d+)?'
```
See the [online demo](https://ideone.com/qZzz5A)
**Details**
* `Speed` - a literal substring
* `\s*` - 0+ whitespaces
* `\K` - a match reset operator (discarding all text ... | sed works too.
```
$: echo $string | sed -En '/ Speed /{ s/.* Speed ([0-9]+).*/\1/; p; }'
377
``` |
52,834,531 | I have set up IIS on my Windows 7 PC and can access a basic HTML Web Page like so:
```
http://MY.LOCAL.IP.ADDRESS/home.html
```
Now I have created a folder:
C:\inetpub\wwwroot\videos and copied in a small mp4 video file:
```
C:\inetpub\wwwroot\videos\test.mp4
```
I want to access this video file like so:
```
<p... | 2018/10/16 | [
"https://Stackoverflow.com/questions/52834531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2339664/"
] | If the output it *always* like that (i.e. not extra lines in between), a simple `cut -d' ' -f6` will do the job. | ```
awk 'match($0,"Speed [0-9]+.?[0-9]*"){print substr($0,RSTART+6,RLENGTH-6)}'
sed '/Speed/s/.*Speed \([^ ]*\).*/\1/'
```
and if each line is always the same way formatted, you can do:
```
awk '{print $6}' file
```
This means, that every line always has the word speed in column 5 and you want to print column 6. |
52,834,531 | I have set up IIS on my Windows 7 PC and can access a basic HTML Web Page like so:
```
http://MY.LOCAL.IP.ADDRESS/home.html
```
Now I have created a folder:
C:\inetpub\wwwroot\videos and copied in a small mp4 video file:
```
C:\inetpub\wwwroot\videos\test.mp4
```
I want to access this video file like so:
```
<p... | 2018/10/16 | [
"https://Stackoverflow.com/questions/52834531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2339664/"
] | If the output it *always* like that (i.e. not extra lines in between), a simple `cut -d' ' -f6` will do the job. | Could you please try following. Considering that your Input\_file is same as shown samples.
```
awk '{sub(/.*Speed /,"");sub(/ .*/,"")} 1' Input_file
```
In case you want to save output into Input\_file itself then try following.
```
awk '{sub(/.*Speed /,"");sub(/ .*/,"")} 1' Input_file > temp_file && mv temp_file ... |
52,834,531 | I have set up IIS on my Windows 7 PC and can access a basic HTML Web Page like so:
```
http://MY.LOCAL.IP.ADDRESS/home.html
```
Now I have created a folder:
C:\inetpub\wwwroot\videos and copied in a small mp4 video file:
```
C:\inetpub\wwwroot\videos\test.mp4
```
I want to access this video file like so:
```
<p... | 2018/10/16 | [
"https://Stackoverflow.com/questions/52834531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2339664/"
] | If the output it *always* like that (i.e. not extra lines in between), a simple `cut -d' ' -f6` will do the job. | sed works too.
```
$: echo $string | sed -En '/ Speed /{ s/.* Speed ([0-9]+).*/\1/; p; }'
377
``` |
19,278,333 | I have created a stored procedure
```
create or replace
PROCEDURE "USP_USER_ADD" (
USERNAME IN VARCHAR2 ,
P_PASSWORD IN VARCHAR2 ,
SALT IN BLOB ,
EMAIL IN VARCHAR2 ,
FIRST_NAME IN VARCHAR2 ,... | 2013/10/09 | [
"https://Stackoverflow.com/questions/19278333",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2863825/"
] | The problem is in this section of code:
```
P_failed_login_attempts IN NUMBER )
AS
BEGIN
declare
user_id_tmp number(20);
INSERT INTO users( "username" ,
-- rest omitted
```
Remove the `declare` and move the declaration of `user_id` between the `AS` and the `BEGIN`:
```
... | I think that you should remove `DECLARE`.
[Oracle 11g Create Procedure Documentation](http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/create_procedure.htm) |
19,278,333 | I have created a stored procedure
```
create or replace
PROCEDURE "USP_USER_ADD" (
USERNAME IN VARCHAR2 ,
P_PASSWORD IN VARCHAR2 ,
SALT IN BLOB ,
EMAIL IN VARCHAR2 ,
FIRST_NAME IN VARCHAR2 ,... | 2013/10/09 | [
"https://Stackoverflow.com/questions/19278333",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2863825/"
] | The problem is in this section of code:
```
P_failed_login_attempts IN NUMBER )
AS
BEGIN
declare
user_id_tmp number(20);
INSERT INTO users( "username" ,
-- rest omitted
```
Remove the `declare` and move the declaration of `user_id` between the `AS` and the `BEGIN`:
```
... | Previous answers have cleared up the compile errors, so I won't address those. But you have a potential bug in place; the id inserted into "user\_password" table may not be the same as in "user" table In a multi-user environment it is possible another user could insert and commit into after you insert into set but befo... |
7,245,967 | Help! Can't figure this out! I'm getting a Integrity error on get\_or\_create even with a defaults parameter set.
Here's how the model looks stripped down.
```
class Example(models.Model):model
user = models.ForeignKey(User)
text = models.TextField()
def __unicode__(self):
return "E... | 2011/08/30 | [
"https://Stackoverflow.com/questions/7245967",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/421912/"
] | You shouldn't be setting the id for objects in general, you have to be careful when doing that.
Have you checked to see the value for 'id' that you are putting into the database?
If that doesn't fix your issue then it may be a database issue, for PostgreSQL there is a special sequence used to increment the ID's and s... | One common but little documented cause for `get_or_create()` fails is **corrupted database indexes.**
Django depends on the assumption that there is only one record for given identifier, and this is in turn enforced using `UNIQUE` index on this particular field in the database. But indexes are constantly being rewrit... |
7,245,967 | Help! Can't figure this out! I'm getting a Integrity error on get\_or\_create even with a defaults parameter set.
Here's how the model looks stripped down.
```
class Example(models.Model):model
user = models.ForeignKey(User)
text = models.TextField()
def __unicode__(self):
return "E... | 2011/08/30 | [
"https://Stackoverflow.com/questions/7245967",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/421912/"
] | `get_or_create()` will try to create a new object if it can't find one that is an **exact** match to the arguments you pass in.
So is what I'm assuming is happening is that a different user has made an object with the id of 3020. Since there is no object with the user/id combo you're requesting, it tries to make a ne... | One common but little documented cause for `get_or_create()` fails is **corrupted database indexes.**
Django depends on the assumption that there is only one record for given identifier, and this is in turn enforced using `UNIQUE` index on this particular field in the database. But indexes are constantly being rewrit... |
29,692,050 | I have a table and with in tds i had a text box
```
<table class="table ratemanagement customtabl-bordered " id="rate_table">
<tbody>
<tr>
<th><input type="checkbox" onclick="select_all()" class="check_all"></th>
<th>From Days*</th>
<th>To Days*</th>
... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29692050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4000137/"
] | ```
var values = [];
$('.v input').each(function () {
values.push($(this).attr('name') = $(this).val());
});
``` | On button click, iterate over the inputs and push their values in to the respective array:
```js
$(document).on('click', '#getVar', function() {
var fromVar = [];
var toVar = [];
$('input[name=fromdays]').each(function() {
fromVar.push($(this).val());
});
$('input[name=todays]').each(function() {
... |
29,692,050 | I have a table and with in tds i had a text box
```
<table class="table ratemanagement customtabl-bordered " id="rate_table">
<tbody>
<tr>
<th><input type="checkbox" onclick="select_all()" class="check_all"></th>
<th>From Days*</th>
<th>To Days*</th>
... | 2015/04/17 | [
"https://Stackoverflow.com/questions/29692050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4000137/"
] | You can store the values in three different `arrays` by checking the `name` attribute of the `input` fields
```
var fromdays=new Array();
var todays=new Array();
var rent=new Array();
$('#rate_table input[type="text"]').each(function () {
if($(this).attr('name')=="fromdays")
fromdays.push($(this).val())
... | On button click, iterate over the inputs and push their values in to the respective array:
```js
$(document).on('click', '#getVar', function() {
var fromVar = [];
var toVar = [];
$('input[name=fromdays]').each(function() {
fromVar.push($(this).val());
});
$('input[name=todays]').each(function() {
... |
28,280,685 | Introduction
------------
This is more than a fact, using ClearCase (not UCM) as main SCM for large projects maintained by few people is a pretty not efficient solution. When it's Corporate Standard, we are stuck with it and we need to find an efficient workaround.
The usual workflow with ClearCase consists of a `mas... | 2015/02/02 | [
"https://Stackoverflow.com/questions/28280685",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2612235/"
] | A possible solution from [VonC](https://stackoverflow.com/users/6309/vonc)
--------------------------------------------------------------------------
In [VonC](https://stackoverflow.com/users/6309/vonc)'s [answer](https://stackoverflow.com/questions/28280685/toward-an-ideal-workflow-with-clearcase-and-git/28295769#com... | >
> Actually, what I call a feature could be also a simple refactoring, such as a massive renaming inside the project. In this example, and because ClearCase is file-centric, **we always need a temporary branch** (no atomic checkin in non-UCM CC).
>
> Creating a new branch is painful and having the right config-sp... |
23,630,943 | Here I am using search TextField and search button in my program
```
searchTxt = new TextField();
searchTxt.setWidth("400px");
search = new Button("Search");
search.setImmediate(true);
search.addListener((Button.ClickListener) this);
public void buttonClick(ClickEvent event) {
final Button button = event.getButton(... | 2014/05/13 | [
"https://Stackoverflow.com/questions/23630943",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3632315/"
] | First and foremost, you should not so much care about performance in GUI event handling code. If you'll encounter performance problems they will most probably not emerge in user input validation code.
So, when writing an application your focus should be on maintainability and readability. You'll best achieve that when... | You can do it as follows:
1. Check that the length of the String is 1.
2. If so, get the character at position zero by using `charAt()` method of `String`.
3. Then use `Character.isAlphabetic()` or `Character.isDigit()` to do your validation.
Another option would be to use `RegEx` which would greatly reduce ... |
58,259,514 | I am currently developing a CQRS application that has a login page. In the `LoginCommand`, one user is fetched from the database, and if it can login (enrypted password matches given encrypted password), a token is assigned to the user.
In CQRS, the command usually receives the ID of the element the command is aimed ... | 2019/10/06 | [
"https://Stackoverflow.com/questions/58259514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/821280/"
] | Speaking from a domain point of view, an `ID` associated with a `User` record is simply a [surrogate key](https://en.wikipedia.org/wiki/Surrogate_key). It does not have a corresponding representation in the real world and is only meant to help you persist and retrieve data.
So if `email` is the unique field for your `... | I would strongly suggest that this isn't a 'command' but rather a read from the read model. Here's why:
You are simply checking that the supplied credentials match what's in the read model. This action doesn't change the state of the domain and is not therefore consistent with the use of a command.
But there are mor... |
58,259,514 | I am currently developing a CQRS application that has a login page. In the `LoginCommand`, one user is fetched from the database, and if it can login (enrypted password matches given encrypted password), a token is assigned to the user.
In CQRS, the command usually receives the ID of the element the command is aimed ... | 2019/10/06 | [
"https://Stackoverflow.com/questions/58259514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/821280/"
] | Speaking from a domain point of view, an `ID` associated with a `User` record is simply a [surrogate key](https://en.wikipedia.org/wiki/Surrogate_key). It does not have a corresponding representation in the real world and is only meant to help you persist and retrieve data.
So if `email` is the unique field for your `... | First of all, I assume that when you say you assign a token to the user, it means you write in the database that assignment. Otherwise your login command wouldn't be a command.
That being said, I see no problem having a method in your user repository that retrieves a user knowing the email. |
58,259,514 | I am currently developing a CQRS application that has a login page. In the `LoginCommand`, one user is fetched from the database, and if it can login (enrypted password matches given encrypted password), a token is assigned to the user.
In CQRS, the command usually receives the ID of the element the command is aimed ... | 2019/10/06 | [
"https://Stackoverflow.com/questions/58259514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/821280/"
] | Speaking from a domain point of view, an `ID` associated with a `User` record is simply a [surrogate key](https://en.wikipedia.org/wiki/Surrogate_key). It does not have a corresponding representation in the real world and is only meant to help you persist and retrieve data.
So if `email` is the unique field for your `... | This is a very interesting question and I have had this dilemma also in CQRS/DDD/Event Sourcing context. Here's some additional answers on the top of others already mentioned.
**Option A:** If you consider that you're modifying the state of a user by setting it to logged or similar, you need an ID.
1. **Use the email... |
58,259,514 | I am currently developing a CQRS application that has a login page. In the `LoginCommand`, one user is fetched from the database, and if it can login (enrypted password matches given encrypted password), a token is assigned to the user.
In CQRS, the command usually receives the ID of the element the command is aimed ... | 2019/10/06 | [
"https://Stackoverflow.com/questions/58259514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/821280/"
] | I don't think that CQRS would have any bearing on your design in this particular case. Perhaps event-sourcing might though.
If you have some *natural key* then you have a couple of options. For one thing it is going to have to be unique. Your `UserRepository` may have a method using the e-mail address to fetch the use... | I would strongly suggest that this isn't a 'command' but rather a read from the read model. Here's why:
You are simply checking that the supplied credentials match what's in the read model. This action doesn't change the state of the domain and is not therefore consistent with the use of a command.
But there are mor... |
58,259,514 | I am currently developing a CQRS application that has a login page. In the `LoginCommand`, one user is fetched from the database, and if it can login (enrypted password matches given encrypted password), a token is assigned to the user.
In CQRS, the command usually receives the ID of the element the command is aimed ... | 2019/10/06 | [
"https://Stackoverflow.com/questions/58259514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/821280/"
] | I don't think that CQRS would have any bearing on your design in this particular case. Perhaps event-sourcing might though.
If you have some *natural key* then you have a couple of options. For one thing it is going to have to be unique. Your `UserRepository` may have a method using the e-mail address to fetch the use... | First of all, I assume that when you say you assign a token to the user, it means you write in the database that assignment. Otherwise your login command wouldn't be a command.
That being said, I see no problem having a method in your user repository that retrieves a user knowing the email. |
58,259,514 | I am currently developing a CQRS application that has a login page. In the `LoginCommand`, one user is fetched from the database, and if it can login (enrypted password matches given encrypted password), a token is assigned to the user.
In CQRS, the command usually receives the ID of the element the command is aimed ... | 2019/10/06 | [
"https://Stackoverflow.com/questions/58259514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/821280/"
] | I don't think that CQRS would have any bearing on your design in this particular case. Perhaps event-sourcing might though.
If you have some *natural key* then you have a couple of options. For one thing it is going to have to be unique. Your `UserRepository` may have a method using the e-mail address to fetch the use... | This is a very interesting question and I have had this dilemma also in CQRS/DDD/Event Sourcing context. Here's some additional answers on the top of others already mentioned.
**Option A:** If you consider that you're modifying the state of a user by setting it to logged or similar, you need an ID.
1. **Use the email... |
58,259,514 | I am currently developing a CQRS application that has a login page. In the `LoginCommand`, one user is fetched from the database, and if it can login (enrypted password matches given encrypted password), a token is assigned to the user.
In CQRS, the command usually receives the ID of the element the command is aimed ... | 2019/10/06 | [
"https://Stackoverflow.com/questions/58259514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/821280/"
] | I would strongly suggest that this isn't a 'command' but rather a read from the read model. Here's why:
You are simply checking that the supplied credentials match what's in the read model. This action doesn't change the state of the domain and is not therefore consistent with the use of a command.
But there are mor... | This is a very interesting question and I have had this dilemma also in CQRS/DDD/Event Sourcing context. Here's some additional answers on the top of others already mentioned.
**Option A:** If you consider that you're modifying the state of a user by setting it to logged or similar, you need an ID.
1. **Use the email... |
58,259,514 | I am currently developing a CQRS application that has a login page. In the `LoginCommand`, one user is fetched from the database, and if it can login (enrypted password matches given encrypted password), a token is assigned to the user.
In CQRS, the command usually receives the ID of the element the command is aimed ... | 2019/10/06 | [
"https://Stackoverflow.com/questions/58259514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/821280/"
] | First of all, I assume that when you say you assign a token to the user, it means you write in the database that assignment. Otherwise your login command wouldn't be a command.
That being said, I see no problem having a method in your user repository that retrieves a user knowing the email. | This is a very interesting question and I have had this dilemma also in CQRS/DDD/Event Sourcing context. Here's some additional answers on the top of others already mentioned.
**Option A:** If you consider that you're modifying the state of a user by setting it to logged or similar, you need an ID.
1. **Use the email... |
32,282,814 | Trying to create a generic function to do custom dialog box, running into an issue with dismissing the dialog box from itself, here is my code in the activity. I am trying to finish the dialog but not the activity. I also can't reference the alertDialog to do .dismiss() from the calling class. Any ideas? Yes I can tech... | 2015/08/29 | [
"https://Stackoverflow.com/questions/32282814",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4279221/"
] | You should create a dialog by extending `DialogFragment` and creating a `AlertDialog` in the `onCreateDialog()` callback method. To deliver the dialog clicks, define an interface with a method for each type of click event. Then implement that interface in the host component that will receive the action events from the ... | <http://developer.android.com/guide/topics/ui/dialogs.html>
You need to rework many things, `Dialog.show()` is not meant to be called by your program manually. You should use DialogFragment, and FragmentManager to manage the dialog show, hide etc.
If you do not follow the DialogFragment route, you would face lots and... |
32,282,814 | Trying to create a generic function to do custom dialog box, running into an issue with dismissing the dialog box from itself, here is my code in the activity. I am trying to finish the dialog but not the activity. I also can't reference the alertDialog to do .dismiss() from the calling class. Any ideas? Yes I can tech... | 2015/08/29 | [
"https://Stackoverflow.com/questions/32282814",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4279221/"
] | You should create a dialog by extending `DialogFragment` and creating a `AlertDialog` in the `onCreateDialog()` callback method. To deliver the dialog clicks, define an interface with a method for each type of click event. Then implement that interface in the host component that will receive the action events from the ... | Use the AlertDialog `setPositiveButton()` method for YES and `setNegativeButton()` method for NO and handle their clicks |
32,282,814 | Trying to create a generic function to do custom dialog box, running into an issue with dismissing the dialog box from itself, here is my code in the activity. I am trying to finish the dialog but not the activity. I also can't reference the alertDialog to do .dismiss() from the calling class. Any ideas? Yes I can tech... | 2015/08/29 | [
"https://Stackoverflow.com/questions/32282814",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4279221/"
] | You should create a dialog by extending `DialogFragment` and creating a `AlertDialog` in the `onCreateDialog()` callback method. To deliver the dialog clicks, define an interface with a method for each type of click event. Then implement that interface in the host component that will receive the action events from the ... | Is setting onClickListener after showing dialog not working?
```
alertDialog.show();
leftButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
alertDialog.dismiss();
}
});
rightButton.setOnClickListener(rightEvent);
``` |
58,730,908 | I want to build an M by M matrix where each cell\_{ij} is a function of the Kronecker delta &\_{ij}
Here is the code for doing this using a for loop:
```
# Note: X is an M by M numpy array
def build_matrix(X):
def kd(i, j):
if i==j:
return 1
else :
return 0
m = np.zeros((len(X), len(... | 2019/11/06 | [
"https://Stackoverflow.com/questions/58730908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12222685/"
] | I was faced with the same problem, and found the following way to clean up before schema generation: use BeanFactoryPostProcessor. BeanFactoryPostProcessor is called when all bean definitions are loaded, but no beans are instantiated yet.
```
/**
* Remove auto-generated schema files before JPA generates them.
* Oth... | Short example using Gradle and Springboot.
Assuming you have a project property defining your environment, and "dev" is the one creating DDL files for Postgres.
Excerpt from application.yml:
```
spring:
jpa:
database-platform: org.hibernate.dialect.PostgreSQLDialect
database: POSTGRESQL
properties:
... |
58,730,908 | I want to build an M by M matrix where each cell\_{ij} is a function of the Kronecker delta &\_{ij}
Here is the code for doing this using a for loop:
```
# Note: X is an M by M numpy array
def build_matrix(X):
def kd(i, j):
if i==j:
return 1
else :
return 0
m = np.zeros((len(X), len(... | 2019/11/06 | [
"https://Stackoverflow.com/questions/58730908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12222685/"
] | I was faced with the same problem, and found the following way to clean up before schema generation: use BeanFactoryPostProcessor. BeanFactoryPostProcessor is called when all bean definitions are loaded, but no beans are instantiated yet.
```
/**
* Remove auto-generated schema files before JPA generates them.
* Oth... | I only ever use the schema file for testing and solved the problem by specifying the location of the output file as follows:
`spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=target/test-classes/schema.sql`
This works well for Maven but the target directory could be modified for a Gradl... |
22,589,731 | i don't know what's wrong, I tried to add "create" method to my application, and what i get is :
"ActiveRecord::RecordNotFound in UsersController#show"
"Couldn't find User with id=create"
And then code
```
# Use callbacks to share a common setup
def set_user
@user = User.find(params[:id])
end
# Permit only specif... | 2014/03/23 | [
"https://Stackoverflow.com/questions/22589731",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3329577/"
] | You don't go to the `create` action via a URL. It's there to create a new user coming back from the `new.html.erb` file.
If you want to create a new user you could use `/users/new` and add a `new` method to your controller along the lines of:
```
def new
@user = User.new
end
```
You will also need to change your ... | In your controller:
```
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update, :destroy]
def index
@users = User.all
end
def show
end
def new
@user = User.new
end
def create
@user = User.new(user_params)
if @user.save
redirect_to ... |
22,589,731 | i don't know what's wrong, I tried to add "create" method to my application, and what i get is :
"ActiveRecord::RecordNotFound in UsersController#show"
"Couldn't find User with id=create"
And then code
```
# Use callbacks to share a common setup
def set_user
@user = User.find(params[:id])
end
# Permit only specif... | 2014/03/23 | [
"https://Stackoverflow.com/questions/22589731",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3329577/"
] | 
[This](http://guides.rubyonrails.org/routing.html) should help you - you're missing `resources :users`, which creates a set of RESTful routes for your controller. This, combined with the other answers should help | In your controller:
```
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update, :destroy]
def index
@users = User.all
end
def show
end
def new
@user = User.new
end
def create
@user = User.new(user_params)
if @user.save
redirect_to ... |
47,082,617 | I have XML generating different namespaces, so how can I avoid using name space in xsl and get below result by using one single xsl. Or can I use any wild characters like `http://namesapce//example/*/format`
Input 1:
```
<dynamic>
<rpc xmlns="http://namespace/example/123/format" >
... | 2017/11/02 | [
"https://Stackoverflow.com/questions/47082617",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6534786/"
] | Do a 2-phase transformation. Phase 1: standardize the namespaces. Phase 2: do the real transformation work.
That way you minimize the amount of code that has to deal with variant namespaces.
You can normalize namespaces using code such as
```
<xsl:template match="old:*" xmlns:old="(old-namespace)" xmlns:new="(new na... | You can't use any wildcards in the namespace URI and with XSLT 1.0 you can't use `*` for a prefix.
Maybe `starts-with()` would be enough of a check?
Example...
**XML Input**
```
<dynamic>
<rpc xmlns="http://namespace/example/123/format" >
<route>
<table>
<tablename>employee</... |
51,726,486 | I've try to make my Timer but , have got one problem I couldn't understand how to reset(refresh) my timer.
```
startTimer() {
Observable.timer(this.countDownDuration, 1000)
.map(i => this.countDownDuration - i)
.take(this.countDownDuration + 1)
.subscribe(i => {
this.countDown = i;
... | 2018/08/07 | [
"https://Stackoverflow.com/questions/51726486",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9881672/"
] | ```
const s = new BehaviorSubject(null);
s.switchMap(() => Observable.timer(this.countDownDuration, 1000))
.map(...)
...
.subscribe(...);
resetTimer() {
s.next();
}
``` | I found some another way for this.
And in my example I must use take.
I know how to reset throw switchMap.
But it's not good for me.
May be it'is not good decision.
```
status;
startTimer() {
this.status = Observable.timer(this.countDownDuration, 1000)
.map(i => this.countDownDuration - i)
.take(this.... |
51,726,486 | I've try to make my Timer but , have got one problem I couldn't understand how to reset(refresh) my timer.
```
startTimer() {
Observable.timer(this.countDownDuration, 1000)
.map(i => this.countDownDuration - i)
.take(this.countDownDuration + 1)
.subscribe(i => {
this.countDown = i;
... | 2018/08/07 | [
"https://Stackoverflow.com/questions/51726486",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9881672/"
] | ```
const s = new BehaviorSubject(null);
s.switchMap(() => Observable.timer(this.countDownDuration, 1000))
.map(...)
...
.subscribe(...);
resetTimer() {
s.next();
}
``` | The martin's answer (<https://stackoverflow.com/a/51726532/3024975>) is correct, but I don't like subscribing the BehaviorSubject. So this is an alternative:
We need a way to sinal the Observable to restart itself. This is a good use case for `Subject`
```
const signal = new Subject();
Observable.defer(() => Observa... |
51,726,486 | I've try to make my Timer but , have got one problem I couldn't understand how to reset(refresh) my timer.
```
startTimer() {
Observable.timer(this.countDownDuration, 1000)
.map(i => this.countDownDuration - i)
.take(this.countDownDuration + 1)
.subscribe(i => {
this.countDown = i;
... | 2018/08/07 | [
"https://Stackoverflow.com/questions/51726486",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9881672/"
] | ```
const s = new BehaviorSubject(null);
s.switchMap(() => Observable.timer(this.countDownDuration, 1000))
.map(...)
...
.subscribe(...);
resetTimer() {
s.next();
}
``` | Here's another solution:
```
recording$ = new BehaviorSubject(false);
stopWatch$: Observable<number>;
ngOnInit() {
this.stopWatch$ = this.recording$.pipe(
switchMap(r => r ? timer(0, 10) : never()),
share()
);
}
start() {
this.recording$.next(true);
}
stop() {
this.record... |
36,175 | Is there a way to use the Galaxy Tab 2 with my Galaxy S3 (SPRINT) to get an internet connection? | 2012/12/26 | [
"https://android.stackexchange.com/questions/36175",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/25584/"
] | Yes, very easily actually.
**To Make your S3 emit a WiFi network**
1. Enable 'WiFi Tethering' in `System Settings->More->Tethering and Portable Hotspot->Portable WiFi Hotspot`.
2. Configure the hotspot (name, password etc), in the `Setup WiFi Hotspot` menu.
**To Connect your Tablet to the WiFi network**
1. Enter th... | I assume that you have `3G/LTE` connection on your `Galaxy S3` and want to use that connection on your `Galaxy tab2`, so you would have internet on it. OK! here is the solution:
**On Galaxy S3:**
* Enable Internet (3G/LTE mobile data)
* Go to Settings -> Wireless & Networks -> Tethering & portable hotspot (the path a... |
36,175 | Is there a way to use the Galaxy Tab 2 with my Galaxy S3 (SPRINT) to get an internet connection? | 2012/12/26 | [
"https://android.stackexchange.com/questions/36175",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/25584/"
] | Yes, very easily actually.
**To Make your S3 emit a WiFi network**
1. Enable 'WiFi Tethering' in `System Settings->More->Tethering and Portable Hotspot->Portable WiFi Hotspot`.
2. Configure the hotspot (name, password etc), in the `Setup WiFi Hotspot` menu.
**To Connect your Tablet to the WiFi network**
1. Enter th... | What I did is to root my Samsung S3 and install a WiFi Tether apk file so I can get free internet on my Samsung Tab 2. |
36,175 | Is there a way to use the Galaxy Tab 2 with my Galaxy S3 (SPRINT) to get an internet connection? | 2012/12/26 | [
"https://android.stackexchange.com/questions/36175",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/25584/"
] | Yes, very easily actually.
**To Make your S3 emit a WiFi network**
1. Enable 'WiFi Tethering' in `System Settings->More->Tethering and Portable Hotspot->Portable WiFi Hotspot`.
2. Configure the hotspot (name, password etc), in the `Setup WiFi Hotspot` menu.
**To Connect your Tablet to the WiFi network**
1. Enter th... | Samsung galaxy tab 2 and Motorola photon you can get internet thru Bluetooth |
36,175 | Is there a way to use the Galaxy Tab 2 with my Galaxy S3 (SPRINT) to get an internet connection? | 2012/12/26 | [
"https://android.stackexchange.com/questions/36175",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/25584/"
] | Yes, very easily actually.
**To Make your S3 emit a WiFi network**
1. Enable 'WiFi Tethering' in `System Settings->More->Tethering and Portable Hotspot->Portable WiFi Hotspot`.
2. Configure the hotspot (name, password etc), in the `Setup WiFi Hotspot` menu.
**To Connect your Tablet to the WiFi network**
1. Enter th... | Best way is to enable WiFi Tethering.
Bluetooth also works. |
36,175 | Is there a way to use the Galaxy Tab 2 with my Galaxy S3 (SPRINT) to get an internet connection? | 2012/12/26 | [
"https://android.stackexchange.com/questions/36175",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/25584/"
] | I assume that you have `3G/LTE` connection on your `Galaxy S3` and want to use that connection on your `Galaxy tab2`, so you would have internet on it. OK! here is the solution:
**On Galaxy S3:**
* Enable Internet (3G/LTE mobile data)
* Go to Settings -> Wireless & Networks -> Tethering & portable hotspot (the path a... | What I did is to root my Samsung S3 and install a WiFi Tether apk file so I can get free internet on my Samsung Tab 2. |
36,175 | Is there a way to use the Galaxy Tab 2 with my Galaxy S3 (SPRINT) to get an internet connection? | 2012/12/26 | [
"https://android.stackexchange.com/questions/36175",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/25584/"
] | I assume that you have `3G/LTE` connection on your `Galaxy S3` and want to use that connection on your `Galaxy tab2`, so you would have internet on it. OK! here is the solution:
**On Galaxy S3:**
* Enable Internet (3G/LTE mobile data)
* Go to Settings -> Wireless & Networks -> Tethering & portable hotspot (the path a... | Samsung galaxy tab 2 and Motorola photon you can get internet thru Bluetooth |
36,175 | Is there a way to use the Galaxy Tab 2 with my Galaxy S3 (SPRINT) to get an internet connection? | 2012/12/26 | [
"https://android.stackexchange.com/questions/36175",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/25584/"
] | I assume that you have `3G/LTE` connection on your `Galaxy S3` and want to use that connection on your `Galaxy tab2`, so you would have internet on it. OK! here is the solution:
**On Galaxy S3:**
* Enable Internet (3G/LTE mobile data)
* Go to Settings -> Wireless & Networks -> Tethering & portable hotspot (the path a... | Best way is to enable WiFi Tethering.
Bluetooth also works. |
108,154 | How do I rename a font style in an OTF font?
I have this bug here:

I now can't select any other style except "Regular". | 2010/02/12 | [
"https://superuser.com/questions/108154",
"https://superuser.com",
"https://superuser.com/users/28077/"
] | After some more trials I found that when the second window that opened was dragged off of my third monitor the speed test would improve dramatically. This monitor is run off a second video card in a PCI slot. Both video cards are nvidia 8400 gs. Disabling this monitor completely solves problem.
I guess it is a problem... | Which version of Firefox are you using?
Maybe you should disable a few extensions of Firefox and check again. |
50,303,246 | I can't think of a straightforward title for this problem. I can explain it better with code:
```js
function Bar() {
this.string = "something";
this.event = function(e) {
console.log("This should say something: " + this.string);
}
}
var foo = new Bar();
window.addEventListener("mouseover", foo.event);
``... | 2018/05/12 | [
"https://Stackoverflow.com/questions/50303246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6931415/"
] | Use an arrow function instead so that the inner function does not acquire a new context for its `this`.
```js
function Foo() {
this.string = "something";
this.event = (e) => {
console.log("This should say something: " + this.string);
}
}
var bar = new Foo();
window.addEventListener("mouseover", bar.event... | [**bind**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind) foo with `foo.event`
```js
function Bar() {
this.string = "something";
this.event = function(e) {
console.log("This should say something: " + this.string);
}
}
var foo = new Bar();
window.addEv... |
50,303,246 | I can't think of a straightforward title for this problem. I can explain it better with code:
```js
function Bar() {
this.string = "something";
this.event = function(e) {
console.log("This should say something: " + this.string);
}
}
var foo = new Bar();
window.addEventListener("mouseover", foo.event);
``... | 2018/05/12 | [
"https://Stackoverflow.com/questions/50303246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6931415/"
] | Use an arrow function instead so that the inner function does not acquire a new context for its `this`.
```js
function Foo() {
this.string = "something";
this.event = (e) => {
console.log("This should say something: " + this.string);
}
}
var bar = new Foo();
window.addEventListener("mouseover", bar.event... | I don’t know if you deliberately want to avoid this, but you can simply pass an anonymous function as a handler for the event and invoke `foo.event()` there.
You *can* use `bind()` and arrow functions as the other guys suggested, but you can simply do that as well.
```js
function Bar() {
this.string = "something";... |
50,303,246 | I can't think of a straightforward title for this problem. I can explain it better with code:
```js
function Bar() {
this.string = "something";
this.event = function(e) {
console.log("This should say something: " + this.string);
}
}
var foo = new Bar();
window.addEventListener("mouseover", foo.event);
``... | 2018/05/12 | [
"https://Stackoverflow.com/questions/50303246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6931415/"
] | Use an arrow function instead so that the inner function does not acquire a new context for its `this`.
```js
function Foo() {
this.string = "something";
this.event = (e) => {
console.log("This should say something: " + this.string);
}
}
var bar = new Foo();
window.addEventListener("mouseover", bar.event... | In addition to the given answers, this can also be done with a simple local variable.
*And as suggested, and when using Babel to compile e.g. this as an arrow function, this it what that will translate to.*
```js
function Bar() {
var _this = this;
this.string = "something";
this.event = function(e) {
console... |
43,897,109 | I have a python script that reads in a CSV file that represents teacher evaluations, I read in this script and feed the values into a 2D dictionary.
The dictionary goes like this: Teacher Names (key) > List of Questions for that teacher(key) > List of answers for each question.(value)
I want this in a more presentabl... | 2017/05/10 | [
"https://Stackoverflow.com/questions/43897109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6119061/"
] | It sound like you basically want to write a web app in Python. That is, you want to write, essentially, a custom server that handles data received from clients and then sends HTML back to them.
This is very possible. To do it in a "modern" way, you'll want to use a [web framework](https://wiki.python.org/moin/WebFrame... | You can use HTML/CSS with python by building a webapp with a python backend. There are lots of framework avaiable that allow you to do that, such as [Django](https://www.djangoproject.com/), [Pyramid](https://trypyramid.com/) and Flask.
I personally like to use [Flask](http://flask.pocoo.org/) for small projects, since... |
8,990,711 | I have need to get the word between `.` and `)`
I am using this: `\..*\)`
But if there is more than one `.` I am getting the first `.` to `)` instead of the last `.` to `)`.
E.g:
```
abc.def.ghi.jkl.mymodname(Object sender, CompletedEventArgs e)
```
I am getting :
```
def.ghi.jkl.mymodname(Object sender, Complet... | 2012/01/24 | [
"https://Stackoverflow.com/questions/8990711",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1167499/"
] | Be explicit. If you don't want any dots between your starting dot and the closing parenthesis, you can specify this:
```
\.[^.]*\)
```
`[^.]` is a negated [character class](http://www.regular-expressions.info/charclass.html), meaning "any character except a dot". That way, only non-dots are allowed to match after t... | try `.[a-bA-B0-9,(]*)`
I did not check it but I think something like that works
or you can also use somthing |
8,990,711 | I have need to get the word between `.` and `)`
I am using this: `\..*\)`
But if there is more than one `.` I am getting the first `.` to `)` instead of the last `.` to `)`.
E.g:
```
abc.def.ghi.jkl.mymodname(Object sender, CompletedEventArgs e)
```
I am getting :
```
def.ghi.jkl.mymodname(Object sender, Complet... | 2012/01/24 | [
"https://Stackoverflow.com/questions/8990711",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1167499/"
] | Be explicit. If you don't want any dots between your starting dot and the closing parenthesis, you can specify this:
```
\.[^.]*\)
```
`[^.]` is a negated [character class](http://www.regular-expressions.info/charclass.html), meaning "any character except a dot". That way, only non-dots are allowed to match after t... | in PHP
```
$a='abc.def.ghi.jkl.mymodname(Object sender, CompletedEventArgs e)';
$p='/.*\.(.*?\))/';
preg_match($p,$a,$m);
```
now look at `$m[1]`
Other languages analogous |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.