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 |
|---|---|---|---|---|---|
48,335,609 | In the mailer template i want to generate correct url for the path public/system/test.png
Suppose in the mailer template
```
<%= link_to k, "/system/test.png" %> <br />
```
how can i generate the full path such as
```
https://www.example.com/system/test.png
```
I appreciate any help! Thanks! | 2018/01/19 | [
"https://Stackoverflow.com/questions/48335609",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/734861/"
] | Try to the following
This code is tested
```
<%= link_to image_tag("/system/test.png"), root_url %>
```
`image_tag` by default located the public folder and `root_url` will redirect to the home page after click image
Or solution two
```
<a href="<%= root_url %>">
<%= image_tag "#{Rails.root}/public/system/te... | You could use `<%= link_to k, "#{Rails.root}/system/test.png" %>`
Hope this is what you are looking for. |
48,335,609 | In the mailer template i want to generate correct url for the path public/system/test.png
Suppose in the mailer template
```
<%= link_to k, "/system/test.png" %> <br />
```
how can i generate the full path such as
```
https://www.example.com/system/test.png
```
I appreciate any help! Thanks! | 2018/01/19 | [
"https://Stackoverflow.com/questions/48335609",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/734861/"
] | ```
<%= link_to k, asset_url('/public/system/test.jpeg')%>
```
this will generate link as:-
```
https://example.com/public/system/test.jpeg
```
and your html code will generate like this: --
```
<a href="https://example.com/public/system/test.jpeg">k</a>
``` | Try to the following
This code is tested
```
<%= link_to image_tag("/system/test.png"), root_url %>
```
`image_tag` by default located the public folder and `root_url` will redirect to the home page after click image
Or solution two
```
<a href="<%= root_url %>">
<%= image_tag "#{Rails.root}/public/system/te... |
18,861,468 | I have a large (4GB+) data file I'd like to access. It contains samples *i* of a number of different signals {**a**, **b**, **c**} as follows:
```
a_1 b_1 c_1 a_2 b_2 c_2 .... a_n b_n c_n
```
I would like to use [memmapfile](http://www.automatedtrader.net/blogs/mathworks/143832/using-memmapfile-to-navigate-through-b... | 2013/09/17 | [
"https://Stackoverflow.com/questions/18861468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/408268/"
] | How about using FREAD and specifying the appropriate `skip` value. The following will read the signal `a` in one go:
```
% 3 interleaved signals each of type int16
nSignals = 3;
% amount of bytes to skip after reading each sample
szINT16 = 2; % sizeof(int16)=2
skipBytes = (nSignals-1)*szINT16;
% nu... | Maybe try something as:
```
m = memmapfile('data.dat',
'Format',
{ 'int16' [1 1] 'a'; 'int16' [1 1] 'b'; 'int16' [1 1] 'c'},
'Repeat', nSamples);
a = m.Data(:).a; % extract all instances of a
``` |
321,244 | I would use the word "of" as the word "from" indicates origin so it sounds a bit weird.
I read this in a periodical from JSTOR talking about immigration to the old border states. | 2022/08/19 | [
"https://ell.stackexchange.com/questions/321244",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/128160/"
] | It is odd, but it is "headlinese".
Compare with
>
> My husband is an idiot, wife says.
>
>
>
For impact and style, the content of the quote is put first. The attribution is put in a bit at the end. However, this is headlinese. People don't talk like this.
By the way, in case it's not obvious, "minutes" are the ... | Journalists don't want to be accused of "editorialising", that is, injecting their own opinions into their reports. Therefore they try as much as possible to explicitly attribute things to the people or bodies that have written or said them.
In this case it is the meeting minutes (presumably of the federal body respon... |
7,843,077 | So I noticed something.
When doing a recursive method on codingbat, I looked at the:
```
String abc = "abc";
String mod = abc.substring(1);
System.out.println(mod); //prints "bc"
```
So I thought:
Hey, why not have a substring-like method for arrays?
For example:
```
String[] abc = {"a", "b", "c"};
String[] mod ... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7843077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1086076/"
] | >
> How would this be going around to be made since I cannot seem to find the class that controls the "[ ]"'s since something has to regulate them because they aren't just "there" they had to be added in some way.
>
>
>
They *are* "just there" in that they're hard-coded as part of the language and platform.
If yo... | The [java.util.Arrays.copyOfRange](http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html) function will do what you want ("a substring-like method for arrays") (just not with the syntax you want). |
7,843,077 | So I noticed something.
When doing a recursive method on codingbat, I looked at the:
```
String abc = "abc";
String mod = abc.substring(1);
System.out.println(mod); //prints "bc"
```
So I thought:
Hey, why not have a substring-like method for arrays?
For example:
```
String[] abc = {"a", "b", "c"};
String[] mod ... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7843077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1086076/"
] | You can't overload operators like in c++, so achieving that exact syntax is not possible in java. But there already is a subList function exposed in List interface, maybe that is what you want?
If you're interested in doing something like this you should look at alternate JVM languages like scala or groovy, which hav... | The [java.util.Arrays.copyOfRange](http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html) function will do what you want ("a substring-like method for arrays") (just not with the syntax you want). |
7,843,077 | So I noticed something.
When doing a recursive method on codingbat, I looked at the:
```
String abc = "abc";
String mod = abc.substring(1);
System.out.println(mod); //prints "bc"
```
So I thought:
Hey, why not have a substring-like method for arrays?
For example:
```
String[] abc = {"a", "b", "c"};
String[] mod ... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7843077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1086076/"
] | They're part of the Java language spec and what they do can't be changed, in Java.
There are other languages (ie: Groovy) that target the JVM, have a language syntax similar to Java, and do support things like overriding operators such as array indexing.
But, it can't be done in Java. | The [java.util.Arrays.copyOfRange](http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html) function will do what you want ("a substring-like method for arrays") (just not with the syntax you want). |
7,843,077 | So I noticed something.
When doing a recursive method on codingbat, I looked at the:
```
String abc = "abc";
String mod = abc.substring(1);
System.out.println(mod); //prints "bc"
```
So I thought:
Hey, why not have a substring-like method for arrays?
For example:
```
String[] abc = {"a", "b", "c"};
String[] mod ... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7843077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1086076/"
] | I'm pretty sure this is a wheel that's already been invented:
```
String[] abc = { "a", "b", "c" };
String[] mod = Arrays.copyOfRange(abc, 1, abc.length); // now mod = [b, c]
``` | The [java.util.Arrays.copyOfRange](http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html) function will do what you want ("a substring-like method for arrays") (just not with the syntax you want). |
31,571,833 | End User here-
In our company we have a Learning Management platform provided by PeopleSoft based on Oracle, I can search and find a class to take. I have the class code, name, etc. But I can't figure out how to send someone a link to the class I recommend. I'm trying to reconstruct a URL that will take them directly t... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31571833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5144919/"
] | Instead of doing `tmplist.clear()` do `tmplist = new ArrayList<>()` so you're working with a different List instance each time. | I think easiest solution would be to not clear the list, but instead assign to tmplist new reference to ArrayList, after adding it to list of lists. |
31,571,833 | End User here-
In our company we have a Learning Management platform provided by PeopleSoft based on Oracle, I can search and find a class to take. I have the class code, name, etc. But I can't figure out how to send someone a link to the class I recommend. I'm trying to reconstruct a URL that will take them directly t... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31571833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5144919/"
] | if your 2d ArrayList is : `result`
do
```
result.add(new ArrayList<>(tmpList));
```
By doing this, you are not adding the `tmpList` itself but a new list with the values of `tmpList`. So even If you do `tmpList.clear()` it will not affect the arraylist in your `result`. | Instead of doing `tmplist.clear()` do `tmplist = new ArrayList<>()` so you're working with a different List instance each time. |
31,571,833 | End User here-
In our company we have a Learning Management platform provided by PeopleSoft based on Oracle, I can search and find a class to take. I have the class code, name, etc. But I can't figure out how to send someone a link to the class I recommend. I'm trying to reconstruct a URL that will take them directly t... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31571833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5144919/"
] | Instead of doing `tmplist.clear()` do `tmplist = new ArrayList<>()` so you're working with a different List instance each time. | Ok..I know you must have sorted this out by now using the suggestions.... but I just thought I would make program to do this ... Here is what my solution looks like, not the best way to do it perhaps, but should work ...
```
import java.util.ArrayList;
import javax.swing.text.rtf.RTFEditorKit;
public class ArrTest {... |
31,571,833 | End User here-
In our company we have a Learning Management platform provided by PeopleSoft based on Oracle, I can search and find a class to take. I have the class code, name, etc. But I can't figure out how to send someone a link to the class I recommend. I'm trying to reconstruct a URL that will take them directly t... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31571833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5144919/"
] | Instead of doing `tmplist.clear()` do `tmplist = new ArrayList<>()` so you're working with a different List instance each time. | Your code, modified according to @heenenee 's answer:
```
List<Object> tmplist = new ArrayList<Object>();
for (int i = 0; i<array.length(); i++) {
if (array[i].equals(#)) {
tmplist.add(array[i]);
if (!array[i+1].equals(#) && tmplist.size() < 2) {
tmplist.clear();
} else if (!arr... |
31,571,833 | End User here-
In our company we have a Learning Management platform provided by PeopleSoft based on Oracle, I can search and find a class to take. I have the class code, name, etc. But I can't figure out how to send someone a link to the class I recommend. I'm trying to reconstruct a URL that will take them directly t... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31571833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5144919/"
] | if your 2d ArrayList is : `result`
do
```
result.add(new ArrayList<>(tmpList));
```
By doing this, you are not adding the `tmpList` itself but a new list with the values of `tmpList`. So even If you do `tmpList.clear()` it will not affect the arraylist in your `result`. | I think easiest solution would be to not clear the list, but instead assign to tmplist new reference to ArrayList, after adding it to list of lists. |
31,571,833 | End User here-
In our company we have a Learning Management platform provided by PeopleSoft based on Oracle, I can search and find a class to take. I have the class code, name, etc. But I can't figure out how to send someone a link to the class I recommend. I'm trying to reconstruct a URL that will take them directly t... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31571833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5144919/"
] | if your 2d ArrayList is : `result`
do
```
result.add(new ArrayList<>(tmpList));
```
By doing this, you are not adding the `tmpList` itself but a new list with the values of `tmpList`. So even If you do `tmpList.clear()` it will not affect the arraylist in your `result`. | Ok..I know you must have sorted this out by now using the suggestions.... but I just thought I would make program to do this ... Here is what my solution looks like, not the best way to do it perhaps, but should work ...
```
import java.util.ArrayList;
import javax.swing.text.rtf.RTFEditorKit;
public class ArrTest {... |
31,571,833 | End User here-
In our company we have a Learning Management platform provided by PeopleSoft based on Oracle, I can search and find a class to take. I have the class code, name, etc. But I can't figure out how to send someone a link to the class I recommend. I'm trying to reconstruct a URL that will take them directly t... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31571833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5144919/"
] | if your 2d ArrayList is : `result`
do
```
result.add(new ArrayList<>(tmpList));
```
By doing this, you are not adding the `tmpList` itself but a new list with the values of `tmpList`. So even If you do `tmpList.clear()` it will not affect the arraylist in your `result`. | Your code, modified according to @heenenee 's answer:
```
List<Object> tmplist = new ArrayList<Object>();
for (int i = 0; i<array.length(); i++) {
if (array[i].equals(#)) {
tmplist.add(array[i]);
if (!array[i+1].equals(#) && tmplist.size() < 2) {
tmplist.clear();
} else if (!arr... |
73,947,167 | I want to filter with a regex on date. I tried this:
```
{ createdAt: { $regex: '2021-06-25T' }}
```
But it doesn't work.
How can I use a regex or something to filter for those days, on a `timeStamp` field?
The collections looks like this:
[](htt... | 2022/10/04 | [
"https://Stackoverflow.com/questions/73947167",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3541320/"
] | If you want to keep everything as Dates and find documents for that specific day, you could try this.
```js
db.collection.aggregate([
{
"$match": {
"$expr": {
"$eq": [
{
"$dateTrunc": {
"date": "$createdAt",
"unit": "day"
}
},
... | You should convert the date to a string version and then apply the match. Try something like this:
```
db.collection.aggregate([
{
"$match": {
$expr: {
"$regexMatch": {
"input": {
"$toString": "$createdAt"
},
"regex": "2021-06-25T"
}
}
}
... |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | Long reply, but hey, I’ve got a summary on the end, so just skip to summary if you can’t be bothered reading the entire thing!
As a developer I had to deal with the situation literally every other project, but it's not until I moved into project management that I learned how to deal with it effectively. For me dealing... | Honesty should always be honored. I was on the receiving end of of an "architect's vision", and when the developer came to me with the dire news that the entire solution would not work, we went to the business units and had the awful conversation. The developer then came up with a new estimate which as comprised of 80%... |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | Long reply, but hey, I’ve got a summary on the end, so just skip to summary if you can’t be bothered reading the entire thing!
As a developer I had to deal with the situation literally every other project, but it's not until I moved into project management that I learned how to deal with it effectively. For me dealing... | I would also take in account estimate refinement. I mean "as I see it now this project will take X man-hours". After 20-30% I will re-estimate and so on.
After all how does a file downloader do its estimation? It constantly refines it. |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | Whilst businesses don't often like the truth that things take much longer than expected, they prefer being strung along even less. The sooner you let someone know how long it is really going to take, the quicker everybody can plan around the circumstances. Whilst this can initially be a tough time, in the long run it w... | I feel your pain... I am not sure how to handle all this frustration :(
<https://stackoverflow.com/questions/541873/developing-on-for-a-moving-target> |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | Never take on anything without seeing or understanding it. If the customer, or your own mgmt isn't willing to afford you that much, they are not setting you up to succeed.
This was (and often is) a failure to understand the details, data, and how they interact throughout the application being built. Assumptions are ma... | I think not enough estimators do not put enough emphasis on the facts of "Estimation is you asking me to do math and guesses to predict the future in a useful way" and "The commitment we make is completely separate from the math that we do to make the estimate; We can agree to do stupid amounts of work, agree to things... |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | Honesty should always be honored. I was on the receiving end of of an "architect's vision", and when the developer came to me with the dire news that the entire solution would not work, we went to the business units and had the awful conversation. The developer then came up with a new estimate which as comprised of 80%... | First, consider the possibilty that you're overestiming the scope of the project. Salespeople and architects tend to exaggerate their solutions. Don't take them at face value; they probably expect you to come up with less then they promised the customer.
What I would do here is take the amount of time I do have, and s... |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | It's impossible to predict the future. Requiring a prediction ("estimate") is simply asking for trouble. Everyone does it, and everyone gets it wrong.
Your judgement of "out by 500%" is probably just as wrong as the architect's estimate. After all, "...to date the project is still unfinished..." There are no facts ava... | I (as I'm sure just about everyone who codes) empathize. My last company was pretty terrible about this - the sales guys would go in and sell a project, and then you come in, see the estimates, and just laugh.
As Tomh mentioned - there is only so much time in a day. Even if you don't sleep.
Three things, I think.
Mo... |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | Whilst businesses don't often like the truth that things take much longer than expected, they prefer being strung along even less. The sooner you let someone know how long it is really going to take, the quicker everybody can plan around the circumstances. Whilst this can initially be a tough time, in the long run it w... | You might be interested in this [IEEE article](http://www2.computer.org/portal/web/buildyourcareer/fa035) that I have [blogged](http://www.dynamicalsoftware.com/cgi-bin/ViewBlogEntry.pl?id=15) about before. Here are the highlights.
* One of the biggest drivers to project failure is overly optimistic estimations.
* One... |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | Whilst businesses don't often like the truth that things take much longer than expected, they prefer being strung along even less. The sooner you let someone know how long it is really going to take, the quicker everybody can plan around the circumstances. Whilst this can initially be a tough time, in the long run it w... | The problem wasn't that the original estimates were out - it's that management didn't believe you.
The best way to get management to make a decision is to:
1. Outline the problem with evidence to back it up; and
2. Provide multiple solutions for them to choose from (in order from least preferable to most preferable).... |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | Long reply, but hey, I’ve got a summary on the end, so just skip to summary if you can’t be bothered reading the entire thing!
As a developer I had to deal with the situation literally every other project, but it's not until I moved into project management that I learned how to deal with it effectively. For me dealing... | Never take on anything without seeing or understanding it. If the customer, or your own mgmt isn't willing to afford you that much, they are not setting you up to succeed.
This was (and often is) a failure to understand the details, data, and how they interact throughout the application being built. Assumptions are ma... |
39,449 | A recent project I worked on was proven to be severely underestimated by the architect. The estimate was out by at least 500%.
Unfortunately I was brought onto the project after the estimate had been signed off with the customer. As senior dev, I quickly realised that the functional and technical spec. contained some ... | 2009/02/14 | [
"https://softwareengineering.stackexchange.com/questions/39449",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/20615/"
] | Whilst businesses don't often like the truth that things take much longer than expected, they prefer being strung along even less. The sooner you let someone know how long it is really going to take, the quicker everybody can plan around the circumstances. Whilst this can initially be a tough time, in the long run it w... | I think not enough estimators do not put enough emphasis on the facts of "Estimation is you asking me to do math and guesses to predict the future in a useful way" and "The commitment we make is completely separate from the math that we do to make the estimate; We can agree to do stupid amounts of work, agree to things... |
3,804,746 | This is related to this question:
[Is there a quick method to calculate the eigenvalues of this complex $4 \times 4$ matrix?](https://math.stackexchange.com/q/3803817/691829)
Let $A$ be a complex square matrix. In one of the answers, they used eigenvalues of $A^2$ to calculate eigenvalues of $A$. I have a question in... | 2020/08/27 | [
"https://math.stackexchange.com/questions/3804746",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/691829/"
] | Let $S(n,k)$ denote the [Stirling numbers of the second kind](https://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind) and $[n]=\{1,\dots,n\}$. By definition, there are $S(n,k)$ partitions of $[n]$ into $k$ non-empty subsets.
To count the number of maps $[n]\to[5]$ that have an image of cardinality $4$, firs... | The problem requires us to find the number of mappings from domain to co-domain, where domain contains n elements and the co-domain contains 5 elements and the range should contain exactly 4 elements belonging to the co-domain. To find the number of functions, first, select the 4 elements out of those 5 elements. Hence... |
3,804,746 | This is related to this question:
[Is there a quick method to calculate the eigenvalues of this complex $4 \times 4$ matrix?](https://math.stackexchange.com/q/3803817/691829)
Let $A$ be a complex square matrix. In one of the answers, they used eigenvalues of $A^2$ to calculate eigenvalues of $A$. I have a question in... | 2020/08/27 | [
"https://math.stackexchange.com/questions/3804746",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/691829/"
] | There is a problem that $\binom 544^n$ not only counts cases where fewer than four numbers are used, it counts them multiple times.
By symmetry, however, the answer is going to be $\binom 54a\_n$, where $a\_n$ is the number of functions $f:\{1,...,n\}\to\{1,2,3,4\}$ which are surjective (use all four numbers). This ca... | Let $S(n,k)$ denote the [Stirling numbers of the second kind](https://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind) and $[n]=\{1,\dots,n\}$. By definition, there are $S(n,k)$ partitions of $[n]$ into $k$ non-empty subsets.
To count the number of maps $[n]\to[5]$ that have an image of cardinality $4$, firs... |
3,804,746 | This is related to this question:
[Is there a quick method to calculate the eigenvalues of this complex $4 \times 4$ matrix?](https://math.stackexchange.com/q/3803817/691829)
Let $A$ be a complex square matrix. In one of the answers, they used eigenvalues of $A^2$ to calculate eigenvalues of $A$. I have a question in... | 2020/08/27 | [
"https://math.stackexchange.com/questions/3804746",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/691829/"
] | There is a problem that $\binom 544^n$ not only counts cases where fewer than four numbers are used, it counts them multiple times.
By symmetry, however, the answer is going to be $\binom 54a\_n$, where $a\_n$ is the number of functions $f:\{1,...,n\}\to\{1,2,3,4\}$ which are surjective (use all four numbers). This ca... | The problem requires us to find the number of mappings from domain to co-domain, where domain contains n elements and the co-domain contains 5 elements and the range should contain exactly 4 elements belonging to the co-domain. To find the number of functions, first, select the 4 elements out of those 5 elements. Hence... |
63,725,895 | I imported jsPDF library and tried to export to PDF but I am getting JavaScript error jsPDF is not defined.
I tried other similar posts and it didn't work for me.
I got the fiddle here <https://jsfiddle.net/aybhvf8e/1/>
```
<script type="text/javascript" src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></s... | 2020/09/03 | [
"https://Stackoverflow.com/questions/63725895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1117987/"
] | I think your code seems correct but some issue with cdn. I have used debug one here.
Here is one working example I created which you can refer. If you don't see pdf downloading due to stackoverflow restriction, use this fiddle to test.
[Working Download PDF demo](https://jsfiddle.net/xpf76o0r/)
The cdn link I used i... | I found two main issues, solved in this [fork](https://jsfiddle.net/Ljnya5gp/1/). First, you did not link to `jspdf`. You can do that in the html code:
```
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>
```
Second, you add the `click` event listener outside the `ready()` func... |
63,725,895 | I imported jsPDF library and tried to export to PDF but I am getting JavaScript error jsPDF is not defined.
I tried other similar posts and it didn't work for me.
I got the fiddle here <https://jsfiddle.net/aybhvf8e/1/>
```
<script type="text/javascript" src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></s... | 2020/09/03 | [
"https://Stackoverflow.com/questions/63725895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1117987/"
] | I found two main issues, solved in this [fork](https://jsfiddle.net/Ljnya5gp/1/). First, you did not link to `jspdf`. You can do that in the html code:
```
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>
```
Second, you add the `click` event listener outside the `ready()` func... | VQR ..... one question, my app works some times on places without network, so the next line won't be work without network , correct?
```
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>
```
So, I installed it ...
```
npm install jspdf --save
```
But now, what files have I to... |
63,725,895 | I imported jsPDF library and tried to export to PDF but I am getting JavaScript error jsPDF is not defined.
I tried other similar posts and it didn't work for me.
I got the fiddle here <https://jsfiddle.net/aybhvf8e/1/>
```
<script type="text/javascript" src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></s... | 2020/09/03 | [
"https://Stackoverflow.com/questions/63725895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1117987/"
] | I think your code seems correct but some issue with cdn. I have used debug one here.
Here is one working example I created which you can refer. If you don't see pdf downloading due to stackoverflow restriction, use this fiddle to test.
[Working Download PDF demo](https://jsfiddle.net/xpf76o0r/)
The cdn link I used i... | VQR ..... one question, my app works some times on places without network, so the next line won't be work without network , correct?
```
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>
```
So, I installed it ...
```
npm install jspdf --save
```
But now, what files have I to... |
6,562,314 | I want to create an Datetime object based on the number of day in the year.
This number is from the 365 days of the year (for example it can be: 123 or 23 or 344...)
How can I do that?
Thanks | 2011/07/03 | [
"https://Stackoverflow.com/questions/6562314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/505595/"
] | Use the [DateTime.ordinal](http://www.ruby-doc.org/stdlib/libdoc/date/rdoc/classes/DateTime.html#M000481) method. Here's an example to get the 100th day of year 2011.
```
require 'date'
year, day = 2011, 100
DateTime.ordinal(year, day)
# #<DateTime: 2011-04-10T00:00:00+00:00 (4911323/2,0,2299161)>
``` | If you want it as the number of days from now you should do the following:
```
time = Time.new + (60*60*24)*(numberOfDaysFromNow)
```
If you want it as the number of days from the start of the year you should do the following
```
time = Time.new(Time.now.year) + (60*60*24)*(dayOfTheYear-1)
``` |
9,404,656 | well I'm a php programmer who for a period create some php application by using codeigniter framework. Now I would pass to the next level using a framework more powerful and my choose is gone to symfony framework. I read good things about it and looking for some infos about it, it seems me a good next level. I saw that... | 2012/02/22 | [
"https://Stackoverflow.com/questions/9404656",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1195651/"
] | In my short, subjective opinion, templating engines typically result in cleaner views, and in some engines' cases (some more than others), better enforcement of separation of concerns.
As far as discussions & articles go, there are many if you search for them. Here are a few references though:
* [What are the real... | Twig is dead simple yet powerful templating language, and is just a bunch of shortcuts to what you'll do in PHP.
There is cool built-in tools like filters to avoid inline php common treatments on strings (for example), macros and possibility of extending the language. The syntax is very clean, and easy to learn.
Ther... |
850,736 | I have a small bash script:
```
#!/bin/bash
touch dummy.txt
```
If I execute this script with `sudo` then it will create `dummy.txt` which will be **root protected**.
What I want to do is:
Regardless of whether this script is executed using `sudo` or a normal user, the file `dummy.txt` should **not** be root prot... | 2016/11/18 | [
"https://askubuntu.com/questions/850736",
"https://askubuntu.com",
"https://askubuntu.com/users/291860/"
] | You could test if the script is being run via `sudo` using the `EUID` and `SUDO_USER` variables, and then execute `touch` as `SUDO_USER` if true - something like
```
#!/bin/bash
if [[ $EUID -eq 0 ]] && [[ -n $SUDO_USER ]]; then
sudo -u "$SUDO_USER" touch dummy.txt
else
touch dummy.txt
fi
``` | By default files created with root accound have permissions like so:
```
-rw-r--r-- 1 root root 0 11月 17 23:25 rootfile.txt
```
Here file belongs to root user and root group, and is readable and writable by root, but only readable by others.
Simplest approach would be just to `chown` the file back to the original u... |
850,736 | I have a small bash script:
```
#!/bin/bash
touch dummy.txt
```
If I execute this script with `sudo` then it will create `dummy.txt` which will be **root protected**.
What I want to do is:
Regardless of whether this script is executed using `sudo` or a normal user, the file `dummy.txt` should **not** be root prot... | 2016/11/18 | [
"https://askubuntu.com/questions/850736",
"https://askubuntu.com",
"https://askubuntu.com/users/291860/"
] | You could test if the script is being run via `sudo` using the `EUID` and `SUDO_USER` variables, and then execute `touch` as `SUDO_USER` if true - something like
```
#!/bin/bash
if [[ $EUID -eq 0 ]] && [[ -n $SUDO_USER ]]; then
sudo -u "$SUDO_USER" touch dummy.txt
else
touch dummy.txt
fi
``` | If your script is not meant to be run as `root`, the safest way to solve the problem is to abort the execution of the script at the very beginning:
```
if [ "$EUID" = 0 ]; then
echo "This script must NOT be run as root"
exit 1
fi
```
Optionally, you can re-execute your script as a fallback user (e.g. `sudo -u... |
4,917,387 | ```
public void convertStrings() {
for (int counter = 0; counter < compare.length; counter++) {
compare[counter] = compare[counter].replace('*','_');
compare[counter] = compare[counter].replaceAll("_",".*");
compare[counter] = compare[counter].replace('?', '.');
}
// S... | 2011/02/07 | [
"https://Stackoverflow.com/questions/4917387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/605836/"
] | Just change the lines to:
```
compare[counter] = compare[counter].replaceAll("\\*",".*").replaceAll("\\?", ".");
``` | I am assuming that the error is being thrown from the line
```
if (data[counter].matches(compare[counter1]) == true)
```
If so, the most likely explanation is that `compare[counter1]` is actually `null`, that is it does not contain a value. |
15,088,171 | I want to modify a label in **objective C** like this:
When pushing a button named "Car" I want the label "pushedCar" to unhide.
Right now it looks like this but its static...
```
if ([buttonName isEqualToString:@"Car"]) {
self.pushedCar.hidden = NO;}
```
How can I write something like:
```
if ([buttonName... | 2013/02/26 | [
"https://Stackoverflow.com/questions/15088171",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2111015/"
] | Change all your button titles like, Car, Van , Bus etc.
then make this as touch up inside method of all them,
```
-(IBAction) buttonPressed:(UIButton *) pressedButton{
NSString *buttonName = pressedButton.titleLabel.text;
UILabel *label = [self valueForKey:[NSString stringWithFormat:@"pushed%@", buttonName]];
... | like this?
```
if ([ButtonName isEqualToString:@"Car"]) {
self.pushedCar.hidden = !self.pushedCar.hidden;
}
``` |
15,088,171 | I want to modify a label in **objective C** like this:
When pushing a button named "Car" I want the label "pushedCar" to unhide.
Right now it looks like this but its static...
```
if ([buttonName isEqualToString:@"Car"]) {
self.pushedCar.hidden = NO;}
```
How can I write something like:
```
if ([buttonName... | 2013/02/26 | [
"https://Stackoverflow.com/questions/15088171",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2111015/"
] | Change all your button titles like, Car, Van , Bus etc.
then make this as touch up inside method of all them,
```
-(IBAction) buttonPressed:(UIButton *) pressedButton{
NSString *buttonName = pressedButton.titleLabel.text;
UILabel *label = [self valueForKey:[NSString stringWithFormat:@"pushed%@", buttonName]];
... | use KVC
```
id name = nil
if(myButtonCurrentTitle isEqualTo:@"Car"]) name = @"Car";
assert(name);
UILabel *label = [self valueForKey:[NSString stringWithFormat:@"pushed%@", name]];
assert([label isKindOfClass:[UILabel class]]);
``` |
15,088,171 | I want to modify a label in **objective C** like this:
When pushing a button named "Car" I want the label "pushedCar" to unhide.
Right now it looks like this but its static...
```
if ([buttonName isEqualToString:@"Car"]) {
self.pushedCar.hidden = NO;}
```
How can I write something like:
```
if ([buttonName... | 2013/02/26 | [
"https://Stackoverflow.com/questions/15088171",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2111015/"
] | Change all your button titles like, Car, Van , Bus etc.
then make this as touch up inside method of all them,
```
-(IBAction) buttonPressed:(UIButton *) pressedButton{
NSString *buttonName = pressedButton.titleLabel.text;
UILabel *label = [self valueForKey:[NSString stringWithFormat:@"pushed%@", buttonName]];
... | If you mean "How could I get an object that is related to a string" it would probably be simplest to put the buttons into an NSDictionary so you could do something like
```
MyButton *button = [buttonDict objectForKey:@"Car"];
```
but to be honest, your example code doesn't make much sense so I'm finding it hard to k... |
15,088,171 | I want to modify a label in **objective C** like this:
When pushing a button named "Car" I want the label "pushedCar" to unhide.
Right now it looks like this but its static...
```
if ([buttonName isEqualToString:@"Car"]) {
self.pushedCar.hidden = NO;}
```
How can I write something like:
```
if ([buttonName... | 2013/02/26 | [
"https://Stackoverflow.com/questions/15088171",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2111015/"
] | Change all your button titles like, Car, Van , Bus etc.
then make this as touch up inside method of all them,
```
-(IBAction) buttonPressed:(UIButton *) pressedButton{
NSString *buttonName = pressedButton.titleLabel.text;
UILabel *label = [self valueForKey:[NSString stringWithFormat:@"pushed%@", buttonName]];
... | If I understand it correctly, you want different buttons and labels (e.g. car, horse, cat).
In that case make an NSDictionary with the key being the buttonName (@"Car") and the the object for it the label.
You can write then something like:
```
UILabel *label = [myDictionary objectForKey:buttonName];
label.hidden = ... |
15,088,171 | I want to modify a label in **objective C** like this:
When pushing a button named "Car" I want the label "pushedCar" to unhide.
Right now it looks like this but its static...
```
if ([buttonName isEqualToString:@"Car"]) {
self.pushedCar.hidden = NO;}
```
How can I write something like:
```
if ([buttonName... | 2013/02/26 | [
"https://Stackoverflow.com/questions/15088171",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2111015/"
] | Change all your button titles like, Car, Van , Bus etc.
then make this as touch up inside method of all them,
```
-(IBAction) buttonPressed:(UIButton *) pressedButton{
NSString *buttonName = pressedButton.titleLabel.text;
UILabel *label = [self valueForKey:[NSString stringWithFormat:@"pushed%@", buttonName]];
... | I think you are trying to use [Key Value Coding](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueCoding/Articles/KeyValueCoding.html) to get the button instance based on some arbitrary string.
You firstly need to expose the button instances using properties:
```
@interface MyClass : UI... |
49,857,117 | I am trying to get the following thing to work in Excel. I have a list of values out of which I want to create a bar chart. Easy thing normally, but in this special case I do not know how to get it to work with references that change.
I have the data structured as follows:
```
Name Site Value
-------------------... | 2018/04/16 | [
"https://Stackoverflow.com/questions/49857117",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9094791/"
] | What I would suggest is:
Create 3 Pivot Tables. The data source for each of them would be: A:C (the whole columns). This way, when an entry is added, you just update the tables and they get in.
Column "Site" should be added as a filter, then on one Pivot Table you would filter only for site X, another for site Y and ... | Thanks to both of you guys and sorry for the late reply. In the end I got it working with pivot tables, though I had to fiddle a bit with the pivot table wizard, as I wanted to display values from multiple sheets. Thanks again and best regards :) |
5,386,061 | I seem to remember an "offical" site (perl.org or cpan.org) which had a POD previewer. One uploaded a file and it would display the contained POD as it would appear on CPAN. Does someone have this link. I can't seem to find it. | 2011/03/22 | [
"https://Stackoverflow.com/questions/5386061",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468327/"
] | [metacpan.org](https://metacpan.org/)'s online POD preview is at <https://metacpan.org/pod2html>. Either paste the POD in the textarea or click the "Browse for file .." button, select the POD file you want to preview (which may be a `.pm` file including Perl code) and click "Render". | For an **offline** Pod renderer in the style of [search.cpan.org](http://search.cpan.org/) have a look at [pod2cpanhtml](https://metacpan.org/pod/pod2cpanhtml). |
5,386,061 | I seem to remember an "offical" site (perl.org or cpan.org) which had a POD previewer. One uploaded a file and it would display the contained POD as it would appear on CPAN. Does someone have this link. I can't seem to find it. | 2011/03/22 | [
"https://Stackoverflow.com/questions/5386061",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468327/"
] | [metacpan.org](https://metacpan.org/)'s online POD preview is at <https://metacpan.org/pod2html>. Either paste the POD in the textarea or click the "Browse for file .." button, select the POD file you want to preview (which may be a `.pm` file including Perl code) and click "Render". | This question is about CPAN POD rendering, but it was also the top Google search for me for an online POD renderer not just an official one. In addition to CPAN's official one, there's an on-the-fly renderer written by Michał Wojciechowski that I've found super-helpful:
<http://podwebview.odyniec.net/>
He wrote a [bl... |
5,386,061 | I seem to remember an "offical" site (perl.org or cpan.org) which had a POD previewer. One uploaded a file and it would display the contained POD as it would appear on CPAN. Does someone have this link. I can't seem to find it. | 2011/03/22 | [
"https://Stackoverflow.com/questions/5386061",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468327/"
] | For an **offline** Pod renderer in the style of [search.cpan.org](http://search.cpan.org/) have a look at [pod2cpanhtml](https://metacpan.org/pod/pod2cpanhtml). | This question is about CPAN POD rendering, but it was also the top Google search for me for an online POD renderer not just an official one. In addition to CPAN's official one, there's an on-the-fly renderer written by Michał Wojciechowski that I've found super-helpful:
<http://podwebview.odyniec.net/>
He wrote a [bl... |
17,575,297 | This is sort of simplistic but I couldnt find anything that works for this particular situation.
Im trying to find a result via a Mysql query where the item in the db is one letter of a string. For example, I have the string 'MYSQL' and I need to retrieve everything in the DB with an identifier of M or and identifier ... | 2013/07/10 | [
"https://Stackoverflow.com/questions/17575297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1293958/"
] | >
>
> ```
> temp =temp + line;
>
> ```
>
>
Is concatenation of a string as-is. The concatenation requires that a new string object is created and possibly interned, taking a lot of time. Instead, think about using a StringBuilder in most cases or StringBuffer where synchronization is needed.
Create it once with
... | In Java, strings are immutable. So this statement:
```
temp =temp + line;
```
creates a new string object for each line in your file, which slows things down. Some better alternatives include [StringBuilder](http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuilder.html) and [StringBuffer](http://docs.ora... |
183,651 | Let a number *n* $ \in\mathbb Z,$ be expressible as the sum of its digits each raised to *p* $ \in\mathbb N$ . How to prove or disprove that there are infinite such numbers for a particular *p*? | 2012/08/17 | [
"https://math.stackexchange.com/questions/183651",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/31553/"
] | It’s not very well organized, and it has some extraneous clutter, but it also has the core of the argument. You want to show that for each $\epsilon>0$ there is a $\delta>0$ such that $|f(x)-f(c)|<\epsilon$ whenever $x,c\in\operatorname{dom}f$ and $|x-c|<\delta$, so in a polished version of the argument your first step... | I suppose one small detail to add to Brian's answer is that in the argument we assumed $M\neq 0$. But the case for $M=0$ is trivial enough as that means $f$ is constant, which is clearly uniformly continuous (setting $\delta=\epsilon$).
$\textbf{Edit:}$
Suppose $f:S\to\mathbb{R}$ is Lipchitz continuous, then we have ... |
35,381,992 | I am struggling a bit with the following. Our forecasting tool generates some 100k of records of forecast information in Access each month. The tool is an Excel - Access combination. I want to upload the data from Access to SQL Server after the forecast is done (for multiple purposes). I tried to look up the most easy ... | 2016/02/13 | [
"https://Stackoverflow.com/questions/35381992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2112509/"
] | In Access, link via *ODBC* the tables in *SQL Server* you wish to upload to.
Then create and run append queries to insert the data in the linked tables. | I suggest using SSIS package which is started by job on sql server side (by shedule or manual). You can create package with the help of sql server import/export wizard. I think this is the best way to import data from access to sql server. |
35,381,992 | I am struggling a bit with the following. Our forecasting tool generates some 100k of records of forecast information in Access each month. The tool is an Excel - Access combination. I want to upload the data from Access to SQL Server after the forecast is done (for multiple purposes). I tried to look up the most easy ... | 2016/02/13 | [
"https://Stackoverflow.com/questions/35381992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2112509/"
] | In Access, link via *ODBC* the tables in *SQL Server* you wish to upload to.
Then create and run append queries to insert the data in the linked tables. | Thanks for the answers. I will try to do the linked table way, but I already had a look to that and it seems that due to the fact that I use citrix server I was not able to link it directly to SQL server via ODBC. So I have to check what's different there. Not familiar with the SSIS package yet but I will definitely lo... |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | This is what solved it for me:
>
> Eventually I found this thread on the Apple website, and followed the rather bizarre advice of adding a USB extension cable between the keyboard and the Mac (luckily the keyboard comes packaged with one). Bingo! Keyboard fine, mouse plugged into it also fine.
>
>
>
<http://www.z... | On my iMac the wired keyboard quit working—I checked the USB ports, which all worked. I tried the keyboard on my MacBook, which worked. Then I read this blog. The restart didn't work but as a last resort I tried the USB extension and to my surprise, the keyboard works again. |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | I just had this on a box-fresh macbook pro. Sigh. This was the only thing that worked for me:
To reset the SMC:
1. Shut down the computer.
Plug in the MagSafe or USB-C power adapter to a power source and to your computer.
2. On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power butto... | Since February 2015, I've had this happen to me twice. Mac refusing to recognize wired keyboard (new mac keyboard received at Xmas). Holding down power button 5 sec after rebooting works for me, but this should be happening at all! Disabled Bluetooth, removed all connections as well |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | Just tried adding a usb memory stick fix, and it worked. I can't believe I am having to do this, why can't apple recognise that it is a problem. | Since February 2015, I've had this happen to me twice. Mac refusing to recognize wired keyboard (new mac keyboard received at Xmas). Holding down power button 5 sec after rebooting works for me, but this should be happening at all! Disabled Bluetooth, removed all connections as well |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | I just had this on a box-fresh macbook pro. Sigh. This was the only thing that worked for me:
To reset the SMC:
1. Shut down the computer.
Plug in the MagSafe or USB-C power adapter to a power source and to your computer.
2. On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power butto... | On my iMac the wired keyboard quit working—I checked the USB ports, which all worked. I tried the keyboard on my MacBook, which worked. Then I read this blog. The restart didn't work but as a last resort I tried the USB extension and to my surprise, the keyboard works again. |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | This is what solved it for me:
>
> Eventually I found this thread on the Apple website, and followed the rather bizarre advice of adding a USB extension cable between the keyboard and the Mac (luckily the keyboard comes packaged with one). Bingo! Keyboard fine, mouse plugged into it also fine.
>
>
>
<http://www.z... | Just tried adding a usb memory stick fix, and it worked. I can't believe I am having to do this, why can't apple recognise that it is a problem. |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | I resolved my issue by following the SMC Reset instructions [here](https://support.apple.com/en-us/HT201295).
Basically unplug everything, power down the mac, hold the power button for 5 seconds. Once the system has rebooted then reattached all peripherals. Then my keyboard started working again.
Kieran | Since February 2015, I've had this happen to me twice. Mac refusing to recognize wired keyboard (new mac keyboard received at Xmas). Holding down power button 5 sec after rebooting works for me, but this should be happening at all! Disabled Bluetooth, removed all connections as well |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | I resolved my issue by following the SMC Reset instructions [here](https://support.apple.com/en-us/HT201295).
Basically unplug everything, power down the mac, hold the power button for 5 seconds. Once the system has rebooted then reattached all peripherals. Then my keyboard started working again.
Kieran | I had the same issue on my 2015 Air. I had a mouse dongle in the keyboard and plugged it straight into the computer and it didn't work. I plugged a USB hub into the computer and plugged the keyboard into that and it started working for some reason. |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | I just had this on a box-fresh macbook pro. Sigh. This was the only thing that worked for me:
To reset the SMC:
1. Shut down the computer.
Plug in the MagSafe or USB-C power adapter to a power source and to your computer.
2. On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power butto... | I had a similar problem. Brand new iMac that refused to detect my wired keyboard.
After a lot of experimenting, I resolved the problem by removing my bluetooth keyboard from the bluetooth devices list completely and then plugging in the wired keyboard.
* Open System Preferences and select “Bluetooth”
* A list of the ... |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | I resolved my issue by following the SMC Reset instructions [here](https://support.apple.com/en-us/HT201295).
Basically unplug everything, power down the mac, hold the power button for 5 seconds. Once the system has rebooted then reattached all peripherals. Then my keyboard started working again.
Kieran | On my iMac the wired keyboard quit working—I checked the USB ports, which all worked. I tried the keyboard on my MacBook, which worked. Then I read this blog. The restart didn't work but as a last resort I tried the USB extension and to my surprise, the keyboard works again. |
167,291 | Suddenly my wired Apple Keyboard isn't working anymore. My MacBook don't recognize the external keyboard, and the keyboard is only two weeks old.
Is the Keyboard physically broken, or is it a software issue?
What can I do to fix it? | 2015/01/14 | [
"https://apple.stackexchange.com/questions/167291",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87543/"
] | I think the problem is that the keyboard draws so little current that it won´t wake the port if you have the Apple keyboard with a usb hub.
Just stick a usb memorystick in the keyboard and re-insert the cable. If it works then just remove the memorystick or what ever you put in (doesn´t matter what). | Since February 2015, I've had this happen to me twice. Mac refusing to recognize wired keyboard (new mac keyboard received at Xmas). Holding down power button 5 sec after rebooting works for me, but this should be happening at all! Disabled Bluetooth, removed all connections as well |
18,493,618 | I have been trying to make a search using the bootstrap **Typeahead**. I have been able to get the `dropdown list` using Ajax. However, I want to change the width of the dropdown and also the padding inside it and the basic background color. Which is white. How do I do it?
Also, I want it to always show `a -> "View Al... | 2013/08/28 | [
"https://Stackoverflow.com/questions/18493618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2284814/"
] | Changing the look of the dropdown is pretty easy, as the previous answer suggests you should add your custom styles in a file included after the Bootstrap CSS, to identify which selectors you need to use in order to override Bootstrap's styles I recommend you use your browser's DOM inspection tools.
Now the tricky par... | You can add a custom CSS file to style the Typeahead menu.
```
.typeahead{
background-color: #fff;
min-width: 250px;
}
.typeahead li{
padding: 5px;
}
.typeahead li.active{
background-color: #eee;
}
```
make sure to include your custom style sheet after the bootstrap.css file. |
54,362,211 | In my first drop down list I have
```
<div class="form-group row">
<label class="col-md-4">L.R. Pay Mode</label>
<select name="lr_pay_mode" id="lr_pay_mode">
<option value="">Select</option>
<option value="1">Paid</option>
<option value="2">To Pay</option>
</select>
</div>
```
... | 2019/01/25 | [
"https://Stackoverflow.com/questions/54362211",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8717825/"
] | From the code you shared, I think your problem is in the `StaticPagesController`, in the `home` action. There you retrieve the `@feed_items` as follows:
```
@new_micropost = Micropost.new
@micropost = current_user.microposts
@feed_items = Micropost.all.paginate(page: params[:page])
```
and I am guessing you ... | You need to add user condition to the query in `MicropostsController#index`, e.g. by using `current_user.microposts` relation
```
def index
@microposts = current_user.microposts
@microposts = @microposts.tagged_with(params[:tag]) if params[:tag]
end
```
btw similar scope could be useful on show and update pages ... |
4,025,717 | I have tried to solve this problem by supposing by contradiction that the limit was $ + \infty$. Then, you'd have $\forall M > 0, \exists N \in \mathbb{N}: \forall n > N, n(x\_{n+1} - x\_n) > M$. This would mean that $(x\_n)$ is increasing after a certain order $N$, which means that it must be convergent. I don't know ... | 2021/02/14 | [
"https://math.stackexchange.com/questions/4025717",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/789392/"
] | If $$\lim\_{n \rightarrow +\infty} n(x\_{n+1}-x\_n) = +\infty$$then there exists $N$ such that for every $n \geq N$,
$$n(x\_{n+1}-x\_n) \geq 1, \quad \text{i.e.} \quad x\_{n+1}-x\_n \geq \frac{1}{n}$$
If you sum that from $N$ to an integer $N'$ you get
$$\sum\_{n=N}^{N'} x\_{n+1}-x\_n \geq \sum\_{n=N}^{N'} \frac{1}{n}... | Suppose $n(x\_{n+1}-x\_n)>M>0$ for all $n>N$.
Then
$$ x\_{n+1}>x\_{N+1}+M\sum\_{k=N+1}^n \frac 1k$$
for all $n>N$. |
17,764,326 | The current indentation for `cl-flet` seems really ugly to me.
See for instance:
```
(defun foo (lst)
(cl-flet ((unusually-long-bar (x)
(1+ x)
(1+ x)
(1+ x)))
(mapcar #'unusually-long-bar lst)))
```
I'd like to set ... | 2013/07/20 | [
"https://Stackoverflow.com/questions/17764326",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1350992/"
] | The following should work:
```
(setq lisp-indent-function 'common-lisp-indent-function)
(eval-after-load "cl-indent"
'(progn
(put 'cl-flet 'common-lisp-indent-function
(get 'flet 'common-lisp-indent-function))
))
``` | By way of addition to Sabof's answer, here is a snippet which copies indentation rules from all Common Lisp symbols to their `cl-` prefixed Emacs equivalents, when the latter exist:
```
(load-library "cl-indent") ; defines the common-lisp-indent-function properties
(cl-loop for symbol being the symbols
for cl... |
33,150,149 | I have several elements on my page with same locator.
Example:
```
<div.test-info><a>Test1</a></div>
<div.test-info><a>Test2</a></div>
<div.test-info><a>Test3</a></div>
<div.test-info><a>Test4</a></div>
```
There maybe 20 or more elements on the page.
In python, I tested this with FOR loop, which run through arra... | 2015/10/15 | [
"https://Stackoverflow.com/questions/33150149",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2936138/"
] | If you want to get content of divs, use [grabMultiple](http://codeception.com/docs/modules/WebDriver#grabMultiple) method, it returns array of strings.
`$I->grabMultiple('div.test-info a')` | Here is working solution:
```
$allLinks = $I->grabMultiple('.readmore'); //grab all clickable links
for( $i = 0; $i<sizeof($allLinks); $i++ ) { //iterate through a loop
$I->click($allLinks[$i]); //click each link
}
``` |
33,150,149 | I have several elements on my page with same locator.
Example:
```
<div.test-info><a>Test1</a></div>
<div.test-info><a>Test2</a></div>
<div.test-info><a>Test3</a></div>
<div.test-info><a>Test4</a></div>
```
There maybe 20 or more elements on the page.
In python, I tested this with FOR loop, which run through arra... | 2015/10/15 | [
"https://Stackoverflow.com/questions/33150149",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2936138/"
] | ```
$elements = $I->_findElements('div.test-info a');
foreach($elements as $element)
{
*do some testing* for example $element->click();
}
```
the methods you can use for the RemoteWebElement, see <http://facebook.github.io/php-webdriver/classes/RemoteWebElement.html> | Here is working solution:
```
$allLinks = $I->grabMultiple('.readmore'); //grab all clickable links
for( $i = 0; $i<sizeof($allLinks); $i++ ) { //iterate through a loop
$I->click($allLinks[$i]); //click each link
}
``` |
68,323,349 | I dynamically allocated memory for 3D array of pointers. My question is how many pointers do I have? I mean, do I have X·Y number of pointers pointing to an array of double or X·Y·Z pointers pointing to a double element or is there another variant?
```
double*** arr;
arr = (double***)calloc(X, sizeof(double));
for (in... | 2021/07/09 | [
"https://Stackoverflow.com/questions/68323349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16414843/"
] | The code you apparently intended to write would start:
```
double ***arr = calloc(X, sizeof *arr);
```
Notes:
* Here we define one pointer, `arr`, and set it to point to memory provided by `calloc`.
* Using `sizeof (double)` with this is wrong; `arr` is going to point to things of type `double **`, so we want the s... | Well, short answer is: **it is not known**.
As a classic example, keep in mind the `main()` prototype
```
int main( int argc, char** argv);
```
`argc` keeps the number of pointers. Without it we do not know how many they are. The system builds the array `argv`, gently updates `argc` with the value and then l... |
72,238,647 | I have multiple .csv files with different names like ATUL.csv, ISEC.csv, XYZ.csv and so on... Every file has similar data format mentioned below:
```none
datetime symbol open high low close volume
2005-03-10 09:15:00 NSE:ATUL 85.59 89.00 85.19 86.84 73582
2005-03-11 09:15:00 N... | 2022/05/14 | [
"https://Stackoverflow.com/questions/72238647",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19059598/"
] | I came across a handy class `SingleLiveEvent` that we can use instead of `LiveData` in `ViewModel` class to send only new updates after subscription.
```
class SingleLiveEvent<T> : MutableLiveData<T>() {
private val pending = AtomicBoolean(false)
override fun observe(owner: LifecycleOwner, observer: Observer... | You can check if there is equal value in your shared to avoid the double set
```
if (it!=null) {
viewModel.pageNumbersArray.value?.get(it).let{ value ->
if (SharedPreferenceHelper.pagesNumber != value)
SharedPreferenceHelper.pagesNumber = value
}
```
} |
58,624,203 | ```
child: Text(
// addres["address_1"],
addres["firstname"] + addres["lastname"] + addres["address_1"] + addres["city"] + addres["country"],
overflow: TextOverflow.ellipsis,
maxLines: 3,
style: TextStyle(color: Colors.black, fontSize: 16.0),
),
```
I would like to separate the addres values with comma. I... | 2019/10/30 | [
"https://Stackoverflow.com/questions/58624203",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11663091/"
] | UPDATE 09/11/2020
-----------------
This solution is no longer needed on `eslint-plugin-react-hooks@4.1.0` and above.
Now `useMemo` and `useCallback` can safely receive referential types as dependencies.[#19590](https://github.com/facebook/react/pull/19590)
```
function MyComponent() {
const foo = ['a', 'b', 'c'];... | I think you can solve the problem at the root but that means changing useCombinedReducers, I forked the repo and created [a pull request](https://github.com/the-road-to-learn-react/use-combined-reducers/pull/5) because I don't think useCombinedReducers should return a new reference for dispatch every time you call it.
... |
282,132 | In the October 2015 issue of National Geographic I read on [page 43](http://news.nationalgeographic.com/2015/09/150910-human-evolution-change/) (page 42 in the printed edition)
>
> […] Berger invited more than 30 young scientists […] for a blitzkrieg fossil fest lasting six weeks.
>
>
>
A German friend was astoni... | 2015/10/23 | [
"https://english.stackexchange.com/questions/282132",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/144052/"
] | "Blitzkrieg" is German for "lightning warfare". It was a term used to describe a particular set of tactics the Germans used in World War 2 involving very rapid advance across enemy territory using tanks and aircraft.
In U.S. English, people sometimes use "blitzkrieg" to refer to any attempt to accomplish some task qui... | **1. Language differences**
The words 'blitz' and 'blitzkrieg' are synonymous in English but not in German. In fact English speakers use 'blitz' as an abbreviation for 'blitzkrieg' (which it is not the case in German). That is an important factor to consider when a German person reads the article. In German, a *blitz*... |
282,132 | In the October 2015 issue of National Geographic I read on [page 43](http://news.nationalgeographic.com/2015/09/150910-human-evolution-change/) (page 42 in the printed edition)
>
> […] Berger invited more than 30 young scientists […] for a blitzkrieg fossil fest lasting six weeks.
>
>
>
A German friend was astoni... | 2015/10/23 | [
"https://english.stackexchange.com/questions/282132",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/144052/"
] | "Blitzkrieg" is German for "lightning warfare". It was a term used to describe a particular set of tactics the Germans used in World War 2 involving very rapid advance across enemy territory using tanks and aircraft.
In U.S. English, people sometimes use "blitzkrieg" to refer to any attempt to accomplish some task qui... | To place the source quotation in greater context, here's a link to the National Geographic article:
<http://news.nationalgeographic.com/2015/09/150910-human-evolution-change/>
I would agree with the posts that point to military terminology generally creeping into non-military vernacular over time; and that US speaker... |
282,132 | In the October 2015 issue of National Geographic I read on [page 43](http://news.nationalgeographic.com/2015/09/150910-human-evolution-change/) (page 42 in the printed edition)
>
> […] Berger invited more than 30 young scientists […] for a blitzkrieg fossil fest lasting six weeks.
>
>
>
A German friend was astoni... | 2015/10/23 | [
"https://english.stackexchange.com/questions/282132",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/144052/"
] | To place the source quotation in greater context, here's a link to the National Geographic article:
<http://news.nationalgeographic.com/2015/09/150910-human-evolution-change/>
I would agree with the posts that point to military terminology generally creeping into non-military vernacular over time; and that US speaker... | **1. Language differences**
The words 'blitz' and 'blitzkrieg' are synonymous in English but not in German. In fact English speakers use 'blitz' as an abbreviation for 'blitzkrieg' (which it is not the case in German). That is an important factor to consider when a German person reads the article. In German, a *blitz*... |
11,373,797 | I am using the Google Analytics Javascript library to let users view a GeoMap of the particular page they are on. However, everytime they attempt to do so, thye have to go through an authentication process only to have my data displayed on my page. How can I find an alternative to this. I only want to embed my Analytic... | 2012/07/07 | [
"https://Stackoverflow.com/questions/11373797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1508503/"
] | You can use Google Analytics superProxy to share data with users who are not authenticated.
You can create queries to Analytics with superProxy and then use the data stored with superProxy to construct your charts. I ran into the same problem, and this was the only solution I could find.
<https://developers.google... | Can you share more information about how you access Google Analytics?
Check out <http://code.google.com/p/google-api-javascript-client/wiki/Authentication> on how to set authentication. Note that your credentials are visible in JavaScript, so make sure you create a user with just the minimal permissions you need |
46,479,994 | I have this HTML fragment:
```
<div class="form-group">
<div class="col-sm-1"></div>
<label for="allquestion4" class="col-sm-6 control-label label-red">Question</label>
<div class="col-sm-1"></div>
<div class="col-sm-3">
<select size="2" class="selectpicker" id="allquestion4" title="Choose">
<option ... | 2017/09/29 | [
"https://Stackoverflow.com/questions/46479994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5938276/"
] | Remove the `.` from `hasClass('.label-red')`. It wants the name of the class not a CSS selector. | There is an error in the original JQuery selector as pointed out by @Mark remove the `.` from the `hasClass('.label-red')` secondly the selector needs a parent so the html needs to be modified so that the `<label>` tags wrap the `<select>` thus:
```
<label class="col-sm-6 control-label label-red">Question
<select ... |
58,042,797 | I have 5 variables that are randomly assigned a number from 0 - 500, I was wondering how I could compare all 5 of these variables and then return the greatest value's variable name in console.
The variable names are: count1, count2, count3, count4, count5
Thank you! | 2019/09/21 | [
"https://Stackoverflow.com/questions/58042797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11729294/"
] | Like you said, your `A` class is not copyable due to the `ifstream` member, which can't be copied. So your class's copy constructor is deleted by default.
But you are trying to copy-construct an `A` object when you pass `tempFile` to `emplace_back()`.
You need to pass the filename instead to `emplace_back()` and let i... | >
> If I'm not wrong, since I have a member std::ifstream inside my class A, the copy constructor is deleted (Ref: <https://en.cppreference.com/w/cpp/io/basic_ifstream/basic_ifstream>)
>
>
>
You are right, `std::basic_ifstream` is an example of uncopyable type, because it's illogical to have several copies of a si... |
58,042,797 | I have 5 variables that are randomly assigned a number from 0 - 500, I was wondering how I could compare all 5 of these variables and then return the greatest value's variable name in console.
The variable names are: count1, count2, count3, count4, count5
Thank you! | 2019/09/21 | [
"https://Stackoverflow.com/questions/58042797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11729294/"
] | As noted in the other answer, `class A` is non-copyable because its member `std::ifstream _file;` is non-copyable.
But `std::ifstream` is movable, and normally your class would be movable as well, *but* providing a custom destructor prevents the implicit generation of a move constructor and a move assignment operator ... | >
> If I'm not wrong, since I have a member std::ifstream inside my class A, the copy constructor is deleted (Ref: <https://en.cppreference.com/w/cpp/io/basic_ifstream/basic_ifstream>)
>
>
>
You are right, `std::basic_ifstream` is an example of uncopyable type, because it's illogical to have several copies of a si... |
50,260,348 | How to find all occurrences of word or a character and select them once and edit using multi cursor in visual studio code?
I have list of users and need to add domain before names.
I have:
```
abc
pqr
xyz
```
I want :
```
domain\abc
domain\pqr
domain\xyz
```
I want to search for a new line character which will... | 2018/05/09 | [
"https://Stackoverflow.com/questions/50260348",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8407160/"
] | The easiest way to achieve this doesn't involve searching for newlines but rather by
1. Making a selection (Such as `Ctrl`+`A`)
2. Add cursor to all lines of the selection (`Alt`+`Shift`+`I`)
3. Pressing home (`Home`) | You can use search and replace with a simple regular expression.
Search for: `^(.+)$`
Replace with: `domain\\$1`
Make sure to enable regular expressions (`Alt`+`R`). |
55,215,494 | After upgrade to 0.59 the development build fails with the following error. It worked fine till 0.58.6
"Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle is packaged correctly for release."
I have also added `android:usesCleartextTraffic="true"` in An... | 2019/03/18 | [
"https://Stackoverflow.com/questions/55215494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2784338/"
] | You need to change your target sdk to **27** instead of **28** in your project level `build.gradle`. From *Android P(28)*, Google ban the use of http.
 | I had this same issue using genymotion and then I realized that the emulator was offline, and that's why it couldn't connect to the metro server. |
55,215,494 | After upgrade to 0.59 the development build fails with the following error. It worked fine till 0.58.6
"Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle is packaged correctly for release."
I have also added `android:usesCleartextTraffic="true"` in An... | 2019/03/18 | [
"https://Stackoverflow.com/questions/55215494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2784338/"
] | You need to change your target sdk to **27** instead of **28** in your project level `build.gradle`. From *Android P(28)*, Google ban the use of http.
 | "react-native": "0.64.1",
I used other solution but I've resolved this issue in other way, with changing `bundleInDebug: true,` in `project.ext.react` in `android > app > build.gradle`.
```
project.ext.react = [
bundleInDebug: true,
enableHermes: ***,
```
] |
14,574,944 | I'm absolutely terrible at regex; can anyone help me solve the expression I need in order to separate two values I need from a log file?
Log file example.
```
1/28/2013 8:43:22 PM Removed {178.76.234.41}
1/28/2013 8:43:22 PM Removed {78.105.26.0}
1/28/2013 8:43:22 PM Removed {24.165.198.12}
1/28/... | 2013/01/29 | [
"https://Stackoverflow.com/questions/14574944",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2015533/"
] | If those are the only two words you need to include, have you tried something like this?
```
preg_match_all("~(Removed|Added)\s+{(.*)}~i", $a, $b);
```
So in total:
```
$a = '1/28/2013 8:43:22 PM Removed {178.76.234.41}
1/28/2013 8:43:22 PM Removed {78.105.26.0}
1/28/2013 8:43:22 PM Remove... | I think this works for you;
```
$s = '1/28/2013 8:43:22 PM Removed {178.76.234.41}
1/28/2013 8:43:22 PM Removed {78.105.26.0}
1/28/2013 8:43:22 PM Removed {24.165.198.12}
1/28/2013 8:43:23 PM Added {178.76.234.41}
1/28/2013 8:43:23 PM Added {69.246.227.43}... |
14,574,944 | I'm absolutely terrible at regex; can anyone help me solve the expression I need in order to separate two values I need from a log file?
Log file example.
```
1/28/2013 8:43:22 PM Removed {178.76.234.41}
1/28/2013 8:43:22 PM Removed {78.105.26.0}
1/28/2013 8:43:22 PM Removed {24.165.198.12}
1/28/... | 2013/01/29 | [
"https://Stackoverflow.com/questions/14574944",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2015533/"
] | You don't actually need a regular expression to match this. You can split it on whitespace using `preg_split()` and `\s+` as your delimiter, and then strip off the braces `{}` from the IP address with a simple function like `trim()`.
```
$output = array();
// While reading line by line...
$parts = preg_split('/\s+/',... | I think this works for you;
```
$s = '1/28/2013 8:43:22 PM Removed {178.76.234.41}
1/28/2013 8:43:22 PM Removed {78.105.26.0}
1/28/2013 8:43:22 PM Removed {24.165.198.12}
1/28/2013 8:43:23 PM Added {178.76.234.41}
1/28/2013 8:43:23 PM Added {69.246.227.43}... |
38,953,585 | First, this is OpenCart
I have two tables:
1. oc\_product (product\_id, model, price, event\_start, event\_end and etc.)
2. oc\_product\_to\_category (product\_id, category\_id)
Every product has Start Date and End Date. I created MYSQL event that catch every product with expired date (event\_end < NOW()) ... | 2016/08/15 | [
"https://Stackoverflow.com/questions/38953585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4037326/"
] | I suggest turning on the sonar. I have 3 event links hanging off my profile page. So I created a few helper tables (that can also be seen in those links) to assist is turning on the sonar to see what is up in your events. Note you can expand on it for performance tracking as I did in those links.
Remember that Events ... | So,
I saw in mysqlog the following errors
```
160816 10:18:00 [ERROR] Event Scheduler: [root@localhost][events.move_to_archive_category] Duplicate entry '29-68' for key 'PRIMARY'
160816 10:18:00 [Note] Event Scheduler: [root@localhost].[events.move_to_archive_category] event execution failed.
```
and I just add IN... |
4,714 | The spam flag says that the question or answer "Exists only to promote a product or service, does not disclose the author's affiliation."
The question that provoked me to ask this question is the soon to be deleted question [Content Marketing Services to Boost Your Business Growth!](https://skeptics.stackexchange.com/... | 2021/02/01 | [
"https://skeptics.meta.stackexchange.com/questions/4714",
"https://skeptics.meta.stackexchange.com",
"https://skeptics.meta.stackexchange.com/users/31988/"
] | I suspect (without providing any evidence) this wording is a hangover from StackOverflow, where they wanted to avoid:
>
> The best library for embedding Rust in your COBOL is `COBOLᴙUST`. ⭐⭐⭐⭐ It does everything you could ever want, and it is only $299.99/month. [Buy it now](http://127.0.0.1/)
>
>
>
But they want... | Is there perhaps an implied *or* in the usage guidance sentence?
>
> Exists only to promote a product or service, **[or]** does not disclose the author's affiliation."
>
>
>
It seems to me that an otherwise good answer that leans heavily on the author's work elsewhere, but is not disclosed, is often called "spam"... |
22,585,354 | I am an experienced Java developer, but a novice Groovy programmer, which I am learning at the moment (and it's great so far). As a reference I am reading this document:
<http://groovy.codehaus.org/Groovy+style+and+language+feature+guidelines+for+Java+developers>
That is all fine, except one thing I do not fully unde... | 2014/03/23 | [
"https://Stackoverflow.com/questions/22585354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/514149/"
] | In Groovy and many other dynamic languages everything is an object, including class itself.
Say you have a class Circle in java. You need to call Circle.getClass() for an class object do deal with. In many dynamic languages, class itself does not need to be specified. Say you have a class
```
class Miu {}
```
and e... | You're confusing two different things. You don't need .class when you're referring to some particular class, so if you have a class Foo and you want to refer to it you don't have to type `Foo.class`, you just type `Foo`. (That's what the article you're linking to describes.) But when you have some object and you want t... |
5,643,514 | I'm new to Objective-C. Essentially I want to store a set of Endpoint URLs as strings for use in my application, but I need a different domain based on whether the app is in DEBUG mode or not. I thought it might be useful to use a header file (`Common.h` for example) with some simple defines like so:
```
#ifdef DEBUG
... | 2011/04/13 | [
"https://Stackoverflow.com/questions/5643514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/264230/"
] | If you're just concatenating strings, you can use compile time string concatenation:
```
#ifdef DEBUG
#define kAPIEndpointHost @"http://example.dev"
#else
#define kAPIEndpointHost @"http://www.example.com"
#endif
#define kAPIEndpointLatest (kAPIEndpointHost @"/api/latest_content")
#define kAPIEndpoin... | In your header file:
```
extern NSString *const kAPIEndpointHost;
extern NSString *const kAPIEndpointLatestPath;
extern NSString *const kAPIEndpointMostPopularPath;
```
In your implementation file:
```
#ifdef DEBUG
NSString *const kAPIEndpointHost = @"http://example.dev";
#else
NSString *const kAPIEndpointH... |
5,643,514 | I'm new to Objective-C. Essentially I want to store a set of Endpoint URLs as strings for use in my application, but I need a different domain based on whether the app is in DEBUG mode or not. I thought it might be useful to use a header file (`Common.h` for example) with some simple defines like so:
```
#ifdef DEBUG
... | 2011/04/13 | [
"https://Stackoverflow.com/questions/5643514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/264230/"
] | If you're just concatenating strings, you can use compile time string concatenation:
```
#ifdef DEBUG
#define kAPIEndpointHost @"http://example.dev"
#else
#define kAPIEndpointHost @"http://www.example.com"
#endif
#define kAPIEndpointLatest (kAPIEndpointHost @"/api/latest_content")
#define kAPIEndpoin... | I don't like using #defines for string constants. If you want global constants and compile time concatenation. I would use the following:
Header file:
```
extern NSString *const kAPIEndpointHost;
extern NSString *const kAPIEndpointLatestPath;
extern NSString *const kAPIEndpointMostPopularPath;
```
Implementation fi... |
20,139,017 | I have a xml file that has contents similar to below:
```
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
```
I n... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20139017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2430563/"
] | Use [`collections.Counter`](http://docs.python.org/2/library/collections.html#collections.Counter) for Python2.7+:
```
>>> from collections import Counter
>>> lis1 = [['a', 2], ['b',1]]
>>> lis2 = [['b', 2], ['c', 1]]
>>> c = Counter(dict(lis1)) + Counter(dict(lis2))
>>> c.most_common()
[('b', 3), ('a', 2), ('c', 1)]
... | As no `Counter` class in collections for [python 2.6](https://stackoverflow.com/a/13311111/1265154), this one is will do. One can use `defautldict`, but its usage do not simplifies code:
```
a = [['a', 2], ['b', 1]]
b = [['b', 2], ['c', 1]]
rv = {}
for k, v in a + b:
rv[k] = rv.setdefault(k, 0) + v
```
Ouput of ... |
20,139,017 | I have a xml file that has contents similar to below:
```
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
```
I n... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20139017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2430563/"
] | Use [`collections.Counter`](http://docs.python.org/2/library/collections.html#collections.Counter) for Python2.7+:
```
>>> from collections import Counter
>>> lis1 = [['a', 2], ['b',1]]
>>> lis2 = [['b', 2], ['c', 1]]
>>> c = Counter(dict(lis1)) + Counter(dict(lis2))
>>> c.most_common()
[('b', 3), ('a', 2), ('c', 1)]
... | Just throwing this answer in here but, you *may* wish to combine them to a list, and then count them:
```
>>> a = [['a', 2], ['b',1]]
>>> b = [['b', 2], ['c', 1]]
>>> a + b
[['a', 2], ['b', 1], ['b', 2], ['c', 1]]
>>> "".join(c*n for c, n in a+b)
'aabbbc'
>>> from collections import Counter
>>> Counter("".join(c*n for... |
20,139,017 | I have a xml file that has contents similar to below:
```
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
```
I n... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20139017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2430563/"
] | Use [`collections.Counter`](http://docs.python.org/2/library/collections.html#collections.Counter) for Python2.7+:
```
>>> from collections import Counter
>>> lis1 = [['a', 2], ['b',1]]
>>> lis2 = [['b', 2], ['c', 1]]
>>> c = Counter(dict(lis1)) + Counter(dict(lis2))
>>> c.most_common()
[('b', 3), ('a', 2), ('c', 1)]
... | You can simply create dicts out of your list of tuples(lists here in your case), and then add their counters.
```
>>> from collections import Counter
>>> a = [['b', 2], ['c', 1]]
>>> b = [['a', 2], ['b',1]]
>>> sorted(dict(Counter(dict(a)) + Counter(dict(b))).items(),key= lambda x:-x[1])
[('b', 3), ('a', 2), ('c', 1)]... |
20,139,017 | I have a xml file that has contents similar to below:
```
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
```
I n... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20139017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2430563/"
] | Use [`collections.Counter`](http://docs.python.org/2/library/collections.html#collections.Counter) for Python2.7+:
```
>>> from collections import Counter
>>> lis1 = [['a', 2], ['b',1]]
>>> lis2 = [['b', 2], ['c', 1]]
>>> c = Counter(dict(lis1)) + Counter(dict(lis2))
>>> c.most_common()
[('b', 3), ('a', 2), ('c', 1)]
... | Nice
>
>
> >
> >
> > >
> > > from collections import Counter
> > >
> > >
> > > lis1 = [['a', 2], ['b',1]]
> > >
> > >
> > > lis2 = [['b', 2], ['c', 1]]
> > >
> > >
> > > c = Counter(dict(lis1)) + Counter(dict(lis2))
> > >
> > >
> > > c.most\_common()
> > >
> > >
> > >
> >
> >
> >
>
>
>
```
[('b... |
20,139,017 | I have a xml file that has contents similar to below:
```
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
```
I n... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20139017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2430563/"
] | Use [`collections.Counter`](http://docs.python.org/2/library/collections.html#collections.Counter) for Python2.7+:
```
>>> from collections import Counter
>>> lis1 = [['a', 2], ['b',1]]
>>> lis2 = [['b', 2], ['c', 1]]
>>> c = Counter(dict(lis1)) + Counter(dict(lis2))
>>> c.most_common()
[('b', 3), ('a', 2), ('c', 1)]
... | Answer :
```
>>> from collections import Counter
>>> p = [['a', 2], ['b',1]]
>>> q = [['b', 2], ['c', 1]]
>>> m = Counter(dict(p)) + Counter(dict(q))
>>> sorted(m.items(), key=lambda x:x[1], reverse=True)
[('b', 3), ('a', 2), ('c', 1)]
``` |
20,139,017 | I have a xml file that has contents similar to below:
```
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
```
I n... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20139017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2430563/"
] | As no `Counter` class in collections for [python 2.6](https://stackoverflow.com/a/13311111/1265154), this one is will do. One can use `defautldict`, but its usage do not simplifies code:
```
a = [['a', 2], ['b', 1]]
b = [['b', 2], ['c', 1]]
rv = {}
for k, v in a + b:
rv[k] = rv.setdefault(k, 0) + v
```
Ouput of ... | Just throwing this answer in here but, you *may* wish to combine them to a list, and then count them:
```
>>> a = [['a', 2], ['b',1]]
>>> b = [['b', 2], ['c', 1]]
>>> a + b
[['a', 2], ['b', 1], ['b', 2], ['c', 1]]
>>> "".join(c*n for c, n in a+b)
'aabbbc'
>>> from collections import Counter
>>> Counter("".join(c*n for... |
20,139,017 | I have a xml file that has contents similar to below:
```
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
```
I n... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20139017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2430563/"
] | As no `Counter` class in collections for [python 2.6](https://stackoverflow.com/a/13311111/1265154), this one is will do. One can use `defautldict`, but its usage do not simplifies code:
```
a = [['a', 2], ['b', 1]]
b = [['b', 2], ['c', 1]]
rv = {}
for k, v in a + b:
rv[k] = rv.setdefault(k, 0) + v
```
Ouput of ... | You can simply create dicts out of your list of tuples(lists here in your case), and then add their counters.
```
>>> from collections import Counter
>>> a = [['b', 2], ['c', 1]]
>>> b = [['a', 2], ['b',1]]
>>> sorted(dict(Counter(dict(a)) + Counter(dict(b))).items(),key= lambda x:-x[1])
[('b', 3), ('a', 2), ('c', 1)]... |
20,139,017 | I have a xml file that has contents similar to below:
```
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
```
I n... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20139017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2430563/"
] | As no `Counter` class in collections for [python 2.6](https://stackoverflow.com/a/13311111/1265154), this one is will do. One can use `defautldict`, but its usage do not simplifies code:
```
a = [['a', 2], ['b', 1]]
b = [['b', 2], ['c', 1]]
rv = {}
for k, v in a + b:
rv[k] = rv.setdefault(k, 0) + v
```
Ouput of ... | Nice
>
>
> >
> >
> > >
> > > from collections import Counter
> > >
> > >
> > > lis1 = [['a', 2], ['b',1]]
> > >
> > >
> > > lis2 = [['b', 2], ['c', 1]]
> > >
> > >
> > > c = Counter(dict(lis1)) + Counter(dict(lis2))
> > >
> > >
> > > c.most\_common()
> > >
> > >
> > >
> >
> >
> >
>
>
>
```
[('b... |
20,139,017 | I have a xml file that has contents similar to below:
```
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
<tag>
<sub>...</sub>
<msg>....</msg>
</tag>
<tag>
<sub>...</sub>
</tag>
```
I n... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20139017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2430563/"
] | As no `Counter` class in collections for [python 2.6](https://stackoverflow.com/a/13311111/1265154), this one is will do. One can use `defautldict`, but its usage do not simplifies code:
```
a = [['a', 2], ['b', 1]]
b = [['b', 2], ['c', 1]]
rv = {}
for k, v in a + b:
rv[k] = rv.setdefault(k, 0) + v
```
Ouput of ... | Answer :
```
>>> from collections import Counter
>>> p = [['a', 2], ['b',1]]
>>> q = [['b', 2], ['c', 1]]
>>> m = Counter(dict(p)) + Counter(dict(q))
>>> sorted(m.items(), key=lambda x:x[1], reverse=True)
[('b', 3), ('a', 2), ('c', 1)]
``` |
14,192,598 | i have a table with 62 columns
something like
```
CREATE TABLE history_employees (
id INT NOT NULL,
first_name VARCHAR(20),
last_name VARCHAR(20),
hire_date DATE NOT NULL,
job_code INT NOT NULL,
dept_id INT NOT NULL,
.
.
.
.
);
```
now I want to change the order o... | 2013/01/07 | [
"https://Stackoverflow.com/questions/14192598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1885368/"
] | If you wish to speed up a query that references a small number of columns you should use covering indexes: <http://dom.as/2007/01/26/mysql-covering-index-performance/>
Altering the column order will not improve performance because databases retrieve results one entire row at a time (as described in [ICP Optimization](... | If you are using `EMS SQL Manager`, you can try this one. [Reordering Columns](http://www.sqlmanager.net/en/products/mysql/manager/documentation/hs5433) |
50,984,161 | I have two arrays with values. I am trying to get `desiredArray` which should check `firstArray` values in `secondArray` and if its a match, it should add the numbers of those value associated with them and push it to `desiredArray`. Could any one help?
```js
firstArray = ["Jack Sparrow", "Ryan Gosling", "Peter Parker... | 2018/06/22 | [
"https://Stackoverflow.com/questions/50984161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9891009/"
] | If you're actually getting an instance of `Invoice` passed to your `show` method then it likely means you have [Route-Model Binding](https://laravel.com/docs/5.6/routing#route-model-binding) set up for your project. Laravel is looking at the defined route and working out that the ID part (`1`) should map to an instance... | Try using `$invoiceId`
```
public function show(Invoice $invoice, $invoiceId)
{
$clients = Invoice::with('user','products')->get();
$invoices = Invoice::with('products')->findOrFail($invoiceId);
return view('admin.invoices.show', compact('invoice','invoices'),compact('clients'));
}
``` |
50,984,161 | I have two arrays with values. I am trying to get `desiredArray` which should check `firstArray` values in `secondArray` and if its a match, it should add the numbers of those value associated with them and push it to `desiredArray`. Could any one help?
```js
firstArray = ["Jack Sparrow", "Ryan Gosling", "Peter Parker... | 2018/06/22 | [
"https://Stackoverflow.com/questions/50984161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9891009/"
] | If you're actually getting an instance of `Invoice` passed to your `show` method then it likely means you have [Route-Model Binding](https://laravel.com/docs/5.6/routing#route-model-binding) set up for your project. Laravel is looking at the defined route and working out that the ID part (`1`) should map to an instance... | Simple way you may try this.
```
//Define query string in route
Route::get('admin/invoice/{id}','ControllerName@show')
//Get `id` in show function
public function show(Invoice $invoice,$id)
{
$invoice_id = $id;
}
``` |
50,984,161 | I have two arrays with values. I am trying to get `desiredArray` which should check `firstArray` values in `secondArray` and if its a match, it should add the numbers of those value associated with them and push it to `desiredArray`. Could any one help?
```js
firstArray = ["Jack Sparrow", "Ryan Gosling", "Peter Parker... | 2018/06/22 | [
"https://Stackoverflow.com/questions/50984161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9891009/"
] | If you're actually getting an instance of `Invoice` passed to your `show` method then it likely means you have [Route-Model Binding](https://laravel.com/docs/5.6/routing#route-model-binding) set up for your project. Laravel is looking at the defined route and working out that the ID part (`1`) should map to an instance... | do this if you want to get the url segment in controller.
```
$invoice_id = request()->segment(3);
```
if you want this in view
```
{{ Request::segment(3) }}
```
Goodluck! |
50,984,161 | I have two arrays with values. I am trying to get `desiredArray` which should check `firstArray` values in `secondArray` and if its a match, it should add the numbers of those value associated with them and push it to `desiredArray`. Could any one help?
```js
firstArray = ["Jack Sparrow", "Ryan Gosling", "Peter Parker... | 2018/06/22 | [
"https://Stackoverflow.com/questions/50984161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9891009/"
] | If you're actually getting an instance of `Invoice` passed to your `show` method then it likely means you have [Route-Model Binding](https://laravel.com/docs/5.6/routing#route-model-binding) set up for your project. Laravel is looking at the defined route and working out that the ID part (`1`) should map to an instance... | Usually happens when giving a route name different from the controller name
Example:
```
Route::resource('xyzs', 'AbcController');
```
Expected:
```
Route::resource('abcs', 'AbcController');
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.