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
14,629,795
I am using asp.net to render a page consisting of numerous sets of text boxes. The number of groups depends on the customer, so it is not in my control. what I want is so that when teh values in the entry boxes in a group are changed, then the result box for that group changes to sum the total of the group, and also ...
2013/01/31
[ "https://Stackoverflow.com/questions/14629795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/644854/" ]
Have one base project that uses multiple targets. Each target can include a subset of the files in your main project, and/or add their own independent files. Each target can also have its own set of preprocessor defines set up in the build configuration.
You can add more targets to your project in Xcode.
14,629,795
I am using asp.net to render a page consisting of numerous sets of text boxes. The number of groups depends on the customer, so it is not in my control. what I want is so that when teh values in the entry boxes in a group are changed, then the result box for that group changes to sum the total of the group, and also ...
2013/01/31
[ "https://Stackoverflow.com/questions/14629795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/644854/" ]
Have one base project that uses multiple targets. Each target can include a subset of the files in your main project, and/or add their own independent files. Each target can also have its own set of preprocessor defines set up in the build configuration.
Create a project that builds a static library for the reusable components. You can use an Aggregate target to package any associated resources, such as nib files, storyboards, images, etc. Your app projects can all then consume the static library and resources. Any changes to the static library will be available to a...
39,246,326
How can I globally overload error messages getting ,for example, from [Required] attribute? Probably, I should change CultureInfo, but I can't find any tutorials. Language still English as default. Thank you!
2016/08/31
[ "https://Stackoverflow.com/questions/39246326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5311920/" ]
A first reference on globalization and localization of ASP.NET Core is <https://docs.asp.net/en/latest/fundamentals/localization.html>. There you'll find information about how to translate data annotations and how to configure ASP.NET Core to select the appropriate language / `CultureInfo` for each request. > > Dat...
You can try using `ErrorMessageResourceName` and `ErrorMessageResourceType`, using resource files to store messages.
19,497,411
My problem is that the images I want to be displayed inline, are displayed in a list form. I don't know what am I doing wrong, because in my opinion everything is correct. html ==== ``` <div class="loga"> <img style="display:inline;" src="photos/logoWUT_czarne.PNG" width="370" height="135"> <img style="display:inline...
2013/10/21
[ "https://Stackoverflow.com/questions/19497411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1828352/" ]
Leverage Spring's overriding mechanism: ``` <context:property-placeholder ignore-resource-not-found="true" location="classpath:default.properties,classpath:override.properties" /> ``` With `src/main/resources/default.properties` defining the default properties values and `src/test/resources/override.properti...
Also below solution is helpful. ``` <context:property-placeholder local-override="true" location="persistence.properties"/> ``` And in have file like below with overridden peroperties : ``` test/resources/persistence-override.properties ``` Please notice to word **"override"** in file name.
40,724,247
What am I doing wrong here? Only one e-mail address receives email and not the other one. So `my@email.com` receives it and `yours@email.com` does not receive it. ``` #!/usr/bin/python3 import smtplib, ssl import email.message import email.utils from email.mime.multipart import MIMEMultipart from email.mime.base impo...
2016/11/21
[ "https://Stackoverflow.com/questions/40724247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6646696/" ]
To tackle this kind of issue, you need to have the `<div>` with an attribute `hidden` or something in the inline. Then you need to hide it with JS and the remove the inline thing. ```js $(function () { $(".hide").hide().removeClass("hide"); }); ``` ```css .hide {display: none;} ``` ```html <script src="https://a...
In the CSS that you apply to your div, add: ``` display:none; ``` So the div will be loaded but invisible. When you need to you it, you can do as you are doing now
40,724,247
What am I doing wrong here? Only one e-mail address receives email and not the other one. So `my@email.com` receives it and `yours@email.com` does not receive it. ``` #!/usr/bin/python3 import smtplib, ssl import email.message import email.utils from email.mime.multipart import MIMEMultipart from email.mime.base impo...
2016/11/21
[ "https://Stackoverflow.com/questions/40724247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6646696/" ]
To tackle this kind of issue, you need to have the `<div>` with an attribute `hidden` or something in the inline. Then you need to hide it with JS and the remove the inline thing. ```js $(function () { $(".hide").hide().removeClass("hide"); }); ``` ```css .hide {display: none;} ``` ```html <script src="https://a...
Just add hidden attribute to your div and it should fix your problem then remove it by javascript when you want to show it
40,724,247
What am I doing wrong here? Only one e-mail address receives email and not the other one. So `my@email.com` receives it and `yours@email.com` does not receive it. ``` #!/usr/bin/python3 import smtplib, ssl import email.message import email.utils from email.mime.multipart import MIMEMultipart from email.mime.base impo...
2016/11/21
[ "https://Stackoverflow.com/questions/40724247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6646696/" ]
To tackle this kind of issue, you need to have the `<div>` with an attribute `hidden` or something in the inline. Then you need to hide it with JS and the remove the inline thing. ```js $(function () { $(".hide").hide().removeClass("hide"); }); ``` ```css .hide {display: none;} ``` ```html <script src="https://a...
```js $(document).ready(function() { $('#myDiv').hide(); }); ``` ```html <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> </head> <body> <div id="myDiv"><p>hello</p></div> </body> ``` Yes you can create the div by javascript. ```js var div = document.crea...
40,724,247
What am I doing wrong here? Only one e-mail address receives email and not the other one. So `my@email.com` receives it and `yours@email.com` does not receive it. ``` #!/usr/bin/python3 import smtplib, ssl import email.message import email.utils from email.mime.multipart import MIMEMultipart from email.mime.base impo...
2016/11/21
[ "https://Stackoverflow.com/questions/40724247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6646696/" ]
In the CSS that you apply to your div, add: ``` display:none; ``` So the div will be loaded but invisible. When you need to you it, you can do as you are doing now
Just add hidden attribute to your div and it should fix your problem then remove it by javascript when you want to show it
40,724,247
What am I doing wrong here? Only one e-mail address receives email and not the other one. So `my@email.com` receives it and `yours@email.com` does not receive it. ``` #!/usr/bin/python3 import smtplib, ssl import email.message import email.utils from email.mime.multipart import MIMEMultipart from email.mime.base impo...
2016/11/21
[ "https://Stackoverflow.com/questions/40724247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6646696/" ]
In the CSS that you apply to your div, add: ``` display:none; ``` So the div will be loaded but invisible. When you need to you it, you can do as you are doing now
```js $(document).ready(function() { $('#myDiv').hide(); }); ``` ```html <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> </head> <body> <div id="myDiv"><p>hello</p></div> </body> ``` Yes you can create the div by javascript. ```js var div = document.crea...
13,741,314
I have a SortedDictionary where I am holding points of a particular player and his name next to it. What I need to do is to sort this in a descending order so that I have the winner in the first position of the dictionary. How can I do that? Also, how can I get an item from the list without knowing the key? ``` Sorte...
2012/12/06
[ "https://Stackoverflow.com/questions/13741314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1839698/" ]
It doesn't really make sense to use a dictionary with the score as the key: the key must be unique, so it will fail if two players have the same score. Instead, you should create a `Player` class that contains the name and score, and store `Player` objects in a `List<Player>`. If you need to sort the players by score,...
For first I think you should switch places of `<int, string>` player name should be key, and points would be values. Then you can sort it by values: ``` dict.Sort( delegate(KeyValuePair<int, double> val1, KeyValuePair<int, double> val2) { return val1.Value.CompareTo(val2.Value); } ); ``` You...
13,741,314
I have a SortedDictionary where I am holding points of a particular player and his name next to it. What I need to do is to sort this in a descending order so that I have the winner in the first position of the dictionary. How can I do that? Also, how can I get an item from the list without knowing the key? ``` Sorte...
2012/12/06
[ "https://Stackoverflow.com/questions/13741314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1839698/" ]
It doesn't really make sense to use a dictionary with the score as the key: the key must be unique, so it will fail if two players have the same score. Instead, you should create a `Player` class that contains the name and score, and store `Player` objects in a `List<Player>`. If you need to sort the players by score,...
First: A Sorted Dictionary will always be sorted immediately, when you insert another Value. But note: Using the points as KEY means that you cannot have players with EQUAL points. But if you want to go with that, you can simple use the Last() Method of your Dictionary to get the player with the most points: ``` Sor...
13,741,314
I have a SortedDictionary where I am holding points of a particular player and his name next to it. What I need to do is to sort this in a descending order so that I have the winner in the first position of the dictionary. How can I do that? Also, how can I get an item from the list without knowing the key? ``` Sorte...
2012/12/06
[ "https://Stackoverflow.com/questions/13741314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1839698/" ]
It doesn't really make sense to use a dictionary with the score as the key: the key must be unique, so it will fail if two players have the same score. Instead, you should create a `Player` class that contains the name and score, and store `Player` objects in a `List<Player>`. If you need to sort the players by score,...
The answer to my problem was this to anyone who might need it :) ``` Player player1 = new Player(playerNames[0], player1Pts); Player player2 = new Player(playerNames[1], player2Pts); Player player3 = new Player(playerNames[2], player3Pts); Player player4 = new Player(playerNames[3], player4Pts); Player player5 = new P...
13,741,314
I have a SortedDictionary where I am holding points of a particular player and his name next to it. What I need to do is to sort this in a descending order so that I have the winner in the first position of the dictionary. How can I do that? Also, how can I get an item from the list without knowing the key? ``` Sorte...
2012/12/06
[ "https://Stackoverflow.com/questions/13741314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1839698/" ]
It doesn't really make sense to use a dictionary with the score as the key: the key must be unique, so it will fail if two players have the same score. Instead, you should create a `Player` class that contains the name and score, and store `Player` objects in a `List<Player>`. If you need to sort the players by score,...
While there are several answers to the question, none of these seem to take advantage of the SortedDictionary structure. If you want the SortedDictionary to be designed as a max heap rather than the default min heap, I think the best solution is to overwrite the default comparer that C# uses. This can be done as follow...
13,741,314
I have a SortedDictionary where I am holding points of a particular player and his name next to it. What I need to do is to sort this in a descending order so that I have the winner in the first position of the dictionary. How can I do that? Also, how can I get an item from the list without knowing the key? ``` Sorte...
2012/12/06
[ "https://Stackoverflow.com/questions/13741314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1839698/" ]
First: A Sorted Dictionary will always be sorted immediately, when you insert another Value. But note: Using the points as KEY means that you cannot have players with EQUAL points. But if you want to go with that, you can simple use the Last() Method of your Dictionary to get the player with the most points: ``` Sor...
For first I think you should switch places of `<int, string>` player name should be key, and points would be values. Then you can sort it by values: ``` dict.Sort( delegate(KeyValuePair<int, double> val1, KeyValuePair<int, double> val2) { return val1.Value.CompareTo(val2.Value); } ); ``` You...
13,741,314
I have a SortedDictionary where I am holding points of a particular player and his name next to it. What I need to do is to sort this in a descending order so that I have the winner in the first position of the dictionary. How can I do that? Also, how can I get an item from the list without knowing the key? ``` Sorte...
2012/12/06
[ "https://Stackoverflow.com/questions/13741314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1839698/" ]
First: A Sorted Dictionary will always be sorted immediately, when you insert another Value. But note: Using the points as KEY means that you cannot have players with EQUAL points. But if you want to go with that, you can simple use the Last() Method of your Dictionary to get the player with the most points: ``` Sor...
The answer to my problem was this to anyone who might need it :) ``` Player player1 = new Player(playerNames[0], player1Pts); Player player2 = new Player(playerNames[1], player2Pts); Player player3 = new Player(playerNames[2], player3Pts); Player player4 = new Player(playerNames[3], player4Pts); Player player5 = new P...
13,741,314
I have a SortedDictionary where I am holding points of a particular player and his name next to it. What I need to do is to sort this in a descending order so that I have the winner in the first position of the dictionary. How can I do that? Also, how can I get an item from the list without knowing the key? ``` Sorte...
2012/12/06
[ "https://Stackoverflow.com/questions/13741314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1839698/" ]
First: A Sorted Dictionary will always be sorted immediately, when you insert another Value. But note: Using the points as KEY means that you cannot have players with EQUAL points. But if you want to go with that, you can simple use the Last() Method of your Dictionary to get the player with the most points: ``` Sor...
While there are several answers to the question, none of these seem to take advantage of the SortedDictionary structure. If you want the SortedDictionary to be designed as a max heap rather than the default min heap, I think the best solution is to overwrite the default comparer that C# uses. This can be done as follow...
54,222,314
``` a=[int(i) for i in input().split()] b=[] for i in range(a[0]): x=[int(i) for i in input().split()] b.append(x) print(b) c=[] for j in range(len(b)): c.append(max(b[i])) print(b[0]) print(c) ``` ``` 2 1 3 45 6 8 2 4 56 7 [[1, 3, 45, 6, 8], [2, 4, 56, 7]] [1, 3, 45, 6, 8] [56, 56, 56] ``` i want t...
2019/01/16
[ "https://Stackoverflow.com/questions/54222314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10603376/" ]
You have a 2D list and are trying to return a list of the maxes for each element in that 2D list. Iterate over the 2D list and take the max for each element: ``` res = [max(i) for i in nested_list] ``` Additionally you can also use `map`: ``` res = list(map(max, nested_list)) ```
You can use a [list comprehension](https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions) that takes the max for each sub-list `l`: ``` b = [[1, 3, 45, 6, 8], [2, 4, 56, 7]] c = [max(l) for l in b] print(c) ``` **Output** ``` [45, 56] ``` The above list comprehension is *equivalent* to the f...
54,222,314
``` a=[int(i) for i in input().split()] b=[] for i in range(a[0]): x=[int(i) for i in input().split()] b.append(x) print(b) c=[] for j in range(len(b)): c.append(max(b[i])) print(b[0]) print(c) ``` ``` 2 1 3 45 6 8 2 4 56 7 [[1, 3, 45, 6, 8], [2, 4, 56, 7]] [1, 3, 45, 6, 8] [56, 56, 56] ``` i want t...
2019/01/16
[ "https://Stackoverflow.com/questions/54222314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10603376/" ]
You have a 2D list and are trying to return a list of the maxes for each element in that 2D list. Iterate over the 2D list and take the max for each element: ``` res = [max(i) for i in nested_list] ``` Additionally you can also use `map`: ``` res = list(map(max, nested_list)) ```
You can also convert your nested list to `Pandas Dataframe` and use `max` function. **You won't have to worry about loops then.** ``` In [350]: import pandas as pd In [342]: l = [[1, 3, 45, 6, 8], [2, 4, 56, 7]] In [343]: pd.DataFrame(l) Out[343]: 0 1 2 3 4 0 1 3 45 6 8.0 1 2 4 56 7 NaN In [34...
6,026
I am playing bass in a humorous metal band. The idea is to make parody out of metal using as many cliches as possible (at the same time respecting the scene and having fun, of course). We have some bass solos in our songs and I am feeling that my 4 strings just aren't enough for playing the high pitched notes in solos ...
2012/04/23
[ "https://music.stackexchange.com/questions/6026", "https://music.stackexchange.com", "https://music.stackexchange.com/users/2281/" ]
When you think "evil" and "bass guitar" the brand that immediately comes to mind is BC Rich: ![enter image description here](https://i.stack.imgur.com/SL9DH.jpg) These guys practically invented the ultra-spiky death metal instrument look. If you want to look the part, get a BC Rich. If you don't go this route, look a...
A1: it is not about how many strings the bass has. if you need them all, buy it. you won't lose! A2: I know more about guitar, but I would recommend Ibanez and yamaha basses. A3: yes! there are bass distortions, and you'll need some compression, too!
6,026
I am playing bass in a humorous metal band. The idea is to make parody out of metal using as many cliches as possible (at the same time respecting the scene and having fun, of course). We have some bass solos in our songs and I am feeling that my 4 strings just aren't enough for playing the high pitched notes in solos ...
2012/04/23
[ "https://music.stackexchange.com/questions/6026", "https://music.stackexchange.com", "https://music.stackexchange.com/users/2281/" ]
Why would it need to look evil if it's a parody? Wouldn't that mean it shouldn't look evil? Shouldn't you use a Hello Kitty bass? Just the same you should get the cheapest basses you can find on Craigslist so you can smash them. Alex Webster's bass is a Spectre custom 5 string ... $2800 list.. so there's no joke abou...
A1: it is not about how many strings the bass has. if you need them all, buy it. you won't lose! A2: I know more about guitar, but I would recommend Ibanez and yamaha basses. A3: yes! there are bass distortions, and you'll need some compression, too!
6,026
I am playing bass in a humorous metal band. The idea is to make parody out of metal using as many cliches as possible (at the same time respecting the scene and having fun, of course). We have some bass solos in our songs and I am feeling that my 4 strings just aren't enough for playing the high pitched notes in solos ...
2012/04/23
[ "https://music.stackexchange.com/questions/6026", "https://music.stackexchange.com", "https://music.stackexchange.com/users/2281/" ]
When you think "evil" and "bass guitar" the brand that immediately comes to mind is BC Rich: ![enter image description here](https://i.stack.imgur.com/SL9DH.jpg) These guys practically invented the ultra-spiky death metal instrument look. If you want to look the part, get a BC Rich. If you don't go this route, look a...
Why would it need to look evil if it's a parody? Wouldn't that mean it shouldn't look evil? Shouldn't you use a Hello Kitty bass? Just the same you should get the cheapest basses you can find on Craigslist so you can smash them. Alex Webster's bass is a Spectre custom 5 string ... $2800 list.. so there's no joke abou...
70,454,217
I downloaded a project to work at home. I managed to get it up and running, but after two days banging my head against the wall I cannot, for the life of me figure out the following error: "GET <http://127.0.0.1:8000/public/site/assets/js/jquery-3.3.1.min.js> Status 404 Not Found" This happens on EVERY file in the pu...
2021/12/22
[ "https://Stackoverflow.com/questions/70454217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12344761/" ]
I have deleted old entries and added them again, warning disappeared.
You may fix it in config.xml files directly using GNU sed/find. Go to $JENKINS\_HOME (usually /var/lib/jenkins) and run this command: ``` find config.xml jobs/ -name config.xml -exec sed -i '/USER:\|GROUP:/! s/<permission>/<permission>USER:/' '{}' \; ``` It will change the global config first (the global permissions...
70,454,217
I downloaded a project to work at home. I managed to get it up and running, but after two days banging my head against the wall I cannot, for the life of me figure out the following error: "GET <http://127.0.0.1:8000/public/site/assets/js/jquery-3.3.1.min.js> Status 404 Not Found" This happens on EVERY file in the pu...
2021/12/22
[ "https://Stackoverflow.com/questions/70454217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12344761/" ]
There should be a button next to flagged ambiguous rows (on the right side of the permissions matrix) allowing you to quickly select whether that row is a user or a group. That was the fastest way I found so far
You may fix it in config.xml files directly using GNU sed/find. Go to $JENKINS\_HOME (usually /var/lib/jenkins) and run this command: ``` find config.xml jobs/ -name config.xml -exec sed -i '/USER:\|GROUP:/! s/<permission>/<permission>USER:/' '{}' \; ``` It will change the global config first (the global permissions...
9,302,858
I'm following the CoreDataRecipes app for modaly showing the add screen when I want to add a new item. However I cannot get the bar to display at the top so I can press 'Done' or 'Cancel'. In the xib calling the modal controller I have the + button linked to modally sliding up the controller via IB. I have the below ...
2012/02/15
[ "https://Stackoverflow.com/questions/9302858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/442695/" ]
You need to add it before the popover is actually presented. Where you create the modal popover, you need to create it inside a UINavigationController first. So, do the following. ``` PopoverView *foo = [[PopoverView alloc] initWithNibName:@"PopoverView" bundle:nil]; // Here you pass through properties if you need...
*Alternatively*, you could maintain your storyboard segue. In Xcode, select the view controller you are trying to transition to and embed it in a navigation controller. Now in the viewDidLoad of that view controller, add: ``` self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" sty...
9,302,858
I'm following the CoreDataRecipes app for modaly showing the add screen when I want to add a new item. However I cannot get the bar to display at the top so I can press 'Done' or 'Cancel'. In the xib calling the modal controller I have the + button linked to modally sliding up the controller via IB. I have the below ...
2012/02/15
[ "https://Stackoverflow.com/questions/9302858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/442695/" ]
You need to add it before the popover is actually presented. Where you create the modal popover, you need to create it inside a UINavigationController first. So, do the following. ``` PopoverView *foo = [[PopoverView alloc] initWithNibName:@"PopoverView" bundle:nil]; // Here you pass through properties if you need...
Or if you just need the look of the bar, not exactly its functionality, you could drag the Navigation Bar (UINavigationBar) or Toolbar (UIToolbar) controll from the Media Library panel onto your view and go from there.
9,302,858
I'm following the CoreDataRecipes app for modaly showing the add screen when I want to add a new item. However I cannot get the bar to display at the top so I can press 'Done' or 'Cancel'. In the xib calling the modal controller I have the + button linked to modally sliding up the controller via IB. I have the below ...
2012/02/15
[ "https://Stackoverflow.com/questions/9302858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/442695/" ]
You need to add it before the popover is actually presented. Where you create the modal popover, you need to create it inside a UINavigationController first. So, do the following. ``` PopoverView *foo = [[PopoverView alloc] initWithNibName:@"PopoverView" bundle:nil]; // Here you pass through properties if you need...
I had a similar predicament whereby I was loading a UITableViewController in a containerView. The containerView was inside a UIViewController which was being presented in a modal fashion. I, like you, needed the navigation bar to have a title and a Done/Cancel button. After overflowing the stack, I finally did this -...
9,302,858
I'm following the CoreDataRecipes app for modaly showing the add screen when I want to add a new item. However I cannot get the bar to display at the top so I can press 'Done' or 'Cancel'. In the xib calling the modal controller I have the + button linked to modally sliding up the controller via IB. I have the below ...
2012/02/15
[ "https://Stackoverflow.com/questions/9302858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/442695/" ]
*Alternatively*, you could maintain your storyboard segue. In Xcode, select the view controller you are trying to transition to and embed it in a navigation controller. Now in the viewDidLoad of that view controller, add: ``` self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" sty...
Or if you just need the look of the bar, not exactly its functionality, you could drag the Navigation Bar (UINavigationBar) or Toolbar (UIToolbar) controll from the Media Library panel onto your view and go from there.
9,302,858
I'm following the CoreDataRecipes app for modaly showing the add screen when I want to add a new item. However I cannot get the bar to display at the top so I can press 'Done' or 'Cancel'. In the xib calling the modal controller I have the + button linked to modally sliding up the controller via IB. I have the below ...
2012/02/15
[ "https://Stackoverflow.com/questions/9302858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/442695/" ]
*Alternatively*, you could maintain your storyboard segue. In Xcode, select the view controller you are trying to transition to and embed it in a navigation controller. Now in the viewDidLoad of that view controller, add: ``` self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" sty...
I had a similar predicament whereby I was loading a UITableViewController in a containerView. The containerView was inside a UIViewController which was being presented in a modal fashion. I, like you, needed the navigation bar to have a title and a Done/Cancel button. After overflowing the stack, I finally did this -...
26,197,443
I want to use `TextButton` for my custom made buttons but this requires me to (re)position the `text` or `Label` within that `TextButton`. I have tried some options but i am pretty stuck. ``` //this seems straightforward but nothing changes. final TextButton b = new TextButton("LABEL", skin); b.getLabel().setPosition(...
2014/10/04
[ "https://Stackoverflow.com/questions/26197443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1322271/" ]
there is no way to do it in this format. you should send **Dataitem** to a static method and then you should return string that contains your markup.. ``` public static string GetMarkup(object dataItem) { var tags = DataBinder.Eval(dataItem, "etiketler"); // depend on etiketler type StringBuilder sb = new Str...
`<%#` is not made to use `foreach` with it, neither `if` or other language keywords. It's mainly done to databinding. But you can : * Do it in codebehind with the \_ItemDataBound event of the repeater (hugely recommanded for complex processings/formatting). See <http://msdn.microsoft.com/fr-fr/library/system.web.ui....
26,197,443
I want to use `TextButton` for my custom made buttons but this requires me to (re)position the `text` or `Label` within that `TextButton`. I have tried some options but i am pretty stuck. ``` //this seems straightforward but nothing changes. final TextButton b = new TextButton("LABEL", skin); b.getLabel().setPosition(...
2014/10/04
[ "https://Stackoverflow.com/questions/26197443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1322271/" ]
`<%#` is not made to use `foreach` with it, neither `if` or other language keywords. It's mainly done to databinding. But you can : * Do it in codebehind with the \_ItemDataBound event of the repeater (hugely recommanded for complex processings/formatting). See <http://msdn.microsoft.com/fr-fr/library/system.web.ui....
You can also use nested repeaters in ASP.NET ``` <asp:Repeater runat="server" ID="rpt1"> <ItemTemplate> <asp:Repeater runat="server" ID ="rpt2" DataSource='<%# Eval("etiketler") %>'> <ItemTemplate> <%# Eval("tag") %> </ItemTemplate> </asp:Repeater> </ItemTemplate> </asp:Repeater> ```
26,197,443
I want to use `TextButton` for my custom made buttons but this requires me to (re)position the `text` or `Label` within that `TextButton`. I have tried some options but i am pretty stuck. ``` //this seems straightforward but nothing changes. final TextButton b = new TextButton("LABEL", skin); b.getLabel().setPosition(...
2014/10/04
[ "https://Stackoverflow.com/questions/26197443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1322271/" ]
there is no way to do it in this format. you should send **Dataitem** to a static method and then you should return string that contains your markup.. ``` public static string GetMarkup(object dataItem) { var tags = DataBinder.Eval(dataItem, "etiketler"); // depend on etiketler type StringBuilder sb = new Str...
You can also use nested repeaters in ASP.NET ``` <asp:Repeater runat="server" ID="rpt1"> <ItemTemplate> <asp:Repeater runat="server" ID ="rpt2" DataSource='<%# Eval("etiketler") %>'> <ItemTemplate> <%# Eval("tag") %> </ItemTemplate> </asp:Repeater> </ItemTemplate> </asp:Repeater> ```
51,768
I will soon be working on a self employed basis for a company based in Poland,but I'm still going to be based in the UK (working remotely/online as a consultant) and my question is do I need to pay taxes and national insurance in Poland as all my income will come from a Polish based company or in the UK as I will still...
2015/08/11
[ "https://money.stackexchange.com/questions/51768", "https://money.stackexchange.com", "https://money.stackexchange.com/users/32140/" ]
If you are *really* self employed, you will pay UK tax as a self employed person. This can be quite useful as there may well be some legitimate costs you can deduct. If, however, you are in effect an employee, the tax situation will be different, and you will be taxed as an employee. If you continue to live in the UK,...
If you are a UK resident, you'll pay UK tax and will need to do a tax return every year as a self-employed worker. It's really easy to file your taxes on the [HMRC website](https://www.gov.uk/topic/personal-tax/self-assessment) and you can also use an [online calculator](https://salarycalculatorpro.com) to work out how...
56,624,624
I have a flask application running on Ec-2 instance. I could access it from the outside environment with `http:ip-address:5000` where IP-address is the public address of my ec-2 instance. My flask application code: ``` from flask import Flask app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def my_form...
2019/06/17
[ "https://Stackoverflow.com/questions/56624624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11223433/" ]
I suspect the user on your machine using which you're running docker command is a non-root user. Suppose your current user on ec2-machine is `user1` (You can verify that by running `users` command). Then run this command to add the user1 to `docker group`. `usermod -aG docker user1` and then try to run your container...
Using `sudo` while building docker images and running docker container resolved this issue. `sudo` helps to run non-root containers
16,693,479
I am attempting to take the `id` of each row of the datagrid `dgGrid` that has a checkbox selected and place it into an array `ruleids`. I've looked up examples online and noticed that this loop comes up. when I attempted to reconstruct the logic I get this error: > > System.Web.UI.WebControls does not contain a de...
2013/05/22
[ "https://Stackoverflow.com/questions/16693479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2382058/" ]
Datagrid does not contain a definition for "rows". Instead of rows, it has "items". So try with Datagrid.items... ``` foreach (GridViewItem gvr in dgGrid.Items) { //BLA BLA BLA... } ``` Hope this helps you...
``` foreach (DataGridItem dgi in DataGrid1.Items) { tb.text = dgi.Cells[0].Text; } ``` I Use this to loop DataGrid I hope to help you.
13,664,883
I have a path and I am trying to pop off everything after the last /, so 'folder' in this case, leaving the newpath as C://local/drive/folder/. I tried to pop off the last / using pop(), but can't get the first part of the path to be the new path: ``` var path = C://local/drive/folder/folder var newpath = path.split(...
2012/12/01
[ "https://Stackoverflow.com/questions/13664883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841414/" ]
Use `.slice()` instead of `pop()` ``` var newpath = path.split("/").slice(0, -1).join("/"); ``` --- If you also need the last part, then just use `.pop()`, but first store the Array in a separate variable. ``` var parts = path.split("/"); var last = parts.pop(); var first = parts.join("/"); ``` Now `last` has t...
``` var foo = "C://local/drive/folder/folder"; foo.match(/(.+\/)[^\/]+$/); ``` would result in: `["C://local/drive/folder/folder", "C://local/drive/folder/"]` though i would prefer user1689607's answer
13,664,883
I have a path and I am trying to pop off everything after the last /, so 'folder' in this case, leaving the newpath as C://local/drive/folder/. I tried to pop off the last / using pop(), but can't get the first part of the path to be the new path: ``` var path = C://local/drive/folder/folder var newpath = path.split(...
2012/12/01
[ "https://Stackoverflow.com/questions/13664883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841414/" ]
Use `.slice()` instead of `pop()` ``` var newpath = path.split("/").slice(0, -1).join("/"); ``` --- If you also need the last part, then just use `.pop()`, but first store the Array in a separate variable. ``` var parts = path.split("/"); var last = parts.pop(); var first = parts.join("/"); ``` Now `last` has t...
Could also use a regex: ``` function stripLastPiece(path) { var matches = path.match(/^(.*\/)[^\/]+$/); if (matches) { return(matches[1]); } return(path); } ``` Working example: <http://jsfiddle.net/jfriend00/av7Mn/>
13,664,883
I have a path and I am trying to pop off everything after the last /, so 'folder' in this case, leaving the newpath as C://local/drive/folder/. I tried to pop off the last / using pop(), but can't get the first part of the path to be the new path: ``` var path = C://local/drive/folder/folder var newpath = path.split(...
2012/12/01
[ "https://Stackoverflow.com/questions/13664883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841414/" ]
Use `.slice()` instead of `pop()` ``` var newpath = path.split("/").slice(0, -1).join("/"); ``` --- If you also need the last part, then just use `.pop()`, but first store the Array in a separate variable. ``` var parts = path.split("/"); var last = parts.pop(); var first = parts.join("/"); ``` Now `last` has t...
Just replace the last statement to be like that: ``` var path = C://local/drive/folder/folder path.split("/").pop(); // Discard the poped element. var newpath = path.join("/"); // It will be C://local/drive/folder ``` **A note about `Array.pop`**: Each time you call the `pop` method it will *return* the last element...
13,664,883
I have a path and I am trying to pop off everything after the last /, so 'folder' in this case, leaving the newpath as C://local/drive/folder/. I tried to pop off the last / using pop(), but can't get the first part of the path to be the new path: ``` var path = C://local/drive/folder/folder var newpath = path.split(...
2012/12/01
[ "https://Stackoverflow.com/questions/13664883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841414/" ]
Use `.slice()` instead of `pop()` ``` var newpath = path.split("/").slice(0, -1).join("/"); ``` --- If you also need the last part, then just use `.pop()`, but first store the Array in a separate variable. ``` var parts = path.split("/"); var last = parts.pop(); var first = parts.join("/"); ``` Now `last` has t...
If you want to get the first part of the array. var firstWord = fullnamesaved.split(" ").shift(); This disregards all things after the space.
13,664,883
I have a path and I am trying to pop off everything after the last /, so 'folder' in this case, leaving the newpath as C://local/drive/folder/. I tried to pop off the last / using pop(), but can't get the first part of the path to be the new path: ``` var path = C://local/drive/folder/folder var newpath = path.split(...
2012/12/01
[ "https://Stackoverflow.com/questions/13664883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841414/" ]
Could also use a regex: ``` function stripLastPiece(path) { var matches = path.match(/^(.*\/)[^\/]+$/); if (matches) { return(matches[1]); } return(path); } ``` Working example: <http://jsfiddle.net/jfriend00/av7Mn/>
``` var foo = "C://local/drive/folder/folder"; foo.match(/(.+\/)[^\/]+$/); ``` would result in: `["C://local/drive/folder/folder", "C://local/drive/folder/"]` though i would prefer user1689607's answer
13,664,883
I have a path and I am trying to pop off everything after the last /, so 'folder' in this case, leaving the newpath as C://local/drive/folder/. I tried to pop off the last / using pop(), but can't get the first part of the path to be the new path: ``` var path = C://local/drive/folder/folder var newpath = path.split(...
2012/12/01
[ "https://Stackoverflow.com/questions/13664883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841414/" ]
Just replace the last statement to be like that: ``` var path = C://local/drive/folder/folder path.split("/").pop(); // Discard the poped element. var newpath = path.join("/"); // It will be C://local/drive/folder ``` **A note about `Array.pop`**: Each time you call the `pop` method it will *return* the last element...
``` var foo = "C://local/drive/folder/folder"; foo.match(/(.+\/)[^\/]+$/); ``` would result in: `["C://local/drive/folder/folder", "C://local/drive/folder/"]` though i would prefer user1689607's answer
13,664,883
I have a path and I am trying to pop off everything after the last /, so 'folder' in this case, leaving the newpath as C://local/drive/folder/. I tried to pop off the last / using pop(), but can't get the first part of the path to be the new path: ``` var path = C://local/drive/folder/folder var newpath = path.split(...
2012/12/01
[ "https://Stackoverflow.com/questions/13664883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841414/" ]
If you want to get the first part of the array. var firstWord = fullnamesaved.split(" ").shift(); This disregards all things after the space.
``` var foo = "C://local/drive/folder/folder"; foo.match(/(.+\/)[^\/]+$/); ``` would result in: `["C://local/drive/folder/folder", "C://local/drive/folder/"]` though i would prefer user1689607's answer
13,664,883
I have a path and I am trying to pop off everything after the last /, so 'folder' in this case, leaving the newpath as C://local/drive/folder/. I tried to pop off the last / using pop(), but can't get the first part of the path to be the new path: ``` var path = C://local/drive/folder/folder var newpath = path.split(...
2012/12/01
[ "https://Stackoverflow.com/questions/13664883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841414/" ]
Just replace the last statement to be like that: ``` var path = C://local/drive/folder/folder path.split("/").pop(); // Discard the poped element. var newpath = path.join("/"); // It will be C://local/drive/folder ``` **A note about `Array.pop`**: Each time you call the `pop` method it will *return* the last element...
Could also use a regex: ``` function stripLastPiece(path) { var matches = path.match(/^(.*\/)[^\/]+$/); if (matches) { return(matches[1]); } return(path); } ``` Working example: <http://jsfiddle.net/jfriend00/av7Mn/>
13,664,883
I have a path and I am trying to pop off everything after the last /, so 'folder' in this case, leaving the newpath as C://local/drive/folder/. I tried to pop off the last / using pop(), but can't get the first part of the path to be the new path: ``` var path = C://local/drive/folder/folder var newpath = path.split(...
2012/12/01
[ "https://Stackoverflow.com/questions/13664883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841414/" ]
Just replace the last statement to be like that: ``` var path = C://local/drive/folder/folder path.split("/").pop(); // Discard the poped element. var newpath = path.join("/"); // It will be C://local/drive/folder ``` **A note about `Array.pop`**: Each time you call the `pop` method it will *return* the last element...
If you want to get the first part of the array. var firstWord = fullnamesaved.split(" ").shift(); This disregards all things after the space.
54,294,307
``` package com.tp468.dell.automatedfishpondmonitoringsystem; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; ...
2019/01/21
[ "https://Stackoverflow.com/questions/54294307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10332379/" ]
You need to scroll or swipe or even build your own TouchAction sequence based on an element in the left pane. I'm assuming your current code is not scrolling based on a target.
Just for anyone else: ``` var scroll = new Dictionary<string, string>(); scroll.Add("direction", "down"); scroll.Add("name", name);` driver.ExecuteScript("mobile:scroll", scroll); ``` where `name` was the name attr of that element
44,856,181
I have XCode 8.3.3., and testing an app that makes REST API calls. When open another app in foreground ( some of the stock simulator apps: calendar, news, etc. ), my app still continues to make periodic REST calls. This is not what happens on the real device (iPhone 5S). It makes the calls, even if I Lock my simulator ...
2017/07/01
[ "https://Stackoverflow.com/questions/44856181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801319/" ]
Good news: As of Xcode 9 Beta 3 we suspend background processes in the Simulator.
The question is answered in the comments. Basically XCode simulator doesn't enforce background tasks.
4,449,198
Suppose a gambler has \$100 to start with. Each time he/she has 0.4 chances of winning and 0.6 chances of losing a bet. If he/she wins he gets twice the money he put in and loses what he bet if he loses. The game stops if he/she has \$500 at hand or goes bankrupt (\$0). Which strategy will he/she choose to maximize the...
2022/05/12
[ "https://math.stackexchange.com/questions/4449198", "https://math.stackexchange.com", "https://math.stackexchange.com/users/611957/" ]
Your result of $0.4^3=0.064$ is correct for strategy 1. As expected, it turns out to be better than strategies 2 or 3 but not sensibly adapted versions of any of the three strategies. Your calculation for strategy 3 using the Gambler's Ruin seems to use bets of $1$ each time but your question was about bets of $10$ so...
The simple approach is that the game is unfair to the gambler, so s/he needs to be lucky to win. You want to bet as few times as possible to increase the variance, so the modified $1$ is the best route. To get the probability, you have to win the first two or you are done. If you win the third as well, you win. If you...
31,797,953
So I have a page `singleTicket.php` that is grabbing an `id` from the db and passing it in the query string as `singleTicket.php?id=someIDnumber` .. Then that grabs the ticket id from the database and loads the necessary information. Easy enough. I have it redirecting if a user edits the query string id number and no i...
2015/08/03
[ "https://Stackoverflow.com/questions/31797953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3851437/" ]
You can check if $\_GET['id'] is set: ``` if (!isset($_GET['id'])) { // redirect or print a message. } ```
Check if `$_GET['id']` is set, if not redirect to wherever you want. Put this to the top of your script, before any output is made: ``` isset($_GET['id']) && !empty($_GET['id']) ? $id = $_GET['id'] : header('Location // your redirect location'); ``` As a nice side effect, you'll also can set `$id` which you would mo...
21,920,964
I have this code: ``` estructuraDatos = [(here goes the information)] for campo in estructuraDatos: for x in range(len(campo)): print campo[x] ``` and it prints: ``` 000d109e4a25299eeef77a14d6b6a81479d1ac0e United States wilco 110 0.016042000875 [['elizabeth mitchell', '0.0482718389966']...
2014/02/20
[ "https://Stackoverflow.com/questions/21920964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3328113/" ]
> > Window | Preferences | General | Editors | Text Editors --> Show > whitespace characters > > >
Or perhaps: ``` $ dos2unix file.java ``` or ``` $ unix2dos file.java ```
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
4. Finding undocumented features of a product. * for instance for locating a registry key or setting to turn on a debug mode. 5. Finding how exactly a poorly documented feature works. 6. Debugging * sometimes i find myself loading my own software in IDA to find what code the compiler produced, either to find bugs, ...
10. Honing your skills and keeping up-to-date with them (as well as with using the tools). 11. Curiosity. Yep, doesn't have to be purely goal-driven like 4. and 5. in Willem's answer. 12. Establishing compatibility with a legacy product, file format or architecture. Motivation can be 11 in that case or 4 or 5 or possib...
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
10. Honing your skills and keeping up-to-date with them (as well as with using the tools). 11. Curiosity. Yep, doesn't have to be purely goal-driven like 4. and 5. in Willem's answer. 12. Establishing compatibility with a legacy product, file format or architecture. Motivation can be 11 in that case or 4 or 5 or possib...
I have carried out reverse engineering projects professionally a fair bit. Generally we are commissioned to: 1) Determine how hard it would be to create a crack for some piece of software (by the developers of that software). 2) Understand a specific exploit (in the security sense, e.g. a buffer overflow). In other w...
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
4. Finding undocumented features of a product. * for instance for locating a registry key or setting to turn on a debug mode. 5. Finding how exactly a poorly documented feature works. 6. Debugging * sometimes i find myself loading my own software in IDA to find what code the compiler produced, either to find bugs, ...
I have carried out reverse engineering projects professionally a fair bit. Generally we are commissioned to: 1) Determine how hard it would be to create a crack for some piece of software (by the developers of that software). 2) Understand a specific exploit (in the security sense, e.g. a buffer overflow). In other w...
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
4. Finding undocumented features of a product. * for instance for locating a registry key or setting to turn on a debug mode. 5. Finding how exactly a poorly documented feature works. 6. Debugging * sometimes i find myself loading my own software in IDA to find what code the compiler produced, either to find bugs, ...
There are already a lot of great answers. If I may add my two cents. Reverse engineering software is akin to the mechanic or tinkerer whom just enjoys taking things apart, understanding how they work, putting them back together, and possibly modifying their subject to adapt its behavior so it is more to their liking. T...
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
Reverse engineering is commonly used in many ways. Here is a list of just some of the most common professional activities where reverse engineering is involved. 1. Malware research. Withouth doing reverse engineering, it's hard to determine what an actual piece of malware does, how and, more important, how to clean it...
10. Honing your skills and keeping up-to-date with them (as well as with using the tools). 11. Curiosity. Yep, doesn't have to be purely goal-driven like 4. and 5. in Willem's answer. 12. Establishing compatibility with a legacy product, file format or architecture. Motivation can be 11 in that case or 4 or 5 or possib...
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
4. Finding undocumented features of a product. * for instance for locating a registry key or setting to turn on a debug mode. 5. Finding how exactly a poorly documented feature works. 6. Debugging * sometimes i find myself loading my own software in IDA to find what code the compiler produced, either to find bugs, ...
13. Writing cheats for games. 14. Writing an anti-cheat for games. 15. Looking for badly written code to exploit or to fix and patch it.
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
13. Writing cheats for games. 14. Writing an anti-cheat for games. 15. Looking for badly written code to exploit or to fix and patch it.
I have carried out reverse engineering projects professionally a fair bit. Generally we are commissioned to: 1) Determine how hard it would be to create a crack for some piece of software (by the developers of that software). 2) Understand a specific exploit (in the security sense, e.g. a buffer overflow). In other w...
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
Reverse engineering is commonly used in many ways. Here is a list of just some of the most common professional activities where reverse engineering is involved. 1. Malware research. Withouth doing reverse engineering, it's hard to determine what an actual piece of malware does, how and, more important, how to clean it...
I have carried out reverse engineering projects professionally a fair bit. Generally we are commissioned to: 1) Determine how hard it would be to create a crack for some piece of software (by the developers of that software). 2) Understand a specific exploit (in the security sense, e.g. a buffer overflow). In other w...
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
As a professional Reverse Engineer I have reveresed for: * Troubleshooting * Exploit Development * Malware Analysis * Implementing badly documented API calls. * Plagiarism , they knew of an undocumented Kernel call within the Nokia phonebase. Thus we reverse engineerd this and created a program that used this call as ...
I have carried out reverse engineering projects professionally a fair bit. Generally we are commissioned to: 1) Determine how hard it would be to create a crack for some piece of software (by the developers of that software). 2) Understand a specific exploit (in the security sense, e.g. a buffer overflow). In other w...
6,455
At the professional level, for what purpose is reverse software engineering used? What software is targeted and why? For reasonably complex compiled code that's doing something novel, making meaningful insights into how that code operates via reverse engineering seems like it would be enormously intensive of expertise...
2014/10/15
[ "https://reverseengineering.stackexchange.com/questions/6455", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/9772/" ]
As a professional Reverse Engineer I have reveresed for: * Troubleshooting * Exploit Development * Malware Analysis * Implementing badly documented API calls. * Plagiarism , they knew of an undocumented Kernel call within the Nokia phonebase. Thus we reverse engineerd this and created a program that used this call as ...
There are already a lot of great answers. If I may add my two cents. Reverse engineering software is akin to the mechanic or tinkerer whom just enjoys taking things apart, understanding how they work, putting them back together, and possibly modifying their subject to adapt its behavior so it is more to their liking. T...
59,067
I'm running a 64 bit Windows 7 / Windows 2008 R2 workstation that I just installed. I need to add a printer that is shared on the network from a 32bit Windows 2000 print server. This is an HP LaserJet 5Si printer, the drivers for which HP tells me are automatically built into Windows 7/R2. However, whenever I connect...
2009/10/22
[ "https://superuser.com/questions/59067", "https://superuser.com", "https://superuser.com/users/3651/" ]
This is basically a 32-bits/64-bits problem: The printer is on a 32-bits server and is being accessed by a 64-bits client. Any attempt to install this printer fails because the driver being offered by the 32-bits print server is incorrect, since it's offering a 32-bit driver. See this article for installing 64-bits dr...
Yeah, HP is pretty clueless when it comes to Windows 7 and Server 2008 R2. For the HP printer I had to add to my Windows 7 machine, I just used the Vista driver, and it works just fine. **EDIT** I didn't notice before, but it looks like the printer is using a PCL driver. I found this page on HP's website advising t...
59,067
I'm running a 64 bit Windows 7 / Windows 2008 R2 workstation that I just installed. I need to add a printer that is shared on the network from a 32bit Windows 2000 print server. This is an HP LaserJet 5Si printer, the drivers for which HP tells me are automatically built into Windows 7/R2. However, whenever I connect...
2009/10/22
[ "https://superuser.com/questions/59067", "https://superuser.com", "https://superuser.com/users/3651/" ]
Yeah, HP is pretty clueless when it comes to Windows 7 and Server 2008 R2. For the HP printer I had to add to my Windows 7 machine, I just used the Vista driver, and it works just fine. **EDIT** I didn't notice before, but it looks like the printer is using a PCL driver. I found this page on HP's website advising t...
Download the Windows 7 64 bit driver package. Begin the install and it will stall at "Connect via USB"... AFTER it pre-loads the drivers. Cancel the loader. Go to Add Printer and add a local printer. When you get to the drivers, the 2600n will be listed in the HP drivers available.
59,067
I'm running a 64 bit Windows 7 / Windows 2008 R2 workstation that I just installed. I need to add a printer that is shared on the network from a 32bit Windows 2000 print server. This is an HP LaserJet 5Si printer, the drivers for which HP tells me are automatically built into Windows 7/R2. However, whenever I connect...
2009/10/22
[ "https://superuser.com/questions/59067", "https://superuser.com", "https://superuser.com/users/3651/" ]
This is basically a 32-bits/64-bits problem: The printer is on a 32-bits server and is being accessed by a 64-bits client. Any attempt to install this printer fails because the driver being offered by the 32-bits print server is incorrect, since it's offering a 32-bit driver. See this article for installing 64-bits dr...
I also used the Vista driver for my printer. In windows 7, if you add the printer as a shared printer on a remote machine, does it not allow you to cherry pick your own driver/inf?
59,067
I'm running a 64 bit Windows 7 / Windows 2008 R2 workstation that I just installed. I need to add a printer that is shared on the network from a 32bit Windows 2000 print server. This is an HP LaserJet 5Si printer, the drivers for which HP tells me are automatically built into Windows 7/R2. However, whenever I connect...
2009/10/22
[ "https://superuser.com/questions/59067", "https://superuser.com", "https://superuser.com/users/3651/" ]
I also used the Vista driver for my printer. In windows 7, if you add the printer as a shared printer on a remote machine, does it not allow you to cherry pick your own driver/inf?
Download the Windows 7 64 bit driver package. Begin the install and it will stall at "Connect via USB"... AFTER it pre-loads the drivers. Cancel the loader. Go to Add Printer and add a local printer. When you get to the drivers, the 2600n will be listed in the HP drivers available.
59,067
I'm running a 64 bit Windows 7 / Windows 2008 R2 workstation that I just installed. I need to add a printer that is shared on the network from a 32bit Windows 2000 print server. This is an HP LaserJet 5Si printer, the drivers for which HP tells me are automatically built into Windows 7/R2. However, whenever I connect...
2009/10/22
[ "https://superuser.com/questions/59067", "https://superuser.com", "https://superuser.com/users/3651/" ]
This is basically a 32-bits/64-bits problem: The printer is on a 32-bits server and is being accessed by a 64-bits client. Any attempt to install this printer fails because the driver being offered by the 32-bits print server is incorrect, since it's offering a 32-bit driver. See this article for installing 64-bits dr...
Download the Windows 7 64 bit driver package. Begin the install and it will stall at "Connect via USB"... AFTER it pre-loads the drivers. Cancel the loader. Go to Add Printer and add a local printer. When you get to the drivers, the 2600n will be listed in the HP drivers available.
15,298,687
I am trying to output the content i get from my Controller in my view as json, but i think i is outputting weird. On the web i search json and it comes up with output looking like this: ``` {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}...
2013/03/08
[ "https://Stackoverflow.com/questions/15298687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/667430/" ]
There is no sense to beautify your json on output step. If it matters, you may use external tools to make a pretty look of json. Also, consider using ([JSON View](http://book.cakephp.org/2.0/en/views/json-and-xml-views.html)) in Cake. In short, you set a special view variable with content you want to jsonify: 1. for ...
Only difference in those json responses are that the first one is JSON object with sub objects and second one is an array of JSON objects with their sub objects. The code below retrieves all records for customers. And when you encode it into json object, it is encoded as array of Cutomers ``` $this->Customer->find( '...
33,072,577
Is there any simple way to define critical section? when a user during the updating some database table, I'd force to make the other user cannot update on the same tables.
2015/10/12
[ "https://Stackoverflow.com/questions/33072577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1320315/" ]
> > django-concurrency is an optimistic lock [1](https://github.com/saxix/django-concurrency) implementation for > Django. > > > Tested with: 1.4.x, 1.5.x, 1.6.x, 1.7.x 1.8.x. > > > It prevents users from doing concurrent editing in Django both from UI > and from a django command. > > > I never used, but i t...
It depends what are your queries, Your single query to the database will never face any race condition due to **ACID principle** impose by the database. But if there is any condition like first you are reading the data from database and after some operation on application level you are writing the updated data back to ...
102,080
I am using LyX and I want a multiline and multicolumn display formula with each column aligned to the left. But when I add a formula and add columns, some are aligned to the right and some are aligned to the left. How do I control it and make all columns aligned to the left?
2013/03/12
[ "https://tex.stackexchange.com/questions/102080", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/20962/" ]
When you use the `align` environment (Insert --> Math --> AMS Align), the columns are aligned as `rlrlrl...`, as the usual use case is alignment around a relation. If you leave the odd columns (first, third, etc.) empty and place the content in the even columns, you will have just left alignment. This will, however, di...
It sounds as if LyX is creating an `align` environment, or one of its cousins. This is one of a handful of multiline math environments provided by the `amsmath` package. As far as I'm aware, no package provides a math environment in which all columns are left-aligned. However, the `alignat` environment will probably a...
24,376,461
Is there a way to see all @RequestMapping annotations as map of all requests/URLs, ideally with quick links to whichever Controller/method handles the URL? In Spring 2 (before annotations) XML config (SimpleUrlHandlerMapping) could be used as such reference, now with annotated controllers is there any other way beside...
2014/06/24
[ "https://Stackoverflow.com/questions/24376461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3662882/" ]
yes we can do the same as we can see that in STS spring explore , coming to intellij Go to Project Structure >> Modules >> select your project and add Spring to your project . This will give you a spring tab at the bottom to see all the controllers.
2021 update: you can download a popular plugin in Intelij called Request mapper. Currently it supports both Spring and JAX-RS path mappings. [request mapper plugin](https://plugins.jetbrains.com/plugin/9567-request-mapper)
25,498,787
May be this question is not appropriate for this forum , but i tried a lot on google but didnt found any good book for YUI3 for begineers except cookbook. I need help, thats why i am posting. I am looking for a good book or tutorial (except YUI3 library) that explains complete website development using YUI for front en...
2014/08/26
[ "https://Stackoverflow.com/questions/25498787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3363969/" ]
The following code uses a single regular expression to match values on two separate lines. In general, this isn't done; a single expression is matched per line, for example in a loop. source ------ ``` import re mystring = '''<name="some_name" > <price="some_price" > ''' pat = re.compile('\w+=.(\w+).+\w+=.(\w+)', ...
``` x='<name="some_name" >\n<price="some_price" ' print re.findall(r".*?=\"(.*?)\"",x) ``` This works for as many pairs you want for as many lines you want.
25,498,787
May be this question is not appropriate for this forum , but i tried a lot on google but didnt found any good book for YUI3 for begineers except cookbook. I need help, thats why i am posting. I am looking for a good book or tutorial (except YUI3 library) that explains complete website development using YUI for front en...
2014/08/26
[ "https://Stackoverflow.com/questions/25498787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3363969/" ]
The following code uses a single regular expression to match values on two separate lines. In general, this isn't done; a single expression is matched per line, for example in a loop. source ------ ``` import re mystring = '''<name="some_name" > <price="some_price" > ''' pat = re.compile('\w+=.(\w+).+\w+=.(\w+)', ...
You could use lookbehinds with logical OR operator to print the values of `name`, `price` tags. ``` >>> import re >>> s = '''<name="some_name" > ... <price="some_price" >''' >>> m = re.findall(r'(?<=<name=")[^"]*|(?<=<price=")[^"]*', s, re.M) >>> for i in m: ... print i ... some_name some_price ```
22,859,155
I have a strange problem on a small page I made. When the content extends the height of the browser and I scroll down fast, the pixelated box appears for a split of a second and then goes away. [![](https://i.imgur.com/RVALU4H.png "Hosted by imgur.com")](https://imgur.com/RVALU4H) Why is this happening and how can...
2014/04/04
[ "https://Stackoverflow.com/questions/22859155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/866631/" ]
The short answer is you can't. The long answer is you can try to put a "minimum" and a "maximum" member, and check that the value falls in the range between the two... or some other similar trick.
``` typedef enum {Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, Last} Day; void DoSomething(Day day){ // if day < Last ... } ```
22,859,155
I have a strange problem on a small page I made. When the content extends the height of the browser and I scroll down fast, the pixelated box appears for a split of a second and then goes away. [![](https://i.imgur.com/RVALU4H.png "Hosted by imgur.com")](https://imgur.com/RVALU4H) Why is this happening and how can...
2014/04/04
[ "https://Stackoverflow.com/questions/22859155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/866631/" ]
The short answer is you can't. The long answer is you can try to put a "minimum" and a "maximum" member, and check that the value falls in the range between the two... or some other similar trick.
You could put a switch statement in your DoSomething. ``` switch(day){ case Day.Monday: // something break ... default: // ignore or something ```
22,859,155
I have a strange problem on a small page I made. When the content extends the height of the browser and I scroll down fast, the pixelated box appears for a split of a second and then goes away. [![](https://i.imgur.com/RVALU4H.png "Hosted by imgur.com")](https://imgur.com/RVALU4H) Why is this happening and how can...
2014/04/04
[ "https://Stackoverflow.com/questions/22859155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/866631/" ]
The short answer is you can't. The long answer is you can try to put a "minimum" and a "maximum" member, and check that the value falls in the range between the two... or some other similar trick.
If you write DoSomething(74) statement in your code modern compiler generate warning saying DoSomething expect enum but integer is passed. But if you are passing a value from user input where any value can be passed to DoSomething() then you will have to take care as other advised.
22,859,155
I have a strange problem on a small page I made. When the content extends the height of the browser and I scroll down fast, the pixelated box appears for a split of a second and then goes away. [![](https://i.imgur.com/RVALU4H.png "Hosted by imgur.com")](https://imgur.com/RVALU4H) Why is this happening and how can...
2014/04/04
[ "https://Stackoverflow.com/questions/22859155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/866631/" ]
``` typedef enum {Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, Last} Day; void DoSomething(Day day){ // if day < Last ... } ```
You could put a switch statement in your DoSomething. ``` switch(day){ case Day.Monday: // something break ... default: // ignore or something ```
22,859,155
I have a strange problem on a small page I made. When the content extends the height of the browser and I scroll down fast, the pixelated box appears for a split of a second and then goes away. [![](https://i.imgur.com/RVALU4H.png "Hosted by imgur.com")](https://imgur.com/RVALU4H) Why is this happening and how can...
2014/04/04
[ "https://Stackoverflow.com/questions/22859155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/866631/" ]
``` typedef enum {Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday, Last} Day; void DoSomething(Day day){ // if day < Last ... } ```
If you write DoSomething(74) statement in your code modern compiler generate warning saying DoSomething expect enum but integer is passed. But if you are passing a value from user input where any value can be passed to DoSomething() then you will have to take care as other advised.
33,462,970
I am learning to make a status bar application for Xcode using Swift 2. I have nearly completed this [tutorial](http://www.raywenderlich.com/98178/os-x-tutorial-menus-popovers-menu-bar-apps), however on the line `eventMonitor = EventMonitor(mask: . | .RightMouseDownMask) { [unowned self] event in`, `.LeftMouseDownMask`...
2015/11/01
[ "https://Stackoverflow.com/questions/33462970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3549629/" ]
Fixed the issue. I had to change the line `eventMonitor = EventMonitor(mask: .LeftMouseDownMask | .RightMouseDownMask) { [unowned self] event in` to `eventMonitor = EventMonitor(mask: [.LeftMouseDownMask, .RightMouseDownMask]) { [unowned self] event in`.
**Swift 3** replace the following code ``` .LeftMouseDownMask | .RightMouseDownMask ``` with this ``` [NSEventMask.leftMouseDown, NSEventMask.rightMouseDown] ```
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
Problem ------- The copy fails because you're copying from a `map::iterator` which iterates over `pair<string const,int>` to a `vector::iterator` which iterates over `int`. Solution -------- Replace `copy_if` with `for_each` and do a `push_back` on your vector. Example ------- ``` std::for_each( m.begin(), m.end()...
Presumably you just want to retrieve the associated values from the `map`, not the keys. The SGI version of STL has `select1st` and `select2nd` iterators for this kind of task. Personally, however, I don't think this should really be done with copy -- you're transforming the data, not copying it. As such, I'd advise ...
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
With `boost::range` it is as easy as: ``` boost::push_back( v, m | boost::adaptors::map_values | boost::adaptors::filtered([](int val){ return 0 == (val % 2); })); ```
The compiler error is actually quite succinct: ``` error: cannot convert 'std::pair<const std::basic_string<char>, int>' to 'int' in assignment ``` And that's exactly what the problem is. The `map` you're copying from has iterators that dereference to a `pair<KEY,VALUE>`, and there's no way to implicitly *transform*...
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
With `boost::range` it is as easy as: ``` boost::push_back( v, m | boost::adaptors::map_values | boost::adaptors::filtered([](int val){ return 0 == (val % 2); })); ```
I cannot understand why the simple for loop solution is not the preferred approach, for this problem ``` for (std::map< std::string, int >::iterator it = m.begin(); it != m.end(); ++it ) { if ((it->second % 2) == 0) v.push_back(it->second); } ``` Except that it makes the code more readable it performs bett...
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
With `boost::range` it is as easy as: ``` boost::push_back( v, m | boost::adaptors::map_values | boost::adaptors::filtered([](int val){ return 0 == (val % 2); })); ```
Problem ------- The copy fails because you're copying from a `map::iterator` which iterates over `pair<string const,int>` to a `vector::iterator` which iterates over `int`. Solution -------- Replace `copy_if` with `for_each` and do a `push_back` on your vector. Example ------- ``` std::for_each( m.begin(), m.end()...
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
Problem ------- The copy fails because you're copying from a `map::iterator` which iterates over `pair<string const,int>` to a `vector::iterator` which iterates over `int`. Solution -------- Replace `copy_if` with `for_each` and do a `push_back` on your vector. Example ------- ``` std::for_each( m.begin(), m.end()...
I cannot understand why the simple for loop solution is not the preferred approach, for this problem ``` for (std::map< std::string, int >::iterator it = m.begin(); it != m.end(); ++it ) { if ((it->second % 2) == 0) v.push_back(it->second); } ``` Except that it makes the code more readable it performs bett...
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
The compiler error is actually quite succinct: ``` error: cannot convert 'std::pair<const std::basic_string<char>, int>' to 'int' in assignment ``` And that's exactly what the problem is. The `map` you're copying from has iterators that dereference to a `pair<KEY,VALUE>`, and there's no way to implicitly *transform*...
`std::copy_if` won't allow you to transfer from one type to another, only to filter what to copy. You could use `std::transform` to get rid of the key and then use `std::remove_if`: ``` std::vector<int> v; std::transform(m.begin(), m.end(), std::back_inserter(v), [] ( const std::pair< std::strin...
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
I cannot understand why the simple for loop solution is not the preferred approach, for this problem ``` for (std::map< std::string, int >::iterator it = m.begin(); it != m.end(); ++it ) { if ((it->second % 2) == 0) v.push_back(it->second); } ``` Except that it makes the code more readable it performs bett...
Presumably you just want to retrieve the associated values from the `map`, not the keys. The SGI version of STL has `select1st` and `select2nd` iterators for this kind of task. Personally, however, I don't think this should really be done with copy -- you're transforming the data, not copying it. As such, I'd advise ...
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
With `boost::range` it is as easy as: ``` boost::push_back( v, m | boost::adaptors::map_values | boost::adaptors::filtered([](int val){ return 0 == (val % 2); })); ```
`std::copy_if` won't allow you to transfer from one type to another, only to filter what to copy. You could use `std::transform` to get rid of the key and then use `std::remove_if`: ``` std::vector<int> v; std::transform(m.begin(), m.end(), std::back_inserter(v), [] ( const std::pair< std::strin...
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
`std::copy_if` won't allow you to transfer from one type to another, only to filter what to copy. You could use `std::transform` to get rid of the key and then use `std::remove_if`: ``` std::vector<int> v; std::transform(m.begin(), m.end(), std::back_inserter(v), [] ( const std::pair< std::strin...
Presumably you just want to retrieve the associated values from the `map`, not the keys. The SGI version of STL has `select1st` and `select2nd` iterators for this kind of task. Personally, however, I don't think this should really be done with copy -- you're transforming the data, not copying it. As such, I'd advise ...
8,137,869
I'd like to copy values that match a predicate (equal ints) from a `map<string,int>` to a `vector<int>`. This is what I tried: ``` #include <map> #include <vector> #include <algorithm> int main() { std::vector< int > v; std::map< std::string, int > m; m[ "1" ] = 1; m[ "2" ] = 2; m[ "3" ] = 3; ...
2011/11/15
[ "https://Stackoverflow.com/questions/8137869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/476681/" ]
The compiler error is actually quite succinct: ``` error: cannot convert 'std::pair<const std::basic_string<char>, int>' to 'int' in assignment ``` And that's exactly what the problem is. The `map` you're copying from has iterators that dereference to a `pair<KEY,VALUE>`, and there's no way to implicitly *transform*...
Presumably you just want to retrieve the associated values from the `map`, not the keys. The SGI version of STL has `select1st` and `select2nd` iterators for this kind of task. Personally, however, I don't think this should really be done with copy -- you're transforming the data, not copying it. As such, I'd advise ...
502,441
In Peskin & Schroeder, p.523, they give the diagram contributing to the gluon self-energy that arises from the 3-gluon vertex, and they claim that the $1/2$ factor is a symmetry factor: [![Gluon loop contributing to 1-loop gluon self-energy](https://i.stack.imgur.com/SNhke.png)](https://i.stack.imgur.com/SNhke.png) H...
2019/09/12
[ "https://physics.stackexchange.com/questions/502441", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/143038/" ]
The identity of fundamental particles is a basic hypothesis of all theories, but we don't really know this, neither can we disprove it. Just like the homogeneity and isotropy of spacetime. These assumptions are good starting points of physics theories and can make things harmonic, simple and elegant. Related link: <ht...
A particle is just an excitation of its own quantum field. For example, an electron is just an excitation of the electron field. Same for other fundamental particles. The properties of these particles are intrinsically depends upon the behaviour and interation of respective quantum field with the other quantum fields. ...
502,441
In Peskin & Schroeder, p.523, they give the diagram contributing to the gluon self-energy that arises from the 3-gluon vertex, and they claim that the $1/2$ factor is a symmetry factor: [![Gluon loop contributing to 1-loop gluon self-energy](https://i.stack.imgur.com/SNhke.png)](https://i.stack.imgur.com/SNhke.png) H...
2019/09/12
[ "https://physics.stackexchange.com/questions/502441", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/143038/" ]
The identity of fundamental particles is a basic hypothesis of all theories, but we don't really know this, neither can we disprove it. Just like the homogeneity and isotropy of spacetime. These assumptions are good starting points of physics theories and can make things harmonic, simple and elegant. Related link: <ht...
We have arrived at the [standard model of particle physics](https://en.wikipedia.org/wiki/Standard_Model) which encapsulates all particle data up to now. In the standard model the basic hypothesis is that the particles in the table are point particles, with specific quantum numbers. [![enter image description here](ht...
27,449,880
I have following task: Starting with 30 character long pattern sequence (it is actually DNA sequence, lest call it P30) I need to find in a text file all lines starting (^agacatacag... )with a exact P30, then with 29 last characters of the 30, 28 and up to 10 characters. All what I need to do is simply remove the first...
2014/12/12
[ "https://Stackoverflow.com/questions/27449880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/731351/" ]
As you are getting 404 error message. This error message indicate that ``` The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with a given server, but the server could not find what was requested. The web site hosting server will typically generate ...
You action tag should point to a valid endpoint servlet /webservice . It looks like you are pointing it to a jsp file. That said, mixing presentation logic and server side logic was done in the early 2000s. Things have improved a lot over the past decade. My recommendation would be to look at Jersey + Twitter Bootstrap...
113,886
I have a MacBook Air 11" running OS X 10.8.5. I have a 128GB SSD drive that was running out of space with only 10 GBs free. The largest single file on the filesysem was my 30+ GB Windows 7 virtual machine that I run in Parallels Desktop 7. I moved the file to an external USB drive (the virtual machine was not running d...
2013/12/15
[ "https://apple.stackexchange.com/questions/113886", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/587/" ]
It's likely in /Volumes/MobileBackups and you can easily delete it by entering Time Machine and navigating to the folder where the file existed. Select the file then command-click (right-click) and delete all backups of that file. ![About This Mac - showing Backup storage usage](https://i.stack.imgur.com/DHKgl.png) ...
On a MacBook, Time Machine actually takes 2 snapshots each hour. The first one is stored locally, the second is what gets stored on your TM backup drive. TM is designed to be independent of the Finder, and TM "files" are not at all Finder-friendly; between that and the peculiarities of flash drives (newly freed space i...
113,886
I have a MacBook Air 11" running OS X 10.8.5. I have a 128GB SSD drive that was running out of space with only 10 GBs free. The largest single file on the filesysem was my 30+ GB Windows 7 virtual machine that I run in Parallels Desktop 7. I moved the file to an external USB drive (the virtual machine was not running d...
2013/12/15
[ "https://apple.stackexchange.com/questions/113886", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/587/" ]
It's likely in /Volumes/MobileBackups and you can easily delete it by entering Time Machine and navigating to the folder where the file existed. Select the file then command-click (right-click) and delete all backups of that file. ![About This Mac - showing Backup storage usage](https://i.stack.imgur.com/DHKgl.png) ...
You need to create empty virtual machine with same name in same folder where you had deleted VM. Then you need to right click on that file and select Show package content. After this procedure you need to Show package content on your copy virtual machine (on external USB) and copy content from usb package to your local...
113,886
I have a MacBook Air 11" running OS X 10.8.5. I have a 128GB SSD drive that was running out of space with only 10 GBs free. The largest single file on the filesysem was my 30+ GB Windows 7 virtual machine that I run in Parallels Desktop 7. I moved the file to an external USB drive (the virtual machine was not running d...
2013/12/15
[ "https://apple.stackexchange.com/questions/113886", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/587/" ]
It's likely in /Volumes/MobileBackups and you can easily delete it by entering Time Machine and navigating to the folder where the file existed. Select the file then command-click (right-click) and delete all backups of that file. ![About This Mac - showing Backup storage usage](https://i.stack.imgur.com/DHKgl.png) ...
Omg, just stop and restart time machine and it'll work just fine and you'll see your recovered space.
113,886
I have a MacBook Air 11" running OS X 10.8.5. I have a 128GB SSD drive that was running out of space with only 10 GBs free. The largest single file on the filesysem was my 30+ GB Windows 7 virtual machine that I run in Parallels Desktop 7. I moved the file to an external USB drive (the virtual machine was not running d...
2013/12/15
[ "https://apple.stackexchange.com/questions/113886", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/587/" ]
It's likely in /Volumes/MobileBackups and you can easily delete it by entering Time Machine and navigating to the folder where the file existed. Select the file then command-click (right-click) and delete all backups of that file. ![About This Mac - showing Backup storage usage](https://i.stack.imgur.com/DHKgl.png) ...
I had the same problem, and my `sudo du -sh /*` showed similar results. But the trash folder, which exists under /user, doesn't show up in this list! All my old VMs were still in Trash, and I just had to empty the trash to reclaim the space. (though it took a long time to figure that out)
113,886
I have a MacBook Air 11" running OS X 10.8.5. I have a 128GB SSD drive that was running out of space with only 10 GBs free. The largest single file on the filesysem was my 30+ GB Windows 7 virtual machine that I run in Parallels Desktop 7. I moved the file to an external USB drive (the virtual machine was not running d...
2013/12/15
[ "https://apple.stackexchange.com/questions/113886", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/587/" ]
On a MacBook, Time Machine actually takes 2 snapshots each hour. The first one is stored locally, the second is what gets stored on your TM backup drive. TM is designed to be independent of the Finder, and TM "files" are not at all Finder-friendly; between that and the peculiarities of flash drives (newly freed space i...
You need to create empty virtual machine with same name in same folder where you had deleted VM. Then you need to right click on that file and select Show package content. After this procedure you need to Show package content on your copy virtual machine (on external USB) and copy content from usb package to your local...
113,886
I have a MacBook Air 11" running OS X 10.8.5. I have a 128GB SSD drive that was running out of space with only 10 GBs free. The largest single file on the filesysem was my 30+ GB Windows 7 virtual machine that I run in Parallels Desktop 7. I moved the file to an external USB drive (the virtual machine was not running d...
2013/12/15
[ "https://apple.stackexchange.com/questions/113886", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/587/" ]
On a MacBook, Time Machine actually takes 2 snapshots each hour. The first one is stored locally, the second is what gets stored on your TM backup drive. TM is designed to be independent of the Finder, and TM "files" are not at all Finder-friendly; between that and the peculiarities of flash drives (newly freed space i...
Omg, just stop and restart time machine and it'll work just fine and you'll see your recovered space.
113,886
I have a MacBook Air 11" running OS X 10.8.5. I have a 128GB SSD drive that was running out of space with only 10 GBs free. The largest single file on the filesysem was my 30+ GB Windows 7 virtual machine that I run in Parallels Desktop 7. I moved the file to an external USB drive (the virtual machine was not running d...
2013/12/15
[ "https://apple.stackexchange.com/questions/113886", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/587/" ]
On a MacBook, Time Machine actually takes 2 snapshots each hour. The first one is stored locally, the second is what gets stored on your TM backup drive. TM is designed to be independent of the Finder, and TM "files" are not at all Finder-friendly; between that and the peculiarities of flash drives (newly freed space i...
I had the same problem, and my `sudo du -sh /*` showed similar results. But the trash folder, which exists under /user, doesn't show up in this list! All my old VMs were still in Trash, and I just had to empty the trash to reclaim the space. (though it took a long time to figure that out)
113,886
I have a MacBook Air 11" running OS X 10.8.5. I have a 128GB SSD drive that was running out of space with only 10 GBs free. The largest single file on the filesysem was my 30+ GB Windows 7 virtual machine that I run in Parallels Desktop 7. I moved the file to an external USB drive (the virtual machine was not running d...
2013/12/15
[ "https://apple.stackexchange.com/questions/113886", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/587/" ]
I had the same problem, and my `sudo du -sh /*` showed similar results. But the trash folder, which exists under /user, doesn't show up in this list! All my old VMs were still in Trash, and I just had to empty the trash to reclaim the space. (though it took a long time to figure that out)
You need to create empty virtual machine with same name in same folder where you had deleted VM. Then you need to right click on that file and select Show package content. After this procedure you need to Show package content on your copy virtual machine (on external USB) and copy content from usb package to your local...
113,886
I have a MacBook Air 11" running OS X 10.8.5. I have a 128GB SSD drive that was running out of space with only 10 GBs free. The largest single file on the filesysem was my 30+ GB Windows 7 virtual machine that I run in Parallels Desktop 7. I moved the file to an external USB drive (the virtual machine was not running d...
2013/12/15
[ "https://apple.stackexchange.com/questions/113886", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/587/" ]
I had the same problem, and my `sudo du -sh /*` showed similar results. But the trash folder, which exists under /user, doesn't show up in this list! All my old VMs were still in Trash, and I just had to empty the trash to reclaim the space. (though it took a long time to figure that out)
Omg, just stop and restart time machine and it'll work just fine and you'll see your recovered space.
5,347,896
I'm using Proc Printto to save the log & output to a directory, which it does quite nicely, however the log is no longer printed in the log window. I still prefer to use the log for debugging. ``` proc printto print='<directory>\output.lst' log = '<directory>\log.log' new; run; ``` (The new option r...
2011/03/18
[ "https://Stackoverflow.com/questions/5347896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/593131/" ]
You can use the -ALTLOG option when launching SAS (e.g. in the shortcut) to divert the entire session log to a specified file. Example shortcut target: "C:\Program Files\SAS\SAS 9.1\sas.exe" -AUTOEXEC "c:\autoexec.sas" -CONFIG "z:\sas\temp\sasv9.cfg" -ALTLOG "c:\altlog.txt" There maybe an option for the output al...
-ALTPRINT would do it for the listing output. However if you are in interactive SAS, ODS HTML will generate output if you are using the HTML output window, so it is usually unnecessary. In some operating system, e.g UNIX, LINUX you are able to browse/search the output as it is being written. That is typically the way I...
5,347,896
I'm using Proc Printto to save the log & output to a directory, which it does quite nicely, however the log is no longer printed in the log window. I still prefer to use the log for debugging. ``` proc printto print='<directory>\output.lst' log = '<directory>\log.log' new; run; ``` (The new option r...
2011/03/18
[ "https://Stackoverflow.com/questions/5347896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/593131/" ]
You can use the -ALTLOG option when launching SAS (e.g. in the shortcut) to divert the entire session log to a specified file. Example shortcut target: "C:\Program Files\SAS\SAS 9.1\sas.exe" -AUTOEXEC "c:\autoexec.sas" -CONFIG "z:\sas\temp\sasv9.cfg" -ALTLOG "c:\altlog.txt" There maybe an option for the output al...
This article gives a macro that answers my question. <http://www.lexjansen.com/pharmasug/2002/proceed/coders/cc10.pdf>
5,347,896
I'm using Proc Printto to save the log & output to a directory, which it does quite nicely, however the log is no longer printed in the log window. I still prefer to use the log for debugging. ``` proc printto print='<directory>\output.lst' log = '<directory>\log.log' new; run; ``` (The new option r...
2011/03/18
[ "https://Stackoverflow.com/questions/5347896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/593131/" ]
-ALTPRINT would do it for the listing output. However if you are in interactive SAS, ODS HTML will generate output if you are using the HTML output window, so it is usually unnecessary. In some operating system, e.g UNIX, LINUX you are able to browse/search the output as it is being written. That is typically the way I...
This article gives a macro that answers my question. <http://www.lexjansen.com/pharmasug/2002/proceed/coders/cc10.pdf>