qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
9,157,000
Should I have to add external jar files even I have to use Maven dependencies. I am really new to maven and really cant understand what its actually use for. Please guide me understanding maven.Thank you.
2012/02/06
[ "https://Stackoverflow.com/questions/9157000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134935/" ]
Traditionally , if your project requires to use some open source tools and frameworks , you have to manually download them from those tools' official websites . If you want to use libraries A only , but this libraries A depends on the code from another libraries B , you have to download both libraries A and B. It is ve...
I'd recomment to read this book: <http://www.sonatype.com/books/mvnref-book/reference/>. In general, Maven project should not have *lib* folder with jars since in 99% of the cases, necessary dependencies can be retrieved from various repositories.
9,157,000
Should I have to add external jar files even I have to use Maven dependencies. I am really new to maven and really cant understand what its actually use for. Please guide me understanding maven.Thank you.
2012/02/06
[ "https://Stackoverflow.com/questions/9157000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1134935/" ]
Traditionally , if your project requires to use some open source tools and frameworks , you have to manually download them from those tools' official websites . If you want to use libraries A only , but this libraries A depends on the code from another libraries B , you have to download both libraries A and B. It is ve...
You don't need to add any external libraries manually. You need to add those lib as dependencies in maven, thereafter, maven will handle the library for you. For example if you need to add `slf4j` external library(jar) to your project as a dependency, add the following to the maven `pom.xml` file. ``` <dependency> ...
52,336,355
I have the following DataFrame: ``` Stint Year ID Data1 Data2 Team 1 2010 A 10 1 SFN 1 2011 A 10 1 SFN 1 2013 A 10 1 SFN 2 2013 A 10 1 ATL 1 1922 B 10 1 ARI 1 1923 B 10 1 ...
2018/09/14
[ "https://Stackoverflow.com/questions/52336355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4612630/" ]
### `groupby` with `as_index=False` Will not include grouped columns in a new index ``` df.groupby(['Year', 'ID'], as_index=False)[['Data1', 'Data2']].sum() Year ID Data1 Data2 0 1922 B 10 1 1 1923 B 10 1 2 1924 B 10 1 3 2010 A 10 1 4 2011 A 10 1 5 2013 A...
**`groupby` with `sort=false`** Also, if you like to keep your data in the same Year format ie. [2010,2011,2013,1922,1923,1924], you can check 'sort=False' so the same code can be written with the sort values set to false as: ``` df.groupby(['Year', 'ID'], as_index= False, sort= False)[['Data1', 'Data2']].sum() ```
35,582,985
I'm developing an app using Apache Cordova for Visual Studio. The purpose of this app is to take a picture using the phone and upload this picture alongside with some other user input data to our company's webpage, that uses a SQL-server Database to store it's data. So, the question is: How can I insert data to this ...
2016/02/23
[ "https://Stackoverflow.com/questions/35582985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4940908/" ]
If you use `\A` instead of anchor `^` then it will fail the match: ``` # finds no match grep -Pz -- '\A<\?xml.*\?>' file ``` This `grep` in a multiline string `^` matches at the start of every line but `\A` matches at the real start of input.
You can join the lines to a big line by `xargs` before applying the regex: ``` # no match returns cat test.txt | xargs | grep '^<?xml.*?>' ``` [Check for more usage on `xargs`](http://tecadmin.net/xargs-command-in-linux-with-example/#)
35,582,985
I'm developing an app using Apache Cordova for Visual Studio. The purpose of this app is to take a picture using the phone and upload this picture alongside with some other user input data to our company's webpage, that uses a SQL-server Database to store it's data. So, the question is: How can I insert data to this ...
2016/02/23
[ "https://Stackoverflow.com/questions/35582985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4940908/" ]
If you use `\A` instead of anchor `^` then it will fail the match: ``` # finds no match grep -Pz -- '\A<\?xml.*\?>' file ``` This `grep` in a multiline string `^` matches at the start of every line but `\A` matches at the real start of input.
Your question is unclear, but if you want `grep` to treat all the lines as a single line, you can replace all the linefeeds in `test.txt` with spaces before passing it into `grep`, like this: ``` grep "pattern" <( tr '\n' ' ' < test.txt) ``` Your original file will remain unaffected, the translation of linefeeds to...
35,582,985
I'm developing an app using Apache Cordova for Visual Studio. The purpose of this app is to take a picture using the phone and upload this picture alongside with some other user input data to our company's webpage, that uses a SQL-server Database to store it's data. So, the question is: How can I insert data to this ...
2016/02/23
[ "https://Stackoverflow.com/questions/35582985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4940908/" ]
If you use `\A` instead of anchor `^` then it will fail the match: ``` # finds no match grep -Pz -- '\A<\?xml.*\?>' file ``` This `grep` in a multiline string `^` matches at the start of every line but `\A` matches at the real start of input.
### `grep` pattern containing newline ([bash](/questions/tagged/bash "show questions tagged 'bash'"): `$'\n'`) Try this: ``` grep -Pz '\AThis.*\n<\?xml.*\?>' test.txt ``` , this ``` grep -Pz '<\?xml.*\?>' test.txt ``` , this ``` grep -Pz '^<\?xml.*\?>' test.txt ``` and this ``` grep -Pz '\A<\?xml.*\?>' test...
35,582,985
I'm developing an app using Apache Cordova for Visual Studio. The purpose of this app is to take a picture using the phone and upload this picture alongside with some other user input data to our company's webpage, that uses a SQL-server Database to store it's data. So, the question is: How can I insert data to this ...
2016/02/23
[ "https://Stackoverflow.com/questions/35582985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4940908/" ]
If you use `\A` instead of anchor `^` then it will fail the match: ``` # finds no match grep -Pz -- '\A<\?xml.*\?>' file ``` This `grep` in a multiline string `^` matches at the start of every line but `\A` matches at the real start of input.
It's very unclear what you want but maybe it's: ``` awk -v RS='<[?]xml.*[?]>' '$0=RT' file ``` For example: ``` $ cat file This is bad, real bad! <?xml version="1.0" encoding="UTF-8" ?> <wsdl:definitions targetNamespace="http://tips.cf" xmlns:impl="http://tips.cf" xmlns:intf="http://tips.cf"...
35,582,985
I'm developing an app using Apache Cordova for Visual Studio. The purpose of this app is to take a picture using the phone and upload this picture alongside with some other user input data to our company's webpage, that uses a SQL-server Database to store it's data. So, the question is: How can I insert data to this ...
2016/02/23
[ "https://Stackoverflow.com/questions/35582985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4940908/" ]
### `grep` pattern containing newline ([bash](/questions/tagged/bash "show questions tagged 'bash'"): `$'\n'`) Try this: ``` grep -Pz '\AThis.*\n<\?xml.*\?>' test.txt ``` , this ``` grep -Pz '<\?xml.*\?>' test.txt ``` , this ``` grep -Pz '^<\?xml.*\?>' test.txt ``` and this ``` grep -Pz '\A<\?xml.*\?>' test...
You can join the lines to a big line by `xargs` before applying the regex: ``` # no match returns cat test.txt | xargs | grep '^<?xml.*?>' ``` [Check for more usage on `xargs`](http://tecadmin.net/xargs-command-in-linux-with-example/#)
35,582,985
I'm developing an app using Apache Cordova for Visual Studio. The purpose of this app is to take a picture using the phone and upload this picture alongside with some other user input data to our company's webpage, that uses a SQL-server Database to store it's data. So, the question is: How can I insert data to this ...
2016/02/23
[ "https://Stackoverflow.com/questions/35582985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4940908/" ]
### `grep` pattern containing newline ([bash](/questions/tagged/bash "show questions tagged 'bash'"): `$'\n'`) Try this: ``` grep -Pz '\AThis.*\n<\?xml.*\?>' test.txt ``` , this ``` grep -Pz '<\?xml.*\?>' test.txt ``` , this ``` grep -Pz '^<\?xml.*\?>' test.txt ``` and this ``` grep -Pz '\A<\?xml.*\?>' test...
Your question is unclear, but if you want `grep` to treat all the lines as a single line, you can replace all the linefeeds in `test.txt` with spaces before passing it into `grep`, like this: ``` grep "pattern" <( tr '\n' ' ' < test.txt) ``` Your original file will remain unaffected, the translation of linefeeds to...
35,582,985
I'm developing an app using Apache Cordova for Visual Studio. The purpose of this app is to take a picture using the phone and upload this picture alongside with some other user input data to our company's webpage, that uses a SQL-server Database to store it's data. So, the question is: How can I insert data to this ...
2016/02/23
[ "https://Stackoverflow.com/questions/35582985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4940908/" ]
### `grep` pattern containing newline ([bash](/questions/tagged/bash "show questions tagged 'bash'"): `$'\n'`) Try this: ``` grep -Pz '\AThis.*\n<\?xml.*\?>' test.txt ``` , this ``` grep -Pz '<\?xml.*\?>' test.txt ``` , this ``` grep -Pz '^<\?xml.*\?>' test.txt ``` and this ``` grep -Pz '\A<\?xml.*\?>' test...
It's very unclear what you want but maybe it's: ``` awk -v RS='<[?]xml.*[?]>' '$0=RT' file ``` For example: ``` $ cat file This is bad, real bad! <?xml version="1.0" encoding="UTF-8" ?> <wsdl:definitions targetNamespace="http://tips.cf" xmlns:impl="http://tips.cf" xmlns:intf="http://tips.cf"...
63,282,620
I'm getting this error when I try to run my app, I'm using all the same dependencies that I always use so I'm very baffled by this. > > Warn in > > > in ./assets/css/style.css > > > Module Warning (from ./node\_modules/postcss-loader/src/index.js): > > (13:3) start value has mixed support, consider using flex-...
2020/08/06
[ "https://Stackoverflow.com/questions/63282620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7961158/" ]
If the `signUp` method is blocking (i.e. it returns once the signup is finished), your code should work as expected. So I suspect it is asynchronous. In that case, on top of using a boolean, you could also use a `CountDownLatch` to wait until the async method completes: ``` AtomicBoolean success = new AtomicBoolean(f...
An `AtomicBoolean` variable (`success`) is used correctly. Most probably, ``` Log.d("success", String.valueOf(success.get())); ``` is called before ``` result -> success.set(true) ``` because of asynchronous execution of callback. Alternatively result callback is not called at all. **You can test it by changing ...
63,282,620
I'm getting this error when I try to run my app, I'm using all the same dependencies that I always use so I'm very baffled by this. > > Warn in > > > in ./assets/css/style.css > > > Module Warning (from ./node\_modules/postcss-loader/src/index.js): > > (13:3) start value has mixed support, consider using flex-...
2020/08/06
[ "https://Stackoverflow.com/questions/63282620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7961158/" ]
If the `signUp` method is blocking (i.e. it returns once the signup is finished), your code should work as expected. So I suspect it is asynchronous. In that case, on top of using a boolean, you could also use a `CountDownLatch` to wait until the async method completes: ``` AtomicBoolean success = new AtomicBoolean(f...
@assylias's and @jakub-bialy's answers are totally valid. However, neither considers the `error` callback. Additionally, using a `CountDownLatch` directly is a little low-level. Amplify provides an [`rxbindings`](https://github.com/aws-amplify/amplify-android/tree/main/rxbindings#amplify-android-rxbindings) module, wh...
12,788,334
I have this query: ``` SELECT queue.first_dealer, queue.second_dealer, queue.status FROM queue WHERE queue.status = 3 AND queue.first_dealer = $user_id OR queue.second_dealer = $user_id AND queue.status = 3 ORDER BY id DESC LIMIT 5 ``` But sometimes the first\_dealer or the second\_dealer can be the same, I want to ...
2012/10/08
[ "https://Stackoverflow.com/questions/12788334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442577/" ]
this is the Line you have to comment out: ``` var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50.... ``` Joomla 2.5 /libraries/joomla/html/\*/behavior.php Line xxx comment it out Joomla 3.x /libraries/cms/html/behavior.php Line 287 comment it out
This is not the exactly what you need.But if you just want to hide the tooltip, you can set the display property to none- ``` .tip-wrap { display: none !important; } ```
12,788,334
I have this query: ``` SELECT queue.first_dealer, queue.second_dealer, queue.status FROM queue WHERE queue.status = 3 AND queue.first_dealer = $user_id OR queue.second_dealer = $user_id AND queue.status = 3 ORDER BY id DESC LIMIT 5 ``` But sometimes the first\_dealer or the second\_dealer can be the same, I want to ...
2012/10/08
[ "https://Stackoverflow.com/questions/12788334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442577/" ]
This is not the exactly what you need.But if you just want to hide the tooltip, you can set the display property to none- ``` .tip-wrap { display: none !important; } ```
If you use a template only approach to removing javascript - some components still force the addition of code. So - far the only reliable solution I have found is utilizing a plugin to block js - JSS - CSS control: <http://extensions.joomla.org/extensions/extension/core-enhancements/performance/js-css-control>
12,788,334
I have this query: ``` SELECT queue.first_dealer, queue.second_dealer, queue.status FROM queue WHERE queue.status = 3 AND queue.first_dealer = $user_id OR queue.second_dealer = $user_id AND queue.status = 3 ORDER BY id DESC LIMIT 5 ``` But sometimes the first\_dealer or the second\_dealer can be the same, I want to ...
2012/10/08
[ "https://Stackoverflow.com/questions/12788334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442577/" ]
this is the Line you have to comment out: ``` var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50.... ``` Joomla 2.5 /libraries/joomla/html/\*/behavior.php Line xxx comment it out Joomla 3.x /libraries/cms/html/behavior.php Line 287 comment it out
``` $doc->_script = preg_replace('window\.addEvent\(\'domready\',\s*function\(\)\s*{\s*\$\$\(\'.hasTip\'\).each\(function\(el\)\s*{\s*var\s*title\s*=\s*el.get\(\'title\'\);\s*if\s*\(title\)\s*{\s*var\s*parts\s*=\s*title.split\(\'::\',\s*2\);\s*el.store\(\'tip:title\',\s*parts\[0\]\);\s*el.store\(\'tip:text\',\s*parts\[...
12,788,334
I have this query: ``` SELECT queue.first_dealer, queue.second_dealer, queue.status FROM queue WHERE queue.status = 3 AND queue.first_dealer = $user_id OR queue.second_dealer = $user_id AND queue.status = 3 ORDER BY id DESC LIMIT 5 ``` But sometimes the first\_dealer or the second\_dealer can be the same, I want to ...
2012/10/08
[ "https://Stackoverflow.com/questions/12788334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442577/" ]
``` $doc->_script = preg_replace('window\.addEvent\(\'domready\',\s*function\(\)\s*{\s*\$\$\(\'.hasTip\'\).each\(function\(el\)\s*{\s*var\s*title\s*=\s*el.get\(\'title\'\);\s*if\s*\(title\)\s*{\s*var\s*parts\s*=\s*title.split\(\'::\',\s*2\);\s*el.store\(\'tip:title\',\s*parts\[0\]\);\s*el.store\(\'tip:text\',\s*parts\[...
If you use a template only approach to removing javascript - some components still force the addition of code. So - far the only reliable solution I have found is utilizing a plugin to block js - JSS - CSS control: <http://extensions.joomla.org/extensions/extension/core-enhancements/performance/js-css-control>
12,788,334
I have this query: ``` SELECT queue.first_dealer, queue.second_dealer, queue.status FROM queue WHERE queue.status = 3 AND queue.first_dealer = $user_id OR queue.second_dealer = $user_id AND queue.status = 3 ORDER BY id DESC LIMIT 5 ``` But sometimes the first\_dealer or the second\_dealer can be the same, I want to ...
2012/10/08
[ "https://Stackoverflow.com/questions/12788334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442577/" ]
this is the Line you have to comment out: ``` var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50.... ``` Joomla 2.5 /libraries/joomla/html/\*/behavior.php Line xxx comment it out Joomla 3.x /libraries/cms/html/behavior.php Line 287 comment it out
If you use a template only approach to removing javascript - some components still force the addition of code. So - far the only reliable solution I have found is utilizing a plugin to block js - JSS - CSS control: <http://extensions.joomla.org/extensions/extension/core-enhancements/performance/js-css-control>
102,092
This sort of has 2 questions... Under the description I see no duration anywhere in either the standard players handbook for Channel Divinity and also in the Volume of Forgotten Lore book for this ability as well. > > Starting at 2nd level, by presenting your holy symbol and spending a > use of Channel Divinity, you...
2017/06/22
[ "https://rpg.stackexchange.com/questions/102092", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15215/" ]
### Your critical hits are not affected at all! If you roll a 20 on an attack roll, meaning the die itself shows a 20, it is always a critical hit, as explained on PHB p. 194: > > If the d20 roll for an attack is a 20, the attack hits **regardless of any modifiers** or the target's AC. This is called a **critical hi...
See page 194 of the PHB: > > If the d20 roll for an attack is 20, the attack hits regardless of any modifiers or the target's AC. In addition, the attack is a critical hit... > > > Great Weapon Master has no impact on this. You could have a -30 on the attack roll and it wouldn't matter. You still hit and you stil...
66,027,315
I tested this with 2.14.0 and 2.13.3 I used the JDBC Appender in combination with the DynamicThresholdFilter and tried out a normal Logger and also the AsyncLogger. In the JDBC Appender i also tried out the PoolingDriver and the ConnectionFactory approach. It turns out that the Threads are not started parallel becaus...
2021/02/03
[ "https://Stackoverflow.com/questions/66027315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1668645/" ]
Thanks for getting the flight recordings up. This is a pretty interesting scenario, but I'm afraid I can't give conclusive answers, mostly because for some reason 1. The information in your flight recordings is weirdly incomplete. I'll explain a little more shortly 2. There seems to be other things going on in your sy...
I tested on MySQL db and I found lock on following method: ``` org.apache.logging.log4j.core.appender.db.AbstractDatabaseManager.write(org.apache.logging.log4j.core.LogEvent, java.io.Serializable) (line: 261) ``` because in the source code you can see synchronization on write method: ```java /** * This met...
250,878
I've got a table that stores survey question information and I'm looking to find out a count based on gender, race, etc My issue is that I have to reference the same columns multiple times in the where clause and I'm not sure the best way to do that. example: I need to know the count all of the people that answered ...
2019/10/11
[ "https://dba.stackexchange.com/questions/250878", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/161469/" ]
Having your schema would be helpful in helping with your specific query. Without the full schema, here are some pointers for how you *might* write a query to get your results. Assuming you have a single `dbo.SurveyResults` table, where there is some ID (`survey_id`) that is used to identify all the results from a give...
You can nest your `CASE` statements, as follows: ``` CASE WHEN <condition 1> THEN CASE WHEN <sub-condition 1> THEN <output 1> ELSE <output 2> END WHEN <condition 2> THEN CASE WHEN <sub-condition 2> THEN <output 3> ELSE <output 4> END ELSE <output 5> END AS CaseTest ``` You start each ...
121,755
In the fourth Harry Potter movie, when they went to the Portkey, how did someone put it there without touching it? I mean also the triwizard cup, how did the guy put it there without teleporting to the graveyard?
2016/03/10
[ "https://scifi.stackexchange.com/questions/121755", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/63100/" ]
Book Answer =========== Portkeys can be set to go at a specific time. > > Almost any inanimate object can be turned into a Portkey. Once bewitched, the object will transport anyone who grasps it to a pre-arranged destination. **A Portkey may also be enchanted to transport the grasper (or graspers) only at a given ti...
The portkey on the hill could easily have been maneuvered to where it was using Wingardium Leviosa or a number of other charms, or placed it there before making into a port key. Similarly, Moody/Crouch made the Triwizard Cup a portkey after placing it in the center of the maze, which he did himself. (On a side note, I'...
121,755
In the fourth Harry Potter movie, when they went to the Portkey, how did someone put it there without touching it? I mean also the triwizard cup, how did the guy put it there without teleporting to the graveyard?
2016/03/10
[ "https://scifi.stackexchange.com/questions/121755", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/63100/" ]
*How* were the Portkeys placed where they were? =============================================== The Portkey at the top of Stoatshead Hill was ‘timed’: it was not actually a functioning Portkey until a specific moment in time. How this was done, we don’t know (or at least I don’t); but it was (emphasis mine in all foll...
The portkey on the hill could easily have been maneuvered to where it was using Wingardium Leviosa or a number of other charms, or placed it there before making into a port key. Similarly, Moody/Crouch made the Triwizard Cup a portkey after placing it in the center of the maze, which he did himself. (On a side note, I'...
121,755
In the fourth Harry Potter movie, when they went to the Portkey, how did someone put it there without touching it? I mean also the triwizard cup, how did the guy put it there without teleporting to the graveyard?
2016/03/10
[ "https://scifi.stackexchange.com/questions/121755", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/63100/" ]
*How* were the Portkeys placed where they were? =============================================== The Portkey at the top of Stoatshead Hill was ‘timed’: it was not actually a functioning Portkey until a specific moment in time. How this was done, we don’t know (or at least I don’t); but it was (emphasis mine in all foll...
Book Answer =========== Portkeys can be set to go at a specific time. > > Almost any inanimate object can be turned into a Portkey. Once bewitched, the object will transport anyone who grasps it to a pre-arranged destination. **A Portkey may also be enchanted to transport the grasper (or graspers) only at a given ti...
405,914
We have $k\_1:= \mathbb F\_7(\alpha)$ and $k\_2 := \mathbb F\_7(\beta)$ where $\alpha^2 = 3$ and $\beta^2 = -1$ in $\mathbb F\_7$. I have to show that these two are isomorphic. Let $\phi:k\_1 \rightarrow k\_2$ be a homomorphism which preserves $1 \in k\_1$. Then $$\phi(\alpha^2)= \phi(3) = 3 = \phi(\alpha)^2$$ whe...
2013/05/29
[ "https://math.stackexchange.com/questions/405914", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Well, you have a candidate; why don't you check whether $\phi((a+b\alpha)(c+d\alpha)) = \phi(a+b\alpha)\phi(c+d\alpha)$, for all $a,b,c,d \in \mathbb{F}\_7$? For sums it's trivial, as you already define it as a linear map over the base field.
An idea: since $$k\_1=\Bbb F\_7[x]/\langle\;x^2-3\;\rangle\;,\;\;k\_2=\Bbb F\_7[x]/\langle\;x^2+1\;\rangle$$ Now, in both cases there exists a *primitive element*, i.e.: an element that generates the multiplicative group $\,k\_i^\*\;$ , so if you find both elements in both fields you shall be done... For example: le...
405,914
We have $k\_1:= \mathbb F\_7(\alpha)$ and $k\_2 := \mathbb F\_7(\beta)$ where $\alpha^2 = 3$ and $\beta^2 = -1$ in $\mathbb F\_7$. I have to show that these two are isomorphic. Let $\phi:k\_1 \rightarrow k\_2$ be a homomorphism which preserves $1 \in k\_1$. Then $$\phi(\alpha^2)= \phi(3) = 3 = \phi(\alpha)^2$$ whe...
2013/05/29
[ "https://math.stackexchange.com/questions/405914", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Well, you have a candidate; why don't you check whether $\phi((a+b\alpha)(c+d\alpha)) = \phi(a+b\alpha)\phi(c+d\alpha)$, for all $a,b,c,d \in \mathbb{F}\_7$? For sums it's trivial, as you already define it as a linear map over the base field.
Hint: $ $ mod $\,7\!:\ \alpha^2 \equiv 3 \equiv -4 = 4\beta^2\! = (2\beta)^2,\,$ so check $\,\alpha \to 2\beta\,$ preserves sums and products.
405,914
We have $k\_1:= \mathbb F\_7(\alpha)$ and $k\_2 := \mathbb F\_7(\beta)$ where $\alpha^2 = 3$ and $\beta^2 = -1$ in $\mathbb F\_7$. I have to show that these two are isomorphic. Let $\phi:k\_1 \rightarrow k\_2$ be a homomorphism which preserves $1 \in k\_1$. Then $$\phi(\alpha^2)= \phi(3) = 3 = \phi(\alpha)^2$$ whe...
2013/05/29
[ "https://math.stackexchange.com/questions/405914", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Hint: $ $ mod $\,7\!:\ \alpha^2 \equiv 3 \equiv -4 = 4\beta^2\! = (2\beta)^2,\,$ so check $\,\alpha \to 2\beta\,$ preserves sums and products.
An idea: since $$k\_1=\Bbb F\_7[x]/\langle\;x^2-3\;\rangle\;,\;\;k\_2=\Bbb F\_7[x]/\langle\;x^2+1\;\rangle$$ Now, in both cases there exists a *primitive element*, i.e.: an element that generates the multiplicative group $\,k\_i^\*\;$ , so if you find both elements in both fields you shall be done... For example: le...
24,638,104
I have a setup in my code where there is a datagridview. For each row I have a combo box cell that I have a separate combo box cell since I want a different selection of items for each cell. **Problem** : The cell only drops down when the arrow is double clicked. How can I change the cell formatting, or possibly a ce...
2014/07/08
[ "https://Stackoverflow.com/questions/24638104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3169706/" ]
Change the EditMode property: ``` DataGridView1.EditMode = DataGridViewEditMode.EditOnEnter ```
There seems to be a nearly identical question and a very good answer. It involves using the click\_event. Here is the link: [How to manually drop down a DataGridViewComboBoxColumn?](https://stackoverflow.com/questions/241100/how-to-manually-drop-down-a-datagridviewcomboboxcolumn) **In the link:** ``` Private Sub cell...
153,673
What is the best way to add redirect function into the save button on a newform in SharePoint 2013. When the user create a list item, he/she should be redirected to another form. Is it possible to get and parse the new generated item ID? Start - Newform URL: <http://mysharepoint.com/sites/project/lists/alist/NewForm....
2015/08/19
[ "https://sharepoint.stackexchange.com/questions/153673", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/10453/" ]
### Add the URL of the next form as the &Source=[url] parameter The Source parameter in the URL is where the browser is redirected to after a Form is saved. Open an EditForm and investigate the URL The URL has to be URL encoded (and it needs to be within the SharePoint domain) ``` https://xxx.sharepoint.com/sites/VM/...
Danny gave a great answer already, but in case someone is looking to do this within a SharePoint-Hosted App, you can create a custom button within Default.aspx with this code: ``` <asp:HyperLink CssClass="menuLink" runat="server" NavigateUrl="JavaScript:window.location = _spPageContextInfo.webAbsoluteUrl + ...
153,673
What is the best way to add redirect function into the save button on a newform in SharePoint 2013. When the user create a list item, he/she should be redirected to another form. Is it possible to get and parse the new generated item ID? Start - Newform URL: <http://mysharepoint.com/sites/project/lists/alist/NewForm....
2015/08/19
[ "https://sharepoint.stackexchange.com/questions/153673", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/10453/" ]
### Add the URL of the next form as the &Source=[url] parameter The Source parameter in the URL is where the browser is redirected to after a Form is saved. Open an EditForm and investigate the URL The URL has to be URL encoded (and it needs to be within the SharePoint domain) ``` https://xxx.sharepoint.com/sites/VM/...
I racked my brain trying to figure out how to both save and redirect to another page and after almost a week of failed attempts I discovered this page on msdn that reveals the different properties of the SharePoint:SaveButton. <https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.savebutton_members...
153,673
What is the best way to add redirect function into the save button on a newform in SharePoint 2013. When the user create a list item, he/she should be redirected to another form. Is it possible to get and parse the new generated item ID? Start - Newform URL: <http://mysharepoint.com/sites/project/lists/alist/NewForm....
2015/08/19
[ "https://sharepoint.stackexchange.com/questions/153673", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/10453/" ]
### Add the URL of the next form as the &Source=[url] parameter The Source parameter in the URL is where the browser is redirected to after a Form is saved. Open an EditForm and investigate the URL The URL has to be URL encoded (and it needs to be within the SharePoint domain) ``` https://xxx.sharepoint.com/sites/VM/...
This worked for me. Give it a try. ``` function PreSaveAction() { var URL = location.pathname.replace('NewForm.aspx', 'EditForm.aspx'); if (GetUrlKeyValue('IsDlg') === '1') { URL += "?IsDlg=1"; } $("#aspnetForm").attr('action', location.pathname + "?Source=" + URL); return true; } ```
153,673
What is the best way to add redirect function into the save button on a newform in SharePoint 2013. When the user create a list item, he/she should be redirected to another form. Is it possible to get and parse the new generated item ID? Start - Newform URL: <http://mysharepoint.com/sites/project/lists/alist/NewForm....
2015/08/19
[ "https://sharepoint.stackexchange.com/questions/153673", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/10453/" ]
Danny gave a great answer already, but in case someone is looking to do this within a SharePoint-Hosted App, you can create a custom button within Default.aspx with this code: ``` <asp:HyperLink CssClass="menuLink" runat="server" NavigateUrl="JavaScript:window.location = _spPageContextInfo.webAbsoluteUrl + ...
I racked my brain trying to figure out how to both save and redirect to another page and after almost a week of failed attempts I discovered this page on msdn that reveals the different properties of the SharePoint:SaveButton. <https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.savebutton_members...
153,673
What is the best way to add redirect function into the save button on a newform in SharePoint 2013. When the user create a list item, he/she should be redirected to another form. Is it possible to get and parse the new generated item ID? Start - Newform URL: <http://mysharepoint.com/sites/project/lists/alist/NewForm....
2015/08/19
[ "https://sharepoint.stackexchange.com/questions/153673", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/10453/" ]
Danny gave a great answer already, but in case someone is looking to do this within a SharePoint-Hosted App, you can create a custom button within Default.aspx with this code: ``` <asp:HyperLink CssClass="menuLink" runat="server" NavigateUrl="JavaScript:window.location = _spPageContextInfo.webAbsoluteUrl + ...
This worked for me. Give it a try. ``` function PreSaveAction() { var URL = location.pathname.replace('NewForm.aspx', 'EditForm.aspx'); if (GetUrlKeyValue('IsDlg') === '1') { URL += "?IsDlg=1"; } $("#aspnetForm").attr('action', location.pathname + "?Source=" + URL); return true; } ```
229,051
I'm a month new to this, and my first model I made a Rubik cube. When I made an edge piece, I made it from 3 separate objects and joined them together to make one piece. It worked for what I wanted in the end but if in the future I had joined the whole Rubik cube together for another blend file so all the pieces would ...
2021/06/30
[ "https://blender.stackexchange.com/questions/229051", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/124401/" ]
You don't need so many polygons if you can use a *Subdivision Surface* modifier, in that case you can create circles with only 8 vertices. Also you don't need to subdivide your flat surfaces so much, example: [![enter image description here](https://i.stack.imgur.com/9r8Vh.jpg)](https://i.stack.imgur.com/9r8Vh.jpg) I...
Duplicating them after a proper joining will work. What I mean by a proper joining is that you have vertices between parts that have lined up at the same location and that you have merged those vertices do there are no duplicates. ["m" merge by distance] Without merging like that forever will you be able to separate th...
69,011,638
I am scraping the company names as well as the company leads from LinkedIn Sales Navigator, While I get the names of companies in my output, I fail to get the company leads ie. Names of People from the navigator. Here's the code for the same. ``` # some code lead_links = [] leads_button = browser.find_elements...
2021/09/01
[ "https://Stackoverflow.com/questions/69011638", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15034606/" ]
You can simply switch over `status` inside the body of your view and assign the correct `String` and `foregroundColor` to your `Text` inside each `case. ``` struct StatusView: View { let status: Status var body: some View { switch status { case .accepted: Text("accepted") ...
Here is an updated and refactored answer based on **David** answer, with this way you do not need that `ststusColor` function anymore and you can access the **colorValue** every where in your project instead of last answer that was accessible only inside `StatusView`. ``` struct StatusView: View { let status: Sta...
122,293
I live in Japan and milk is sold only in cartons here. I take milk to the fridge at work. I currently put it in a black plastic bottle with black cover but it stinks like it is off after only a few days. The milk is fine as far as I can tell. I doubt there is food safe plastic bottles here. I carry by bicycle and the b...
2022/11/10
[ "https://cooking.stackexchange.com/questions/122293", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/27429/" ]
The key thing is that you **empty and wash the container regularly** (ideally daily, but at least every few days). If there is a bad smell that is a sign that something is wrong; most likely some milk remained somewhere like a screw top or drops on the lid, which has gone off in some way. **Any bottle sold for drinkin...
Your question is not entirely clear, so I will answer for both possible options. If you are trying to keep the milk for multiple days in the fridge ------------------------------------------------------------------ It will become unsafe after 3-5 days, there is no way around that. If you switch to UHT milk, it will s...
122,293
I live in Japan and milk is sold only in cartons here. I take milk to the fridge at work. I currently put it in a black plastic bottle with black cover but it stinks like it is off after only a few days. The milk is fine as far as I can tell. I doubt there is food safe plastic bottles here. I carry by bicycle and the b...
2022/11/10
[ "https://cooking.stackexchange.com/questions/122293", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/27429/" ]
The key thing is that you **empty and wash the container regularly** (ideally daily, but at least every few days). If there is a bad smell that is a sign that something is wrong; most likely some milk remained somewhere like a screw top or drops on the lid, which has gone off in some way. **Any bottle sold for drinkin...
**Sterilized shelf stable milk in small cartons.** [![milk](https://i.stack.imgur.com/3lHUO.png)](https://i.stack.imgur.com/3lHUO.png) <https://www.morinagamilk.co.jp/english/products/jp/> Order a bunch and bring the unopened cartons to work. Or ask the store where you shop to start stocking it.
907,541
Would it be ok to put an "average price" calculation, as below, in the view? Or is this against MVC and is it better to do this in the controller? ``` <p>Average price: <%= @seller.total_sales / @seller.num_sales %></p> ```
2009/05/25
[ "https://Stackoverflow.com/questions/907541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112177/" ]
Neither. Put it in the model. Then it becomes easy to unit test.
Ask you several things: Will this average price will be often displayed Is it a part of a view (is it used to display something ?) Does it need complex things to get/calcul/retrieve or whatever ? If you think it's just an hint for your user, it's used only once, then you can let it in your view. But if you feel unco...
907,541
Would it be ok to put an "average price" calculation, as below, in the view? Or is this against MVC and is it better to do this in the controller? ``` <p>Average price: <%= @seller.total_sales / @seller.num_sales %></p> ```
2009/05/25
[ "https://Stackoverflow.com/questions/907541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112177/" ]
Neither. Put it in the model. Then it becomes easy to unit test.
Put your business logic where it belongs in the model: ``` <p>Average price: <%= @seller.get_average_price () %></p> ```
22,619,506
How can i see in if a binary image is almost all black or all white in numpy or scikit-image modules ? I thought about `numpy.all` function or `numpy.any` but i do not know how neither for a total black image nor for a almost black image.
2014/03/24
[ "https://Stackoverflow.com/questions/22619506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1223157/" ]
Supposing you followed the instructions from <http://libcinder.org/docs/welcome/GitSetup.html> ... According to the site > > "Cinder is free, open-source and available for Mac OS X, iOS and Windows." > > > So no ubuntu is supported out of the box. When I look at the source it has some very deep dependencies to ...
As **fritzone** said, there is no current version running on Linux, however there is some development (hopefully) happening. <https://forum.libcinder.org/topic/basicapp-in-linux> And probably for Android as well.
22,619,506
How can i see in if a binary image is almost all black or all white in numpy or scikit-image modules ? I thought about `numpy.all` function or `numpy.any` but i do not know how neither for a total black image nor for a almost black image.
2014/03/24
[ "https://Stackoverflow.com/questions/22619506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1223157/" ]
Supposing you followed the instructions from <http://libcinder.org/docs/welcome/GitSetup.html> ... According to the site > > "Cinder is free, open-source and available for Mac OS X, iOS and Windows." > > > So no ubuntu is supported out of the box. When I look at the source it has some very deep dependencies to ...
This is a good thread to follow for a recent discussion: <https://forum.libcinder.org/topic/next-steps-for-the-linux-fork> The linux-dev-glfw3 branch works, but is outdated at this point as the cinder\_master is using GLNext.
22,619,506
How can i see in if a binary image is almost all black or all white in numpy or scikit-image modules ? I thought about `numpy.all` function or `numpy.any` but i do not know how neither for a total black image nor for a almost black image.
2014/03/24
[ "https://Stackoverflow.com/questions/22619506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1223157/" ]
This is a good thread to follow for a recent discussion: <https://forum.libcinder.org/topic/next-steps-for-the-linux-fork> The linux-dev-glfw3 branch works, but is outdated at this point as the cinder\_master is using GLNext.
As **fritzone** said, there is no current version running on Linux, however there is some development (hopefully) happening. <https://forum.libcinder.org/topic/basicapp-in-linux> And probably for Android as well.
4,577,762
How can i have pop menu in C# 2008 i want to add a pop menu which is similar to pop menu which covers the feature of cut copy paste in windows xp
2011/01/02
[ "https://Stackoverflow.com/questions/4577762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/559063/" ]
If you mean a `ContextMenu` or a `MainMenu`, right-click the toolbox in Visual Studio -> Select Items -> look for those two in System.Windows.Forms.dll, then check the boxes and press OK. Now they should be in the toolbox, so you can add them like other controls.
Do you mean it for a richTextBox or something like that? Add a ContextMenuStrip to your Form1. I know it looks a bit odd where it appears, bear with me. Put in Cut, Copy, Paste, Delete << that is the conventional order. Then do something along these lines (untested) ``` private void cutToolStripMenuItem_Click(object s...
41,805
I am baking a 3 tier wedding cake for August. It will consist of 2 white layers and 1 chocolate layer in the middle. I am covering these layers with white fondant. Should I rather stabilize these layers with straws or rather wooden skewers?
2014/02/06
[ "https://cooking.stackexchange.com/questions/41805", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/23037/" ]
I have done a couple of 3 tiered wedding cakes. I would recommend using something stronger than plastic straws, mainly for your peace of mind. You will be putting a lot of effort into the cakes and like @Joe said, the straws can be useless if crushed or deflected. If you want to use the straws so that the wooden skewer...
Having tiered cakes need "pipes" I would say. Instead me explaining the process I could share a link with you. There's this cake "Boss" Buddy Valastro : TLC Star. <http://www.tlc.com/tv-shows/cake-boss/photos/buddys-sketchbook-season-4-pictures.htm> He shows number of ways to slice, dice , stand , hang, hold cakes in...
5,901
So [Sawa in another thread](https://japanese.stackexchange.com/questions/5876/how-do-you-say-you-have-gotten-better-at-x/5880#comment14949_5880) says that こと cannot be used in the example below. Even though it performs the same function as の (as far as I can see). > > 料理が(前より(もっと)) {上手だ/上手い/上手になった/上手くなった} > > > **...
2012/06/19
[ "https://japanese.stackexchange.com/questions/5901", "https://japanese.stackexchange.com", "https://japanese.stackexchange.com/users/769/" ]
The difference is difficult and the linked question gives a decent explanation, but here is my two cents: When you use `料理するのが`, it immediately feels like there is a direct actor involved. If you look at all the examples sentences in the link, when you use `の`, it puts a focus on the fact that somebody is performing t...
It's a very rough and shallow answer, but: * こと is a concept/an idea. * の is a tangible thing. You can be good only at doing the tangible thing. It's meaningless to be good at an idea. Just remember that with "上手だ", it's "の" that works for the reasons I mentioned. With other "verbs," more complex explanations may be...
22,455,384
I need to assign nested values to a dictionary. I have simplified my question for ease of understanding: ``` Data = {} day1 = 'March12' day2 = 'March14' e1 = 'experiment1' e2 = 'experiment2' Data[day1][e1] = 4 ``` But the `Data[day1][e1] = 4` command does not function (for the same reason as `test = {} ; test["...
2014/03/17
[ "https://Stackoverflow.com/questions/22455384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3235479/" ]
You need to store a *new* dictionary inside of `Data` to make this work: ``` Data[day1] = {} Data[day1][e1] = 4 ``` but normally you'd first test to see if that dictionary is there yet; using `dict.setdefault()` to make that a one-step process: ``` if day1 not in Data Data[day1] = {} Data[day1][e1] = 4 ``` Th...
You have to create each empty dict for each key like `Data = {}` `Data['day1'] = {}` `Data['day1']['e1'] = 4`
18,747,424
I am using yacc to parse one file and store records in `RAOperator` class object using yacc. I included the corresponding header file in yacc file and defined pointer to `RAOperator` object in %union directive in yacc file. But when compiling it is giving error as follows: ``` exp.y:12:28: error: expected type-specif...
2013/09/11
[ "https://Stackoverflow.com/questions/18747424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1744971/" ]
In the line where the error is indicated, is it possible that it actually says: ``` RAoperator* operator; ``` instead of `asdf`? (including the case where you have `#define asdf operator` or equivalent). `asdf` seems like an odd tag name; `operator` would be more logical, but it's a reserved word in C++ and would le...
The problem has to do with where yacc puts the `%{` ... `%}` code from the `.y` file. It is included in the `.tab.c` file but NOT in the `.tab.h` file. So if you have any other code that does `#include "y.tab.h"`, it needs to ALSO `#include "RA.h"` FIRST, or you'll get errors like this due to `RAoperator` not being def...
655,828
I'm trying to understand ways of isolating circuits and general concepts of isolation. * I understand how high frequency signals can pass over a capacitor. * I understand also how optocouplers work. * I understand how transformers work. Many places talk about using transformers to isolate,but as far as I know this is...
2023/02/28
[ "https://electronics.stackexchange.com/questions/655828", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/220388/" ]
In a word, no. The FFC cable would likely overheat and maybe melt or burn. Both your connector and FFC cable are rated 500mA max. Therefore if you have five separate 500mA constant current sources, you can't combine their return paths to a single wire, as it would mean 2.5A return current through single wire. You ha...
That is fine to combine grounds and return the current through less conductors, but that could have consequences for the LEDs if they're being switched or dimmed. The FFC cable has resistance and will create a small voltage, the more current you send through it the more the voltage. For example: if you have an FFC ca...
655,828
I'm trying to understand ways of isolating circuits and general concepts of isolation. * I understand how high frequency signals can pass over a capacitor. * I understand also how optocouplers work. * I understand how transformers work. Many places talk about using transformers to isolate,but as far as I know this is...
2023/02/28
[ "https://electronics.stackexchange.com/questions/655828", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/220388/" ]
In a word, no. The FFC cable would likely overheat and maybe melt or burn. Both your connector and FFC cable are rated 500mA max. Therefore if you have five separate 500mA constant current sources, you can't combine their return paths to a single wire, as it would mean 2.5A return current through single wire. You ha...
The FFC contacts are rated for current by each supplier. Not all contacts have the same area. e.g. 1mm pitch 1.0 A
23,993,039
I downloaded the latest paypal IOS SDK using below <https://github.com/paypal/PayPal-iOS-SDK> I added frameworks as specified in the sample.. ``` Undefined symbols for architecture i386: "std::terminate()", referenced from: ___clang_call_terminate in libPayPalMobile.a(libCardIO.a-i386-master.o) "___cxa_beg...
2014/06/02
[ "https://Stackoverflow.com/questions/23993039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1477427/" ]
go to yourProjectName then BuildSetting and put -lc++ -ObjC on other Linker Flags Enjoy
I would look at step 4 in the [instructions](https://github.com/paypal/PayPal-iOS-SDK). Specifically, make sure that all the frameworks can be found by adding them explicitly or enabling automatic linking.
23,993,039
I downloaded the latest paypal IOS SDK using below <https://github.com/paypal/PayPal-iOS-SDK> I added frameworks as specified in the sample.. ``` Undefined symbols for architecture i386: "std::terminate()", referenced from: ___clang_call_terminate in libPayPalMobile.a(libCardIO.a-i386-master.o) "___cxa_beg...
2014/06/02
[ "https://Stackoverflow.com/questions/23993039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1477427/" ]
Go to Targets -> Build Settings -> Linking -> Other Linker Flags Add -ObjC -l"PayPalMobile" -l"Pods-PayPal-iOS-SDK" -l"c++" -framework "AVFoundation" -framework "AudioToolbox" -framework "CoreLocation" -framework "CoreMedia" -framework "MessageUI" -framework "MobileCoreServices" -framework "SystemConfiguration"
I would look at step 4 in the [instructions](https://github.com/paypal/PayPal-iOS-SDK). Specifically, make sure that all the frameworks can be found by adding them explicitly or enabling automatic linking.
23,993,039
I downloaded the latest paypal IOS SDK using below <https://github.com/paypal/PayPal-iOS-SDK> I added frameworks as specified in the sample.. ``` Undefined symbols for architecture i386: "std::terminate()", referenced from: ___clang_call_terminate in libPayPalMobile.a(libCardIO.a-i386-master.o) "___cxa_beg...
2014/06/02
[ "https://Stackoverflow.com/questions/23993039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1477427/" ]
go to yourProjectName then BuildSetting and put -lc++ -ObjC on other Linker Flags Enjoy
Go to Targets -> Build Settings -> Linking -> Other Linker Flags Add -ObjC -l"PayPalMobile" -l"Pods-PayPal-iOS-SDK" -l"c++" -framework "AVFoundation" -framework "AudioToolbox" -framework "CoreLocation" -framework "CoreMedia" -framework "MessageUI" -framework "MobileCoreServices" -framework "SystemConfiguration"
6,480,908
I am attempting to initialize a list and keep getting the index out of range: ``` self.nodes = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]] ``` When I run this code: ``` for i in range(self.rows): for j in range(self.columns): if self.GRID[i][j] == 0: self.walkab...
2011/06/25
[ "https://Stackoverflow.com/questions/6480908", "https://Stackoverflow.com", "https://Stackoverflow.com/users/815667/" ]
Assignment to a non-existent index in a list fails. In your case, you are attempting to assign to index `j` of an empty list: ``` self.nodes = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]] # assume i == 0 and j == 0 self.nodes[i] # refers to the first empty list [] self.nodes[i][j] ## does not exist ``` Consider...
``` self.nodes = [[[]] * self.columns] * self.rows ```
6,480,908
I am attempting to initialize a list and keep getting the index out of range: ``` self.nodes = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]] ``` When I run this code: ``` for i in range(self.rows): for j in range(self.columns): if self.GRID[i][j] == 0: self.walkab...
2011/06/25
[ "https://Stackoverflow.com/questions/6480908", "https://Stackoverflow.com", "https://Stackoverflow.com/users/815667/" ]
What is `Node()` ? ``` >>> nodes = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]] >>> nodes[0][0] = 5 Traceback (most recent call last): File "<interactive input>", line 1, in <module> IndexError: list assignment index out of range >>> nodes[0].append(5) >>> nodes [[5], [], [], [], [], [], [], [], [], [], [], [],...
``` self.nodes = [[[]] * self.columns] * self.rows ```
72,375,260
``` def even(start, n): return[n*2 for in range(1,n+1)] ``` Eg :- start `5` and want `7` numbers If it is odd in want to add +1. Output: `6 8 10 12 14 16 18`
2022/05/25
[ "https://Stackoverflow.com/questions/72375260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16968453/" ]
If for odd number you want to start from `start + 1` and for even numbers start from `start`, then you can try this - ``` def even(start, n): start = start + 1 if start % 2 else start return list(range(start, start + n * 2, 2)) ``` Output: ``` >>> even(5, 7) [6, 8, 10, 12, 14, 16, 18] >>> even(2, 7) [2, 4, ...
If what you want is to implement a function that returns an array of consecutive even numbers greater than start, with size n, then you can refer to this code. ```py def even(start, n): return [i for i in range(start, start+n*2) if i % 2 == 0] ```
30,431
Thank you for reading this. Generally there are libraries for GSM and Ultrasound sensors for the software called Proteus and you can simulate them along with you MCU and the interfacing peripherals and simulate . I have big problem at my hand , I want to simulate ESP8266 or any other relevant wifi module with my Ar...
2016/10/22
[ "https://arduino.stackexchange.com/questions/30431", "https://arduino.stackexchange.com", "https://arduino.stackexchange.com/users/27587/" ]
There are tools to simulate Arduino, but it's not meant for anything beyond basic (i.e. simple circuit). Support is limited, you can't just simulate any and every sensor and shields (e.g. LAN, Wireless). Furthermore, ESP8266 is so cheap that hardly anybody has actual use-case to simulate them. I suggest you work on a r...
I don't know of any simulators, but you might be able to do it yourself. What you could do is to add a hardware abstraction layer to your code. When you are running on hardware this just passes the calls to the hardware, i.e. `HAL_digitalRead(D0)` calls `digitalRead(D0)`. When you want to simulate the hardware then y...
49,905,749
I recently use asp:LinkButton instead of asp:Button for some CSS styles. ``` <asp:LinkButton ID="btnRegister" CssClass="btn btn-primary btn-lg btnSend" runat="server" OnClick="btnRegister_Click">Submit</asp:LinkButton> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> ``` I wonder th...
2018/04/18
[ "https://Stackoverflow.com/questions/49905749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1592474/" ]
if you bind gridview or datalist or repeater in page load, must do it: ``` protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //all code in page_load } } ``` already You could do as the error message suggests and use the ClientScriptManager.RegisterFor...
Check with `AutoEventWireup="true"`
9,176
I am on the top floor of a loft apartment that used to be a factory. I want to install several hooks or some other fixture into my concrete ceiling from which I can hang gymnastic rings, a punching bag and a swing/hammock. I am about 200lbs and if I were to use a safety factor of 5, each hook would possibly need to be ...
2011/09/27
[ "https://diy.stackexchange.com/questions/9176", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/3911/" ]
Checking with my engineer-minded girlfriend, we've got too many questions to be able to answer this. The concrete, which is intended to support a dead load, may not be able to support the moment loads that you're planning to put on it. Without having a structural diagram for the entire building and detail on what the b...
I would be very reluctant to bolt directly into a concrete ceiling for what you're doing for two reasons: 1. Concrete fails explosively. Unlike wood, which will splinter first, or metals which will sag or bend a little, concrete will just pop. 2. Concrete is weak at handling tensile forces; it's best at compression. (...
9,176
I am on the top floor of a loft apartment that used to be a factory. I want to install several hooks or some other fixture into my concrete ceiling from which I can hang gymnastic rings, a punching bag and a swing/hammock. I am about 200lbs and if I were to use a safety factor of 5, each hook would possibly need to be ...
2011/09/27
[ "https://diy.stackexchange.com/questions/9176", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/3911/" ]
Checking with my engineer-minded girlfriend, we've got too many questions to be able to answer this. The concrete, which is intended to support a dead load, may not be able to support the moment loads that you're planning to put on it. Without having a structural diagram for the entire building and detail on what the b...
I hung a heavyweight workout bag with the anchor recommended here in a concrete ceiling. Used some epoxy as well to set anchor. Attached eyebolt with a coupling sleeve to anchor bolt. Marked bolt and nuts to monitor any movement or working lose. 1/2" bolt sneered after about 16 months of uses between the jam nut and co...
9,176
I am on the top floor of a loft apartment that used to be a factory. I want to install several hooks or some other fixture into my concrete ceiling from which I can hang gymnastic rings, a punching bag and a swing/hammock. I am about 200lbs and if I were to use a safety factor of 5, each hook would possibly need to be ...
2011/09/27
[ "https://diy.stackexchange.com/questions/9176", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/3911/" ]
I would attach a wood 4x4 or a steel lintel or another type of heavy angle iron to the ceiling.Then from there you can hang what ever you want. I would attach it every 16" O.C with a redhead 1/2" wedge anchor (available at any home center). They are rated for 5,000 lb pull out force. If the concrete was rated at 5,000 ...
I would be very reluctant to bolt directly into a concrete ceiling for what you're doing for two reasons: 1. Concrete fails explosively. Unlike wood, which will splinter first, or metals which will sag or bend a little, concrete will just pop. 2. Concrete is weak at handling tensile forces; it's best at compression. (...
9,176
I am on the top floor of a loft apartment that used to be a factory. I want to install several hooks or some other fixture into my concrete ceiling from which I can hang gymnastic rings, a punching bag and a swing/hammock. I am about 200lbs and if I were to use a safety factor of 5, each hook would possibly need to be ...
2011/09/27
[ "https://diy.stackexchange.com/questions/9176", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/3911/" ]
I would be very reluctant to bolt directly into a concrete ceiling for what you're doing for two reasons: 1. Concrete fails explosively. Unlike wood, which will splinter first, or metals which will sag or bend a little, concrete will just pop. 2. Concrete is weak at handling tensile forces; it's best at compression. (...
I hung a heavyweight workout bag with the anchor recommended here in a concrete ceiling. Used some epoxy as well to set anchor. Attached eyebolt with a coupling sleeve to anchor bolt. Marked bolt and nuts to monitor any movement or working lose. 1/2" bolt sneered after about 16 months of uses between the jam nut and co...
9,176
I am on the top floor of a loft apartment that used to be a factory. I want to install several hooks or some other fixture into my concrete ceiling from which I can hang gymnastic rings, a punching bag and a swing/hammock. I am about 200lbs and if I were to use a safety factor of 5, each hook would possibly need to be ...
2011/09/27
[ "https://diy.stackexchange.com/questions/9176", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/3911/" ]
I would attach a wood 4x4 or a steel lintel or another type of heavy angle iron to the ceiling.Then from there you can hang what ever you want. I would attach it every 16" O.C with a redhead 1/2" wedge anchor (available at any home center). They are rated for 5,000 lb pull out force. If the concrete was rated at 5,000 ...
I hung a heavyweight workout bag with the anchor recommended here in a concrete ceiling. Used some epoxy as well to set anchor. Attached eyebolt with a coupling sleeve to anchor bolt. Marked bolt and nuts to monitor any movement or working lose. 1/2" bolt sneered after about 16 months of uses between the jam nut and co...
14,547,491
I have this anchor link: ``` <a href="/question/tag/1/1/?list_id={{title}}">{{title}}</a> ``` Sometimes, this title has some content with + (add operator) like: "Django + Python" But when it is directly placed on anchor links, the url delivered will be: ``` http://127.0.0.1:8080/question/tag/1/1/?list_id=Django + ...
2013/01/27
[ "https://Stackoverflow.com/questions/14547491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1909922/" ]
Instead of ``` {{ title }} ``` do ``` {{title|urlencode}} ```
Instead of hardcoding the URL and building the querystring in the template by concatenating the title context item, consider simplifying it a bit by using django.core.urlresolvers.reverse() and specifying a named URL from the relevant urls.py file. Makes for a clean design when you don't have to worry about URLs changi...
2,091,595
can anyone please help me, how to resize font size by resize event of div using jquery ui plugin? html : ``` <div>my testing data</div> ``` script : ``` $('div').resize(); //this function is called from resize plugin of ui jquery ``` i want to increase font size by resizing the div.
2010/01/19
[ "https://Stackoverflow.com/questions/2091595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/253778/" ]
According to [documentation](http://docs.jquery.com/UI/Dialog), you can do something like this: ``` $("#dialog").bind('resize', function(event, ui){ var height = $(this).dialog('option', 'height'); $(this).css('font-size', height); }); ``` Consider your `div` has an`id="dialog"`. Hope this helps.
Instead of getting the height again accessing 'option' you can use the ui object, it will give you start size, end size and location too. ``` * ui.helper - a jQuery object containing the helper element * ui.originalPosition - {top, left} before resizing started * ui.originalSize - {width, height} before resizing star...
2,091,595
can anyone please help me, how to resize font size by resize event of div using jquery ui plugin? html : ``` <div>my testing data</div> ``` script : ``` $('div').resize(); //this function is called from resize plugin of ui jquery ``` i want to increase font size by resizing the div.
2010/01/19
[ "https://Stackoverflow.com/questions/2091595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/253778/" ]
@Darmen is right. But, you can simplify the code a little bit by using some of the method overloads. Like the constructor: ``` $('#dialog').resizable({ resize: function(event, ui) { ui.element.css({'font-size':'20px'}); } }); ```
Instead of getting the height again accessing 'option' you can use the ui object, it will give you start size, end size and location too. ``` * ui.helper - a jQuery object containing the helper element * ui.originalPosition - {top, left} before resizing started * ui.originalSize - {width, height} before resizing star...
42,623,557
If I have an array like this: ``` Array ( [0] => Array ( [image_path] => 3blocks-02.png ) [1] => Array ( [image_path] => 2blocks-02.png ) ) ``` Is there a way I can retrieve the ['image\_path'] value by the array index in a forreach loop? I have trie...
2017/03/06
[ "https://Stackoverflow.com/questions/42623557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5613722/" ]
Change your ajax url to this: ``` url: '/addFavorites', ``` and your route to this: ``` Route::post('/addFavorites', 'SearchController@addFavorites'); ``` Just to make sure you point at the same url > > EDIT: > > > make sure that you have one route with **get** and the same route with **post**. see bellow: ...
MethodNotAllowedHttpException usually comes when you haven't defined route or you have defined route for get method and you are using the route for post method. please check your routes.php
46,746,941
I need to open google maps when i click a button and show directions from a source location and destination location. By searching a lot i figured out a way with InAppBrowser, but it doesnt work. Here is the code i found: ``` this.geolocation.getCurrentPosition().then((data) => { let lat = data.coords.latitud...
2017/10/14
[ "https://Stackoverflow.com/questions/46746941", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5470374/" ]
Install **[Launch Navigator](https://ionicframework.com/docs/native/launch-navigator/)** plugins: 1. Install the Cordova and Ionic Native plugins: > > ionic cordova plugin add > uk.co.workingedge.phonegap.plugin.launchnavigator > > > npm install --save @ionic-native/launch-navigator > > > 2. add LaunchNavigato...
Use this to open maps, make sure In App Browser plugin is installed. ``` let destination = latitude + ',' + longitude; if(this.platform.is('ios')){ window.open('maps://?q=' + destination, '_system'); } else { let label = encodeURI('My Label'); window.open('geo:0,0?q=' + destination + '(' + label + ')', '_system')...
6,846,668
I have a table to which i need to add rows dynamically on click of a button. Each row has 3 textboxes and a clear button. On click of clear the data in the textboxes need to be cleared i.e. onclick of the button i send the index of the row to a method which deletes the contents of the textboxes at that index. Problem...
2011/07/27
[ "https://Stackoverflow.com/questions/6846668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/712339/" ]
> > How do i specify the index number in the onClick property of the row button while adding the new row? > > > You don't. Instead, use the fact that the textboxes and the button are in the same row. I probably wouldn't use `onclick` on the button at all; instead, I'd have a single click handler on the `table` and...
Best to use event delegation, or you can use `this` in JavaScript. Event Delegation w/jQuery ``` <input class="clear-row-btn" type="button" >Clear Row</input> ``` .live event ``` $(".clear-row-btn").live("click", function(){ var $tr = $(this).closest("tr"); $tr.find("input[type='text']").val(""); }); ``` H...
96,953
this is an easy question, but I can't find out the solution... I have to check if a column exists and add it if the test is negative. How can I do with only sql code? This is the syntax for SQL Server: ``` IF NOT EXISTS ( SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[dbo].[Person]') A...
2015/04/03
[ "https://dba.stackexchange.com/questions/96953", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/56024/" ]
Access doesn't support the `IF EXISTS` syntax in queries; I think your error is coming from that. It's also very difficult to do any sort of procedural logic using Access SQL. Your alternatives are to run the `ALTER TABLE` statement and handle the error elsewhere or use VBA to conditionally run the statement.
``` tableexist = CheckTableExistance("Tbl_Name"); if (tableexist == true) { using (System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand("select * from Tbl_Name", con)) using (var reader = cmd.ExecuteReader(CommandBehavior.SchemaOnly)) { var table = reader.GetSchemaTable(); ...
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
I was going to write something along these lines, but I looked back over the Meta.SO discussion you linked to and [Adam Davis said it far better than I could](https://meta.stackexchange.com/questions/92560/what-is-the-criteria-for-an-acceptable-image/92684#92684): > > > > > > What is the underlying purpose of the i...
I'd like to mention [the image in this answer](https://skeptics.stackexchange.com/questions/1738/do-drug-addicts-stop-maturing-when-they-become-addicted/4764#4764) as an example of an on-topic image.
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
I have been leading my own crusade against many of the pictures - not about their relevance, which I am more relaxed about, and happy to defer to others - but about their credit and licensing. If someone has a question about whether a particular photograph has been faked, it seems to my (non-lawyer) eyes to fit under ...
I'd like to mention [the image in this answer](https://skeptics.stackexchange.com/questions/1738/do-drug-addicts-stop-maturing-when-they-become-addicted/4764#4764) as an example of an on-topic image.
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
I have been leading my own crusade against many of the pictures - not about their relevance, which I am more relaxed about, and happy to defer to others - but about their credit and licensing. If someone has a question about whether a particular photograph has been faked, it seems to my (non-lawyer) eyes to fit under ...
I was going to write something along these lines, but I looked back over the Meta.SO discussion you linked to and [Adam Davis said it far better than I could](https://meta.stackexchange.com/questions/92560/what-is-the-criteria-for-an-acceptable-image/92684#92684): > > > > > > What is the underlying purpose of the i...
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
I have been leading my own crusade against many of the pictures - not about their relevance, which I am more relaxed about, and happy to defer to others - but about their credit and licensing. If someone has a question about whether a particular photograph has been faked, it seems to my (non-lawyer) eyes to fit under ...
I don't think it's a good for skeptics.SE to ban what do very little harm while lightening the mood of the site, for the sake of professionalism. We are a community of volunteers that work together to seek out answers, out of fun and interest. Unless these images are harming the answers or our community, then I definit...
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
I'd like to mention [the image in this answer](https://skeptics.stackexchange.com/questions/1738/do-drug-addicts-stop-maturing-when-they-become-addicted/4764#4764) as an example of an on-topic image.
Only entertaining pictures without relevance to the question or answer, not helping to understand, should be banned as **off topic**. Especially disturbing are pictures edited into the question by a second party. Not everybody likes a fat, dumb dog sitting in his question. Schematic drawings, photos and other pictu...
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
Okay, to take a full stab at this, here is a more detailed reasoning. To provide some context, I just finished reading Jeff Atwood's blog entry on [Informavores](http://www.codinghorror.com/blog/2007/06/designing-for-informavores-or-why-users-behave-like-animals-online.html). The large carry-away is the note on informa...
Only entertaining pictures without relevance to the question or answer, not helping to understand, should be banned as **off topic**. Especially disturbing are pictures edited into the question by a second party. Not everybody likes a fat, dumb dog sitting in his question. Schematic drawings, photos and other pictu...
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
I have been leading my own crusade against many of the pictures - not about their relevance, which I am more relaxed about, and happy to defer to others - but about their credit and licensing. If someone has a question about whether a particular photograph has been faked, it seems to my (non-lawyer) eyes to fit under ...
Only entertaining pictures without relevance to the question or answer, not helping to understand, should be banned as **off topic**. Especially disturbing are pictures edited into the question by a second party. Not everybody likes a fat, dumb dog sitting in his question. Schematic drawings, photos and other pictu...
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
I was going to write something along these lines, but I looked back over the Meta.SO discussion you linked to and [Adam Davis said it far better than I could](https://meta.stackexchange.com/questions/92560/what-is-the-criteria-for-an-acceptable-image/92684#92684): > > > > > > What is the underlying purpose of the i...
Only entertaining pictures without relevance to the question or answer, not helping to understand, should be banned as **off topic**. Especially disturbing are pictures edited into the question by a second party. Not everybody likes a fat, dumb dog sitting in his question. Schematic drawings, photos and other pictu...
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
I don't think it's a good for skeptics.SE to ban what do very little harm while lightening the mood of the site, for the sake of professionalism. We are a community of volunteers that work together to seek out answers, out of fun and interest. Unless these images are harming the answers or our community, then I definit...
I'd like to mention [the image in this answer](https://skeptics.stackexchange.com/questions/1738/do-drug-addicts-stop-maturing-when-they-become-addicted/4764#4764) as an example of an on-topic image.
818
I am not having much luck getting my intentions across here on meta so I will make this ridiculously short. This is related to the Unprofessionalism bullet-point in my [longwinded answer](https://skeptics.meta.stackexchange.com/questions/733/90-days-are-up-how-are-we-doing/761#761) to the 90 day opinion poll. What gui...
2011/06/13
[ "https://skeptics.meta.stackexchange.com/questions/818", "https://skeptics.meta.stackexchange.com", "https://skeptics.meta.stackexchange.com/users/2433/" ]
I was going to write something along these lines, but I looked back over the Meta.SO discussion you linked to and [Adam Davis said it far better than I could](https://meta.stackexchange.com/questions/92560/what-is-the-criteria-for-an-acceptable-image/92684#92684): > > > > > > What is the underlying purpose of the i...
Okay, to take a full stab at this, here is a more detailed reasoning. To provide some context, I just finished reading Jeff Atwood's blog entry on [Informavores](http://www.codinghorror.com/blog/2007/06/designing-for-informavores-or-why-users-behave-like-animals-online.html). The large carry-away is the note on informa...
35,985,948
I am new in learning C# Service Client Application. I made one project, the problem is that whenever I run it it shows the following exception: > > Address Already in use Exception: > > HTTP could not register URL <http://+:80/Temporary_Listen_Addresses/6c2d8437-020f-4267-b93b-450ef3546b04/> because TCP port 80 i...
2016/03/14
[ "https://Stackoverflow.com/questions/35985948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5739373/" ]
I believe at the moment there is no tool from MongoDB to view this. Please [see this comment](https://jira.mongodb.org/browse/SERVER-22000?focusedCommentId=1121384&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1121384) from MongoDB engineer. `serverStatus, replSetGetStatus, collStats of...
MongoDB 3.2 collects server statistics every second (default interval) into the diagnostic files inside the diagnostic.data directory. This data is collected for analysis of MongoDB server's behaviour by MongoDB engineers. I think no tool/document has been released yet for public to analyse the captured data.
35,985,948
I am new in learning C# Service Client Application. I made one project, the problem is that whenever I run it it shows the following exception: > > Address Already in use Exception: > > HTTP could not register URL <http://+:80/Temporary_Listen_Addresses/6c2d8437-020f-4267-b93b-450ef3546b04/> because TCP port 80 i...
2016/03/14
[ "https://Stackoverflow.com/questions/35985948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5739373/" ]
You can see the contained data of the `metrics...` files using the tool `bsondump` which is included in every MongoDB installation. Just execute `bsondump metrics.2016-03-08T17-15-01Z0` and it will print out the decoded content of the file.
MongoDB 3.2 collects server statistics every second (default interval) into the diagnostic files inside the diagnostic.data directory. This data is collected for analysis of MongoDB server's behaviour by MongoDB engineers. I think no tool/document has been released yet for public to analyse the captured data.
41,797,182
Angular 1.6, ui.router issue. I am running into an issue with the resolve of a state. Anytime I put in the resolve feature into the $stateProvider nothing in my view renders. If I comment out just the resolve portion, my bids variable shows up in the view with the hardcoded values. It looks like /bids.json has the dat...
2017/01/22
[ "https://Stackoverflow.com/questions/41797182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6209382/" ]
The `l` length specifier applied to a `c` field descriptor indicates that the corresponding argument is of type `wint_t` (declared in `wchar.h`). In your code, the argument is of type `int`, which might or might not be the same. If it indeed isn't the same then the behavior is undefined. You can obtain a `wint_t` by ca...
There is no requirement in C that a line without a newline character at the end will be printed. Try "%lc\n".
41,797,182
Angular 1.6, ui.router issue. I am running into an issue with the resolve of a state. Anytime I put in the resolve feature into the $stateProvider nothing in my view renders. If I comment out just the resolve portion, my bids variable shows up in the view with the hardcoded values. It looks like /bids.json has the dat...
2017/01/22
[ "https://Stackoverflow.com/questions/41797182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6209382/" ]
On macOS Sierra 10.12.2 with GCC 6.3.0, if I run this program (compiled from `mb37.c` into `mb37`): ``` #include <locale.h> #include <stdio.h> #include <wchar.h> /* wint_t */ int main(void) { setlocale(LC_ALL, ""); printf("%lc\n", (wint_t)536); return 0; } ``` the output is: ``` $ ./mb37 Ș $ ``` ...
There is no requirement in C that a line without a newline character at the end will be printed. Try "%lc\n".
41,797,182
Angular 1.6, ui.router issue. I am running into an issue with the resolve of a state. Anytime I put in the resolve feature into the $stateProvider nothing in my view renders. If I comment out just the resolve portion, my bids variable shows up in the view with the hardcoded values. It looks like /bids.json has the dat...
2017/01/22
[ "https://Stackoverflow.com/questions/41797182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6209382/" ]
On macOS Sierra 10.12.2 with GCC 6.3.0, if I run this program (compiled from `mb37.c` into `mb37`): ``` #include <locale.h> #include <stdio.h> #include <wchar.h> /* wint_t */ int main(void) { setlocale(LC_ALL, ""); printf("%lc\n", (wint_t)536); return 0; } ``` the output is: ``` $ ./mb37 Ș $ ``` ...
The `l` length specifier applied to a `c` field descriptor indicates that the corresponding argument is of type `wint_t` (declared in `wchar.h`). In your code, the argument is of type `int`, which might or might not be the same. If it indeed isn't the same then the behavior is undefined. You can obtain a `wint_t` by ca...
70,542,369
now i'm studying DRF and have to do project with photo albums. One of my tasks is to create custom @action "patch" method, using model field "title", but i can't understand how to add fields for search in custom methods. We can see them in base methods, like "get", "patch" and "put", but i can't find any info about how...
2021/12/31
[ "https://Stackoverflow.com/questions/70542369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14578953/" ]
To answer the above say you have a viewset class ``` // all imports class AbcApi(viewsets.ModelViewset): serializer_class = random permission_classses = [IsAuthenticated] search_fields = ["a_field", "b_field"] filter_backends = [....] #custom action @action(detail=False) def custom_action(self, *...
If you are using `ModelViewSet`, I believe you are looking for one of these custom methods: ```py def update(self, request, pk=None): pass def partial_update(self, request, pk=None): pass ``` These functions allow you to add custom functionalities to your update method. [Reference](https://www.django-rest-f...
27,608,405
I was trying to import the [Wordpress Theme Unit Testing Data](http://codex.wordpress.org/Theme_Unit_Test) when this error occured and its driving me nuts. ``` Fatal error: Maximum execution time of 60 seconds exceeded in E:\WebServer\w3programmers\wp-includes\class-http.php on line 1511 ``` List of things I've trie...
2014/12/22
[ "https://Stackoverflow.com/questions/27608405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/859560/" ]
I ran into the same problem, searched and found this solution that fixed it for me: [WordPress 4.2 Fatal error – Maximum execution time of 60 seconds exceeded](http://simpleglyph.in/wordpress-4-2-fatal-error-maximum-execution-time-of-60-seconds-exceeded/) Basically, it instructs you to add `set_time_limit(1000)` or ho...
You may need to also set ``` php_value post_max_size xxxM php_value upload_max_filesize xxxM php_value memory_limit xxxM php_value max_execution_time xxxxxx php_value max_input_time xxxxxx php_value session.gc_maxlifetime xxxx ``` so in .htaccess you'd have if you have .htaccess reading enabled ``` <IfModule mod_...
27,608,405
I was trying to import the [Wordpress Theme Unit Testing Data](http://codex.wordpress.org/Theme_Unit_Test) when this error occured and its driving me nuts. ``` Fatal error: Maximum execution time of 60 seconds exceeded in E:\WebServer\w3programmers\wp-includes\class-http.php on line 1511 ``` List of things I've trie...
2014/12/22
[ "https://Stackoverflow.com/questions/27608405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/859560/" ]
I ran into the same problem, searched and found this solution that fixed it for me: [WordPress 4.2 Fatal error – Maximum execution time of 60 seconds exceeded](http://simpleglyph.in/wordpress-4-2-fatal-error-maximum-execution-time-of-60-seconds-exceeded/) Basically, it instructs you to add `set_time_limit(1000)` or ho...
I got this sloved for me by changing set\_time\_limit call inside wp\_get\_http() in wp-includes/deprecated.php, like this: ``` set_time_limit(1200); // Limit to 20 minutes ``` More on the source of the error [here](https://stackoverflow.com/a/37156901/2504037).
70,552,863
I am having some issue with an exercise 4.3 #1 in "ThinkPython". The solution given in the book to the exercise doesn't seem to work. **Problem:** "Write a function called square that takes a parameter named t, which is a turtle. It should use the turtle to draw a square. Write a function call that passes bob as an ar...
2022/01/02
[ "https://Stackoverflow.com/questions/70552863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15789246/" ]
Notice in the description of the problem: > > Write a function called square that takes a parameter named t, which is a turtle. > > > Basically, you'll need to define a [`Turtle()`](https://docs.python.org/3/library/turtle.html#turtle.Turtle) object to pass into the parameters of your function, like so: ``` impo...
`bob` is recognized as a parameter, the only thing is that `bob` is supposed to be wrapped around quotation marks, whether it be single quotes or double. In this scenario, `bob` is being passed into the function and look like it is treated as a number, but alphabetic characters will always correspond to strings. Sorr...
32,907
I am looking for a method to prove that the following function is quasi-concave in $\alpha$ (or find conditions under which it is true): $ \pi=F(-k)(f(0)^2-f(h(1-\alpha))^2)+ \frac{1}{2}-\frac{1}{2}f(0)^2-\frac{1}{2}f(-k^2)(2F(h(1-\alpha))-1)^2 $, where: $F$ - is a CDF function of Normal Distribution, $N[0,\sigma^2]...
2019/11/23
[ "https://economics.stackexchange.com/questions/32907", "https://economics.stackexchange.com", "https://economics.stackexchange.com/users/24987/" ]
Your conjecture seems to be contradicted, at least for small values of $\sigma$. You can draw the function with the following R-code: ``` qq_f = function(x,k,h,sig){ -pnorm(-k, sd=sig)*( (dnorm(h*(1-x), sd=sig))^2 ) - 0.5*dnorm(-k^2, sd=sig)*( 2*pnorm(h*(1-x), sd=sig) -1 )^2 } curve(qq_f(x,k=0,h=1,sig=0.5),co...
After a while, I have not found conditions or proof the function is quasi-concave at $\alpha \in [0,1]$. However, the ultimate goal was to show that there is an intermediate solution to the equation. It was indeed possible to condition on the second derivatives w.r.t. to $\alpha$ and $h$ under which: - the function e...
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
try to fix the number of columns needed in xml file for grid and set stretchMode as columnwidth ``` android:numColumns="3" android:columnWidth="60dp" android:stretchMode="columnWidth" ``` or set the horizontal and vertical spacing in xml for grid ``` android:verticalSpacing="10dp" android:horizontalSpacing="10dp" ...
Remove Gravity attribute and use the following mode ``` android:stretchMode="NONE" ```
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
try to fix the number of columns needed in xml file for grid and set stretchMode as columnwidth ``` android:numColumns="3" android:columnWidth="60dp" android:stretchMode="columnWidth" ``` or set the horizontal and vertical spacing in xml for grid ``` android:verticalSpacing="10dp" android:horizontalSpacing="10dp" ...
Space between columns is because your gridview element is not completely occupying the column space provided by grid view. The solution to remove space between columns is to measure the device's screen width and height and divide it by the number of columns and rows. This will give the width and height for each grid v...
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
I was having similar issue of having slight horizontal spacing between the columns in few devices. ( I did not required any space. ) I was properly calculating the grid item width by dividing it with total width. I was getting this issue only on Lenovo devices. following code was in activity related to grid. ``` int ...
You can reduce the space b/w column by setting the android:horizontalSpacing="-10dp" ( some negative number )
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
Remove Gravity attribute and use the following mode ``` android:stretchMode="NONE" ```
Space between columns is because your gridview element is not completely occupying the column space provided by grid view. The solution to remove space between columns is to measure the device's screen width and height and divide it by the number of columns and rows. This will give the width and height for each grid v...
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
I had the same problem. I minimized column space by doing this for gridView ``` android:numColumns="2" android:columnWidth="90dp" android:verticalSpacing="0dp" android:horizontalSpacing="-30dp" android:stretchMode="columnWidth" ``` for imageView ``` android:layout_width="115dp" android:layout_height="150dp" androi...
I was having similar issue of having slight horizontal spacing between the columns in few devices. ( I did not required any space. ) I was properly calculating the grid item width by dividing it with total width. I was getting this issue only on Lenovo devices. following code was in activity related to grid. ``` int ...
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
Remove Gravity attribute and use the following mode ``` android:stretchMode="NONE" ```
Hi i had the same problem i solved by `mygridView.setStretchMode(GridView.NO_STRETCH);`
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
I had the same problem. I minimized column space by doing this for gridView ``` android:numColumns="2" android:columnWidth="90dp" android:verticalSpacing="0dp" android:horizontalSpacing="-30dp" android:stretchMode="columnWidth" ``` for imageView ``` android:layout_width="115dp" android:layout_height="150dp" androi...
You can reduce the space b/w column by setting the android:horizontalSpacing="-10dp" ( some negative number )
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
Remove Gravity attribute and use the following mode ``` android:stretchMode="NONE" ```
I had the same problem. I minimized column space by doing this for gridView ``` android:numColumns="2" android:columnWidth="90dp" android:verticalSpacing="0dp" android:horizontalSpacing="-30dp" android:stretchMode="columnWidth" ``` for imageView ``` android:layout_width="115dp" android:layout_height="150dp" androi...
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
try to fix the number of columns needed in xml file for grid and set stretchMode as columnwidth ``` android:numColumns="3" android:columnWidth="60dp" android:stretchMode="columnWidth" ``` or set the horizontal and vertical spacing in xml for grid ``` android:verticalSpacing="10dp" android:horizontalSpacing="10dp" ...
Hi i had the same problem i solved by `mygridView.setStretchMode(GridView.NO_STRETCH);`
7,425,557
See attached screenshot where I am attempting to reduce the space between the columns in my GridView. My main.xml is as follows: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android...
2011/09/15
[ "https://Stackoverflow.com/questions/7425557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777906/" ]
Remove Gravity attribute and use the following mode ``` android:stretchMode="NONE" ```
I was having similar issue of having slight horizontal spacing between the columns in few devices. ( I did not required any space. ) I was properly calculating the grid item width by dividing it with total width. I was getting this issue only on Lenovo devices. following code was in activity related to grid. ``` int ...
3,263,792
I want to find the $$\lim\_{x\rightarrow \infty} (\sqrt x-x)$$ What I was thinking was to multiply by the conjugate since that's normally what you do with square roots, So I would get $$\lim\_{x\rightarrow\infty} (\sqrt{x}-x)\cdot\frac{(\sqrt{x}+x)}{(\sqrt{x}+x)}$$ $=\lim\_{x\rightarrow\infty} \frac{x-x^2}{\sqrt{x}...
2019/06/15
[ "https://math.stackexchange.com/questions/3263792", "https://math.stackexchange.com", "https://math.stackexchange.com/users/477465/" ]
You are correct with your idea stated in the comment, i.e., the line bisects the chord of $(0,0)$ to $(a,b)$, except you didn't mention the line is perpendicular to this chord. This is because the equal length (i.e., the radius) lines from the center of the circle to each end point of this chord, plus the chord line it...
Adding to John Omielan's answer, [according to the perpendicular bisector theorem](https://math.stackexchange.com/questions/2295360/prove-the-perpendicular-bisector-of-chord-passes-through-the-centre-of-the-circle), if a point is on the perpendicular bisector, then it is equidistant from the segment's endpoints. The c...
272,544
I need to update a lot of record to change their lookup field to null, I tried following code: ``` public class UpdateContact implements Database.Batchable<sObject>{ public Database.QueryLocator start(Database.BatchableContext BC){ return Database.getQueryLocator([Select id, Profil__c from Contact__c]); } publi...
2019/08/06
[ "https://salesforce.stackexchange.com/questions/272544", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/70351/" ]
You need to change your code somewhat to get it to even compile. Beyond that, you should move your `update` out of the loop. ``` public class UpdateContact implements Database.Batchable<sObject> { public Database.QueryLocator start(Database.BatchableContext BC) { return Database.getQueryLocator([Select...
You should Declare `Id` variable and initialized with as `null` in top then assign that in for loop like below and do the update in out side the loop. ``` public class UpdateContact implements Database.Batchable<sObject> { Id profilid = null; public Database.QueryLocator start(Database.BatchableContext BC) {...