qid int64 1 74.6M | question stringlengths 45 24.2k | date stringlengths 10 10 | metadata stringlengths 101 178 | response_j stringlengths 32 23.2k | response_k stringlengths 21 13.2k |
|---|---|---|---|---|---|
143,735 | I find it difficult to understand as to why current behaves differently in an RL and an RC circuit. At time $t=0$, in an RC circuit the current is maximum, whereas in an RL circuit its $0$. Why is it so? The current should rise from $0$ to some value in both the circuits, so where am I going wrong? | 2014/10/29 | ['https://physics.stackexchange.com/questions/143735', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/46325/'] | [@Floris' answer](https://physics.stackexchange.com/a/143737/44176) being good, i'll give another view on the matter.
A **capacitor is equivalent to an open circuit** (since simply put, a capacitor is an element consisting of two plates which do not actually touch but through another medium, the *dielectric*, the circ... | Circuits with inductors are sensitive to changes in the signal - think of them as differentiators. Circuits with capacitors are responding to the integral of the signal over time.
When you first turn on a circuit, the current wants to make a step change - which the capacitor doesn't care about, but the inductor resist... |
143,735 | I find it difficult to understand as to why current behaves differently in an RL and an RC circuit. At time $t=0$, in an RC circuit the current is maximum, whereas in an RL circuit its $0$. Why is it so? The current should rise from $0$ to some value in both the circuits, so where am I going wrong? | 2014/10/29 | ['https://physics.stackexchange.com/questions/143735', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/46325/'] | Circuits with inductors are sensitive to changes in the signal - think of them as differentiators. Circuits with capacitors are responding to the integral of the signal over time.
When you first turn on a circuit, the current wants to make a step change - which the capacitor doesn't care about, but the inductor resist... | 1. Charge on the capacitor does not change instantaneously or suddenly if there if a resistance in the path(series) of the capacitor.
2. When an uncharged capacitor is connected with battery then its charge is zero initally hence potential difference across it is zero. At this time the capacitor can be treated as a con... |
143,735 | I find it difficult to understand as to why current behaves differently in an RL and an RC circuit. At time $t=0$, in an RC circuit the current is maximum, whereas in an RL circuit its $0$. Why is it so? The current should rise from $0$ to some value in both the circuits, so where am I going wrong? | 2014/10/29 | ['https://physics.stackexchange.com/questions/143735', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/46325/'] | [@Floris' answer](https://physics.stackexchange.com/a/143737/44176) being good, i'll give another view on the matter.
A **capacitor is equivalent to an open circuit** (since simply put, a capacitor is an element consisting of two plates which do not actually touch but through another medium, the *dielectric*, the circ... | >
> Why is it so?
>
>
>
Well, it isn't actually *always* so. It will depend on the actual circuit configuration and whether the switch opens or closes when $t=0$.
But first, here are a couple of *crucial* results to *always* keep in mind when solving these type of switched circuits:
* the current through an indu... |
143,735 | I find it difficult to understand as to why current behaves differently in an RL and an RC circuit. At time $t=0$, in an RC circuit the current is maximum, whereas in an RL circuit its $0$. Why is it so? The current should rise from $0$ to some value in both the circuits, so where am I going wrong? | 2014/10/29 | ['https://physics.stackexchange.com/questions/143735', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/46325/'] | [@Floris' answer](https://physics.stackexchange.com/a/143737/44176) being good, i'll give another view on the matter.
A **capacitor is equivalent to an open circuit** (since simply put, a capacitor is an element consisting of two plates which do not actually touch but through another medium, the *dielectric*, the circ... | 1. Charge on the capacitor does not change instantaneously or suddenly if there if a resistance in the path(series) of the capacitor.
2. When an uncharged capacitor is connected with battery then its charge is zero initally hence potential difference across it is zero. At this time the capacitor can be treated as a con... |
143,735 | I find it difficult to understand as to why current behaves differently in an RL and an RC circuit. At time $t=0$, in an RC circuit the current is maximum, whereas in an RL circuit its $0$. Why is it so? The current should rise from $0$ to some value in both the circuits, so where am I going wrong? | 2014/10/29 | ['https://physics.stackexchange.com/questions/143735', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/46325/'] | >
> Why is it so?
>
>
>
Well, it isn't actually *always* so. It will depend on the actual circuit configuration and whether the switch opens or closes when $t=0$.
But first, here are a couple of *crucial* results to *always* keep in mind when solving these type of switched circuits:
* the current through an indu... | 1. Charge on the capacitor does not change instantaneously or suddenly if there if a resistance in the path(series) of the capacitor.
2. When an uncharged capacitor is connected with battery then its charge is zero initally hence potential difference across it is zero. At this time the capacitor can be treated as a con... |
23,020,571 | I am trying to import data from a db via pdo and output the results to a csv file. I am able to output to a screen correctly but the formatting in the csv is wild, double names and no '\n'
```
<?php
require_once('auth.php');
$conn = new PDO("mysql:host=localhost;dbname=$dbname", $username, $pw);
if (($handle = fopen... | 2014/04/11 | ['https://Stackoverflow.com/questions/23020571', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2528910/'] | I've [updated your fiddle](http://jsfiddle.net/8s9ss/4) and below code as well. I hope that will help.
Regards
```
var app = angular.module('app', ['ui.bootstrap']);
app.controller('ModalInstanceCtrl', function ($scope, $modalInstance, customer)
{
$scope.customer = customer;
});
app.controller('CustomerController'... | This is how I setup my modals for handleing items that I ng-repeat over and want to edit. I suggest setting it up to work with a different controller, because then you can use DI to inject the resolved item to the child scope.
```
$scope.openModal = function(item)
// This sets up some of the options I want the mo... |
46,065 | And in what sense could he be called wise?
Can you please help me in this essay assignment? | 2017/09/16 | ['https://philosophy.stackexchange.com/questions/46065', 'https://philosophy.stackexchange.com', 'https://philosophy.stackexchange.com/users/28693/'] | There's a lot of interesting features to the question.
First, you need to consider how serious Socrates is being vs. how much of a joke he's making of the whole thing. Second, it's important to realize "Socrates" is a character Plato is using and the *Apology* is largely agreed to not be a factual representation of wh... | He could be called wise in starting from the position he knows nothing, and pursuing knowledge as something of worth he does not "own" already - instead of treating knowledge like property, as a kind of status symbol through the appearance of knowing "something", he treated knowledge as something to be gained through r... |
46,065 | And in what sense could he be called wise?
Can you please help me in this essay assignment? | 2017/09/16 | ['https://philosophy.stackexchange.com/questions/46065', 'https://philosophy.stackexchange.com', 'https://philosophy.stackexchange.com/users/28693/'] | He could be called wise in starting from the position he knows nothing, and pursuing knowledge as something of worth he does not "own" already - instead of treating knowledge like property, as a kind of status symbol through the appearance of knowing "something", he treated knowledge as something to be gained through r... | Socrates did not understand the situation surrounding Chaerephon's visit to Delphi. Chaerephon went to ask the oracle at Delphi, "Of all the Greeks, who is wisest?" (Από όλους τους Έλληνες, ποιος είναι πιο σοφός;) The Pythia replied, “Socrates”, perplexing even Socrates.
Clarity comes when we understand the full circu... |
46,065 | And in what sense could he be called wise?
Can you please help me in this essay assignment? | 2017/09/16 | ['https://philosophy.stackexchange.com/questions/46065', 'https://philosophy.stackexchange.com', 'https://philosophy.stackexchange.com/users/28693/'] | He could be called wise in starting from the position he knows nothing, and pursuing knowledge as something of worth he does not "own" already - instead of treating knowledge like property, as a kind of status symbol through the appearance of knowing "something", he treated knowledge as something to be gained through r... | He changed his mind when he discovered that the wise were not wise but did not know that they were not wise . Socrates was wise only in the sense that he knew that he was not wise . |
46,065 | And in what sense could he be called wise?
Can you please help me in this essay assignment? | 2017/09/16 | ['https://philosophy.stackexchange.com/questions/46065', 'https://philosophy.stackexchange.com', 'https://philosophy.stackexchange.com/users/28693/'] | There's a lot of interesting features to the question.
First, you need to consider how serious Socrates is being vs. how much of a joke he's making of the whole thing. Second, it's important to realize "Socrates" is a character Plato is using and the *Apology* is largely agreed to not be a factual representation of wh... | I am just going to quote wikipedia:
>
> According to Plato's Apology, Socrates' life as the "gadfly" of Athens began when his friend Chaerephon asked the oracle at Delphi if anyone were wiser than Socrates; the Oracle responded that no-one was wiser. Socrates believed the Oracle's response was not correct, because he... |
46,065 | And in what sense could he be called wise?
Can you please help me in this essay assignment? | 2017/09/16 | ['https://philosophy.stackexchange.com/questions/46065', 'https://philosophy.stackexchange.com', 'https://philosophy.stackexchange.com/users/28693/'] | I am just going to quote wikipedia:
>
> According to Plato's Apology, Socrates' life as the "gadfly" of Athens began when his friend Chaerephon asked the oracle at Delphi if anyone were wiser than Socrates; the Oracle responded that no-one was wiser. Socrates believed the Oracle's response was not correct, because he... | Socrates did not understand the situation surrounding Chaerephon's visit to Delphi. Chaerephon went to ask the oracle at Delphi, "Of all the Greeks, who is wisest?" (Από όλους τους Έλληνες, ποιος είναι πιο σοφός;) The Pythia replied, “Socrates”, perplexing even Socrates.
Clarity comes when we understand the full circu... |
46,065 | And in what sense could he be called wise?
Can you please help me in this essay assignment? | 2017/09/16 | ['https://philosophy.stackexchange.com/questions/46065', 'https://philosophy.stackexchange.com', 'https://philosophy.stackexchange.com/users/28693/'] | I am just going to quote wikipedia:
>
> According to Plato's Apology, Socrates' life as the "gadfly" of Athens began when his friend Chaerephon asked the oracle at Delphi if anyone were wiser than Socrates; the Oracle responded that no-one was wiser. Socrates believed the Oracle's response was not correct, because he... | He changed his mind when he discovered that the wise were not wise but did not know that they were not wise . Socrates was wise only in the sense that he knew that he was not wise . |
46,065 | And in what sense could he be called wise?
Can you please help me in this essay assignment? | 2017/09/16 | ['https://philosophy.stackexchange.com/questions/46065', 'https://philosophy.stackexchange.com', 'https://philosophy.stackexchange.com/users/28693/'] | There's a lot of interesting features to the question.
First, you need to consider how serious Socrates is being vs. how much of a joke he's making of the whole thing. Second, it's important to realize "Socrates" is a character Plato is using and the *Apology* is largely agreed to not be a factual representation of wh... | Socrates did not understand the situation surrounding Chaerephon's visit to Delphi. Chaerephon went to ask the oracle at Delphi, "Of all the Greeks, who is wisest?" (Από όλους τους Έλληνες, ποιος είναι πιο σοφός;) The Pythia replied, “Socrates”, perplexing even Socrates.
Clarity comes when we understand the full circu... |
46,065 | And in what sense could he be called wise?
Can you please help me in this essay assignment? | 2017/09/16 | ['https://philosophy.stackexchange.com/questions/46065', 'https://philosophy.stackexchange.com', 'https://philosophy.stackexchange.com/users/28693/'] | There's a lot of interesting features to the question.
First, you need to consider how serious Socrates is being vs. how much of a joke he's making of the whole thing. Second, it's important to realize "Socrates" is a character Plato is using and the *Apology* is largely agreed to not be a factual representation of wh... | He changed his mind when he discovered that the wise were not wise but did not know that they were not wise . Socrates was wise only in the sense that he knew that he was not wise . |
31,524,073 | I have something like below, which of course works if user had previously input his wrong credentials.
However if I directly go to my login fail url `/login?error` for example without any previous incorrect logins, `session[SPRING_SECURITY_LAST_EXCEPTION]` is of course `null` and I get a nasty **404**.
```
<span th:t... | 2015/07/20 | ['https://Stackoverflow.com/questions/31524073', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1448229/'] | You can use the th:if statement:
```
<span th:if="${session[SPRING_SECURITY_LAST_EXCEPTION].message}" th:text="${session[SPRING_SECURITY_LAST_EXCEPTION].message}">Invalid credentials</span>
```
That will only display this line if there is a value present.
EDIT 1:
Extra check:
```
<span th:if="${session[SPRING_SEC... | Try this:
```
<span th:if="${session[SPRING_SECURITY_LAST_EXCEPTION].message != null}">
<span th:text="${session[SPRING_SECURITY_LAST_EXCEPTION].message}">Invalid credentials</span>
</span>
``` |
31,524,073 | I have something like below, which of course works if user had previously input his wrong credentials.
However if I directly go to my login fail url `/login?error` for example without any previous incorrect logins, `session[SPRING_SECURITY_LAST_EXCEPTION]` is of course `null` and I get a nasty **404**.
```
<span th:t... | 2015/07/20 | ['https://Stackoverflow.com/questions/31524073', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1448229/'] | You can use the th:if statement:
```
<span th:if="${session[SPRING_SECURITY_LAST_EXCEPTION].message}" th:text="${session[SPRING_SECURITY_LAST_EXCEPTION].message}">Invalid credentials</span>
```
That will only display this line if there is a value present.
EDIT 1:
Extra check:
```
<span th:if="${session[SPRING_SEC... | Try this code, it is more optimal:
```
${session['SPRING_SECURITY_LAST_EXCEPTION']?.message}
```
? - checks if the resource is not null |
31,524,073 | I have something like below, which of course works if user had previously input his wrong credentials.
However if I directly go to my login fail url `/login?error` for example without any previous incorrect logins, `session[SPRING_SECURITY_LAST_EXCEPTION]` is of course `null` and I get a nasty **404**.
```
<span th:t... | 2015/07/20 | ['https://Stackoverflow.com/questions/31524073', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1448229/'] | You can use the th:if statement:
```
<span th:if="${session[SPRING_SECURITY_LAST_EXCEPTION].message}" th:text="${session[SPRING_SECURITY_LAST_EXCEPTION].message}">Invalid credentials</span>
```
That will only display this line if there is a value present.
EDIT 1:
Extra check:
```
<span th:if="${session[SPRING_SEC... | In your controller set the null string variable as
```
String nullvalue="";
model.addAttribute("nullvalue",nullvalue);
model.addAttribute("entity",entity);
```
then in your view class as in thymeleaf
```
<td data-th-if="${entity.field != nullvalue}">ok</td>
``` |
31,524,073 | I have something like below, which of course works if user had previously input his wrong credentials.
However if I directly go to my login fail url `/login?error` for example without any previous incorrect logins, `session[SPRING_SECURITY_LAST_EXCEPTION]` is of course `null` and I get a nasty **404**.
```
<span th:t... | 2015/07/20 | ['https://Stackoverflow.com/questions/31524073', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1448229/'] | Try this code, it is more optimal:
```
${session['SPRING_SECURITY_LAST_EXCEPTION']?.message}
```
? - checks if the resource is not null | Try this:
```
<span th:if="${session[SPRING_SECURITY_LAST_EXCEPTION].message != null}">
<span th:text="${session[SPRING_SECURITY_LAST_EXCEPTION].message}">Invalid credentials</span>
</span>
``` |
31,524,073 | I have something like below, which of course works if user had previously input his wrong credentials.
However if I directly go to my login fail url `/login?error` for example without any previous incorrect logins, `session[SPRING_SECURITY_LAST_EXCEPTION]` is of course `null` and I get a nasty **404**.
```
<span th:t... | 2015/07/20 | ['https://Stackoverflow.com/questions/31524073', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1448229/'] | Try this code, it is more optimal:
```
${session['SPRING_SECURITY_LAST_EXCEPTION']?.message}
```
? - checks if the resource is not null | In your controller set the null string variable as
```
String nullvalue="";
model.addAttribute("nullvalue",nullvalue);
model.addAttribute("entity",entity);
```
then in your view class as in thymeleaf
```
<td data-th-if="${entity.field != nullvalue}">ok</td>
``` |
16,650 | Another question I asked about Power Supply Noise pushed me to ask this question.
The background is as follows: I have a design with PD (Photodetector) and Opamp at medium frequency (couple hundred KHz). I am trying to test my design when it come back. I am looking at power supply noise, opamp supply noise and opamp ... | 2011/07/11 | ['https://electronics.stackexchange.com/questions/16650', 'https://electronics.stackexchange.com', 'https://electronics.stackexchange.com/users/4861/'] | Noise is difficult to measure, and the **amplitude** you see on your your **scope is only a first indication** of the level.
Do you want to measure absolute noise levels, or just comparative? In the latter case the scope could be a good instrument, but at the given levels the average $500 scope will have so much noi... | Stevenvh is correct that noise can be very hard to measure, but I would like to point out a different point of view.
The only time that noise really matters to you is when it affects your readings. This means that you can just take an ADC of your input, pass it off to a computer, and then do some math on it. I am not ... |
16,650 | Another question I asked about Power Supply Noise pushed me to ask this question.
The background is as follows: I have a design with PD (Photodetector) and Opamp at medium frequency (couple hundred KHz). I am trying to test my design when it come back. I am looking at power supply noise, opamp supply noise and opamp ... | 2011/07/11 | ['https://electronics.stackexchange.com/questions/16650', 'https://electronics.stackexchange.com', 'https://electronics.stackexchange.com/users/4861/'] | Noise is difficult to measure, and the **amplitude** you see on your your **scope is only a first indication** of the level.
Do you want to measure absolute noise levels, or just comparative? In the latter case the scope could be a good instrument, but at the given levels the average $500 scope will have so much noi... | Typically you design some parts on the first spins of the board to help measure stuff like this. Be generous with footprints for bypass caps and filters, and put for example SMA coaxial contacts at key places in the signal chain, but put them with a removable SMD 0-ohm resistor at the T-junction so the stub doesn't hav... |
16,650 | Another question I asked about Power Supply Noise pushed me to ask this question.
The background is as follows: I have a design with PD (Photodetector) and Opamp at medium frequency (couple hundred KHz). I am trying to test my design when it come back. I am looking at power supply noise, opamp supply noise and opamp ... | 2011/07/11 | ['https://electronics.stackexchange.com/questions/16650', 'https://electronics.stackexchange.com', 'https://electronics.stackexchange.com/users/4861/'] | Typically you design some parts on the first spins of the board to help measure stuff like this. Be generous with footprints for bypass caps and filters, and put for example SMA coaxial contacts at key places in the signal chain, but put them with a removable SMD 0-ohm resistor at the T-junction so the stub doesn't hav... | Stevenvh is correct that noise can be very hard to measure, but I would like to point out a different point of view.
The only time that noise really matters to you is when it affects your readings. This means that you can just take an ADC of your input, pass it off to a computer, and then do some math on it. I am not ... |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | Well you haven't actually asked how to do it. But, provided you can do an atomic CAS in c# it's entirely possible.
In fact I'm just working through an implementation of a doubly linked wait free list in C++ right now.
Here is paper describing it.
<http://www.cse.chalmers.se/~tsigas/papers/Haakan-Thesis.pdf>
And a p... | I would say that the answer is a very deeply qualified "yes, it is **possible**, but hard". To implement what you're asking for, you'd basically need something that would compile the operations together to ensure no collisions; as such, it would be very hard to create a general implementation for that purpose, and it w... |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | A simple google search will reveal many lock-free doubly linked list papers.
However, they are based on atomic CAS (compare and swap).
I don't know how atomic the operations in C# are, but according to this website
<http://www.albahari.com/threading/part4.aspx>
C# operations are only guaranteed to be atomic for rea... | It is possible to write lock free algorithms for *all* copyable data structures on most architectures [1]. But it is hard to write efficient ones.
I wrote an [implementation](https://github.com/2i/lfdll) of the [lock-free doubly linked list by Håkan Sundell and Philippas Tsigas](http://www.researchgate.net/publication... |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | I don't believe this is possible, since you're having to set multiple references in one shot, and the interlocked operations are limited in their power.
For example, take the add operation - if you're inserting node B between A and C, you need to set B->next, B->prev, A->next, and C->prev in one atomic operation. Inte... | Read the footnote - they plan to pull ConcurrentLinkedList from 4.0 prior to the final release of VS2010 |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | Here is a [paper](http://citeseer.ist.psu.edu/cache/papers/cs/32904/http:zSzzSzwww.cs.chalmers.sezSz~phszSzTechnicalReportszSzSunT04_Deque.pdf/sundell04lockfree.pdf) which discribes a lock free doublly linked list.
>
> We present an efficient and practical
> lock-free implementation of a
> concurrent deque that is... | Read the footnote - they plan to pull ConcurrentLinkedList from 4.0 prior to the final release of VS2010 |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | Read the footnote - they plan to pull ConcurrentLinkedList from 4.0 prior to the final release of VS2010 | FWIW, .NET 4.0 is adding a ConcurrentLinkedList, a threadsafe doubly linked list in the System.Collections.Concurrent namespace. You can read the [documentation](http://msdn.microsoft.com/en-us/library/dd381935(VS.100).aspx) or the [blog post](http://blogs.msdn.com/pfxteam/archive/2009/03/04/9457880.aspx) describing it... |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | Yes it's possible, here's my implementation of an STL-like [Lock-Free Doubly-Linked List](https://github.com/Qarterd/Honeycomb/blob/master/src/common/Honey/Thread/LockFree/List.h) in C++.
[Sample code that spawns threads to randomly perform ops on a list](https://github.com/Qarterd/Honeycomb/blob/master/test/Test.cpp#... | Well you haven't actually asked how to do it. But, provided you can do an atomic CAS in c# it's entirely possible.
In fact I'm just working through an implementation of a doubly linked wait free list in C++ right now.
Here is paper describing it.
<http://www.cse.chalmers.se/~tsigas/papers/Haakan-Thesis.pdf>
And a p... |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | Here is a [paper](http://citeseer.ist.psu.edu/cache/papers/cs/32904/http:zSzzSzwww.cs.chalmers.sezSz~phszSzTechnicalReportszSzSunT04_Deque.pdf/sundell04lockfree.pdf) which discribes a lock free doublly linked list.
>
> We present an efficient and practical
> lock-free implementation of a
> concurrent deque that is... | FWIW, .NET 4.0 is adding a ConcurrentLinkedList, a threadsafe doubly linked list in the System.Collections.Concurrent namespace. You can read the [documentation](http://msdn.microsoft.com/en-us/library/dd381935(VS.100).aspx) or the [blog post](http://blogs.msdn.com/pfxteam/archive/2009/03/04/9457880.aspx) describing it... |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | Here is a [paper](http://citeseer.ist.psu.edu/cache/papers/cs/32904/http:zSzzSzwww.cs.chalmers.sezSz~phszSzTechnicalReportszSzSunT04_Deque.pdf/sundell04lockfree.pdf) which discribes a lock free doublly linked list.
>
> We present an efficient and practical
> lock-free implementation of a
> concurrent deque that is... | It is possible to write lock free algorithms for *all* copyable data structures on most architectures [1]. But it is hard to write efficient ones.
I wrote an [implementation](https://github.com/2i/lfdll) of the [lock-free doubly linked list by Håkan Sundell and Philippas Tsigas](http://www.researchgate.net/publication... |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | Here is a [paper](http://citeseer.ist.psu.edu/cache/papers/cs/32904/http:zSzzSzwww.cs.chalmers.sezSz~phszSzTechnicalReportszSzSunT04_Deque.pdf/sundell04lockfree.pdf) which discribes a lock free doublly linked list.
>
> We present an efficient and practical
> lock-free implementation of a
> concurrent deque that is... | Well you haven't actually asked how to do it. But, provided you can do an atomic CAS in c# it's entirely possible.
In fact I'm just working through an implementation of a doubly linked wait free list in C++ right now.
Here is paper describing it.
<http://www.cse.chalmers.se/~tsigas/papers/Haakan-Thesis.pdf>
And a p... |
849,786 | Asking this question with C# tag, but if it is possible, it should be possible in any language.
Is it possible to implement a doubly linked list using Interlocked operations to provide no-wait locking? I would want to insert, add and remove, and clear without waiting. | 2009/05/11 | ['https://Stackoverflow.com/questions/849786', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/92692/'] | A simple google search will reveal many lock-free doubly linked list papers.
However, they are based on atomic CAS (compare and swap).
I don't know how atomic the operations in C# are, but according to this website
<http://www.albahari.com/threading/part4.aspx>
C# operations are only guaranteed to be atomic for rea... | FWIW, .NET 4.0 is adding a ConcurrentLinkedList, a threadsafe doubly linked list in the System.Collections.Concurrent namespace. You can read the [documentation](http://msdn.microsoft.com/en-us/library/dd381935(VS.100).aspx) or the [blog post](http://blogs.msdn.com/pfxteam/archive/2009/03/04/9457880.aspx) describing it... |
15,337,469 | Whenever a unit test fails due to a `StackOverflowException` the unit test process immediately exits - the only way to find out what happened (that I am aware of) is to debug a crash dump of the unit test process obtained by following the steps found here
* [Collecting User-Mode Dumps](http://msdn.microsoft.com/en-us/... | 2013/03/11 | ['https://Stackoverflow.com/questions/15337469', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/113141/'] | Use [Eclipse](http://www.eclipse.org/). Cloudera has a great screencast [here](http://blog.cloudera.com/blog/2009/04/configuring-eclipse-for-hadoop-development-a-screencast/) for configuring eclipse for hadoop development.
Also debugging a hadoop job locally is pretty cool using eclipse (though not trivial). To know mo... | [Here](http://www.thecloudavenue.com/2012/10/debugging-hadoop-mapreduce-program-in.html) is a blog for Debugging/Developing Hadoop Jobs on Eclipse/Linux. Also, check [Karmasphere Studio](http://karmasphere.com/karmasphere-studio-resources). |
15,337,469 | Whenever a unit test fails due to a `StackOverflowException` the unit test process immediately exits - the only way to find out what happened (that I am aware of) is to debug a crash dump of the unit test process obtained by following the steps found here
* [Collecting User-Mode Dumps](http://msdn.microsoft.com/en-us/... | 2013/03/11 | ['https://Stackoverflow.com/questions/15337469', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/113141/'] | You should also check out the IntelliJ IDEA as the Apache Hadoop wiki pages have instructions on how to set up your development environment using it.
References:
<http://www.jetbrains.com/idea/>
<http://wiki.apache.org/hadoop/HadoopUnderIDEA> | Use [Eclipse](http://www.eclipse.org/). Cloudera has a great screencast [here](http://blog.cloudera.com/blog/2009/04/configuring-eclipse-for-hadoop-development-a-screencast/) for configuring eclipse for hadoop development.
Also debugging a hadoop job locally is pretty cool using eclipse (though not trivial). To know mo... |
15,337,469 | Whenever a unit test fails due to a `StackOverflowException` the unit test process immediately exits - the only way to find out what happened (that I am aware of) is to debug a crash dump of the unit test process obtained by following the steps found here
* [Collecting User-Mode Dumps](http://msdn.microsoft.com/en-us/... | 2013/03/11 | ['https://Stackoverflow.com/questions/15337469', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/113141/'] | Use [Eclipse](http://www.eclipse.org/). Cloudera has a great screencast [here](http://blog.cloudera.com/blog/2009/04/configuring-eclipse-for-hadoop-development-a-screencast/) for configuring eclipse for hadoop development.
Also debugging a hadoop job locally is pretty cool using eclipse (though not trivial). To know mo... | Yes, It's possible to run the MapReduce jobs in Eclipse. There is a lot of difference running MapReduce programs on a cluster and in Eclipse.
Bellow are the few points worth noting:
* In Eclipse, it runs in a special mode called: LocalJobRunner mode i.e. all Hadoop daemons are run in single JVM.
* In Eclipse, All path... |
15,337,469 | Whenever a unit test fails due to a `StackOverflowException` the unit test process immediately exits - the only way to find out what happened (that I am aware of) is to debug a crash dump of the unit test process obtained by following the steps found here
* [Collecting User-Mode Dumps](http://msdn.microsoft.com/en-us/... | 2013/03/11 | ['https://Stackoverflow.com/questions/15337469', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/113141/'] | You should also check out the IntelliJ IDEA as the Apache Hadoop wiki pages have instructions on how to set up your development environment using it.
References:
<http://www.jetbrains.com/idea/>
<http://wiki.apache.org/hadoop/HadoopUnderIDEA> | [Here](http://www.thecloudavenue.com/2012/10/debugging-hadoop-mapreduce-program-in.html) is a blog for Debugging/Developing Hadoop Jobs on Eclipse/Linux. Also, check [Karmasphere Studio](http://karmasphere.com/karmasphere-studio-resources). |
15,337,469 | Whenever a unit test fails due to a `StackOverflowException` the unit test process immediately exits - the only way to find out what happened (that I am aware of) is to debug a crash dump of the unit test process obtained by following the steps found here
* [Collecting User-Mode Dumps](http://msdn.microsoft.com/en-us/... | 2013/03/11 | ['https://Stackoverflow.com/questions/15337469', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/113141/'] | [Here](http://www.thecloudavenue.com/2012/10/debugging-hadoop-mapreduce-program-in.html) is a blog for Debugging/Developing Hadoop Jobs on Eclipse/Linux. Also, check [Karmasphere Studio](http://karmasphere.com/karmasphere-studio-resources). | Yes, It's possible to run the MapReduce jobs in Eclipse. There is a lot of difference running MapReduce programs on a cluster and in Eclipse.
Bellow are the few points worth noting:
* In Eclipse, it runs in a special mode called: LocalJobRunner mode i.e. all Hadoop daemons are run in single JVM.
* In Eclipse, All path... |
15,337,469 | Whenever a unit test fails due to a `StackOverflowException` the unit test process immediately exits - the only way to find out what happened (that I am aware of) is to debug a crash dump of the unit test process obtained by following the steps found here
* [Collecting User-Mode Dumps](http://msdn.microsoft.com/en-us/... | 2013/03/11 | ['https://Stackoverflow.com/questions/15337469', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/113141/'] | You should also check out the IntelliJ IDEA as the Apache Hadoop wiki pages have instructions on how to set up your development environment using it.
References:
<http://www.jetbrains.com/idea/>
<http://wiki.apache.org/hadoop/HadoopUnderIDEA> | Yes, It's possible to run the MapReduce jobs in Eclipse. There is a lot of difference running MapReduce programs on a cluster and in Eclipse.
Bellow are the few points worth noting:
* In Eclipse, it runs in a special mode called: LocalJobRunner mode i.e. all Hadoop daemons are run in single JVM.
* In Eclipse, All path... |
45,692,532 | I am using recyclerview in my app. I want to start a fragment when click on image view. But i don't know how to. Also i want to put data when starting fragment. I know how to start the activity with below code. But how can i start fragment same way?
Edited Code
```
FragmentManager fm = getSupportFragmentManager();... | 2017/08/15 | ['https://Stackoverflow.com/questions/45692532', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8042837/'] | Here is a workaround which you can use to do this.
```
@BindingAdapter("touchListener")
public void setTouchListener(View self,boolean value){
self.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent event) {
// Check if the button is ... | ViewModel
```
public class RecyclerViewModel {
public View.OnTouchListener onTouchListener;
public void setOnTouchListener( View.OnTouchListener onTouchListener) {
this.onTouchListener = onTouchListener;
}
}
```
DataBinding
```
@BindingAdapter("onTouchListener")
public static void set... |
45,692,532 | I am using recyclerview in my app. I want to start a fragment when click on image view. But i don't know how to. Also i want to put data when starting fragment. I know how to start the activity with below code. But how can i start fragment same way?
Edited Code
```
FragmentManager fm = getSupportFragmentManager();... | 2017/08/15 | ['https://Stackoverflow.com/questions/45692532', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8042837/'] | Here is a workaround which you can use to do this.
```
@BindingAdapter("touchListener")
public void setTouchListener(View self,boolean value){
self.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent event) {
// Check if the button is ... | ViewModel
```
private var tapTime: Long = 0
fun onTouchListener(view:View, event: MotionEvent): Boolean {
when (event.action) {
MotionEvent.ACTION_DOWN -> {
tapTime = Date().time
// more commands for touch down event
}
MotionEvent.ACTION_UP -> {
if (Date().time - tap... |
45,692,532 | I am using recyclerview in my app. I want to start a fragment when click on image view. But i don't know how to. Also i want to put data when starting fragment. I know how to start the activity with below code. But how can i start fragment same way?
Edited Code
```
FragmentManager fm = getSupportFragmentManager();... | 2017/08/15 | ['https://Stackoverflow.com/questions/45692532', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8042837/'] | ViewModel
```
public class RecyclerViewModel {
public View.OnTouchListener onTouchListener;
public void setOnTouchListener( View.OnTouchListener onTouchListener) {
this.onTouchListener = onTouchListener;
}
}
```
DataBinding
```
@BindingAdapter("onTouchListener")
public static void set... | ViewModel
```
private var tapTime: Long = 0
fun onTouchListener(view:View, event: MotionEvent): Boolean {
when (event.action) {
MotionEvent.ACTION_DOWN -> {
tapTime = Date().time
// more commands for touch down event
}
MotionEvent.ACTION_UP -> {
if (Date().time - tap... |
24,735 | Condoms don't give 100% protection and can break, that's a known fact.
I would like to know, are there any ways/hacks to check a single condom (before using it) and see if it might be defective and break while using it? Anything that can prevent such an "accident" before it happens (i.e. if there will be a chance for ... | 2021/05/03 | ['https://lifehacks.stackexchange.com/questions/24735', 'https://lifehacks.stackexchange.com', 'https://lifehacks.stackexchange.com/users/1399/'] | You should not attempt to test a condom yourself. (See other post.)
The “test” is circumstantial:
All condoms1 are tested at the manufacturer’s, individually, before packaging. This is certified on the packaging and guaranteed for a certain time, provided correct storage conditions etc. are maintained. Your assessmen... | The standard way to check the integrity of a condom is to inflate it and wait as long as you can stand it a while to see if it deflates.
**EDIT**: According to Rick Sowadsky, MSPH at [TheBody.com](https://www.thebody.com/article/testing-condoms-holes), you must **NOT** attempt to test a condom for holes before or afte... |
28,390,611 | I am trying to use Selenium in Java to get the user's geographical coordinates, but using IP address isn't accurate enough, so i wanted to use this website <http://www.whataremycoordinates.com/> , but it isn't working, and I am guessing it is because you have to allow location use, so is there anyway I can allow locati... | 2015/02/08 | ['https://Stackoverflow.com/questions/28390611', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4542233/'] | Usually, when a site wants to get this kind of data, a browser asks you if you want to share your location. The question is inside a popup which *cannot be controlled* with `selenium`. In this case, you need to tell the browser, not to open the popup and allow to share your location at the same time so that the popup w... | you can inject firefox profile at the time of creating driver
selenium 3 I am using if you are using selenium 2 no need for firefoxOptions you can directly pass the profile into driver.
lat-log-json:[How to enable geolocation permissions for a website in firefox profile using selenium webdriver](https://stackoverflow... |
13,043,111 | I am new to Swing, UI and MVC
I have created a code based on MVC. Now my problem is that that in the controller part i have an actioneventlistener which listens to different button clicks. Out of all those buttons i have "select all" and "de-select all". In my view i have a table, one of the column of that table contai... | 2012/10/24 | ['https://Stackoverflow.com/questions/13043111', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1010943/'] | It looks like the issue is related to the way you recreate the table once the button is clicked. You are creating a new table and adding it to a content pane. However the old controls also remain there. If you add:
```
getContentPane().removeAll();
```
Before calling:
```
setContentPane(this.createContentPane());... | adding `revalidate()` in `PopulateAndShow` may help
```
setSize(480, 580);
setResizable(false);
setVisible(true);
revalidate();
``` |
16,817,377 | I have passed a value from one page to another in array. I can extract first two vars by explode but I can't get the third value which is formed in an array out.
This is my array:
```
$user_rate=$_POST['user_rate'];//15000|ss|Array
list($total,$promo,$rate)=explode("|",$user_rate);
```
So I get:
```
$total=15000;
... | 2013/05/29 | ['https://Stackoverflow.com/questions/16817377', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1620626/'] | this probably be a wrong `$user_rate=$_POST['user_rate'];//15000|ss|Array`
you can use `serialize / unserialize` for array | You could `serialize` your array parameters before you pass it. Then `unserialize` them on the 2nd page.
```
$rate = serialize($rate);
```
On your 2nd page before you run it through the loop:
```
$rate = unserialize($rate);
``` |
16,817,377 | I have passed a value from one page to another in array. I can extract first two vars by explode but I can't get the third value which is formed in an array out.
This is my array:
```
$user_rate=$_POST['user_rate'];//15000|ss|Array
list($total,$promo,$rate)=explode("|",$user_rate);
```
So I get:
```
$total=15000;
... | 2013/05/29 | ['https://Stackoverflow.com/questions/16817377', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1620626/'] | You could `serialize` your array parameters before you pass it. Then `unserialize` them on the 2nd page.
```
$rate = serialize($rate);
```
On your 2nd page before you run it through the loop:
```
$rate = unserialize($rate);
``` | Hi i think that i understand you probleme, when you passe and array from as string try to "serialize" it and "unserialize" it in the other page, for exemple :
```
$array = serialize(array('toto', 'titi', array('coco', 'cici')));
```
will give you somthing like this
`a:3:{i:0;s:4:"toto";i:1;s:4:"titi";i:2;a:2:{i:0;s... |
16,817,377 | I have passed a value from one page to another in array. I can extract first two vars by explode but I can't get the third value which is formed in an array out.
This is my array:
```
$user_rate=$_POST['user_rate'];//15000|ss|Array
list($total,$promo,$rate)=explode("|",$user_rate);
```
So I get:
```
$total=15000;
... | 2013/05/29 | ['https://Stackoverflow.com/questions/16817377', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1620626/'] | this probably be a wrong `$user_rate=$_POST['user_rate'];//15000|ss|Array`
you can use `serialize / unserialize` for array | ok, many answers and no luck... i'll try it again:
you have an array $rate before you submit your form:
```
foreach($rate as $val){
echo "$val<br>";
}
```
and you want to add $ss\_total and the string "ss" and submit it
so you need to:
```
$newarray = array('rate'=>$rate, 'type'=>'ss', 'ss_total'=>$ss_total);
... |
16,817,377 | I have passed a value from one page to another in array. I can extract first two vars by explode but I can't get the third value which is formed in an array out.
This is my array:
```
$user_rate=$_POST['user_rate'];//15000|ss|Array
list($total,$promo,$rate)=explode("|",$user_rate);
```
So I get:
```
$total=15000;
... | 2013/05/29 | ['https://Stackoverflow.com/questions/16817377', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1620626/'] | ok, many answers and no luck... i'll try it again:
you have an array $rate before you submit your form:
```
foreach($rate as $val){
echo "$val<br>";
}
```
and you want to add $ss\_total and the string "ss" and submit it
so you need to:
```
$newarray = array('rate'=>$rate, 'type'=>'ss', 'ss_total'=>$ss_total);
... | Hi i think that i understand you probleme, when you passe and array from as string try to "serialize" it and "unserialize" it in the other page, for exemple :
```
$array = serialize(array('toto', 'titi', array('coco', 'cici')));
```
will give you somthing like this
`a:3:{i:0;s:4:"toto";i:1;s:4:"titi";i:2;a:2:{i:0;s... |
16,817,377 | I have passed a value from one page to another in array. I can extract first two vars by explode but I can't get the third value which is formed in an array out.
This is my array:
```
$user_rate=$_POST['user_rate'];//15000|ss|Array
list($total,$promo,$rate)=explode("|",$user_rate);
```
So I get:
```
$total=15000;
... | 2013/05/29 | ['https://Stackoverflow.com/questions/16817377', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1620626/'] | this probably be a wrong `$user_rate=$_POST['user_rate'];//15000|ss|Array`
you can use `serialize / unserialize` for array | Hi i think that i understand you probleme, when you passe and array from as string try to "serialize" it and "unserialize" it in the other page, for exemple :
```
$array = serialize(array('toto', 'titi', array('coco', 'cici')));
```
will give you somthing like this
`a:3:{i:0;s:4:"toto";i:1;s:4:"titi";i:2;a:2:{i:0;s... |
16,817,377 | I have passed a value from one page to another in array. I can extract first two vars by explode but I can't get the third value which is formed in an array out.
This is my array:
```
$user_rate=$_POST['user_rate'];//15000|ss|Array
list($total,$promo,$rate)=explode("|",$user_rate);
```
So I get:
```
$total=15000;
... | 2013/05/29 | ['https://Stackoverflow.com/questions/16817377', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1620626/'] | this probably be a wrong `$user_rate=$_POST['user_rate'];//15000|ss|Array`
you can use `serialize / unserialize` for array | you can encode the values on the page as
```
implode("|", array($total, $promo, implode(",",$rate));
```
Then decode it with
```
list($total, $promo, $rates) = explode("|", $_POST["user_rate"]);
$rates = explode(",", $rates);
``` |
16,817,377 | I have passed a value from one page to another in array. I can extract first two vars by explode but I can't get the third value which is formed in an array out.
This is my array:
```
$user_rate=$_POST['user_rate'];//15000|ss|Array
list($total,$promo,$rate)=explode("|",$user_rate);
```
So I get:
```
$total=15000;
... | 2013/05/29 | ['https://Stackoverflow.com/questions/16817377', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1620626/'] | this probably be a wrong `$user_rate=$_POST['user_rate'];//15000|ss|Array`
you can use `serialize / unserialize` for array | Using serialize is definitely the key to getting this to work, but base64\_encode() is the **ideal** way to make it less obfuscated. When you only use serialize, then you get semicolons, commas, double quotes, single quotes, and several other characters that could cause problems when you pass them through to your scrip... |
16,817,377 | I have passed a value from one page to another in array. I can extract first two vars by explode but I can't get the third value which is formed in an array out.
This is my array:
```
$user_rate=$_POST['user_rate'];//15000|ss|Array
list($total,$promo,$rate)=explode("|",$user_rate);
```
So I get:
```
$total=15000;
... | 2013/05/29 | ['https://Stackoverflow.com/questions/16817377', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1620626/'] | you can encode the values on the page as
```
implode("|", array($total, $promo, implode(",",$rate));
```
Then decode it with
```
list($total, $promo, $rates) = explode("|", $_POST["user_rate"]);
$rates = explode(",", $rates);
``` | Hi i think that i understand you probleme, when you passe and array from as string try to "serialize" it and "unserialize" it in the other page, for exemple :
```
$array = serialize(array('toto', 'titi', array('coco', 'cici')));
```
will give you somthing like this
`a:3:{i:0;s:4:"toto";i:1;s:4:"titi";i:2;a:2:{i:0;s... |
16,817,377 | I have passed a value from one page to another in array. I can extract first two vars by explode but I can't get the third value which is formed in an array out.
This is my array:
```
$user_rate=$_POST['user_rate'];//15000|ss|Array
list($total,$promo,$rate)=explode("|",$user_rate);
```
So I get:
```
$total=15000;
... | 2013/05/29 | ['https://Stackoverflow.com/questions/16817377', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1620626/'] | Using serialize is definitely the key to getting this to work, but base64\_encode() is the **ideal** way to make it less obfuscated. When you only use serialize, then you get semicolons, commas, double quotes, single quotes, and several other characters that could cause problems when you pass them through to your scrip... | Hi i think that i understand you probleme, when you passe and array from as string try to "serialize" it and "unserialize" it in the other page, for exemple :
```
$array = serialize(array('toto', 'titi', array('coco', 'cici')));
```
will give you somthing like this
`a:3:{i:0;s:4:"toto";i:1;s:4:"titi";i:2;a:2:{i:0;s... |
12,714,602 | I am new to class templates and am having trouble. I have a function that doesn't declare (ie. to be an int, double etc). But it doesn't make sense to declare in this function. Therefore I am getting errors. Thanks for the help.
I have the following function:
```
bool QueType<ItemType>::IsEmpty() const
// Returns tru... | 2012/10/03 | ['https://Stackoverflow.com/questions/12714602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1060794/'] | You need to put your database name after the MySQL port (:3306/DB\_name). Here's one of my connections:
```
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
public class MySQL{
static Connection connect;
public static void main(String[] args) th... | I hate to add a new post to something so old but I ran across the same issues with GoDaddy and their dbname.db.######.hostedresource.com implementation. Granted, I looked across a few Overflow posts and saw no mention of the direct IP method; hopefully I'm not breaking some GoDaddy code here.
Any who, the only way I w... |
12,714,602 | I am new to class templates and am having trouble. I have a function that doesn't declare (ie. to be an int, double etc). But it doesn't make sense to declare in this function. Therefore I am getting errors. Thanks for the help.
I have the following function:
```
bool QueType<ItemType>::IsEmpty() const
// Returns tru... | 2012/10/03 | ['https://Stackoverflow.com/questions/12714602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1060794/'] | If memory serves, GoDaddy has a couple of different MySQL DB implementations you can choose. One that allows for remote access, and one that does not. Are you sure that you have chosen the correct one?
Have you tried connecting remotely using MySQL Workbench first? Or even telnetting to the port? That will ensure you ... | I hate to add a new post to something so old but I ran across the same issues with GoDaddy and their dbname.db.######.hostedresource.com implementation. Granted, I looked across a few Overflow posts and saw no mention of the direct IP method; hopefully I'm not breaking some GoDaddy code here.
Any who, the only way I w... |
28,923,698 | I want the value in the input to filter the values in the dropdown, and ng-selected to be true for the option that has $index == 0.
When the filter takes action, the value in ng-selected changes to true and the selected property on the element does not change to selected="selected". If I remove the model, it works as ... | 2015/03/08 | ['https://Stackoverflow.com/questions/28923698', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4414626/'] | So the answer above is correct if not a little verbose. I would not recommend using a watch because I find it to be a little more troublesome. So basically here is what I came up with (feel free to ding me if I missed something but remember I am trying to help :-) [Plnkr](https://jsfiddle.net/partyk1d24/w6tt4esy/8/) **... | We can use the search model to as an argument to the filter to create a new array which is filtered. This array is used in ng-select. Any changes in the search model are watched and used to update the filtered array.
```
<div ng-app="myapp">
<div ng-controller="ctrlParent">
<input type="text" ng-model="sea... |
4,019,553 | Could you give a recommendation for differential geometry or curves and surfaces with lots of examples and calculations?
I need lots of examples to understand a topic therefore it would great if there are some book with good calculations. | 2021/02/09 | ['https://math.stackexchange.com/questions/4019553', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/740715/'] | Barrett O'Neill's Elementary Differential Geometry. A classic, you can't go wrong with this one..
[Download link](http://cfile4.uf.tistory.com/attach/141C9D474D800C58102354) | The ones I used and liked were:
Differential Geometry of Curves and Surfaces - Manfredo Do Carmo
Modern Differential Geometry of Curves and Surfaces with Mathematica - Alfred Gray |
4,019,553 | Could you give a recommendation for differential geometry or curves and surfaces with lots of examples and calculations?
I need lots of examples to understand a topic therefore it would great if there are some book with good calculations. | 2021/02/09 | ['https://math.stackexchange.com/questions/4019553', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/740715/'] | The ones I used and liked were:
Differential Geometry of Curves and Surfaces - Manfredo Do Carmo
Modern Differential Geometry of Curves and Surfaces with Mathematica - Alfred Gray | For the geometry of surfaces I recommend the book Differential Geometry of Curves and Surfaces by Manfredo Do Carmo, which is clear, self-contained and with a lot of examples and exercises.
If you want to go further and learn modern differential geometry (manifolds etc) an excellent book is An introduction to manifold... |
4,019,553 | Could you give a recommendation for differential geometry or curves and surfaces with lots of examples and calculations?
I need lots of examples to understand a topic therefore it would great if there are some book with good calculations. | 2021/02/09 | ['https://math.stackexchange.com/questions/4019553', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/740715/'] | Barrett O'Neill's Elementary Differential Geometry. A classic, you can't go wrong with this one..
[Download link](http://cfile4.uf.tistory.com/attach/141C9D474D800C58102354) | For the geometry of surfaces I recommend the book Differential Geometry of Curves and Surfaces by Manfredo Do Carmo, which is clear, self-contained and with a lot of examples and exercises.
If you want to go further and learn modern differential geometry (manifolds etc) an excellent book is An introduction to manifold... |
12,657,317 | Today I started observing some new kind of error which does not allow me to create a new Android application in Eclipse. It says "Update Tools", Your tools installation appears to be out of date. This wizard depends on templates distributed with the Android SDK Tools...."
I have android 2.2 API 8 which I thought is st... | 2012/09/29 | ['https://Stackoverflow.com/questions/12657317', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1494754/'] | best things to do that is recommended by google is to use the latest version of the sdk version.
set the targetSdkVersion to the latest one (currently it's 16) and also set it in the project.properties file . this will allow your app to be optimized for the newest android version and also allow you to use the latest c... | You can safely update your Android SDK tools and still support Android 2.2 (API 8). Once you download the SDK tools, you can choose for which platforms you want to develop, and there you can select API 8. Anything you develop for Android 2.2 will work for Android 4.1. |
12,657,317 | Today I started observing some new kind of error which does not allow me to create a new Android application in Eclipse. It says "Update Tools", Your tools installation appears to be out of date. This wizard depends on templates distributed with the Android SDK Tools...."
I have android 2.2 API 8 which I thought is st... | 2012/09/29 | ['https://Stackoverflow.com/questions/12657317', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1494754/'] | best things to do that is recommended by google is to use the latest version of the sdk version.
set the targetSdkVersion to the latest one (currently it's 16) and also set it in the project.properties file . this will allow your app to be optimized for the newest android version and also allow you to use the latest c... | * Right Click SDK Manager
* Select Run As Administrator
* Click the YES button |
47,405,426 | I am using the following formula to yield a 1 if a CS number exists in the cell, and a 0 if it does not. The nested formula works correctly.
The issue is with the outside IF function. What happens is that when it does not find a CS number, it yields `#VALUE!` in the cell. When that happens, I want the cell to say 1.
... | 2017/11/21 | ['https://Stackoverflow.com/questions/47405426', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5389099/'] | Ironically, *`#VALUE!` isn't a Value*, so you can't use a comparison function like `If` to deal with it as if it's a string.
Change your formula to:
```
=IFERROR(IF(ISERR(NUMBERVALUE(MID(K2,SEARCH("CS",K2)+M39,1))),MID(K2,SEARCH("CS",K2),9),MID(K2,SEARCH("CS",K2),10)),1)
```
...and it will return a `1` instead o... | Did you try
```
=IFERROR( your formula here, 1 )
```
Basically, it evaluates your formula as usual, but when *anything* in your formula returns an error, you will get an 1 in return.
Using this idea, you can wrap each part of your formula in an IFERROR to define the default value to return whenever it encounters on... |
51,296,572 | It seems that there are two ways to define a sealed class, which one is corret between Code A and CodeB ?
**Code A**
```
sealed class ExprA
data class Const(val number: Double) : ExprA()
data class Sum(val e1: ExprA, val e2: ExprA) : ExprA()
```
**Code B**
```
sealed class ExprB{
data class Const(val number: D... | 2018/07/12 | ['https://Stackoverflow.com/questions/51296572', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/828896/'] | <https://kotlinlang.org/docs/reference/sealed-classes.html>
>
> To declare a sealed class, you put the sealed modifier before the name of the class. A sealed class can have subclasses, but all of them must be declared in the same file as the sealed class itself. (Before Kotlin 1.1, the rules were even more strict: cl... | I can't say I've personally used the first way to write a sealed class so I'm not sure if that is syntactically correct. If it is, it would really be a preference of code style. From a maintenance perspective, I would personally prefer the second because it is easier to read and ensure what is encapsulated in that seal... |
15,127,388 | Hello Dear Stack Overflow friends! I've been trying to solve this problem for a couple of days with no success. I've read almost every post available here at Stack Overflow but I can't find out how to solve this.
When I share a link on Facebook, the thumbnail corresponds to the image I defined in the
meta property="... | 2013/02/28 | ['https://Stackoverflow.com/questions/15127388', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2118014/'] | I just found that code in my production.log
```
GET "/assets/&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["
```
Rails 3.2.13 dealt with it with `Completed 406 Not Acceptable` | I found the same in my logs but in november 2012:
`ActionController::RoutingError (No route matches [GET] "/assets/&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["):` |
38,007,738 | I have an encoding program which allows the user to enter some text and a password to send messages securely.
However, when I try to run the following code, JQuery does not work properly:
```
text = CryptoJS.AES.encrypt(text, pass);
$("#encodedText").html(text);
```
```html
<!DOCTYPE html>
<html>
<head>
<script... | 2016/06/24 | ['https://Stackoverflow.com/questions/38007738', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/'] | A lot of it depends on how you gathered the data. Often ratings that seem explicit can actually be implicit. For instance, assume you give the option of allowing users to rate items that they have purchased / used before. This means that the very fact that they have spent their time evaluating that particular item mean... | The explict data (like ratings) normally comes with bias - people go and rate a product because they like it! Think about your experience shopping and then rating on Amazon.com :-)
On the contrary, implict info often can truly reflect user's favor on a product, like viewing duration, comment length, etc. Even a like/d... |
1,017,598 | I have a need for a "run once" query (so performance isn't that critical) using tables similar to these (simplified versions of the actual):
```
CREATE TABLE #Items
( ItemPK int not null primary key
,ItemDescription varchar(25) not null
)
INSERT INTO #Items VALUES (1,'rock')
I... | 2009/06/19 | ['https://Stackoverflow.com/questions/1017598', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/65223/'] | The various options for aggregate string concatention in SQL Server were summed up by Anith Sen in this post: <http://www.simple-talk.com/sql/t-sql-programming/concatenating-row-values-in-transact-sql/>
Usually the best option is the XML PATH trick. | you could write a scalar value function that would contain a subquery in which it would perform the concatenation, or you could try coalesce, [example here](http://www.sqlteam.com/article/using-coalesce-to-build-comma-delimited-string) |
1,017,598 | I have a need for a "run once" query (so performance isn't that critical) using tables similar to these (simplified versions of the actual):
```
CREATE TABLE #Items
( ItemPK int not null primary key
,ItemDescription varchar(25) not null
)
INSERT INTO #Items VALUES (1,'rock')
I... | 2009/06/19 | ['https://Stackoverflow.com/questions/1017598', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/65223/'] | Using XML trick, this should do it:
```
SELECT i.ItemDescription,
(SELECT x.ItemTypeDescription + ': ' + x.vals +
CASE WHEN (ROW_NUMBER() OVER (ORDER BY x.ItemType DESC) = 1) THEN '' ELSE '; ' END
FROM ( SELECT DISTINCT
ii.ItemPK,
... | The various options for aggregate string concatention in SQL Server were summed up by Anith Sen in this post: <http://www.simple-talk.com/sql/t-sql-programming/concatenating-row-values-in-transact-sql/>
Usually the best option is the XML PATH trick. |
1,017,598 | I have a need for a "run once" query (so performance isn't that critical) using tables similar to these (simplified versions of the actual):
```
CREATE TABLE #Items
( ItemPK int not null primary key
,ItemDescription varchar(25) not null
)
INSERT INTO #Items VALUES (1,'rock')
I... | 2009/06/19 | ['https://Stackoverflow.com/questions/1017598', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/65223/'] | Using XML trick, this should do it:
```
SELECT i.ItemDescription,
(SELECT x.ItemTypeDescription + ': ' + x.vals +
CASE WHEN (ROW_NUMBER() OVER (ORDER BY x.ItemType DESC) = 1) THEN '' ELSE '; ' END
FROM ( SELECT DISTINCT
ii.ItemPK,
... | you could write a scalar value function that would contain a subquery in which it would perform the concatenation, or you could try coalesce, [example here](http://www.sqlteam.com/article/using-coalesce-to-build-comma-delimited-string) |
1,746,762 | I'm trying to create a cron job that will send a weekly newsletter. I tried creating a shell task following what [Cakephp manual](http://book.cakephp.org/view/110/Creating-Shells-Tasks) says. Then I go to the Media Temple Cron jobs and type in the following:
`php /home/#####/domains/domain.com/html/cake/console/cake -... | 2009/11/17 | ['https://Stackoverflow.com/questions/1746762', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/193482/'] | You can try to `var_dump(ROOT)` or any one of the other [Core Definition Constants](http://book.cakephp.org/view/122/Core-Definition-Constants) to find your directory. Just put it in a controller method somewhere, but make sure to remove it again. Or, if you have SSH access, do `pwd` on the command line.
Other than th... | ```
ls -l /home/#####/domains/domain.com/html/cake/console/cake
```
says what? does the cron job run as user #####? if not, the problem is probably permissions on /home/#####/, check them with
```
ls -ld /home/#####/
``` |
1,746,762 | I'm trying to create a cron job that will send a weekly newsletter. I tried creating a shell task following what [Cakephp manual](http://book.cakephp.org/view/110/Creating-Shells-Tasks) says. Then I go to the Media Temple Cron jobs and type in the following:
`php /home/#####/domains/domain.com/html/cake/console/cake -... | 2009/11/17 | ['https://Stackoverflow.com/questions/1746762', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/193482/'] | You can try to `var_dump(ROOT)` or any one of the other [Core Definition Constants](http://book.cakephp.org/view/122/Core-Definition-Constants) to find your directory. Just put it in a controller method somewhere, but make sure to remove it again. Or, if you have SSH access, do `pwd` on the command line.
Other than th... | Have you given the "cake" file in "cake/console" directory executable permissions as well as cake.php and cake.bat?
The cron command should be:
php /home/#####/domains/domain.com/html/cake/console/cake newsletter -app /home/#####/domains/domain.com/html/app |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | Try this friend:
in your JS
```js
$(function() {
$( "#from" ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
onClose: function( selectedDate ) {
$( "#to" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#to"... | Try putting the contents of the JQuery UI Dialog into an IFrame. That might help you get around some of your issues.
```
\---/\---/\---/_______________
/ /
\ ####IFRAME###### \
\ # # \
/ #DATEPICKER1 # /
\ # # \
/ #DATEPIC... |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | **UPDATE:**
It looks like the behavior described below was addressed in another stackoverflow question here:
[Prevent jQuery UI dialog from setting focus to first textbox](https://stackoverflow.com/questions/1202079/prevent-jquery-ui-dialog-from-setting-focus-to-first-textbox)
Apologies for the "duplicate" question... | Just to preface, I am a backend database programmer so know little about JavaScript so looked to find this post with the exact same question. Gleaning from what I read above and comparing to my existing code, I modified my JavaScript so that it works and thought I would share it.
The only caveat was that my existing f... |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | **UPDATE:**
It looks like the behavior described below was addressed in another stackoverflow question here:
[Prevent jQuery UI dialog from setting focus to first textbox](https://stackoverflow.com/questions/1202079/prevent-jquery-ui-dialog-from-setting-focus-to-first-textbox)
Apologies for the "duplicate" question... | This is a total shot in the dark but have you tried initialising each one seperately? Something like the following
```
$(function() {
$('.datepicker').each(function(){
$(this).datepicker();
});
});
```
It's probably what the others have mentioned and you are encountering some form of interference wit... |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | On your example both datepickers have different id's and name's, however, the problem you describe is exactly what'll happen if you use the same name for both.
Does your actual code use different id and name for both datepickers? | **EXPLANATION of issue**
I have the same issue and its very disappointing.
I searched through the source code of jquery and found this:
```
if ( $.ui.dialog.overlayInstances ) {
this._on( this.document, {
focusin: function( event ) {
if ( !$( event.target ).closest(".ui-dialog").length ) {
... |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | On your example both datepickers have different id's and name's, however, the problem you describe is exactly what'll happen if you use the same name for both.
Does your actual code use different id and name for both datepickers? | in a js archive:
```
$("#fecha_1").datepicker({
dateFormat: "dd/mm/yy",
dayNames: "Domingo Lunes Martes Miercoles Jueves Viernes Sabado".split(" "),
dayNamesMin: "Do Lu Ma Mi Ju Vi Sa".split(" "),
dayNamesShort: "Do Lu Ma Mi Ju Vi Sa".split(" "),
monthNames: "Enero Febrero Marzo Abril Mayo Junio J... |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | Try this friend:
in your JS
```js
$(function() {
$( "#from" ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
onClose: function( selectedDate ) {
$( "#to" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#to"... | Just to preface, I am a backend database programmer so know little about JavaScript so looked to find this post with the exact same question. Gleaning from what I read above and comparing to my existing code, I modified my JavaScript so that it works and thought I would share it.
The only caveat was that my existing f... |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | On your example both datepickers have different id's and name's, however, the problem you describe is exactly what'll happen if you use the same name for both.
Does your actual code use different id and name for both datepickers? | Just to preface, I am a backend database programmer so know little about JavaScript so looked to find this post with the exact same question. Gleaning from what I read above and comparing to my existing code, I modified my JavaScript so that it works and thought I would share it.
The only caveat was that my existing f... |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | Case 1:
@antony's comment(including jsfiddle link below the question) works as of
version `jquery-1.9.1` and `1.9.2/jquery-ui.js`
Case 2:
OP's case where datepicker1 works well but choosing datepicker2 will open datepicker1
version: `jQuery v1.9.0` and `jQueryui v1.10.0`
Case 3:
My case where choosing ... | Just to preface, I am a backend database programmer so know little about JavaScript so looked to find this post with the exact same question. Gleaning from what I read above and comparing to my existing code, I modified my JavaScript so that it works and thought I would share it.
The only caveat was that my existing f... |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | Try putting the contents of the JQuery UI Dialog into an IFrame. That might help you get around some of your issues.
```
\---/\---/\---/_______________
/ /
\ ####IFRAME###### \
\ # # \
/ #DATEPICKER1 # /
\ # # \
/ #DATEPIC... | in a js archive:
```
$("#fecha_1").datepicker({
dateFormat: "dd/mm/yy",
dayNames: "Domingo Lunes Martes Miercoles Jueves Viernes Sabado".split(" "),
dayNamesMin: "Do Lu Ma Mi Ju Vi Sa".split(" "),
dayNamesShort: "Do Lu Ma Mi Ju Vi Sa".split(" "),
monthNames: "Enero Febrero Marzo Abril Mayo Junio J... |
16,169,654 | So here is the setup:
I have two jquery datepickers, inside a jquery tab, inside a jquery modal dialog window:
```
\---/\---/\---/_______________
/ /
\ \
/ DATEPICKER1 /
\ \
/ DATEPICKER2 /
\ ... | 2013/04/23 | ['https://Stackoverflow.com/questions/16169654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2311268/'] | Try this friend:
in your JS
```js
$(function() {
$( "#from" ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
onClose: function( selectedDate ) {
$( "#to" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#to"... | Case 1:
@antony's comment(including jsfiddle link below the question) works as of
version `jquery-1.9.1` and `1.9.2/jquery-ui.js`
Case 2:
OP's case where datepicker1 works well but choosing datepicker2 will open datepicker1
version: `jQuery v1.9.0` and `jQueryui v1.10.0`
Case 3:
My case where choosing ... |
49,820,228 | I'm currently creating a program that can compute near-dupliate score within a corpus of text documents (+5000 docs).
I'm using Simhash to generate a uniq footprint of a document (thanks to this [github repo](https://github.com/memosstilvi/simhash))
my datas are :
```
data = {
1: u'Im testing simhash algorithm.',... | 2018/04/13 | ['https://Stackoverflow.com/questions/49820228', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2947435/'] | Before I answer your question, it is important to keep in mind:
1. Simhash is useful as it detects near duplicates. This means that near duplicates will end up with the same hash.
2. For exact duplicates you can simply use any one way, consistent hashing mechanism (ex. md5)
3. The examples that you pasted here are too... | Further to Memos' answer, if you want to detect >=70% similarity, you cannot use simhash. Simhash only allows quite small hamming distances to be detected, up to around 6 or 7 bits difference, at a stretch, depending on the size of your corpus. For 70% similarity you'd have to allow 19 bits difference, which is not pos... |
2,169 | What (if any) are the differences between [The Standard for Software Component Testing](http://www.testingstandards.co.uk/Component%20Testing.pdf) (from the British Computing Society SIGIST and available for free) and BS 7925-2 (which is available to purchase for £170)? | 2011/11/26 | ['https://sqa.stackexchange.com/questions/2169', 'https://sqa.stackexchange.com', 'https://sqa.stackexchange.com/users/1656/'] | The first document appears to be the last draft version of the published (expensive) version - in fact, this page states that and appears (to my reading) to be recommending that you use the draft: <http://www.testingstandards.co.uk/bs_7925-2.htm>
What reasons do you have for using either standard at all?
Neither wi... | You probably better spend 164 CHF and purchase the draft ISO 29119 parts 2 & 3 (parts 1 & 4 are still not for sale), it is partially based on BS 7925-2 and might replace it in the future.
I'm reading it now, and it seems they did a good job with it, it gives you the right foundation but leaves a lot of context to be ad... |
24,556,316 | I'm having a problem regarding comparing two dates. I know this sound kinda silly but I want you all to try this example.
```
$a = date('d-m-Y', strtotime('2014-07-03'));
$b = date('d-m-Y', strtotime('2014-03-17'));
$c = date('d-m-Y', strtotime('2015-03-16'));
if(($a > $b) && ($a < $c) ) {
echo "1";
}
else {
... | 2014/07/03 | ['https://Stackoverflow.com/questions/24556316', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3802062/'] | Your "logic" is wrong.

> [xkcd](http://xkcd.com/1179/)
```
$a = '2014-07-03';
$b = '2014-03-17';
$c = '2015-03-16';
if(($a > $b) && ($a < $c)) {
echo "1"; // it works!
}
```
Big-endian formats are awesome. | After your date/strtotime function, you have :
```
$a = '03-07-2014'
$b = '17-03-2014'
$c = '16-03-2015'
```
So when you compare, $a is less than $b because it compares the day first. |
24,556,316 | I'm having a problem regarding comparing two dates. I know this sound kinda silly but I want you all to try this example.
```
$a = date('d-m-Y', strtotime('2014-07-03'));
$b = date('d-m-Y', strtotime('2014-03-17'));
$c = date('d-m-Y', strtotime('2015-03-16'));
if(($a > $b) && ($a < $c) ) {
echo "1";
}
else {
... | 2014/07/03 | ['https://Stackoverflow.com/questions/24556316', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3802062/'] | Your "logic" is wrong.

> [xkcd](http://xkcd.com/1179/)
```
$a = '2014-07-03';
$b = '2014-03-17';
$c = '2015-03-16';
if(($a > $b) && ($a < $c)) {
echo "1"; // it works!
}
```
Big-endian formats are awesome. | Because your date format is *not* good for comparing. Always use YYYY-MM-DD format when comparing dates (or use DateTime() objects). This is because 04-01-2014 is less than 05-01-2014 when compared as strings.
```
$a = '2014-07-03';
$b = '2014-03-17';
$c = '2015-03-16';
if(($a > $b) && ($a < $c) ) {
echo "1"... |
24,556,316 | I'm having a problem regarding comparing two dates. I know this sound kinda silly but I want you all to try this example.
```
$a = date('d-m-Y', strtotime('2014-07-03'));
$b = date('d-m-Y', strtotime('2014-03-17'));
$c = date('d-m-Y', strtotime('2015-03-16'));
if(($a > $b) && ($a < $c) ) {
echo "1";
}
else {
... | 2014/07/03 | ['https://Stackoverflow.com/questions/24556316', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3802062/'] | Because your date format is *not* good for comparing. Always use YYYY-MM-DD format when comparing dates (or use DateTime() objects). This is because 04-01-2014 is less than 05-01-2014 when compared as strings.
```
$a = '2014-07-03';
$b = '2014-03-17';
$c = '2015-03-16';
if(($a > $b) && ($a < $c) ) {
echo "1"... | After your date/strtotime function, you have :
```
$a = '03-07-2014'
$b = '17-03-2014'
$c = '16-03-2015'
```
So when you compare, $a is less than $b because it compares the day first. |
46,163,665 | I want to run a function inside evaluate(), I'm passing it as an argument, but I'm getting **'func is not a function'**, what am I missing?
Puppeteer version: 10.2
Platform / OS version: Windows 10, Node 8.2.1
```
var func = function() {
console.log("xxxxx");
};
var response = await page.evaluate( (func) => {
... | 2017/09/11 | ['https://Stackoverflow.com/questions/46163665', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6391788/'] | You can use [`page.exposeFunction(name, puppeteerFunction)`](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageexposefunctionname-puppeteerfunction):
```
await page.exposeFunction("add", (a, b) => a + b);
const response = await page.evaluate(() => {
return window.add(2, 2);
});
``` | If I understand it correctly, puppeteer has to marshal the code in your evaluate function ultimately as a string and inject it into to page context. You can't pass function references or anything non-serializable across that boundary. |
12,423,218 | I have a problem on postgresql which I think there is a bug in the postgresql, I wrongly implement something.
There is a table including `colmn1(primary key)`, `colmn2(unique)`, `colmn3`, ...
After an insertion of a row, if I try another insertion with an existing `colmn2` value I am getting a duplicate value error ... | 2012/09/14 | ['https://Stackoverflow.com/questions/12423218', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1021294/'] | See the [PostgreSQL sequence FAQ](http://www.neilconway.org/docs/sequences/):
>
> Sequences are intended for generating unique identifiers — not
> necessarily identifiers that are strictly sequential. If two
> concurrent database clients both attempt to get a value from a
> sequence (using nextval()), each client ... | From the [manual](http://www.postgresql.org/docs/current/static/functions-sequence.html):
>
> Important: Because sequences are non-transactional, changes made by
> setval are not undone if the transaction rolls back.
>
>
>
In other words, it's normal to have gaps. If you don't want gaps, don't use a sequence. |
46,675,296 | I want to make my react web app full screen after user go to specific web page (no address bar, no navigation bar, only display the web page). I tried many modules online, but they didn't work. Is there a good solution for this problem? | 2017/10/10 | ['https://Stackoverflow.com/questions/46675296', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8162459/'] | You can try to use Javascript Fullscreen API. For example:
```
document.documentElement.webkitRequestFullscreen()
``` | One way is to just select the container that you want to place the app within. For example, say you want to keep all the styles from the parent application, you could target the body in your ReactDOM render.
```
ReactDOM.render(
<ActiveWidgetArea widgets={yourData}/>,
document.querySelector('body')
);
```
I trie... |
46,675,296 | I want to make my react web app full screen after user go to specific web page (no address bar, no navigation bar, only display the web page). I tried many modules online, but they didn't work. Is there a good solution for this problem? | 2017/10/10 | ['https://Stackoverflow.com/questions/46675296', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8162459/'] | You can try to use Javascript Fullscreen API. For example:
```
document.documentElement.webkitRequestFullscreen()
``` | This is my approach:
```
const toggleFullSceen = (): void => {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen();
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
}
}
};
<button onClick={() => toggleFullSceen()}>
Toggle ful... |
45,317,517 | I have installed Heroku CLI and git. After installation, I restarted the command prompt. When I run git commands, those are recognized fine. But when I type Heroku commands such as `heroku version`, they are not recognized.
So I set the path variable to point to the Heroku installation. Now, Heroku commands are workin... | 2017/07/26 | ['https://Stackoverflow.com/questions/45317517', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6299496/'] | >
>
> ```
> set path="C:\Program Files\Heroku\bin"
>
> ```
>
>
By doing that, you *replaced* your PATH variable to *only* contain that path. So you essentially broke everything else.
What you usually do is append or prepend the new path to the PATH variable, e.g. like this:
```
set PATH=%PATH%;C:\Program Files\... | 1. Just close the vs code, command prompt and all the browser.
2. And restart your pc. Then open your cmd,
3. go the project file and writr "heroku login"
it will work |
1 | So I'm in the UK, but I do home improvement too. But, over here, building codes are different, you'd not want to mess around with our 230V power, and even simple things like paint are quite different.
On the other hand the basics of how buildings are constructed are the same - despite the language differences, wall-bo... | 2010/07/21 | ['https://diy.meta.stackexchange.com/questions/1', 'https://diy.meta.stackexchange.com', 'https://diy.meta.stackexchange.com/users/17/'] | If it is an item that is specific to your area, you could tag it with a UK/Canada/USA/Country tag. | This problem is universal. I'm a member of a dutch diy forum. And we sometimes get questions from people from Belgium (similar language different regulations) which require different answers if regulations are part of the solution.
A possible solution would be to introduce country tags (possibly with a country flag/sy... |
1 | So I'm in the UK, but I do home improvement too. But, over here, building codes are different, you'd not want to mess around with our 230V power, and even simple things like paint are quite different.
On the other hand the basics of how buildings are constructed are the same - despite the language differences, wall-bo... | 2010/07/21 | ['https://diy.meta.stackexchange.com/questions/1', 'https://diy.meta.stackexchange.com', 'https://diy.meta.stackexchange.com/users/17/'] | Not only are building codes different, but so is terminology (drywall vs plaster board etc), so there will need to be a glossary / dictionary maintained so that people can 'translate' terms... | This problem is universal. I'm a member of a dutch diy forum. And we sometimes get questions from people from Belgium (similar language different regulations) which require different answers if regulations are part of the solution.
A possible solution would be to introduce country tags (possibly with a country flag/sy... |
1 | So I'm in the UK, but I do home improvement too. But, over here, building codes are different, you'd not want to mess around with our 230V power, and even simple things like paint are quite different.
On the other hand the basics of how buildings are constructed are the same - despite the language differences, wall-bo... | 2010/07/21 | ['https://diy.meta.stackexchange.com/questions/1', 'https://diy.meta.stackexchange.com', 'https://diy.meta.stackexchange.com/users/17/'] | Maybe have a tag called "location-specific" so people know right off the bat. If we just had a tag for the region, we could have SO many tags by state / city / country / continent showing up and that would be a nightmare. | This problem is universal. I'm a member of a dutch diy forum. And we sometimes get questions from people from Belgium (similar language different regulations) which require different answers if regulations are part of the solution.
A possible solution would be to introduce country tags (possibly with a country flag/sy... |
1 | So I'm in the UK, but I do home improvement too. But, over here, building codes are different, you'd not want to mess around with our 230V power, and even simple things like paint are quite different.
On the other hand the basics of how buildings are constructed are the same - despite the language differences, wall-bo... | 2010/07/21 | ['https://diy.meta.stackexchange.com/questions/1', 'https://diy.meta.stackexchange.com', 'https://diy.meta.stackexchange.com/users/17/'] | Let's try to be as regionally agnostic as possible. Where regulations may apply (construction permits, electrical codes etc), one should mention that, but no one should feel obligated to specify specific requirements for various regions.
Perhaps the best way to handle this would be to have a series of Community Wiki q... | This problem is universal. I'm a member of a dutch diy forum. And we sometimes get questions from people from Belgium (similar language different regulations) which require different answers if regulations are part of the solution.
A possible solution would be to introduce country tags (possibly with a country flag/sy... |
45,949,267 | Is there a reason why the same query executed a number of times have huge variance in response times? from 50% - 200% what the projected response time is? They range from 6 seconds to 20 seconds even though it is the only active query in the database.
Context:
1. Database on Postgres 9.6 on AWS RDS (with Provisioned ... | 2017/08/29 | ['https://Stackoverflow.com/questions/45949267', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8534637/'] | When you see something like this in PostgreSQL `EXPLAIN ANALYZE`:
```
(cost=2419.37..310549.65)
```
...it doesn't mean the cost is between 2419.37 and 310549.65. These are in fact two different measures. The first value is the startup cost, and the second value is the total cost. Most of the time you'll care only ab... | After investigation of the historical load, we have found out that the provisioned IOPS we originally configured had been exhausted during the last set of load tests performed on the environment.
According to Amazon's documentation @<http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html>, after this ... |
45,949,267 | Is there a reason why the same query executed a number of times have huge variance in response times? from 50% - 200% what the projected response time is? They range from 6 seconds to 20 seconds even though it is the only active query in the database.
Context:
1. Database on Postgres 9.6 on AWS RDS (with Provisioned ... | 2017/08/29 | ['https://Stackoverflow.com/questions/45949267', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8534637/'] | A query may be (and should be, excluding special cases) more predictable in response time when you are a sole user of the server. In the case of a cloud server, you do not know anything about the actual server load, even if your query is the only one performed on your database, because the server most likely supports m... | After investigation of the historical load, we have found out that the provisioned IOPS we originally configured had been exhausted during the last set of load tests performed on the environment.
According to Amazon's documentation @<http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html>, after this ... |
46,149,981 | I'm trying to implement a custom validator in JavaScript for my vb.net page. This validator should check if in a multichoice listbox there aren't any selected values, showing an error pop up if so.
The thing is, I want to do it client side, but in my 'validateFunction' function I only get the last selected (or unselec... | 2017/09/11 | ['https://Stackoverflow.com/questions/46149981', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7126334/'] | Your question is a bit unclear, and your function seems working, but what I will answer here is the last part of your question *So... Is there a straight forward way to get ALL the selected items from a multichoice listbox in javascript?*
Try this js function
```
<script type="text/javascript">
function valid... | ```
let a1 = [
{
Selected:false,
},
{
Selected:false
},
{
Selected:false
}];
```
if (a1.some(i => i.Selected))
console.log(true);
else
console.log(false);
Maybe what you want |
31,778,365 | So I am trying to read the words from a file. However, I have to use `putchar(ch)` where `ch` is an `int`. How do I convert ch to a string (char \*) so I can store it in a char \* variable and pass it to another function that takes char \* as a parameter. And I actually just want to store it but not print it.
This is ... | 2015/08/03 | ['https://Stackoverflow.com/questions/31778365', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4807625/'] | `sprintf(char_arr, "%d", an_integer);`
This makes `char_arr` equal to string representation of `an_integer`
(This doesn't print anything to console output in case you're wondering, this just 'stores' it)
An example:
```
char char_arr [100];
int num = 42;
sprintf(char_arr, "%d", num);
```
`char_arr` now is the strin... | So you have a single value of `char` type, aka `int8_t` (or `uint8_t` on some systems). You have it stored in an `int`, so `fgetc` can return `-1` for error, but still be able to return any 8bit character.
Single characters are just 8-bit integers, which you can store in any size of integer variable without problems. ... |
31,778,365 | So I am trying to read the words from a file. However, I have to use `putchar(ch)` where `ch` is an `int`. How do I convert ch to a string (char \*) so I can store it in a char \* variable and pass it to another function that takes char \* as a parameter. And I actually just want to store it but not print it.
This is ... | 2015/08/03 | ['https://Stackoverflow.com/questions/31778365', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4807625/'] | To represent a single character as a character string, I find using a simple 2-character buffer to be as easy as anything else. You can take advantage of the fact that dereferencing the string points to the first character and simply assign the character you wish to represent as a string. If you have initialized your 2... | So you have a single value of `char` type, aka `int8_t` (or `uint8_t` on some systems). You have it stored in an `int`, so `fgetc` can return `-1` for error, but still be able to return any 8bit character.
Single characters are just 8-bit integers, which you can store in any size of integer variable without problems. ... |
31,778,365 | So I am trying to read the words from a file. However, I have to use `putchar(ch)` where `ch` is an `int`. How do I convert ch to a string (char \*) so I can store it in a char \* variable and pass it to another function that takes char \* as a parameter. And I actually just want to store it but not print it.
This is ... | 2015/08/03 | ['https://Stackoverflow.com/questions/31778365', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4807625/'] | `sprintf(char_arr, "%d", an_integer);`
This makes `char_arr` equal to string representation of `an_integer`
(This doesn't print anything to console output in case you're wondering, this just 'stores' it)
An example:
```
char char_arr [100];
int num = 42;
sprintf(char_arr, "%d", num);
```
`char_arr` now is the strin... | To represent a single character as a character string, I find using a simple 2-character buffer to be as easy as anything else. You can take advantage of the fact that dereferencing the string points to the first character and simply assign the character you wish to represent as a string. If you have initialized your 2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.