qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
43,914,140
I have this method `GetWordsArray` below, and when I call the method in the main program it only prints out whole sentences which start with the specific letter of that whole sentence. ``` public static void GetWordsArray(string path, string toFind) { string[] words = File.ReadAllLines(path); if (File.Exists(p...
2017/05/11
[ "https://Stackoverflow.com/questions/43914140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7946890/" ]
There is an option for that. ``` grep --help ... -A, --after-context=NUM print NUM lines of trailing context ``` Therefore: ``` bpeek | grep -A 1 'nPDE' ```
`grep -A` works if your grep supports it (it's not in [POSIX grep](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html)). If it doesn't, you can use sed: ``` bpeek | sed '/nPDE/!d;N' ``` which does the following: ``` /nPDE/!d # If the line doesn't match "nPDE", delete it (starts new cycle) N ...
43,914,140
I have this method `GetWordsArray` below, and when I call the method in the main program it only prints out whole sentences which start with the specific letter of that whole sentence. ``` public static void GetWordsArray(string path, string toFind) { string[] words = File.ReadAllLines(path); if (File.Exists(p...
2017/05/11
[ "https://Stackoverflow.com/questions/43914140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7946890/" ]
There is an option for that. ``` grep --help ... -A, --after-context=NUM print NUM lines of trailing context ``` Therefore: ``` bpeek | grep -A 1 'nPDE' ```
With awk (for completeness since you have grep and sed solutions): ``` awk '/nPDE/{c=2} c&&c--' ```
43,914,140
I have this method `GetWordsArray` below, and when I call the method in the main program it only prints out whole sentences which start with the specific letter of that whole sentence. ``` public static void GetWordsArray(string path, string toFind) { string[] words = File.ReadAllLines(path); if (File.Exists(p...
2017/05/11
[ "https://Stackoverflow.com/questions/43914140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7946890/" ]
With awk (for completeness since you have grep and sed solutions): ``` awk '/nPDE/{c=2} c&&c--' ```
`grep -A` works if your grep supports it (it's not in [POSIX grep](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html)). If it doesn't, you can use sed: ``` bpeek | sed '/nPDE/!d;N' ``` which does the following: ``` /nPDE/!d # If the line doesn't match "nPDE", delete it (starts new cycle) N ...
53,378,129
I want to create a code that prints words in uppercase (after "G") from a sentence ``` # [] create words after "G" # sample quote "Wheresoever you go, go with all your heart" ~ Confucius (551 BC - 479 BC) # Sample output: WHERESOEVER YOU WITH YOUR HEART ``` here is my code ``` q = input ("Quote : ") word = "" f...
2018/11/19
[ "https://Stackoverflow.com/questions/53378129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9782019/" ]
For an approach to this, you will have to change the default behaviours of the Bootstrap classes. We will have to use [flex-nowrap](https://getbootstrap.com/docs/4.0/utilities/flex/#wrap) on the cards container for the smallest media screen and change the **overflow-x** style to **auto**. In summary, we will use the ne...
``` ```css .mobile-card-container { display: block; } .card-background { background-color: #ffffff; border-radius: 6px; margin-top: 16px; height: 100px; -webkit-box-shadow: 0px 2px 4px 1px rgba(0, 51, 102, 0.1); -moz-box-shadow: 0px 2px 4px 1px rgba(0, 51...
18,209,014
I am newbie to wordpress and woocommerce. I have to change ``` <ul class="products"> to <div class="myclass">. ``` For that I just coppied plugins/woocommerce/loop/loop-start.php in mytheme/woocommerce/loop/loop-start.php and changed the file loop-start.php accordingly. But this change does not apply to shop page ...
2013/08/13
[ "https://Stackoverflow.com/questions/18209014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1527059/" ]
Just tested Below solutions for you, It worked. Copy loop-shop.php file from > > wp-content\plugins\woocommerce\templates\loop-shop.php > > > and past it on your theme at > > yourtheme\woocommerce\loop-shop.php > > > Find with `<ul class="products"> code </ul>` and replaced with `<div class="myclass"> code...
Since **WooCommerce 2.0.0** a `loop-start.php` file was introduced. This file will need to be changed in order to update your class in the product loop. ``` wp-content\plugins\woocommerce\templates\loop\loop-start.php ``` and past it on your theme at ``` yourtheme\woocommerce\loop\loop-start.php ```
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
ASPX ---- Add a label in page, ``` <asp:label id="lbl" runat="server"></asp:label>, ``` In your code behind: -------------------- // Use the condition given below: ``` if(Convert.ToInt32(txtTemp.Text)>15 ) { lbl.Text= "HOT"; lbl.ForeColor= System.Drawing.Color.Red; } else { lbl.Text="COLD"; lbl...
You are testing for 14 and 15 specifically. You'll need to convert the strings to ints and compare with >= and <=.
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
This answers your requirements. Convert the String (text) to Int (numbers), and compare the values. ``` protected void Button1_Click(object sender, EventArgs e) { if (Int32.Parse(txttemp.Text.Trim()) >= 15) { lblans.Text = "Hot"; lblans.ForeColor = System.Drawing.Color.R...
You need to use the `<=`, `>=`, `>`, or `<` [operators](http://msdn.microsoft.com/en-us/library/6a71f45d.aspx), used for checking if numbers are less than, more than, etc. You will also need to use the converted double for this. ``` // If LESS than 15 if (addTemperature < 15) { lblans.ForeColor = System.Drawing.Co...
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
You're actually checking equality to "15" and "14" ignoring all other values. Try this ``` if(addTemperature < 15) { lblans.ForeColor = System.Drawing.Color.Blue; } else { lblans.ForeColor = System.Drawing.Color.Red; } ```
You are testing for 14 and 15 specifically. You'll need to convert the strings to ints and compare with >= and <=.
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
This answers your requirements. Convert the String (text) to Int (numbers), and compare the values. ``` protected void Button1_Click(object sender, EventArgs e) { if (Int32.Parse(txttemp.Text.Trim()) >= 15) { lblans.Text = "Hot"; lblans.ForeColor = System.Drawing.Color.R...
``` lblans.ForeColor = addTemperature < 15 ? System.Drawing.Color.Blue : System.Drawing.Color.Red; ```
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
This answers your requirements. Convert the String (text) to Int (numbers), and compare the values. ``` protected void Button1_Click(object sender, EventArgs e) { if (Int32.Parse(txttemp.Text.Trim()) >= 15) { lblans.Text = "Hot"; lblans.ForeColor = System.Drawing.Color.R...
ASPX ---- Add a label in page, ``` <asp:label id="lbl" runat="server"></asp:label>, ``` In your code behind: -------------------- // Use the condition given below: ``` if(Convert.ToInt32(txtTemp.Text)>15 ) { lbl.Text= "HOT"; lbl.ForeColor= System.Drawing.Color.Red; } else { lbl.Text="COLD"; lbl...
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
ASPX ---- Add a label in page, ``` <asp:label id="lbl" runat="server"></asp:label>, ``` In your code behind: -------------------- // Use the condition given below: ``` if(Convert.ToInt32(txtTemp.Text)>15 ) { lbl.Text= "HOT"; lbl.ForeColor= System.Drawing.Color.Red; } else { lbl.Text="COLD"; lbl...
``` lblans.ForeColor = addTemperature < 15 ? System.Drawing.Color.Blue : System.Drawing.Color.Red; ```
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
ASPX ---- Add a label in page, ``` <asp:label id="lbl" runat="server"></asp:label>, ``` In your code behind: -------------------- // Use the condition given below: ``` if(Convert.ToInt32(txtTemp.Text)>15 ) { lbl.Text= "HOT"; lbl.ForeColor= System.Drawing.Color.Red; } else { lbl.Text="COLD"; lbl...
You need to use the `<=`, `>=`, `>`, or `<` [operators](http://msdn.microsoft.com/en-us/library/6a71f45d.aspx), used for checking if numbers are less than, more than, etc. You will also need to use the converted double for this. ``` // If LESS than 15 if (addTemperature < 15) { lblans.ForeColor = System.Drawing.Co...
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
You're actually checking equality to "15" and "14" ignoring all other values. Try this ``` if(addTemperature < 15) { lblans.ForeColor = System.Drawing.Color.Blue; } else { lblans.ForeColor = System.Drawing.Color.Red; } ```
You need to use the `<=`, `>=`, `>`, or `<` [operators](http://msdn.microsoft.com/en-us/library/6a71f45d.aspx), used for checking if numbers are less than, more than, etc. You will also need to use the converted double for this. ``` // If LESS than 15 if (addTemperature < 15) { lblans.ForeColor = System.Drawing.Co...
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
This answers your requirements. Convert the String (text) to Int (numbers), and compare the values. ``` protected void Button1_Click(object sender, EventArgs e) { if (Int32.Parse(txttemp.Text.Trim()) >= 15) { lblans.Text = "Hot"; lblans.ForeColor = System.Drawing.Color.R...
You're actually checking equality to "15" and "14" ignoring all other values. Try this ``` if(addTemperature < 15) { lblans.ForeColor = System.Drawing.Color.Blue; } else { lblans.ForeColor = System.Drawing.Color.Red; } ```
19,337,185
I am trying to create a simple interface for generating data in a JSON format. The first object can be added successfully. But when I try to add another one (appending it to the "myDict" array object: see code below), the values of the original object are overwritten, and I seem to be getting an empty key/value pair ad...
2013/10/12
[ "https://Stackoverflow.com/questions/19337185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2874481/" ]
You're actually checking equality to "15" and "14" ignoring all other values. Try this ``` if(addTemperature < 15) { lblans.ForeColor = System.Drawing.Color.Blue; } else { lblans.ForeColor = System.Drawing.Color.Red; } ```
``` lblans.ForeColor = addTemperature < 15 ? System.Drawing.Color.Blue : System.Drawing.Color.Red; ```
5,321,021
Server side VB asp code on a Windows 2003 machine, asp.net 2.0\* installed. We're having a weird issue where the first time a user connects to the web site, the Session\_OnStart in the Global.asa fires, but the session object is null. Something simple like: ``` Session.Timeout = 30 ``` causes the following error: Ob...
2011/03/16
[ "https://Stackoverflow.com/questions/5321021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/402664/" ]
Figured out the problem. It was due to having more than one worker in the app pool used for the website. Since there was no guarantee which worker process would handle a client's request, and each worker process would create it's own instance of the client's session, the session would be dropped and recreated when IIS ...
Quite an interesting problem. We know that when the session is explicitly abandoned or eventually times out it is promptly destroyed. I would add code like the following, in order to guarantee it cannot happen. ``` If Session("test") Is Nothing Then Response.Redirect("Whatever.asp") End If ``` You could also ca...
34,898,695
I'm trying to build a Bukkit plugin. The plugin also uses [exp4j](http://www.objecthunter.net/exp4j/). **The final result needs to have the exp4j code included in the released jar but *not* have the Bukkit code included.** I followed the advice of [this answer](https://stackoverflow.com/questions/4871656/using-gradle-...
2016/01/20
[ "https://Stackoverflow.com/questions/34898695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2881646/" ]
See [Gradle issue here](https://issues.gradle.org/browse/GRADLE-784). There isn't a provided configuration in gradle, though there really should be one. The most reasonable workaround currently seems to be, to create your own configuration: ``` configurations { provided } ``` and then: ``` sourceSets { mai...
I did find a very hacky solution. But it's so bad I feel bad posting it here :P 1. Declare the provided dependencies as runtime dependencies 2. Regenerate the idea files: gradle cleanIdea idea 3. Idea should now recognise the dependences 4. Change the provided dependencies back to provided 5. Go into the project setti...
34,898,695
I'm trying to build a Bukkit plugin. The plugin also uses [exp4j](http://www.objecthunter.net/exp4j/). **The final result needs to have the exp4j code included in the released jar but *not* have the Bukkit code included.** I followed the advice of [this answer](https://stackoverflow.com/questions/4871656/using-gradle-...
2016/01/20
[ "https://Stackoverflow.com/questions/34898695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2881646/" ]
In Gradle 2.12 and later, there is a configuration called `compileOnly` that has the **provided** semantics you are looking for. More about this configuration on the [Gradle blog post](https://blog.gradle.org/introducing-compile-only-dependencies) on the subject. Before 2.12, you can use the `nebula.provided-base` [p...
I did find a very hacky solution. But it's so bad I feel bad posting it here :P 1. Declare the provided dependencies as runtime dependencies 2. Regenerate the idea files: gradle cleanIdea idea 3. Idea should now recognise the dependences 4. Change the provided dependencies back to provided 5. Go into the project setti...
66,736,892
My current code: ```js const fetch = require("node-fetch"); const data = await fetch( `https://pokemonrevolution.net/spawns/land_spawns.json` ).then((res) => res.json()); const filterFromPoke = data.filter((p) => p.Pokemon === "Pikachu"); const filteredMap = filterFromPoke .map((s) => ...
2021/03/21
[ "https://Stackoverflow.com/questions/66736892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
First, I thought that you could do it with embeds, but as Discord only displays three columns, so this one didn't work as expected. I'm just leaving it here, because if someone has only three columns max, it works fine. ```js client.on('message', async (message) => { if (message.author.bot) return; const res = aw...
Try this: ```js fetch(`https://pokemonrevolution.net/spawns/land_spawns.json`) .then((res) => res.json()) .then(data => data.filter((p) => p.Pokemon === "Pikachu")) .then(data => { var mapLength = 0, tierLength = 0, minLevelLength = 0, maxLevelLength = 0, memberOnlyLength = 0, i...
248,650
Let $f:X\to T$ be a smooth family of complex projective varieties, and assume that the special fiber $X\_{t\_0}$ is hyperbolic for $t\_0\in T$. Is $X\_t$ also hyperbolic for all $t\in U$ in a Zariski open neighborhood $U\subseteq T$ of $t\_0$? Here we say that $X$ is (Brody) hyperbolic if there is no non-constant holo...
2016/08/30
[ "https://mathoverflow.net/questions/248650", "https://mathoverflow.net", "https://mathoverflow.net/users/94548/" ]
You might look at [On a topological topos, n-category café.](https://golem.ph.utexas.edu/category/2014/04/on_a_topological_topos.html)
This might be useful along with some of the comments above. Chapter 8 of Gray's book does provide some explanation into this, which hopefully will convince the reader that $\mathbf{K}$, the category of compactly generated spaces, is a good category to work within for the purpose of doing homotopy theory. There is ret...
248,650
Let $f:X\to T$ be a smooth family of complex projective varieties, and assume that the special fiber $X\_{t\_0}$ is hyperbolic for $t\_0\in T$. Is $X\_t$ also hyperbolic for all $t\in U$ in a Zariski open neighborhood $U\subseteq T$ of $t\_0$? Here we say that $X$ is (Brody) hyperbolic if there is no non-constant holo...
2016/08/30
[ "https://mathoverflow.net/questions/248650", "https://mathoverflow.net", "https://mathoverflow.net/users/94548/" ]
The convenient category CGH of compactly generated Hausdorff spaces has some poor colimits, since Hausdorffification may change the underlying point sets. The category CGWH of compactly generated *weak* Hausdorff spaces is even better behaved. The advantages are discussed in Chris McCord's paper "Classifying Spaces and...
You might look at [On a topological topos, n-category café.](https://golem.ph.utexas.edu/category/2014/04/on_a_topological_topos.html)
248,650
Let $f:X\to T$ be a smooth family of complex projective varieties, and assume that the special fiber $X\_{t\_0}$ is hyperbolic for $t\_0\in T$. Is $X\_t$ also hyperbolic for all $t\in U$ in a Zariski open neighborhood $U\subseteq T$ of $t\_0$? Here we say that $X$ is (Brody) hyperbolic if there is no non-constant holo...
2016/08/30
[ "https://mathoverflow.net/questions/248650", "https://mathoverflow.net", "https://mathoverflow.net/users/94548/" ]
I'm a little late to the party. I agree with Dennis Nardin's comment that really *any* convenient category of spaces should be good for homotopy theory. By this, I mean any complete and cocomplete cartesian closed full subcategory of $\mathsf{Top}$ which includes the CW complexes and whose limits and colimits are not *...
You might look at [On a topological topos, n-category café.](https://golem.ph.utexas.edu/category/2014/04/on_a_topological_topos.html)
248,650
Let $f:X\to T$ be a smooth family of complex projective varieties, and assume that the special fiber $X\_{t\_0}$ is hyperbolic for $t\_0\in T$. Is $X\_t$ also hyperbolic for all $t\in U$ in a Zariski open neighborhood $U\subseteq T$ of $t\_0$? Here we say that $X$ is (Brody) hyperbolic if there is no non-constant holo...
2016/08/30
[ "https://mathoverflow.net/questions/248650", "https://mathoverflow.net", "https://mathoverflow.net/users/94548/" ]
You should look at this [ncatlab](https://ncatlab.org/nlab/show/convenient+category+of+topological+spaces) exposition on "convenient categories of topological spaces", and references. One problem is still the difficulty of getting a **locally cartesian closed** convenient category; Spanier's "quasitopologies" seemed a ...
This might be useful along with some of the comments above. Chapter 8 of Gray's book does provide some explanation into this, which hopefully will convince the reader that $\mathbf{K}$, the category of compactly generated spaces, is a good category to work within for the purpose of doing homotopy theory. There is ret...
248,650
Let $f:X\to T$ be a smooth family of complex projective varieties, and assume that the special fiber $X\_{t\_0}$ is hyperbolic for $t\_0\in T$. Is $X\_t$ also hyperbolic for all $t\in U$ in a Zariski open neighborhood $U\subseteq T$ of $t\_0$? Here we say that $X$ is (Brody) hyperbolic if there is no non-constant holo...
2016/08/30
[ "https://mathoverflow.net/questions/248650", "https://mathoverflow.net", "https://mathoverflow.net/users/94548/" ]
The convenient category CGH of compactly generated Hausdorff spaces has some poor colimits, since Hausdorffification may change the underlying point sets. The category CGWH of compactly generated *weak* Hausdorff spaces is even better behaved. The advantages are discussed in Chris McCord's paper "Classifying Spaces and...
You should look at this [ncatlab](https://ncatlab.org/nlab/show/convenient+category+of+topological+spaces) exposition on "convenient categories of topological spaces", and references. One problem is still the difficulty of getting a **locally cartesian closed** convenient category; Spanier's "quasitopologies" seemed a ...
248,650
Let $f:X\to T$ be a smooth family of complex projective varieties, and assume that the special fiber $X\_{t\_0}$ is hyperbolic for $t\_0\in T$. Is $X\_t$ also hyperbolic for all $t\in U$ in a Zariski open neighborhood $U\subseteq T$ of $t\_0$? Here we say that $X$ is (Brody) hyperbolic if there is no non-constant holo...
2016/08/30
[ "https://mathoverflow.net/questions/248650", "https://mathoverflow.net", "https://mathoverflow.net/users/94548/" ]
I'm a little late to the party. I agree with Dennis Nardin's comment that really *any* convenient category of spaces should be good for homotopy theory. By this, I mean any complete and cocomplete cartesian closed full subcategory of $\mathsf{Top}$ which includes the CW complexes and whose limits and colimits are not *...
You should look at this [ncatlab](https://ncatlab.org/nlab/show/convenient+category+of+topological+spaces) exposition on "convenient categories of topological spaces", and references. One problem is still the difficulty of getting a **locally cartesian closed** convenient category; Spanier's "quasitopologies" seemed a ...
248,650
Let $f:X\to T$ be a smooth family of complex projective varieties, and assume that the special fiber $X\_{t\_0}$ is hyperbolic for $t\_0\in T$. Is $X\_t$ also hyperbolic for all $t\in U$ in a Zariski open neighborhood $U\subseteq T$ of $t\_0$? Here we say that $X$ is (Brody) hyperbolic if there is no non-constant holo...
2016/08/30
[ "https://mathoverflow.net/questions/248650", "https://mathoverflow.net", "https://mathoverflow.net/users/94548/" ]
The convenient category CGH of compactly generated Hausdorff spaces has some poor colimits, since Hausdorffification may change the underlying point sets. The category CGWH of compactly generated *weak* Hausdorff spaces is even better behaved. The advantages are discussed in Chris McCord's paper "Classifying Spaces and...
This might be useful along with some of the comments above. Chapter 8 of Gray's book does provide some explanation into this, which hopefully will convince the reader that $\mathbf{K}$, the category of compactly generated spaces, is a good category to work within for the purpose of doing homotopy theory. There is ret...
248,650
Let $f:X\to T$ be a smooth family of complex projective varieties, and assume that the special fiber $X\_{t\_0}$ is hyperbolic for $t\_0\in T$. Is $X\_t$ also hyperbolic for all $t\in U$ in a Zariski open neighborhood $U\subseteq T$ of $t\_0$? Here we say that $X$ is (Brody) hyperbolic if there is no non-constant holo...
2016/08/30
[ "https://mathoverflow.net/questions/248650", "https://mathoverflow.net", "https://mathoverflow.net/users/94548/" ]
I'm a little late to the party. I agree with Dennis Nardin's comment that really *any* convenient category of spaces should be good for homotopy theory. By this, I mean any complete and cocomplete cartesian closed full subcategory of $\mathsf{Top}$ which includes the CW complexes and whose limits and colimits are not *...
This might be useful along with some of the comments above. Chapter 8 of Gray's book does provide some explanation into this, which hopefully will convince the reader that $\mathbf{K}$, the category of compactly generated spaces, is a good category to work within for the purpose of doing homotopy theory. There is ret...
248,650
Let $f:X\to T$ be a smooth family of complex projective varieties, and assume that the special fiber $X\_{t\_0}$ is hyperbolic for $t\_0\in T$. Is $X\_t$ also hyperbolic for all $t\in U$ in a Zariski open neighborhood $U\subseteq T$ of $t\_0$? Here we say that $X$ is (Brody) hyperbolic if there is no non-constant holo...
2016/08/30
[ "https://mathoverflow.net/questions/248650", "https://mathoverflow.net", "https://mathoverflow.net/users/94548/" ]
The convenient category CGH of compactly generated Hausdorff spaces has some poor colimits, since Hausdorffification may change the underlying point sets. The category CGWH of compactly generated *weak* Hausdorff spaces is even better behaved. The advantages are discussed in Chris McCord's paper "Classifying Spaces and...
I'm a little late to the party. I agree with Dennis Nardin's comment that really *any* convenient category of spaces should be good for homotopy theory. By this, I mean any complete and cocomplete cartesian closed full subcategory of $\mathsf{Top}$ which includes the CW complexes and whose limits and colimits are not *...
27,838
As far as I know, jets did not see mass production across the world until the 1950's. So I'm interested in how they were built in that time. How many different types of factories were needed? How did those factories work? What supplies were needed and how much manpower did they need per jet? Right now I'm only imagini...
2016/05/27
[ "https://aviation.stackexchange.com/questions/27838", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/3674/" ]
Building an airframe did not change all that much in the jet age. Assuming you are talking about all aluminum aircraft the power plant is somewhat abstracted from the equation in terms of a production line. Here is the assembly line that Lockheed had for the early [P-80 Jets](https://en.wikipedia.org/wiki/Lockheed_P-...
> > Right now I'm only imagining two kinds, an airframe factory and an engine factory. > > > The plane's **skin** needs to be built, as well as all the electronics, all the cables, gauges, radios, guns, missiles, electric wiring, pumps, radar, radar receivers, ejection seats, the plexiglas canopy and windshield, t...
89,793
My professor has submitted a letter of recommendation for me for graduate program admissions, and has listed that I did X and Y (specific activities) under him, when I was only involved in doing X. He shared the letter with me after he submitted it, that's how I know. I emailed him saying that I only did X and gave hi...
2017/05/21
[ "https://academia.stackexchange.com/questions/89793", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/73807/" ]
I would say that this would be a different situation if the recommendation was for a potential employer, rather than for graduate school admissions. If this were for a potential employer and you might be expected to do Y, this would be a bigger issue, in my opinion. Although the letter does not represent your abiliti...
I also see this more as a professor's problem than yours. You can always explain to whoever may ask that the professor's recommendation was entirely written by him without your influence and oversight (as it should be!) but you really think that the emphasis should be on X. As far as I know, recommendation letters are...
3,933,322
I am facing a problem for writing an sql query which should be easy I guess but I am not able to concentrate on that query. Hence taking some help from this website. Problem: I have an table "Request" which has following columns - CreatedOn: When I create new request, the CreatedOn is filled up with current datetime ...
2010/10/14
[ "https://Stackoverflow.com/questions/3933322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/399037/" ]
``` update Request set State = 'Cancelled' where RequestID = @MyRequestID and State = 'Submitted' and LastModifiedOn < dateadd(mi, -10, getdate()) ``` **Note:** This query is designed to be [SARGable](http://ask.sqlservercentral.com/questions/43/definition-of-sargable) for best performance by not using `L...
``` update Request set State='Cancelled' where State='Submitted' AND dateadd(mi, -10, GetDate()) < ModifiedOn ```
3,933,322
I am facing a problem for writing an sql query which should be easy I guess but I am not able to concentrate on that query. Hence taking some help from this website. Problem: I have an table "Request" which has following columns - CreatedOn: When I create new request, the CreatedOn is filled up with current datetime ...
2010/10/14
[ "https://Stackoverflow.com/questions/3933322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/399037/" ]
``` update Request set State = 'Cancelled' where RequestID = @MyRequestID and State = 'Submitted' and LastModifiedOn < dateadd(mi, -10, getdate()) ``` **Note:** This query is designed to be [SARGable](http://ask.sqlservercentral.com/questions/43/definition-of-sargable) for best performance by not using `L...
update Request set State='Cancelled', LastModifiedOn=getdate() where State = 'Submitted' and datediff(min, LastModifiedOn, getdate()) > 10
3,933,322
I am facing a problem for writing an sql query which should be easy I guess but I am not able to concentrate on that query. Hence taking some help from this website. Problem: I have an table "Request" which has following columns - CreatedOn: When I create new request, the CreatedOn is filled up with current datetime ...
2010/10/14
[ "https://Stackoverflow.com/questions/3933322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/399037/" ]
``` update Request set State = 'Cancelled' where RequestID = @MyRequestID and State = 'Submitted' and LastModifiedOn < dateadd(mi, -10, getdate()) ``` **Note:** This query is designed to be [SARGable](http://ask.sqlservercentral.com/questions/43/definition-of-sargable) for best performance by not using `L...
Are you looking for [DateDiff](http://msdn.microsoft.com/en-us/library/ms189794.aspx)? ``` DATEDIFF(minute, LastModifiedOn, getdate()) > 10 ```
25,262,784
I am developing an application in which I convert an `Object` to an `IList`. I then want to convert it to a `BindingList` Here is the code I am trying ``` IList data = spareEntity.getall() as IList; var listBinding = new BindingList<IList>(data); public object getall() { using (var worldbankAMSentitiesNew = new ...
2014/08/12
[ "https://Stackoverflow.com/questions/25262784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3859356/" ]
you can try as below :- ``` var yourList = spareEntity.getall() as List<Object>; var listBinding = new BindingList<Object>(yourList); ```
``` new BindingList<IList>(data); ``` I think the IList type here is the error. Use the generic type that is usede by IList data .. Spare ? or something ... Try object ``` new BindingList<object>(data); ``` Change your getall() ``` public IList<object> getall() ``` and ``` var data = spareEntity.getall(); `...
21,509,711
I have a class as follows : ``` static class Configuration { private static AppSettingsSection _appSettingsLogsSection; static Configuration() { var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); _appSettingsLogsSection = config.GetS...
2014/02/02
[ "https://Stackoverflow.com/questions/21509711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1657571/" ]
From [MSDN](http://msdn.microsoft.com/en-us/library/aa645758%28v=vs.71%29.aspx): > > The static field variable initializers of a class correspond to a > sequence of assignments that are executed in the textual order in > which they appear in the class declaration. > > > So try to move the initialization to befo...
Static fields are always initialized before static constructor is called. You should initialize `LogSendIntervalMinutes` in static constructor as well. I'd suggest you even make it a property: ``` static class Configuration { private static AppSettingsSection _appSettingsLogsSection; public static int LogSendI...
21,509,711
I have a class as follows : ``` static class Configuration { private static AppSettingsSection _appSettingsLogsSection; static Configuration() { var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); _appSettingsLogsSection = config.GetS...
2014/02/02
[ "https://Stackoverflow.com/questions/21509711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1657571/" ]
From [MSDN](http://msdn.microsoft.com/en-us/library/aa645758%28v=vs.71%29.aspx): > > The static field variable initializers of a class correspond to a > sequence of assignments that are executed in the textual order in > which they appear in the class declaration. > > > So try to move the initialization to befo...
Initializations of static fields are actually part of the type constructor and are executed before the custom type constructor is called. Thus, if `LogSendIntervalMinutes` was an instance field, there would be no problem, but as it is static, its initialization is executed before your static constructor. You just need ...
21,509,711
I have a class as follows : ``` static class Configuration { private static AppSettingsSection _appSettingsLogsSection; static Configuration() { var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); _appSettingsLogsSection = config.GetS...
2014/02/02
[ "https://Stackoverflow.com/questions/21509711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1657571/" ]
From [MSDN](http://msdn.microsoft.com/en-us/library/aa645758%28v=vs.71%29.aspx): > > The static field variable initializers of a class correspond to a > sequence of assignments that are executed in the textual order in > which they appear in the class declaration. > > > So try to move the initialization to befo...
Look at the compile code using `ILSpy` or `Reflector` you will find your answer. Actually ***field initializers are automatically moved inside constructor before your actual code of constructor***. (*static moves to static one and instance to instance contructor*). Decompile code of your class using reflector: ![ent...
21,509,711
I have a class as follows : ``` static class Configuration { private static AppSettingsSection _appSettingsLogsSection; static Configuration() { var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); _appSettingsLogsSection = config.GetS...
2014/02/02
[ "https://Stackoverflow.com/questions/21509711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1657571/" ]
Static fields are always initialized before static constructor is called. You should initialize `LogSendIntervalMinutes` in static constructor as well. I'd suggest you even make it a property: ``` static class Configuration { private static AppSettingsSection _appSettingsLogsSection; public static int LogSendI...
Initializations of static fields are actually part of the type constructor and are executed before the custom type constructor is called. Thus, if `LogSendIntervalMinutes` was an instance field, there would be no problem, but as it is static, its initialization is executed before your static constructor. You just need ...
21,509,711
I have a class as follows : ``` static class Configuration { private static AppSettingsSection _appSettingsLogsSection; static Configuration() { var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); _appSettingsLogsSection = config.GetS...
2014/02/02
[ "https://Stackoverflow.com/questions/21509711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1657571/" ]
Look at the compile code using `ILSpy` or `Reflector` you will find your answer. Actually ***field initializers are automatically moved inside constructor before your actual code of constructor***. (*static moves to static one and instance to instance contructor*). Decompile code of your class using reflector: ![ent...
Initializations of static fields are actually part of the type constructor and are executed before the custom type constructor is called. Thus, if `LogSendIntervalMinutes` was an instance field, there would be no problem, but as it is static, its initialization is executed before your static constructor. You just need ...
31,975,284
I'm trying to include custom standard deviation bars in a chart using VBA, but I keep getting a run time error 13 "type mismatch" in the line that actually adds the bars. I believe it has a problem with my range object (rngStD), but I don't know why. I'm using this VBA in Access, but I've created an Excel application (...
2015/08/12
[ "https://Stackoverflow.com/questions/31975284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5195205/" ]
Removing the padding and setting the box-sizing on the inputs fixed it for me: ``` #idType, #idField { width:35%; box-sizing:border-box; padding:0; } ``` **[jsFiddle example](https://jsfiddle.net/j08691/gx4jqpk7/9/)**
Different input types have different box models. If you regularise them: ``` * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ``` ...they get the same height [**JSfiddle Demo**](https://jsfiddle.net/gx4jqpk7/10/)
31,975,284
I'm trying to include custom standard deviation bars in a chart using VBA, but I keep getting a run time error 13 "type mismatch" in the line that actually adds the bars. I believe it has a problem with my range object (rngStD), but I don't know why. I'm using this VBA in Access, but I've created an Excel application (...
2015/08/12
[ "https://Stackoverflow.com/questions/31975284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5195205/" ]
Removing the padding and setting the box-sizing on the inputs fixed it for me: ``` #idType, #idField { width:35%; box-sizing:border-box; padding:0; } ``` **[jsFiddle example](https://jsfiddle.net/j08691/gx4jqpk7/9/)**
I was able to get them a little closer in size by changing the attributes from **height** to **max-height**, but they still differ slightly. Check this earlier post: [Issue with Input & Select tag height in form](https://stackoverflow.com/questions/9767612/issue-with-input-select-tag-height-in-form)
31,975,284
I'm trying to include custom standard deviation bars in a chart using VBA, but I keep getting a run time error 13 "type mismatch" in the line that actually adds the bars. I believe it has a problem with my range object (rngStD), but I don't know why. I'm using this VBA in Access, but I've created an Excel application (...
2015/08/12
[ "https://Stackoverflow.com/questions/31975284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5195205/" ]
Different input types have different box models. If you regularise them: ``` * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } ``` ...they get the same height [**JSfiddle Demo**](https://jsfiddle.net/gx4jqpk7/10/)
I was able to get them a little closer in size by changing the attributes from **height** to **max-height**, but they still differ slightly. Check this earlier post: [Issue with Input & Select tag height in form](https://stackoverflow.com/questions/9767612/issue-with-input-select-tag-height-in-form)
6,505,573
I am trying to set the java.library.path to the current directory using a BAT-file. Heres what I use: ``` java -Djava.library.path=%cd% pause ``` However it does not work. The command promt just returns this: ``` C:\Users\Johan-bar\Desktop\Arbete>java -Djava.library.path=C:\Users\Johan-bar\De sktop\Arbete Usage: ...
2011/06/28
[ "https://Stackoverflow.com/questions/6505573", "https://Stackoverflow.com", "https://Stackoverflow.com/users/528590/" ]
Your command is not well-formed, as stated by the error-message. Since you are trying to run a jar-file, you should specify it like this: ``` java [-options] -jar jarfile [args...] ``` In your case that would be: ``` java -Djava.library.path=%cd% -jar myJar ``` Note: The reference to the `jar` should contain the ...
You have probably forgotten the quotes `"` Try this: ``` java "-Djava.library.path=C:\Users\Johan-bar\Desktop\Arbete" ```
63,071,109
After creating a `List(Of T)`, I want to create a`Boolean` function. First, we will ask data to add an object in the list. However, in case this new object has the same "DNI" (String attribute from the class Aspirante), then we cannot include this new Object in the list. Therefore, it should be `True` when we have an O...
2020/07/24
[ "https://Stackoverflow.com/questions/63071109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13987579/" ]
This doesn't answer your question directly but it involves a significant amount of code, so it won't work in a comment. You probably shouldn't be using a `List(Of T)` in the first place. The `HashSet(Of T)` already includes functionality to prevent adding duplicate items, so that may be a better option. If you want to...
You can create a `List(Of String)` containing the just the DNI property of each object in `datos`. Then see if the DNI of `objAspirante` is contained in `lst`. ``` Public Class Oposicion Private datos As New List(Of Aspirante)() Public Function Alta(objAspirante As Aspirante) As Boolean Dim lst As New...
63,071,109
After creating a `List(Of T)`, I want to create a`Boolean` function. First, we will ask data to add an object in the list. However, in case this new object has the same "DNI" (String attribute from the class Aspirante), then we cannot include this new Object in the list. Therefore, it should be `True` when we have an O...
2020/07/24
[ "https://Stackoverflow.com/questions/63071109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13987579/" ]
You can create a `List(Of String)` containing the just the DNI property of each object in `datos`. Then see if the DNI of `objAspirante` is contained in `lst`. ``` Public Class Oposicion Private datos As New List(Of Aspirante)() Public Function Alta(objAspirante As Aspirante) As Boolean Dim lst As New...
If you want to stick with your existing `List(Of Aspirante)`, then simply use `.Any()` and pass it a Lambda to determine if one already exists. It'd look something like this: ``` Public Function Alta(ByVal objAspirante As Aspirante) As Boolean If Not datos.Any(Function(x) x.DNI = objAspirante.DNI) Then dat...
63,071,109
After creating a `List(Of T)`, I want to create a`Boolean` function. First, we will ask data to add an object in the list. However, in case this new object has the same "DNI" (String attribute from the class Aspirante), then we cannot include this new Object in the list. Therefore, it should be `True` when we have an O...
2020/07/24
[ "https://Stackoverflow.com/questions/63071109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13987579/" ]
This doesn't answer your question directly but it involves a significant amount of code, so it won't work in a comment. You probably shouldn't be using a `List(Of T)` in the first place. The `HashSet(Of T)` already includes functionality to prevent adding duplicate items, so that may be a better option. If you want to...
If you want to stick with your existing `List(Of Aspirante)`, then simply use `.Any()` and pass it a Lambda to determine if one already exists. It'd look something like this: ``` Public Function Alta(ByVal objAspirante As Aspirante) As Boolean If Not datos.Any(Function(x) x.DNI = objAspirante.DNI) Then dat...
155,273
* I want a template class that defines the same algorithms, but can work on different type of data stored in a member variable. * The exact type of data ideally depends only on a single template parameter. * I don't want run time polymorphism (like have an argument of a pointer to base class that can accept all derive ...
2017/02/13
[ "https://codereview.stackexchange.com/questions/155273", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/118674/" ]
I'm not sure I understand exactly what you're going for, but I think your `Base_template` has way too many parameters. You have: ``` template <typename Data, typename... Data_arg> class Base_template { public: Base_template(Data_arg...data_arg): _data(data_arg...) {} void set_all() { for (int i = 0; i ...
I would suggest using iterators and free functions a la stl. ``` template<class InputIt, class OutputIt> OutputIt copy(InputIt first, InputIt last, OutputIt d_first) { while (first != last) { *d_first++ = *first++; } return d_first; } ``` If you have C++14, generic lambdas might be...
13,737,169
With Google Drive APIs, I am able to initalize DriveService Object using OAuth2.0, but don't know how to initialize AppsService object of Google Provisioning API to work with Domain Gorups and Users. I tried AppsService \_appService = new AppsService("DOMAINNAME", "AuthenticationTokenFromDriveServiceObj"); But, getti...
2012/12/06
[ "https://Stackoverflow.com/questions/13737169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1869234/" ]
You just need to use the setOauth2Credentials with the Oauth2 credentials used to instanciate your Drive instance on your apps service instance, provided of course that your token is valid for scopes of Drive and Provisioning API. [Here](https://developers.google.com/google-apps/provisioning/auth) are the Oauth2 scope...
The Drive API and Provisioning API are scoped differently and can't share OAuth credentials. You need to go through the OAuth flow for the Provisioning API separately, they are completely unrelated APIs. The Provisioning API has not been deprecated. That list is for APIs subject to the deprecation policy, which is pos...
37,871,320
In my app, a user can "speed-read" text by having words flashed on the screen at a speed that they set. I have coded up this functionality in my `UIViewController` using a repeating `NSTimer` and updating the `UILabel` by displaying the next word index, but it's not going as fast as it should be. For example, I tested...
2016/06/17
[ "https://Stackoverflow.com/questions/37871320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2569627/" ]
Your specific question seems to be: `How do I find out what part of the code is taking so long? Is it the updating of the UILabel that's eating up 0.54~~ of the time?` Inside Instruments, provided with Xcode, is a Time Profiler tool. <https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/Ins...
Whenever you want to know about time consumption in iOS you should always go for [Instruments](https://developer.apple.com/library/tvos/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/) and select time profiler as shown in the image.[![enter image description here](https://i.stack.imgur.com/M6iSu.png)](htt...
13,045,303
Hi I have a linq query where I compare an object with all other entity stored in my database. Firstname and lastname are mandatory fields so I don't have to check for null. But in the case of street I have to do these checks. I want to match if both fields are null or empty strings or that they are the same. The belo...
2012/10/24
[ "https://Stackoverflow.com/questions/13045303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750725/" ]
I would simplify: ``` var same = from r in db.Requests where r.firstName.ToLower() == request.firstName.ToLower() && r.lastName.ToLower() == request.lastName.ToLower() select r; if(string.IsNullOrEmpty(request.street)) { same = same.Where(r => string.IsNullOrEmpty(r.street)); } else { string s...
You can just call [String.Equals](http://msdn.microsoft.com/en-us/library/t4411bks.aspx) but ignore case, using an appropriate [StringComparison](http://msdn.microsoft.com/en-us/library/system.stringcomparison.aspx). ``` string.equals(r.street, request.street, StringComparison.OrdinalIgnoreCase); ``` It's bad practi...
13,045,303
Hi I have a linq query where I compare an object with all other entity stored in my database. Firstname and lastname are mandatory fields so I don't have to check for null. But in the case of street I have to do these checks. I want to match if both fields are null or empty strings or that they are the same. The belo...
2012/10/24
[ "https://Stackoverflow.com/questions/13045303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/750725/" ]
I would simplify: ``` var same = from r in db.Requests where r.firstName.ToLower() == request.firstName.ToLower() && r.lastName.ToLower() == request.lastName.ToLower() select r; if(string.IsNullOrEmpty(request.street)) { same = same.Where(r => string.IsNullOrEmpty(r.street)); } else { string s...
How about creating extension method on string `IsEqualOrBothNullOrEmpty` - ``` public static class Extensions { public static bool IsEqualOrBothNullOrEmpty(this string firstValue, string secondValue) { return string.IsNullOrEmpty(firstValue) && string.IsNullOrEmpty...
30,282,482
So the table is centered perfectly. However the td tags aren't correctly. I want the input button to all be centered without any space in between. I have td align center but nothing seems to be working. ```html <html> <head> <title>BuyRite Liquor Store - English Town Road (Old Bridge, NJ)</title> <script src="htt...
2015/05/17
[ "https://Stackoverflow.com/questions/30282482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3645858/" ]
The buttons are centered in your `<td>` tags. If you put all the buttons you would like into one td, they will all be centered. [See the JSBin.](http://jsbin.com/merugijida/1/edit) ``` <html> <head> <title>BuyRite Liquor Store - English Town Road (Old Bridge, NJ)</title> </head> <body> <form> <ta...
To answer your question the input elements are given a default padding by the browser - In chrome this is 1px, and a border, in chrome this is also around the 1px mark. To remove the border I've added in a `<style>` element that explicitly specifies that any `<input>`'s which are children of `<td>` elements will have...
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
The [Environment](http://msdn.microsoft.com/en-us/library/system.environment.aspx) class provides [properties](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx) that can be used to obtain system information.
Since I only have to care about non server editions, I do: ``` enum OS { _2000, XP, Vista, _7, _8 } public static OS GetOS() { var version = Environment.OSVersion.Version; switch (version.Major) { case 5: switch (version.Minor) { case 0: ...
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
The [Environment](http://msdn.microsoft.com/en-us/library/system.environment.aspx) class provides [properties](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx) that can be used to obtain system information.
Using the registry is something that is possible for any application. In C# I have made myself a utility class for this. Note that Microsoft has changed the key for Windows 10+ (which this class is designed to already handle). The class should give you the information you need, I think: ``` namespace Inspection { ...
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
The [Environment](http://msdn.microsoft.com/en-us/library/system.environment.aspx) class provides [properties](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx) that can be used to obtain system information.
System.Runtime.InteropServices.RuntimeInformation.OSDescription [Alex Sanséau's answer](https://stackoverflow.com/a/47390306/13159913)
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
You can get OS information from System. Environment.OSVersion [Here](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx)
Have a look at [System.Environment](http://msdn.microsoft.com/en-us/library/system.environment.aspx) It has property [OSVersion](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx)
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
Since I only have to care about non server editions, I do: ``` enum OS { _2000, XP, Vista, _7, _8 } public static OS GetOS() { var version = Environment.OSVersion.Version; switch (version.Major) { case 5: switch (version.Minor) { case 0: ...
Using the registry is something that is possible for any application. In C# I have made myself a utility class for this. Note that Microsoft has changed the key for Windows 10+ (which this class is designed to already handle). The class should give you the information you need, I think: ``` namespace Inspection { ...
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
You can get OS information from System. Environment.OSVersion [Here](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx)
Using the registry is something that is possible for any application. In C# I have made myself a utility class for this. Note that Microsoft has changed the key for Windows 10+ (which this class is designed to already handle). The class should give you the information you need, I think: ``` namespace Inspection { ...
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
Have a look at [System.Environment](http://msdn.microsoft.com/en-us/library/system.environment.aspx) It has property [OSVersion](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx)
Using the registry is something that is possible for any application. In C# I have made myself a utility class for this. Note that Microsoft has changed the key for Windows 10+ (which this class is designed to already handle). The class should give you the information you need, I think: ``` namespace Inspection { ...
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
The [Environment](http://msdn.microsoft.com/en-us/library/system.environment.aspx) class provides [properties](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx) that can be used to obtain system information.
You can get OS information from System. Environment.OSVersion [Here](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx)
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
You can get OS information from System. Environment.OSVersion [Here](http://msdn.microsoft.com/en-us/library/system.environment.osversion.aspx)
System.Runtime.InteropServices.RuntimeInformation.OSDescription [Alex Sanséau's answer](https://stackoverflow.com/a/47390306/13159913)
1,410,092
How can I get the OS details using C# code in my WPF application?
2009/09/11
[ "https://Stackoverflow.com/questions/1410092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88096/" ]
Since I only have to care about non server editions, I do: ``` enum OS { _2000, XP, Vista, _7, _8 } public static OS GetOS() { var version = Environment.OSVersion.Version; switch (version.Major) { case 5: switch (version.Minor) { case 0: ...
System.Runtime.InteropServices.RuntimeInformation.OSDescription [Alex Sanséau's answer](https://stackoverflow.com/a/47390306/13159913)
575,973
> > I need to check whether this integral converges or not $\int^{\infty}\_{-\infty} \frac{e^{-x}}{1+x^2}\,dx$ > > > I substituted $y=-x$ then this integral transformed to $\int^{\infty}\_{-\infty} \frac{e^{y}}{1+y^2}\,dy$ , then I thought of dividing it into two parts from $-\infty$ to $0$ and then from $0$ to $\...
2013/11/21
[ "https://math.stackexchange.com/questions/575973", "https://math.stackexchange.com", "https://math.stackexchange.com/users/53265/" ]
**Hint:** Check $\lim\_{x\to\pm\infty}\frac{e^{-x}}{1+x^2}$. Are both zero? If not, then this implies that the integral does not converge (since the integrand is strictly positive, we can't have cancellation as in the $\sin(x^2)$ case).
Hint : You first calculate $$\int\_a^b \frac{e^{-x}}{1+x^2}dx$$ and then send $b\rightarrow \infty$ and $a\rightarrow -\infty$. If this limit exists then, your integral converges.
59,499,602
I have hundreds of tsv file with following structure (example): ``` GH1 123 family1 GH2 23 family2 . . . GH4 45 family4 GH6 34 family6 ``` And i have a text file with list of words (thousands): ``` GH1 GH2 GH3 . . . GH1000 ``` I want to get output which contain number of each words occurred in each file like this...
2019/12/27
[ "https://Stackoverflow.com/questions/59499602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11577509/" ]
using `np.where` and `pd.crosstab` ``` df['Group'] = np.where(df['Group'].isin(['Group_A','Group_B']),'Sum_AB','Sum_C') df2 = pd.crosstab(df.ID,df.Group,df.Unit_sold,aggfunc='sum').reset_index() print(df2) Group ID Sum_AB Sum_C 0 1247 85.0 27.0 1 1539 72.0 40.0 ```
Use [`series.replace`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.replace.html) to replace the Group column and [`assign`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.assign.html) with `groupby()` and [`unstack`](https://pandas.pydata.org/pandas-docs/stable/...
41,408,314
I have two controllers (RegistrationController,ReportController) and one factory (StudentService). StudentService has a method calculate age which takes date as parameter. It also has a list of students. In RegistrationController there are two methods, calculateage which calls factory method and passes date which is ...
2016/12/31
[ "https://Stackoverflow.com/questions/41408314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6826488/" ]
Only do this: ``` my_user = User.objects.create(username=request.POST['username'], password = request.POST['password'] ) my_user.save() ``` You need to save created instance of model not just call .save() function of model.
in testapp\urls.py: swap the url routing logic ``` from django.conf.urls import url from .import views urlpatterns = [ url(r'^registered/$', views.create_user, name="registered"), url(r'^$', views.index, name="Index") ] ```
34,359,052
I am trying to test my **$http** request using karma and jasmine.I make one controller and inject a service .In service I call $http service.I need to test that service how I will test this service this is my controller. ``` angular.module('app',[]).controller('first',function($scope,data){ $scope.name='test'; ...
2015/12/18
[ "https://Stackoverflow.com/questions/34359052", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3701974/" ]
i may be wrong friend, but i believe you are returning HTML code "\*now when i'm trying to get it in my Adroide code i get this exception: JSON EXception\*\*\*\*\*\* Value <\ br of type java.lang.String cannot be converted to JSONObject" you see where it says "Value **<\ br**" but the value you are trying to retreiv...
Thank you for your quick response to my question then I have just solve my problem **I used the GetMethod to get My JSONObject cotent** then it worked for me this is the full Working code... ``` //setting up the default HttpClient HttpClient httpClient=new DefaultHttpClient(); ...
15,399,565
I am running a suite of roughly 200 test cases that take about 45 minutes running Chrome. When I use IE, the tests take almost 2 hours and suffer from intermittent errors that are coming from timeouts. I have read that turning the screenshots off will help, but that does not seem to have been much help.
2013/03/14
[ "https://Stackoverflow.com/questions/15399565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/949725/" ]
Not sure if this will work for your situation but on your collection, add a parse method that accepts your data. You may have a nested array that Backbone isn't able to retrieve the internal data from. ``` parse: function(data) { return data[0]; } ``` I would add a debug point inside this parse method to see if th...
Problem was this... var thecats= myCats(); thecats.fetch(); Hope it helps someone
15,399,565
I am running a suite of roughly 200 test cases that take about 45 minutes running Chrome. When I use IE, the tests take almost 2 hours and suffer from intermittent errors that are coming from timeouts. I have read that turning the screenshots off will help, but that does not seem to have been much help.
2013/03/14
[ "https://Stackoverflow.com/questions/15399565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/949725/" ]
Nowhere in the code you've posted have you actually fetched your collection from the server. Attempt this: ``` var catCollection = new MyCats(); catCollection.fetch(); var angryCatsView = new AngryCatsView({collection: catCollection}); angryCatsView.render(); ```
Not sure if this will work for your situation but on your collection, add a parse method that accepts your data. You may have a nested array that Backbone isn't able to retrieve the internal data from. ``` parse: function(data) { return data[0]; } ``` I would add a debug point inside this parse method to see if th...
15,399,565
I am running a suite of roughly 200 test cases that take about 45 minutes running Chrome. When I use IE, the tests take almost 2 hours and suffer from intermittent errors that are coming from timeouts. I have read that turning the screenshots off will help, but that does not seem to have been much help.
2013/03/14
[ "https://Stackoverflow.com/questions/15399565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/949725/" ]
Nowhere in the code you've posted have you actually fetched your collection from the server. Attempt this: ``` var catCollection = new MyCats(); catCollection.fetch(); var angryCatsView = new AngryCatsView({collection: catCollection}); angryCatsView.render(); ```
Problem was this... var thecats= myCats(); thecats.fetch(); Hope it helps someone
32,863,893
having problem with deploying the application previously worked fine but now tomcat is not able to deploy .It's a maven restful web application using jersey framework .The following error occurs when trying to deploy the application. ``` at org.glassfish.jersey.server.internal.monitoring.CompositeApplicationEventL...
2015/09/30
[ "https://Stackoverflow.com/questions/32863893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5193079/" ]
Animation is event driven. To animate "on load", you need to add `startup` to your options... ``` animation:{ duration: 1000, easing: 'out', startup: true }, ```
After much research it seems that Google doesn't yet have the option for Bar charts to animate on load. I found a column chart however that does has an on-load animation option which works for me. Found it here: <http://jsfiddle.net/gb758owr/> ``` <script type="text/javascript" src="https://www.google.com/jsapi"></scr...
30,218,166
I made a class `row2` for the `img` that I want to rotate. There are three `img` elements that I want to rotate when the visibility is `xs` and `sm`. Now my question is how can I rotate a `img` when the max visibility is `visible-xs` and `visible-sm` without the rotating of `visible-md` and `visible-lg`? ``` <...
2015/05/13
[ "https://Stackoverflow.com/questions/30218166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4895936/" ]
If you want to remove all the buttons in the panel you can use: ``` panel.removeAll(); ``` If you want to remove the first 4 buttons in the panel you can use: ``` for (int i = 0; i < 4, i++) panel.remove(0); ``` If you are trying to remove a certain type of component from the panel then you need to start at t...
You must have distinct instances for each `buttonBlankItems` button. I guess that you are adding the same button 5 times and then you are trying to remove them.
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
A non-recursive approach that adds the ability to filter and modify the products before actually adding them to the result set. Note: the use of `.map` rather than `.forEach`. In some browsers, `.map` runs faster. ```js function crossproduct(arrays, rowtest, rowaction) { // Calculate the number of elements needed i...
For the record Here it goes my version of it. I made it using the simplest javascript iterator "for()", so it's compatible on every case and has the best performance. ``` function cartesian(arrays){ var quant = 1, counters = [], retArr = []; // Counts total possibilities and build the counters Array; for...
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
Another, even more simplified, 2021-style answer using only reduce, map, and concat methods: ```js const cartesian = (...arr) => arr.reduce((a,c) => a.map(e => c.map(f => e.concat([f]))).reduce((a,c) => a.concat(c), []), [[]]); console.log(cartesian([1, 2], [10, 20], [100, 200, 300])); ```
A simple, modified version of @viebel's code in plain Javascript: ``` function cartesianProduct(...arrays) { return arrays.reduce((a, b) => { return [].concat(...a.map(x => { const next = Array.isArray(x) ? x : [x]; return [].concat(b.map(y => next.concat(...[y]))); })); }); } const product = ...
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
For those happy with a ramda solution: ``` import { xprod, flatten } from 'ramda'; const cartessian = (...xs) => xs.reduce(xprod).map(flatten) ``` Or the same without dependencies and two lego blocks for free (`xprod` and `flatten`): ``` const flatten = xs => xs.flat(); const xprod = (xs, ys) => xs.flatMap(x => y...
A non-recursive approach that adds the ability to filter and modify the products before actually adding them to the result set. Note: the use of `.map` rather than `.forEach`. In some browsers, `.map` runs faster. ```js function crossproduct(arrays, rowtest, rowaction) { // Calculate the number of elements needed i...
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
The following efficient [generator function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/function*#Generatoren_und_Iteratoren_in_Firefox-Versionen_vor_26) returns the cartesian product of all given [iterables](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_prot...
Using a typical backtracking with ES6 generators, ```js function cartesianProduct(...arrays) { let current = new Array(arrays.length); return (function* backtracking(index) { if(index == arrays.length) yield current.slice(); else for(let num of arrays[index]) { current[index] = num; yield...
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
The following efficient [generator function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/function*#Generatoren_und_Iteratoren_in_Firefox-Versionen_vor_26) returns the cartesian product of all given [iterables](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_prot...
For those happy with a ramda solution: ``` import { xprod, flatten } from 'ramda'; const cartessian = (...xs) => xs.reduce(xprod).map(flatten) ``` Or the same without dependencies and two lego blocks for free (`xprod` and `flatten`): ``` const flatten = xs => xs.flat(); const xprod = (xs, ys) => xs.flatMap(x => y...
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
**functional programming** This question is tagged *functional-programming* so let's take a look at the [*List monad*](https://en.wikipedia.org/wiki/Monad_(functional_programming)#Another_example:_List): > > One application for this monadic list is representing nondeterministic computation. `List` *can hold results ...
For those happy with a ramda solution: ``` import { xprod, flatten } from 'ramda'; const cartessian = (...xs) => xs.reduce(xprod).map(flatten) ``` Or the same without dependencies and two lego blocks for free (`xprod` and `flatten`): ``` const flatten = xs => xs.flat(); const xprod = (xs, ys) => xs.flatMap(x => y...
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
A single line approach, for better reading with indentations. ``` result = data.reduce( (a, b) => a.reduce( (r, v) => r.concat(b.map(w => [].concat(v, w))), [] ) ); ``` It takes a single array with arrays of wanted cartesian items. ```js var data = [[1, 2], [10, 20], [100, 200, 300]], r...
```js var chars = ['A', 'B', 'C'] var nums = [1, 2, 3] var cartesianProduct = function() { return _.reduce(arguments, function(a, b) { return _.flatten(_.map(a, function(x) { return _.map(b, function(y) { return x.concat(y); }); }), true); }, [ [] ]); }; console.log(...
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
**functional programming** This question is tagged *functional-programming* so let's take a look at the [*List monad*](https://en.wikipedia.org/wiki/Monad_(functional_programming)#Another_example:_List): > > One application for this monadic list is representing nondeterministic computation. `List` *can hold results ...
No libraries needed! :) ======================= Needs arrow functions though and probably not that efficient. :/ ```js const flatten = (xs) => xs.flat(Infinity) const binaryCartesianProduct = (xs, ys) => xs.map((xi) => ys.map((yi) => [xi, yi])).flat() const cartesianProduct = (...xss) => xss.reduce(bin...
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
2020 Update: 1-line (!) answer with vanilla JS ============================================== **Original 2017 Answer: 2-line answer with vanilla JS:** *(see updates below)* All of the answers here are **overly complicated**, most of them take 20 lines of code or even more. This example uses just **two lines of vanil...
A single line approach, for better reading with indentations. ``` result = data.reduce( (a, b) => a.reduce( (r, v) => r.concat(b.map(w => [].concat(v, w))), [] ) ); ``` It takes a single array with arrays of wanted cartesian items. ```js var data = [[1, 2], [10, 20], [100, 200, 300]], r...
12,303,989
How would you implement the Cartesian product of multiple arrays in JavaScript? As an example, ``` cartesian([1, 2], [10, 20], [100, 200, 300]) ``` should return ``` [ [1, 10, 100], [1, 10, 200], [1, 10, 300], [2, 10, 100], [2, 10, 200] ... ] ```
2012/09/06
[ "https://Stackoverflow.com/questions/12303989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813665/" ]
The following efficient [generator function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/function*#Generatoren_und_Iteratoren_in_Firefox-Versionen_vor_26) returns the cartesian product of all given [iterables](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_prot...
Modern JavaScript in just a few lines. No external libraries or dependencies like Lodash. ```js function cartesian(...arrays) { return arrays.reduce((a, b) => a.flatMap(x => b.map(y => x.concat([y]))), [ [] ]); } console.log( cartesian([1, 2], [10, 20], [100, 200, 300]) .map(arr => JSON.stringify(arr)) ...
42,847,629
I am having trouble changing the footer background colour in my CSS doc. ``` footer{ background-color: lightblue; text-align: center; } ``` I also can't change the aside background color. ``` aside{ background-color: lightgray; } ``` I would really appreciate the help.
2017/03/17
[ "https://Stackoverflow.com/questions/42847629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7724471/" ]
You can use a div inside the footer. See bellow fiddle: ```css .site-footer { background: orange; } #footer-content { background: red; } ``` ```html <footer class="site-footer"> <div id="footer-content"> <p>Copyright 2017 @ Domain - All Rights Reserved </p> </div> </footer> ```
Following code is work for FREE THEMES specifically. ``` .site-footer .footer-top { background: #eee ; } ``` If you want to change the background color of footer text area as well, you can add following code with the first one ine the customize>Additionial CSS are: ``` .site-footer .footer-bottom { bor...
42,847,629
I am having trouble changing the footer background colour in my CSS doc. ``` footer{ background-color: lightblue; text-align: center; } ``` I also can't change the aside background color. ``` aside{ background-color: lightgray; } ``` I would really appreciate the help.
2017/03/17
[ "https://Stackoverflow.com/questions/42847629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7724471/" ]
You can use a div inside the footer. See bellow fiddle: ```css .site-footer { background: orange; } #footer-content { background: red; } ``` ```html <footer class="site-footer"> <div id="footer-content"> <p>Copyright 2017 @ Domain - All Rights Reserved </p> </div> </footer> ```
```css footer { background-color: #40e0d0; text-align: justify; } aside { background-color: ; text-align: justify; } ``` Above script is perfect working on my blogger site on "Add custom CSS editing theme code" <https://www.seemainfoelibrary.com/search/label/Business%20Law> Thank you ever much I was...
244,146
I know there is this Chinese National Firewall that prevent Chinese access to website hosted outside of China. But recently I encountered its opposite, I have a site hosted in China and it been run OK for well over a year. Recently, the site can only be accessed within China, but not out of China, which I found strange...
2011/03/07
[ "https://serverfault.com/questions/244146", "https://serverfault.com", "https://serverfault.com/users/74356/" ]
I would recommend linking them together with OpenVPN. OpenVPN allows you to link networks together. You can find a very detailed walkthrough [here](http://www.shorewall.net/OPENVPN.html). Everything is secure that way.
I think OpenVPn may be your answer (see what TiZon said). However just to complete the picture, *serious* ways of doing this would be: * [Site-to-site hardware firewall terminated VPN](http://computer.howstuffworks.com/vpn3.htm) The firewall in location A maintains a constant VPN to the firewall in location B, allow...
20,207,481
This works for my homepage to make a image fit my background. ``` <body> <div style="height:100%; background-image:url(location.png); background-size:cover;"> <?php include("homebuttons.php");?> </div> </body> ``` But doesn't seem to want to work in this one ``` <body> <div style="height:100%; background-image:url(...
2013/11/26
[ "https://Stackoverflow.com/questions/20207481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2395454/" ]
What you want to do is specify a group of letters that you want to remove. This is done using `[]`. ``` sed 's/[aeiouAEIOU]//g' ``` So for example ``` echo "Hi Im Brad" | sed 's/[aeiouAEIOU]//g' ``` Gives me ``` H m Brd ```
For single character deletions, you can use the `tr` utility: ``` tr -d '[aeiouAEIOU]' ```
20,207,481
This works for my homepage to make a image fit my background. ``` <body> <div style="height:100%; background-image:url(location.png); background-size:cover;"> <?php include("homebuttons.php");?> </div> </body> ``` But doesn't seem to want to work in this one ``` <body> <div style="height:100%; background-image:url(...
2013/11/26
[ "https://Stackoverflow.com/questions/20207481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2395454/" ]
What you want to do is specify a group of letters that you want to remove. This is done using `[]`. ``` sed 's/[aeiouAEIOU]//g' ``` So for example ``` echo "Hi Im Brad" | sed 's/[aeiouAEIOU]//g' ``` Gives me ``` H m Brd ```
`sed 's/[aeiouAEIOU]*//g' <your file>` For more information on sed see: <http://www.pement.org/sed/sed1line.txt>
20,207,481
This works for my homepage to make a image fit my background. ``` <body> <div style="height:100%; background-image:url(location.png); background-size:cover;"> <?php include("homebuttons.php");?> </div> </body> ``` But doesn't seem to want to work in this one ``` <body> <div style="height:100%; background-image:url(...
2013/11/26
[ "https://Stackoverflow.com/questions/20207481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2395454/" ]
For single character deletions, you can use the `tr` utility: ``` tr -d '[aeiouAEIOU]' ```
`sed 's/[aeiouAEIOU]*//g' <your file>` For more information on sed see: <http://www.pement.org/sed/sed1line.txt>
24,365,971
I have a query ``` SELECT l.id,l.name,l.city,l.email,l.phone,l.status,l.source,l.leadCreatedTime,l.organizationId FROM ( SELECT id FROM leads where removed='0' ORDER BY id LIMIT 40000 ) o JOIN leads l ON l.id = o.id ORDER BY l.id ``` I want to convert this qu...
2014/06/23
[ "https://Stackoverflow.com/questions/24365971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3623062/" ]
can u test my code it may help you as it is codegniter format ``` $this->db- >select('l.id,l.name,l.city,l.email,l.phone,l.status,l.source,l.leadCreatedTime,l.organizationId'); $this->db->from('(SELECT id FROM leads where removed="0" ORDER BY id LIMIT 40000) o'); $this->db->join('leads l', 'l.id = o.id'); $this->db->o...
This May works for you: ``` $this->db->select('l.id,l.name,l.city,l.email,l.phone,l.status,l.source,l.leadCreatedTime,l.organizationId'); $this->db->from('leads o'); $this->db->join('leads l', 'l.id = o.id'); $this->db->order_by("l.id", "asc"); $q = $this->db->get(); ```
3,668
How does one go about building a portable repeater for use at events? Preferably at low cost, and with a minimum of bulky parts (so it's travel friendly). Obviously you'd need a pair of radios to handle RX and TX, taking into account that the TX radio will probably have an above-average duty cycle. I'd imagine you'd ...
2015/03/03
[ "https://ham.stackexchange.com/questions/3668", "https://ham.stackexchange.com", "https://ham.stackexchange.com/users/304/" ]
You can simplify this a lot if you can set up and use a cross band repeater instead of an in band unit (licence dependent). Units like the Yaesu FT-8800 have a cross band repeat mode built in as standard and will just need a single antenna and a power supply or battery.
A guy on youtube built one: <https://www.youtube.com/watch?v=VMkULsNU2_A> His VHF/UHF repeater is built into a waterproof pelican case: * 4X Yaesu FT-60R radios * Radio-Tone repeater controller * Some assembly required.
3,668
How does one go about building a portable repeater for use at events? Preferably at low cost, and with a minimum of bulky parts (so it's travel friendly). Obviously you'd need a pair of radios to handle RX and TX, taking into account that the TX radio will probably have an above-average duty cycle. I'd imagine you'd ...
2015/03/03
[ "https://ham.stackexchange.com/questions/3668", "https://ham.stackexchange.com", "https://ham.stackexchange.com/users/304/" ]
You can simplify this a lot if you can set up and use a cross band repeater instead of an in band unit (licence dependent). Units like the Yaesu FT-8800 have a cross band repeat mode built in as standard and will just need a single antenna and a power supply or battery.
If it were me, I would want something self-contained. This example has a repeater, controller and a gateway (this was a potable networkable single site solution for public safety) in a 6u rolling rack chassis we, BridgeCom Systems made. This would easily house a repeater or mobiles, small battery and all your cables, r...
3,668
How does one go about building a portable repeater for use at events? Preferably at low cost, and with a minimum of bulky parts (so it's travel friendly). Obviously you'd need a pair of radios to handle RX and TX, taking into account that the TX radio will probably have an above-average duty cycle. I'd imagine you'd ...
2015/03/03
[ "https://ham.stackexchange.com/questions/3668", "https://ham.stackexchange.com", "https://ham.stackexchange.com/users/304/" ]
You can simplify this a lot if you can set up and use a cross band repeater instead of an in band unit (licence dependent). Units like the Yaesu FT-8800 have a cross band repeat mode built in as standard and will just need a single antenna and a power supply or battery.
You can build a repeater using 2 Motorola CDM radios and a RICK box. <http://www.ebay.com/itm/MOTOROLA-REPEATER-RICK-HLN3333-/301682707188?pt=LH_DefaultDomain_0&hash=item463db0caf4> see this youtube <https://www.youtube.com/watch?v=WpNIwV9S4Bw>
21,329,515
This is my entire code. Shared to you. This is my error: ``` Notice: Undefined index: page in /export/home/dynamic/index.php on line 20 ``` I can't seem to figure out why I keep getting this error. It is not the first time, I've suspected that it is the array but I don't know what to do with it. It's suppose to ma...
2014/01/24
[ "https://Stackoverflow.com/questions/21329515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3231462/" ]
You need to check if `page` was transmitted via GET vars: ``` if(isset($_GET['page'])) { $page = $_GET['page']; } else { // set proper default value if it was not set $page = 'index'; } ``` In the next step you need to check if `$page` contains a proper value: ``` if(!in_array($page, $pages)) { die(...
You're assigning a value that doesn't exist. Before using a $\_GET you should be checking that it exists. Use `isset($_GET['page'];)`
21,329,515
This is my entire code. Shared to you. This is my error: ``` Notice: Undefined index: page in /export/home/dynamic/index.php on line 20 ``` I can't seem to figure out why I keep getting this error. It is not the first time, I've suspected that it is the array but I don't know what to do with it. It's suppose to ma...
2014/01/24
[ "https://Stackoverflow.com/questions/21329515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3231462/" ]
You're assigning a value that doesn't exist. Before using a $\_GET you should be checking that it exists. Use `isset($_GET['page'];)`
Just little upgrage to previous answer ``` <?php $p = array("Home", "About", "Hosting", "VPS","GameServer","Contact"); if ((isset($_GET['page']) || !empty($_GET['page'])) && in_array($_GET['page'], $p)) { include('pages/'.$_GET['page'].'.php'); }else{ include('pages/home.php'); } ?> ``...
21,329,515
This is my entire code. Shared to you. This is my error: ``` Notice: Undefined index: page in /export/home/dynamic/index.php on line 20 ``` I can't seem to figure out why I keep getting this error. It is not the first time, I've suspected that it is the array but I don't know what to do with it. It's suppose to ma...
2014/01/24
[ "https://Stackoverflow.com/questions/21329515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3231462/" ]
You need to check if `page` was transmitted via GET vars: ``` if(isset($_GET['page'])) { $page = $_GET['page']; } else { // set proper default value if it was not set $page = 'index'; } ``` In the next step you need to check if `$page` contains a proper value: ``` if(!in_array($page, $pages)) { die(...
It is because `'page'` is not an existing index in `$_GET`. You can check that it is first ``` $page = isset($_GET['page']) ? $_GET['page'] : ""; ``` or you can silence the notice ``` $page = @$_GET['page']; ``` afterwards, just check if the page is a known page ``` $page = in_array($page, $knownPages) ? $page :...
21,329,515
This is my entire code. Shared to you. This is my error: ``` Notice: Undefined index: page in /export/home/dynamic/index.php on line 20 ``` I can't seem to figure out why I keep getting this error. It is not the first time, I've suspected that it is the array but I don't know what to do with it. It's suppose to ma...
2014/01/24
[ "https://Stackoverflow.com/questions/21329515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3231462/" ]
You need to check if `page` was transmitted via GET vars: ``` if(isset($_GET['page'])) { $page = $_GET['page']; } else { // set proper default value if it was not set $page = 'index'; } ``` In the next step you need to check if `$page` contains a proper value: ``` if(!in_array($page, $pages)) { die(...
``` $p = array("Home", "About", "Hosting", "VPS","GameServer","Contact"); if(isset($_GET['page']) AND in_array($_GET['page'],$p)) { include('pages/'.$_GET['page'].'.php'); }else{ include('pages/home.php'); } ```
21,329,515
This is my entire code. Shared to you. This is my error: ``` Notice: Undefined index: page in /export/home/dynamic/index.php on line 20 ``` I can't seem to figure out why I keep getting this error. It is not the first time, I've suspected that it is the array but I don't know what to do with it. It's suppose to ma...
2014/01/24
[ "https://Stackoverflow.com/questions/21329515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3231462/" ]
You need to check if `page` was transmitted via GET vars: ``` if(isset($_GET['page'])) { $page = $_GET['page']; } else { // set proper default value if it was not set $page = 'index'; } ``` In the next step you need to check if `$page` contains a proper value: ``` if(!in_array($page, $pages)) { die(...
Just little upgrage to previous answer ``` <?php $p = array("Home", "About", "Hosting", "VPS","GameServer","Contact"); if ((isset($_GET['page']) || !empty($_GET['page'])) && in_array($_GET['page'], $p)) { include('pages/'.$_GET['page'].'.php'); }else{ include('pages/home.php'); } ?> ``...
21,329,515
This is my entire code. Shared to you. This is my error: ``` Notice: Undefined index: page in /export/home/dynamic/index.php on line 20 ``` I can't seem to figure out why I keep getting this error. It is not the first time, I've suspected that it is the array but I don't know what to do with it. It's suppose to ma...
2014/01/24
[ "https://Stackoverflow.com/questions/21329515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3231462/" ]
It is because `'page'` is not an existing index in `$_GET`. You can check that it is first ``` $page = isset($_GET['page']) ? $_GET['page'] : ""; ``` or you can silence the notice ``` $page = @$_GET['page']; ``` afterwards, just check if the page is a known page ``` $page = in_array($page, $knownPages) ? $page :...
Just little upgrage to previous answer ``` <?php $p = array("Home", "About", "Hosting", "VPS","GameServer","Contact"); if ((isset($_GET['page']) || !empty($_GET['page'])) && in_array($_GET['page'], $p)) { include('pages/'.$_GET['page'].'.php'); }else{ include('pages/home.php'); } ?> ``...
21,329,515
This is my entire code. Shared to you. This is my error: ``` Notice: Undefined index: page in /export/home/dynamic/index.php on line 20 ``` I can't seem to figure out why I keep getting this error. It is not the first time, I've suspected that it is the array but I don't know what to do with it. It's suppose to ma...
2014/01/24
[ "https://Stackoverflow.com/questions/21329515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3231462/" ]
``` $p = array("Home", "About", "Hosting", "VPS","GameServer","Contact"); if(isset($_GET['page']) AND in_array($_GET['page'],$p)) { include('pages/'.$_GET['page'].'.php'); }else{ include('pages/home.php'); } ```
Just little upgrage to previous answer ``` <?php $p = array("Home", "About", "Hosting", "VPS","GameServer","Contact"); if ((isset($_GET['page']) || !empty($_GET['page'])) && in_array($_GET['page'], $p)) { include('pages/'.$_GET['page'].'.php'); }else{ include('pages/home.php'); } ?> ``...
4,122,173
Consider the class $\mathcal{F}\_n^m$ of families of sets consisting of $n$ sets $s\_i \subset \{1,2,\dots,n\cdot m\}$ of size $m$. For a family of sets $F \in \mathcal{F}\_n^m$, $F = \{s\_1,\dots,s\_n\}$ with $|s\_i| = m$, the size $\Sigma(F)$ of its union $\bigcup\_{i=1,\dots,n} s\_i$ is some number of which the uppe...
2021/04/30
[ "https://math.stackexchange.com/questions/4122173", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1792/" ]
The result is correct, but it's hard to justify along the lines you proposed. As an alternative method: Consider the possible outcomes of the first roll, and note that, if the game does not end, then it restarts (and, of course, will have the same expectation, $E$, going forward). We see that $$E=\frac 16 \times \le...
While $P = NX$ is a valid definition, $N$ and $X$ are not independent, so you cannot say that $\mathbb E(P) = \mathbb E(N)\mathbb E(X)$, which is generally false for dependent variables. Additionally, I do not think that $\mathbb E(X) = 3.5$ -- but to get the right answer for your question, I think you'll want to take ...
4,122,173
Consider the class $\mathcal{F}\_n^m$ of families of sets consisting of $n$ sets $s\_i \subset \{1,2,\dots,n\cdot m\}$ of size $m$. For a family of sets $F \in \mathcal{F}\_n^m$, $F = \{s\_1,\dots,s\_n\}$ with $|s\_i| = m$, the size $\Sigma(F)$ of its union $\bigcup\_{i=1,\dots,n} s\_i$ is some number of which the uppe...
2021/04/30
[ "https://math.stackexchange.com/questions/4122173", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1792/" ]
The result is correct, but it's hard to justify along the lines you proposed. As an alternative method: Consider the possible outcomes of the first roll, and note that, if the game does not end, then it restarts (and, of course, will have the same expectation, $E$, going forward). We see that $$E=\frac 16 \times \le...
To make your approach more formal, let $N$ be the number of rolls until the game stops, and $X\_i$ the value of the $i$th roll ($i=1,2....$). The total payoff $P$ is $\sum\limits\_{i=1}^\infty X\_i$. Given $N$: $$E(P\vert N)=E(\sum\limits\_{i=1}^\infty$X\_i\vert N)=\sum\limits\_{i=1}^N E(X\_i\vert N)=5\cdot (N-1)+2=5N-...