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
25,279,044
I am trying to integrate `SonarQube` to generate report on my `iOS project`, I am using [Objective-C Sonar plugin](https://github.com/octo-technology/sonar-objective-c) When i run `./run-sonar.sh` `OCLint` generates a `compile_commands.json` file in my root directory. and after that getting following error ``` 11:...
2014/08/13
[ "https://Stackoverflow.com/questions/25279044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3936042/" ]
I had a similar error. My sonar server had two objective-c code analyser plugin. The [Sonar Plugin for Objective C (free)](https://github.com/octo-technology/sonar-objective-c) and [SonarSource Objective-C plugin (commercial)](http://www.sonarsource.com/products/plugins/languages/objective-c/) When I removed (uninstal...
I am not sure what version of the objective-c-sonar plugin that you were using. I solved similar issue before. Goto `${SONAR_INSTALLATION_FOLDER}/extensions/plugins/`, copy the `sonar-objective-c-plugin-${version}.jar` to somewhere else. unzip the jar file, and edit below file `org/sonar/plugins/objectivec/profile-...
25,279,044
I am trying to integrate `SonarQube` to generate report on my `iOS project`, I am using [Objective-C Sonar plugin](https://github.com/octo-technology/sonar-objective-c) When i run `./run-sonar.sh` `OCLint` generates a `compile_commands.json` file in my root directory. and after that getting following error ``` 11:...
2014/08/13
[ "https://Stackoverflow.com/questions/25279044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3936042/" ]
I had a similar error too with the last version of this [plugin](https://github.com/Backelite/sonar-objective-c "plugin") which is a fork of the one you used. I downgrade my OCLint version from 0.11 to 0.10.1 and everything work perfectly. It seems that the OCLint rules defined in the plugin was different of the OCLint...
I am not sure what version of the objective-c-sonar plugin that you were using. I solved similar issue before. Goto `${SONAR_INSTALLATION_FOLDER}/extensions/plugins/`, copy the `sonar-objective-c-plugin-${version}.jar` to somewhere else. unzip the jar file, and edit below file `org/sonar/plugins/objectivec/profile-...
38,811,533
I am using RecyclerView for showing my list. I implement Swipe to dismiss on the RecyclerView with ItemTouchHelper. The underlying layout is implemented in OnchildDraw method by using canvas. Now I have a problem: I want to set onclick on my icon. By clicking on the icon, I want to do some functions. Here is My class:...
2016/08/07
[ "https://Stackoverflow.com/questions/38811533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6687286/" ]
I had the same problem as yours. I coded half a day and finally find one way. First of all, I think this is android ItemTouchHelper problem that there are no methods to solve that. So it can't use ItemTouchHelper and other system methods. What I do is this: 1. Set recylerView.setOnTouchListener to get (x,y) on scr...
For those using AdamWei's solution number 2, if you're having trouble with the the recyclerview ontouchlistener in a fragment, change the following line: ``` Point point = new Point((int)motionEvent.getRawX(), (int)motionEvent.getRawY()); ``` to ``` Point point = new Point((int) motionEvent.getX(), (int) motionEv...
4,788,600
Hi so lately I've been doing a lot of java programming and I've been using a lot of if statements. the problem is i have to copy and paste the if statements over a hundred times to check all the senarios. Here is an example: ``` while (i < AreaNumbers.size()) { String roomnum = "j" + AreaNumbers.get(i); ...
2011/01/24
[ "https://Stackoverflow.com/questions/4788600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569027/" ]
Don't use numbered variable names (like `j100`, `j101`, etc.). Use an array instead, so you can loop over them programatically: ``` SomeType[] j = new SomeType[1000]; for (int z = 0; z < j.length; z++) { j[z] = new SomeType(); j[z].setTooltipText("Hello world"); } ``` Depending on what you need to do, you ...
you could use a `Map<String, Runnable>` using the label as the key and to a `Runnable`. Depending on how you write you Runnable subclasses, this could alleviate a lot of redundancy. ``` if( myMap.containsKey( myLabel ) ) { myMap.get(myLabel).run(); } ```
17,243
Last night I was at a wedding, and when I stood up as the bride was passing by on the way to the Chuppa, a fellow in all seriousness told me "It is not proper and a lack of Tzniyus to stand up for the bride". I told him that I am certain that there is a valid source for doing so as we see that it is a Minhag Yisroel th...
2012/06/22
[ "https://judaism.stackexchange.com/questions/17243", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/200/" ]
See [Halachically Speaking (Volume 4, Issue 12, Page 8)](http://www.thehalacha.com/attach/Volume4/Issue12.pdf) where the author brings that many poskim [see footnote 108 for names] actually say to stand the *entire* Chuppah. (One reason given is because the Chosson is doing a Mitzvah, so we stand in his honor). Common ...
I have heard it comes from [the *mishna* (*Bikurim*)](http://he.wikisource.org/wiki/%D7%9E%D7%A9%D7%A0%D7%94_%D7%91%D7%9B%D7%95%D7%A8%D7%99%D7%9D_%D7%92_%D7%92) that says people in Jerusalem would stand and greet people bringing *bikurim*, on which [the *g'mara* (*Kidushin*)](http://www.e-daf.com/index.asp?ID=2692&size...
17,243
Last night I was at a wedding, and when I stood up as the bride was passing by on the way to the Chuppa, a fellow in all seriousness told me "It is not proper and a lack of Tzniyus to stand up for the bride". I told him that I am certain that there is a valid source for doing so as we see that it is a Minhag Yisroel th...
2012/06/22
[ "https://judaism.stackexchange.com/questions/17243", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/200/" ]
I have heard it comes from [the *mishna* (*Bikurim*)](http://he.wikisource.org/wiki/%D7%9E%D7%A9%D7%A0%D7%94_%D7%91%D7%9B%D7%95%D7%A8%D7%99%D7%9D_%D7%92_%D7%92) that says people in Jerusalem would stand and greet people bringing *bikurim*, on which [the *g'mara* (*Kidushin*)](http://www.e-daf.com/index.asp?ID=2692&size...
Quotes from two of Rabbi Leib Tropper's *Shoel Umaishiv* emails: **Dec 24, '15:** > > Rav Moshe [Feinstein], zt'l took the position that the choson only earns the status > of 'Choson' after the chupah.‎ Therefore if after the Choson's Tish > people would daven mincha he would also say ‎'Tachnun'. He would not > s...
17,243
Last night I was at a wedding, and when I stood up as the bride was passing by on the way to the Chuppa, a fellow in all seriousness told me "It is not proper and a lack of Tzniyus to stand up for the bride". I told him that I am certain that there is a valid source for doing so as we see that it is a Minhag Yisroel th...
2012/06/22
[ "https://judaism.stackexchange.com/questions/17243", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/200/" ]
See [Halachically Speaking (Volume 4, Issue 12, Page 8)](http://www.thehalacha.com/attach/Volume4/Issue12.pdf) where the author brings that many poskim [see footnote 108 for names] actually say to stand the *entire* Chuppah. (One reason given is because the Chosson is doing a Mitzvah, so we stand in his honor). Common ...
The Jewish Press of the week of January 9, 2016, brings a small piece by Rabbi Soleveitchik saying the tzibbur stands when the chassan and kallah walk down the aisle to honor the parents that are bringing their children to do the mitzvah of kiddushin. I think he also mentions the mishnah in bikkurim as a source to why ...
17,243
Last night I was at a wedding, and when I stood up as the bride was passing by on the way to the Chuppa, a fellow in all seriousness told me "It is not proper and a lack of Tzniyus to stand up for the bride". I told him that I am certain that there is a valid source for doing so as we see that it is a Minhag Yisroel th...
2012/06/22
[ "https://judaism.stackexchange.com/questions/17243", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/200/" ]
See [Halachically Speaking (Volume 4, Issue 12, Page 8)](http://www.thehalacha.com/attach/Volume4/Issue12.pdf) where the author brings that many poskim [see footnote 108 for names] actually say to stand the *entire* Chuppah. (One reason given is because the Chosson is doing a Mitzvah, so we stand in his honor). Common ...
Quotes from two of Rabbi Leib Tropper's *Shoel Umaishiv* emails: **Dec 24, '15:** > > Rav Moshe [Feinstein], zt'l took the position that the choson only earns the status > of 'Choson' after the chupah.‎ Therefore if after the Choson's Tish > people would daven mincha he would also say ‎'Tachnun'. He would not > s...
17,243
Last night I was at a wedding, and when I stood up as the bride was passing by on the way to the Chuppa, a fellow in all seriousness told me "It is not proper and a lack of Tzniyus to stand up for the bride". I told him that I am certain that there is a valid source for doing so as we see that it is a Minhag Yisroel th...
2012/06/22
[ "https://judaism.stackexchange.com/questions/17243", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/200/" ]
The Jewish Press of the week of January 9, 2016, brings a small piece by Rabbi Soleveitchik saying the tzibbur stands when the chassan and kallah walk down the aisle to honor the parents that are bringing their children to do the mitzvah of kiddushin. I think he also mentions the mishnah in bikkurim as a source to why ...
Quotes from two of Rabbi Leib Tropper's *Shoel Umaishiv* emails: **Dec 24, '15:** > > Rav Moshe [Feinstein], zt'l took the position that the choson only earns the status > of 'Choson' after the chupah.‎ Therefore if after the Choson's Tish > people would daven mincha he would also say ‎'Tachnun'. He would not > s...
62,184,952
I have written few lines of code using javascript in Vue framework. I can not display date on html from var. I used vue-bootstrap for styles. Any suggestion is app? ``` <template> <div class="app"> <b-form-datepicker id="datepicker" class="weekpicker" placeholder="Select a week" local="en"></b-form-datepic...
2020/06/04
[ "https://Stackoverflow.com/questions/62184952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13401826/" ]
As @Phil said since you are using Vue you should define the data property for the date like so: ``` data() { return { myDate: null } } ``` When it comes to date pickers it is usually `@change` event or `v-model`. Try: ``` <b-form-datepicker id="datepicker" class="weekpicker" placeholder="Select a week" loc...
You should use the data property instead of manipulating the dom ``` data() { return { myDate: '' } } ``` Inside the function ``` myFunction() { let x = new Date(); let current_date = x.toDateString(); x.setDate(x.getDate() + 7); let seventh_date = x.toDateString() ...
1,702,651
Have seen a lot of conflicting information when trying to google this -- people claiming they did it successfully and others claiming it is impossible. I have a laptop with USB-C out, but it does not support Thunderbolt, DP-altmode, or HDMI-altmode. Does there exist a way to output to a HDMI monitor via this port? Ob...
2022/02/01
[ "https://superuser.com/questions/1702651", "https://superuser.com", "https://superuser.com/users/320374/" ]
> > I have a laptop with USB-C out, but it does not support Thunderbolt, DP-altmode, or HDMI-altmode. > Does there exist a way to output to a HDMI monitor via this port? > > > Yes. > > If so, what should I look for in specifications of hubs to buy? > > > DisplayLink. I don't know if there are other brands o...
A technically correct answer (the best kind) - I have successfully managed this by getting a USB-A to HDMI adapter and plugging it into the USB-A output port of the USB-C hub whose HDMI port doesn't work.
11,883,479
I develop yii application and have CGridView with many columns. I want to scroll the CGridView horizontal but can't find how.
2012/08/09
[ "https://Stackoverflow.com/questions/11883479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/610094/" ]
You can put grid into container with fixed `width` and `overflow: auto;`. ``` <div class="CGridViewContainer"> <!-- CGridView here --> </div> ``` And CSS: ``` .CGridViewContainer { width: 960px; overflow: auto; } ``` But I believe that spanning of the columns will be better way of presenting the table. Don't ...
If you set `overflow: scroll-x` on the CSS for your grid, that should setup horizontal scrolling in your browser
107,984
I am trying to find a plugin or another method to block Firefox with a master password, so that a user can only use Firefox if the correct password is entered. Can you suggest a plugin or if Windows 7 has this kind of blocking feature built in?
2010/02/12
[ "https://superuser.com/questions/107984", "https://superuser.com", "https://superuser.com/users/11324/" ]
It's likely you're going about your "trying to lock down the machine" approach in a non typical way, and will struggle to correctly secure it. You're probably better off having additional login accounts with restricted access, that way those users will not have access to what ever it is you're trying to protect in you...
Well, you can use the UAC feature of Win7 to block it. But then you have to provide password for each application u run.. Anyway, its the best hand you have.. ``` To change the elevation prompt behavior for standard users 1. Click Start, click Accessories, click Run, type secpol.msc in the Open box, and then click...
107,984
I am trying to find a plugin or another method to block Firefox with a master password, so that a user can only use Firefox if the correct password is entered. Can you suggest a plugin or if Windows 7 has this kind of blocking feature built in?
2010/02/12
[ "https://superuser.com/questions/107984", "https://superuser.com", "https://superuser.com/users/11324/" ]
**[WinGuard Pro](http://www.winguardpro.com/index.html)** locks any file, folder or program on your computer. ![alt text](https://i.stack.imgur.com/cJhxT.jpg)
It's likely you're going about your "trying to lock down the machine" approach in a non typical way, and will struggle to correctly secure it. You're probably better off having additional login accounts with restricted access, that way those users will not have access to what ever it is you're trying to protect in you...
107,984
I am trying to find a plugin or another method to block Firefox with a master password, so that a user can only use Firefox if the correct password is entered. Can you suggest a plugin or if Windows 7 has this kind of blocking feature built in?
2010/02/12
[ "https://superuser.com/questions/107984", "https://superuser.com", "https://superuser.com/users/11324/" ]
**[WinGuard Pro](http://www.winguardpro.com/index.html)** locks any file, folder or program on your computer. ![alt text](https://i.stack.imgur.com/cJhxT.jpg)
Well, you can use the UAC feature of Win7 to block it. But then you have to provide password for each application u run.. Anyway, its the best hand you have.. ``` To change the elevation prompt behavior for standard users 1. Click Start, click Accessories, click Run, type secpol.msc in the Open box, and then click...
26,901
If the polarity changes every time the AC switches, then why doesn't the capacitor explode?
2012/02/20
[ "https://electronics.stackexchange.com/questions/26901", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/8210/" ]
As clabacchio said, some capacitors are unpolarized, so it's perfectly fine to put positive and negative voltages on them. However, it is still possible to put a AC signal thru a polarized capacitor. This is done by adding a DC bias of at least half the AC peak-peak voltage. The entire signal is then still positive, b...
Because not all the capacitors have a polarity. As far as I know, only electrolytic capacitors have a fixed polarity, while for instance ceramic capacitors don't. If you look at the schematics, you will see that (in proper designs) electrolytic, or in general capacitors with a polarization, have the negative shield cu...
26,901
If the polarity changes every time the AC switches, then why doesn't the capacitor explode?
2012/02/20
[ "https://electronics.stackexchange.com/questions/26901", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/8210/" ]
Because not all the capacitors have a polarity. As far as I know, only electrolytic capacitors have a fixed polarity, while for instance ceramic capacitors don't. If you look at the schematics, you will see that (in proper designs) electrolytic, or in general capacitors with a polarization, have the negative shield cu...
You must know what capacitors are used for. That will clarify where polarized capacitors are used. They are not used in AC Circuits. 1. Capacitors are used in turning circuit in AC. These are non polarized. So as the AC switches direction, it cannot damage the capacitors because the capacitor is simply not polarized a...
26,901
If the polarity changes every time the AC switches, then why doesn't the capacitor explode?
2012/02/20
[ "https://electronics.stackexchange.com/questions/26901", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/8210/" ]
As clabacchio said, some capacitors are unpolarized, so it's perfectly fine to put positive and negative voltages on them. However, it is still possible to put a AC signal thru a polarized capacitor. This is done by adding a DC bias of at least half the AC peak-peak voltage. The entire signal is then still positive, b...
You must know what capacitors are used for. That will clarify where polarized capacitors are used. They are not used in AC Circuits. 1. Capacitors are used in turning circuit in AC. These are non polarized. So as the AC switches direction, it cannot damage the capacitors because the capacitor is simply not polarized a...
518,898
This is for an assignment I'm working on, and NO I'm not looking for you to just GIVE me the answer. I just need someone to point me in the right direction, maybe with a line or two of sample code. I need to figure out how to set the priority of a file read operation from within my program. To the point: * server pro...
2009/02/06
[ "https://Stackoverflow.com/questions/518898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/63154/" ]
Until recently, there was no IO prioritization in Linux. Now there is `ionice`. But I doubt you are meant to use it in your assignment.
Are you sure your assignment is talking about files and not system V message queues? Read the man pages for: ``` msgctl(2), msgget(2), msgrcv(2), msgsnd(2), capabilities(7), mq_overview(7), svipc(7) ``` Although I think you can use a file as a key to create a message queue, so that multiple process...
518,898
This is for an assignment I'm working on, and NO I'm not looking for you to just GIVE me the answer. I just need someone to point me in the right direction, maybe with a line or two of sample code. I need to figure out how to set the priority of a file read operation from within my program. To the point: * server pro...
2009/02/06
[ "https://Stackoverflow.com/questions/518898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/63154/" ]
Have the pool of child processes share a semaphore. Once a child acquires the semaphore it can read a predefined number of bytes from the resource and return it to the client. The number of bytes read can be related to the priority of the request. Once the process has read the predefined number of bytes release the sem...
Are you sure your assignment is talking about files and not system V message queues? Read the man pages for: ``` msgctl(2), msgget(2), msgrcv(2), msgsnd(2), capabilities(7), mq_overview(7), svipc(7) ``` Although I think you can use a file as a key to create a message queue, so that multiple process...
518,898
This is for an assignment I'm working on, and NO I'm not looking for you to just GIVE me the answer. I just need someone to point me in the right direction, maybe with a line or two of sample code. I need to figure out how to set the priority of a file read operation from within my program. To the point: * server pro...
2009/02/06
[ "https://Stackoverflow.com/questions/518898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/63154/" ]
Have the pool of child processes share a semaphore. Once a child acquires the semaphore it can read a predefined number of bytes from the resource and return it to the client. The number of bytes read can be related to the priority of the request. Once the process has read the predefined number of bytes release the sem...
Until recently, there was no IO prioritization in Linux. Now there is `ionice`. But I doubt you are meant to use it in your assignment.
139,814
Sites like TD Ameritrade offer a specific lot method of recording capital gains that claims to be most efficient. Such as using the following order: > > Short-term loss– descending order by cost per share (highest to > lowest), and as a result, taking the biggest short-term losses first > > > Long-term loss– descen...
2021/04/13
[ "https://money.stackexchange.com/questions/139814", "https://money.stackexchange.com", "https://money.stackexchange.com/users/21865/" ]
There is no proof that it's optimal, because it's not optimal. Suppose that the current date is December 16. There's a stock whose last trade price is $100, and you have the following tax lots: * 100 shares purchased at $50.01 on January 1 * 100 shares purchased at $50 on December 1 Then suppose you want to sell 100...
Their engine is the same steps that you would use if you had all your trades in a spreadsheet and knew that you needed to sell 172 shares today. Remember that is only one of the [methods they provide/allow](https://www.tdameritrade.com/education/taxes/what-is-a-tax-lot.page): * FIFO (first-in, first-out) * LIFO (last...
5,341,756
I have followed some advices I got here today and would need a bit more help now: I have an user control with login logic. In mainForm I am using this: ``` private void Form1_Load(object sender, EventArgs e) { LoginScreen login = new MainMenu(); login.Parent = this; log...
2011/03/17
[ "https://Stackoverflow.com/questions/5341756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/615848/" ]
Simply use `ShowDialog()` instead of `Show()`. Besides, `ShowDialog()` returns a DialogResult, so you can check if user doesn't press `OK` and close the form in that case: ``` if(form.ShowDialog() != DialogResult.OK) { this.Close(); }else { //if login it's ok continue with main form loading... } ``` **EDIT:...
Instead of `login.Show();` you might use`login.ShowDialog(this);`, making it a modal pop-up for the form.
5,341,756
I have followed some advices I got here today and would need a bit more help now: I have an user control with login logic. In mainForm I am using this: ``` private void Form1_Load(object sender, EventArgs e) { LoginScreen login = new MainMenu(); login.Parent = this; log...
2011/03/17
[ "https://Stackoverflow.com/questions/5341756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/615848/" ]
Simply use `ShowDialog()` instead of `Show()`. Besides, `ShowDialog()` returns a DialogResult, so you can check if user doesn't press `OK` and close the form in that case: ``` if(form.ShowDialog() != DialogResult.OK) { this.Close(); }else { //if login it's ok continue with main form loading... } ``` **EDIT:...
If it's not derived from the `Form` class (which is odd), just create a windows form and put your control on it, then call `ShowDialog` method of the form. You'll have to wire closing of the form to the controls on your login screen somehow, though. If it fires some events it shouldn't be a problem.
3,100,400
In the identity $$\frac {n!}{x(x+1)(x+2)...(x+n)} = \sum ^n\_{k=0}\frac {A\_k}{x+k} $$ Prove that $$A\_k =(-1)^{k}\:\cdot\: ^{n}C\_k$$ Also from this deduce that, $$ \;^{n}C\_0\frac 1{1.2} - \:^{n}C\_1\frac1{2.3} +\; ^{n}C\_2\frac1{3.4} \; ... \;{(-1)^n}\; ^{n}C\_n\frac1{(n+1)(n+2)}\;=\frac1{(n+2)}$$ So I have to ...
2019/02/04
[ "https://math.stackexchange.com/questions/3100400", "https://math.stackexchange.com", "https://math.stackexchange.com/users/641206/" ]
There are many ways to demonstrate such an interesting identity. *a) Induction* I do not know at what level you are, so let's start with what should be the simpler: Induction Given the thesis $$ F(x,n) = {{n!} \over {x\left( {x + 1} \right) \cdots \left( {x + n} \right)}} = \sum\limits\_{\left( {0\, \le } \right)\,...
Hint: Place the RHS over a common denominator. This gives in the numerator a sum of terms of the form $$A\_ix(x+1)\cdots(x+i-1)(x+i+1)\cdots(x+n).$$ Substitute successively $x=0$, $x=1,\dotsc, x=n$. This gives the result directly once you get the signs right: for each $i$, one gets $\pm i!(n-i)!A\_i = n!$.
3,100,400
In the identity $$\frac {n!}{x(x+1)(x+2)...(x+n)} = \sum ^n\_{k=0}\frac {A\_k}{x+k} $$ Prove that $$A\_k =(-1)^{k}\:\cdot\: ^{n}C\_k$$ Also from this deduce that, $$ \;^{n}C\_0\frac 1{1.2} - \:^{n}C\_1\frac1{2.3} +\; ^{n}C\_2\frac1{3.4} \; ... \;{(-1)^n}\; ^{n}C\_n\frac1{(n+1)(n+2)}\;=\frac1{(n+2)}$$ So I have to ...
2019/02/04
[ "https://math.stackexchange.com/questions/3100400", "https://math.stackexchange.com", "https://math.stackexchange.com/users/641206/" ]
For the second identity, start with the binomial theorem: $$ (1-t)^n=\sum\_{k=0}^n\binom{n}k(-1)^kt^k. $$ Integrating both sides from $0$ to $x$ with respect to $dt$, $$ \frac{1-(1-x)^{n+1}}{n+1}=\sum\_{k=0}^n\binom{n}k(-1)^k\frac{x^{k+1}}{k+1}. $$ Integrating both sides from $0$ to $1$ with respect to $dx$, $$ \frac1{...
Hint: Place the RHS over a common denominator. This gives in the numerator a sum of terms of the form $$A\_ix(x+1)\cdots(x+i-1)(x+i+1)\cdots(x+n).$$ Substitute successively $x=0$, $x=1,\dotsc, x=n$. This gives the result directly once you get the signs right: for each $i$, one gets $\pm i!(n-i)!A\_i = n!$.
3,100,400
In the identity $$\frac {n!}{x(x+1)(x+2)...(x+n)} = \sum ^n\_{k=0}\frac {A\_k}{x+k} $$ Prove that $$A\_k =(-1)^{k}\:\cdot\: ^{n}C\_k$$ Also from this deduce that, $$ \;^{n}C\_0\frac 1{1.2} - \:^{n}C\_1\frac1{2.3} +\; ^{n}C\_2\frac1{3.4} \; ... \;{(-1)^n}\; ^{n}C\_n\frac1{(n+1)(n+2)}\;=\frac1{(n+2)}$$ So I have to ...
2019/02/04
[ "https://math.stackexchange.com/questions/3100400", "https://math.stackexchange.com", "https://math.stackexchange.com/users/641206/" ]
There are many ways to demonstrate such an interesting identity. *a) Induction* I do not know at what level you are, so let's start with what should be the simpler: Induction Given the thesis $$ F(x,n) = {{n!} \over {x\left( {x + 1} \right) \cdots \left( {x + n} \right)}} = \sum\limits\_{\left( {0\, \le } \right)\,...
For the second identity, start with the binomial theorem: $$ (1-t)^n=\sum\_{k=0}^n\binom{n}k(-1)^kt^k. $$ Integrating both sides from $0$ to $x$ with respect to $dt$, $$ \frac{1-(1-x)^{n+1}}{n+1}=\sum\_{k=0}^n\binom{n}k(-1)^k\frac{x^{k+1}}{k+1}. $$ Integrating both sides from $0$ to $1$ with respect to $dx$, $$ \frac1{...
3,100,400
In the identity $$\frac {n!}{x(x+1)(x+2)...(x+n)} = \sum ^n\_{k=0}\frac {A\_k}{x+k} $$ Prove that $$A\_k =(-1)^{k}\:\cdot\: ^{n}C\_k$$ Also from this deduce that, $$ \;^{n}C\_0\frac 1{1.2} - \:^{n}C\_1\frac1{2.3} +\; ^{n}C\_2\frac1{3.4} \; ... \;{(-1)^n}\; ^{n}C\_n\frac1{(n+1)(n+2)}\;=\frac1{(n+2)}$$ So I have to ...
2019/02/04
[ "https://math.stackexchange.com/questions/3100400", "https://math.stackexchange.com", "https://math.stackexchange.com/users/641206/" ]
There are many ways to demonstrate such an interesting identity. *a) Induction* I do not know at what level you are, so let's start with what should be the simpler: Induction Given the thesis $$ F(x,n) = {{n!} \over {x\left( {x + 1} \right) \cdots \left( {x + n} \right)}} = \sum\limits\_{\left( {0\, \le } \right)\,...
> > We obtain > \begin{align\*} > \frac{n!}{x(x+1)\cdots(x+n)}&=\sum\_{k=0}^n\frac{A\_k}{x+k}\\ > n!&=\sum\_{k=0}^nA\_k\frac{x(x+1)\cdots(x+n)}{x+k}\tag{1} > \end{align\*} > Substituting $x=-j,0\leq j\leq n$ in (1) we get > \begin{align\*} > n!&=A\_j(-j)(-j+1)\cdots (-1)\cdots1\cdot 2\cdots(n-j)\\ > &=A\_j(-1)^j j!...
3,100,400
In the identity $$\frac {n!}{x(x+1)(x+2)...(x+n)} = \sum ^n\_{k=0}\frac {A\_k}{x+k} $$ Prove that $$A\_k =(-1)^{k}\:\cdot\: ^{n}C\_k$$ Also from this deduce that, $$ \;^{n}C\_0\frac 1{1.2} - \:^{n}C\_1\frac1{2.3} +\; ^{n}C\_2\frac1{3.4} \; ... \;{(-1)^n}\; ^{n}C\_n\frac1{(n+1)(n+2)}\;=\frac1{(n+2)}$$ So I have to ...
2019/02/04
[ "https://math.stackexchange.com/questions/3100400", "https://math.stackexchange.com", "https://math.stackexchange.com/users/641206/" ]
For the second identity, start with the binomial theorem: $$ (1-t)^n=\sum\_{k=0}^n\binom{n}k(-1)^kt^k. $$ Integrating both sides from $0$ to $x$ with respect to $dt$, $$ \frac{1-(1-x)^{n+1}}{n+1}=\sum\_{k=0}^n\binom{n}k(-1)^k\frac{x^{k+1}}{k+1}. $$ Integrating both sides from $0$ to $1$ with respect to $dx$, $$ \frac1{...
> > We obtain > \begin{align\*} > \frac{n!}{x(x+1)\cdots(x+n)}&=\sum\_{k=0}^n\frac{A\_k}{x+k}\\ > n!&=\sum\_{k=0}^nA\_k\frac{x(x+1)\cdots(x+n)}{x+k}\tag{1} > \end{align\*} > Substituting $x=-j,0\leq j\leq n$ in (1) we get > \begin{align\*} > n!&=A\_j(-j)(-j+1)\cdots (-1)\cdots1\cdot 2\cdots(n-j)\\ > &=A\_j(-1)^j j!...
112,102
Is there any tools to copy text from video's or images?
2013/11/28
[ "https://apple.stackexchange.com/questions/112102", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/63598/" ]
You can upload the image to [Google Drive](https://drive.google.com) and it will use [OCR](http://en.wikipedia.org/wiki/Optical_character_recognition) to get the text from it. Or you can use a specialized software like [Abby Fine reader](http://finereader.abbyy.com/) for more advanced work. The quality of the text re...
You can use Optical Character Recognition (OCR) for the job
112,102
Is there any tools to copy text from video's or images?
2013/11/28
[ "https://apple.stackexchange.com/questions/112102", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/63598/" ]
I often also want to quickly copy text from images and videos. However I wasn't able to find a good solution on OS X, as procedures like uploading to Google Drive are far too cumbersome. This is why I developed [Aristocrat](http://joshparnham.com/projects/aristocrat/), a simple app that performs OCR on a selected regi...
You can use Optical Character Recognition (OCR) for the job
56,818,424
I have this simple Post Form class ``` class PostForm(FlaskForm): content = TextAreaField('Content', validators=[DataRequired()]) submit = SubmitField('Post') ``` Is there a way so that when the user inputs ``` <a href="example.com">example</a> ``` on the TextAreaField the site outputs it as an HTML link?
2019/06/29
[ "https://Stackoverflow.com/questions/56818424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11375835/" ]
You can use the `OR(c1,c2,...)` function which evaluates to True when any one of its argument conditions is true. For example, ``` =IF(OR(WEEKDAY(E3,2)=1,WEEKDAY(E3,2)=2,...), "Wake up", IF(OR(...), "Sleep", "Remote")) ```
The `OR` function takes a list of parameters, i.e. `OR(param1, param2, param...)`. The formula below will do one thing ("Wake Up") on every day except Thursday. ``` =IF(OR(WEEKDAY(E3,2) < 4, WEEKDAY(E3,2) > 4), "Wake Up", "Sleep") ``` Using your date format (2) where Thursday is day 4, it says if the day of the wee...
56,818,424
I have this simple Post Form class ``` class PostForm(FlaskForm): content = TextAreaField('Content', validators=[DataRequired()]) submit = SubmitField('Post') ``` Is there a way so that when the user inputs ``` <a href="example.com">example</a> ``` on the TextAreaField the site outputs it as an HTML link?
2019/06/29
[ "https://Stackoverflow.com/questions/56818424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11375835/" ]
You can use the `OR(c1,c2,...)` function which evaluates to True when any one of its argument conditions is true. For example, ``` =IF(OR(WEEKDAY(E3,2)=1,WEEKDAY(E3,2)=2,...), "Wake up", IF(OR(...), "Sleep", "Remote")) ```
**This will work:** ``` =IF(OR(WEEKDAY(E3,2)<3,WEEKDAY(E3,2)=5),"Remote",IF(WEEKDAY(E3,2)=4,"Sleep","Wake up")) ``` * Monday, Tuesday, Wednesday, Friday - Remote * Thursday - Sleep * Sat, Sun - Wake up
56,818,424
I have this simple Post Form class ``` class PostForm(FlaskForm): content = TextAreaField('Content', validators=[DataRequired()]) submit = SubmitField('Post') ``` Is there a way so that when the user inputs ``` <a href="example.com">example</a> ``` on the TextAreaField the site outputs it as an HTML link?
2019/06/29
[ "https://Stackoverflow.com/questions/56818424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11375835/" ]
You can use the `OR(c1,c2,...)` function which evaluates to True when any one of its argument conditions is true. For example, ``` =IF(OR(WEEKDAY(E3,2)=1,WEEKDAY(E3,2)=2,...), "Wake up", IF(OR(...), "Sleep", "Remote")) ```
I know you've asked about using `OR`, and have already accepted an answer, but I wanted to point out that you can also use `VLOOKUP` to make your logic clearer and more readable. First, you can create a table of weekdays and lookup values, like this: ``` +---+-----+-----------+---------+ | | A | B | C...
56,818,424
I have this simple Post Form class ``` class PostForm(FlaskForm): content = TextAreaField('Content', validators=[DataRequired()]) submit = SubmitField('Post') ``` Is there a way so that when the user inputs ``` <a href="example.com">example</a> ``` on the TextAreaField the site outputs it as an HTML link?
2019/06/29
[ "https://Stackoverflow.com/questions/56818424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11375835/" ]
OR is nor necessary and without seems to me a little neater: ``` =IF(COUNTIF(Holiday,E3),"Other",IF(WEEKDAY(E3)=5,"Remote",IF(WEEKDAY(E3,2)>5,"Sleep","Wake up"))) ``` `Holiday` is a named range for the dates of *something different*.
The `OR` function takes a list of parameters, i.e. `OR(param1, param2, param...)`. The formula below will do one thing ("Wake Up") on every day except Thursday. ``` =IF(OR(WEEKDAY(E3,2) < 4, WEEKDAY(E3,2) > 4), "Wake Up", "Sleep") ``` Using your date format (2) where Thursday is day 4, it says if the day of the wee...
56,818,424
I have this simple Post Form class ``` class PostForm(FlaskForm): content = TextAreaField('Content', validators=[DataRequired()]) submit = SubmitField('Post') ``` Is there a way so that when the user inputs ``` <a href="example.com">example</a> ``` on the TextAreaField the site outputs it as an HTML link?
2019/06/29
[ "https://Stackoverflow.com/questions/56818424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11375835/" ]
OR is nor necessary and without seems to me a little neater: ``` =IF(COUNTIF(Holiday,E3),"Other",IF(WEEKDAY(E3)=5,"Remote",IF(WEEKDAY(E3,2)>5,"Sleep","Wake up"))) ``` `Holiday` is a named range for the dates of *something different*.
**This will work:** ``` =IF(OR(WEEKDAY(E3,2)<3,WEEKDAY(E3,2)=5),"Remote",IF(WEEKDAY(E3,2)=4,"Sleep","Wake up")) ``` * Monday, Tuesday, Wednesday, Friday - Remote * Thursday - Sleep * Sat, Sun - Wake up
56,818,424
I have this simple Post Form class ``` class PostForm(FlaskForm): content = TextAreaField('Content', validators=[DataRequired()]) submit = SubmitField('Post') ``` Is there a way so that when the user inputs ``` <a href="example.com">example</a> ``` on the TextAreaField the site outputs it as an HTML link?
2019/06/29
[ "https://Stackoverflow.com/questions/56818424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11375835/" ]
OR is nor necessary and without seems to me a little neater: ``` =IF(COUNTIF(Holiday,E3),"Other",IF(WEEKDAY(E3)=5,"Remote",IF(WEEKDAY(E3,2)>5,"Sleep","Wake up"))) ``` `Holiday` is a named range for the dates of *something different*.
I know you've asked about using `OR`, and have already accepted an answer, but I wanted to point out that you can also use `VLOOKUP` to make your logic clearer and more readable. First, you can create a table of weekdays and lookup values, like this: ``` +---+-----+-----------+---------+ | | A | B | C...
28,124,844
The following function `f` attempts to read an `Int` twice by using an `IO (Maybe Int)` function twice, but “short-circuits” execution after successfully reading one `Int`: ``` readInt :: IO (Maybe Int) f :: IO (Maybe Int) f = do n1 <- readInt case n1 of Just n' -> return (Just n') Nothing -> do ...
2015/01/24
[ "https://Stackoverflow.com/questions/28124844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/459877/" ]
You can use `MaybeT` and the `MonadPlus` instance to use `msum`: ``` f :: MaybeT IO Int f = msum [readInt, readInt, readInt] ```
First of all, ``` n2 <- readInt case n2 of Just n' -> return (Just n') Nothing -> return Nothing ``` is really just `readInt`. You are picking apart a `Maybe` value in order to put together the same one. For the rest, I think the most succinct way in this case is to use the `maybe` function. Then you ca...
28,124,844
The following function `f` attempts to read an `Int` twice by using an `IO (Maybe Int)` function twice, but “short-circuits” execution after successfully reading one `Int`: ``` readInt :: IO (Maybe Int) f :: IO (Maybe Int) f = do n1 <- readInt case n1 of Just n' -> return (Just n') Nothing -> do ...
2015/01/24
[ "https://Stackoverflow.com/questions/28124844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/459877/" ]
You can use `MaybeT` and the `MonadPlus` instance to use `msum`: ``` f :: MaybeT IO Int f = msum [readInt, readInt, readInt] ```
You need the alternative instance for `MaybeT`: ``` instance (Functor m, Monad m) => Alternative (MaybeT m) where empty = mzero (<|>) = mplus instance (Monad m) => MonadPlus (MaybeT m) where mzero = MaybeT (return Nothing) mplus x y = MaybeT $ do v <- runMaybeT x case v of ...
28,124,844
The following function `f` attempts to read an `Int` twice by using an `IO (Maybe Int)` function twice, but “short-circuits” execution after successfully reading one `Int`: ``` readInt :: IO (Maybe Int) f :: IO (Maybe Int) f = do n1 <- readInt case n1 of Just n' -> return (Just n') Nothing -> do ...
2015/01/24
[ "https://Stackoverflow.com/questions/28124844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/459877/" ]
You can use `MaybeT` and the `MonadPlus` instance to use `msum`: ``` f :: MaybeT IO Int f = msum [readInt, readInt, readInt] ```
Another way of doing this is with the [iterative monad transformer](http://hackage.haskell.org/package/free-4.10.0.1/docs/Control-Monad-Trans-Iter.html) from the `free` package. ``` import Control.Monad.Trans.Iter (untilJust,retract,cutoff,IterT) readInt :: IO (Maybe Int) readInt = undefined f' :: IterT IO Int f' = ...
28,124,844
The following function `f` attempts to read an `Int` twice by using an `IO (Maybe Int)` function twice, but “short-circuits” execution after successfully reading one `Int`: ``` readInt :: IO (Maybe Int) f :: IO (Maybe Int) f = do n1 <- readInt case n1 of Just n' -> return (Just n') Nothing -> do ...
2015/01/24
[ "https://Stackoverflow.com/questions/28124844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/459877/" ]
You need the alternative instance for `MaybeT`: ``` instance (Functor m, Monad m) => Alternative (MaybeT m) where empty = mzero (<|>) = mplus instance (Monad m) => MonadPlus (MaybeT m) where mzero = MaybeT (return Nothing) mplus x y = MaybeT $ do v <- runMaybeT x case v of ...
First of all, ``` n2 <- readInt case n2 of Just n' -> return (Just n') Nothing -> return Nothing ``` is really just `readInt`. You are picking apart a `Maybe` value in order to put together the same one. For the rest, I think the most succinct way in this case is to use the `maybe` function. Then you ca...
28,124,844
The following function `f` attempts to read an `Int` twice by using an `IO (Maybe Int)` function twice, but “short-circuits” execution after successfully reading one `Int`: ``` readInt :: IO (Maybe Int) f :: IO (Maybe Int) f = do n1 <- readInt case n1 of Just n' -> return (Just n') Nothing -> do ...
2015/01/24
[ "https://Stackoverflow.com/questions/28124844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/459877/" ]
You need the alternative instance for `MaybeT`: ``` instance (Functor m, Monad m) => Alternative (MaybeT m) where empty = mzero (<|>) = mplus instance (Monad m) => MonadPlus (MaybeT m) where mzero = MaybeT (return Nothing) mplus x y = MaybeT $ do v <- runMaybeT x case v of ...
Another way of doing this is with the [iterative monad transformer](http://hackage.haskell.org/package/free-4.10.0.1/docs/Control-Monad-Trans-Iter.html) from the `free` package. ``` import Control.Monad.Trans.Iter (untilJust,retract,cutoff,IterT) readInt :: IO (Maybe Int) readInt = undefined f' :: IterT IO Int f' = ...
280,334
I am trying to add new fields to the user search results in setup. For an example, I need to add Profile of the user. But I cannot find a way. Adapting the search results layout doesn't help in this case. [![enter image description here](https://i.stack.imgur.com/rxz16.jpg)](https://i.stack.imgur.com/rxz16.jpg) Any s...
2019/10/04
[ "https://salesforce.stackexchange.com/questions/280334", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/25193/" ]
You have missed one thing in your code syntax. i.e **'$objectInfo.defaultRecordTypeId'** will not give the default value but **'$objectInfo.data.defaultRecordTypeId'** will. You missed using data to get the defaultRecordTypeId. A sample example to use the default record type for getting picklist value in Lightning web...
@Salesforce\_Noobie getPicklistValues is supported for User fields, but you need to send a dummy recordtype id to ``` import { LightningElement,wire } from 'lwc'; import { getObjectInfo, getPicklistValues } from 'lightning/uiObjectInfoApi'; import USER_OBJECT from '@salesforce/schema/User'; import TESTPICKLIST_FIELD f...
15,657,915
In my android Project, I need to create an 'anim' folder. As most people know, the anim folder will be used to store animations. 1. How do I create a folder? 2. Where does the anim folder belong?
2013/03/27
[ "https://Stackoverflow.com/questions/15657915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2130674/" ]
You need to create a new folder right click on res folder create new folder name it anim. And you can put your animation xmls in it.
In the Android application default folder structure there is no Anim folder. If you want Anim folder, you should be create it in to the application.
21,528,297
I'm not able to post Application with Xcode 4.6.2, while uploading it is giving me error "This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK". What SDK would it work with?
2014/02/03
[ "https://Stackoverflow.com/questions/21528297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1295160/" ]
i think that should be arrived this email: ![enter image description here](https://i.stack.imgur.com/bOXVJ.png) from 1 february, the apps must be built with Xcode 5
Upgrade your xcode 4.6.3 to xcode 5 and make app support for iOS 7 also. then only appstore validate your app
50,980,177
I have a table like this: ``` |-------|----------|------------|-----------|------------| | M_ID | YEAR | NEW_M_ID |STATUS_CODE|GROUP_NUMBER| |-------|----------|------------|-----------|------------| |111 |2010 |111-2010 | 0 | | |111 |2011 |111-2011 | 0 | ...
2018/06/22
[ "https://Stackoverflow.com/questions/50980177", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7632936/" ]
Send below query output. ``` select ACCT_NUMBER, status from xxx.transaction order by acct_number ```
Right now this is how your code calculation is working Declaration: group\_num = 1 old\_acct = ‘ ‘ Loop Iteration 1 and 2 status code = 0 does not enter the loop Sets old\_acct = short\_acct\_number For iteration 3 status code = 1 enters the loop Sets group\_num= group\_num + 1 = 1+1 = 2 For iteration 4 and 5 st...
48,178,744
I have following implementation: ``` #include <cstddef> template<typename Data, size_t Size> class Demo { public: Demo(); private: Data data[Size]; }; void f(Demo<int, size_t>& demoObj) { } int main() { Demo<int, 100> demoObj; } ``` I get the following error when I compile: ``` g++ -std=c++11 t...
2018/01/10
[ "https://Stackoverflow.com/questions/48178744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/530340/" ]
`Size` is a non-type parameter, so it requires a non-type argument: ``` void f(Demo<int, 100>& demoObj); // ^^^ ```
If you want to be able to pass in any kind of Demo you can define `f` as a template function. ``` template<typename Data, size_t Size> void f(Demo<Data, Size>& demoObj) { // ... } ```
89,784
I have two Oracle 11gR2 databases on separate servers. I want to duplicate these databases. For this, I do these steps : * In auxiliary db : + create password file with password that is same if target password * In target database: + Create a pfile and set db\_name to auxiliary db + in tnsname.ora set the auxili...
2015/01/21
[ "https://dba.stackexchange.com/questions/89784", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/29327/" ]
If you have "lost the data" because of corruption, you may be able to retrieve some of the data from nonclustered indexes. Or if the corruption is only in nonclustered indexes you may have lost nothing and can rebuild the indexes to recover the data. Search for DBCC PAGE and you may find advice from some experts on wha...
By default none of these two can be reverted but there are special cases when this is possible. ***Truncate***: when truncate is executed `SQL Server doesn’t` delete data but only deallocates pages. This means that if you can still read these pages (using query or third party tool) there is a possibility to recover da...
411,689
After reading [Valve's new employee handbook](http://newcdn.flamehaus.com/Valve_Handbook_LowRes.pdf), I was really interested in setting up a company map like they described on page 6: > > "The fact that everyone is always moving around within the company makes people hard to find. That’s why we have `http://user` — ...
2012/07/27
[ "https://serverfault.com/questions/411689", "https://serverfault.com", "https://serverfault.com/users/129948/" ]
Interesting. You'd need a custom web application to associate and present the data - I'm sure Valve doesn't have a problem with this. I'd envision it like this, in the simplest case: * Have a database that associates a user's name to the MAC address of their computer, that gets updated when someone's computer changes...
I am facing a [similar](https://serverfault.com/questions/423972/locate-devices-within-a-building) problem. As for "sweeping" the switches, that can easily be done via snmpwalk. Here's a simple loop to do just that: ``` for airport14 in 192.168.0.205 192.168.0.206 192.168.0.207 192.168.0.208 do snmpwalk -v 2c -c c...
26,566,654
I'm currently trying to pass an array of (values[3]) which it's first 3 values contain user input. However, I'm getting the error "expected int\* but argument is type of int". I've tried to pass to method1, without the iteration of 'i', using the first three positions in the values array, but that's as far as I managed...
2014/10/25
[ "https://Stackoverflow.com/questions/26566654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You cannot pass an array to a function as an array - it "decays" to a pointer. There are two issues with your code: * There is no forward declaration of `method1` visible at the point of invocation, and * You are passing `values[i]`, a *scalar* value in place of an array. A forward declaration is necessary because ot...
``` #include <stdio.h> int main(void) { int i; int values[3]; printf("Enter three consecutive numbers (With spaces between)"); scanf("%d %d %d",&values[0],&values[1],&values[2]); method1(values, 3); getchar(); getchar(); return 0; } int method1(int* values, int size) { int i; ...
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
The JOIN syntax keeps conditions near the table they apply to. This is especially useful when you join a large amount of tables. By the way, you can do an outer join with the first syntax too: ``` WHERE a.x = b.x(+) ``` Or ``` WHERE a.x *= b.x ``` Or ``` WHERE a.x = b.x or a.x not in (select x from b) ```
Well the first and second queries may yield different results because a LEFT JOIN includes all records from the first table, even if there are no corresponding records in the right table.
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
The second is preferred because it is far less likely to result in an accidental cross join by forgetting to put inthe where clause. A join with no on clause will fail the syntax check, an old style join with no where clause will not fail, it will do a cross join. Additionally when you later have to a left join, it is...
When you need an outer join the second syntax is **not** always required: Oracle: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x(+) ``` MSSQLServer (although it's been [deprecated](http://msdn.microsoft.com/en-us/library/dd172122.aspx) in 2000 version)/Sybase: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x *...
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
I think there are some good reasons on this page to adopt the second method -using explicit JOINs. The clincher though is that when the JOIN criteria are removed from the WHERE clause it becomes much easier to see the remaining selection criteria in the WHERE clause. In really complex SELECT statements it becomes much...
I hear a lot of people complain the first one is too difficult to understand and that it is unclear. I don't see a problem with it, but after having that discussion, I use the second one even on INNER JOINS for clarity.
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
The second is preferred because it is far less likely to result in an accidental cross join by forgetting to put inthe where clause. A join with no on clause will fail the syntax check, an old style join with no where clause will not fail, it will do a cross join. Additionally when you later have to a left join, it is...
The `SELECT * FROM table1, table2, ...` syntax is ok for a couple of tables, but it becomes exponentially (*not necessarily a mathematically accurate statement*) harder and harder to read as the number of tables increases. The JOIN syntax is harder to write (at the beginning), but it makes it explicit what criteria a...
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
The old syntax, with just listing the tables, and using the `WHERE` clause to specify the join criteria, is being deprecated in most modern databases. It's not just for show, the old syntax has the possibility of being ambiguous when you use both INNER and OUTER joins in the same query. Let me give you an example. L...
The JOIN syntax keeps conditions near the table they apply to. This is especially useful when you join a large amount of tables. By the way, you can do an outer join with the first syntax too: ``` WHERE a.x = b.x(+) ``` Or ``` WHERE a.x *= b.x ``` Or ``` WHERE a.x = b.x or a.x not in (select x from b) ```
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
The JOIN syntax keeps conditions near the table they apply to. This is especially useful when you join a large amount of tables. By the way, you can do an outer join with the first syntax too: ``` WHERE a.x = b.x(+) ``` Or ``` WHERE a.x *= b.x ``` Or ``` WHERE a.x = b.x or a.x not in (select x from b) ```
When you need an outer join the second syntax is **not** always required: Oracle: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x(+) ``` MSSQLServer (although it's been [deprecated](http://msdn.microsoft.com/en-us/library/dd172122.aspx) in 2000 version)/Sybase: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x *...
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
Basically, when your FROM clause lists tables like so: ``` SELECT * FROM tableA, tableB, tableC ``` the result is a cross product of all the rows in tables A, B, C. Then you apply the restriction `WHERE tableA.id = tableB.a_id` which will throw away a huge number of rows, then further ... `AND tableB.id = tableC.b...
I think there are some good reasons on this page to adopt the second method -using explicit JOINs. The clincher though is that when the JOIN criteria are removed from the WHERE clause it becomes much easier to see the remaining selection criteria in the WHERE clause. In really complex SELECT statements it becomes much...
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
The old syntax, with just listing the tables, and using the `WHERE` clause to specify the join criteria, is being deprecated in most modern databases. It's not just for show, the old syntax has the possibility of being ambiguous when you use both INNER and OUTER joins in the same query. Let me give you an example. L...
Basically, when your FROM clause lists tables like so: ``` SELECT * FROM tableA, tableB, tableC ``` the result is a cross product of all the rows in tables A, B, C. Then you apply the restriction `WHERE tableA.id = tableB.a_id` which will throw away a huge number of rows, then further ... `AND tableB.id = tableC.b...
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
The old syntax, with just listing the tables, and using the `WHERE` clause to specify the join criteria, is being deprecated in most modern databases. It's not just for show, the old syntax has the possibility of being ambiguous when you use both INNER and OUTER joins in the same query. Let me give you an example. L...
To the database, they end up being the same. For you, though, you'll have to use that second syntax in some situations. For the sake of editing queries that end up having to use it (finding out you needed a left join where you had a straight join), and for consistency, I'd pattern only on the 2nd method. It'll make rea...
894,490
Most SQL dialects accept both the following queries: ``` SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x ``` Now obviously when you need an outer join, the second syntax is required. But when doing an inner join why should I prefer the second syntax to the first (or...
2009/05/21
[ "https://Stackoverflow.com/questions/894490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44065/" ]
The old syntax, with just listing the tables, and using the `WHERE` clause to specify the join criteria, is being deprecated in most modern databases. It's not just for show, the old syntax has the possibility of being ambiguous when you use both INNER and OUTER joins in the same query. Let me give you an example. L...
I hear a lot of people complain the first one is too difficult to understand and that it is unclear. I don't see a problem with it, but after having that discussion, I use the second one even on INNER JOINS for clarity.
2,304,580
The Java documentation for [Comparable](http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html) recommends that compareTo be consistent with equals (because of the behavior in sorted sets or sorted maps). I have a Player object which is mutable. Player will not be used in any kind of sorted set or sorted ma...
2010/02/21
[ "https://Stackoverflow.com/questions/2304580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/182887/" ]
You could implement a `java.util.Comparator` (a stand-alone object that "knows" your `Player` class and compares accordingly) and use that instead of implementing `Comparable` in the class. `Comparator` has the advantage in that you can implement any number of them for different types of sorts, rather than the single ...
It is not a good practice to implement `equals` and `compareTo` that are inconsistent. > > Player will not be used in any kind of sorted set or sorted map. > > > The problem is that *someone else* trying to maintain your code at some time in the future may not realize that you have implemented inconsistent metho...
2,304,580
The Java documentation for [Comparable](http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html) recommends that compareTo be consistent with equals (because of the behavior in sorted sets or sorted maps). I have a Player object which is mutable. Player will not be used in any kind of sorted set or sorted ma...
2010/02/21
[ "https://Stackoverflow.com/questions/2304580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/182887/" ]
You could implement a `java.util.Comparator` (a stand-alone object that "knows" your `Player` class and compares accordingly) and use that instead of implementing `Comparable` in the class. `Comparator` has the advantage in that you can implement any number of them for different types of sorts, rather than the single ...
The [`Comparable`](http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html) API says, "It is strongly recommended (though not required) that natural orderings be consistent with equals." If you don't, be certain to document the limitations you noted. Alternatively, it may be easy to implement [`Comparable`](htt...
2,304,580
The Java documentation for [Comparable](http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html) recommends that compareTo be consistent with equals (because of the behavior in sorted sets or sorted maps). I have a Player object which is mutable. Player will not be used in any kind of sorted set or sorted ma...
2010/02/21
[ "https://Stackoverflow.com/questions/2304580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/182887/" ]
You could implement a `java.util.Comparator` (a stand-alone object that "knows" your `Player` class and compares accordingly) and use that instead of implementing `Comparable` in the class. `Comparator` has the advantage in that you can implement any number of them for different types of sorts, rather than the single ...
I do not think you have the problem that you think you have, but perhaps I'm missing something (wouldn't be the first time). The requirement here is that 2 objects that are equal should also return 0 for compareTo(), meaning that they occupy the same rank for sorting purposes. There is a separate requirement that 2 eq...
2,304,580
The Java documentation for [Comparable](http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html) recommends that compareTo be consistent with equals (because of the behavior in sorted sets or sorted maps). I have a Player object which is mutable. Player will not be used in any kind of sorted set or sorted ma...
2010/02/21
[ "https://Stackoverflow.com/questions/2304580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/182887/" ]
It is not a good practice to implement `equals` and `compareTo` that are inconsistent. > > Player will not be used in any kind of sorted set or sorted map. > > > The problem is that *someone else* trying to maintain your code at some time in the future may not realize that you have implemented inconsistent metho...
The [`Comparable`](http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html) API says, "It is strongly recommended (though not required) that natural orderings be consistent with equals." If you don't, be certain to document the limitations you noted. Alternatively, it may be easy to implement [`Comparable`](htt...
2,304,580
The Java documentation for [Comparable](http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html) recommends that compareTo be consistent with equals (because of the behavior in sorted sets or sorted maps). I have a Player object which is mutable. Player will not be used in any kind of sorted set or sorted ma...
2010/02/21
[ "https://Stackoverflow.com/questions/2304580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/182887/" ]
I do not think you have the problem that you think you have, but perhaps I'm missing something (wouldn't be the first time). The requirement here is that 2 objects that are equal should also return 0 for compareTo(), meaning that they occupy the same rank for sorting purposes. There is a separate requirement that 2 eq...
The [`Comparable`](http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html) API says, "It is strongly recommended (though not required) that natural orderings be consistent with equals." If you don't, be certain to document the limitations you noted. Alternatively, it may be easy to implement [`Comparable`](htt...
46,011,277
First I installed the coinmarketcap from the pycharm project interpreter. Then I run the code below: ``` >>> from coinmarketcap import Market >>> coinmarketcap = Market() >>> coinmarketcap.ticker(<currency>, limit=3, convert='EUR') ``` But I got this: > > ImportError: cannot import name Market > > > Then I t...
2017/09/02
[ "https://Stackoverflow.com/questions/46011277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5226914/" ]
I have finally solved it. Actually I needed to uninstall it within pycharm. Then I installed it using the pip install coinmarketcap and after that it works. Thank you for your help!
[![enter image description here](https://i.stack.imgur.com/h0hB0.png)](https://i.stack.imgur.com/h0hB0.png) I have installed it using pip and tried to import it and did not get any error.so, can you check whether the installation is done with out any error
19,895,039
I have created a custom login page for a legacy java web app using Spring Security and a JSP page. The legacy app does NOT use Spring MVC. I preview it in MyEclipse and it applies my CSS styles. But when I run it in debug mode and look at it with Firefox it has problems. 1) The CSS is not rendered. 2) After submitting ...
2013/11/10
[ "https://Stackoverflow.com/questions/19895039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2792037/" ]
Seems a problem with the path of the CSS, where have you placed the CSS `<link href="Tracker.css" type="text/css" rel="stylesheet"/>` you can also debug your application in Firefox using firebug, if it's not applying then it means that CSS has not downloaded properly just check console in Firefox for 404 or other err...
I used to have the same problem with font awesome. After login I would see css contents. I noticed font-awesome folder is outside of css folder, so I added a new security rule: ``` .antMatchers("/font-awesome/**").permitAll() .antMatchers("/css/**").permitAll() ``` I was using Spring Boot with Thymeleaf and Spring S...
19,895,039
I have created a custom login page for a legacy java web app using Spring Security and a JSP page. The legacy app does NOT use Spring MVC. I preview it in MyEclipse and it applies my CSS styles. But when I run it in debug mode and look at it with Firefox it has problems. 1) The CSS is not rendered. 2) After submitting ...
2013/11/10
[ "https://Stackoverflow.com/questions/19895039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2792037/" ]
Seems a problem with the path of the CSS, where have you placed the CSS `<link href="Tracker.css" type="text/css" rel="stylesheet"/>` you can also debug your application in Firefox using firebug, if it's not applying then it means that CSS has not downloaded properly just check console in Firefox for 404 or other err...
The CSS file location is already a clue, if you've already added permitAll() to you spring security config file, make sure that the css file (or image file in my case) is actually accessible via url, ie it might need to be in the resource folder. In my case my image file was hidden in a WEB-INF folder, which is not e...
19,895,039
I have created a custom login page for a legacy java web app using Spring Security and a JSP page. The legacy app does NOT use Spring MVC. I preview it in MyEclipse and it applies my CSS styles. But when I run it in debug mode and look at it with Firefox it has problems. 1) The CSS is not rendered. 2) After submitting ...
2013/11/10
[ "https://Stackoverflow.com/questions/19895039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2792037/" ]
I used to have the same problem with font awesome. After login I would see css contents. I noticed font-awesome folder is outside of css folder, so I added a new security rule: ``` .antMatchers("/font-awesome/**").permitAll() .antMatchers("/css/**").permitAll() ``` I was using Spring Boot with Thymeleaf and Spring S...
The CSS file location is already a clue, if you've already added permitAll() to you spring security config file, make sure that the css file (or image file in my case) is actually accessible via url, ie it might need to be in the resource folder. In my case my image file was hidden in a WEB-INF folder, which is not e...
55,733,734
I have a question with streaming in general but for the scope of the question let us restrict ourselves with Kafka Streams. Let's narrow the scope further by restricting our problem to just word count, or perhaps counting in general. Say I have a stream of some key and a value, key could be a string (and lets say we ca...
2019/04/17
[ "https://Stackoverflow.com/questions/55733734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3701377/" ]
Because Kafka Streams scales horizontally, you can deploy as many application instances as you want. Thus, it should actually be possible to build this application. Note that the `KTable` state will be sharded over all machines. If you assume a trillion keys, and each key is about 100 bytes, you would need about 100 T...
(+1 to what Matthias J. Sax said in his answer.) An alternative approach is to use probabilistic counting, which has *significantly* lower storage and memory footprint; i.e., to use a probabilistic data structure like [Count-min Sketch](https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch) (CMS) instead of a linear ...
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
Open Command Prompt, right click on the header bar at the top, select Properties, customize it in there: ![Selecting Properties](https://i.stack.imgur.com/qsWsU.png) ![Changing the colours](https://i.stack.imgur.com/459FB.png)
You can use PowerShell on windows XP and up, and it comes with the newer versions of Windows. See [Costumizing the Windows PowerShell Console](http://technet.microsoft.com/en-us/library/ee156814.aspx), [Display Output in Color Using Windows PowerShell](http://technet.microsoft.com/en-us/library/ff406264.aspx), and [Win...
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
Running `cmd.exe /t:12` will create a command prompt window with a blue background and green text. You can find a list of available colors [here](http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true).
You can use PowerShell on windows XP and up, and it comes with the newer versions of Windows. See [Costumizing the Windows PowerShell Console](http://technet.microsoft.com/en-us/library/ee156814.aspx), [Display Output in Color Using Windows PowerShell](http://technet.microsoft.com/en-us/library/ff406264.aspx), and [Win...
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
**One small step...** I made a clone of [HotDIR](https://veganaize.github.io/HotDIR/) (only for Windows command-line) that colorizes directory listings: **USAGE:** ``` c:\> hd /? ``` [![enter image description here](https://i.stack.imgur.com/JjrVs.png)](https://i.stack.imgur.com/JjrVs.png)
I don't think you can customise CMD the way you describe in your comment to Moab's answer. If it's relevant, there are alternatives to Windows' CMD. You can try [console](http://sourceforge.net/projects/console/) which is a nice small freeware that does a great job.
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
You can't do that because the way the Windows console works is fundamentally different from the Linux terminal. On Linux the coloring is done using [ANSI escape sequences](http://en.wikipedia.org/wiki/ANSI_escape_code). From Wikipedia: > > ANSI escape sequences are characters > embedded in the text used to control >...
**One small step...** I made a clone of [HotDIR](https://veganaize.github.io/HotDIR/) (only for Windows command-line) that colorizes directory listings: **USAGE:** ``` c:\> hd /? ``` [![enter image description here](https://i.stack.imgur.com/JjrVs.png)](https://i.stack.imgur.com/JjrVs.png)
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
Open Command Prompt, right click on the header bar at the top, select Properties, customize it in there: ![Selecting Properties](https://i.stack.imgur.com/qsWsU.png) ![Changing the colours](https://i.stack.imgur.com/459FB.png)
I don't think you can customise CMD the way you describe in your comment to Moab's answer. If it's relevant, there are alternatives to Windows' CMD. You can try [console](http://sourceforge.net/projects/console/) which is a nice small freeware that does a great job.
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
You can use PowerShell on windows XP and up, and it comes with the newer versions of Windows. See [Costumizing the Windows PowerShell Console](http://technet.microsoft.com/en-us/library/ee156814.aspx), [Display Output in Color Using Windows PowerShell](http://technet.microsoft.com/en-us/library/ff406264.aspx), and [Win...
I don't think you can customise CMD the way you describe in your comment to Moab's answer. If it's relevant, there are alternatives to Windows' CMD. You can try [console](http://sourceforge.net/projects/console/) which is a nice small freeware that does a great job.
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
You can't do that because the way the Windows console works is fundamentally different from the Linux terminal. On Linux the coloring is done using [ANSI escape sequences](http://en.wikipedia.org/wiki/ANSI_escape_code). From Wikipedia: > > ANSI escape sequences are characters > embedded in the text used to control >...
You can use PowerShell on windows XP and up, and it comes with the newer versions of Windows. See [Costumizing the Windows PowerShell Console](http://technet.microsoft.com/en-us/library/ee156814.aspx), [Display Output in Color Using Windows PowerShell](http://technet.microsoft.com/en-us/library/ff406264.aspx), and [Win...
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
You could always install [Cygwin](http://www.cygwin.com/)
I don't think you can customise CMD the way you describe in your comment to Moab's answer. If it's relevant, there are alternatives to Windows' CMD. You can try [console](http://sourceforge.net/projects/console/) which is a nice small freeware that does a great job.
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
Running `cmd.exe /t:12` will create a command prompt window with a blue background and green text. You can find a list of available colors [here](http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true).
**One small step...** I made a clone of [HotDIR](https://veganaize.github.io/HotDIR/) (only for Windows command-line) that colorizes directory listings: **USAGE:** ``` c:\> hd /? ``` [![enter image description here](https://i.stack.imgur.com/JjrVs.png)](https://i.stack.imgur.com/JjrVs.png)
249,128
I love the Linux console, but due to many reasons have to work under Windows XP. So now I decided to make it look better but couldn't find any documentation/posts about it. Is it possible at all?
2011/02/22
[ "https://superuser.com/questions/249128", "https://superuser.com", "https://superuser.com/users/68730/" ]
You could always install [Cygwin](http://www.cygwin.com/)
**One small step...** I made a clone of [HotDIR](https://veganaize.github.io/HotDIR/) (only for Windows command-line) that colorizes directory listings: **USAGE:** ``` c:\> hd /? ``` [![enter image description here](https://i.stack.imgur.com/JjrVs.png)](https://i.stack.imgur.com/JjrVs.png)
63,063,538
Wanted to ask people with more experience with React about this, since I can't seem to find a definitive answer. I know you don't want to add text to the DOM directly, which is why React makes you write `dangerouslySetInnerHtml` in order to set it. But what about `classList.{ add || remove || toggle }`? Is using `clas...
2020/07/23
[ "https://Stackoverflow.com/questions/63063538", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5092134/" ]
Mutating the DOM manually is an anti-pattern in React ===================================================== React is a data-first UI lib, meaning that the data dictates how it should render, and it (almost) never need to read the DOM. It only writes to the DOM, and with its internal diffing algorithm, it computes the ...
I think I may have found a solution to this, but I'm not exactly sure if it's the correct way to do it. It still manipulates the DOM, but using the state - so presumably React can decide when to do it: ``` import React, { useState } from 'react'; import 'bootstrap/dist/css/bootstrap.min.css'; const RenderList = (arra...
12,175,582
I have a method returning `IEnumerable` object, but I found that sometimes (on error) the method returns null value of `IEnumerable`. The method looks something like this. ``` IEnumerable<string> function(String param1, String param2) { IEnumerable s = null; s = (some query over here); return s; } ``` ...
2012/08/29
[ "https://Stackoverflow.com/questions/12175582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1360251/" ]
Yours `s = (some query over here);` is returning null. That is why you are getting the exception. Later your check should be: ``` if(a != null) ``` and ``` if(a.Count() > 0) ``` You can combine both as: ``` if(a!=null && a.Count() >0) { // do your work } ```
`null` is not the same as an enumeration without any elements. Therefore, your check for `if(a.count<string> > 0)` fails. (In fact, `a` isn't pointing to any instance whose number of elements you could retrieve with `Count`.) Also, `null` is not the same as the integer value `0`. Therefore, your check for `if(a == 0)`...
12,175,582
I have a method returning `IEnumerable` object, but I found that sometimes (on error) the method returns null value of `IEnumerable`. The method looks something like this. ``` IEnumerable<string> function(String param1, String param2) { IEnumerable s = null; s = (some query over here); return s; } ``` ...
2012/08/29
[ "https://Stackoverflow.com/questions/12175582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1360251/" ]
you could return an empty enumerable if the search result was null: ``` IEnumerable<string> function(String param1, String param2) { IEnumerable s = null; s = (some query over here); return s ?? Enumerable.Empty<string>(); } ```
`null` is not the same as an enumeration without any elements. Therefore, your check for `if(a.count<string> > 0)` fails. (In fact, `a` isn't pointing to any instance whose number of elements you could retrieve with `Count`.) Also, `null` is not the same as the integer value `0`. Therefore, your check for `if(a == 0)`...
30,727,084
I managed to add a link to the right of the jQuery autocomplete items, using the following code: ``` function onClientSelect(event, ui) { // My handling code goes here event.preventDefault(); } $("#mypage input[name='client']").autocomplete({ minLength: 1, appendTo: $(this).parent(), source: '/fil...
2015/06/09
[ "https://Stackoverflow.com/questions/30727084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041510/" ]
One way to do it is by defining a custom `select` function and by not using an `<a>` for the links HTML: ``` <div class="ui-widget"> <label for="tags">Tags:</label> <input id="tags"> </div> ``` JS: ``` var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++...
Amir, regarding to your answer, I think that opening window inside javascript function from **select** event can be blocked by PopupBlocker pinghsien422 , your server side should return Json and not complete html , if you must return complete html, make the following changes: 1.Remove the clientSelect function 2.No ...
30,727,084
I managed to add a link to the right of the jQuery autocomplete items, using the following code: ``` function onClientSelect(event, ui) { // My handling code goes here event.preventDefault(); } $("#mypage input[name='client']").autocomplete({ minLength: 1, appendTo: $(this).parent(), source: '/fil...
2015/06/09
[ "https://Stackoverflow.com/questions/30727084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041510/" ]
One way to do it is by defining a custom `select` function and by not using an `<a>` for the links HTML: ``` <div class="ui-widget"> <label for="tags">Tags:</label> <input id="tags"> </div> ``` JS: ``` var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++...
Try to do `even.stopImmediatePropagation` in `onclick` binding to link. Page is opening and select handler not executed. ``` var li = $("<li></li>") .data("item.autocomplete", item) .append('<a class="ac-item-a" href="http://www.nba.com">' + item.label + '</a>') .appendTo(ul); li.find('a').bind('click', f...
30,727,084
I managed to add a link to the right of the jQuery autocomplete items, using the following code: ``` function onClientSelect(event, ui) { // My handling code goes here event.preventDefault(); } $("#mypage input[name='client']").autocomplete({ minLength: 1, appendTo: $(this).parent(), source: '/fil...
2015/06/09
[ "https://Stackoverflow.com/questions/30727084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041510/" ]
One way to do it is by defining a custom `select` function and by not using an `<a>` for the links HTML: ``` <div class="ui-widget"> <label for="tags">Tags:</label> <input id="tags"> </div> ``` JS: ``` var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++...
Okay, jquery's event takes precedence over your select event - no matter what you do, you can't stop anything there. But you can proxify menuselect event and then decide if it should be invoked ([jsfiddle](http://jsfiddle.net/ev8dnxrh/2/)). ``` var ac = $("#mypage input[name='client']").autocomplete({ minLength: 1...
30,727,084
I managed to add a link to the right of the jQuery autocomplete items, using the following code: ``` function onClientSelect(event, ui) { // My handling code goes here event.preventDefault(); } $("#mypage input[name='client']").autocomplete({ minLength: 1, appendTo: $(this).parent(), source: '/fil...
2015/06/09
[ "https://Stackoverflow.com/questions/30727084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041510/" ]
One way to do it is by defining a custom `select` function and by not using an `<a>` for the links HTML: ``` <div class="ui-widget"> <label for="tags">Tags:</label> <input id="tags"> </div> ``` JS: ``` var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++...
Have you thought about putting a conditional in your click handler to **not** `preventDefault` when it is that link? If you test if the element should function as normal then you can `return` early before the `preventDefault` and then the link should function as normal. Here is an example ([JSBin](http://output.jsbin....
30,727,084
I managed to add a link to the right of the jQuery autocomplete items, using the following code: ``` function onClientSelect(event, ui) { // My handling code goes here event.preventDefault(); } $("#mypage input[name='client']").autocomplete({ minLength: 1, appendTo: $(this).parent(), source: '/fil...
2015/06/09
[ "https://Stackoverflow.com/questions/30727084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041510/" ]
Amir, regarding to your answer, I think that opening window inside javascript function from **select** event can be blocked by PopupBlocker pinghsien422 , your server side should return Json and not complete html , if you must return complete html, make the following changes: 1.Remove the clientSelect function 2.No ...
Try to do `even.stopImmediatePropagation` in `onclick` binding to link. Page is opening and select handler not executed. ``` var li = $("<li></li>") .data("item.autocomplete", item) .append('<a class="ac-item-a" href="http://www.nba.com">' + item.label + '</a>') .appendTo(ul); li.find('a').bind('click', f...
30,727,084
I managed to add a link to the right of the jQuery autocomplete items, using the following code: ``` function onClientSelect(event, ui) { // My handling code goes here event.preventDefault(); } $("#mypage input[name='client']").autocomplete({ minLength: 1, appendTo: $(this).parent(), source: '/fil...
2015/06/09
[ "https://Stackoverflow.com/questions/30727084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041510/" ]
Have you thought about putting a conditional in your click handler to **not** `preventDefault` when it is that link? If you test if the element should function as normal then you can `return` early before the `preventDefault` and then the link should function as normal. Here is an example ([JSBin](http://output.jsbin....
Amir, regarding to your answer, I think that opening window inside javascript function from **select** event can be blocked by PopupBlocker pinghsien422 , your server side should return Json and not complete html , if you must return complete html, make the following changes: 1.Remove the clientSelect function 2.No ...
30,727,084
I managed to add a link to the right of the jQuery autocomplete items, using the following code: ``` function onClientSelect(event, ui) { // My handling code goes here event.preventDefault(); } $("#mypage input[name='client']").autocomplete({ minLength: 1, appendTo: $(this).parent(), source: '/fil...
2015/06/09
[ "https://Stackoverflow.com/questions/30727084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041510/" ]
Okay, jquery's event takes precedence over your select event - no matter what you do, you can't stop anything there. But you can proxify menuselect event and then decide if it should be invoked ([jsfiddle](http://jsfiddle.net/ev8dnxrh/2/)). ``` var ac = $("#mypage input[name='client']").autocomplete({ minLength: 1...
Try to do `even.stopImmediatePropagation` in `onclick` binding to link. Page is opening and select handler not executed. ``` var li = $("<li></li>") .data("item.autocomplete", item) .append('<a class="ac-item-a" href="http://www.nba.com">' + item.label + '</a>') .appendTo(ul); li.find('a').bind('click', f...
30,727,084
I managed to add a link to the right of the jQuery autocomplete items, using the following code: ``` function onClientSelect(event, ui) { // My handling code goes here event.preventDefault(); } $("#mypage input[name='client']").autocomplete({ minLength: 1, appendTo: $(this).parent(), source: '/fil...
2015/06/09
[ "https://Stackoverflow.com/questions/30727084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041510/" ]
Have you thought about putting a conditional in your click handler to **not** `preventDefault` when it is that link? If you test if the element should function as normal then you can `return` early before the `preventDefault` and then the link should function as normal. Here is an example ([JSBin](http://output.jsbin....
Try to do `even.stopImmediatePropagation` in `onclick` binding to link. Page is opening and select handler not executed. ``` var li = $("<li></li>") .data("item.autocomplete", item) .append('<a class="ac-item-a" href="http://www.nba.com">' + item.label + '</a>') .appendTo(ul); li.find('a').bind('click', f...
30,727,084
I managed to add a link to the right of the jQuery autocomplete items, using the following code: ``` function onClientSelect(event, ui) { // My handling code goes here event.preventDefault(); } $("#mypage input[name='client']").autocomplete({ minLength: 1, appendTo: $(this).parent(), source: '/fil...
2015/06/09
[ "https://Stackoverflow.com/questions/30727084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1041510/" ]
Have you thought about putting a conditional in your click handler to **not** `preventDefault` when it is that link? If you test if the element should function as normal then you can `return` early before the `preventDefault` and then the link should function as normal. Here is an example ([JSBin](http://output.jsbin....
Okay, jquery's event takes precedence over your select event - no matter what you do, you can't stop anything there. But you can proxify menuselect event and then decide if it should be invoked ([jsfiddle](http://jsfiddle.net/ev8dnxrh/2/)). ``` var ac = $("#mypage input[name='client']").autocomplete({ minLength: 1...
27,628,390
I am working on an Android application in which I have two concentric circles with the text at center. I have used drawable for both circles. I want to rotate both circle in counter clockwise to each other, i.e. one in clockwise and other in anti clockwise direction. My code is given below for anim folders along activ...
2014/12/23
[ "https://Stackoverflow.com/questions/27628390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2185295/" ]
I'm not sure if it will work, but just try to set `android:toDegrees="-360"` in progress\_right.xml.
Just add one ImageView to your xml and remove Relative layout movement. Your text is moving because you have put your relative layout to the animation and your text is inside the layout.Updated xml code is given below: ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com...
27,628,390
I am working on an Android application in which I have two concentric circles with the text at center. I have used drawable for both circles. I want to rotate both circle in counter clockwise to each other, i.e. one in clockwise and other in anti clockwise direction. My code is given below for anim folders along activ...
2014/12/23
[ "https://Stackoverflow.com/questions/27628390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2185295/" ]
Just change your relative layout with Image view and check the following updated code: ``` private ImageView mImageLeft, mImageRight, mImageProfile; private ImageView mLLLeft; mLLLeft = (ImageView) findViewById(R.id.main_imageLeft1); mImageRight = (ImageView) findViewById(R.id.main_imag...
I'm not sure if it will work, but just try to set `android:toDegrees="-360"` in progress\_right.xml.
27,628,390
I am working on an Android application in which I have two concentric circles with the text at center. I have used drawable for both circles. I want to rotate both circle in counter clockwise to each other, i.e. one in clockwise and other in anti clockwise direction. My code is given below for anim folders along activ...
2014/12/23
[ "https://Stackoverflow.com/questions/27628390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2185295/" ]
Just change your relative layout with Image view and check the following updated code: ``` private ImageView mImageLeft, mImageRight, mImageProfile; private ImageView mLLLeft; mLLLeft = (ImageView) findViewById(R.id.main_imageLeft1); mImageRight = (ImageView) findViewById(R.id.main_imag...
Just add one ImageView to your xml and remove Relative layout movement. Your text is moving because you have put your relative layout to the animation and your text is inside the layout.Updated xml code is given below: ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com...
60,595,620
try to use crossfold resampling and fit a random forest from the ranger package. The fit without resampling works but once I try a resample fit it fails with error below. Consider following `df` ``` df<-structure(list(a = c(1379405931, 732812609, 18614430, 1961678341, 2362202769, 55687714, 72044715, 236503454, 61988...
2020/03/09
[ "https://Stackoverflow.com/questions/60595620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6617454/" ]
The commenter above is correct that the source of the issue here is the spaces in the factor column. The functions for resampling and the functions for just plain old fitting currently handle that differently, and we are actively looking into how to solve this problem for users. Thank you for your patience! In the mea...
Julia bet me to it so she gets the karma. I had the same answer (I do what she does but slower): This is *kind of* a bug and we've been working to the best way to make it not error. It's complicated. Let me explain. `ranger` is one of a few R packages whose formula method does not create dummy variables (sensibly s...
7,779,994
I am having trouble calling a specific method from another class in my app. I have a class, Rest, that determines various settings, etc. about a particular request received by the server and creates a Rest object with the properties of the request. The Rest class may then call any given method in a separate class to fu...
2011/10/15
[ "https://Stackoverflow.com/questions/7779994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604664/" ]
You need to create an instance first. ``` class Users { public static function index() { // Do stuff $rest = new Rest(); $rest->send_response($response_data); } } ```
You don't call send\_response() in an object context, as the error message says. Either you create an instance and call everything on that instance (IMHO the right way), or you do everything statically, including the constructor (you may want to have a intialization method instead) and the properties.
7,779,994
I am having trouble calling a specific method from another class in my app. I have a class, Rest, that determines various settings, etc. about a particular request received by the server and creates a Rest object with the properties of the request. The Rest class may then call any given method in a separate class to fu...
2011/10/15
[ "https://Stackoverflow.com/questions/7779994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604664/" ]
You can create a `Rest` instance in `User`: ``` public static function index() { // Do stuff $rest = new Rest; $rest::send_response($response_data); } ``` You could also change `Rest` to be a singleton and call an instance of it, but beware of this antipattern.
You don't call send\_response() in an object context, as the error message says. Either you create an instance and call everything on that instance (IMHO the right way), or you do everything statically, including the constructor (you may want to have a intialization method instead) and the properties.
7,779,994
I am having trouble calling a specific method from another class in my app. I have a class, Rest, that determines various settings, etc. about a particular request received by the server and creates a Rest object with the properties of the request. The Rest class may then call any given method in a separate class to fu...
2011/10/15
[ "https://Stackoverflow.com/questions/7779994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604664/" ]
You can create a `Rest` instance in `User`: ``` public static function index() { // Do stuff $rest = new Rest; $rest::send_response($response_data); } ``` You could also change `Rest` to be a singleton and call an instance of it, but beware of this antipattern.
You need to create an instance first. ``` class Users { public static function index() { // Do stuff $rest = new Rest(); $rest->send_response($response_data); } } ```
32,918,178
I am trying to print the contents of an array. For example I have defined an int array of size 10. But the user entered only 8 numbers. So the last two positions in an array have an value of zero. When I am printing the array I get all ten positions. Is it possible to print only up till the user entered.Also the user d...
2015/10/03
[ "https://Stackoverflow.com/questions/32918178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5390306/" ]
I don't understand your question very well, but I would start with this function first, so you can split your string: > > The C library function char \*strtok(char \*str, const char \*delim) > breaks string str into a series of tokens using the delimiter delim. > > > ``` char *strtok(char *str, const char *delim...
I would use `strtok` at the beginning. I know this is a lot of code, but I wrote it showing you how to correctly manage dynamic allocated memory and how to correctly use functions like `strtok` and `realloc`, because you see a lot of wrong usage of these functions. Of course you can make it better with more performanc...