qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
41,054,140
I have created this row with bootstrap 3: ``` <div class="cart"> <div class="row border"> <div class="col-md-8 desc pad itemsheight"> <div class="col-md-12"> <!-- react-text: 141 -->Docos <!-- /react-text --> <!-- react-text: 142 -->channel package <!-- /react-text --> </div> <div...
2016/12/09
[ "https://Stackoverflow.com/questions/41054140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5390873/" ]
I used flex display to vertical align the contents. ``` .vCenterItems { display: flex; align-items: center; } ``` Also removed height from each individual elements and applied to parent element only. This will be easier to change height. [See it in action](http://codepen.io/anon/pen/MbXdLy)
You may try with css property `display: table` to parent and `display: table-cell` to the child, Where we can achieve the content to align vertically centre and it also have an browser compatablity.
136,049
There is an app called XtraFinder which does exactly that - it shows hidden files while it can still hide those two files from Desktop only. Is it possible to do something like that without installing a 3rd party app (I'm using Mavericks)?
2014/06/25
[ "https://apple.stackexchange.com/questions/136049", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1881/" ]
This first command will remove all the icons on your Desktop, but keep the files visible in finder: ``` defaults write com.apple.finder CreateDesktop -bool false && killall Finder ``` While this second one will restore all the icons on your Desktop: ``` defaults write com.apple.finder CreateDesktop -bool true && ki...
Just like any other hidden file on your Mac, .DS\_Store and .localized are going to be one of those files that appear when you turn hidden files 'on'. Without 3rd party applications you are not able to hide them without hiding every other hidden application. One thing you can do is, if there is only 1 or 2 hidden fil...
136,049
There is an app called XtraFinder which does exactly that - it shows hidden files while it can still hide those two files from Desktop only. Is it possible to do something like that without installing a 3rd party app (I'm using Mavericks)?
2014/06/25
[ "https://apple.stackexchange.com/questions/136049", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1881/" ]
This first command will remove all the icons on your Desktop, but keep the files visible in finder: ``` defaults write com.apple.finder CreateDesktop -bool false && killall Finder ``` While this second one will restore all the icons on your Desktop: ``` defaults write com.apple.finder CreateDesktop -bool true && ki...
I came up with a brilliant way of doing this today. Where do you usually have your Dock bar? Move it to the opposite side temporarily. Grab both the files and position them as far as possible off the screen on the side that you previously had your Dock. Now, switch the Dock back to the previous side. HIDDEN!
136,049
There is an app called XtraFinder which does exactly that - it shows hidden files while it can still hide those two files from Desktop only. Is it possible to do something like that without installing a 3rd party app (I'm using Mavericks)?
2014/06/25
[ "https://apple.stackexchange.com/questions/136049", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1881/" ]
This first command will remove all the icons on your Desktop, but keep the files visible in finder: ``` defaults write com.apple.finder CreateDesktop -bool false && killall Finder ``` While this second one will restore all the icons on your Desktop: ``` defaults write com.apple.finder CreateDesktop -bool true && ki...
Run this command: ``` chflags hidden ~/Desktop/.DS_Store && chflags hidden ~/Desktop/.localized ```
3,315,913
> > **Prove or disprove:** An integer $~a >4~$ is composite if and only $~(a−1)!≡0 ~(\text{mod} ~a)~$. > > > If I plug in integers for a such as $~6~$ and $~8~$, then the statement is true. Is there any way I can prove this without using examples?
2019/08/07
[ "https://math.stackexchange.com/questions/3315913", "https://math.stackexchange.com", "https://math.stackexchange.com/users/694116/" ]
If $a$ is prime, then all factors of $(a-1)!$ are less than $a$, so $a \not\mid (a-1)!$ and, thus, $(a-1)! \not\equiv 0 \pmod a$. Note, by [Wilson's theorem](https://en.wikipedia.org/wiki/Wilson%27s_theorem), you get that $(a-1)! \equiv -1 \pmod a$. However, if $a$ is composite, then $a = bc$ for some integers $b \lt ...
$~(a−1)!≡0 ~(\text{mod} ~a)~\iff(a-1)!=2\cdot3\cdot4\cdots(a-2)(a-1)=Ma$ so by Wilson's theorem $a$ cannot be prime. If $a=\prod p\_i^{\alpha\_i}$ then each factor $p\_i^{\alpha\_i}\le(a-1)$ excepting when $a=p\_i^{\alpha\_i}$. Supposing $a\ne p\_i^{\alpha\_i}$ it follows that all the factors of $a$ are also factors...
52,401,904
I have a big problem. I have screen which receive some props from another screen, I pass those props into component in thath screen via `<TicketDiaryHour {...this.props} />`. I set those props in component into my state in method **componentDidMount()**. In that component (TicketDiaryHour) I also have flatlist. My pro...
2018/09/19
[ "https://Stackoverflow.com/questions/52401904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10071426/" ]
It looks to me like you're actually mutating `this.state.data` / `this.props.navigation.state.params.props.listOfStudents` - as they are the same. I presume you're including this line: `var arr = this.state.data;` in an effort to copy the value in `this.state.data`, but I'm afraid it doesn't work like that for referen...
Why do you say the props have changed? The prevProps and this.props that you specified in your question are the same. When you use the setState method, the component is updated, triggering the componentDidUpdate lifecycle method to run. It doesn't mean that your props have changed.
15,791,384
One of our databases (Database A) in SQL server 2012 is retiring soon. I am in a process to analyze all Views and StoredProcs in Database B that uses Database A as a data source. How do I write a query to retrieve this information. Thanks
2013/04/03
[ "https://Stackoverflow.com/questions/15791384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2182905/" ]
I use the following to get objects and their dependencies in SQL Server 2008: ``` select * from (select referenced_database_name, o.name as ViewName, ed.referenced_entity_name as TableName from sys.sql_expression_dependencies ed join sys.objects o on ed.referencing_id = o.object_id wh...
A very simple way would be to just query the procedure text ``` select p.name from sys.procedures p inner join sys.syscomments c ON (p.object_id = c.id) where c.text like '%database.%' or c.text like '%[database].%' ``` The same query can be done on `sys.views` as well. You may or may not get very good results...
1,791,714
Action script is developed based on object oriented programming but why does it not support function overloading? Does Flex support overloading? If yes, please explain briefly with a real example.
2009/11/24
[ "https://Stackoverflow.com/questions/1791714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214131/" ]
As you say, function overloading is not supported in Action Script (and therefore not even in Flex). But the functions may have default parameters like here: ``` public function DoSomething(a:String='', b:SomeObject=null, c:Number=0):void ``` `DoSomething` can be called in 4 different ways: ``` DoSomething() DoSom...
It's worth noting that function overloading is not an OOP idiom, it's a language convention. OOP languages *often* have overloading support, but it's not necessary. As lk notes, you can approximate it with the structure he shows. Alternately, you can do this: ``` public function overloaded(mandatory1: Type, mandatory...
1,791,714
Action script is developed based on object oriented programming but why does it not support function overloading? Does Flex support overloading? If yes, please explain briefly with a real example.
2009/11/24
[ "https://Stackoverflow.com/questions/1791714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214131/" ]
As you say, function overloading is not supported in Action Script (and therefore not even in Flex). But the functions may have default parameters like here: ``` public function DoSomething(a:String='', b:SomeObject=null, c:Number=0):void ``` `DoSomething` can be called in 4 different ways: ``` DoSomething() DoSom...
There is another way - function with any parameters returns anything. ``` public function doSomething(...args):*{ if(args.length==1){ if(args[0] is String){ return args[0] as String; } if(args[0] is Number){ return args[0] as Number; } } if(args.lengt...
1,791,714
Action script is developed based on object oriented programming but why does it not support function overloading? Does Flex support overloading? If yes, please explain briefly with a real example.
2009/11/24
[ "https://Stackoverflow.com/questions/1791714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214131/" ]
As you say, function overloading is not supported in Action Script (and therefore not even in Flex). But the functions may have default parameters like here: ``` public function DoSomething(a:String='', b:SomeObject=null, c:Number=0):void ``` `DoSomething` can be called in 4 different ways: ``` DoSomething() DoSom...
You can't overload, but you can set default values for arguments which is practically the same thing, but it does force you to plan your methods ahead sometimes. The reason it doesn't is probably mostly a time/return on investment issue for Adobe in designing and writing the language.
1,791,714
Action script is developed based on object oriented programming but why does it not support function overloading? Does Flex support overloading? If yes, please explain briefly with a real example.
2009/11/24
[ "https://Stackoverflow.com/questions/1791714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214131/" ]
As you say, function overloading is not supported in Action Script (and therefore not even in Flex). But the functions may have default parameters like here: ``` public function DoSomething(a:String='', b:SomeObject=null, c:Number=0):void ``` `DoSomething` can be called in 4 different ways: ``` DoSomething() DoSom...
Likely because Actionscript looks up functions by function name at runtime, rather than storing them by name and parameters at compile time. This feature makes it easy to add and remove functions from dynamic objects, and the ability to get and call functions by name using `object['functionName']()`, but I imagine tha...
1,791,714
Action script is developed based on object oriented programming but why does it not support function overloading? Does Flex support overloading? If yes, please explain briefly with a real example.
2009/11/24
[ "https://Stackoverflow.com/questions/1791714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214131/" ]
It's worth noting that function overloading is not an OOP idiom, it's a language convention. OOP languages *often* have overloading support, but it's not necessary. As lk notes, you can approximate it with the structure he shows. Alternately, you can do this: ``` public function overloaded(mandatory1: Type, mandatory...
There is another way - function with any parameters returns anything. ``` public function doSomething(...args):*{ if(args.length==1){ if(args[0] is String){ return args[0] as String; } if(args[0] is Number){ return args[0] as Number; } } if(args.lengt...
1,791,714
Action script is developed based on object oriented programming but why does it not support function overloading? Does Flex support overloading? If yes, please explain briefly with a real example.
2009/11/24
[ "https://Stackoverflow.com/questions/1791714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214131/" ]
It's worth noting that function overloading is not an OOP idiom, it's a language convention. OOP languages *often* have overloading support, but it's not necessary. As lk notes, you can approximate it with the structure he shows. Alternately, you can do this: ``` public function overloaded(mandatory1: Type, mandatory...
You can't overload, but you can set default values for arguments which is practically the same thing, but it does force you to plan your methods ahead sometimes. The reason it doesn't is probably mostly a time/return on investment issue for Adobe in designing and writing the language.
1,791,714
Action script is developed based on object oriented programming but why does it not support function overloading? Does Flex support overloading? If yes, please explain briefly with a real example.
2009/11/24
[ "https://Stackoverflow.com/questions/1791714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214131/" ]
It's worth noting that function overloading is not an OOP idiom, it's a language convention. OOP languages *often* have overloading support, but it's not necessary. As lk notes, you can approximate it with the structure he shows. Alternately, you can do this: ``` public function overloaded(mandatory1: Type, mandatory...
Likely because Actionscript looks up functions by function name at runtime, rather than storing them by name and parameters at compile time. This feature makes it easy to add and remove functions from dynamic objects, and the ability to get and call functions by name using `object['functionName']()`, but I imagine tha...
36,038,188
I am using **spark-1.5.0-cdh5.6.0**. tried the sample application (scala) command is: ``` > spark-submit --class com.cloudera.spark.simbox.sparksimbox.WordCount --master local /home/hadoop/work/testspark.jar ``` Got the following error: ``` ERROR SparkContext: Error initializing SparkContext. java.io.FileNotFoundE...
2016/03/16
[ "https://Stackoverflow.com/questions/36038188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5944709/" ]
Spark has a feature called "history server" which allows you to browse historical events after the `SparkContext` dies. This property is set via setting `spark.eventLog.enabled` to `true`. You have two options, either specify a valid directory to store the event log via the `spark.eventLog.dir` config value, or simply...
I got the same error which working with nltk in spark, To fix this I just removed all the nltk related properties from spark-conf.default.
73,850,565
| id | country | start\_date | end\_date | var1 | var2 | | --- | --- | --- | --- | --- | --- | | xx1 | xx | 01/12/2020 | 25/12/2020 | 1 | 4 | | yy1 | yy | 03/12/2020 | 25/12/2020 | 2 | 3 | | xx2 | xx | 27/12/2020 | 10/03/2022 | 4 | 2 | I need to convert a periodic dataset (N 400) formatted like this into country/day w...
2022/09/26
[ "https://Stackoverflow.com/questions/73850565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20087430/" ]
Did you read the error? That `mongoose-auto-increment` library requires version 4 of `mongoose`, but you have `mongoose` 5. You can see if things might work by adding one of the options suggested in the error, i.e. `npm i --legacy-peer-deps` or `npm i --force`, or you might want to look for a newer versionf of `mongoo...
Would you please remove node\_modules folder from the root of your project? Then try to run > > npm install > > > If this is still the problem. Try removing node\_modules folder again and run > > npm i --legacy-peer-deps > > > If this still not works, try to downgrade/upgrade the package mongoose-auto-incr...
73,850,565
| id | country | start\_date | end\_date | var1 | var2 | | --- | --- | --- | --- | --- | --- | | xx1 | xx | 01/12/2020 | 25/12/2020 | 1 | 4 | | yy1 | yy | 03/12/2020 | 25/12/2020 | 2 | 3 | | xx2 | xx | 27/12/2020 | 10/03/2022 | 4 | 2 | I need to convert a periodic dataset (N 400) formatted like this into country/day w...
2022/09/26
[ "https://Stackoverflow.com/questions/73850565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20087430/" ]
Did you read the error? That `mongoose-auto-increment` library requires version 4 of `mongoose`, but you have `mongoose` 5. You can see if things might work by adding one of the options suggested in the error, i.e. `npm i --legacy-peer-deps` or `npm i --force`, or you might want to look for a newer versionf of `mongoo...
For anyone else facing the same issue. One(or more) dependency in the package.json is not compatible with the latest version of nodejs. 1. easy solution - downgrade to lower versions of nodejs using nvm 2. extra work but better solution - install all the dependencies one-by-one and find the package that is causing th...
4,794,787
I have been trying to figure out how to make what I thought would be a simple kernel to take the average of the values in a 2d matrix, but I am having some issues getting my thought process straight on it. According to my deviceQuery output, my GPU has 16MP, 32cores/mp, blocks max is 1024x1024x64 and I have a max thre...
2011/01/25
[ "https://Stackoverflow.com/questions/4794787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229072/" ]
For performance applications like this you need to store 2D matrix information as a single array in memory. So if you have an M x N matrix then you can store it in a single array of length M\*N. So if you want to store the 2x2 matrix ``` (1 , 2) (3 , 4) ``` Then you create a single array an initialize the elements...
Below is a short snippet with a simple kernel from my own code. The float pointers are all device pointers. Hope this is helpful. Defines and help functions: ``` #define BLOCK_SIZE 16 int iDivUp(int a, int b){ return (a % b != 0) ? (a / b + 1) : (a / b); } ``` Block size calculation: ``` dim3 dimBlock(BLOCK_S...
4,794,787
I have been trying to figure out how to make what I thought would be a simple kernel to take the average of the values in a 2d matrix, but I am having some issues getting my thought process straight on it. According to my deviceQuery output, my GPU has 16MP, 32cores/mp, blocks max is 1024x1024x64 and I have a max thre...
2011/01/25
[ "https://Stackoverflow.com/questions/4794787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229072/" ]
Recently, I figured this question in the following fashion. ``` // Grid and block size const dim3 blockSize(16,16,1); const dim3 gridSize(numRows, numCols, 1); // kernel call rgba_to_greyscale<<<gridSize, blockSize>>>(d_rgbaImage, d_greyImage, numRows, numCols ``` gridsize = Number of Block blocksize = Threads ...
Below is a short snippet with a simple kernel from my own code. The float pointers are all device pointers. Hope this is helpful. Defines and help functions: ``` #define BLOCK_SIZE 16 int iDivUp(int a, int b){ return (a % b != 0) ? (a / b + 1) : (a / b); } ``` Block size calculation: ``` dim3 dimBlock(BLOCK_S...
4,794,787
I have been trying to figure out how to make what I thought would be a simple kernel to take the average of the values in a 2d matrix, but I am having some issues getting my thought process straight on it. According to my deviceQuery output, my GPU has 16MP, 32cores/mp, blocks max is 1024x1024x64 and I have a max thre...
2011/01/25
[ "https://Stackoverflow.com/questions/4794787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/229072/" ]
Recently, I figured this question in the following fashion. ``` // Grid and block size const dim3 blockSize(16,16,1); const dim3 gridSize(numRows, numCols, 1); // kernel call rgba_to_greyscale<<<gridSize, blockSize>>>(d_rgbaImage, d_greyImage, numRows, numCols ``` gridsize = Number of Block blocksize = Threads ...
For performance applications like this you need to store 2D matrix information as a single array in memory. So if you have an M x N matrix then you can store it in a single array of length M\*N. So if you want to store the 2x2 matrix ``` (1 , 2) (3 , 4) ``` Then you create a single array an initialize the elements...
47,775,377
We have a file server that processes files that are received. When a file fails to process for whatever reason, it is moved into a failure folder. I've written a script to iterate through every possible one of these folders and spit out the FullName of the file into an e-mail which it sends to me. Now when I run it m...
2017/12/12
[ "https://Stackoverflow.com/questions/47775377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3657661/" ]
This gives the kind of output you would probably expect ``` [command] | Format-Table -AutoSize | Out-String -Width 10000 #| clip.exe ```
Since you were using `Format-Table -Autosize` it was probably truncating due to the the amount of characters per line in the powershell instance. You can use the `ConvertTo-Html` function with the `-Fragment` command to create an HTML table. Try something like this: ``` $emailFileList = "" $filelist = @() try { ...
47,775,377
We have a file server that processes files that are received. When a file fails to process for whatever reason, it is moved into a failure folder. I've written a script to iterate through every possible one of these folders and spit out the FullName of the file into an e-mail which it sends to me. Now when I run it m...
2017/12/12
[ "https://Stackoverflow.com/questions/47775377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3657661/" ]
This gives the kind of output you would probably expect ``` [command] | Format-Table -AutoSize | Out-String -Width 10000 #| clip.exe ```
Your problem is the formatter truncating because the console host can't render the full strings. Here's a solution where you'll get a txt with a list of names that can be used however you want General rule of thumb: filter left, format right. ``` #Requires -Version 3 Try { Get-ChildItem -Path $TopLevelPath -Recur...
51,016,873
**Why** When comparing and deduplicating across two lists coders don't often find the most runtime-efficient implementation while under time-pressure. Two nested for-loops is a common goto solution for many coders. One might try a CROSS JOIN with LINQ, but this is clearly inefficient. Coders need a memorable and code-...
2018/06/25
[ "https://Stackoverflow.com/questions/51016873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/887092/" ]
Use HashSet for your initial list and `ExceptWith` method to get result sett: ``` var setToDeduplicate = new HashSet<int>() { 1,2,3,4,5,6,7,8,9,10,11,.....}; //All integer values 1-1M var referenceSet = new List<int>() { 1,3,5,7,9,....}; //All odd integer values 1-1M setToDeduplicate.ExceptWith(referenceSet); ```
**HashSet and Where** You must use a HashSet (or Dictionary) for speed: ``` //Returns an IEnumerable from which more can be chained or simply terminated with ToList by the caller IEnumerable<int> deduplicationFunction(List<int> Set, List<int> Reference) { //Create a hashset first, which is much more efficient for...
51,016,873
**Why** When comparing and deduplicating across two lists coders don't often find the most runtime-efficient implementation while under time-pressure. Two nested for-loops is a common goto solution for many coders. One might try a CROSS JOIN with LINQ, but this is clearly inefficient. Coders need a memorable and code-...
2018/06/25
[ "https://Stackoverflow.com/questions/51016873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/887092/" ]
Here are some more, basically i wanted to test both distinct and not distinct input against a variety of solutions. In the non distinct version i had to call distinct where needed on the final output. ``` Mode : Release (64Bit) Test Framework : .NET Framework 4.7.1 Operating System : Microsoft Windows 1...
**HashSet and Where** You must use a HashSet (or Dictionary) for speed: ``` //Returns an IEnumerable from which more can be chained or simply terminated with ToList by the caller IEnumerable<int> deduplicationFunction(List<int> Set, List<int> Reference) { //Create a hashset first, which is much more efficient for...
51,016,873
**Why** When comparing and deduplicating across two lists coders don't often find the most runtime-efficient implementation while under time-pressure. Two nested for-loops is a common goto solution for many coders. One might try a CROSS JOIN with LINQ, but this is clearly inefficient. Coders need a memorable and code-...
2018/06/25
[ "https://Stackoverflow.com/questions/51016873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/887092/" ]
**Single loop Dual-Index** As recommended by @PepitoSh in the Question comments: > > I think HashSet is a very generic solution to a rather specific > problem. If your lists are ordered, scanning them parallel and compare > the current items is the fastest > > > This is very different to having two nested loo...
**HashSet and Where** You must use a HashSet (or Dictionary) for speed: ``` //Returns an IEnumerable from which more can be chained or simply terminated with ToList by the caller IEnumerable<int> deduplicationFunction(List<int> Set, List<int> Reference) { //Create a hashset first, which is much more efficient for...
51,016,873
**Why** When comparing and deduplicating across two lists coders don't often find the most runtime-efficient implementation while under time-pressure. Two nested for-loops is a common goto solution for many coders. One might try a CROSS JOIN with LINQ, but this is clearly inefficient. Coders need a memorable and code-...
2018/06/25
[ "https://Stackoverflow.com/questions/51016873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/887092/" ]
Use HashSet for your initial list and `ExceptWith` method to get result sett: ``` var setToDeduplicate = new HashSet<int>() { 1,2,3,4,5,6,7,8,9,10,11,.....}; //All integer values 1-1M var referenceSet = new List<int>() { 1,3,5,7,9,....}; //All odd integer values 1-1M setToDeduplicate.ExceptWith(referenceSet); ```
**Single loop Dual-Index** As recommended by @PepitoSh in the Question comments: > > I think HashSet is a very generic solution to a rather specific > problem. If your lists are ordered, scanning them parallel and compare > the current items is the fastest > > > This is very different to having two nested loo...
51,016,873
**Why** When comparing and deduplicating across two lists coders don't often find the most runtime-efficient implementation while under time-pressure. Two nested for-loops is a common goto solution for many coders. One might try a CROSS JOIN with LINQ, but this is clearly inefficient. Coders need a memorable and code-...
2018/06/25
[ "https://Stackoverflow.com/questions/51016873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/887092/" ]
Here are some more, basically i wanted to test both distinct and not distinct input against a variety of solutions. In the non distinct version i had to call distinct where needed on the final output. ``` Mode : Release (64Bit) Test Framework : .NET Framework 4.7.1 Operating System : Microsoft Windows 1...
**Single loop Dual-Index** As recommended by @PepitoSh in the Question comments: > > I think HashSet is a very generic solution to a rather specific > problem. If your lists are ordered, scanning them parallel and compare > the current items is the fastest > > > This is very different to having two nested loo...
316,824
In November, I wrote an answer to this [question](https://stackoverflow.com/questions/33616049/inconsistent-bar-widths-when-month-scaling-in-ggplot/33619670#33619670) and it was accepted. It's probably not the best post on SO, but IMHO it is good enough to keep because others might stumble upon this same bug/feature. ...
2016/02/14
[ "https://meta.stackoverflow.com/questions/316824", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4611308/" ]
> > I have already tried to ask the OP for a reason; maybe I can improve something, but there has been no response (for 2 weeks). What else can/should I do? > > > Move on and answer some other questions. One accept gone will not destroy your future and SE swag. The OP probably unaccepted your answer for some reaso...
Every so often I'll use [SEDE](https://data.stackexchange.com/stackoverflow/query/438889/unaccepted-answer-audit?minAnswerScore=1&UserId=621962) to audit my popular answers to questions which don't already have an accepted answer. [![](https://i.stack.imgur.com/PqqSy.png)](https://data.stackexchange.com/stackoverflow/...
316,824
In November, I wrote an answer to this [question](https://stackoverflow.com/questions/33616049/inconsistent-bar-widths-when-month-scaling-in-ggplot/33619670#33619670) and it was accepted. It's probably not the best post on SO, but IMHO it is good enough to keep because others might stumble upon this same bug/feature. ...
2016/02/14
[ "https://meta.stackoverflow.com/questions/316824", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4611308/" ]
> > I have already tried to ask the OP for a reason; maybe I can improve something, but there has been no response (for 2 weeks). What else can/should I do? > > > Move on and answer some other questions. One accept gone will not destroy your future and SE swag. The OP probably unaccepted your answer for some reaso...
Having looked at the OP's profile, it looks like a case of Ask a Question, Get and Answer, Run Away - in other words, an inactive user who's already got what they want and is not likely to come back unless they want to ask another question. Such users, I feel, don't really care about things like reputation, SO is a fre...
316,824
In November, I wrote an answer to this [question](https://stackoverflow.com/questions/33616049/inconsistent-bar-widths-when-month-scaling-in-ggplot/33619670#33619670) and it was accepted. It's probably not the best post on SO, but IMHO it is good enough to keep because others might stumble upon this same bug/feature. ...
2016/02/14
[ "https://meta.stackoverflow.com/questions/316824", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/4611308/" ]
Every so often I'll use [SEDE](https://data.stackexchange.com/stackoverflow/query/438889/unaccepted-answer-audit?minAnswerScore=1&UserId=621962) to audit my popular answers to questions which don't already have an accepted answer. [![](https://i.stack.imgur.com/PqqSy.png)](https://data.stackexchange.com/stackoverflow/...
Having looked at the OP's profile, it looks like a case of Ask a Question, Get and Answer, Run Away - in other words, an inactive user who's already got what they want and is not likely to come back unless they want to ask another question. Such users, I feel, don't really care about things like reputation, SO is a fre...
60,900,539
I am searching for a simple command/function to generate permutation of a numbers set given as a parameters of a shell command. Here on example I can generate all 6-number permutations from 1-6 numbers in Python: ``` root@debian:~# python Python 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516] on linux2 T...
2020/03/28
[ "https://Stackoverflow.com/questions/60900539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7610527/" ]
Take the list of command line parameters and for each permutation of this list display individual values separated with spaces. ``` import itertools import sys for p in itertools.permutations(sys.argv[1:]): print(" ".join(p)) ```
Update ------ The following oneliner does what the OP asks. ``` echo {12,4,43,30}","{12,4,43,30}","{12,4,43,30}","{12,4,43,30} | sed -E 's/\<([0-9]+,)*([0-9]+),([0-9]+,)*\2(,[0-9]+)*\>( |$)//g;s/ +/\n/g' ``` It works like this: * the `echo` command generates the *nⁿ* space-separated permutations separating the num...
70,349,963
So, normally I can get screen size by using `MediaQuery.of(context).size`, however I don't have access to context at runtime. Is there any package or API I can tap into to accomplish this ? **EDIT:** Accepted @smorgan answer. Adding the pubspec.yaml entry with small use case for others, so they don't have to go diggin...
2021/12/14
[ "https://Stackoverflow.com/questions/70349963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9314632/" ]
The [`window_size`](https://github.com/google/flutter-desktop-embedding/tree/master/plugins/window_size) plugin will let you get the current screen size, or a list of all screens and their sizes.
This is what I use for my flutter windows app: <https://pub.dev/packages/desktop_window>
16,222,504
I'm having trouble getting phpunit working inside of a Symfony project in PhpStorm - `phpunit -c app` works fine in the OSX terminal. Here is the error: ``` Unable to attach test reporter to test framework of test framework quit unexpectedly /Applications/MAMP/bin/php/php5.4.4/bin/php/private/var/folders/4l/hw8g4qlj...
2013/04/25
[ "https://Stackoverflow.com/questions/16222504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1062936/" ]
I ran into the same issue and found the following solution in the documentation: <http://symfony.com/doc/current/book/testing.html#your-first-functional-test> > > To run your functional tests, the WebTestCase class bootstraps the > kernel of your application. In most cases, this happens automatically. > However, if...
PhpStorm does not always instantiate the test runner from the project root, to fix this add the absolute path to the project root under 'custom working directory' in the run/debug config. This will save you having to add the absolute path to the app in the phpunit.xml.dist config, it will also ensure that any relative...
16,222,504
I'm having trouble getting phpunit working inside of a Symfony project in PhpStorm - `phpunit -c app` works fine in the OSX terminal. Here is the error: ``` Unable to attach test reporter to test framework of test framework quit unexpectedly /Applications/MAMP/bin/php/php5.4.4/bin/php/private/var/folders/4l/hw8g4qlj...
2013/04/25
[ "https://Stackoverflow.com/questions/16222504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1062936/" ]
I ran into the same issue and found the following solution in the documentation: <http://symfony.com/doc/current/book/testing.html#your-first-functional-test> > > To run your functional tests, the WebTestCase class bootstraps the > kernel of your application. In most cases, this happens automatically. > However, if...
Steps to make it work (test in PHPStorm 8.0.1): **1) In** `Preferences > PHP > PHPUnit` **make sure that nothing is set for Default configuration file or default bootstrap file.** **2) Make a custom PHPUnit Configuration via** `Run > Edit Configurations >` **in the** `Command Line` **subsection, and be sure to:** **...
16,222,504
I'm having trouble getting phpunit working inside of a Symfony project in PhpStorm - `phpunit -c app` works fine in the OSX terminal. Here is the error: ``` Unable to attach test reporter to test framework of test framework quit unexpectedly /Applications/MAMP/bin/php/php5.4.4/bin/php/private/var/folders/4l/hw8g4qlj...
2013/04/25
[ "https://Stackoverflow.com/questions/16222504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1062936/" ]
I ran into the same issue and found the following solution in the documentation: <http://symfony.com/doc/current/book/testing.html#your-first-functional-test> > > To run your functional tests, the WebTestCase class bootstraps the > kernel of your application. In most cases, this happens automatically. > However, if...
I ran into the same issue. If you are using yii2/phpStorm, try to select `codeception.yml` instead `unit.yml` under 'alternative configuration file' in the debug configuration section.
16,222,504
I'm having trouble getting phpunit working inside of a Symfony project in PhpStorm - `phpunit -c app` works fine in the OSX terminal. Here is the error: ``` Unable to attach test reporter to test framework of test framework quit unexpectedly /Applications/MAMP/bin/php/php5.4.4/bin/php/private/var/folders/4l/hw8g4qlj...
2013/04/25
[ "https://Stackoverflow.com/questions/16222504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1062936/" ]
PhpStorm does not always instantiate the test runner from the project root, to fix this add the absolute path to the project root under 'custom working directory' in the run/debug config. This will save you having to add the absolute path to the app in the phpunit.xml.dist config, it will also ensure that any relative...
I ran into the same issue. If you are using yii2/phpStorm, try to select `codeception.yml` instead `unit.yml` under 'alternative configuration file' in the debug configuration section.
16,222,504
I'm having trouble getting phpunit working inside of a Symfony project in PhpStorm - `phpunit -c app` works fine in the OSX terminal. Here is the error: ``` Unable to attach test reporter to test framework of test framework quit unexpectedly /Applications/MAMP/bin/php/php5.4.4/bin/php/private/var/folders/4l/hw8g4qlj...
2013/04/25
[ "https://Stackoverflow.com/questions/16222504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1062936/" ]
Steps to make it work (test in PHPStorm 8.0.1): **1) In** `Preferences > PHP > PHPUnit` **make sure that nothing is set for Default configuration file or default bootstrap file.** **2) Make a custom PHPUnit Configuration via** `Run > Edit Configurations >` **in the** `Command Line` **subsection, and be sure to:** **...
I ran into the same issue. If you are using yii2/phpStorm, try to select `codeception.yml` instead `unit.yml` under 'alternative configuration file' in the debug configuration section.
38,660,096
I send Json data with net/http package by an Url, i want to have some lowercase keys in return, but it's not working. In this example of the problem, i want lowercase 'count' and 'data' key. ``` package main import ( "encoding/json" "fmt" "net/http" ) type tableau struct { Count int `json"coun...
2016/07/29
[ "https://Stackoverflow.com/questions/38660096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5530061/" ]
You forgot colon in tag declaration. As tags are not in proper format, field names are in your json. Try this: ``` type tableau struct { Count int `json:"count"` Data []People `json:"data"` } ```
Try adding a `:` to your struct tags: ``` type tableau struct { Count int `json:"count"` Data []People `json:"data"` } ```
19,384,160
I have a page with form for user registration. I wrapped it with `<!--[if IE]> ... <![endif]-->` to show it only in IE. And corresponding error is shown for other browsers: `<![if !IE]>...<![endif]>`. But this doesn't fully work with IE 10. One can use java-script to determine IE 10, like: ``` <script type="text/java...
2013/10/15
[ "https://Stackoverflow.com/questions/19384160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1049521/" ]
For ActiveX support, just check that the ActiveXObject exists in JS: ``` if(typeof window.ActiveXObject != "undefined") ``` Or more specifically: ``` if(typeof window.ActiveXObject == "function") ``` If you're confident that scoping is not an issue in your script and don't want the `window.`, variables are of cou...
Use **feature detection**, not browser detection. You can detect whether the browser supports ActiveX with the following simple line of code: ``` if(typeof window.ActiveXObject != "undefined") { ..... } ``` Why? 1. Browser detection is fragile -- newer versions of IE may not be picked up by your detection code, re...
19,384,160
I have a page with form for user registration. I wrapped it with `<!--[if IE]> ... <![endif]-->` to show it only in IE. And corresponding error is shown for other browsers: `<![if !IE]>...<![endif]>`. But this doesn't fully work with IE 10. One can use java-script to determine IE 10, like: ``` <script type="text/java...
2013/10/15
[ "https://Stackoverflow.com/questions/19384160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1049521/" ]
For ActiveX support, just check that the ActiveXObject exists in JS: ``` if(typeof window.ActiveXObject != "undefined") ``` Or more specifically: ``` if(typeof window.ActiveXObject == "function") ``` If you're confident that scoping is not an issue in your script and don't want the `window.`, variables are of cou...
I improved the approach I tried at first. First of all error page is wrapped with the following `<div>`: ``` <div id="not_ie" style="display:none"> ``` IE form is also wrapped with `<div>`: ``` <div id="ie" style="display:none"> ``` And the following js makes form or error visible depending on browser type: ``...
878,051
I have a chain of discrete segments, of equal sizes, built by the following rules: 1)every next segment rotates around it's Y axis by 7 degrees, 2)then it pivots at the join with the previous segment by 4 degrees. Regardless of the angles used, the resulting pattern is always a kind of helix, it spirals forwards in...
2014/07/25
[ "https://math.stackexchange.com/questions/878051", "https://math.stackexchange.com", "https://math.stackexchange.com/users/66849/" ]
One can do it this way. Consider the polynomial in the two variables $t, \lambda$ $$ (-1)^{n} \det((A + t B) - \lambda I). $$ Consider this as a polynomial in $t$, of degree $n$, with coefficients in the field of rational functions $\mathbb{R}(\lambda)$. By hypothesis, for $n+1$ distinct values of $t$, it coincides wi...
Once $f(t)=0$ for all $t$, you can forget the original $n+1$ values of $t$ and pick any $n+1$ non-zero values then proceed with your argument.
878,051
I have a chain of discrete segments, of equal sizes, built by the following rules: 1)every next segment rotates around it's Y axis by 7 degrees, 2)then it pivots at the join with the previous segment by 4 degrees. Regardless of the angles used, the resulting pattern is always a kind of helix, it spirals forwards in...
2014/07/25
[ "https://math.stackexchange.com/questions/878051", "https://math.stackexchange.com", "https://math.stackexchange.com/users/66849/" ]
One can do it this way. Consider the polynomial in the two variables $t, \lambda$ $$ (-1)^{n} \det((A + t B) - \lambda I). $$ Consider this as a polynomial in $t$, of degree $n$, with coefficients in the field of rational functions $\mathbb{R}(\lambda)$. By hypothesis, for $n+1$ distinct values of $t$, it coincides wi...
This is a a more complete write up using the ideas of @QuangHoang. It can also be viewed as an analytic (instead of algebraic) version of the ideas of @AndreasCaranti As before, define $f(t)=(A+tB)^n$. This is a matrix valued function, but by examining the individual entries we have $n^2$ real valued functions. We hav...
878,051
I have a chain of discrete segments, of equal sizes, built by the following rules: 1)every next segment rotates around it's Y axis by 7 degrees, 2)then it pivots at the join with the previous segment by 4 degrees. Regardless of the angles used, the resulting pattern is always a kind of helix, it spirals forwards in...
2014/07/25
[ "https://math.stackexchange.com/questions/878051", "https://math.stackexchange.com", "https://math.stackexchange.com/users/66849/" ]
One can do it this way. Consider the polynomial in the two variables $t, \lambda$ $$ (-1)^{n} \det((A + t B) - \lambda I). $$ Consider this as a polynomial in $t$, of degree $n$, with coefficients in the field of rational functions $\mathbb{R}(\lambda)$. By hypothesis, for $n+1$ distinct values of $t$, it coincides wi...
I propose a slightly different algebraic proof, in which instead of matrix polynomials we just use the coefficients of the characteristic polynomial: A matrix $M\in$Mat$\_n(K)$ is nilpotent if and only if its characteristic polynomial is $p\_M(X)=X^n$, if and only if the coefficients $c\_j$ of $p\_M(X)=c\_0X^n+\ldots+...
878,051
I have a chain of discrete segments, of equal sizes, built by the following rules: 1)every next segment rotates around it's Y axis by 7 degrees, 2)then it pivots at the join with the previous segment by 4 degrees. Regardless of the angles used, the resulting pattern is always a kind of helix, it spirals forwards in...
2014/07/25
[ "https://math.stackexchange.com/questions/878051", "https://math.stackexchange.com", "https://math.stackexchange.com/users/66849/" ]
This is a a more complete write up using the ideas of @QuangHoang. It can also be viewed as an analytic (instead of algebraic) version of the ideas of @AndreasCaranti As before, define $f(t)=(A+tB)^n$. This is a matrix valued function, but by examining the individual entries we have $n^2$ real valued functions. We hav...
Once $f(t)=0$ for all $t$, you can forget the original $n+1$ values of $t$ and pick any $n+1$ non-zero values then proceed with your argument.
878,051
I have a chain of discrete segments, of equal sizes, built by the following rules: 1)every next segment rotates around it's Y axis by 7 degrees, 2)then it pivots at the join with the previous segment by 4 degrees. Regardless of the angles used, the resulting pattern is always a kind of helix, it spirals forwards in...
2014/07/25
[ "https://math.stackexchange.com/questions/878051", "https://math.stackexchange.com", "https://math.stackexchange.com/users/66849/" ]
Once $f(t)=0$ for all $t$, you can forget the original $n+1$ values of $t$ and pick any $n+1$ non-zero values then proceed with your argument.
I propose a slightly different algebraic proof, in which instead of matrix polynomials we just use the coefficients of the characteristic polynomial: A matrix $M\in$Mat$\_n(K)$ is nilpotent if and only if its characteristic polynomial is $p\_M(X)=X^n$, if and only if the coefficients $c\_j$ of $p\_M(X)=c\_0X^n+\ldots+...
878,051
I have a chain of discrete segments, of equal sizes, built by the following rules: 1)every next segment rotates around it's Y axis by 7 degrees, 2)then it pivots at the join with the previous segment by 4 degrees. Regardless of the angles used, the resulting pattern is always a kind of helix, it spirals forwards in...
2014/07/25
[ "https://math.stackexchange.com/questions/878051", "https://math.stackexchange.com", "https://math.stackexchange.com/users/66849/" ]
This is a a more complete write up using the ideas of @QuangHoang. It can also be viewed as an analytic (instead of algebraic) version of the ideas of @AndreasCaranti As before, define $f(t)=(A+tB)^n$. This is a matrix valued function, but by examining the individual entries we have $n^2$ real valued functions. We hav...
I propose a slightly different algebraic proof, in which instead of matrix polynomials we just use the coefficients of the characteristic polynomial: A matrix $M\in$Mat$\_n(K)$ is nilpotent if and only if its characteristic polynomial is $p\_M(X)=X^n$, if and only if the coefficients $c\_j$ of $p\_M(X)=c\_0X^n+\ldots+...
21,941,342
I have a panel which is not a form, yet it's used like a form. I need to disable the "addButton" button when a text field is invalid. The disabling in the text Field's validator function works, but visually the button still looks enabled. How can I tell a button to be visually disabled via the validator method on my te...
2014/02/21
[ "https://Stackoverflow.com/questions/21941342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/527516/" ]
Here is working sample <http://jsfiddle.net/H76fQ/2/> ``` var button = Ext.create('Ext.button.Button',{ renderTo: Ext.getBody(), text: 'Ok', disabled: true }); Ext.create('Ext.form.field.Text',{ allowBlank: false, renderTo: Ext.getBody(), listeners:{ afterrender: function(){ ...
To disable the FormPanel’s submit button,You can set the FormPanel’s monitorValid to true and the submit button’s formBind to true. ```js items: [{ xtype: 'ux.form', monitorValid: true, // Must be added layout: { type: 'hbox', align: 'start', pack: 'stretch' }, items: [{ name:"testing", ...
35,633,763
I am trying to resize the input/td fields for a table, but cannot seem to get it working. Ive been referencing the stack post below. Still no luck. [stack-post-ref](https://stackoverflow.com/questions/15115052/bootstrap-how-to-set-up-fixed-width-for-td) [jsfiddle-for-table](https://jsfiddle.net/uadLzbcd/) ``` <div c...
2016/02/25
[ "https://Stackoverflow.com/questions/35633763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908778/" ]
add `form-control` class to your `input` field <https://jsfiddle.net/NourSammour/u2c09yb5/1/>
For me this works: ``` <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th>#</th> <th>Header</th> <th>Header</th> <th>Header</th> <th>Header</th> ...
28,250,740
I am creating an angular js Application. which has a side bar navigation sustem. when I click on the sidebar item, then it has to show contents under that item in the content section,I am using bootstrap See the code I've written **HTML** ``` <div class="sidebar"> <ul> <li ng-repeat="item...
2015/01/31
[ "https://Stackoverflow.com/questions/28250740", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2769892/" ]
I was able to solve my problem thanks to @Boris the Spider. The correct solution is to do something like that : ``` @Controller @RequestMapping("/") public class PhotoController { @Autowired private SimpMessagingTemplate template; @MessageMapping("/form") @SendTo("/topic/greetings") public Greeti...
A better way to schedule periodic tasks is, as suggested by @Boris the Spider, to use Spring scheduling mechanisms (see [this guide](https://spring.io/guides/gs/scheduling-tasks/)). For the sake of Separation of Concerns, I would also separate scheduled-related code from controller code. In your case you could use a ...
60,004,261
I got a simple model,. `models.py`: ``` class Inform_note(models.Model): id = models.AutoField(primary_key=True) in_note_on = models.FileField(upload_to='notes', blank=True) note_date = models.DateField(auto_now_add=False, blank=True, null=True) ``` With CreateView I can create a new records, edit this records with...
2020/01/31
[ "https://Stackoverflow.com/questions/60004261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6650039/" ]
You are returning same state from reducer, create copy of state and update value and return it. ``` export const startOfDayReducer = (state, action) => { switch (action.type) { case 'UPDATE_CASH_DRAWER_COUNT': const { cashDrawers } = action; // assuming you are getting updated cashDrawers from ...
A good rule of thumb when working with useReducer is to “never mutate arguments”, and in react in general: “never mutate state”. Try returning a new object: 'return {...state, cashDrawers}' If you can’t use the object spread operator, this is equivalent: 'return Object.assign({}, state, {cashDrawers})'
29,083,756
I am a beginner at using java and I do not know how to get the system to output the contents from my array list in a string ``` private void createRooms() { Room townCenter, boots, tesco, library, home; // create the rooms townCenter = new Room("in the town center", contents); boots = new Room("in boo...
2015/03/16
[ "https://Stackoverflow.com/questions/29083756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4316651/" ]
The `ArrayList` class inherits a `toString()` method that converts each element of the list to a string. Per [the docs](http://docs.oracle.com/javase/7/docs/api/java/util/AbstractCollection.html#toString()), it joins them all together using commas, and encloses the entire thing with square brackets (`"[]"`). If that fo...
You need to override the toString() method in your Room class. Here is an example of overriding a class's toString() method: ``` @Override public String toString() { return "Name: " + this.name + ", Description: " + this.description + ", Type: " + this.type; } ``` You can then call toString() on your ArrayLi...
29,083,756
I am a beginner at using java and I do not know how to get the system to output the contents from my array list in a string ``` private void createRooms() { Room townCenter, boots, tesco, library, home; // create the rooms townCenter = new Room("in the town center", contents); boots = new Room("in boo...
2015/03/16
[ "https://Stackoverflow.com/questions/29083756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4316651/" ]
First you should Override the toString() of your "Objects" which represent the contents of your rooms. This way you can give a friendly description to each "Objects". Inside of your Objects class: ``` @Override public String toString() { return "Object: " + objectName; //use whatever variable you store "Milk" o...
You need to override the toString() method in your Room class. Here is an example of overriding a class's toString() method: ``` @Override public String toString() { return "Name: " + this.name + ", Description: " + this.description + ", Type: " + this.type; } ``` You can then call toString() on your ArrayLi...
29,083,756
I am a beginner at using java and I do not know how to get the system to output the contents from my array list in a string ``` private void createRooms() { Room townCenter, boots, tesco, library, home; // create the rooms townCenter = new Room("in the town center", contents); boots = new Room("in boo...
2015/03/16
[ "https://Stackoverflow.com/questions/29083756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4316651/" ]
The `ArrayList` class inherits a `toString()` method that converts each element of the list to a string. Per [the docs](http://docs.oracle.com/javase/7/docs/api/java/util/AbstractCollection.html#toString()), it joins them all together using commas, and encloses the entire thing with square brackets (`"[]"`). If that fo...
For a given `room`, you can list its contents through a loop: ``` String contentsAsString = ""; for(Objects object : room.getContents()) { contentsAsString += object.toString() + " "; } // Now you can use the string Sysm.out.println("contentsAsString: " + contentsAsString); ``` You need to implement the `getCon...
29,083,756
I am a beginner at using java and I do not know how to get the system to output the contents from my array list in a string ``` private void createRooms() { Room townCenter, boots, tesco, library, home; // create the rooms townCenter = new Room("in the town center", contents); boots = new Room("in boo...
2015/03/16
[ "https://Stackoverflow.com/questions/29083756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4316651/" ]
The `ArrayList` class inherits a `toString()` method that converts each element of the list to a string. Per [the docs](http://docs.oracle.com/javase/7/docs/api/java/util/AbstractCollection.html#toString()), it joins them all together using commas, and encloses the entire thing with square brackets (`"[]"`). If that fo...
While you are learning, why don't you try it like this. You have mentioned "any help is appreciated" :) You can enhance this to do lots of stuff with the objects you are passing So create an interface that has an abstract displayMessage. Something like this, ``` public interface Content { public void displayMessa...
29,083,756
I am a beginner at using java and I do not know how to get the system to output the contents from my array list in a string ``` private void createRooms() { Room townCenter, boots, tesco, library, home; // create the rooms townCenter = new Room("in the town center", contents); boots = new Room("in boo...
2015/03/16
[ "https://Stackoverflow.com/questions/29083756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4316651/" ]
First you should Override the toString() of your "Objects" which represent the contents of your rooms. This way you can give a friendly description to each "Objects". Inside of your Objects class: ``` @Override public String toString() { return "Object: " + objectName; //use whatever variable you store "Milk" o...
For a given `room`, you can list its contents through a loop: ``` String contentsAsString = ""; for(Objects object : room.getContents()) { contentsAsString += object.toString() + " "; } // Now you can use the string Sysm.out.println("contentsAsString: " + contentsAsString); ``` You need to implement the `getCon...
29,083,756
I am a beginner at using java and I do not know how to get the system to output the contents from my array list in a string ``` private void createRooms() { Room townCenter, boots, tesco, library, home; // create the rooms townCenter = new Room("in the town center", contents); boots = new Room("in boo...
2015/03/16
[ "https://Stackoverflow.com/questions/29083756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4316651/" ]
First you should Override the toString() of your "Objects" which represent the contents of your rooms. This way you can give a friendly description to each "Objects". Inside of your Objects class: ``` @Override public String toString() { return "Object: " + objectName; //use whatever variable you store "Milk" o...
While you are learning, why don't you try it like this. You have mentioned "any help is appreciated" :) You can enhance this to do lots of stuff with the objects you are passing So create an interface that has an abstract displayMessage. Something like this, ``` public interface Content { public void displayMessa...
16,696,342
I am using CTE with PetaPOCO and getting a strange error `SQL Exception: Invalid Object Name PayTransactionForRollingVacationAverage` that references the model that the data should map to. The code is as follows. ``` public IEnumerable<PayTransactionForRollingVacationAverage> GetPayTransactionForRollingVacationAve...
2013/05/22
[ "https://Stackoverflow.com/questions/16696342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2410254/" ]
Remove the whitespace before the semi-colon. According to Alex Jorgenson's link, this is fixed if you make a semi-colon the very first character. According to my testing, this is strictly the first character, i.e. if there is even some whitespace before the semi-colon, the auto-generated code will still be spit out.
This is a known issue with Peta Poco. It appears to be fixed in some version but I don't know which one. You can find more information and a work around for this particular issue at <https://github.com/toptensoftware/PetaPoco/issues/22>
549,516
In New York in the mid-70s, my ethnic German bride-to-be introduced me to an expression : > > “ish kabibble” > > > At the moment, I thought it kind of catchy, and have used it ever since in milder WTF moments. It seemed to imply... > > **"No way! That affects me how?** > > > Easy to find on Wikipedia, Googl...
2020/10/18
[ "https://english.stackexchange.com/questions/549516", "https://english.stackexchange.com", "https://english.stackexchange.com/users/160305/" ]
A lot of words that have a /ʃ/ at the start or phrases that use 'ish' (/ɪʃ/) (like Joe Schmoe or ish kabibble) come from people mocking Yiddish. Yiddish (for a while and I think still currently) was popular in New York where a lot of these expressions came from. It's also where we get 'oy vey'. Upon seeing it, I immedi...
Common sense of bibble ---------------------- Obsolete and contemporaneous senses of 'bibble' certainly informed the comedic origins of 'ish kabibble' and variants. Humorous use of 'bibble' as the head end of the compound 'bibble-babble', and use of 'bibble' alone as a verb, preceded and now coexist with use of 'ish k...
549,516
In New York in the mid-70s, my ethnic German bride-to-be introduced me to an expression : > > “ish kabibble” > > > At the moment, I thought it kind of catchy, and have used it ever since in milder WTF moments. It seemed to imply... > > **"No way! That affects me how?** > > > Easy to find on Wikipedia, Googl...
2020/10/18
[ "https://english.stackexchange.com/questions/549516", "https://english.stackexchange.com", "https://english.stackexchange.com/users/160305/" ]
A lot of words that have a /ʃ/ at the start or phrases that use 'ish' (/ɪʃ/) (like Joe Schmoe or ish kabibble) come from people mocking Yiddish. Yiddish (for a while and I think still currently) was popular in New York where a lot of these expressions came from. It's also where we get 'oy vey'. Upon seeing it, I immedi...
Browsing through auctions, I came across a postcard album from 1910, and one of the postcards had the phrase "Ich ka bibble" written on it. Handwritten, as part of the letter. It was an online auction, so I couldn't see the postmark, but the postcards where it was visible were dated 1910, as was the inscription in the ...
549,516
In New York in the mid-70s, my ethnic German bride-to-be introduced me to an expression : > > “ish kabibble” > > > At the moment, I thought it kind of catchy, and have used it ever since in milder WTF moments. It seemed to imply... > > **"No way! That affects me how?** > > > Easy to find on Wikipedia, Googl...
2020/10/18
[ "https://english.stackexchange.com/questions/549516", "https://english.stackexchange.com", "https://english.stackexchange.com/users/160305/" ]
Leo Rosten, *Hooray for Yiddish!* (1982) offers this account of *ish kabibble*: > > **ish kabibble** Derivation: unknown; possibly a corruption of the Yiddish *nit gefidlt* (or *nisht gefidlt*). 1. I should care. 2. I don't care. 3. Why worry about it? > > > This extraordinary slang phrase, uttered with a shrug, wa...
Common sense of bibble ---------------------- Obsolete and contemporaneous senses of 'bibble' certainly informed the comedic origins of 'ish kabibble' and variants. Humorous use of 'bibble' as the head end of the compound 'bibble-babble', and use of 'bibble' alone as a verb, preceded and now coexist with use of 'ish k...
549,516
In New York in the mid-70s, my ethnic German bride-to-be introduced me to an expression : > > “ish kabibble” > > > At the moment, I thought it kind of catchy, and have used it ever since in milder WTF moments. It seemed to imply... > > **"No way! That affects me how?** > > > Easy to find on Wikipedia, Googl...
2020/10/18
[ "https://english.stackexchange.com/questions/549516", "https://english.stackexchange.com", "https://english.stackexchange.com/users/160305/" ]
Leo Rosten, *Hooray for Yiddish!* (1982) offers this account of *ish kabibble*: > > **ish kabibble** Derivation: unknown; possibly a corruption of the Yiddish *nit gefidlt* (or *nisht gefidlt*). 1. I should care. 2. I don't care. 3. Why worry about it? > > > This extraordinary slang phrase, uttered with a shrug, wa...
Browsing through auctions, I came across a postcard album from 1910, and one of the postcards had the phrase "Ich ka bibble" written on it. Handwritten, as part of the letter. It was an online auction, so I couldn't see the postmark, but the postcards where it was visible were dated 1910, as was the inscription in the ...
549,516
In New York in the mid-70s, my ethnic German bride-to-be introduced me to an expression : > > “ish kabibble” > > > At the moment, I thought it kind of catchy, and have used it ever since in milder WTF moments. It seemed to imply... > > **"No way! That affects me how?** > > > Easy to find on Wikipedia, Googl...
2020/10/18
[ "https://english.stackexchange.com/questions/549516", "https://english.stackexchange.com", "https://english.stackexchange.com/users/160305/" ]
Common sense of bibble ---------------------- Obsolete and contemporaneous senses of 'bibble' certainly informed the comedic origins of 'ish kabibble' and variants. Humorous use of 'bibble' as the head end of the compound 'bibble-babble', and use of 'bibble' alone as a verb, preceded and now coexist with use of 'ish k...
Browsing through auctions, I came across a postcard album from 1910, and one of the postcards had the phrase "Ich ka bibble" written on it. Handwritten, as part of the letter. It was an online auction, so I couldn't see the postmark, but the postcards where it was visible were dated 1910, as was the inscription in the ...
72,890,767
The following contrived example causes `"Error: Provider produced inconsistent final plan"` because of the `locals.project_id` used in the list of `rrdatas` on the `google_dns_record_set.cdn_dns_txt_record_firebase resource`. The `project_id` value is known only after apply and I do not know how to manage this for the ...
2022/07/06
[ "https://Stackoverflow.com/questions/72890767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/314472/" ]
Ran into this issue with the AWS Provider. I know it's not quite the same but my solution was to modify the infrastructure via AWS CLI directly. From there I removed the state record of the specific resource in our state store (Terraform Cloud) and then did an import of the resource from AWS. If you are managing remot...
We can see from the plan information that the provider has indeed generated an invalid plan in this case, for the reason you observed: you set `rrdatas` in the configuration, and so the provider ought to have generated an initial plan to set those values. As is being discussed over in [the bug report you filed about t...
72,890,767
The following contrived example causes `"Error: Provider produced inconsistent final plan"` because of the `locals.project_id` used in the list of `rrdatas` on the `google_dns_record_set.cdn_dns_txt_record_firebase resource`. The `project_id` value is known only after apply and I do not know how to manage this for the ...
2022/07/06
[ "https://Stackoverflow.com/questions/72890767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/314472/" ]
Ran into this issue with the AWS Provider. I know it's not quite the same but my solution was to modify the infrastructure via AWS CLI directly. From there I removed the state record of the specific resource in our state store (Terraform Cloud) and then did an import of the resource from AWS. If you are managing remot...
You have to check the tfstate file in order to find the incoherence between your terraform code and tfstate attribute. It helped me to fix issue: tfstate ``` { "module": "module.gitlab_cloud_sql", "mode": "managed", "type": "random_string", "name": "random", "provider": "provider[\"regist...
12,833,540
``` $("#dialog-cust-grp,#dialog-cust-nm").dialog({ open: function(event, ui) { $("a.ui-dialog-titlebar-close").remove(); }, bgiframe: true,autoOpen: false,closeOnEscape: false, resizable: false,modal: true,show: "drop",hide: "drop", dra...
2012/10/11
[ "https://Stackoverflow.com/questions/12833540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/111479/" ]
You can call atribut value by [.attr()](http://api.jquery.com/attr/) ``` if ($(this).attr("id") == "dialog-cust-nm") { alert(“hello....”); } ```
You can use .[is()](http://docs.jquery.com/Is) to check if an element mathces a selector. ``` if ($(this).is("#dialog-cust-nm")){ alert(“hello....”); } ```
44,335,281
I have 4 `div`s with defined heights & widths, each contains a `p` element. In one case, the text from one `p` wraps to a second line. This changes the position of that `div`. Dev tools doesn't show any change in margin or padding for the parent `div` or the `div` whose position moved. Here's my HTML: ``` <div id="ho...
2017/06/02
[ "https://Stackoverflow.com/questions/44335281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4855749/" ]
When using `display:inline-block`, you need be aware that `vertical-align:baseline` - the default value - is still in effect. What this means is that the inline-block elements are aligned according to the text baseline, which in the case of the two-line element is according to the bottom line. ```css #holder { wid...
You missed `vertical-align:top;` property Here is the fiddle <https://jsfiddle.net/28afvwbd/1/> CSS code here ``` #holder { width: 100%; background: rgba(25, 25, 25, 0.9); text-align: center; } .box { height: 100px; width: 150px; background-color: green; display: inline-block; vertical-align:top; } ...
44,335,281
I have 4 `div`s with defined heights & widths, each contains a `p` element. In one case, the text from one `p` wraps to a second line. This changes the position of that `div`. Dev tools doesn't show any change in margin or padding for the parent `div` or the `div` whose position moved. Here's my HTML: ``` <div id="ho...
2017/06/02
[ "https://Stackoverflow.com/questions/44335281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4855749/" ]
When using `display:inline-block`, you need be aware that `vertical-align:baseline` - the default value - is still in effect. What this means is that the inline-block elements are aligned according to the text baseline, which in the case of the two-line element is according to the bottom line. ```css #holder { wid...
Giving `.box` the style `vertical-align: top;` should do the trick. ```css #holder { width: 100%; background: rgba(25, 25, 25, 0.9); text-align: center; } .box { height: 100px; width: 150px; background-color: green; display: inline-block; vertical-align: top; } ``` ```html <div id="holder"...
66,317,276
how can I express if I want to select for example account numbers where 7th digit of an account number is IN(2,3,4). Let's say account number has 10 digits in total.
2021/02/22
[ "https://Stackoverflow.com/questions/66317276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14943644/" ]
Use this code: ``` listToStr = ' '.join([str(elem) for elem in args]) ``` or `listToStr = ' '.join(args)` by @Jasmijn
You can use this: ``` args = ['I', 'eat', 'rice'] myString = '' for i in args[:-1]: myString += i myString += " " myString += args[-1] print(myString) ```
1,902,813
I have a very basic contact model. The model has the following fields: ``` class Entry(models.Model): name = models.CharField(max_length=64, unique=False) organization = models.CharField(max_length=100, unique=False, blank=True, null=True) team = models.CharField(max_length=64, unique=False, blank=True, n...
2009/12/14
[ "https://Stackoverflow.com/questions/1902813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/148201/" ]
You probably want the display\_organization URL map to include a parameter for the organization: ``` ('^organization/(?P<org_name>.+)$', 'myapp.views.display_organization'), ``` With that, your display\_organization function must accept the org\_name parameter too: ``` def display_organization(request, org_name): ...
You're making it quite complex by depending on the URL. It's fine if there's only one or two things that work that way. I'd say, keep it simple and just use request.GET ``` def display_organization(request): records = Entry.objects.filter(organization__iexact=request.GET['organization']) ... ```
36,849,988
I have a for loop that is returning an unexpected result. Here is the code: ``` var matArray = scrolls; var offset = $scope.offset; for(var i = 0; i < matArray.length; i++) { var pointer = (i + offset) % matArray.length; console.log(matArray[pointer]); } ``` What I am ...
2016/04/25
[ "https://Stackoverflow.com/questions/36849988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5486645/" ]
Seems your problem in that you add the **string** to a **number**, in JavaScript it will be concatenated into a **string**, e.g.: ``` '9' + 1 // will be '91' ``` You could use `parseInt` function: ``` var offset = parseInt($scope.offset, 10); ```
`$scope.offset` is probably the string '1' when you expect it to be a number. Note that `+(0 + '1')` is `0`, and `+(1 + '1')` is `11`. Change `i + offset` to `i + +offset` to convert `offset` to a number before adding it to `i`: ``` var matArray = scrolls; var offset = $scope.offset; for(var i = 0; i < matArray.le...
36,849,988
I have a for loop that is returning an unexpected result. Here is the code: ``` var matArray = scrolls; var offset = $scope.offset; for(var i = 0; i < matArray.length; i++) { var pointer = (i + offset) % matArray.length; console.log(matArray[pointer]); } ``` What I am ...
2016/04/25
[ "https://Stackoverflow.com/questions/36849988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5486645/" ]
Seems your problem in that you add the **string** to a **number**, in JavaScript it will be concatenated into a **string**, e.g.: ``` '9' + 1 // will be '91' ``` You could use `parseInt` function: ``` var offset = parseInt($scope.offset, 10); ```
Use ``` var pointer = (i + parseInt(offset, 10)) % matArray.length; ```
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
At the very end of the inversion episode both Osgood's use their inhalers in different ways. The "new" Osgood sticks her thumb under the inhaler whereas the "old" osgood holds her thumb on the side. Looking back at the first episode where Osgood is zygonised , the zygon version holds the inhaler the same as the "old"...
In part one Osgood is running away from the Zygons and hides under a table. You can tell that it was the human Osgood because she had to use her inhaler.
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
In part one Osgood is running away from the Zygons and hides under a table. You can tell that it was the human Osgood because she had to use her inhaler.
I'm seriously wondering if Osgood could be a future incarnation of the Doctor. Look at her fascination with the Doctor's outfits. Yes, this could be a fangirl kind of thing, but it would also explain why Capaldi's Doctor is fixated on whether or not she is the human version or not. We've seen something similar before. ...
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
At the very end of the inversion episode both Osgood's use their inhalers in different ways. The "new" Osgood sticks her thumb under the inhaler whereas the "old" osgood holds her thumb on the side. Looking back at the first episode where Osgood is zygonised , the zygon version holds the inhaler the same as the "old"...
Here's my theory. When Human Osgood was cloned by the Zygon it was wearing the 4th Doctor's scarf. Now the human Osgood is an obsessed fan with the Doctor like all of us. The human Osgood has so many tokens of the doctor. Those are our clues as to which is human. The human Osgood changed from the 4th Doctor's scarf to ...
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
Alright, here is my theory (spoilers are coming, so mind your step!): > > Osgood is... HUMAN! > > > From what we have seen of this species, Zygons require to keep originals alive to be able to shift into their shapes. Not only that, they must keep them alive at least long enough after cloning them so as to learn ...
Here's my theory. When Human Osgood was cloned by the Zygon it was wearing the 4th Doctor's scarf. Now the human Osgood is an obsessed fan with the Doctor like all of us. The human Osgood has so many tokens of the doctor. Those are our clues as to which is human. The human Osgood changed from the 4th Doctor's scarf to ...
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
Well, when we see the Doctor and Osgood on the beach in "the Zygon Inversion", you may have noticed that... > > ...Osgood's glasses were thrown off her face and broken - presumably from a heavy parachute landing. The Doctor fixes them for her with some duct tape. > > > So, following on from previous discussions ...
At the very end of the inversion episode both Osgood's use their inhalers in different ways. The "new" Osgood sticks her thumb under the inhaler whereas the "old" osgood holds her thumb on the side. Looking back at the first episode where Osgood is zygonised , the zygon version holds the inhaler the same as the "old"...
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
Well, when we see the Doctor and Osgood on the beach in "the Zygon Inversion", you may have noticed that... > > ...Osgood's glasses were thrown off her face and broken - presumably from a heavy parachute landing. The Doctor fixes them for her with some duct tape. > > > So, following on from previous discussions ...
Could the Doctor be planning to use zygon copying technique to help clara and thats why he kept asking if osgood was human or zygon? All season, he just wants clara safe and testing boundaries of changing history. Maybe, he wanted to know how close the zygonn copy is to human counterpart, go back in time, make sure dan...
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
Alright, here is my theory (spoilers are coming, so mind your step!): > > Osgood is... HUMAN! > > > From what we have seen of this species, Zygons require to keep originals alive to be able to shift into their shapes. Not only that, they must keep them alive at least long enough after cloning them so as to learn ...
I'm seriously wondering if Osgood could be a future incarnation of the Doctor. Look at her fascination with the Doctor's outfits. Yes, this could be a fangirl kind of thing, but it would also explain why Capaldi's Doctor is fixated on whether or not she is the human version or not. We've seen something similar before. ...
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
Well, when we see the Doctor and Osgood on the beach in "the Zygon Inversion", you may have noticed that... > > ...Osgood's glasses were thrown off her face and broken - presumably from a heavy parachute landing. The Doctor fixes them for her with some duct tape. > > > So, following on from previous discussions ...
In part one Osgood is running away from the Zygons and hides under a table. You can tell that it was the human Osgood because she had to use her inhaler.
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
At the very end of the inversion episode both Osgood's use their inhalers in different ways. The "new" Osgood sticks her thumb under the inhaler whereas the "old" osgood holds her thumb on the side. Looking back at the first episode where Osgood is zygonised , the zygon version holds the inhaler the same as the "old"...
Could the Doctor be planning to use zygon copying technique to help clara and thats why he kept asking if osgood was human or zygon? All season, he just wants clara safe and testing boundaries of changing history. Maybe, he wanted to know how close the zygonn copy is to human counterpart, go back in time, make sure dan...
107,116
I fear that this question may be unanswerable, but I wonder if I missed a subtle clue in Doctor Who: do we know if [Osgood](https://en.m.wikipedia.org/wiki/List_of_UNIT_personnel#Petronella_Osgood) is either the original human or the Zygon copy? And why was the answer to this question so important to the Doctor? If I'...
2015/11/07
[ "https://scifi.stackexchange.com/questions/107116", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/143/" ]
Alright, here is my theory (spoilers are coming, so mind your step!): > > Osgood is... HUMAN! > > > From what we have seen of this species, Zygons require to keep originals alive to be able to shift into their shapes. Not only that, they must keep them alive at least long enough after cloning them so as to learn ...
Could the Doctor be planning to use zygon copying technique to help clara and thats why he kept asking if osgood was human or zygon? All season, he just wants clara safe and testing boundaries of changing history. Maybe, he wanted to know how close the zygonn copy is to human counterpart, go back in time, make sure dan...
38,772,258
Here is my problem: Consider that I have a big list of baseball information. Each entry in this list is a homerun a player has hit, recorded by his name and the team he was on when he hit the homerun. It would look something like: ``` Player | Team tim eagles john bears frank ...
2016/08/04
[ "https://Stackoverflow.com/questions/38772258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6441299/" ]
Usually it's not a good idea to have nested collections. Instead, use collections of custom objects that have another collection. In your case, you should have a Player class that has a Set or List of home runs, which would also be a custom class. ``` class Player{ List<HomeRun> homeRuns; } class HomeRun{ St...
That's how programming is. Many different solutions so it depends on what you need as you say. If you know that you're not going to need more than the information you present in your question your solution with list and map should be fine. However, perhaps consider what to do if you would at some point needed to get th...
38,772,258
Here is my problem: Consider that I have a big list of baseball information. Each entry in this list is a homerun a player has hit, recorded by his name and the team he was on when he hit the homerun. It would look something like: ``` Player | Team tim eagles john bears frank ...
2016/08/04
[ "https://Stackoverflow.com/questions/38772258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6441299/" ]
Usually it's not a good idea to have nested collections. Instead, use collections of custom objects that have another collection. In your case, you should have a Player class that has a Set or List of home runs, which would also be a custom class. ``` class Player{ List<HomeRun> homeRuns; } class HomeRun{ St...
A good DS for this can be: ``` HashMap<Player, HashMap<Team, Integer>> ``` For each player you can get in O(1) time, another HashMap whose keyset can be iterated over to find team this player played for and the home-runs hit for that team. If you want print the home-runs per player in a sorted order, there are othe...
38,772,258
Here is my problem: Consider that I have a big list of baseball information. Each entry in this list is a homerun a player has hit, recorded by his name and the team he was on when he hit the homerun. It would look something like: ``` Player | Team tim eagles john bears frank ...
2016/08/04
[ "https://Stackoverflow.com/questions/38772258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6441299/" ]
How about... ``` class Player{ Map<String, Integer> homeRuns; } ``` And then elsewhere, you could have a List of type Player. But I also agree with what PNS said and I'd read up on data structures and POJOs.
That's how programming is. Many different solutions so it depends on what you need as you say. If you know that you're not going to need more than the information you present in your question your solution with list and map should be fine. However, perhaps consider what to do if you would at some point needed to get th...
38,772,258
Here is my problem: Consider that I have a big list of baseball information. Each entry in this list is a homerun a player has hit, recorded by his name and the team he was on when he hit the homerun. It would look something like: ``` Player | Team tim eagles john bears frank ...
2016/08/04
[ "https://Stackoverflow.com/questions/38772258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6441299/" ]
How about... ``` class Player{ Map<String, Integer> homeRuns; } ``` And then elsewhere, you could have a List of type Player. But I also agree with what PNS said and I'd read up on data structures and POJOs.
A good DS for this can be: ``` HashMap<Player, HashMap<Team, Integer>> ``` For each player you can get in O(1) time, another HashMap whose keyset can be iterated over to find team this player played for and the home-runs hit for that team. If you want print the home-runs per player in a sorted order, there are othe...
17,808,037
I have a list of `Channels` ``` var blocks = new List<Block>(); foreach (var channel in ChannelsCollection) { var ch = channel.ChannelCollectionItems.Select(item => new Channel { Id = channel.Id, Delay = item.Delay, Trigger = item.Trigger, Restore = item.Restore, }).ToList(...
2013/07/23
[ "https://Stackoverflow.com/questions/17808037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181771/" ]
Try something like ``` var channels = blocks .SelectMany(b => b.Channels.Select(c => new { b, c })) .GroupBy(p => p.c.Id) .Select(g => new { Channel = g.First().c, Blocks = g.Select(p => p.b) }); ``` As others have pointed out, your `Channel` class doesn't have anywhere to store a sequence of `Block`s, s...
Try this: ``` var r = blocks .GroupBy(b => b.Channels.Select(c => c)) .Select(g => new { Channel = g.Key, Blocks = g.Select(b1 => b1) }); ```
17,808,037
I have a list of `Channels` ``` var blocks = new List<Block>(); foreach (var channel in ChannelsCollection) { var ch = channel.ChannelCollectionItems.Select(item => new Channel { Id = channel.Id, Delay = item.Delay, Trigger = item.Trigger, Restore = item.Restore, }).ToList(...
2013/07/23
[ "https://Stackoverflow.com/questions/17808037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181771/" ]
Try something like ``` var channels = blocks .SelectMany(b => b.Channels.Select(c => new { b, c })) .GroupBy(p => p.c.Id) .Select(g => new { Channel = g.First().c, Blocks = g.Select(p => p.b) }); ``` As others have pointed out, your `Channel` class doesn't have anywhere to store a sequence of `Block`s, s...
This turned out to be the solution: ``` public class ChannelRowCell { public string Name { get; set; } public string Delay { get; set; } public string Trigger { get; set; } public string Restore { get; set; } } public class ChannelRow { public int Id { get; set; } public List<ChannelRowCell> C...
66,877,442
The number shown starts at 10 and increases by a random amount until 60 is reached. Write an subroutine that will achieve this. E.g 10% off. 24% off. 48% off. 60% off. That is what the code is supposed to do. This is the code I have written so far. It only prints out 0% insted of the full thing ``` import random #su...
2021/03/30
[ "https://Stackoverflow.com/questions/66877442", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15516966/" ]
Indentation in Python is critical! The interpreter is misunderstanding the flow of the program because the `else` keyword is not indented properly. Try using an IDE, which generally does well at indenting the code as needed (`if` and `else` statements on the same level, etc). If you indent the code properly, it looks ...
The problem is that your else statement is out of the for-loop, just add an indent to it, and it should give you your results.
16,493
It is easy to insert a Hyperlink to a notebook file, or to an internet address, in the middle of a text style cell (Ctrl+Shift+H or menu: Insert->hyperlink). Trying to create a hyperlink to a file extension different than a notebook (e.g. a PDF file), after waiting for a while, returns nothing (...should it return an ...
2012/12/17
[ "https://mathematica.stackexchange.com/questions/16493", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/78/" ]
``` Row[{"An example of a button inside text that opens the file ", Button[Style["spikey2.png", "Hyperlink"], SystemOpen["C:\\Program Files\\Wolfram Research\\ Mathematica\\8.0\\Documentation\\English\\System\\ExampleData\\ spikey2.png"], Appearance -> None], " using ", Hyperlink["SystemOpen", "paclet:re...
Suppose your pdf is next to the notebook, then you could do, simply: ``` Cell[TextData[{ "This is ", Cell[BoxData[ FormBox[ ButtonBox[ RowBox[{"man", ".", "pdf"}], BaseStyle->"Hyperlink", ButtonFunction:>SystemOpen[ FileNameJoin[{ NotebookDirector...
16,493
It is easy to insert a Hyperlink to a notebook file, or to an internet address, in the middle of a text style cell (Ctrl+Shift+H or menu: Insert->hyperlink). Trying to create a hyperlink to a file extension different than a notebook (e.g. a PDF file), after waiting for a while, returns nothing (...should it return an ...
2012/12/17
[ "https://mathematica.stackexchange.com/questions/16493", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/78/" ]
``` Row[{"An example of a button inside text that opens the file ", Button[Style["spikey2.png", "Hyperlink"], SystemOpen["C:\\Program Files\\Wolfram Research\\ Mathematica\\8.0\\Documentation\\English\\System\\ExampleData\\ spikey2.png"], Appearance -> None], " using ", Hyperlink["SystemOpen", "paclet:re...
Another way to streamline the process of entering external hyperlinks is to use regular text wrapped in `EventHandler`. To make it possible to type such links anywhere, I chose to use an input alias, which I first have to add to the options of the currently used notebook: ``` aliases = Options[EvaluationNotebook[], ...
73,327,593
Is there a preferred way to call a component in React? eg. setting it as a constant vs calling it in jsx? ``` function getAnimalGalleryPicture() { ... return <LionPicture/> ... return <FishPicture/> ... return <DogPicture/> } const animalGalleryPicture = getAnimalGalleryPicture(); return <>{anima...
2022/08/11
[ "https://Stackoverflow.com/questions/73327593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2394970/" ]
You can use `convertFrom` and `mapping`. Here's an example from <https://github.com/72services/jtaf4> ``` return dsl .select( COMPETITION.NAME, COMPETITION.COMPETITION_DATE, COMPETITION.ALWAYS_FIRST_THREE_MEDALS, COMPETITION.MEDAL_PERCENTAGE, multiset...
It looks like I can call fetchOneInto(SomeRecordClass.class) but this has no compile time checking that the result from JOOQ matches with the constructor of the Record Class. By record I mean JDK16 records. ``` public record CompanyAndPreferencesNice(CompanyRecord company, Compa...
40,598,099
``` user1 = "aqa code" pass1 = "uzair123" username = input("Enter username: ") password = input("Enter password: ") while username != user1: print("Access denied: username is incorrect try again ") username = input("Enter username again: ") if username == user1: print("access granted") whi...
2016/11/14
[ "https://Stackoverflow.com/questions/40598099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3820439/" ]
You constrained your type to T but provided no additional constraints on that type. The compiler cannot know there exists a property Value or Text. You could use an interface and then constrain on that type. The type you pass in when you call the method must also implement that interface. ``` public interface ITextVal...
You need to constrain to a class that contains Value and Text as properties or it won't be able to find those properties. For instance: Where TypeName is the type that contains Value and Text. ``` public static List<T> GetList <T>(dynamic data) where T : TypeName, new() { var lst = new List<T>(); foreach...
40,598,099
``` user1 = "aqa code" pass1 = "uzair123" username = input("Enter username: ") password = input("Enter password: ") while username != user1: print("Access denied: username is incorrect try again ") username = input("Enter username again: ") if username == user1: print("access granted") whi...
2016/11/14
[ "https://Stackoverflow.com/questions/40598099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3820439/" ]
With C# generics you are only allowed to perform those operations on a instance of a generic type argument that are known to the compiler to exist in any type that fits the generic type constraints as specified by the respective generic type or generic method. In other words, in your specific case the compiler has two ...
You need to constrain to a class that contains Value and Text as properties or it won't be able to find those properties. For instance: Where TypeName is the type that contains Value and Text. ``` public static List<T> GetList <T>(dynamic data) where T : TypeName, new() { var lst = new List<T>(); foreach...
40,598,099
``` user1 = "aqa code" pass1 = "uzair123" username = input("Enter username: ") password = input("Enter password: ") while username != user1: print("Access denied: username is incorrect try again ") username = input("Enter username again: ") if username == user1: print("access granted") whi...
2016/11/14
[ "https://Stackoverflow.com/questions/40598099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3820439/" ]
You constrained your type to T but provided no additional constraints on that type. The compiler cannot know there exists a property Value or Text. You could use an interface and then constrain on that type. The type you pass in when you call the method must also implement that interface. ``` public interface ITextVal...
With C# generics you are only allowed to perform those operations on a instance of a generic type argument that are known to the compiler to exist in any type that fits the generic type constraints as specified by the respective generic type or generic method. In other words, in your specific case the compiler has two ...
41,303,594
I have a problem, that I'm struggling with since 2 days. I have a webpage that asks for the phone number, and I'm trying to make a "validator" for the phone number into the input tab, but it seems that I cannot figure out how to check the minlength for the input tab, neither how to accept only numerical characters. Her...
2016/12/23
[ "https://Stackoverflow.com/questions/41303594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6715246/" ]
You can make your validation work. You can use [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) (Regex Match Test) for accepting only digits in the input text. Just use javascript's [`substring`](http://www.w3schools.com/jsref/jsref_substring.asp) to chop off the e...
If you are using HTML5, then you can make use of the new `number` input type available ``` <input type="number" name="phone" min="10" max="10"> ``` You can also use the `pattern` attribute to restrict the input to a specific Regular expression.
41,303,594
I have a problem, that I'm struggling with since 2 days. I have a webpage that asks for the phone number, and I'm trying to make a "validator" for the phone number into the input tab, but it seems that I cannot figure out how to check the minlength for the input tab, neither how to accept only numerical characters. Her...
2016/12/23
[ "https://Stackoverflow.com/questions/41303594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6715246/" ]
If you are using HTML5, then you can make use of the new `number` input type available ``` <input type="number" name="phone" min="10" max="10"> ``` You can also use the `pattern` attribute to restrict the input to a specific Regular expression.
If you are looking for the simplest way to check input against a pattern and display a message based on validity, then using regular expressions is what you want: ```js // Wait until the DOM has been fully parsed window.addEventListener("DOMContentLoaded", function(){ // Get DOM references: var theForm = docum...
41,303,594
I have a problem, that I'm struggling with since 2 days. I have a webpage that asks for the phone number, and I'm trying to make a "validator" for the phone number into the input tab, but it seems that I cannot figure out how to check the minlength for the input tab, neither how to accept only numerical characters. Her...
2016/12/23
[ "https://Stackoverflow.com/questions/41303594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6715246/" ]
You can make your validation work. You can use [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) (Regex Match Test) for accepting only digits in the input text. Just use javascript's [`substring`](http://www.w3schools.com/jsref/jsref_substring.asp) to chop off the e...
If you are looking for the simplest way to check input against a pattern and display a message based on validity, then using regular expressions is what you want: ```js // Wait until the DOM has been fully parsed window.addEventListener("DOMContentLoaded", function(){ // Get DOM references: var theForm = docum...
62,979,466
I've been looking for a solution to this problem for a couple of days now and I think it has something to do with my upgrade to the latest version of expo. I've tried downgrading the SDK and expo version, deleting my node\_modules and package-lock and reinstalling. I've added in SourceExts to my app.json. Any help wou...
2020/07/19
[ "https://Stackoverflow.com/questions/62979466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12683625/" ]
After much research, I have come to a conclusion where the problem was caused by a version mismatch of the metro-config package. if you depend on this in your app to override some default metro configuration you should make sure it's the same version react-native depends on. In my case, I was using metro@0.61.0 and sin...
@amo gave a good direction. Just to expand on that answer with details: 1. Check metro-config dependency tree by running `npm ls metro-config`. You should get something similar to this: ``` npm ls metro-config my_app@ /Users/home/my_app ├─┬ metro@0.66.2 │ └── metro-config@0.66.2 └─┬ react-native@0.63.2 invalid: "h...
62,979,466
I've been looking for a solution to this problem for a couple of days now and I think it has something to do with my upgrade to the latest version of expo. I've tried downgrading the SDK and expo version, deleting my node\_modules and package-lock and reinstalling. I've added in SourceExts to my app.json. Any help wou...
2020/07/19
[ "https://Stackoverflow.com/questions/62979466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12683625/" ]
``` npm ls metro-config ``` In my case, I changed my version of the `metro` from `0.65.0` to `0.56.4` and fixed the issue. ubuntu here. [![enter image description here](https://i.stack.imgur.com/VO8by.png)](https://i.stack.imgur.com/VO8by.png)
@amo gave a good direction. Just to expand on that answer with details: 1. Check metro-config dependency tree by running `npm ls metro-config`. You should get something similar to this: ``` npm ls metro-config my_app@ /Users/home/my_app ├─┬ metro@0.66.2 │ └── metro-config@0.66.2 └─┬ react-native@0.63.2 invalid: "h...
65,537,474
**What I am trying:** Pass multiple arguments in `cy.task()` command and print those argument values declared in function mentioned in `plugins/index.js` file **Issue:** The function print prints only the first argument value and undefined for a second argument **Code:** ``` //test file with cy.task() command class...
2021/01/02
[ "https://Stackoverflow.com/questions/65537474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5180990/" ]
I think I have figured out what you need. And, as stated in your question (***"at each occurrence of your word there's always follows 8 bits"***), the following requires that a least 8-integers follow any match of `w` in `s`. Since you will include 8-integers in each row of the *matrix* you return, then using a *pointe...
There are several issues you must solve. **How are arrays represented?** You have arrays of integers, whose valid values can be 0 or 1. How do you datermine the length of sich an array. There are basically two possibilities: * Use a sentinel value. That's how C strings are stored: The actual string is terminated by ...