qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
58,186,365
I have a problem sending json data to a controller with ajax. I think I sent the data well but I get the following warn. org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver - Resolved [org.springframework.web.bind.MissingServletRequestParameterException: Required int parameter 'bno' is not pre...
2019/10/01
[ "https://Stackoverflow.com/questions/58186365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10665710/" ]
`{"bno": bno}` is in the body of the request. So your Controller method should be `@RequestBody int bno`. `@RequestParam` is for servlet request parameters. i.e: `/uid/cno?bno=14` difference for reference: [What is difference between @RequestBody and @RequestParam?](https://stackoverflow.com/questions/28039709/what-is...
In the Spring-World request payload should correspond to @RequestBody, e.x: ``` public SomethingElse updateValue(@RequestBody Something value) { // ... } ``` Where "Something" is any POJO. In order to use @RequestParam, see: <https://github.com/jquery/jquery/issues/3269> ($.ajax Sends `data` property in DELETE...
45,384,608
I have searched again and again but nothing seems to be solving my problem. When ``` mail = imaplib.IMAP4_SSL("imap.google.com") ``` is declared it throws a syntax error, but tells me absolutely nothing but that it is incorrect. Does anyone know what is going on here or knows how to fix it? Feel free to ask for more...
2017/07/29
[ "https://Stackoverflow.com/questions/45384608", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6873202/" ]
Numpy does not seem to allow fractional powers of negative numbers, even if the power would not result in a complex number. (I actually had this same problem earlier today, unrelatedly). One workaround is to use ``` np.sign(a) * (np.abs(a)) ** (1 / 3) ```
change the dtype to complex numbers ``` a = np.array(-1, dtype=np.complex) ``` The problem arises when you are working with roots of negative numbers.
2,757,655
**The Question:** Find all primes $p$ such that $\phi(x)=x^{13}$ is a homomorphism $\Bbb Z/p\Bbb Z \rightarrow \Bbb Z/p\Bbb Z$ --- **My Thoughts:** So from what I understand \begin{align} \ & \phi:\Bbb Z/p\Bbb Z \rightarrow \Bbb Z/p\Bbb Z \quad\text{is a homomorphism} \\ \ \iff & \phi(xy) \equiv \phi(x)\phi(y) \pm...
2018/04/28
[ "https://math.stackexchange.com/questions/2757655", "https://math.stackexchange.com", "https://math.stackexchange.com/users/520107/" ]
I believe the OP's various comments are all correct. Therefore I cannot claim any credit for this answer, but I'm just writing it out more fully for the record, so that others can scrutinize it better. **Necessity:** 8 queries are not enough for a win, because: an adversary can answer "1" to any 8 queries, and still h...
Let $r\_1, ..., r\_{11}$ be all different 11 rings, ordered by indices. There are 2 rings $r\_i$ and $r\_j$, with $i\neq j\in\{1,...,11\}$, that are real and the rest is fake. Select 5 consecutive rings. Now there are 3 cases. **Case 1** Suppose that we've picked 5 fake rings. This implies that the other 6 rings must...
18,353,624
I am playing video in Qt using opencv. I am having 6 tiled view cameras from which I am playing video. The problem is if one of the videos is not playing i.e finishes then the GUI freezes and exits. The error I get is you must reimplement QApplication::notify() and catch the exceptions there. How to do this? The code I...
2013/08/21
[ "https://Stackoverflow.com/questions/18353624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2548968/" ]
This will do the trick changing that to 3 movies is simple. ``` class MainWindow : public QMainWindow { Q_OBJECT explicit QMainWindow(QWidget *parent) .... // prepare timer and so on public slots: void startVideo() { vid1.close(); vid1.open("/root/mp.mp4"); imageTimer->start(); } vo...
Check if frame captured from camera is NULL. Then simply skip processing steps for this camera. And it'll be better to not mix C++ and C interfaces (I mean cv::Mat and IplImage).
49,585,780
It's possibile with security file config to redirect user already logged in to specific route (e.g homepage) if they try to access on login/register pages? One solution that I already found is to attach a listener to EventRequest, but I prefer to use security config if it's possible.
2018/03/31
[ "https://Stackoverflow.com/questions/49585780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7334516/" ]
After some googling I noticed that another solution is to override the fosuserbundle controllers. But because I need that this behavior should works also for /register and /resetting pages, instead to override also those controller, I preferred to use EventListener. Maybe this's the best solution in this case. I'm usin...
@Mintendo, I have errors using your code: ``` request.CRITICAL: Exception thrown when handling an exception (Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException: The token storage contains no authentication token. php.CRITICAL: Uncaught Exception: The token storage contains no authenti...
7,711,957
I have two activities, one is a list for item, the other one is the edit view for the item. When user clicks the item in the first view, the second edit view will show. In android the stack based mechanism, if I do this the behavior is weird. List view -> click -> edit view -> save -> list view -> click -> edit ->......
2011/10/10
[ "https://Stackoverflow.com/questions/7711957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197036/" ]
Pardon me if I'm wrong but I think you handle the Edit->List switching with a startActivity(). I think you should just `finish()` your activity when you handle save (letting activity stack go back to List)
For your any one of the activity as per your requirement set the following attribute in your project manifest file ``` android:noHistory="true" ``` so that activity will not be kept on stack and chain will break.
7,711,957
I have two activities, one is a list for item, the other one is the edit view for the item. When user clicks the item in the first view, the second edit view will show. In android the stack based mechanism, if I do this the behavior is weird. List view -> click -> edit view -> save -> list view -> click -> edit ->......
2011/10/10
[ "https://Stackoverflow.com/questions/7711957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197036/" ]
For your any one of the activity as per your requirement set the following attribute in your project manifest file ``` android:noHistory="true" ``` so that activity will not be kept on stack and chain will break.
You Can also write this code for back to activity if you want to move back five stack back then put this line code ``` moveTaskToBack(true); moveTaskToBack(true); moveTaskToBack(true); moveTaskToBack(true); moveTaskToBack(true); ```
7,711,957
I have two activities, one is a list for item, the other one is the edit view for the item. When user clicks the item in the first view, the second edit view will show. In android the stack based mechanism, if I do this the behavior is weird. List view -> click -> edit view -> save -> list view -> click -> edit ->......
2011/10/10
[ "https://Stackoverflow.com/questions/7711957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197036/" ]
Pardon me if I'm wrong but I think you handle the Edit->List switching with a startActivity(). I think you should just `finish()` your activity when you handle save (letting activity stack go back to List)
From ListView actiivty call EditView activity by `startActivityForResult()` . and after save the EditView just `finish()` the EditView activity. and in Manifest file just put `android:noHistory="true"`. EDIT: ``` android:noHistory ``` Whether or not the activity should be removed from the activity stack and fini...
7,711,957
I have two activities, one is a list for item, the other one is the edit view for the item. When user clicks the item in the first view, the second edit view will show. In android the stack based mechanism, if I do this the behavior is weird. List view -> click -> edit view -> save -> list view -> click -> edit ->......
2011/10/10
[ "https://Stackoverflow.com/questions/7711957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197036/" ]
From ListView actiivty call EditView activity by `startActivityForResult()` . and after save the EditView just `finish()` the EditView activity. and in Manifest file just put `android:noHistory="true"`. EDIT: ``` android:noHistory ``` Whether or not the activity should be removed from the activity stack and fini...
You Can also write this code for back to activity if you want to move back five stack back then put this line code ``` moveTaskToBack(true); moveTaskToBack(true); moveTaskToBack(true); moveTaskToBack(true); moveTaskToBack(true); ```
7,711,957
I have two activities, one is a list for item, the other one is the edit view for the item. When user clicks the item in the first view, the second edit view will show. In android the stack based mechanism, if I do this the behavior is weird. List view -> click -> edit view -> save -> list view -> click -> edit ->......
2011/10/10
[ "https://Stackoverflow.com/questions/7711957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197036/" ]
Pardon me if I'm wrong but I think you handle the Edit->List switching with a startActivity(). I think you should just `finish()` your activity when you handle save (letting activity stack go back to List)
You Can also write this code for back to activity if you want to move back five stack back then put this line code ``` moveTaskToBack(true); moveTaskToBack(true); moveTaskToBack(true); moveTaskToBack(true); moveTaskToBack(true); ```
52,073,059
I have this problem with actions of AlertDialog ``` AlertDialog( title: ..., content: ..., actions: <Widget>[ FlatButton(onPressed: ..., child: Text(btn_download)), FlatButton(onPressed: ..., child: Text('btn_select')), FlatButton(onPres...
2018/08/29
[ "https://Stackoverflow.com/questions/52073059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7130820/" ]
I don't have access to AndroidStudio to validate my hypothesis, but I'd try something like this: ``` AlertDialog( title: ..., content: ..., actions: <Widget>[ new Container ( child: new Column ( children: <Widget>[ FlatButton(onPressed: ..., ...
The `ButtonBar` is not made for so many buttons. Place your buttons in a `Wrap` widget or a `Column`.
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
When you are navigating *forward*, can you set **NavigationCacheMode** to **Disabled** before you call **Frame.Navigate**? Then, in **OnNavigatedTo()** set **NavigationCacheMode** back to **Enabled** again. That should make it so that when you navigate forward, caching is disabled. But when you arrive on the new page ...
You use the NavigationCacheMode property to specify whether a new instance of the page is created for each visit to the page or if a previously constructed instance of the page that has been saved in the cache is used for each visit. The default value for the NavigationCacheMode property is Disabled. Set the Navigatio...
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
I had much the same problem. I wanted it such that when I was moving forward in Metro (Windows Store to be proper), it would create a new instance. However, when going back, it would keep the data that I wanted save. So, I likewise used NavigationCacheMode = NavigationCacheMode.Enabled. I found that regardless of whic...
When **NavigationCacheMode** is enabled, you can call **Dispose()** (conditionally) in **OnNavigatedFrom()** to make sure that a new instance of the page will be created the next time the application navigates to it.
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
Because there was no solution to this problem, I had to reimplement all paging relevant classes: Page, Frame, SuspensionManager, etc... The solution can be downloaded here: <https://github.com/MyToolkit/MyToolkit/wiki/Paging-Overview> **Update:** The page class now also provides the **OnNavigatingFromAsync** metho...
I achieved this by: * Setting NavigationCacheMode to Required/Enabled for required Pages. * On clicking on Page2 button/link: Traverse the Frame BackStack and find out if the Page2 is in BackStack. If Page2 is found call Frame.GoBack() required number of times. If not found just navigate to the new Page. This will w...
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
You use the NavigationCacheMode property to specify whether a new instance of the page is created for each visit to the page or if a previously constructed instance of the page that has been saved in the cache is used for each visit. The default value for the NavigationCacheMode property is Disabled. Set the Navigatio...
When **NavigationCacheMode** is enabled, you can call **Dispose()** (conditionally) in **OnNavigatedFrom()** to make sure that a new instance of the page will be created the next time the application navigates to it.
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
Because there was no solution to this problem, I had to reimplement all paging relevant classes: Page, Frame, SuspensionManager, etc... The solution can be downloaded here: <https://github.com/MyToolkit/MyToolkit/wiki/Paging-Overview> **Update:** The page class now also provides the **OnNavigatingFromAsync** metho...
I had to derive a `page2` class from my `page` class and then when I want to navigate to a second version of the same page, I detect if the `this` object is `page` or `page2`. I then navigate to `page2` if I was in `page` and navigate to `page` if in `page2`. The only drawback, which is a huge one, is that there is no...
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
You use the NavigationCacheMode property to specify whether a new instance of the page is created for each visit to the page or if a previously constructed instance of the page that has been saved in the cache is used for each visit. The default value for the NavigationCacheMode property is Disabled. Set the Navigatio...
I achieved this by: * Setting NavigationCacheMode to Required/Enabled for required Pages. * On clicking on Page2 button/link: Traverse the Frame BackStack and find out if the Page2 is in BackStack. If Page2 is found call Frame.GoBack() required number of times. If not found just navigate to the new Page. This will w...
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
I had much the same problem. I wanted it such that when I was moving forward in Metro (Windows Store to be proper), it would create a new instance. However, when going back, it would keep the data that I wanted save. So, I likewise used NavigationCacheMode = NavigationCacheMode.Enabled. I found that regardless of whic...
You use the NavigationCacheMode property to specify whether a new instance of the page is created for each visit to the page or if a previously constructed instance of the page that has been saved in the cache is used for each visit. The default value for the NavigationCacheMode property is Disabled. Set the Navigatio...
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
Because there was no solution to this problem, I had to reimplement all paging relevant classes: Page, Frame, SuspensionManager, etc... The solution can be downloaded here: <https://github.com/MyToolkit/MyToolkit/wiki/Paging-Overview> **Update:** The page class now also provides the **OnNavigatingFromAsync** metho...
When **NavigationCacheMode** is enabled, you can call **Dispose()** (conditionally) in **OnNavigatedFrom()** to make sure that a new instance of the page will be created the next time the application navigates to it.
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
Because there was no solution to this problem, I had to reimplement all paging relevant classes: Page, Frame, SuspensionManager, etc... The solution can be downloaded here: <https://github.com/MyToolkit/MyToolkit/wiki/Paging-Overview> **Update:** The page class now also provides the **OnNavigatingFromAsync** metho...
I had much the same problem. I wanted it such that when I was moving forward in Metro (Windows Store to be proper), it would create a new instance. However, when going back, it would keep the data that I wanted save. So, I likewise used NavigationCacheMode = NavigationCacheMode.Enabled. I found that regardless of whic...
11,539,755
I'm trying to create an UWP (Universal Windows App) application with C#. My problem is the `Frame` control: If I use it without `NavigationCacheMode = Required`, every time the user goes back, the page is not kept in memory and will be recreated. If I set `NavigationCacheMode` to `Required` or `Enabled`, going back wor...
2012/07/18
[ "https://Stackoverflow.com/questions/11539755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/876814/" ]
I had much the same problem. I wanted it such that when I was moving forward in Metro (Windows Store to be proper), it would create a new instance. However, when going back, it would keep the data that I wanted save. So, I likewise used NavigationCacheMode = NavigationCacheMode.Enabled. I found that regardless of whic...
I had to derive a `page2` class from my `page` class and then when I want to navigate to a second version of the same page, I detect if the `this` object is `page` or `page2`. I then navigate to `page2` if I was in `page` and navigate to `page` if in `page2`. The only drawback, which is a huge one, is that there is no...
11,086,112
I'm pretty new to Regex and I'm just trying to get my head around it. The string I am trying to search through is this: ``` 100 ON 12C 12,41C High Cool OK 0 101 OFF 32C 04,93C Low Dry OK 1 102 ON 07C 08,27C High Dry OK 0 ``` What I am trying to do is work out the part to find the part `32C` from the string. If possi...
2012/06/18
[ "https://Stackoverflow.com/questions/11086112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1392240/" ]
Your example is line-oriented and of equal weight (at the same time) biased towards the beginning of the line in the string. If your engine flavor does grouping, you should be able to specify an occurance quantifier that will get you a single exact answer, without the need to do arrays and such. In both cases the a...
You could try something like the following. You will have to replace regex\_pattern with your regular expression pattern. In your case, regex\_pattern should be something like `@"\\s\\d\\dC"` (a whitespace character (`\\s`) followed by a digit (`\\d`) followed by a digit (`\\d`) followed an upper-case letter `C`. You ...
18,811,343
I'm not using RESTAdapter so I create Ember Object and using reopenClass method and jquery ajax function for ajax requesting and the code is: ``` OlapApp.Dimenssions = Ember.Object.extend({}); OlapApp.Dimenssions.reopenClass({ measure:Ember.A(), find:function(cubeUniqueName){ var c = Ember.A(); var xhr = $.aja...
2013/09/15
[ "https://Stackoverflow.com/questions/18811343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1262045/" ]
``` this.set('yourModelClass', yourArray.props); ``` This should do the trick as you said that you have all the json data in Array `'C'`
i can fix my problem with this line of code : ``` var data = JSON.parse(response.d); c.pushObject(Ember.Object.create(data)); ```
22,698,371
I have searched for possible solution by googling/so/forums for pdfClown/pdfbox and posting the problem at SO. **Problem:** I have been trying to find a solution to highlight text, which spans across multiple lines in pdf document. The pdf can have one/two-column pages. By using pdf-clown, I was able to highlight ph...
2014/03/27
[ "https://Stackoverflow.com/questions/22698371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1830284/" ]
Here you go: **<http://jsfiddle.net/8t3Xq/1/>** This demonstrates loading your `<li>` thumbs just as your question does, then I show how to easily change one of them. How to "*change*" them is endless, this is just a simple example of changing the content and background. So you must not have your selectors right. Thi...
there is no way that my answer is so far removed from the problem statement. my guess is that either I somehow errantly posted this answer or the problem was edited. apologies you could also use: ``` $(document).on('click','li .playVideo',function(){ //do something }); ``` i would probably change your #playVideo ...
22,698,371
I have searched for possible solution by googling/so/forums for pdfClown/pdfbox and posting the problem at SO. **Problem:** I have been trying to find a solution to highlight text, which spans across multiple lines in pdf document. The pdf can have one/two-column pages. By using pdf-clown, I was able to highlight ph...
2014/03/27
[ "https://Stackoverflow.com/questions/22698371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1830284/" ]
``` $.getJSON("http://vimeo.com/api/v2/album/1822727/videos.json", function(data){ $.each(data, function (index, value) { var videoID = value.id; var videoThm = value.thumbnail_large; $('#galThms').append('<li id="thm' + videoID + '" style="background-image:url(' + videoThm + ');"><a href="#playV...
there is no way that my answer is so far removed from the problem statement. my guess is that either I somehow errantly posted this answer or the problem was edited. apologies you could also use: ``` $(document).on('click','li .playVideo',function(){ //do something }); ``` i would probably change your #playVideo ...
38,978,805
I will try to explain my problem as clearly as possible, please tell me if it is not. I have a table `[MyTable]` that looks like this: ``` ---------------------------------------- |chn:integer | auds:integer (repeated) | ---------------------------------------- |1 |3916 | |1 |4...
2016/08/16
[ "https://Stackoverflow.com/questions/38978805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6613459/" ]
It's much easier to express this sort of logic with [standard SQL](https://cloud.google.com/bigquery/sql-reference/) (uncheck "Use Legacy SQL" under "Show Options"). Here's an example that computes sums over the `auds` arrays: ``` WITH MyTable AS ( SELECT 1 AS chn, [2, 3, 4, 5, 6] AS auds UNION ALL SELECT ...
Just use `GROUP BY` in conjunction with `SUM`. ``` SELECT SUM(auds), chn FROM [MyTable] GROUP BY chn ```
38,978,805
I will try to explain my problem as clearly as possible, please tell me if it is not. I have a table `[MyTable]` that looks like this: ``` ---------------------------------------- |chn:integer | auds:integer (repeated) | ---------------------------------------- |1 |3916 | |1 |4...
2016/08/16
[ "https://Stackoverflow.com/questions/38978805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6613459/" ]
Elliott’s answers are always inspiration for me! Please vote and accept his answer if it works for you (it should :o)) Meantime, wanted to add alternative option with [Scalar JS UDF](https://cloud.google.com/bigquery/sql-reference/user-defined-functions#user-defined-functions) ``` CREATE TEMPORARY FUNCTION mySUM(a...
Just use `GROUP BY` in conjunction with `SUM`. ``` SELECT SUM(auds), chn FROM [MyTable] GROUP BY chn ```
38,978,805
I will try to explain my problem as clearly as possible, please tell me if it is not. I have a table `[MyTable]` that looks like this: ``` ---------------------------------------- |chn:integer | auds:integer (repeated) | ---------------------------------------- |1 |3916 | |1 |4...
2016/08/16
[ "https://Stackoverflow.com/questions/38978805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6613459/" ]
It's much easier to express this sort of logic with [standard SQL](https://cloud.google.com/bigquery/sql-reference/) (uncheck "Use Legacy SQL" under "Show Options"). Here's an example that computes sums over the `auds` arrays: ``` WITH MyTable AS ( SELECT 1 AS chn, [2, 3, 4, 5, 6] AS auds UNION ALL SELECT ...
Elliott’s answers are always inspiration for me! Please vote and accept his answer if it works for you (it should :o)) Meantime, wanted to add alternative option with [Scalar JS UDF](https://cloud.google.com/bigquery/sql-reference/user-defined-functions#user-defined-functions) ``` CREATE TEMPORARY FUNCTION mySUM(a...
17,675,715
The way I do it now is: 1. CTRL + F 2. Enter Data to Find (e.g. "57011-141") 3. Click Find All 4. Usually 10-20 rows will come up. I then go one by one copying and pasting into a new book. I am looking to automate this process as it is time consuming and error prone.
2013/07/16
[ "https://Stackoverflow.com/questions/17675715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1911755/" ]
If the `57011-141` appears in a single column (sorting irrelevant) Filter the data (This image is from Excel 2010) ![Filter menu in 2010](https://i.stack.imgur.com/yZ7mu.jpg) The down arrow next to the column name will allow you to set the filter under TextFilters -> Contains Once the filter is applied, select all ...
If `57011-141` appears in single column, here is the solution. 1. Sort the book with that particular column. 2. CTRL + F 3. Data to Find (e.g. "57011-141") 4. Click Find All 5. Cntrl + A 6. Close Find & Replace Dialog 7. Shift + Space to select all rows which returned by Find 8. Copy and paste into new sheet Edit: i...
35,261
I've recently moved into a home with a gas oven, but I've never used a gas oven before. What general differences might I expect compared to cooking in an electric oven? Humidity? Cook times? What rack setting to use? What temperature to use? Different cooking characteristics? Etc.
2013/07/12
[ "https://cooking.stackexchange.com/questions/35261", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/6992/" ]
My experience with gas ovens is that they are much more susceptible to heat 'zones'. The top of the oven is markedly hotter than the bottom, and the back, nearer the flame, is hotter than the front. Other than that they are pretty similar to electric ovens. Gas ovens *may* use gas mark settings rather than a temperatu...
In almost all respects, cooking in a gas oven is the same as cooking in an electric oven. Some differences you may find: * Some gas ovens have a broiler (or grill, in UK parlance) at the top of the main oven chamber. When using this, you *may* need to have the door partially opened—see the manual of your particular ...
11,943
I am using `auto.arima()` for forecasting. When I am using any in built data such as "AirPassengers" it is capturing seasonality. But, If I am entering data in any other format (in vector form or from an excel sheet) it is not detecting seasonality. Is there any specific format in which it detects seasonality or I am ...
2011/06/15
[ "https://stats.stackexchange.com/questions/11943", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/5028/" ]
As @Dmitrij Celov commented, make sure your data is a ts() object, with the proper frequency. For example, if you have a vector of quarterly data, x = c(4,3,2,1,4,3,2,1), create y=ts(x,frequency=4). Use frequency=12 for monthly data, etc.
convert to ts, ts(x, start=c(2006,10), freq=12)
66,193,536
The result of this code is different depend on type of reference variable does this mean variables (int a) are bounded in static way ``` class A{ int a = 10; } public class Main extends A { int a = 30; public static void main(String[] args){ A m = new Main(); System.ou...
2021/02/14
[ "https://Stackoverflow.com/questions/66193536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15206995/" ]
This is not just like `static` or `dynamic binding`. There is no `polymorphism` for `fields` in Java, only for `methods`. Variables decisions are always taken at `compile-time`. So, during the `upcasting` base class variable will be taken.
The variable `m` you have declared is of type `A` so the output would be `10`. Instead if you have initialized `m` as `Main m = new Main();`, then the output would have been `30`. This is because, the object is of type `Main` and since `Main` also has a field `a`, this would override the parent field `a`.
66,193,536
The result of this code is different depend on type of reference variable does this mean variables (int a) are bounded in static way ``` class A{ int a = 10; } public class Main extends A { int a = 30; public static void main(String[] args){ A m = new Main(); System.ou...
2021/02/14
[ "https://Stackoverflow.com/questions/66193536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15206995/" ]
This is not just like `static` or `dynamic binding`. There is no `polymorphism` for `fields` in Java, only for `methods`. Variables decisions are always taken at `compile-time`. So, during the `upcasting` base class variable will be taken.
You have two object's type (`A, Main`) both from them have their own meaning for a variable `a`, so when your variable m has type `A` you get value `10` and if variable m has type `Main` you will get value `30`.
40,621,770
I was trying to clear my git after adding files from the wrong directory and ran the git clean -df function. This resulted in all my user data being deleted. I haven't done anything more in git after this, and I don't dare to turn of my PC at the moment. However, I noticed that there is a .git folder which contains ab...
2016/11/15
[ "https://Stackoverflow.com/questions/40621770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7119826/" ]
There's no way to recover from this unless you had a backup or want to explore using undelete utilities. Git is not saving backups anywhere.
Short answer and most probable there is not!! Still some IDE's track and store locally this information see for example: [Is it still possible to restore deleted untracked files in git?](https://stackoverflow.com/questions/9750049/is-it-possible-to-restore-deleted-untracked-files-in-git) So depending on your IDE or t...
40,621,770
I was trying to clear my git after adding files from the wrong directory and ran the git clean -df function. This resulted in all my user data being deleted. I haven't done anything more in git after this, and I don't dare to turn of my PC at the moment. However, I noticed that there is a .git folder which contains ab...
2016/11/15
[ "https://Stackoverflow.com/questions/40621770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7119826/" ]
There's no way to recover from this unless you had a backup or want to explore using undelete utilities. Git is not saving backups anywhere.
If you're using Eclipse, and you're only missing code or text, don't despair, not all may be lost. Go to: ``` [WORKSPACE]/.metadata/.plugins/org.eclipse.core.resources/.history ``` Then use `grep` (\*nix), `FINDSTR` (Windows) or a similiar tool to search for text snippets you know to have occurred in the deleted fil...
40,621,770
I was trying to clear my git after adding files from the wrong directory and ran the git clean -df function. This resulted in all my user data being deleted. I haven't done anything more in git after this, and I don't dare to turn of my PC at the moment. However, I noticed that there is a .git folder which contains ab...
2016/11/15
[ "https://Stackoverflow.com/questions/40621770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7119826/" ]
Short answer and most probable there is not!! Still some IDE's track and store locally this information see for example: [Is it still possible to restore deleted untracked files in git?](https://stackoverflow.com/questions/9750049/is-it-possible-to-restore-deleted-untracked-files-in-git) So depending on your IDE or t...
If you're using Eclipse, and you're only missing code or text, don't despair, not all may be lost. Go to: ``` [WORKSPACE]/.metadata/.plugins/org.eclipse.core.resources/.history ``` Then use `grep` (\*nix), `FINDSTR` (Windows) or a similiar tool to search for text snippets you know to have occurred in the deleted fil...
24,648,183
I currently work on a project in python and I would have liked to make a SQL query with an apostrophe in my character string. Ex: `"Jimmy's home."` And I have this error: ``` 1064 You have an error in your SQL syntax ``` So, I've tried to put a `\` before the apostrophe, but when I look at my database, just the str...
2014/07/09
[ "https://Stackoverflow.com/questions/24648183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816599/" ]
If you apply the class to be added as the `id` for buttons, you can do the following: ``` $('.btn').click(function(){ $('.active').removeClass('active'); $(this).addClass('active'); $('.item').removeClass().addClass('item').addClass(this.id); }); ``` [Demo](http://jsfiddle.net/6UW33/7/) *side note: you had a ...
[DEMO](http://jsfiddle.net/straszak_piotr/6UW33/1/) Best practice would be using `data-yourVariableName` (`data-class` in my DEMO) attributes for data that will be used by your code. Then you just write something like that: ``` $("button").click(function(){ $(".item").toggleClass($(this).attr('data-class')); }); ...
24,648,183
I currently work on a project in python and I would have liked to make a SQL query with an apostrophe in my character string. Ex: `"Jimmy's home."` And I have this error: ``` 1064 You have an error in your SQL syntax ``` So, I've tried to put a `\` before the apostrophe, but when I look at my database, just the str...
2014/07/09
[ "https://Stackoverflow.com/questions/24648183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816599/" ]
You can get `class` by `attr` and then remove `btn` class to get other `class` names. But, I would prefer to save class names in `data` attribute. **[Demo](http://jsfiddle.net/6UW33/5/)** **HTML:** ``` <button type="button" data-class="gridLarge" class="btn gridLarge active">largegrid</button> <button type="button" ...
[DEMO](http://jsfiddle.net/straszak_piotr/6UW33/1/) Best practice would be using `data-yourVariableName` (`data-class` in my DEMO) attributes for data that will be used by your code. Then you just write something like that: ``` $("button").click(function(){ $(".item").toggleClass($(this).attr('data-class')); }); ...
24,648,183
I currently work on a project in python and I would have liked to make a SQL query with an apostrophe in my character string. Ex: `"Jimmy's home."` And I have this error: ``` 1064 You have an error in your SQL syntax ``` So, I've tried to put a `\` before the apostrophe, but when I look at my database, just the str...
2014/07/09
[ "https://Stackoverflow.com/questions/24648183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3816599/" ]
If you apply the class to be added as the `id` for buttons, you can do the following: ``` $('.btn').click(function(){ $('.active').removeClass('active'); $(this).addClass('active'); $('.item').removeClass().addClass('item').addClass(this.id); }); ``` [Demo](http://jsfiddle.net/6UW33/7/) *side note: you had a ...
You can get `class` by `attr` and then remove `btn` class to get other `class` names. But, I would prefer to save class names in `data` attribute. **[Demo](http://jsfiddle.net/6UW33/5/)** **HTML:** ``` <button type="button" data-class="gridLarge" class="btn gridLarge active">largegrid</button> <button type="button" ...
39,714,618
I'm creating a 2D array for baseball scores, and if the home team's score is greater than visiting team score after the top of the 9th, then I need that array position to display a hyphen "-" instead of zero. ``` if (eigthhomeScore > visitorScore) { scoreArray [1][8] = 0; } ```
2016/09/27
[ "https://Stackoverflow.com/questions/39714618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6765907/" ]
You would be correct in saying that. The short answer is no. Hashing provides a 1-way interface for obscuring data where as encryption provides a 2-way interface for the encryption of data / decryption of encrypted data. The only way an hash cant be 'decrypted' and I use that term loosely is by brute forcing via the ...
Short answer: no. See also <https://en.wikipedia.org/wiki/Hash_function> Correctly salted hashes cannot be reverted, which is the point of doing that.
39,714,618
I'm creating a 2D array for baseball scores, and if the home team's score is greater than visiting team score after the top of the 9th, then I need that array position to display a hyphen "-" instead of zero. ``` if (eigthhomeScore > visitorScore) { scoreArray [1][8] = 0; } ```
2016/09/27
[ "https://Stackoverflow.com/questions/39714618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6765907/" ]
Short answer: no. See also <https://en.wikipedia.org/wiki/Hash_function> Correctly salted hashes cannot be reverted, which is the point of doing that.
No. Not easily. A Hash will take some text and produce a number ( usually ) eg, a md5 hash ``` password => 5f4dcc3b5aa765d61d8327deb882cf99 ``` By the nature of the hash, there is no easy way to get back from the number to the original text "password" But, for the semi clever hacker, you can generate hashes usi...
39,714,618
I'm creating a 2D array for baseball scores, and if the home team's score is greater than visiting team score after the top of the 9th, then I need that array position to display a hyphen "-" instead of zero. ``` if (eigthhomeScore > visitorScore) { scoreArray [1][8] = 0; } ```
2016/09/27
[ "https://Stackoverflow.com/questions/39714618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6765907/" ]
You would be correct in saying that. The short answer is no. Hashing provides a 1-way interface for obscuring data where as encryption provides a 2-way interface for the encryption of data / decryption of encrypted data. The only way an hash cant be 'decrypted' and I use that term loosely is by brute forcing via the ...
No. Not easily. A Hash will take some text and produce a number ( usually ) eg, a md5 hash ``` password => 5f4dcc3b5aa765d61d8327deb882cf99 ``` By the nature of the hash, there is no easy way to get back from the number to the original text "password" But, for the semi clever hacker, you can generate hashes usi...
59,968,513
I have a few files that have a randomly generated number that corresponds with a date: ``` 736815 = 01/05/2018 ``` I need to create a function or process that applies logic to sequential numbers so that the next number equals the next calendar date. Ideally i would need it in a key:pair format, so that when i conve...
2020/01/29
[ "https://Stackoverflow.com/questions/59968513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12366745/" ]
I think `origin` parameter is possible use here, also add `unit='D'` to [`to_datetime`](http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.to_datetime.html): ``` df = pd.DataFrame({'col':[5678, 5679, 5680]}) df['date'] = pd.to_datetime(df['col'] - 5678, unit='D', origin=pd.Timestamp('2020-01-01')) print...
The number doesn't need to translate into the date directly in any way. You just need to pick a start date and a number, and add another number either via simple addition or via a `timedelta`: ``` from datetime import date, timedelta from random import randint start_date = date.today() start_int = randint(1000, 10000...
59,968,513
I have a few files that have a randomly generated number that corresponds with a date: ``` 736815 = 01/05/2018 ``` I need to create a function or process that applies logic to sequential numbers so that the next number equals the next calendar date. Ideally i would need it in a key:pair format, so that when i conve...
2020/01/29
[ "https://Stackoverflow.com/questions/59968513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12366745/" ]
I think `origin` parameter is possible use here, also add `unit='D'` to [`to_datetime`](http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.to_datetime.html): ``` df = pd.DataFrame({'col':[5678, 5679, 5680]}) df['date'] = pd.to_datetime(df['col'] - 5678, unit='D', origin=pd.Timestamp('2020-01-01')) print...
Another solution is to create an object, which encapsulates the date and the base number to count from. Each call to this object (implemented using the `__call__` special method) will create a new date object using the time delta between the base number and the supplied number. ```py import datetime class RelativeDat...
59,968,513
I have a few files that have a randomly generated number that corresponds with a date: ``` 736815 = 01/05/2018 ``` I need to create a function or process that applies logic to sequential numbers so that the next number equals the next calendar date. Ideally i would need it in a key:pair format, so that when i conve...
2020/01/29
[ "https://Stackoverflow.com/questions/59968513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12366745/" ]
The number doesn't need to translate into the date directly in any way. You just need to pick a start date and a number, and add another number either via simple addition or via a `timedelta`: ``` from datetime import date, timedelta from random import randint start_date = date.today() start_int = randint(1000, 10000...
Another solution is to create an object, which encapsulates the date and the base number to count from. Each call to this object (implemented using the `__call__` special method) will create a new date object using the time delta between the base number and the supplied number. ```py import datetime class RelativeDat...
40,148,759
I have a worksheet which contains a lot of sheets and each one contains some rows with specific background color Is it possible to remove background color of all cells or rows which have specific color (yellow in my case) background in a worksheet [here is an example file](http://s000.tinyupload.com/?file_id=28547251...
2016/10/20
[ "https://Stackoverflow.com/questions/40148759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6482460/" ]
Yes it is possible. You have to check for the Range.Interior.Color value of a specific Range. In VBA this would look like this: ``` If ActiveWorksheet.Range("A1").Interior.Color = RGB(255,255,0) Then 'Do something End If ``` `RGB(255,255,0)` is yellow in this case. You can use all other values as well. See [RGB Fu...
This might solve youre problem: ``` For i = 1 To Sheets.Count On Error GoTo nex: Sheets(i).Activate For j = 1 To ActiveSheet.Cells.Find("*", SearchOrder:=xlByRows, LookIn:=xlValues, SearchDirection:=xlPrevious).Row For k = 1 To ActiveSheet.Cells.Find("*", SearchOrder:=xlByColumns, LookIn:=xlValues,...
10,317,259
When you decorate a model object's property with the `Required` attribute and don't specify `ErrorMessage` or `ResourceType/Name` you get the validation message in the interpolated form of "The {0} field is required.", where param 0 is the value of the `DisplayName` attribute of that property. I want to change that d...
2012/04/25
[ "https://Stackoverflow.com/questions/10317259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382783/" ]
Simply use the [file\_exists()](http://php.net/manual/en/function.file-exists.php) function
php has a function file\_exists. Use that to make some logic about if you show a link or not.
10,317,259
When you decorate a model object's property with the `Required` attribute and don't specify `ErrorMessage` or `ResourceType/Name` you get the validation message in the interpolated form of "The {0} field is required.", where param 0 is the value of the `DisplayName` attribute of that property. I want to change that d...
2012/04/25
[ "https://Stackoverflow.com/questions/10317259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382783/" ]
To look for files by a certain pattern you can use [glob](http://co.php.net/glob), then use is\_readable to check if you can read the files. ``` $files = array(); foreach(glob($dirname . DIRECTORY_SEPARATOR . $clientId . '-*' as $file) { if(is_readable($file) { $files[] = $file; } } ```
Simply use the [file\_exists()](http://php.net/manual/en/function.file-exists.php) function
10,317,259
When you decorate a model object's property with the `Required` attribute and don't specify `ErrorMessage` or `ResourceType/Name` you get the validation message in the interpolated form of "The {0} field is required.", where param 0 is the value of the `DisplayName` attribute of that property. I want to change that d...
2012/04/25
[ "https://Stackoverflow.com/questions/10317259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382783/" ]
To look for files by a certain pattern you can use [glob](http://co.php.net/glob), then use is\_readable to check if you can read the files. ``` $files = array(); foreach(glob($dirname . DIRECTORY_SEPARATOR . $clientId . '-*' as $file) { if(is_readable($file) { $files[] = $file; } } ```
php has a function file\_exists. Use that to make some logic about if you show a link or not.
11,310,150
This code is not compilable. I can't find why in standard. Can someone explain? ``` #include <iostream> #include <string> template<typename T> class S { public: explicit S(const std::string& s_):s(s_) { } std::ostream& print(std::ostream& os) const { os << s << std::endl; return os; } pr...
2012/07/03
[ "https://Stackoverflow.com/questions/11310150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1498580/" ]
Thats because no conversions, except for array-to-pointer, function-to-pointer, lvalue-to-rvalue and top-level const/volatile removal (cf. c++11 or c++03, 14.8.2.1), are considered when matching a template function. Specifically, your user-defined conversion operator `Test -> S<string>` is not considered when deducing ...
The first paragraph of @jpalecek's answer explains what the issue is. If you need a workaround, you could add a declaration like: ``` inline std::ostream& operator<< (std::ostream& os, const S<std::string>& s) { return operator<< <> (os, s); } ``` Since that overload is not a template, implicit conversions to `S<std...
64,552
The number I am thinking of is 80808. This is a palindrome. However, it is more than a palindrome, because it can be flipped or mirrored and will still read the same way. Is there a word for this?
2012/04/17
[ "https://english.stackexchange.com/questions/64552", "https://english.stackexchange.com", "https://english.stackexchange.com/users/7429/" ]
There's a term for words written in such a form that they can be read from another viewpoint, direction or orientation. They are called **ambigrams**. See the relevant [Wikipedia article](http://en.wikipedia.org/wiki/Ambigram).
I think the word you may want is [dihedral](http://mathworld.wolfram.com/DihedralPrime.html). The only numbers that can appear in such a construction are 0, 1, 2, 5, and 8, and the property primarily applies to numbers displayed on a calculator or using LED's. There are also dihedral letters, namely the capitals H, I,...
64,552
The number I am thinking of is 80808. This is a palindrome. However, it is more than a palindrome, because it can be flipped or mirrored and will still read the same way. Is there a word for this?
2012/04/17
[ "https://english.stackexchange.com/questions/64552", "https://english.stackexchange.com", "https://english.stackexchange.com/users/7429/" ]
[***Strobogrammatic number***](https://en.wikipedia.org/wiki/Strobogrammatic_number): > > A **strobogrammatic number** is a number that, given a base and given > a set of glyphs, appears the same whether viewed normally or upside > down by rotation of 180 degrees. (Wikipedia) > > >
I think the word you may want is [dihedral](http://mathworld.wolfram.com/DihedralPrime.html). The only numbers that can appear in such a construction are 0, 1, 2, 5, and 8, and the property primarily applies to numbers displayed on a calculator or using LED's. There are also dihedral letters, namely the capitals H, I,...
64,552
The number I am thinking of is 80808. This is a palindrome. However, it is more than a palindrome, because it can be flipped or mirrored and will still read the same way. Is there a word for this?
2012/04/17
[ "https://english.stackexchange.com/questions/64552", "https://english.stackexchange.com", "https://english.stackexchange.com/users/7429/" ]
There's a term for words written in such a form that they can be read from another viewpoint, direction or orientation. They are called **ambigrams**. See the relevant [Wikipedia article](http://en.wikipedia.org/wiki/Ambigram).
I believe the term you are looking for is: `mirror-image ambigram` More on [Wikipedia](http://en.wikipedia.org/wiki/Ambigram)...
64,552
The number I am thinking of is 80808. This is a palindrome. However, it is more than a palindrome, because it can be flipped or mirrored and will still read the same way. Is there a word for this?
2012/04/17
[ "https://english.stackexchange.com/questions/64552", "https://english.stackexchange.com", "https://english.stackexchange.com/users/7429/" ]
There's a term for words written in such a form that they can be read from another viewpoint, direction or orientation. They are called **ambigrams**. See the relevant [Wikipedia article](http://en.wikipedia.org/wiki/Ambigram).
[***Strobogrammatic number***](https://en.wikipedia.org/wiki/Strobogrammatic_number): > > A **strobogrammatic number** is a number that, given a base and given > a set of glyphs, appears the same whether viewed normally or upside > down by rotation of 180 degrees. (Wikipedia) > > >
64,552
The number I am thinking of is 80808. This is a palindrome. However, it is more than a palindrome, because it can be flipped or mirrored and will still read the same way. Is there a word for this?
2012/04/17
[ "https://english.stackexchange.com/questions/64552", "https://english.stackexchange.com", "https://english.stackexchange.com/users/7429/" ]
[***Strobogrammatic number***](https://en.wikipedia.org/wiki/Strobogrammatic_number): > > A **strobogrammatic number** is a number that, given a base and given > a set of glyphs, appears the same whether viewed normally or upside > down by rotation of 180 degrees. (Wikipedia) > > >
I believe the term you are looking for is: `mirror-image ambigram` More on [Wikipedia](http://en.wikipedia.org/wiki/Ambigram)...
5,848,490
How can i read users of a remote linux server with PHP? (like LDAP in windows) If `finger` server has been runned on the remote linux server,**Now what?**
2011/05/01
[ "https://Stackoverflow.com/questions/5848490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/726631/" ]
If you are talking about the [Request](http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html) and [Response](http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Response.html) objects, there was a discussion about this on the Symfony developers mailing list a few days ago. I invite you to tak...
Do you mean the [Request](http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html) object? Or what properties are you thinking of? If you're worried about safety, then take a look at the [Security](http://symfony.com/doc/2.0/book/security/overview.html) component, use Test-Driven-Development, use test...
5,848,490
How can i read users of a remote linux server with PHP? (like LDAP in windows) If `finger` server has been runned on the remote linux server,**Now what?**
2011/05/01
[ "https://Stackoverflow.com/questions/5848490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/726631/" ]
If you are talking about the [Request](http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html) and [Response](http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Response.html) objects, there was a discussion about this on the Symfony developers mailing list a few days ago. I invite you to tak...
What's the point to encapsulate what already's been encapsulated? I mean - each of this properties is a parameterBag instance with it's encapsulation.
450,278
Everytime I reboot, I've to turn off and on hotcorners from `unity-tweak-tool`. Other wise hot corners don't work. Any fix?? Thanks in advance!
2014/04/19
[ "https://askubuntu.com/questions/450278", "https://askubuntu.com", "https://askubuntu.com/users/38788/" ]
The guy in IRC was almost there, but not quite. The package that you need is called `dh-make` no `devscripts`. A simple `sudo apt-get install dh-make` should fix the issue. How to know: ``` chmod 744 debian/pxpress/switch* dh build make: dh: Command not found make: *** [build-arch] Error 127 dpkg-buildpackage: error:...
![enter image description here](https://i.stack.imgur.com/2Nad8.png) Install your driver though Software center. > > Ubuntu software center > Edit menu > Software sources > Additional Drivers > > > OR == run these commands in your Terminal: > > sudo apt-get install build-essential linux-headers-generic > >...
41,688,180
Without concat strings or `if` conditionals and such, use arithmetics one-liner. Preferably written in Python please. --- Background of the story: a legacy system requires a listening port last digit ends in [0-4] so [5-9] is reserved for a mirror TCP. I wrote a deploy script which generates [idempotent random numbe...
2017/01/17
[ "https://Stackoverflow.com/questions/41688180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41948/" ]
Here's one way to do it with `random.sample` and `mod`: ``` >>> import random >>> [i for i in random.sample(range(100), 100) if i%10<5] [24, 23, 62, 90, 80, 12, 4, 30, 43, 92, 21, 33, 41, 63, 52, 44, 81, 61, 31, 70, 73, 20, 0, 74, 2, 84, 11, 53, 13, 42, 50, 64, 60, 32, 71, 34, 72, 51, 1, 22, 91, 94, 40, 14, 82, 93, 3,...
If you don't mind disallowing 100, you can simply generate two random numbers, one between 0 and 9, the other between 0 and 4, and combine them arithmetically. ``` port = 10 * random.randint(0,9) + random.randint(0,4) ``` This chooses any of the 50 such ports uniformly. The simplest way to add 100 to the mix is to ...
41,688,180
Without concat strings or `if` conditionals and such, use arithmetics one-liner. Preferably written in Python please. --- Background of the story: a legacy system requires a listening port last digit ends in [0-4] so [5-9] is reserved for a mirror TCP. I wrote a deploy script which generates [idempotent random numbe...
2017/01/17
[ "https://Stackoverflow.com/questions/41688180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41948/" ]
After some discussion in the comments, if you've randomly selected a number `x` in range(0,50), you can map it to {0,1,2,3,4,10,11,...} like this: ``` y = 10*(x//5) + x % 5 ``` For example: ``` In [8]: out = [10 * (x//5) + x % 5 for x in range(50)] In [9]: out[:10] Out[9]: [0, 1, 2, 3, 4, 10, 11, 12, 13, 14] In [...
Here's one way to do it with `random.sample` and `mod`: ``` >>> import random >>> [i for i in random.sample(range(100), 100) if i%10<5] [24, 23, 62, 90, 80, 12, 4, 30, 43, 92, 21, 33, 41, 63, 52, 44, 81, 61, 31, 70, 73, 20, 0, 74, 2, 84, 11, 53, 13, 42, 50, 64, 60, 32, 71, 34, 72, 51, 1, 22, 91, 94, 40, 14, 82, 93, 3,...
41,688,180
Without concat strings or `if` conditionals and such, use arithmetics one-liner. Preferably written in Python please. --- Background of the story: a legacy system requires a listening port last digit ends in [0-4] so [5-9] is reserved for a mirror TCP. I wrote a deploy script which generates [idempotent random numbe...
2017/01/17
[ "https://Stackoverflow.com/questions/41688180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41948/" ]
After some discussion in the comments, if you've randomly selected a number `x` in range(0,50), you can map it to {0,1,2,3,4,10,11,...} like this: ``` y = 10*(x//5) + x % 5 ``` For example: ``` In [8]: out = [10 * (x//5) + x % 5 for x in range(50)] In [9]: out[:10] Out[9]: [0, 1, 2, 3, 4, 10, 11, 12, 13, 14] In [...
If you don't mind disallowing 100, you can simply generate two random numbers, one between 0 and 9, the other between 0 and 4, and combine them arithmetically. ``` port = 10 * random.randint(0,9) + random.randint(0,4) ``` This chooses any of the 50 such ports uniformly. The simplest way to add 100 to the mix is to ...
198,726
I'm responsible for several (rather small) programs, which share a lot of code via different libraries. I'm wondering what the best repository layout is to develop the different prorgrams (and libraries), and keep the libraries in sync across all the programs. For the sake of argument let's say there are two programs ...
2008/10/13
[ "https://Stackoverflow.com/questions/198726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5822/" ]
Well, I guess I disagree that externals are out of the question. I've had a similar problem in the past. I solved it using the svn property externals. Create your library repositories: ``` svnadmin create /path/library1 svnadmin create /path/library2 ... ``` Create client repositories: ``` svnadmin create /path/pr...
Why does the source for the library have to exist in the program tree. Compile your libraries separately and link them into your programs.
66,047,188
So I am making a Discord bot that DMs mod-type roles when someone goes against the rules. This is my first discord bot, and have really just been going off the example on GitHub. I can't seem to find how to check a role or DM everyone in a role. I found stuff like ``` if message.author.server_privileges("kick_members"...
2021/02/04
[ "https://Stackoverflow.com/questions/66047188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15145476/" ]
You could probably: ``` static int crt = -1; static readonly IReadOnlyList<A> Items = Enumerable.Range(1, 15).Select(i => new A()).ToList(); static readonly int itemsCount = Items.Count; static readonly int maxItemCount = itemsCount * 100; static A GetInstance() { int newIndex; while (true) { new...
~~No, the [`Interlocked`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.interlocked) class offers no mechanism that would allow you to restore an `Int32` value back to zero in case it overflows. The reason is that it is possible for two threads to invoke concurrently the `var newIndex = Interlocked.Incr...
66,047,188
So I am making a Discord bot that DMs mod-type roles when someone goes against the rules. This is my first discord bot, and have really just been going off the example on GitHub. I can't seem to find how to check a role or DM everyone in a role. I found stuff like ``` if message.author.server_privileges("kick_members"...
2021/02/04
[ "https://Stackoverflow.com/questions/66047188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15145476/" ]
~~No, the [`Interlocked`](https://learn.microsoft.com/en-us/dotnet/api/system.threading.interlocked) class offers no mechanism that would allow you to restore an `Int32` value back to zero in case it overflows. The reason is that it is possible for two threads to invoke concurrently the `var newIndex = Interlocked.Incr...
An alternative to using CompareExchange would be to simply let the values overflow. I have tested this and could not prove it wrong (so far), but of course that does not mean that it isn't. ``` //this incurs some cost, but "should" ensure that the int range // is mapped to the unit range (int.MinValue is mapped to ...
66,047,188
So I am making a Discord bot that DMs mod-type roles when someone goes against the rules. This is my first discord bot, and have really just been going off the example on GitHub. I can't seem to find how to check a role or DM everyone in a role. I found stuff like ``` if message.author.server_privileges("kick_members"...
2021/02/04
[ "https://Stackoverflow.com/questions/66047188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15145476/" ]
You could probably: ``` static int crt = -1; static readonly IReadOnlyList<A> Items = Enumerable.Range(1, 15).Select(i => new A()).ToList(); static readonly int itemsCount = Items.Count; static readonly int maxItemCount = itemsCount * 100; static A GetInstance() { int newIndex; while (true) { new...
An alternative to using CompareExchange would be to simply let the values overflow. I have tested this and could not prove it wrong (so far), but of course that does not mean that it isn't. ``` //this incurs some cost, but "should" ensure that the int range // is mapped to the unit range (int.MinValue is mapped to ...
10,038,598
Main question is what are the implications of allowing the this keyword to be modified in regards to usefulness and memory; and why is this allowed in the C# language specifications? The other questions/subparts can be answered or not if choose to do so. I thought answers to them would help clarify the answer to the m...
2012/04/06
[ "https://Stackoverflow.com/questions/10038598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246051/" ]
First of all, I think you should start by examining if you're even asking the right question. Perhaps we should be asking, "Why would C# **not** allow assignment to `this` in a struct?" Assigning to the `this` keyword in a reference type is potentially dangerous: you are overwriting a reference to the object who's met...
Having this assignable allows for 'advanced' corner cases with structs. One example i found was a swap method: ``` struct Foo { void Swap(ref Foo other) { Foo temp = this; this = other; other = temp; } } ``` I would strongly argue against this use since it violates the default...
10,038,598
Main question is what are the implications of allowing the this keyword to be modified in regards to usefulness and memory; and why is this allowed in the C# language specifications? The other questions/subparts can be answered or not if choose to do so. I thought answers to them would help clarify the answer to the m...
2012/04/06
[ "https://Stackoverflow.com/questions/10038598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246051/" ]
Having this assignable allows for 'advanced' corner cases with structs. One example i found was a swap method: ``` struct Foo { void Swap(ref Foo other) { Foo temp = this; this = other; other = temp; } } ``` I would strongly argue against this use since it violates the default...
You can take advantage of *this* and mutate an immutable structure ``` public struct ImmutableData { private readonly int data; private readonly string name; public ImmutableData(int data, string name) { this.data = data; this.name = name; } public int Data { get => data; } ...
10,038,598
Main question is what are the implications of allowing the this keyword to be modified in regards to usefulness and memory; and why is this allowed in the C# language specifications? The other questions/subparts can be answered or not if choose to do so. I thought answers to them would help clarify the answer to the m...
2012/04/06
[ "https://Stackoverflow.com/questions/10038598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246051/" ]
Having this assignable allows for 'advanced' corner cases with structs. One example i found was a swap method: ``` struct Foo { void Swap(ref Foo other) { Foo temp = this; this = other; other = temp; } } ``` I would strongly argue against this use since it violates the default...
I came across this when I was looking up how `System.Guid` was implemented, because I had a similar scenario. Basically, it does this (simplified): ``` struct Guid { Guid(string value) { this = Parse(value); } } ``` Which I think is a pretty neat solution.
10,038,598
Main question is what are the implications of allowing the this keyword to be modified in regards to usefulness and memory; and why is this allowed in the C# language specifications? The other questions/subparts can be answered or not if choose to do so. I thought answers to them would help clarify the answer to the m...
2012/04/06
[ "https://Stackoverflow.com/questions/10038598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246051/" ]
First of all, I think you should start by examining if you're even asking the right question. Perhaps we should be asking, "Why would C# **not** allow assignment to `this` in a struct?" Assigning to the `this` keyword in a reference type is potentially dangerous: you are overwriting a reference to the object who's met...
You can take advantage of *this* and mutate an immutable structure ``` public struct ImmutableData { private readonly int data; private readonly string name; public ImmutableData(int data, string name) { this.data = data; this.name = name; } public int Data { get => data; } ...
10,038,598
Main question is what are the implications of allowing the this keyword to be modified in regards to usefulness and memory; and why is this allowed in the C# language specifications? The other questions/subparts can be answered or not if choose to do so. I thought answers to them would help clarify the answer to the m...
2012/04/06
[ "https://Stackoverflow.com/questions/10038598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246051/" ]
First of all, I think you should start by examining if you're even asking the right question. Perhaps we should be asking, "Why would C# **not** allow assignment to `this` in a struct?" Assigning to the `this` keyword in a reference type is potentially dangerous: you are overwriting a reference to the object who's met...
I came across this when I was looking up how `System.Guid` was implemented, because I had a similar scenario. Basically, it does this (simplified): ``` struct Guid { Guid(string value) { this = Parse(value); } } ``` Which I think is a pretty neat solution.
58,806,685
I'm doing a "live preview" of the post you can post on my website and when you type in the content section the preview doesn't break the line, it just goes on and on. Live version you can test: <https://sponge.rip/post> ``` <script type="text/javascript"> function update_preview() { document.getElementById...
2019/11/11
[ "https://Stackoverflow.com/questions/58806685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12356923/" ]
You need a rich text editor to add line breaks. A basic textarea doesn't add html tags. Check out something like `tinymce` or [summernote](https://summernote.org/) or any of the other hundreds of text editors available on the internet
You could always convert line breaks to an html `<br />`. Something like this: ``` document.getElementById("preview_content").innerHTML = document.getElementsByTagName("textarea")[0].value.replace(/\r?\n/g, '<br />'); ```
58,806,685
I'm doing a "live preview" of the post you can post on my website and when you type in the content section the preview doesn't break the line, it just goes on and on. Live version you can test: <https://sponge.rip/post> ``` <script type="text/javascript"> function update_preview() { document.getElementById...
2019/11/11
[ "https://Stackoverflow.com/questions/58806685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12356923/" ]
Word break works fine. You can try it. ``` <p style="word-break: break-all;"></p> ``` <https://jsfiddle.net/dm6u4qra/>
You could always convert line breaks to an html `<br />`. Something like this: ``` document.getElementById("preview_content").innerHTML = document.getElementsByTagName("textarea")[0].value.replace(/\r?\n/g, '<br />'); ```
130,546
How to pro-actively notify search engines (Google and others) of removed pages 404s that are still indexed?
2020/07/14
[ "https://webmasters.stackexchange.com/questions/130546", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/37313/" ]
The XML sitemap is usually the best method to pro-actively notify search engines of anything, not just 404 pages. But I fail to understand why you would want to do that? Having 404 pages in Google's index isn't necessarily a bad thing, unless of course these 404 pages are still getting a lot of search hits, in which ca...
As suggested in other answers you can handle this issue with help of header status. If you are still in real hurry and want it removed as fast as possible then you can use remove urls from your Google Webmaster Tools >> Search Console. Usually it is advisable to allow it to get drop by itself but this is when your 40...
60,269,267
I have two lists ``` List1 - (1, 2, 3) List2 - (4, 5, 6,7, 8) ``` Want to merge both the list as `(1, 4, 2, 5, 3, 6, 7, 8)` using java streams First element from List1, List2 and, Second element from list1, list2 ...so on..if any extra elements remain then place at the end.
2020/02/17
[ "https://Stackoverflow.com/questions/60269267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3125890/" ]
``` Stream.concat(list1.stream(), list2.stream()) .collect(Collectors.toList()) ```
using java streams you can do it easily. List1.stream().collect(Collectors.toList()).addAll(List2);
60,269,267
I have two lists ``` List1 - (1, 2, 3) List2 - (4, 5, 6,7, 8) ``` Want to merge both the list as `(1, 4, 2, 5, 3, 6, 7, 8)` using java streams First element from List1, List2 and, Second element from list1, list2 ...so on..if any extra elements remain then place at the end.
2020/02/17
[ "https://Stackoverflow.com/questions/60269267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3125890/" ]
``` Stream.concat(list1.stream(), list2.stream()) .collect(Collectors.toList()) ```
Other answer has a link to a working solution, but here's another approach: ``` List<Integer> l1 = Arrays.asList(1, 2, 3); List<Integer> l2 = Arrays.asList(4, 5, 6, 7, 8); List<Integer> combined = IntStream.range(0, Math.max(l1.size(), l2.size())) .boxed() .flatMap(i -> { ...
60,269,267
I have two lists ``` List1 - (1, 2, 3) List2 - (4, 5, 6,7, 8) ``` Want to merge both the list as `(1, 4, 2, 5, 3, 6, 7, 8)` using java streams First element from List1, List2 and, Second element from list1, list2 ...so on..if any extra elements remain then place at the end.
2020/02/17
[ "https://Stackoverflow.com/questions/60269267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3125890/" ]
Other answer has a link to a working solution, but here's another approach: ``` List<Integer> l1 = Arrays.asList(1, 2, 3); List<Integer> l2 = Arrays.asList(4, 5, 6, 7, 8); List<Integer> combined = IntStream.range(0, Math.max(l1.size(), l2.size())) .boxed() .flatMap(i -> { ...
using java streams you can do it easily. List1.stream().collect(Collectors.toList()).addAll(List2);
45,709,677
I have user details from DB and print using blade loop with button for edit. now I want, if I click button I need user details for the button which is clicked for user. i tried with hidden input filed `<input type="hidden" value="{{$user->email}}" name="email">` in my controller I just print the value from form submi...
2017/08/16
[ "https://Stackoverflow.com/questions/45709677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8471568/" ]
You could simply do `ratio[mcap<100]<-NA`.
Another possibility is to use function `is.na<-`. ``` is.na(ratio) <- mcap < 100 ```
2,137
I'm having difficulty in creating a big post since the editor box is quite small. I want to make it bigger. Can I?
2010/09/23
[ "https://wordpress.stackexchange.com/questions/2137", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/992/" ]
You have a couple of options. First, you can always click on the bottom right corner of the post edit box and drag to resize: ![alt text](https://i.stack.imgur.com/WuHf3.jpg) However, you can also make it so that the post box is larger by default. Go to Settings > Writing, and change the value for size of the post bo...
You can also click on the blue square icon, second from right in your screenshot. That brings the edit box to full screen.
1,332,914
**Thanks for all suggestions. I have reinstalled ubuntu and put a single partition for all disk. I hope answers under this question helps someone else in future. For me, it was hard to understand as a newby Ubuntu user :) Thanks again.** I have installed Ubuntu 20.04 LTS on my new internal SSD 240 GB. I have created ...
2021/04/21
[ "https://askubuntu.com/questions/1332914", "https://askubuntu.com", "https://askubuntu.com/users/667999/" ]
I dont wanna sound stupid but did you try turning the ball like a big volume button? I still use Bionic Beaver and its plug and play.
Yes, it's possible, you can use the `xinput` too to configure the behavior of `libinput`, the library used to handle input devices. I run these two commands to enable scrolling for my Slimblade trackball using the back button: ``` xinput set-prop 'Kensington Slimblade Trackball' 'libinput Scroll Method Enabled' 0, 0,...
51,547,899
I m trying to remove price from string via **preg\_replace with regular expression** but it is not working. i want to remove 202,00 from given string ``` <?php $haystack = "4 x 3XS - € 202,00, L, 2XS, 4 x XS - € 202,00, S"; echo preg_replace('/^(?:0|[1-9]\d*)(?:\,\d{2})?$/','',$haystack); ?> ``` Expected resul...
2018/07/26
[ "https://Stackoverflow.com/questions/51547899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3458871/" ]
With the information given (which is almost none), the only way I can think of to improve this is through a `dict comprehension` ``` {k:v for k,v in d.items() if 'XYZ' not in v} ```
Use comprehensions: `filtered = [(k, v) for (k, v) in dict(dictionary_notes).items() if 'XYZ' not in v]` **EDIT** As someone mentioned below, above statement actually produces a list. To get back a dict, use this instead: `filtered = {k: v for (k, v) in dict(dictionary_notes).items() if 'XYZ' not in v}`
51,547,899
I m trying to remove price from string via **preg\_replace with regular expression** but it is not working. i want to remove 202,00 from given string ``` <?php $haystack = "4 x 3XS - € 202,00, L, 2XS, 4 x XS - € 202,00, S"; echo preg_replace('/^(?:0|[1-9]\d*)(?:\,\d{2})?$/','',$haystack); ?> ``` Expected resul...
2018/07/26
[ "https://Stackoverflow.com/questions/51547899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3458871/" ]
With the information given (which is almost none), the only way I can think of to improve this is through a `dict comprehension` ``` {k:v for k,v in d.items() if 'XYZ' not in v} ```
``` dictionary_notes = {'a': 'XYZ'} {k:v for k, v in dict(dictionary_notes).items() if 'XYZ' not in v} ``` Returns: {}
37
* Does encrypting my home folder make my computer more secure? * Do I have to enter my password more if my home folder is encrypted? * What else should I know about encrypting my home folder?
2010/07/28
[ "https://askubuntu.com/questions/37", "https://askubuntu.com", "https://askubuntu.com/users/56/" ]
**Simply** 1. Encrypting your home folder doesn't actually make your computer more secure - it simply makes all the files and folders in your home folder more secure from unauthorized viewing. * Your computer is still "vulnerable" in a security standpoint - but it becomes very difficult for your content to be stolen ...
There's a nice article on the topic written by the Ubuntu developer himself, please see: <http://www.linux-mag.com/id/7568/1/> ### Summary: * A combination of LUKS and dm-crypt are used for whole-disk encryption in Linux. Ubuntu uses the Enterprise Cryptographic File System (ECryptfs) from version >= 9.10 to enable h...
37
* Does encrypting my home folder make my computer more secure? * Do I have to enter my password more if my home folder is encrypted? * What else should I know about encrypting my home folder?
2010/07/28
[ "https://askubuntu.com/questions/37", "https://askubuntu.com", "https://askubuntu.com/users/56/" ]
There's a nice article on the topic written by the Ubuntu developer himself, please see: <http://www.linux-mag.com/id/7568/1/> ### Summary: * A combination of LUKS and dm-crypt are used for whole-disk encryption in Linux. Ubuntu uses the Enterprise Cryptographic File System (ECryptfs) from version >= 9.10 to enable h...
The security of your actual system isn't determined by the security of your files, folders, and documents...all it does is makes them slightly more secure from prying eyes....
37
* Does encrypting my home folder make my computer more secure? * Do I have to enter my password more if my home folder is encrypted? * What else should I know about encrypting my home folder?
2010/07/28
[ "https://askubuntu.com/questions/37", "https://askubuntu.com", "https://askubuntu.com/users/56/" ]
There's a nice article on the topic written by the Ubuntu developer himself, please see: <http://www.linux-mag.com/id/7568/1/> ### Summary: * A combination of LUKS and dm-crypt are used for whole-disk encryption in Linux. Ubuntu uses the Enterprise Cryptographic File System (ECryptfs) from version >= 9.10 to enable h...
Less technically answer as requested by OP. Security benefits of encrypted Home via ecryptfs as in Ubuntu: * Will not require any additional passwords or keys to be remembered or entered. * Does not make your computer more secure on a network, e.g. on the internet. * If the computer is shared between several users, p...
37
* Does encrypting my home folder make my computer more secure? * Do I have to enter my password more if my home folder is encrypted? * What else should I know about encrypting my home folder?
2010/07/28
[ "https://askubuntu.com/questions/37", "https://askubuntu.com", "https://askubuntu.com/users/56/" ]
There's a nice article on the topic written by the Ubuntu developer himself, please see: <http://www.linux-mag.com/id/7568/1/> ### Summary: * A combination of LUKS and dm-crypt are used for whole-disk encryption in Linux. Ubuntu uses the Enterprise Cryptographic File System (ECryptfs) from version >= 9.10 to enable h...
What else you should know about encrypting your home folder is that the data in it is not accessible when you are not logged in. If you have some automated or external process (like a crontab) that tries to access this data, it will work great while you are watching it, but fail when you are not watching it. This is ve...
37
* Does encrypting my home folder make my computer more secure? * Do I have to enter my password more if my home folder is encrypted? * What else should I know about encrypting my home folder?
2010/07/28
[ "https://askubuntu.com/questions/37", "https://askubuntu.com", "https://askubuntu.com/users/56/" ]
**Simply** 1. Encrypting your home folder doesn't actually make your computer more secure - it simply makes all the files and folders in your home folder more secure from unauthorized viewing. * Your computer is still "vulnerable" in a security standpoint - but it becomes very difficult for your content to be stolen ...
The security of your actual system isn't determined by the security of your files, folders, and documents...all it does is makes them slightly more secure from prying eyes....
37
* Does encrypting my home folder make my computer more secure? * Do I have to enter my password more if my home folder is encrypted? * What else should I know about encrypting my home folder?
2010/07/28
[ "https://askubuntu.com/questions/37", "https://askubuntu.com", "https://askubuntu.com/users/56/" ]
**Simply** 1. Encrypting your home folder doesn't actually make your computer more secure - it simply makes all the files and folders in your home folder more secure from unauthorized viewing. * Your computer is still "vulnerable" in a security standpoint - but it becomes very difficult for your content to be stolen ...
Less technically answer as requested by OP. Security benefits of encrypted Home via ecryptfs as in Ubuntu: * Will not require any additional passwords or keys to be remembered or entered. * Does not make your computer more secure on a network, e.g. on the internet. * If the computer is shared between several users, p...
37
* Does encrypting my home folder make my computer more secure? * Do I have to enter my password more if my home folder is encrypted? * What else should I know about encrypting my home folder?
2010/07/28
[ "https://askubuntu.com/questions/37", "https://askubuntu.com", "https://askubuntu.com/users/56/" ]
**Simply** 1. Encrypting your home folder doesn't actually make your computer more secure - it simply makes all the files and folders in your home folder more secure from unauthorized viewing. * Your computer is still "vulnerable" in a security standpoint - but it becomes very difficult for your content to be stolen ...
What else you should know about encrypting your home folder is that the data in it is not accessible when you are not logged in. If you have some automated or external process (like a crontab) that tries to access this data, it will work great while you are watching it, but fail when you are not watching it. This is ve...
37
* Does encrypting my home folder make my computer more secure? * Do I have to enter my password more if my home folder is encrypted? * What else should I know about encrypting my home folder?
2010/07/28
[ "https://askubuntu.com/questions/37", "https://askubuntu.com", "https://askubuntu.com/users/56/" ]
Less technically answer as requested by OP. Security benefits of encrypted Home via ecryptfs as in Ubuntu: * Will not require any additional passwords or keys to be remembered or entered. * Does not make your computer more secure on a network, e.g. on the internet. * If the computer is shared between several users, p...
The security of your actual system isn't determined by the security of your files, folders, and documents...all it does is makes them slightly more secure from prying eyes....
37
* Does encrypting my home folder make my computer more secure? * Do I have to enter my password more if my home folder is encrypted? * What else should I know about encrypting my home folder?
2010/07/28
[ "https://askubuntu.com/questions/37", "https://askubuntu.com", "https://askubuntu.com/users/56/" ]
What else you should know about encrypting your home folder is that the data in it is not accessible when you are not logged in. If you have some automated or external process (like a crontab) that tries to access this data, it will work great while you are watching it, but fail when you are not watching it. This is ve...
The security of your actual system isn't determined by the security of your files, folders, and documents...all it does is makes them slightly more secure from prying eyes....
53,879,891
I had to modify a file in node modules. which get over written with npm install. Can I keep modified file in my local src folder? then replace this from node\_module while ng serve/ng build. please help me how can I achieve this.
2018/12/21
[ "https://Stackoverflow.com/questions/53879891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4910641/" ]
The best way to handle this would be to fork the repo. Here is the link : <https://help.github.com/articles/fork-a-repo/>. Using This way, you have control of the contents of the package. Then update your package.json with your repositpry address. I also would recommend not pushing your packages to Git. Packages ar...
As you might already know, we have a package.json file in the project, in which all dependent and development dependent packages are mentioned. We do not push our node\_modules folder to the GitHub, instead of that whenever someone downloads our project he simply does npm i, and all the libraries mentioned in the packa...
1,055,748
I know that if (x)={0} then the if 0=r0 such that r belongs to R therefor it's a field. Most likely I'm wrong but I need help with the second part if the ideal is R
2014/12/07
[ "https://math.stackexchange.com/questions/1055748", "https://math.stackexchange.com", "https://math.stackexchange.com/users/185728/" ]
Define the $n$th partial sum by $$ S\_n = \frac{1}{x} + \frac{1}{x^2} + \frac{1}{x^3} + \dots + \frac{1}{x^n} $$ Then \begin{align\*} x S\_n &= 1 + \frac{1}{x} + \frac{1}{x^2} + \frac{1}{x^3} + \dots + \frac{1}{x^{n-1}} \\ \implies x S\_n - S\_n &= 1 - \frac{1}{x^n} \iff S\_n = \frac{1- \frac{1}{x^n}}{x-1}, \; x \neq 1...
If $|x|>1$, let $y=\frac{1}{x}$. Then, $|y|<1$, and your series is $y+y^2+y^3+...$ This is a geometric series, for which the limit is known to be $\frac{y}{1-y}$, if $|y|<1$, and it diverges otherwise. Now, why is that? Factorize $(1-y^{n+1})=(1-y)(1+y+y^2+...+y^n) \Rightarrow (1+y+y^2+...+y^n)=\frac{1-y^{n+1}}{1-y...
1,055,748
I know that if (x)={0} then the if 0=r0 such that r belongs to R therefor it's a field. Most likely I'm wrong but I need help with the second part if the ideal is R
2014/12/07
[ "https://math.stackexchange.com/questions/1055748", "https://math.stackexchange.com", "https://math.stackexchange.com/users/185728/" ]
Define the $n$th partial sum by $$ S\_n = \frac{1}{x} + \frac{1}{x^2} + \frac{1}{x^3} + \dots + \frac{1}{x^n} $$ Then \begin{align\*} x S\_n &= 1 + \frac{1}{x} + \frac{1}{x^2} + \frac{1}{x^3} + \dots + \frac{1}{x^{n-1}} \\ \implies x S\_n - S\_n &= 1 - \frac{1}{x^n} \iff S\_n = \frac{1- \frac{1}{x^n}}{x-1}, \; x \neq 1...
Your edit with the proof that $a = \frac{1}{x-1}$ is very good. Some people mentioned that it only works if $\lvert x \rvert > 1$, and you indicated that you weren't sure about that, so maybe this might help: Basically, what happens if $x = \frac{1}{2}$? Then $\frac{1}{x} = \frac{1}{1/2} = 2$, so $$ \frac{1}{x} + \f...
9,718,514
I am trying to query an api through JSON / REST using Ruby. ``` require 'rubygems' require 'rest-client' require 'json' ###Request Build##### url = 'http://site_name' request ={ "format"=>'json', "foo"=> {"first"=>1.1,"second"=>2.2}, "foo_1"=>300, "foo_2"=>"speed", "foo_3"=>[ {"id"=>...
2012/03/15
[ "https://Stackoverflow.com/questions/9718514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/877106/" ]
This is the new hash syntax from Ruby 1.9. These two forms are identical ``` {foo: 1, bar: 2} {:foo => 1, :bar => 2} ``` After formatting to JSON, symbols become strings, so ``` {foo: 1, bar: 2}.to_json {:foo => 1, :bar => 2}.to_json {"foo" => 1, "bar" => 2}.to_json ``` all produce the same output. Summary: don...
I think it is from Ruby `1.9` version(not sure), but anyway syntax should be as following, ``` > [{id: "abc123",first: 1.8, second: 2.8},{id: "abc456", first: -1.5, second: 1.2}] => [{:id=>"abc123", :first=>1.8, :second=>2.8}, {:id=>"abc456", :first=>-1.5, :second=>1.2}] ```
9,718,514
I am trying to query an api through JSON / REST using Ruby. ``` require 'rubygems' require 'rest-client' require 'json' ###Request Build##### url = 'http://site_name' request ={ "format"=>'json', "foo"=> {"first"=>1.1,"second"=>2.2}, "foo_1"=>300, "foo_2"=>"speed", "foo_3"=>[ {"id"=>...
2012/03/15
[ "https://Stackoverflow.com/questions/9718514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/877106/" ]
I think it is from Ruby `1.9` version(not sure), but anyway syntax should be as following, ``` > [{id: "abc123",first: 1.8, second: 2.8},{id: "abc456", first: -1.5, second: 1.2}] => [{:id=>"abc123", :first=>1.8, :second=>2.8}, {:id=>"abc456", :first=>-1.5, :second=>1.2}] ```
I think you have it right. the `to_json` method takes care of the formatting for you. ``` >> require 'json' => true >> request ={ ?> "format"=>'json', ?> "foo"=> {"first"=>1.1,"second"=>2.2}, ?> "foo_1"=>300, ?> "foo_2"=>"speed", ?> ...
9,718,514
I am trying to query an api through JSON / REST using Ruby. ``` require 'rubygems' require 'rest-client' require 'json' ###Request Build##### url = 'http://site_name' request ={ "format"=>'json', "foo"=> {"first"=>1.1,"second"=>2.2}, "foo_1"=>300, "foo_2"=>"speed", "foo_3"=>[ {"id"=>...
2012/03/15
[ "https://Stackoverflow.com/questions/9718514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/877106/" ]
This is the new hash syntax from Ruby 1.9. These two forms are identical ``` {foo: 1, bar: 2} {:foo => 1, :bar => 2} ``` After formatting to JSON, symbols become strings, so ``` {foo: 1, bar: 2}.to_json {:foo => 1, :bar => 2}.to_json {"foo" => 1, "bar" => 2}.to_json ``` all produce the same output. Summary: don...
I think you have it right. the `to_json` method takes care of the formatting for you. ``` >> require 'json' => true >> request ={ ?> "format"=>'json', ?> "foo"=> {"first"=>1.1,"second"=>2.2}, ?> "foo_1"=>300, ?> "foo_2"=>"speed", ?> ...
117,181
Dan Brtolotti [CFP CIM B.A. English University of Waterloo - St. Jerome's University](Https://www.linkedin.com/in/dan-bortolotti-8a482310/?originalSubdomain=ca) wrote [this article](https://www.moneysense.ca/save/investing/rrsp/rrsp-vs-tfsa-which-is-right-for-you). I don't fathom third row. RRSP is taxed at withdrawal....
2019/11/23
[ "https://money.stackexchange.com/questions/117181", "https://money.stackexchange.com", "https://money.stackexchange.com/users/-1/" ]
Yes, it is a scam. No one needs your bank password to make a deposit.
it’s a scam. she can text you the check image and you can deposit it electronically. or she can mail you the check. or she can Zelle transfer you the money via phone number or email these days!
49,106
I have a Hamilton Beach 6 qt Set 'N Forget Programmable slow cooker, and I keep having the same problem-- when I try to make beef stew, the beef comes out almost inedibly tough, and the veggies don't soften. I can't for the life of me figure out what's wrong! My cooking method: > > Put in 1.5ish lbs stew beef-- the ...
2014/10/20
[ "https://cooking.stackexchange.com/questions/49106", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/28794/" ]
Try cooking on low instead of warm (or at a higher temperature, maybe 185-195F, with your fancy crock pot), and make sure you really got good stew meat. I would expect the beef to have been reasonably tender after that long if it were the right kind of cut - certainly not inedibly tough, even if it weren't all the way...
Beef is generally a pretty hard meat to break down compared to other meats. Takes longer to chew, longer to digest, and requires more heat to make it tender during the cooking process. So while a crock pot is fine for most of the operation, you'll meet with the desired success if you'll instead braise your cut of beef ...
49,106
I have a Hamilton Beach 6 qt Set 'N Forget Programmable slow cooker, and I keep having the same problem-- when I try to make beef stew, the beef comes out almost inedibly tough, and the veggies don't soften. I can't for the life of me figure out what's wrong! My cooking method: > > Put in 1.5ish lbs stew beef-- the ...
2014/10/20
[ "https://cooking.stackexchange.com/questions/49106", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/28794/" ]
Try cooking on low instead of warm (or at a higher temperature, maybe 185-195F, with your fancy crock pot), and make sure you really got good stew meat. I would expect the beef to have been reasonably tender after that long if it were the right kind of cut - certainly not inedibly tough, even if it weren't all the way...
I always leave my crocpot on low, not warm. The meat and potatoes are always tender.
49,106
I have a Hamilton Beach 6 qt Set 'N Forget Programmable slow cooker, and I keep having the same problem-- when I try to make beef stew, the beef comes out almost inedibly tough, and the veggies don't soften. I can't for the life of me figure out what's wrong! My cooking method: > > Put in 1.5ish lbs stew beef-- the ...
2014/10/20
[ "https://cooking.stackexchange.com/questions/49106", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/28794/" ]
Try cooking on low instead of warm (or at a higher temperature, maybe 185-195F, with your fancy crock pot), and make sure you really got good stew meat. I would expect the beef to have been reasonably tender after that long if it were the right kind of cut - certainly not inedibly tough, even if it weren't all the way...
Start the pot on HIGH until it is all hot and bubbly to get it started, around 15 to 30 minutes while you are cleaning up the kitchen. Then turn to LOW to cook. The WARM setting it just to hold the meal until you are ready to serve the meal. WARM setting is designed to NOT COOK the meal.