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 |
|---|---|---|---|---|---|
39,427,339 | I am trying to use CSS so when you hover on something it changes background colors. The code I am using does not work though. I can't seem to find out why though. It should work, right?
```css
body {
margin: 0;
font-family: Arial;
font-size: 1em;
}
.navbar-ul, a {
margin: 0;
color: white;
... | 2016/09/10 | [
"https://Stackoverflow.com/questions/39427339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | ```
$ awk '{delete a; for(i=1;i<=NF;i++) a[$i]++; if(a["."]>=2) next} 1' foo
A B C D E
0 1 . 0 0
1 ./. 0 1 1
1 1 0 0 0
```
It iterates all fields (`for`), counts field values and `if` 2 or more `.` in a record, restrains from printing (`next`). If you want to count the periods only from field 3 onward, change the sta... | Perhaps this is alright.
```
awk '$0 !~/\. \./' file
A B C D E
0 1 . 0 0
1 ./. 0 1 1
1 1 0 0 0
``` |
39,427,339 | I am trying to use CSS so when you hover on something it changes background colors. The code I am using does not work though. I can't seem to find out why though. It should work, right?
```css
body {
margin: 0;
font-family: Arial;
font-size: 1em;
}
.navbar-ul, a {
margin: 0;
color: white;
... | 2016/09/10 | [
"https://Stackoverflow.com/questions/39427339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | With awk:
```
$ awk '{c=0;for(i=1;i<NF;i++) c += ($i == ".")}c<2' file
A B C D E
0 1 . 0 0
1 ./. 0 1 1
1 1 0 0 0
```
Basically it iterates each column and add one to the counter if the column equals a period (`.`).
The `c<2` part will only print the line if there is less than two columns with periods.
With sed one... | Perhaps this is alright.
```
awk '$0 !~/\. \./' file
A B C D E
0 1 . 0 0
1 ./. 0 1 1
1 1 0 0 0
``` |
39,427,339 | I am trying to use CSS so when you hover on something it changes background colors. The code I am using does not work though. I can't seem to find out why though. It should work, right?
```css
body {
margin: 0;
font-family: Arial;
font-size: 1em;
}
.navbar-ul, a {
margin: 0;
color: white;
... | 2016/09/10 | [
"https://Stackoverflow.com/questions/39427339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | ```
$ awk '{delete a; for(i=1;i<=NF;i++) a[$i]++; if(a["."]>=2) next} 1' foo
A B C D E
0 1 . 0 0
1 ./. 0 1 1
1 1 0 0 0
```
It iterates all fields (`for`), counts field values and `if` 2 or more `.` in a record, restrains from printing (`next`). If you want to count the periods only from field 3 onward, change the sta... | With awk:
```
$ awk '{c=0;for(i=1;i<NF;i++) c += ($i == ".")}c<2' file
A B C D E
0 1 . 0 0
1 ./. 0 1 1
1 1 0 0 0
```
Basically it iterates each column and add one to the counter if the column equals a period (`.`).
The `c<2` part will only print the line if there is less than two columns with periods.
With sed one... |
113,478 | I'm developing a plugin for [Hubot](http://hubot.github.com) (a scriptable chatbot) to take a URL, and display it on a Mac Mini connected to a TV in my office.
However I'm not actually sure how feasible this is. Hubot is able to send messages to APIs using HTTP. Is there a known method of allowing a Mac to listen for ... | 2013/12/11 | [
"https://apple.stackexchange.com/questions/113478",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/27983/"
] | Python is shipped with Macs, you can just use [SimpleHTTPServer](http://docs.python.org/2/library/simplehttpserver.html) to respond to HTTP requests. | Depends on what you want to do (and what Hubot can do, which I'm not familiar with) – but it seems it is possible through a combination of iChat/Messages and AppleScript to control a Mac through sending commands to a chat account which are then handled by a special script.
The original script that's provided by Apple ... |
113,478 | I'm developing a plugin for [Hubot](http://hubot.github.com) (a scriptable chatbot) to take a URL, and display it on a Mac Mini connected to a TV in my office.
However I'm not actually sure how feasible this is. Hubot is able to send messages to APIs using HTTP. Is there a known method of allowing a Mac to listen for ... | 2013/12/11 | [
"https://apple.stackexchange.com/questions/113478",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/27983/"
] | Python is shipped with Macs, you can just use [SimpleHTTPServer](http://docs.python.org/2/library/simplehttpserver.html) to respond to HTTP requests. | If you activate PHP on your mini and restart Apache, then you can send commands to the web server through http GET and POST commands. Although POST is more secure and the recommended method. I use this method to send commands from an Arduino to a mac and have it store data in a database. If you want to experiment witho... |
913,489 | The `REXML` module appears to have support for [RELAX NG validation](http://www.germane-software.com/software/rexml/doc/classes/REXML/Validation/RelaxNG.html), but the docs don't have any real information on using the validation portion of the framework.
How would you validate an XML document with a RELAX NG schema? A... | 2009/05/27 | [
"https://Stackoverflow.com/questions/913489",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3594/"
] | One option I've thought of is to use POP3's UIDL command, and have a table in SQL Server with a unique column of UIDLs that were already processed.
Then, before downloading each message, the daemon would INSERT the UIDL into the table, and, if it got an error, skip the message. (I'm assuming that SQL Server's INSERT c... | First I must admit I do not know what commands POP3 supports, but... if you can do an explicit 'DELE' and get an error if the message no longer exists, then I'd say:
* RETR the message
* DELE the message
* Process only if DELE succeeded
EDIT:
After reading RFC1939, this approach should work; from the RFC:
```
DELE ... |
101,609 | Acme Co. screens and places candidates at other companies including those fictionally-named Bravo and Tec2.
Candidate J. Doe applies for a role with Bravo, including a resume citing a lot of experience on a project at Tec2.
Acme learns that this is a serious misrepresentation, through a combination of its own knowl... | 2017/10/27 | [
"https://workplace.stackexchange.com/questions/101609",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/37509/"
] | Literally any employer could find this out by
* contacting Tec2 to verify references (even start and end date, which is all some companies do, would presumably expose the lies)
* asking the same sort of questions you asked in the interview
You don't appear to have needed or relied on your relationship with Tec2 to di... | >
> Beyond simply declining to hire the candidate, does Acme have any
> further ethical responsibilities?
>
>
>
Besides not placing the candidate, I don't think there is anything further for you to do from an ethical or just plain ole professional point of view. You definitely **can not spread the word**, so to s... |
101,609 | Acme Co. screens and places candidates at other companies including those fictionally-named Bravo and Tec2.
Candidate J. Doe applies for a role with Bravo, including a resume citing a lot of experience on a project at Tec2.
Acme learns that this is a serious misrepresentation, through a combination of its own knowl... | 2017/10/27 | [
"https://workplace.stackexchange.com/questions/101609",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/37509/"
] | >
> Beyond simply declining to hire the candidate, does Acme have any
> further ethical responsibilities?
>
>
>
Besides not placing the candidate, I don't think there is anything further for you to do from an ethical or just plain ole professional point of view. You definitely **can not spread the word**, so to s... | From a **professional** perspective, doing anything more than weeding out the candidate of your own recruitment process would be unethical.
Reason is simple: The purpose of any for-profit company is to maximize its (financial) success. It is unethical to abuse it´s resources for other goals.
Volunteering Information ... |
101,609 | Acme Co. screens and places candidates at other companies including those fictionally-named Bravo and Tec2.
Candidate J. Doe applies for a role with Bravo, including a resume citing a lot of experience on a project at Tec2.
Acme learns that this is a serious misrepresentation, through a combination of its own knowl... | 2017/10/27 | [
"https://workplace.stackexchange.com/questions/101609",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/37509/"
] | Literally any employer could find this out by
* contacting Tec2 to verify references (even start and end date, which is all some companies do, would presumably expose the lies)
* asking the same sort of questions you asked in the interview
You don't appear to have needed or relied on your relationship with Tec2 to di... | >
> Beyond simply declining to hire the candidate, does Acme have any further ethical responsibilities?
>
>
>
None at all including hiring the chap despite the dodginess. Businesses do not have clear cut ethical responsibilities. They have legal obligations. |
101,609 | Acme Co. screens and places candidates at other companies including those fictionally-named Bravo and Tec2.
Candidate J. Doe applies for a role with Bravo, including a resume citing a lot of experience on a project at Tec2.
Acme learns that this is a serious misrepresentation, through a combination of its own knowl... | 2017/10/27 | [
"https://workplace.stackexchange.com/questions/101609",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/37509/"
] | Literally any employer could find this out by
* contacting Tec2 to verify references (even start and end date, which is all some companies do, would presumably expose the lies)
* asking the same sort of questions you asked in the interview
You don't appear to have needed or relied on your relationship with Tec2 to di... | I would say: it depends.
In general, you wouldn't hunt people with misrepresentation on their resume. That could even bounce back to you. And cost a lot of money in litigation.
However, if for instance the fraud is that someone claims he's a doctor and you find out that he isn't. And you later find out he's working s... |
101,609 | Acme Co. screens and places candidates at other companies including those fictionally-named Bravo and Tec2.
Candidate J. Doe applies for a role with Bravo, including a resume citing a lot of experience on a project at Tec2.
Acme learns that this is a serious misrepresentation, through a combination of its own knowl... | 2017/10/27 | [
"https://workplace.stackexchange.com/questions/101609",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/37509/"
] | Literally any employer could find this out by
* contacting Tec2 to verify references (even start and end date, which is all some companies do, would presumably expose the lies)
* asking the same sort of questions you asked in the interview
You don't appear to have needed or relied on your relationship with Tec2 to di... | From a **professional** perspective, doing anything more than weeding out the candidate of your own recruitment process would be unethical.
Reason is simple: The purpose of any for-profit company is to maximize its (financial) success. It is unethical to abuse it´s resources for other goals.
Volunteering Information ... |
101,609 | Acme Co. screens and places candidates at other companies including those fictionally-named Bravo and Tec2.
Candidate J. Doe applies for a role with Bravo, including a resume citing a lot of experience on a project at Tec2.
Acme learns that this is a serious misrepresentation, through a combination of its own knowl... | 2017/10/27 | [
"https://workplace.stackexchange.com/questions/101609",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/37509/"
] | >
> Beyond simply declining to hire the candidate, does Acme have any further ethical responsibilities?
>
>
>
None at all including hiring the chap despite the dodginess. Businesses do not have clear cut ethical responsibilities. They have legal obligations. | From a **professional** perspective, doing anything more than weeding out the candidate of your own recruitment process would be unethical.
Reason is simple: The purpose of any for-profit company is to maximize its (financial) success. It is unethical to abuse it´s resources for other goals.
Volunteering Information ... |
101,609 | Acme Co. screens and places candidates at other companies including those fictionally-named Bravo and Tec2.
Candidate J. Doe applies for a role with Bravo, including a resume citing a lot of experience on a project at Tec2.
Acme learns that this is a serious misrepresentation, through a combination of its own knowl... | 2017/10/27 | [
"https://workplace.stackexchange.com/questions/101609",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/37509/"
] | I would say: it depends.
In general, you wouldn't hunt people with misrepresentation on their resume. That could even bounce back to you. And cost a lot of money in litigation.
However, if for instance the fraud is that someone claims he's a doctor and you find out that he isn't. And you later find out he's working s... | From a **professional** perspective, doing anything more than weeding out the candidate of your own recruitment process would be unethical.
Reason is simple: The purpose of any for-profit company is to maximize its (financial) success. It is unethical to abuse it´s resources for other goals.
Volunteering Information ... |
6,750,884 | I have to write a program which requires to maintain some data in a directed flow graph. I need to compute the maximum-flow at runtime.
I know that there exist several libraries for handling graphs, implementing almost every classical algorithm, but my problem is that my graph is dynamic, meaning it evolves at runtime... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750884",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/852457/"
] | The only article I can find on the general case of this problem is [An Incremental Algorithm for the Maximum Flow Problem](https://doi.org/10.1023/A:1023607406540), by Kumar and Gupta. It's behind a paywall, but the main idea is pretty simple. When we increase the capacity of arc *uv*, traverse the graph twice to find ... | Do you have any libraries you are already working with? If I were you I'd at least search for one implementing the **network simplex**. |
394,606 | I want to reduce size `\bigcup_{n=1}^\infty`? How can I do it?
I tried `\newcommand*{\medcap}{\mathbin{\scalebox{0.75}{\ensuremath{\bigcap}}}` | 2017/10/04 | [
"https://tex.stackexchange.com/questions/394606",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/144920/"
] | You can probably simply use the smaller version available in the font:
[](https://i.stack.imgur.com/qku5O.png)
```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
zzz
\[
\bigcup_0^n > {\textstyle \bigcup\limits_0^n} > \mathop{\cup}_0... | Maybe you want the symbol to have the same size in display style as in text style. The thread you link is for growing the symbol *bigger*.
The argument to `\reduceoperator` should be a comma separated list of *names* of operators.
```
\documentclass{article}
\usepackage{amsmath}
\usepackage{etoolbox}
\makeatletter
\... |
394,606 | I want to reduce size `\bigcup_{n=1}^\infty`? How can I do it?
I tried `\newcommand*{\medcap}{\mathbin{\scalebox{0.75}{\ensuremath{\bigcap}}}` | 2017/10/04 | [
"https://tex.stackexchange.com/questions/394606",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/144920/"
] | Maybe you want the symbol to have the same size in display style as in text style. The thread you link is for growing the symbol *bigger*.
The argument to `\reduceoperator` should be a comma separated list of *names* of operators.
```
\documentclass{article}
\usepackage{amsmath}
\usepackage{etoolbox}
\makeatletter
\... | You can use the `\medmath` command from `nccmath` or `\mathsmaller` from `relsize`:
```
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{mathtools, nccmath, relsize}
\begin{document}
\[ \bigcup_{n=1}^\infty A_n\qquad \medmath{\bigcup_{n=1}^\infty} A_n\qquad \mathsmaller{\bigcup\limits_{n=1}^\inf... |
394,606 | I want to reduce size `\bigcup_{n=1}^\infty`? How can I do it?
I tried `\newcommand*{\medcap}{\mathbin{\scalebox{0.75}{\ensuremath{\bigcap}}}` | 2017/10/04 | [
"https://tex.stackexchange.com/questions/394606",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/144920/"
] | You can probably simply use the smaller version available in the font:
[](https://i.stack.imgur.com/qku5O.png)
```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
zzz
\[
\bigcup_0^n > {\textstyle \bigcup\limits_0^n} > \mathop{\cup}_0... | You can use the `\medmath` command from `nccmath` or `\mathsmaller` from `relsize`:
```
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{mathtools, nccmath, relsize}
\begin{document}
\[ \bigcup_{n=1}^\infty A_n\qquad \medmath{\bigcup_{n=1}^\infty} A_n\qquad \mathsmaller{\bigcup\limits_{n=1}^\inf... |
7,874,701 | I have 10 html which are stored in an array...I want to display each html by means of button click...But my app got crashed.. Here is the code..
```
int xpos=10,ypos=10;
for (int i=0; i<[array count]; i++) {
UIButton *but=[UIButton buttonWithType:UIButtonTypeRoundedRect];
[but setTag:i];
but.backgroundCo... | 2011/10/24 | [
"https://Stackoverflow.com/questions/7874701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/870578/"
] | Where you are initializing the webview?
Please remove the `[webview release];` and try now. | ```
24/10/11 4:56:08 PM Loading HTML[4655] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSURL initFileURLWithPath:isDirectory:]: nil string parameter'
```
Your error log states that you are sending nil for the value **str**.
Please check the value of str. That should fix the... |
7,874,701 | I have 10 html which are stored in an array...I want to display each html by means of button click...But my app got crashed.. Here is the code..
```
int xpos=10,ypos=10;
for (int i=0; i<[array count]; i++) {
UIButton *but=[UIButton buttonWithType:UIButtonTypeRoundedRect];
[but setTag:i];
but.backgroundCo... | 2011/10/24 | [
"https://Stackoverflow.com/questions/7874701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/870578/"
] | Where you are initializing the webview?
Please remove the `[webview release];` and try now. | Looks like `[[NSBundle mainBundle] pathForResource:str ofType:@"html"]` results in nil - which means that the file could now be found in your main bundle. Make sure that file with that name and extension exists. Remember that file names are case sensitive. |
11,730,688 | Trying to get my head around some regex using JS .replace to replace an integer with a string.
For example, the string could be:
```
var string = 'image[testing][hello][0][welcome]';
```
I want to replace the '0' with another value. I was originally using this:
```
string.replace( /\[\d\]/g, '[newvalue]');
```
B... | 2012/07/30 | [
"https://Stackoverflow.com/questions/11730688",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1067182/"
] | You need to specify multiple digits:
```
string.replace( /\[\d+\]/g, '[newvalue]');
```
[JS Fiddle demo](http://jsfiddle.net/davidThomas/6AMwJ/)
(Note the demo uses jQuery to iterate through the nodes, but it's merely a convenience, and has no bearing on the regular expression, it just demonstrates its function.)
... | Use the following:
`string.replace( /\[\d+\]/g, '[newvalue]');`
That should match all digits in brackets. |
62,315,804 | I would like to hide some of these tables in my database. So i can make it look a little cleaner and simpler. i've been looking the web all over but cant find how. Does Anyone here know how can i do this? I've seen on youtube someone doing this but he never showed how he did it.
[.GACInstall("Foo.dll");`
However, what would happen if I just created ... | 2009/09/22 | [
"https://Stackoverflow.com/questions/1460793",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/177227/"
] | I *strongly* recommend using existing methods (like the ones you mentioned) because they are both supported and maintained by Microsoft and will continue to work with future releases.
A quick look at `gacutil.exe` with [Process Monitor](http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) reveals that there ... | We recently had to do this for 10s of servers in an enterprise environment. We used Wix to build a very simple MSI (seriously - 5 minutes work) and published to all server (and dev boxes) through Group Policy. |
59,835,651 | I have a view in my storyboard. By default I have set the view height to "0". Based upon my condition I need to modify the height of view to a certain height and give greater than or equal to constraint. I have tried according to this link.
[Is there is a way to create constraint greater than or equal relation through... | 2020/01/21 | [
"https://Stackoverflow.com/questions/59835651",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9804276/"
] | The best design solution for you would be to initialize member `obj` in the [initialization list](https://en.cppreference.com/w/cpp/language/initializer_list) like this:
```cpp
ClassA() : obj(someInt) { }
```
However, another option for you would be to declare the default constructor for `ClassB` like this:
```cpp
... | You initialize members in the constructor initialization list. Like so:
```
ClassA() : obj(someInt) { }
``` |
965,977 | I have 2 objects to create that are identical except for that they refer to my dev and test WCF services. Basically, these are the object for the service itself, and the object for a DTO created by the WCF data-contract.
In my test client, I create either the 2 objects related to the dev WCF service, or the 2 objects ... | 2009/06/08 | [
"https://Stackoverflow.com/questions/965977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/61639/"
] | Use an interface. | I would use an interface and have a setting in your config file that determines at run time what concrete class to create. |
965,977 | I have 2 objects to create that are identical except for that they refer to my dev and test WCF services. Basically, these are the object for the service itself, and the object for a DTO created by the WCF data-contract.
In my test client, I create either the 2 objects related to the dev WCF service, or the 2 objects ... | 2009/06/08 | [
"https://Stackoverflow.com/questions/965977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/61639/"
] | Use an interface. | or maybe a [factory pattern](http://en.wikipedia.org/wiki/Factory_method_pattern) |
965,977 | I have 2 objects to create that are identical except for that they refer to my dev and test WCF services. Basically, these are the object for the service itself, and the object for a DTO created by the WCF data-contract.
In my test client, I create either the 2 objects related to the dev WCF service, or the 2 objects ... | 2009/06/08 | [
"https://Stackoverflow.com/questions/965977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/61639/"
] | Why do you need to modify the code in your client based on which service you're connecting to? Wouldn't you just be able to have 2 different .config files? One that contains connection for dev service and one that contains connection for test service? Just switch out .config files based on test/dev mode.
Of course, th... | Use an interface. |
965,977 | I have 2 objects to create that are identical except for that they refer to my dev and test WCF services. Basically, these are the object for the service itself, and the object for a DTO created by the WCF data-contract.
In my test client, I create either the 2 objects related to the dev WCF service, or the 2 objects ... | 2009/06/08 | [
"https://Stackoverflow.com/questions/965977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/61639/"
] | Use an interface. | You could use a [Template method](http://en.wikipedia.org/wiki/Template_method_pattern), encapsulating the environment specific data for your services in subclasses.
However, this may not be a question of a pattern. It may be best to have environment-specific configuration files. |
965,977 | I have 2 objects to create that are identical except for that they refer to my dev and test WCF services. Basically, these are the object for the service itself, and the object for a DTO created by the WCF data-contract.
In my test client, I create either the 2 objects related to the dev WCF service, or the 2 objects ... | 2009/06/08 | [
"https://Stackoverflow.com/questions/965977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/61639/"
] | Why do you need to modify the code in your client based on which service you're connecting to? Wouldn't you just be able to have 2 different .config files? One that contains connection for dev service and one that contains connection for test service? Just switch out .config files based on test/dev mode.
Of course, th... | I would use an interface and have a setting in your config file that determines at run time what concrete class to create. |
965,977 | I have 2 objects to create that are identical except for that they refer to my dev and test WCF services. Basically, these are the object for the service itself, and the object for a DTO created by the WCF data-contract.
In my test client, I create either the 2 objects related to the dev WCF service, or the 2 objects ... | 2009/06/08 | [
"https://Stackoverflow.com/questions/965977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/61639/"
] | Why do you need to modify the code in your client based on which service you're connecting to? Wouldn't you just be able to have 2 different .config files? One that contains connection for dev service and one that contains connection for test service? Just switch out .config files based on test/dev mode.
Of course, th... | or maybe a [factory pattern](http://en.wikipedia.org/wiki/Factory_method_pattern) |
965,977 | I have 2 objects to create that are identical except for that they refer to my dev and test WCF services. Basically, these are the object for the service itself, and the object for a DTO created by the WCF data-contract.
In my test client, I create either the 2 objects related to the dev WCF service, or the 2 objects ... | 2009/06/08 | [
"https://Stackoverflow.com/questions/965977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/61639/"
] | Why do you need to modify the code in your client based on which service you're connecting to? Wouldn't you just be able to have 2 different .config files? One that contains connection for dev service and one that contains connection for test service? Just switch out .config files based on test/dev mode.
Of course, th... | You could use a [Template method](http://en.wikipedia.org/wiki/Template_method_pattern), encapsulating the environment specific data for your services in subclasses.
However, this may not be a question of a pattern. It may be best to have environment-specific configuration files. |
66,247,439 | Given this first dataframe `df_1`:
```
df_1 = pd.DataFrame({'id':[1,2,1,3,1],
'symbol':['A','B','C','A','A'],
'date':['2021-02-12','2021-02-09','2021-02-14','2021-02-02','2021-02-05'],
'value':[1,1,1,1,1]})
```
```
id symbol date value
0 1 ... | 2021/02/17 | [
"https://Stackoverflow.com/questions/66247439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7669782/"
] | Your `AlbumArt` struct definition is internal to the `ContentView` struct, so it is out of scope from the perspective of `PlayerView`. You might as well do the same for SongCell as well, you don't have to define it inside the `ContentView` struct.
If you move that `struct` definition to the root level of your swift fi... | I think I see you problem - you have placeholder code in your AlbumArt class:
`/*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/`
It appears in this part of your code:
```
if isWithText == true {
ZStack {
Blur(style: .dark)
Text(album.name).foregroundColor(.white)
}.frame(height: 60, alignmen... |
20,202,815 | Is there a way to execute a stored procedure every time a database is queried? I'm running SQL Server 2012
I want to be able to do something like the following:
I have database MyDB containing tables Table1 and Table2.
I've deprecated Table1, and now every time someone runs any select statement against Table1 (e.g. `... | 2013/11/25 | [
"https://Stackoverflow.com/questions/20202815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21539/"
] | When I want to do something similar to what you are talking-about, I have used a View. (eg. Rename the table from dbo.Table1 to dbo.Table1\_Orig and create a View like dbo.Table1, which is a wrapper around the table and includes a SP call or inline-function or equiv). Views can behave like a table and often seem transp... | I can think of one way to do what you want, but its pretty nasty, so as an alternative:
I'm assuming however that Table2 is effectively a replacement for Table1?
In which case, would it be possible to simply drop Table1 and replace it with a view of the same name that transforms Table2 into the shape of the original ... |
71,615,947 | ```
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("M1:N1").Columns(1).Value = "ΕΜΒΑΣΜΑ" Then
Columns("U").EntireColumn.Hidden = False
Columns("V").EntireColumn.Hidden = False
Else
Columns("U").EntireColumn.Hidden = True
Columns("V").EntireColumn.Hidden = T... | 2022/03/25 | [
"https://Stackoverflow.com/questions/71615947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7169230/"
] | **(a)** If you want to check a whole column, you need to specify the whole column, e.g. with Range("M:M").
**(b)** You can't compare a Range that contains more than one cell with a value. `If Range("M:M").Columns(1).Value = "ΕΜΒΑΣΜΑ" Then` will throw a Type mismatch error (13). That is because a Range containing mor... | on a fast hand I would go like this...
maybe someone can do it shorter...
```
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim sht As Worksheet: Set sht = ActiveSheet
Dim c As Range
With sht.Range("M1:M" & sht.Cells(sht.Rows.Count, "M").End(xlUp).Row)
Set c = .Find("XXX", LookIn:... |
41,182 | I am reading the article "K-Theory and Elliptic Operators"(http://arxiv.org/abs/math/0504555), which is about Atiyah-Singer index theorem. In page 14 the article discussed the Thom isomorphism: $$\psi:H^{k}(X)\rightarrow H^{n+k}\_{c}(E)$$ and $$\phi:K(X)\rightarrow K(E)$$ with $\psi: x \rightarrow \pi^{\*}x\* \lambda\_... | 2011/05/25 | [
"https://math.stackexchange.com/questions/41182",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/7887/"
] | ### (Re: 2)
AFAIK, the Todd class is slightly more convenient (than $\mu$) in various forms of (Grothendieck-Hirzebruch-)Riemann-Roch theorem. For example, if $f\colon X\to Y$ is a map of (compact stably almost complex) manifolds, the diagram
$$\begin{array}{ccc}
K(X) & \stackrel{ch}{\longrightarrow} & H(X;\mathbb Q... | I just wish to answer that a nice source regarding this can be found in here:
<https://mathoverflow.net/questions/60478/hirzebruchs-motivation-of-the-todd-class/60481#60481>
very ashramed that did not found this before. |
28,148,125 | I want to use the bootstrap-datepicker (<https://bootstrap-datepicker.readthedocs.org>) in my django application. I use Django 1.7.
In index.html file I have:
```
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap-theme.min.css' %}">
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap.min.css' %}">... | 2015/01/26 | [
"https://Stackoverflow.com/questions/28148125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2962768/"
] | I went through similar issue. You need to call the jquery min file before any custom jquery files. so your code would look like this.
```
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap-theme.min.css' %}">
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap.min.css' %}">
<link rel="stylesheet" h... | While there is a python package that seems to solve this quite well I chose to see if I could make the datepicker work using Django's [widget](https://docs.djangoproject.com/en/1.9/ref/forms/widgets/#widget) class to render datepicker attributes, mentioned in the [docs](https://eonasdan.github.io/bootstrap-datetimepick... |
28,148,125 | I want to use the bootstrap-datepicker (<https://bootstrap-datepicker.readthedocs.org>) in my django application. I use Django 1.7.
In index.html file I have:
```
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap-theme.min.css' %}">
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap.min.css' %}">... | 2015/01/26 | [
"https://Stackoverflow.com/questions/28148125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2962768/"
] | **Update: Warning, this suggestion uses the dateTIMEpicker instead of datepicker. I suggested this because you don't have to use the time functionality of the datetimepicker, so it was quite handy in my case.**
Since I have been trying to get datetimepicker to work (in combination with a model form) for quite some tim... | I went through similar issue. You need to call the jquery min file before any custom jquery files. so your code would look like this.
```
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap-theme.min.css' %}">
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap.min.css' %}">
<link rel="stylesheet" h... |
28,148,125 | I want to use the bootstrap-datepicker (<https://bootstrap-datepicker.readthedocs.org>) in my django application. I use Django 1.7.
In index.html file I have:
```
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap-theme.min.css' %}">
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap.min.css' %}">... | 2015/01/26 | [
"https://Stackoverflow.com/questions/28148125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2962768/"
] | **Update: Warning, this suggestion uses the dateTIMEpicker instead of datepicker. I suggested this because you don't have to use the time functionality of the datetimepicker, so it was quite handy in my case.**
Since I have been trying to get datetimepicker to work (in combination with a model form) for quite some tim... | While there is a python package that seems to solve this quite well I chose to see if I could make the datepicker work using Django's [widget](https://docs.djangoproject.com/en/1.9/ref/forms/widgets/#widget) class to render datepicker attributes, mentioned in the [docs](https://eonasdan.github.io/bootstrap-datetimepick... |
28,148,125 | I want to use the bootstrap-datepicker (<https://bootstrap-datepicker.readthedocs.org>) in my django application. I use Django 1.7.
In index.html file I have:
```
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap-theme.min.css' %}">
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap.min.css' %}">... | 2015/01/26 | [
"https://Stackoverflow.com/questions/28148125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2962768/"
] | **For DJango version 2.1, 2.0, 1.11, 1.10 and 1.8**
To use Bootstrap date-picker in your Django app install [django-bootstrap-datepicker-plus](https://github.com/monim67/django-bootstrap-datepicker-plus), follow the [installation instructions](https://github.com/monim67/django-bootstrap-datepicker-plus#installing) on ... | While there is a python package that seems to solve this quite well I chose to see if I could make the datepicker work using Django's [widget](https://docs.djangoproject.com/en/1.9/ref/forms/widgets/#widget) class to render datepicker attributes, mentioned in the [docs](https://eonasdan.github.io/bootstrap-datetimepick... |
28,148,125 | I want to use the bootstrap-datepicker (<https://bootstrap-datepicker.readthedocs.org>) in my django application. I use Django 1.7.
In index.html file I have:
```
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap-theme.min.css' %}">
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap.min.css' %}">... | 2015/01/26 | [
"https://Stackoverflow.com/questions/28148125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2962768/"
] | (*Django 2.1, 1.11* and python >*2.7* and > *3.4* compatible) Working and **reusable** solution, custom from [bootstrap-datepicker](https://bootstrap-datepicker.readthedocs.io/en/latest/index.html):
```
import re
from django.conf import settings
from django.utils.translation import get_language
from django import form... | While there is a python package that seems to solve this quite well I chose to see if I could make the datepicker work using Django's [widget](https://docs.djangoproject.com/en/1.9/ref/forms/widgets/#widget) class to render datepicker attributes, mentioned in the [docs](https://eonasdan.github.io/bootstrap-datetimepick... |
28,148,125 | I want to use the bootstrap-datepicker (<https://bootstrap-datepicker.readthedocs.org>) in my django application. I use Django 1.7.
In index.html file I have:
```
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap-theme.min.css' %}">
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap.min.css' %}">... | 2015/01/26 | [
"https://Stackoverflow.com/questions/28148125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2962768/"
] | **Update: Warning, this suggestion uses the dateTIMEpicker instead of datepicker. I suggested this because you don't have to use the time functionality of the datetimepicker, so it was quite handy in my case.**
Since I have been trying to get datetimepicker to work (in combination with a model form) for quite some tim... | **For DJango version 2.1, 2.0, 1.11, 1.10 and 1.8**
To use Bootstrap date-picker in your Django app install [django-bootstrap-datepicker-plus](https://github.com/monim67/django-bootstrap-datepicker-plus), follow the [installation instructions](https://github.com/monim67/django-bootstrap-datepicker-plus#installing) on ... |
28,148,125 | I want to use the bootstrap-datepicker (<https://bootstrap-datepicker.readthedocs.org>) in my django application. I use Django 1.7.
In index.html file I have:
```
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap-theme.min.css' %}">
<link rel="stylesheet" href="{% static 'my_app/css/bootstrap.min.css' %}">... | 2015/01/26 | [
"https://Stackoverflow.com/questions/28148125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2962768/"
] | **Update: Warning, this suggestion uses the dateTIMEpicker instead of datepicker. I suggested this because you don't have to use the time functionality of the datetimepicker, so it was quite handy in my case.**
Since I have been trying to get datetimepicker to work (in combination with a model form) for quite some tim... | (*Django 2.1, 1.11* and python >*2.7* and > *3.4* compatible) Working and **reusable** solution, custom from [bootstrap-datepicker](https://bootstrap-datepicker.readthedocs.io/en/latest/index.html):
```
import re
from django.conf import settings
from django.utils.translation import get_language
from django import form... |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | The escape velocity at the moon's surface is about 2.4 km/s. The mean speed of oxygen at 293 K is about 0.48 km/s.
A commonly quoted rule of thumb says that the escape velocity needs to be 6 times the gas's mean velocity in order for that gas to remain captive to gravity and the values I quoted are related by a factor... | The speed of oxygen at room temperature (293k) is 1720km per hour so if the escape velocity of the moon or planet is greater than that then at least you will have oxygen. If you want some nitrogen in the mix then you will have to google it's speed like I did for oxygen;-) |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | The gravity of a planet holds the atmosphere in place. The moon doesn't have enough mass / gravity to do so. If you moved air to the moon there's so little gravity the air would simply float away. | The speed of oxygen at room temperature (293k) is 1720km per hour so if the escape velocity of the moon or planet is greater than that then at least you will have oxygen. If you want some nitrogen in the mix then you will have to google it's speed like I did for oxygen;-) |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | The escape velocity at the moon's surface is about 2.4 km/s. The mean speed of oxygen at 293 K is about 0.48 km/s.
A commonly quoted rule of thumb says that the escape velocity needs to be 6 times the gas's mean velocity in order for that gas to remain captive to gravity and the values I quoted are related by a factor... | The gravity of a planet holds the atmosphere in place. The moon doesn't have enough mass / gravity to do so. If you moved air to the moon there's so little gravity the air would simply float away. |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | The escape velocity at the moon's surface is about 2.4 km/s. The mean speed of oxygen at 293 K is about 0.48 km/s.
A commonly quoted rule of thumb says that the escape velocity needs to be 6 times the gas's mean velocity in order for that gas to remain captive to gravity and the values I quoted are related by a factor... | The moon has 85% of the gravity of Titan (which has a thick hydrocarbon atmosphere), so I cannot believe for 1 second that it's gravity is too weak to retain a viable atmosphere.
Factors like Sola winds stripping the atmosphere due to lack of protection from a magnetic field, is a valid explanation, but low gravity ca... |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | The moon has 85% of the gravity of Titan (which has a thick hydrocarbon atmosphere), so I cannot believe for 1 second that it's gravity is too weak to retain a viable atmosphere.
Factors like Sola winds stripping the atmosphere due to lack of protection from a magnetic field, is a valid explanation, but low gravity ca... | The speed of oxygen at room temperature (293k) is 1720km per hour so if the escape velocity of the moon or planet is greater than that then at least you will have oxygen. If you want some nitrogen in the mix then you will have to google it's speed like I did for oxygen;-) |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | Gravity is a major factor in planets retaining atmospheres over the eons. But there are other factors that must be taken into consideration to consider the volatility of an atmosphere.
Solar wind is the main factor of erosion on any atmosphere. But a healthy magnetic field can deflect most of the solar radiation and d... | The escape velocity at the moon's surface is about 2.4 km/s. The mean speed of oxygen at 293 K is about 0.48 km/s.
A commonly quoted rule of thumb says that the escape velocity needs to be 6 times the gas's mean velocity in order for that gas to remain captive to gravity and the values I quoted are related by a factor... |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | Gravity is a major factor in planets retaining atmospheres over the eons. But there are other factors that must be taken into consideration to consider the volatility of an atmosphere.
Solar wind is the main factor of erosion on any atmosphere. But a healthy magnetic field can deflect most of the solar radiation and d... | The gravity of a planet holds the atmosphere in place. The moon doesn't have enough mass / gravity to do so. If you moved air to the moon there's so little gravity the air would simply float away. |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | Gravity is a major factor in planets retaining atmospheres over the eons. But there are other factors that must be taken into consideration to consider the volatility of an atmosphere.
Solar wind is the main factor of erosion on any atmosphere. But a healthy magnetic field can deflect most of the solar radiation and d... | The moon has 85% of the gravity of Titan (which has a thick hydrocarbon atmosphere), so I cannot believe for 1 second that it's gravity is too weak to retain a viable atmosphere.
Factors like Sola winds stripping the atmosphere due to lack of protection from a magnetic field, is a valid explanation, but low gravity ca... |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | The escape velocity at the moon's surface is about 2.4 km/s. The mean speed of oxygen at 293 K is about 0.48 km/s.
A commonly quoted rule of thumb says that the escape velocity needs to be 6 times the gas's mean velocity in order for that gas to remain captive to gravity and the values I quoted are related by a factor... | I guess the devil is in the details. For example, if the celestial body in question is far from its star, so its temperature is very low, it is easier to retain low-temperature air around the body. On the other hand, very cold air is not breathable anyway. There is another way though. If the astronauts can bring so muc... |
52,527 | If astronauts could deliver a large quantity of breathable air to somewhere with lower gravity, such as Earth's moon, would the air form an atmosphere, or would it float away and disappear? Is there a minimum amount of gravity necessary to trap a breathable atmosphere on a planet? | 2013/01/30 | [
"https://physics.stackexchange.com/questions/52527",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/20378/"
] | Gravity is a major factor in planets retaining atmospheres over the eons. But there are other factors that must be taken into consideration to consider the volatility of an atmosphere.
Solar wind is the main factor of erosion on any atmosphere. But a healthy magnetic field can deflect most of the solar radiation and d... | I guess the devil is in the details. For example, if the celestial body in question is far from its star, so its temperature is very low, it is easier to retain low-temperature air around the body. On the other hand, very cold air is not breathable anyway. There is another way though. If the astronauts can bring so muc... |
73,287,723 | ```
Warning: Trying to access array offset on value of type null in
```
C:\xampp\htdocs\ecommerce\_cms\_tutorial\register.php on line 172
}elseif ($row\_register['email'] != $email && $password == $confirm\_password) { | 2022/08/09 | [
"https://Stackoverflow.com/questions/73287723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19407065/"
] | Given the following `application.properties` example file
```ini
toto="some value"
accessToken="atoken"
pipo="other value"
bingo=1
```
the following `sed` command:
```
sed -i 's/^\(accessToken=\).*$/\1"abcd123"/' application.properties
```
gives as a result (i.e. `cat application.properties`)
```ini
toto="some v... | ```
sed -i /s/testtobechanged/textwanted/g applications.proteries
``` |
2,920,178 | Why html agility pack is used to parse the information from the html file ? Is not there inbuilt or native library in the .net to parse the information from the html file ? If there then what is the problem with inbuilt support ? What the benefits of using html agility pack versus inbuilt support for parsing informatio... | 2010/05/27 | [
"https://Stackoverflow.com/questions/2920178",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/227848/"
] | There is no html parser in the BCL, which is why the HTML Agility Pack is recommended by so many. | In one of my applications, I have an HTML template saved in an HTML file. I load it and replace some nodes markers with the values. In this cases I do use .NET XMLDocuments and it works fine. At least in this controlled environment. I don't know what would happen if I tried to parse malformed HTML's.
This is a sample ... |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | The following command will be helpful:
```
git log -1 --format=%cd
```
This will print the latest change date for one file. The -1 shows one log entry (the most recent), and `--format=%cd` shows the commit date.
See the documentation for [git-log](https://git-scm.com/docs/git-log) for a full description of the opti... | Get the last commit date:
-------------------------
You want the "repository wide last commit date for a given git user and git project, for a given branch. For example the date is shown at the top when you visit your repo and go to `commits -> master` for example:
<https://github.com/sentientmachine/TeslaAverageGain... |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | The following command will be helpful:
```
git log -1 --format=%cd
```
This will print the latest change date for one file. The -1 shows one log entry (the most recent), and `--format=%cd` shows the commit date.
See the documentation for [git-log](https://git-scm.com/docs/git-log) for a full description of the opti... | ### To get the last commit date from git repository in a long(Unix epoch timestamp)
* **Command:** `git log -1 --format=%ct`
* **Result:** `1605103148`
**Note:** You can visit the [git-log](https://git-scm.com/docs/git-log) documentation to get a more detailed description of the options. |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | The following command will be helpful:
```
git log -1 --format=%cd
```
This will print the latest change date for one file. The -1 shows one log entry (the most recent), and `--format=%cd` shows the commit date.
See the documentation for [git-log](https://git-scm.com/docs/git-log) for a full description of the opti... | *git log -1* will give you the Merge id, Author and Date
*git log -1 --format=%cd* will give the output as below
**Wed Apr 13 15:32:54 2022 +0530**
We can format the date as below:
*git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d %H:%M:%S'*
output
**2022-04-13 15:32:54** |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | The following command will be helpful:
```
git log -1 --format=%cd
```
This will print the latest change date for one file. The -1 shows one log entry (the most recent), and `--format=%cd` shows the commit date.
See the documentation for [git-log](https://git-scm.com/docs/git-log) for a full description of the opti... | Late to the party but here's how to get the UNIX timestamp of the latest remote commit:
```
git log -1 --date=raw origin/master | grep ^Date | tr -s ' ' | cut -d ' ' -f2
``` |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | Get the last commit date:
-------------------------
You want the "repository wide last commit date for a given git user and git project, for a given branch. For example the date is shown at the top when you visit your repo and go to `commits -> master` for example:
<https://github.com/sentientmachine/TeslaAverageGain... | ### To get the last commit date from git repository in a long(Unix epoch timestamp)
* **Command:** `git log -1 --format=%ct`
* **Result:** `1605103148`
**Note:** You can visit the [git-log](https://git-scm.com/docs/git-log) documentation to get a more detailed description of the options. |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | Get the last commit date:
-------------------------
You want the "repository wide last commit date for a given git user and git project, for a given branch. For example the date is shown at the top when you visit your repo and go to `commits -> master` for example:
<https://github.com/sentientmachine/TeslaAverageGain... | *git log -1* will give you the Merge id, Author and Date
*git log -1 --format=%cd* will give the output as below
**Wed Apr 13 15:32:54 2022 +0530**
We can format the date as below:
*git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d %H:%M:%S'*
output
**2022-04-13 15:32:54** |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | Get the last commit date:
-------------------------
You want the "repository wide last commit date for a given git user and git project, for a given branch. For example the date is shown at the top when you visit your repo and go to `commits -> master` for example:
<https://github.com/sentientmachine/TeslaAverageGain... | Late to the party but here's how to get the UNIX timestamp of the latest remote commit:
```
git log -1 --date=raw origin/master | grep ^Date | tr -s ' ' | cut -d ' ' -f2
``` |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | ### To get the last commit date from git repository in a long(Unix epoch timestamp)
* **Command:** `git log -1 --format=%ct`
* **Result:** `1605103148`
**Note:** You can visit the [git-log](https://git-scm.com/docs/git-log) documentation to get a more detailed description of the options. | *git log -1* will give you the Merge id, Author and Date
*git log -1 --format=%cd* will give the output as below
**Wed Apr 13 15:32:54 2022 +0530**
We can format the date as below:
*git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d %H:%M:%S'*
output
**2022-04-13 15:32:54** |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | ### To get the last commit date from git repository in a long(Unix epoch timestamp)
* **Command:** `git log -1 --format=%ct`
* **Result:** `1605103148`
**Note:** You can visit the [git-log](https://git-scm.com/docs/git-log) documentation to get a more detailed description of the options. | Late to the party but here's how to get the UNIX timestamp of the latest remote commit:
```
git log -1 --date=raw origin/master | grep ^Date | tr -s ' ' | cut -d ' ' -f2
``` |
25,563,455 | I need the last commit date in git. This means the latest update date in my program.
I used the command : $ `git log -1` but this command will give me the date from the local repository. Rather I need date from remote repository.
I tried some commands as follow.
```
git log -n 1 origin/Sprint-6.
git rev-parse --ver... | 2014/08/29 | [
"https://Stackoverflow.com/questions/25563455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3989297/"
] | Late to the party but here's how to get the UNIX timestamp of the latest remote commit:
```
git log -1 --date=raw origin/master | grep ^Date | tr -s ' ' | cut -d ' ' -f2
``` | *git log -1* will give you the Merge id, Author and Date
*git log -1 --format=%cd* will give the output as below
**Wed Apr 13 15:32:54 2022 +0530**
We can format the date as below:
*git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d %H:%M:%S'*
output
**2022-04-13 15:32:54** |
7,420,815 | I am looking for a nice and fast way of applying some arbitrary function which operates on vectors, such as `sum`, consecutively to a subvector of consecutive K elements.
Here is one simple example, which should illustrate very clearly what I want:
```
v <- c(1, 2, 3, 4, 5, 6, 7, 8)
v2 <- myapply(v, sum, group_size=3... | 2011/09/14 | [
"https://Stackoverflow.com/questions/7420815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/395744/"
] | Try this:
```
library(zoo)
rollapply(v, 3, by = 3, sum, partial = TRUE, align = "left")
## [1] 6 15 15
```
or
```
apply(matrix(c(v, rep(NA, 3 - length(v) %% 3)), 3), 2, sum, na.rm = TRUE)
## [1] 6 15 15
```
Also, in the case of `sum` the last one could be shortened to
```
colSums(matrix(c(v, rep(0, 3 - length(... | As @Chase said in a comment, you can create your own grouping variable and then use that. Wrapping that process into a function would look like
```
myapply <- function(v, fun, group_size=1) {
unname(tapply(v, (seq_along(v)-1) %/% group_size, fun))
}
```
which gives your results
```
> myapply(v, sum, group_size=... |
7,420,815 | I am looking for a nice and fast way of applying some arbitrary function which operates on vectors, such as `sum`, consecutively to a subvector of consecutive K elements.
Here is one simple example, which should illustrate very clearly what I want:
```
v <- c(1, 2, 3, 4, 5, 6, 7, 8)
v2 <- myapply(v, sum, group_size=3... | 2011/09/14 | [
"https://Stackoverflow.com/questions/7420815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/395744/"
] | Try this:
```
library(zoo)
rollapply(v, 3, by = 3, sum, partial = TRUE, align = "left")
## [1] 6 15 15
```
or
```
apply(matrix(c(v, rep(NA, 3 - length(v) %% 3)), 3), 2, sum, na.rm = TRUE)
## [1] 6 15 15
```
Also, in the case of `sum` the last one could be shortened to
```
colSums(matrix(c(v, rep(0, 3 - length(... | You could try this as well. This works nicely even if you want to include overlapping intervals, as controlled by `by`, and as a bonus, returns the intervals over which each value is derived:
```
library (gtools)
v2 <- running(v, fun=sum, width=3, align="left", allow.fewer=TRUE, by=3)
v2
1:3 4:6 7:8
6 15 15
``... |
7,420,815 | I am looking for a nice and fast way of applying some arbitrary function which operates on vectors, such as `sum`, consecutively to a subvector of consecutive K elements.
Here is one simple example, which should illustrate very clearly what I want:
```
v <- c(1, 2, 3, 4, 5, 6, 7, 8)
v2 <- myapply(v, sum, group_size=3... | 2011/09/14 | [
"https://Stackoverflow.com/questions/7420815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/395744/"
] | As @Chase said in a comment, you can create your own grouping variable and then use that. Wrapping that process into a function would look like
```
myapply <- function(v, fun, group_size=1) {
unname(tapply(v, (seq_along(v)-1) %/% group_size, fun))
}
```
which gives your results
```
> myapply(v, sum, group_size=... | You could try this as well. This works nicely even if you want to include overlapping intervals, as controlled by `by`, and as a bonus, returns the intervals over which each value is derived:
```
library (gtools)
v2 <- running(v, fun=sum, width=3, align="left", allow.fewer=TRUE, by=3)
v2
1:3 4:6 7:8
6 15 15
``... |
7,861,398 | well I have a counter of collision between two images (the counter is the score of my game) and I would like to `do something` every time the counter is 1000, or 2000 or 3000 ... every ten thousands.How can I do this please ? | 2011/10/22 | [
"https://Stackoverflow.com/questions/7861398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/956450/"
] | You say 10,000 but you write 1000, here is what I would do for 1000:
```
if (counter % 1000 == 0) {
//Do something.
}
```
For 10,000 do:
```
if (counter % 10000 == 0) {
//Do something.
}
``` | ```
if(counter%1000 == 0) {
//do something
}
``` |
40,990 | In Revelation "kyrios" is used some 21 times e.g. Rev 16v7. It is mostly translated "lord". In the N.K.J.V. in Rev 6v10 a word is also translated "lord" but this time it is "despotes" not "kyrios". Kyrios is well established [21 times] so is there some special significance to the only time that despotes is used in Reve... | 2019/06/06 | [
"https://hermeneutics.stackexchange.com/questions/40990",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/25763/"
] | Thayer has an interesting comment to make about the difference between the two words :
>
> I Tim 6:1, II Timothy 2:21, Titus 2:9, I Pet 2:18 .... God is thus addressed '*despotes*' by one who calls himself '*doulos*' (a bondman).
>
>
> Christ is called '*despotes*' as one who has bought (sic, I would say 'redeemed)... | The word δεσπότης (despotés) occurs about 10 times in the GNT and is used as a title for Jesus/Messiah/God in these places: Luke 2:29 ("Lord's Christ"), Acts 4:24, 2 Tim 2:21, Jude 4, Rev 6:10. In the other instances, it refers to an earthly person such as a slave owner or master of the household. Jude 4 is significant... |
55,238,689 | I have a slider and every time I click on one slide I want to get the current active index. Based on the current index I want to set the state, but I keep getting `Maximum update depth exceeded`.
```
state = {
profiles: profileData,
educations: educationData,
selectedProfile: localStorage.getItem('slug'),
... | 2019/03/19 | [
"https://Stackoverflow.com/questions/55238689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You are checking if `slideActive` in state is true in `componentDidUpdate`, and if it is you call `setState`, which will result in a new call to `componentDidUpdate`, and the loop continues.
You also want to check that `slideActive` actually changed from the previous update.
```
componentDidUpdate(prevProps, prevStat... | You should put you logic inside `componentDidMount` inside a condition comparing old state to new or old vs new props to avoid it:
>
> You may call setState() immediately in componentDidUpdate() but note that it must be wrapped in a condition, or you’ll cause an infinite loop.
>
>
>
more read and examples: [React... |
43,890,476 | I work in a company and our app is localizable, but we have encountered a problem.
Original language is PL and we have EN translation in satellite assemblies (\*.resource files translated using Sisulizer).
When we run our app without changing language on english OS, our app is translated to EN in some places and I ... | 2017/05/10 | [
"https://Stackoverflow.com/questions/43890476",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7991184/"
] | Store the random String in a local variable and use that in the `p.teleport`. Code would look like this:
```
String randomString = plugin.getRandomStringFromList(plugin.getLocationList());
p.teleport(new Location(Bukkit.getWorld("world"),
plugin.getConfig().getInt("locations." + randomString + ".x"),
plugin.getC... | This is because you are randomizing "get location" on 3 different instance in the same line
What you could do is that you could save the results of the first instance and reuse it
```
var location = plugin.getRandomStringFromList(plugin.getLocationList());
p.teleport(new Location(Bukkit.getWorld("world"),
plugin.g... |
20,211,286 | I've been able to work most of the problems out, but I've encountered a few that I'm uncertain as to how to address.
Let me explain: I have an example file that contains all the non-distinct combinations of the lower case alphabet up to length two (i.e. `aa, ab, ac, ad...`). The total number of non-distinct combinatio... | 2013/11/26 | [
"https://Stackoverflow.com/questions/20211286",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1599549/"
] | Just reposition ur UL outside foreach
```
function GenerateNavHTML($rows ,$count=5)
{
$html = '';
$html .= '<div><ul>';
$ctr = 0;
foreach($rows as $key =>$value)
{
if(!$ctr)
$html .= "<ul>";
$html .='<li>';
$html .= '<a href="' . $value['title'] . '">' . $valu... | If I understand you correctly, this should do it:
```
foreach($rows as $key =>$value){
if(count($rows) > $count){
$html .= '<ul>';
}
$html .='<li>';
$html .= '<a href="' . $value['title'] . '">' . $value['title'] . '</a>';
$html .= '</li>';
if(count($rows) > $count){
$html .= ... |
20,211,286 | I've been able to work most of the problems out, but I've encountered a few that I'm uncertain as to how to address.
Let me explain: I have an example file that contains all the non-distinct combinations of the lower case alphabet up to length two (i.e. `aa, ab, ac, ad...`). The total number of non-distinct combinatio... | 2013/11/26 | [
"https://Stackoverflow.com/questions/20211286",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1599549/"
] | Just reposition ur UL outside foreach
```
function GenerateNavHTML($rows ,$count=5)
{
$html = '';
$html .= '<div><ul>';
$ctr = 0;
foreach($rows as $key =>$value)
{
if(!$ctr)
$html .= "<ul>";
$html .='<li>';
$html .= '<a href="' . $value['title'] . '">' . $valu... | Just move the parts you don´t want to be repeated to outside the foreach-loop, i.e.
```
function GenerateNavHTML($rows ,$count=5)
{
$html .= '<div><ul>';
...
```
while inside the loop you start right with the `<li>...</li>` |
34,350,527 | I'm building a form that should support entering attributes for multiple instances of the same product. To allow a user to create an arbitrary number of instances I'm using `ng-repeat` and building an additional version of the form when an "add version" button is clicked. For static inputs this works as expected as a n... | 2015/12/18 | [
"https://Stackoverflow.com/questions/34350527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1888712/"
] | I think you'll be able to fix the issue as shown below. Key change is that, youshould pass the `version` object to the `addInput` method and add feature to that instance.
I strongly suggest creating a directive for this task.
```js
angular.module('Form', []).controller('multipleVersions', function($scope) {
$scop... | I think you're just overrating the variable instance...
When you working with ng-repeat, Its recommendable to you work with the repeater variable...
Can you try this?
```
<form>
<input type="text" ng-model="name" placeholder="Product Name">
<textarea ng-model="description" placeholder="Product Description"... |
34,350,527 | I'm building a form that should support entering attributes for multiple instances of the same product. To allow a user to create an arbitrary number of instances I'm using `ng-repeat` and building an additional version of the form when an "add version" button is clicked. For static inputs this works as expected as a n... | 2015/12/18 | [
"https://Stackoverflow.com/questions/34350527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1888712/"
] | I think you'll be able to fix the issue as shown below. Key change is that, youshould pass the `version` object to the `addInput` method and add feature to that instance.
I strongly suggest creating a directive for this task.
```js
angular.module('Form', []).controller('multipleVersions', function($scope) {
$scop... | Thanks to everyone who helped. None of the solutions suggested covered everything however they definitely pushed me to the answer. Separate questions and solutions broken out below and a working version of the original <http://plnkr.co/edit/T74bfNXxpYs16ENNUEjv?p=preview>:
Duplication Of Dynamically Added Inputs: This... |
34,350,527 | I'm building a form that should support entering attributes for multiple instances of the same product. To allow a user to create an arbitrary number of instances I'm using `ng-repeat` and building an additional version of the form when an "add version" button is clicked. For static inputs this works as expected as a n... | 2015/12/18 | [
"https://Stackoverflow.com/questions/34350527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1888712/"
] | I think you're just overrating the variable instance...
When you working with ng-repeat, Its recommendable to you work with the repeater variable...
Can you try this?
```
<form>
<input type="text" ng-model="name" placeholder="Product Name">
<textarea ng-model="description" placeholder="Product Description"... | Thanks to everyone who helped. None of the solutions suggested covered everything however they definitely pushed me to the answer. Separate questions and solutions broken out below and a working version of the original <http://plnkr.co/edit/T74bfNXxpYs16ENNUEjv?p=preview>:
Duplication Of Dynamically Added Inputs: This... |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | Unfortunately, TeX does not provide commands for such information; the only way to get such information is
1. by running a non-TeX script to create a TeX file *before* running LaTeX and including this file in your main LaTeX document somehow, or
2. by running the external script *from* TeX (which only works if the so... | thank dmckee
```
LATEX_SRCS = test.tex
define moddate
date +%Y%m%d%H%M%S
endef
today.sty: $(LATEX_SRCS)
@echo "\def\moddate{"$(shell $(moddate))"}"> $@
``` |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | The package [filemod](http://www.ctan.org/tex-archive/macros/latex/contrib/filemod) seems to do exactly what you need. To get the last modified date of the file you just include the package in the usual way:
```
\usepackage{filemod}
```
and the modification time of the current document is printed by:
```
\filemodpr... | thank dmckee
```
LATEX_SRCS = test.tex
define moddate
date +%Y%m%d%H%M%S
endef
today.sty: $(LATEX_SRCS)
@echo "\def\moddate{"$(shell $(moddate))"}"> $@
``` |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | Unfortunately, TeX does not provide commands for such information; the only way to get such information is
1. by running a non-TeX script to create a TeX file *before* running LaTeX and including this file in your main LaTeX document somehow, or
2. by running the external script *from* TeX (which only works if the so... | If you are using an automated build system, you could ask it to generate a file (perhaps named `today.sty`) which depends on all the source files.
In make that might look like:
```
today.sty: $LATEX_SRCS
echo "\date{" > $@
date +D >> $@
echo "}" >> $@
```
and `\usepackage{today.sty}`.
The w... |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | pdfTeX provides the primitive `\pdffilemoddate` to query this information for files. (LuaTeX uses its own Lua functions for the same thing.) Since pdfTeX is used by default in all LaTeX distributions in the last few years (at least), there's no harm in using the new functionality unless you're dealing with very old pro... | If you are using an automated build system, you could ask it to generate a file (perhaps named `today.sty`) which depends on all the source files.
In make that might look like:
```
today.sty: $LATEX_SRCS
echo "\date{" > $@
date +D >> $@
echo "}" >> $@
```
and `\usepackage{today.sty}`.
The w... |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | The package [filemod](http://www.ctan.org/tex-archive/macros/latex/contrib/filemod) seems to do exactly what you need. To get the last modified date of the file you just include the package in the usual way:
```
\usepackage{filemod}
```
and the modification time of the current document is printed by:
```
\filemodpr... | If you are using an automated build system, you could ask it to generate a file (perhaps named `today.sty`) which depends on all the source files.
In make that might look like:
```
today.sty: $LATEX_SRCS
echo "\date{" > $@
date +D >> $@
echo "}" >> $@
```
and `\usepackage{today.sty}`.
The w... |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | The package [filemod](http://www.ctan.org/tex-archive/macros/latex/contrib/filemod) seems to do exactly what you need. To get the last modified date of the file you just include the package in the usual way:
```
\usepackage{filemod}
```
and the modification time of the current document is printed by:
```
\filemodpr... | There is the [getfiledate](http://tug.ctan.org/tex-archive/macros/latex/contrib/getfiledate/) LaTeX package (it was part of my LaTeX distribution by default). It seems to be designed to automatically output a paragraph like:
```
The date of last modification of file misc-test1.tex was 2009-10-11 21:45:50.
```
with ... |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | If you are using an automated build system, you could ask it to generate a file (perhaps named `today.sty`) which depends on all the source files.
In make that might look like:
```
today.sty: $LATEX_SRCS
echo "\date{" > $@
date +D >> $@
echo "}" >> $@
```
and `\usepackage{today.sty}`.
The w... | There is the [getfiledate](http://tug.ctan.org/tex-archive/macros/latex/contrib/getfiledate/) LaTeX package (it was part of my LaTeX distribution by default). It seems to be designed to automatically output a paragraph like:
```
The date of last modification of file misc-test1.tex was 2009-10-11 21:45:50.
```
with ... |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | pdfTeX provides the primitive `\pdffilemoddate` to query this information for files. (LuaTeX uses its own Lua functions for the same thing.) Since pdfTeX is used by default in all LaTeX distributions in the last few years (at least), there's no harm in using the new functionality unless you're dealing with very old pro... | thank dmckee
```
LATEX_SRCS = test.tex
define moddate
date +%Y%m%d%H%M%S
endef
today.sty: $(LATEX_SRCS)
@echo "\def\moddate{"$(shell $(moddate))"}"> $@
``` |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | pdfTeX provides the primitive `\pdffilemoddate` to query this information for files. (LuaTeX uses its own Lua functions for the same thing.) Since pdfTeX is used by default in all LaTeX distributions in the last few years (at least), there's no harm in using the new functionality unless you're dealing with very old pro... | There is the [getfiledate](http://tug.ctan.org/tex-archive/macros/latex/contrib/getfiledate/) LaTeX package (it was part of my LaTeX distribution by default). It seems to be designed to automatically output a paragraph like:
```
The date of last modification of file misc-test1.tex was 2009-10-11 21:45:50.
```
with ... |
2,118,972 | Is there a LaTeX command that prints the "last modified" date of the actual document? Since LaTeX projects consist of more than one file this command ideally prints the date of the actual file, not that of the project. | 2010/01/22 | [
"https://Stackoverflow.com/questions/2118972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46428/"
] | If you are using an automated build system, you could ask it to generate a file (perhaps named `today.sty`) which depends on all the source files.
In make that might look like:
```
today.sty: $LATEX_SRCS
echo "\date{" > $@
date +D >> $@
echo "}" >> $@
```
and `\usepackage{today.sty}`.
The w... | thank dmckee
```
LATEX_SRCS = test.tex
define moddate
date +%Y%m%d%H%M%S
endef
today.sty: $(LATEX_SRCS)
@echo "\def\moddate{"$(shell $(moddate))"}"> $@
``` |
70,886,556 | I have two dataframes in the following form:
df1
| id | name | df2\_id |
| --- | --- | --- |
| one | foo | template\_x |
| two | bar | template\_y |
| three | baz | template\_z |
df2
| id | name | value |
| --- | --- | --- |
| template\_x | aaa | zzz |
| template\_x | bbb | yyy |
| template\_y | ccc | xxx |
| templ... | 2022/01/27 | [
"https://Stackoverflow.com/questions/70886556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15936178/"
] | You may want to investigate redux form and/or `connect()`
Example:
```
import React from 'react';
import { useForm } from 'react-hook-form';
import { connect } from 'react-redux';
const Form = ({ register, handleSubmit }) => {
const methods = useForm();
return (
<form onSubmit={handleSubmit(register)}>...</... | ```
function handleForm(e) {
e.preventDefault()
// your code here
}
<button onClick={()=>{document.forms[0].submit()}} >Submit</button>
<form onSubmit={handleForm} >...</form>
```
For haters who dislike the answer:
```
const formRef=useRef();
function handleForm(e) {
e.preventDefault()
// your code here
}
<butto... |
70,886,556 | I have two dataframes in the following form:
df1
| id | name | df2\_id |
| --- | --- | --- |
| one | foo | template\_x |
| two | bar | template\_y |
| three | baz | template\_z |
df2
| id | name | value |
| --- | --- | --- |
| template\_x | aaa | zzz |
| template\_x | bbb | yyy |
| template\_y | ccc | xxx |
| templ... | 2022/01/27 | [
"https://Stackoverflow.com/questions/70886556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15936178/"
] | Just create a ref in the parent component, send it to the child component and assign that ref to an invisible submit button.
Finally, in the onClick event of the parent submit button simply call submitRef.current.click()
```
// ./From.js
import React from 'react';
import { useForm } from 'react-hook-form';
// This i... | You may want to investigate redux form and/or `connect()`
Example:
```
import React from 'react';
import { useForm } from 'react-hook-form';
import { connect } from 'react-redux';
const Form = ({ register, handleSubmit }) => {
const methods = useForm();
return (
<form onSubmit={handleSubmit(register)}>...</... |
70,886,556 | I have two dataframes in the following form:
df1
| id | name | df2\_id |
| --- | --- | --- |
| one | foo | template\_x |
| two | bar | template\_y |
| three | baz | template\_z |
df2
| id | name | value |
| --- | --- | --- |
| template\_x | aaa | zzz |
| template\_x | bbb | yyy |
| template\_y | ccc | xxx |
| templ... | 2022/01/27 | [
"https://Stackoverflow.com/questions/70886556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15936178/"
] | The simplest way to do this is by raising the form state to the closest parent between the two components, then you can pass the change and submit handlers down to the requisite components.
See <https://reactjs.org/docs/lifting-state-up.html>
In the case of `react-hook-form` that means calling `useForm` in that highe... | ```
function handleForm(e) {
e.preventDefault()
// your code here
}
<button onClick={()=>{document.forms[0].submit()}} >Submit</button>
<form onSubmit={handleForm} >...</form>
```
For haters who dislike the answer:
```
const formRef=useRef();
function handleForm(e) {
e.preventDefault()
// your code here
}
<butto... |
70,886,556 | I have two dataframes in the following form:
df1
| id | name | df2\_id |
| --- | --- | --- |
| one | foo | template\_x |
| two | bar | template\_y |
| three | baz | template\_z |
df2
| id | name | value |
| --- | --- | --- |
| template\_x | aaa | zzz |
| template\_x | bbb | yyy |
| template\_y | ccc | xxx |
| templ... | 2022/01/27 | [
"https://Stackoverflow.com/questions/70886556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15936178/"
] | Just create a ref in the parent component, send it to the child component and assign that ref to an invisible submit button.
Finally, in the onClick event of the parent submit button simply call submitRef.current.click()
```
// ./From.js
import React from 'react';
import { useForm } from 'react-hook-form';
// This i... | ```
function handleForm(e) {
e.preventDefault()
// your code here
}
<button onClick={()=>{document.forms[0].submit()}} >Submit</button>
<form onSubmit={handleForm} >...</form>
```
For haters who dislike the answer:
```
const formRef=useRef();
function handleForm(e) {
e.preventDefault()
// your code here
}
<butto... |
70,886,556 | I have two dataframes in the following form:
df1
| id | name | df2\_id |
| --- | --- | --- |
| one | foo | template\_x |
| two | bar | template\_y |
| three | baz | template\_z |
df2
| id | name | value |
| --- | --- | --- |
| template\_x | aaa | zzz |
| template\_x | bbb | yyy |
| template\_y | ccc | xxx |
| templ... | 2022/01/27 | [
"https://Stackoverflow.com/questions/70886556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15936178/"
] | Just create a ref in the parent component, send it to the child component and assign that ref to an invisible submit button.
Finally, in the onClick event of the parent submit button simply call submitRef.current.click()
```
// ./From.js
import React from 'react';
import { useForm } from 'react-hook-form';
// This i... | The simplest way to do this is by raising the form state to the closest parent between the two components, then you can pass the change and submit handlers down to the requisite components.
See <https://reactjs.org/docs/lifting-state-up.html>
In the case of `react-hook-form` that means calling `useForm` in that highe... |
18,063,919 | Cheers Jasper Reports expert,
I'm a bit new with Jasper Reports so thanks for any help.
We are investigating the use of Jasper Reports Server as our main tool to offer our customers the reporting capabilities they need. We are a Java shop but would like our clients to mainly interface with JasperReports Server for repo... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18063919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653916/"
] | Is this what you're looking for?
```
$('.select').parents('.123');
```
Or maybe the more specific:
```
$('li.select').parents('ul.123');
``` | [jquery-class-selectors](http://api.jquery.com/class-selector/)
```
$('ul[class="123"] li.select');
//Or
$('li.select').parents('ul.123');
``` |
18,063,919 | Cheers Jasper Reports expert,
I'm a bit new with Jasper Reports so thanks for any help.
We are investigating the use of Jasper Reports Server as our main tool to offer our customers the reporting capabilities they need. We are a Java shop but would like our clients to mainly interface with JasperReports Server for repo... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18063919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653916/"
] | Is this what you're looking for?
```
$('.select').parents('.123');
```
Or maybe the more specific:
```
$('li.select').parents('ul.123');
``` | How about an alternative using the `has()` method:
```
$("ul.123").has("li.select")
```
---
<http://jsfiddle.net/6wB49/>
---
**[has()](http://api.jquery.com/has/)**
>
> **Description**: Reduce the set of matched elements to those that have a
> descendant that matches the selector or DOM element.
>
>
> |
18,063,919 | Cheers Jasper Reports expert,
I'm a bit new with Jasper Reports so thanks for any help.
We are investigating the use of Jasper Reports Server as our main tool to offer our customers the reporting capabilities they need. We are a Java shop but would like our clients to mainly interface with JasperReports Server for repo... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18063919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653916/"
] | Is this what you're looking for?
```
$('.select').parents('.123');
```
Or maybe the more specific:
```
$('li.select').parents('ul.123');
``` | **Hi,**
You can also try this....
```
<head runat="server">
<title></title>
<script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('ul').bind('click', function () {
$(this).parent().eac... |
18,063,919 | Cheers Jasper Reports expert,
I'm a bit new with Jasper Reports so thanks for any help.
We are investigating the use of Jasper Reports Server as our main tool to offer our customers the reporting capabilities they need. We are a Java shop but would like our clients to mainly interface with JasperReports Server for repo... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18063919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653916/"
] | How about an alternative using the `has()` method:
```
$("ul.123").has("li.select")
```
---
<http://jsfiddle.net/6wB49/>
---
**[has()](http://api.jquery.com/has/)**
>
> **Description**: Reduce the set of matched elements to those that have a
> descendant that matches the selector or DOM element.
>
>
> | [jquery-class-selectors](http://api.jquery.com/class-selector/)
```
$('ul[class="123"] li.select');
//Or
$('li.select').parents('ul.123');
``` |
18,063,919 | Cheers Jasper Reports expert,
I'm a bit new with Jasper Reports so thanks for any help.
We are investigating the use of Jasper Reports Server as our main tool to offer our customers the reporting capabilities they need. We are a Java shop but would like our clients to mainly interface with JasperReports Server for repo... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18063919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653916/"
] | How about an alternative using the `has()` method:
```
$("ul.123").has("li.select")
```
---
<http://jsfiddle.net/6wB49/>
---
**[has()](http://api.jquery.com/has/)**
>
> **Description**: Reduce the set of matched elements to those that have a
> descendant that matches the selector or DOM element.
>
>
> | **Hi,**
You can also try this....
```
<head runat="server">
<title></title>
<script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('ul').bind('click', function () {
$(this).parent().eac... |
9,607,537 | I'm using Visual Web Developer 2010 Express and SQL Server 2008 R2 Management Studio Express
Hey guys,
Pretty new at C# here. I'm trying to follow [this](http://www.csharp-station.com/Tutorial/AdoDotNet/Lesson01) C# ADO.NET tutorial (currently on step [2](http://www.csharp-station.com/Tutorial/AdoDotNet/Lesson02)), a... | 2012/03/07 | [
"https://Stackoverflow.com/questions/9607537",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/994576/"
] | As your example seems to be a **WebProject** try to put your code within `Page_Load` eventHandler. Afterwards you should try to print your data to the `Debug` window or to a control within your webPage.
```
using System;
using System.Data;
// and all the others ...
namespace WebApplication1
{
public partial class S... | why would console.writeline show anything. you are not working on console.
in case just to see your output. use Response.writeline(rdr[0]); |
9,607,537 | I'm using Visual Web Developer 2010 Express and SQL Server 2008 R2 Management Studio Express
Hey guys,
Pretty new at C# here. I'm trying to follow [this](http://www.csharp-station.com/Tutorial/AdoDotNet/Lesson01) C# ADO.NET tutorial (currently on step [2](http://www.csharp-station.com/Tutorial/AdoDotNet/Lesson02)), a... | 2012/03/07 | [
"https://Stackoverflow.com/questions/9607537",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/994576/"
] | As your example seems to be a **WebProject** try to put your code within `Page_Load` eventHandler. Afterwards you should try to print your data to the `Debug` window or to a control within your webPage.
```
using System;
using System.Data;
// and all the others ...
namespace WebApplication1
{
public partial class S... | Create a **Console application** instead of the Web Application you have created.
Otherwise you will run into similar issues considering you are new to C# (or Visual Studio in general) AND considering the rest of the tutorial uses Console.WriteLine heavily.
Then you can use the same code as shown in the tutorial.
!... |
9,607,537 | I'm using Visual Web Developer 2010 Express and SQL Server 2008 R2 Management Studio Express
Hey guys,
Pretty new at C# here. I'm trying to follow [this](http://www.csharp-station.com/Tutorial/AdoDotNet/Lesson01) C# ADO.NET tutorial (currently on step [2](http://www.csharp-station.com/Tutorial/AdoDotNet/Lesson02)), a... | 2012/03/07 | [
"https://Stackoverflow.com/questions/9607537",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/994576/"
] | Create a **Console application** instead of the Web Application you have created.
Otherwise you will run into similar issues considering you are new to C# (or Visual Studio in general) AND considering the rest of the tutorial uses Console.WriteLine heavily.
Then you can use the same code as shown in the tutorial.
!... | why would console.writeline show anything. you are not working on console.
in case just to see your output. use Response.writeline(rdr[0]); |
26,734,569 | How do I add 2 background colours to a container div. I've seen some solutions that work but only with 50% height for each colour. I need one however to have a set height (see image).
My current solution is for background 1 to be an 1x260px background image with background 2 being a background colour. This however lea... | 2014/11/04 | [
"https://Stackoverflow.com/questions/26734569",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1500992/"
] | Try this
```
background: rgba(47,102,179,1);/* Old Browsers */
background: -moz-linear-gradient(top, rgba(47,102,179,1) 0%, rgba(255,255,255,1) 260px, rgba(255,255,255,1) 100%); /* FF3.6+ */
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(47,102,179,1)), color-stop(260px, rgba(255,255,255,1)), ... | **used to this**
css
```css
.nice{
width:500px;
height:500px;
margin:auto;
position:relative;
background:red;
color:white;
z-index:1;
}
.nice:after{
content:"";
position:absolute;
left:0;
right:0;
top:0;
bottom:70%;
background:green;
z-in... |
26,734,569 | How do I add 2 background colours to a container div. I've seen some solutions that work but only with 50% height for each colour. I need one however to have a set height (see image).
My current solution is for background 1 to be an 1x260px background image with background 2 being a background colour. This however lea... | 2014/11/04 | [
"https://Stackoverflow.com/questions/26734569",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1500992/"
] | Try this
```
background: rgba(47,102,179,1);/* Old Browsers */
background: -moz-linear-gradient(top, rgba(47,102,179,1) 0%, rgba(255,255,255,1) 260px, rgba(255,255,255,1) 100%); /* FF3.6+ */
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(47,102,179,1)), color-stop(260px, rgba(255,255,255,1)), ... | Here, I have done only using css and background color.
Working [JsFiddle](http://jsfiddle.net/LL9voo6m/)
HTML:
```
<div class="part-b">
<div class="background"></div>
<div class="container">
<div class="row">
Content
</div>
</div>
</div>
```
CSS:
```
.container {
width: 960px !imp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.