qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
1,025,656
I have a bunch of live ISO files like [GParted](https://gparted.org/livecd.php), [CloneZilla](https://clonezilla.org/downloads.php), [Boot-Repair](https://sourceforge.net/projects/boot-repair-cd/files/), [Ubuntu 14.04 32 bit](http://releases.ubuntu.com/16.04/ubuntu-16.04.4-desktop-i386.iso), ... downloaded in `/opt` an...
2018/04/16
[ "https://askubuntu.com/questions/1025656", "https://askubuntu.com", "https://askubuntu.com/users/344926/" ]
### There is a [bug in grub 2.04](https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851311) so ensure you have a prior or later version. Well, the basics for adding an ISO file to grub are the same for an UEFI as for a BIOS machine: edit `/etc/grub.d/40_custom` and add a `menuentry` item (GParted is used in this e...
**SIMPLE mkusb ISO multibooter** If you don't need multi-persistence, it is easy to multiboot operating system ISO's on a mkusb flash drive. Use mkusb to make a Persistent USB drive using a default OS of your choice, <https://help.ubuntu.com/community/mkusb> Make a folder in the usbdata partition sdx1, named ISOs. ...
1,025,656
I have a bunch of live ISO files like [GParted](https://gparted.org/livecd.php), [CloneZilla](https://clonezilla.org/downloads.php), [Boot-Repair](https://sourceforge.net/projects/boot-repair-cd/files/), [Ubuntu 14.04 32 bit](http://releases.ubuntu.com/16.04/ubuntu-16.04.4-desktop-i386.iso), ... downloaded in `/opt` an...
2018/04/16
[ "https://askubuntu.com/questions/1025656", "https://askubuntu.com", "https://askubuntu.com/users/344926/" ]
An alternative is to just add a configfile to 40\_custom like this: ``` menuentry 'Live ISOs on SSD' { configfile (hd0,3)/ISO/livecdimage.cfg } menuentry 'Live ISOs on HDD (boot on SSD)' { configfile (hd1,3)/ISO/livecdimage.cfg } ``` I do this as when I update an ISO, I invariably forget to run `sudo update-grub`...
**SIMPLE mkusb ISO multibooter** If you don't need multi-persistence, it is easy to multiboot operating system ISO's on a mkusb flash drive. Use mkusb to make a Persistent USB drive using a default OS of your choice, <https://help.ubuntu.com/community/mkusb> Make a folder in the usbdata partition sdx1, named ISOs. ...
1,025,656
I have a bunch of live ISO files like [GParted](https://gparted.org/livecd.php), [CloneZilla](https://clonezilla.org/downloads.php), [Boot-Repair](https://sourceforge.net/projects/boot-repair-cd/files/), [Ubuntu 14.04 32 bit](http://releases.ubuntu.com/16.04/ubuntu-16.04.4-desktop-i386.iso), ... downloaded in `/opt` an...
2018/04/16
[ "https://askubuntu.com/questions/1025656", "https://askubuntu.com", "https://askubuntu.com/users/344926/" ]
Three easy steps ================ to add ISO to the grub menu and boot from it. First, install `grml-rescueboot` ================================ Open a terminal and enter: ``` sudo apt install grml-rescueboot ``` Second, move the iso files to `/boot/grml/` =========================================== In the same...
This may be the multiboot solution that you need. <https://www.ventoy.net/en/index.html> This bootable USB maker creates two partitions in a USB drive. One is 32MB FAT 32 EFI partition. Another one is exfat partition that is equal in size to the rest of the USB drive. You can copy any number of ISOs including Windows...
1,025,656
I have a bunch of live ISO files like [GParted](https://gparted.org/livecd.php), [CloneZilla](https://clonezilla.org/downloads.php), [Boot-Repair](https://sourceforge.net/projects/boot-repair-cd/files/), [Ubuntu 14.04 32 bit](http://releases.ubuntu.com/16.04/ubuntu-16.04.4-desktop-i386.iso), ... downloaded in `/opt` an...
2018/04/16
[ "https://askubuntu.com/questions/1025656", "https://askubuntu.com", "https://askubuntu.com/users/344926/" ]
### There is a [bug in grub 2.04](https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851311) so ensure you have a prior or later version. Well, the basics for adding an ISO file to grub are the same for an UEFI as for a BIOS machine: edit `/etc/grub.d/40_custom` and add a `menuentry` item (GParted is used in this e...
An alternative is to just add a configfile to 40\_custom like this: ``` menuentry 'Live ISOs on SSD' { configfile (hd0,3)/ISO/livecdimage.cfg } menuentry 'Live ISOs on HDD (boot on SSD)' { configfile (hd1,3)/ISO/livecdimage.cfg } ``` I do this as when I update an ISO, I invariably forget to run `sudo update-grub`...
1,025,656
I have a bunch of live ISO files like [GParted](https://gparted.org/livecd.php), [CloneZilla](https://clonezilla.org/downloads.php), [Boot-Repair](https://sourceforge.net/projects/boot-repair-cd/files/), [Ubuntu 14.04 32 bit](http://releases.ubuntu.com/16.04/ubuntu-16.04.4-desktop-i386.iso), ... downloaded in `/opt` an...
2018/04/16
[ "https://askubuntu.com/questions/1025656", "https://askubuntu.com", "https://askubuntu.com/users/344926/" ]
**mkusb MULTIBOOT HACK** Mkusb makes a great base for custom boot drive projects because of its abilities with both BIOS and UEFI. This hack boots multiple ISO files including the Windows installer, and has a grub2 menu. Grub2 menuentries for most OS are available using Google Search and are beyond the scope of thi...
This may be the multiboot solution that you need. <https://www.ventoy.net/en/index.html> This bootable USB maker creates two partitions in a USB drive. One is 32MB FAT 32 EFI partition. Another one is exfat partition that is equal in size to the rest of the USB drive. You can copy any number of ISOs including Windows...
20,983,291
I'm looking over someone's codes and wondering about the difference between: ``` def blah @hello ||= [1,2,3].collect{|x| x+1} end ``` and ``` def blah @hello = [1,2,3].collect{|x| x+1} end ``` I understand that `||=` means "or equal", but why do we need it? An example would be great. Also, for the `collect...
2014/01/07
[ "https://Stackoverflow.com/questions/20983291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393426/" ]
`||=` does nothing if the variable has been assigned a value (other than `false` or `nil`): ``` irb(main):001:0> blah ||= 'foo' => "foo" irb(main):002:0> blah ||= 'bar' => "foo" irb(main):003:0> puts blah foo => nil irb(main):004:0> blah = nil => nil irb(main):005:0> blah ||= 'bar' => "bar" irb(main):006:0> puts blah ...
> > a = [1,2,4,5] and I wanted to find the array that contains integers that are greater than 2, > > > Here we go using [`Array#select`](http://www.ruby-doc.org/core-2.1.0/Array.html#method-i-select): ``` a.select{|e| e > 2 } # => [4,5] ``` Explanation of the part `@hello ||= [1,2,3].collect{|x| x+1}` can be f...
20,983,291
I'm looking over someone's codes and wondering about the difference between: ``` def blah @hello ||= [1,2,3].collect{|x| x+1} end ``` and ``` def blah @hello = [1,2,3].collect{|x| x+1} end ``` I understand that `||=` means "or equal", but why do we need it? An example would be great. Also, for the `collect...
2014/01/07
[ "https://Stackoverflow.com/questions/20983291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393426/" ]
> > a = [1,2,4,5] and I wanted to find the array that contains integers that are greater than 2, > > > Here we go using [`Array#select`](http://www.ruby-doc.org/core-2.1.0/Array.html#method-i-select): ``` a.select{|e| e > 2 } # => [4,5] ``` Explanation of the part `@hello ||= [1,2,3].collect{|x| x+1}` can be f...
The page [What does ||= (or-equals) mean in Ruby?](https://stackoverflow.com/questions/995593/what-does-or-equals-mean-in-ruby) does not mention the "proxy design pattern", which it is in a nutshell. The first time you call that line, the .select stuff gets evaluated. The second time, the system re-uses the `@hello` v...
20,983,291
I'm looking over someone's codes and wondering about the difference between: ``` def blah @hello ||= [1,2,3].collect{|x| x+1} end ``` and ``` def blah @hello = [1,2,3].collect{|x| x+1} end ``` I understand that `||=` means "or equal", but why do we need it? An example would be great. Also, for the `collect...
2014/01/07
[ "https://Stackoverflow.com/questions/20983291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393426/" ]
> > a = [1,2,4,5] and I wanted to find the array that contains integers that are greater than 2, > > > Here we go using [`Array#select`](http://www.ruby-doc.org/core-2.1.0/Array.html#method-i-select): ``` a.select{|e| e > 2 } # => [4,5] ``` Explanation of the part `@hello ||= [1,2,3].collect{|x| x+1}` can be f...
Ok, so ||= means if you already have a previous value for your variable it will keep it else, if it doesn't have any pre-assigned value, then it will take whatever value you set it equal to. EX: ``` @hello = [1] def blah @hello ||=[1,2,3] end blah @hello => [1], not [1,2,3] ```
20,983,291
I'm looking over someone's codes and wondering about the difference between: ``` def blah @hello ||= [1,2,3].collect{|x| x+1} end ``` and ``` def blah @hello = [1,2,3].collect{|x| x+1} end ``` I understand that `||=` means "or equal", but why do we need it? An example would be great. Also, for the `collect...
2014/01/07
[ "https://Stackoverflow.com/questions/20983291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393426/" ]
`||=` does nothing if the variable has been assigned a value (other than `false` or `nil`): ``` irb(main):001:0> blah ||= 'foo' => "foo" irb(main):002:0> blah ||= 'bar' => "foo" irb(main):003:0> puts blah foo => nil irb(main):004:0> blah = nil => nil irb(main):005:0> blah ||= 'bar' => "bar" irb(main):006:0> puts blah ...
The page [What does ||= (or-equals) mean in Ruby?](https://stackoverflow.com/questions/995593/what-does-or-equals-mean-in-ruby) does not mention the "proxy design pattern", which it is in a nutshell. The first time you call that line, the .select stuff gets evaluated. The second time, the system re-uses the `@hello` v...
20,983,291
I'm looking over someone's codes and wondering about the difference between: ``` def blah @hello ||= [1,2,3].collect{|x| x+1} end ``` and ``` def blah @hello = [1,2,3].collect{|x| x+1} end ``` I understand that `||=` means "or equal", but why do we need it? An example would be great. Also, for the `collect...
2014/01/07
[ "https://Stackoverflow.com/questions/20983291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393426/" ]
`||=` does nothing if the variable has been assigned a value (other than `false` or `nil`): ``` irb(main):001:0> blah ||= 'foo' => "foo" irb(main):002:0> blah ||= 'bar' => "foo" irb(main):003:0> puts blah foo => nil irb(main):004:0> blah = nil => nil irb(main):005:0> blah ||= 'bar' => "bar" irb(main):006:0> puts blah ...
Ok, so ||= means if you already have a previous value for your variable it will keep it else, if it doesn't have any pre-assigned value, then it will take whatever value you set it equal to. EX: ``` @hello = [1] def blah @hello ||=[1,2,3] end blah @hello => [1], not [1,2,3] ```
2,273,412
How can i find necessary and sufficient condition for this system to have a solution: $x \equiv u\_1(mod \ m\_1)$ $...$ $x \equiv u\_n(mod \ m\_n)$
2017/05/09
[ "https://math.stackexchange.com/questions/2273412", "https://math.stackexchange.com", "https://math.stackexchange.com/users/419649/" ]
The Chinese remainder theorem states that if the $m\_i$ are co-prime a solution will exist. So it is sufficient that the $m\_i$ be co-prime. If $x \equiv u\_i \mod m\_i$ and $x \equiv u\_j \mod m\_j$ and $\gcd(m\_i, m\_j) = d \ne 1$ then $x = k\_im\_i + u\_i = k\_jm\_j + u\_j$ so $u\_i - u\_m = d(k\_im\_i/d - k\_jm\...
Try looking at the proof of the Chinese Remainder Theorem to see how the case when the $m\_n$'s are coprime is dealt with and try to make a generalization.
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
You can convert variable into array and exclude empty variables using `array_filter()`. Then use `count()` after the filter. ``` if(count(array_filter(array($var1,$var2,$var3)))==1){ //only 1 variable is not empty } ``` Check [Fiddle link](https://eval.in/642080)
``` $counter=0; $counter+= empty($var1) ? 0:1; $counter+= empty($var2) ? 0:1; $counter+= empty($var3) ? 0:1; if($counter==1) echo "Exactly 2 are empty"; ``` **[Fiddle](https://eval.in/641962)** Or you can simply do ``` var_dump(count(array_filter(array($var1,$var2,$var3)))==1); ``` **[Fiddle](https://eval.in/...
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
``` $counter=0; $counter+= empty($var1) ? 0:1; $counter+= empty($var2) ? 0:1; $counter+= empty($var3) ? 0:1; if($counter==1) echo "Exactly 2 are empty"; ``` **[Fiddle](https://eval.in/641962)** Or you can simply do ``` var_dump(count(array_filter(array($var1,$var2,$var3)))==1); ``` **[Fiddle](https://eval.in/...
Bitwise XOR is great for this: ``` $var1 ^ $var2 ^ $var3 ``` You *might* have trouble if the variables don't cast to boolean easily, in which case you'd need to do `empty($var)` on each of them. Boom. Zero `if`s. **Update** Oops, if they are *all* not empty, true ^ true ^ true == true You'll need to check agains...
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
I'd use `XOR` ([exclusive or](https://en.wikipedia.org/wiki/Exclusive_or)) for this, because it's intended for this purpose, so using a dirty workaround with an array is not as easy to understand. ``` if (!(!empty($var1) && !empty($var2) && !empty($var3)) && (!empty($var1) ^ !empty($var2) ^ !empty($var3))) { echo ...
This is a situation where you should use arrays. You now only have 3 values, but what if you need 4? You'll need to change all your code! ``` $var = array(); $var[] = 'abc'; $var[] = ''; $var[] = 0; // will return 1, empty values, false or 0 (falsy values) will not get counted: echo count(array_filter($var)).' values...
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
``` $counter=0; $counter+= empty($var1) ? 0:1; $counter+= empty($var2) ? 0:1; $counter+= empty($var3) ? 0:1; if($counter==1) echo "Exactly 2 are empty"; ``` **[Fiddle](https://eval.in/641962)** Or you can simply do ``` var_dump(count(array_filter(array($var1,$var2,$var3)))==1); ``` **[Fiddle](https://eval.in/...
Try this one: ``` if (($var1 !== '' && $var2 == '' && $var3 == '') || ($var2 !== '' && $var1 == '' && $var3 == '') || ($var3 !== '' && $var1 == '' && $var2 == '')) { echo 'variable is empty'; } ```
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
You can convert variable into array and exclude empty variables using `array_filter()`. Then use `count()` after the filter. ``` if(count(array_filter(array($var1,$var2,$var3)))==1){ //only 1 variable is not empty } ``` Check [Fiddle link](https://eval.in/642080)
Bitwise XOR is great for this: ``` $var1 ^ $var2 ^ $var3 ``` You *might* have trouble if the variables don't cast to boolean easily, in which case you'd need to do `empty($var)` on each of them. Boom. Zero `if`s. **Update** Oops, if they are *all* not empty, true ^ true ^ true == true You'll need to check agains...
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
``` $counter=0; $counter+= empty($var1) ? 0:1; $counter+= empty($var2) ? 0:1; $counter+= empty($var3) ? 0:1; if($counter==1) echo "Exactly 2 are empty"; ``` **[Fiddle](https://eval.in/641962)** Or you can simply do ``` var_dump(count(array_filter(array($var1,$var2,$var3)))==1); ``` **[Fiddle](https://eval.in/...
This is a situation where you should use arrays. You now only have 3 values, but what if you need 4? You'll need to change all your code! ``` $var = array(); $var[] = 'abc'; $var[] = ''; $var[] = 0; // will return 1, empty values, false or 0 (falsy values) will not get counted: echo count(array_filter($var)).' values...
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
I'd use `XOR` ([exclusive or](https://en.wikipedia.org/wiki/Exclusive_or)) for this, because it's intended for this purpose, so using a dirty workaround with an array is not as easy to understand. ``` if (!(!empty($var1) && !empty($var2) && !empty($var3)) && (!empty($var1) ^ !empty($var2) ^ !empty($var3))) { echo ...
Bitwise XOR is great for this: ``` $var1 ^ $var2 ^ $var3 ``` You *might* have trouble if the variables don't cast to boolean easily, in which case you'd need to do `empty($var)` on each of them. Boom. Zero `if`s. **Update** Oops, if they are *all* not empty, true ^ true ^ true == true You'll need to check agains...
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
You can convert variable into array and exclude empty variables using `array_filter()`. Then use `count()` after the filter. ``` if(count(array_filter(array($var1,$var2,$var3)))==1){ //only 1 variable is not empty } ``` Check [Fiddle link](https://eval.in/642080)
I'd use `XOR` ([exclusive or](https://en.wikipedia.org/wiki/Exclusive_or)) for this, because it's intended for this purpose, so using a dirty workaround with an array is not as easy to understand. ``` if (!(!empty($var1) && !empty($var2) && !empty($var3)) && (!empty($var1) ^ !empty($var2) ^ !empty($var3))) { echo ...
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
Booleans return 0 and 1 with array\_sum() ``` if (array_sum(array(empty($var1), empty($var2), empty($var3))) == 1) { echo "one is empty" ; } ``` ETA: This is a simpler way: ``` if (!empty($var1) + !empty($var2) + !empty($var3) == 1) { echo "1 is not empty" ; } ``` ETA 2: We don't need the negative signs ...
Bitwise XOR is great for this: ``` $var1 ^ $var2 ^ $var3 ``` You *might* have trouble if the variables don't cast to boolean easily, in which case you'd need to do `empty($var)` on each of them. Boom. Zero `if`s. **Update** Oops, if they are *all* not empty, true ^ true ^ true == true You'll need to check agains...
39,484,597
I have three variables: ``` $var1 $var2 $var3 ``` I'm actually looking for the best way to check if **only one** of these three variables is not empty and the **two others** are empty. Is that possible to do this with one `if` only? If not, then what's the best way? The variables all contain text.
2016/09/14
[ "https://Stackoverflow.com/questions/39484597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6564005/" ]
``` $counter=0; $counter+= empty($var1) ? 0:1; $counter+= empty($var2) ? 0:1; $counter+= empty($var3) ? 0:1; if($counter==1) echo "Exactly 2 are empty"; ``` **[Fiddle](https://eval.in/641962)** Or you can simply do ``` var_dump(count(array_filter(array($var1,$var2,$var3)))==1); ``` **[Fiddle](https://eval.in/...
Try this: ``` $temp_array = array($var1,$var2,$var3); $temp_count = count(array_filter($temp_array, 'strlen')); if($temp_count ==1){ echo "1 variable is not empty"; } else { echo "total empty variable is = ".$temp_count; } ``` **[DEMO](https://3v4l.org/17k7K)**
22,077,532
I am trying to validate a textbox to insure it contains only numbers and/or letters and/or hyphens and/or spaces, in any combination or location. Assistance would be appreciated.
2014/02/27
[ "https://Stackoverflow.com/questions/22077532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232158/" ]
The regex for > > *"only numbers and/or letters and/or hyphens and/or spaces, in any combination or location"* > > > is: ``` [0-9a-zA-Z -]* ``` Substitute the `*` for a `+` if you don't want to allow empty strings. Check a [**demo** of how it works here](http://regex101.com/r/zN6tR1).
You must use a character class with all that you need + anchors for start and end of the string (to avoid partial matches) ``` ^[0-9a-zA-Z -]+$ ```
66,341,491
I have code that looks like this: ``` protein IHD CM ARR VD CHD CCD VOO 0 q9uku9 0.000000 0.039457 0.032901 0.014793 0.006614 0.006591 0.000000 1 o75461 0.000000 0.005832 0.027698 0.000000 0.000000 0.006634 ...
2021/02/23
[ "https://Stackoverflow.com/questions/66341491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15212167/" ]
You can use `loc` in combination with `any`. Basically you want to keep all rows where any value is above or equal to 0.01. Note, I adjusted your example to have the second protein have all values < 0.01. ``` import pandas as pd df = pd.DataFrame([ ['q9uku9', 0.000000, 0.039457, 0.032901, 0.014793, 0.006614, 0.00...
``` >>> df protein IHD CM ARR VD CHD CCD VOO 0 q9uku9 0.0 0.039457 0.032901 0.014793 0.006614 0.006591 0.0 1 o75461 0.0 0.005832 0.027698 0.000000 0.000000 0.006634 0.0 2 d4acr8 0.0 0.001490 0.003920 0.000000 0.000000 0.009393 0.0 >>> df.loc[~(df.select_dtype...
51,296,915
I am trying to understand meaning of the input value of the argument for model in Arima.sim() The description was brief on the documentation [here](https://stat.ethz.ch/R-manual/R-devel/library/stats/html/arima.sim.html) I understand that you can simulate AR or MA by simply doing: ``` arima.sim(model = list(ar=0.9)...
2018/07/12
[ "https://Stackoverflow.com/questions/51296915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4340496/" ]
Order stands for ARIMA model type. i. e `order=c(1,0,1)` will give you a ARMA(1,1) model, `order=c(1,0,0)` will give you an AR(1) model, `order=c(0,0,1)` will give you an MA(1) and so on. ar, ma, and so on parameters specify the coefficients of the model.
`c(0,1,0)` produces white noise after differencing with lag = 1. So, integrating it back will give you random walk.
13,091
The EPO has so many publication dates for each patent: A1, A2, A3, A4. . . B1, B2, etc. Which should I use as publication date?
2015/06/24
[ "https://patents.stackexchange.com/questions/13091", "https://patents.stackexchange.com", "https://patents.stackexchange.com/users/14308/" ]
You should use the date of the A1 or A2 publication for the earliest publication date of the subject-matter (of the application). (If you want to know about the granted patent please clarify.) A1 is a publication of the application with search report (SR). A2 is the publication without SR. There will be always only ...
Always the first one. The follow-ups are for some administrative and/or legal backlogs.
26,632
There are a lot of system apps in my mobile that I do not use, and have no intention of ever using. I know that is is possible to [uninstall system apps and bloatware with root](https://android.stackexchange.com/questions/6851/how-can-i-uninstall-applications-that-are-locked-by-phone-vendor), but is it possible without...
2012/07/29
[ "https://android.stackexchange.com/questions/26632", "https://android.stackexchange.com", "https://android.stackexchange.com/users/-1/" ]
No, that is impossible -- as only root can make the system partition writable (which is required to delete a system app, which is stored there). However, using ICS (Android 4.0) or above, you can at least "freeze" them (make it "invisible and unusable") -- and, if you later decide otherwise, also unfreeze them again (s...
I agree with Izzy's answer mostly, however *technically* it is possible to do so without. Background: * System apps reside at /system/app/\* * /system is a separate partition that is mounted read-only during normal use * Some phones (HTC) even lock the flash partition to disallow any write * Normally one gains root o...
49,223
One of the rear rack holes on my aluminum frame have become stripped after a year of taking the rear rack off at least once a week. I've been using this bike for commuting and weekend riding, so I like to remove the rack when I'm not carrying panniers. I've asked a few bike shops about rethreading the hole and have go...
2017/07/26
[ "https://bicycles.stackexchange.com/questions/49223", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/31043/" ]
A few ideas: * Buy a [seatpost-mounted rack](http://www.wiggle.co.uk/topeak-qr-beam-rack-mtx/) (this would be a good solution for the long term if you want to keep taking your rack on and off, but check the weight limits). * If you're going to keep doing this, when you've solved the immediate problem, put some stainle...
Going up a size (to M6) or installing a Helicoil are both good options if there's a reasonable amount of material surrounding the eyelet, which is true for all but the daintiest. If you want to keep taking it off regularly, the Helicoil is a little better option in terms of preventing similar issues in the future, sinc...
49,223
One of the rear rack holes on my aluminum frame have become stripped after a year of taking the rear rack off at least once a week. I've been using this bike for commuting and weekend riding, so I like to remove the rack when I'm not carrying panniers. I've asked a few bike shops about rethreading the hole and have go...
2017/07/26
[ "https://bicycles.stackexchange.com/questions/49223", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/31043/" ]
Most anchor points in aluminum frames are not an actual tapped holes in the frame. It is a threaded inset that attaches to the frame similar to the way a pop rivet works. On older frames they were sometimes referred to as braze-ons. If you search for Nutsert or rivet nut they may be available at your local home center....
Going up a size (to M6) or installing a Helicoil are both good options if there's a reasonable amount of material surrounding the eyelet, which is true for all but the daintiest. If you want to keep taking it off regularly, the Helicoil is a little better option in terms of preventing similar issues in the future, sinc...
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
**UPDATE:** See the real solution for the full function you want. Alright, I came up with a function that does this for me: ``` CREATE OR REPLACE FUNCTION strip_all_triggers() RETURNS text AS $$ DECLARE triggNameRecord RECORD; triggTableRecord RECORD; BEGIN FOR triggNameRecord IN select distinct(trig...
You could start from this query, to find outr trigger names: ``` select * from pg_trigger t,pg_proc where pg_proc.oid=t.tgfoid ```
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
I prefer this (based on [that](https://stackoverflow.com/questions/10591113/drop-all-functions-from-postgres-database)) over the accepted answer by @kuznetso3v because it gives me a chance to inspect the `DROP STATEMENT`s before executing them with copy-paste: ``` SELECT 'DROP TRIGGER ' || trigger_name || ' ON ' || ev...
Easiest will be to `pg_dump -s` object definitions and filter it for lines starting with `CREATE TRIGGER`. Something like ``` ./pg_dump -s db_name | grep '^CREATE TRIGGER' | \ while read _ _ triggername _; do \ echo drop trigger "$triggername;"; \ done ``` (in bash) should work (review it and then run in da...
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
I prefer this (based on [that](https://stackoverflow.com/questions/10591113/drop-all-functions-from-postgres-database)) over the accepted answer by @kuznetso3v because it gives me a chance to inspect the `DROP STATEMENT`s before executing them with copy-paste: ``` SELECT 'DROP TRIGGER ' || trigger_name || ' ON ' || ev...
I made two improvements of the solution from the older answers: * added filtering by trigger name, table and schema * properly handling "truncate" triggers (ignored by the original solution) --- ``` CREATE OR REPLACE FUNCTION strip_all_triggers() RETURNS text AS $$ DECLARE triggRecord RECORD; BEGIN create te...
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
I prefer this (based on [that](https://stackoverflow.com/questions/10591113/drop-all-functions-from-postgres-database)) over the accepted answer by @kuznetso3v because it gives me a chance to inspect the `DROP STATEMENT`s before executing them with copy-paste: ``` SELECT 'DROP TRIGGER ' || trigger_name || ' ON ' || ev...
Take a look in the information\_schema: ``` SELECT * FROM information_schema.triggers; ```
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
Simply cascade drop the language in which you created the triggers. For example, I create triggers in `plpgsql`, so the following query deletes all triggers instantaneously - ``` DROP LANGUAGE plpgsql CASCADE; ```
Easiest will be to `pg_dump -s` object definitions and filter it for lines starting with `CREATE TRIGGER`. Something like ``` ./pg_dump -s db_name | grep '^CREATE TRIGGER' | \ while read _ _ triggername _; do \ echo drop trigger "$triggername;"; \ done ``` (in bash) should work (review it and then run in da...
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
Take a look in the information\_schema: ``` SELECT * FROM information_schema.triggers; ```
Easiest will be to `pg_dump -s` object definitions and filter it for lines starting with `CREATE TRIGGER`. Something like ``` ./pg_dump -s db_name | grep '^CREATE TRIGGER' | \ while read _ _ triggername _; do \ echo drop trigger "$triggername;"; \ done ``` (in bash) should work (review it and then run in da...
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
Easiest will be to `pg_dump -s` object definitions and filter it for lines starting with `CREATE TRIGGER`. Something like ``` ./pg_dump -s db_name | grep '^CREATE TRIGGER' | \ while read _ _ triggername _; do \ echo drop trigger "$triggername;"; \ done ``` (in bash) should work (review it and then run in da...
You could start from this query, to find outr trigger names: ``` select * from pg_trigger t,pg_proc where pg_proc.oid=t.tgfoid ```
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
I prefer this (based on [that](https://stackoverflow.com/questions/10591113/drop-all-functions-from-postgres-database)) over the accepted answer by @kuznetso3v because it gives me a chance to inspect the `DROP STATEMENT`s before executing them with copy-paste: ``` SELECT 'DROP TRIGGER ' || trigger_name || ' ON ' || ev...
The top answer is still flawed because there is no need for two loops. It can be done by: ``` CREATE PROCEDURE _DropTableTriggers() AS $$ DECLARE _rec RECORD; BEGIN FOR _rec IN SELECT DISTINCT event_object_table, trigger_name FROM INFORMATION_SCHEMA.triggers LOOP EXECUTE ...
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
I prefer this (based on [that](https://stackoverflow.com/questions/10591113/drop-all-functions-from-postgres-database)) over the accepted answer by @kuznetso3v because it gives me a chance to inspect the `DROP STATEMENT`s before executing them with copy-paste: ``` SELECT 'DROP TRIGGER ' || trigger_name || ' ON ' || ev...
Simply cascade drop the language in which you created the triggers. For example, I create triggers in `plpgsql`, so the following query deletes all triggers instantaneously - ``` DROP LANGUAGE plpgsql CASCADE; ```
3,093,214
Is there any way to drop ALL triggers from ALL tables in Postgres? I know there's a pg\_trigger table I could look at, but it doesn't look like it contains enough information for me to decipher which triggers I have added to my tables. It also looks like Foreign Key constraints show up in the pg\_trigger table, which ...
2010/06/22
[ "https://Stackoverflow.com/questions/3093214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115694/" ]
Take a look in the information\_schema: ``` SELECT * FROM information_schema.triggers; ```
The top answer is still flawed because there is no need for two loops. It can be done by: ``` CREATE PROCEDURE _DropTableTriggers() AS $$ DECLARE _rec RECORD; BEGIN FOR _rec IN SELECT DISTINCT event_object_table, trigger_name FROM INFORMATION_SCHEMA.triggers LOOP EXECUTE ...
54,287,360
There is a field to enter the name and password, as well as the login button. After entering the correct password and name, it is necessary that pressing the enter button triggers the login function, and if the entered password or name is incorrect, an input error message is displayed. An event click on enter should wo...
2019/01/21
[ "https://Stackoverflow.com/questions/54287360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10929391/" ]
Change the button into a submit button, and bind a `submit` event listener to the form element. Enter in an input in a form with only one submit button will trigger a submit event.
change button type submit. inside from element button which type is submit is associated with submit event of the form. and submit event works only when you are in focus in inputs fields Log In
54,287,360
There is a field to enter the name and password, as well as the login button. After entering the correct password and name, it is necessary that pressing the enter button triggers the login function, and if the entered password or name is incorrect, an input error message is displayed. An event click on enter should wo...
2019/01/21
[ "https://Stackoverflow.com/questions/54287360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10929391/" ]
Change the button into a submit button, and bind a `submit` event listener to the form element. Enter in an input in a form with only one submit button will trigger a submit event.
This code helped me. ``` function login () { console.log('Вы нажали ENTER') } <form> <div class="group"> <input onkeydown="if(event.keyCode == 13) login();" type="text" id="Name"> <label>Name</label> </div> <div class="group"> <input onkeydown="if(event.keyCode == 13) login();" type="text" id=...
6,039,960
i am new here, actually i am working on project which is in c#, and in that project i want to display my form in the center of the screen... So for that i have written the following code.. ``` public class CenterForm : System.Windows.Forms.Form { private System.ComponentModel.Container components; public CenterForm()...
2011/05/18
[ "https://Stackoverflow.com/questions/6039960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758520/" ]
no need for that `CenterForm.StartPosition = FormStartPosition.CenterScreen;`
The errors are because you defined `Main()` method in the Form.cs class. Normally it will be in the Program.cs class, if you are using Visual Studio. `Dispose()` method may available in the Form.Designer.cs too. You can make the form center of the screen by setting the `StartPosition` property to `FormStartPosition.Cen...
6,039,960
i am new here, actually i am working on project which is in c#, and in that project i want to display my form in the center of the screen... So for that i have written the following code.. ``` public class CenterForm : System.Windows.Forms.Form { private System.ComponentModel.Container components; public CenterForm()...
2011/05/18
[ "https://Stackoverflow.com/questions/6039960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758520/" ]
no need for that `CenterForm.StartPosition = FormStartPosition.CenterScreen;`
1.Open .cs file in Notepad 2.Now (ctr+A) select all and delete(you can't see any text) 3.type the following code ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace **[Na...
6,039,960
i am new here, actually i am working on project which is in c#, and in that project i want to display my form in the center of the screen... So for that i have written the following code.. ``` public class CenterForm : System.Windows.Forms.Form { private System.ComponentModel.Container components; public CenterForm()...
2011/05/18
[ "https://Stackoverflow.com/questions/6039960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758520/" ]
no need for that `CenterForm.StartPosition = FormStartPosition.CenterScreen;`
Try this : `this` ***meant by current Form*** ``` this.CenterToScreen(); ```
6,039,960
i am new here, actually i am working on project which is in c#, and in that project i want to display my form in the center of the screen... So for that i have written the following code.. ``` public class CenterForm : System.Windows.Forms.Form { private System.ComponentModel.Container components; public CenterForm()...
2011/05/18
[ "https://Stackoverflow.com/questions/6039960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758520/" ]
The errors are because you defined `Main()` method in the Form.cs class. Normally it will be in the Program.cs class, if you are using Visual Studio. `Dispose()` method may available in the Form.Designer.cs too. You can make the form center of the screen by setting the `StartPosition` property to `FormStartPosition.Cen...
1.Open .cs file in Notepad 2.Now (ctr+A) select all and delete(you can't see any text) 3.type the following code ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace **[Na...
6,039,960
i am new here, actually i am working on project which is in c#, and in that project i want to display my form in the center of the screen... So for that i have written the following code.. ``` public class CenterForm : System.Windows.Forms.Form { private System.ComponentModel.Container components; public CenterForm()...
2011/05/18
[ "https://Stackoverflow.com/questions/6039960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758520/" ]
The errors are because you defined `Main()` method in the Form.cs class. Normally it will be in the Program.cs class, if you are using Visual Studio. `Dispose()` method may available in the Form.Designer.cs too. You can make the form center of the screen by setting the `StartPosition` property to `FormStartPosition.Cen...
Try this : `this` ***meant by current Form*** ``` this.CenterToScreen(); ```
6,039,960
i am new here, actually i am working on project which is in c#, and in that project i want to display my form in the center of the screen... So for that i have written the following code.. ``` public class CenterForm : System.Windows.Forms.Form { private System.ComponentModel.Container components; public CenterForm()...
2011/05/18
[ "https://Stackoverflow.com/questions/6039960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/758520/" ]
Try this : `this` ***meant by current Form*** ``` this.CenterToScreen(); ```
1.Open .cs file in Notepad 2.Now (ctr+A) select all and delete(you can't see any text) 3.type the following code ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace **[Na...
3,501,320
I would like to have some exemple of implementation of jXSearchPanel with jTable. I didn't find something on the web. Thank you in advance, Best Regards, Florent
2010/08/17
[ "https://Stackoverflow.com/questions/3501320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/419309/" ]
I have successful implement the jxsearchpanel with jtable. This is my code: ``` TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tableModel); jTable1.setRowSorter(sorter); Pattern pattern = jXSearchPanel1.getPattern(); sorter.setRowFilter(RowFilters.regexFilter(pattern, 0)); ```
How about the [official one](https://swinglabs-demos.dev.java.net/demos/swingxset6/swingxset.jnlp)? You can download source from this [java net project](https://swinglabs-demos.dev.java.net/).
3,501,320
I would like to have some exemple of implementation of jXSearchPanel with jTable. I didn't find something on the web. Thank you in advance, Best Regards, Florent
2010/08/17
[ "https://Stackoverflow.com/questions/3501320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/419309/" ]
I have successful implement the jxsearchpanel with jtable. This is my code: ``` TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tableModel); jTable1.setRowSorter(sorter); Pattern pattern = jXSearchPanel1.getPattern(); sorter.setRowFilter(RowFilters.regexFilter(pattern, 0)); ```
``` JXSearchPanel pnlSearch = new JXSearchPanel(); pnlSearch.setBounds(10, 6, 503, 45); pnlSearch.addPatternMatcher(new PatternMatcher() { @Override public void setPattern(Pattern p) { TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tableModel...
28,387
Is there a way which will encourage babies to try and talk words? I have tried talking to my baby girl a lot of times, but that doesn't seem to help She is 1 year old I just want to check if I can get some tips
2016/12/29
[ "https://parenting.stackexchange.com/questions/28387", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/25919/" ]
I would say that there are a few things you can do that might help. Many children at one are not yet talkers, so please try not to worry. It never hurts to ask your child's doctor or nurse if everything seems okay. I will assume that you know your baby can hear well enough. * I would say that baby babble from adults d...
Typically, babies will try to copy simple noises - they are natural imitators. In the English-speaking world, parents use sounds like Mama or Dada (Mama being the simplest of these, as baby can see clearly what you are doing) but talking to your baby while holding them as you normally would is often all the encourageme...
28,387
Is there a way which will encourage babies to try and talk words? I have tried talking to my baby girl a lot of times, but that doesn't seem to help She is 1 year old I just want to check if I can get some tips
2016/12/29
[ "https://parenting.stackexchange.com/questions/28387", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/25919/" ]
Typically, babies will try to copy simple noises - they are natural imitators. In the English-speaking world, parents use sounds like Mama or Dada (Mama being the simplest of these, as baby can see clearly what you are doing) but talking to your baby while holding them as you normally would is often all the encourageme...
In my experience, repeating what the baby is babbling helps them to know communication. Try to imitate the sounds they are making, and soon they will begin to imitate the sounds/words you are making. Although you may not understand what they are trying to say, it is a process for them as muscles are developing for spee...
28,387
Is there a way which will encourage babies to try and talk words? I have tried talking to my baby girl a lot of times, but that doesn't seem to help She is 1 year old I just want to check if I can get some tips
2016/12/29
[ "https://parenting.stackexchange.com/questions/28387", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/25919/" ]
I would say that there are a few things you can do that might help. Many children at one are not yet talkers, so please try not to worry. It never hurts to ask your child's doctor or nurse if everything seems okay. I will assume that you know your baby can hear well enough. * I would say that baby babble from adults d...
In my experience, repeating what the baby is babbling helps them to know communication. Try to imitate the sounds they are making, and soon they will begin to imitate the sounds/words you are making. Although you may not understand what they are trying to say, it is a process for them as muscles are developing for spee...
28,387
Is there a way which will encourage babies to try and talk words? I have tried talking to my baby girl a lot of times, but that doesn't seem to help She is 1 year old I just want to check if I can get some tips
2016/12/29
[ "https://parenting.stackexchange.com/questions/28387", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/25919/" ]
I would say that there are a few things you can do that might help. Many children at one are not yet talkers, so please try not to worry. It never hurts to ask your child's doctor or nurse if everything seems okay. I will assume that you know your baby can hear well enough. * I would say that baby babble from adults d...
Firstly, don't worry. 1 year is too early to truly be worried about a child's speech, it's perfectly normal for her not to be talking yet. Secondly, talk to her. A lot. Constantly. My favourite was always when I took my boys shopping - put them in the seat of the shopping trolley where they can see me, then narrate ev...
28,387
Is there a way which will encourage babies to try and talk words? I have tried talking to my baby girl a lot of times, but that doesn't seem to help She is 1 year old I just want to check if I can get some tips
2016/12/29
[ "https://parenting.stackexchange.com/questions/28387", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/25919/" ]
Firstly, don't worry. 1 year is too early to truly be worried about a child's speech, it's perfectly normal for her not to be talking yet. Secondly, talk to her. A lot. Constantly. My favourite was always when I took my boys shopping - put them in the seat of the shopping trolley where they can see me, then narrate ev...
In my experience, repeating what the baby is babbling helps them to know communication. Try to imitate the sounds they are making, and soon they will begin to imitate the sounds/words you are making. Although you may not understand what they are trying to say, it is a process for them as muscles are developing for spee...
32,550,539
I tried to build C++ project using cmake on Windows. But I catch an error: ``` CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.3/Modules/FindPackageH andleStandardArgs.cmake:148 (message): Could NOT find PythonLibs (missing: PYTHON_LIBRARIES) (found suitable version "3.4.1", minimum required is "3.4") Ca...
2015/09/13
[ "https://Stackoverflow.com/questions/32550539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4040102/" ]
I solved my issue. My default Cmake generator is Visual Studio 12 2013. So, if I change it to Visual Studio 12 2013 **Win64** (using Cmake GUI for example), it finds `PYTHON_LIBRARIES` target and works fine.
Try with: ``` find_package(PythonLibs 3.4.1 EXACT REQUIRED) ``` instead of ``` find_package(PythonLibs 3.4 REQUIRED) ```
44,754,167
Consider this example: ``` class C {}; class B { public: B(C& c) : c_(c) {}; private: C& c_; }; class A { public: A(C& c) : b(c) {}; private: B& b; }; ``` `A` has a reference member `b` of class `B`. `B` has a constructor that takes a reference of class `C`. `A`'s constructor takes a reference of class `C`...
2017/06/26
[ "https://Stackoverflow.com/questions/44754167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1428/" ]
You should add "Host" to the request header to determine which server the request should be routed to. For example, you can do the following: ```sh curl -H 'Host: myserver.com' localhost:80/hello ```
The `server_name` directive used to identify virtual hosts, it is not used to set the binding. Since the `listen 80` directive makes NGINX serve requests on all IP addresses, including 127.0.0.1, you can use: ``` curl http://127.0.0.1/hello ``` or ``` curl http://localhost/hello ``` without `/etc/hosts` changes, ...
61,395,318
The list contains x,y coordinates and looks like this, `[[1,2], [2,3], [5,6]....]` I know how to calculate the distance between two coordinates. I need to calculate the distance between[1,2] with all the other coordinates in the list, and then move on to [2,3] and do the same and so on. What would be the best way to p...
2020/04/23
[ "https://Stackoverflow.com/questions/61395318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6262112/" ]
You need to define what pairs of coordinates you want to compare. See table below for what possible comparisons exists. ``` * A B C ... A AA AB AC B BA BB BC C CA CB CC ... ... ``` Assuming valid comparisons are either (AB, AC, BC) Or (BA, CA, CB) but not both. You need to change your loop slig...
So a brute force solution might look like... ex[x,y,z,l,m...] calculate each paired distance exactly once x:(points -x) y:(points -x -y) z:(points -x -y -z) etc... ``` def calculate_distances(points) tocalc = points answers = dict() for point in points: for dot in tocalc: if point!=dot...
9,987
> > Die Beatles haben 15 Lieder für ihre Plattenhülle "Help" komponiert. > > > Ich weiß nicht, ob das richtige Wort für "*Cover album*" "*Plattenhülle*" ist. > > Ich habe viele Plattenhüllen der Beatles in meinem Schlafzimmer im > Regal stehen. > > >
2014/01/22
[ "https://german.stackexchange.com/questions/9987", "https://german.stackexchange.com", "https://german.stackexchange.com/users/3480/" ]
Plattenhülle would be "album cover". I would translate "cover album" with "Cover-Album". ([Wikipedia: Cover-Album](https://de.wikipedia.org/wiki/Cover-Album), [Duden: Coverversion](http://www.duden.de/rechtschreibung/Coverversion))
Der reinen Vollständigkeit halber hier noch die Sätze aus der Frage in korrekter Fassung, wobei an Stelle von `Album` umgangssprachlich auch `Platte` verwendet werden kann, dies gilt im Allgemeinen nicht nur für Schallplatten sondern gleichermaßen auch für CDs. > > Die Beatles haben 15 Lieder für ~~ihre Plattenhülle~...
25,748
I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification. How would I go about designing an audio amplifier from just discrete components.
2012/01/27
[ "https://electronics.stackexchange.com/questions/25748", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6873/" ]
If you just want to build a transistor amp, start with the TAB books, or with Forrest Mims experimenters books (usually available at Radio Shack). Learning how to DESIGN one for a specific application, and do it right, is a different matter. That takes SERIOUS study. For fun, Radio Shack's datasheet for the TI [SN764...
I don't recall whether or not it uses transistors, but I'm positive Randy Sloan's excellent [Tab Guide to Understanding Electricity and Electronics](http://rads.stackoverflow.com/amzn/click/0071360573) contains an entry-level amp. Regardless, it's audio-centric so you will find many tasty things!
25,748
I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification. How would I go about designing an audio amplifier from just discrete components.
2012/01/27
[ "https://electronics.stackexchange.com/questions/25748", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6873/" ]
If you want something simple to get started you could build this class A amplifier: ![enter image description here](https://i.stack.imgur.com/xO68Y.gif) (from [this excellent site](http://www.electronics-tutorials.ws/amplifier/amp_5.html)). \$R\_E\$ stabilizes the DC setting, the bypass capacitor \$C\_E\$ is neede...
I don't recall whether or not it uses transistors, but I'm positive Randy Sloan's excellent [Tab Guide to Understanding Electricity and Electronics](http://rads.stackoverflow.com/amzn/click/0071360573) contains an entry-level amp. Regardless, it's audio-centric so you will find many tasty things!
25,748
I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification. How would I go about designing an audio amplifier from just discrete components.
2012/01/27
[ "https://electronics.stackexchange.com/questions/25748", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6873/" ]
There is nice example of transistor amplifier in popular book "Art of Electronics" ![Art of electronics (1st edition ?)](https://i.stack.imgur.com/9dVtq.jpg)
I don't recall whether or not it uses transistors, but I'm positive Randy Sloan's excellent [Tab Guide to Understanding Electricity and Electronics](http://rads.stackoverflow.com/amzn/click/0071360573) contains an entry-level amp. Regardless, it's audio-centric so you will find many tasty things!
25,748
I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification. How would I go about designing an audio amplifier from just discrete components.
2012/01/27
[ "https://electronics.stackexchange.com/questions/25748", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6873/" ]
If you want something simple to get started you could build this class A amplifier: ![enter image description here](https://i.stack.imgur.com/xO68Y.gif) (from [this excellent site](http://www.electronics-tutorials.ws/amplifier/amp_5.html)). \$R\_E\$ stabilizes the DC setting, the bypass capacitor \$C\_E\$ is neede...
If you just want to build a transistor amp, start with the TAB books, or with Forrest Mims experimenters books (usually available at Radio Shack). Learning how to DESIGN one for a specific application, and do it right, is a different matter. That takes SERIOUS study. For fun, Radio Shack's datasheet for the TI [SN764...
25,748
I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification. How would I go about designing an audio amplifier from just discrete components.
2012/01/27
[ "https://electronics.stackexchange.com/questions/25748", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6873/" ]
There is nice example of transistor amplifier in popular book "Art of Electronics" ![Art of electronics (1st edition ?)](https://i.stack.imgur.com/9dVtq.jpg)
If you just want to build a transistor amp, start with the TAB books, or with Forrest Mims experimenters books (usually available at Radio Shack). Learning how to DESIGN one for a specific application, and do it right, is a different matter. That takes SERIOUS study. For fun, Radio Shack's datasheet for the TI [SN764...
25,748
I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification. How would I go about designing an audio amplifier from just discrete components.
2012/01/27
[ "https://electronics.stackexchange.com/questions/25748", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6873/" ]
If you just want to build a transistor amp, start with the TAB books, or with Forrest Mims experimenters books (usually available at Radio Shack). Learning how to DESIGN one for a specific application, and do it right, is a different matter. That takes SERIOUS study. For fun, Radio Shack's datasheet for the TI [SN764...
There is an easy schematic for a class A audio amplifier with a darlington pair. A darlington pair is just two transistors that square the gain of the first transistor(if you are using identical transistors). So if the first transistor's gain was 20, then the gain of the darlington pair would be 400. [This website](htt...
25,748
I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification. How would I go about designing an audio amplifier from just discrete components.
2012/01/27
[ "https://electronics.stackexchange.com/questions/25748", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6873/" ]
If you want something simple to get started you could build this class A amplifier: ![enter image description here](https://i.stack.imgur.com/xO68Y.gif) (from [this excellent site](http://www.electronics-tutorials.ws/amplifier/amp_5.html)). \$R\_E\$ stabilizes the DC setting, the bypass capacitor \$C\_E\$ is neede...
There is nice example of transistor amplifier in popular book "Art of Electronics" ![Art of electronics (1st edition ?)](https://i.stack.imgur.com/9dVtq.jpg)
25,748
I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification. How would I go about designing an audio amplifier from just discrete components.
2012/01/27
[ "https://electronics.stackexchange.com/questions/25748", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6873/" ]
If you want something simple to get started you could build this class A amplifier: ![enter image description here](https://i.stack.imgur.com/xO68Y.gif) (from [this excellent site](http://www.electronics-tutorials.ws/amplifier/amp_5.html)). \$R\_E\$ stabilizes the DC setting, the bypass capacitor \$C\_E\$ is neede...
There is an easy schematic for a class A audio amplifier with a darlington pair. A darlington pair is just two transistors that square the gain of the first transistor(if you are using identical transistors). So if the first transistor's gain was 20, then the gain of the darlington pair would be 400. [This website](htt...
25,748
I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification. How would I go about designing an audio amplifier from just discrete components.
2012/01/27
[ "https://electronics.stackexchange.com/questions/25748", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6873/" ]
There is nice example of transistor amplifier in popular book "Art of Electronics" ![Art of electronics (1st edition ?)](https://i.stack.imgur.com/9dVtq.jpg)
There is an easy schematic for a class A audio amplifier with a darlington pair. A darlington pair is just two transistors that square the gain of the first transistor(if you are using identical transistors). So if the first transistor's gain was 20, then the gain of the darlington pair would be 400. [This website](htt...
16,052,015
I'm working on a photo app for iPhone/iPod. I'd like to get the raw data from a large image in an iPhone app and perform some pixel manipulation on it and write it back to the disk/gallery. So far I've been converting the UIImage obtained from image picker to unsigned char pointers using the following technique: ```...
2013/04/17
[ "https://Stackoverflow.com/questions/16052015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2041826/" ]
This is usually solved by enabling `Use URL Rewriting` and `Search Engine Friendly URLs` within the Global Configuration settings for Joomla. Be sure you have a Joomla .htaccess file aswell. There should be a provided htaccess.txt file you can copy to .htaccess if you don't. Additionally, confirm your Joomla cache has ...
you can redirect your `index.php` page to your **domain** ``` RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ http://www.kanadax.ca/$1 [R=301,L] ``` althogh you cannot redirect user to a specific page because info are stored in joomla session and you cannot...
11,381,968
I'm unit testing classes in Python using `unittest`. As I understand it, `unittest` calls the `setUp` function before each test so that the state of the unit test objects are the same and the order the test are executed wouldn't matter. Now I have this class I'm testing... ``` #! usr/bin/python2 class SpamTest(objec...
2012/07/08
[ "https://Stackoverflow.com/questions/11381968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777225/" ]
Without studying the detais of your solution, you should read the [Default Parameter Values in Python](http://effbot.org/zone/default-values.htm) by Fredrik Lundh. It is likely that it explains your problem with your *empty list* as a default argument. The reason is that the list is empty only for the first time unles...
This is due to the way default parameters behave in Python when using Mutable objects like lists: [Default Parameter Values in Python](http://effbot.org/zone/default-values.htm). In the line: ``` def __init__(self, numlist = []): ``` The default parameter for numlist is only evaluated once so you only have one inst...
30,313
This program writes out all the files in the current directory level to a text file, outputs an array of sub-directories at the current level, then repeats this process until there are no more sub-directories to search. The code below take 50 seconds to run. I was hoping I could get any pointers on the code in general...
2013/08/27
[ "https://codereview.stackexchange.com/questions/30313", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/28144/" ]
First of all, you shouldn't hardcode values like your `C:\` or `C:\ComputerFiles.txt`. If you want to change this, you don't want to edit it at multiple places. ``` static void filesArray(string path) ``` The usual .Net naming convention for methods is PascalCase (you'll notice that `Main` has to follow this convent...
You probably want to set the folder and file names to be constants somewhere. I didn't worry to much about performance, besides throwing exceptions it ran pretty fast on my computer. All I tried to do here is simplify your main loop so that all the initialization, testing for termination, etc. were on one line. Ofte...
30,313
This program writes out all the files in the current directory level to a text file, outputs an array of sub-directories at the current level, then repeats this process until there are no more sub-directories to search. The code below take 50 seconds to run. I was hoping I could get any pointers on the code in general...
2013/08/27
[ "https://codereview.stackexchange.com/questions/30313", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/28144/" ]
First of all, you shouldn't hardcode values like your `C:\` or `C:\ComputerFiles.txt`. If you want to change this, you don't want to edit it at multiple places. ``` static void filesArray(string path) ``` The usual .Net naming convention for methods is PascalCase (you'll notice that `Main` has to follow this convent...
This looks like a job for **Separation of Concerns**. Split up into four classes - one which can gather all directory names given a root path, one which can gather up files for a given directory path, one which integrates the two, gathering all files for all directories and finally, one which can send those to an outpu...
30,313
This program writes out all the files in the current directory level to a text file, outputs an array of sub-directories at the current level, then repeats this process until there are no more sub-directories to search. The code below take 50 seconds to run. I was hoping I could get any pointers on the code in general...
2013/08/27
[ "https://codereview.stackexchange.com/questions/30313", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/28144/" ]
First of all, you shouldn't hardcode values like your `C:\` or `C:\ComputerFiles.txt`. If you want to change this, you don't want to edit it at multiple places. ``` static void filesArray(string path) ``` The usual .Net naming convention for methods is PascalCase (you'll notice that `Main` has to follow this convent...
Open console and type: ``` TREE C:\ ``` To see not only dirs but files: ``` TREE /F C:\ ```
30,313
This program writes out all the files in the current directory level to a text file, outputs an array of sub-directories at the current level, then repeats this process until there are no more sub-directories to search. The code below take 50 seconds to run. I was hoping I could get any pointers on the code in general...
2013/08/27
[ "https://codereview.stackexchange.com/questions/30313", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/28144/" ]
Due the recursive nature of the file system and the limited deep of directory tree, you can use a recursive function to do the work. The code will be more expresive and there will be less duplications. ``` private static void Main(string[] args) { System.Diagnostics.Stopwatch sw = new System.Diagnostics.St...
You probably want to set the folder and file names to be constants somewhere. I didn't worry to much about performance, besides throwing exceptions it ran pretty fast on my computer. All I tried to do here is simplify your main loop so that all the initialization, testing for termination, etc. were on one line. Ofte...
30,313
This program writes out all the files in the current directory level to a text file, outputs an array of sub-directories at the current level, then repeats this process until there are no more sub-directories to search. The code below take 50 seconds to run. I was hoping I could get any pointers on the code in general...
2013/08/27
[ "https://codereview.stackexchange.com/questions/30313", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/28144/" ]
Due the recursive nature of the file system and the limited deep of directory tree, you can use a recursive function to do the work. The code will be more expresive and there will be less duplications. ``` private static void Main(string[] args) { System.Diagnostics.Stopwatch sw = new System.Diagnostics.St...
This looks like a job for **Separation of Concerns**. Split up into four classes - one which can gather all directory names given a root path, one which can gather up files for a given directory path, one which integrates the two, gathering all files for all directories and finally, one which can send those to an outpu...
30,313
This program writes out all the files in the current directory level to a text file, outputs an array of sub-directories at the current level, then repeats this process until there are no more sub-directories to search. The code below take 50 seconds to run. I was hoping I could get any pointers on the code in general...
2013/08/27
[ "https://codereview.stackexchange.com/questions/30313", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/28144/" ]
Due the recursive nature of the file system and the limited deep of directory tree, you can use a recursive function to do the work. The code will be more expresive and there will be less duplications. ``` private static void Main(string[] args) { System.Diagnostics.Stopwatch sw = new System.Diagnostics.St...
Open console and type: ``` TREE C:\ ``` To see not only dirs but files: ``` TREE /F C:\ ```
30,313
This program writes out all the files in the current directory level to a text file, outputs an array of sub-directories at the current level, then repeats this process until there are no more sub-directories to search. The code below take 50 seconds to run. I was hoping I could get any pointers on the code in general...
2013/08/27
[ "https://codereview.stackexchange.com/questions/30313", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/28144/" ]
This looks like a job for **Separation of Concerns**. Split up into four classes - one which can gather all directory names given a root path, one which can gather up files for a given directory path, one which integrates the two, gathering all files for all directories and finally, one which can send those to an outpu...
You probably want to set the folder and file names to be constants somewhere. I didn't worry to much about performance, besides throwing exceptions it ran pretty fast on my computer. All I tried to do here is simplify your main loop so that all the initialization, testing for termination, etc. were on one line. Ofte...
30,313
This program writes out all the files in the current directory level to a text file, outputs an array of sub-directories at the current level, then repeats this process until there are no more sub-directories to search. The code below take 50 seconds to run. I was hoping I could get any pointers on the code in general...
2013/08/27
[ "https://codereview.stackexchange.com/questions/30313", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/28144/" ]
Open console and type: ``` TREE C:\ ``` To see not only dirs but files: ``` TREE /F C:\ ```
You probably want to set the folder and file names to be constants somewhere. I didn't worry to much about performance, besides throwing exceptions it ran pretty fast on my computer. All I tried to do here is simplify your main loop so that all the initialization, testing for termination, etc. were on one line. Ofte...
3,293
What's with this Chuck Yeager hat? How did I get it? What is it good for? If I plug it into the mains what colour smoke will I get? When I wear it it covers my eyes and I can't see out proper like - Can I get a smaller version - or an (even) larger head?
2013/12/30
[ "https://electronics.meta.stackexchange.com/questions/3293", "https://electronics.meta.stackexchange.com", "https://electronics.meta.stackexchange.com/users/3288/" ]
Oh dear... *you* weren't supposed to get that hat. Unfortunately, in a bit of oversight, mods weren't given the ability to delete hats, so I'm afraid you'll have to live with it. (Or click the "I hate hats" link). All hats are "One Size Fits All". If you're unhappy with the fit, then I'm afraid you'll have to trim yo...
A quick Google search shows two threads elsewhere on SO: * [I have a Secret Hat](https://meta.stackexchange.com/questions/211707/i-have-a-secret-hat) * [How Do I Get the Winterbash 2013 Secret Hats?](https://meta.stackexchange.com/questions/212799/how-do-i-get-the-winterbash-2013-secret-hats) As they are secret hats ...
467,752
Recently I saw "it is hightime + **subj**. + **past** verb + ..." idiom. Like "It's high time we made some changes around here.". I want to know if it is a good phrase to **start** a **formal** writing (i.e. ielts or toefl writing section) with it or not? (P.s I would appriciate if you give me some resources to suppo...
2018/10/10
[ "https://english.stackexchange.com/questions/467752", "https://english.stackexchange.com", "https://english.stackexchange.com/users/217420/" ]
Yes, the construction *it is high time* + preterite is perfectly natural and sufficiently formal, usually used in the context of writing that is intended to persuade. Note that the modifer *high* is not essential: the sentences *it is **time** we **did** something* and *it is **high time** we **did** something* mean p...
high time [vocabulary.com](https://www.vocabulary.com/dictionary/high%20time) idiom > > the latest possible moment > > > As in: > > It is high time that we should rise to change the government.” Seattle > Times 2018 > > > and > > It’s high time she made it over the wire. New York Times 2018 > > > and...
467,752
Recently I saw "it is hightime + **subj**. + **past** verb + ..." idiom. Like "It's high time we made some changes around here.". I want to know if it is a good phrase to **start** a **formal** writing (i.e. ielts or toefl writing section) with it or not? (P.s I would appriciate if you give me some resources to suppo...
2018/10/10
[ "https://english.stackexchange.com/questions/467752", "https://english.stackexchange.com", "https://english.stackexchange.com/users/217420/" ]
Yes, the construction *it is high time* + preterite is perfectly natural and sufficiently formal, usually used in the context of writing that is intended to persuade. Note that the modifer *high* is not essential: the sentences *it is **time** we **did** something* and *it is **high time** we **did** something* mean p...
For examples of its use in a formal context, "high time" is used in the King James version of the Bible: > > Now it is **high time** to awake out of sleep - *[Rom. xiii. 11](https://biblehub.com/kjv/romans/13-11.htm)* > > > and by the US Secretary of State in a declaration against Saddam Hussein: > > It is **...
11,202,088
I have written a program in vc++ that has different behavior in various case as below. When I run it by F5 it works properly in release mode. When I run it by ctrl + F5 it crashes when I start to send data to the program. Outside of visual studio it crashes immediately. I don't know how to find the bug. Any idea on...
2012/06/26
[ "https://Stackoverflow.com/questions/11202088", "https://Stackoverflow.com", "https://Stackoverflow.com/users/598470/" ]
Running ctrl + F5 will run the application without debugger. (<http://msdn.microsoft.com/en-US/library/8b59xk0f(v=vs.90).aspx>) This is not the same as running in release mode. You can run your application in debug mode but without debugger. It sounds stupid but is for example helpful if you want to stop the console f...
You need to understand the difference between running an application in debug mode and release mode. F5 will generally help you to debug the application and ctrl + F5 will execute the application. There might be some issues in release mode that makes your vs to crash. Read [this](http://www.flounder.com/debug_release.h...
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
There isn’t anything built into JavaScript that allows you to format the display of a date like `strftime` does. The closest is `Date().toLocaleString()`, which returns the date as a string formatted according to the local time zone.
Dates have a built-in toString: ``` alert(new Date().toString()) ``` "Sat Dec 19 2009 08:23:33 GMT-0800 (Pacific Standard Time)"
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
There is a free (and awesome) library for Javascript called [Datejs](http://www.datejs.com/) that gives you all sorts of formatting and parsing capabilities (see the [FormatSpecifiers](http://code.google.com/p/datejs/wiki/FormatSpecifiers) documentation).
You could use my JavaScript implementation of Java's [SimpleDateFormat](http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html): <http://www.timdown.co.uk/code/simpledateformat.php>. It's a little lighter than date.js and is kept up to date as it is included in [log4javascript](http://log4javascript.or...
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
Dates have a built-in toString: ``` alert(new Date().toString()) ``` "Sat Dec 19 2009 08:23:33 GMT-0800 (Pacific Standard Time)"
You could use my JavaScript implementation of Java's [SimpleDateFormat](http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html): <http://www.timdown.co.uk/code/simpledateformat.php>. It's a little lighter than date.js and is kept up to date as it is included in [log4javascript](http://log4javascript.or...
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
Dates have a built-in toString: ``` alert(new Date().toString()) ``` "Sat Dec 19 2009 08:23:33 GMT-0800 (Pacific Standard Time)"
You could use ``` new Date().toString() ``` ...to get a localized output of the date.
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
There is a free (and awesome) library for Javascript called [Datejs](http://www.datejs.com/) that gives you all sorts of formatting and parsing capabilities (see the [FormatSpecifiers](http://code.google.com/p/datejs/wiki/FormatSpecifiers) documentation).
You could use ``` new Date().toString() ``` ...to get a localized output of the date.
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
[MomentJS](http://momentjs.com/) has a very robust set of time formatting options, and has also been updated recently.
Dates have a built-in toString: ``` alert(new Date().toString()) ``` "Sat Dec 19 2009 08:23:33 GMT-0800 (Pacific Standard Time)"
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
There isn’t anything built into JavaScript that allows you to format the display of a date like `strftime` does. The closest is `Date().toLocaleString()`, which returns the date as a string formatted according to the local time zone.
You could use my JavaScript implementation of Java's [SimpleDateFormat](http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html): <http://www.timdown.co.uk/code/simpledateformat.php>. It's a little lighter than date.js and is kept up to date as it is included in [log4javascript](http://log4javascript.or...
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
[MomentJS](http://momentjs.com/) has a very robust set of time formatting options, and has also been updated recently.
You could use my JavaScript implementation of Java's [SimpleDateFormat](http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html): <http://www.timdown.co.uk/code/simpledateformat.php>. It's a little lighter than date.js and is kept up to date as it is included in [log4javascript](http://log4javascript.or...
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
There isn’t anything built into JavaScript that allows you to format the display of a date like `strftime` does. The closest is `Date().toLocaleString()`, which returns the date as a string formatted according to the local time zone.
You could use ``` new Date().toString() ``` ...to get a localized output of the date.
1,933,320
I'm looking for a way to convert a Javascript Date object to a string. I'm converting my site from Ruby to server side Javascript, and I'm looking for something analogous to `strftime` in Ruby, C, and many other languages. I found plenty of simple scripts that do this kind of conversion, but I'd prefer not to include ...
2009/12/19
[ "https://Stackoverflow.com/questions/1933320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2018/" ]
There is a free (and awesome) library for Javascript called [Datejs](http://www.datejs.com/) that gives you all sorts of formatting and parsing capabilities (see the [FormatSpecifiers](http://code.google.com/p/datejs/wiki/FormatSpecifiers) documentation).
Dates have a built-in toString: ``` alert(new Date().toString()) ``` "Sat Dec 19 2009 08:23:33 GMT-0800 (Pacific Standard Time)"
408,305
Note that this is a follow-up question to a previous one that was answered. I have a Shapefile with polygons for 1000ish cities of interest. I'm trying to retrieve the land surface temp (LST) for those cities; the ultimate goal is to export a .csv file that'll show the LST for each of those cities for my selected time ...
2021/08/14
[ "https://gis.stackexchange.com/questions/408305", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/178571/" ]
`reduceRegions` is a method of an `Image` not an `ImageCollection` and `winter_day_C` is an `ImageCollection`, not an `Image`. If you want to reduce spatially to create a single mean value per city by image (date), then map reduceRegions to each image in the ImageCollection. ``` // Import day and night time land surf...
Thank you user2856 for helping me understand the nuances between image and image collection. As mentioned in my comment, I unfortunately still struggled after implementing the recommendations. The exported data didn't have any mean LSTs. However, I think I resolved my issue based on this [posting](https://gis.stackexch...
56,204,230
Am new to C++ 11 and using threading. I came across a scenario where it's not possible to copy mutex & condition variable objects. The code is like this.... ``` class producer { public: producer(mutex m, condition_variable cv) { mut = m; // ERROR cvar = cv; // ERROR ...
2019/05/19
[ "https://Stackoverflow.com/questions/56204230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4167623/" ]
No this is not possible. Features were added in C++ to enable this feature (non copying). If you think about the implementation are you changing somekind of kernel object? Will that be the same. Probably not. This is by design.
You'll want to store references or pointers to the `mutex` and `condition_variable`. ``` class producer { public: producer(mutex & m, condition_variable & cv) : _mut{m} , _cvar{cv} { } private: mutex & mut; condition_variable & cvar; }; ``` You could use `std::shared_ptr`s, since that lets...
56,204,230
Am new to C++ 11 and using threading. I came across a scenario where it's not possible to copy mutex & condition variable objects. The code is like this.... ``` class producer { public: producer(mutex m, condition_variable cv) { mut = m; // ERROR cvar = cv; // ERROR ...
2019/05/19
[ "https://Stackoverflow.com/questions/56204230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4167623/" ]
No this is not possible. Features were added in C++ to enable this feature (non copying). If you think about the implementation are you changing somekind of kernel object? Will that be the same. Probably not. This is by design.
It is impossible by design. What does it even mean to copy a mutex? What should it do? Say you wait for a mutex A and some body copies mutex A to mutex B. Do you still wait for A or for B? or for both of them? No. You should still wait for A. So other mutex B cannot be a copy of A. So copying is deleted. Move operat...
56,204,230
Am new to C++ 11 and using threading. I came across a scenario where it's not possible to copy mutex & condition variable objects. The code is like this.... ``` class producer { public: producer(mutex m, condition_variable cv) { mut = m; // ERROR cvar = cv; // ERROR ...
2019/05/19
[ "https://Stackoverflow.com/questions/56204230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4167623/" ]
You'll want to store references or pointers to the `mutex` and `condition_variable`. ``` class producer { public: producer(mutex & m, condition_variable & cv) : _mut{m} , _cvar{cv} { } private: mutex & mut; condition_variable & cvar; }; ``` You could use `std::shared_ptr`s, since that lets...
It is impossible by design. What does it even mean to copy a mutex? What should it do? Say you wait for a mutex A and some body copies mutex A to mutex B. Do you still wait for A or for B? or for both of them? No. You should still wait for A. So other mutex B cannot be a copy of A. So copying is deleted. Move operat...
27,195,756
I have 5 shards and I want to merge them into a single shard. Each shard has about 30GB data. I can use "removeShard" command to remove them one by one. But it's wasteful because when I am removing the shards one by one, the data has to be re-distributed multiple times. It will be more efficient to force data to move t...
2014/11/28
[ "https://Stackoverflow.com/questions/27195756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/802518/" ]
Basically, the [moveChunk](http://docs.mongodb.org/manual/reference/command/moveChunk/) command is used for manual chunk migration. Using the `config` database, you can use a script similar to the bellow. **Note that you have to turn off the balancer first**. ``` var query = {"shard" : {$ne : "DESTINATION_SHARD_ID"...
There are no quick solutions here. You can move the chunks manually as pointed out in the first answer, but there is another option. This won't be any faster, since no matter what you do at present the balancer (which moves the chunks for you) will still only ever move one chunk at at a time. You could use [tag aware ...
40,231,209
I currently have a program that individually converts tokens of a string into their piglatin counterparts. However, the program needs to insert them back into the string they were taken with, with ALL of the original characters in it. ``` Hasta la vista baby. - the Terminator. Hasta astaHay la alay vista istavay b...
2016/10/25
[ "https://Stackoverflow.com/questions/40231209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4748207/" ]
If I understand your question, it is 'how do I replace each word with its translation in a string?' The simplest way is to use `String.replace`. So if you have created a `translate` method then you could do something like: ``` String line = key.readLine(); for (String word: line.split("\\W+")) line = line.replace...
If I understand correctly that you want to translate all the words in the input, my taste would be for building the new string from scratch: ``` String pigOrig = key.readLine(); String[] pigSplit = pigOrig.split("\\W+"); StringBuilder buf = new StringBuilder(pigOrig.length()); buf.append(translateWord(...
1,154,470
I need to black out all the lines in a long document that begin with special characters and are followed by specific words. For example, if a line begins with `*boot` or `>jump` like in: ``` *bootwhateverwhatever.. ``` or ``` >jumpwhateverwhatever ``` Then I need to black out all text following and including the...
2016/12/08
[ "https://superuser.com/questions/1154470", "https://superuser.com", "https://superuser.com/users/672985/" ]
Files on quarantine are "stopped" by the antivirus software... so they are harmless. You can remove it when you want or keep it for study or whatever.
The virus that Windows Defender quarantined should not pose any further risk. However, you should check the source of the file (or try to infer from the path where it was found) to try and determine if it was an infected file created by a legitimate process, or if it was the result of a running infection. That will giv...
18,231,543
I am using Asp.net mvc4 web-api. I got an error 404 method not found, i am calling DelteMenu Method using jquery ajax. I am pssing argument Using data : of Jquery ajax. if i am passing Model parameter it is working fine but for other parameters like Guid, String throwing exception : 404 method nod found.please let me ...
2013/08/14
[ "https://Stackoverflow.com/questions/18231543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1788794/" ]
Use a `collections.Counter()` object and split your words on whitespace. You probably want to lowercase your words as well, and remove punctuation: ``` from collections import Counter counts = Counter() for sentence in sequence_of_sentences: counts.update(word.strip('.,?!"\'').lower() for word in sentence.split(...
You could do what you want pretty easily with a little regex and a dictionary. ``` import re dict = {} sentence_list = ['This is a sentence', 'This is a sentence'] for sentence in sentence_list: for word in re.split('\s', sentence): # split with whitespace try: dict[word] += 1 except K...
16,538,799
I have a app that reads data from a text file using: ``` CRD.reader = new StreamReader(fn,Encoding.UTF8,true,1024); CRD.readLine(); ``` BUT I run 16 instances of this app in parallel on my 24 core machine. When I do this the total time taken is much greater than time it takes a single...
2013/05/14
[ "https://Stackoverflow.com/questions/16538799", "https://Stackoverflow.com", "https://Stackoverflow.com/users/439497/" ]
If file sizes, according to the comment, are about `2MB`, the fast processing solution would be * first read completely into the memory, in one shot, using for example [File.ReadAllText](http://msdn.microsoft.com/it-it/library/ms143369.aspx) method * after process content, already present in *memory*, so it will be *...
1. Try to open file in read only mode 2. Try to use memory mapped file it could provide best performance for concurent file access
57,229,496
In the below docker file: ``` FROM alpine:latest ENV HOME /home/samcli ENV PATH $HOME/.local/bin:$PATH RUN mkdir /root/bin /aws; \ apk add --no-cache groff less bash python jq curl py-pip tzdata RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime RUN apk add --no-cache --virtual .build-deps gcc python2-dev p...
2019/07/27
[ "https://Stackoverflow.com/questions/57229496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3317808/" ]
I would recommend using python offical image based on alpine so you will do not need to maintain and install the python version. Below base image is base on `alpine 3.9` and `python version is 3.7` ``` FROM python:3.7-alpine3.9 ENV HOME /home/samcli ENV PATH $HOME/.local/bin:$PATH RUN ln -fs /usr/share/zoneinfo/Etc/U...
This Dockerfile works for me. ``` FROM alpine:latest RUN apk update && apk upgrade RUN apk --no-cache add python3 py3-pip gcc musl-dev python3-dev RUN pip install aws-sam-cli awscli ... ```