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
54,663,213
I want to change the background color of value selected. I have tried it using ng class and ngmodel but is not working as per expectations. Below is my parent ts file. ``` users = USERS; selectedUser = 0; isSelected = false; constructor() { } ngOnInit() { } onSelect(index): void { this.selectedUser = index; console...
2019/02/13
[ "https://Stackoverflow.com/questions/54663213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10994151/" ]
try like this ``` <tr *ngFor="let user of users; let i = index" (click)="onSelect(i)" [class.selected]="i==selectedUser"> <td>{{ user.name }}</td> ``` Basically you need to match selected row index value with `selecteduser` value that you are setting in your `onSelect` method note : you can use `ngClas...
You have called onSelect method to set index to selectedUser property but have you not set isSelected to true. Please update the onSelect method as below - ``` onSelect(index): void { this.selectedUser = index; this.isSelected=true; console.log(this.selectedUser); } ```
54,663,213
I want to change the background color of value selected. I have tried it using ng class and ngmodel but is not working as per expectations. Below is my parent ts file. ``` users = USERS; selectedUser = 0; isSelected = false; constructor() { } ngOnInit() { } onSelect(index): void { this.selectedUser = index; console...
2019/02/13
[ "https://Stackoverflow.com/questions/54663213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10994151/" ]
try like this ``` <tr *ngFor="let user of users; let i = index" (click)="onSelect(i)" [class.selected]="i==selectedUser"> <td>{{ user.name }}</td> ``` Basically you need to match selected row index value with `selecteduser` value that you are setting in your `onSelect` method note : you can use `ngClas...
You are just using **isSelected**, it doesn't point to any particular item in the array. You should use comparison operator in the `[ngClass]="{ select: selectedUser === i }"`, here the `i` is the index of the item, when the user clicks the the tr `onSelect(i)` gets invoked with the current item of the array. So the...
46,174,405
I have this example of array: ``` $roles = [ "dashboard.read" => true, "dashboard.section1.read" => true, "members.member.create" => false, "members.member.read" => true, "members.member.view.update" => true, "members.member.view.section2.delete" => false, "members.member.view" => true ]; ...
2017/09/12
[ "https://Stackoverflow.com/questions/46174405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4879275/" ]
I took it as a challenge to solve your question, here you go, I have added all the details right into the code: ``` // your defined roles, as stated above $roles = [ "dashboard.read" => true, "dashboard.section1.read" => true, "members.member.create" => false, "members.member.read" => true, "member...
It can be easily done through array references: ``` $input = [ "dashboard.read" => true, "dashboard.section1.read" => true, "members.member.create" => false, "members.member.read" => true, "members.member.view.update" => true, "members.member.view.section2.delete" => false, "members.member....
107,510
I need the name of an early sci-fi movie, 1950s or early 1960s. I'd call it a C-movie. It was a Mars landing, in a spaceship that looked basically like a coffee can. The seats in the ship were low-backed regular chairs. The elevator taking the crew to the surface was the slowest elevator ever seen. On the surface, they...
2015/11/11
[ "https://scifi.stackexchange.com/questions/107510", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/55655/" ]
A slightly better match, *[Mission Mars](http://www.imdb.com/title/tt0063311/)*, a 1968 film. > > Three American astronauts who land on Mars discover the body of a frozen Russian cosmonaut and a mysterious talking orb. > > > The "coffee can" ship is available around the two minute mark of the video above. Low-bac...
Possibly the 1951 *[Flight to Mars](https://en.wikipedia.org/wiki/Flight_to_Mars_(film))*. Looking at clips on the web, it's definitely low budget, and has the low-backed chairs. I haven't found a monster yet, but there are four crew members, wearing what look like garishly colored flightsuits. [![Movie poster 1](http...
43,901,845
I recently upgraded from ``` "highcharts-ng": "~0.0.11", "highcharts-release": "~4.1.9", "angular-bootstrap": "~0.14.3", ``` to ``` "highcharts-ng": "~1.1.0", "highcharts-release": "~5.0.11", "angular-bootstrap": "~0.14.3", ``` and only since then get this problem: I have a single page angular application (Angu...
2017/05/10
[ "https://Stackoverflow.com/questions/43901845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/241475/" ]
Problem is with the highcharts-ng library and I filed an issue report here: <https://github.com/pablojim/highcharts-ng/issues/594> Also see the comments there for a workaround.
I solved this problem by changing the options and data from ngAfterViewInit to the component's constructor. From ``` ngAfterViewInit(){ data... options... } ``` To ``` constructor(){ data... options... } ```
71,351,249
I have a Spring boot project with version 2.6.4. And after I updated the jasperreports dependency to 6.19.0 all my RestControllers returns now XML instead of JSON Where can I change this, without changing to ``` @GetMapping(produces = {"application/json"}) ``` on each method?
2022/03/04
[ "https://Stackoverflow.com/questions/71351249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3186906/" ]
I just have same issue today, I checked with Chrome and saw it doesn't add application/json in Accept header. My solution is create a wrapper filter: ``` @Component public class JsonRequestHeaderFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterC...
Set the default type in the configureContentNegotiation(ContentNegotiationConfigurer configurer) method. ``` @Configuration class WebMvcConfiguration implements WebMvcConfigurer { @Override public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { configurer.defaultContentT...
71,351,249
I have a Spring boot project with version 2.6.4. And after I updated the jasperreports dependency to 6.19.0 all my RestControllers returns now XML instead of JSON Where can I change this, without changing to ``` @GetMapping(produces = {"application/json"}) ``` on each method?
2022/03/04
[ "https://Stackoverflow.com/questions/71351249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3186906/" ]
I just have same issue today, I checked with Chrome and saw it doesn't add application/json in Accept header. My solution is create a wrapper filter: ``` @Component public class JsonRequestHeaderFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterC...
Removing the dependency on jackson-dataformat-xml also fixes the issue. I think it is a Jasper Reports bug (still present in 6.20.0) anyway and I prefer not to add custom source code for it: ``` <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</arti...
71,351,249
I have a Spring boot project with version 2.6.4. And after I updated the jasperreports dependency to 6.19.0 all my RestControllers returns now XML instead of JSON Where can I change this, without changing to ``` @GetMapping(produces = {"application/json"}) ``` on each method?
2022/03/04
[ "https://Stackoverflow.com/questions/71351249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3186906/" ]
Removing the dependency on jackson-dataformat-xml also fixes the issue. I think it is a Jasper Reports bug (still present in 6.20.0) anyway and I prefer not to add custom source code for it: ``` <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</arti...
Set the default type in the configureContentNegotiation(ContentNegotiationConfigurer configurer) method. ``` @Configuration class WebMvcConfiguration implements WebMvcConfigurer { @Override public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { configurer.defaultContentT...
352,703
I have kept boot settings in legacy mode. After setting it when I go to boot setup and select USB drive in which I have Ubuntu 13.04. it asks: 1. Try Ubuntu 2. Install Ubuntu 3. .... 4. .... When I click on Install Ubuntu, the process doesn't go ahead. It shows some errors like: `failed to read file. load...
2013/10/02
[ "https://askubuntu.com/questions/352703", "https://askubuntu.com", "https://askubuntu.com/users/198075/" ]
``` Major opcode of failed request: 18 (X_ChangeProperty) ``` is usually caused by a locale issue. See [issue 1420](https://github.com/ValveSoftware/steam-for-linux/issues/1420) You quickly check if this is the problem by running: ``` LC_ALL=C steam ``` If this is your problem, set LANG=en\_US.UTF-8 in /etc/defau...
First of, since you didn't mention which way you uninstalled steam, try fully purging it from your system ``` sudo apt-get purge steam* ``` Then try installing it again, by downloading .deb package from the website <http://store.steampowered.com/about/?snr=1_4_4__11> If that didn't fix the issue, try deleting appca...
39,306,567
I am using switch statement to handle over 20 cases. It there a way to minimize a long switch statement for e.g as given below: ``` switch (something) { case 1: doX(); break; case 2: doY(); break; case 3: doN(); break; // And so on... } ``` **Edit:** As all a...
2016/09/03
[ "https://Stackoverflow.com/questions/39306567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6790549/" ]
try this ``` <div class="row"> <div class="col s3">Content 1 </div> <div class="col s6">Content 2 </div> <div class="col s3">Formmmm</div> <div class="row"> <div class="col s3">Content 3 </div> <div class="col s6">Content 4 </div> </div> </div> ```
Consider this as a container that has two columns. The first column contains content1 to 4 and the second contains Form. In the first column create two rows each with two columns. The first row has content1 and 2 and the second row contains Content3 and 4. Like this ``` <div class container> <div class="row parent-r...
56,039,308
Below is my code, I am getting null subLocality always .... ``` Geocoder geocoder = new Geocoder(this, Locale.getDefault()); List<Address> addresses = geocoder.getFromLocation(latitude,longitude, 1); String suburb = addresses.get(0).getSubLocality(); String state = addresses.get(0).getAdminArea(); String zip = addre...
2019/05/08
[ "https://Stackoverflow.com/questions/56039308", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4976247/" ]
**Geocoder API** will return the values depending on `lat` `long`, if the `API` database doesn't have these values exemple : `subLocality` then it will return `null` only, in my knowledge there's nothing you can do about it. You have to handle these cases gracefully so your app don't crash. Handling these cases includ...
I too had the same problem which was solved by increasing the number of results which you request from Geocoder API. Try increasing it to 10 ``` List<Address> addresses = geocoder.getFromLocation(latitude,longitude, 10); ``` Then if your sub-locality is null with the `first` result, try search in the rest of them ...
916,064
I'm trying to understand the PHYSICAL difference on the motherboard when it comes to single, dual, triple and quad channel memory. I have a mobo that has 4 black memory slots, each one contains 4GB of RAM, a total of 16GB. Since I have a 1155 socket I know I am limited to dual channel only. But what about a 2011 s...
2015/05/18
[ "https://superuser.com/questions/916064", "https://superuser.com", "https://superuser.com/users/317940/" ]
> > Would triple or quad channels have only 2 color variants > or would there be more colors? > > > Not more colours, but a larger set of sockets in the same colour. E.g. a X58 based board (triple channel) would typically give you 6 sockets. 3 coloured blue and 3 coloured white. ![Screenshot of an Intel X58 tri...
The motherboard determines if you can use dual, triple or quad channel memory. This [web site](http://www.hardwaresecrets.com/printpage/Everything-You-Need-to-Know-About-the-Dual-Triple-and-Quad-Channel-Memory-Architectures/133) has a good explanation of the different types of memory. In short, dual channel memory use...
916,064
I'm trying to understand the PHYSICAL difference on the motherboard when it comes to single, dual, triple and quad channel memory. I have a mobo that has 4 black memory slots, each one contains 4GB of RAM, a total of 16GB. Since I have a 1155 socket I know I am limited to dual channel only. But what about a 2011 s...
2015/05/18
[ "https://superuser.com/questions/916064", "https://superuser.com", "https://superuser.com/users/317940/" ]
The motherboard determines if you can use dual, triple or quad channel memory. This [web site](http://www.hardwaresecrets.com/printpage/Everything-You-Need-to-Know-About-the-Dual-Triple-and-Quad-Channel-Memory-Architectures/133) has a good explanation of the different types of memory. In short, dual channel memory use...
The slot colors on a motherboard are arbitrary and non-standard. I recommend looking at the motherboard manual or PCB silk screen on the motherboard to understand which slots (or sockets) belong to which channel. Do not confuse a slot with a channel. Each channel will support one more more slots. Nomenclature for this ...
916,064
I'm trying to understand the PHYSICAL difference on the motherboard when it comes to single, dual, triple and quad channel memory. I have a mobo that has 4 black memory slots, each one contains 4GB of RAM, a total of 16GB. Since I have a 1155 socket I know I am limited to dual channel only. But what about a 2011 s...
2015/05/18
[ "https://superuser.com/questions/916064", "https://superuser.com", "https://superuser.com/users/317940/" ]
> > Would triple or quad channels have only 2 color variants > or would there be more colors? > > > Not more colours, but a larger set of sockets in the same colour. E.g. a X58 based board (triple channel) would typically give you 6 sockets. 3 coloured blue and 3 coloured white. ![Screenshot of an Intel X58 tri...
The slot colors on a motherboard are arbitrary and non-standard. I recommend looking at the motherboard manual or PCB silk screen on the motherboard to understand which slots (or sockets) belong to which channel. Do not confuse a slot with a channel. Each channel will support one more more slots. Nomenclature for this ...
32,789,179
I'm currently Adding a rectangle to an image in case it's not squared "filling" the remaining space, making it square. The idea is that this is a cheap approach (in terms of time required to "force" an image to be squared). As you can see in the image attached, the square I generate does not have a color, and this mig...
2015/09/25
[ "https://Stackoverflow.com/questions/32789179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2417756/" ]
Just fill with a background color before you draw the image: ``` func forceSquaredImage(image: UIImage) -> UIImage{ let maxDimension = max(image.size.height, image.size.width) var newImage : UIImage = image UIGraphicsBeginImageContextWithOptions(CGSize(width: maxDimension, height: maxDimension), false, 0....
Try this: (not tested, may need adjustment) Create a `UIBezierPath` that's the full size of your off-screen context using `bezierPathWithRect`. Use the UIColor method set (or setFill) to set the current stroke/fill or fill color to the receiver. Use the UIBezierPath method `fill` to fill the path with the current fi...
32,789,179
I'm currently Adding a rectangle to an image in case it's not squared "filling" the remaining space, making it square. The idea is that this is a cheap approach (in terms of time required to "force" an image to be squared). As you can see in the image attached, the square I generate does not have a color, and this mig...
2015/09/25
[ "https://Stackoverflow.com/questions/32789179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2417756/" ]
Try this: (not tested, may need adjustment) Create a `UIBezierPath` that's the full size of your off-screen context using `bezierPathWithRect`. Use the UIColor method set (or setFill) to set the current stroke/fill or fill color to the receiver. Use the UIBezierPath method `fill` to fill the path with the current fi...
> > I'd like to add a color to the CGRect I'm generating. > > > How is: ``` let colorView = UIView(frame: myGeneratedRect) colorView.backgroundColor = .red ``` ?
32,789,179
I'm currently Adding a rectangle to an image in case it's not squared "filling" the remaining space, making it square. The idea is that this is a cheap approach (in terms of time required to "force" an image to be squared). As you can see in the image attached, the square I generate does not have a color, and this mig...
2015/09/25
[ "https://Stackoverflow.com/questions/32789179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2417756/" ]
Just fill with a background color before you draw the image: ``` func forceSquaredImage(image: UIImage) -> UIImage{ let maxDimension = max(image.size.height, image.size.width) var newImage : UIImage = image UIGraphicsBeginImageContextWithOptions(CGSize(width: maxDimension, height: maxDimension), false, 0....
> > I'd like to add a color to the CGRect I'm generating. > > > How is: ``` let colorView = UIView(frame: myGeneratedRect) colorView.backgroundColor = .red ``` ?
53,949,538
I wish to implement the `Stream<E>` interface (I admit, it's the unnecessarily large one) and add a builder method `foo()`. ``` public MyStream<E> implements Stream<E>, ExtendedStream<E> { private final Stream<E> delegate; public MyStream(final Stream<E> stream) { this.delegate = stream; } /...
2018/12/27
[ "https://Stackoverflow.com/questions/53949538", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3764965/" ]
As part of work on [JSR 335](https://www.jcp.org/en/jsr/detail?id=335), the JRE libraries evolved by introducing `java.util.Stream` and at the same time leveraging the new concept in places like `java.nio`. During this time the Eclipse team was consulted by the JSR 335 expert group, to discuss the following **conflict*...
[In **Java 7** the description of `AutoCloseable`](https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html) is > > "...**must be closed**..." > > > whereas [in **Java 8** the description](https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html) was semantically changed to > > "...t...
19,262,680
I'm creating a mobile app that views articles. These articles are just simple html with a couple of images each. I am currently storing everything in a database. Later, I will need to save the articles locally to the device in an easy format. For this reason, I have opted to store the Base64 images within the database,...
2013/10/09
[ "https://Stackoverflow.com/questions/19262680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2639166/" ]
Avoiding using the db to store images is a good practice, keeping the images in the db not only slows down your db performance it also increases it size and backups, if you are using cloud service then there is also the cost issue. Use S3 or Azure for this purpose and have only the url of the images in your db.Files m...
Another option would be to store images in something like: [Amazon S3](http://aws.amazon.com/s3/) and then just have a field in your database that stored the url for each image.
19,262,680
I'm creating a mobile app that views articles. These articles are just simple html with a couple of images each. I am currently storing everything in a database. Later, I will need to save the articles locally to the device in an easy format. For this reason, I have opted to store the Base64 images within the database,...
2013/10/09
[ "https://Stackoverflow.com/questions/19262680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2639166/" ]
Another option would be to store images in something like: [Amazon S3](http://aws.amazon.com/s3/) and then just have a field in your database that stored the url for each image.
You could also look into Azure Blob Storage. I've been using it and it's working very well.
19,262,680
I'm creating a mobile app that views articles. These articles are just simple html with a couple of images each. I am currently storing everything in a database. Later, I will need to save the articles locally to the device in an easy format. For this reason, I have opted to store the Base64 images within the database,...
2013/10/09
[ "https://Stackoverflow.com/questions/19262680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2639166/" ]
Avoiding using the db to store images is a good practice, keeping the images in the db not only slows down your db performance it also increases it size and backups, if you are using cloud service then there is also the cost issue. Use S3 or Azure for this purpose and have only the url of the images in your db.Files m...
As long as you dont have a DB as big as facebook or similar it should be fine. It is best to store just the path to the image and the image themselves in a folder. hope that helps
19,262,680
I'm creating a mobile app that views articles. These articles are just simple html with a couple of images each. I am currently storing everything in a database. Later, I will need to save the articles locally to the device in an easy format. For this reason, I have opted to store the Base64 images within the database,...
2013/10/09
[ "https://Stackoverflow.com/questions/19262680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2639166/" ]
As long as you dont have a DB as big as facebook or similar it should be fine. It is best to store just the path to the image and the image themselves in a folder. hope that helps
You could also look into Azure Blob Storage. I've been using it and it's working very well.
19,262,680
I'm creating a mobile app that views articles. These articles are just simple html with a couple of images each. I am currently storing everything in a database. Later, I will need to save the articles locally to the device in an easy format. For this reason, I have opted to store the Base64 images within the database,...
2013/10/09
[ "https://Stackoverflow.com/questions/19262680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2639166/" ]
Avoiding using the db to store images is a good practice, keeping the images in the db not only slows down your db performance it also increases it size and backups, if you are using cloud service then there is also the cost issue. Use S3 or Azure for this purpose and have only the url of the images in your db.Files m...
You could also look into Azure Blob Storage. I've been using it and it's working very well.
52,865,197
I'm trying to remove all subtrees that only contain zeros. My code is below. Right now, running removeFailures on the root node does not modify the tree at all (doing preorder traversal before and after gives the same result). I think it is because when I say "root is None" I'm not actually modifying root, I'm simply ...
2018/10/18
[ "https://Stackoverflow.com/questions/52865197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10521285/" ]
Your setInterval is basically telling everything to fade-out and fade-in at the same time, which isn't what you want. There's two approaches here: have 3 separate intervals for fading each "step", or have 1 interval with some internal counter for keeping track of what to show. Here's the first approach: ``` function...
Your code starts all the timeouts at the same time, so they all complete at the same time. You'd have to nest them to make them to execute after each other, like this: ``` setTimeout(function() { // Do something // ... setTimeout(function() { // Do something else // ... setTimeout(....
297,474
As part of the dependencies that the project I'm working on has, we use several core services. These services, to which we can't make big changes, are a big mess. Depending on the method we invoke, we need to convert our parameters (and return values) to different encodings, locales and time zones. Since we generate t...
2015/09/17
[ "https://softwareengineering.stackexchange.com/questions/297474", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/183242/" ]
The problem you are facing is an instance of a general problem that we quite often face in Software Engineering: **Molding the tools to bring them to our specific problem domain** by means of abstraction/conversion layers. You have an application which solves a problem. The entities that it contains, manages, and inte...
First of all, you (or your team) need to agree on a "standard" format that you will use in your own code. For example: * Encoding: UTF-8 * Locale: en\_UK * Timezone: UTC Only after, you could write a layer that will adapt the values to the formats requested from your dependancies (I don't think it's unwieldy). As Mi...
297,474
As part of the dependencies that the project I'm working on has, we use several core services. These services, to which we can't make big changes, are a big mess. Depending on the method we invoke, we need to convert our parameters (and return values) to different encodings, locales and time zones. Since we generate t...
2015/09/17
[ "https://softwareengineering.stackexchange.com/questions/297474", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/183242/" ]
What you're trying to do is implement the [facade pattern](https://en.wikipedia.org/wiki/Facade_pattern). Basically you want to put a simpler face on the core code. You'll probably want to create a set of classes that provide a 1:1 mapping for each core class, then use the facade classes in place of the core classes. I...
First of all, you (or your team) need to agree on a "standard" format that you will use in your own code. For example: * Encoding: UTF-8 * Locale: en\_UK * Timezone: UTC Only after, you could write a layer that will adapt the values to the formats requested from your dependancies (I don't think it's unwieldy). As Mi...
14,784,377
I'm running Ruby on Rails 3.0.6 on OS X Lion. I had setup a memcached server instance and was caching in development for testing purposes. Everything was working fine, but I decided to clear out my database and see how the application ran without any data. I cleared it out, restarted Apache, and turned off caching in d...
2013/02/09
[ "https://Stackoverflow.com/questions/14784377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/290192/" ]
Or you can do it from CLI: ``` echo 'flush_all' | nc localhost 11211 ``` *Source*: [cyberciti.biz](http://www.cyberciti.biz/faq/linux-unix-flush-contents-of-memcached-instance/)
Turns out deleting the cache folder in /tmp/cache cleared the cache. Now I know :)
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
be sure to this line (`[super dealloc];`) is the last statement in `dealloc` method I think you have written release for other class variables after `[super dealloc]`
The issue is that you are releasing the UI objects that are loaded as part of the NIB. **Golden Rule**: Don't release anything you didn't allocate yourself.
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
It can happen if you release an object twice. Please check all releases and remove any duplication.
I think problem is one of the button you create as ``` UIButton* btn = [UIButton buttonWithType:UIButtonTypeCustom]; ``` and then you release in dealloc method. try to comment all button that declare as above.
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
It can happen if you release an object twice. Please check all releases and remove any duplication.
The issue is that you are releasing the UI objects that are loaded as part of the NIB. **Golden Rule**: Don't release anything you didn't allocate yourself.
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
I think you are allocating the memory to `NSArray` with `arrayWithArray` static method. In this way it is getting added in the auto release pool and the retain count will be 0. Either retain it or manually `alloc` it with `[[NSArray alloc] init]`
be sure to this line (`[super dealloc];`) is the last statement in `dealloc` method I think you have written release for other class variables after `[super dealloc]`
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
be sure to this line (`[super dealloc];`) is the last statement in `dealloc` method I think you have written release for other class variables after `[super dealloc]`
First enable zombie in your application How to do it ?? Please go through this. [How to enable NSZombie in Xcode?](https://stackoverflow.com/questions/5386160/how-to-enable-nszombie-in-xcode) now when your application crashes you will know for which line your application crashed. check what identifier does the objec...
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
I think you are allocating the memory to `NSArray` with `arrayWithArray` static method. In this way it is getting added in the auto release pool and the retain count will be 0. Either retain it or manually `alloc` it with `[[NSArray alloc] init]`
First enable zombie in your application How to do it ?? Please go through this. [How to enable NSZombie in Xcode?](https://stackoverflow.com/questions/5386160/how-to-enable-nszombie-in-xcode) now when your application crashes you will know for which line your application crashed. check what identifier does the objec...
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
I think you are allocating the memory to `NSArray` with `arrayWithArray` static method. In this way it is getting added in the auto release pool and the retain count will be 0. Either retain it or manually `alloc` it with `[[NSArray alloc] init]`
It can happen if you release an object twice. Please check all releases and remove any duplication.
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
be sure to this line (`[super dealloc];`) is the last statement in `dealloc` method I think you have written release for other class variables after `[super dealloc]`
You have release any variable in two times and I think you have written release for other class variables after [super dealloc].
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
It can happen if you release an object twice. Please check all releases and remove any duplication.
be sure to this line (`[super dealloc];`) is the last statement in `dealloc` method I think you have written release for other class variables after `[super dealloc]`
16,603,090
Hi I am trying to fetch data from joomla session table based on session id. I am using code as under and able to get session id but when i am trying to get username based on bellow mentioned query i am not getting any output. So please help/guide me if there is problem in query. I had also check column name(if i mistyp...
2013/05/17
[ "https://Stackoverflow.com/questions/16603090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245080/" ]
I think you are allocating the memory to `NSArray` with `arrayWithArray` static method. In this way it is getting added in the auto release pool and the retain count will be 0. Either retain it or manually `alloc` it with `[[NSArray alloc] init]`
The issue is that you are releasing the UI objects that are loaded as part of the NIB. **Golden Rule**: Don't release anything you didn't allocate yourself.
55,646,279
I have 100s of tests in my testng.xml, most of tests failing due to timing issue, but when I am running them in chunks it works fine One ineffective solution I tried is to divide the small number of tests in to multiple testng.xml file and run one by one, looking for alternate which I can do the same at run time Here...
2019/04/12
[ "https://Stackoverflow.com/questions/55646279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3448017/" ]
As I can understand, you want to run your test cases are in multiple batches. If I am correct then it's very simple. Just divide your all test cases in multiple `test` tag and use test classes you want to execute in `test` tag. Please have a look below. ``` <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <...
You want to 'group' your tests as follows: ``` import org.testng.Assert; import org.testng.annotations.Test; public class GroupTestExample { String message = ".com"; MessageUtil messageUtil = new MessageUtil(message); @Test(groups = { "functest", "checkintest" }) public void testPrintMessage() { S...
49,531
I'm learning Entity Framework and I'm wondering if this code is the proper way of doing this. Basically this is my attempt at refactoring a very long controller in ASP.Net MVC 4. I'm using Entity Framework 5 as well. What I did was I separated out some code into a more common method (buildUpdatedAnswerDetailRecord). ...
2014/05/12
[ "https://codereview.stackexchange.com/questions/49531", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/25386/" ]
This answer is just a little remark about this redundant part: > > > ``` > if (isLeader == true) > { > buildAdItem.Comment = item.LeaderComment; > buildAdItem.AnswerOptionKey = item.LeaderAnswerOptionKey.Value; > buildAdItem.UpdatedBy = userName; > buildAdItem.UpdateStamp = DateTime.Now; > } > else >...
yes, you can pass db context through functions ``` using(MyEntities context = new MyEntities()) { SomeObject record = //pull record; SomeFunction(record, context); }//connection closes here void SomeFunction(SomeObject record, MyEntities context) { //do some stuff on record } ```
49,531
I'm learning Entity Framework and I'm wondering if this code is the proper way of doing this. Basically this is my attempt at refactoring a very long controller in ASP.Net MVC 4. I'm using Entity Framework 5 as well. What I did was I separated out some code into a more common method (buildUpdatedAnswerDetailRecord). ...
2014/05/12
[ "https://codereview.stackexchange.com/questions/49531", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/25386/" ]
This answer is just a little remark about this redundant part: > > > ``` > if (isLeader == true) > { > buildAdItem.Comment = item.LeaderComment; > buildAdItem.AnswerOptionKey = item.LeaderAnswerOptionKey.Value; > buildAdItem.UpdatedBy = userName; > buildAdItem.UpdateStamp = DateTime.Now; > } > else >...
Just a quick note about the way exceptions are handled: ``` catch (Exception ex) { throw new Exception("buildUpdatedAnswerDetailRecord Error Occured: " + ex.Message.ToString()); } ``` You're shooting yourself in the foot: you're receiving a potentially very meaningful and helpful exception, with a very detailed ...
70,308,662
I have a nested array which is like this: ```js var data = [ {floor: '2', id: '10002', label: 'Elutuba', items: Array(3)} {floor: '0', id: '10008', label: 'Saun', items: Array(2)}, {floor: '0', id: '10010', label: 'test2', items: Array(2)}, {floor: '0', id: '1001...
2021/12/10
[ "https://Stackoverflow.com/questions/70308662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17647007/" ]
Running saga should be after creating the store like that: ```js ... const configureStore = () => { const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(...middlewares))); sagaMiddleware.run(rootSaga); const persistor = persistStore(store); return { persistor, store }; }; ``` Another poi...
> > Getting an Error: Before running a Saga, you must mount the Saga middleware on the Store using the applyMiddleware > > > Error explanation ----------------- Your error says you are trying to execute a saga too soon Explaining you to run your middleware before. Therefore your solution is to execute `saggaMiddl...
15,285,174
I have some custom buttons I add to the view in `-viewDidLoad`. I want them centered vertically inside the view, like so: ``` self.customButton.center = CGPointMake(98.f, self.view.center.y); ``` However, the view height is `504.0` even on a 3.5" device, where I expect it to be `416` (480 - 20 (status bar height) - ...
2013/03/08
[ "https://Stackoverflow.com/questions/15285174", "https://Stackoverflow.com", "https://Stackoverflow.com/users/256405/" ]
You don't have Autolayout in iOS5, but you do still have the autoresizing mask. If you center a view vertically in IB, go to the inspector and deselect the vertical struts and springs in the autolayout masks, the view will stay centered vertically on both 4" and 3.5" screens. Or you can do this in code in your viewDid...
> > EDIT: the odd thing is, in `-viewWillAppear`, view height is correctly set to 416.0. Why this isn't handled after `[super viewDidLoad]` is beyond me. > > > Because resizing the view is not part of loading the view! `-viewDidLoad` gets called from `-view` in a method that probably looks a bit like this: ``` -(...
53,404,249
This is a question about Watson Assistant API V1/V2 difference. The [doc](https://console.bluemix.net/docs/services/assistant/api-client.html#building-a-client-application) says like this: > > Note that if your app uses the v1 API, it communicates directly with the dialog skill, bypassing the orchestration and state-...
2018/11/21
[ "https://Stackoverflow.com/questions/53404249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5755905/" ]
Answering your second question first - If you check the API docs for Watson Assistant V2 [here](https://console.bluemix.net/apidocs/assistant-v2#send-user-input-to-assistant), there is a MessageContext object in the response with Global Context and skill specific context values. [![enter image description here](https:...
Thanks, @Vidyasagar Machupalli @data\_henrik. (I created "answer" section to paste the images below .) 1) Now it worked fine. I set the variable reference in dialog editor like this. [![enter image description here](https://i.stack.imgur.com/GVpUr.png)](https://i.stack.imgur.com/GVpUr.png) Then I post user-variable i...
334,566
I notice there are some users who regularly rewrite past answer as a new one. The user created a duplicated answer with an improvement on the language for readability, however I find that it doesn't improve the key idea of the answer to the question. The problem is that creating new answer without a new idea will onl...
2016/09/14
[ "https://meta.stackoverflow.com/questions/334566", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/764592/" ]
> > The user created a duplicated answer with an improvement on the language for readability, however I find that it doesn't improve the key idea of the answer to the question. The problem is that creating new answer without a new idea will only waste everyone time reading it. > > > Sounds like you feel that that ...
In the first linked example, the nominal "original" answer was practically a link-only answer. It says, "hey, you can use that package over there". The nominal "duplicate" answer says "hey, you can use that package over there, **here's how**". It's the "here's how" that makes it such a better answer than the other that...
9,341,583
Ive been staring at my code and I can't figure out why on earth my constructor is not gettign called. It's just ignoring my constructor completely (i've check with stepping with debugger). Here's my testapp: ``` using namespace MyEngine; int _tmain(int argc, _TCHAR* argv[]) { TestManager* testMgr = new TestMana...
2012/02/18
[ "https://Stackoverflow.com/questions/9341583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/528590/" ]
You cant call another constructor from the same class. I'd refactor the init code into a separate method and call it from both constructors: ``` namespace MyEngine { TestManager::TestManager() { Init(1); } TestManager::TestManager(uint64_t RepeatTimes) { Init(RepeatTimes); } ...
When you call `TestManager(1);` inside your `TestManager::TestManager(`) constructor, you're creating **another** instance of TestManager, using the constructor `TestManager::TestManager(uint64_t)`. You can't do this on C++, you have to create either a *init* method, were you set the instance variables to whatever you...
9,341,583
Ive been staring at my code and I can't figure out why on earth my constructor is not gettign called. It's just ignoring my constructor completely (i've check with stepping with debugger). Here's my testapp: ``` using namespace MyEngine; int _tmain(int argc, _TCHAR* argv[]) { TestManager* testMgr = new TestMana...
2012/02/18
[ "https://Stackoverflow.com/questions/9341583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/528590/" ]
You cant call another constructor from the same class. I'd refactor the init code into a separate method and call it from both constructors: ``` namespace MyEngine { TestManager::TestManager() { Init(1); } TestManager::TestManager(uint64_t RepeatTimes) { Init(RepeatTimes); } ...
you can't call a default constructor from a overloaded constructor. Why don't you simply create you object like this: ``` TestManager* testMgr = new TestManager(1); ```
9,341,583
Ive been staring at my code and I can't figure out why on earth my constructor is not gettign called. It's just ignoring my constructor completely (i've check with stepping with debugger). Here's my testapp: ``` using namespace MyEngine; int _tmain(int argc, _TCHAR* argv[]) { TestManager* testMgr = new TestMana...
2012/02/18
[ "https://Stackoverflow.com/questions/9341583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/528590/" ]
You cant call another constructor from the same class. I'd refactor the init code into a separate method and call it from both constructors: ``` namespace MyEngine { TestManager::TestManager() { Init(1); } TestManager::TestManager(uint64_t RepeatTimes) { Init(RepeatTimes); } ...
Using a default argument (as per fontanini's answer) will do what you want in this case. But if this is a simplified example and you really do want to delegate to another constructor, then that's not possible in C++03 - the line `TestManager(1)` just constructs a temporary object which goes unused (and the line will ...
9,341,583
Ive been staring at my code and I can't figure out why on earth my constructor is not gettign called. It's just ignoring my constructor completely (i've check with stepping with debugger). Here's my testapp: ``` using namespace MyEngine; int _tmain(int argc, _TCHAR* argv[]) { TestManager* testMgr = new TestMana...
2012/02/18
[ "https://Stackoverflow.com/questions/9341583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/528590/" ]
When you call `TestManager(1);` inside your `TestManager::TestManager(`) constructor, you're creating **another** instance of TestManager, using the constructor `TestManager::TestManager(uint64_t)`. You can't do this on C++, you have to create either a *init* method, were you set the instance variables to whatever you...
you can't call a default constructor from a overloaded constructor. Why don't you simply create you object like this: ``` TestManager* testMgr = new TestManager(1); ```
9,341,583
Ive been staring at my code and I can't figure out why on earth my constructor is not gettign called. It's just ignoring my constructor completely (i've check with stepping with debugger). Here's my testapp: ``` using namespace MyEngine; int _tmain(int argc, _TCHAR* argv[]) { TestManager* testMgr = new TestMana...
2012/02/18
[ "https://Stackoverflow.com/questions/9341583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/528590/" ]
When you call `TestManager(1);` inside your `TestManager::TestManager(`) constructor, you're creating **another** instance of TestManager, using the constructor `TestManager::TestManager(uint64_t)`. You can't do this on C++, you have to create either a *init* method, were you set the instance variables to whatever you...
Using a default argument (as per fontanini's answer) will do what you want in this case. But if this is a simplified example and you really do want to delegate to another constructor, then that's not possible in C++03 - the line `TestManager(1)` just constructs a temporary object which goes unused (and the line will ...
230,715
Alright, after doing a ton of research and trying almost every managed CPP Redist I can find as well as trying to copy my DLLs locally to the executing directory of the app I cannot figure out what dependencies i'm missing for this mixed mode library. Basically I have a large C# application and I'm trying to use a mix...
2008/10/23
[ "https://Stackoverflow.com/questions/230715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12707/" ]
Did you deploy the [CRT libraries](http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en) on the target machine? Long shot: since you have a dependency on 32-bit code, you should set Target Platform in the Build property tab to x86. EDIT: trouble-shoot side-by-sid...
I had a similar problem the first time I deployed a VS 2005 app on a target machine -- had to bring over the MSVCRT80 DLL. Are you saying you already have the 2008 VS runtime library there? ETA: Also, dumb question, but are you sure you have both the CRT Runtime (linked to above) *and* the .NET Runtime, with the same ...
230,715
Alright, after doing a ton of research and trying almost every managed CPP Redist I can find as well as trying to copy my DLLs locally to the executing directory of the app I cannot figure out what dependencies i'm missing for this mixed mode library. Basically I have a large C# application and I'm trying to use a mix...
2008/10/23
[ "https://Stackoverflow.com/questions/230715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12707/" ]
Did you deploy the [CRT libraries](http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en) on the target machine? Long shot: since you have a dependency on 32-bit code, you should set Target Platform in the Build property tab to x86. EDIT: trouble-shoot side-by-sid...
I found a solution that seems to work although I don't like it very much. I had to copy the folders: Microsoft.VC90.CRT & Microsoft.VC90.MFC From: Program Files\Microsoft Visual Studio 9.0\VC\redist\x86 Into the deployed application directory, I just can't figure out why this seems to work and the redistributables ...
230,715
Alright, after doing a ton of research and trying almost every managed CPP Redist I can find as well as trying to copy my DLLs locally to the executing directory of the app I cannot figure out what dependencies i'm missing for this mixed mode library. Basically I have a large C# application and I'm trying to use a mix...
2008/10/23
[ "https://Stackoverflow.com/questions/230715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12707/" ]
Did you deploy the [CRT libraries](http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en) on the target machine? Long shot: since you have a dependency on 32-bit code, you should set Target Platform in the Build property tab to x86. EDIT: trouble-shoot side-by-sid...
Best way to solve this problem is to download process monitor which is free from: <http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx> Add a filter to watch only your process and it will show you all file access the process tries. This will show you exactly which dll it can't find. I always use this when f...
230,715
Alright, after doing a ton of research and trying almost every managed CPP Redist I can find as well as trying to copy my DLLs locally to the executing directory of the app I cannot figure out what dependencies i'm missing for this mixed mode library. Basically I have a large C# application and I'm trying to use a mix...
2008/10/23
[ "https://Stackoverflow.com/questions/230715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12707/" ]
Did you deploy the [CRT libraries](http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en) on the target machine? Long shot: since you have a dependency on 32-bit code, you should set Target Platform in the Build property tab to x86. EDIT: trouble-shoot side-by-sid...
Typically I've found that the [pragma comment](http://blogs.msdn.com/oldnewthing/archive/2007/05/31/2995284.aspx) style manifest decleration's to be much more error free, from a developer maintenence and an over all build action perspective. The XML manifest's are [natoriously snafu](http://blogs.msdn.com/vcblog/archiv...
230,715
Alright, after doing a ton of research and trying almost every managed CPP Redist I can find as well as trying to copy my DLLs locally to the executing directory of the app I cannot figure out what dependencies i'm missing for this mixed mode library. Basically I have a large C# application and I'm trying to use a mix...
2008/10/23
[ "https://Stackoverflow.com/questions/230715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12707/" ]
Typically I've found that the [pragma comment](http://blogs.msdn.com/oldnewthing/archive/2007/05/31/2995284.aspx) style manifest decleration's to be much more error free, from a developer maintenence and an over all build action perspective. The XML manifest's are [natoriously snafu](http://blogs.msdn.com/vcblog/archiv...
I had a similar problem the first time I deployed a VS 2005 app on a target machine -- had to bring over the MSVCRT80 DLL. Are you saying you already have the 2008 VS runtime library there? ETA: Also, dumb question, but are you sure you have both the CRT Runtime (linked to above) *and* the .NET Runtime, with the same ...
230,715
Alright, after doing a ton of research and trying almost every managed CPP Redist I can find as well as trying to copy my DLLs locally to the executing directory of the app I cannot figure out what dependencies i'm missing for this mixed mode library. Basically I have a large C# application and I'm trying to use a mix...
2008/10/23
[ "https://Stackoverflow.com/questions/230715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12707/" ]
Typically I've found that the [pragma comment](http://blogs.msdn.com/oldnewthing/archive/2007/05/31/2995284.aspx) style manifest decleration's to be much more error free, from a developer maintenence and an over all build action perspective. The XML manifest's are [natoriously snafu](http://blogs.msdn.com/vcblog/archiv...
I found a solution that seems to work although I don't like it very much. I had to copy the folders: Microsoft.VC90.CRT & Microsoft.VC90.MFC From: Program Files\Microsoft Visual Studio 9.0\VC\redist\x86 Into the deployed application directory, I just can't figure out why this seems to work and the redistributables ...
230,715
Alright, after doing a ton of research and trying almost every managed CPP Redist I can find as well as trying to copy my DLLs locally to the executing directory of the app I cannot figure out what dependencies i'm missing for this mixed mode library. Basically I have a large C# application and I'm trying to use a mix...
2008/10/23
[ "https://Stackoverflow.com/questions/230715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12707/" ]
Typically I've found that the [pragma comment](http://blogs.msdn.com/oldnewthing/archive/2007/05/31/2995284.aspx) style manifest decleration's to be much more error free, from a developer maintenence and an over all build action perspective. The XML manifest's are [natoriously snafu](http://blogs.msdn.com/vcblog/archiv...
Best way to solve this problem is to download process monitor which is free from: <http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx> Add a filter to watch only your process and it will show you all file access the process tries. This will show you exactly which dll it can't find. I always use this when f...
33,226,653
In HTML, XML, and, partially so, DTDs, there are two kinds of special tag constructs: * A tag opening with an **exclamation mark** `<!` and closing with the standard `>`, such as `<!DOCTYPE html>` and `<!--comment-->` * A tag opening with a **question mark** `<?` and closing with another question mark `?>`, such as `<...
2015/10/20
[ "https://Stackoverflow.com/questions/33226653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4131121/" ]
Consult the [*W3C Extensible Markup Language (XML) Recommendation*](http://www.w3.org/TR/REC-xml/) for modern markup terminology: * None of those constructs can properly be called *tags*. A [***tag***](http://www.w3.org/TR/REC-xml/#sec-starttags) delimits an [***element***](http://www.w3.org/TR/REC-xml/#sec-starttags)...
Each tag has a name: ``` <!DOCTYPE html> = doctype <!-- = comment <?php = php tag <?xml = xml tag ```
33,226,653
In HTML, XML, and, partially so, DTDs, there are two kinds of special tag constructs: * A tag opening with an **exclamation mark** `<!` and closing with the standard `>`, such as `<!DOCTYPE html>` and `<!--comment-->` * A tag opening with a **question mark** `<?` and closing with another question mark `?>`, such as `<...
2015/10/20
[ "https://Stackoverflow.com/questions/33226653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4131121/" ]
*This answer is largely informed by [kjhughes](https://stackoverflow.com/users/290085/kjhughes)'s answer above.* Neither [XML](http://www.w3.org/TR/REC-xml/) nor [HTML](http://www.w3.org/TR/html4/) explicitly name the `<!` `>` construct in their specifications, with both having different names for each kind of `<!X` `...
Each tag has a name: ``` <!DOCTYPE html> = doctype <!-- = comment <?php = php tag <?xml = xml tag ```
33,226,653
In HTML, XML, and, partially so, DTDs, there are two kinds of special tag constructs: * A tag opening with an **exclamation mark** `<!` and closing with the standard `>`, such as `<!DOCTYPE html>` and `<!--comment-->` * A tag opening with a **question mark** `<?` and closing with another question mark `?>`, such as `<...
2015/10/20
[ "https://Stackoverflow.com/questions/33226653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4131121/" ]
Consult the [*W3C Extensible Markup Language (XML) Recommendation*](http://www.w3.org/TR/REC-xml/) for modern markup terminology: * None of those constructs can properly be called *tags*. A [***tag***](http://www.w3.org/TR/REC-xml/#sec-starttags) delimits an [***element***](http://www.w3.org/TR/REC-xml/#sec-starttags)...
*This answer is largely informed by [kjhughes](https://stackoverflow.com/users/290085/kjhughes)'s answer above.* Neither [XML](http://www.w3.org/TR/REC-xml/) nor [HTML](http://www.w3.org/TR/html4/) explicitly name the `<!` `>` construct in their specifications, with both having different names for each kind of `<!X` `...
264,544
The Laws of nature are universally applicable and at every point in force. Together they shape our universe but are all "shapes" unique? For example, is it possible that there is a second identical earth somewhere in the universe? Or is it possible that there exists an exact copy of a tree somewhere sometimes on eart...
2016/06/24
[ "https://physics.stackexchange.com/questions/264544", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/120973/" ]
> > If I have an object A, will a second object exists that is an exact > copy of A and cannot be distinguished from the original? > > > If A is a very simple object such as an electron, a nucleon, or even an atom or a small molecule, yes. It is actually an important notion in quantum mechanics that [indistinguis...
The answer to your question is we do not know, and will never know. As you stated it, the uniqueness property depends on our ability to perceive a difference. But that ability is always limited to some level of detail, beyond which differences, if any, are no longer perceived. For instance some people has the idea that...
54,264,324
I'm trying to learn how I can interface with a json api. In the documentation they give me a curl example: If I run this as a command it works fine, gives me my data in a json format. I thought I was on the right track with this: [PHP + curl, HTTP POST sample code?](https://stackoverflow.com/questions/2138527/php-cu...
2019/01/19
[ "https://Stackoverflow.com/questions/54264324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3512531/" ]
The -h command refers the header. Try below code, ``` // Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://urlofapp.com/API/GetTransaction'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "{ 'CustomerID':'12...
Dealing with curl directly usually ends up being a pain. There are a number of libraries that can help making calls like that much simpler. Here are a few: * Simple and straighforward: <http://requests.ryanmccue.info/> * Has everything you could ever possibly want: <https://github.com/guzzle/guzzle>
63,688
Is it possible to perform a vector machine classification of raster image using the ArcGIS software package. This supervised classification method is available in the ENVI software but not for ArcGIS. I have integrated the ENVI toolbox into my ArcCatalog Toolbox set. While the ENVI toolbox offers me the tools to perfo...
2013/06/17
[ "https://gis.stackexchange.com/questions/63688", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/19175/" ]
You may use this tool in ArcGIS: [Train Support Vector Machine Classifier](http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/train-support-vector-machine-classifier.htm) > > Generate an Esri classifier definition (.ecd) file using the Support > Vector Machine (SVM) classification definition. ...
The SVM model is a fairly complex with no direct implementation in ArcGIS. You can access the model using the [Python machine learning library (PyML)](http://pyml.sourceforge.net/) and script a solution within ArcGIS. Although, I have no idea how this Python library will handle array data. You will likely have to coerc...
63,688
Is it possible to perform a vector machine classification of raster image using the ArcGIS software package. This supervised classification method is available in the ENVI software but not for ArcGIS. I have integrated the ENVI toolbox into my ArcCatalog Toolbox set. While the ENVI toolbox offers me the tools to perfo...
2013/06/17
[ "https://gis.stackexchange.com/questions/63688", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/19175/" ]
You may use this tool in ArcGIS: [Train Support Vector Machine Classifier](http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/train-support-vector-machine-classifier.htm) > > Generate an Esri classifier definition (.ecd) file using the Support > Vector Machine (SVM) classification definition. ...
There is an ArcgisToolbox built for Arcgis 10.1 freely available [here](http://awehmann.nfshost.com/svm.html) Seems it is developed for the multispectral raster classification or multi band raster classification.. I've just tried for some single band raster, just to check and actually got an error related to file mo...
63,688
Is it possible to perform a vector machine classification of raster image using the ArcGIS software package. This supervised classification method is available in the ENVI software but not for ArcGIS. I have integrated the ENVI toolbox into my ArcCatalog Toolbox set. While the ENVI toolbox offers me the tools to perfo...
2013/06/17
[ "https://gis.stackexchange.com/questions/63688", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/19175/" ]
You may use this tool in ArcGIS: [Train Support Vector Machine Classifier](http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/train-support-vector-machine-classifier.htm) > > Generate an Esri classifier definition (.ecd) file using the Support > Vector Machine (SVM) classification definition. ...
It is possible since version 10.3. Although it requires a Spatial Analyst License <http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/train-support-vector-machine-classifier.htm>
63,688
Is it possible to perform a vector machine classification of raster image using the ArcGIS software package. This supervised classification method is available in the ENVI software but not for ArcGIS. I have integrated the ENVI toolbox into my ArcCatalog Toolbox set. While the ENVI toolbox offers me the tools to perfo...
2013/06/17
[ "https://gis.stackexchange.com/questions/63688", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/19175/" ]
The SVM model is a fairly complex with no direct implementation in ArcGIS. You can access the model using the [Python machine learning library (PyML)](http://pyml.sourceforge.net/) and script a solution within ArcGIS. Although, I have no idea how this Python library will handle array data. You will likely have to coerc...
There is an ArcgisToolbox built for Arcgis 10.1 freely available [here](http://awehmann.nfshost.com/svm.html) Seems it is developed for the multispectral raster classification or multi band raster classification.. I've just tried for some single band raster, just to check and actually got an error related to file mo...
63,688
Is it possible to perform a vector machine classification of raster image using the ArcGIS software package. This supervised classification method is available in the ENVI software but not for ArcGIS. I have integrated the ENVI toolbox into my ArcCatalog Toolbox set. While the ENVI toolbox offers me the tools to perfo...
2013/06/17
[ "https://gis.stackexchange.com/questions/63688", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/19175/" ]
It is possible since version 10.3. Although it requires a Spatial Analyst License <http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/train-support-vector-machine-classifier.htm>
There is an ArcgisToolbox built for Arcgis 10.1 freely available [here](http://awehmann.nfshost.com/svm.html) Seems it is developed for the multispectral raster classification or multi band raster classification.. I've just tried for some single band raster, just to check and actually got an error related to file mo...
25,541,730
i need paginate a posts from my data base, i write the next query: ``` SELECT posts.ID, posts.date, comments.name, comments.value FROM posts INNER JOIN comments ON comments.ID = posts.ID INNER JOIN relations ON relations.ID = posts.ID WHERE type_rel=1 AND status_post=1 AND LIMIT 0,10 ``` The problem i...
2014/08/28
[ "https://Stackoverflow.com/questions/25541730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3858688/" ]
You can use a subquery to limit the result set and then join: ``` SELECT posts.ID, posts.date, comments.name, comments.value FROM (SELECT * FROM posts WHERE status_post = 1 LIMIT 0,10) posts LEFT JOIN comments ON comments.ID = posts.ID LEFT JOIN relations ON relations.ID = posts.ID AND rela...
You can limit only the rows returned from the posts table ``` SELECT posts.ID, posts.date, comments.name, comments.value FROM (select * from posts limit 0,10) posts INNER JOIN comments ON comments.ID = posts.ID INNER JOIN relations ON relations.ID = posts.ID WHERE type_rel=1 AND status_post=1 ```
25,541,730
i need paginate a posts from my data base, i write the next query: ``` SELECT posts.ID, posts.date, comments.name, comments.value FROM posts INNER JOIN comments ON comments.ID = posts.ID INNER JOIN relations ON relations.ID = posts.ID WHERE type_rel=1 AND status_post=1 AND LIMIT 0,10 ``` The problem i...
2014/08/28
[ "https://Stackoverflow.com/questions/25541730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3858688/" ]
You can use a subquery to limit the result set and then join: ``` SELECT posts.ID, posts.date, comments.name, comments.value FROM (SELECT * FROM posts WHERE status_post = 1 LIMIT 0,10) posts LEFT JOIN comments ON comments.ID = posts.ID LEFT JOIN relations ON relations.ID = posts.ID AND rela...
You can try: ``` SELECT a.ID, a.date, a.name, a.value FROM ( SELECT posts.ID, posts.date, comments.name, comments.value, @post_rank := IF(@current_post = posts.ID, @post_rank + 1, 1) AS post_rank, @current_post := posts.ID FROM posts INNER JOIN comments ON comments.ID = posts.ID INNER JOIN relations ...
12,975,456
So, I'm new to programming and my question is: Is it considered a **bad** practice to use an exception handler to override error-message-behaviour of default methods of a programming language with custom functionality? I mean, is it ethically correct to use something like this (Python): ``` def index(p, val): try...
2012/10/19
[ "https://Stackoverflow.com/questions/12975456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I think that doing something like this is OK as long as you use function names which make it clear that the user isn't using a built-in. If the user thinks they're using a builtin and all of a sudden `index` returns -1, imagine the bugs that could happen ... They do: ``` a[index(a,'foo')] ``` and all of a sudden the...
This is perfectly fine but depends on what kind of condition you are checking. It is the developers responsibility to check for these conditions. Some exceptions are fatal for the program and some may not. All depends on the context of the method.
12,975,456
So, I'm new to programming and my question is: Is it considered a **bad** practice to use an exception handler to override error-message-behaviour of default methods of a programming language with custom functionality? I mean, is it ethically correct to use something like this (Python): ``` def index(p, val): try...
2012/10/19
[ "https://Stackoverflow.com/questions/12975456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I think that doing something like this is OK as long as you use function names which make it clear that the user isn't using a built-in. If the user thinks they're using a builtin and all of a sudden `index` returns -1, imagine the bugs that could happen ... They do: ``` a[index(a,'foo')] ``` and all of a sudden the...
With a language like python, I would argue it is much better to give a custom error message for the function than the generic `ValueError` exception. However, for your own applications, having this functionality inside your methods can make code easier to read and maintain. For other languages, the same is true, but y...
12,975,456
So, I'm new to programming and my question is: Is it considered a **bad** practice to use an exception handler to override error-message-behaviour of default methods of a programming language with custom functionality? I mean, is it ethically correct to use something like this (Python): ``` def index(p, val): try...
2012/10/19
[ "https://Stackoverflow.com/questions/12975456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I think that doing something like this is OK as long as you use function names which make it clear that the user isn't using a built-in. If the user thinks they're using a builtin and all of a sudden `index` returns -1, imagine the bugs that could happen ... They do: ``` a[index(a,'foo')] ``` and all of a sudden the...
If you know where exactly your errors will occur and the cause of error too, then there is nothing wrong with such kind of handling. Becaues you are just taking appropriate action for something wrong happening, that you know can happen . So, `For E.g`: - If you are trying to divide two numbers, and you know that `if t...
16,614,961
I'm running Capybara tests, and I'm stuck on the following test: ``` page.all("input").each do |s| if s.value == "E" choose(s) end end click_button "Save answers" end ``` I have over 500 radio buttons, and each are assigned a value from A-E. I keep getting the error: ``` Unable to find radio button...
2013/05/17
[ "https://Stackoverflow.com/questions/16614961", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1179716/" ]
I've actually found out my problem: The line `choose(s)` was the line that was giving me the problem. `s` is a radio button, and Capybara expected the id of the radio as opposed to the actual radio button itself. Once I passed in `s[:id]` instead of `s`, it worked!
You used radio button wrongly. Radio button means only one radio is valid. So you can only choose one, instead of several ones with value "E" If you need multi select, you should use multi checkbox.
16,614,961
I'm running Capybara tests, and I'm stuck on the following test: ``` page.all("input").each do |s| if s.value == "E" choose(s) end end click_button "Save answers" end ``` I have over 500 radio buttons, and each are assigned a value from A-E. I keep getting the error: ``` Unable to find radio button...
2013/05/17
[ "https://Stackoverflow.com/questions/16614961", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1179716/" ]
I've actually found out my problem: The line `choose(s)` was the line that was giving me the problem. `s` is a radio button, and Capybara expected the id of the radio as opposed to the actual radio button itself. Once I passed in `s[:id]` instead of `s`, it worked!
You could try: ``` all('input[value=E]').map(&:choose) ``` I don't remember exactly, if that does not work try with click: ``` all('input[value=E]').map(&:click) ``` If that does not work either try with double quotes inside selector: ``` all('input[value="E"]').map(&:click) ``` It should work with `each` too....
38,860,609
I'm working a dropdown menu, but I'm having a problem with the size of inner `ul` I trying to make it the same size as the parent `li`. Can somebody tell me what am i doing wrong? [Here](https://jsfiddle.net/o9kkb1er/1/) is a demo of my code. ```css * { margin: 0px; padding: 0px; } ul.topMenu { background...
2016/08/09
[ "https://Stackoverflow.com/questions/38860609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4208719/" ]
The `ul` element has always (by default) some padding. So you should add: ``` ul { padding: 0px; } ``` Also, if you want the `li`elements to be equal width, you should set some fixed width like: ``` ul li { width: 300px; } ```
You are experiencing 40px of unexpected padding added by webkit. You need to negate this styling by adding your own. for instance one way to mitigate this issue would be to add a style="padding:0;" to the ul in question. [Screenshot](http://i.stack.imgur.com/nduT8.png)
38,860,609
I'm working a dropdown menu, but I'm having a problem with the size of inner `ul` I trying to make it the same size as the parent `li`. Can somebody tell me what am i doing wrong? [Here](https://jsfiddle.net/o9kkb1er/1/) is a demo of my code. ```css * { margin: 0px; padding: 0px; } ul.topMenu { background...
2016/08/09
[ "https://Stackoverflow.com/questions/38860609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4208719/" ]
**Notes:** * In order to make your **`ul`** element as wide as its **`li`** parent, you have to change its position to **`position: relative`**, so that you can use **`width: 100%`**. * Then you have to remove **`overflow: hidden`** from **`ul.topMenu`** and set a fixed height. Setting **`height: 42px`** will do fine....
The `ul` element has always (by default) some padding. So you should add: ``` ul { padding: 0px; } ``` Also, if you want the `li`elements to be equal width, you should set some fixed width like: ``` ul li { width: 300px; } ```
38,860,609
I'm working a dropdown menu, but I'm having a problem with the size of inner `ul` I trying to make it the same size as the parent `li`. Can somebody tell me what am i doing wrong? [Here](https://jsfiddle.net/o9kkb1er/1/) is a demo of my code. ```css * { margin: 0px; padding: 0px; } ul.topMenu { background...
2016/08/09
[ "https://Stackoverflow.com/questions/38860609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4208719/" ]
It is better to read more about positions , if we talk about your code you need to give '`position:relative`' to the main `<li>` which is gonna be dropdown, and when its child I mean `<ul>` gets `position:absolute` it is gonna change in order to its relative parent. Giving `width:100%` will solve your problem.
You are experiencing 40px of unexpected padding added by webkit. You need to negate this styling by adding your own. for instance one way to mitigate this issue would be to add a style="padding:0;" to the ul in question. [Screenshot](http://i.stack.imgur.com/nduT8.png)
38,860,609
I'm working a dropdown menu, but I'm having a problem with the size of inner `ul` I trying to make it the same size as the parent `li`. Can somebody tell me what am i doing wrong? [Here](https://jsfiddle.net/o9kkb1er/1/) is a demo of my code. ```css * { margin: 0px; padding: 0px; } ul.topMenu { background...
2016/08/09
[ "https://Stackoverflow.com/questions/38860609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4208719/" ]
**Notes:** * In order to make your **`ul`** element as wide as its **`li`** parent, you have to change its position to **`position: relative`**, so that you can use **`width: 100%`**. * Then you have to remove **`overflow: hidden`** from **`ul.topMenu`** and set a fixed height. Setting **`height: 42px`** will do fine....
You are experiencing 40px of unexpected padding added by webkit. You need to negate this styling by adding your own. for instance one way to mitigate this issue would be to add a style="padding:0;" to the ul in question. [Screenshot](http://i.stack.imgur.com/nduT8.png)
38,860,609
I'm working a dropdown menu, but I'm having a problem with the size of inner `ul` I trying to make it the same size as the parent `li`. Can somebody tell me what am i doing wrong? [Here](https://jsfiddle.net/o9kkb1er/1/) is a demo of my code. ```css * { margin: 0px; padding: 0px; } ul.topMenu { background...
2016/08/09
[ "https://Stackoverflow.com/questions/38860609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4208719/" ]
**Notes:** * In order to make your **`ul`** element as wide as its **`li`** parent, you have to change its position to **`position: relative`**, so that you can use **`width: 100%`**. * Then you have to remove **`overflow: hidden`** from **`ul.topMenu`** and set a fixed height. Setting **`height: 42px`** will do fine....
It is better to read more about positions , if we talk about your code you need to give '`position:relative`' to the main `<li>` which is gonna be dropdown, and when its child I mean `<ul>` gets `position:absolute` it is gonna change in order to its relative parent. Giving `width:100%` will solve your problem.
60,403,414
I have the following field defined on my entity class: ``` @Column @FieldBridge(impl = BigDecimalNumericFieldBridge.class) @Fields( @Field(), @Field(name = "test_sort", analyze = Analyze.NO, store = Store.NO, index = Index.NO)) @NumericField @SortableField(forField = "test_sort") val test: BigDecimal ``` My BigD...
2020/02/25
[ "https://Stackoverflow.com/questions/60403414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/738289/" ]
*Is this what you are trying to do?* ``` Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim Select_Folder As folder Dim message As String message = "Do you want to save the letter to a folder?" Dim header As String header = "Save" If TypeName(Item) = "MailI...
Firstly, do not hardcode the store index (1). Access it by name. Secondly, SaveSentMessageFolder can only be set to a folder from the same store where the message is residing.
70,873,615
I was just wondering how I could get the size of the display in HaxeFlixel (usually 1920,1080/1280,720). This is not to be confused with the window size.
2022/01/27
[ "https://Stackoverflow.com/questions/70873615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17247662/" ]
You could use <https://api.openfl.org/openfl/system/Capabilities.html#screenResolutionX> / <https://api.openfl.org/openfl/system/Capabilities.html#screenResolutionY> to obtain resolution.
You should be able to see this in your Main.hx file. It should look something like this: ```java class Main extends Sprite { public function new() { super(); addChild(new FlxGame(1920, 1080, GameState, true)); } } ```
49,563,853
I have a list of `div`s, and I'm trying to get certain info in each of them. The `div` classes are the same so I'm not sure how I would go about this. I have tried `for` loops but have been getting various errors Code to get list of divs: ``` import requests from bs4 import BeautifulSoup import re url = 'https://sn...
2018/03/29
[ "https://Stackoverflow.com/questions/49563853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9571737/" ]
`<a>` is a sibling of `<pre>`, not the text(). You can use `preceding::a` instead (and similarly for `following`).
A solution to what you have asked using re: **Note:** As others have mentioned in the comments this may not be the best solution - you are better to use a proper parser. ``` import re source_code ='<div class="text"><a name="dst100030"></a><pre id="p73" class="P"><span class="blk">│Лабораторные методы исследования│<...
6,447,361
What does "baseline" refer to when used in the context of a relative layout? Simple question, probably, but the documentation and google offer no hints.
2011/06/22
[ "https://Stackoverflow.com/questions/6447361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/295675/" ]
The term [baseline comes from typography](http://en.wikipedia.org/wiki/Baseline_%28typography%29). It's the invisible line letters in text sit on. For example, imagine you put two `TextView` elements next to each other. You give the second `TextView` a big padding (say 20dp). If you add `layout_alignBaseline` to the s...
Here is a visual explanation that might clarify Cristian's answer: ``` <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/text1" android:text="Lorem" android:background="@android:color/holo_blue_light" android:...
1,076,161
I have downloaded and installed membership starter kit from codeplex. Now when I create new project I don't see MVC mebership starter kit in list of templates. How do I create new project based on this starter kit ?
2009/07/02
[ "https://Stackoverflow.com/questions/1076161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123941/" ]
That doesn't look like it's been updated since preview 5... The default ASP.NET MVC project that is created when you install the release version of [ASP.NET MVC](http://www.asp.net/MVC/download/) includes integration with the membership system.
You can make a copy of that Starter Kits code base into a new trunk/src directory. Then open the solution and hack away! That is the normal process any ways.
1,076,161
I have downloaded and installed membership starter kit from codeplex. Now when I create new project I don't see MVC mebership starter kit in list of templates. How do I create new project based on this starter kit ?
2009/07/02
[ "https://Stackoverflow.com/questions/1076161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123941/" ]
Grab the new release that works with MVC 1.0
You can make a copy of that Starter Kits code base into a new trunk/src directory. Then open the solution and hack away! That is the normal process any ways.
14,790,808
Suppose this data set: ``` household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1 ``` I want to create a new field indicating whether or not the household...
2013/02/09
[ "https://Stackoverflow.com/questions/14790808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1663986/" ]
``` ave(t$age_group, t$household_id, FUN=function(x) 1 %in% x) [1] 0 0 0 1 1 1 1 > t$age_group1 <- with(t, ave(age_group, household_id, FUN=function(x) 1 %in% x)) > t household_id person_id age_group age_group1 1 1 1 5 0 2 1 2 3 0 3 1...
Aftere reading your data ``` dat <- read.table(text = 'household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1',head=T) ``` Using `transform` with `ave`(si...
14,790,808
Suppose this data set: ``` household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1 ``` I want to create a new field indicating whether or not the household...
2013/02/09
[ "https://Stackoverflow.com/questions/14790808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1663986/" ]
Aftere reading your data ``` dat <- read.table(text = 'household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1',head=T) ``` Using `transform` with `ave`(si...
i prefer `sql` for this kinda stuff, since lots of people already know it, it works across languages (sas has `proc sql;`), and it's terribly intuitive :) ``` # read your data into an object named `x` # load the sqldf library library(sqldf) # create a new household-level table that contains just # the household id a...
14,790,808
Suppose this data set: ``` household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1 ``` I want to create a new field indicating whether or not the household...
2013/02/09
[ "https://Stackoverflow.com/questions/14790808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1663986/" ]
Aftere reading your data ``` dat <- read.table(text = 'household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1',head=T) ``` Using `transform` with `ave`(si...
here's another option that doesn't involve installing any packages ;) ``` # read your data frame into `x` x <- read.table( text = "household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 ...
14,790,808
Suppose this data set: ``` household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1 ``` I want to create a new field indicating whether or not the household...
2013/02/09
[ "https://Stackoverflow.com/questions/14790808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1663986/" ]
``` ave(t$age_group, t$household_id, FUN=function(x) 1 %in% x) [1] 0 0 0 1 1 1 1 > t$age_group1 <- with(t, ave(age_group, household_id, FUN=function(x) 1 %in% x)) > t household_id person_id age_group age_group1 1 1 1 5 0 2 1 2 3 0 3 1...
A `plyr` solution: ``` require(plyr) df <- structure(list(household_id = c(1L, 1L, 1L, 2L, 2L, 2L, 2L), person_id = c(1L, 2L, 3L, 1L, 2L, 3L, 4L), age_group = c(5L, 3L, 2L, 3L, 5L, 1L, 1L)), .Names = c("household_id", "person_id", "age_group"), class = "data.frame", row.names = c(NA, -7L)) ddply(df, .(household_id...
14,790,808
Suppose this data set: ``` household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1 ``` I want to create a new field indicating whether or not the household...
2013/02/09
[ "https://Stackoverflow.com/questions/14790808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1663986/" ]
A `plyr` solution: ``` require(plyr) df <- structure(list(household_id = c(1L, 1L, 1L, 2L, 2L, 2L, 2L), person_id = c(1L, 2L, 3L, 1L, 2L, 3L, 4L), age_group = c(5L, 3L, 2L, 3L, 5L, 1L, 1L)), .Names = c("household_id", "person_id", "age_group"), class = "data.frame", row.names = c(NA, -7L)) ddply(df, .(household_id...
i prefer `sql` for this kinda stuff, since lots of people already know it, it works across languages (sas has `proc sql;`), and it's terribly intuitive :) ``` # read your data into an object named `x` # load the sqldf library library(sqldf) # create a new household-level table that contains just # the household id a...
14,790,808
Suppose this data set: ``` household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1 ``` I want to create a new field indicating whether or not the household...
2013/02/09
[ "https://Stackoverflow.com/questions/14790808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1663986/" ]
A `plyr` solution: ``` require(plyr) df <- structure(list(household_id = c(1L, 1L, 1L, 2L, 2L, 2L, 2L), person_id = c(1L, 2L, 3L, 1L, 2L, 3L, 4L), age_group = c(5L, 3L, 2L, 3L, 5L, 1L, 1L)), .Names = c("household_id", "person_id", "age_group"), class = "data.frame", row.names = c(NA, -7L)) ddply(df, .(household_id...
here's another option that doesn't involve installing any packages ;) ``` # read your data frame into `x` x <- read.table( text = "household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 ...
14,790,808
Suppose this data set: ``` household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1 ``` I want to create a new field indicating whether or not the household...
2013/02/09
[ "https://Stackoverflow.com/questions/14790808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1663986/" ]
``` ave(t$age_group, t$household_id, FUN=function(x) 1 %in% x) [1] 0 0 0 1 1 1 1 > t$age_group1 <- with(t, ave(age_group, household_id, FUN=function(x) 1 %in% x)) > t household_id person_id age_group age_group1 1 1 1 5 0 2 1 2 3 0 3 1...
i prefer `sql` for this kinda stuff, since lots of people already know it, it works across languages (sas has `proc sql;`), and it's terribly intuitive :) ``` # read your data into an object named `x` # load the sqldf library library(sqldf) # create a new household-level table that contains just # the household id a...
14,790,808
Suppose this data set: ``` household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 1 2 4 1 ``` I want to create a new field indicating whether or not the household...
2013/02/09
[ "https://Stackoverflow.com/questions/14790808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1663986/" ]
``` ave(t$age_group, t$household_id, FUN=function(x) 1 %in% x) [1] 0 0 0 1 1 1 1 > t$age_group1 <- with(t, ave(age_group, household_id, FUN=function(x) 1 %in% x)) > t household_id person_id age_group age_group1 1 1 1 5 0 2 1 2 3 0 3 1...
here's another option that doesn't involve installing any packages ;) ``` # read your data frame into `x` x <- read.table( text = "household_id person_id age_group 1 1 5 1 2 3 1 3 2 2 1 3 2 2 5 2 3 ...
12,399,674
I have a table that contains date/time column with values like `9/11/2012 11:50:08 AM`, `9/11/2012 4:06:19 PM`, `10/11/2012 4:06:19 PM` How can I retrieve records that date on `'9/11/2012'`?
2012/09/13
[ "https://Stackoverflow.com/questions/12399674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1667530/" ]
This will return in `MM/dd/yyyy` ``` SELECT CONVERT(DATETIME, '9/11/2012 11:50:08 AM', 101); ``` To get in `dd/MM/yyyy` try this: ``` SELECT CONVERT(DATETIME, '9/11/2012 11:50:08 AM', 103); ``` For more see [CAST and CONVERT (Transact-SQL)](http://msdn.microsoft.com/en-us/library/ms187928.aspx) and [How to conver...
I assume that your column is a `datetime` column and you want to fetch all rows that is on a specific date. In SQL Server 2008 you can cast your `datetime` column to date. ``` select * from YourTable where cast(DateTimeCol as date) = '2012-09-11' ``` I would recommend that you use the dateformat `yyyy-mm-dd` for da...
12,399,674
I have a table that contains date/time column with values like `9/11/2012 11:50:08 AM`, `9/11/2012 4:06:19 PM`, `10/11/2012 4:06:19 PM` How can I retrieve records that date on `'9/11/2012'`?
2012/09/13
[ "https://Stackoverflow.com/questions/12399674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1667530/" ]
This will return in `MM/dd/yyyy` ``` SELECT CONVERT(DATETIME, '9/11/2012 11:50:08 AM', 101); ``` To get in `dd/MM/yyyy` try this: ``` SELECT CONVERT(DATETIME, '9/11/2012 11:50:08 AM', 103); ``` For more see [CAST and CONVERT (Transact-SQL)](http://msdn.microsoft.com/en-us/library/ms187928.aspx) and [How to conver...
``` select * from table where convert(date,date_col)='2012-09-11' ```
12,399,674
I have a table that contains date/time column with values like `9/11/2012 11:50:08 AM`, `9/11/2012 4:06:19 PM`, `10/11/2012 4:06:19 PM` How can I retrieve records that date on `'9/11/2012'`?
2012/09/13
[ "https://Stackoverflow.com/questions/12399674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1667530/" ]
I assume that your column is a `datetime` column and you want to fetch all rows that is on a specific date. In SQL Server 2008 you can cast your `datetime` column to date. ``` select * from YourTable where cast(DateTimeCol as date) = '2012-09-11' ``` I would recommend that you use the dateformat `yyyy-mm-dd` for da...
``` select * from table where convert(date,date_col)='2012-09-11' ```
11,283,904
How do you echo only the first line of print print\_r? More info: I have this PHP code: ``` preg_match_all('/MbrDtlMain.php\?([^ ]+)>/i', $string, $matches); foreach(end($matches) as $key=> $value){ print print_r($value, 1).'<br>'; } ``` That results in: ``` 12567682 12764252 12493678 14739908 ``` (or other...
2012/07/01
[ "https://Stackoverflow.com/questions/11283904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1460839/" ]
If the keys in $matches are always numeric keys, this code should be enough: ``` echo $matches[0]; ``` Otherwise, try this code: ``` $keys = array_keys($matches); echo $matches[array_shift($keys)]; ``` $keys will contain all keys of $matches. array\_shift will return the first value of $keys (the first key). ...
``` preg_match_all('/MbrDtlMain.php\?([^ ]+)>/i', $string, $matches); $i=0; foreach(end($matches) as $key=> $value){ $i++; if ($i == 1) { echo $value."<br />"; } } ``` This starts with the variable `$i` which increases by 1 for each match. If `$i == 1`, then it will echo the `$value`.
11,283,904
How do you echo only the first line of print print\_r? More info: I have this PHP code: ``` preg_match_all('/MbrDtlMain.php\?([^ ]+)>/i', $string, $matches); foreach(end($matches) as $key=> $value){ print print_r($value, 1).'<br>'; } ``` That results in: ``` 12567682 12764252 12493678 14739908 ``` (or other...
2012/07/01
[ "https://Stackoverflow.com/questions/11283904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1460839/" ]
If I understood what you're trying to do, just adding a `break;` statement after outputting the first value should be enough: ``` foreach(end($matches) as $key=> $value){ print print_r($value, true).'<br>'; // print_r() expects true, not 1 break; } ```
If the keys in $matches are always numeric keys, this code should be enough: ``` echo $matches[0]; ``` Otherwise, try this code: ``` $keys = array_keys($matches); echo $matches[array_shift($keys)]; ``` $keys will contain all keys of $matches. array\_shift will return the first value of $keys (the first key). ...
11,283,904
How do you echo only the first line of print print\_r? More info: I have this PHP code: ``` preg_match_all('/MbrDtlMain.php\?([^ ]+)>/i', $string, $matches); foreach(end($matches) as $key=> $value){ print print_r($value, 1).'<br>'; } ``` That results in: ``` 12567682 12764252 12493678 14739908 ``` (or other...
2012/07/01
[ "https://Stackoverflow.com/questions/11283904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1460839/" ]
If I understood what you're trying to do, just adding a `break;` statement after outputting the first value should be enough: ``` foreach(end($matches) as $key=> $value){ print print_r($value, true).'<br>'; // print_r() expects true, not 1 break; } ```
``` preg_match_all('/MbrDtlMain.php\?([^ ]+)>/i', $string, $matches); $i=0; foreach(end($matches) as $key=> $value){ $i++; if ($i == 1) { echo $value."<br />"; } } ``` This starts with the variable `$i` which increases by 1 for each match. If `$i == 1`, then it will echo the `$value`.
32,997,587
I have a problem with python. I read 2 manuals to learn the language (Python for kids and Learn Python the Hard way) now I am trying to understand how the heck OOP works and how to use it. I wanted to create a simple script just to learn how to handle classes and methods: The script should allow the user to see what ...
2015/10/07
[ "https://Stackoverflow.com/questions/32997587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3722818/" ]
You are trying to remove a *new* `Item()` instance from the list: ``` def remove_item(self,name, qty='0'): #from the items list remove Item(name)) self.items.remove(Item(name)) ``` This won't work without additional work; `Item(name)` may have the same name, but it is not equal to any of the objects already ...
You are adding an `Item('orange')` and then you are trying to remove another `Item('orange')`. These are two calls to `Item()` class constructor resulting in two different instances. The first one is in the list, but the second one is not. You cannot remove a different orange than the one you've put there. This is the...
995,077
DP1 displaying correctly: [![DP1 displaying correctly](https://i.stack.imgur.com/5ir7P.png)](https://i.stack.imgur.com/5ir7P.png) eDP1 with corrupt display: [![eDP1 with corrupt display](https://i.stack.imgur.com/VS9aR.png)](https://i.stack.imgur.com/VS9aR.png) My new machine has two monitors connected directly to ...
2018/01/12
[ "https://askubuntu.com/questions/995077", "https://askubuntu.com", "https://askubuntu.com/users/10055/" ]
Try this: ``` mysqldump -u root -p --all-databases | zip /var/www/html/db-$(date +\%F-\%T).zip ``` You will only have one file into the zip archive having **-** as file name.
You can try this ``` mysqldump -u root -p --all-databases | zip /var/www/html/db-$(date +\%F-\%T).zip - ```