text stringlengths 1 1.11k | source dict |
|---|---|
java
catch(InterruptedException t)
{
Thread.currentThread().interrupt();
}
System.exit(0);
}
if(host.isEmpty())
{
System.out.println("FILE_ERROR: Please ensure line \"host\" is a valid hostname." +
" File Locat... | {
"domain": "codereview.stackexchange",
"id": 12104,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java",
"url": null
} |
quantum-mechanics, electromagnetism, momentum, gauge
$$
x_0= x+\frac{mc}{eB}v_y \quad\text{and}\quad y_0 =y-\frac{m c}{eB}v_x.
$$
It is easy to verify manually from the equations of motion that these two quantities are conserved. Moreover, using this conservation property, their two definitions above can be easily rep... | {
"domain": "physics.stackexchange",
"id": 33819,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, electromagnetism, momentum, gauge",
"url": null
} |
javascript, performance, angular.js, ajax, pagination
How would you optimize this application, on the front end?
I don't see much that stands out as an obvious place to optimize, though I do notice that the promise callback to $http.get(url) has two calls to filterList() separated by three assignment lines:
$http.get... | {
"domain": "codereview.stackexchange",
"id": 32824,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, performance, angular.js, ajax, pagination",
"url": null
} |
Now, we can see distance of SSTF changing like 1,3,7,15,31,63,127,255,511,1023,2047
So, maximum cardinality will be 11.
and following are the track requests:
by Veteran (119k points)
edited
+1
Where have u used head can start at any track?
+2
yes, is that make any difference, if head positioned at 180 or to some ... | {
"domain": "gateoverflow.in",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.971129092218133,
"lm_q1q2_score": 0.8175213804751233,
"lm_q2_score": 0.8418256512199033,
"openwebmath_perplexity": 1440.5922632041552,
"openwebmath_score": 0.4586324989795685,
"tags"... |
semantics, operational-semantics, denotational-semantics
Axiomatic semantics ties the outcome of constructs to assertions. Basically boolean algebra (short-circuits in logical expressions, code branching (if-elif-else, switch-cases, etc). I think your examples show you do somehow understand the basic points of the sev... | {
"domain": "cs.stackexchange",
"id": 13541,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "semantics, operational-semantics, denotational-semantics",
"url": null
} |
python, performance, python-2.x, mathematics
if len(listcheck[i]) != 3:
listcheck.remove(listcheck[i])
# This if/elif is used to catch any lists that passed the two loops
# while having non-repeating numbers.
if 0 in dictofnos.values():
[setof0s.append(k) for k in dictofnos if d... | {
"domain": "codereview.stackexchange",
"id": 21080,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, python-2.x, mathematics",
"url": null
} |
homework-and-exercises
Also, when we derive the expression for centripetal force, we do not take components of Tension but of its weight, because it "sounds" meaningless.
Is it logical to take components of T? Look up the Catenary Curve properties and notice that the weight of the cable causes a reaction in both $x$ a... | {
"domain": "physics.stackexchange",
"id": 9619,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises",
"url": null
} |
machine-learning, linear-algebra, rnn
gate_inputs = math_ops.matmul(
array_ops.concat([inputs, state], 1), self._kernel)
gate_inputs = nn_ops.bias_add(gate_inputs, self._bias)
output = self._activation(gate_inputs)
return output, output
A single matrix multiplication is more efficient, so it's app... | {
"domain": "datascience.stackexchange",
"id": 2918,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, linear-algebra, rnn",
"url": null
} |
c#, wpf, timer, mvvm
In View's code behind I instantine ViewModel and set DataContext on it.
ViewModel
class ViewModel: INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
Model MyModel;
public ICommand Command
{ get; }
public string TimeString
{
get
... | {
"domain": "codereview.stackexchange",
"id": 22923,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, wpf, timer, mvvm",
"url": null
} |
I suspect we can use Chinese Remainder Theorem but I don't have a good intuition for how to use it yet.
• Your suspicion is correct - in fact we can use an operational form of CRT to reduce the computation to a single line of trivial mental arithmetic - see my answer. This is the easiest way to do problems like this. ... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676454700793,
"lm_q1q2_score": 0.8032229717753341,
"lm_q2_score": 0.8198933337131076,
"openwebmath_perplexity": 229.6562649012663,
"openwebmath_score": 0.8368672728538513,
"tag... |
r
The first few results.
> results[1:5, 1:5]
# A tibble: 5 x 5
C0023470_C00234~ C0023470_C00269~ C0023470_C00270~ C0023470_C01538~
<int> <int> <int> <int>
1 26837842 NA NA 30024784
2 NA NA ... | {
"domain": "bioinformatics.stackexchange",
"id": 1560,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "r",
"url": null
} |
pdf. In mathematics, an asymptotic expansion, asymptotic series or Poincaré expansion (after Henri Poincaré) is a formal series of functions which has the property that truncating the series after a finite number of terms provides an approximation to a given function as the argument of the function tends towards a part... | {
"domain": "kab-dinkelsbuehl.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9875683484150417,
"lm_q1q2_score": 0.8097007011054093,
"lm_q2_score": 0.8198933293122507,
"openwebmath_perplexity": 708.00095059523,
"openwebmath_score": 0.7279811501502991,
... |
laser
When modelocking a cavity, some nonlinearity (either 'passively' or 'actively' introduced) is required in order to establish a well defined phase relationship between each of the modes which is then reproduced each roundtrip, as is demonstrated by your nice graphic (i.e., the modes of the cavity are phase locked... | {
"domain": "physics.stackexchange",
"id": 29860,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "laser",
"url": null
} |
special-relativity, magnetic-fields, electrons
In short, what looks like a pure magnetic field or a pure electric field to one observer can look like a combination of the two to another observer in a different state of motion. | {
"domain": "physics.stackexchange",
"id": 39281,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, magnetic-fields, electrons",
"url": null
} |
c, parsing, floating-point
"1e-g",
"", "foobar", /* both 0 */
" e5", /* also 0 */
"-1e6",
/* overflow/underflow */
"1e500000",
"1e-500000",
"-1e500000",
"-1e-500000",
}; | {
"domain": "codereview.stackexchange",
"id": 24855,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c, parsing, floating-point",
"url": null
} |
• @Tyler: Yes, it’s correct, apart from the two extraneous commas in the third type. The unique permutation of type $1^3$ is the identity permutation, $(1)(2)(3)$. There are $3$ of type $1^12^1$: $(1)(23),(2)(13)$, and $(3)(12)$. And there are $2!=2$ of type $3^1$, $(123)$ and $(132)$. – Brian M. Scott Sep 10 '16 at 19... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676508127573,
"lm_q1q2_score": 0.8009512751661676,
"lm_q2_score": 0.8175744850834648,
"openwebmath_perplexity": 154.2405442347492,
"openwebmath_score": 0.8947088718414307,
"tag... |
ros-indigo
a and b will already be filled with zeros like this:
a = [0 0 0]
b = [0 0 0]
with the command push_back you'll add another three values:
a = [0 0 0 1 2 3]
b = [0 0 0 4 5 6]
but this values won't be used in the calculation on your server, since your loop only iterates over the first three elements.
So eith... | {
"domain": "robotics.stackexchange",
"id": 24824,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-indigo",
"url": null
} |
signal-analysis, wavelet, resolution
$\Delta f=\frac{1}{2\pi f_c \sqrt{f_b}}$
Because generally, the wavelet time and frequency resolution is define as:
$\Delta t=s \Delta t_\psi$ and $\Delta f= \frac {\Delta f_\psi}{s}$ (1)
where 's' is scale. it is also evident that the frequency and scale are related to each ... | {
"domain": "dsp.stackexchange",
"id": 1689,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "signal-analysis, wavelet, resolution",
"url": null
} |
thermodynamics, entropy
Entropy increasing is what causes spontaneous flow of energy though. And that is why when you put a warm object and a cold one together, the warm one transfers energy to the cold one until they reach equilibrium. That is the maximum entropy state.
Edit: To clarify your comment about the energy ... | {
"domain": "physics.stackexchange",
"id": 50226,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, entropy",
"url": null
} |
c#, task-parallel-library
return resultStringBuilder.ToString();
}
}
private static async Task<BingLocationQuery> GetBingLocationsAsync(string docLocation)
{
const string bingKey = "MySecretBingKey";
using (var client = new HttpClient())
{
... | {
"domain": "codereview.stackexchange",
"id": 30490,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, task-parallel-library",
"url": null
} |
ros, tutorials
Comment by jayess on 2017-08-31:
@jarvisschultz: Thanks for pointing out that the one that the OP posted is in the tutorial. There are actually two CMakeLists.txt which doesn't help clear the confusion. The one that I used is underneath the one that @hyuu used. I scrolled from the bottom up so I didn't ... | {
"domain": "robotics.stackexchange",
"id": 28734,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, tutorials",
"url": null
} |
java, performance, object-oriented, swing
Another performance issue that I noted is when a directory has a large amount of subdirectories in it and files it can take a while to open. An example in Windows would be C:\Program Files. This is because the method ComputerDirectoryTreeModel.listDirectories(File path) has to... | {
"domain": "codereview.stackexchange",
"id": 31117,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, object-oriented, swing",
"url": null
} |
homework-and-exercises, newtonian-mechanics, estimation
Title: How can I calculate whether a shelf is strong enough to support a falling cat? I'm building some shelves for my cat to climb on.
The highest position the cat will be is 2 meters above the next shelf.
The cat has a mass of 6.5kg. The shelf has a maximum lo... | {
"domain": "physics.stackexchange",
"id": 23935,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, estimation",
"url": null
} |
[ EDIT ] Also, $144 = 2\cdot8\cdot9 = 3 \cdot 4 \cdot 12$ with $\,2+8+9=3+4+12\,$, so multiple such factorizations may exist for the same number.
Morevover, there exist such with the same sum e.g. $\,1680 = 4 \cdot 20 \cdot 21 = 5 \cdot 12 \cdot 28 = 7 \cdot 8 \cdot 30\,$ with $\,4+20+21=5+12+28=7+8+30\,$.
[ EDIT #... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9532750387190132,
"lm_q1q2_score": 0.8044641290772687,
"lm_q2_score": 0.8438950947024556,
"openwebmath_perplexity": 865.4181661030708,
"openwebmath_score": 0.6150012612342834,
"tag... |
python, programming-challenge, time-limit-exceeded, hash-map, go
The problem is straightforward: check if two sets intersect.
The real problem is that for the biggest testcase (20 strings of length 105 each) my Go code takes 2.6 seconds, which is unacceptable, knowing that my Python code solves the problem in 0.08 sec... | {
"domain": "codereview.stackexchange",
"id": 13315,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, programming-challenge, time-limit-exceeded, hash-map, go",
"url": nul... |
graph, react.js, typescript
Sidebar
To get rid of the sidebar state we could extract a separate component let's call it Sidebar which could look something along those lines:
export const SideBar = (/* introduce your own props */) => {
const [currentNavTab, setCurrentNavTab] = useState<NavTab>(NavTab.Home);
... | {
"domain": "codereview.stackexchange",
"id": 44277,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graph, react.js, typescript",
"url": null
} |
autocorrelation, cross-correlation, correlation, random-process, random
Title: Correlation of independent random processes Suppose $X(t)$ and $Y(t)$ be two independent random processes. Is $E(X(t_1)Y(t_2))$ necessarily zero? No. Quoting Wikipedia's article Independence (probability theory):
If $X$ and $Y$ are indepen... | {
"domain": "dsp.stackexchange",
"id": 7674,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "autocorrelation, cross-correlation, correlation, random-process, random",
"url": null... |
If $B$ is any family of subsets of $X$ then $B$ is a base for a topology on $X$ iff
(Bi). $\cup B=X.$ (Each point of $X$ belongs to at least one member of $B.$),and
(Bii). If $U,U'\in B$ and $p\in U\cap U'$ then there exists $U''\in B$ with $p\in U''\subset (U\cap U').$
(Note that (Bii) is automatically satisfied if... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692298333416,
"lm_q1q2_score": 0.8159910547196859,
"lm_q2_score": 0.8354835289107309,
"openwebmath_perplexity": 79.8767713796871,
"openwebmath_score": 0.9635888338088989,
"tags... |
quantum-field-theory, symmetry, quantum-electrodynamics, lattice-model
It might as well be that I still have some misconceptions, in which case I would be very happy if these could be clarified.
Thanks! $\mathbb Z_2$ gauge theory and $U(1)$ gauge theory are not related in any quantitative way. The former is an "intuit... | {
"domain": "physics.stackexchange",
"id": 98999,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, symmetry, quantum-electrodynamics, lattice-model",
"url": ... |
structure and Field lines for two point charges +/- Post by: lookang on October 05, 2010, 10:54:39 am i been looking at the codesi have a questioni notice the test mass usesevolution to movedvxc/dt = -getF(-1,xc,yc,0)/mdvyc/dt= -getF(-1,xc,yc,1)/mwhere getF double dx1,dy1,dx2,dy2,r12,r22,dx,dy,d,sign=-1;public double g... | {
"domain": "edu.tw",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9372107966642557,
"lm_q1q2_score": 0.8142738398962461,
"lm_q2_score": 0.8688267813328977,
"openwebmath_perplexity": 3253.6164343373684,
"openwebmath_score": 0.42986035346984863,
"tags": null,... |
They are 3,4,5,6. Since the differences are an arithmetic sequence, you know the series is a quadratic, so can start with $n^2$.
Then, you can call your expression $an^2+bn+c$ and solve it by using 3 of the values from your sequence.
$$~~~~~~3 ~~~~~~ 6 ~~~~~~ 10 ~~~~~~ 15 ~~~~~~ 21 \\3 ~~~~~~~~ 4 ~~~~~~~~~ 5 ~~~~~~ 6... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9820137926698566,
"lm_q1q2_score": 0.8118423906292506,
"lm_q2_score": 0.8267118004748677,
"openwebmath_perplexity": 473.34026915610985,
"openwebmath_score": 0.6966410875320435,
"ta... |
python, optimization, beginner
You can rewrite your benchmark with list comprehension:
# this loop is strictly for benchmarking is_pandigital
pandigitals = [i for i in range(100000, 999999) if is_pandigital(i, 6)]
Now for the algorithm itself, I must confess that I have troubles understanding what you want to do as y... | {
"domain": "codereview.stackexchange",
"id": 4556,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, optimization, beginner",
"url": null
} |
Another way.
$\exp(-z^2)$ is an entire function. Its power series at the origin converges for all $z$.
Take the anti-derivative of that series term-by-term. It still converges for all $z$. (Use the formula for radius of convergence.) So the series of antiderivatives is an antiderivative for $\exp(-z^2)$.
That argumen... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126451020108,
"lm_q1q2_score": 0.8537773935268504,
"lm_q2_score": 0.8723473614033683,
"openwebmath_perplexity": 265.2539088837637,
"openwebmath_score": 0.9993290901184082,
"tag... |
lab-techniques, literature, drosophila, fitness
Correlation of Week 1 RS with Total LRS: $\rho $ ~ 0.7
Correlation of Week 1 + 2 RS with Total LRS: $\rho $ ~ 0.9
Correlation of Week 1,2 +3 RS with Total LRS: $\rho $ > 0.9
Correlation of Week 1,2,3 + 4 RS with Total LRS: $\rho $ > 0.95
Appro... | {
"domain": "biology.stackexchange",
"id": 2429,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lab-techniques, literature, drosophila, fitness",
"url": null
} |
@Mraz, it isn't anything to do with copyright. However, you are right that it's best to cite a published paper if it exists. – Brendan McKay Nov 24 '12 at 0:27
@McKay, when $p>2$, the automorphism group of a cyclic group of order $p^3$ contains elements of order $p^2$, but $GL(3,p)$ does not. – Rene Schoof Nov 24 '12... | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9658995742876886,
"lm_q1q2_score": 0.8028007120585625,
"lm_q2_score": 0.8311430436757312,
"openwebmath_perplexity": 367.12527308026273,
"openwebmath_score": 0.9549882411956787,
"tag... |
ros, ros-master-uri, ros-ip, android
Title: Node on RosAndroid is not receiving images from PC
Hey guys, I have created a node on android to subscribe to a topic for images from PC. PC publishes images continuously & node on android phone subscribes for images. I have set the right IP to both ROS_MASTER_URI & ROS_IP... | {
"domain": "robotics.stackexchange",
"id": 20482,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-master-uri, ros-ip, android",
"url": null
} |
solid-state-physics, computational-physics
This non-interacting point can then be perturbed by the Hubbard interactions. It is well-known that at half-filling this creates a charge gap (which is intuitive: $U$ demands that every site has exactly one fermion in it), but leaves the spin degrees of freedom to be gapless ... | {
"domain": "physics.stackexchange",
"id": 34054,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "solid-state-physics, computational-physics",
"url": null
} |
deep-learning, convolutional-neural-networks, convolution, notation, cross-correlation
$$
where $\sum$ is a sum across all elements, i.e.
\begin{align}
S(0, 0)
&= 1 \frac {1}{16} + 0 \frac {1}{8} + 1 \frac {1}{16} +
0 \frac {1}{8} + \color{green}{0} \frac {1}{4} + 1 \frac {1}{8} +
1 \frac {1}{16} + 0 \frac {1}{8} ... | {
"domain": "ai.stackexchange",
"id": 2575,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "deep-learning, convolutional-neural-networks, convolution, notation, cross-correlation",... |
Practice problems are found in the companion blog.
_____________________________________________________________________________________________________________________________
The Setting
Suppose we have a discrete random variable $X$ with $f(x)=P(X=x)$ as the probability mass function. Suppose some random experime... | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9854964190307041,
"lm_q1q2_score": 0.8336732350184036,
"lm_q2_score": 0.8459424295406087,
"openwebmath_perplexity": 189.86586008417004,
"openwebmath_score": 0.9430818557739258,
"tags":... |
c++, array, iterator, collections
First, you'll have to implement an allocator deleter. (I know, there really should be one standardized, but the paper hasn't been approved yet.)
Second, get rid of ownarr. Replace it with unique_ptr<T[], allocator_deleter<Allocator>> arr_; (or whatever you want to name it). I realize ... | {
"domain": "codereview.stackexchange",
"id": 30987,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, array, iterator, collections",
"url": null
} |
quantum-mechanics, angular-momentum, quantum-spin, velocity
One example of this is to ask you to forget everything I said about revolution and the axis in the paragraph above.
An electron does not spin as a soccer ball, it might be dimensionless, (that is a point particle), it does not have an axis and it takes two "r... | {
"domain": "physics.stackexchange",
"id": 33253,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, angular-momentum, quantum-spin, velocity",
"url": null
} |
python, pdb, rna
It's not pretty but it do the job.
The idea is to get everything that finish by a nucleotide. I figured out that hetatom's names of RNA chains always finish by a nucleotide letter so i just have to check everything that begins by 'H_' and ends by 'A,T,C,G,U'.
Just remove 'H_ MG' and you're good. Solut... | {
"domain": "bioinformatics.stackexchange",
"id": 1046,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, pdb, rna",
"url": null
} |
11. Nov 7, 2012
### SammyS
Staff Emeritus
The instructions were very clear regarding solving by induction.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676425019244,
"lm_q1q2_score": 0.8009512661941752,
"lm_q2_score": 0.8175744828610095,
"openwebmath_perplexity": 1132.5948677035406,
"openwebmath_score": 0.7862247228622437,
"ta... |
ros, ros-indigo, pixhawk, mavros
After that, during bootup, there is a fast stream of 22 IDs split up by 0, 166, and 109
At the end of a long stream of 22's it gets 43, 44, 40, 39, and 47 in quick succession:
[DEBUG] [1411862299.848786274]: serial0:send: Message-Id: 43 [2 bytes]
[DEBUG] [1411862299.929775171]: serial... | {
"domain": "robotics.stackexchange",
"id": 19515,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-indigo, pixhawk, mavros",
"url": null
} |
percentages can be calculated a! Have the percentage slope and then divide the rise and run to the following procedure to calculate Engineering,. The grade points obtained in all SGPI is the weighted average of the grade points obtained in all denoted the! Can be calculated as a percentage which is calculated in much t... | {
"domain": "raimokoski.fi",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9591542852576265,
"lm_q1q2_score": 0.8227319588897162,
"lm_q2_score": 0.8577681104440172,
"openwebmath_perplexity": 1717.7497795570532,
"openwebmath_score": 0.8258670568466187,
"ta... |
python, python-3.x, object-oriented, file-system, pdf
def encryption_checker(self, pdf_file: str) -> None:
"""Check to see if encryption succeeded by reading and decrypting the files."""
file_object = open(pdf_file, "rb")
reader = PyPDF2.PdfFileReader(file_object)
try:
reade... | {
"domain": "codereview.stackexchange",
"id": 43673,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, object-oriented, file-system, pdf",
"url": null
} |
ros, ros-indigo
Original comments
Comment by cyborg-x1 on 2015-07-29:
Did you check rqt_graph? So that your node is connected to the right topic?
You do not have a "/" in the beginning so there could be: <possible namespace>/ground_truth/state or something like that
Comment by niall on 2015-07-29:
Good questions, than... | {
"domain": "robotics.stackexchange",
"id": 22327,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-indigo",
"url": null
} |
c#, beginner, object-oriented
}
/// <summary>
/// Method to run the program initialization sequence.
/// Checks for existing film list file, if none immediatelly begin generation method.
/// Prints current film list to screen, asks user to confirm, regenerate, or terminate program.
/// If file... | {
"domain": "codereview.stackexchange",
"id": 40130,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, beginner, object-oriented",
"url": null
} |
the function be absolutely integrable on the real line) are quite severe due to the lack of the exponential decay term as seen in the Laplace transform, and it means that functions like polynomials, exponentials, and trigonometric functions all do not have Fourier transforms in the. From Complex Fourier Series to Fouri... | {
"domain": "lotoblu.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9859363741964573,
"lm_q1q2_score": 0.8060764146939288,
"lm_q2_score": 0.8175744761936437,
"openwebmath_perplexity": 487.3528843491706,
"openwebmath_score": 0.8950192332267761,
"tags":... |
newtonian-mechanics, forces, energy, work
Title: Properly deriving the formula for the kinetic energy I am a physics student and recently attended my first lectures. One thing that strikes me even now was the way the professor derived the formula for the kinetic energy.
He started with the (already given) definition o... | {
"domain": "physics.stackexchange",
"id": 26091,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, forces, energy, work",
"url": null
} |
classical-mechanics, terminology
By definition, a "stationary" point is one where the first derivative (or "variation", which is just a disguised functional derivative) vanishes. But standard differentiability is only defined on open sets (see this math.SE question) - although one might try to extend the derivative to... | {
"domain": "physics.stackexchange",
"id": 34041,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, terminology",
"url": null
} |
general-relativity, dark-matter, gravitational-waves, gravitational-lensing
Title: Can curvature waves in f(R) theories explain gravitational lensing in cluster collisions? The Einstein-Hilbert action leading to Einstein's equations is $$S\sim\int R \sqrt{-g}\, {\rm d}^4 x$$ There is a class of modifications of Einste... | {
"domain": "physics.stackexchange",
"id": 19327,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, dark-matter, gravitational-waves, gravitational-lensing",
"u... |
python, python-2.x, random, animation, turtle-graphics
def __add__(self, color):
return Color(self.r + color.r, self.g + color.g, self.b + color.b)
def __sub__(self, color):
return Color(self.r - color.r, self.g - color.g, self.b - color.b)
def __div__(self, factor):
return Color(self... | {
"domain": "codereview.stackexchange",
"id": 15979,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-2.x, random, animation, turtle-graphics",
"url": null
} |
php, mysql, mysqli
where row_number <= 3) AS l
ON sc.studentsisid = l.studentsisid AND sc.learningoutcomeid = l.learningoutcomeid
WHERE sc.studentsisid LIKE '$studentid' AND sc.coursename='$coursename'
GROUP BY sc.studentsisid, sc.coursename, sc.learningoutcomeid
ORDER BY sc.studentname, sc.learningoutcomename | {
"domain": "codereview.stackexchange",
"id": 12397,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, mysql, mysqli",
"url": null
} |
algorithms, algorithm-analysis, asymptotics
Why does the condition say "for all $c>0$" rather than "for all $c$"?
Well, when $c=-42$ (say), the condition $0 \le f(n) < c g(n)$ simply cannot hold. For the functions we consider in computer science, it is assumed that $f(n),g(n)$ are never negative. Now you can't have ... | {
"domain": "cs.stackexchange",
"id": 6865,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, algorithm-analysis, asymptotics",
"url": null
} |
mass, momentum, harmonic-oscillator, hamiltonian-formalism, phase-space
The only physical significance I know for this fact comes from the fact that a volume of phase space measures the entropy of a system. The constancy with respect to mass results in the Dulong–Petit law that the specific heat per mole of atoms (rat... | {
"domain": "physics.stackexchange",
"id": 25187,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mass, momentum, harmonic-oscillator, hamiltonian-formalism, phase-space",
"url":... |
2
Suppose that $A$ is an $n\times n$ nonsingular matrix. What can you say about its column space?
3
Is the vector $\colvector{0\\5\\2\\3}$ in the row space of the following matrix? Why or why not? \begin{equation*} \begin{bmatrix} 1 & 3 & 1 & 3\\ 2 & 0 & 1 & 1\\ -1 & 2 & 1 & 0 \end{bmatrix} \end{equation*}
Subsecti... | {
"domain": "ups.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9883127402831221,
"lm_q1q2_score": 0.805704657737613,
"lm_q2_score": 0.8152324915965392,
"openwebmath_perplexity": 144.48185733870667,
"openwebmath_score": 0.9492066502571106,
"tags": null,
... |
# Bijective map from a set to a subset of reals?
There is a concept that I have been thinking about quite a lot lately as I am currently self-studying point-set topology:
Say we have a bijective map from one interval, $$[a,b]$$, to another interval, $$[c,d]$$, both of which are in $$\mathbb{R}$$. Also set $$c$$ and $... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9857180677531124,
"lm_q1q2_score": 0.8058979329178615,
"lm_q2_score": 0.8175744761936437,
"openwebmath_perplexity": 134.34130291939906,
"openwebmath_score": 0.8374409675598145,
"ta... |
type-theory, functional-programming
the anti-unification algorithm would return the anti-unifier
t = Cons(X, Cons(2, Cons(Y, Nil)))
because the substitutions s1 = [X:3, Y:1] and s2 = [X:1, Y:3] applied to t would give you t1 and t2 back. As an aside, we needed to specify "least general" because otherwise:
t' = Z
... | {
"domain": "cstheory.stackexchange",
"id": 4102,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "type-theory, functional-programming",
"url": null
} |
neural-network, deep-learning, r, keras
pool_A <- factor(1:15,levels=1:20)
pool_B <- factor(16:20,levels=1:20)
dat_categorical3 <- vector("list",10000)
names(dat_categorical3) <- c(as.character(dat[dat$label=="A",]$samples),as.character(dat[dat$label=="B",]$samples))
for(i in 1:9800){
dat_categorical3[[i]] <- (as.nu... | {
"domain": "datascience.stackexchange",
"id": 3190,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-network, deep-learning, r, keras",
"url": null
} |
on the class webpage. ) = 1 right angle triangle of Results and inverse. It has no inverse as.110.108 at johns hopkins university of problems *.kastatic.org *... Trigonometry identities, Implicit Differentiation the domains *.kastatic.org and *.kasandbox.org are unblocked arctan x... Derivatives, Integrals, and the cha... | {
"domain": "okworld.hu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.951142221377825,
"lm_q1q2_score": 0.8006959161396819,
"lm_q2_score": 0.8418256472515683,
"openwebmath_perplexity": 1279.1916892725933,
"openwebmath_score": 0.6601295471191406,
"tags": nul... |
(The two have been distinguished here), $${ S }^{ 2 }=\frac { \left\{ \sum { { \left( { X }_{ i }- \bar { X } \right) }^{ 2 } } \right\} }{ n-1 }$$, Note that we are dividing by n – 1. o Population standard deviation. The standard deviation is 0.0037671/2 = 0.06137 or 6.14%. There are different measures of dispersion l... | {
"domain": "swiftmotionpictures.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018354801189,
"lm_q1q2_score": 0.8327372803928623,
"lm_q2_score": 0.8539127492339909,
"openwebmath_perplexity": 659.9377973614301,
"openwebmath_score": 0.83931154012680... |
# Integral with sin and cos
What kind of substitution would help me solve this integral: $$\int_0^{\pi/4} \frac{x\sin x}{\cos^3x}\,dx$$ I wanted to substitute with $t=x-\pi$ but doesn't help. Also I wrote it as $\frac{\sin x}{\cos^2x\cdot \cos x}=\tan x\cdot (\tan x)'\cdot x$ anbd continued from there but got $\frac{\... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850892111574,
"lm_q1q2_score": 0.8255299425227026,
"lm_q2_score": 0.8397339676722393,
"openwebmath_perplexity": 837.1249661539352,
"openwebmath_score": 0.9400654435157776,
"tag... |
pl.programming-languages, type-theory, linear-logic
\mathsf{get} & : & \forall \alpha, c:\iota. \;\mathsf{cap}(c) \otimes \mathsf{ref}(\alpha, c) \multimap \alpha \otimes \mathsf{cap}(c) \otimes \mathsf{ref}(\alpha, c) \\
\mathsf{set} & : & \forall \alpha, c:\iota. \;\mathsf{cap}(c) \otimes \mathsf{ref}(\alpha, c) \ot... | {
"domain": "cstheory.stackexchange",
"id": 644,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pl.programming-languages, type-theory, linear-logic",
"url": null
} |
ros-melodic, cmake
What is headers of the package used by? What is beginner_tutorials_generate_messages_cpp? Is it the message generation target? What is a message generation target?
Originally posted by Ananda on ROS Answers with karma: 11 on 2019-07-14
Post score: 1
You can read this for more information about CMa... | {
"domain": "robotics.stackexchange",
"id": 33418,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-melodic, cmake",
"url": null
} |
python, performance, graph
It seems like I spend so much time just going through the for loops in sp3... is there some way to fix this? (Also, I've been told to check if there's a faster implementation than random.choice when I'm using really small lists usually of size 6, give or take, so any insight on that is welco... | {
"domain": "codereview.stackexchange",
"id": 34267,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, graph",
"url": null
} |
javascript, object-oriented, game
Title: Bowling scorecard app This is one of my first attempts in writing a bowling scorecard app. It can have more than one player. I would like to know if anyone has suggestions to improve the code. I am trying to make it as object oriented and as organized as possible. There are 2 p... | {
"domain": "codereview.stackexchange",
"id": 16478,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, object-oriented, game",
"url": null
} |
image-processing, computer-vision, programming
Python is somehow a middle ground between both. You can use it for Matlab style numerical computing (with numpy and scipy) + have bindings to libraries like OpenCV. You can do systems / data structure stuff with it and get acceptable performances. There are quite a few ma... | {
"domain": "dsp.stackexchange",
"id": 179,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image-processing, computer-vision, programming",
"url": null
} |
electromagnetic-radiation, visible-light, electric-current, thermal-radiation, photon-emission
Update
The term describing the processes in the incadescent lamp is thermal bremsstrahlung, see the posts on this subject here and here. Supplementary answer to the OP's clarifying comment:
The main point that still needs c... | {
"domain": "physics.stackexchange",
"id": 79463,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetic-radiation, visible-light, electric-current, thermal-radiation, pho... |
ros, custom-message, message, generate-messages
} // namespace message_operations
} // namespace ros
#endif // ROS_PANTILTZOOM_TARDEC_MESSAGE_PTZ_H
Originally posted by Brenton on ROS Answers with karma: 1 on 2016-07-06
Post score: 0
The problem is that I can't generate any access methods to change them.
ROS mess... | {
"domain": "robotics.stackexchange",
"id": 25162,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, custom-message, message, generate-messages",
"url": null
} |
discrete-signals, bandwidth, quantization
As an example, say you're transmitting telephone-quality voice with $L=256$, $n=8$, and with 8000 samples per second. Then, $R_b = 8 \times 8000 = 64000$ bits per second, which require a signal of bandwidth $B > 32000\text{ Hz}$.
Say you want to improve the signal quality and ... | {
"domain": "dsp.stackexchange",
"id": 6666,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "discrete-signals, bandwidth, quantization",
"url": null
} |
java, algorithm, graph
Title: Implementation of Dijkstra's algorithm Please pick my code apart and give me some feedback on how I could make it better or more simple.
final class Edge {
private final Node node1, node2;
private final int distance;
public Edge (Node node1, Node node2, int distance) {
... | {
"domain": "codereview.stackexchange",
"id": 16710,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, algorithm, graph",
"url": null
} |
neural-networks, backpropagation
(Being f the activation function and z the dot product plus the bias of a neuron)
So I'm in the rightmost layer, with an output array of 10 elements. d(cost) / d(f(z)) is the subtraction of the observed an predicted values. I can multiply that by d(f(z)) / d(z), which is just f'(z) of ... | {
"domain": "ai.stackexchange",
"id": 1843,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-networks, backpropagation",
"url": null
} |
neural-networks, machine-learning, deep-learning, artificial-neuron
Architecture of language model
A language model consists of the encoder and the decoder. The encoder compresses word one-hot representation to a smaller sized vector representation. The smaller sized representation is then passed through the decoder, ... | {
"domain": "ai.stackexchange",
"id": 1574,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-networks, machine-learning, deep-learning, artificial-neuron",
"url": null
} |
minimax, alpha-beta-pruning
Title: Should minimax with alpha beta pruning depth be an odd number? I implemented the minimax algorithm with alpha-beta pruning to see how it works, with application to the connect four game.
My AI works fine, considering the AI is the MAX player (VS human player, which is the MIN), e.g. ... | {
"domain": "ai.stackexchange",
"id": 3298,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "minimax, alpha-beta-pruning",
"url": null
} |
compilers
Title: Is badly written code derogatory to the compiler? I was having a heated debate with a friend of mine (who considers me an idiot, mind you) and we were arguing about whether a compiler has an index, or coefficient, that judges how poorly code is written. Things such as useless for loops, declared varia... | {
"domain": "cs.stackexchange",
"id": 4921,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "compilers",
"url": null
} |
algorithms
Similar logic also applies to the partial solutions in your call stack.
If you're just trying to place one of each piece then this isn't so bad. If, on the other hand, you're trying to place 8 queens on an 8 x 8 board, this means each solution gets generated 8! = 40,320 different times.
This is probably th... | {
"domain": "cs.stackexchange",
"id": 13316,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms",
"url": null
} |
theoretical-chemistry, crystal-structure, software, nanotechnology, boron-family
Beta_12.cif file:
data_Beta_12_str
_audit_creation_date 2021-09-18
_audit_creation_method 'Materials Studio'
_symmetry_space_group_name_H-M 'PMM2'
_symmetry_Int_Tables_number 25
_symmetry_cell_setting ... | {
"domain": "chemistry.stackexchange",
"id": 15985,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "theoretical-chemistry, crystal-structure, software, nanotechnology, boron-family... |
and position yourself for Google Docs efficiency and success. Simply enclose your math equations within $$...$$ and click the button in the sidebar, and all of your equations will be rendered in latex! This add-on has many advantages when compared to other formula editors or the default Google Docs equation editors. Us... | {
"domain": "umcreativeconnect.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9073122163480667,
"lm_q1q2_score": 0.8077748222226466,
"lm_q2_score": 0.8902942203004185,
"openwebmath_perplexity": 2290.2394508185025,
"openwebmath_score": 0.1892908215522766,
... |
general-relativity, lagrangian-formalism, differential-geometry, variational-principle, boundary-terms
$$\delta I_{GHY} = \frac{1}{\kappa^2} \int_{\partial M} d^{d}x \sqrt{-h}\left(\frac{1}{2}h^{\mu\nu} \delta g_{\mu\nu} K + \delta K \right)~.$$
Combining this with $\delta I_{EH}$ we see that the several terms cancel... | {
"domain": "physics.stackexchange",
"id": 22659,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, lagrangian-formalism, differential-geometry, variational-princ... |
c#, tic-tac-toe
{
Console.Write(board[x]);
Console.Write(" | ");
x++;
}
Console.WriteLine();
}
}
void CheckWin()
{
// horzontial
if (board[1] == board[2] && board[2] == board[3])
{
result = ... | {
"domain": "codereview.stackexchange",
"id": 32228,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, tic-tac-toe",
"url": null
} |
c#, parsing
this.MyParsingState = ParsingState.Parsed;
return MP4ParsingError.Success;
}
}
BoxBase:
public abstract class BoxBase : IBox
{
public ulong PositionInFile { get; set; }
private ulong MyDataSize;
public virtual ulong BoxContentEndOffset
{
get { return 0 + this.MyDataSize... | {
"domain": "codereview.stackexchange",
"id": 9035,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, parsing",
"url": null
} |
c++, beginner, random, generator
//The second class is a Battler class that contains two Randomizer objects.
//It also contains a method to compare the second integer of each of the vector
//arrays contained in each of those objects, and returns -1, 0, or 1 depending
//on which value is greater, or 0 if they are tied.... | {
"domain": "codereview.stackexchange",
"id": 1992,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner, random, generator",
"url": null
} |
robotic-arm, inverse-kinematics, industrial-robot, c++
I want a vector of solution - how do I get that?
the Q is related to this https://robotics.stackexchange.com/questions/9672/how-do-i-construct-i-a-transformation-matrix-given-only-x-y-z-of-tool-position
The robot being used is a UR5 - https://smartech.gatech.edu/... | {
"domain": "robotics.stackexchange",
"id": 1054,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "robotic-arm, inverse-kinematics, industrial-robot, c++",
"url": null
} |
cc.complexity-theory, graph-theory, space-time-tradeoff
Title: Lower bound on pebbling numbers Out of curiosity, I tried finding the original paper showing that there are graphs that require $n/\log n$ pebbles in the sense of Hopcroft, Paul, and Valiant’s seminal paper “On Time Versus Space”. (Which you can access her... | {
"domain": "cstheory.stackexchange",
"id": 4737,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, graph-theory, space-time-tradeoff",
"url": null
} |
python, performance, datetime, regex
>>> from datetime import datetime, timedelta
>>> make_test_file('data.txt', 10**5, datetime.now(), timedelta(seconds=1))
And then with the OP's code in the function aggregate1(filename, dlen):
>>> import timeit
>>> timeit.timeit(lambda:aggregate1('data.txt', 16), number = 1)
5.786... | {
"domain": "codereview.stackexchange",
"id": 2306,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, datetime, regex",
"url": null
} |
used for the binomial coefficients. When you look at Pascal's Triangle, find the prime numbers that are the first number in the row. The rows of Pascal's triangle are conventionally enumerated starting with row n = 0 at the top (the 0th row). Pascal ’ s triangle, in mathematics, is a geometric arrangement of the binomi... | {
"domain": "holyoatmeal.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676508127573,
"lm_q1q2_score": 0.8184961980999216,
"lm_q2_score": 0.8354835411997897,
"openwebmath_perplexity": 1107.939993128308,
"openwebmath_score": 0.8899973034858704,
"tags"... |
quantum-mechanics, operators, angular-momentum, quantum-spin, commutator
$$-i\hbar y\left(y\frac{\partial}{\partial z}-z\frac{\partial}{\partial y}\right)+i\hbar y\left(y\frac{\partial}{\partial z}-z\frac{\partial}{\partial y}\right)=0.$$What am I doing wrong here? I think that this gets much clearer if you apply the ... | {
"domain": "physics.stackexchange",
"id": 91055,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, operators, angular-momentum, quantum-spin, commutator",
"url"... |
c++, array, r, rcpp
Title: Effective 3d array transposition with R/C++ (Rcpp) Task is reshape 3d array from [row, col, slice] to [slice,row,col]. I tried implement base::aperm analog with Rcpp.
// [[Rcpp::export]]
Rcpp::NumericVector array_perm(const Rcpp::NumericVector& x) {
if (Rf_isNull(x.attr("dim"))) {
... | {
"domain": "codereview.stackexchange",
"id": 32461,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, array, r, rcpp",
"url": null
} |
python, pygame
elif event.type == pygame.MOUSEBUTTONDOWN:
if event.button == 1:
for o in objs:
o.txt_box.check_status(event.pos)
o.txt_box2.check_status(event.pos)
if o.clicked_straw(event.pos):
o.line = Tru... | {
"domain": "codereview.stackexchange",
"id": 39819,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, pygame",
"url": null
} |
c#, authorization
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public class UserRole
{
private readonly Principal _principal;
private readonly string _role;
internal UserRole(Principal principal, string role)
... | {
"domain": "codereview.stackexchange",
"id": 18007,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, authorization",
"url": null
} |
If $X$ is a topological space and $A$ is a subset then we say that $A$ is dense in $X$ provided that the closure of $A$ contains $X$. When $X=\Bbb R$ this means either of the following two conditions: (1) the set $A$ intersects every non-empty open interval, or (2) for every real number $x$ there is a sequence of point... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471665987074,
"lm_q1q2_score": 0.8512482518589282,
"lm_q2_score": 0.865224072151174,
"openwebmath_perplexity": 235.47190395044214,
"openwebmath_score": 0.9466912746429443,
"tag... |
exoplanet
Now if (and I think this is the gist of your question), what happens if you decrease the atmospheric pressure by significantly lowering the amount of O2/N2 in the atmosphere (or raising it). Lower atmospheric pressure lowers the boiling point of water and if you lower the atmospheric pressure enough, then w... | {
"domain": "astronomy.stackexchange",
"id": 1140,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "exoplanet",
"url": null
} |
ruby, plugin
You don't need to declare members in your class (@plugin_definitions, etc.). When they are initially assigned they 'magically' appear.
You define getters, which are fine, although you can use attr_accessors and attr_readers instead. Any way, you give your getters a different name than the members. This is... | {
"domain": "codereview.stackexchange",
"id": 6149,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ruby, plugin",
"url": null
} |
newtonian-mechanics, waves, harmonic-oscillator, oscillators, viscosity
Say you weakly excite the harmonic $h_m$ with amplitude $A$. At leading order, it is an undamped harmonic oscillator:
$$
w^{(0)} = A\cos(\omega_mt)h_m(x)
$$
At next order, you only have self interactions since the other modes are zero at leading o... | {
"domain": "physics.stackexchange",
"id": 99171,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, waves, harmonic-oscillator, oscillators, viscosity",
"url":... |
ph
To directly address the equilibrium you've set shown us- the real bump on the road is the dissociation of the bicarbonate. Remember that in this situation, we must have a very hydronium poor solution, such that it's likely that we actually have free hydroxide ions. So, what happens to the 2 protons on the far right... | {
"domain": "chemistry.stackexchange",
"id": 16094,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ph",
"url": null
} |
mathematics, optics, geometry
Does the formula depends of how far from the lens is the pixel device?
SECOND EDIT:
I have this data: The Optical Form Factor of the camera is: 1/2.5''
Is it related to the lens focal length? I did not find a definition on wikipedia and only this blog article that I don't understand Inde... | {
"domain": "engineering.stackexchange",
"id": 3124,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mathematics, optics, geometry",
"url": null
} |
c++, linked-list, memory-management, queue, reference
// the input copy calls the appropriate constructor first
eNode<type> & operator=(eNode<type> other) {
std::swap(data, other.data);
return *this;
};
SOME NOTES
A part of me doubts this would hold... | {
"domain": "codereview.stackexchange",
"id": 22988,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, linked-list, memory-management, queue, reference",
"url": null
} |
human-biology, muscles, exercise
There is a sound theoretical rationale supporting a potential role for EIMD in the hypertrophic response. Although it appears that muscle growth can occur in the relative absence of muscle damage, potential mechanisms exist whereby EIMD may enhance the accretion of muscle proteins incl... | {
"domain": "biology.stackexchange",
"id": 7344,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology, muscles, exercise",
"url": null
} |
c#, multithreading, interview-questions, queue
System.Diagnostics.Debug.WriteLine(Task.CurrentId + " " + DateTime.Now.ToString() + " Task waiting complted _currentInterval : " + _currentInterval);
Thread.Sleep(TimeSpan.FromSeconds(_currentInterval));
}
}
}
protected virtua... | {
"domain": "codereview.stackexchange",
"id": 30095,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, multithreading, interview-questions, queue",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.