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
11,627
So tell me know, can you figure out, The clues I'll give are all about A subject many really quite hate, The moment they hear it, from the gate. It really is useful, as science would say, Scientific conclusions use it every day. The chances too are great, can you see If you use it, or hear what the...
2015/04/06
[ "https://puzzling.stackexchange.com/questions/11627", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/9951/" ]
My guess is that it is > > Statistics / Probability > > > And the hidden clue is the first letter of each line: > > STATISTICSSS > > > So tell me know, can you figure out, The clues I'll give are all about A subject many really quite hate, > > *I* certainly did not enjoy my statistics courses ...
Sounds like > > Math > > > A subject many really quite hate, The moment they hear it, from the gate. > > Many people dislike math > > > It really is useful, as science would say, Scientific conclusions use it every day. > > Math is useful in science! > > > The chances too are great, can you ...
11,627
So tell me know, can you figure out, The clues I'll give are all about A subject many really quite hate, The moment they hear it, from the gate. It really is useful, as science would say, Scientific conclusions use it every day. The chances too are great, can you see If you use it, or hear what the...
2015/04/06
[ "https://puzzling.stackexchange.com/questions/11627", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/9951/" ]
Is it > > Statistics? > > > So tell me know, can you figure out, The clues I'll give are all about A subject many really quite hate, The moment they hear it, from the gate. > > Many people have a negative attitude towards statistics: there are lies, there are damned lies, and there is statistics. > ...
My guess is that it is > > Statistics / Probability > > > And the hidden clue is the first letter of each line: > > STATISTICSSS > > > So tell me know, can you figure out, The clues I'll give are all about A subject many really quite hate, > > *I* certainly did not enjoy my statistics courses ...
11,627
So tell me know, can you figure out, The clues I'll give are all about A subject many really quite hate, The moment they hear it, from the gate. It really is useful, as science would say, Scientific conclusions use it every day. The chances too are great, can you see If you use it, or hear what the...
2015/04/06
[ "https://puzzling.stackexchange.com/questions/11627", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/9951/" ]
Is it > > Statistics? > > > So tell me know, can you figure out, The clues I'll give are all about A subject many really quite hate, The moment they hear it, from the gate. > > Many people have a negative attitude towards statistics: there are lies, there are damned lies, and there is statistics. > ...
The answer is > > Statistics. > > > Martin was too quick with the rest of the clues, but here's the hidden clue: > > Acrostic > > >
11,627
So tell me know, can you figure out, The clues I'll give are all about A subject many really quite hate, The moment they hear it, from the gate. It really is useful, as science would say, Scientific conclusions use it every day. The chances too are great, can you see If you use it, or hear what the...
2015/04/06
[ "https://puzzling.stackexchange.com/questions/11627", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/9951/" ]
My guess is that it is > > Statistics / Probability > > > And the hidden clue is the first letter of each line: > > STATISTICSSS > > > So tell me know, can you figure out, The clues I'll give are all about A subject many really quite hate, > > *I* certainly did not enjoy my statistics courses ...
The answer is > > Statistics. > > > Martin was too quick with the rest of the clues, but here's the hidden clue: > > Acrostic > > >
2,156
Today suddenly in our production environment we got an error while opening any building block of any publication. The error is: > > Class does not support Automation or does not support expected interface. > > > If the error was specific to a particular publication I could have narrowed it down but currently the...
2013/07/12
[ "https://tridion.stackexchange.com/questions/2156", "https://tridion.stackexchange.com", "https://tridion.stackexchange.com/users/451/" ]
A possible cause of this kind of issue is a memory leak. Sometimes, instead of out-of-memory errors, COM raises automation errors or interface errors. My suggestion is that you set up some perfmon traces on the private bytes of the relevant processes. If this is the problem, you'll see the memory going up to unsustaina...
Confirm the Windows Service 'Tridion Content Manager Service Host' service is running. I have seen this error in the past for myself. It's a new Tridion service introduced in Tridion 2011 and is responsible for calling the Core Service from the Tridion GUI.
542,661
In my astro class we are learning about red/blue-shifting and I was wondering how to related to stars. So if a star is moving in some direction, the light leaving the direction of motion would be blueshifted, while the light coming out the back of the star would be red-shifted. The problem is then, doesn't the light le...
2020/04/09
[ "https://physics.stackexchange.com/questions/542661", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/55884/" ]
First off, we know the star can't actually slow down, because we can go to the initial reference frame of the star. In this frame, the star is stationary and emits radiation equally in all directions, so it can't start accelerating. So it doesn't accelerate in the original frame either. In the original frame, it is tr...
The acceleration (or **proper** acceleration) due to the **proper** forces on the star must be calculated **in the rest frame of the star**, in which there is no Doppler shift. Otherwise you are only looking at a mangled form of the Newtonian equations, which is confusing at best and likely to be actually incorrect. I...
60,470
It seems to me that the degree three equations have a special place among algebraic equations. Let me clarify what I have in mind. 1. Degree 3 curves: The only curves that hold a group structure. 2. Degree 3 surfaces in $\mathbb P^3$: The only surfaces whose curves are not covered by the Noether-Lefchetz Theorem and t...
2011/04/03
[ "https://mathoverflow.net/questions/60470", "https://mathoverflow.net", "https://mathoverflow.net/users/1547/" ]
There are certainly some very nice properties of degree $3$ objects, but I agree with Chuck and Scott, that what you are observing is that this is the first non-trivial case of *anything*. On one hand that means that you will observe interesting behavior, on the other that there might be a larger literature dealing wit...
The philosophical reasons why degree three equations share unique properties could be so wide-ranging as to make the question essentially self-fulfilling: if you look for an answer you will find it. For instance, it might be because we perceive space three-dimensionally or because 3 is the first odd prime - in my mind ...
5,284,706
I have created a ShapeDrawable and placed it within an imageview that is dynamically created within my layout. Here's the code I use to assign the drawable to my ImageView. Notice that I call on a method to set a random color, I also set the height and width using user filled text fields, but that's irrelevant here. `...
2011/03/12
[ "https://Stackoverflow.com/questions/5284706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/599429/" ]
Try iView.setImageDrawable(shape) again after changing the **shape** parameters.
I have used Abhinav's solution to this same problem and it worked for me Basicly useing the same parameters I Used to create the shape then just created the same shape again and set color and bounds to the existing shape
11,954,923
I'm having trouble converting a list object back to its original type without an explicit cast. My intention is to generalize methods so I could pass in different db Types such as Person or Company. I have no problem getting the values via reflection but I need to convert the actual list back to its original type `List...
2012/08/14
[ "https://Stackoverflow.com/questions/11954923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1221641/" ]
It seems like making `returnJson` generic would resolve most of these problems: ``` public string returnJson<T>(List<T> entity, string someString) { } ``` Now `returnJson` can be used generically, like: ``` returnJson<Company>(listOfCompanies, "someString"); ``` and ``` returnJson<Person>(listOfPersons, "someOth...
Why not use generics, that way the calling function can do what it needs: ``` public string returnJson<T>(List<T> entity, string someString) { //not sure what someString is for or why you need the type for this naming scheme JavaScriptSerializer jss = new JavaScriptSerializer(); return jss.Serialize(en...
11,954,923
I'm having trouble converting a list object back to its original type without an explicit cast. My intention is to generalize methods so I could pass in different db Types such as Person or Company. I have no problem getting the values via reflection but I need to convert the actual list back to its original type `List...
2012/08/14
[ "https://Stackoverflow.com/questions/11954923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1221641/" ]
It seems like making `returnJson` generic would resolve most of these problems: ``` public string returnJson<T>(List<T> entity, string someString) { } ``` Now `returnJson` can be used generically, like: ``` returnJson<Company>(listOfCompanies, "someString"); ``` and ``` returnJson<Person>(listOfPersons, "someOth...
You can use the dynamic keyword and reflection to create the list. ``` dynamic newList = Activator.CreateInstance(typeof(List<>).MakeGenericType(typeT)); foreach (var p in SomeList) { newList.Add(p); } CallOtherMethodOverloadedForListOfPersonCompanyEtc(newList) ```
11,954,923
I'm having trouble converting a list object back to its original type without an explicit cast. My intention is to generalize methods so I could pass in different db Types such as Person or Company. I have no problem getting the values via reflection but I need to convert the actual list back to its original type `List...
2012/08/14
[ "https://Stackoverflow.com/questions/11954923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1221641/" ]
Why not use generics, that way the calling function can do what it needs: ``` public string returnJson<T>(List<T> entity, string someString) { //not sure what someString is for or why you need the type for this naming scheme JavaScriptSerializer jss = new JavaScriptSerializer(); return jss.Serialize(en...
You can use the dynamic keyword and reflection to create the list. ``` dynamic newList = Activator.CreateInstance(typeof(List<>).MakeGenericType(typeT)); foreach (var p in SomeList) { newList.Add(p); } CallOtherMethodOverloadedForListOfPersonCompanyEtc(newList) ```
30,296,622
I read quite some stuff about RESTful API Design. But when it comes to the implementation, it wasn't that easy anymore. I got stuck at the following problem: Assume the following 2 endpoint: 1. /api/v1/users/:id 2. /api/v1/users/1/friends/:id As we all can see, **friends is a collection** of the resource **user**....
2015/05/18
[ "https://Stackoverflow.com/questions/30296622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1835201/" ]
The approach to REST looks fine but that really only speaks to path format and HTTP verb. The problem must be in your application code or app routes.
I think it is better that DELETE api/v1/users/1/friends/3 would be used to delete user 3, just like DELETE api/v1/users/1 would be used to delete user 1. To remove just user 3 from being a friend of user 1 I would use DELETE api/v1/users/1/friends and specify a filter to only remove friends with the id of 3. DELETE a...
131,144
In software documentation, I recently read: > > If you move a job to a different folder, you may also need to update configuration that was referring to that job. > > > But *if* you have a "configuration that was referring to that job" you *need to* update it (or really *should*). Not doing that will result in br...
2013/10/11
[ "https://english.stackexchange.com/questions/131144", "https://english.stackexchange.com", "https://english.stackexchange.com/users/2434/" ]
Software documentation is usually written by someone following a normal or good path through the setup. Saying, "you may need to do this" is essentially a callout to known issues or problems that are extremely likely. But since the author is not going to exhaust all possibilities they just stick "may" into the sentence...
Use of *may* does not **entail** that there are situations where you're not required to update configuration. It does, however, **implicate** so. See Wikipedia entry on [Implicatures](http://en.wikipedia.org/wiki/Implicature). Grice's paper cited in the Wikipedia entry is [posted online](http://www.ucl.ac.uk/ls/studypa...
131,144
In software documentation, I recently read: > > If you move a job to a different folder, you may also need to update configuration that was referring to that job. > > > But *if* you have a "configuration that was referring to that job" you *need to* update it (or really *should*). Not doing that will result in br...
2013/10/11
[ "https://english.stackexchange.com/questions/131144", "https://english.stackexchange.com", "https://english.stackexchange.com/users/2434/" ]
Use of *may* does not **entail** that there are situations where you're not required to update configuration. It does, however, **implicate** so. See Wikipedia entry on [Implicatures](http://en.wikipedia.org/wiki/Implicature). Grice's paper cited in the Wikipedia entry is [posted online](http://www.ucl.ac.uk/ls/studypa...
A better phrasing might be > > If you move a job to a different folder, you *will* also need to update *any* configuration that *refers* to that job. > > > (italics indicate edits) The use of *will* indicates certainty, and the use of *any* makes it clear that such a configuration might not exist. *Refers* instea...
131,144
In software documentation, I recently read: > > If you move a job to a different folder, you may also need to update configuration that was referring to that job. > > > But *if* you have a "configuration that was referring to that job" you *need to* update it (or really *should*). Not doing that will result in br...
2013/10/11
[ "https://english.stackexchange.com/questions/131144", "https://english.stackexchange.com", "https://english.stackexchange.com/users/2434/" ]
Software documentation is usually written by someone following a normal or good path through the setup. Saying, "you may need to do this" is essentially a callout to known issues or problems that are extremely likely. But since the author is not going to exhaust all possibilities they just stick "may" into the sentence...
A better phrasing might be > > If you move a job to a different folder, you *will* also need to update *any* configuration that *refers* to that job. > > > (italics indicate edits) The use of *will* indicates certainty, and the use of *any* makes it clear that such a configuration might not exist. *Refers* instea...
13,864
Bear with me as I am brand new to expression engine and PHP in general but the headers on these pages are not showing up in IE10...running it in compatibility mode fixes it but this needs to not happen. Id like to attempt to find the problem myself so here is a sample page starting at line 1: ``` {assign_variable:sec...
2013/09/18
[ "https://expressionengine.stackexchange.com/questions/13864", "https://expressionengine.stackexchange.com", "https://expressionengine.stackexchange.com/users/2076/" ]
It's possible to ignore the built-in `{stars}` and `{starts_overall_avg}` tags and just output the numbers using the `{rating}` and `{overall_avg}` tags instead. This allows you to do some clever things such as add variable class names to elements depending on the rating. Your CSS can then use these class names to alt...
You would probably have to hack mod.rating.php to make that happen. search for stars\_avg\_rating I don't think this would be a small undertaking.
52,135,048
I have two entity classes `Country` and `Language` having bi-directional one to many relationship. Below are the entity classes: ``` @Entity @Table(name = "COUNTRY") public class Country { @Id @GeneratedValue @Column(name = "COUNTRY_ID") private Long id; @Column(name = "COUNTRY_NAME") privat...
2018/09/02
[ "https://Stackoverflow.com/questions/52135048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9815759/" ]
You can do it in this way : ``` Country newCountry = new Country(country.getName()); ArrayList < Language > langList = new ArrayList<>(); for (Language lang : country.getLanguages()) { langList.add( new Language(language.getName(), newCountry ) ) ; } newCountry.setLanguages( langList ); iCountryRepository.sa...
You can do it in this way also. Here it doesn't create new objects. In the same object which is parsing it creates the relationship in language objects. ``` @PostMapping("/country") public Country postCountryDetails(@RequestBody Country country) { if( country.getLanguages().size() > 0 ) { country.ge...
52,135,048
I have two entity classes `Country` and `Language` having bi-directional one to many relationship. Below are the entity classes: ``` @Entity @Table(name = "COUNTRY") public class Country { @Id @GeneratedValue @Column(name = "COUNTRY_ID") private Long id; @Column(name = "COUNTRY_NAME") privat...
2018/09/02
[ "https://Stackoverflow.com/questions/52135048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9815759/" ]
You can do it in this way : ``` Country newCountry = new Country(country.getName()); ArrayList < Language > langList = new ArrayList<>(); for (Language lang : country.getLanguages()) { langList.add( new Language(language.getName(), newCountry ) ) ; } newCountry.setLanguages( langList ); iCountryRepository.sa...
Update the setter for `languages` in `Country` class to the below : ``` public void setLanguages(List<Language> languages) { this.languages = languages; languages.forEach(entity -> entity.setCountry(this)); } ```
52,135,048
I have two entity classes `Country` and `Language` having bi-directional one to many relationship. Below are the entity classes: ``` @Entity @Table(name = "COUNTRY") public class Country { @Id @GeneratedValue @Column(name = "COUNTRY_ID") private Long id; @Column(name = "COUNTRY_NAME") privat...
2018/09/02
[ "https://Stackoverflow.com/questions/52135048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9815759/" ]
You can do it in this way also. Here it doesn't create new objects. In the same object which is parsing it creates the relationship in language objects. ``` @PostMapping("/country") public Country postCountryDetails(@RequestBody Country country) { if( country.getLanguages().size() > 0 ) { country.ge...
Update the setter for `languages` in `Country` class to the below : ``` public void setLanguages(List<Language> languages) { this.languages = languages; languages.forEach(entity -> entity.setCountry(this)); } ```
28,881,663
I have a data frame in R called `x` that has hundreds of rows. Each row is a person. I have two variables, `Height`, which is continuous, and `Country`, which is a factor. I want to plot a smoothed histogram of all of the heights of the individuals. I want to stratify it by `Country`. I know that I can do that with the...
2015/03/05
[ "https://Stackoverflow.com/questions/28881663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1073244/" ]
I made up some data for illustration: ``` head(iris) table(iris$Species) df <- iris df$Species2 <- ifelse(df$Species == "setosa", "blue", ifelse(df$Species == "virginica", "red", "")) library(ggplot2) p <- ggplot(df, aes(x = Sepal.Length, colour = (Species == "setosa"))) p + geom_density() # Your exam...
I enjoyed working through the excellent answer above. Here are my mods. ``` df <- iris df$Species2 <- ifelse(df$Species == "setosa", "blue", ifelse(df$Species == "virginica", "red", "")) homes2006 <- df names(homes2006)[names(homes2006)=="Species"] <- "ownership" homes2006a <- as.data.frame(sapply(homes20...
308,952
I have a client who is leasing an industrial building with a local network. They are rapidly expanding and need additional space. The nearest available property is available across the street about 150 feet away door-to-door. Now obviously running an ethernet cable would be quite a feat. So I am wondering if there is a...
2011/07/11
[ "https://superuser.com/questions/308952", "https://superuser.com", "https://superuser.com/users/89751/" ]
150 feet is not that far. For the money, versus speed, I would bury conduit with fiber in it. It might cost a few thousand to have this **professionally** done, but this is a business, and the cost of doing business would dictate spending the money you need to do the job the best way. Consider that a VPN with their D...
Any bridge you can attach a directional antenna to should work, provided you have reasonable line of sight. A wireless router that supports OpenWRT and/or DD-WRT and has detachable antennas is a cheap way to do it (under $200). Products like <http://www.ubnt.com/nanobridge> seem promising too, as there's already a dire...
72,322,732
When I run this loop it takes in an array which contains eight numbers, it loops through and simply pushes them to a global array which is named results. For some reason when I console.log this array outside of the loop it returns 0 []. I wish it to return the eight numbers from the other array. ```js const results = ...
2022/05/20
[ "https://Stackoverflow.com/questions/72322732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16694938/" ]
That is because you have to run the **function** validate, now you are just printing `results[]` which has no items. ``` validate(arr); ``` ```js const results = [] const arr = [1, 2, 3, 4, 5, 6, 7, 8]; const validate = arr => { for (let i = 0; i < arr.length; i++) { results.push(arr[i]) } } validate(arr); ...
Your code would work if you included the original array of numbers and you call the function that iterates over it: ```js let arr = [1,2,3,4,5,6,7,8]; let results = []; function validate() { for(let i = 0; i < arr.length; i++){ results.push(arr[i]) } } validate(); console.log(results) ``` But, the [`Array.p...
72,322,732
When I run this loop it takes in an array which contains eight numbers, it loops through and simply pushes them to a global array which is named results. For some reason when I console.log this array outside of the loop it returns 0 []. I wish it to return the eight numbers from the other array. ```js const results = ...
2022/05/20
[ "https://Stackoverflow.com/questions/72322732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16694938/" ]
What you have done here is simply define a function that copies the contents of the array that has been passed into it. You need to call the function `validate` with the appropriate value. ```js const results = [] const validate = arr => { for(let i = 0; i < arr.length; i++){ results.push(arr[i]) } } validat...
Your code would work if you included the original array of numbers and you call the function that iterates over it: ```js let arr = [1,2,3,4,5,6,7,8]; let results = []; function validate() { for(let i = 0; i < arr.length; i++){ results.push(arr[i]) } } validate(); console.log(results) ``` But, the [`Array.p...
72,322,732
When I run this loop it takes in an array which contains eight numbers, it loops through and simply pushes them to a global array which is named results. For some reason when I console.log this array outside of the loop it returns 0 []. I wish it to return the eight numbers from the other array. ```js const results = ...
2022/05/20
[ "https://Stackoverflow.com/questions/72322732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16694938/" ]
You missed calling the function. ```js const arr = [1, 2, 3, 4, 5, 6, 7, 8]; const result = []; arr.map((num) => result.push(num)); console.log(result); ```
Your code would work if you included the original array of numbers and you call the function that iterates over it: ```js let arr = [1,2,3,4,5,6,7,8]; let results = []; function validate() { for(let i = 0; i < arr.length; i++){ results.push(arr[i]) } } validate(); console.log(results) ``` But, the [`Array.p...
72,322,732
When I run this loop it takes in an array which contains eight numbers, it loops through and simply pushes them to a global array which is named results. For some reason when I console.log this array outside of the loop it returns 0 []. I wish it to return the eight numbers from the other array. ```js const results = ...
2022/05/20
[ "https://Stackoverflow.com/questions/72322732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16694938/" ]
```js const results = [] const validate = (arr) => { console.log(arr) arr.forEach((value)=>{ results.push(value) }); } validate([1,2,3,4,5,6,7,8]); console.log(results); ```
Your code would work if you included the original array of numbers and you call the function that iterates over it: ```js let arr = [1,2,3,4,5,6,7,8]; let results = []; function validate() { for(let i = 0; i < arr.length; i++){ results.push(arr[i]) } } validate(); console.log(results) ``` But, the [`Array.p...
23,852,252
This is for Rails 4.04 and Ruby 2.1. I'd like to allow my users to have addresses. So I generated an address table and gave it columns (NUMBER, STREET, CITY, STATE). Now when I go to the following url, I'd like to be able edit this information: ``` webapp.com/users/edit/ ``` However I noticed it only showed the same...
2014/05/25
[ "https://Stackoverflow.com/questions/23852252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316464/" ]
`densityplot()` from bioconductor `flowViz` package is one option for stacked densities. from: <http://www.bioconductor.org/packages/release/bioc/manuals/flowViz/man/flowViz.pdf> : > > For flowSets the idea is to horizontally stack plots of density estimates for all frames in the > flowSet for one or several flow pa...
I think it's going to be difficult to get `ggplot` to offset the histograms like that. At least with faceting it makes new panels, and really, this transformation makes the y-axis meaningless. (The value is in the comparison from row to row). Here's one attempt at using base graphics to try to accomplish a similar thin...
23,852,252
This is for Rails 4.04 and Ruby 2.1. I'd like to allow my users to have addresses. So I generated an address table and gave it columns (NUMBER, STREET, CITY, STATE). Now when I go to the following url, I'd like to be able edit this information: ``` webapp.com/users/edit/ ``` However I noticed it only showed the same...
2014/05/25
[ "https://Stackoverflow.com/questions/23852252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316464/" ]
``` require(ggplot2) require(plyr) my.data <- as.data.frame(rbind( cbind( rnorm(1e3), 1) , cbind( rnorm(1e3)+2, 2), cbind( rnorm(1e3)+3, 3), cbind( rnorm(1e3)+4, 4))) my.data$V2=as.factor(my.data$V2) ``` calculate the density depending on V2 ``` res <- dlply(my.data, .(V2), function(x) density(x$V1)) dd <- ldpl...
`densityplot()` from bioconductor `flowViz` package is one option for stacked densities. from: <http://www.bioconductor.org/packages/release/bioc/manuals/flowViz/man/flowViz.pdf> : > > For flowSets the idea is to horizontally stack plots of density estimates for all frames in the > flowSet for one or several flow pa...
23,852,252
This is for Rails 4.04 and Ruby 2.1. I'd like to allow my users to have addresses. So I generated an address table and gave it columns (NUMBER, STREET, CITY, STATE). Now when I go to the following url, I'd like to be able edit this information: ``` webapp.com/users/edit/ ``` However I noticed it only showed the same...
2014/05/25
[ "https://Stackoverflow.com/questions/23852252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316464/" ]
`densityplot()` from bioconductor `flowViz` package is one option for stacked densities. from: <http://www.bioconductor.org/packages/release/bioc/manuals/flowViz/man/flowViz.pdf> : > > For flowSets the idea is to horizontally stack plots of density estimates for all frames in the > flowSet for one or several flow pa...
Complementing Axeman's answer, you can add the option `stat="binline"` to the `geom_density_ridges` geom. This results in a histogram like plot, instead of a density line. ``` library(ggplot2) library(ggridges) my.data <- as.data.frame(rbind( cbind( rnorm(1e3), 1) , cbind( rnorm(1e3)+...
23,852,252
This is for Rails 4.04 and Ruby 2.1. I'd like to allow my users to have addresses. So I generated an address table and gave it columns (NUMBER, STREET, CITY, STATE). Now when I go to the following url, I'd like to be able edit this information: ``` webapp.com/users/edit/ ``` However I noticed it only showed the same...
2014/05/25
[ "https://Stackoverflow.com/questions/23852252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316464/" ]
``` require(ggplot2) require(plyr) my.data <- as.data.frame(rbind( cbind( rnorm(1e3), 1) , cbind( rnorm(1e3)+2, 2), cbind( rnorm(1e3)+3, 3), cbind( rnorm(1e3)+4, 4))) my.data$V2=as.factor(my.data$V2) ``` calculate the density depending on V2 ``` res <- dlply(my.data, .(V2), function(x) density(x$V1)) dd <- ldpl...
I think it's going to be difficult to get `ggplot` to offset the histograms like that. At least with faceting it makes new panels, and really, this transformation makes the y-axis meaningless. (The value is in the comparison from row to row). Here's one attempt at using base graphics to try to accomplish a similar thin...
23,852,252
This is for Rails 4.04 and Ruby 2.1. I'd like to allow my users to have addresses. So I generated an address table and gave it columns (NUMBER, STREET, CITY, STATE). Now when I go to the following url, I'd like to be able edit this information: ``` webapp.com/users/edit/ ``` However I noticed it only showed the same...
2014/05/25
[ "https://Stackoverflow.com/questions/23852252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316464/" ]
Using the `ggridges` package: ``` ggplot(my.data, aes(x = V1, y = factor(V2), fill = factor(V2), color = factor(V2))) + geom_density_ridges(alpha = 0.5) ``` [![enter image description here](https://i.stack.imgur.com/v1GRE.png)](https://i.stack.imgur.com/v1GRE.png)
I think it's going to be difficult to get `ggplot` to offset the histograms like that. At least with faceting it makes new panels, and really, this transformation makes the y-axis meaningless. (The value is in the comparison from row to row). Here's one attempt at using base graphics to try to accomplish a similar thin...
23,852,252
This is for Rails 4.04 and Ruby 2.1. I'd like to allow my users to have addresses. So I generated an address table and gave it columns (NUMBER, STREET, CITY, STATE). Now when I go to the following url, I'd like to be able edit this information: ``` webapp.com/users/edit/ ``` However I noticed it only showed the same...
2014/05/25
[ "https://Stackoverflow.com/questions/23852252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316464/" ]
``` require(ggplot2) require(plyr) my.data <- as.data.frame(rbind( cbind( rnorm(1e3), 1) , cbind( rnorm(1e3)+2, 2), cbind( rnorm(1e3)+3, 3), cbind( rnorm(1e3)+4, 4))) my.data$V2=as.factor(my.data$V2) ``` calculate the density depending on V2 ``` res <- dlply(my.data, .(V2), function(x) density(x$V1)) dd <- ldpl...
Using the `ggridges` package: ``` ggplot(my.data, aes(x = V1, y = factor(V2), fill = factor(V2), color = factor(V2))) + geom_density_ridges(alpha = 0.5) ``` [![enter image description here](https://i.stack.imgur.com/v1GRE.png)](https://i.stack.imgur.com/v1GRE.png)
23,852,252
This is for Rails 4.04 and Ruby 2.1. I'd like to allow my users to have addresses. So I generated an address table and gave it columns (NUMBER, STREET, CITY, STATE). Now when I go to the following url, I'd like to be able edit this information: ``` webapp.com/users/edit/ ``` However I noticed it only showed the same...
2014/05/25
[ "https://Stackoverflow.com/questions/23852252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316464/" ]
``` require(ggplot2) require(plyr) my.data <- as.data.frame(rbind( cbind( rnorm(1e3), 1) , cbind( rnorm(1e3)+2, 2), cbind( rnorm(1e3)+3, 3), cbind( rnorm(1e3)+4, 4))) my.data$V2=as.factor(my.data$V2) ``` calculate the density depending on V2 ``` res <- dlply(my.data, .(V2), function(x) density(x$V1)) dd <- ldpl...
Complementing Axeman's answer, you can add the option `stat="binline"` to the `geom_density_ridges` geom. This results in a histogram like plot, instead of a density line. ``` library(ggplot2) library(ggridges) my.data <- as.data.frame(rbind( cbind( rnorm(1e3), 1) , cbind( rnorm(1e3)+...
23,852,252
This is for Rails 4.04 and Ruby 2.1. I'd like to allow my users to have addresses. So I generated an address table and gave it columns (NUMBER, STREET, CITY, STATE). Now when I go to the following url, I'd like to be able edit this information: ``` webapp.com/users/edit/ ``` However I noticed it only showed the same...
2014/05/25
[ "https://Stackoverflow.com/questions/23852252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316464/" ]
Using the `ggridges` package: ``` ggplot(my.data, aes(x = V1, y = factor(V2), fill = factor(V2), color = factor(V2))) + geom_density_ridges(alpha = 0.5) ``` [![enter image description here](https://i.stack.imgur.com/v1GRE.png)](https://i.stack.imgur.com/v1GRE.png)
Complementing Axeman's answer, you can add the option `stat="binline"` to the `geom_density_ridges` geom. This results in a histogram like plot, instead of a density line. ``` library(ggplot2) library(ggridges) my.data <- as.data.frame(rbind( cbind( rnorm(1e3), 1) , cbind( rnorm(1e3)+...
15,309,666
I want to upgrade my existing apps to **iOS 5.0 and above.** I want **suggestions and detailed guide line** for main points. what changes I should make in my existing code to make it fully compatible as new iOS coding standards. For e.g. * Should I change all external frameworks and my custom classes for maki...
2013/03/09
[ "https://Stackoverflow.com/questions/15309666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281944/" ]
> > Should I change all external frameworks and my custom classes for making it compatible for ARC? > > > It depends entirely upon you. ARC is a compile-time feature that is meant to obviate the task of manual memory management. It doesn't eliminate it by any stretch of the imagination, but it is miles safer than ...
**- Should I change all external frameworks and my custom classes for making it compatible for ARC?** > > If your frameworks are out dated then, YES you need to update it so > its compatible for iOS 5 and above. For ARC, its not necessary. If you > don't wanted to handle memory management then you can. > > > **...
56,030,013
given the code below, how do I print the name of child process that was passed in as the `self.looper(_function=)` argument? I have no idea how to do this! I am trying to do logic based on which function was passed into `_function`. Hope I conveyed the question correctly. thanks!! ``` class okheregoes(object): de...
2019/05/07
[ "https://Stackoverflow.com/questions/56030013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2891052/" ]
you can simply do a `foreach` since you haven't explained what type of array you are returning, so i'll simply assume it to be a `{key: value}` type array, so in you success function ``` success: function(response){ let select = document.querySelector('#variant_colour') select.innerHTML = '' //if you want to remo...
I think you should use js to loop the data. I do not know how is the structure that returns the ajax call, but you can try something like this with jquery: ``` <script> $('#variant_model').change(function(){ var value = $('select#variant_model').val(); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta...
21,900,923
i have an `ArrayList` which contains `String` elements and i want to add an `int` into the `list` but with out Converting that into the String is that possible. i have tried this and this is working too. ``` int a1 = 10; java.util.List list = new ArrayList<String>(); list.add(a1); System.out.println("List element"+li...
2014/02/20
[ "https://Stackoverflow.com/questions/21900923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2762311/" ]
try this ``` list.add(String.valueOf(a1)); ```
An advantage of a typed list is, that you can assume, that you only have objects of the given type in the list - why would one want to throw this advantage away, if it is completely easy to convert the given type into the type of the list?
21,900,923
i have an `ArrayList` which contains `String` elements and i want to add an `int` into the `list` but with out Converting that into the String is that possible. i have tried this and this is working too. ``` int a1 = 10; java.util.List list = new ArrayList<String>(); list.add(a1); System.out.println("List element"+li...
2014/02/20
[ "https://Stackoverflow.com/questions/21900923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2762311/" ]
try this ``` list.add(String.valueOf(a1)); ```
In first case your `List` is just a raw `List`. So you can add what ever type to that since `List` is raw and again that is bad way of use of `List` in `Java`..But second case it is `String` `List` you have to add Stings there. Now you have to use following way to add `int` to `List`. ``` int a1 = 10; java.util.Lis...
21,900,923
i have an `ArrayList` which contains `String` elements and i want to add an `int` into the `list` but with out Converting that into the String is that possible. i have tried this and this is working too. ``` int a1 = 10; java.util.List list = new ArrayList<String>(); list.add(a1); System.out.println("List element"+li...
2014/02/20
[ "https://Stackoverflow.com/questions/21900923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2762311/" ]
try this ``` list.add(String.valueOf(a1)); ```
You can not do it without converting it to String, but one alternate way to do it by String concatination(without direct conversion from int to String): ``` list.add("" + a1); ``` but internally it will append a1 value to "" String and final result is String.
138,729
I currently have a metal step rail that is straight and spans three steps leading up to my front porch; it is the typical cheap metal railing you commonly see. It is at the end of its life, so my fiance wants something a bit more unique. So, her ideal would be a cedar, flush mounted single rail (still straight, not mo...
2018/05/10
[ "https://diy.stackexchange.com/questions/138729", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/6276/" ]
As much as I'd like to think I know what I'm doing when buying new properties, I ALWAYS hire a home inspector. If you are concerned about Asbestos, you aren't going to be able to negotiate on price or to get it fixed unless you have a home inspector come in. The added bonus of hiring an inspector is that if they miss s...
Does your area have good, ethical home inspectors? Charles Buell is a Seattle-area home inspector whose [blog](http://www.buellinspections.com/) provides examples of a variety of worst-case (and/or funniest case) inspection findings. A large number of Seattle-area homes were built in the early 20th century, but he als...
138,729
I currently have a metal step rail that is straight and spans three steps leading up to my front porch; it is the typical cheap metal railing you commonly see. It is at the end of its life, so my fiance wants something a bit more unique. So, her ideal would be a cedar, flush mounted single rail (still straight, not mo...
2018/05/10
[ "https://diy.stackexchange.com/questions/138729", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/6276/" ]
Does your area have good, ethical home inspectors? Charles Buell is a Seattle-area home inspector whose [blog](http://www.buellinspections.com/) provides examples of a variety of worst-case (and/or funniest case) inspection findings. A large number of Seattle-area homes were built in the early 20th century, but he als...
One important item you need to know about houses that were built before the 1965 NEC was approved and went into effect in you area. Grounding and GFCI protection were nonexistent. Now if no new work was ever done, then the resident falls under the grandfather clause, meaning it can stay as it is unless it stops worki...
138,729
I currently have a metal step rail that is straight and spans three steps leading up to my front porch; it is the typical cheap metal railing you commonly see. It is at the end of its life, so my fiance wants something a bit more unique. So, her ideal would be a cedar, flush mounted single rail (still straight, not mo...
2018/05/10
[ "https://diy.stackexchange.com/questions/138729", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/6276/" ]
Answer based on it being a UK house: **Wiring** * An old style fusebox is unlikely to have RCD protection (UK wording of GFCI mentioned in another answer). Replacing with a consumer unit is recommended. * Old wiring may have degraded. They used to wrap the wires in rubber to make the cables, which deteriorates over t...
Does your area have good, ethical home inspectors? Charles Buell is a Seattle-area home inspector whose [blog](http://www.buellinspections.com/) provides examples of a variety of worst-case (and/or funniest case) inspection findings. A large number of Seattle-area homes were built in the early 20th century, but he als...
138,729
I currently have a metal step rail that is straight and spans three steps leading up to my front porch; it is the typical cheap metal railing you commonly see. It is at the end of its life, so my fiance wants something a bit more unique. So, her ideal would be a cedar, flush mounted single rail (still straight, not mo...
2018/05/10
[ "https://diy.stackexchange.com/questions/138729", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/6276/" ]
As much as I'd like to think I know what I'm doing when buying new properties, I ALWAYS hire a home inspector. If you are concerned about Asbestos, you aren't going to be able to negotiate on price or to get it fixed unless you have a home inspector come in. The added bonus of hiring an inspector is that if they miss s...
One important item you need to know about houses that were built before the 1965 NEC was approved and went into effect in you area. Grounding and GFCI protection were nonexistent. Now if no new work was ever done, then the resident falls under the grandfather clause, meaning it can stay as it is unless it stops worki...
138,729
I currently have a metal step rail that is straight and spans three steps leading up to my front porch; it is the typical cheap metal railing you commonly see. It is at the end of its life, so my fiance wants something a bit more unique. So, her ideal would be a cedar, flush mounted single rail (still straight, not mo...
2018/05/10
[ "https://diy.stackexchange.com/questions/138729", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/6276/" ]
Answer based on it being a UK house: **Wiring** * An old style fusebox is unlikely to have RCD protection (UK wording of GFCI mentioned in another answer). Replacing with a consumer unit is recommended. * Old wiring may have degraded. They used to wrap the wires in rubber to make the cables, which deteriorates over t...
One important item you need to know about houses that were built before the 1965 NEC was approved and went into effect in you area. Grounding and GFCI protection were nonexistent. Now if no new work was ever done, then the resident falls under the grandfather clause, meaning it can stay as it is unless it stops worki...
131,319
Going to Europe imminently to study a short tertiary course, half of which will be in France. Haven’t booked my return flight from Germany yet. Will this be a problem for entering Paris? I have tried to book the flight from the airport in Doha, however despite telling my Australian banks exactly where I was going, my ...
2019/02/01
[ "https://travel.stackexchange.com/questions/131319", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/91371/" ]
First of all: Coming from Australia, no European immigration officer will consider you a particular threat and unless you look or behave suspiciously, chances are close to zero that you will get any question at all at the border. If you for some reason should be more thoroughly checked, the actual requirement is to ha...
To pass French immigration with a Schengen visa or waiver, you need: * A valid passport issued less than 10 years before and valid for at least 3 months after the envisaged departure date; * Proof of accommodation covering the whole duration of the stay (hotel reservation and/or certificate of staying with a relative ...
60,378,345
my Test Schema: ``` var TestSchema = new Schema({ testName: String, topic: { topicTitle: String, topicQuestion: [ { questionTitle: String, choice: [ { name: String age: Number ...
2020/02/24
[ "https://Stackoverflow.com/questions/60378345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5996188/" ]
You can use the [$[] positional operator](https://docs.mongodb.com/manual/reference/operator/update/positional-all/#update-nested-arrays-in-conjunction-with-identifier) to update nested arrays. ```js router.put("/tests/:testId/:topicQuestionId/:choiceId", async (req, res) => { const { testId, topicQuestionId, choice...
You need to inform what choice you want and, on the update section, you need change the way you do increment. Example: ``` Test.findOneAndUpdate({ _id: testId, topicQuestion.choice._id: choiceId}, { 'topicQuestion.$.choice': {$inc: { age: <numberToIncrement> }}}, {new: true}, function (err, response) { ... }); `...
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
your problem is with the root of your layout ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android...
The solution of this error is LinearLayout expects ID attribute. ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_container2" android:layout_width="match_parent" android:layout_height="match_parent"> <include ...
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
your problem is with the root of your layout ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android...
Find all usages of problematic id. In IDEA IDE You can press Ctrl and click on your id for getting all usages. Note: It must be only one item with this id.
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
your problem is with the root of your layout ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android...
This problem can occur when we have a container in so many case a LinearLayout without id declared, you must put an android:id="@+id/layout\_container" in your LinearLayout at the second level
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
Your linear layout id should be as follows ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/my_linear_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="hori...
The solution of this error is LinearLayout expects ID attribute. ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_container2" android:layout_width="match_parent" android:layout_height="match_parent"> <include ...
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
The solution of this error is LinearLayout expects ID attribute. ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_container2" android:layout_width="match_parent" android:layout_height="match_parent"> <include ...
This problem can occur when we have a container in so many case a LinearLayout without id declared, you must put an android:id="@+id/layout\_container" in your LinearLayout at the second level
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
Your linear layout id should be as follows ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/my_linear_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="hori...
Find all usages of problematic id. In IDEA IDE You can press Ctrl and click on your id for getting all usages. Note: It must be only one item with this id.
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
In a ListActivity android looks for the widget with `android:id="@android:id/list"` and expects a ListView but in your case it finds the root LinearLayout and tries to cast it to a ListView hence the exception : ``` Caused by: java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget....
The solution of this error is LinearLayout expects ID attribute. ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_container2" android:layout_width="match_parent" android:layout_height="match_parent"> <include ...
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
Your linear layout id should be as follows ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/my_linear_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="hori...
This problem can occur when we have a container in so many case a LinearLayout without id declared, you must put an android:id="@+id/layout\_container" in your LinearLayout at the second level
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
your problem is with the root of your layout ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android...
Your linear layout id should be as follows ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/my_linear_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="hori...
28,062,894
Not sure why I am getting a ClassCastException in the code below. Changing ListActivity to Activity corrects the error but I want ListActivity as this is a part of the bigger code I am trying to build. Any help will be appreciated. Thanks **MainActivity.java** ``` package com.example.debug; import android.app.ListAc...
2015/01/21
[ "https://Stackoverflow.com/questions/28062894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4477297/" ]
In a ListActivity android looks for the widget with `android:id="@android:id/list"` and expects a ListView but in your case it finds the root LinearLayout and tries to cast it to a ListView hence the exception : ``` Caused by: java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget....
Find all usages of problematic id. In IDEA IDE You can press Ctrl and click on your id for getting all usages. Note: It must be only one item with this id.
43,269,905
Consider I have a table structure like this, ``` id Email ----------- 1 abc@gmail.com 2 abc1@gmail.com 3 abc@gmail.com 4 abc@gmail.com 5 abc@gmail.com ``` And another table ``` id userId name --------------------- 1 1 A 2 2 B 3 3 C 4 4 D 5 ...
2017/04/07
[ "https://Stackoverflow.com/questions/43269905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7573053/" ]
first try to delete duplicate row from user table by keeping the one using below code : ``` DELETE FROM `user` WHERE `id` NOT IN (select * from ( SELECT MIN(`id`) FROM `user` GROUP BY `email` ) as t) ``` secondly try to delete other dependent rows from another table by following : ``` DELETE FROM `user_data` WHERE ...
In a DML way, try the following query with your table (Edit it according to your tables). NOTE: Delete can be rolled back. ``` DELETE t1 FROM t1, holdkey WHERE t1.col1 = holdkey.col1 AND t1.col2 = holdkey.col2 ```
59,533,127
I've a form with a `ChoiceType` field and I need to do something with selected datas AND something else with not selected datas. I think I need to retrieve unselected datas with using the selected datas but is there a way to send them to the controller directly ? Maybe with `empty_data` but I'm not sure to understand...
2019/12/30
[ "https://Stackoverflow.com/questions/59533127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12366580/" ]
To [update a resource in an Azure Resource Manager template](https://learn.microsoft.com/en-us/azure/architecture/building-blocks/extending-templates/update-resource), you need to specify the updated resource in a second template that's either linked or included as a subtemplate using the `Microsoft.Resources/deploymen...
You will need to run PowerShell or CLI from your ARM templates
58,890,574
When I build the project the issue has occurred Error > > ERROR in node\_modules/@coreui/angular/lib/sidebar/app-sidebar-nav.d.ts(1,10): error TS2305: Module '"C:/Users/amare/Desktop/New folder/tb/node\_modules/@angular/router/router"' has no exported member 'QueryParamsHandling'. > > > package.json ``` "name...
2019/11/16
[ "https://Stackoverflow.com/questions/58890574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10934942/" ]
I also faced same issue and this worked for me. Use this version of coreui - "@coreui/angular": "2.5.3" Look like the QueryParamsHandling is not referred in this version as per code of this version. Also if you have already run npm install then you need to remove it manually then add it again with version 2.5.3 and ...
I managed to solve it like this. Go to @ angular / router / router "and insert the word 'export' before the QueryParamsHandling declaration: export declare type QueryParamsHandling = 'merge' | 'preserve' | '';
58,890,574
When I build the project the issue has occurred Error > > ERROR in node\_modules/@coreui/angular/lib/sidebar/app-sidebar-nav.d.ts(1,10): error TS2305: Module '"C:/Users/amare/Desktop/New folder/tb/node\_modules/@angular/router/router"' has no exported member 'QueryParamsHandling'. > > > package.json ``` "name...
2019/11/16
[ "https://Stackoverflow.com/questions/58890574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10934942/" ]
Changing @coreui/angular version didn't work for me, but changing import statement in the `node_modules\@coreui\angular\lib\sidebar\app-sidebar-nav.d.ts` file to : ``` import { QueryParamsHandling } from '@angular/router/src/config'; ``` will immediately work.
I managed to solve it like this. Go to @ angular / router / router "and insert the word 'export' before the QueryParamsHandling declaration: export declare type QueryParamsHandling = 'merge' | 'preserve' | '';
6,714,659
I've set a cookie just fine, and the cookie is in the request header, but when I access that cookie in the PHP superglobal `$_COOKIE` it isn't set. Dumping `$_COOKIE` shows the other cookies but one, and all were in the request header. If I dump `$_SERVER` I can see that cookie in `$_SERVER['HTTP_COOKIE']`. PHP sets a...
2011/07/16
[ "https://Stackoverflow.com/questions/6714659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249413/" ]
You shouldn't use the value in `$_SERVER["HTTP_COOKIE"]`. [It's not documented](http://www.php.net/manual/en/reserved.variables.server.php), so it's probably not reliable. [This message](http://www.php.net/manual/en/function.setcookie.php#91140) in comments for the setcookie function might answer your question. > > ...
Could it be that you have not set the right path for the cookie? I have had problems with this before where it would not let me access the cookie because it was being set to a strange path automatically. I had to specify the correct path when I set the cookie. You probably already know this but sometimes things can h...
6,714,659
I've set a cookie just fine, and the cookie is in the request header, but when I access that cookie in the PHP superglobal `$_COOKIE` it isn't set. Dumping `$_COOKIE` shows the other cookies but one, and all were in the request header. If I dump `$_SERVER` I can see that cookie in `$_SERVER['HTTP_COOKIE']`. PHP sets a...
2011/07/16
[ "https://Stackoverflow.com/questions/6714659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249413/" ]
**Your string is 1099 characters long.** Max length for a Cookie is 4Kb. Assuming UTF-8 characters with 4 bytes per char you should be able to store between 1024. Try to make OATMEAL smaller. Much smaller and let us know if that was the culprit.
You shouldn't use the value in `$_SERVER["HTTP_COOKIE"]`. [It's not documented](http://www.php.net/manual/en/reserved.variables.server.php), so it's probably not reliable. [This message](http://www.php.net/manual/en/function.setcookie.php#91140) in comments for the setcookie function might answer your question. > > ...
6,714,659
I've set a cookie just fine, and the cookie is in the request header, but when I access that cookie in the PHP superglobal `$_COOKIE` it isn't set. Dumping `$_COOKIE` shows the other cookies but one, and all were in the request header. If I dump `$_SERVER` I can see that cookie in `$_SERVER['HTTP_COOKIE']`. PHP sets a...
2011/07/16
[ "https://Stackoverflow.com/questions/6714659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249413/" ]
You shouldn't use the value in `$_SERVER["HTTP_COOKIE"]`. [It's not documented](http://www.php.net/manual/en/reserved.variables.server.php), so it's probably not reliable. [This message](http://www.php.net/manual/en/function.setcookie.php#91140) in comments for the setcookie function might answer your question. > > ...
As others have already said, it's almost certainly to do with the length of your cookie string. You should make it shorter. It's also worth pointing out that even if it works, there's a very good reason for not having such a long cookie string -- the entire cookie string gets sent in both directions for every single H...
6,714,659
I've set a cookie just fine, and the cookie is in the request header, but when I access that cookie in the PHP superglobal `$_COOKIE` it isn't set. Dumping `$_COOKIE` shows the other cookies but one, and all were in the request header. If I dump `$_SERVER` I can see that cookie in `$_SERVER['HTTP_COOKIE']`. PHP sets a...
2011/07/16
[ "https://Stackoverflow.com/questions/6714659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249413/" ]
**Your string is 1099 characters long.** Max length for a Cookie is 4Kb. Assuming UTF-8 characters with 4 bytes per char you should be able to store between 1024. Try to make OATMEAL smaller. Much smaller and let us know if that was the culprit.
Could it be that you have not set the right path for the cookie? I have had problems with this before where it would not let me access the cookie because it was being set to a strange path automatically. I had to specify the correct path when I set the cookie. You probably already know this but sometimes things can h...
6,714,659
I've set a cookie just fine, and the cookie is in the request header, but when I access that cookie in the PHP superglobal `$_COOKIE` it isn't set. Dumping `$_COOKIE` shows the other cookies but one, and all were in the request header. If I dump `$_SERVER` I can see that cookie in `$_SERVER['HTTP_COOKIE']`. PHP sets a...
2011/07/16
[ "https://Stackoverflow.com/questions/6714659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249413/" ]
Thanks everyone, but offline from this thread another dev suggested base64 encoding the cookie data when sent. That worked and kept the data alive and I was able to base64 decode server-side and continue on.
Could it be that you have not set the right path for the cookie? I have had problems with this before where it would not let me access the cookie because it was being set to a strange path automatically. I had to specify the correct path when I set the cookie. You probably already know this but sometimes things can h...
6,714,659
I've set a cookie just fine, and the cookie is in the request header, but when I access that cookie in the PHP superglobal `$_COOKIE` it isn't set. Dumping `$_COOKIE` shows the other cookies but one, and all were in the request header. If I dump `$_SERVER` I can see that cookie in `$_SERVER['HTTP_COOKIE']`. PHP sets a...
2011/07/16
[ "https://Stackoverflow.com/questions/6714659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249413/" ]
**Your string is 1099 characters long.** Max length for a Cookie is 4Kb. Assuming UTF-8 characters with 4 bytes per char you should be able to store between 1024. Try to make OATMEAL smaller. Much smaller and let us know if that was the culprit.
As others have already said, it's almost certainly to do with the length of your cookie string. You should make it shorter. It's also worth pointing out that even if it works, there's a very good reason for not having such a long cookie string -- the entire cookie string gets sent in both directions for every single H...
6,714,659
I've set a cookie just fine, and the cookie is in the request header, but when I access that cookie in the PHP superglobal `$_COOKIE` it isn't set. Dumping `$_COOKIE` shows the other cookies but one, and all were in the request header. If I dump `$_SERVER` I can see that cookie in `$_SERVER['HTTP_COOKIE']`. PHP sets a...
2011/07/16
[ "https://Stackoverflow.com/questions/6714659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249413/" ]
**Your string is 1099 characters long.** Max length for a Cookie is 4Kb. Assuming UTF-8 characters with 4 bytes per char you should be able to store between 1024. Try to make OATMEAL smaller. Much smaller and let us know if that was the culprit.
Thanks everyone, but offline from this thread another dev suggested base64 encoding the cookie data when sent. That worked and kept the data alive and I was able to base64 decode server-side and continue on.
6,714,659
I've set a cookie just fine, and the cookie is in the request header, but when I access that cookie in the PHP superglobal `$_COOKIE` it isn't set. Dumping `$_COOKIE` shows the other cookies but one, and all were in the request header. If I dump `$_SERVER` I can see that cookie in `$_SERVER['HTTP_COOKIE']`. PHP sets a...
2011/07/16
[ "https://Stackoverflow.com/questions/6714659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249413/" ]
Thanks everyone, but offline from this thread another dev suggested base64 encoding the cookie data when sent. That worked and kept the data alive and I was able to base64 decode server-side and continue on.
As others have already said, it's almost certainly to do with the length of your cookie string. You should make it shorter. It's also worth pointing out that even if it works, there's a very good reason for not having such a long cookie string -- the entire cookie string gets sent in both directions for every single H...
45,296,626
Everyone, I have a little problem here. The idea is simple. I need to extract value to child table **each time I insert** new rows into the master table. Master table : ``` +--------+------------+-------+ + id + dates + time + +--------+------------+-------+ + 101 + 2017/07/24 + 07:12 + + 101 + 20...
2017/07/25
[ "https://Stackoverflow.com/questions/45296626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8361758/" ]
it seems you complicate your code you just try simple code below ``` @Override public void onBackPressed() { if (webView.canGoBack()) { webView.goBack(); } else { super.onBackPressed(); } } ``` this is simple code work fine for you,i dont know if you are using...
You can do like this. ``` @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && webView.canGoBack()) { webView.goBack(); return true; } return super.onKeyDown(keyCode, event); } ``` And you Web page not available,you can use `onReceivedE...
30,342
I'm a NYC based director. What is the best way to avoid feedback from wireless mics in a Theater in the Round layout or in an environmental immersive staging?
2014/09/30
[ "https://sound.stackexchange.com/questions/30342", "https://sound.stackexchange.com", "https://sound.stackexchange.com/users/10014/" ]
The biggest thing is going to be careful EQing and using microphones as close to the actor's mouthes and as directional as possible. Feedback occurs when the amount of amplification applied to the microphone signal becomes enough that the background noise that the microphone picks up from the speaker is louder than the...
AJ is correct on all accounts. There are a couple more things I'd like to add: speaker placement, aim, and signal route. Since you have an arena theater setup, think about where to put your speakers, where to aim them, and what signals you want to route to them. As best as you can, route voices only to speakers fac...
25,109,554
I want my div to fit the body's height and always touch the bottom of my body when I scroll, so I made it 100% height. But I've quickly understood that isn't the right solution. When another div goes away from the window, when I scroll, I see my div scrolling with a margin right down to it between the bottom and it. S...
2014/08/03
[ "https://Stackoverflow.com/questions/25109554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3369641/" ]
That might well be faster, but since you're using C++, an alternative might be to use an iterator instead: ``` // declare it to be some appropriate type of iterator for (it = my_vector.begin(); it != my_vector.end(); ++it) doSomething(*it); ``` You will want to be careful here, though, that you're not inadverten...
If you don't want to modify the elements, you can try this: ``` for (const auto &elem : my_vector) { // } ```
171,809
> > I hope he doesn’t think I’m **off** prostituting myself. > > > [source - *One Week Girlfriend*](http://khnovel.com/one-week-girlfriend/page-3-10042110.html) I looked up "be off", seemed no right meaning.
2018/07/10
[ "https://ell.stackexchange.com/questions/171809", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/72993/" ]
To be off doing something= Usually, you might be at a place such as home or work, if you are not there, you can be said to be off [doing something] by another person. **It means not present at work, at home or at some other place where you are supposed to be or where you usually are**. It is constructed using: off + v...
In your cited context, the *(**optional**)* preposition could be any of ***off, away, out*** (and doubtless several others). Most if not all of those optional prepositions have little or no effect on the meaning, apart from the general implication of the hypothetical prostitution happening *"**somewhere else**"* (not w...
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
Try building it from the command line and see what happens.
As Alex said, I think that your problem is that the CC.NET service runs as a local user account. Unfortunatly some of the C++ environment variables are per user and will not be carried over to the default build environment. In my case it was the lib and include files defined in **Tools -> Options -> Projects and Soluti...
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
After a long investigation - my understanding on this at current stage is that the problem is related to the fact that I am using devenv to build through CruiseControl.NET but when I build manually VisualStudio is using msbuild. Basically this causes dependencies to be ignored (because of some msbuild command arg tha...
My guess would be that the user that the service is configured has different permissions and/or environment variables as you do when actually running it. If you are on the same physical box and it compiles fine with visual studio and you are also using visual studio in CruiseControl (not MSBuild) then it is almost assu...
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
Can you change CC to use msbuild instead of devenv? That seems like the optimal solution to me, as it means the build is the same in both situations.
Try building it from the command line and see what happens.
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
After a long investigation - my understanding on this at current stage is that the problem is related to the fact that I am using devenv to build through CruiseControl.NET but when I build manually VisualStudio is using msbuild. Basically this causes dependencies to be ignored (because of some msbuild command arg tha...
Try building it from the command line and see what happens.
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
Can you change CC to use msbuild instead of devenv? That seems like the optimal solution to me, as it means the build is the same in both situations.
My guess would be that the user that the service is configured has different permissions and/or environment variables as you do when actually running it. If you are on the same physical box and it compiles fine with visual studio and you are also using visual studio in CruiseControl (not MSBuild) then it is almost assu...
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
After a long investigation - my understanding on this at current stage is that the problem is related to the fact that I am using devenv to build through CruiseControl.NET but when I build manually VisualStudio is using msbuild. Basically this causes dependencies to be ignored (because of some msbuild command arg tha...
As Alex said, I think that your problem is that the CC.NET service runs as a local user account. Unfortunatly some of the C++ environment variables are per user and will not be carried over to the default build environment. In my case it was the lib and include files defined in **Tools -> Options -> Projects and Soluti...
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
My guess would be that the user that the service is configured has different permissions and/or environment variables as you do when actually running it. If you are on the same physical box and it compiles fine with visual studio and you are also using visual studio in CruiseControl (not MSBuild) then it is almost assu...
I've run into instances where my solution builds if I open it in the IDE and compile, but fails if I run from a command line (either msbuild or devenv.) In each case, the problem was due to a bad reference - likely from paths not matching between your local box and the build server. You see it compile in the IDE correc...
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
Can you change CC to use msbuild instead of devenv? That seems like the optimal solution to me, as it means the build is the same in both situations.
(reposting as my initial post seems to have failed) VC2003 seems to have an inconsistency between dependencies and input libraries. An example: * ProjectA --> A.lib * ProjectB --> B.exe + In Properties-->Linker-->Additional Input Libraries, A.lib is specified. + In Project Dependencies, ProjectA is unchecked (why ...
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
Can you change CC to use msbuild instead of devenv? That seems like the optimal solution to me, as it means the build is the same in both situations.
I wonder if CC.Net is building with different environment variables, such that the necessary library directories aren't properly added to the path. Is there any specific error message in the CC.Net build log as to why that particular DLL import failed? Could not find file? Permissions? Look in the detailed CC.Net buil...
273,836
I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries to import a dll built by another project. Dll should be in the right place since there's ...
2008/11/07
[ "https://Stackoverflow.com/questions/273836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1311500/" ]
Try building it from the command line and see what happens.
I've run into instances where my solution builds if I open it in the IDE and compile, but fails if I run from a command line (either msbuild or devenv.) In each case, the problem was due to a bad reference - likely from paths not matching between your local box and the build server. You see it compile in the IDE correc...
44,759,324
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Menu_Attempts { class Program { static void Main(string[] args) { bool forever = true; do { Console.WriteLin...
2017/06/26
[ "https://Stackoverflow.com/questions/44759324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8215410/" ]
Yes, your method is being called (and you can prove that by adding a breakpoint), but you're not actually doing anything with the `StoneToPounds` method result. Maybe you can do something like this: ``` case 1: Console.WriteLine("Enter an amount in Stone"); double UserInput = double.Parse(Console.ReadLine()); ...
The methods are fine. You are just not printing the answer. Change your code like this to print the answer: ``` case 1: Console.WriteLine("Enter an amount in Stone"); double UserInput = double.Parse(Console.ReadLine()); double result = StoneToPounds(UserInput); Console.WriteLine(result.ToString()); bre...
44,759,324
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Menu_Attempts { class Program { static void Main(string[] args) { bool forever = true; do { Console.WriteLin...
2017/06/26
[ "https://Stackoverflow.com/questions/44759324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8215410/" ]
Yes, your method is being called (and you can prove that by adding a breakpoint), but you're not actually doing anything with the `StoneToPounds` method result. Maybe you can do something like this: ``` case 1: Console.WriteLine("Enter an amount in Stone"); double UserInput = double.Parse(Console.ReadLine()); ...
You could simply add this line of code just before you call `break`: ``` Console.WriteLine("The result is {0}", StoneToPounds(UserInput)); Console.WriteLine("Press any key to continue"); Console.ReadKey(); ```
44,759,324
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Menu_Attempts { class Program { static void Main(string[] args) { bool forever = true; do { Console.WriteLin...
2017/06/26
[ "https://Stackoverflow.com/questions/44759324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8215410/" ]
Yes, your method is being called (and you can prove that by adding a breakpoint), but you're not actually doing anything with the `StoneToPounds` method result. Maybe you can do something like this: ``` case 1: Console.WriteLine("Enter an amount in Stone"); double UserInput = double.Parse(Console.ReadLine()); ...
as others said ... you method is called and returning the double value ...but you are not saving it any kind of variables , if u wan't ur method to operate on the variable itself you can pass it as a ref parameter this way any change happens to the variable inside ur method will affect the variable globally ``` public...
44,759,324
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Menu_Attempts { class Program { static void Main(string[] args) { bool forever = true; do { Console.WriteLin...
2017/06/26
[ "https://Stackoverflow.com/questions/44759324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8215410/" ]
The methods are fine. You are just not printing the answer. Change your code like this to print the answer: ``` case 1: Console.WriteLine("Enter an amount in Stone"); double UserInput = double.Parse(Console.ReadLine()); double result = StoneToPounds(UserInput); Console.WriteLine(result.ToString()); bre...
as others said ... you method is called and returning the double value ...but you are not saving it any kind of variables , if u wan't ur method to operate on the variable itself you can pass it as a ref parameter this way any change happens to the variable inside ur method will affect the variable globally ``` public...
44,759,324
``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Menu_Attempts { class Program { static void Main(string[] args) { bool forever = true; do { Console.WriteLin...
2017/06/26
[ "https://Stackoverflow.com/questions/44759324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8215410/" ]
You could simply add this line of code just before you call `break`: ``` Console.WriteLine("The result is {0}", StoneToPounds(UserInput)); Console.WriteLine("Press any key to continue"); Console.ReadKey(); ```
as others said ... you method is called and returning the double value ...but you are not saving it any kind of variables , if u wan't ur method to operate on the variable itself you can pass it as a ref parameter this way any change happens to the variable inside ur method will affect the variable globally ``` public...
1,109,391
Calculate $S =\displaystyle\sum\_{k=1}^n\frac {1}{k(k+1)(k+2)}$. This sequence is neither arithmetic nor geometric. How can you solve this. Thanks!
2015/01/18
[ "https://math.stackexchange.com/questions/1109391", "https://math.stackexchange.com", "https://math.stackexchange.com/users/139617/" ]
Since $$\frac{1}{k(k+2)} = \frac{1}{2} \frac{2}{k(k+2)} = \frac{1}{2}\left(\frac{1}{k} - \frac{1}{k+2}\right)$$ for all $k$, we have $$\sum\_{k = 1}^n \frac{1}{k(k+1)(k+2)} = \frac{1}{2}\sum\_{k = 1}^n \left(\frac{1}{k(k+1)} - \frac{1}{(k+1)(k+2)}\right),$$ which telescopes to $$\frac{1}{2}\left(\frac{1}{2} - \frac{...
hint: use that $\frac{1}{k(k+1)(k+2)}=- \left( k+1 \right) ^{-1}+1/2\,{k}^{-1}+1/2\, \left( k+2 \right) ^{-1 } $
1,109,391
Calculate $S =\displaystyle\sum\_{k=1}^n\frac {1}{k(k+1)(k+2)}$. This sequence is neither arithmetic nor geometric. How can you solve this. Thanks!
2015/01/18
[ "https://math.stackexchange.com/questions/1109391", "https://math.stackexchange.com", "https://math.stackexchange.com/users/139617/" ]
$$u\_k = \dfrac{1}{k(k+1)(k+2)} = \dfrac{1}{2k(k+1)} - \dfrac{1}{2(k+1)(k+2)} = f\_k - f\_{k+1}$$ so $$u\_1 + u\_2 + \cdots u\_n = (f\_1 - f\_2) + (f\_2 - f\_3) + \cdots + (f\_n - f\_{n+1}) = f\_1 - f\_{n+1} = \dfrac{1}{4} - \dfrac{1}{2(n+1)(n+2)} $$
hint: use that $\frac{1}{k(k+1)(k+2)}=- \left( k+1 \right) ^{-1}+1/2\,{k}^{-1}+1/2\, \left( k+2 \right) ^{-1 } $
1,109,391
Calculate $S =\displaystyle\sum\_{k=1}^n\frac {1}{k(k+1)(k+2)}$. This sequence is neither arithmetic nor geometric. How can you solve this. Thanks!
2015/01/18
[ "https://math.stackexchange.com/questions/1109391", "https://math.stackexchange.com", "https://math.stackexchange.com/users/139617/" ]
The method of partial fractions works for these. You have $${1 \over x(x+1)(x +2)} = {1 \over 2} \bigg({1 \over x}\bigg) - {1 \over x + 1} + {1 \over 2} \bigg({1 \over x + 2}\bigg)$$ So your sum is the same as $$\sum\_{k = 1}^{n} \bigg[{1 \over 2} \bigg({1 \over k}\bigg) - {1 \over k + 1} + {1 \over 2} \bigg({1 \over k...
hint: use that $\frac{1}{k(k+1)(k+2)}=- \left( k+1 \right) ^{-1}+1/2\,{k}^{-1}+1/2\, \left( k+2 \right) ^{-1 } $
1,109,391
Calculate $S =\displaystyle\sum\_{k=1}^n\frac {1}{k(k+1)(k+2)}$. This sequence is neither arithmetic nor geometric. How can you solve this. Thanks!
2015/01/18
[ "https://math.stackexchange.com/questions/1109391", "https://math.stackexchange.com", "https://math.stackexchange.com/users/139617/" ]
Since $$\frac{1}{k(k+2)} = \frac{1}{2} \frac{2}{k(k+2)} = \frac{1}{2}\left(\frac{1}{k} - \frac{1}{k+2}\right)$$ for all $k$, we have $$\sum\_{k = 1}^n \frac{1}{k(k+1)(k+2)} = \frac{1}{2}\sum\_{k = 1}^n \left(\frac{1}{k(k+1)} - \frac{1}{(k+1)(k+2)}\right),$$ which telescopes to $$\frac{1}{2}\left(\frac{1}{2} - \frac{...
$$u\_k = \dfrac{1}{k(k+1)(k+2)} = \dfrac{1}{2k(k+1)} - \dfrac{1}{2(k+1)(k+2)} = f\_k - f\_{k+1}$$ so $$u\_1 + u\_2 + \cdots u\_n = (f\_1 - f\_2) + (f\_2 - f\_3) + \cdots + (f\_n - f\_{n+1}) = f\_1 - f\_{n+1} = \dfrac{1}{4} - \dfrac{1}{2(n+1)(n+2)} $$
1,109,391
Calculate $S =\displaystyle\sum\_{k=1}^n\frac {1}{k(k+1)(k+2)}$. This sequence is neither arithmetic nor geometric. How can you solve this. Thanks!
2015/01/18
[ "https://math.stackexchange.com/questions/1109391", "https://math.stackexchange.com", "https://math.stackexchange.com/users/139617/" ]
Since $$\frac{1}{k(k+2)} = \frac{1}{2} \frac{2}{k(k+2)} = \frac{1}{2}\left(\frac{1}{k} - \frac{1}{k+2}\right)$$ for all $k$, we have $$\sum\_{k = 1}^n \frac{1}{k(k+1)(k+2)} = \frac{1}{2}\sum\_{k = 1}^n \left(\frac{1}{k(k+1)} - \frac{1}{(k+1)(k+2)}\right),$$ which telescopes to $$\frac{1}{2}\left(\frac{1}{2} - \frac{...
The method of partial fractions works for these. You have $${1 \over x(x+1)(x +2)} = {1 \over 2} \bigg({1 \over x}\bigg) - {1 \over x + 1} + {1 \over 2} \bigg({1 \over x + 2}\bigg)$$ So your sum is the same as $$\sum\_{k = 1}^{n} \bigg[{1 \over 2} \bigg({1 \over k}\bigg) - {1 \over k + 1} + {1 \over 2} \bigg({1 \over k...
354,770
I want to insert text in a **defined** (= set with a number, not just "bottom", "center" or "top") vertical position at the side of a figure. I managed to insert text at the side, but I can't figure out how to set the vertical position. Ideally, I would like to add different lines of text on the same side, each one wit...
2017/02/20
[ "https://tex.stackexchange.com/questions/354770", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/60126/" ]
You can use a normal `tabular` for the text on the left of the image and by specifying some distance after each newline `\\ [<some v. distance>]`, you can control the vertical position of the text. Since pictures are normally placed above the baseline, you need to specify the `[t]` option from `adjustbox` package for t...
Without using TikZ or the `tabular` environment, one can use the `minipage` environment to split the page in two subpages. Then, the position of the text can be set using the classical spacing and positioning commands `vspace`, `hspace`, `centering`, `flushleft`, `flushright`, etc. For your example, one can code ``` \...
38,966,527
I have an articles container: ``` <div ng-controller="articlesCtrl" > <ul id="articles-container" > <li class="article"> <div>Article 1</div> <div>Article Text</div> </li> <li> <div>Article 1</div> <div>Article Text</div> </li> </u...
2016/08/16
[ "https://Stackoverflow.com/questions/38966527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I can speak with some authority on this question as I'm the one who wrote this code. Here is the comparison which is asserting in your example: <https://github.com/llvm-mirror/libcxx/blob/master/include/algorithm#L3994-L3995> As the link is likely to go stale (point to the wrong line) as time goes on, I'll also quot...
Presumably, in the opinion of the standard-library authors, it is faster to do a test which is guaranteed to return false than to constantly check for equal indices as well as comparing elements. This might come about because the pivot element is used as a loop sentinel. It is certainly permitted for the comparison fu...
33,082,011
i have a problem about looping throught json output on ajax success. this is my code : ``` <?php $product = mysqli_query($con,select * from product LIMIT 3); while ($dataproduct = mysqli_fetch_assoc($product) { echo json_encode(array( "product" => $dataproduct['product'] )); } ?> $...
2015/10/12
[ "https://Stackoverflow.com/questions/33082011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5069063/" ]
Why keeping too much processing on end user low power PC. You can generate the output HTML at server side and get the resulted html and put it in your required place in html DOM. You can change your PHP code to below: ``` <?php $html = ""; $product = mysqli_query($con,select * from product LIMIT 3); ...
Try following, it should work for you:- ``` <?php $product = mysqli_query($con,select * from product LIMIT 3); $temp = array(); while ($dataproduct = mysqli_fetch_assoc($product) { $temp[] = $dataproduct['product']; } echo json_encode($temp); ?> $.ajax({ type : "GET", url : t...
33,082,011
i have a problem about looping throught json output on ajax success. this is my code : ``` <?php $product = mysqli_query($con,select * from product LIMIT 3); while ($dataproduct = mysqli_fetch_assoc($product) { echo json_encode(array( "product" => $dataproduct['product'] )); } ?> $...
2015/10/12
[ "https://Stackoverflow.com/questions/33082011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5069063/" ]
Why keeping too much processing on end user low power PC. You can generate the output HTML at server side and get the resulted html and put it in your required place in html DOM. You can change your PHP code to below: ``` <?php $html = ""; $product = mysqli_query($con,select * from product LIMIT 3); ...
If i'm not totally incorrect, you at first will have to parse the JSON, don't you? Like $.parseJSON(data) and then you may iterate over it. Also in the outest $.each you do not use key and value, but at least the value will be the one that has further elements as childs.
60,554,653
So I have an application that downloads a zip folder with a bunch of audio files in it. I want to encrypt that zip file on download, and then be able to decrypt the zip file at some other point in the application so that it can be extracted. I have basic logic for encryption and decryption using Node's Crypto package a...
2020/03/05
[ "https://Stackoverflow.com/questions/60554653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7607817/" ]
The issue here is that you are taking chunks of the file, encrypting them separately and then writing those to disk. What you end up with is a bunch of different encrypted parts of a file rather than one encrypted file. You'll want to utilize Node's stream functionalities here probably: ```js const http = require('htt...
The Node crypto API is still sufficiently low-level enough that a lot can go wrong. For example you might want to add an HMAC to the encrypted data to ensure its integrity. My proposal would be to use a Javascript binding of libsodium or similar so you get an even more high-level API. The native bindings I could find ...
11,209,132
``` array(2) { [0]=> array(4) { ["id"]=> string(1) "1" ["name"]=> string(3) "Lim" ["subproject_id"]=> string(1) "5" ["subproject_name"]=> string(4) "Mads" } [1]=> array(1) { [0]=> array(4) { ["id"]=> string(1) "1" ["name"]=> string(3) "Lim" ...
2012/06/26
[ "https://Stackoverflow.com/questions/11209132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267304/" ]
Don't know how much that array could vary, but here is one simple solution. ``` foreach($array as $key => $value){ if(!isset($value['id'])) $value = $value[0]; echo $value['name']; echo $value['subproject_name']; } ``` if its getting deeper, you can use 'while' instead of 'if'.
Consult the php documentation, look for "array\_walk" and "array\_walk\_recursive".
11,209,132
``` array(2) { [0]=> array(4) { ["id"]=> string(1) "1" ["name"]=> string(3) "Lim" ["subproject_id"]=> string(1) "5" ["subproject_name"]=> string(4) "Mads" } [1]=> array(1) { [0]=> array(4) { ["id"]=> string(1) "1" ["name"]=> string(3) "Lim" ...
2012/06/26
[ "https://Stackoverflow.com/questions/11209132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267304/" ]
Try this: ``` array_walk_recursive($array, function($item, $key) { if (in_array($key, array('name', 'subproject_name'))) { echo $item; } }); ``` See <http://php.net/manual/en/function.array-walk-recursive.php> Note: for PHP 5.3.0 you can use [callback](http://www.php.net/manual/en/functions.anonymou...
Consult the php documentation, look for "array\_walk" and "array\_walk\_recursive".
11,209,132
``` array(2) { [0]=> array(4) { ["id"]=> string(1) "1" ["name"]=> string(3) "Lim" ["subproject_id"]=> string(1) "5" ["subproject_name"]=> string(4) "Mads" } [1]=> array(1) { [0]=> array(4) { ["id"]=> string(1) "1" ["name"]=> string(3) "Lim" ...
2012/06/26
[ "https://Stackoverflow.com/questions/11209132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267304/" ]
Try this: ``` array_walk_recursive($array, function($item, $key) { if (in_array($key, array('name', 'subproject_name'))) { echo $item; } }); ``` See <http://php.net/manual/en/function.array-walk-recursive.php> Note: for PHP 5.3.0 you can use [callback](http://www.php.net/manual/en/functions.anonymou...
Don't know how much that array could vary, but here is one simple solution. ``` foreach($array as $key => $value){ if(!isset($value['id'])) $value = $value[0]; echo $value['name']; echo $value['subproject_name']; } ``` if its getting deeper, you can use 'while' instead of 'if'.
25,403,082
Got a table in SQL Server which contains a `varchar` column with date data. Unfortunately the dates are in a whole slew of different formats. ``` 2012-05-01 27/05/2012 07MAY2014 19/07/13 ``` There may be others, but that's all I've encountered so far. I need to squeeze these into a `datetime` column into anothe...
2014/08/20
[ "https://Stackoverflow.com/questions/25403082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/271907/" ]
My guess is that you just have to try to differentiate between the different classes and handle each case in the appropriate way. Something like this: ``` declare @tab table (d varchar(20)) insert @tab values ('2012-05-01'),('27/05/2012'),('07MAY2014'),('19/07/13') select case when isnumeric(left(d,4)) ...
For this first you can convert all the data into another format such as `110` the `USA date fromat`, and then further again update the whole table with the desired format.