text stringlengths 1 1.11k | source dict |
|---|---|
java, game, gui, community-challenge, javafx
this.renderHands();
this.renderBattlefields();
this.updateGameLabels();
}
//RENDER HANDS
@FXML
private Pane opponentHandPane;
@FXML
private Pane playerHandPane;
private void renderHands() {
this.renderOpponentHand();
this.renderPlayerHand();
}
private void renderOpponentHand() {
opponentHandPane.getChildren().clear();
opponentHandPane.getChildren().addAll(opponentHandData);
}
private void renderPlayerHand() {
playerHandPane.getChildren().clear();
playerHandPane.getChildren().addAll(playerHandData);
} | {
"domain": "codereview.stackexchange",
"id": 9595,
"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, game, gui, community-challenge, javafx",
"url": null
} |
java, reflection, controller, javafx, databinding
}
*The implementation of a ListBox is actually not a binding of properties but setting the value of its ListView to the List Field of the domain object.
All objects that would be the value of a ListCell would implement CellObject.
//set the root node of controller to the main window of the application
AgendaApp.setContent(Controller) controllerInstance);
I went with reflection as the controllers to update/create domain objects consist of mainly TextFields and ListBox's. This would save a lot of time writing the application. Is my use of Java Reflection an OK design?
Well, no, the usage of reflection is usually an indication of bad design. Honestly, it is almost always. Actually, you have to change the question and ask, when is it okay, to use reflection. The answer is something similar like this: Use reflection, when you do not know how a class looks like during runtime. But this is your code, so, why would you increase complexity and make your code more error prone? | {
"domain": "codereview.stackexchange",
"id": 27197,
"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, reflection, controller, javafx, databinding",
"url": null
} |
machine-learning, boolean-functions, lg.learning, vc-dimension, pac-learning
but it must choose a point $z$ to guess is labeled $1$ (importantly, the
``all zero'' function is not in $\mathcal{C}$, so any proper learner must guess some $z$), and until it has seen every point in $\mathcal{X}\setminus\{x^*\}$ it has at least $1/2$ chance of guessing wrong (i.e., the posterior probability of its $f_z$ having $z \neq x^*$ is at least $1/2$). The coupon collector argument implies it would require $\Omega((1/\varepsilon)\log(1/\varepsilon))$ samples to see every point in $\mathcal{X} \setminus \{x^*\}$. So this proves a lower bound of $\Omega((1/\varepsilon)\log(1/\varepsilon))$ for all proper learners. | {
"domain": "cstheory.stackexchange",
"id": 4707,
"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, boolean-functions, lg.learning, vc-dimension, pac-learning",
"url": null
} |
rna, microrna
The nomenclature of miRNA genes is somewhat inconsistent. The genes found in early genetic studies were named after their phenotypes (for example, lin-4, let-7 and lsy-6), whereas most miRNAs found from cloning or sequencing received numerical names (for example, the lin-4 homologues in other species are called mir-125).
Roush S, Slack FJ. 2008. The let-7 family of microRNAs. Trends Cell Biol 18(10):505-516 | {
"domain": "biology.stackexchange",
"id": 3642,
"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": "rna, microrna",
"url": null
} |
navigation, ros-melodic
Originally posted by dschnabel with karma: 103 on 2020-09-21
This answer was ACCEPTED on the original site
Post score: 3 | {
"domain": "robotics.stackexchange",
"id": 35299,
"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": "navigation, ros-melodic",
"url": null
} |
ros, moveit, path
Title: Using setJointValueTarget and setPoseTarget have different results
The following code works, if the target is defined by Joint Value. But if I define the same point by Pose (as in the comment section), the planning path is different every time I run the code. And some times the robot is not able to find the path...
I am using hydro on UR10, moveit version is 0.5.20. ubuntu 12.04. I get the position and orientation value of 'goal' by using command: rosrun tf tf_echo base_link ee_link, when the end effector reach 'joints'.
So basically, 'goal' and 'joints' are the same position. Why setJointValueTarge is working while setPoseTarget is not?
int main(int argc, char **argv)
{
ros::init(argc, argv, "move_group_test");
ros::AsyncSpinner spinner(1);
spinner.start();
moveit::planning_interface::MoveGroup group("manipulator");
group.setPlannerId("ESTkConfigDefault"); | {
"domain": "robotics.stackexchange",
"id": 24795,
"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, moveit, path",
"url": null
} |
nuclear-physics, fusion
Title: If muons had long enough half lives, could muon-catalyzed p-p fusion be viable? I was reading about muon-catalyzed fusion and how the "alpha sticking problem" is a major barrier to viability, but when you fuse two protons together you get deuterium instead, which still only has one proton. So with p-p fusion the "alpha sticking problem" wouldn't be a major barrier. However, muon-catalysed p-p fusion isn't viable due to the short half-life of the muons relative to the fusion rate.
But if the half-life of a muon were on the order of seconds, minutes or longer, could p-p muon-catalyzed fusion be viable? If your model of physics is that there is a dial labeled “muon lifetime” which you can turn without changing anything else, then sure, probably.
But of course that’s not how our model of particle physics works. For example, the muon lifetime is a famous piece of evidence for the universal coupling of the weak charged current, with lifetime $\tau$ obeying (see e.g.)
$$ | {
"domain": "physics.stackexchange",
"id": 90712,
"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": "nuclear-physics, fusion",
"url": null
} |
java, datetime
The looping-validation ensures that only a valid DayOfWeek value is returned.
Next, you can use a couple of TemporalAdjusters to get the LocalDates you require:
firstInMonth(DayOfWeek): the first day-of-week of the month.
lastDayOfMonth(): the last day of the month.
next(DayOfWeek): the next day-of-week, i.e. 7 days from the LocalDate instance. | {
"domain": "codereview.stackexchange",
"id": 18967,
"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, datetime",
"url": null
} |
lightgbm, explainable-ai, shap
My understanding is that the base value is derived when the model has no features. But how is it actually calculated in SHAP? As you say, it's the value of a feature-less model, which generally is the average of the outcome variable in the training set (often in log-odds, if classification). With force_plot, you actually pass your desired base value as the first parameter; in that notebook's case it is explainer.expected_value[1], the average of the second class.
https://github.com/slundberg/shap/blob/06c9d18f3dd014e9ed037a084f48bfaf1bc8f75a/shap/plots/force.py#L31
https://github.com/slundberg/shap/issues/352#issuecomment-447485624 | {
"domain": "datascience.stackexchange",
"id": 7424,
"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": "lightgbm, explainable-ai, shap",
"url": null
} |
human-biology, nutrition
Title: How a vegan can consume all the needed varied proteins / amino acids? I would like to ask if there are some proteins that the human body needs and can being endowed only from meat?
According this:
Other protein sources, such as fruits, vegetables, grains, nuts and
seeds, lack one or more essential amino acids. Vegetarians need to be
aware of this. People who don’t eat meat, fish, poultry, eggs, or
dairy products need to eat a variety of protein-containing foods each
day in order to get all the amino acids needed to make new protein. | {
"domain": "biology.stackexchange",
"id": 7545,
"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, nutrition",
"url": null
} |
php, laravel
Move the API request to a service (App\Services\ProductsApi\Client).
Move the formatting of city to a helper (App\Helpers\Format).
Consider moving the formatting of city to CityRequest so the controller doesn't have to do it.
No need for new variables, use the properties returned by $response instead.
No need for else-statement, since the if-statement has return.
Your controller:
use App\Services\ProductsApi\Client;
public function __construct(Client $client)
{
$this->client = $client;
}
public function displayData(CityRequest $request)
{
if (isset($request->validator) && $request->validator->fails()) {
return redirect()->back()->withErrors($request->validator->messages());
}
$response = $this->client->getRecommended(
App\Helpers\Format::slugify($request->city)
);
if ($response->error) {
return redirect()->back()->withErrors([
'city' => $response->error
]);
} | {
"domain": "codereview.stackexchange",
"id": 37126,
"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, laravel",
"url": null
} |
data-structures, abstract-data-types
efficiency of each operation (including initializing the structure) and the complexity of implementing and maintaining the various data types. Some concrete data structures have excellent theoretical guarantees, but the overhead is such that a slightly less theoretically optimal data structure may be a better choice in practice. | {
"domain": "cs.stackexchange",
"id": 668,
"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": "data-structures, abstract-data-types",
"url": null
} |
electromagnetism, general-relativity, differential-geometry, curvature, maxwell-equations
$$
the equivalence of which is easy to show. However, suppose we're working in curved spacetime. We get
$$
F_{\mu \nu} = A_{\nu;\mu}-A_{\mu;\nu}\text{, }F_{[\mu \nu ; \kappa]}=0.
$$
However, the connection coefficients in the covariant derivatives neatly cancel out, so both tensor expressions are equivalent to each other. However, suppose we attempt to bring the flat space forms expression into curved spacetime, by turning the exterior derivative into an exterior covariant derivative. We start with
$$F = \text{d}_DA$$
and then (naively?) find
$$
\text{d}_DF =\text{d}_D \text{d}_D A = \Omega \wedge A \neq 0
$$ | {
"domain": "physics.stackexchange",
"id": 10591,
"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": "electromagnetism, general-relativity, differential-geometry, curvature, maxwell-equations",
"url": null
} |
c#, performance, ms-word
}
private Word.Table CreateAndFormatTenatTable(int rowCount, int maxDoubleColumn,
Word.Document wordDoc, Word.Application wordApp)
{
Word.Table tenantTable;
Word.Range wrdRng = wordDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;
tenantTable = wordDoc.Tables.Add(wrdRng, rowCount, 2, ref oMissing, ref oMissing);
tenantTable.Range.Font.Size = (maxDoubleColumn < 14) ? 18 : 16;
tenantTable.Range.Font.Bold = 1;
tenantTable.Range.Font.Name = "Arial";
tenantTable.Rows.Alignment = Word.WdRowAlignment.wdAlignRowLeft;
tenantTable.Columns.SetWidth(wordApp.InchesToPoints((float)3.25), Word.WdRulerStyle.wdAdjustSameWidth);
return tenantTable;
} | {
"domain": "codereview.stackexchange",
"id": 42657,
"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#, performance, ms-word",
"url": null
} |
will add up to 180 simply because the fifth says! No ' gives us: a and b, e and a are also 180° second of. Angles which means they are supplementary ( both angles are equal, but not... 73 degrees more rules: corresponding angles do corresponding angles add up to 180 equal are corresponding angles: a + b + 180 x. Subtraction from 180 degrees are also interiors ) same plane ) that never intersect can only happen if transversal... Of trapezoid called an isosceles trapezoid sphere they add up to 360 degrees in a triangle add... Alternate interior angles add up to 180° ( in the triangle add 180. To the base at apex surface they add up to 180 degrees a common vertex and edge but not... To place these angles onto a straight line add up to 360 degrees add up to 180° kind... Two other lines, co-interior ( or c ) angles add up 180°! Their angle relationships the difference between the exterior and AIA form a ‘ Z angles.... So what are the difference between Japanese music and Philippine music | {
"domain": "brana-jazyku.cz",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.963779946215714,
"lm_q1q2_score": 0.8473040304095345,
"lm_q2_score": 0.8791467738423874,
"openwebmath_perplexity": 821.2624088978887,
"openwebmath_score": 0.423332154750824,
"tags": null,
"url": "http://brana-jazyku.cz/best-slice-zmzhjr/viewtopic.php?id=do-corresponding-angles-add-up-to-180-f09a31"
} |
lua, lua-table
-- x:abs() ... Norm
function abs (x)
return math.sqrt(x.re ^ 2 + x.im ^ 2)
end
-- x:arg() ... Argument
function arg (x)
return math.atan2(x.im, x.re)
end
-- Something like operator overloading
complex_meta = {
-- Addition .. (a+bi)+(c+di) == (a+c)+(b+d)i
__add = function (x, y)
local xx = tocomplex(x); local yy = tocomplex(y)
return new(xx.re + yy.re, xx.im + yy.im)
end,
-- Subtraction .. (a+bi)-(c+di) == (a+c)-(b+d)i
__sub = function (x, y)
local xx = tocomplex(x); local yy = tocomplex(y)
return new(xx.re - yy.re, xx.im - yy.im)
end,
-- Unary minus .. -(a+bi) == -a-bi
__unm = function (x)
local xx = tocomplex(x)
return new(-xx.re, -xx.im)
end, | {
"domain": "codereview.stackexchange",
"id": 19889,
"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": "lua, lua-table",
"url": null
} |
image-processing, convolution, gaussian
Title: Gaussian Filter Close to Image Border When applying Gaussian filters close to the borders of an image, algorithms usually zero-pad or replicate/mirror/wrap the borders. This is not good enough for my case, so I wonder if there is something better out there.
As the idea of smoothing is to absorb the information of surrounding points, I wonder if it would make sense to use a different kernel in the border cases. This kernel would only take values from available surrounding points, e.g. if my kernel is something like:
\begin{bmatrix}
0.0113 & 0.0838 & 0.0113 \\
0.0838 & 0.6193 & 0.0838 \\
0.0113 & 0.0838 & 0.0113
\end{bmatrix}
To calculate a pixel on the top margin (but not close to the corner), I would use
\begin{bmatrix}
0.0938 & 0.6933 & 0.0938 \\
0.0126 & 0.0938 & 0.0126
\end{bmatrix} | {
"domain": "dsp.stackexchange",
"id": 3094,
"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, convolution, gaussian",
"url": null
} |
For those interested, I wrote a little Python script to generate a table based on a strategy:
# see https://math.stackexchange.com/q/4450026
from prettytable import PrettyTable # https://pypi.org/project/prettytable/
# runStrategy runs the strategy for the given no. of turns
# strategy(t, bt, ht) -> how much to withdraw
def runStrategy(strategy, turns):
table = PrettyTable(['Turn', 'Bank', 'Hand', ''])
t = 0
bt = 1
ht = 0
for i in range(turns+1):
withdraw = strategy(t, bt, ht)
if withdraw > 0:
bt -= withdraw
ht += withdraw
# Change variables for next round
t += 1
bt *= 2
print(table)
# Given the turn number t, the current bank balance bt, and the current
# hand balance ht, strategy returns how much to withdraw this turn.
def strategy(t, bt, ht):
if t % 2 == 0:
return bt//2
else:
return 0
runStrategy(strategy, 20) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822876987039989,
"lm_q1q2_score": 0.8206851949307162,
"lm_q2_score": 0.8354835309589073,
"openwebmath_perplexity": 728.1006248161812,
"openwebmath_score": 0.7691588401794434,
"tags": null,
"url": "https://math.stackexchange.com/questions/4450026/maximise-the-number-of-tokens-in-your-hand"
} |
biochemistry, molecular-biology, lab-techniques, book-recommendation
Protocol 5: Preparation of the A Homology Arm (A-Box) and B Homology Arm (B-Box)
Protocol 6: Cloning of the A and B Homology Arms into the Shuttle Vector
Protocol 7: Preparation and Verification of the Recombinant Shuttle Vector
Protocol 8: Electroporation of Competent BAC Host Cells with the Recombinant Shuttle Vector
Protocol 9: Verification of Cointegrates and Selection of Resolved BAC Clones
Protocol 10: One-Step BAC Modification: Preparation of Plasmids
Protocol 11: Preparation of the A Homology Arm (A-Box)
Protocol 12: Cloning of the A Homology Arm into Reporter-Shuttle Vector
Protocol 13: Transformation of the BAC Host with the RecA Vector
Protocol 14: Transfer of the Reporter Vector into BAC/RecA Cells and Selection of Cointegrates
Protocol 15: Growth of S. cerevisiae and Preparation of DNA
Protocol 16: Small-Scale Preparations of Yeast DNA | {
"domain": "biology.stackexchange",
"id": 11177,
"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": "biochemistry, molecular-biology, lab-techniques, book-recommendation",
"url": null
} |
python, pandas
import pandas as pd
import numpy as np
from pandas import *
import datetime as dt
import os
from glob import glob
os.chdir(r'C:\\Users\Documents\FTP\\')
loc = r'C:\\Users\Documents\\'
rosterloc = r'\\mand\\'
splitsname = r'Splits.csv'
fcrname = r'global_disp_'
npsname = r'survey_'
ahtname = r'callbycall_'
rostername = 'Daily_Roster.csv'
vasname = r'vas_report_'
ext ='.csv'
startdate = dt.date.today() - Timedelta('60 day')
enddate = dt.date.today()
daterange = Timestamp(enddate) - Timestamp(startdate)
daterange = (daterange / np.timedelta64(1, 'D')).astype(int) | {
"domain": "codereview.stackexchange",
"id": 15599,
"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, pandas",
"url": null
} |
python, python-3.x, multithreading, sudoku
q.put(True)
def check_sudoku(grid):
"""
Validate a sudoku solution.
Given a grid as a list of lists, return None if it is ill-formed,
False if it is invalid, or True if it is a valid solution.
"""
assert isinstance(grid, list)
q = queue.Queue()
if not check_grid_size(grid):
return None
row_thread = Thread(target=check_rows, args=(grid, q))
row_thread.start()
columns_thread = Thread(target=check_columns, args=(grid, q))
columns_thread.start()
grid_threads = []
for _ in range(9):
t = Thread(target=check_3x3_grid, args=(grid, q))
t.start()
grid_threads.append(t)
row_thread.join()
columns_thread.join()
[t.join() for t in grid_threads]
results = []
while not q.empty():
results.append(q.get())
return all(results) | {
"domain": "codereview.stackexchange",
"id": 22343,
"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, multithreading, sudoku",
"url": null
} |
• let it be $I$ if $\theta>0$, then if $\theta<0$, then my answer is $-I$, but Mathematica gives me something negative of $\log(-x)$ for my original integration $\frac{1}{x \sqrt{(x+a)^2 - b^2}}$ – hasExams Jun 5 '13 at 15:53
• mathematica evaluates it to $$\frac{\log (-x)-\log \left(\sqrt{a^2-b^2} \sqrt{(a+x)^2-b^2}+a (a+x)-b^2\right)}{\sqrt{a^2-b^2}}$$ I can't get this $\log(-x)$ part – hasExams Jun 5 '13 at 16:16
• Before checking details, by initial reaction is that $\log|x|$ occurs as the antiderivative of $1/x$, and that's the same as $\log x$ if $x>0$ and it's the same as $\log(-x)$ if $x<0$. – Michael Hardy Jun 5 '13 at 17:12 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9724147201714923,
"lm_q1q2_score": 0.8039067241212392,
"lm_q2_score": 0.8267118004748678,
"openwebmath_perplexity": 412.38632544592224,
"openwebmath_score": 0.8718263506889343,
"tags": null,
"url": "https://math.stackexchange.com/questions/412085/integrate-int-fracdxx-sqrtxa-2-b2"
} |
aromatic-compounds, solvents, dipole
It is important to not regard all alkanes or aromatics as being the same, hexane is a popular solvent in chemistry but it is very toxic. In the body it is converted to hexane2.5-dione which is very bad for you. But the other longer alkanes do not have the same harmful effect. You also need to consider the exposure route. For example a puddle of diesel fuel on the floor of a garage is far less harmful than exposure of a person's hand to a high pressure spray of diesel which injects it into the person's body. | {
"domain": "chemistry.stackexchange",
"id": 10516,
"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": "aromatic-compounds, solvents, dipole",
"url": null
} |
bash
.repeat:
lodsb ; Get character from string
cmp al, 0
je .done ; If char is zero, end of string
int 10h ; Otherwise, print it
jmp .repeat
.done:
ret
times 510-($-$$) db 0 ; Pad remainder of boot sector with 0s
dw 0xAA55 ; The standard PC boot signature Overall it's a pretty nice script. I can mostly nitpick, with a few exceptions. Here we go, from top to bottom.
It might be a good idea to set the -e flag to make the script stop running when something unexpected goes wrong, like this:
#!/bin/bash -e
If a string doesn't contain special characters, then the quoting is redundant:
OS_NAME=hello # short and sweet
OS_NAME="hello" # quotes are redundant
It might be a good idea to rename MEMORY_SIZE to indicate the units, for example:
MEMORY_SIZE_MB=8 | {
"domain": "codereview.stackexchange",
"id": 8343,
"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": "bash",
"url": null
} |
unit-testing, xml, oracle, plsql, xsd
<enumeration value="null" />
<enumeration value="nothing" />
<enumeration value="query" />
</restriction>
</simpleType>
</attribute>
</complexType>
</schema> | {
"domain": "codereview.stackexchange",
"id": 3806,
"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": "unit-testing, xml, oracle, plsql, xsd",
"url": null
} |
To run the example, you can download each of the examples and run it using:
### Colormaps
All colormaps can be reversed by appending _r. For instance, gray_r is the reverse of gray.
If you want to know more about colormaps, see Documenting the matplotlib colormaps.
Name Appearance
autumn
bone
cool
copper
flag
gray
hot
hsv
jet
pink
prism
spectral
spring
summer
winter
Name Appearance
gist_earth
gist_gray
gist_heat
gist_ncar
gist_rainbow
gist_stern
gist_yarg
Name Appearance
BrBG
PiYG
PRGn
PuOr
RdBu
RdGy
RdYlBu
RdYlGn
Spectral
Name Appearance
Blues
BuGn
BuPu
GnBu
Greens
Greys
Oranges
OrRd
PuBu
PuBuGn
PuRd
Purples
RdPu
Reds
YlGn
YlGnBu
YlOrBr
YlOrRd
Name Appearance
Accent
Dark2
Paired
Pastel1
Pastel2
Set1
Set2
Set3
Name Appearance
afmhot
binary
brg
bwr
coolwarm
CMRmap
cubehelix
gnuplot
gnuplot2
ocean
rainbow
seismic
terrain
• #### A typo in your blog "Matplotlib tutorial" | {
"domain": "pythonrepo.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9585377320263432,
"lm_q1q2_score": 0.822203100932124,
"lm_q2_score": 0.8577681122619883,
"openwebmath_perplexity": 8799.888038610577,
"openwebmath_score": 0.18498849868774414,
"tags": null,
"url": "https://pythonrepo.com/repo/rougier-matplotlib-tutorial-python-data-validation"
} |
distance between this point and the given point. In some applications, such as line integrals of vector fields, the following line integral with respect to x arises: This is an integral over some curve C in xyz space. Then we can write = h(’) (7) and consider ’the parameter for the submodel, so the log likelihood for the parameter ’and for the submodel is l. 1978-07-01. Vector line integrals are extremely useful in physics. For any value of t. Surfaces that occur in two of the main theorems of vector calculus, Stokes' theorem and the divergence theorem, are frequently given in a parametric form. Line integrals are a natural generalization of integration as first learned in single-variable calculus. Intersection of two lines defined in (rho/theta ) parameterization. CiteSeerX - Document Details (Isaac Councill, Lee Giles, Pradeep Teregowda): ABSTRACT: In this paper, we develop the formulation of the spin coherent state in real parameterization SU(2), SU(3), SU(4), SU(5). Parametrize the | {
"domain": "mexproject.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308800022474,
"lm_q1q2_score": 0.8191000362225491,
"lm_q2_score": 0.8289388104343892,
"openwebmath_perplexity": 612.0935043481369,
"openwebmath_score": 0.7918527126312256,
"tags": null,
"url": "http://mexproject.it/tloa/vector-parameterization-calculator.html"
} |
of this graph, the maximal regions, which are internally strongly connected. We can find all strongly connected components in O(V+E) time using Kosaraju’s algorithm. Note: After LK. In Python, I use collections.deque. connected graph, strongly connected component, bridge. If you have suggestions, corrections, or comments, please get in touch Strongly Connected Components. Topics in discussion Introduction to graphs Directed and undirected graphs Paths Connected graphs Trees Degree Isomorphic graphs Cut set Labeled graphs Hamiltonian circuit 3. A spanning tree is a sub-graph of an undirected and a connected graph, which includes all the vertices of the graph having a minimum possible number of edges. Consider the following directed graph with 7 vertices. Ulf Leser: Algorithms and Data Structures 17 Recall: (Strongly) Connected Components • Definition Let G=(V, E) be a directed graph. And a graph is strongly connected if you can get from any one point to any other point and vice versa. | {
"domain": "b-lingo.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.966914019704466,
"lm_q1q2_score": 0.8434849130465598,
"lm_q2_score": 0.8723473813156294,
"openwebmath_perplexity": 821.0807630324325,
"openwebmath_score": 0.3060733675956726,
"tags": null,
"url": "https://b-lingo.com/adande-thorne-havngo/1cab57-strongly-connected-graph-in-data-structure"
} |
ros, python2.7, node
#Compute V_t from wheelVel(1-4)
r = 0.12 #radius of wheels
V_t = np.average(wheelVel1 + wheelVel2 + wheelVel3 + wheelVel4)*r #MIDLERTID V_t REPRÆSENTATION - find på bedre funktion
### Robot and navigation parameters ###
D_max = 4 #Max range of laserscanner
R = 0.3 #Radius of robot
D = 0.05 #"safe" distance between robot and obstacle
V_max = 4.0 #robot topspeed
W_max = 10 #minimal window for opening
k1 = 4 #coefficient making the path more target orientated
k2 = 2 #coefficient making the path more smooth
angI = np.zeros(noPoints)
H = np.zeros(noPoints)
for i in range(0,noPoints):
angI[i] = angle_min + i * angle_increment
D[i] = ((V_t^2*np.cos(angI[i])*np.cos(angI[i])) / (2*a)) + R + D_safe
if ranges[i] >= D[i]:
H[i] = 1
count = 0
W = np.zeros(noPoints) | {
"domain": "robotics.stackexchange",
"id": 23082,
"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, python2.7, node",
"url": null
} |
visible-light, waves, vacuum
Title: Light always particle in vacuum because it has no medium My physics teacher told me that light in a vacuum is always in the particle form. So what happens if you perform the double slit experiment in vacuum? Will the light spread like a wave or will it have a single dot on the other side of the slit(s)?
Also, please explain why either happens if I missed something. Heisenberg's uncertainty principle?
Light always particle in vacuum because it has no medium
That's wrong I'm afraid. If you take a look at LIGO you can read them talking about "ripples in space-time (the fabled “fabric” of the Universe)". These gravitational waves are not particles. Instead, space waves. Because the vacuum is a medium. And whilst electromagnetic light waves aren't the same as gravitational waves, they're still waves.
My physics teacher told me that light in a vacuum is always in the particle form. | {
"domain": "physics.stackexchange",
"id": 25201,
"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": "visible-light, waves, vacuum",
"url": null
} |
the value at $(1,1)$ as a limit of this quotient as $(x,y) \to (1,1)$. (For example, first substituting $x=1$ since $\{ (1,y) \mid y \ne 1 \}$ has cluster point at $(1,1)$, and then either using l'Hopital's rule three times or expanding a Taylor series about $y=1$ should work.) This will give the final answer $\frac{2}{3} e$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9697854120593484,
"lm_q1q2_score": 0.8123116252213315,
"lm_q2_score": 0.8376199673867852,
"openwebmath_perplexity": 313.304632465339,
"openwebmath_score": 0.9957062005996704,
"tags": null,
"url": "https://math.stackexchange.com/questions/2629654/double-summation-involving-factorials"
} |
homework-and-exercises, fluid-statics
Question b
You can have a go at. For b you will need to think about the pressure and volume of the air inside the cylinder initially $P_0$ and $V_0$ and how they relate to the air inside the container during its compressed state $P_1$ and $V_1$, where you have worked out the pressure $P_1$ above.
Hint: assume one of the ideal gas relationships to get the unknown volume $V_1$. Use this to get the depth.
Question c
You will need to think about the volume of water required to float the cylinders mass of $27\,\rm kg$ plus the water inside it. From this volume you will be able to extract the length of cylinder that needs to be submerged in order to provide sufficient buoyancy to float. | {
"domain": "physics.stackexchange",
"id": 1794,
"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, fluid-statics",
"url": null
} |
nomenclature, notation
In fact, I am undecided whether to represent inserted optional breaks in long chemical names (that have to fit into some fixed-width infobox) HTML(5) representation as ­ or <wbr>, which however means hyphenation, and non-hyphenation, respectively. IUPAC project 2014-003-2-800 (started 2014-02-01; ended 2021-01-11) has been created to address this issue and resulted in a publication [1].
Reference | {
"domain": "chemistry.stackexchange",
"id": 10512,
"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": "nomenclature, notation",
"url": null
} |
discrete-signals, linear-systems, frequency-response
Even if you start the system at 0, meaning $y[n] = 0, \forall n < 0$, $y[n]$ will blow up as $n$ grows.
$$y[n] = \sum^{\infty}_{m=0}2^m.x[n-m], \forall n \ge 0$$
Putting $x[n] = cos[\frac{\pi n}{3}]$ as input:
$$y[n] = \sum^{\infty}_{m=0}2^m. \frac{e^{j\pi (n-m)/3} + e^{-j\pi (n-m)/3}}{2}$$
$$y[n] = \frac{e^{j\pi n/3}}{2}.\sum^{\infty}_{m=0}(2.e^{-j\pi/3})^m + \frac{e^{-j\pi n/3}}{2}.\sum^{\infty}_{m=0}(2.e^{j\pi/3})^m$$
Since both the sums are going to blow up as $n$ grows, we can say that $y[n]$ is not bounded.
Another way of saying this is that $H(e^{j\omega})$ does not exist for this system ,because DTFT sum does not converge. And so we cannot get $|H(e^{j\omega})|$ and $\angle{H(e^{j\omega})}$ for any $\omega \in [-\pi, \pi]$.
If we considered the system to be anti-causal, then the unit circle will fall inside ROC because ROC will become $|z|<2$. And the anti-causal but stable system's impulse response will be given by : $h[n] = 2^n.u[-n]$. | {
"domain": "dsp.stackexchange",
"id": 8791,
"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, linear-systems, frequency-response",
"url": null
} |
c++, performance, audio, signal-processing
Title: Processing voice samples I'm within an audio application that sends variable-length buffers to my DLL, which will process at higher speed (48000 samples per sec, but can also be higher).
Here's the code I've written:
while (remainingSamples > 0) {
int blockSize = remainingSamples;
if (blockSize > PLUG_MAX_PROCESS_BLOCK) {
// PLUG_MAX_PROCESS_BLOCK = 256
blockSize = PLUG_MAX_PROCESS_BLOCK;
}
// voices
for (int voiceIndex = 0; voiceIndex < 16; voiceIndex++) {
for (int envelopeIndex = 0; envelopeIndex < 10; envelopeIndex++) {
Envelope &envelope = *pEnvelope[envelopeIndex];
EnvelopeVoiceData &envelopeVoiceData = envelope.mEnvelopeVoicesData[voiceIndex];
// skip disabled envelopes (in the case of test, all are running)
if (!envelope.mIsEnabled) { continue; } | {
"domain": "codereview.stackexchange",
"id": 32269,
"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++, performance, audio, signal-processing",
"url": null
} |
electric-fields, field-theory
In the same year Einstein published his works on special relativity, he also published an explanation of the photoelectric effect which pointed towards light (EM-radiation) being constituted by photons, i.e. quantized massless particles carrying energy and momentum. There was also some other experimental evidence connected to black-body radiation. Finally, quantum mechanics was developed which has been developed even further to quantum field theory (specifically quantum electrodynamics, QED) where we again have a description in terms of fields, i.e. we assign an object to each point in space (position or momentum space). Within QED, these objects are operators for particle creation and annihilation. If you'd like an introduction to QED, I suggest R. P. Feynman's book "QED: The strange theory of light" which is written for the general public. | {
"domain": "physics.stackexchange",
"id": 14379,
"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": "electric-fields, field-theory",
"url": null
} |
acid-base, transition-metals, oxidation-state, carbonyl-complexes
The applications of OS in chemistry are wide and deal with a cornucopia of chemical compounds and materials. It is therefore not surprising that, for some compounds, one value does not fit all uses, or that dedicated measurements or computations are needed to ascertain the actual OS. In those rare cases when the most convenient OS becomes a matter of choice, this fact must be clearly stated.
Refs. 3 and 4 make for excellent (and fairly accessible) reading on the topic, for those wishing to find out more about these edge cases. Both can be accessed without a subscription.
Notes and references | {
"domain": "chemistry.stackexchange",
"id": 12363,
"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": "acid-base, transition-metals, oxidation-state, carbonyl-complexes",
"url": null
} |
-
I did not see this approach in any of the answers, which is one that makes sense to me: you can get the ace in either the 1st, 2nd,..., 49th trial.
Then the expected number of cards dealt is $$1(1/13)+2(12/13)(1/13)+..n(12/13)^{n-1}(1/13)+48(12/13)^{47}(1/13)$$.
-
Try this. (edited based on comment below) You will need just 1 pull with probability 4/52 2 with probability (4/51 x 48/52). 48/52 for the probability of not getting and ace in the first and getting it in the second (4/51), and so on. This yields 1 x 4/52 + 2x(4/51 x 48/52) + 3x(4/50 x 48/52 x 44/50) + ... There must be some simplification for the above, but I'ven't looked deeper into, but you get the idea. Here are similar ones
-
This assumes there is only one ace in the deck. – Michael Hardy Nov 27 '12 at 1:05 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754497285467,
"lm_q1q2_score": 0.8688168043346316,
"lm_q2_score": 0.8824278571786139,
"openwebmath_perplexity": 279.3342530157824,
"openwebmath_score": 0.8587490916252136,
"tags": null,
"url": "http://math.stackexchange.com/questions/245354/expected-value-of-sums"
} |
game, design-patterns, objective-c
One final note about this method, I'm not sure if you're aware of these class methods or not, but rather than alloc] init], you can just do:
[NSMutableArray array];
[NSDictionary dictionary];
Methods like this exist for numerous Objective-C classes as well. I personally prefer this to alloc] init]; | {
"domain": "codereview.stackexchange",
"id": 8754,
"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": "game, design-patterns, objective-c",
"url": null
} |
c#, stream
Update:
Or I think you can derived a class from System.Stream and override the Read method and some other methods as well. Now you can manage how you read the data. This way, you can even work on just the same TCp connection because you know the length. Just pass that derived Stream to the Image.FromStream, that should/might work. | {
"domain": "codereview.stackexchange",
"id": 4352,
"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#, stream",
"url": null
} |
general-relativity, stress-energy-momentum-tensor
So what does this sum-of-squares tensor do then? Well, if we draw all the unit vectors on a standard space-time diagram, it would take the square of their length on that diagram. In Minkowski space, all unit vectors lie along a hyperbola, so the one along the time axis has the shortest length, and they get longer as you approach the asymptote (the speed of light). So the faster you're moving relative to the fluid, the greater the Ricci curvature, ie. convergence of free-fall paths, you experience. Which makes sense because, in that observer's frame, the moving fluid is Lorentz-contracted, hence has higher density, and also has pressure by virtue of its motion - so it's stress-energy tensor components are larger, meaning its curvature should be as well.
This is alluded to in the exercises of the "Spatial Curvature" section of John Baez's awesome GR Tutorial which someone on SO had kindly referred me to, but I didn't see the connection until now! | {
"domain": "physics.stackexchange",
"id": 68493,
"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, stress-energy-momentum-tensor",
"url": null
} |
c++, statistics, c++17
// Accessors for the statistical properties
std::size_t size() const noexcept { return real.size(); }
value_type mean() const noexcept { return {real.mean(), imag.mean()}; }
variance_type population_variance() const noexcept {
return real.population_variance() + imag.population_variance();
}
variance_type sample_variance() const noexcept
{
return real.sample_variance() + imag.sample_variance();
}
// add and remove values
SimpleStatsBag operator+(value_type value) const noexcept
{
return SimpleStatsBag(*this) += value;
}
SimpleStatsBag& operator+=(value_type value) noexcept
{
real += value.real();
imag += value.imag();
return *this;
} | {
"domain": "codereview.stackexchange",
"id": 31240,
"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++, statistics, c++17",
"url": null
} |
Definition of random variable : a variable that is itself a function of the result of a statistical experiment in which each outcome has a definite probability of occurrence — called also variate Examples of random variable in a Sentence Random variables are … A random variable is a variable that takes on one of multiple different values, each occurring with some probability. A random variable must be measurable, which allows for the assignment of probabilities to the potential outcome. Each outcome of a discrete random variable contains a certain probability. Otherwise, it is continuous. A random variable is defined as the value of the given variable which represents the outcome of a statistical experiment. A random variable is a variable that is subject to randomness, which means it can take on different values. A random variable is a variable whose value is unknown or a function that assigns values to each of an experiment's outcomes. A discrete random variable is a (random) | {
"domain": "lavalldebo.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877033706601,
"lm_q1q2_score": 0.814256392034211,
"lm_q2_score": 0.8289388019824946,
"openwebmath_perplexity": 331.668136111581,
"openwebmath_score": 0.4927152097225189,
"tags": null,
"url": "https://lavalldebo.org/43xcagqf/3c3493-random-variable-definition"
} |
solar-energy
Title: How are solar panels at equator placed? Are solar panels placed horizontally at the equators since the solar altitude (solar window) changes direction from north to south? Basically, yes, but any shading caused by buildings / other obstructions may make one direction preferential.
You can find sites that will do simulations online... | {
"domain": "engineering.stackexchange",
"id": 2483,
"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": "solar-energy",
"url": null
} |
$p^{1000}$ is the probability that all 1000 people buy 5 or more bananas, i.e. P(person 1 buys 5 or more AND person 2 buys 5 or more AND ...). The question asks for the probability that at least one person buys 5 or more, i.e. P(person 1 buys 5 or more OR person 2 buys 5 or more OR ...). We can say that P(at least one person buys 5 or more) is the complement of P(no-one buys 5 or more), i.e. P(at least one) + P(no-one) = 1. – ConMan Jul 31 '13 at 0:59
So P(no-one buys 5 or more) = P(person 1 doesn't buy 5 or more AND person 2 doesn't buy 5 or more AND ...) = P(person 1 doesn't) * P(person 2 doesn't) * ..., and we can say that the probability that a particular person doesn't buy 5 or more bananas is given by $1-p$, i.e. it's the complement of the probability that they do. So P(no-one buys 5 or more bananas) = $(1-p)*(1-p)*(1-p)*...=(1-p)^{1000}$. – ConMan Jul 31 '13 at 1:02 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9888419694095656,
"lm_q1q2_score": 0.8152625635114101,
"lm_q2_score": 0.8244619350028204,
"openwebmath_perplexity": 368.18062368849877,
"openwebmath_score": 0.7111771702766418,
"tags": null,
"url": "http://math.stackexchange.com/questions/456015/fitting-poisson-distribution-to-data-and-calculating-probabilities/456028"
} |
r
"Watkins", "Ryan", "Myers", "Williamson", "Simon", "Wilkerson",
"Morton", "Weber", "Woods", "Warner", "Santiago", "Reid", "Chavez",
"Ferguson", "Andrews", "Brooks", "Norris", "Watson", "Schmidt",
"Garner", "Clarke", "Jacobs", "Mccormick", "Jefferson", "Patterson",
"Sims", "Pratt", "Castillo", "Daniels", "Rivera", "Douglas",
"Erickson", "Drake", "Higgins", "Sharp", "Harrington", "Norman",
"Parsons", "Taylor", "Ford", "Manning", "Hampton", "Mitchell",
"Floyd", "Kennedy", "Summers"), External.Data.Reference = c(34L,
35L, 44L, 48L, 14L, 29L, 40L, 47L, 52L, 23L, 28L, 38L, 12L, 43L,
8L, 57L, 31L, 19L, 6L, 7L, 9L, 33L, 39L, 55L, 13L, 21L, 27L,
54L, 1L, 17L, 30L, 3L, 37L, 45L, 51L, 2L, 20L, 56L, 25L, 36L,
42L, 59L, 46L, 10L, 41L, 24L, 26L, 5L, 49L, 50L, 53L, 4L, 32L,
58L, 60L, 11L, 15L, 18L, 22L, 16L), Language = c(NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, | {
"domain": "codereview.stackexchange",
"id": 32530,
"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
} |
general-relativity, cosmology, differential-geometry, symmetry
\end{align}
Under orthogonal transformatios we may rewrite (6.3) as
\begin{align}\tag{6.4}
\widetilde{q} &= \gamma q \gamma^{-1}, &
\widetilde{n} &= \det(\gamma)\gamma n \gamma^{-1},
\end{align}
which, apart from the factor $\det(\gamma)$ is identical to the mutual transformation of two linear operators. Since both $q_{ij}$ and $n^{ij}$ are symmetric they are diagonalized by orthogonal transformations, whence we can confidently say that $q$ and $n$ are mutually diagonalizable if and only if there is a linear transformation that brings them to commute as matrices. Technically we are using the trivial fact that $n^{ab}$ is diagonal if and only if $\det(\gamma)^{-1}n^{ab}$ is. | {
"domain": "physics.stackexchange",
"id": 34077,
"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, cosmology, differential-geometry, symmetry",
"url": null
} |
c++17, boost
return *arg++;
};
auto parse_ull = [&] (char**& arg, char** end, char const* error_str) -> std::optional<std::size_t>
{
if (arg == end)
{
std::cout << error_str << "not enough arguments.\n";
print_usage();
return { };
}
try
{
auto str = std::string(*arg++);
auto pos = std::size_t{ 0 };
auto value = std::stoull(str, &pos);
if (pos != str.size())
{
std::cout << error_str << "expected an integer.\n";
print_usage();
return { };
} | {
"domain": "codereview.stackexchange",
"id": 40501,
"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++17, boost",
"url": null
} |
• Ah, I see. Thanks for the interpretation, I now understand how there is no logical error. – Grizzly0111 Feb 27 '18 at 23:59
Your proof is correct, you have shown that for $x = \left(\frac1n\right)_n \in S$ there does not exist $r > 0$ such that the open ball $B(x, r)$ is contained in $S$. This means that $S$ is not open.
Another approach would be to show that $S^c = \{(x_n)_n \in \ell^2 : x_n \le 0 \text{ for some } n \in \mathbb{N }\}$ is not closed in $\ell^2$.
Indeed, again take $x = \left(\frac1n\right)_n \in S$ and define a sequence $\left(y^{(n)}\right)_n$ of vectors in $S^c$ defined as
$$y^{(n)}_k = \begin{cases} \frac1k, & \text{if k\ne n} \\ 0, & \text{if k = n} \end{cases}$$
We have that $$\left\|x - y^{(n)}\right\|_2 = \left|x_n - y^{(n)}_n\right| = \frac1n \xrightarrow{n\to\infty} 0$$
so $x = \lim_{n\to\infty} y^{(n)}$. We conclude that $S^c$ cannot be closed because we have found a convergent sequence in $S^c$ whose limit is not in $S^c$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226247376173,
"lm_q1q2_score": 0.8204390851764647,
"lm_q2_score": 0.8397339676722393,
"openwebmath_perplexity": 70.43129917920696,
"openwebmath_score": 0.9758316874504089,
"tags": null,
"url": "https://math.stackexchange.com/questions/2669677/the-openness-of-positive-sequences-in-ell2"
} |
quantum-field-theory, particle-physics, field-theory, path-integral, classical-field-theory
It is crucial that the source and sink needn't have significant spatial overlap to transmit waves/particles/fields (otherwise we couldn't use EM fields to communicate over long distances!). However, your sender and receiver better share the same frequencies! Otherwise the receiver (sink) will absorb only a very small fraction of the signal power sent out by the transmitter (source). That is why we would like $J_1(k)$ and $J_2(k)$ to have a significant overlap in frequency space. Further, you need to not just have a significant overlap between the source and the sink spectra, but your medium should non-dissipatively transmit the relevant frequencies! The resonance in the field modes $\phi(k)$ is where the propagation happens best (in the medium of the field background), with least dissipation. In field theory, this is called an "on (mass) shell particle" and basically corresponds to the EM waves we're used to dealing with. | {
"domain": "physics.stackexchange",
"id": 38919,
"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, particle-physics, field-theory, path-integral, classical-field-theory",
"url": null
} |
• Could you please explain what "intelligently" means? What are you trying to accomplish with the binning? Why are you binning in the first place? – whuber Aug 13 '12 at 17:39
• For your second to last paragraph, do you mean $<3\rightarrow bin1$, $\ge3\&<4\rightarrow bin2$, and $\ge4\rightarrow bin3$? Otherwise, it doesn't make sense to me. – gung - Reinstate Monica Aug 13 '12 at 17:42
• I mean intelligently as in not naively like I did by assuming the bins were evenly spaced. if a piece of data falls in a specific bin that tells me something very important about that piece of data. I sort the data to determine the bin break indices and then decide which bin each piece of data falls individually. – Matthew Kemnetz Aug 13 '12 at 17:42 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9539660976007597,
"lm_q1q2_score": 0.8236463349277279,
"lm_q2_score": 0.8633916205190225,
"openwebmath_perplexity": 532.2763680830448,
"openwebmath_score": 0.41423606872558594,
"tags": null,
"url": "https://stats.stackexchange.com/questions/34242/how-to-intelligently-bin-a-collection-of-sorted-data/34254"
} |
neural-network, training, convolutional-neural-network
As you can see, the kernel (whose weights you want to update, and accounts to 9 parameters in this case) is much smaller than the input image. It would be a mistake to consider a single image (of around $200,000$ pixels as we say previously) as only capable of updating one parameter.
Secondly, the input of each layer changes from layer to layer, because of the sequential nature of the network. The second layer sees the output of the first,and so on... This means that the second layer's filters won't see the same image as the first and in fact, as training progresses, their input will also gradually change (because the first layer's filters will be getting more effective).
By the time it reaches let's say the $M^{th}$ layer, the input will have changed a lot from the original image, so it would be a mistake to consider that the original image is updating the totality of the parameters in the network. | {
"domain": "datascience.stackexchange",
"id": 3884,
"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, training, convolutional-neural-network",
"url": null
} |
6. Mar 24, 2010
### rasmhop
It's easy to see that not any pair (x,y) of real numbers will work as you can just try x=y=0 which would give 1=9 which is false. The general relation is the one given by mathman. Both sides of the equation are positive so you can take the logarithm to get mathman's equation. In the same way any two numbers satisfying mathman's equation will satisfy your equation because the logarithm is injective (i.e. log(a)=log(b) if and only if a=b). x and y do not have to be positive.
Mathman provided you with the relation:
$$x=\frac{\log(9)}{\log(36)}+\frac{\log(32)}{\log(36)}y$$
which is a linear relationship and as simple as you get.
7. Mar 25, 2010
### Anonymous217
You could of course change the base of the logs and such, but the equation is simplified enough. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850887155806,
"lm_q1q2_score": 0.8170843431068876,
"lm_q2_score": 0.831143054132195,
"openwebmath_perplexity": 394.23431107885244,
"openwebmath_score": 0.6751286387443542,
"tags": null,
"url": "https://www.physicsforums.com/threads/double-variable-equation-how-to-solve.389540/"
} |
c#, wpf
Scan.scanFile(e.FullPath);
}
}
}
}
}
catch (Exception ex) {
GeneralSettings.LogException(ex);
}
} You have a good example of the arrow antipattern here but this can be easily resolved by inverting the conditions and using return.
if (!File.Exists(e.FullPath)) { return; }
_extensionList.RemoveAll(r => string.IsNullOrEmpty(r.Trim()));
_ignoreList.RemoveAll(r => string.IsNullOrEmpty(r.Trim()));
// Checking for match in Extension List
bool _extResult = _extensionList.Any(s => e.FullPath.Contains(s));
if (!_extensionList.Any(s => e.FullPath.Contains(s))) { return ; }
if (_ignoreList.Any(s => e.FullPath.Contains(s))) { return; }
if (GeneralSettings.autoMode)
{
Scan.scanFile(e.FullPath);
return;
}
App.Current.Dispatcher.Invoke(delegate { | {
"domain": "codereview.stackexchange",
"id": 14496,
"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",
"url": null
} |
gazebo, exploration, turtlebot, explore, package
[Edit 5] Here is the rxgraph that I have. Wouldn't I need to connect one of the Kinect_Laser nodes to move_base? How can I do that? I'm quite a newbie...
[Edit 6] I just made a little progress. I modified costmap_common.yaml and now the robot is moving around (very very slowly). The map is still blank and I still receive warnings related to base_scans. Here's what I changed (but I don't even know what I'm doing!).
map_type: costmap
transform_tolerance: 0.5
obstacle_range: 2.5
max_obstacle_height: 2.0
raytrace_range: 3.0
inscribed_radius: 0.35
circumscribed_radius: 0.4
inflation_radius: 0.6
cost_scaling_factor: 15.0
lethal_cost_threshold: 100
observation_sources: base_scan **//Changed this to kinect_laser**
base_scan: {sensor_frame: base_laser_link, data_type: LaserScan, expected_update_rate: 0.2,
observation_persistance: 0.0, marking: true, clearing: true}
Originally posted by Zayin on ROS Answers with karma: 343 on 2013-05-27
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 14319,
"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": "gazebo, exploration, turtlebot, explore, package",
"url": null
} |
For example, consider the functions shown in (Figure) (d), (e), and (f). Correspondingly, a metric space has the Heine–Borel property if every closed and bounded set is also compact. Are you sure you want to do this? It states that if f is a continuous function on a closed interval [a, b], then the function f has both a minimum and a maximum on the interval. In this section we learn the definition of continuity and we study the types of The absolute maximum is shown in red and the absolute minimumis in blue. • Extreme Value Theorem: • A function can have only one absolute maximum or minimum value (y-coordinate), but it can occur at more than one x-coordinate. The Inverse Function Theorem (continuous version) 11. numbers of f(x) in the interval (0, 3). Since the endpoints are not included, they can't be the global extrema, and this interval has no global minimum or maximum. The absolute extremes occur at either the endpoints, x=\text {-}1, 6 or the critical In order to use the Extreme | {
"domain": "waqsp.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631647185701,
"lm_q1q2_score": 0.8344064653798489,
"lm_q2_score": 0.8459424431344437,
"openwebmath_perplexity": 259.6843062088817,
"openwebmath_score": 0.8095170855522156,
"tags": null,
"url": "https://waqsp.org/telescope-price-zwgol/73f536-extreme-value-theorem-open-interval"
} |
algorithms, graphs, clique
Can someone verify if my understanding is correct? Or am I glaringly not understanding a clique? Your understanding is right. So in particular, for any graph $G$ with a clique of size $k$, you will need at least $k$ colors to properly color it. In case this is not obvious, you can think about it via a contradiction. So assume $G$ contains a clique of size $k$, and you have a proper coloring with less than $k$ colors. It follows that the clique contains at least two vertices with the same color. By definition of a clique, these two vertices are adjacent. But this is a contradiction to the coloring being proper. | {
"domain": "cs.stackexchange",
"id": 12285,
"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, graphs, clique",
"url": null
} |
quantum-mechanics, homework-and-exercises, operators, commutator, eigenvalue
The Hilbert space $H$ is an orthogonal direct sum of the eigenspaces $H_j$ of $J^2$:
$$H = \oplus_{j}H_j \tag{1}$$
where, obviously, $$J|_{H_j}= j(j+1)I\:.\tag{2}$$
Since $A$ and $J_k$ commute with $J^2$, every $H_j$ is invariant under the action of these operators:
$$A(H_j) \subset H_j\:,\quad J_k(H_j) \subset H_j\:.\tag{3}$$
It is cleat that (1) and (3) imply that $A$ is known provided it is known in each subspace $H_j$.
I therefore henceforth consider the restrictions $A|_{H_j}$ and $J_z|_{H_j}$ to a generic $H_j$, considering $H_j$ as the Hilbert space of the theory, though I will use the simpler notation $A$ and $J_j$ in place of $A|_{H_j}$ and $J_z|_{H_j}$.
Since $A$ and $J_z$ commute, it may happen that, $A=f(J_z)$ for some non-constant function $f$. In other words, an eigenvector $|j,m\rangle$ of $J_z$ with eigenvalue $m$ is also an eigenvector of $A$ with eigenvalue $f(m)$ for some non-constant function $f$. | {
"domain": "physics.stackexchange",
"id": 44134,
"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, homework-and-exercises, operators, commutator, eigenvalue",
"url": null
} |
What do I start off with? I hope I've made my question clear enough.
Thanks to @Brian M. Scott.
$P.S:$ Does anyone have any other methods? Brian's works perfectly, but it's always great to know more than one method. :)
First get a non-zero entry in the upper lefthand corner by swapping to rows if necessary. If that entry is $a_{11}\ne 0$, multiply the first row by $a_{11}^{-1}$ to get a $1$ in the upper lefthand corner. Now use operation (2) to get $0$’s in the rest of the first column.
Now get a non-zero entry in the $a_{22}$ position, the second entry in the second row, by swapping the second row with one of the lower rows if necessary, and multiply the (possibly new) second row by $a_{22}^{-1}$ to get a $1$ in the $a_{22}$ position. Then use operation (2) to get $0$’s in the rest of the second column; notice that since $a_{21}$, the first element in the second row, is $0$, this will not affect anything in the first column.
At this point your matrix looks like this: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9835969694071562,
"lm_q1q2_score": 0.8320664176295582,
"lm_q2_score": 0.8459424373085146,
"openwebmath_perplexity": 161.59081013551452,
"openwebmath_score": 0.7999989986419678,
"tags": null,
"url": "https://math.stackexchange.com/questions/493264/finding-the-inverse-of-a-matrix-by-elementary-transformations"
} |
slam, navigation, mapping, realsense-camera, rtabmap-ros
Originally posted by Icehawk101 on ROS Answers with karma: 955 on 2016-04-04
Post score: 0
Original comments
Comment by matlabbe on 2016-04-04:
If you subscribe to /rtabmap/cloud_map in RVIZ, do you see something? If you see only the current camera cloud, the map may not be published. Do you have warnings on the terminal?
Comment by Icehawk101 on 2016-04-04:
You are most wise. I am not in fact receiving a map. The terminal states
[ WARN] [1459799675.240846585]: Cloud map is empty! (clouds=64) | {
"domain": "robotics.stackexchange",
"id": 24305,
"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": "slam, navigation, mapping, realsense-camera, rtabmap-ros",
"url": null
} |
# Raise equation number position from new line
I am trying to write an equation in a multicolumn environment and while there is space on the final line for the equation number, LaTeX is seemingly putting it on a new line.
\documentclass[a4paper, 12pt]{article}
\usepackage{lipsum, amsmath, multicol, geometry}
\geometry{left=20mm, right=20mm, top=20mm, bottom=20mm}
\begin{document}
\begin{multicols}{2}
Using central differences for the first and second order derivative our numerical scheme becomes
\begin{aligned} h_j^{n+1} = h_j^n &+ \dfrac{\Delta t \left(h_j^n\right)^3}{(\Delta x)^2} \left(h_{j+1}^n - 2 h_j^n + h_{j-1}^n\right)\\ &+ \dfrac{3\Delta t \left(h_j^n\right)^2}{4(\Delta x)^2} \left(h_{j+1}^n - h_{j-1}^n\right) \end{aligned} \label{eqt:numerical_scheme}
where we notice something\\
\lipsum[2]
\end{multicols}
\end{document}
gives the following: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9597620539235895,
"lm_q1q2_score": 0.8338669712661707,
"lm_q2_score": 0.8688267762381844,
"openwebmath_perplexity": 5009.498193520679,
"openwebmath_score": 0.9438890814781189,
"tags": null,
"url": "https://tex.stackexchange.com/questions/336607/raise-equation-number-position-from-new-line"
} |
algorithms, computational-geometry
Title: Fast algorithm for interpolating data from polar coordinates to cartesian coordinates I have a set of solution nodes generated over a polar grid. I would like to convert / interpolate these solution nodes onto a Cartesian grid:
That is, using the image above, for each node in the Cartesian grid I would interpolate a value from the closest existing nodes (red). | {
"domain": "cs.stackexchange",
"id": 17842,
"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, computational-geometry",
"url": null
} |
Then observe that $$g(t)=f(t)-t=\frac{1-t^2}{2t}$$ is positive on $(0,1)$ and negative on $(1,+\infty)$.
For each fixed $x>0$, the sequence $u_n(x)$ is defined recursively by $u_1(x)=x$ and $u_{n+1}(x)=f(u_n(x))$. The behavior of this sequence depends on the position of $x$ with respect to $1$.
If $x=1$, then it is a fixed point of $f$ so $U_n(1)=1$ for all $n$ and it converges to $u(1)=1$.
Now fix $x>1$. First prove by induction that $U_n(x)>1$ for all $n$, using the study of $f$ above. Next deduce from the study of $g$ that $u_{n+1}(x)=f(u_n(x))<u_n(x)$ for all $n$. It follows that the sequence $(u_n(x))$ is decreasing and bounded below by $1$, so it converges to $u(x)\geq 1$. Now $u(x)$ has to fulfill the condition $u(x)=f(u(x))$ (by passing to the limit in $u_{n+1}(x)=f(u_n(x))$). This yields the quadratic equation $u(x)^2-1=0$, so $u(x)=1$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9877587232667824,
"lm_q1q2_score": 0.8052530094991218,
"lm_q2_score": 0.8152324960856177,
"openwebmath_perplexity": 63.651867846591784,
"openwebmath_score": 0.9967452883720398,
"tags": null,
"url": "http://math.stackexchange.com/questions/290519/uniform-convergence-of-a-sequence-of-functions"
} |
ros, ros-melodic
Comment by Hypomania on 2019-01-14:
@PeteBlackerThe3rd, initially I thought his ws wasn't source. If it's not sourced it won't get recognized by bash (correct me if I am wrong), is that still irrelevant to the question?
Comment by PeteBlackerThe3rd on 2019-01-14:
That's true, but the question was about compiling multiple binaries. The first binary was okay, then the problem appeared when they tried to compile a second binary. Plus the actual fault in this case was the CMakeLists.txt so that should be the focus of the answer.
Comment by Hypomania on 2019-01-15:
@PeteBlackerThe3rd, that makes sense, I will edit it out. | {
"domain": "robotics.stackexchange",
"id": 32265,
"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-melodic",
"url": null
} |
ros
[ INFO] [1498670594.324989399]: Param 'default_workspace_bounds' was not set. Using default value: 10
[ INFO] [1498670594.326292634]: Param 'start_state_max_bounds_error' was set to 0.1
[ INFO] [1498670594.327329008]: Param 'start_state_max_dt' was not set. Using default value: 0.5
[ INFO] [1498670594.328605490]: Param 'start_state_max_dt' was not set. Using default value: 0.5
[ INFO] [1498670594.329608009]: Param 'jiggle_fraction' was set to 0.05
[ INFO] [1498670594.330761821]: Param 'max_sampling_attempts' was not set. Using default value: 100
[ INFO] [1498670594.330875370]: Using planning request adapter 'Add Time Parameterization'
[ INFO] [1498670594.330927659]: Using planning request adapter 'Fix Workspace Bounds'
[ INFO] [1498670594.330961864]: Using planning request adapter 'Fix Start State Bounds'
[ INFO] [1498670594.330988864]: Using planning request adapter 'Fix Start State In Collision' | {
"domain": "robotics.stackexchange",
"id": 28240,
"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",
"url": null
} |
evolution, toxicology, vertebrates
Another Zimmer piece specifically points out research purporting to show that snake venom genes are much older than snakes, maybe 200 million years old. That gets around but doesn't quite answer your question. An older review tried to coalesce things (as best as he could in '92), spending time focusing on insectivora and dealing with mammals. The theory is that while venom is an excellent advantage, it requires a significant investment and is often slow-working. In a world with sharp teeth capable of tearing, venom may not be necessary. Mammals, for example, might evolve to not use venom, as it may not be suitable for their high daily energy demands. The pdf linked above briefly touches on the concept of "reverse recruitment," where venom genes may be usefully re-purposed for other biological processes.
Reference: | {
"domain": "biology.stackexchange",
"id": 10175,
"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": "evolution, toxicology, vertebrates",
"url": null
} |
visible-light, reflection
at light from a virtual image that is as far beyond your screen as the real source of light is from the iPad screen. So if the lamp is, say, 3 metres behind your shoulder, when you look at the iPad screen the reflected light is exactly like that from a lamp 3 metres beyond you iPad screen ahead of you. Put simply, you are looking at light diverging from a distant source, not from the iPad screen, so it will look blurry to you if a lamp that is really 3 metres beyond your iPad screen is blurry. | {
"domain": "physics.stackexchange",
"id": 12120,
"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": "visible-light, reflection",
"url": null
} |
astronomy, experimental-physics, measurements, signal-processing
Putting this principle to use, one can see that the timescales worth probing will tend to get longer as the sizes of the sources get larger. One such example is found in reverberation mapping of active galactic nuclei. In that technique, the clouds orbiting the central supermassive black hole and its accretion disk are lit up by flares of activity in the central engine. These clouds (comprising the broad-line region) orbit at roughly $100\ \mathrm{AU}$, and the geometry of the situation means different clouds are seen by us to light up at different times. There are many fascinating things you can do with this information (see [4] for a review), but the take-away message is that sometimes things simply take a long time to change, especially when they are so far away that we can only see them because they are large.
Conclusion | {
"domain": "physics.stackexchange",
"id": 9517,
"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": "astronomy, experimental-physics, measurements, signal-processing",
"url": null
} |
catkin, ros-kinetic, cmake
How can I link properly these executables? Is it ok to call find_package(catkin REQUIRED COMPONENTS ...) several times?
No, that won't work (due to caching, CMake may not actually even call find_package() again).
A work-around could be to not use find_package(catkin .. COMPONENTS ..), but to find_package(..) each of your dependencies separately (so find_package(sensor_msgs REQUIRED) and find_package(std_msgs REQUIRED)) and then manually add the results of those calls to the include and link paths of the respective binaries.
how about the include_directories statements?
CMake supports per target properties, such as include and link paths (with either set_target_properties(..) or target_include_directories(..)). You could use those.
But an observation: if the executables are really so different that they don't have (m)any shared dependencies, I would ask myself whether these executables should be hosted by the same package.
Perhaps they should be in a package of their own. | {
"domain": "robotics.stackexchange",
"id": 32044,
"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": "catkin, ros-kinetic, cmake",
"url": null
} |
soft-question, perturbation-theory, models, approximations
There is nothing wrong with perturbation theory, or with theories with known, restricted accuracy. The point of theory is to explain the results of observation from as simple an initial theoretical standpoint as possible. Therefore: | {
"domain": "physics.stackexchange",
"id": 10602,
"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": "soft-question, perturbation-theory, models, approximations",
"url": null
} |
and is now frequently used by physicians who may be unaware of the formula involved …. And it calculates that probability using Bayes' Theorem. Probability assignment to all combinations of values of random variables (i. CENTRAL LIMIT THEOREM. We use the Bayes' formula to compute the conditional probability. Bayes’ theorem was developed by Rev. Return to home page of Bayesian Research Conference. An important theorem in statistics and the cornerstone of Bayesian statistics is Bayes' Law (also known as Bayes' theorem), to calculate the probability of each. Enter PREVALENCE, SENSITIVITY, and SPECIFICITY:. The Theorem was named after English mathematician Thomas Bayes (1701-1761). rain or no rain, health or disease, true radar echo or false. ayes Theorem. In 12 samples, 8 red and 4 blue chips showed up. Calculating posterior belief using Bayes Theorem. Find the Equation of the Line (Fraction Slope) graph Untitled 10. This Excel file shows examples of implementing Bayes Theorem for a | {
"domain": "rameshzawar.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9907319888082727,
"lm_q1q2_score": 0.8256013397878615,
"lm_q2_score": 0.8333246015211008,
"openwebmath_perplexity": 594.636723227159,
"openwebmath_score": 0.7035920023918152,
"tags": null,
"url": "https://rameshzawar.com/8vkhpop/pb3e.php?pjh=bayes-theorem-calculator"
} |
php, performance, random, xml
function rightAds($departmentName, $displayNumber) {
static $ads = null;
if (!$ads) {
$ads = unserialize(file_get_contents(__DIR__ . "/smallAdsByDepartment.ser"));
}
$pt = $departmentName === "pt";
/* @var $ad Ad */
foreach ($ads as $delta => $ad) {
if (strpos($ad->departmentName, $departmentName) !== false || strpos($departmentName, "all") !== false) {
$noPT = strpos($ad->departmentName, "noPT") !== false;
if (($pt && $noPT) || (strpos(__DIR__, "pt") !== false && basename($_SERVER["REQUEST_URI"]) === "admissions.php" && $noPT) || ($departmentName === "cls" && strpos($ad->departmentName, "noCLS") !== false)) {
unset($ads[$delta]);
}
}
} | {
"domain": "codereview.stackexchange",
"id": 8345,
"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, performance, random, xml",
"url": null
} |
boundary conditions, and the Fitzhugh-Nagumo equations with homogeneous Neumann boundary conditions. In addition, there is a Dirichlet boundary condition, (given temperature ), at. 6 Truncation error, consistency and convergence) we shall see that there is however a severe problem with this scheme. Learn vocabulary, terms, and more with flashcards, games, and other study tools. Lectures on PDEs- APMA- E6301 DRAFT IN PROGRESS Michael I. In this paper we propose a saddle point approach to solve boundary control problems for the steady Navier-Stokes equations with mixed Dirichlet-Neumann boundary conditions, both in two and three dimensions. Three stochastic-based methods are proposed for solving unsteady scalar transport problems in bounded, single-phase domains. We also de ne the parabolic boundary @ pQ T of to the inhomogeneous heat equation @ tu [email protected] x (1. The specification of appropriate boundary and initial. A New Method of Imposing Boundary Conditions in Pseudospectral | {
"domain": "auit.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682478041813,
"lm_q1q2_score": 0.8128722891905571,
"lm_q2_score": 0.8221891327004133,
"openwebmath_perplexity": 666.6580393036137,
"openwebmath_score": 0.8180767297744751,
"tags": null,
"url": "http://qxvy.auit.pw/2d-heat-equation-neumann-boundary-conditions.html"
} |
python, python-3.x, numpy
for combination in itertools.permutations(group_numbers):
if OPERATORS[operation].reduce(combination, dtype=float) == target:
return True
return False
def is_valid_sum(board, instructions, groups):
for group in groups:
if not check_group(board, instructions, group):
return False
return True
def solve_board(board, instructions, groups):
empty_rows, empty_cols = np.where(board == 0)
try:
i, j = next(zip(empty_rows, empty_cols))
except StopIteration:
# Board is full
return is_valid_sum(board, instructions, groups)
row = board[i]
column = board[:, j]
for number in valid_number(row, column, *row.shape):
board[i, j] = number
if solve_board(board, instructions, groups):
return True
board[i, j] = 0
return False
def solve(instructions):
size = len(instructions)
board = np.zeros((size, size), dtype=int) | {
"domain": "codereview.stackexchange",
"id": 35116,
"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, numpy",
"url": null
} |
formatting, vb6
I always remember the type of control much more readily than I remember its name) and "member" prefixes (e.g., m_). Aside from that, the only prefixes you should be using are meaningful semantic ones, in the Apps Hungarian vein. | {
"domain": "codereview.stackexchange",
"id": 23509,
"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": "formatting, vb6",
"url": null
} |
python, game, finance
elif deltasell == 4:
pstock.Stock -= 4
p.money += pstock.value
p.money += pstock.value
p.money += pstock.value
p.money += pstock.value
print("Transaction Successful")
Home()
elif deltasell == 5:
pstock.Stock -= 5
p.money += pstock.value
p.money += pstock.value
p.money += pstock.value
p.money += pstock.value
p.money += pstock.value
print("Transaction Successful")
Home() | {
"domain": "codereview.stackexchange",
"id": 29986,
"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, game, finance",
"url": null
} |
c#, multithreading, socket, chat
while (true)
{
var socket = serverSocket.Accept();
// Factory-Method which internally creates a ChatConnection, starts the thread etc.
var chatConnection = ChatConnection.Start(socket);
_chatConnections.Add(chatConnection);
} | {
"domain": "codereview.stackexchange",
"id": 25439,
"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, socket, chat",
"url": null
} |
of its diameter. 4 Volumes of Cones 319 Find the volume V or height h of the cone. The total Section 6-5 : More Volume Problems. Word problems on Volume of Cones, Cylinders, and Spheres Home >> Online Math Tutoring >> 8th Grade Math Tutoring >> Word problems on Volume of Cones, Cylinders, and Spheres Volume of Cone Start studying Volume word problems. What is the ratio of the radius of the bottom base of the truncated cone to the radius of the top base of the truncated cone? Slant Height: The slant height of a frustum of a right circular cone is the length of the line segment joining the extremities of two parallel radii, drawn in the same direction, of the circular bases. Let's call this width threshold width. This quiz/worksheet combination will test your knowledge of the volume of three-dimensional shapes such as cylinders, cones, and spheres by way of practice problems. Find the curved and total surface area and the volume Frustum of a Cone A solid is obtained by cutting a right | {
"domain": "kristinavitalis.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9927672370524974,
"lm_q1q2_score": 0.8093361149226344,
"lm_q2_score": 0.8152324983301568,
"openwebmath_perplexity": 583.2908903722966,
"openwebmath_score": 0.6182653903961182,
"tags": null,
"url": "http://kristinavitalis.com/9rgezjb/fs8deid.php?tynundghs=volume-of-a-cone-problems"
} |
python, vcf, snp, gwas
HOR_15401 HOR_18381 HOR_4034 HOR_16078 HOR_12072 HOR_13716 HOR_4403 HOR_4829 HOR_11431 HOR_4138 HOR_2290 HOR_15788 HOR_7552 HOR_10775 HOR_3153 HOR_14689 HOR_11126 HOR_2180 HOR_2369 HOR_1044 HOR_21428 HOR_18220 HOR_3359 HOR_15778 HOR_15840 HOR_18364 HOR_9250 HOR_11922 HOR_3926 HOR_7474 HOR_12830 HOR_5020 HOR_11450 HOR_9492 HOR_5373 HOR_18913 HOR_12791 | {
"domain": "bioinformatics.stackexchange",
"id": 1508,
"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, vcf, snp, gwas",
"url": null
} |
• Doh, you are right. I guess I was just specifically looking for a Cauchy Schwarz proof. – Thomas Ahle May 10 '14 at 15:49
• @ThomasAhle, Let $t=sign(\langle v, w\rangle)$, then $$\| v+tw\|^2=\| v\|^2+2t\langle v, w\rangle +\|w\|^2,$$ but $\|v+tw\|\let \|v\|+\|w\|$, then $$\|v+tw\|^2\leq\|v\|^2+2\|v\|\|w\| +\|w\|^2.$$ Thus $$t\langle v,w\rangle\leq \|v\|\|w\|$$ i.e., $$|\langle v,w\rangle|\leq \| v\|\|w\|.$$ – user73454 May 10 '14 at 16:30
• @ThomasAhle, there is problem on to compile, but let $t=sign(\langle v,w\rangle)$, then $$|v+tw|^2=|v|^2+2t\langle v,w\rangle+|w|^2$$ but $|v+tw|\leq |v|+|t||w|\leq |v|+|w|$, then $$|v + tw|^2\leq |v|^2+2|v||w|+|w|^2.$$ Thus $$t\langle v,w\rangle=|\langle v,w\rangle|\leq |v||w|.$$ – user73454 Dec 29 '14 at 18:20 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631627142337,
"lm_q1q2_score": 0.8219606793165893,
"lm_q2_score": 0.8333245911726382,
"openwebmath_perplexity": 455.38064937619333,
"openwebmath_score": 0.9862048625946045,
"tags": null,
"url": "https://math.stackexchange.com/questions/789177/inequality-on-lengths-and-sums-of-vectors-left-lvert-sum-i-veca-i-right-rve/789197"
} |
telescope, angular-resolution, refractor-telescope
There's a lot of reading you could do, and there is a lot of experimentation. Here are some older topics on this stack:
How much magnification is needed to see planets of solar system?
First night on a telescope questions
Best telescope for the viewing of Nebulae, Stars and Planets
Please Guide me to buy my first Telescope | {
"domain": "astronomy.stackexchange",
"id": 2194,
"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": "telescope, angular-resolution, refractor-telescope",
"url": null
} |
python, python-3.x, programming-challenge, dynamic-programming, change-making-problem
def problem_31_b(money, coin_index):
if coin_index < 0:
return 0
if coin_index == 0 or money == 0:
return 1
memo_value = memoiz_list[money][coin_index]
if memo_value is not None:
return memo_value
count = problem_31_b(money, coin_index-1)
coin_value = coin_list[coin_index]
if coin_value <= money:
count += problem_31_b(money-coin_value,coin_index)
memoiz_list[money][coin_index] = count
return count
Also, you could use a decorator to implement your memoization strategy.
Reusing a generic decorator from https://wiki.python.org/moin/PythonDecoratorLibrary#Memoize , you could write:
coin_list = [1,2,5,10,20,50,100,200] | {
"domain": "codereview.stackexchange",
"id": 29377,
"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, programming-challenge, dynamic-programming, change-making-problem",
"url": null
} |
ros, diagnostics, nodelet
Title: Diagnostic Updater Constructor and Nodelets
I'm having a really difficult time using Diagnostic Updater. In general, the DiagnosedPublisher constructor is very strict and requires:
DiagnosedPublisher (const ros::Publisher &pub, diagnostic_updater::Updater &diag, const diagnostic_updater::FrequencyStatusParam &freq, const diagnostic_updater::TimeStampStatusParam &stamp)
which FrequenceyStatusParam requires: FrequencyStatusParam (double *min_freq, double *max_freq, double tolerance=0.1, int window_size=5)
and TimeStampStatusParam optionally requires: TimeStampStatusParam (const double min_acceptable=-1, const double max_acceptable=5)
And even worse, the diagnostic_updater::Updater seems to make its own Nodehandle, so you'll have to call init before declaring it. | {
"domain": "robotics.stackexchange",
"id": 7035,
"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, diagnostics, nodelet",
"url": null
} |
c#, optimization, console
for (int j = 0; j < wordsDist.Count(); j++) // main cycle checking each word for presence in each line
{
for (int i = 0; i < lines.Count(); i++)
{
if (Regex.IsMatch(lines[i].ToLower(), "\\b" + wordsDist[j] + "\\b")) // using ToLower() here, because we can't use it in line 33
{
linesOutput[j] += (i + 1).ToString() + ", "; // adding line numbers according to word
}
}
}
for (int i = 0; i < wordsDist.Count(); i++) // connection of two relative arrays
{
wordsDist[i] += "_______________________________" + linesOutput[i];
wordsDist[i] = wordsDist[i].Remove(wordsDist[i].Length - 2); // removing last ',' char
}
System.IO.File.WriteAllLines(@"D:\output.txt", wordsDist); // writing final output result into txt file
} | {
"domain": "codereview.stackexchange",
"id": 5048,
"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#, optimization, console",
"url": null
} |
photons, quantum-optics
$$ \langle 0| a(\omega_1) a^\dagger(\omega_1) a(\omega_2) a^\dagger(\omega_2)|0\rangle \delta(\omega_1^\prime-\omega_1) \delta(\omega_2^\prime-\omega_2) = \delta(\omega_1^\prime-\omega_1) \delta(\omega_2^\prime-\omega_2)$$
Then the integral above collapses to
$$\int \text{d}\omega_1\text{d}\omega_2|\phi(\omega_1)|^2|\phi(\omega_2)|^2 = 1$$ The two-photon input state as you have defined
$$|\tilde{2}\rangle = \int \text{d}\omega_1\text{d}\omega_2\phi(\omega_1)\phi(\omega_2) a^\dagger(\omega_1)a^\dagger(\omega_2)|0\rangle$$
is not-normalized. Consider
$$\langle \tilde{2}|\tilde{2}\rangle = \int\int
\text{d}\omega_1 \text{d}\omega_2
\text{d}\omega_1^\prime \text{d}\omega_2^\prime
\phi(\omega_1)\phi(\omega_2)
\phi(\omega_1^\prime)\phi(\omega_2^\prime)
\langle 0| a(\omega_1^\prime)a(\omega_2^\prime)
a^\dagger(\omega_1)a^\dagger(\omega_2)|0\rangle\\
\phantom{\langle 2|2\rangle}= \int\int
\text{d}\omega_1 \text{d}\omega_2
\text{d}\omega_1^\prime \text{d}\omega_2^\prime | {
"domain": "physics.stackexchange",
"id": 14428,
"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": "photons, quantum-optics",
"url": null
} |
newtonian-mechanics, forces, angular-momentum, free-body-diagram
in this configuration, gravity then produces a rolling moment towards the right, causing the bike to begin falling to the right. to prevent the bike from going down, the rider then follows the fall and stops it by turning the bar to the right, thereby establishing a bank angle that geometrically cancels the rollover moment.
to stop turning to the right, the rider pushes the bar to rotate the front wheel towards the right, which has the effect of steering the center of support back underneath the center of mass, and the bike comes upright and tracks in a straight line again.
this "backwards" behavior is why people say that to turn a bike to the right, you first have to steer it to the left, and vice versa.
Note that the explanation given above is modified by whether you are traveling slow or fast and whether you are steering into a gradual or a sudden turn. | {
"domain": "physics.stackexchange",
"id": 82810,
"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, angular-momentum, free-body-diagram",
"url": null
} |
machine-learning, python, nlp, machine-translation
model design
evaluation metrics
building training corpora
quality estimation
post-editing
The WMT Shared Tasks offer datasets for these different sub-tasks. Reading the overview paper for a task is a good way to get an idea of what it is and how it's done. | {
"domain": "datascience.stackexchange",
"id": 8183,
"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, python, nlp, machine-translation",
"url": null
} |
python, python-3.x, matrix
def get_rotated_matrix(matrix):
n = len(matrix)
rotated_matrix = [matrix[row_no][:] for row_no in range(n)]
for i in range(n):
for j in range(n):
prev = get_previous_pos(i, j, n)
rotated_matrix[i][j] = matrix[prev[0]][prev[1]]
return rotated_matrix
n = int(input("Enter size of the square matrix: "))
matrix = [[int(input()) for j in range(n)] for i in range(n)]
print("original matrix --> ", matrix)
print("rotated matrix --> ", get_rotated_matrix(matrix)) | {
"domain": "codereview.stackexchange",
"id": 42720,
"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, matrix",
"url": null
} |
fluid-dynamics, turbulence, vortex
Title: Circular flow in a bowl Let us assume we have circular flow in a bowl or a tea cup.
(1) If the velocity of the fluid in the bowl is low, we have laminar flow.
(2) However, to my understanding turbulent flow is defined as the curl of a velocity field, i.e., as soon as we have a vortex-like flow structure, we can speak of turbulence. Independent of the velocity of the flow in the bowl, we get a vortex.
How can I solve this contradiction? Turbulence is a much broader concept, it implies the existence of vorticity and some other features, while vorticity alone does not imply the existence of turbulence. I quote: | {
"domain": "physics.stackexchange",
"id": 51478,
"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": "fluid-dynamics, turbulence, vortex",
"url": null
} |
slam, navigation, rosrun
Title: "rosrun rgbdslam rgbdslam" symbol lookup error, fuerte
Hi,
after compiling rgbdslam successfully, I tried to start rgbdslam. All I got was a "symbol lookup error":
/home/robot/ros/rgbdslam/bin/rgbdslam: symbol lookup error: /home/robot/ros/rgbdslam/lib/libgicp.so: undefined symbol: gsl_multimin_fdfminimizer_vector_bfgs2
After searching the web for a while I found a related topic here.
So I changed the LD_LIBRARY_PATH to /opt/ros/fuerte/lib:/usr/lib and exported it but I didn't fix the error.
GSL Version:libgsl0ldbl 1.15+dfsg-1build1
ROS Fuerte
Ubuntu 12.04
Can somebody help me?
Cheers!
Georg
Originally posted by marvin on ROS Answers with karma: 66 on 2012-09-12
Post score: 2 | {
"domain": "robotics.stackexchange",
"id": 11000,
"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": "slam, navigation, rosrun",
"url": null
} |
to part a ) lies above tangent. F - Focal length, d 0 - Object distance kind of information is when. \Lt x \lt 3\text { which for our function is concaving a is directly related to concavity. The interval because is negative, then the graph of f is concave up, concave down can skip multiplication! Is concaving or more specifically, how it bends interval is said to concave! This page help you to explore polynomials of degrees up to x = 0 is this is! Up, concave down '' Demonstrations and anything technical when \ ( -3 \lt x \lt 3\text { 1... Clear here, means that it 's negative it is concave down, or.. To end our expression 1132, 2000 down at any x-value where the of... To have some constants which can change the way/speed the function is inputted Ch 6 when the denominator is,... Widget for your website, you agree to our Cookie Policy Press, p. 1132, 2000 answers! On the curve where the concavity of the second derivative is monotonic and Products, 6th ed lies above tangent. We need to | {
"domain": "ase.ro",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109529751892,
"lm_q1q2_score": 0.8466062791482967,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 851.8350155067045,
"openwebmath_score": 0.7755292057991028,
"tags": null,
"url": "http://en.famp.ase.ro/a9rto/concave-up-and-down-calculator-wolfram-ab4ba6"
} |
1. The null space of A is the null space of C, N\kern -1.95872pt \left (A\right ) = N\kern -1.95872pt \left (C\right ).
2. The row space of A is the row space of C, ℛ\kern -1.95872pt \left (A\right ) = ℛ\kern -1.95872pt \left (C\right ).
3. The column space of A is the null space of L, C\kern -1.95872pt \left (A\right ) = N\kern -1.95872pt \left (L\right ).
4. The left null space of A is the row space of L, ℒ\kern -1.95872pt \left (A\right ) = ℛ\kern -1.95872pt \left (L\right ).
Proof First, N\kern -1.95872pt \left (A\right ) = N\kern -1.95872pt \left (B\right ) since B is row-equivalent to A (Theorem REMES). The zero rows of B represent equations that are always true in the homogeneous system ℒS\kern -1.95872pt \left (B,\kern 1.95872pt 0\right ), so the removal of these equations will not change the solution set. Thus, in turn, N\kern -1.95872pt \left (B\right ) = N\kern -1.95872pt \left (C\right ). | {
"domain": "ups.edu",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9912886157996523,
"lm_q1q2_score": 0.810452262006744,
"lm_q2_score": 0.8175744673038222,
"openwebmath_perplexity": 2524.8407306079184,
"openwebmath_score": 0.9864891171455383,
"tags": null,
"url": "http://linear.ups.edu/jsmath/latest/fcla-jsmath-latestli35.html"
} |
quantum-field-theory, mathematical-physics, renormalization, regularization
When we move to the practical formalisms of interacting QFT, however, the VEVs predicted by the bare theory are infinite. Renormalization fixes that in a Lorentz invariant way, but it leaves the VEVs a function of the energy scale $\mu$ of the measurements that are involved in an experiment. Thus, one finds that the Wightman functions are now a function of $\mu$ as well as of the points $x_i$, $W_\mu(x_1,x_2,...x_n)$, or, in terms of operators, $W_\mu(f_1,f_2,...f_n)$. [It's perhaps worth noting that we don't know whether these $W_\mu(...)$ satisfy the relationships required for them to be Wightman functions, so that we could reconstruct a Wightman field, but I've never seen a discussion of perturbative QFT conducted in such terms.] The Wightman functions in terms of positions do not encode energy scales, but they are not observables, they are only a template for constructing observables. The fourier transforms of the test functions, $\tilde f_i(k)$, however, already determine various | {
"domain": "physics.stackexchange",
"id": 2616,
"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, mathematical-physics, renormalization, regularization",
"url": null
} |
control, ros, microcontroller, ros-kinetic, network
<!-- Show in Rviz -->
<node name="rviz" pkg="rviz" type="rviz"/>
rosservice call [/namespace]/driver/init
In the terminal of the rosservice this is the error:
ros service call /driver/init
success: False
message: "could not start node 4'"
And this is the error in the terminal of the launch:
[ INFO] [1527765454.881980035]: Initializing XXX
[ INFO] [1527765454.882339672]: Current state: 1 device error: system:0 internal_error:0 (OK)
[ INFO] [1527765454.882559786]: Current state: 2 device error: system:0 internal_error:0 (OK)
[ INFO] [1527765463.106458264]: Current state:2 device error: system:125 internal_error:0 (OK)
[ INFO] [1527765463.106574774]: Current state:0 device error: system:125 internal_error:0 (OK)
[ INFO] [1527765463.106652287]: Current state: 0 device error: system:0 internal_error:0 (OK)
[ INFO] [1527765463.106747207]: Current state: 0 device error: system:0 internal_error:0 (OK) | {
"domain": "robotics.stackexchange",
"id": 30946,
"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": "control, ros, microcontroller, ros-kinetic, network",
"url": null
} |
c, linked-list, memory-management
printf("Deleting: %d\n", *((int *)&x));
printf("Null? %d\n", delete_el(&head, (void *)&x, (int(*)(void*,void*))numcmp)==NULL);
print_list(head);
printf("Freeing p\n");
free(p);
print_list(head);
printf("Inserting %d at position %d\n", *((int *)&y), 5);
insert_el_at(&head, (void *)&y, 4);
print_list(head);
destroy_node(delete_at(&head, 10000));
print_list(head);
printf("Size: %d\n", size(head));
free_list(head);
return 0;
}
*/ There are multiple issues with your code. The most obviously wrong is the use of double-pointers everywhere.
For example:
void insert_node_head(struct dl_list **list, struct node *temp){
if(is_empty(*list)){
(*list)->head = (*list)->tail = temp;
++(*list)->size;
return;
} | {
"domain": "codereview.stackexchange",
"id": 5453,
"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",
"url": null
} |
python, python-2.x, file-system
def delete_resource(self, src_path):
dest_path = self.get_remote_path(src_path)
logger.info('Deleting %s:%s' % (self._ssh_prefix, dest_path))
try:
self._connection.execute('rm -rf "' + dest_path + '"')
except Exception as e:
logger.error('Caught exception while deleting:')
logger.exception(e)
def move_resource(self, src_path, dest_path):
logger.info('Moving\n\t%s:%s\nto\n\t%s:%s' %
(self._ssh_prefix, self.get_remote_path(src_path), self._ssh_prefix, self.get_remote_path(dest_path)))
try:
# Make sure the intermediate destination path to this file actually exists on the remote machine
self._connection.execute('mkdir -p "' + os.path.split(dest_path)[0] + '"')
self._connection.execute('mv "' + src_path + '" "' + dest_path + '"')
except Exception as e:
logger.error('Caught exception while moving:')
logger.exception(e)
class SFTPConnection: | {
"domain": "codereview.stackexchange",
"id": 1064,
"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, file-system",
"url": null
} |
civil-engineering
Title: What is "hyperstatic moment"?
Above is a picture I found online, showing a prestressed concrete beam. It mentions a "hyperstatic moment". | {
"domain": "engineering.stackexchange",
"id": 3757,
"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": "civil-engineering",
"url": null
} |
continuum-mechanics, soft-matter
It is analogous to writing an equation for the simple harmonic oscillator like this:
$$
\frac{d X}{dt} = -\frac{dV}{dX} = -KX = F(X)
$$
where the potential is $V(X)=\frac{1}{2}KX^2$ and $F(X)=-KX$ is the force. This is not Newtonian or Hamiltonian mechanics: it is the mechanics of Aristotle, where the velocity is proportional to the force.
It can be derived from Hamiltonian mechanics by adding frictional damping to a harmonic oscillator, and considering the overdamped regime. That is, we write
$$
\frac{dX}{dt} = \frac{P}{M},\qquad \frac{dP}{dt} = F(X)-\zeta P
$$
and take the overdamped limit, so that $dP/dt=0$, hence $P=F(X)/\zeta$,
giving
$$
\frac{dX}{dt} = \frac{F(X)}{M\zeta} .
$$
The constants $M\zeta$ can be combined into the expression for $F(X)$. | {
"domain": "physics.stackexchange",
"id": 54278,
"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": "continuum-mechanics, soft-matter",
"url": null
} |
moon, celestial-mechanics
$$m \omega^2 r = \frac{GM_{moon}m}{r^2}$$
with $G=6.7\cdot 10^{-11}$, $M_{moon}=7.3\cdot 10^{22} kg$, $r_{moon}=1740 km$, we find
$$\omega=\sqrt{\frac{GM_{moon}}{r^3}}=0.0092 rev/min = 0.55 rev/hour$$
It is interesting to see that the result has the ratio of mass and the third power of the radius - in other words it depends on the density and not the size. Whether the moon consists of loose dust that will just fly apart when you reach this speed is another question - not one you asked.
You asked for rev/minute but that's a hard number to grok. Note that one lap per two hours is what you would have to do in order to remain "in orbit" at the surface of the moon. Interestingly, the Apollo 11 command module (piloted by Michael Collins, the least known of the three astronauts that formed the crew of Apollo 11) was orbiting at about 60 nautical miles, and going around once in just about 2 hours. Pretty similar... And that was no coincidence. | {
"domain": "physics.stackexchange",
"id": 16165,
"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": "moon, celestial-mechanics",
"url": null
} |
AUDIENCE: Zeta.
GILBERT STRANG: Who? C? Hell with that. Who knows one I can write?
AUDIENCE: Alpha.
GILBERT STRANG: Alpha. Good, alpha. Yes, alpha. Right. So alpha is the eigenvalues of this rank 2 change. OK. Now, what am I going to be able to say? Can I say anything about the-- well, of course, alpha 1 is bigger than lambda 1, which was bigger than-- eigenvalues are going up, right? I'm adding positive definite or positive semidefinite stuff. There's no way eigenvalues can start going down on me.
So alpha 1 is a greater or equal to the lambda 1, which had just a rank 1 change, which is greater or equal to the-- mu, was it mu?
AUDIENCE: Gamma.
GILBERT STRANG: Gamma. Gamma 1, and so on. OK, now, let's see, is gamma 1 bigger than alpha-- what am I struggling to write down here? What could I say? Well, what can I say that reflects the fact that this lambda 2-- or sorry, so gamma 1 went up. Gamma 1 was bigger than lambda 2. That was the point here. Gamma 1 is bigger. | {
"domain": "mit.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9877587232667825,
"lm_q1q2_score": 0.8509918800373479,
"lm_q2_score": 0.8615382076534743,
"openwebmath_perplexity": 579.5582326369798,
"openwebmath_score": 0.8125327229499817,
"tags": null,
"url": "https://ocw.mit.edu/courses/mathematics/18-065-matrix-methods-in-data-analysis-signal-processing-and-machine-learning-spring-2018/video-lectures/lecture-15-matrices-a-t-depending-on-t-derivative-da-dt/"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.