qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
161,186 | ```
allan@allan-VirtualBox:~/blackjack_for_the_hopelessly_luckless$ make
g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -I/usr/include/qt3 -o advicewindow.o advicewindow.cpp
advicewindow.cpp:32:19: fatal error: QWidge... | 2012/07/08 | [
"https://askubuntu.com/questions/161186",
"https://askubuntu.com",
"https://askubuntu.com/users/45647/"
] | Found the necessary files in /usr/include/qt4/QtGui/
qmake was linked to qmake-qt3
I remade the project file and Makefile, then compiled with:
```
allan@allan-VirtualBox:qmake-qt4 -project
allan@allan-VirtualBox:qmake
allan@allan-VirtualBox:make
```
Executable is now compiled and running.
I already had qt3 AND qt... | Run the following command to install the missing dependencies.
```
sudo apt-get install libqt4-dev
``` |
16,177 | Let us assume two samples, A and B, where A are the results obtained with some standard method, and B are the results obtained with a new method, which is not necessarily more accurate, but has additional advantages (eg: lower cost).
So I'm interested in testing if B is "as good as" A, using non-inferiority hypothesi... | 2010/02/23 | [
"https://mathoverflow.net/questions/16177",
"https://mathoverflow.net",
"https://mathoverflow.net/users/2735/"
] | I think the answer is no. T tests, basically, work as follows. You manipulate your input data to obtain something that (under the null hypothesis) is normally distributed with mean zero. For example, if the null hypothesis is that the data is normally distributed with mean 28, then the manipulation is simply subtractin... | Perhaps, a slight re-formulation may help to deal with the issue pointed our by Sheldon response. State your null as follows:
$H\_0: A - B = \delta$
$H\_a: A - B >= \delta$
Then you can do a standard one-tailed t-test as the issue raised by Sheldon is no longer applicable. If you have a small sample size then perhap... |
16,177 | Let us assume two samples, A and B, where A are the results obtained with some standard method, and B are the results obtained with a new method, which is not necessarily more accurate, but has additional advantages (eg: lower cost).
So I'm interested in testing if B is "as good as" A, using non-inferiority hypothesi... | 2010/02/23 | [
"https://mathoverflow.net/questions/16177",
"https://mathoverflow.net",
"https://mathoverflow.net/users/2735/"
] | Follow-up on my question, after some more research on the question.
The method of using two one-sided two-sample t-tests for clinical equivalence testing is shown in [Schuirmann 1987](https://doi.org/10.1007/BF01068419 "Schuirmann, D.J. A comparison of the Two One-Sided Tests Procedure and the Power Approach for asses... | I think the answer is no. T tests, basically, work as follows. You manipulate your input data to obtain something that (under the null hypothesis) is normally distributed with mean zero. For example, if the null hypothesis is that the data is normally distributed with mean 28, then the manipulation is simply subtractin... |
16,177 | Let us assume two samples, A and B, where A are the results obtained with some standard method, and B are the results obtained with a new method, which is not necessarily more accurate, but has additional advantages (eg: lower cost).
So I'm interested in testing if B is "as good as" A, using non-inferiority hypothesi... | 2010/02/23 | [
"https://mathoverflow.net/questions/16177",
"https://mathoverflow.net",
"https://mathoverflow.net/users/2735/"
] | Follow-up on my question, after some more research on the question.
The method of using two one-sided two-sample t-tests for clinical equivalence testing is shown in [Schuirmann 1987](https://doi.org/10.1007/BF01068419 "Schuirmann, D.J. A comparison of the Two One-Sided Tests Procedure and the Power Approach for asses... | Perhaps, a slight re-formulation may help to deal with the issue pointed our by Sheldon response. State your null as follows:
$H\_0: A - B = \delta$
$H\_a: A - B >= \delta$
Then you can do a standard one-tailed t-test as the issue raised by Sheldon is no longer applicable. If you have a small sample size then perhap... |
8,896,374 | I am loading the JS file using javascript:
```
window.onload = function() {
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", "js/index.js")
document.getElementsByTagName("head")[0].appendChild(fileref)
}... | 2012/01/17 | [
"https://Stackoverflow.com/questions/8896374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/239512/"
] | `document.write` is really only useful for scripts that are executed inline with the parsing of the page. If you call `document.write` later, it implicitly does a `document.open`, which wipes out the page's content. I'm not sure why you're not seeing that, given what you've described.
When adding content after the ini... | document.write isn't what you want to use here as it's more suited to inline JS (JS in your HTML document). Could you not write the hyperlink to the DOM using `.innerHTML` (making sure that the element you wish to modify the innerHTML is loaded)?
<https://developer.mozilla.org/en/DOM/element.innerHTML> |
95,332 | This is the schematic of a (log) Opamp amplifier. The objective is to calculate the V\_out.

[simulate this circuit](/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fzZ8Lb.png) – Schematic created using [CircuitLab](https://www.circuitlab.com/)
To solve this... | 2014/01/03 | [
"https://electronics.stackexchange.com/questions/95332",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/24212/"
] | You have some boundary conditions: In your circuit the collector voltage is zero because the inverting input is a virtual ground. Also in the transdiode configuration, Ic=Ie, and Ve=Vout.
Use a reasonable approximation to the Ebers-Moll equation for currents that are greater than a uA. $$I\_{c}\; =\; I\_{s}\; e^{-\fr... | Whatever the formula you use, in this circuit the output is always -0.7V and it won't change with increase in the input voltage.Because the base is at 0 potential and there is diode from base to emmitter which has a drop of 0.7 volt and therefore the emitter is always at -0.7V. |
26,540,399 | I am trying to modify a file using sed in a bash script
The file has a format like:
---
```
asfdsdfad..... : 4.12
aldkfjsadk.... : 3.90
asdlkfjasd.... : 2.33
```
---
I want to modify the file to only contain the numbers, including the decimal.
A regex of what I want to KEEP would be simply `[0-9].[0-9][0-9]`
... | 2014/10/24 | [
"https://Stackoverflow.com/questions/26540399",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2243085/"
] | You could try the following regex, this will remove everything up until a number.
```
sed 's/^[^0-9]\+//' file
``` | Alternatives...
```
cut -d " " -f 3 file.txt
```
**OR**
```
awk -F " " '{print $3}' file.txt
``` |
26,540,399 | I am trying to modify a file using sed in a bash script
The file has a format like:
---
```
asfdsdfad..... : 4.12
aldkfjsadk.... : 3.90
asdlkfjasd.... : 2.33
```
---
I want to modify the file to only contain the numbers, including the decimal.
A regex of what I want to KEEP would be simply `[0-9].[0-9][0-9]`
... | 2014/10/24 | [
"https://Stackoverflow.com/questions/26540399",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2243085/"
] | You could try the following regex, this will remove everything up until a number.
```
sed 's/^[^0-9]\+//' file
``` | ```
sed 's/.*\([0-9]\{1,\}\.\{0,1\}[0-9]*\) *$/\1/' YourFile
```
Keep only digit followed by a eventualy 1 dot and eventuellay by digits at the end of line (also remove space at the end if any) |
26,540,399 | I am trying to modify a file using sed in a bash script
The file has a format like:
---
```
asfdsdfad..... : 4.12
aldkfjsadk.... : 3.90
asdlkfjasd.... : 2.33
```
---
I want to modify the file to only contain the numbers, including the decimal.
A regex of what I want to KEEP would be simply `[0-9].[0-9][0-9]`
... | 2014/10/24 | [
"https://Stackoverflow.com/questions/26540399",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2243085/"
] | You could try the following regex, this will remove everything up until a number.
```
sed 's/^[^0-9]\+//' file
``` | This may do:
```
awk '{$0=$3}NF' file
4.12
3.90
2.33
```
It will also remove the blank lines. |
12,900,275 | I have an array which contains dates.
```
dates = [#<DateTime: 2002-07-01T00:00:00+00:00 ((2452457j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-10-31T00:00:00+00:00 ((2452944j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-12-01T00:00:00+00:00 ((2452975j,0s,0n),+0s,2299161j)>, #<DateTime: 2004-03-01T00:00:00+00:00 ((2453066j,0s,... | 2012/10/15 | [
"https://Stackoverflow.com/questions/12900275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/455363/"
] | An array is ascending if the first of each two adjacent elements is less or equal than the second:
```
def ascending? arr
arr.each_cons(2).all?{|left, right| left <= right}
end
```
alternatively (prettier but unfortunately slower), you can compare the array with sorted version of itself:
```
def ascending? arr
... | I think `reduce` will be faster than `each_cons`
```
def ascending? arr
arr.reduce{ |e1,e2| e1 <= e2 ? e2 : (return false) }; true
end
``` |
12,900,275 | I have an array which contains dates.
```
dates = [#<DateTime: 2002-07-01T00:00:00+00:00 ((2452457j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-10-31T00:00:00+00:00 ((2452944j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-12-01T00:00:00+00:00 ((2452975j,0s,0n),+0s,2299161j)>, #<DateTime: 2004-03-01T00:00:00+00:00 ((2453066j,0s,... | 2012/10/15 | [
"https://Stackoverflow.com/questions/12900275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/455363/"
] | An array is ascending if the first of each two adjacent elements is less or equal than the second:
```
def ascending? arr
arr.each_cons(2).all?{|left, right| left <= right}
end
```
alternatively (prettier but unfortunately slower), you can compare the array with sorted version of itself:
```
def ascending? arr
... | Here's some benchmark results for processing speed:
```
require 'benchmark'
require 'date'
ary = (DateTime.parse('2002-07-01T00:00:00+00:00') .. DateTime.parse('2004-03-01T00:00:00+00:00')).to_a
def ascending1? arr
arr.reduce{ |e1,e2| e1 <= e2 ? e2 : (return false) }; true
end
def ascending2? arr
arr.each_cons(... |
12,900,275 | I have an array which contains dates.
```
dates = [#<DateTime: 2002-07-01T00:00:00+00:00 ((2452457j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-10-31T00:00:00+00:00 ((2452944j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-12-01T00:00:00+00:00 ((2452975j,0s,0n),+0s,2299161j)>, #<DateTime: 2004-03-01T00:00:00+00:00 ((2453066j,0s,... | 2012/10/15 | [
"https://Stackoverflow.com/questions/12900275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/455363/"
] | An array is ascending if the first of each two adjacent elements is less or equal than the second:
```
def ascending? arr
arr.each_cons(2).all?{|left, right| left <= right}
end
```
alternatively (prettier but unfortunately slower), you can compare the array with sorted version of itself:
```
def ascending? arr
... | Why not just check if the sorted array is the same as the unsorted array?
`array == array.sort` for ascending
and `array == array.sort.reverse` for descending |
12,900,275 | I have an array which contains dates.
```
dates = [#<DateTime: 2002-07-01T00:00:00+00:00 ((2452457j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-10-31T00:00:00+00:00 ((2452944j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-12-01T00:00:00+00:00 ((2452975j,0s,0n),+0s,2299161j)>, #<DateTime: 2004-03-01T00:00:00+00:00 ((2453066j,0s,... | 2012/10/15 | [
"https://Stackoverflow.com/questions/12900275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/455363/"
] | Here's some benchmark results for processing speed:
```
require 'benchmark'
require 'date'
ary = (DateTime.parse('2002-07-01T00:00:00+00:00') .. DateTime.parse('2004-03-01T00:00:00+00:00')).to_a
def ascending1? arr
arr.reduce{ |e1,e2| e1 <= e2 ? e2 : (return false) }; true
end
def ascending2? arr
arr.each_cons(... | I think `reduce` will be faster than `each_cons`
```
def ascending? arr
arr.reduce{ |e1,e2| e1 <= e2 ? e2 : (return false) }; true
end
``` |
12,900,275 | I have an array which contains dates.
```
dates = [#<DateTime: 2002-07-01T00:00:00+00:00 ((2452457j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-10-31T00:00:00+00:00 ((2452944j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-12-01T00:00:00+00:00 ((2452975j,0s,0n),+0s,2299161j)>, #<DateTime: 2004-03-01T00:00:00+00:00 ((2453066j,0s,... | 2012/10/15 | [
"https://Stackoverflow.com/questions/12900275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/455363/"
] | Why not just check if the sorted array is the same as the unsorted array?
`array == array.sort` for ascending
and `array == array.sort.reverse` for descending | I think `reduce` will be faster than `each_cons`
```
def ascending? arr
arr.reduce{ |e1,e2| e1 <= e2 ? e2 : (return false) }; true
end
``` |
12,900,275 | I have an array which contains dates.
```
dates = [#<DateTime: 2002-07-01T00:00:00+00:00 ((2452457j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-10-31T00:00:00+00:00 ((2452944j,0s,0n),+0s,2299161j)>, #<DateTime: 2003-12-01T00:00:00+00:00 ((2452975j,0s,0n),+0s,2299161j)>, #<DateTime: 2004-03-01T00:00:00+00:00 ((2453066j,0s,... | 2012/10/15 | [
"https://Stackoverflow.com/questions/12900275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/455363/"
] | Here's some benchmark results for processing speed:
```
require 'benchmark'
require 'date'
ary = (DateTime.parse('2002-07-01T00:00:00+00:00') .. DateTime.parse('2004-03-01T00:00:00+00:00')).to_a
def ascending1? arr
arr.reduce{ |e1,e2| e1 <= e2 ? e2 : (return false) }; true
end
def ascending2? arr
arr.each_cons(... | Why not just check if the sorted array is the same as the unsorted array?
`array == array.sort` for ascending
and `array == array.sort.reverse` for descending |
43,317,540 | string = 'This is the new 5000 rupees note'
string\_to\_search = 'new (dynamic no.) rupees'
The numbers in the main string can be any dynamic value. How to match the string starting with 'new' and ending with 'rupees' with dynamic number in between? | 2017/04/10 | [
"https://Stackoverflow.com/questions/43317540",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7533911/"
] | **Improved solution based on the comments:**
You can solve it with a regular expression:
```
new \d* rupees
```
For example:
```
str.match(/new \d+ rupees/g);
``` | You can use this regular expression which searches for a string beginning with 'new' followed by an empty space, then 1 or more digits, then an empty space, then 'rupees'. I just added the alert so you can test this easily
`var str = "new 2000 rupees"
var stringmatched= str.match(/new \d+ rupees/g);
alert(batstringm... |
43,317,540 | string = 'This is the new 5000 rupees note'
string\_to\_search = 'new (dynamic no.) rupees'
The numbers in the main string can be any dynamic value. How to match the string starting with 'new' and ending with 'rupees' with dynamic number in between? | 2017/04/10 | [
"https://Stackoverflow.com/questions/43317540",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7533911/"
] | **Improved solution based on the comments:**
You can solve it with a regular expression:
```
new \d* rupees
```
For example:
```
str.match(/new \d+ rupees/g);
``` | use regular expression with `String.match()`:
```js
var string = 'This is the new 5000 rupees note';
console.log(string.match(/((new+\s)+\d+(\s+rupees)+)+/g)[0].match(/\d+/g)[0]);
// or if you just want to extract number from str:
console.log(string.match(/\d+/g)[0]);
``` |
43,317,540 | string = 'This is the new 5000 rupees note'
string\_to\_search = 'new (dynamic no.) rupees'
The numbers in the main string can be any dynamic value. How to match the string starting with 'new' and ending with 'rupees' with dynamic number in between? | 2017/04/10 | [
"https://Stackoverflow.com/questions/43317540",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7533911/"
] | ```
var regex = /new[\s]?[\d]+[\s]?rupees/;
var str = `This is the new 5000 rupees note`;
let m;
if ((m = regex.exec(str)) !== null) {
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}
```
yo... | You can use this regular expression which searches for a string beginning with 'new' followed by an empty space, then 1 or more digits, then an empty space, then 'rupees'. I just added the alert so you can test this easily
`var str = "new 2000 rupees"
var stringmatched= str.match(/new \d+ rupees/g);
alert(batstringm... |
43,317,540 | string = 'This is the new 5000 rupees note'
string\_to\_search = 'new (dynamic no.) rupees'
The numbers in the main string can be any dynamic value. How to match the string starting with 'new' and ending with 'rupees' with dynamic number in between? | 2017/04/10 | [
"https://Stackoverflow.com/questions/43317540",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7533911/"
] | ```
var regex = /new[\s]?[\d]+[\s]?rupees/;
var str = `This is the new 5000 rupees note`;
let m;
if ((m = regex.exec(str)) !== null) {
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}
```
yo... | use regular expression with `String.match()`:
```js
var string = 'This is the new 5000 rupees note';
console.log(string.match(/((new+\s)+\d+(\s+rupees)+)+/g)[0].match(/\d+/g)[0]);
// or if you just want to extract number from str:
console.log(string.match(/\d+/g)[0]);
``` |
14,082,860 | Is it possible to export or convert my 3D models into GLSL ES 2.0? Is there any converter or any exporter tool/addon existing for any editor programs like Blender/3DS MAX/Maya that creates GLSL ES 2.0 code?
I'd like to create my models conveniently in any of the above mentioned editors and then I'd like to export/conv... | 2012/12/29 | [
"https://Stackoverflow.com/questions/14082860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1577117/"
] | You're comparing apples with cars here. OpenGL is a drawing API, GLSL is a programming language for implementing shader code.
3D models are neither of that. The sole question "how can I convert my 3D model to OpanGL?" makes no sense.
>
> Is it possible?
>
>
>
No. Because that's not the purpose of GLSL
Choose a ... | Have a look at <http://www.inka3d.com> which converts your Maya shaders to GLSL. For the models do you need WebGL or OpenGL ES 2.0? |
42,463,629 | ```
dictionary = {"key1": ["Item1", "Item2"], "key2": ["Item3", "Item4"]}
```
Working with the above dictionary, trying to iterate through it and return the key with most values.
I was trying this:
```
def most_values(a):
return max(a, key=a.get)
```
Which isn't bad though it's going to return whatever key ... | 2017/02/26 | [
"https://Stackoverflow.com/questions/42463629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7623569/"
] | The problem with:
```
return max(a, key=a.get)
```
is that here the `key` will **return the actual list** and in Python **lists are compared lexicographically**, so **not by length** (there are things to say for both ways to compare lists, but they decided to sort lexicographically). You can however easily modify th... | how about this:
```
sorted(dictionary.iteritems(), key=lambda x:len(x[1]), reverse=True)[0][0]
```
sorted() sorts stuff. dictionary.iteritems() is an iterator for key:value pairs in the dict. key will receive such a pair and use the 2nd item in it (the value) as the thing its comparing. reverse=True will make it sor... |
66,580,790 | So I am a beginner in python and I have found a book about its basics. The book is based on python 3.4. The book is trying to teach me while loops. When I try to enter the code which is:
```
counter = 5
while counter > 0: print ("Counter =", counter) counter = counter - 1
```
The book says the output should be:
``... | 2021/03/11 | [
"https://Stackoverflow.com/questions/66580790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7275651/"
] | You need to spearate multiple commands with semicolon (";"):
```
counter = 5
while counter > 0: print ("Counter =", counter); counter = counter - 1
```
However, as kabooya stated, this is not the pythonic way.
As you see, the correctly formatted source (in his answer) is much more readable. | Python syntax is white-space sensitive.
Don't write things on one line.
Do it like this:
```
counter = 5
while counter > 0:
print ("Counter =", counter)
counter = counter - 1
``` |
49,629,821 | I cant open APK that I built from android studio `build > Generate Signed APK`. the build went smooth without error but I could not open the APK to install it.
FYI I already tried another APK from somewhere and I could open it, so it's not my phone issue or security.
how to fix this? I am lost because there is no er... | 2018/04/03 | [
"https://Stackoverflow.com/questions/49629821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4190539/"
] | Create you *Signed APK* with below process.
* `Build` > Generate `Signed` apk.
* Create `Keystore` path.
* Put `Password, alias,` key `password`.
* Build type (`Release` for `Play Store`).
* Signature Version select `V1` and `V2` both checkboxes inside this.
* `Finish`
Update
Also you may need to check that if an a... | I was facing kind of the same issue with an Ionic 4 build Android app.
Once I built my app and got an apk, I open it with Android Studio then in menu I choose
```
Build > Build Bundle(s) / APK(s) > Build APK(s)
```
so I can install my apk on my device when I open the generated apk from Archive |
49,629,821 | I cant open APK that I built from android studio `build > Generate Signed APK`. the build went smooth without error but I could not open the APK to install it.
FYI I already tried another APK from somewhere and I could open it, so it's not my phone issue or security.
how to fix this? I am lost because there is no er... | 2018/04/03 | [
"https://Stackoverflow.com/questions/49629821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4190539/"
] | Create you *Signed APK* with below process.
* `Build` > Generate `Signed` apk.
* Create `Keystore` path.
* Put `Password, alias,` key `password`.
* Build type (`Release` for `Play Store`).
* Signature Version select `V1` and `V2` both checkboxes inside this.
* `Finish`
Update
Also you may need to check that if an a... | Follow this article : <https://learn.microsoft.com/en-us/xamarin/android/deploy-test/signing/manually-signing-the-apk>
I had the same issue and the solution was to sign the apk by yourself. Generally, the IDE is responsible of this operation but sometimes it doesn't do the job. |
36,674,135 | I have an overlay element that hides other div's that contains text.
the overlay element is absolute positioned.
I want the user to be able to select a text on those div's behind.
My solution was to hide the overlay (display: none) on user event mouseDown and show it again when the mouseUp event occurred.
that way ... | 2016/04/17 | [
"https://Stackoverflow.com/questions/36674135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1839478/"
] | You could use [`pointer-events`](https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events) on the element you want to click "through":
```
pointer-events: none;
```
It may need prefix in some browsers.
Examples: Here *without* `pointer-events: none`, you can't select the text:
```css
#outer {
width: 100p... | You need help with javascript
<https://codesandbox.io/s/jovial-hodgkin-jqrsp>
Disable `pointer-events` when mouse is down. |
14,817,153 | got a strange one, i have a variable `t` i use it in one class, it changes, (e.g. 1 becomes 5) and then i call it from another class to use in that class, problem is t is always 0 when it is passed, what am i doing wrong
here is t in the class where it is edited
```
public int t = 1; //defualt value for amount of s... | 2013/02/11 | [
"https://Stackoverflow.com/questions/14817153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2061913/"
] | In `DealyTillPrint` you declare `public int t;` That `t` is different than the `t` you declare in the first code sample. Since you give it no value, it's default value of 0 is assigned. You are doing nothing to share `t` in the first sample with `t` in the second sample.
Change `t = (t * 60); // number of seconds` to ... | You need to get the `printerSettings` object from web page into your `DealyTillPrint` object. I can't tell you how to do that looking at the code you've submitted. |
306,461 | My MacBook Pro screen has a lower than usual screen resolution. How can I fix that? | 2017/11/21 | [
"https://apple.stackexchange.com/questions/306461",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/264824/"
] | Turns out someone has just messed around with my System Preferences.
Going to `System Preferences` >> `Displays` >> `Display` >> `Resolution` and changing it to `Default for display` did the trick. | If you have more than one display, additional resolution options are available.
After the display is connected, choose Apple menu > System Preferences, click Displays, then click Display. Press the Option key while you click Scaled to see additional resolutions for the second display.
macOS Sierra: Adjust your displa... |
32,988,983 | My database setup is like so:
```
create database if not exists shop;
use shop;
create table if not exists users(
id serial primary key,
username varchar(20),
password char(20));
create table if not exists admins(
id serial primary key,
username varchar(20),
password char(20));
insert into admins values(nu... | 2015/10/07 | [
"https://Stackoverflow.com/questions/32988983",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3701521/"
] | MySQL's SHA function return 40 hex digits string. The password field need to handle 40 characters to make SHA works. | Address the issues by following
type session\_start on the login page & declare $\_SESSION variables as ''
`$q="select * from admins where username='$username' and password=SHA('$password')";`
`echo` this query & run on backend,see if it returns data?
So if the above query returns data then sure redirection will be ... |
40,687,031 | I wrote this code to find the roots of a quadratic equation.It seems to work unless I put a space before the scanning part. (for example in the input I write: `a=1,b=2, c=1`). In that case it just deletes the variable. (In the example I gave `c` would be deleted from the input and as such the answers I receive are 0,-2... | 2016/11/18 | [
"https://Stackoverflow.com/questions/40687031",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7180457/"
] | Use a format the allows for space in unexpected places. And check results.
```
// v v v v v v v v
if (scanf(" a =%lf , b =%lf , c =%lf", &a, &b, &c) == 3) Oh_Happy_day();
```
A space is not *needed* before `"%lf"` as that specifier will scan through leading white-space. Some like to be explicit
```
//... | there is no way to fix this problem; this is actually a problem with the function scanf(); itself. Alternately, you can use fgets(); instead.
try replacing
```
double a=0.,b=0.,c=0.;
printf("Enter a polynomial:\n");
scanf("a=%lf,b=%lf,c=%lf",&a,&b,&c);
```
with
```
double a=0.0,b=0.0,c=0.0;
printf("Enter a polynomi... |
40,687,031 | I wrote this code to find the roots of a quadratic equation.It seems to work unless I put a space before the scanning part. (for example in the input I write: `a=1,b=2, c=1`). In that case it just deletes the variable. (In the example I gave `c` would be deleted from the input and as such the answers I receive are 0,-2... | 2016/11/18 | [
"https://Stackoverflow.com/questions/40687031",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7180457/"
] | Use a format the allows for space in unexpected places. And check results.
```
// v v v v v v v v
if (scanf(" a =%lf , b =%lf , c =%lf", &a, &b, &c) == 3) Oh_Happy_day();
```
A space is not *needed* before `"%lf"` as that specifier will scan through leading white-space. Some like to be explicit
```
//... | Because the space is **not** part of the formatting string you used in scanf.
You should add the leading space in the formatting string:
```
scanf(" a=%lf, b=%lf, c=%lf", &a, &b, &c);
``` |
25,730,426 | I am creating a Chrome app and I have made a Logout button in the app.
How can I restart/reset the app? (background.js / background page should be restarted) | 2014/09/08 | [
"https://Stackoverflow.com/questions/25730426",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1857116/"
] | [`chrome.runtime` API](https://developer.chrome.com/apps/runtime) is your friend.
>
> `chrome.runtime.reload()`
>
>
> Reloads the app or extension.
>
>
>
Note that this will probably close all windows opened by the app. | Thinking about the user experience I'm not sure if `chrome.runtime.reload()` is the best what you can do.
It is far much better if you just create a some king of cleanup function which will release unused resources (user's data I mean). The same thing in the app window. If you are using some framework it is probably ea... |
352,151 | When I'm using the layout tool in QGIS, I would like to be able to preview exactly what the symbols would look like before exporting my map. Currently, symbol sizes are dependent on my zoom scale (i.e. 75%, 120% and so on). The only way that I seem to be able to do this is by setting my symbols to "map units". While a ... | 2020/02/26 | [
"https://gis.stackexchange.com/questions/352151",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/158894/"
] | The QGIS Layout should be WYSIWYG, so this is strange.
In *Layout* you can zoom in and out, but that is a pure "image" zoom (all layout elements and the map will be enlarged / reduced in size proportionally, no matter how they are defined).
Regarding symbol sizes:
* When you use "map units" for *Size* units, the rend... | Just click on a magnifying glass icon with the text 1:1 inside it [](https://i.stack.imgur.com/mDTE9.png)
The drawing will be shown in actual size in the exported or printed file. |
29,100,506 | This is my Book.java code
```
public class Book {
private int pageNumber;
private class BookReader{
public int getPage(){
return pageNumber;
}
}
}
```
When I complied it and used `javap` I got following things for the two classes
For `Book$BookReader.class`
This is the out... | 2015/03/17 | [
"https://Stackoverflow.com/questions/29100506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3027001/"
] | In `BookReader`, the `final` variable `this$0` will hold a reference to the `BookReader`'s containing `Book` instance. This is `final` because it is determined for each `BookReader` instance when that instance is created, by the manner of its creation, and cannot thereafter change.
In class `Book`, the static method `... | A non static inner class has a reference to its parent instance. That is the
```
final Book this$0;
```
The reference to the parent Book instance cannot be changed at run time, which is why it is final. Which is to say your BookReader has a reference to exactly on Book that is assigned on construction and cannot be... |
29,100,506 | This is my Book.java code
```
public class Book {
private int pageNumber;
private class BookReader{
public int getPage(){
return pageNumber;
}
}
}
```
When I complied it and used `javap` I got following things for the two classes
For `Book$BookReader.class`
This is the out... | 2015/03/17 | [
"https://Stackoverflow.com/questions/29100506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3027001/"
] | In `BookReader`, the `final` variable `this$0` will hold a reference to the `BookReader`'s containing `Book` instance. This is `final` because it is determined for each `BookReader` instance when that instance is created, by the manner of its creation, and cannot thereafter change.
In class `Book`, the static method `... | You define `BookReader` by:
```
class Book {
private class BookReader { }
}
```
This class relies on an instance of `Book` being created therefore the compiler creates the reference and makes it final (this is an optimisation as each `Book` instance can create `BookReader`)
If you defined `BookReader` by:
```... |
27,544,273 | jquery
```
$(document).ready(function() {
$(".nag").click(function(){
$(".nag").not(this).next(".zaw").slideUp("slow");
$(this).next(".zaw").slideToggle("slow");
$("h2").css("background-image", "url(img/arr_top.png)");
});
});
```
HTML
```
<div class="nag">
<... | 2014/12/18 | [
"https://Stackoverflow.com/questions/27544273",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4373752/"
] | old post but still not handled by dt api. Removing the events won't work if wanting to temporarily disable sorting. Instead use jquery to add and later remove a class onto each th, and in this class specify "pointer-events: none". | Due to the fact that the API does not have a way to do this, I would suggest the following approach
Declare your table at first
```
var table = $('#myTable').DataTable();
```
Re-Initialize your dataTable with to disable ordering
```
//Destroy your table before
table.destroy();
$('#myTable').dataTable( {
"orderin... |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | I myself had problems with GIF's on android and ended up moving over to animated webp's which google seems to embrace and even has their own conversion tools for. They've had android support for it for many years and seems to work much more consistantly. Might even work by changing the extension to webp instead of PNG?... | u just only need react-native-fast-image library..
<FastImage
source={{
uri: img,
// headers: { Authorization: 'someAuthToken' },
priority: FastImage.priority.normal,
}}
resizeMode={FastImage.resizeMode.cover}
onError={() =>
console.log(
'image doest not exist or look like http:',
)
}
style={{
width: '100%',
height: '... |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | A easier fix would be using FastImage library which have Gif support build in with added benefits of caching and more | **GIF and WebP support on Android**
When building your own native code, GIF and WebP are not supported by default on Android.
You will need to add some optional modules in android/app/build.gradle, depending on the needs of your app.
```
dependencies {
// If your app supports Android versions before Ice Cream Sand... |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | I had the same issue using react-native 0.66.3, and updating `com.facebook.fresco:animated-gif` to `2.6.0` in `app/build.gradle` worked for me | **GIF and WebP support on Android**
When building your own native code, GIF and WebP are not supported by default on Android.
You will need to add some optional modules in android/app/build.gradle, depending on the needs of your app.
```
dependencies {
// If your app supports Android versions before Ice Cream Sand... |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | I had the same issue using react-native 0.66.3, and updating `com.facebook.fresco:animated-gif` to `2.6.0` in `app/build.gradle` worked for me | A easier fix would be using FastImage library which have Gif support build in with added benefits of caching and more |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | **GIF and WebP support on Android**
When building your own native code, GIF and WebP are not supported by default on Android.
You will need to add some optional modules in android/app/build.gradle, depending on the needs of your app.
```
dependencies {
// If your app supports Android versions before Ice Cream Sand... | u just only need react-native-fast-image library..
<FastImage
source={{
uri: img,
// headers: { Authorization: 'someAuthToken' },
priority: FastImage.priority.normal,
}}
resizeMode={FastImage.resizeMode.cover}
onError={() =>
console.log(
'image doest not exist or look like http:',
)
}
style={{
width: '100%',
height: '... |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | A easier fix would be using FastImage library which have Gif support build in with added benefits of caching and more | I myself had problems with GIF's on android and ended up moving over to animated webp's which google seems to embrace and even has their own conversion tools for. They've had android support for it for many years and seems to work much more consistantly. Might even work by changing the extension to webp instead of PNG?... |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | I had the same issue using react-native 0.66.3, and updating `com.facebook.fresco:animated-gif` to `2.6.0` in `app/build.gradle` worked for me | u just only need react-native-fast-image library..
<FastImage
source={{
uri: img,
// headers: { Authorization: 'someAuthToken' },
priority: FastImage.priority.normal,
}}
resizeMode={FastImage.resizeMode.cover}
onError={() =>
console.log(
'image doest not exist or look like http:',
)
}
style={{
width: '100%',
height: '... |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | A easier fix would be using FastImage library which have Gif support build in with added benefits of caching and more | u just only need react-native-fast-image library..
<FastImage
source={{
uri: img,
// headers: { Authorization: 'someAuthToken' },
priority: FastImage.priority.normal,
}}
resizeMode={FastImage.resizeMode.cover}
onError={() =>
console.log(
'image doest not exist or look like http:',
)
}
style={{
width: '100%',
height: '... |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | I had the same issue using react-native 0.66.3, and updating `com.facebook.fresco:animated-gif` to `2.6.0` in `app/build.gradle` worked for me | I myself had problems with GIF's on android and ended up moving over to animated webp's which google seems to embrace and even has their own conversion tools for. They've had android support for it for many years and seems to work much more consistantly. Might even work by changing the extension to webp instead of PNG?... |
68,883,182 | Imagine a table that looks like this:
```
name | reloptions
-----------------------
testname | {val1, val2}
nullSample | null
```
if I run a query like this:
```
SELECT *
FROM table, UNNEST(reloptions) AS reloption
```
I only get :
```
name | reloption
------------------
testname | val1
testname | va... | 2021/08/22 | [
"https://Stackoverflow.com/questions/68883182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6217919/"
] | **GIF and WebP support on Android**
When building your own native code, GIF and WebP are not supported by default on Android.
You will need to add some optional modules in android/app/build.gradle, depending on the needs of your app.
```
dependencies {
// If your app supports Android versions before Ice Cream Sand... | [How do I display an animated gif in React Native?](https://stackoverflow.com/questions/35594783/how-do-i-display-an-animated-gif-in-react-native)
add `android/app/build.gradle`
```
// For animated GIF support
compile 'com.facebook.fresco:animated-gif:1.+'
``` |
414,146 | Is there any way to modify the default in-text underscore behaviour document-wide?
I'm utilising a lot of filenames, IDs and so on which often have underscores in, and LaTeX doesn't like this (`missing $ inserted....`). Its becoming laborious to change these every time. Can I do something to resolve this once and for ... | 2018/02/07 | [
"https://tex.stackexchange.com/questions/414146",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/60232/"
] | Use
```
\catcode`_=12
```
and then use `\sb` to get subscripts in math
[](https://i.stack.imgur.com/mRmFS.png)
```
\documentclass{article}
\usepackage[T1]{fontenc}
\catcode`_=12
\begin{document}
This is a_document_with_underscores and _mathem... | You can use `_` as subscript prefix in math mode and the same `_` as normal character outside math mode. Try this:
```
\catcode`\_=13 \let_=\sb
\mathcode`\_="8000
\catcode`\_=12
``` |
214,320 | **PROJEKT '** ***VERDANT PALISADE*** **'**
The year is 2020. A meeting of the UN Security Council is held, disclosing the initial success of a joint project between several member states and handing over authority to the United Nations. This will, in following years, be remembered as the first tests of the AI that wou... | 2021/09/27 | [
"https://worldbuilding.stackexchange.com/questions/214320",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/82844/"
] | With a boring acronym
=====================
The UN is an organization composed of lots of different countries with lots of different languages. They don't all see English as the best language.
<https://www.un.org/en/about-us/un-system>
As such, the UN will likely use boring acronyms to name it, to avoid offending an... | Their function is their name.
You call them Overseer, Forge, Tactitian etc. A big advantage is that the name "changes" based on the language. If necessary you could use the first letters phonetically as their name in their programming language. Ovee for Overseer, Efo for Forge, Te-a for Tactician etc. |
28,585,317 | What is the best way to join the following three select and to get non duplicated contact.id ?
Any idea ?
```
SELECT distinct ct.id
FROM [Customer].[dbo].[Contact] ct
left join [Customer].[dbo].[HN_Customer_ids] hnids
on ct.id = hnids.contact_id
left join [CustomerTransactions].[dbo].[Transaction_He... | 2015/02/18 | [
"https://Stackoverflow.com/questions/28585317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1562660/"
] | Use `union`. So:
```
SELECT ct.id
FROM [Customer].[dbo].[Contact] ct join
[Customer].[dbo].[HN_Customer_ids] hnids
on ct.id = hnids.contact_id join
[CustomerTransactions].[dbo].[Transaction_Header] trh
on trh.Customer_ID = hnids.HN_customer_id
WHERE trh.actual_transaction_date > '20120218'
UNION
SE... | use union
```
SELECT ct.id
FROM [Customer].[dbo].[Contact] ct
left join [Customer].[dbo].[HN_Customer_ids] hnids on ct.id = hnids.contact_id
left join [CustomerTransactions].[dbo].[Transaction_Header] trh on trh.Customer_ID = hnids.HN_customer_id
where trh.actual_transaction_date > '20120218'
union
SELECT... |
28,585,317 | What is the best way to join the following three select and to get non duplicated contact.id ?
Any idea ?
```
SELECT distinct ct.id
FROM [Customer].[dbo].[Contact] ct
left join [Customer].[dbo].[HN_Customer_ids] hnids
on ct.id = hnids.contact_id
left join [CustomerTransactions].[dbo].[Transaction_He... | 2015/02/18 | [
"https://Stackoverflow.com/questions/28585317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1562660/"
] | use union
```
SELECT ct.id
FROM [Customer].[dbo].[Contact] ct
left join [Customer].[dbo].[HN_Customer_ids] hnids on ct.id = hnids.contact_id
left join [CustomerTransactions].[dbo].[Transaction_Header] trh on trh.Customer_ID = hnids.HN_customer_id
where trh.actual_transaction_date > '20120218'
union
SELECT... | Assuming all queries run against the same Contact table, your use of left outer join is effectively causing the third query to return *all* the contacts. Unless the second query can add contact\_ids not found in the Contact table, the end result is equivalent to:
```
select /* distinct, if not a pk */ contact_id from ... |
28,585,317 | What is the best way to join the following three select and to get non duplicated contact.id ?
Any idea ?
```
SELECT distinct ct.id
FROM [Customer].[dbo].[Contact] ct
left join [Customer].[dbo].[HN_Customer_ids] hnids
on ct.id = hnids.contact_id
left join [CustomerTransactions].[dbo].[Transaction_He... | 2015/02/18 | [
"https://Stackoverflow.com/questions/28585317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1562660/"
] | Use `union`. So:
```
SELECT ct.id
FROM [Customer].[dbo].[Contact] ct join
[Customer].[dbo].[HN_Customer_ids] hnids
on ct.id = hnids.contact_id join
[CustomerTransactions].[dbo].[Transaction_Header] trh
on trh.Customer_ID = hnids.HN_customer_id
WHERE trh.actual_transaction_date > '20120218'
UNION
SE... | Assuming all queries run against the same Contact table, your use of left outer join is effectively causing the third query to return *all* the contacts. Unless the second query can add contact\_ids not found in the Contact table, the end result is equivalent to:
```
select /* distinct, if not a pk */ contact_id from ... |
4,705,607 | In reference to Java, I would like to *statically* know the class name of the current class. A is the parent class of B. I would like to have a static String in A (parent class) which contains the class name of the current class, but when this static String is referenced in B (child class), it should contain the class ... | 2011/01/16 | [
"https://Stackoverflow.com/questions/4705607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/299080/"
] | The only way I know is the following:
create protected constructor that accepts String in parent class.
```
class Parent {
private final String className;
protected Parent(String className) {
this.className = className;
}
}
public class Child extends Parent {
public Child() {
super("C... | No, that's not possible. There's only one copy of the static String (per ClassLoader), but you can have multiple subclasses.
You can however have a static field per (sub-)class, and then use a method
```
public class Child extends Parent {
private static final String NAME = "some alias";
@Override
public St... |
4,705,607 | In reference to Java, I would like to *statically* know the class name of the current class. A is the parent class of B. I would like to have a static String in A (parent class) which contains the class name of the current class, but when this static String is referenced in B (child class), it should contain the class ... | 2011/01/16 | [
"https://Stackoverflow.com/questions/4705607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/299080/"
] | No, that's not possible. There's only one copy of the static String (per ClassLoader), but you can have multiple subclasses.
You can however have a static field per (sub-)class, and then use a method
```
public class Child extends Parent {
private static final String NAME = "some alias";
@Override
public St... | try this code although you could not do it using static variable
```
class Parent{
final String className;
public Parent(){
className=this.getClass().getName();
}
}
```
and do that for required subclasses |
4,705,607 | In reference to Java, I would like to *statically* know the class name of the current class. A is the parent class of B. I would like to have a static String in A (parent class) which contains the class name of the current class, but when this static String is referenced in B (child class), it should contain the class ... | 2011/01/16 | [
"https://Stackoverflow.com/questions/4705607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/299080/"
] | The only way I know is the following:
create protected constructor that accepts String in parent class.
```
class Parent {
private final String className;
protected Parent(String className) {
this.className = className;
}
}
public class Child extends Parent {
public Child() {
super("C... | try this code although you could not do it using static variable
```
class Parent{
final String className;
public Parent(){
className=this.getClass().getName();
}
}
```
and do that for required subclasses |
61,584,166 | How can I remove all backslashes from this string?
```
t1 <- "1\2\3\4\5"
```
Output:
```
"1\002\003\004\005"
```
desired output:
```
"1002003004005"
```
Thank you! | 2020/05/04 | [
"https://Stackoverflow.com/questions/61584166",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10167498/"
] | Cool, glad it worked! I also faced a similar issue. The entire default CSS that can be tweaked can be found in the Theming section here:
<https://rstudio.github.io/distill/website.html>
And then you can add this with:
```
output:
distill::distill_article:
css: styles.css
``` | Found my answer, added a .css file in the main index.Rmd, used the rendered html file and web browser to inspect the element to find the distill-site-nav element and changed the css that way. here is my .css file
```
.distill-site-nav {
color: #000000;
background-color: #FFA500;
}
``` |
66,890,593 | [my webpage at 595px](https://i.stack.imgur.com/VPXNP.png)
I'm using HTML, SASS & Bootstrap for the website. I've included the source code of the hero section. It worked perfectly fine until I started to look at the responsiveness. The webpage seems to get smaller than the actual screen size. You can check the screens... | 2021/03/31 | [
"https://Stackoverflow.com/questions/66890593",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14693691/"
] | You need to combine the `dfs` generated in the loop. You could add them to a list and then call `pd.concat` on that list.
```
import requests
from bs4 import BeautifulSoup
import pandas as pd
df = pd.read_excel('items_scraped.xlsx')
# data = []
urls = df.url.tolist()
dfs = []
for url_link in urls:
url = url_l... | Use
```
urls = df.url.tolist()
```
To create a list of URLs and then iterate through them using f string to insert each one into your base url |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | in our case this helped: **before saving** "new FK", firstly open "edit options" of "previously created FK", and **DO NOT CHANGE** anything then return to "newly created FK" edit options, save button magically activated | I just solved this, according to <https://www.pgadmin.org/docs/pgadmin4/4.19/foreign_key_dialog.html> the covering index warning is activated when the "Auto FK Index" is selected when creating the foreign key. This is enabled by default. I went through and unchecked it on each of the indexes on the table that was givin... |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | **Temporary workaround: Using pgAdmin**
***If you have a single foreign key:***
Click on edit to expand, and click on it again to collapse, save button should be re-enable again.
***If you have multiple foreign keys:***
Repeat on every foreign key entry, click edit and "un-edit" ***for every foreign key***, the Sav... | just type the foreign key index name ... few letters fki\_index\_name (if you want an index generated "auto FK index" or turn it off!
And yes it looks like a bug in pgadmin not postgresql |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | I can't reproduce your problem, as pgAdmin4 won't let me change anything about a constraint (other than its name) in the first place, so I can't get to the point where it would throw me an error like that. All the affordances to make changes are there, but they are all greyed out.
Also, PostgreSQL itself won't let you... | What worked in my case - if you **manually turn on "Validated?" option** on the newly created foreign key and open "edit" on the previously created foreign key, then the message disappears and you can save the constraint. Seems like some kind of bug. |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | What worked in my case - if you **manually turn on "Validated?" option** on the newly created foreign key and open "edit" on the previously created foreign key, then the message disappears and you can save the constraint. Seems like some kind of bug. | Try adding column using query tool:
```
ALTER TABLE x ADD COLUMN c INT NOT NULL
CONSTRAINT xy_fk_c REFERENCES y (a)
```
Where:
x will be current table name, c will be column that you want to be created, xy\_fk\_c will be foreign key name, y will be the reference of your foreign table and a will be the referencing co... |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | in our case this helped: **before saving** "new FK", firstly open "edit options" of "previously created FK", and **DO NOT CHANGE** anything then return to "newly created FK" edit options, save button magically activated | Here is my solution:
1. Table -> Property -> Constraints -> Foreign Key -> click delete icon for all foreign key.
2. Table -> Property -> Constraints -> Foreign Key -> Add again foreign key.
I guess you alter current FK or add new FK that causing this issue. |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | **Temporary workaround: Using pgAdmin**
***If you have a single foreign key:***
Click on edit to expand, and click on it again to collapse, save button should be re-enable again.
***If you have multiple foreign keys:***
Repeat on every foreign key entry, click edit and "un-edit" ***for every foreign key***, the Sav... | I just solved this, according to <https://www.pgadmin.org/docs/pgadmin4/4.19/foreign_key_dialog.html> the covering index warning is activated when the "Auto FK Index" is selected when creating the foreign key. This is enabled by default. I went through and unchecked it on each of the indexes on the table that was givin... |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | in our case this helped: **before saving** "new FK", firstly open "edit options" of "previously created FK", and **DO NOT CHANGE** anything then return to "newly created FK" edit options, save button magically activated | Try adding column using query tool:
```
ALTER TABLE x ADD COLUMN c INT NOT NULL
CONSTRAINT xy_fk_c REFERENCES y (a)
```
Where:
x will be current table name, c will be column that you want to be created, xy\_fk\_c will be foreign key name, y will be the reference of your foreign table and a will be the referencing co... |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | in our case this helped: **before saving** "new FK", firstly open "edit options" of "previously created FK", and **DO NOT CHANGE** anything then return to "newly created FK" edit options, save button magically activated | What worked in my case - if you **manually turn on "Validated?" option** on the newly created foreign key and open "edit" on the previously created foreign key, then the message disappears and you can save the constraint. Seems like some kind of bug. |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | What worked in my case - if you **manually turn on "Validated?" option** on the newly created foreign key and open "edit" on the previously created foreign key, then the message disappears and you can save the constraint. Seems like some kind of bug. | I had the same error. The problem was that a I had another foreign key with the same name in other table. I think postgres tracks the covering index and the name of the foreign key and don't allow the same name. So you have to use another name. |
61,441,186 | I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?
The table consists of only two columns:
[](https://i.stack.imgur.com/Thy7s.png)
The foreign ke... | 2020/04/26 | [
"https://Stackoverflow.com/questions/61441186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244845/"
] | Here is my solution:
1. Table -> Property -> Constraints -> Foreign Key -> click delete icon for all foreign key.
2. Table -> Property -> Constraints -> Foreign Key -> Add again foreign key.
I guess you alter current FK or add new FK that causing this issue. | just type the foreign key index name ... few letters fki\_index\_name (if you want an index generated "auto FK index" or turn it off!
And yes it looks like a bug in pgadmin not postgresql |
37,470 | I am using `DCGAN` `( Deep Convolution GAN )` to generate images. However, I want to run it on embedded devices, such as `Intel Movidius`or `Jetson`.
But, while going through several internet articles, I came to know that embedded devices are only used for inference in case of deep learning.
I have a few questions :... | 2018/08/27 | [
"https://datascience.stackexchange.com/questions/37470",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/44477/"
] | 1. Mini introduction to [Generative Adversarial Networks](https://en.wikipedia.org/wiki/Generative_adversarial_network) (GANs)
------------------------------------------------------------------------------------------------------------------------------
During the training phase, a GAN model essentially makes two neur... | >
> GAN is basically a generative network. How can it have inference ?
> Will the inference and training be same thing for GAN ?
>
>
>
Well, GANs are essentially two neural networks in series. One is called the **Generator** and the other is called the **Discriminator**. You need to train these two networks seque... |
51,147,828 | **Task Description**
Construct a function objOfMatches that accepts two arrays and a callback. objOfMatches will build an object and return it. To build the object, objOfMatches will test each element of the first array using the callback to see if the output matches the corresponding element (by index) of the second a... | 2018/07/03 | [
"https://Stackoverflow.com/questions/51147828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2541259/"
] | You are not really describing what your problem is, but I guess you are not getting the result you expect. Instead of creating a new object in the loop, you should be assigning to the object you created earlier:
```
obj[outray1[a]] = outray2[a];
``` | [`Array.reduce()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) is pretty standard javascript for taking an array and returning something else like an object. You don't really need to test for the longest array. You just need to make sure you don't handle a possible `un... |
51,147,828 | **Task Description**
Construct a function objOfMatches that accepts two arrays and a callback. objOfMatches will build an object and return it. To build the object, objOfMatches will test each element of the first array using the callback to see if the output matches the corresponding element (by index) of the second a... | 2018/07/03 | [
"https://Stackoverflow.com/questions/51147828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2541259/"
] | You are not really describing what your problem is, but I guess you are not getting the result you expect. Instead of creating a new object in the loop, you should be assigning to the object you created earlier:
```
obj[outray1[a]] = outray2[a];
``` | here is mine :-)
```
function objOfMatches(arr1, arr2, cb) {
const len = Math.max(arr1.length, arr2.length);
const oResult = {};
for (let i = 0; i < len; i++) {
if (cb(arr1[i]) === arr2[i]) {
oResult[arr1[i]] = arr2[i];
}
}
return oResult;
}
var arr1 = ['hi', 'howdy', 'bye', 'later', 'hell... |
51,147,828 | **Task Description**
Construct a function objOfMatches that accepts two arrays and a callback. objOfMatches will build an object and return it. To build the object, objOfMatches will test each element of the first array using the callback to see if the output matches the corresponding element (by index) of the second a... | 2018/07/03 | [
"https://Stackoverflow.com/questions/51147828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2541259/"
] | Here you go.
Below is working code:
```js
var arr1 = ['hi', 'howdy', 'bye', 'later', 'hello'];
var arr2 = ['HI', 'Howdy', 'BYE', 'later', 'HELLO'];
var obj = {};
for (var i = 0; i < arr1.length; i++) {
if (arr1[i] === arr2[i].toLowerCase()) {
obj[arr1[i]] = arr2[i];
}
}
console.log(obj);
``` | [`Array.reduce()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) is pretty standard javascript for taking an array and returning something else like an object. You don't really need to test for the longest array. You just need to make sure you don't handle a possible `un... |
51,147,828 | **Task Description**
Construct a function objOfMatches that accepts two arrays and a callback. objOfMatches will build an object and return it. To build the object, objOfMatches will test each element of the first array using the callback to see if the output matches the corresponding element (by index) of the second a... | 2018/07/03 | [
"https://Stackoverflow.com/questions/51147828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2541259/"
] | Here you go.
Below is working code:
```js
var arr1 = ['hi', 'howdy', 'bye', 'later', 'hello'];
var arr2 = ['HI', 'Howdy', 'BYE', 'later', 'HELLO'];
var obj = {};
for (var i = 0; i < arr1.length; i++) {
if (arr1[i] === arr2[i].toLowerCase()) {
obj[arr1[i]] = arr2[i];
}
}
console.log(obj);
``` | here is mine :-)
```
function objOfMatches(arr1, arr2, cb) {
const len = Math.max(arr1.length, arr2.length);
const oResult = {};
for (let i = 0; i < len; i++) {
if (cb(arr1[i]) === arr2[i]) {
oResult[arr1[i]] = arr2[i];
}
}
return oResult;
}
var arr1 = ['hi', 'howdy', 'bye', 'later', 'hell... |
1,465,769 | I'd like to run an appengine app on a subdomain
like something.no-ip.org instead of something.appspot.com
is this doable? If so, can you please help me understand? :)
Thank you so much for your help! | 2009/09/23 | [
"https://Stackoverflow.com/questions/1465769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124736/"
] | You should be able to do this, I haven't tried myself.
The steps you would follow are:
1. register something.no-ip.org with no-ip.org
2. sign up for something.no-ip.org with google apps standard
3. create your www.something.no-ip.org cname
4. in the google apps domain manager, enable google app engine for www.somethi... | No, you can't. <http://code.google.com/appengine/articles/domains.html> clearly states that "To begin, you'll need to sign up for Google Apps. If you don't already own your domain, you can use Google Apps to register it." -- something.no-ip.org is a subdomain of no-ip.org, not a domain. |
1,465,769 | I'd like to run an appengine app on a subdomain
like something.no-ip.org instead of something.appspot.com
is this doable? If so, can you please help me understand? :)
Thank you so much for your help! | 2009/09/23 | [
"https://Stackoverflow.com/questions/1465769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124736/"
] | You can't do this, because you don't own no-ip.org. In order to use a domain with App Engine, you have to set up Google Apps on the domain, and in order to do that, you must own the domain.
As mentioned in the comments, buying your own domain is your best option. | No, you can't. <http://code.google.com/appengine/articles/domains.html> clearly states that "To begin, you'll need to sign up for Google Apps. If you don't already own your domain, you can use Google Apps to register it." -- something.no-ip.org is a subdomain of no-ip.org, not a domain. |
1,465,769 | I'd like to run an appengine app on a subdomain
like something.no-ip.org instead of something.appspot.com
is this doable? If so, can you please help me understand? :)
Thank you so much for your help! | 2009/09/23 | [
"https://Stackoverflow.com/questions/1465769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124736/"
] | You absolutely can run App Engine apps on your own domain. You need to have previously installed Google Apps for your domain:
```
http://www.google.com/a/cpanel/domain/new
```
After you do that, here are the steps:
1. Create your App Engine app and upload it. You will get a default site on appid.appspot.com.
2. Log... | No, you can't. <http://code.google.com/appengine/articles/domains.html> clearly states that "To begin, you'll need to sign up for Google Apps. If you don't already own your domain, you can use Google Apps to register it." -- something.no-ip.org is a subdomain of no-ip.org, not a domain. |
1,465,769 | I'd like to run an appengine app on a subdomain
like something.no-ip.org instead of something.appspot.com
is this doable? If so, can you please help me understand? :)
Thank you so much for your help! | 2009/09/23 | [
"https://Stackoverflow.com/questions/1465769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124736/"
] | I believe <http://support.google.com/a/bin/answer.py?hl=en&answer=47945> will answer this question! Yes, you can use no-ip. Still researching this, but it is by using CNAME. I'm looking for a way to use my no-ip subdomain as my email (ex. xxxxxx@xxxx.hopto.org). | No, you can't. <http://code.google.com/appengine/articles/domains.html> clearly states that "To begin, you'll need to sign up for Google Apps. If you don't already own your domain, you can use Google Apps to register it." -- something.no-ip.org is a subdomain of no-ip.org, not a domain. |
1,465,769 | I'd like to run an appengine app on a subdomain
like something.no-ip.org instead of something.appspot.com
is this doable? If so, can you please help me understand? :)
Thank you so much for your help! | 2009/09/23 | [
"https://Stackoverflow.com/questions/1465769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124736/"
] | I believe <http://support.google.com/a/bin/answer.py?hl=en&answer=47945> will answer this question! Yes, you can use no-ip. Still researching this, but it is by using CNAME. I'm looking for a way to use my no-ip subdomain as my email (ex. xxxxxx@xxxx.hopto.org). | You should be able to do this, I haven't tried myself.
The steps you would follow are:
1. register something.no-ip.org with no-ip.org
2. sign up for something.no-ip.org with google apps standard
3. create your www.something.no-ip.org cname
4. in the google apps domain manager, enable google app engine for www.somethi... |
1,465,769 | I'd like to run an appengine app on a subdomain
like something.no-ip.org instead of something.appspot.com
is this doable? If so, can you please help me understand? :)
Thank you so much for your help! | 2009/09/23 | [
"https://Stackoverflow.com/questions/1465769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124736/"
] | I believe <http://support.google.com/a/bin/answer.py?hl=en&answer=47945> will answer this question! Yes, you can use no-ip. Still researching this, but it is by using CNAME. I'm looking for a way to use my no-ip subdomain as my email (ex. xxxxxx@xxxx.hopto.org). | You can't do this, because you don't own no-ip.org. In order to use a domain with App Engine, you have to set up Google Apps on the domain, and in order to do that, you must own the domain.
As mentioned in the comments, buying your own domain is your best option. |
1,465,769 | I'd like to run an appengine app on a subdomain
like something.no-ip.org instead of something.appspot.com
is this doable? If so, can you please help me understand? :)
Thank you so much for your help! | 2009/09/23 | [
"https://Stackoverflow.com/questions/1465769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124736/"
] | I believe <http://support.google.com/a/bin/answer.py?hl=en&answer=47945> will answer this question! Yes, you can use no-ip. Still researching this, but it is by using CNAME. I'm looking for a way to use my no-ip subdomain as my email (ex. xxxxxx@xxxx.hopto.org). | You absolutely can run App Engine apps on your own domain. You need to have previously installed Google Apps for your domain:
```
http://www.google.com/a/cpanel/domain/new
```
After you do that, here are the steps:
1. Create your App Engine app and upload it. You will get a default site on appid.appspot.com.
2. Log... |
34,141,817 | [](https://i.stack.imgur.com/KCaVf.png)
Any ideas how to implement this kind of view in Android **RelativeLayout**?
Each of the hashtags should be a separate **TextView**. | 2015/12/07 | [
"https://Stackoverflow.com/questions/34141817",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1627952/"
] | If you don't want to write it, you can use [HashtagView](https://github.com/greenfrvr/hashtag-view) library for that. | I would suggest to use `TableLayout` - `TableRow`(with textview as views), as you are gonna add tags in run time, you can decide how many `textview` needs to be added in a row, and add multiple rows. |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | You could use SysInternal's [PsExec](http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx). | IMO, in your case you can try this:
>
> 1. Map the shared folder to a drive or folder on your machine. ([here's
> how](http://compnetworking.about.com/od/windowsxpnetworking/ht/mapnetworkdrive.htm))
> 2. Access the mapped drive/folder as you normally would local files.
>
>
>
Nothing needs to be installed. No ser... |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | You could use SysInternal's [PsExec](http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx). | I use the little utility which comes with [PureMPI.net](http://www.purempi.net/) called `execcmd.exe`. Its syntax is as follows:
```
execcmd \\yourremoteserver <your command here>
```
Doesn't get any simpler than this :) |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | You could use SysInternal's [PsExec](http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx). | ```
try
{
string AppPath = "\\\\spri11U1118\\SampleBatch\\Bin\\";
string strFilePath = AppPath + "ABCED120D_XXX.bat";
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = strFilePath;
string pwd = "s44erver";
proc.StartInfo.Domain = "abcd";
proc.Sta... |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | Another solution is to use [WMI.NET or Windows Management Instrumentation](http://msdn.microsoft.com/en-us/library/bb404655.aspx).
>
> Using the .NET Framework namespace System.Management, you can automate administrative tasks using Windows Management Instrumentation (WMI).
>
>
>
**Code Sample**
```
using Syste... | You could use SysInternal's [PsExec](http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx). |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | IMO, in your case you can try this:
>
> 1. Map the shared folder to a drive or folder on your machine. ([here's
> how](http://compnetworking.about.com/od/windowsxpnetworking/ht/mapnetworkdrive.htm))
> 2. Access the mapped drive/folder as you normally would local files.
>
>
>
Nothing needs to be installed. No ser... | I use the little utility which comes with [PureMPI.net](http://www.purempi.net/) called `execcmd.exe`. Its syntax is as follows:
```
execcmd \\yourremoteserver <your command here>
```
Doesn't get any simpler than this :) |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | IMO, in your case you can try this:
>
> 1. Map the shared folder to a drive or folder on your machine. ([here's
> how](http://compnetworking.about.com/od/windowsxpnetworking/ht/mapnetworkdrive.htm))
> 2. Access the mapped drive/folder as you normally would local files.
>
>
>
Nothing needs to be installed. No ser... | ```
try
{
string AppPath = "\\\\spri11U1118\\SampleBatch\\Bin\\";
string strFilePath = AppPath + "ABCED120D_XXX.bat";
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = strFilePath;
string pwd = "s44erver";
proc.StartInfo.Domain = "abcd";
proc.Sta... |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | Another solution is to use [WMI.NET or Windows Management Instrumentation](http://msdn.microsoft.com/en-us/library/bb404655.aspx).
>
> Using the .NET Framework namespace System.Management, you can automate administrative tasks using Windows Management Instrumentation (WMI).
>
>
>
**Code Sample**
```
using Syste... | IMO, in your case you can try this:
>
> 1. Map the shared folder to a drive or folder on your machine. ([here's
> how](http://compnetworking.about.com/od/windowsxpnetworking/ht/mapnetworkdrive.htm))
> 2. Access the mapped drive/folder as you normally would local files.
>
>
>
Nothing needs to be installed. No ser... |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | ```
try
{
string AppPath = "\\\\spri11U1118\\SampleBatch\\Bin\\";
string strFilePath = AppPath + "ABCED120D_XXX.bat";
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = strFilePath;
string pwd = "s44erver";
proc.StartInfo.Domain = "abcd";
proc.Sta... | I use the little utility which comes with [PureMPI.net](http://www.purempi.net/) called `execcmd.exe`. Its syntax is as follows:
```
execcmd \\yourremoteserver <your command here>
```
Doesn't get any simpler than this :) |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | Another solution is to use [WMI.NET or Windows Management Instrumentation](http://msdn.microsoft.com/en-us/library/bb404655.aspx).
>
> Using the .NET Framework namespace System.Management, you can automate administrative tasks using Windows Management Instrumentation (WMI).
>
>
>
**Code Sample**
```
using Syste... | I use the little utility which comes with [PureMPI.net](http://www.purempi.net/) called `execcmd.exe`. Its syntax is as follows:
```
execcmd \\yourremoteserver <your command here>
```
Doesn't get any simpler than this :) |
428,276 | I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# can be used. Nothing can be installed in the server. | 2009/01/09 | [
"https://Stackoverflow.com/questions/428276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53179/"
] | Another solution is to use [WMI.NET or Windows Management Instrumentation](http://msdn.microsoft.com/en-us/library/bb404655.aspx).
>
> Using the .NET Framework namespace System.Management, you can automate administrative tasks using Windows Management Instrumentation (WMI).
>
>
>
**Code Sample**
```
using Syste... | ```
try
{
string AppPath = "\\\\spri11U1118\\SampleBatch\\Bin\\";
string strFilePath = AppPath + "ABCED120D_XXX.bat";
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = strFilePath;
string pwd = "s44erver";
proc.StartInfo.Domain = "abcd";
proc.Sta... |
186,475 | When I discuss something in the meeting,
I said 'We can use something like XXX to check errors".
What I meant was, not XXX, but similar thing that can serve our purpose better. But, it seems others understood I meant 'Let's use XXX'.
Because others said, 'No, let's not use xxx'. So I had to say 'No, not XXX, but some... | 2018/11/24 | [
"https://ell.stackexchange.com/questions/186475",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/69392/"
] | **with** can introduce the tool or implement (broadly understood) that you are using, or the thing or situation that requires help:
>
> I want to help you with that fallen tree with my chain saw.
>
>
> I want to help you with your startup company with my business acumen.
>
>
> They helped the town with its recove... | Perhaps a phrase along the lines of:
>
> Using my expertise, I want to help you.
>
>
>
>
> With my expertise, I want to help you.
>
>
>
>
> I would like to offer my expertise to help you.
>
>
> |
186,475 | When I discuss something in the meeting,
I said 'We can use something like XXX to check errors".
What I meant was, not XXX, but similar thing that can serve our purpose better. But, it seems others understood I meant 'Let's use XXX'.
Because others said, 'No, let's not use xxx'. So I had to say 'No, not XXX, but some... | 2018/11/24 | [
"https://ell.stackexchange.com/questions/186475",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/69392/"
] | **with** can introduce the tool or implement (broadly understood) that you are using, or the thing or situation that requires help:
>
> I want to help you with that fallen tree with my chain saw.
>
>
> I want to help you with your startup company with my business acumen.
>
>
> They helped the town with its recove... | Just to be very clear:
**When you say "I want to help you with...," the phrase that follows is what the person needs help with, not what you are going to use to help them.**
Your last sentence doesn't make sense because the other person doesn't possess your expertise, or need help with it. They need help stemming FR... |
16,223,852 | I've got 2 Fragments that have a couple of EditText boxes on. They are both laid out similar, however its very strange that 1 will tab between the EditText fields, but the other won't.
This is the one i'm having problems with:
```
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:to... | 2013/04/25 | [
"https://Stackoverflow.com/questions/16223852",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1077601/"
] | As @Delyan suggests, you should be able to add an XML attribute to control this behavior. However, you may want to try using one of the other `android:nextFocus____` attributes, such as `android:nextFocusForward`. A full list of these attributes is available [here](http://developer.android.com/reference/android/view/Vi... | You can use `android:nextFocusDown` to override the tab order. In general, tab looks down, shift+tab looks up and the directional keys/trackball trigger the left/right focus lookup. |
303,982 | How to configure a chat timeout message for the customer if he/she didnot reply in a given timeframe.Also how to set that timeframe on the customer end? | 2020/04/27 | [
"https://salesforce.stackexchange.com/questions/303982",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/77031/"
] | The only actual documentation on the Content Builder API calls is the official [REST API docs](https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/routes.htm) (and their '[in development version](https://developer.salesforce.com/docs/api-explorer/sfmc/auth/getyour_subdomain-auth-marketingcl... | Moving from comment.
If you follow @Zuzanna blog (<https://sfmarketing.cloud/2020/02/29/create-a-cloudpages-form-with-an-image-file-upload-option/>)
There will be a section called '//make api call to create asset'
If you would like to add the customer key, then add the **customer key** from the 3rd party system belo... |
69,222,978 | Hi below is the html code,
```css
.wrapper {
min-width: 0%;
max-width: 100%;
line-height: 21px;
position:relative;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
max-height: 50px;
text-align:center;
}
.iconwrapper {
min-width:0;
}
```
```html
<div class="wrappe... | 2021/09/17 | [
"https://Stackoverflow.com/questions/69222978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16104900/"
] | I suspect that what is happening is that AWS SSM is port forwarding to localhost and is bound to the loopback adaptor.
If I run aws ssm port forwarding, I am able to access the port on the localhost and not via my machine IP:Port.
So when docker tries to access the port via its own natted IP it is unable to connect t... | If I understand correctly, you try to connect to a webserver from your container host and this works, but when logged into the docker container itself you cannot reach it?
If this is what you meant, It could be related to the fact that containers have a different network interface from the host and thus different secu... |
374,326 | I'm using the `wp_list_categories()` function which generates an unordered list with list items and anchor tags for the categories. Is there any way to add HTML attributes to the `<a>` tags which hold the category links?
I'd like to add a `title` attribute which is the same as the category, and a `class` attribute, bu... | 2020/09/05 | [
"https://wordpress.stackexchange.com/questions/374326",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/106972/"
] | ### Custom Walker
The function [wp\_list\_categories](https://developer.wordpress.org/reference/functions/wp_list_categories/) accepts a (custom) walker. That gives you the possibility to add a custom function that adds class and title attribute to the output. The function has no filter hook so that you have not the o... | If you only wanted to output the category name as the title attribute, you could do that simply by entering the category name in the Category Description field because the default output is to use that field as the title attribute UNLESS you set that flag in $args to 0 (false - see use\_desc\_for\_title the default is ... |
374,326 | I'm using the `wp_list_categories()` function which generates an unordered list with list items and anchor tags for the categories. Is there any way to add HTML attributes to the `<a>` tags which hold the category links?
I'd like to add a `title` attribute which is the same as the category, and a `class` attribute, bu... | 2020/09/05 | [
"https://wordpress.stackexchange.com/questions/374326",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/106972/"
] | The default walker used by `wp_list_categories()` ([`Walker_Category`](https://developer.wordpress.org/reference/classes/walker_category/)) has a hook (a filter hook) named [`category_list_link_attributes`](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/) which you can use to add custom `... | ### Custom Walker
The function [wp\_list\_categories](https://developer.wordpress.org/reference/functions/wp_list_categories/) accepts a (custom) walker. That gives you the possibility to add a custom function that adds class and title attribute to the output. The function has no filter hook so that you have not the o... |
374,326 | I'm using the `wp_list_categories()` function which generates an unordered list with list items and anchor tags for the categories. Is there any way to add HTML attributes to the `<a>` tags which hold the category links?
I'd like to add a `title` attribute which is the same as the category, and a `class` attribute, bu... | 2020/09/05 | [
"https://wordpress.stackexchange.com/questions/374326",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/106972/"
] | The default walker used by `wp_list_categories()` ([`Walker_Category`](https://developer.wordpress.org/reference/classes/walker_category/)) has a hook (a filter hook) named [`category_list_link_attributes`](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/) which you can use to add custom `... | If you only wanted to output the category name as the title attribute, you could do that simply by entering the category name in the Category Description field because the default output is to use that field as the title attribute UNLESS you set that flag in $args to 0 (false - see use\_desc\_for\_title the default is ... |
30,006 | My question seems trivial but I have a particular issue I don't understand. If there's a price ceiling above the price equilibrium, the customers can still use the ceiling as leverage when negotiating, and thus negotiate a lower price. Then the ceiling does have an effect. | 2019/07/01 | [
"https://economics.stackexchange.com/questions/30006",
"https://economics.stackexchange.com",
"https://economics.stackexchange.com/users/23575/"
] | You are completely right. If in your setup negotiating is an important feature of how prices are set, then even a non-binding price ceiling matters. Search models in labor economics became popular for showing a feature like this. Not with a price ceiling, but with a price floor. In particular when we study minimum wage... | In a rational expectation equilibrium (strategic as well as competitive), certainly a non-binding price ceiling has no effect on equilibrium, as agents correctly anticipates price. |
13,609,846 | this code:
```
@Service
public class IvsImport {
private Logger logger = Logger.getLogger(IvsImport.class);
@Autowired
FileReader fileReader;
@Autowired
ValueProcessorProvider provider;
CSVEntryParser<IvsBerichtPojo> entryParser = new AnnotationEntryParser<IvsBerichtPojo>(IvsBerichtPojo.c... | 2012/11/28 | [
"https://Stackoverflow.com/questions/13609846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/628918/"
] | You cannot write code outside method. You need method to write executable code.
Put your while loop into any method and see that it is compiled. | because your while loop exists out of any other methods. You must put it into a method. |
13,609,846 | this code:
```
@Service
public class IvsImport {
private Logger logger = Logger.getLogger(IvsImport.class);
@Autowired
FileReader fileReader;
@Autowired
ValueProcessorProvider provider;
CSVEntryParser<IvsBerichtPojo> entryParser = new AnnotationEntryParser<IvsBerichtPojo>(IvsBerichtPojo.c... | 2012/11/28 | [
"https://Stackoverflow.com/questions/13609846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/628918/"
] | You cannot write code outside method. You need method to write executable code.
Put your while loop into any method and see that it is compiled. | you cannot write such code outside the method/constructor. you can only declare variables at that level. put the code with the while loop inside a **method body** and your compiler error would disappear .
More to add, you can only write methods/constructors/ initialization blocks/variable declaration inside a class bo... |
13,609,846 | this code:
```
@Service
public class IvsImport {
private Logger logger = Logger.getLogger(IvsImport.class);
@Autowired
FileReader fileReader;
@Autowired
ValueProcessorProvider provider;
CSVEntryParser<IvsBerichtPojo> entryParser = new AnnotationEntryParser<IvsBerichtPojo>(IvsBerichtPojo.c... | 2012/11/28 | [
"https://Stackoverflow.com/questions/13609846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/628918/"
] | You cannot write code outside method. You need method to write executable code.
Put your while loop into any method and see that it is compiled. | Write your code in a method because a method is required to execute that code. Hence put your while loop in any method.
Thanks!! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.