qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
10,538,747 | Is it a simple way to compare is field of TIMESTAMP type get into last **n** hours?
I can do the calculation based on the day and time, but is it possible something like
```
timestamp > SYSDATE - 1
```
(SYSDATE - 1) is yesterday, as far as understand, so that will check if timestamp is within the last 24 hours.
Th... | 2012/05/10 | [
"https://Stackoverflow.com/questions/10538747",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/766022/"
] | If you need to look for records within the last n hour, then subtract a time interval from the current time. For Oracle, the quantity of the interval must be in single quotes. There are many intervals you can use (hour, minute, second, day, year, month).
```
timestampfield > current_timestamp - interval '1' hour
``` | You can do this:
timestamp > cast(sysdate-1 as timestamp) |
10,538,747 | Is it a simple way to compare is field of TIMESTAMP type get into last **n** hours?
I can do the calculation based on the day and time, but is it possible something like
```
timestamp > SYSDATE - 1
```
(SYSDATE - 1) is yesterday, as far as understand, so that will check if timestamp is within the last 24 hours.
Th... | 2012/05/10 | [
"https://Stackoverflow.com/questions/10538747",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/766022/"
] | If you need to look for records within the last n hour, then subtract a time interval from the current time. For Oracle, the quantity of the interval must be in single quotes. There are many intervals you can use (hour, minute, second, day, year, month).
```
timestampfield > current_timestamp - interval '1' hour
``` | You can use like
```
timestamp > to_timestamp(sysdate-1)
``` |
10,538,747 | Is it a simple way to compare is field of TIMESTAMP type get into last **n** hours?
I can do the calculation based on the day and time, but is it possible something like
```
timestamp > SYSDATE - 1
```
(SYSDATE - 1) is yesterday, as far as understand, so that will check if timestamp is within the last 24 hours.
Th... | 2012/05/10 | [
"https://Stackoverflow.com/questions/10538747",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/766022/"
] | If you need to look for records within the last n hour, then subtract a time interval from the current time. For Oracle, the quantity of the interval must be in single quotes. There are many intervals you can use (hour, minute, second, day, year, month).
```
timestampfield > current_timestamp - interval '1' hour
``` | You can add/subtract non-integers too, e.g.:
```
SELECT SYSDATE - 0.5 FROM dual;
```
means 12 hours before now. |
44,634,651 | so I have this 3d array created by *pygame.surfarray.array3d(image)* and it gives me an indexed array as [width][height] and the 3rd dimension having the RGB values (R, G, B)
Something like this: array[x][y] = (0, 255, 167)
Now, I want to take each of the RGB columns into a new 2d array (for example, I want to make a... | 2017/06/19 | [
"https://Stackoverflow.com/questions/44634651",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6837374/"
] | `pygame.surfarray.array3d(image)` will return a numpy array of dimension *width x height x 3* (where *3* are the three color components RGB). You can use `:` to access all elements in a dimension and integers to access elements at a certain index.
For example, to access the colors in a image you write `array[:, :, 0]`... | You'll likely just want to use the regular approach of looping through the 2D array.
```
red,green,blue = ([[0]*len(array[0]) for i in range(len(array)),)*3
for i in range(len(array)):
for j in range(len(array[i])):
red[i][j],green[i][j],blue[i][j] = array[i][j]
``` |
38,809,948 | I have put together a fun API for game creation. In the code I create a prototype for Mover and then extend it with several specific prototypes (Gold, Monster, and Hero). Each one is based on a img tag with a given ID. I use type-specific information in the constructor and a single template method for each type. Most o... | 2016/08/07 | [
"https://Stackoverflow.com/questions/38809948",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6686907/"
] | So I debug your code and I found the cause of your problem. The problem was when you create a new instance of monster you storing a reference to it on the monster var. And when you delete it you don't delete / update the reference to it. So your delete function myField.DeleteMover(id) try to delete a monster already de... | So I check the code again and I make it work without refreshing the selector. The problem is caused by the creation of dom element with innerHTML.
First reset
```
this.HTMLtag.src=this.destroyURL
```
Then instead of
```
//Mover.prototype.Destroy
this.tag.innerHTML+="<img id='mover"+this.moverCount+"'>";
```
I cr... |
20,143 | I'm doing a research for conceptual Logodesigns which should fit into a ecosystem.
I'm not sure if logosystems, ecosystems or logofamilies are the right terms.
I'm thinking about logosets like the Adobe Creative suite or the logofamily of the wikipedia foundation.
Do you know any other Logofamilies like these two exa... | 2013/08/07 | [
"https://graphicdesign.stackexchange.com/questions/20143",
"https://graphicdesign.stackexchange.com",
"https://graphicdesign.stackexchange.com/users/9198/"
] | Family is a correct-ish term. There are various substitute terms available to describe branding and the many types of branding, but they all follow a general structure. The following infographic is a simple yet powerfully obvious example of **some** of the different types of ***brand sets*** (for want of a better term)... | Depending on what you're looking for, there are a lot of ways to achieve harmony in an ecosystem of products and/or services. As JohnB said in a comment and as you note, Adobe Creative Suite and Microsoft Office are great examples:

](https://i.stack.imgur.com/Lky7v.jpg)
```
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx,booktabs,mhchem,makecell,array}
\let\turnbox\rotatebox % ??
\begin{document}
\begin{table}[ht]
\centering
... | [](https://i.stack.imgur.com/NoOWo.png)
With `rotating`, `makecell` and `tabularray` packages for table, and `mhchem` for chem formulas:
```
\documentclass{article}
\usepackage{rotating}
\usepackage{makecell}
\renewcommand\theadfont{}
\usepackage{ta... |
674,190 | I would like to create a table with vertical headers and over the headers I want an extra categorization. But I don't know how to fix the size of the table.
Can someone please help me with this?
I also always use p{\textwidth} to arrange the size of the table to fit my page. Which is not a practical solution. However, ... | 2023/02/06 | [
"https://tex.stackexchange.com/questions/674190",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/289577/"
] | Something like this?
[](https://i.stack.imgur.com/Lky7v.jpg)
```
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx,booktabs,mhchem,makecell,array}
\let\turnbox\rotatebox % ??
\begin{document}
\begin{table}[ht]
\centering
... | With `{NiceTabular}` of `nicematrix`. You have a built-in command `\rotate` and, with `\RowStyle{\rotate}`, that command will be applied to the whole row.
```
\documentclass{article}
\usepackage{nicematrix}
\usepackage{booktabs}
\usepackage[version=4]{mhchem}
\begin{document}
\begin{table}[ht]
\centering
\begin{Ni... |
64,040,150 | How can I raise a PR from my forked repo's development branch to upstream repo's development branch. I tried the `gh pr create`, but gave me following output/error
```
$ gh pr create
Warning: 3 uncommitted changes
Creating pull request for development into development in upstream-repo-org/upstream-repo
? Title permi... | 2020/09/24 | [
"https://Stackoverflow.com/questions/64040150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9594949/"
] | Yes, that is reported and followed by [`cli/cli` issue 1820](https://github.com/cli/cli/issues/1820).
It stems from the [new version 1.0.0](https://github.com/cli/cli/issues/1820#issuecomment-695993584):
>
> they have changed the implementation for gh pr create: [#1706](https://github.com/cli/cli/pull/1706)
>
> Q... | You can push to upstream repo from your local branch on forked Repo using the below.
```
gh pr create -R {Upstream_Org}/{repoName} -H {YourRepo}:{your_feature_branch} --base {Upstream_branch_against_which_pr_should_be_raised}
``` |
66,498,789 | Problem
=======
I need to create an array that takes the argmax and based on that maximum value position fill the array with `[1,0]` while the other fields that are not the maximum will be filled with `[0,1]`.
Example:
--------
Given the vector `a`:
```
a.shape = (3,2)
a = np.array([[1,0],[1,2],[1,3]])
```
Return... | 2021/03/05 | [
"https://Stackoverflow.com/questions/66498789",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9553352/"
] | GET requests do not have bodies | I believe the problem is that you want to access body by
```
console.log('req.body');
```
instead of
```
console.log(req.body);
```
Also, as pointed above, GET doesn't have body. |
66,498,789 | Problem
=======
I need to create an array that takes the argmax and based on that maximum value position fill the array with `[1,0]` while the other fields that are not the maximum will be filled with `[0,1]`.
Example:
--------
Given the vector `a`:
```
a.shape = (3,2)
a = np.array([[1,0],[1,2],[1,3]])
```
Return... | 2021/03/05 | [
"https://Stackoverflow.com/questions/66498789",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9553352/"
] | With Axios you can path query params to GET call in 2 different ways:
1. By putting them into the endpoint path
`await axios.get('/endpoint?key=value&key2=value2');`
2. Add them to the config argument in `params` property object as key-value
`await axios.get('/endpoint', { params: {key: 'value', key2: 'value2' }});... | I believe the problem is that you want to access body by
```
console.log('req.body');
```
instead of
```
console.log(req.body);
```
Also, as pointed above, GET doesn't have body. |
308,595 | I'm building a site with two main categories.
One side is portfolio work, the other is written work.
Among the written work, there will be personal blogs, tutorials, more in-depth articles, etc. I'm looking for a short, preferably single-word name for all of my written work.
I thought about using 'writings', but it f... | 2016/02/20 | [
"https://english.stackexchange.com/questions/308595",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/132029/"
] | You could consider using "[**post**](http://www.oxforddictionaries.com/definition/english/post)" which means:
>
> A piece of writing, image, or other item of content **published online**,
> typically on a blog or social media website: '*in a recent post, he cautioned investors to be wary of these predictions*'.
> ... | I have two suggestions. The first is **essays**. NOAD defines *essay* as
>
> **essay** (*n.*)
>
> a short piece of writing on a particular subject
>
>
>
The second would be **musings**. Again, from NOAD:
>
> **musing** (*n.*)
>
> (usu. **musings**)
>
> a period of reflection or thought
>
>
>
---... |
235,598 | I have a 30 mA sensitivity differential switch which cuts each time I lift the power switch even if the circuit breakers for the sockets and the lighting are off (even if all the circuit breakers on the panel are off).
I know that the differential switch cuts off if there is a current leak, but all the circuit breaker... | 2021/09/28 | [
"https://diy.stackexchange.com/questions/235598",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/142119/"
] | As usual, DrSparks beat me to it :)
But yeah, what's going on is the differential device (RCD or GFCI as we call it) is monitoring the current on both hot and neutral, and comparing them. They should be equal. If they're not equal, current is going somewhere it should not.
Your circuit breakers are single-pole. They ... | If you have a neutral ground fault somewhere, having the sub CBs off will not prevent the RCCB from tripping. You probably have a neutral ground fault somewhere. |
28,697,488 | In simple terms it's an inventory system, that is tied to SKU's. The SKU is a composite of items, sometimes multiples of the exact same item.
E.G
SKU for a dining room set would be, 4(Item)"chair" and 1(Item)"table". If I could get GORN to recognize it's tied to multiple instances of "chair", so I can keep count.
H... | 2015/02/24 | [
"https://Stackoverflow.com/questions/28697488",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/288915/"
] | This took a little digging into documentation to figure it out.
Zoidberg is right that GORM defaults to a set. I had used Collection as my understanding was, that was an unordered list that could contain duplicates. [The documentation](https://grails.github.io/grails-doc/2.4.x/guide/GORM.html#sets,ListsAndMaps) lead ... | You are adding the same Item 4 Times (the chair).
```
sku.items = [Item.findByName("Table"),Item.findByName("Chair"),
Item.findByName("Chair"),Item.findByName("Chair"),
Item.findByName("Chair")];
```
But by default GORM will create a Set. See:
<http://grails.github.io/grails... |
41,759,274 | I have a table with two columns, id and modifiedDate. I want to query this table to list each id's activity between a time range.
My table looks like:
```
+-----+------------+
| ID | Date |
+-----+------------+
| 1 | 2017.01.19 |
| 1 | 2017.01.18 |
| 1 | 2017.01.10 |
| 1 | 2017.01.09 |
| 2 | 2017.01.1... | 2017/01/20 | [
"https://Stackoverflow.com/questions/41759274",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2838877/"
] | For your 2nd question:
You can use base64 encoded images. It works with jspdf.
To convert image into base64, check this: [How to convert image into base64 string using javascript](https://stackoverflow.com/questions/6150289/how-to-convert-image-into-base64-string-using-javascript) | 1 You need to check the pdf size and adjust it.
2 The base64 image renders in the jspdf. You can use this link for getting base64 code and paste it in img src value <https://www.base64-image.de/> |
43,151 | my problem is:
A real sequence $C$, the length is $N$ is multiple of 32, the pattern is as below:
$$C =\left(a\_0,\, a\_1,\, \ldots,\, a\_{\frac N2-1},\,\, b\_0,\, b\_1,\,\ldots,\, b\_{\frac N2 -1}\right)$$
the other two sequence is $A$, $B$, length is also $N$, as below:
$$\begin{align}
A &=(a\_0,& a\_1,& \ldots,&... | 2017/08/16 | [
"https://dsp.stackexchange.com/questions/43151",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/30303/"
] | Alas, a multiplication by a rectangular window in the time domain is a convolution in the frequency domain. Thus (assuming no other constraints on or knowledge about A or B), the DFT of A (or B) would have to be the convolution of the DFT of C with a twisty Sinc function, which is computationally far more expensive tha... | If your DFT of the sum-sequence is real-valued, then the original $C$ *must* be hermitian!
Thus, if we set
$$a = \left(a\_0,\,\ldots,\, a\_{\frac N2-1}\right)\\
b = \left(b\_0,\,\ldots,\, b\_{\frac N2-1}\right)$$
$$ A + B = C \in \mathbb R \\\implies\\
a\_k = \left.b\_{\frac N2 -1 - k}\right.^\* \\ \text{with } k \i... |
43,151 | my problem is:
A real sequence $C$, the length is $N$ is multiple of 32, the pattern is as below:
$$C =\left(a\_0,\, a\_1,\, \ldots,\, a\_{\frac N2-1},\,\, b\_0,\, b\_1,\,\ldots,\, b\_{\frac N2 -1}\right)$$
the other two sequence is $A$, $B$, length is also $N$, as below:
$$\begin{align}
A &=(a\_0,& a\_1,& \ldots,&... | 2017/08/16 | [
"https://dsp.stackexchange.com/questions/43151",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/30303/"
] | Alas, a multiplication by a rectangular window in the time domain is a convolution in the frequency domain. Thus (assuming no other constraints on or knowledge about A or B), the DFT of A (or B) would have to be the convolution of the DFT of C with a twisty Sinc function, which is computationally far more expensive tha... | Continuing from @hotpaw2's analysis, what you need is brickwall zero-phase half-band low-pass filtering of the frequency domain data. Because you have all the data in-place, you can do forward-then-backward infinite impulse response (IIR) lowpass filtering. There is a very efficient half-band IIR filter structure, the ... |
54,363,375 | I tried using .xlsb file so as to execute it in all different workbooks, but keep getting Error 400, even though my Macro is working for that particular file. I wrote this simple code to delete the empty rows and columns in the workbook.
```
Sub RepeatTask()
Dim xSh As Worksheet
Application.ScreenUpdating = Fa... | 2019/01/25 | [
"https://Stackoverflow.com/questions/54363375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9946236/"
] | I recommend not to use `.Select` instead give the worksheet as parameter and specify the sheet in all `ws.Rows()`, `ws.Columns()` etc.
If you make the parameter `Optional` you can fallback to `If ws Is Nothing Then Set ws = ActiveSheet` if `Task` is called without parameter.
```
Sub RepeatTask()
Dim xSh As Worksh... | The way I could do this for multiple Excel workbooks is here:
```
Sub OpenFiles()
Dim xStrPath As String
Dim xFileDialog As FileDialog
Dim xFile As String
On Error Resume Next
Set xFileDialog = Application.FileDialog(msoFileDialogFolderPicker)
xFileDialog.AllowMultiSelect = False
xFileDial... |
11,532,222 | >
> **Possible Duplicate:**
>
> [What is generics in C#?](https://stackoverflow.com/questions/4560890/what-is-generics-in-c)
>
>
>
```
public class MyNewClassMapper < EntityContainer, ModelContainer >
: BaseClassContainerMapper < EntityContainer, ModelContainer >
{
}
```
I have the above code in my app.... | 2012/07/17 | [
"https://Stackoverflow.com/questions/11532222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1515475/"
] | This is a generic class `MyNewClassMapper` that has generic type parameters `EntityContainer` and `ModelContainer` and inherits from generic class1 `BaseClassContainerMapper` with these same parameters.
*1 Could also be an interface, though it doesn't look like it in this case, based on name.* | The `MyNewClassMapper<EntityContainer, ModelContainer>` is inherting from `BaseClassContainerMapper < EntityContainer, ModelContainer >`
the `<EntityContainer, ModelContainer>` are the type arguments
Please read more on information for Generic classes <http://msdn.microsoft.com/en-us/library/sz6zd40f.aspx> |
11,532,222 | >
> **Possible Duplicate:**
>
> [What is generics in C#?](https://stackoverflow.com/questions/4560890/what-is-generics-in-c)
>
>
>
```
public class MyNewClassMapper < EntityContainer, ModelContainer >
: BaseClassContainerMapper < EntityContainer, ModelContainer >
{
}
```
I have the above code in my app.... | 2012/07/17 | [
"https://Stackoverflow.com/questions/11532222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1515475/"
] | This is a generic class `MyNewClassMapper` that has generic type parameters `EntityContainer` and `ModelContainer` and inherits from generic class1 `BaseClassContainerMapper` with these same parameters.
*1 Could also be an interface, though it doesn't look like it in this case, based on name.* | It is defining a class (MyNewMapperClass) that is derived from a base class (BaseClassContainerMapper).
The classes themselves are used to map one object type to another. |
193,976 | I have text in two columns. I have the `\maketitle` command. It produces the title and date together. But I want the title, the column and then the date. How do I do it?
```
\documentclass[12pt]{beamer}
\usetheme{Berkeley}
\usecolortheme{default}
\title{Test}
\date{\today}
\author{}
\begin{document}
\begin{frame}
\b... | 2014/07/30 | [
"https://tex.stackexchange.com/questions/193976",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/41885/"
] | The usual title structure sets the following content in sequence:
1. Title
2. Subtitle (if it exists)
3. Author
4. Institute
5. Date
6. Title graphic
If you're not using the Institution, you could place your columns there (with suitable adjustments, if necessary):
$ (in other words, $S=\{x:P\_S(x)\}$). For instance, if we are working in the domain of integers we can assign the set of even numbers to the predicate $E(n):=2\mid n$. If $S\_E$ is the set of even numbers, then $n\in S\_E$ has exactly the same m... |
29,313 | 主持人 means the host of a show or event.
What is the right word for someone who entertains or hosts guests? 招待人?
For instance, assume this sentence:
Alice thought Bob was a kind and hospitable host.
1. How would you say this in Cantonese?
2. How would say this in Mandarin? | 2018/03/31 | [
"https://chinese.stackexchange.com/questions/29313",
"https://chinese.stackexchange.com",
"https://chinese.stackexchange.com/users/4049/"
] | **主人**
*Tuttle*
>
> N
>
>
> 1
> host (antonym 客人 kèren)
>
>
> 客人都来了, 主人呢?
> Kèren dōu lái le, zhǔrén ne?
> The guests have all arrived, but where is the host?
>
>
>
As a verb you can try **做东** aswell.
*Words.HK*
>
> 動詞
> 作為主人家招待客人
> to be the host
>
>
> 你嚟我屋企, 我做東。
> nei5 lai4 ngo5 uk1 kei2, ... | I'd just go with 人。
Alice thought Bob was a kind and hospitable host.
爱丽丝认为鲍勃是个和蔼好客的人。 |
29,313 | 主持人 means the host of a show or event.
What is the right word for someone who entertains or hosts guests? 招待人?
For instance, assume this sentence:
Alice thought Bob was a kind and hospitable host.
1. How would you say this in Cantonese?
2. How would say this in Mandarin? | 2018/03/31 | [
"https://chinese.stackexchange.com/questions/29313",
"https://chinese.stackexchange.com",
"https://chinese.stackexchange.com/users/4049/"
] | I'd just go with 人。
Alice thought Bob was a kind and hospitable host.
爱丽丝认为鲍勃是个和蔼好客的人。 | what is the right word for someone who entertains or hosts guests? 招待人?
you can call it “主人”. but it is barely used .you sometimes can see it in paper .In oral spoken,we juet ignore it ,you can call the name or palace name streatly
For instance:这家主人正在招待客人=This host is entertaining guests
≈这家餐厅正在招待客人,Bob一家正在款... |
29,313 | 主持人 means the host of a show or event.
What is the right word for someone who entertains or hosts guests? 招待人?
For instance, assume this sentence:
Alice thought Bob was a kind and hospitable host.
1. How would you say this in Cantonese?
2. How would say this in Mandarin? | 2018/03/31 | [
"https://chinese.stackexchange.com/questions/29313",
"https://chinese.stackexchange.com",
"https://chinese.stackexchange.com/users/4049/"
] | **主人**
*Tuttle*
>
> N
>
>
> 1
> host (antonym 客人 kèren)
>
>
> 客人都来了, 主人呢?
> Kèren dōu lái le, zhǔrén ne?
> The guests have all arrived, but where is the host?
>
>
>
As a verb you can try **做东** aswell.
*Words.HK*
>
> 動詞
> 作為主人家招待客人
> to be the host
>
>
> 你嚟我屋企, 我做東。
> nei5 lai4 ngo5 uk1 kei2, ... | what is the right word for someone who entertains or hosts guests? 招待人?
you can call it “主人”. but it is barely used .you sometimes can see it in paper .In oral spoken,we juet ignore it ,you can call the name or palace name streatly
For instance:这家主人正在招待客人=This host is entertaining guests
≈这家餐厅正在招待客人,Bob一家正在款... |
95,937 | I'm currently a grad student in a moderately large department. I share an office with a few other grad students, and I get along with all of them fairly well. However, one of my officemates is rather loud and unfiltered with what he says in and around the department. The office walls are very thin, they are movable par... | 2017/09/14 | [
"https://academia.stackexchange.com/questions/95937",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/79842/"
] | If your only concern is for your reputation, I think any such concern is entirely unwarranted, and your best course of action is to do nothing and simply not worry about it. You are in no way becoming "associated" with the other student's poor behavior by occupying the same office as him, which you have been assigned b... | I don't see why you should feel associated with this person's actions, just because you share an office. If they are speaking loudly, those who can hear will recognise their voice.
While it may be that your office mate is simply immature, among grad students it may well be that something else is going on. It is possib... |
395,253 | This is a fact we use very frequently in general mathematics when we write such notations as $1+2+3+4$: since we know that $+$ is commutative and associative, we can just "drop the parentheses" and not worry about order of operations. Of course I believe this, but how does one prove this in full generality? Even statin... | 2013/05/18 | [
"https://math.stackexchange.com/questions/395253",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50776/"
] | You can state it as follows: Given is a set $S$ with a binary $\oplus$ operation on it which is associative and commutative.
For every finite nonempty set $A\subseteq S$, there exists an element $S\_A\in S$ such that: 1) If $A=\{a\}$, then $S\_A=a$. 2) If $|A|=n$ then for any bijective function $f:\{1,2,3,4,\cdots ,n... | It turns out that the claim as originally stated cannot be proven by induction directly, since later steps may introduce repeated elements, which are not accounted for in the claim. Instead, we shall prove it for sequences and weaken it at the end.
**Claim:** Let $[n]=\{0,1,\dots,n-1\}$. Given any finite sequence $A=\... |
395,253 | This is a fact we use very frequently in general mathematics when we write such notations as $1+2+3+4$: since we know that $+$ is commutative and associative, we can just "drop the parentheses" and not worry about order of operations. Of course I believe this, but how does one prove this in full generality? Even statin... | 2013/05/18 | [
"https://math.stackexchange.com/questions/395253",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50776/"
] | So you want to prove that if $S$ is a set and $+$ is a binary commutative associative law : $S \times S \to S$, then there is a unique function $\sum$ from non empty finite subsets of $S$ to $S$ satisfying :
- if $x \in S, \sum \{x\} = x$
- if $A \cap B = \emptyset, \sum A \cup B = \sum A + \sum B$.
Prove this b... | It turns out that the claim as originally stated cannot be proven by induction directly, since later steps may introduce repeated elements, which are not accounted for in the claim. Instead, we shall prove it for sequences and weaken it at the end.
**Claim:** Let $[n]=\{0,1,\dots,n-1\}$. Given any finite sequence $A=\... |
395,253 | This is a fact we use very frequently in general mathematics when we write such notations as $1+2+3+4$: since we know that $+$ is commutative and associative, we can just "drop the parentheses" and not worry about order of operations. Of course I believe this, but how does one prove this in full generality? Even statin... | 2013/05/18 | [
"https://math.stackexchange.com/questions/395253",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50776/"
] | This is the equivalence between commutative semigroups in the usual sense and their monadic description. It follows, for example, from [Beck's monadicity theorem](http://ncatlab.org/nlab/show/monadic+functor). Here is a down-to-earth formulation: If $S$ is a commutative semigroup, then we have a map which associates to... | It turns out that the claim as originally stated cannot be proven by induction directly, since later steps may introduce repeated elements, which are not accounted for in the claim. Instead, we shall prove it for sequences and weaken it at the end.
**Claim:** Let $[n]=\{0,1,\dots,n-1\}$. Given any finite sequence $A=\... |
2,885,219 | How could I prove that $\sum \_{n=0} ^{\infty} \frac{\log (1+nx)}{nx^n}$ is not uniformly convergent on an interval $I=(1,+\infty)$?
So far I have been thinking of proving that $f\_n(x)=\frac{\log (1+nx)}{nx^n}$ does not uniformly converge on the interval, which leads me to finding $\lim \_{n\to \infty}\sup\_{x>1} \... | 2018/08/16 | [
"https://math.stackexchange.com/questions/2885219",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/296088/"
] | It's easy to see that each summand in the series is bounded on $(1,\infty).$ If the series were uniformly convergent on $(1,\infty),$ then the series would sum to a bounded function there.
To show this fails, note that
$$\ln(1+nx) > \ln (nx) = \ln n + \ln x > \ln n.$$
Thus our series is bounded below by
$$\tag 1\su... | For large enough $N$ consider the inequalities
\begin{align}
x^{-N-1}\,\Phi\left(\frac{1}{x},1,N+1\right) &= x^{-N-1}\sum\_{n=0}^\infty \frac{x^{-n}}{N+1+n}=\sum\_{n=N+1}^\infty \frac{x^{-n}}{n} \\
&\leq \sum\_{n=N+1}^\infty \frac{\log(1+nx)}{nx^n} \leq \sum\_{n=N+1}^\infty x^{-n+1} = \frac{x^{-N}}{1-\frac{1}{x}}
\end{... |
8,443,810 | I am using `Zend_Validate_Db_NoRecordExists` detailed in the link below to check if a record exists before inserting it.
I have no issues with the basic code and have got it working fine, what I need to do next is add a WHERE clause to exclude records where the field recordDelete = 1.
[Zebd\_Validate\_Db\_NoRecordExi... | 2011/12/09 | [
"https://Stackoverflow.com/questions/8443810",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/966850/"
] | ```
$validate = new Zend_Validate_Db_RecordExists (array (
'table' => 'orders',
'field' => 'id',
'exclude' => 'recordDelete = 1'
));
$result = $validate->isValid ('000489FS1qT81XR4GWuV');
``` | You could try creating you're own version of it and set the `$_exclude` member variable.
(Untested)
```
class My_Validate_Db_NoRecordExists
extends Zend_Validate_Db_NoRecordExists // notice what were extending here
{
protected $_exclude = array(
'field' => 'recordDelete',
'value' => 1
);
... |
12,982,254 | I want to count how often a certain digit appears within an integer. I have the following code:
```
int main()
{
printf ("Put numbers\n");
int cislo;
int s0,s1,s2,s3,s4,s5,s6,s7,s8,s9;
while(scanf("%d",&cislo)==1){
if (cislo<0)
printf ("Cislo %d, je zaporne, takove neberu", cislo)... | 2012/10/19 | [
"https://Stackoverflow.com/questions/12982254",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1760185/"
] | Divide the number after taking `mod`:
```
do{
switch (cislo%10){
case 0: ++s0; break;
case 1: ++s1; break;
case 2: ++s2; break;
case 3: ++s3; break;
case 4: ++s4; break;
case 5: ++s5; break;
case 6: ++s6; break;
case 7: ++s7; break;
case 8: ++s8; break;
case 9: ++s9; break;... | Change the `do`/`while` loop:
```
do {
int nextval = cislo / 10;
switch (cislo - (nextval*10)) {
case 0: ++s0; break;
case 1: ++s1; break;
case 2: ++s2; break;
case 3: ++s3; break;
case 4: ++s4; break;
case 5: ++s5; break;
case 6: ++s6; break;
ca... |
42,474,417 | Is there a way to do this:
```
$.post( "functions.php", { name: "John", time: "2pm" })
.done(function( data ) {
alert( "Data Loaded: " + data );
});
```
But to send your data to a specific function at "functions.php"?
The idea is that functions.php would have a number of functions, but you would want this s... | 2017/02/26 | [
"https://Stackoverflow.com/questions/42474417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5848153/"
] | I'm not an expert in python, but I'd recommend a for loop, so:
```
# From 1 to 10
n = 0
for i in range(10):
n = n + 1
abundant(n)
```
Hope this helps! | No need to return the abn list as it is declared as global
```
abn=[] #to store abundant nos.
def factors(n):
s=1
if n==1:
return 1
if n%2==0:
step=1
else:
step=2
r=int(n**.5)
if(r**2==n):
r-=1
s+=r+1
# s-sum
f=2
#print("n= ",n)
w... |
16,283,153 | How would I implement a function with its arguments changing in a loop?
i.e. I would like to be able to implement the function in the form:
```
f( A[0], A[1], A[2] );
f( A[2], A[0], A[1] );
f( A[1], A[2], A[0] );
f( A[0], A[1], A[2] );
f( A[2], A[0], A[1] );
f( A[1], A[2], A[0] );
```
I got as far as being able to ... | 2013/04/29 | [
"https://Stackoverflow.com/questions/16283153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/810167/"
] | If I understand your question correctly, all you need is:
```
int i;
for (i = 0; i < NUM_CALLS; i++)
f(A[(2 * i) % 3], A[(2 * i + 1) % 3], A[(2 * i + 2) % 3])
``` | All you're missing is `f( A[i], A[j], A[k] );` in the inner-most loop. |
16,283,153 | How would I implement a function with its arguments changing in a loop?
i.e. I would like to be able to implement the function in the form:
```
f( A[0], A[1], A[2] );
f( A[2], A[0], A[1] );
f( A[1], A[2], A[0] );
f( A[0], A[1], A[2] );
f( A[2], A[0], A[1] );
f( A[1], A[2], A[0] );
```
I got as far as being able to ... | 2013/04/29 | [
"https://Stackoverflow.com/questions/16283153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/810167/"
] | If I understand your question correctly, all you need is:
```
int i;
for (i = 0; i < NUM_CALLS; i++)
f(A[(2 * i) % 3], A[(2 * i + 1) % 3], A[(2 * i + 2) % 3])
``` | In the example given, it appears that you wish to loop through three (3) permutations of A[0], A[1] and A[2].
The simplest way, which might not be what you are looking for is to do ...
```
for (i = 0; i < NUM_ITERATIONS; i++)
{
f (A[0], A[1], A[2]);
f (A[2], A[0], A[1]);
f (A[1], A[2], A[0]);
}
`... |
16,283,153 | How would I implement a function with its arguments changing in a loop?
i.e. I would like to be able to implement the function in the form:
```
f( A[0], A[1], A[2] );
f( A[2], A[0], A[1] );
f( A[1], A[2], A[0] );
f( A[0], A[1], A[2] );
f( A[2], A[0], A[1] );
f( A[1], A[2], A[0] );
```
I got as far as being able to ... | 2013/04/29 | [
"https://Stackoverflow.com/questions/16283153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/810167/"
] | If I understand your question correctly, all you need is:
```
int i;
for (i = 0; i < NUM_CALLS; i++)
f(A[(2 * i) % 3], A[(2 * i + 1) % 3], A[(2 * i + 2) % 3])
``` | I can remark that the indices are circular shifted in the right each time. so here after what I can suggest to you
```
void indices_circular_right_shift(int *indices) {
// The indices are circular rught shifted
int k = indices[2];
indices[2] = indices[1];
indices[1] = indices[0];
indices[0] = k;
}... |
48,767,682 | I'm trying to bind file uploads to a ViewModel (as demonstrated in [this post](https://stackoverflow.com/a/21677152/1778169)).
But I can't get the files to bind to the `Files` property on the ViewModel.
Please see the code below. What am I doing wrong?
*(Edit for clarity - I'd like the uploads to bind to the VM, n... | 2018/02/13 | [
"https://Stackoverflow.com/questions/48767682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1778169/"
] | [](https://i.stack.imgur.com/Gy9wg.jpg)
```
public class Model1
{
public HttpPostedFileBase[] Files { get; set; }
public string Title { get; set; }
}
```
Hope this helps... | First Make sure you've set the enctype `attribute` on your form to `multipart/form-data` on your form if you want to be able to upload files:
You can access uploaded file in post action parameter,
```
[HttpPost]
public async Task<ActionResult> Upload(PrimaryImageUploadViewModel postedModel, HttpPostedFileBase file)
{... |
67,420,004 | I am trying to consume a rest api data returning a list of maps each map contain product details, so i code classes for product as well as productList with fromJsom method implemented, then i am trying to dispaly thoes products in my flutter app with list.generate but got the error "Expected a value of type 'ProductLis... | 2021/05/06 | [
"https://Stackoverflow.com/questions/67420004",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8777087/"
] | You are trying to paint the data before you get it. You must wrap your column in a futureBuilder to wait for that data.
```
return FutureBuilder<ProductList>(
future: loadProductsByIdService(1),
builder: (context, snapShot) {
if (snapshot.hasData) {
return Column(
children: [
... | Because, you have to await that data. Or, use FutureBuilder to get that data, which is the best option for me. |
13,872,908 | We are having issues deploying our WebAPI service onto our production server. When attempting to access the Controller we receive "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
We created a new project from the standard WebAPI Template and it has the same prob... | 2012/12/14 | [
"https://Stackoverflow.com/questions/13872908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/802512/"
] | try this article
[HTTP Error 404.0 0 Not Found in MVC](http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/http-error-404-0-not-found-in-mvc/)
or this
[Running ASP.NET MVC Under IIS 6.0 and IIS 7.0 Classic Mode : Solution to Routing Problem](http://www.tugberkugurlu.com/archive/running-asp-net-mvc-under-iis-6-0-... | This error message is also displayed when running your WebApi using OWIN and you forget to include the following line in your startup class:
```
app.UseWebApi(config);
``` |
13,872,908 | We are having issues deploying our WebAPI service onto our production server. When attempting to access the Controller we receive "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
We created a new project from the standard WebAPI Template and it has the same prob... | 2012/12/14 | [
"https://Stackoverflow.com/questions/13872908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/802512/"
] | try this article
[HTTP Error 404.0 0 Not Found in MVC](http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/http-error-404-0-not-found-in-mvc/)
or this
[Running ASP.NET MVC Under IIS 6.0 and IIS 7.0 Classic Mode : Solution to Routing Problem](http://www.tugberkugurlu.com/archive/running-asp-net-mvc-under-iis-6-0-... | Download & Install the asp.net core hosting bundle
<https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1#install-the-net-core-hosting-bundle>
[Add module mapping handler "AspNetCoreModuleV2" in the IIS Handler for the site having issue](https://i.stack.imgur.com/XqztW.png) |
13,872,908 | We are having issues deploying our WebAPI service onto our production server. When attempting to access the Controller we receive "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
We created a new project from the standard WebAPI Template and it has the same prob... | 2012/12/14 | [
"https://Stackoverflow.com/questions/13872908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/802512/"
] | This error message is also displayed when running your WebApi using OWIN and you forget to include the following line in your startup class:
```
app.UseWebApi(config);
``` | Download & Install the asp.net core hosting bundle
<https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1#install-the-net-core-hosting-bundle>
[Add module mapping handler "AspNetCoreModuleV2" in the IIS Handler for the site having issue](https://i.stack.imgur.com/XqztW.png) |
48,446,095 | I'm trying to add a class to an element on hover using Angular 2/4.
I need to only add the class to 'this' element as I want to use this function on multiple elements but only want the class to be added to the element that is hovered over.
I'm thinking something like this:
HTML
```
<fieldset class="help-hover">
<di... | 2018/01/25 | [
"https://Stackoverflow.com/questions/48446095",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6787447/"
] | You can use [***calc()***](https://developer.mozilla.org/en/docs/Web/CSS/calc) css to calculate the width and space between them according to view
**[Updated Fiddle](https://jsfiddle.net/bhuwanb9/hf492cah/1/)**
***Stack Snippet***
```css
.flex-container {
padding: 0;
margin: 0;
list-style: none;
border: ... | You can use `justify-content: flex-start;` or `justify-content: space-between;` to have non-complete row aligned to the left. To guarantee that boxes span the whole row you can set `flex-basis: 33%;`.
```css
.flex-container {
padding: 0;
margin: 0;
list-style: none;
border: 1px solid silver;
-ms-box-ori... |
51,383,199 | I have created one [IOT Hub](https://learn.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-java) in Azure and added two devices in that. I am sending same message from both of the device. I have also created one [function app](https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-function... | 2018/07/17 | [
"https://Stackoverflow.com/questions/51383199",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/795554/"
] | In **JavaScript**, you can use the following method to get the device id:
```
context.bindingData.systemProperties["iothub-connection-device-id"]
```
The index.js looks like this:
```
module.exports = function (context, IoTHubMessages) {
context.log('systemProperties', context.bindingData.systemProperties, ... | In the c#:
```
using System;
public static void Run(string myIoTHubMessage, IDictionary<string, object> properties, IDictionary<string, object> systemproperties, TraceWriter log)
{
log.Info($"C# IoT Hub trigger function processed a message: \n\t{myIoTHubMessage}");
log.Info($"\nSystemProperties:\n\t{string.J... |
17,683,531 | I have a combo box and textbox in form, (in windows form platform), the textbox visible is false by default, I want to show (visible=true) the the textbox when the specific item of combo box selected.
which event of combobox is suitable for this work! | 2013/07/16 | [
"https://Stackoverflow.com/questions/17683531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/500686/"
] | if you're depending on a fixed index in the combo box items use SelectedIndexChange event
```
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex == yourindex)
textBox1.Visible = true;
else
textBox1.Visible = false;
}
```
if you're depending... | use the combobox [SelectedIndexChange](http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.selectedindexchanged.aspx) event or [Selecton Change Committed](http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.selectionchangecommitted.aspx)and in that event check for the **selectedvalue... |
17,683,531 | I have a combo box and textbox in form, (in windows form platform), the textbox visible is false by default, I want to show (visible=true) the the textbox when the specific item of combo box selected.
which event of combobox is suitable for this work! | 2013/07/16 | [
"https://Stackoverflow.com/questions/17683531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/500686/"
] | if you're depending on a fixed index in the combo box items use SelectedIndexChange event
```
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex == yourindex)
textBox1.Visible = true;
else
textBox1.Visible = false;
}
```
if you're depending... | This Code will definitely help you.
```
if (comboBox2.Text.ToString() == "Desired Value")
comboBox1.Visible = true;
else
comboBox1.Visible = false;
``` |
22,525,393 | I want, my model in the controller, to be not a plain object like `Number`,`Boolean`,`String`, `Object`,`Array`, but an object created by function-constructor.
Is it possible in AngularJS?
[Here](http://jsfiddle.net/Vc4df/) is my html:
```
<body ng-app="MyApp" ng-controller="MyController">
<input ng-model="model... | 2014/03/20 | [
"https://Stackoverflow.com/questions/22525393",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1113426/"
] | As stated [here](https://stackoverflow.com/questions/8387191/java-apns-apple-push-notification-service-error) java-apns is expecting the .p12 private key, not the .pem file.
The instructions for creating a .p12 file on a mac are in the first link, but if you're using the openssl tool on linux you can create it with:
... | I just found the answer. When I try to generate a P12 key, I need to select both, a private key and certificate in keychain access.
 |
720,348 | I've discovered the joy saving Terminator layouts and adding commands to `~/.config/terminator/config` that are run when it starts up. I've also discovered that hitting `Ctrl`+`c` to stop a watch command for a moment can't be followed by an up arrow to restart the watch because the command isn't in the history.
Here's... | 2022/10/08 | [
"https://unix.stackexchange.com/questions/720348",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/141901/"
] | The main question is - what do you mean by de-duplication? It could mean various things, but one thing that comes to mind may be "detect two files with the same content and replace one of them with a hard link to the other". The main disadvantage with that is that these two files are now essentially the same file, and ... | **You can use de duplication for Ext4 and some other not supporting file systems on follow way:**
Run it inside a .qcow2 format using VM. You can create and use the .qcow2 based virtual hard disk by QEMU and VirtualBox.
Existing non .qcow VM`s can converted on follow way:
```
qemu-img convert -f vmdk -O qcow2 image.... |
720,348 | I've discovered the joy saving Terminator layouts and adding commands to `~/.config/terminator/config` that are run when it starts up. I've also discovered that hitting `Ctrl`+`c` to stop a watch command for a moment can't be followed by an up arrow to restart the watch because the command isn't in the history.
Here's... | 2022/10/08 | [
"https://unix.stackexchange.com/questions/720348",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/141901/"
] | The main question is - what do you mean by de-duplication? It could mean various things, but one thing that comes to mind may be "detect two files with the same content and replace one of them with a hard link to the other". The main disadvantage with that is that these two files are now essentially the same file, and ... | You can do also the follow:
Run what you like inside a BTRFS, bcachefs or ZFS using VM on top of ext4. |
5,051,753 | I have a styles called Red and Green and I have an if statment to find out which to apply, but I don't know the code to actually apply a style from the java. | 2011/02/19 | [
"https://Stackoverflow.com/questions/5051753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/614460/"
] | There is no one line solution to this problem, but this worked for my use case. The problem is, the 'View(context, attrs, defStyle)' constructor does not refer to an actual style, it wants an attribute. So, we will:
1. Define an attribute
2. Create a style that you want to use
3. Apply a style for that attribute on ou... | I found out this is only able to be done when creating an View from inside the Java. If it is defined in the XML before hand you cannot dynamically change the style. |
5,051,753 | I have a styles called Red and Green and I have an if statment to find out which to apply, but I don't know the code to actually apply a style from the java. | 2011/02/19 | [
"https://Stackoverflow.com/questions/5051753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/614460/"
] | I found out this is only able to be done when creating an View from inside the Java. If it is defined in the XML before hand you cannot dynamically change the style. | You can use the brand new Paris library to apply styles programmatically:
```
Paris.style(yourView).apply(condition ? R.style.Green : R.style.Red);
```
The only caveat is that not all attributes are supported (but many are and support can be added fairly easily by contributing to the library).
* [List of currently ... |
5,051,753 | I have a styles called Red and Green and I have an if statment to find out which to apply, but I don't know the code to actually apply a style from the java. | 2011/02/19 | [
"https://Stackoverflow.com/questions/5051753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/614460/"
] | There is no one line solution to this problem, but this worked for my use case. The problem is, the 'View(context, attrs, defStyle)' constructor does not refer to an actual style, it wants an attribute. So, we will:
1. Define an attribute
2. Create a style that you want to use
3. Apply a style for that attribute on ou... | It is possible to apply styles programatically to TextViews using **setTextAppearance**(context, resid) method. (The resId of the style can be found in R.style.YourStyleName) |
5,051,753 | I have a styles called Red and Green and I have an if statment to find out which to apply, but I don't know the code to actually apply a style from the java. | 2011/02/19 | [
"https://Stackoverflow.com/questions/5051753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/614460/"
] | It is possible to apply styles programatically to TextViews using **setTextAppearance**(context, resid) method. (The resId of the style can be found in R.style.YourStyleName) | You can use the brand new Paris library to apply styles programmatically:
```
Paris.style(yourView).apply(condition ? R.style.Green : R.style.Red);
```
The only caveat is that not all attributes are supported (but many are and support can be added fairly easily by contributing to the library).
* [List of currently ... |
5,051,753 | I have a styles called Red and Green and I have an if statment to find out which to apply, but I don't know the code to actually apply a style from the java. | 2011/02/19 | [
"https://Stackoverflow.com/questions/5051753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/614460/"
] | There is no one line solution to this problem, but this worked for my use case. The problem is, the 'View(context, attrs, defStyle)' constructor does not refer to an actual style, it wants an attribute. So, we will:
1. Define an attribute
2. Create a style that you want to use
3. Apply a style for that attribute on ou... | You can use the brand new Paris library to apply styles programmatically:
```
Paris.style(yourView).apply(condition ? R.style.Green : R.style.Red);
```
The only caveat is that not all attributes are supported (but many are and support can be added fairly easily by contributing to the library).
* [List of currently ... |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | I strongly recommend [MyPhone Explorer](http://www.fjsoft.at/en/), Just install the myphone explorer client on the phone and that is it! | A lot of these answers are dated.
Installing [Airdroid](http://airdroid.com) on your device is the latest way to do this as of 2015 |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | It seems that [DroidMessenger](http://www.droidmessenger.com/) can do just that. | I have never of heard of what you're looking for, but if you're in a pinch Google allows SMS through your Gmail account and is independent of your phone. You have to enable the feature from Gmail Labs. |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | I've looked at DesktopSMS, EasySMS, RemoteSMS, Droid Messenger, MightyText and BrowserTexting.
Droid Messenger has you go through their website, which is a deal breaker for anyone who cares about the privacy of their text messages.
DekstopSMS is full of bugs and hasn't been maintained since August 2009.
I haven't tr... | You could try [RemoteSMS](http://www.appszoom.com/android_applications/communication/remotesms-pro_kdx.html). It is pretty simple, and no registration is needed.
Notes: It creates a web server (accessible to anyone on the network, I might add) accessible via your Web browser via the phone's IP address and port 8080. |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | You could try [RemoteSMS](http://www.appszoom.com/android_applications/communication/remotesms-pro_kdx.html). It is pretty simple, and no registration is needed.
Notes: It creates a web server (accessible to anyone on the network, I might add) accessible via your Web browser via the phone's IP address and port 8080. | It seems that [DroidMessenger](http://www.droidmessenger.com/) can do just that. |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | You can now do that through gtalk or XMPP with
* GTalkSMS:
<https://code.google.com/p/gtalksms>
for Android >= 2.0
* TalkMyPhone:
<https://code.google.com/p/talkmyphone/>
for Android < 2.0 | I have never of heard of what you're looking for, but if you're in a pinch Google allows SMS through your Gmail account and is independent of your phone. You have to enable the feature from Gmail Labs. |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | My phone explorer is indeed great! Only disadvantage is that I can only send SMS with a max length of 2x160 tokens. If I do more it gives an error.
If you want to give the money, EasySMS is great as well!
An other option if you want to do everything from your PC as if you were on your phone is Droid VNC server. You c... | Try [Mobile Cloud](http://cl4.mobi). I like it because it's easy to use. Enter any password in the app, automaticly get ID and you already can send messages from the site.
 ->  |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | My phone explorer is indeed great! Only disadvantage is that I can only send SMS with a max length of 2x160 tokens. If I do more it gives an error.
If you want to give the money, EasySMS is great as well!
An other option if you want to do everything from your PC as if you were on your phone is Droid VNC server. You c... | I have never of heard of what you're looking for, but if you're in a pinch Google allows SMS through your Gmail account and is independent of your phone. You have to enable the feature from Gmail Labs. |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | I strongly recommend [MyPhone Explorer](http://www.fjsoft.at/en/), Just install the myphone explorer client on the phone and that is it! | I have never of heard of what you're looking for, but if you're in a pinch Google allows SMS through your Gmail account and is independent of your phone. You have to enable the feature from Gmail Labs. |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | You could try [RemoteSMS](http://www.appszoom.com/android_applications/communication/remotesms-pro_kdx.html). It is pretty simple, and no registration is needed.
Notes: It creates a web server (accessible to anyone on the network, I might add) accessible via your Web browser via the phone's IP address and port 8080. | You can now do that through gtalk or XMPP with
* GTalkSMS:
<https://code.google.com/p/gtalksms>
for Android >= 2.0
* TalkMyPhone:
<https://code.google.com/p/talkmyphone/>
for Android < 2.0 |
86,076 | I have an [HTC Hero](http://en.wikipedia.org/wiki/HTC_Hero) Android (European version) unlocked phone. Is there an app that will let me type away all my text messages on my PC and send the SMSes directly from the PC through my phone?
I'm basically looking at something like a Nokia PC Suite's equivalent. | 2009/12/21 | [
"https://superuser.com/questions/86076",
"https://superuser.com",
"https://superuser.com/users/19306/"
] | I've looked at DesktopSMS, EasySMS, RemoteSMS, Droid Messenger, MightyText and BrowserTexting.
Droid Messenger has you go through their website, which is a deal breaker for anyone who cares about the privacy of their text messages.
DekstopSMS is full of bugs and hasn't been maintained since August 2009.
I haven't tr... | Self promoting never hurts:
I had the same problem, so I wrote TextToCloud. It comes with a small PHP file you install onto your own private web server, and it connects to that.
It's free at <https://market.android.com/details?id=uk.co.jcitbournemouth.texttocloud>
Oh, the cool thing is it still works even if you're ... |
4,458,706 | There's a technical problem I ran into when working through Klenke's proof of De Finetti's theorem (Theorem 12.24 on Klenke's Probability Theory: A Comprehensive Course, pages 239-240).
The notation is this: let $S(n)$ denote the set of finite permutations that move only the first $n$ items; for $X = (X\_i)\_{i\in\mat... | 2022/05/25 | [
"https://math.stackexchange.com/questions/4458706",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/677270/"
] | You can solve the problem via integer linear programming as follows. Let $n=100$. For $i\in\{1,\dots,n\}$, let binary decision variable $x\_i$ indicate whether $i\in L$. The problem is to maximize $\sum\_{i=1}^n x\_i$ subject to
$$x\_i + x\_{i+d} + x\_{i+2d} \le 2 \quad \text{for $i\in\{1,\dots,n-2\}$ and $d\in\{1,\dot... | A greedy algorithm would hive an answer of $24$, as given by the "Erdos-Szekeres" sequence here: <http://oeis.org/A003278> .
But, as demonstrated by RobPratt, and as often happens in analysis, the greedy algorithm is ultimately not the optimal one. It's as if you overuse an initially fertile soil, exhaust its nutrient... |
25,957,755 | According to both the documentation and metadata for .Net's `LinkedListNode<T>` class, its `List`, `Next` and `Previous` properties are get-only. However, `LinkedList<T>` somehow manages to alter these properties.
How does `LinkedList<T>` achieve this?
Is it using reflection or is it cheating by using internal setter... | 2014/09/21 | [
"https://Stackoverflow.com/questions/25957755",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1377706/"
] | Here are [the fields of `LinkedListNode<T>`](http://referencesource.microsoft.com/#System/compmod/system/collections/generic/linkedlist.cs#604):
```
public sealed class LinkedListNode<T> {
internal LinkedList<T> list;
internal LinkedListNode<T> next;
internal LinkedListNode<T> prev;
internal T item;
... | The fields `list`, `prev` and `next` in `LinkedListNode<T>` are marked with the internal access modifier. Internal types/members are accessible only to other types in the same assembly. In this case, both `LinkedListNode<T>` and `LinkedList<T>` are in the *System* assembly.
If we look at how they are actually defined... |
25,957,755 | According to both the documentation and metadata for .Net's `LinkedListNode<T>` class, its `List`, `Next` and `Previous` properties are get-only. However, `LinkedList<T>` somehow manages to alter these properties.
How does `LinkedList<T>` achieve this?
Is it using reflection or is it cheating by using internal setter... | 2014/09/21 | [
"https://Stackoverflow.com/questions/25957755",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1377706/"
] | Here are [the fields of `LinkedListNode<T>`](http://referencesource.microsoft.com/#System/compmod/system/collections/generic/linkedlist.cs#604):
```
public sealed class LinkedListNode<T> {
internal LinkedList<T> list;
internal LinkedListNode<T> next;
internal LinkedListNode<T> prev;
internal T item;
... | One can always change data within the same class even if its get-only property
Refer to below example:
```
class Property
{
private string _name = "_name";
public string Name
{
get
{
return _name;
}
}
public void Foo()
{
_name = "foo";
}
... |
25,957,755 | According to both the documentation and metadata for .Net's `LinkedListNode<T>` class, its `List`, `Next` and `Previous` properties are get-only. However, `LinkedList<T>` somehow manages to alter these properties.
How does `LinkedList<T>` achieve this?
Is it using reflection or is it cheating by using internal setter... | 2014/09/21 | [
"https://Stackoverflow.com/questions/25957755",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1377706/"
] | The fields `list`, `prev` and `next` in `LinkedListNode<T>` are marked with the internal access modifier. Internal types/members are accessible only to other types in the same assembly. In this case, both `LinkedListNode<T>` and `LinkedList<T>` are in the *System* assembly.
If we look at how they are actually defined... | One can always change data within the same class even if its get-only property
Refer to below example:
```
class Property
{
private string _name = "_name";
public string Name
{
get
{
return _name;
}
}
public void Foo()
{
_name = "foo";
}
... |
4,728,836 | How can I restrict an attribute to not allow a particular value?
For instance, I have an `<xs:key/>` on an `Id` attribute of an element, but some yahoo has gone and thrown a magic number in there so now I cannot allow `3`, but `1`, `2`, and `5` are perfectly acceptable. | 2011/01/18 | [
"https://Stackoverflow.com/questions/4728836",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/312294/"
] | Have you tried having a look at the restriction tag [link text](http://www.w3schools.com/schema/schema_facets.asp), the code below, it should give you a tag called Id which only allows integers that doesn't start with a 3
```
<xs:key name="Id">
<xs:simpleType>
<xs:restriction base="xs:integer">
... | You can specify restrictions using **regular expressions**. Take a look at this [tutorial](http://www.w3schools.com/schema/schema_facets.asp) |
4,728,836 | How can I restrict an attribute to not allow a particular value?
For instance, I have an `<xs:key/>` on an `Id` attribute of an element, but some yahoo has gone and thrown a magic number in there so now I cannot allow `3`, but `1`, `2`, and `5` are perfectly acceptable. | 2011/01/18 | [
"https://Stackoverflow.com/questions/4728836",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/312294/"
] | Have you tried having a look at the restriction tag [link text](http://www.w3schools.com/schema/schema_facets.asp), the code below, it should give you a tag called Id which only allows integers that doesn't start with a 3
```
<xs:key name="Id">
<xs:simpleType>
<xs:restriction base="xs:integer">
... | I think a better pattern is `[^3]|..+` which accepts all numbers with at least 2 digits. However, it still allows `03` which is another representation of 3. To disallow that, you can try something like `[^3]|[^0].+` which disallows all representations with leading zeros. |
4,728,836 | How can I restrict an attribute to not allow a particular value?
For instance, I have an `<xs:key/>` on an `Id` attribute of an element, but some yahoo has gone and thrown a magic number in there so now I cannot allow `3`, but `1`, `2`, and `5` are perfectly acceptable. | 2011/01/18 | [
"https://Stackoverflow.com/questions/4728836",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/312294/"
] | Have you tried having a look at the restriction tag [link text](http://www.w3schools.com/schema/schema_facets.asp), the code below, it should give you a tag called Id which only allows integers that doesn't start with a 3
```
<xs:key name="Id">
<xs:simpleType>
<xs:restriction base="xs:integer">
... | If your IDs are integers, and you want to allow any integer except 3, your best bet (it seems to me) is not regexes on patterns, because as other commentors have observed it's easy to leave holes accidentally, but to define a subtype of integers for integers less than 3, and another for integers greater than tree, and ... |
371,796 | I love Stack Overflow and it has helped me tremendously. I have only asked 25 questions, but I cannot count the number of times an existing Q&A has been helpful for me. I am a firm believer that the primary objective of this site is to *build a library* of Q&A to which *helping the asker* is a secondary goal. I always ... | 2018/07/31 | [
"https://meta.stackoverflow.com/questions/371796",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/620382/"
] | There is no effective way to communicate this to users. And if SO is operating correctly, we shouldn't *need* to.
We have specific standards in place for questions. These standards help ensure that questions are reasonably scoped and genuinely answerable. But in so doing, such questions are *also* good candidates for ... | SO is no longer about building a Q&A library. What's important now is making people who don't know the rules of this site, don't know how to program, don't want to put any effort into writing a good questions, don't want to learn anything feel "welcomed".
If you care about quality of content more than people's feeling... |
371,796 | I love Stack Overflow and it has helped me tremendously. I have only asked 25 questions, but I cannot count the number of times an existing Q&A has been helpful for me. I am a firm believer that the primary objective of this site is to *build a library* of Q&A to which *helping the asker* is a secondary goal. I always ... | 2018/07/31 | [
"https://meta.stackoverflow.com/questions/371796",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/620382/"
] | There is no effective way to communicate this to users. And if SO is operating correctly, we shouldn't *need* to.
We have specific standards in place for questions. These standards help ensure that questions are reasonably scoped and genuinely answerable. But in so doing, such questions are *also* good candidates for ... | Nicol's [answer](https://meta.stackoverflow.com/a/371804/50049) communicates the gist of what I was going to say. Asking questions is *not* a shallow puddle, and folks often unwittingly fall into a pond that they weren't expecting.
We're making some changes on the front end to help people discover that there *is* a sk... |
7,003,553 | I'm running SVN on Windows and had a post-commit hook that was running the day I set it up. Now it's not running anymore. I'm running SVN through Apache Httpd. As part of my troubleshooting, I did the following:
* Successfully checked in a file and viewed it from the TortoiseSVN's repo browser
* Verified that the post... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7003553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/266536/"
] | If the member can *only* be set via an accessor (a "setter" method), I prefer the first style. It provides a hint that the initialized value is the default upon construction.
If the member can be specified during construction, I generally pass the default value to an appropriate constructor from constructor with fewer... | The first one is used usually to initialize static variable and should be used only for that purpose.
In this case, you should use the second method.
Please correct me if I am wrong. |
7,003,553 | I'm running SVN on Windows and had a post-commit hook that was running the day I set it up. Now it's not running anymore. I'm running SVN through Apache Httpd. As part of my troubleshooting, I did the following:
* Successfully checked in a file and viewed it from the TortoiseSVN's repo browser
* Verified that the post... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7003553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/266536/"
] | If the member can *only* be set via an accessor (a "setter" method), I prefer the first style. It provides a hint that the initialized value is the default upon construction.
If the member can be specified during construction, I generally pass the default value to an appropriate constructor from constructor with fewer... | It is best to declare variables inside the constructor for the sake of consistency. A variable may require something like a loop or an if-else statement to initialize it, which can not be done in the declaration without placing the operation inside of a method.
The exception to this rule is static variables, which sho... |
7,003,553 | I'm running SVN on Windows and had a post-commit hook that was running the day I set it up. Now it's not running anymore. I'm running SVN through Apache Httpd. As part of my troubleshooting, I did the following:
* Successfully checked in a file and viewed it from the TortoiseSVN's repo browser
* Verified that the post... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7003553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/266536/"
] | If the member can *only* be set via an accessor (a "setter" method), I prefer the first style. It provides a hint that the initialized value is the default upon construction.
If the member can be specified during construction, I generally pass the default value to an appropriate constructor from constructor with fewer... | Single-line declarations cannot contain complex initialization logic.
If you initialize a variable as:
```
class AnotherClass
{
MyClass anObject = new MyClass(); //MyClass() throws a checked exception.
}
```
then you'll find that you cannot provide the initial value in the single line. You'll need to place such... |
154,844 | [](https://i.stack.imgur.com/tU1cZ.png)
i'm trying to filter product with their subcategories :
for example :
if subcategories = (1,3,4)
and if this is subcategory\_product :
[](ht... | 2016/11/10 | [
"https://dba.stackexchange.com/questions/154844",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/103907/"
] | If you are using schemas other than the default `dbo` schema, create a database role per schema and grant `EXECUTE` on the schema to the role.
e.g.
For the default `dbo` schema:
```
CREATE ROLE role_exec_dbo
GO
GRANT EXECUTE ON SCHEMA::dbo to role_exec_dbo
GO
```
For a new schema:
```
CREATE SCHEMA mySchema
GO
CRE... | None by default.
Create a new role and grant execute to it. This should cover stored procs created in the future as well. |
3,137,099 | >
> If $x$ is a positive real number and $n$ is a positive integer, prove the inequality, $\sqrt[n]{1+x}-1 \le \frac{x}{n}$.
>
>
>
I tried to show this was true by doing the following:
For $n = 1$, $\sqrt[1]{1+x}-1 = x \le \frac{x}{1} = x$
Assuming the proposition holds true for all positive integers in the inte... | 2019/03/06 | [
"https://math.stackexchange.com/questions/3137099",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/559192/"
] | I think there's a much more elegant solution.
Using the binomial theorem, we have:
$$
\begin{align}
\Big(1 + \frac{x}{n} \Big)^n &= \sum\_{i = 0}^n {n \choose i} \Big(\frac{x}{n}\Big)^i \\
&= 1 + x + \sum\_{i = 2}^n {n \choose i} \Big(\frac{x}{n}\Big)^i \\
&\geq 1 + x
\end{align}
$$
where the last inequality stems f... | It's just the Bernoulli's inequality:
$$\sqrt[n]{1+x}=(1+x)^{\frac{1}{n}}\leq1+\frac{1}{n}\cdot x=1+\frac{x}{n}.$$ |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | It can be interesting:
Q. What is the single word that best means "smelling of a horse's urine"?
A. *Jumentous*, adj. smelling of a horse's urine.
Comment: Why thank you kind sir, that is indeed an interesting word. Now what a shame I'll almost never have a need to use it except perhaps in word games.
In terms of g... | I have asked questions like this before, and for me the motivation is to achieve a level of precision, not necessarily conciseness. To me, the question "is there a word for..." is really an open query on established terminology for specific concepts. If there isn't any, then of course the English language is quite easi... |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | 1. This is not recent: it has been going on since the beginning, or as long as I remember.
2. Single words no more necessary in English than in most other languages. Although needless wordiness is undesirable, needless compression can be equally bad; and excessive compression at one point usually leads to destruction o... | And I think it's important, yes.
Whole books have been written with new words to accommodate for the fact that some concepts have no single word in English.
One such books writes in its foreword:
>
> In Life, there are many hundreds of common experiences, feelings, situations and even objects which we all know and... |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | >
> Is this really such a concern in English?
>
>
> This quest for a single word might be considered stylistically important in some languages but how important is it in English?
>
>
>
Why is English different from other languages? The difference is not the language but why you need a single word for a certain c... | And I think it's important, yes.
Whole books have been written with new words to accommodate for the fact that some concepts have no single word in English.
One such books writes in its foreword:
>
> In Life, there are many hundreds of common experiences, feelings, situations and even objects which we all know and... |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | >
> Is this really such a concern in English?
>
>
> This quest for a single word might be considered stylistically important in some languages but how important is it in English?
>
>
>
Why is English different from other languages? The difference is not the language but why you need a single word for a certain c... | I have asked questions like this before, and for me the motivation is to achieve a level of precision, not necessarily conciseness. To me, the question "is there a word for..." is really an open query on established terminology for specific concepts. If there isn't any, then of course the English language is quite easi... |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | FWIW, I happen to have more rep on [single-word-requests](https://english.stackexchange.com/questions/tagged/single-word-requests "show questions tagged 'single-word-requests'") than on any other tag, and am sitting at about 21'st on its all time users list. So I have a bit of experience with this particular type of qu... | The hunt for le mot juste is interesting if not entertaining, but the goal of linguistic economy stems from Classics, which is why using a word like +obfusomething (nod to @lucounu) is not part the regression to the mean vocabulary. Yes, a concise word for any given concept maybe be favorable and helpful, but we don't ... |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | 1. This is not recent: it has been going on since the beginning, or as long as I remember.
2. Single words no more necessary in English than in most other languages. Although needless wordiness is undesirable, needless compression can be equally bad; and excessive compression at one point usually leads to destruction o... | Sometimes it can be frustrating when somebody asks for a single word, and there doesn't seem to be one. However, how can that person know that such a word doesn't exist, when there might be a perfect word hidden somewhere in the dictionary?
In other words, I don't mind when someone asks the question – although I do fi... |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | 1. This is not recent: it has been going on since the beginning, or as long as I remember.
2. Single words no more necessary in English than in most other languages. Although needless wordiness is undesirable, needless compression can be equally bad; and excessive compression at one point usually leads to destruction o... | Given the astonishing number of English words, there often is an astonishingly apt single word choice. I think asking about the single word silver bullet may be a way of saying: Surprise and delight me again, English: can it be done, is there one word that covers this? English is normally so fit for this, that when a w... |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | Given the astonishing number of English words, there often is an astonishingly apt single word choice. I think asking about the single word silver bullet may be a way of saying: Surprise and delight me again, English: can it be done, is there one word that covers this? English is normally so fit for this, that when a w... | From the non-native speaker's perspective, English is the language where so many things can be expressed by single word. So I feel uncomfortable when I can't find single word for something that can be described by single word in my native language. I feel I'm missing something. And I think I'm not the only one who feel... |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | I know that tag is called **single**-word-requests, but I think it's a mistake to get hung up on that word. What these types of questions are really asking for is a concise way to express a concept, and a single word —being as concise as you can get— is the ultimate goal; but you can't always reach that goal, and that'... | >
> This quest for a single word might be considered stylistically important in some languages but how important is it in English?
>
>
>
Particular contexts or milieus call for particular levels of style; for example, use of the right word or words seems more important in formal speech or writing than informal. Fo... |
3,618 | Recently, this forum has seen many questions of the *what is the single word for* type.
Is this really such a concern in English?
Single words such as obfuscate or elucidate can obfuscate as much they can elucidate.
This quest for a single word might be considered stylistically important in some languages but how im... | 2013/01/14 | [
"https://english.meta.stackexchange.com/questions/3618",
"https://english.meta.stackexchange.com",
"https://english.meta.stackexchange.com/users/30820/"
] | I know that tag is called **single**-word-requests, but I think it's a mistake to get hung up on that word. What these types of questions are really asking for is a concise way to express a concept, and a single word —being as concise as you can get— is the ultimate goal; but you can't always reach that goal, and that'... | >
> Is this really such a concern in English?
>
>
> This quest for a single word might be considered stylistically important in some languages but how important is it in English?
>
>
>
Why is English different from other languages? The difference is not the language but why you need a single word for a certain c... |
5,691,926 | I have several lists:
```
A = ["a0", "a1"] // the number of lists varies
B = ["b0", "b1", "b2"] // such as the number of elements in a list.
C = ["c1"]
D = ["d0", "d1"]
```
I convert this structure into a tree:
```
_____ROOT______
/ \
___a0____ ____a1____
... | 2011/04/17 | [
"https://Stackoverflow.com/questions/5691926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/433835/"
] | OK. I think you actually mean that you want to find every path from root to a leaf.
Then (a un-optimized version)
```
void traverse (Node root) {
// assume root != NULL
traverse (root, new LinkedList<Node>());
}
private void traverse (Node root, LinkedList<Node> path) {
path.add(root);
if (root.isLeaf()) {
... | So basically you are doing a depth first search, but rather than tracking the visiting of the nodes explicitly in a non-destructive way, or maintaining enough context to search without tracking, you are destroying the tree to do this tracking.
The traditional way to convert this to a plain DFS would be to loop around ... |
5,691,926 | I have several lists:
```
A = ["a0", "a1"] // the number of lists varies
B = ["b0", "b1", "b2"] // such as the number of elements in a list.
C = ["c1"]
D = ["d0", "d1"]
```
I convert this structure into a tree:
```
_____ROOT______
/ \
___a0____ ____a1____
... | 2011/04/17 | [
"https://Stackoverflow.com/questions/5691926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/433835/"
] | OK. I think you actually mean that you want to find every path from root to a leaf.
Then (a un-optimized version)
```
void traverse (Node root) {
// assume root != NULL
traverse (root, new LinkedList<Node>());
}
private void traverse (Node root, LinkedList<Node> path) {
path.add(root);
if (root.isLeaf()) {
... | Something that I came up with working on printing the words in a TrieTree that can be easily adaptable to other kinds of trees or different needs:
```
public void rootToLeaves() {
HashMap<Integer, TrieNode> hashMap = new HashMap<Integer, TrieNode>();
for(TrieNode trieNode : root.getChildren())
rootToLe... |
5,691,926 | I have several lists:
```
A = ["a0", "a1"] // the number of lists varies
B = ["b0", "b1", "b2"] // such as the number of elements in a list.
C = ["c1"]
D = ["d0", "d1"]
```
I convert this structure into a tree:
```
_____ROOT______
/ \
___a0____ ____a1____
... | 2011/04/17 | [
"https://Stackoverflow.com/questions/5691926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/433835/"
] | OK. I think you actually mean that you want to find every path from root to a leaf.
Then (a un-optimized version)
```
void traverse (Node root) {
// assume root != NULL
traverse (root, new LinkedList<Node>());
}
private void traverse (Node root, LinkedList<Node> path) {
path.add(root);
if (root.isLeaf()) {
... | 1,Find leaf node
2,Up traversal from leaf node
```
public void printPath(N n) {
if (n == null)
return;
if (n.left == null && n.right == null) {
do {
System.out.print(n.value);
System.out.print(" ");
} while ((n = n.parent) != null);... |
5,691,926 | I have several lists:
```
A = ["a0", "a1"] // the number of lists varies
B = ["b0", "b1", "b2"] // such as the number of elements in a list.
C = ["c1"]
D = ["d0", "d1"]
```
I convert this structure into a tree:
```
_____ROOT______
/ \
___a0____ ____a1____
... | 2011/04/17 | [
"https://Stackoverflow.com/questions/5691926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/433835/"
] | So basically you are doing a depth first search, but rather than tracking the visiting of the nodes explicitly in a non-destructive way, or maintaining enough context to search without tracking, you are destroying the tree to do this tracking.
The traditional way to convert this to a plain DFS would be to loop around ... | Something that I came up with working on printing the words in a TrieTree that can be easily adaptable to other kinds of trees or different needs:
```
public void rootToLeaves() {
HashMap<Integer, TrieNode> hashMap = new HashMap<Integer, TrieNode>();
for(TrieNode trieNode : root.getChildren())
rootToLe... |
5,691,926 | I have several lists:
```
A = ["a0", "a1"] // the number of lists varies
B = ["b0", "b1", "b2"] // such as the number of elements in a list.
C = ["c1"]
D = ["d0", "d1"]
```
I convert this structure into a tree:
```
_____ROOT______
/ \
___a0____ ____a1____
... | 2011/04/17 | [
"https://Stackoverflow.com/questions/5691926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/433835/"
] | So basically you are doing a depth first search, but rather than tracking the visiting of the nodes explicitly in a non-destructive way, or maintaining enough context to search without tracking, you are destroying the tree to do this tracking.
The traditional way to convert this to a plain DFS would be to loop around ... | 1,Find leaf node
2,Up traversal from leaf node
```
public void printPath(N n) {
if (n == null)
return;
if (n.left == null && n.right == null) {
do {
System.out.print(n.value);
System.out.print(" ");
} while ((n = n.parent) != null);... |
5,691,926 | I have several lists:
```
A = ["a0", "a1"] // the number of lists varies
B = ["b0", "b1", "b2"] // such as the number of elements in a list.
C = ["c1"]
D = ["d0", "d1"]
```
I convert this structure into a tree:
```
_____ROOT______
/ \
___a0____ ____a1____
... | 2011/04/17 | [
"https://Stackoverflow.com/questions/5691926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/433835/"
] | Something that I came up with working on printing the words in a TrieTree that can be easily adaptable to other kinds of trees or different needs:
```
public void rootToLeaves() {
HashMap<Integer, TrieNode> hashMap = new HashMap<Integer, TrieNode>();
for(TrieNode trieNode : root.getChildren())
rootToLe... | 1,Find leaf node
2,Up traversal from leaf node
```
public void printPath(N n) {
if (n == null)
return;
if (n.left == null && n.right == null) {
do {
System.out.print(n.value);
System.out.print(" ");
} while ((n = n.parent) != null);... |
34,311,076 | I have been on this for a few days now and cant quite work out what im doing wrong. If anyone could offer some advice or solution it would be greatly appreciated.
Right....
We have a simple sql script which searches shopping cart for a list of products in the cart based on session.
```
$sqlCommand = "SELECT * FROM sh... | 2015/12/16 | [
"https://Stackoverflow.com/questions/34311076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5686355/"
] | ```
while ($row = mysqli_fetch_array($query)) {
$custquantity1 = $row["quantity"];
$custprice1 = $row["price"];
$calcustprice1[] = $custprice1 * $custquantity1;
$CartList1 .= '' .$calcustprice1. ',';
}
echo array_sum($calcustprice1);
mysqli_free_result($query);
``` | You can use `array_sum()`. For reference [php.net - array\_sum()](http://php.net/manual/en/function.array-sum.php) |
34,311,076 | I have been on this for a few days now and cant quite work out what im doing wrong. If anyone could offer some advice or solution it would be greatly appreciated.
Right....
We have a simple sql script which searches shopping cart for a list of products in the cart based on session.
```
$sqlCommand = "SELECT * FROM sh... | 2015/12/16 | [
"https://Stackoverflow.com/questions/34311076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5686355/"
] | ```
$sum=0;
foreach($a as $val){
$sum+=floatval($val);
}
echo $sum;
``` | You can use `array_sum()`. For reference [php.net - array\_sum()](http://php.net/manual/en/function.array-sum.php) |
34,311,076 | I have been on this for a few days now and cant quite work out what im doing wrong. If anyone could offer some advice or solution it would be greatly appreciated.
Right....
We have a simple sql script which searches shopping cart for a list of products in the cart based on session.
```
$sqlCommand = "SELECT * FROM sh... | 2015/12/16 | [
"https://Stackoverflow.com/questions/34311076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5686355/"
] | ```
while ($row = mysqli_fetch_array($query)) {
$custquantity1 = $row["quantity"];
$custprice1 = $row["price"];
$calcustprice1[] = $custprice1 * $custquantity1;
$CartList1 .= '' .$calcustprice1. ',';
}
echo array_sum($calcustprice1);
mysqli_free_result($query);
``` | ```
$cartList = array();
while ($row = mysqli_fetch_array($query)) {
$cartList[] = $row["quantity"] * $row["price"];
}
$totalPrice = array_sum($cartList);
``` |
34,311,076 | I have been on this for a few days now and cant quite work out what im doing wrong. If anyone could offer some advice or solution it would be greatly appreciated.
Right....
We have a simple sql script which searches shopping cart for a list of products in the cart based on session.
```
$sqlCommand = "SELECT * FROM sh... | 2015/12/16 | [
"https://Stackoverflow.com/questions/34311076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5686355/"
] | ```
$sum=0;
foreach($a as $val){
$sum+=floatval($val);
}
echo $sum;
``` | ```
$cartList = array();
while ($row = mysqli_fetch_array($query)) {
$cartList[] = $row["quantity"] * $row["price"];
}
$totalPrice = array_sum($cartList);
``` |
1,219,404 | I have a lovely little Java client that sends signed email messages. We have an Exchange server that requires username/password authentication to send a message.
When I connect to the exchange server, I get this error:
```
avax.mail.AuthenticationFailedException: failed to connect
at javax.mail.Service.connec... | 2009/08/02 | [
"https://Stackoverflow.com/questions/1219404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/51167/"
] | Apparently, MS Exchange SSL connection is not established properly by Java Mail API. It relies on using `SSLSocketFactory` for that, but, if I remember correctly, MS Exchange requires a somewhat mixed approach.
Anyway, I have this piece of code in one of my projects:
```
import javax.net.SocketFactory;
import javax.n... | I had the same issues. Now it works properly. I disabled the antivirus (McAfee) and corrected the user name (I unnecessarily gave the domain whereas it was not required). |
1,219,404 | I have a lovely little Java client that sends signed email messages. We have an Exchange server that requires username/password authentication to send a message.
When I connect to the exchange server, I get this error:
```
avax.mail.AuthenticationFailedException: failed to connect
at javax.mail.Service.connec... | 2009/08/02 | [
"https://Stackoverflow.com/questions/1219404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/51167/"
] | Apparently, MS Exchange SSL connection is not established properly by Java Mail API. It relies on using `SSLSocketFactory` for that, but, if I remember correctly, MS Exchange requires a somewhat mixed approach.
Anyway, I have this piece of code in one of my projects:
```
import javax.net.SocketFactory;
import javax.n... | Try disabling plain login explicitly:
```
properties.setProperty("mail." + protocol + ".auth.plain.disable", "true");
```
OR
```
props.put("mail.smtp.auth.plain.disable", true);
```
Apparently there's a bug in some versions of exchange where it advertises support for plain auth when in fact that will always fail. |
5,064,715 | I don't know what this is called, but it is something like syncing android application and a Web server. Examples are RSS Feeds and Weather Forecast
Does anyone know the concept behind developing application? I mean how do you sync the Android phone with a web server. Is there any programming needed in the server side... | 2011/02/21 | [
"https://Stackoverflow.com/questions/5064715",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/626365/"
] | Just to state the accepted answer explicitly:
```
SELECT myCol
FROM myTable
WHERE SUBSTRING(myCol, 1 , 1) BETWEEN 'A' AND 'Z' AND
SUBSTRING(myCol, 2 , 1) BETWEEN 'A' AND 'Z' AND
SUBSTRING(myCol, 3 , 1) BETWEEN '0' AND '9'
```
(mixture of Ken's answer and Andriy's suggestion) | Try this -
```
SELECT myCol FROM myTable WHERE myCol REGEXP '[[:alpha:]]{2}[[:digit:]]{1}'
```
<http://dev.mysql.com/doc/refman/5.1/en/regexp.html> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.