qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
24,687,238
I am using a Picker View to allow the user to choose the colour theme for the entire app. I am planning on changing the colour of the navigation bar, background and possibly the tab bar (if that is possible). I've been researching how to do this but can't find any Swift examples. Could anyone please give me an exampl...
2014/07/10
[ "https://Stackoverflow.com/questions/24687238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3746428/" ]
Navigation Bar: ``` navigationController?.navigationBar.barTintColor = UIColor.green ``` Replace greenColor with whatever UIColor you want, you can use an RGB too if you prefer. Navigation Bar Text: ``` navigationController?.navigationBar.titleTextAttributes = [.foregroundColor: UIColor.orange] ``` Replace oran...
This version also **removes the 1px shadow line under the navigation bar**: **Swift 5**: Put this in your **AppDelegate** didFinishLaunchingWithOptions ``` UINavigationBar.appearance().barTintColor = UIColor.black UINavigationBar.appearance().tintColor = UIColor.white UINavigationBar.appearance().titleTextAttributes ...
38,556
I have Skyrim for the computer and really love playing it, but recently I've been wanting to play it while reclining in my lazyboy and playing the game on a 51in high def. My computer is right next to my amp so making the HDMI connect wouldn't be hard. This isn't a question regarding whether or not its possible to us...
2011/11/26
[ "https://gaming.stackexchange.com/questions/38556", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/15323/" ]
I have the [XBox Wireless Controller for Windows](http://rads.stackoverflow.com/amzn/click/B004QRKWKQ), and I much prefer the keyboard WASD experience. But I prefer it for exactly 1 reason: I'm playing a sneaky, bow-oriented character. Moving around is just as easy with the controller. Melee fighting is just as easy wi...
**Controller pros:** * You can recline on the couch while playing on the TV. (Which you can also do when using a keyboard, but I've never managed to control the mouse properly that way.) * As Jarret Meyer says, the menus are faster, simpler and more natural to navigate with a controller. * Possibly subjective, but I f...
45,501,673
I am facing below issue in my entire installations of M2. ``` [InvalidArgumentException] There are no commands defined in the "setup" namespace. ``` weird thing is I installed fresh Xampp and set up new M2 instance, then also same issue persists. It started coming suddenly and I have tried all available solutions li...
2017/08/04
[ "https://Stackoverflow.com/questions/45501673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3784529/" ]
**In Function traverse** ``` void traverse(struct node *head) { ...... ...... } ``` Traverse function has a parameter `head` which is of type struct node pointer. Hence to call `traverse` function you must pass an argument of type struct node pointer. In main function you defined head as `struct node *...
Function `append` may alter the value of head (which is a pointer). The signature is therefore `void append(struct node **headRef, int data)`; note the `**`, which denotes a pointer to a pointer. So you have to pass the address of the pointer in order to allow `append` to change the pointer, i.e. call `append(&head,dat...
45,501,673
I am facing below issue in my entire installations of M2. ``` [InvalidArgumentException] There are no commands defined in the "setup" namespace. ``` weird thing is I installed fresh Xampp and set up new M2 instance, then also same issue persists. It started coming suddenly and I have tried all available solutions li...
2017/08/04
[ "https://Stackoverflow.com/questions/45501673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3784529/" ]
**In Function traverse** ``` void traverse(struct node *head) { ...... ...... } ``` Traverse function has a parameter `head` which is of type struct node pointer. Hence to call `traverse` function you must pass an argument of type struct node pointer. In main function you defined head as `struct node *...
include ======= struct node { ``` int data; struct node *next; ``` }; struct node \*makeNode(int item) { ``` struct node *newNode = (struct node *)malloc(sizeof(struct node)); newNode->data = item; newNode->next = NULL; return newNode; ``` } i got bug in the above line void traverse(struct node \*head) ...
53,460,983
i am new with java script how can i make it, if is checked from user to redirect after 30s, i tried with some javascript from others website but didn't help ```html <input type="checkbox" id="redirect30sid" name="redirect30sname" value="Redirectvalue">Redirect me after 30s<br> ```
2018/11/24
[ "https://Stackoverflow.com/questions/53460983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9963490/" ]
By selecting the checkbox and adding an event listener on it that activates on changing the state of the checkbox. ``` var checkbox = document.querySelector("#redirect30sid"); checkbox.addEventListener( 'change', function() { if(this.checked) { // Checkbox is checked.. setTimeout(function(){ ...
``` <input type="checkbox" id="redirect30sid" name="redirect30sname" value="Redirectvalue">Redirect me after 30s <script> const checkboxElement = document.getElementById('redirect30sid') checkboxElement.addEventListener('change', (event) => { if (event.target.checked) { setTimeout(function () { /...
53,460,983
i am new with java script how can i make it, if is checked from user to redirect after 30s, i tried with some javascript from others website but didn't help ```html <input type="checkbox" id="redirect30sid" name="redirect30sname" value="Redirectvalue">Redirect me after 30s<br> ```
2018/11/24
[ "https://Stackoverflow.com/questions/53460983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9963490/" ]
```html <input type="checkbox" onclick="handleClick(this)">Redirect me after 30s<br> <script> let handleClick = (ele) => { if (ele.checked) { redirectTime = setTimeout(() => { window.location = "/" }, 30000) } else if (!ele.checked && typeof redirectTime !== 'undefined') { cl...
``` <input type="checkbox" id="redirect30sid" name="redirect30sname" value="Redirectvalue">Redirect me after 30s <script> const checkboxElement = document.getElementById('redirect30sid') checkboxElement.addEventListener('change', (event) => { if (event.target.checked) { setTimeout(function () { /...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
I am Jason, one of the ProtonMail developers. Decryption uses a combination of asymmetric (RSA) and symmetric (AES) encryption. For PM to PM emails, we use an implementation of PGP where we handle the key exchange. So we have all the public keys. As for the private keys, when you create an account, it is generated o...
Under the "Security" tab of their page they state: > > We support sending encrypted communication to non-ProtonMail users via symmetric encryption. When you send an encrypted message to a non-ProtonMail user, they receive a link which loads the encrypted message onto their browser which they can decrypt using a decry...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
I am Jason, one of the ProtonMail developers. Decryption uses a combination of asymmetric (RSA) and symmetric (AES) encryption. For PM to PM emails, we use an implementation of PGP where we handle the key exchange. So we have all the public keys. As for the private keys, when you create an account, it is generated o...
> > ProtonMail's segregated authentication and decryption system means logging into a ProtonMail account that requires two passwords. The first password is used to authenticate the user and retrieve the correct account. After that, encrypted data is sent to the user. The second password is a decryption password which ...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
"ProtonMail's segregated authentication and decryption system means logging into a ProtonMail account that requires two passwords. The **first password is used to authenticate the user** and retrieve the correct account. After that, encrypted data is sent to the user. The **second password is a decryption password** wh...
> > ProtonMail's segregated authentication and decryption system means logging into a ProtonMail account that requires two passwords. The first password is used to authenticate the user and retrieve the correct account. After that, encrypted data is sent to the user. The second password is a decryption password which ...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
**I have substantially altered this answer after the answer from Jason and an email conversation. The original is still available in the edit history.** There are two different cases here: ProtonMail-to-ProtonMail and ProtonMail-to-Other mails. For PM-to-PM emails, the system is in a position to handle public-key/pri...
i'm guessing they use PGP key, with one public key and one private key. They store your public key, and your private key encrypted using your password (you have to trust them to store only the encrypted private key). They have your public key, so they can encrypt any incoming mail. If you want to read your mail, once y...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
**I have substantially altered this answer after the answer from Jason and an email conversation. The original is still available in the edit history.** There are two different cases here: ProtonMail-to-ProtonMail and ProtonMail-to-Other mails. For PM-to-PM emails, the system is in a position to handle public-key/pri...
> > ProtonMail's segregated authentication and decryption system means logging into a ProtonMail account that requires two passwords. The first password is used to authenticate the user and retrieve the correct account. After that, encrypted data is sent to the user. The second password is a decryption password which ...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
I am Jason, one of the ProtonMail developers. Decryption uses a combination of asymmetric (RSA) and symmetric (AES) encryption. For PM to PM emails, we use an implementation of PGP where we handle the key exchange. So we have all the public keys. As for the private keys, when you create an account, it is generated o...
i'm guessing they use PGP key, with one public key and one private key. They store your public key, and your private key encrypted using your password (you have to trust them to store only the encrypted private key). They have your public key, so they can encrypt any incoming mail. If you want to read your mail, once y...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
"ProtonMail's segregated authentication and decryption system means logging into a ProtonMail account that requires two passwords. The **first password is used to authenticate the user** and retrieve the correct account. After that, encrypted data is sent to the user. The **second password is a decryption password** wh...
i'm guessing they use PGP key, with one public key and one private key. They store your public key, and your private key encrypted using your password (you have to trust them to store only the encrypted private key). They have your public key, so they can encrypt any incoming mail. If you want to read your mail, once y...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
**I have substantially altered this answer after the answer from Jason and an email conversation. The original is still available in the edit history.** There are two different cases here: ProtonMail-to-ProtonMail and ProtonMail-to-Other mails. For PM-to-PM emails, the system is in a position to handle public-key/pri...
Under the "Security" tab of their page they state: > > We support sending encrypted communication to non-ProtonMail users via symmetric encryption. When you send an encrypted message to a non-ProtonMail user, they receive a link which loads the encrypted message onto their browser which they can decrypt using a decry...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
I am Jason, one of the ProtonMail developers. Decryption uses a combination of asymmetric (RSA) and symmetric (AES) encryption. For PM to PM emails, we use an implementation of PGP where we handle the key exchange. So we have all the public keys. As for the private keys, when you create an account, it is generated o...
"ProtonMail's segregated authentication and decryption system means logging into a ProtonMail account that requires two passwords. The **first password is used to authenticate the user** and retrieve the correct account. After that, encrypted data is sent to the user. The **second password is a decryption password** wh...
58,541
There is a service called [ProtonMail](http://protonmail.ch). It encrypts email on the client side, stores encrypted message on their servers, and then the recipient decrypts it, also on the client side and the system "doesn't store keys". My question is this: How does the decryption work? I'm a bit confused. Do I h...
2014/05/22
[ "https://security.stackexchange.com/questions/58541", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47094/" ]
"ProtonMail's segregated authentication and decryption system means logging into a ProtonMail account that requires two passwords. The **first password is used to authenticate the user** and retrieve the correct account. After that, encrypted data is sent to the user. The **second password is a decryption password** wh...
Under the "Security" tab of their page they state: > > We support sending encrypted communication to non-ProtonMail users via symmetric encryption. When you send an encrypted message to a non-ProtonMail user, they receive a link which loads the encrypted message onto their browser which they can decrypt using a decry...
42,185,208
Configure the text of the system : ``` func prepareTextSystem() { textStorage.addLayoutManager(layoutManager) layoutManager.addTextContainer(textContainer) layoutManager.delegate = self textContainer.lineFragmentPadding = 0 textContainer.lineBreakMode = lineBreakMode textContainer.maximumNumb...
2017/02/12
[ "https://Stackoverflow.com/questions/42185208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5773289/" ]
Have your app register to handle a URL in your manifest. Then put a link to that URL in the email. Tapping the link will then launch your app.
This is called deeplinking. You register for a URL (or many of them) in your Manifest to declare that your app will handle them. Your app will then open if the user clicks a link matching that URL.
42,185,208
Configure the text of the system : ``` func prepareTextSystem() { textStorage.addLayoutManager(layoutManager) layoutManager.addTextContainer(textContainer) layoutManager.delegate = self textContainer.lineFragmentPadding = 0 textContainer.lineBreakMode = lineBreakMode textContainer.maximumNumb...
2017/02/12
[ "https://Stackoverflow.com/questions/42185208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5773289/" ]
Have your app register to handle a URL in your manifest. Then put a link to that URL in the email. Tapping the link will then launch your app.
You have to add an Intent Filter to your activity tag in manifest to define your deep link. Look at this link: <https://developer.android.com/training/app-indexing/deep-linking.html#adding-filters> When you are done with the deep link, clicking on any link that follows host://scheme pattern, opens your app.
42,185,208
Configure the text of the system : ``` func prepareTextSystem() { textStorage.addLayoutManager(layoutManager) layoutManager.addTextContainer(textContainer) layoutManager.delegate = self textContainer.lineFragmentPadding = 0 textContainer.lineBreakMode = lineBreakMode textContainer.maximumNumb...
2017/02/12
[ "https://Stackoverflow.com/questions/42185208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5773289/" ]
This is called deeplinking. You register for a URL (or many of them) in your Manifest to declare that your app will handle them. Your app will then open if the user clicks a link matching that URL.
You have to add an Intent Filter to your activity tag in manifest to define your deep link. Look at this link: <https://developer.android.com/training/app-indexing/deep-linking.html#adding-filters> When you are done with the deep link, clicking on any link that follows host://scheme pattern, opens your app.
49,154
I am trying to build something similar to planning poker and am very new to Knockout and was wondering if anyone could help me improve on my very crude start? This is what I have so far: HTML Selected Card CSS ``` .profile { width: 50px; height: 80px; color: #FFF; background: black; border: 1px solid #FFF; flo...
2014/05/07
[ "https://codereview.stackexchange.com/questions/49154", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/42051/" ]
You are using function as definition for model and inside that function you are defined an interface to have access to those properties/methods. In complicated cases you would have inflexible usage between definition and public interface. Better solution would be to create definition for the class like this ``` var Mo...
A surprisingly good start, most knockout code looks terrible to me, but I can follow this, it's well laid out, JsHint has nothing to complain about. Only this bothered me: ``` var items = ko.observableArray([new Step(1), new Step(2), new Step(3), new Step(5),new Step(8),new Step(13),new Step(20),new Step(40),new Ste...
49,154
I am trying to build something similar to planning poker and am very new to Knockout and was wondering if anyone could help me improve on my very crude start? This is what I have so far: HTML Selected Card CSS ``` .profile { width: 50px; height: 80px; color: #FFF; background: black; border: 1px solid #FFF; flo...
2014/05/07
[ "https://codereview.stackexchange.com/questions/49154", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/42051/" ]
You are using function as definition for model and inside that function you are defined an interface to have access to those properties/methods. In complicated cases you would have inflexible usage between definition and public interface. Better solution would be to create definition for the class like this ``` var Mo...
I'm only going to focus on this piece of code since I'm not a knockout expert: ``` var selectedItems = ko.computed(function () { return _.filter(items(), function (item) { return item.active(); }); }) ``` First of all I would call this variable `selectedItem` since you can only have one and not multi...
25,449,594
I have a odd error happening when I upgraded spring-data-mongo from 1.3.2.RELEASE to 1.5.2.RELEASE I have an object that looks something like this: ``` @Document(collection = "foos") public class Foo { @Id private String id; private GeoPoint[] tracks; } public class GeoPoint { GeoPointValue[] po...
2014/08/22
[ "https://Stackoverflow.com/questions/25449594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/154477/" ]
For `spring-data-mongodb`, `GeoPointValue` is a Map structure, so what it expects is `BasicDBObject` type - `BasicDBList` is for List structure, this is the reason for the exception, I think. You can try to change values of @Field in `GeoPointValue` from **"0", "1", "2"** to **"a", "b", "c"**, maybe the exception will...
I had The Same Problem and I Solved it By Adding @DBRef to the field
24,109,930
I have a UICollectionView that has elements that can be dragged and dropped around the screen. I use a UILongPressGestureRecognizer to handle the dragging. I attach this recognizer to the collection view cells in my `collectionView:cellForItemAtIndexPath:` method. However, the recognizer's view property occasionally re...
2014/06/08
[ "https://Stackoverflow.com/questions/24109930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1457603/" ]
Views like UICollectionView and UITableView will reuse their cells. If you blindly add a gestureRecognizer in `collectionView:cellForItemAtIndexPath:` you will add a new one each time the cell is reloaded. If you scroll around a bit you will end up with dozens of gestureRecognizers on each cell. In theory this should...
I had a similar problem related to Long-Touch. What I ended up doing is override the UICollectionViewCell.PrepareForReuse and cancel the UIGestureRecognizers attached to my view. So everytime my cell got recycled a long press event would be canceled. [See this answer](https://stackoverflow.com/questions/3937831/how-ca...
61,274,195
How to use an `onClick` event to stop a recurring function call? The function call is recurring due to using `useEffect`, `setInterval` and `clearInterval`. An example shown in [this article](https://upmostly.com/tutorials/setinterval-in-react-components-using-hooks), the below code will run forever. How to stop the f...
2020/04/17
[ "https://Stackoverflow.com/questions/61274195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4605629/" ]
the question is - what you want to test. is it a unit test or an e2e test? if it's a unit test - mock reactive forms, cover only your logic, then you don't have an issue with `valueChanges`, because it's mocked and you control it. if it's an e2e test - you shouldn't reassign `valueChanges`. Nothing should be mocked / ...
Using properties instead of fields is a much cleaner solution. ``` get formFieldChanged$() { return this._formFieldChanged$; } private _formFieldChanged$: Observable<string>; ... public setupObservables() { this._formFieldChanged$ = this.formField .valueChanges .pipe( debounceTime(100), dis...
60,017,424
I am implementing linked list in java, but my code neither gives any error nor produces any output. ``` class LinkedList25 { Node head; class Node { int data; Node next; Node(int value) { data = value; next = null; } } public static vo...
2020/02/01
[ "https://Stackoverflow.com/questions/60017424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8530270/" ]
The problem is in the view. In class based view you need to defined each method individually. In your code is only the GET method. You need another function for the POST method.
The problem is in your urls pattern **urls.py** ``` from django.conf.urls import url urlpatterns = [ url(r'^profile/(?P<your_variable_name>\d+)/$', login_required(UserUpdateView.as_view()), name='profile'), ] ``` Note: You may get arguments error in your view, so you may use ``` def your_view(request, yo...
60,017,424
I am implementing linked list in java, but my code neither gives any error nor produces any output. ``` class LinkedList25 { Node head; class Node { int data; Node next; Node(int value) { data = value; next = null; } } public static vo...
2020/02/01
[ "https://Stackoverflow.com/questions/60017424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8530270/" ]
I assume your urls.py is not in the Django project directory but rather in one of your app directory thereby including the app\_name before the url\_patterns. Can you please share your directory structure?
The problem is in your urls pattern **urls.py** ``` from django.conf.urls import url urlpatterns = [ url(r'^profile/(?P<your_variable_name>\d+)/$', login_required(UserUpdateView.as_view()), name='profile'), ] ``` Note: You may get arguments error in your view, so you may use ``` def your_view(request, yo...
60,017,424
I am implementing linked list in java, but my code neither gives any error nor produces any output. ``` class LinkedList25 { Node head; class Node { int data; Node next; Node(int value) { data = value; next = null; } } public static vo...
2020/02/01
[ "https://Stackoverflow.com/questions/60017424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8530270/" ]
For post request in UpdateView, you need to create `post` method. Something like this will work: ``` class UserUpdateView(UpdateView): model = user_content template_name = 'users/profile.html' model_words = single_words_cards # Get Method def get(self, request, *args, **kwargs): model =...
The problem is in your urls pattern **urls.py** ``` from django.conf.urls import url urlpatterns = [ url(r'^profile/(?P<your_variable_name>\d+)/$', login_required(UserUpdateView.as_view()), name='profile'), ] ``` Note: You may get arguments error in your view, so you may use ``` def your_view(request, yo...
60,017,424
I am implementing linked list in java, but my code neither gives any error nor produces any output. ``` class LinkedList25 { Node head; class Node { int data; Node next; Node(int value) { data = value; next = null; } } public static vo...
2020/02/01
[ "https://Stackoverflow.com/questions/60017424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8530270/" ]
For post request in UpdateView, you need to create `post` method. Something like this will work: ``` class UserUpdateView(UpdateView): model = user_content template_name = 'users/profile.html' model_words = single_words_cards # Get Method def get(self, request, *args, **kwargs): model =...
The problem is in the view. In class based view you need to defined each method individually. In your code is only the GET method. You need another function for the POST method.
60,017,424
I am implementing linked list in java, but my code neither gives any error nor produces any output. ``` class LinkedList25 { Node head; class Node { int data; Node next; Node(int value) { data = value; next = null; } } public static vo...
2020/02/01
[ "https://Stackoverflow.com/questions/60017424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8530270/" ]
For post request in UpdateView, you need to create `post` method. Something like this will work: ``` class UserUpdateView(UpdateView): model = user_content template_name = 'users/profile.html' model_words = single_words_cards # Get Method def get(self, request, *args, **kwargs): model =...
I assume your urls.py is not in the Django project directory but rather in one of your app directory thereby including the app\_name before the url\_patterns. Can you please share your directory structure?
51,221
I am a complete newbie in **Selenium** and test automation. What is a general structure of `Java` **Automation Test**, using a Behavior-Driven Development (BDD) framework in `Cucumber`. Additionally, could you explain the **Automation Framework** (AF)'s components ? Could you also share an overview *example* of implem...
2023/02/07
[ "https://sqa.stackexchange.com/questions/51221", "https://sqa.stackexchange.com", "https://sqa.stackexchange.com/users/55423/" ]
There is no such thing as "general structure for any framework". Frameworks are meant to be custom made as per the type/or need of the project. Having said that, I think I understand what you are looking for. Follow the you-tube tutorial series in link below for the framework implementation using selenium(java binding)...
When creating a Test Automation Framework, we should consider the following main points: * To be able to create automated tests quickly by using appropriate abstraction layers * The framework should have meaningful logging and reporting structure Should be easily maintainable and extendable * Should be simple enough f...
98,085
I'm trying to wrap my head around making shaders but I have no real coding experience. I've tried looking for a solution to my problem but I haven't found anything. Maybe I'm not phrasing it right? The problem is this: I have a script that looks like this, which takes a texture with values in a certain range and then c...
2018/01/08
[ "https://blender.stackexchange.com/questions/98085", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/35383/" ]
In OSL, you can use color as type of parameter. For example see here your script. I changed the tex parameter and the Result parameter ``` shader Exp_Shader( color tex = 0, float OldMax = 1, float OldMin = 0, float NewMax = 1, float NewMin = 0, output color Result = 0, ) { Result = (((tex -...
@J.Bakker's answer is perfectly good .. but just for completeness.. There are a number of ways of constructing a `color` in OSL, including these examples given in the [Language Specification](https://github.com/imageworks/OpenShadingLanguage/blob/master/src/doc/osl-languagespec.pdf): ``` color (0, 0, 0) // black colo...
4,419,761
How to find the probability density function of the random variable $\frac{1}{X}$? Let $X$ be a random variable with pdf $f\_X(x)= \begin{cases} 0 ; x \le 0 \\ \frac{1}{2} ; 0 < x \le 1 \\ \frac{1}{2x^2} ; 1 < x < \infty \end{cases}$ I was trying to avoid using formula. So we see that $P(Y \le y) = 1 - P(X \le y)$ ...
2022/04/04
[ "https://math.stackexchange.com/questions/4419761", "https://math.stackexchange.com", "https://math.stackexchange.com/users/919818/" ]
The PDF of $X$ is given by $$ f\_X(x) = \left\{ \begin{array}{ccc} 0 & \mbox{if} & x \leq 0 \\[2mm] {1 \over 2} & \mbox{if} & 0 < x < 1 \\[2mm] {1 \over 2 x^2} & \mbox{if} & 1 < x < \infty \\[2mm] \end{array} \right. \tag{1} $$ Thus, $X$ is a positive random variable. Since $Y = {1 \over X}$, it is immediate that $...
$X$ is a positive r.v. and so is $Y$. Hence, $P(Y\leq y)=0$ for $y \leq 0$. Also, $P(Y \leq y)=\frac y 2$ for $0<y \leq 1$ and $P(Y \leq y)=1-\frac 1 {2y}$ for $y >1$. [For $0<y\leq 1$ we have $P(Y \leq y)=P(\frac 1 X \leq y)=P(X\geq \frac 1 y)=\int\_{1/y}^{\infty} \frac 1 {2x^{2}}dx=\frac y 2$. I will leave the case...
15,557,739
``` Private Sub cmdAdd_Click() 'add data to table CurrentDb.Execute = "INSERT INTO jscbb_dir2(ID,Lastname,FirstName, PrimA, Artea,LubNum,OfficeNum,OfficePhone,Email,LabPhone,stats)" & _ " VALUES(" & Me.Textid & ",'" & Me.TextLast & "','" & Me.TextFirst & "','" & Me.Textprima & "','" & Me.Textarea & "','" & Me.Textlabnu...
2013/03/21
[ "https://Stackoverflow.com/questions/15557739", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2027275/" ]
Consider parameters, they will be easier to debug. ``` Dim qdf As QueryDef ssql = "INSERT INTO jscbb_dir2(ID,Lastname,FirstName,PrimA,Artea," _ & "LubNum,OfficeNum,OfficePhone,Email,LabPhone,stats) " _ & "VALUES([id],[last],[first],[prima],[area],[lab]," _ & "[office],[phone],[email],[stat])" Set qdf = ...
[`Execute`](http://msdn.microsoft.com/en-us/library/bb243015%28v=office.12%29.aspx) is a method, not a property. You don't use `=` between a method and its arguments, so ``` CurrentDb.Execute = "..." ``` should be ``` CurrentDb.Execute "..." ```
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
You might start with the [System.ServiceModel.Syndication Namespace](http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx). It includes classes for RSS and Atom.
According to [Google](http://www.google.nl/search?q=rss+library+.net), there are a few options: * [RSS.NET](http://www.rssdotnet.com/) - with an updated version [over here](http://www.web20tools.net/) * [FeedDotNet](http://www.codeplex.com/FeedDotNet/) Also, many commercial networking toolkits for .NET (e.g. /n Softw...
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
According to [Google](http://www.google.nl/search?q=rss+library+.net), there are a few options: * [RSS.NET](http://www.rssdotnet.com/) - with an updated version [over here](http://www.web20tools.net/) * [FeedDotNet](http://www.codeplex.com/FeedDotNet/) Also, many commercial networking toolkits for .NET (e.g. /n Softw...
There are many of them, e.g. [rss.net](http://www.rssdotnet.com/). And it's easy to [implement reading](http://geekswithblogs.net/willemf/archive/2005/10/30/58562.aspx) without any lib
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
According to [Google](http://www.google.nl/search?q=rss+library+.net), there are a few options: * [RSS.NET](http://www.rssdotnet.com/) - with an updated version [over here](http://www.web20tools.net/) * [FeedDotNet](http://www.codeplex.com/FeedDotNet/) Also, many commercial networking toolkits for .NET (e.g. /n Softw...
I have answered a similar question 2 times ;- ) Check this out : [rss parser in .net](https://stackoverflow.com/questions/684507/rss-parser-in-net/684518#684518) > > <http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx> > <http://msdn.microsoft.com/en-us/magazine/cc135976.aspx> > > > .net h...
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
According to [Google](http://www.google.nl/search?q=rss+library+.net), there are a few options: * [RSS.NET](http://www.rssdotnet.com/) - with an updated version [over here](http://www.web20tools.net/) * [FeedDotNet](http://www.codeplex.com/FeedDotNet/) Also, many commercial networking toolkits for .NET (e.g. /n Softw...
There are tons, including using LinqToXML, however, IMHO, the Argotic framework is the most robust. <http://argotic.codeplex.com/>
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
You might start with the [System.ServiceModel.Syndication Namespace](http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx). It includes classes for RSS and Atom.
There are many of them, e.g. [rss.net](http://www.rssdotnet.com/). And it's easy to [implement reading](http://geekswithblogs.net/willemf/archive/2005/10/30/58562.aspx) without any lib
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
You might start with the [System.ServiceModel.Syndication Namespace](http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx). It includes classes for RSS and Atom.
I have answered a similar question 2 times ;- ) Check this out : [rss parser in .net](https://stackoverflow.com/questions/684507/rss-parser-in-net/684518#684518) > > <http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx> > <http://msdn.microsoft.com/en-us/magazine/cc135976.aspx> > > > .net h...
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
You might start with the [System.ServiceModel.Syndication Namespace](http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx). It includes classes for RSS and Atom.
There are tons, including using LinqToXML, however, IMHO, the Argotic framework is the most robust. <http://argotic.codeplex.com/>
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
I have answered a similar question 2 times ;- ) Check this out : [rss parser in .net](https://stackoverflow.com/questions/684507/rss-parser-in-net/684518#684518) > > <http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx> > <http://msdn.microsoft.com/en-us/magazine/cc135976.aspx> > > > .net h...
There are many of them, e.g. [rss.net](http://www.rssdotnet.com/). And it's easy to [implement reading](http://geekswithblogs.net/willemf/archive/2005/10/30/58562.aspx) without any lib
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
There are tons, including using LinqToXML, however, IMHO, the Argotic framework is the most robust. <http://argotic.codeplex.com/>
There are many of them, e.g. [rss.net](http://www.rssdotnet.com/). And it's easy to [implement reading](http://geekswithblogs.net/willemf/archive/2005/10/30/58562.aspx) without any lib
1,510,575
Is there a RSS library for .NET?
2009/10/02
[ "https://Stackoverflow.com/questions/1510575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183229/" ]
I have answered a similar question 2 times ;- ) Check this out : [rss parser in .net](https://stackoverflow.com/questions/684507/rss-parser-in-net/684518#684518) > > <http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx> > <http://msdn.microsoft.com/en-us/magazine/cc135976.aspx> > > > .net h...
There are tons, including using LinqToXML, however, IMHO, the Argotic framework is the most robust. <http://argotic.codeplex.com/>
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
Cells should not "remember" their state; collection view or table view **data source** should. In the respective `cellForIndexPath` method, you should set the **current state** of the cell and let it configure itself as needed.
``` - (void)prepareForReuse { [super prepareForReuse]; self.isBookable = nil; [self.book removeFromSuperview]; [self setNeedsLayout]; } ``` Try setting `isBookable` to nil. I'm assuming that the cell is setting its layout with the previous cell's `isBookable` value.
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
As @iphonic said, the `isBookable` property should be (re)moved from the cell completely. Cells in a UICollectionView are being reused most of the time, so even though your saleImage.isBookable is in the correct state your cell.isBookable is probably not. I would do the following: ``` if(saleImage.isBookable){ sel...
You need to create two types of cells with different identifiers: ``` static NSString *Bookable = @"Bookable"; static NSString *NonBookable = @"NonBookable"; NSString *currentIdentifier; if(saleImage.isBookable)//isBookable property must be set in SaleImage class { currentIdentifier ...
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
``` - (void)prepareForReuse { [super prepareForReuse]; self.isBookable = nil; [self.book removeFromSuperview]; [self setNeedsLayout]; } ``` Try setting `isBookable` to nil. I'm assuming that the cell is setting its layout with the previous cell's `isBookable` value.
1st - Save/keep the indexPath of the cell that is changed. 2nd - ``` - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath SalesCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPa...
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
``` - (void)prepareForReuse { [super prepareForReuse]; self.isBookable = nil; [self.book removeFromSuperview]; [self setNeedsLayout]; } ``` Try setting `isBookable` to nil. I'm assuming that the cell is setting its layout with the previous cell's `isBookable` value.
I'd override `isBookable` setter in the cell class: ``` - (void) setIsBookable:(BOOL)isBookable { BOOL needsLayout = isBookable != _isBookable; _isBookable = isBookable; if(needsLayout) { [self.book removeFromSuperview]; [self setNeedsLayout]; } } ``` Also I'd recommend change `@p...
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
I'd override `isBookable` setter in the cell class: ``` - (void) setIsBookable:(BOOL)isBookable { BOOL needsLayout = isBookable != _isBookable; _isBookable = isBookable; if(needsLayout) { [self.book removeFromSuperview]; [self setNeedsLayout]; } } ``` Also I'd recommend change `@p...
1st - Save/keep the indexPath of the cell that is changed. 2nd - ``` - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath SalesCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPa...
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
As @iphonic said, the `isBookable` property should be (re)moved from the cell completely. Cells in a UICollectionView are being reused most of the time, so even though your saleImage.isBookable is in the correct state your cell.isBookable is probably not. I would do the following: ``` if(saleImage.isBookable){ sel...
1st - Save/keep the indexPath of the cell that is changed. 2nd - ``` - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath SalesCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPa...
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
As @iphonic said, the `isBookable` property should be (re)moved from the cell completely. Cells in a UICollectionView are being reused most of the time, so even though your saleImage.isBookable is in the correct state your cell.isBookable is probably not. I would do the following: ``` if(saleImage.isBookable){ sel...
``` - (void)prepareForReuse { [super prepareForReuse]; self.isBookable = nil; [self.book removeFromSuperview]; [self setNeedsLayout]; } ``` Try setting `isBookable` to nil. I'm assuming that the cell is setting its layout with the previous cell's `isBookable` value.
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
Cells should not "remember" their state; collection view or table view **data source** should. In the respective `cellForIndexPath` method, you should set the **current state** of the cell and let it configure itself as needed.
1st - Save/keep the indexPath of the cell that is changed. 2nd - ``` - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath SalesCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPa...
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
Cells should not "remember" their state; collection view or table view **data source** should. In the respective `cellForIndexPath` method, you should set the **current state** of the cell and let it configure itself as needed.
I'd override `isBookable` setter in the cell class: ``` - (void) setIsBookable:(BOOL)isBookable { BOOL needsLayout = isBookable != _isBookable; _isBookable = isBookable; if(needsLayout) { [self.book removeFromSuperview]; [self setNeedsLayout]; } } ``` Also I'd recommend change `@p...
24,570,725
I have just started to read up on networking and I don't get this DHCP stuff... For past few hours I have been trying to find out how my computer talks to DHCP in order to get its IPs and all I understood is that my router is some sort of DHCP that gives private IPs. I am wondering if there is a way to contact DHCP ser...
2014/07/04
[ "https://Stackoverflow.com/questions/24570725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3804802/" ]
Cells should not "remember" their state; collection view or table view **data source** should. In the respective `cellForIndexPath` method, you should set the **current state** of the cell and let it configure itself as needed.
You need to create two types of cells with different identifiers: ``` static NSString *Bookable = @"Bookable"; static NSString *NonBookable = @"NonBookable"; NSString *currentIdentifier; if(saleImage.isBookable)//isBookable property must be set in SaleImage class { currentIdentifier ...
3,296,030
I need to run a linux command such as "df" from my linux daemon to know free space,used space, total size of the parition and other info. I have options like calling system,exec,popen etc.. 1. But as this each command spawn a new process , is this not possible to run the commands in the same process from which it is i...
2010/07/21
[ "https://Stackoverflow.com/questions/3296030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7965/" ]
There is no *standard* API, as this is an OS-specific concept. However, 1. You can parse `/proc/mounts` (or `/etc/mtab`) with (non-portable) [`getmntent`/`getmntent_r`](http://linux.die.net/man/3/getmntent) helper functions. 2. Using information about mounted filesystems, you can get its statistics with [`statfs`](ht...
You may find it useful to explore the `i3status` program source code: <http://code.stapelberg.de/git/i3status/tree/src/print_disk_info.c> To answer your other questions: > > But as this each command spawn a new process , is this not possible to run the commands in the same process from which it is invoked? > > > ...
13,010,051
I am trying out the phpunit in the Zf2 album module. I encountered an error which states about routing. Below is the debug information. It says 'Route with name "album" not found', but when I checked module.config.php in the album module folder, I see that is correctly set and in the browser the redirection to that ro...
2012/10/22
[ "https://Stackoverflow.com/questions/13010051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602988/" ]
I hope it will save approx. 30 minutes of searching in the zend framework 2 code: ``` class AlbumControllerTest extends PHPUnit_Framework_TestCase { //... protected function setUp() { $bootstrap = \Zend\Mvc\Application::init(include 'config/application.config.php'); $this->controller =...
Actually the easy way is to get the config data from the service manager: ``` $config = $serviceManager->get('Config'); ``` Full code for the function `setUp()`: ``` protected function setUp() { $serviceManager = Bootstrap::getServiceManager(); $this -> controller = new AlbumController(); $this -> reque...
13,010,051
I am trying out the phpunit in the Zf2 album module. I encountered an error which states about routing. Below is the debug information. It says 'Route with name "album" not found', but when I checked module.config.php in the album module folder, I see that is correctly set and in the browser the redirection to that ro...
2012/10/22
[ "https://Stackoverflow.com/questions/13010051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602988/" ]
To avoid duplicate Code, you can load your Routes from Module Config: ``` $module = new \YourNameSpace\Module(); $config = $module->getConfig(); $route = \Zend\Mvc\Router\Http\Segment::factory($config['router']['routes']['Home']['options']); $router = new \Zend\Mvc\Router\SimpleRouteStack(); $router->addRoute('Home'...
Actually the easy way is to get the config data from the service manager: ``` $config = $serviceManager->get('Config'); ``` Full code for the function `setUp()`: ``` protected function setUp() { $serviceManager = Bootstrap::getServiceManager(); $this -> controller = new AlbumController(); $this -> reque...
33,159,169
I am getting the following errors for HDFS client installation on Ambari. Have reset the server several times but still cannot get it resolved. Any idea how to fix that? stderr: ``` Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", l...
2015/10/15
[ "https://Stackoverflow.com/questions/33159169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369921/" ]
This is a soft link that link to **/etc/hadoop/conf** I run ``` python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent --skip=users ``` After run it, it removes `/etc/hadoop/conf` However, reinstall does not recreate it. So you may have to create all conf files by yourself. Hope someone can...
Creating `/usr/hdp/current/hadoop-client/conf` on failing host should solve the problem.
33,159,169
I am getting the following errors for HDFS client installation on Ambari. Have reset the server several times but still cannot get it resolved. Any idea how to fix that? stderr: ``` Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", l...
2015/10/15
[ "https://Stackoverflow.com/questions/33159169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369921/" ]
I ran into the same problem: I was using HDP 2.3.2 on Centos 7. **The first problem:** Some conf files point to the /etc//conf directory (same as they are supposed to) However, /etc//conf points back to the other conf directory which leads to an endless loop. I was able to fix this problem by removing the /etc//conf...
Creating `/usr/hdp/current/hadoop-client/conf` on failing host should solve the problem.
33,159,169
I am getting the following errors for HDFS client installation on Ambari. Have reset the server several times but still cannot get it resolved. Any idea how to fix that? stderr: ``` Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", l...
2015/10/15
[ "https://Stackoverflow.com/questions/33159169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369921/" ]
``` yum -y erase hdp-select ``` If you have done installation multiple times, some packages might not be cleaned. To remove all HDP packages and start with fresh installation, erase hdp-select. If this is not helping, remove all the versions from `/usr/hdp` delete this directory if it contains multiple versions of...
Creating `/usr/hdp/current/hadoop-client/conf` on failing host should solve the problem.
33,159,169
I am getting the following errors for HDFS client installation on Ambari. Have reset the server several times but still cannot get it resolved. Any idea how to fix that? stderr: ``` Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", l...
2015/10/15
[ "https://Stackoverflow.com/questions/33159169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369921/" ]
This is a soft link that link to **/etc/hadoop/conf** I run ``` python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent --skip=users ``` After run it, it removes `/etc/hadoop/conf` However, reinstall does not recreate it. So you may have to create all conf files by yourself. Hope someone can...
I ran into the same problem: I was using HDP 2.3.2 on Centos 7. **The first problem:** Some conf files point to the /etc//conf directory (same as they are supposed to) However, /etc//conf points back to the other conf directory which leads to an endless loop. I was able to fix this problem by removing the /etc//conf...
33,159,169
I am getting the following errors for HDFS client installation on Ambari. Have reset the server several times but still cannot get it resolved. Any idea how to fix that? stderr: ``` Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", l...
2015/10/15
[ "https://Stackoverflow.com/questions/33159169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369921/" ]
``` yum -y erase hdp-select ``` If you have done installation multiple times, some packages might not be cleaned. To remove all HDP packages and start with fresh installation, erase hdp-select. If this is not helping, remove all the versions from `/usr/hdp` delete this directory if it contains multiple versions of...
I ran into the same problem: I was using HDP 2.3.2 on Centos 7. **The first problem:** Some conf files point to the /etc//conf directory (same as they are supposed to) However, /etc//conf points back to the other conf directory which leads to an endless loop. I was able to fix this problem by removing the /etc//conf...
4,749,235
I have the following HTML code (a list item). The content isn't important--the problem is the end of line 2. ``` <li>Yes, you can learn how to play piano without becoming a great notation reader, however, <strong class="warning">you <em class="emphatic">will</em> have to acquire a <em class="emphatic">very</em>b...
2011/01/20
[ "https://Stackoverflow.com/questions/4749235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/520648/" ]
This is intentional. Lines that start with an XML or SGML tag are paragraph separator lines. If Emacs broke the paragraph in such a way that the tag ended up at the start of a line, subsequent applications of `fill-paragraph` would stop at that line. This is to ensure that, for instance, ``` <p>a paragraph</p> <!-- no...
Looks like a bug to me. I was able to trim down your example to something like this: ``` <li>blabla blabla <b>some_long_text_here</b> <b>more_long_text_here</b> ``` If I remove a single character of text from it, `fill-paragraph` works as expected. Or if I add a chacter between the two consequtive `<b>` elements.
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
Add the following line to your `~/.bashrc`: ``` alias sudo='sudo ' ``` From the [bash manual](http://www.gnu.org/software/bash/manual/bashref.html#Aliases): > > Aliases allow a string to be substituted for a word when it is used as the first word of a simple command. The shell maintains a list of aliases that may ...
I have a different solution whereby you do not need to add `sudo` as an alias. I run Linux Mint 17.3 but it should be pretty similar to Ubuntu. When you are root, then the `.profile` is run from its home directory. If you do not know what the home directory under root is, then you can check with: ``` sudo su echo $HO...
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
Add the following line to your `~/.bashrc`: ``` alias sudo='sudo ' ``` From the [bash manual](http://www.gnu.org/software/bash/manual/bashref.html#Aliases): > > Aliases allow a string to be substituted for a word when it is used as the first word of a simple command. The shell maintains a list of aliases that may ...
I have another nice solution, that adds a bit of trust too: **Use bash completion to automatically replace words behind `sudo` with their aliases when pressing tab.** Save this as `/etc/bash_completion.d/sudo-alias.bashcomp`, and it should automatically be loaded at interactive shell startup: ```bsh _comp_sudo_alias...
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
I have another nice solution, that adds a bit of trust too: **Use bash completion to automatically replace words behind `sudo` with their aliases when pressing tab.** Save this as `/etc/bash_completion.d/sudo-alias.bashcomp`, and it should automatically be loaded at interactive shell startup: ```bsh _comp_sudo_alias...
If you type `sudo -i` and elevate to a sudo prompt (`#`) you won't have the aliases or functions you like to use. To utilize your aliases and functions at the `#` prompt, use: ``` sudo cp "$HOME"/.bashrc /root/.bashrc ``` Where "$HOME" is expanded into "/home/YOUR\_USER\_NAME"
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
Add the following line to your `~/.bashrc`: ``` alias sudo='sudo ' ``` From the [bash manual](http://www.gnu.org/software/bash/manual/bashref.html#Aliases): > > Aliases allow a string to be substituted for a word when it is used as the first word of a simple command. The shell maintains a list of aliases that may ...
I wrote a Bash function for it that shadows `sudo`. It checks whether I have an alias for the given command and runs the aliased command instead of the literal one with `sudo` in that case. Here is my function as one-liner: ```bsh sudo() { if alias "$1" &> /dev/null ; then $(type "$1" | sed -E 's/^.*`(.*).$/\1/') "$...
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
I wrote a Bash function for it that shadows `sudo`. It checks whether I have an alias for the given command and runs the aliased command instead of the literal one with `sudo` in that case. Here is my function as one-liner: ```bsh sudo() { if alias "$1" &> /dev/null ; then $(type "$1" | sed -E 's/^.*`(.*).$/\1/') "$...
@Alvins answer is the shortest one. No doubt! :-) However I thought of a command line solution to **execute an aliased command in sudo** where there is no need to redefine `sudo` with an `alias` command. Here is my proposal for those to whom it may interest: Solution -------- ``` type -a <YOUR COMMAND HERE> | grep ...
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
I wrote a Bash function for it that shadows `sudo`. It checks whether I have an alias for the given command and runs the aliased command instead of the literal one with `sudo` in that case. Here is my function as one-liner: ```bsh sudo() { if alias "$1" &> /dev/null ; then $(type "$1" | sed -E 's/^.*`(.*).$/\1/') "$...
I have a different solution whereby you do not need to add `sudo` as an alias. I run Linux Mint 17.3 but it should be pretty similar to Ubuntu. When you are root, then the `.profile` is run from its home directory. If you do not know what the home directory under root is, then you can check with: ``` sudo su echo $HO...
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
[@WinEunuuchs2Unix](https://askubuntu.com/a/853332/830570): `$PWD` expands to the "present working directory". I think you want `$HOME`. Also, for most situations, it's probably best to have a separate root .bashrc file. In fact, I'd make it a real file in `/root`, soft link to it in the user's home directory (e.g., `...
If you type `sudo -i` and elevate to a sudo prompt (`#`) you won't have the aliases or functions you like to use. To utilize your aliases and functions at the `#` prompt, use: ``` sudo cp "$HOME"/.bashrc /root/.bashrc ``` Where "$HOME" is expanded into "/home/YOUR\_USER\_NAME"
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
If you type `sudo -i` and elevate to a sudo prompt (`#`) you won't have the aliases or functions you like to use. To utilize your aliases and functions at the `#` prompt, use: ``` sudo cp "$HOME"/.bashrc /root/.bashrc ``` Where "$HOME" is expanded into "/home/YOUR\_USER\_NAME"
I have a different solution whereby you do not need to add `sudo` as an alias. I run Linux Mint 17.3 but it should be pretty similar to Ubuntu. When you are root, then the `.profile` is run from its home directory. If you do not know what the home directory under root is, then you can check with: ``` sudo su echo $HO...
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
I wrote a Bash function for it that shadows `sudo`. It checks whether I have an alias for the given command and runs the aliased command instead of the literal one with `sudo` in that case. Here is my function as one-liner: ```bsh sudo() { if alias "$1" &> /dev/null ; then $(type "$1" | sed -E 's/^.*`(.*).$/\1/') "$...
If you type `sudo -i` and elevate to a sudo prompt (`#`) you won't have the aliases or functions you like to use. To utilize your aliases and functions at the `#` prompt, use: ``` sudo cp "$HOME"/.bashrc /root/.bashrc ``` Where "$HOME" is expanded into "/home/YOUR\_USER\_NAME"
22,037
I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using `sudo`: ``` danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' da...
2011/01/17
[ "https://askubuntu.com/questions/22037", "https://askubuntu.com", "https://askubuntu.com/users/3583/" ]
[@WinEunuuchs2Unix](https://askubuntu.com/a/853332/830570): `$PWD` expands to the "present working directory". I think you want `$HOME`. Also, for most situations, it's probably best to have a separate root .bashrc file. In fact, I'd make it a real file in `/root`, soft link to it in the user's home directory (e.g., `...
I have a different solution whereby you do not need to add `sudo` as an alias. I run Linux Mint 17.3 but it should be pretty similar to Ubuntu. When you are root, then the `.profile` is run from its home directory. If you do not know what the home directory under root is, then you can check with: ``` sudo su echo $HO...
59,903,489
I followed this tutorial <https://forge.autodesk.com/blog/forge-aspnet-zero-hero-30-minutes> and made a web application that can upload and view a model, but I cannot view an old model without uploading it again as I cannot save the URN of the file to send it to viewer again. So, how can I get and save the URN of the f...
2020/01/24
[ "https://Stackoverflow.com/questions/59903489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12777711/" ]
*Object ID* is typically retrieved using the [Data Management APIs](https://forge.autodesk.com/en/docs/data/v2/reference/http/), for example, when [listing contents of a bucket](https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-GET). *URN* is then obtained by base64-encoding the obje...
I would highly suggest to follow the new [Tutorial](https://learnforge.autodesk.io/#/?id=learn-autodesk-forge). This will give you a better understanding of how things work. If you want to just have the urn of an uploaded model you can just log it into the console at a couple of points. The `showModel(urn)` function in...
2,183,758
I'm confused on a couple of propositions in Bourbaki, Lie Groups and Lie Algebras, Chapter 5. We are given a quadratic form $q$ on $V = \mathbb{R}^n$ which is positive, meaning $q(v) \geq 0$ for all $v$. To $q$ we can associate a symmetric, positive bilinear form $$B(v,w) = \frac{1}{2}[q(v+w) - q(v) - q(w)]$$ We reco...
2017/03/12
[ "https://math.stackexchange.com/questions/2183758", "https://math.stackexchange.com", "https://math.stackexchange.com/users/28556/" ]
Added: it appears that their positive is positive semidefinite. Not hard to adjust the stuff below to semidefinite case your early question, positivity of the quadratic form says that both versions of the kernel are the single vector $0.$ Think of a symmetric positive definite real matrix $M.$ If we have a column vec...
Okay, here's what I'm trying to prove. Let $V = \mathbb{R}^n$, let $M$ be an $n$ by $n$ real symmetric matrix such that $m\_{ij} \leq 0$ for all $i \neq j$, and such that $X^TMX \geq 0$ for all column vectors $X$. The following are equivalent for $X$: (i): $X^TMX = 0$; (ii): $MX = 0$; (ii): $X^TMY = 0$ for all colum...
2,183,758
I'm confused on a couple of propositions in Bourbaki, Lie Groups and Lie Algebras, Chapter 5. We are given a quadratic form $q$ on $V = \mathbb{R}^n$ which is positive, meaning $q(v) \geq 0$ for all $v$. To $q$ we can associate a symmetric, positive bilinear form $$B(v,w) = \frac{1}{2}[q(v+w) - q(v) - q(w)]$$ We reco...
2017/03/12
[ "https://math.stackexchange.com/questions/2183758", "https://math.stackexchange.com", "https://math.stackexchange.com/users/28556/" ]
We have $M$ real, symmetric, and positive semidefinite. We may take an orthogonal matrix $P$ such that $ P^T D P = M,$ where $D$ is real diagonal. Let dimension be $n.$ Let the first $n-r$ diagonal elements of $D$ be zero, that is $D\_{jj} = 0$ for $1 \leq j \leq n-r.$ Then $D\_{jj} > 0$ for $n-r+1 \leq j \leq n.$ Yo...
Added: it appears that their positive is positive semidefinite. Not hard to adjust the stuff below to semidefinite case your early question, positivity of the quadratic form says that both versions of the kernel are the single vector $0.$ Think of a symmetric positive definite real matrix $M.$ If we have a column vec...
2,183,758
I'm confused on a couple of propositions in Bourbaki, Lie Groups and Lie Algebras, Chapter 5. We are given a quadratic form $q$ on $V = \mathbb{R}^n$ which is positive, meaning $q(v) \geq 0$ for all $v$. To $q$ we can associate a symmetric, positive bilinear form $$B(v,w) = \frac{1}{2}[q(v+w) - q(v) - q(w)]$$ We reco...
2017/03/12
[ "https://math.stackexchange.com/questions/2183758", "https://math.stackexchange.com", "https://math.stackexchange.com/users/28556/" ]
We have $M$ real, symmetric, and positive semidefinite. We may take an orthogonal matrix $P$ such that $ P^T D P = M,$ where $D$ is real diagonal. Let dimension be $n.$ Let the first $n-r$ diagonal elements of $D$ be zero, that is $D\_{jj} = 0$ for $1 \leq j \leq n-r.$ Then $D\_{jj} > 0$ for $n-r+1 \leq j \leq n.$ Yo...
Okay, here's what I'm trying to prove. Let $V = \mathbb{R}^n$, let $M$ be an $n$ by $n$ real symmetric matrix such that $m\_{ij} \leq 0$ for all $i \neq j$, and such that $X^TMX \geq 0$ for all column vectors $X$. The following are equivalent for $X$: (i): $X^TMX = 0$; (ii): $MX = 0$; (ii): $X^TMY = 0$ for all colum...
172,119
I am trying to write a little voxel engine because it's fun, but struggle to find the best way to store the actual voxels. I'm aware I will need chunks of some sort so I don't need to have the entire world in memory, and I'm am aware I need render them with reasonable performance. I read about octrees and from what I ...
2019/05/20
[ "https://gamedev.stackexchange.com/questions/172119", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/-1/" ]
Storing the blocks as the positions and the values is actually very inefficient. Even without any overhead caused by the struct or object you use, you need to store 4 distinct values per block. It would only make sense to use it over the "storing blocks in fixed arrays" method (the one you described earlier) is when on...
Octrees exist to solve exactly the problem you describe, allowing dense storage of sparse data without large search times. The fact that your voxels are the same size just means that your octree has a fixed depth. eg. for a 16x16x16 chunk, you need at most 5 levels of tree: * chunk root (16x16x16) + first tier octan...
5,585
In the recycling rules for my community, there is an instruction to thoroughly wash all glass, plastic, and metal containers before depositing them into the recycle bin for collection. Is this step really necessary for the recycling process to occur (or occur without delay)? I've heard that recycling facilities alread...
2011/08/04
[ "https://skeptics.stackexchange.com/questions/5585", "https://skeptics.stackexchange.com", "https://skeptics.stackexchange.com/users/4322/" ]
Here are comments from two of the major recyclers in Australia: [From VISY](http://www.coolmelbourne.org/articles/2011/07/the-cool-rules-of-recycling/): > > **To rinse or not?** > > > Ever feel like you are wasting a ton of water > while rinsing out your recyclables? According to VISY, it is not > necessary to rin...
A 2009 [Slate magazine article](http://www.slate.com/id/2210344/) tackles this question: > > Once you put your recyclables on the curb, they aren't processed right away. > [...] > Now imagine your bottle of half-eaten, four-month-old tartar sauce, lounging about in a stuffy warehouse and getting riper by the day. ...
5,585
In the recycling rules for my community, there is an instruction to thoroughly wash all glass, plastic, and metal containers before depositing them into the recycle bin for collection. Is this step really necessary for the recycling process to occur (or occur without delay)? I've heard that recycling facilities alread...
2011/08/04
[ "https://skeptics.stackexchange.com/questions/5585", "https://skeptics.stackexchange.com", "https://skeptics.stackexchange.com/users/4322/" ]
Here are comments from two of the major recyclers in Australia: [From VISY](http://www.coolmelbourne.org/articles/2011/07/the-cool-rules-of-recycling/): > > **To rinse or not?** > > > Ever feel like you are wasting a ton of water > while rinsing out your recyclables? According to VISY, it is not > necessary to rin...
As an additional point to the existing excellent answers, if you have commingled recyclables, leaving food on the containers can lead to [paper contamination](https://americanrecyclingca.com/2011/05/paper/contamination-in-paper-recycling/). > > Contamination in paper recycling is a serious issue, with negative effect...
41,314,073
When I try to run command like - ``` php artisan db:seed ``` it is saying - ``` ************************************** * Application In Production! * ************************************** Do you really wish to run this command? (yes/no) [no]: ``` My .env file says - ``` .... APP_ENV=local APP_KEY=... ...
2016/12/24
[ "https://Stackoverflow.com/questions/41314073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6847223/" ]
Your settings are correct. Try to clear config cache: ``` php artisan config:cache ```
Please run the command on the terminal or cmd ``` php artisan up ``` it will come you out of the maintenance mode
574,264
I work on an environment for setting up exercises with zero or more associated hints. If I try to insert verbatim content in the body of the exercise, the latex interpreter hangs without specifying an error. A minimal example that reproduces this issue is shown here: ``` \documentclass{article} \usepackage{listings} ...
2020/12/09
[ "https://tex.stackexchange.com/questions/574264", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/1366/" ]
If all else fails, you can place and save the verbatim into a box before entering the `ex` environment. ``` \documentclass{article} \usepackage{amsmath} \usepackage[colorlinks, linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref} \newcounter{ex} \numberwithin{ex}{section} \newcounter{hint} \numberwithin{hint}{ex...
If LuaTeX is available, you can store and process verbatim content on Lua side, which helps avoid this problem. ``` \documentclass{article} \usepackage{amsmath} \usepackage{luacode} \usepackage{expl3, xparse} \usepackage[colorlinks, linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref} \newcounter{ex} \numberwithi...
57,844
In a Hamiltonian system [Chirikov's resonance overlap criterion](http://www.scholarpedia.org/article/Chirikov_criterion) approximately predicts the onset of chaotic behavior. Furthermore in a system where resonances overlap, the strengths of the resonances and their frequency differences can be used to approximate diff...
2011/08/16
[ "https://math.stackexchange.com/questions/57844", "https://math.stackexchange.com", "https://math.stackexchange.com/users/13292/" ]
This is a very partial answer to your question but let's see if this helps So from a very heuristic perspective in the KAM-case the onset of chaos is a result of the smale horseshoes generated by the homoclinic tangles. Of course not any homoclinic tangle has the generating mechanism for the smale horseshoe and this i...
A system with intermittency is a good example. There're actually different attractors that can exist in the system's phase space. These attractors can occasionally appear, disappear and merge with each other. So, u can have a strange attractor (near which the system is actively mixed) in some domain of phase space and ...
129,249
I want to be able to use taskwarrior at work. But the computers at work don't allow me to install anything, they all run Win XP, and IE... So, I would like to somehow SSH to a linux box at home, and do it through a browser. I should mention that I'd be working with a dynamic IP. Is this possible? If so, what is the s...
2014/05/13
[ "https://unix.stackexchange.com/questions/129249", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/23295/" ]
That's simply: ``` tail -fn+1 file ``` `-f` to follow, `-n+1` for tail to start from the first line (the beginning of the file).
Another solution is to use the follow feature in `less`. ``` less -f file ``` You can enter follow mode in `less` by pressing `Shift+f`. `Ctrl+c` exits follow mode at which point the `less` functionality is returned.
25,525,612
I'm newbie and want to implement advanced search, I have two model articles and books and I am using sunspot gem for search this is my articles model ``` class Article < ActiveRecord::Base searchable do text :title text :content end ``` this my books model ``` class Book < ActiveRecord::Base searchable do ...
2014/08/27
[ "https://Stackoverflow.com/questions/25525612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3304070/" ]
Let's say you want to send notifications by e-mail when a ticket is ready to be reviewed. People responsible for the review are set via a `Reviewer` custom field (which can contain multiple values). Then you can send notifications as follows: ``` var entities = require('@jetbrains/youtrack-scripting-api/entities'); e...
You can create a custom workflow like the following one: ``` when { if (Interested Parties.isNotEmpty) { for each user in Interested Parties { user.notify("subj", "body"); } } } ``` Another point is that you probably do not need this field since you can 'star' an issue on behalf of a user a...
388,430
I have a given limit that depends on a variable $a$: $$\lim\_{x \rightarrow \infty} \left (\frac{e^{ax}}{1 - ax} \right)$$ I understand cases for $a < 0 \implies \lim = 0$ and $a > 0 \implies \lim = -\infty$. However, for the case $a = 0$, the expression $ax$ which is basically $0\cdot \infty$ in undefined. I somehow...
2013/05/11
[ "https://math.stackexchange.com/questions/388430", "https://math.stackexchange.com", "https://math.stackexchange.com/users/43803/" ]
If we choose the value $a=0$ we evaluate the expression $\frac{e^{ax}}{1 - ax}$ before passing to the limit so your result would be $$\lim\_{x\to\infty}\left(\left[\frac{e^{ax}}{1 - ax}\right]\_{a=0}\right)=\lim\_{x\to\infty}\frac{e^0}{1-0}=1$$
There is *no* “indetermination” in $e^{ax}$ when $a=0$: it just means $e^0=1$, because $0x=0$. You don't compute such a limit by plugging in $\infty$ in place of $x$, which wouldn't make sense. You *can*, however, use that 1. $\lim\_{x\to\infty}e^{ax}=\infty$ (for $a>0$); 2. $\lim\_{x\to\infty}e^{ax}=0$ (for $a<0$). ...
13,898,931
I seem to have hit a bump. I'm creating an "Economy" system for a minecraft bukkit server. I'm trying to order the table by "Richest" first, however the order being received is different. When I run the SQL through phpMyAdmin it is recieved in the correct order ![enter image description here](https://i.stack.imgur.co...
2012/12/16
[ "https://Stackoverflow.com/questions/13898931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1509091/" ]
You're using HashMap which is not ordered. Try to use a [*List*](http://docs.oracle.com/javase/6/docs/api/java/util/LinkedList.html) or any other ordered data structure - it'll solve your problem.
You are using a `HashMap` that doesn't gaurante the ordering of elements. This what the API docs for [java.util.HashMap](http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html) says : ***This class makes no guarantees as to the order of the map; in particular, it does not guarantee that the order will remai...
66,328,274
I am trying to implement wishlist feature in reactjs, how do we check if clicked product is already in the wishlist array, here is my addToWishlist function, what logic am i missing here? ``` const addToWishlist = (id) => { const check_wishlist = products.findIndex((item) => item.id === id); console.log(check_...
2021/02/23
[ "https://Stackoverflow.com/questions/66328274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4531885/" ]
You have 2 error in your code 1: You should not push direct to wishlist 2: wishlist.filter not change value of wishlist ```js const addToWishlist = (id) => { const check_wishlist = wishlist.find((item) => item.id === id); if (!check_wishlist) { const product = products.find((item) => item.id === id); ...
Array.filter always returns new list, so you need to set the new list not the wishlist. ``` const addToWishlist = (id) => { const check_wishlist = wishlist.findIndex((item) => item.id === id); console.log(check_wishlist); if (check_wishlist !== -1) { setWishlist([ ...wishlist products.find((item) => item.id ==...
715,884
Does Ubuntu 14.04 have its own 'Task Manager'? Like the one in Windows, where you would check what program is using how much and such.
2016/01/02
[ "https://askubuntu.com/questions/715884", "https://askubuntu.com", "https://askubuntu.com/users/488182/" ]
You can use `top`. Just open a terminal enter `top` command and it will show you which process is consuming how much **Memory** and **CPU**. Visit the link it will really help you [12-Top-commands](http://www.tecmint.com/12-top-command-examples-in-linux/)
use the following command ``` gnome-system-monitor ``` if not found then run ``` sudo apt-get install gnome-system-monitor ```
715,884
Does Ubuntu 14.04 have its own 'Task Manager'? Like the one in Windows, where you would check what program is using how much and such.
2016/01/02
[ "https://askubuntu.com/questions/715884", "https://askubuntu.com", "https://askubuntu.com/users/488182/" ]
You can use `top`. Just open a terminal enter `top` command and it will show you which process is consuming how much **Memory** and **CPU**. Visit the link it will really help you [12-Top-commands](http://www.tecmint.com/12-top-command-examples-in-linux/)
The nice thing about the Task Manager in Windows is that you can use a keyboard shortcut to bring it up, even if the computer is frozen. The System Monitor in Ubuntu is accessible from the Dash: click on the Dash and type “System” and it should come up. This, however, is fairly slow: it involves the graphics-heavy Das...
715,884
Does Ubuntu 14.04 have its own 'Task Manager'? Like the one in Windows, where you would check what program is using how much and such.
2016/01/02
[ "https://askubuntu.com/questions/715884", "https://askubuntu.com", "https://askubuntu.com/users/488182/" ]
Open 'System Monitor' application ; it's very similar to task manager in Windows.
use the following command ``` gnome-system-monitor ``` if not found then run ``` sudo apt-get install gnome-system-monitor ```
715,884
Does Ubuntu 14.04 have its own 'Task Manager'? Like the one in Windows, where you would check what program is using how much and such.
2016/01/02
[ "https://askubuntu.com/questions/715884", "https://askubuntu.com", "https://askubuntu.com/users/488182/" ]
Open 'System Monitor' application ; it's very similar to task manager in Windows.
The nice thing about the Task Manager in Windows is that you can use a keyboard shortcut to bring it up, even if the computer is frozen. The System Monitor in Ubuntu is accessible from the Dash: click on the Dash and type “System” and it should come up. This, however, is fairly slow: it involves the graphics-heavy Das...
715,884
Does Ubuntu 14.04 have its own 'Task Manager'? Like the one in Windows, where you would check what program is using how much and such.
2016/01/02
[ "https://askubuntu.com/questions/715884", "https://askubuntu.com", "https://askubuntu.com/users/488182/" ]
The nice thing about the Task Manager in Windows is that you can use a keyboard shortcut to bring it up, even if the computer is frozen. The System Monitor in Ubuntu is accessible from the Dash: click on the Dash and type “System” and it should come up. This, however, is fairly slow: it involves the graphics-heavy Das...
use the following command ``` gnome-system-monitor ``` if not found then run ``` sudo apt-get install gnome-system-monitor ```
4,500,493
A mailman sort 202 letters in N boxes. Does it mean each box contain one letter?
2022/07/26
[ "https://math.stackexchange.com/questions/4500493", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1081577/" ]
No. For example, the mailman could sort all $202$ letters into one box and assuming there are no other boxes, then the mailman has sorted all $202$ letters in $N$ boxes, but each box does not contain one letter.
If $N=1$ Yes If $N>1$ No, because maybe all letters are put in one box and other boxes are empty.
672,936
I have found a brute force python programmatic way of concatenating multiple files while inserting some text characters in between the files. Example: `test_file1 + " \'id#\',\',name,\' " +...+ test_fileN` BUT, is there a way to do this using only BASH commands (sed, grep, cat,...)?
2021/10/12
[ "https://unix.stackexchange.com/questions/672936", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/9932/" ]
I would type : ``` (for a in test_file*; do cat $a;echo " \'id#\',\',name,\' ";done) | sed '$d' ``` You just have to replace the `test_file*` by your actual name list (separated by spaces).
Method using shell builtins `set`, `shift` and `printf`, with no loop: ``` echo " \'id#\',\',name,\' " > /tmp/foo set -- test_file[0-9]* f="$1" shift cat "$1" $(printf '/tmp/foo %s ' "$@") rm /tmp/foo ```
33,314
I'm aware that this is a common question and one that can be quite situational, but I have a few specific questions regarding nuance between these two pronouns for "I". jisho.org describes 俺 as "Male term or language, sounds rough or arrogant". However, based on my knowledge, I'd say that this is the most common prono...
2016/04/02
[ "https://japanese.stackexchange.com/questions/33314", "https://japanese.stackexchange.com", "https://japanese.stackexchange.com/users/10795/" ]
> > I'd say that this is the most common pronoun among college and older males > > > I wouldn't say it's the most common one, but in a manly/friendly/aggressive environment you might encounter it. In real life speech it's not as common as 僕 and 私 since there are a lot less situations where you can use 俺 safely. It...
I typically use 僕 when talking to some one older who I respect. I will use 俺 if I am talking with male friends. I rarely ever use 私 unless Im talking to some one I have just met. Im not a native speaker but I have never had anyone correct me on my usage 僕 is generally only used by younger boys but it can also be used...
33,314
I'm aware that this is a common question and one that can be quite situational, but I have a few specific questions regarding nuance between these two pronouns for "I". jisho.org describes 俺 as "Male term or language, sounds rough or arrogant". However, based on my knowledge, I'd say that this is the most common prono...
2016/04/02
[ "https://japanese.stackexchange.com/questions/33314", "https://japanese.stackexchange.com", "https://japanese.stackexchange.com/users/10795/" ]
First, I'd like to explain the whole scheme concerning personal pronouns. 1. You are supposed to use Standard Japanese when you speak in public or formal situations and in this case, you basically use 私 (derived from old Tokyo) only. 2. Otherwise, you speak in a dialect of your own. 3. In many areas including most pop...
I typically use 僕 when talking to some one older who I respect. I will use 俺 if I am talking with male friends. I rarely ever use 私 unless Im talking to some one I have just met. Im not a native speaker but I have never had anyone correct me on my usage 僕 is generally only used by younger boys but it can also be used...
33,314
I'm aware that this is a common question and one that can be quite situational, but I have a few specific questions regarding nuance between these two pronouns for "I". jisho.org describes 俺 as "Male term or language, sounds rough or arrogant". However, based on my knowledge, I'd say that this is the most common prono...
2016/04/02
[ "https://japanese.stackexchange.com/questions/33314", "https://japanese.stackexchange.com", "https://japanese.stackexchange.com/users/10795/" ]
> > I'd say that this is the most common pronoun among college and older males > > > I wouldn't say it's the most common one, but in a manly/friendly/aggressive environment you might encounter it. In real life speech it's not as common as 僕 and 私 since there are a lot less situations where you can use 俺 safely. It...
First, I'd like to explain the whole scheme concerning personal pronouns. 1. You are supposed to use Standard Japanese when you speak in public or formal situations and in this case, you basically use 私 (derived from old Tokyo) only. 2. Otherwise, you speak in a dialect of your own. 3. In many areas including most pop...
14,336,734
Because of some reasons I have a spring application which has two client applications written in extjs. One only contains the login page and the other the application logic. In Spring I include them into two jsp pages which I'm using in the controller. The login and the redirect to the application page works fine. But...
2013/01/15
[ "https://Stackoverflow.com/questions/14336734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1979942/" ]
Sure it's possible. [`Request.Form`](http://msdn.microsoft.com/en-us/library/system.web.httprequest.form.aspx) is a [`NameValueCollection`](http://msdn.microsoft.com/en-us/library/system.collections.specialized.namevaluecollection.aspx). I suggest reading up on [the documentation](http://msdn.microsoft.com/en-us/librar...
It certainly is. The type is a [NameValueCollection](http://msdn.microsoft.com/en-us/library/system.collections.specialized.namevaluecollection.aspx): ``` public string extract(NameValueCollection form) { ... } ```
14,336,734
Because of some reasons I have a spring application which has two client applications written in extjs. One only contains the login page and the other the application logic. In Spring I include them into two jsp pages which I'm using in the controller. The login and the redirect to the application page works fine. But...
2013/01/15
[ "https://Stackoverflow.com/questions/14336734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1979942/" ]
Sure it's possible. [`Request.Form`](http://msdn.microsoft.com/en-us/library/system.web.httprequest.form.aspx) is a [`NameValueCollection`](http://msdn.microsoft.com/en-us/library/system.collections.specialized.namevaluecollection.aspx). I suggest reading up on [the documentation](http://msdn.microsoft.com/en-us/librar...
Yes you can, It's of type `FormCollection`, which inherits from `NameValueCollection`
14,336,734
Because of some reasons I have a spring application which has two client applications written in extjs. One only contains the login page and the other the application logic. In Spring I include them into two jsp pages which I'm using in the controller. The login and the redirect to the application page works fine. But...
2013/01/15
[ "https://Stackoverflow.com/questions/14336734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1979942/" ]
Sure it's possible. [`Request.Form`](http://msdn.microsoft.com/en-us/library/system.web.httprequest.form.aspx) is a [`NameValueCollection`](http://msdn.microsoft.com/en-us/library/system.collections.specialized.namevaluecollection.aspx). I suggest reading up on [the documentation](http://msdn.microsoft.com/en-us/librar...
Using the [example in the documentaion](http://msdn.microsoft.com/en-us/library/system.web.httprequest.form.aspx) ``` public string extract(NameValueCollection myRequest) { int loop1; StringBuilder processed_data= new StringBuilder(); // Get names of all forms into a string array. String[] arr1 = myReq...