qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
This solution might not apply to all cases, as the answers provided in previous posts are correct, but were not the solution to my issue. This answer assumes the following: 1. the custom solution assemblies are all changed in checked in and are correctly tagged and built. 2. The build controller has been pointed at th...
I encountered the same issue after a reboot of our TFS 2012 build server. A CI job that was running perfectly fine stopped working with the mentioned TF215097 error, it was unable to find a custom activity. A comment on this page (<https://social.msdn.microsoft.com/Forums/vstudio/en-US/479449e1-5c02-4744-b620-3bba6403...
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
If you want to specify assemblies that contain custom code activities you've written you need to do the following: 1. Build you custom activities into your workflow. 2. Make sure your xmlns at the top is defined correctly: xmlns:local="clr-namespace:BuildTasks;assembly=BuildTasks" 3. Make sure the tags in the XAML for...
I had this exact same problem. The reason was that I had compiled the library with the custom activities against the x86 platform and the Build Controller was running off of a 64-bit Windows 2008 VM. Switching the target platform to AnyCPU allowed the build controller to immediately utilize the library without having t...
2,910,983
For the Build Process in TFS 2010 I've created a library containing some custom code activities. In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control....
2010/05/26
[ "https://Stackoverflow.com/questions/2910983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267122/" ]
As mentioned by Rhapsody on June 2 2010, the GAC can be used. However it needs to be noted that if you do use the GAC, you need to stop and restart the build service, so that it re-scans the GAC, hence picking up your DLL. I had initially registered my DLL in the GAC, and when I kicked off a build that pointed to a wo...
Since no answer is given and I haven't found any fix, I decided to put in the GAC now. That works as well. :)
331,607
I use `rsync` as follows: > > rsync -a --backup --suffix="."$(date +"%Y%m%d%H%M") *source backups* > > > to dump the whole of folder *source* into the folder *backups*, with the additional feature that if I modify some file *foo* in *source*, the old version of *foo* in backups will be renamed with a date suffix ...
2013/08/12
[ "https://askubuntu.com/questions/331607", "https://askubuntu.com", "https://askubuntu.com/users/172652/" ]
Adding the `--backup-dir` option should do what you're looking for: > > --backup-dir=DIR > In combination with the --backup option, this tells rsync to store all backups in the specified directory on the receiving side. This can be used for incremental backups. You can additionally specify a backup suffix using the ...
For incremental rsync backup used rsnapshot tool. Sample rsnapshot.conf ``` snapshot_root /backup cmd_cp /bin/cp cmd_rm /bin/rm cmd_rsync /usr/bin/rsync cmd_ssh /usr/bin/ssh cmd_logger /usr/bin/logger cmd_du /usr/bin/du cmd_rsnapshot_diff /usr/bin/rsnapshot-diff re...
331,607
I use `rsync` as follows: > > rsync -a --backup --suffix="."$(date +"%Y%m%d%H%M") *source backups* > > > to dump the whole of folder *source* into the folder *backups*, with the additional feature that if I modify some file *foo* in *source*, the old version of *foo* in backups will be renamed with a date suffix ...
2013/08/12
[ "https://askubuntu.com/questions/331607", "https://askubuntu.com", "https://askubuntu.com/users/172652/" ]
Add the `--delete` option to your `rsync` command. `--delete` tells rsync that when it sees a file that is in the destination but not the source, it should delete it from the destination - except since you are also using `--backup`, instead of deleting the file it will rename and/or move it, depending on whether you've...
For incremental rsync backup used rsnapshot tool. Sample rsnapshot.conf ``` snapshot_root /backup cmd_cp /bin/cp cmd_rm /bin/rm cmd_rsync /usr/bin/rsync cmd_ssh /usr/bin/ssh cmd_logger /usr/bin/logger cmd_du /usr/bin/du cmd_rsnapshot_diff /usr/bin/rsnapshot-diff re...
331,607
I use `rsync` as follows: > > rsync -a --backup --suffix="."$(date +"%Y%m%d%H%M") *source backups* > > > to dump the whole of folder *source* into the folder *backups*, with the additional feature that if I modify some file *foo* in *source*, the old version of *foo* in backups will be renamed with a date suffix ...
2013/08/12
[ "https://askubuntu.com/questions/331607", "https://askubuntu.com", "https://askubuntu.com/users/172652/" ]
Adding the `--backup-dir` option should do what you're looking for: > > --backup-dir=DIR > In combination with the --backup option, this tells rsync to store all backups in the specified directory on the receiving side. This can be used for incremental backups. You can additionally specify a backup suffix using the ...
Add the `--delete` option to your `rsync` command. `--delete` tells rsync that when it sees a file that is in the destination but not the source, it should delete it from the destination - except since you are also using `--backup`, instead of deleting the file it will rename and/or move it, depending on whether you've...
62,550,630
I have set up MediaPlayer to play list of music files from raw folder. This music player has pause and play buttons. the songs are listed using RecyclerView. My challenge is whenever i exit activity the activity, music continues to play without stopping automatically. Please help me i want the music player to stop on ...
2020/06/24
[ "https://Stackoverflow.com/questions/62550630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12233863/" ]
Create a method in the adapter : ``` public class CustomMusicAdapter extends RecyclerView.Adapter<MyViewHolder> implements Filterable { private Context context; private int layout; private ArrayList<Music> myArraylist; private ArrayList<Music> getUserModelListFiltered; private static MediaPlayer m...
Use interface with RecyclerView adapter, So that when you click on the play button you send id of raw file (eg : R.raw.o\_word\_that\_goes\_forth) in the interface and you can use comman media player in activity and now `onDistroy` method you can stop the media player.
186,520
On a number line of length `M`, where `0 < M <= 1,000,000,000`, you given `N` (`1 < N <= 100,000`) integer pairs of points. In each pair, the first point represents where an object is currently located, and the second point represents where an object should be moved. (Keep in mind the `second` point may be *smaller* th...
2013/02/10
[ "https://softwareengineering.stackexchange.com/questions/186520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81065/" ]
Suppose you are given these moves `(a, b), (c, d), (e, f), ...` then the minimum distance you have to travel is `abs(b - a) + abs(d - c) + abs(f - e) + ...` and the actual distance you travel is `abs(b - a) + abs(c - b) + abs(d - c) + abs(e - d) + ...`. Basically, given an array of moves the point is to minimize the...
May be I am missunderstanding the problem but what about the following: 1. Sort the pairs by the first number of the pair which is the current location 2. Move along the line swapping elements to their proper location (you have a temp variable) The fact that it is sorted guarantees that you don't go back and forth t...
186,520
On a number line of length `M`, where `0 < M <= 1,000,000,000`, you given `N` (`1 < N <= 100,000`) integer pairs of points. In each pair, the first point represents where an object is currently located, and the second point represents where an object should be moved. (Keep in mind the `second` point may be *smaller* th...
2013/02/10
[ "https://softwareengineering.stackexchange.com/questions/186520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81065/" ]
May be I am missunderstanding the problem but what about the following: 1. Sort the pairs by the first number of the pair which is the current location 2. Move along the line swapping elements to their proper location (you have a temp variable) The fact that it is sorted guarantees that you don't go back and forth t...
[This is the asymmetric traveling salesman problem](http://en.wikipedia.org/wiki/Traveling_salesman_problem). You can think of this as a graph. The edges will be each (start, finish) pair, one for each (0, start), and all other pairs of (finish, start). Assuming NP!=P, it will have an exponential expected running tim...
186,520
On a number line of length `M`, where `0 < M <= 1,000,000,000`, you given `N` (`1 < N <= 100,000`) integer pairs of points. In each pair, the first point represents where an object is currently located, and the second point represents where an object should be moved. (Keep in mind the `second` point may be *smaller* th...
2013/02/10
[ "https://softwareengineering.stackexchange.com/questions/186520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81065/" ]
1. If you're empty, start moving to the right. 2. Whenever you reach an object and you're empty, pick it up (duh) and move toward its destination. 3. Whenever you reach an object `a` and you're already carrying `b`, *always* choose whichever of the objects has the numerically smallest destination (furthest to the left)...
May be I am missunderstanding the problem but what about the following: 1. Sort the pairs by the first number of the pair which is the current location 2. Move along the line swapping elements to their proper location (you have a temp variable) The fact that it is sorted guarantees that you don't go back and forth t...
186,520
On a number line of length `M`, where `0 < M <= 1,000,000,000`, you given `N` (`1 < N <= 100,000`) integer pairs of points. In each pair, the first point represents where an object is currently located, and the second point represents where an object should be moved. (Keep in mind the `second` point may be *smaller* th...
2013/02/10
[ "https://softwareengineering.stackexchange.com/questions/186520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81065/" ]
Suppose you are given these moves `(a, b), (c, d), (e, f), ...` then the minimum distance you have to travel is `abs(b - a) + abs(d - c) + abs(f - e) + ...` and the actual distance you travel is `abs(b - a) + abs(c - b) + abs(d - c) + abs(e - d) + ...`. Basically, given an array of moves the point is to minimize the...
[This is the asymmetric traveling salesman problem](http://en.wikipedia.org/wiki/Traveling_salesman_problem). You can think of this as a graph. The edges will be each (start, finish) pair, one for each (0, start), and all other pairs of (finish, start). Assuming NP!=P, it will have an exponential expected running tim...
186,520
On a number line of length `M`, where `0 < M <= 1,000,000,000`, you given `N` (`1 < N <= 100,000`) integer pairs of points. In each pair, the first point represents where an object is currently located, and the second point represents where an object should be moved. (Keep in mind the `second` point may be *smaller* th...
2013/02/10
[ "https://softwareengineering.stackexchange.com/questions/186520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81065/" ]
Suppose you are given these moves `(a, b), (c, d), (e, f), ...` then the minimum distance you have to travel is `abs(b - a) + abs(d - c) + abs(f - e) + ...` and the actual distance you travel is `abs(b - a) + abs(c - b) + abs(d - c) + abs(e - d) + ...`. Basically, given an array of moves the point is to minimize the...
My inclination as to an algorithm which is basically greedy: Build a list of points that need to be moved. Since optimizing this isn't part of the required problem I'm not going to worry about organizing it. ``` while !Done if CartIsEmpty() FindClosestObjectToMove() MoveToObject() LoadCart(...
186,520
On a number line of length `M`, where `0 < M <= 1,000,000,000`, you given `N` (`1 < N <= 100,000`) integer pairs of points. In each pair, the first point represents where an object is currently located, and the second point represents where an object should be moved. (Keep in mind the `second` point may be *smaller* th...
2013/02/10
[ "https://softwareengineering.stackexchange.com/questions/186520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81065/" ]
1. If you're empty, start moving to the right. 2. Whenever you reach an object and you're empty, pick it up (duh) and move toward its destination. 3. Whenever you reach an object `a` and you're already carrying `b`, *always* choose whichever of the objects has the numerically smallest destination (furthest to the left)...
Suppose you are given these moves `(a, b), (c, d), (e, f), ...` then the minimum distance you have to travel is `abs(b - a) + abs(d - c) + abs(f - e) + ...` and the actual distance you travel is `abs(b - a) + abs(c - b) + abs(d - c) + abs(e - d) + ...`. Basically, given an array of moves the point is to minimize the...
186,520
On a number line of length `M`, where `0 < M <= 1,000,000,000`, you given `N` (`1 < N <= 100,000`) integer pairs of points. In each pair, the first point represents where an object is currently located, and the second point represents where an object should be moved. (Keep in mind the `second` point may be *smaller* th...
2013/02/10
[ "https://softwareengineering.stackexchange.com/questions/186520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81065/" ]
My inclination as to an algorithm which is basically greedy: Build a list of points that need to be moved. Since optimizing this isn't part of the required problem I'm not going to worry about organizing it. ``` while !Done if CartIsEmpty() FindClosestObjectToMove() MoveToObject() LoadCart(...
[This is the asymmetric traveling salesman problem](http://en.wikipedia.org/wiki/Traveling_salesman_problem). You can think of this as a graph. The edges will be each (start, finish) pair, one for each (0, start), and all other pairs of (finish, start). Assuming NP!=P, it will have an exponential expected running tim...
186,520
On a number line of length `M`, where `0 < M <= 1,000,000,000`, you given `N` (`1 < N <= 100,000`) integer pairs of points. In each pair, the first point represents where an object is currently located, and the second point represents where an object should be moved. (Keep in mind the `second` point may be *smaller* th...
2013/02/10
[ "https://softwareengineering.stackexchange.com/questions/186520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81065/" ]
1. If you're empty, start moving to the right. 2. Whenever you reach an object and you're empty, pick it up (duh) and move toward its destination. 3. Whenever you reach an object `a` and you're already carrying `b`, *always* choose whichever of the objects has the numerically smallest destination (furthest to the left)...
[This is the asymmetric traveling salesman problem](http://en.wikipedia.org/wiki/Traveling_salesman_problem). You can think of this as a graph. The edges will be each (start, finish) pair, one for each (0, start), and all other pairs of (finish, start). Assuming NP!=P, it will have an exponential expected running tim...
186,520
On a number line of length `M`, where `0 < M <= 1,000,000,000`, you given `N` (`1 < N <= 100,000`) integer pairs of points. In each pair, the first point represents where an object is currently located, and the second point represents where an object should be moved. (Keep in mind the `second` point may be *smaller* th...
2013/02/10
[ "https://softwareengineering.stackexchange.com/questions/186520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/81065/" ]
1. If you're empty, start moving to the right. 2. Whenever you reach an object and you're empty, pick it up (duh) and move toward its destination. 3. Whenever you reach an object `a` and you're already carrying `b`, *always* choose whichever of the objects has the numerically smallest destination (furthest to the left)...
My inclination as to an algorithm which is basically greedy: Build a list of points that need to be moved. Since optimizing this isn't part of the required problem I'm not going to worry about organizing it. ``` while !Done if CartIsEmpty() FindClosestObjectToMove() MoveToObject() LoadCart(...
15,284,765
I'm currently working on a directed graph data structure in C++ (no Boost GL for this project). The primary application will be identifying connected components and sinks. The graphs are expected to be sparse (E ~ 4V upper limit on num edges) and will all be uniform weight. I'm trying to decide between adjacency list, ...
2013/03/08
[ "https://Stackoverflow.com/questions/15284765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1281286/" ]
Consider a layout as follows: ![enter image description here](https://i.stack.imgur.com/3bsRk.jpg) An adjacency list can be implemented as an array of [Nx4] (n being 3 in this case, and 4 because you are saying that 4 is the maximum number of edges in your case) in the following form: ``` 2 3 0 0 3 0 0 0 0 0 ...
The most efficient way to implement a graph for your purposes probably is a combination of an adjacency list for each vertex and additionally a hashing structure that maps pairs of vertices to edges, if those exist. This'll require O(|V|+ |E|) space for the adjacency list, O(|E|) for the hashing structure and give you ...
15,284,765
I'm currently working on a directed graph data structure in C++ (no Boost GL for this project). The primary application will be identifying connected components and sinks. The graphs are expected to be sparse (E ~ 4V upper limit on num edges) and will all be uniform weight. I'm trying to decide between adjacency list, ...
2013/03/08
[ "https://Stackoverflow.com/questions/15284765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1281286/" ]
Consider a layout as follows: ![enter image description here](https://i.stack.imgur.com/3bsRk.jpg) An adjacency list can be implemented as an array of [Nx4] (n being 3 in this case, and 4 because you are saying that 4 is the maximum number of edges in your case) in the following form: ``` 2 3 0 0 3 0 0 0 0 0 ...
The Adjacency matrix is good for dense graphs, they prove bad choice for large sparse graphs. Here are time and space complexities of simple operations for sparse graphs. [Sparse Graph Big O Time and Space Complexities](https://i.stack.imgur.com/Kmgeq.png) Consider the average number of edges less than 4 for a graph ...
15,284,765
I'm currently working on a directed graph data structure in C++ (no Boost GL for this project). The primary application will be identifying connected components and sinks. The graphs are expected to be sparse (E ~ 4V upper limit on num edges) and will all be uniform weight. I'm trying to decide between adjacency list, ...
2013/03/08
[ "https://Stackoverflow.com/questions/15284765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1281286/" ]
The most efficient way to implement a graph for your purposes probably is a combination of an adjacency list for each vertex and additionally a hashing structure that maps pairs of vertices to edges, if those exist. This'll require O(|V|+ |E|) space for the adjacency list, O(|E|) for the hashing structure and give you ...
The Adjacency matrix is good for dense graphs, they prove bad choice for large sparse graphs. Here are time and space complexities of simple operations for sparse graphs. [Sparse Graph Big O Time and Space Complexities](https://i.stack.imgur.com/Kmgeq.png) Consider the average number of edges less than 4 for a graph ...
2,739,897
I'm relatively well versed in CoreData and have been using it for several years with little or no difficulty. For the life of me, I can't figure out why ``` insertNewObjectForEntityForName:inManagedObjectContext: ``` is all of a sudden returning some sort of strange instance of NSNumber. GDB says the returned object...
2010/04/29
[ "https://Stackoverflow.com/questions/2739897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/244389/" ]
I ran into the exact same problem and after pulling my hair out for an entire day, I solved my problem. I believe the problem is related to a corrupt attribute / relationship, and the NSCFNumber is actually looking for the objectID for that attribute / relationship. In my case, I could use valueForKey: to find all of ...
The objectID and entity selectors are on `NSManagedObject`, not `NSCFNumber` (or `NSNumber`). I wouldn't expect you to call either of these selectors on a `NSNumber` which should be a property on an entity, not the entity itself. Every entity in CoreData must extend `NSManagedObject`, so your `NSCFNumber` object is no...
2,739,897
I'm relatively well versed in CoreData and have been using it for several years with little or no difficulty. For the life of me, I can't figure out why ``` insertNewObjectForEntityForName:inManagedObjectContext: ``` is all of a sudden returning some sort of strange instance of NSNumber. GDB says the returned object...
2010/04/29
[ "https://Stackoverflow.com/questions/2739897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/244389/" ]
I had the very same issue: I had added a method called "isDatabase" (returning a BOOL) to the parent entity of my Database entity, which had a relationship named "database". Renaming "isDatabase" to "isOfTypeDatabase" fixed the issue. So keep also looking in parent entities!
The objectID and entity selectors are on `NSManagedObject`, not `NSCFNumber` (or `NSNumber`). I wouldn't expect you to call either of these selectors on a `NSNumber` which should be a property on an entity, not the entity itself. Every entity in CoreData must extend `NSManagedObject`, so your `NSCFNumber` object is no...
2,739,897
I'm relatively well versed in CoreData and have been using it for several years with little or no difficulty. For the life of me, I can't figure out why ``` insertNewObjectForEntityForName:inManagedObjectContext: ``` is all of a sudden returning some sort of strange instance of NSNumber. GDB says the returned object...
2010/04/29
[ "https://Stackoverflow.com/questions/2739897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/244389/" ]
I defined a property on an `NSManagedObject` subclass that collided with the name of a relationship defined on the class. Here's the code in my `MyManagedObjectSubclass+Custom.h` `@property (readonly, nonatomic) BOOL isSeason;` Here's the code produced by XCode for MyManagedObjectSubclass.h `@property (nonatomic, ...
The objectID and entity selectors are on `NSManagedObject`, not `NSCFNumber` (or `NSNumber`). I wouldn't expect you to call either of these selectors on a `NSNumber` which should be a property on an entity, not the entity itself. Every entity in CoreData must extend `NSManagedObject`, so your `NSCFNumber` object is no...
2,739,897
I'm relatively well versed in CoreData and have been using it for several years with little or no difficulty. For the life of me, I can't figure out why ``` insertNewObjectForEntityForName:inManagedObjectContext: ``` is all of a sudden returning some sort of strange instance of NSNumber. GDB says the returned object...
2010/04/29
[ "https://Stackoverflow.com/questions/2739897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/244389/" ]
I had the very same issue: I had added a method called "isDatabase" (returning a BOOL) to the parent entity of my Database entity, which had a relationship named "database". Renaming "isDatabase" to "isOfTypeDatabase" fixed the issue. So keep also looking in parent entities!
I ran into the exact same problem and after pulling my hair out for an entire day, I solved my problem. I believe the problem is related to a corrupt attribute / relationship, and the NSCFNumber is actually looking for the objectID for that attribute / relationship. In my case, I could use valueForKey: to find all of ...
2,739,897
I'm relatively well versed in CoreData and have been using it for several years with little or no difficulty. For the life of me, I can't figure out why ``` insertNewObjectForEntityForName:inManagedObjectContext: ``` is all of a sudden returning some sort of strange instance of NSNumber. GDB says the returned object...
2010/04/29
[ "https://Stackoverflow.com/questions/2739897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/244389/" ]
I defined a property on an `NSManagedObject` subclass that collided with the name of a relationship defined on the class. Here's the code in my `MyManagedObjectSubclass+Custom.h` `@property (readonly, nonatomic) BOOL isSeason;` Here's the code produced by XCode for MyManagedObjectSubclass.h `@property (nonatomic, ...
I ran into the exact same problem and after pulling my hair out for an entire day, I solved my problem. I believe the problem is related to a corrupt attribute / relationship, and the NSCFNumber is actually looking for the objectID for that attribute / relationship. In my case, I could use valueForKey: to find all of ...
2,739,897
I'm relatively well versed in CoreData and have been using it for several years with little or no difficulty. For the life of me, I can't figure out why ``` insertNewObjectForEntityForName:inManagedObjectContext: ``` is all of a sudden returning some sort of strange instance of NSNumber. GDB says the returned object...
2010/04/29
[ "https://Stackoverflow.com/questions/2739897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/244389/" ]
I had the very same issue: I had added a method called "isDatabase" (returning a BOOL) to the parent entity of my Database entity, which had a relationship named "database". Renaming "isDatabase" to "isOfTypeDatabase" fixed the issue. So keep also looking in parent entities!
I defined a property on an `NSManagedObject` subclass that collided with the name of a relationship defined on the class. Here's the code in my `MyManagedObjectSubclass+Custom.h` `@property (readonly, nonatomic) BOOL isSeason;` Here's the code produced by XCode for MyManagedObjectSubclass.h `@property (nonatomic, ...
49,839
So far I've been using a printed copy of the official character sheet for my D&D characters. It features a blank space for every stat. As a consequence of that, every time my character levels up I have to erase whatever number I wrote and write new ones. After a few levels, this wear and tear adds up and the character...
2014/10/21
[ "https://rpg.stackexchange.com/questions/49839", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/17639/" ]
As for PDF-based character sheets, [Dyslexic Studeos’](http://charactersheets.minotaur.cc/) are by-far the highest-quality that I have seen. But I don’t think you’re likely to find a non-digital sheet that can be updated without an eraser. A digital sheet, on the other hand, can have anything edited with ease, and mos...
[Mythweaver](http://www.myth-weavers.com/sheetindex.php) is a good place to start. If online sheet-tracking is an option for you, Mythweaver covers a wide range of character sheets (including DnD 3.5e, as you've requested) and is fully editable, customizable, and easy to update. There are other online sheet-keeping...
49,839
So far I've been using a printed copy of the official character sheet for my D&D characters. It features a blank space for every stat. As a consequence of that, every time my character levels up I have to erase whatever number I wrote and write new ones. After a few levels, this wear and tear adds up and the character...
2014/10/21
[ "https://rpg.stackexchange.com/questions/49839", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/17639/" ]
You could have the character sheet printed and laminated somewhere like staples for next to nothing as far as cost and use wet erase markers to update it. This is something I have found useful during campaigns.
[Mythweaver](http://www.myth-weavers.com/sheetindex.php) is a good place to start. If online sheet-tracking is an option for you, Mythweaver covers a wide range of character sheets (including DnD 3.5e, as you've requested) and is fully editable, customizable, and easy to update. There are other online sheet-keeping...
49,839
So far I've been using a printed copy of the official character sheet for my D&D characters. It features a blank space for every stat. As a consequence of that, every time my character levels up I have to erase whatever number I wrote and write new ones. After a few levels, this wear and tear adds up and the character...
2014/10/21
[ "https://rpg.stackexchange.com/questions/49839", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/17639/" ]
You could have the character sheet printed and laminated somewhere like staples for next to nothing as far as cost and use wet erase markers to update it. This is something I have found useful during campaigns.
As for PDF-based character sheets, [Dyslexic Studeos’](http://charactersheets.minotaur.cc/) are by-far the highest-quality that I have seen. But I don’t think you’re likely to find a non-digital sheet that can be updated without an eraser. A digital sheet, on the other hand, can have anything edited with ease, and mos...
49,839
So far I've been using a printed copy of the official character sheet for my D&D characters. It features a blank space for every stat. As a consequence of that, every time my character levels up I have to erase whatever number I wrote and write new ones. After a few levels, this wear and tear adds up and the character...
2014/10/21
[ "https://rpg.stackexchange.com/questions/49839", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/17639/" ]
As for PDF-based character sheets, [Dyslexic Studeos’](http://charactersheets.minotaur.cc/) are by-far the highest-quality that I have seen. But I don’t think you’re likely to find a non-digital sheet that can be updated without an eraser. A digital sheet, on the other hand, can have anything edited with ease, and mos...
Use a laminated sheet and Mark it with a permanent marker. They won't accidently erase. In order to erase your old marks, write over them with a dry erase marker, then simply wipe clean.
49,839
So far I've been using a printed copy of the official character sheet for my D&D characters. It features a blank space for every stat. As a consequence of that, every time my character levels up I have to erase whatever number I wrote and write new ones. After a few levels, this wear and tear adds up and the character...
2014/10/21
[ "https://rpg.stackexchange.com/questions/49839", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/17639/" ]
You could have the character sheet printed and laminated somewhere like staples for next to nothing as far as cost and use wet erase markers to update it. This is something I have found useful during campaigns.
Use a laminated sheet and Mark it with a permanent marker. They won't accidently erase. In order to erase your old marks, write over them with a dry erase marker, then simply wipe clean.
192,214
The guidelines do not clearly specify how much work one is assumed to do in writing a MathSciNet review. What is the consensus? Is one expected to read the whole paper and check the the proofs in detail?
2015/01/05
[ "https://mathoverflow.net/questions/192214", "https://mathoverflow.net", "https://mathoverflow.net/users/64663/" ]
You are not expected to check the proofs. You are expected to write an informative text which will reflect the contents of the paper. So that the reader can get an idea what did the author prove (or claims to prove), and decide whether s/he wants to read the paper. Of course, if you find a mistake you mention this. Or ...
I echo the answer that you are not *expected* to check the proofs as a MathSciNet reviewer. That said, I personally choose to do so, because I believe that this leads to better reviews. When I read a review I want it to tell me what to expect from the paper, and if there is a gaping hole I want to know that fact before...
14,962,611
I have a checkbox at the end of 5 inputs and one dropdown. I am trying through jquery to set all the inputs and the dropdown before the checkbox to 0. There will be many employees listed so it has to be only the ones before the checkbox. My feeble attempt at the jquery. I have the .on as sometimes it will be called t...
2013/02/19
[ "https://Stackoverflow.com/questions/14962611", "https://Stackoverflow.com", "https://Stackoverflow.com/users/652541/" ]
There are two kinds of storage in an XNA game: Title Storage and User Storage. See [What is Storage?](http://msdn.microsoft.com/en-us/library/bb200105.aspx) To read data from Title Storage, use [TitleContainer.OpenStream](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.titlecontainer.openstream.aspx) as...
``` string fileName = "Dummy.xml"; string resourceName = "Namespace0.Folder.Folder2.DataFolder." + fileName; var resource = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName); ```
56,170,481
Is there any difference between `<<-EOH` and `<<~EOH`? I question that because Brackets doesn't highlight properly the ruby/chef code when I use `<<-EOH` and I have already tons of code running in production that way. So it would be impossible to approve my PR when everything is working fine and the only problem is my...
2019/05/16
[ "https://Stackoverflow.com/questions/56170481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8419398/" ]
The squiggly heredoc will unindent the content to the level of the least indented row: ``` straight = <<-END_OF_TEXT Hello. This is: a regular dash. END_OF_TEXT squiggly = <<~END_OF_TEXT Hello. This is: using the squiggly dash. END_OF_TEXT separator = "-" * 30 puts separator puts s...
I just found the answer. They do different things. The straight one keeps the structure of the multi line string (line changes) while the squiggly concatenates every line as they were a single line. Please refer to: <https://infinum.co/the-capsized-eight/multiline-strings-ruby-2-3-0-the-squiggly-heredoc#disqus_thread>...
49,134,056
How can i check in script if mouseUp but not on this gameObject? ``` void OnMouseUp() ``` Only works when mouse is on gameObject, is there other function for opposite?
2018/03/06
[ "https://Stackoverflow.com/questions/49134056", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8176613/" ]
[Input.GetMouseButtonUp(0)](https://docs.unity3d.com/ScriptReference/Input.GetMouseButtonUp.html) is what you're looking for. You'll need to check for it each `Update` call though, it's not an event.
Cast a ray on mouse up and check for collision with your object. Your object will need a collider and be tagged with "yourObjectTag" for the example to work. ``` Update() { if (Input.GetMouseButtonUp(0)) { RaycastHit hit; if (Physics.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition)...
71,126,279
I am passing a data class, which is Serializable, between Activities (say Activity A to Activity B). Activity B has Jetpack Composable views. when I Navigate from Activity A to Activity B via a button click, I get the following crash ``` Process: uk.gov.tfl.gotfl, PID: 10022 java.lang.IllegalStateException: Check ...
2022/02/15
[ "https://Stackoverflow.com/questions/71126279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034229/" ]
This is likely caused by using rememberSaveable with a data type that does not implement Serializable. The data needs to be able to be saved to a bundle and if it can't be then you see the "Check failed" error.
Can you attach your compose code? Looking at this crash, it maybe related to the use of rememberSaveable incorrectly. I had the same crash too. In the end, I replaced rememberSaveable{} with remember{} which temporarily solved it
71,126,279
I am passing a data class, which is Serializable, between Activities (say Activity A to Activity B). Activity B has Jetpack Composable views. when I Navigate from Activity A to Activity B via a button click, I get the following crash ``` Process: uk.gov.tfl.gotfl, PID: 10022 java.lang.IllegalStateException: Check ...
2022/02/15
[ "https://Stackoverflow.com/questions/71126279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034229/" ]
Can you attach your compose code? Looking at this crash, it maybe related to the use of rememberSaveable incorrectly. I had the same crash too. In the end, I replaced rememberSaveable{} with remember{} which temporarily solved it
This is usually caused by [rememberSaveable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/saveable/package-summary#rememberSaveable(kotlin.Array,androidx.compose.runtime.saveable.Saver,kotlin.String,kotlin.Function0)) being used with a data type that cannot be innately stored in a Bundle. A ...
71,126,279
I am passing a data class, which is Serializable, between Activities (say Activity A to Activity B). Activity B has Jetpack Composable views. when I Navigate from Activity A to Activity B via a button click, I get the following crash ``` Process: uk.gov.tfl.gotfl, PID: 10022 java.lang.IllegalStateException: Check ...
2022/02/15
[ "https://Stackoverflow.com/questions/71126279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1034229/" ]
This is likely caused by using rememberSaveable with a data type that does not implement Serializable. The data needs to be able to be saved to a bundle and if it can't be then you see the "Check failed" error.
This is usually caused by [rememberSaveable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/saveable/package-summary#rememberSaveable(kotlin.Array,androidx.compose.runtime.saveable.Saver,kotlin.String,kotlin.Function0)) being used with a data type that cannot be innately stored in a Bundle. A ...
49,139,437
In my stored procedure, I have the following statement: ``` SELECT TOP 200 C.CustomerNumber, C.CustomerName, C.AccountManager, C.CustomerId FROM Customer C WITH(NOLOCK, index (UQ_Customer_CustomerNumber)) LEFT JOIN CustomerQuotingPreference cp WITH(NOLOCK) ON cp.CustomerId = C.Custom...
2018/03/06
[ "https://Stackoverflow.com/questions/49139437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2726426/" ]
``` DECLARE @Temp Table ( CustomerNumber VarChar, //or whatever type these are CustomerName VarChar, AccountManager VarChar, CustomerId Int ) INSERT INTO @Temp SELECT TOP 200 C.CustomerNumber, C.CustomerName, C.AccountManager, C.CustomerId FROM Customer C WITH(NOLOC...
I would prefer this way ``` if exists ( SELECT 1 FROM Customer C WITH(NOLOCK, index (UQ_Customer_CustomerNumber)) LEFT JOIN CustomerQuotingPreference cp WITH(NOLOCK) ON cp.CustomerId = C.CustomerId WHERE (C.CustomerName LIKE ('%' + @searchString + '%') OR C.Custome...
52,285,455
I've just stumbled upon a performance issue with my app. I'm trying to make a game loop, with a `setInterval()` function and re-rendering my game constantly with `this.forceUpdate()`. I've also tried using `this.setState()` to re-render but they all feel the same. Now, in my gameloop, I'm constantly updating the y posi...
2018/09/11
[ "https://Stackoverflow.com/questions/52285455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9449431/" ]
If you're adamant that `requestAnimationFrame` is not a good fit for your app/game loop, I would suggest using `setTimeout` over `setInterval`. The reason is, if a loop iteration takes longer than `16ms` (1000/60) to execute, then you'll get iteration overlap - another iteration will start, even if the prior hasn't com...
Okay i think i've managed to make a frankenstein code from your guys's suggestions. Here it is. ``` componentDidUpdate() { setTimeout(() => { requestAnimationFrame(this.loop); }, 1000/60); } loop = () => { this.forceUpdate(); } ``` I've noticed that the performance was actually better then...
52,285,455
I've just stumbled upon a performance issue with my app. I'm trying to make a game loop, with a `setInterval()` function and re-rendering my game constantly with `this.forceUpdate()`. I've also tried using `this.setState()` to re-render but they all feel the same. Now, in my gameloop, I'm constantly updating the y posi...
2018/09/11
[ "https://Stackoverflow.com/questions/52285455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9449431/" ]
If anyone wants to know, you really shouldn't be doing game code within react-native's state. Instead, write your game code outside of react-native. Example, react-native-canvas can graphically draw things without state!
Okay i think i've managed to make a frankenstein code from your guys's suggestions. Here it is. ``` componentDidUpdate() { setTimeout(() => { requestAnimationFrame(this.loop); }, 1000/60); } loop = () => { this.forceUpdate(); } ``` I've noticed that the performance was actually better then...
46,493
I had started writing my novel in the first person. Later on, I planned some plot twists along the way. For these plot twists to happen, the protagonist shouldn't be aware of the consequences/interpretation of certain events; some go back to when she was in school. Eventually, my protagonist will experience a moment ...
2019/07/07
[ "https://writers.stackexchange.com/questions/46493", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/40099/" ]
> > Is she supposed to be aware of everything happening around her and **to** her if I'm writing in the first person? > > > Yes. But she can be aware and not *understand.* She can see and describe things she doesn't understand, but perhaps the reader does. Likewise, she may be involved in conversations, or overh...
**Plot twists are actually easier to pull off in first person**, because the first person perspective shapes what the audience sees. There's a famous plot twist at the end of *The Sixth Sense*, and the clues are all present throughout the movie, but the audience doesn't pick up on it, because we see the entire movie fr...
26,135,786
I tried searching but couldn't find anything specific to my issue. I am an excel newbie. I have a sheet for consumption of essentials at a hostel that gets updated weekly. This is the table - ``` Essentials Day 1 Day 2 Day 3 Day 4 Day 5 Avg Soap 10 9 8 - 2 7.25 Toothpas...
2014/10/01
[ "https://Stackoverflow.com/questions/26135786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1164416/" ]
Transpose your data, and insert a column for week number: ``` Week Day Soap Toothpaste Bread Butter 1 1 10 3 8 5 1 2 9 2 7 4 1 3 8 4 6 5 1 4 0 0 7 6 1 5 2 1 3 2 2 1 ...
```html Sub copyVals() Dim weekNbr As Long weekNbr = Sheets("Sheet1").Range("A1").Value Sheets("Sheet1").Range("D2:D6").Copy Sheets("Sheet1").Range("G2:G6").Offset(0, weekNbr - 1).PasteSpecial xlPasteValuesAndNumberFormats Application.CutCopyMode = False End Sub ``` Unless you want to retain a table for each...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
For Spring Data with Reactive MongoDb: My case was a bit different (I had closing connections - which throws "Caused by: java.lang.IllegalStateException: state should be: open") But You can use this with your case. **application.yml:** ``` spring.data.mongodb: host: localhost database: myDb port: 27017 user...
The question is old but for all those who have problems with Mongo DB JAVA driver timeouts : set the maxConnectionIdleTime property. Example Spring Boot : ``` import com.mongodb.MongoClient; import com.mongodb.MongoClientOptions; import org.springframework.beans.factory.annotation.Autowired; import org.springframewor...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
To follow your theme, this would be the best to answer your question. Looks like you would like to set a timeout in your application.properties file. In order to do so: **Instead of** ``` spring.data.mongodb.host=myHost spring.data.mongodb.port=27017 spring.data.mongodb.database=myDatabase spring.data.mongodb.user...
The question is old but for all those who have problems with Mongo DB JAVA driver timeouts : set the maxConnectionIdleTime property. Example Spring Boot : ``` import com.mongodb.MongoClient; import com.mongodb.MongoClientOptions; import org.springframework.beans.factory.annotation.Autowired; import org.springframewor...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
To follow your theme, this would be the best to answer your question. Looks like you would like to set a timeout in your application.properties file. In order to do so: **Instead of** ``` spring.data.mongodb.host=myHost spring.data.mongodb.port=27017 spring.data.mongodb.database=myDatabase spring.data.mongodb.user...
[MongoClientOptions](http://api.mongodb.org/java/current/com/mongodb/MongoClientOptions.Builder.html) is a class which has the required properties. **Programmatically** If you have configured your MongoDB programmatically, then below is the code snippet to help you out. ``` DB mongoDb; MongoClient mongoClient = new ...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
For Spring Data with Reactive MongoDb: My case was a bit different (I had closing connections - which throws "Caused by: java.lang.IllegalStateException: state should be: open") But You can use this with your case. **application.yml:** ``` spring.data.mongodb: host: localhost database: myDb port: 27017 user...
The question was specifically for Spring boot. I am using the following approach which works well, please suggest if there is a way not to use new and use Spring for configuring it. ``` import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Value; import org.springfr...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
The question is old but for all those who have problems with Mongo DB JAVA driver timeouts : set the maxConnectionIdleTime property. Example Spring Boot : ``` import com.mongodb.MongoClient; import com.mongodb.MongoClientOptions; import org.springframework.beans.factory.annotation.Autowired; import org.springframewor...
I found the following document with a possible solution. <https://www.programmersought.com/article/1927319190/> It mentions the following: ``` spring.data.mongodb.address=172.16.250.234:27017,172.16.250.239:27017,172.16.250.240:27017 spring.data.mongodb.replica-set=rs0 spring.data.mongodb.database=test spring.data.m...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
To follow your theme, this would be the best to answer your question. Looks like you would like to set a timeout in your application.properties file. In order to do so: **Instead of** ``` spring.data.mongodb.host=myHost spring.data.mongodb.port=27017 spring.data.mongodb.database=myDatabase spring.data.mongodb.user...
The question was specifically for Spring boot. I am using the following approach which works well, please suggest if there is a way not to use new and use Spring for configuring it. ``` import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Value; import org.springfr...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
This will override the Spring Boot autoconfiguration: ``` @Configuration public class MongoDbSettings { @Bean public MongoClientOptions mongoOptions() { return MongoClientOptions.builder().socketTimeout(2000).build(); } } ```
I found the following document with a possible solution. <https://www.programmersought.com/article/1927319190/> It mentions the following: ``` spring.data.mongodb.address=172.16.250.234:27017,172.16.250.239:27017,172.16.250.240:27017 spring.data.mongodb.replica-set=rs0 spring.data.mongodb.database=test spring.data.m...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
[MongoClientOptions](http://api.mongodb.org/java/current/com/mongodb/MongoClientOptions.Builder.html) is a class which has the required properties. **Programmatically** If you have configured your MongoDB programmatically, then below is the code snippet to help you out. ``` DB mongoDb; MongoClient mongoClient = new ...
The question was specifically for Spring boot. I am using the following approach which works well, please suggest if there is a way not to use new and use Spring for configuring it. ``` import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Value; import org.springfr...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
This will override the Spring Boot autoconfiguration: ``` @Configuration public class MongoDbSettings { @Bean public MongoClientOptions mongoOptions() { return MongoClientOptions.builder().socketTimeout(2000).build(); } } ```
The question is old but for all those who have problems with Mongo DB JAVA driver timeouts : set the maxConnectionIdleTime property. Example Spring Boot : ``` import com.mongodb.MongoClient; import com.mongodb.MongoClientOptions; import org.springframework.beans.factory.annotation.Autowired; import org.springframewor...
36,784,018
i'm using the AxAcroPDFLib.AxAcroPDF Tool from the toolbox and am having it a specific PDF when i click a button. I have a separate button (button2) and Textbox which i want to use to automatically move the PDF page to the page number entered into the TextBox when button2 is pressed. The following code isn't working a...
2016/04/22
[ "https://Stackoverflow.com/questions/36784018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214714/" ]
The question was specifically for Spring boot. I am using the following approach which works well, please suggest if there is a way not to use new and use Spring for configuring it. ``` import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Value; import org.springfr...
I found the following document with a possible solution. <https://www.programmersought.com/article/1927319190/> It mentions the following: ``` spring.data.mongodb.address=172.16.250.234:27017,172.16.250.239:27017,172.16.250.240:27017 spring.data.mongodb.replica-set=rs0 spring.data.mongodb.database=test spring.data.m...
8,817,814
is it any possibility to get a spin box like the ones used in Time or DatePickers? I want to set my own data using those. Thanks in advance
2012/01/11
[ "https://Stackoverflow.com/questions/8817814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/649910/" ]
More precisely, I think you are looking for this: <http://developer.android.com/reference/android/widget/NumberPicker.html>. EDIT: Or if you're looking into other options, it already has been discussed here: [Android Number Picker Dialog](https://stackoverflow.com/questions/3359510/android-number-picker-dialog). Hop...
it is possible via a custom view... <http://developer.android.com/guide/topics/ui/custom-components.html> happy coding ;)
30,201,765
I am currently participating in a free online course through MIT OCW. I was given a certain problem and I am trying to understand the solution. I am not sure what the "2" is doing. it is the two in the (minMonthlyPaymentRate \* balance, 2) Here is the solution: ``` # 6.00 PS1-A Solution # Determines remaining credit c...
2015/05/12
[ "https://Stackoverflow.com/questions/30201765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871678/" ]
`round()` which rounds off to the given number of digits and returns the floating point number. Example code: ``` val=2.665 print(round(val, 2); output: 6.67 ```
As seen in the [python documentation of the function round()](https://docs.python.org/3/library/functions.html#round) it states "rounded to ndigits digits after the decimal point". So it means the result will be rounded to two digits after the decimal point.
30,201,765
I am currently participating in a free online course through MIT OCW. I was given a certain problem and I am trying to understand the solution. I am not sure what the "2" is doing. it is the two in the (minMonthlyPaymentRate \* balance, 2) Here is the solution: ``` # 6.00 PS1-A Solution # Determines remaining credit c...
2015/05/12
[ "https://Stackoverflow.com/questions/30201765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4871678/" ]
`round()` which rounds off to the given number of digits and returns the floating point number. Example code: ``` val=2.665 print(round(val, 2); output: 6.67 ```
### One picture is worth a thousand words. ![enter image description here](https://i.stack.imgur.com/HgEQn.png)
13,056,421
Why does trying to compile ``` public class GenericsFail { public static void main(String[] args) { accept(new HashMap<String, List<String>>()); } public static void accept(Map<String, List<?>> multiMap) {} } ``` give the error ``` GenericsFail.java:7: error: method accept in class GenericsFail...
2012/10/24
[ "https://Stackoverflow.com/questions/13056421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/150884/" ]
The reason is that the `?` in `List<?>` could be "anything", but a *different* "anything" in each `Map` entry. That is, it would accept a `List<String>` in one entry, and a `List<Integer>` in another. But you are passing in a `Map` that has the *same* type of `List` in every entry, so the type is not bound in the same...
Here is a short example of why the compilator cannot accept this parameter : ``` public static void main(String[] args) { //if this would be accepted here ... accept(new HashMap<String, List<String>>()); } public static void accept(Map<String, List<?>> multiMap) { //this is valid c...
13,056,421
Why does trying to compile ``` public class GenericsFail { public static void main(String[] args) { accept(new HashMap<String, List<String>>()); } public static void accept(Map<String, List<?>> multiMap) {} } ``` give the error ``` GenericsFail.java:7: error: method accept in class GenericsFail...
2012/10/24
[ "https://Stackoverflow.com/questions/13056421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/150884/" ]
The reason is that the `?` in `List<?>` could be "anything", but a *different* "anything" in each `Map` entry. That is, it would accept a `List<String>` in one entry, and a `List<Integer>` in another. But you are passing in a `Map` that has the *same* type of `List` in every entry, so the type is not bound in the same...
To be more general ``` void accept(Map<String, ? extends List<?>> multiMap) ```
5,941,261
I'm working on writing an application that straddles the line between C# and C/++ on Windows Mobile 6.1/6.5. We currently have a kiosk application running on our devices, and would like to add the ability to switch back and forth to a second kiosk application. Our goal is to establish a global hot key that switches pr...
2011/05/09
[ "https://Stackoverflow.com/questions/5941261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/591374/" ]
You need to specify the data text fields and data value fields. ``` ddlStatus.DataTextField = "StatusName"; ddlStatus.DataValueField = "StatusId"; ```
You need to set ``` ddl.DisplayMember = "StatusName"; ddl.ValueMemeber = "StatusId"; ```
34,877,013
I have tried the following ways but they all do not work. 1. Reinstall MyEclipse 2. Reinstall java 3. Use Eclipse 4. Update java to 1.8.0\_71 5. Use short format of directory in the JDK path Both my java and MyEclipse are 64bit. H: is not a network driver. [This is my screenshot](http://i.stack.imgur.com/2oXQn.png) ...
2016/01/19
[ "https://Stackoverflow.com/questions/34877013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5264110/" ]
"*nothing is impossible*" ... Sure, but it might be insanity. ------------------------------------------------------------- --- If you want the `UIScrollView` to remain touchable to the user, you could try something similar to what [Hemang suggests](https://stackoverflow.com/questions/34877012/cant-touch-uibutton-beh...
You can override method `override func hitTest(point: CGPoint, withEvent event: UIEvent?) -> UIView?` in superview of scrollView and Button. This method should return receiver for specific point. So in your case it should be something like that ``` override func hitTest(point: CGPoint, withEvent event: UIEvent?) -> ...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
Whilst you could theoretically write a static analysis tool that detected use of globals defined in other files, such as use of `MyObject`, you couldn't realistically track usage of `prototype` extension methods. JavaScript is a dynamically-typed language so there's no practical way for any tool to know that `a`, if p...
As @bobince already suggested, doing static analysis on a JavaScript program is a close to impossible problem to crack. [Google Closure compiler](http://code.google.com/closure/compiler/) does it to some extent but then it also relies on external help from [JSDoc](http://jsdoc.sourceforge.net/) comments. I had a [simi...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
It would be nice to have a tool that can automatically detect those dependencies for you and choose how they are loaded. The best solutions today are a bit cruder though. I created a dependency manager for my particular needs that I want to add to the list ([Pyramid Dependency Manager](http://joel.inpointform.net/softw...
I have written a tool to do something like this: <http://github.com/damonsmith/js-class-loader> It's most useful if you have a java webapp and you structure your JS code in the java style. If you do that, it can detect all of your code dependencies and bundle them up, with support for both runtime and parse-time depen...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
Whilst you could theoretically write a static analysis tool that detected use of globals defined in other files, such as use of `MyObject`, you couldn't realistically track usage of `prototype` extension methods. JavaScript is a dynamically-typed language so there's no practical way for any tool to know that `a`, if p...
It would be nice to have a tool that can automatically detect those dependencies for you and choose how they are loaded. The best solutions today are a bit cruder though. I created a dependency manager for my particular needs that I want to add to the list ([Pyramid Dependency Manager](http://joel.inpointform.net/softw...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
It would be nice to have a tool that can automatically detect those dependencies for you and choose how they are loaded. The best solutions today are a bit cruder though. I created a dependency manager for my particular needs that I want to add to the list ([Pyramid Dependency Manager](http://joel.inpointform.net/softw...
JSAnalyse uses static code analysis to detect dependencies between javascript files: <http://jsanalyse.codeplex.com/> It also allows you to define the allowed dependencies and to ensure it during the build, for instance. Of course, it cannot detect all dependencies because javascript is dynamic interpretet language wh...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
Whilst you could theoretically write a static analysis tool that detected use of globals defined in other files, such as use of `MyObject`, you couldn't realistically track usage of `prototype` extension methods. JavaScript is a dynamically-typed language so there's no practical way for any tool to know that `a`, if p...
I have written a tool to do something like this: <http://github.com/damonsmith/js-class-loader> It's most useful if you have a java webapp and you structure your JS code in the java style. If you do that, it can detect all of your code dependencies and bundle them up, with support for both runtime and parse-time depen...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
JSAnalyse uses static code analysis to detect dependencies between javascript files: <http://jsanalyse.codeplex.com/> It also allows you to define the allowed dependencies and to ensure it during the build, for instance. Of course, it cannot detect all dependencies because javascript is dynamic interpretet language wh...
I have written a tool to do something like this: <http://github.com/damonsmith/js-class-loader> It's most useful if you have a java webapp and you structure your JS code in the java style. If you do that, it can detect all of your code dependencies and bundle them up, with support for both runtime and parse-time depen...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
Have you tried using a dependency manager like [RequireJS](http://requirejs.org/) or [LabJS](http://labjs.com/)? I noticed no one's mentioned them in this thread. From <http://requirejs.org/docs/start.html>: > > Inside of main.js, you can use require() to load any other scripts you > need to run: > > > ``` requ...
JSAnalyse uses static code analysis to detect dependencies between javascript files: <http://jsanalyse.codeplex.com/> It also allows you to define the allowed dependencies and to ensure it during the build, for instance. Of course, it cannot detect all dependencies because javascript is dynamic interpretet language wh...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
Whilst you could theoretically write a static analysis tool that detected use of globals defined in other files, such as use of `MyObject`, you couldn't realistically track usage of `prototype` extension methods. JavaScript is a dynamically-typed language so there's no practical way for any tool to know that `a`, if p...
Have you tried using a dependency manager like [RequireJS](http://requirejs.org/) or [LabJS](http://labjs.com/)? I noticed no one's mentioned them in this thread. From <http://requirejs.org/docs/start.html>: > > Inside of main.js, you can use require() to load any other scripts you > need to run: > > > ``` requ...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
As @bobince already suggested, doing static analysis on a JavaScript program is a close to impossible problem to crack. [Google Closure compiler](http://code.google.com/closure/compiler/) does it to some extent but then it also relies on external help from [JSDoc](http://jsdoc.sourceforge.net/) comments. I had a [simi...
I have written a tool to do something like this: <http://github.com/damonsmith/js-class-loader> It's most useful if you have a java webapp and you structure your JS code in the java style. If you do that, it can detect all of your code dependencies and bundle them up, with support for both runtime and parse-time depen...
3,202,606
I am currently maintaining a large number of JS files and the dependency issue is growing over my head. Right now I have each function in a separate file and I manually maintain a database to work out the dependencies between functions. This I would like to automate. For instance if I have the function f ``` Array.pr...
2010/07/08
[ "https://Stackoverflow.com/questions/3202606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/386508/" ]
Have you tried using a dependency manager like [RequireJS](http://requirejs.org/) or [LabJS](http://labjs.com/)? I noticed no one's mentioned them in this thread. From <http://requirejs.org/docs/start.html>: > > Inside of main.js, you can use require() to load any other scripts you > need to run: > > > ``` requ...
I have written a tool to do something like this: <http://github.com/damonsmith/js-class-loader> It's most useful if you have a java webapp and you structure your JS code in the java style. If you do that, it can detect all of your code dependencies and bundle them up, with support for both runtime and parse-time depen...
2,745,208
I found this abstract algebra question in a previous test paper: > > Suppose $\Bbb{F}$ is a field and $\mathrm{X}$ is a non-empty set. Then > $\text{Maps}(\mathrm{X},\Bbb{F})$ is a vector space over $\Bbb{F}$. > > > * If $|\mathrm{X}|=3$ then find a canonical basis of $\text{Maps}(\mathrm{X},\Bbb{F})$. > * Can yo...
2018/04/19
[ "https://math.stackexchange.com/questions/2745208", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
The notation $\operatorname{Maps}(X,\mathbb{F})$ is not “standard”, but it can be easily understood: the set consists of all maps $X\to\mathbb{F}$. You can endow it with pointwise addition, $f+g\colon x\mapsto f(x)+g(x)$, and pointwise scalar multiplication, $af\colon x\mapsto af(x)$. A “canonical basis” (the name is...
Yes, $|X|$ means the number of elements of $X$. And "maps" means "functions". The basis is "canonical" because it is so obvious and natural. Also $\times$ in this context denotes the Cartesian product.
2,745,208
I found this abstract algebra question in a previous test paper: > > Suppose $\Bbb{F}$ is a field and $\mathrm{X}$ is a non-empty set. Then > $\text{Maps}(\mathrm{X},\Bbb{F})$ is a vector space over $\Bbb{F}$. > > > * If $|\mathrm{X}|=3$ then find a canonical basis of $\text{Maps}(\mathrm{X},\Bbb{F})$. > * Can yo...
2018/04/19
[ "https://math.stackexchange.com/questions/2745208", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Yes, $|X|$ means the number of elements of $X$. And "maps" means "functions". The basis is "canonical" because it is so obvious and natural. Also $\times$ in this context denotes the Cartesian product.
Since each $f \in \text{Maps}$ is determined by the values $f(a\_1),f(a\_2),f(a\_3)$ in the field, the natural basis for $\text{Maps}$ $$x\_i(a\_j)= \delta\_{ij}$$ As a quick check, for any $f \in \text{Maps}$ with $\alpha\_j=f(a\_j)$ look at $$q(t)=\sum\limits\_j \alpha\_jx\_j(t)$$ Then note that, $$q(a\_j)=\alpha...
2,745,208
I found this abstract algebra question in a previous test paper: > > Suppose $\Bbb{F}$ is a field and $\mathrm{X}$ is a non-empty set. Then > $\text{Maps}(\mathrm{X},\Bbb{F})$ is a vector space over $\Bbb{F}$. > > > * If $|\mathrm{X}|=3$ then find a canonical basis of $\text{Maps}(\mathrm{X},\Bbb{F})$. > * Can yo...
2018/04/19
[ "https://math.stackexchange.com/questions/2745208", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
The notation $\operatorname{Maps}(X,\mathbb{F})$ is not “standard”, but it can be easily understood: the set consists of all maps $X\to\mathbb{F}$. You can endow it with pointwise addition, $f+g\colon x\mapsto f(x)+g(x)$, and pointwise scalar multiplication, $af\colon x\mapsto af(x)$. A “canonical basis” (the name is...
Since each $f \in \text{Maps}$ is determined by the values $f(a\_1),f(a\_2),f(a\_3)$ in the field, the natural basis for $\text{Maps}$ $$x\_i(a\_j)= \delta\_{ij}$$ As a quick check, for any $f \in \text{Maps}$ with $\alpha\_j=f(a\_j)$ look at $$q(t)=\sum\limits\_j \alpha\_jx\_j(t)$$ Then note that, $$q(a\_j)=\alpha...
10,099,519
I have a web-based service implemented in Tomcat and using Tomcat container-based authentication. What I'm trying to achieve is to have the login page appear differently depending on how the user got there. Specifically: * If the user clicks on the "login" button, I want the login page to just ask for a username and p...
2012/04/11
[ "https://Stackoverflow.com/questions/10099519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139985/" ]
You can use this to determinate the target of the original request: ``` <% String value0 = (String)request. getAttribute("javax.servlet.forward.request_uri"); if(value0.contains("login_success.jsp")) { out.print("USER, LOG IN!"); } else { out.print("USER, you have to LOG IN to go there!"); } %>...
You have a few options, 1 is the header "Referer" This field will contain the URL where the browser was at last... So you could see on the login page, was the last page my page linking them here, or somewhere else. This will work, but it is NOT fullproof, some folks/companies will filter out referers etc, and some bro...
10,099,519
I have a web-based service implemented in Tomcat and using Tomcat container-based authentication. What I'm trying to achieve is to have the login page appear differently depending on how the user got there. Specifically: * If the user clicks on the "login" button, I want the login page to just ask for a username and p...
2012/04/11
[ "https://Stackoverflow.com/questions/10099519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139985/" ]
You can use this to determinate the target of the original request: ``` <% String value0 = (String)request. getAttribute("javax.servlet.forward.request_uri"); if(value0.contains("login_success.jsp")) { out.print("USER, LOG IN!"); } else { out.print("USER, you have to LOG IN to go there!"); } %>...
I favor @Angelo's answer for portability, but if you're willing to tie your app to Tomcat, you can get the target destination (where the user wants to go after logging in) from the triggering request, which is saved in the session. I haven't tried this, but I think it will work: ``` import org.apache.catalina.authenti...
10,099,519
I have a web-based service implemented in Tomcat and using Tomcat container-based authentication. What I'm trying to achieve is to have the login page appear differently depending on how the user got there. Specifically: * If the user clicks on the "login" button, I want the login page to just ask for a username and p...
2012/04/11
[ "https://Stackoverflow.com/questions/10099519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139985/" ]
You can use this to determinate the target of the original request: ``` <% String value0 = (String)request. getAttribute("javax.servlet.forward.request_uri"); if(value0.contains("login_success.jsp")) { out.print("USER, LOG IN!"); } else { out.print("USER, you have to LOG IN to go there!"); } %>...
The above solutions seem backwards to me. The authentication controller shouldn't be looking at where the request came from to decide what to do... it should be told. The redirecting controllers/rules should know what they want done and should send it to the appropriate action. The login can go directly to the login a...
36,580,266
In my rails app (using postgresql), I'm trying to compose an Active Record query to find a group of volunteer records and then order them by `first_name`, then `last_name`, then `email`. Additionally, `first_name` and `last_name` may be `null` (either both will be `null` or both will be not `null`). For example, I woul...
2016/04/12
[ "https://Stackoverflow.com/questions/36580266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5490505/" ]
You're running in to a letter case problem: Your names are all capitalized, but the emails are lowercase, and with most collations, uppercase letters come before lowercase. Check out this trivial example: ``` #= select * from (values ('b'), ('B'), ('a'), ('A')) t (letter); letter -------- b B a A ``` ``` #= sel...
Just throwing it out there but have you tried (mysql) ORDER BY volunteers ASC THEN last\_name ASC THEN email ASC (wanted to make this a comment but not enough rep :((( ) if this isnt good please just comment so I can take it down so i dont lose rep :)
123,930
This question is in part inspired by a quote I saw in an answer to another question: > > *The problem with incorrect proofs to correct statements is that it is hard to come up with a counterexample.* > > > A little while ago, I attended a graph theory course in which there was a chapter on graph colourings. The ...
2012/03/24
[ "https://math.stackexchange.com/questions/123930", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26267/" ]
Usually proofs have many steps, and establish auxiliary results on the way to the final goal. A counterexample to an auxiliary result would unambiguously disqualify the proof, without disproving the ultimate statement to be proved.
I don't know enough graph theory to come up with an example there. So let me get an example from calculus. **True assertion**: let $f$ be continuous on $[a,b]$, $F(x)=\int\_0^xf(t)dt$. Then $F'(x)=f(x)$. "*Proof*": we have $$F(x+h)-F(x)=\int\_x^{x+h}f(t)dt,$$ so $$\tag{1} f(x)\leq\frac{F(x+h)-F(x)}h\leq f(x+h). $$ ...
123,930
This question is in part inspired by a quote I saw in an answer to another question: > > *The problem with incorrect proofs to correct statements is that it is hard to come up with a counterexample.* > > > A little while ago, I attended a graph theory course in which there was a chapter on graph colourings. The ...
2012/03/24
[ "https://math.stackexchange.com/questions/123930", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26267/" ]
Kempe's "proof" used induction on the number of vertices in the graph G. Given a graph with n vertices, he removed a vertex, colored the remaining graph in four colors using the inductive hypothesis, and then (and this is the hard part) re-inserted the missing vertex, which possibly resulted in having to "fix up" the c...
Usually proofs have many steps, and establish auxiliary results on the way to the final goal. A counterexample to an auxiliary result would unambiguously disqualify the proof, without disproving the ultimate statement to be proved.
123,930
This question is in part inspired by a quote I saw in an answer to another question: > > *The problem with incorrect proofs to correct statements is that it is hard to come up with a counterexample.* > > > A little while ago, I attended a graph theory course in which there was a chapter on graph colourings. The ...
2012/03/24
[ "https://math.stackexchange.com/questions/123930", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26267/" ]
Kempe's "proof" used induction on the number of vertices in the graph G. Given a graph with n vertices, he removed a vertex, colored the remaining graph in four colors using the inductive hypothesis, and then (and this is the hard part) re-inserted the missing vertex, which possibly resulted in having to "fix up" the c...
I don't know enough graph theory to come up with an example there. So let me get an example from calculus. **True assertion**: let $f$ be continuous on $[a,b]$, $F(x)=\int\_0^xf(t)dt$. Then $F'(x)=f(x)$. "*Proof*": we have $$F(x+h)-F(x)=\int\_x^{x+h}f(t)dt,$$ so $$\tag{1} f(x)\leq\frac{F(x+h)-F(x)}h\leq f(x+h). $$ ...
38,278,689
I tried to use the below program ``` import os HOME= os.getcwd() STORE_INFO_FILE = os.path.join(HOME,'storeInfo') def searchStr(STORE_INFO_FILE, storeId): with open (STORE_INFO_FILE, 'r') as storeInfoFile: for storeLine in storeInfoFile: ## print storeLine.split(r'\s+')[0] if stor...
2016/07/09
[ "https://Stackoverflow.com/questions/38278689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1400123/" ]
It looks like you have an empty or blank line in your file: ``` >>> 'abc def hij\n'.split() ['abc', 'def', 'hij'] >>> ' \n'.split() # a blank line containing white space [] >>> '\n'.split() # an empty line [] ``` The last 2 cases show that an empty list can be returned by `split()`. Trying to index th...
Code has an issue if split method returns an empty list. You can change code that calls split method and add error handling code. Following can be done ``` storeLineWords = storeLine.split() if len(storeLineWords) > 0 and storeLineWords[0] == storeId: ```
169,003
I really want a surfing pikachu but what pokemon should I use for pokemon stadium?
2014/05/23
[ "https://gaming.stackexchange.com/questions/169003", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/77134/" ]
According to [IGN](http://www.ign.com/cheats/games/pokemon-stadium-n64-11154): > > To teach your Pikachu Surf (a technique it can normally not learn), you need to first unlock the R-2 (Round 2) mode. Then do the following: > > > * Enter the R-2 Prime Cup's Master Ball division (you have to beat the first three divi...
You're going to want an assortment of elements, I'd go with the following (all considered OU in gen 1 except mewtwo) ``` Mewtwo (uber) Zapdos Cloyster (or lapras) Rhydon (or golem) Dragonite Chansey (or snorlax) ``` Also have a few coverage moves, like ice beam or surf on dragonite and thunderbolt on chansey. Since ...
13,465,129
Let's say there's an object file input.obj. In the terminal, if I do "cat input.obj," it returns some random characters like "???A?J." But when I "hexdump" it, it shows the values I want to read in into my program. I read in this obj file into program.c, firstly by opening it using fopen and read byte by byte using fg...
2012/11/20
[ "https://Stackoverflow.com/questions/13465129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/551705/" ]
Essentially, you need to print the integer representation of each byte to get what you want, not the byte itself. Try this: ``` char ch = ...; // Set ch to the value you read from the file printf("%x", ch & 0xff); ``` The & 0xFF makes sure that the value is printed as 1 byte.
This was an issue which I had faced as well. Surprisingly fopen and fgetc won't get the whole text file and will reach EOF without parsing the whole object file. Use open() and read() system calls instead. You can check their syntax using man pages. They give you the whole object file as seen when you do $ hexdump -...
22,908,022
I have tried to print 1to 100 without using loops but I have not achieved it.how to print the numbers from 1 to 100 and back to 1 in c++ witout using loops and conditions.
2014/04/07
[ "https://Stackoverflow.com/questions/22908022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3505891/" ]
This worked: ``` #include <iostream> template <int N> void print() { std::cout << N << std::endl; print<N+1>(); } template <> void print<101>() { } int main() { print<1>(); } ``` With "clang++ -std=c++1y -o test print.cpp; ./test" "And back to 1" part can be done similarly, since it's an interview quest...
Are there some restrictions? What about the static member? This would do it: ``` std::cout<<1<<std::endl; std::cout<<2<<std::endl; std::cout<<3<<std::endl; std::cout<<4<<std::endl; std::cout<<5<<std::endl; std::cout<<6<<std::endl; std::cout<<7<<std::endl; std::cout<<8<<std::endl; std::cout<<9<<std::endl; std::cout<<1...
22,908,022
I have tried to print 1to 100 without using loops but I have not achieved it.how to print the numbers from 1 to 100 and back to 1 in c++ witout using loops and conditions.
2014/04/07
[ "https://Stackoverflow.com/questions/22908022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3505891/" ]
The power of RAII ``` class Printer { Printer() { ++i; std::cout << i << std::endl; } ~Printer() { std::cout << i << std::endl; --i; } static int i = 0; }; int main() { std::vector<Printer> p(100); return 0; } ```
Are there some restrictions? What about the static member? This would do it: ``` std::cout<<1<<std::endl; std::cout<<2<<std::endl; std::cout<<3<<std::endl; std::cout<<4<<std::endl; std::cout<<5<<std::endl; std::cout<<6<<std::endl; std::cout<<7<<std::endl; std::cout<<8<<std::endl; std::cout<<9<<std::endl; std::cout<<1...
64,945,532
my file(text file) looks like: ``` -1 1 2.99988E-02-4.93580E-17 4.28928E-17-2.01725E-16 4.57184E-18 1.54030E-16 -1 2 2.99988E-02-4.93581E-17-3.85396E-17-2.02655E-16-4.41397E-17-2.23963E-16 -1 3 2.99988E-02 2.47173E-17 4.28930E-17 1.60350E-16 5.28503E-17 1.53007E-16 ... ``` i want to create...
2020/11/21
[ "https://Stackoverflow.com/questions/64945532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14643125/" ]
Check ``` out = df[~pd.concat([df.timestamp.between(*x) for x in filt]).any(level=0)] Out[175]: timestamp x 0 0 1 3 5 4 4 6 5 5 7 6 9 100 1 ```
Can't you use filtering with `.isin()`: ``` left,removed = df[df['timestamp'].isin([0,5,6,7,100])],df[df['timestamp'].isin([1,2,11,22,33])] ```
901,979
What is generally the fastest algorithm to recursively make a directory (similar to UNIX mkdir -p) using the FTP protocol? I have considered one approach: 1. MKDIR node 2. if error and nodes left go to 1 with next node 3. end But this might have bad performance if part of the directory most likely exists. For exampl...
2009/05/23
[ "https://Stackoverflow.com/questions/901979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/111559/" ]
Considering that sending a command and receiving the response is taking most of the time, the fastest way to create a directory path is using as few commands as possible. As there is no way other than to try to create or cd into a directory to check for its existence, just using mkdir a; mkdir a/b; ..., mkdir a/b/c/d...
If the existing directory hierarchy is equally likely to end at any given depth, then **binary searching** for the start position will be the fastest way. But as [dseifert points out](https://stackoverflow.com/questions/901979/the-fastest-way-to-implement-mktree-in-ftp/903540#903540), if most of the time the directorie...
30,621
I’ve almost never encountered the word *einfallen* before, so it’s no wonder I don’t understand its meaning in the sentence: > > Mir fällt die Telefonnummer einfach nicht ein. > > > Dictionaries do everything they can to make the meaning of the sentence yet even more obscure, supplying me with translations like: ...
2016/06/30
[ "https://german.stackexchange.com/questions/30621", "https://german.stackexchange.com", "https://german.stackexchange.com/users/15775/" ]
*Einfallen* has a lot of meanings in German (see [dict.cc](http://www.dict.cc/?s=einfallen)). This is why the translator is a bit confused. In your case it would be > > to cross sb.'s mind > > to come into sb.'s mind / head > > to occur to sb. > > > I would translate your sentence as follows: > > The t...
It can be translated to "remember" or "recall". > > I just cannot remember the phone number. > > > So in this case it means the same as *erinnern an*. Edit: Just for fun: In a completely different and somewhat special context, "einfallen" can also have the meaning of "invade". Edit2: Changed "telephone" to "...
30,621
I’ve almost never encountered the word *einfallen* before, so it’s no wonder I don’t understand its meaning in the sentence: > > Mir fällt die Telefonnummer einfach nicht ein. > > > Dictionaries do everything they can to make the meaning of the sentence yet even more obscure, supplying me with translations like: ...
2016/06/30
[ "https://german.stackexchange.com/questions/30621", "https://german.stackexchange.com", "https://german.stackexchange.com/users/15775/" ]
*Einfallen* in this context is closely related to *erinnern*. While *sich an etwas erinnern* is a conscious process where the subject is the person *remembering* and thus the verb is best translated by *to remember something*, in the case of *einfallen* it is more an appearing idea — and the idea is also the subject. ...
*Einfallen* has a lot of meanings in German (see [dict.cc](http://www.dict.cc/?s=einfallen)). This is why the translator is a bit confused. In your case it would be > > to cross sb.'s mind > > to come into sb.'s mind / head > > to occur to sb. > > > I would translate your sentence as follows: > > The t...
30,621
I’ve almost never encountered the word *einfallen* before, so it’s no wonder I don’t understand its meaning in the sentence: > > Mir fällt die Telefonnummer einfach nicht ein. > > > Dictionaries do everything they can to make the meaning of the sentence yet even more obscure, supplying me with translations like: ...
2016/06/30
[ "https://german.stackexchange.com/questions/30621", "https://german.stackexchange.com", "https://german.stackexchange.com/users/15775/" ]
*Einfallen* has a lot of meanings in German (see [dict.cc](http://www.dict.cc/?s=einfallen)). This is why the translator is a bit confused. In your case it would be > > to cross sb.'s mind > > to come into sb.'s mind / head > > to occur to sb. > > > I would translate your sentence as follows: > > The t...
> > Mir fällt die Telefonnummer *einfach* nicht ein. > > > means > > I *just* can't remember the/this telephone number. > > >
30,621
I’ve almost never encountered the word *einfallen* before, so it’s no wonder I don’t understand its meaning in the sentence: > > Mir fällt die Telefonnummer einfach nicht ein. > > > Dictionaries do everything they can to make the meaning of the sentence yet even more obscure, supplying me with translations like: ...
2016/06/30
[ "https://german.stackexchange.com/questions/30621", "https://german.stackexchange.com", "https://german.stackexchange.com/users/15775/" ]
*Einfallen* has a lot of meanings in German (see [dict.cc](http://www.dict.cc/?s=einfallen)). This is why the translator is a bit confused. In your case it would be > > to cross sb.'s mind > > to come into sb.'s mind / head > > to occur to sb. > > > I would translate your sentence as follows: > > The t...
I would translate "einfallen" as "come to mind," or to remember. The literal translation is to "fall into." But a thought has to "fall into" something. That "something" is one's mind.
30,621
I’ve almost never encountered the word *einfallen* before, so it’s no wonder I don’t understand its meaning in the sentence: > > Mir fällt die Telefonnummer einfach nicht ein. > > > Dictionaries do everything they can to make the meaning of the sentence yet even more obscure, supplying me with translations like: ...
2016/06/30
[ "https://german.stackexchange.com/questions/30621", "https://german.stackexchange.com", "https://german.stackexchange.com/users/15775/" ]
*Einfallen* in this context is closely related to *erinnern*. While *sich an etwas erinnern* is a conscious process where the subject is the person *remembering* and thus the verb is best translated by *to remember something*, in the case of *einfallen* it is more an appearing idea — and the idea is also the subject. ...
It can be translated to "remember" or "recall". > > I just cannot remember the phone number. > > > So in this case it means the same as *erinnern an*. Edit: Just for fun: In a completely different and somewhat special context, "einfallen" can also have the meaning of "invade". Edit2: Changed "telephone" to "...
30,621
I’ve almost never encountered the word *einfallen* before, so it’s no wonder I don’t understand its meaning in the sentence: > > Mir fällt die Telefonnummer einfach nicht ein. > > > Dictionaries do everything they can to make the meaning of the sentence yet even more obscure, supplying me with translations like: ...
2016/06/30
[ "https://german.stackexchange.com/questions/30621", "https://german.stackexchange.com", "https://german.stackexchange.com/users/15775/" ]
It can be translated to "remember" or "recall". > > I just cannot remember the phone number. > > > So in this case it means the same as *erinnern an*. Edit: Just for fun: In a completely different and somewhat special context, "einfallen" can also have the meaning of "invade". Edit2: Changed "telephone" to "...
I would translate "einfallen" as "come to mind," or to remember. The literal translation is to "fall into." But a thought has to "fall into" something. That "something" is one's mind.
30,621
I’ve almost never encountered the word *einfallen* before, so it’s no wonder I don’t understand its meaning in the sentence: > > Mir fällt die Telefonnummer einfach nicht ein. > > > Dictionaries do everything they can to make the meaning of the sentence yet even more obscure, supplying me with translations like: ...
2016/06/30
[ "https://german.stackexchange.com/questions/30621", "https://german.stackexchange.com", "https://german.stackexchange.com/users/15775/" ]
*Einfallen* in this context is closely related to *erinnern*. While *sich an etwas erinnern* is a conscious process where the subject is the person *remembering* and thus the verb is best translated by *to remember something*, in the case of *einfallen* it is more an appearing idea — and the idea is also the subject. ...
> > Mir fällt die Telefonnummer *einfach* nicht ein. > > > means > > I *just* can't remember the/this telephone number. > > >
30,621
I’ve almost never encountered the word *einfallen* before, so it’s no wonder I don’t understand its meaning in the sentence: > > Mir fällt die Telefonnummer einfach nicht ein. > > > Dictionaries do everything they can to make the meaning of the sentence yet even more obscure, supplying me with translations like: ...
2016/06/30
[ "https://german.stackexchange.com/questions/30621", "https://german.stackexchange.com", "https://german.stackexchange.com/users/15775/" ]
*Einfallen* in this context is closely related to *erinnern*. While *sich an etwas erinnern* is a conscious process where the subject is the person *remembering* and thus the verb is best translated by *to remember something*, in the case of *einfallen* it is more an appearing idea — and the idea is also the subject. ...
I would translate "einfallen" as "come to mind," or to remember. The literal translation is to "fall into." But a thought has to "fall into" something. That "something" is one's mind.
30,621
I’ve almost never encountered the word *einfallen* before, so it’s no wonder I don’t understand its meaning in the sentence: > > Mir fällt die Telefonnummer einfach nicht ein. > > > Dictionaries do everything they can to make the meaning of the sentence yet even more obscure, supplying me with translations like: ...
2016/06/30
[ "https://german.stackexchange.com/questions/30621", "https://german.stackexchange.com", "https://german.stackexchange.com/users/15775/" ]
> > Mir fällt die Telefonnummer *einfach* nicht ein. > > > means > > I *just* can't remember the/this telephone number. > > >
I would translate "einfallen" as "come to mind," or to remember. The literal translation is to "fall into." But a thought has to "fall into" something. That "something" is one's mind.
32,751,495
I'm having a problem with this simple layout: ``` <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <EditText android:id="@+id/editText1" android:layout_width="wrap_content" andr...
2015/09/24
[ "https://Stackoverflow.com/questions/32751495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2710256/" ]
It appears to be a bug in Dapper. This is confirmed to work in the latest NuGet package: ``` foreach (var paramName in parameters.ParameterNames) { var value = ((SqlMapper.IParameterLookup)parameters)[paramName]; } ``` However, it's a bit verbose. Locally using the [Dapper](https://github.com/StackExchange/dappe...
The `DynamicParameters` object can contain several sections for each time it has been appended. So it's not enugh to iterate through `ParameterNames` (it will be empty) like in the answer above. ``` public static Dictionary<string, object> ToParametersDictionary(this DynamicParameters dynamicParams) { var argsDict...
142,195
Does AIC require the residuals of the models to be compared to be normally distributed?
2015/03/17
[ "https://stats.stackexchange.com/questions/142195", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/71399/" ]
No, but the likelihood function used in the AIC formula should match the distribution of the residuals (see point 3. [here](http://robjhyndman.com/hyndsight/aic/)). If a normal likelihood is used when the residuals are actually non-normal, that will generally invalidate AIC (except perhaps for some special cases).
After reading the resource pointed out by @Richard Hardy, my take-away is: No, AIC does not necessarily assume that the residual distribution is normal. *However*, it *does* assume that the model was fit by maximum-likelihood rather than any other method (such as least-squares). If and only if the residuals of a least...
142,195
Does AIC require the residuals of the models to be compared to be normally distributed?
2015/03/17
[ "https://stats.stackexchange.com/questions/142195", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/71399/" ]
No, but the likelihood function used in the AIC formula should match the distribution of the residuals (see point 3. [here](http://robjhyndman.com/hyndsight/aic/)). If a normal likelihood is used when the residuals are actually non-normal, that will generally invalidate AIC (except perhaps for some special cases).
To answer your question, see below that we are using the letter $f$ twice. That's because this framework assumes you're looking at the right class of models. (Twice) the Kullback-Leibler divergence between your model's density $f(\mathbf{x} ; \psi)$ and the true model $f(\mathbf{x} ; \theta)$ is \begin{align\*} d(\p...
142,195
Does AIC require the residuals of the models to be compared to be normally distributed?
2015/03/17
[ "https://stats.stackexchange.com/questions/142195", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/71399/" ]
To answer your question, see below that we are using the letter $f$ twice. That's because this framework assumes you're looking at the right class of models. (Twice) the Kullback-Leibler divergence between your model's density $f(\mathbf{x} ; \psi)$ and the true model $f(\mathbf{x} ; \theta)$ is \begin{align\*} d(\p...
After reading the resource pointed out by @Richard Hardy, my take-away is: No, AIC does not necessarily assume that the residual distribution is normal. *However*, it *does* assume that the model was fit by maximum-likelihood rather than any other method (such as least-squares). If and only if the residuals of a least...
59,763,708
I'm having overflowed text and I want to display the number of words that are hidden by overflow. For example: I'm having the string: `I want to see the overflowed words that are hidden in here`. And my div can only contain 3 words. So I want to see: `I want to +9`. This is what I have: ```js let items = [ "item ...
2020/01/16
[ "https://Stackoverflow.com/questions/59763708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3729184/" ]
### UPDATE after comment: Okay, after the clarification I think I have a better handle on what you are trying to achieve. The code below almost exactly does what you want - but this is not an elegant solution, for sure. The fixed width, the character-limit still being there as a constant are both liabilities (e.g. whe...
You can create a variable that hold the length of the hole text minus the length of the text that can view in your case "I want to" is 9 chars then ``` $scope.hiddenChars=YourHoleText.length-9; ``` and display `$scope.hiddenChars` value in case it is greater than zero