text stringlengths 70 452k | dataset stringclasses 2
values |
|---|---|
How to get keyof typeof x when x is [key in string]: any
I have the object x with the type [key in string]: any. I want to get key of type of x but when I do keyof typeof x, it's string. How can I get the keys of x?
My code. InbuiltRuleNames is string.
export type InbuiltRuleNames = keyof typeof rules;
// OBS: DONT CH... | common-pile/stackexchange_filtered |
Jade rendering engine for Laravel5?
Is there actually a Jade template engine for Laravel5?
Jade code would be much easier to develop with, and - it would produce a compact HTML code.
You can use build tools to compile Jade to HTML. https://github.com/gruntjs/grunt-contrib-jade
I am new to Laravel since today, figuri... | common-pile/stackexchange_filtered |
Finding $h(n)$ such that $h(n)/f(n) \rightarrow \infty$ and $h(n)/g(n) \rightarrow 0$
Suppose we have a function $f(n) = n^a$ for some fixed $a>0$ and another function $g : \mathbb{N} \rightarrow \mathbb{R}$ with $g(n) \rightarrow \infty$ such that $g(n)/f(n) \rightarrow \infty$ as $n \rightarrow \infty$. I.e. $g$ grow... | common-pile/stackexchange_filtered |
Why mean life of radioactive element is slightly greater than halflife..?
I was reading radioactivity where I find that half life of a radioactive material is less than mean life due the presence of $\log2$ in the numerator:
$$ t_{1/2} = \frac{0.693}{\lambda} $$
But how what does it mean that the mean life is greater t... | common-pile/stackexchange_filtered |
Layers in Leaflet.Draw is different every time
What I want:
To click delete, choose drawn layers, and delete them from the UI and firestore when clicking save
How I have it now:
Every time i am creating a new leaflet.Draw layer (ex. a rectangle), I save it to firestore, delete all, and create every layer again. This is... | common-pile/stackexchange_filtered |
PostGres - How to return null date in query
I have the following function definition:
CREATE FUNCTION accounting.func_getData(inputBusinessId bigint, injectionId bigint, inputEndDate DATE) RETURNS TABLE (
categoryName TEXT,
amount DECIMAL,
startDate DATE,
endDate DATE
) LANGUAGE plpgsql AS $$
BEGIN... | common-pile/stackexchange_filtered |
Rust read last x lines from file
Currently, I'm using this function in my code:
fn lines_from_file(filename: impl AsRef<Path>) -> Vec<String> {
let file = File::open(filename).expect("no such file");
let buf = BufReader::new(file);
buf.lines().map(|l| l.expect("Could not parse line")).collect()
}
How can I... | common-pile/stackexchange_filtered |
ConEmu + WSL: Open new console in current tab directory
I'm using WSL and ConEmu build 180506. I'm trying to setup a task in ConEmu to use the current directory of the active tab when opening a new console but I cannot get it to work.
What I did is to setup the task {Bash: bash} using the instructions on this page
sett... | common-pile/stackexchange_filtered |
TDateTime To ShortDateString In Satellite Forms "VB-clone"
I am trying to find a calculation that will convert the TDateTime value 40653.6830593 into a year, a month, a day, an hour, a minute and a second.
I am sure this is possible, of course, but my brain doesn't have the power, it seems, to write a formula that will... | common-pile/stackexchange_filtered |
raphael.js passing parameter using the .data() method
I'm trying to use the .data method on raphael.js.
var r = Raphael('diagram', width, width);
[...]
var z = r.path().attr({ arc: [value, color, rad], 'stroke-width': width/24 });
z.data({"entry": entry});
z.mouseover(function(){
this.animate({ 'stroke... | common-pile/stackexchange_filtered |
Metric to track actual CPU usage
I've been a bit confused by the metrics available for monitoring CPU usage and what I'm looking for is to track actual CPU usage (not just increases) over time.
kube-state-metrics exposes a container_cpu_usage_seconds_total metric which is a cumulative value represented as core-seconds.... | common-pile/stackexchange_filtered |
$ \frac{a^{2}}{a+2 b^{3}}+\frac{b^{2}}{b+2 c^{3}}+\frac{c^{2}}{c+2 a^{3}} \geq 1 $
Question
Let.a, $b, c$ be positive real numbers with sum 3 . Prove that
$$
\frac{a^{2}}{a+2 b^{3}}+\frac{b^{2}}{b+2 c^{3}}+\frac{c^{2}}{c+2 a^{3}} \geq 1
$$
my doubt -
by using cauchy reverse technique i have estimate the given expressio... | common-pile/stackexchange_filtered |
Potassium permanganate and hydrogen peroxide decomposition
I saw a reaction by chemicalforce on YouTube where he decomposed $\ce{H2O2}$ into $\ce{H2O}$ and $\ce{O2}$ using potassium permanganate. The permanganate is a catalyst in the reaction.
I am wondering if this decomposition occurs because the initial $\ce{H2O2}$ ... | common-pile/stackexchange_filtered |
Download a file using file ID in google app script
I have a drive link to the CSV file that should be downloaded to my local machine. But not sure about how to do that. I can get the file name from the file ID. I am not clear on how to download the file.
function myFunction() {
var fileID = '1e598PoBd76cALrawCR5mrKA... | common-pile/stackexchange_filtered |
Spring JMS configuration of a queue Consumer
I am trying to run a very basic application to learn Spring JMS + ActiveMQ. I see my Producer creating the message (sysout), but nothing shows up in my Consumer and no exception is thrown. I think I am missing something simple here; would really appreciate any help.
[EDITED,... | common-pile/stackexchange_filtered |
Does xcode support tab controls?
I am developing a dashboard system which I need to split the app's screen into 4 blocks. Each block needs to have a page/tab control with different tabs such as day, month, week, etc
Is this not supported in xcode? I can only see references to a tab control where the tabs are at the bo... | common-pile/stackexchange_filtered |
Where does discrete probabilities in Forward-Backward algorithm for Hidden Markov Models come from?
I am trying to derive a Forward-Backward algorithm used in Hidden Markov Models to compute the likelihood $P(x | \theta)$ that sample $x = (x_1, ... x_n)$ comes from HMM defined by set of parameters $\theta$ which includ... | common-pile/stackexchange_filtered |
Generate keys on smartcard with given exponent
I am generating keys on a smartcard with OpenSC. Is it possible to specify a certain exponent to use? Currently I am calling sc_pkcs15init_generate_key() to generate the key pair. But I did not find a way to set the exponent.
I am aware, that it is possible to generate the... | common-pile/stackexchange_filtered |
Is it necessary to have static constructors when we follow the "RAII " way of doing things in C++?
If I were to follow the RAII rule and would be developing a class in C++, would it be necessary to have static constructors? Will static constructors help me in any way or would be a wrong step to do?
are there static c... | common-pile/stackexchange_filtered |
IPC between multiple pods on same kubernetes node
I know that containers in a Pod can share data with each other via shared memory.
But, i have not found a way to use shared memory between Pods.
Is it possible by enabling HostIPC in Pod Security Policies?
https://kubernetes.io/docs/concepts/policy/pod-security-polic... | common-pile/stackexchange_filtered |
What is the simplest way to expand a slice to its capacity?
I have a program that uses a buffer pool to reduce allocations in a few performance-sensitive sections of the code.
Something like this: play link
// some file or any data source
var r io.Reader = bytes.NewReader([]byte{1,2,3})
// initialize slice to max expe... | common-pile/stackexchange_filtered |
Is My Reactjs Components too Granular?
I am playing around with Reactjs and I am wondering if I broken out my components too much.
<script type="text/babel">
class MainCompoent extends React.Component {
constructor() {
super();
this.state = {
items : [
... | common-pile/stackexchange_filtered |
What's the correct SQL Server syntax for a script that will create a table if it doesn't exist or else alter it to add new columns?
Not sure if I should have gone to DBA.StackExchange with this but I'm a software developer needing to add columns to an existing back-end database table called T with existing columns I, J... | common-pile/stackexchange_filtered |
Improving braking performance of long reach Tektro R559 calipers?
I've been gradually restoring an old Fuji 3-speed, and I'm looking to improve the braking performance. Right now, if I have any speed at all, I feel like I can barely get enough braking power to come to a stop. In particular, the rear brake feels very we... | common-pile/stackexchange_filtered |
Comparing percent change of model coefficients
I am working through step 3 of purposeful model-building from Hosmer-Lemeshow and it suggests to compare the percent change in coefficients between a full model [Iris.mod1] and a reduced model [Iris.mod2]. I would like to automate this step if possible.
Right now I have th... | common-pile/stackexchange_filtered |
How can I put Kendo controls in a Partial View?
I'm putting a Kendo Tabstrip in one of the areas in my C# MVC project.
<div id="tabstrip">
<ul>
<li class="k-state-active">
Teachers
</li>
<li>
Students
</li>
</ul>
<div id="teachers">
@{ Html.RenderPartial("Teachers"); }
</div>
<div id... | common-pile/stackexchange_filtered |
Restricting input to textbox: it only accept number and should not accept decimal value
How can i restrict textbox that should only accept numbers and should not accept decimal values and alphabets?
Does this answer your question? HTML text input allow only numeric input
If your browsers support it, look into <input ... | common-pile/stackexchange_filtered |
Change Redact color in Mac Preview
I am running MacOS Monterey, and I want to remove some text from a PDF file using the Redact option in Preview. However, redacting the text marks it with black background with white crosses in it. Is it possible to change this color of redaction? Default sample redaction is shown belo... | common-pile/stackexchange_filtered |
My List of elements doesn't clear properly?
I am writing a program to simulate flocking behaviour on boids. I currently have a List of behaviours which a boid uses to calculate it's next movement vector. On each update the behaviours are reset and new behaviours can be added. With a population size of 100 it all works ... | common-pile/stackexchange_filtered |
MVC model binding parent child (collections)
I am trying to bind a child collections from my viewmodels to the domain model in the controller and I do not know how. (I tried using automapper and did not get very far).
I already have all the information on what I am working on, so to save trees I figured it might be eas... | common-pile/stackexchange_filtered |
Naila is a right or wrong name for a girl
Is Naila a permissible name for a girl? Or is it impermissible to name a girl Naila?
People usually hate that name because one of jahilia idols was named Naila but thats irrelevant because the name doesn't express the person and you can't find both good and bad persons having... | common-pile/stackexchange_filtered |
jQuery change image onclick
Don't know why but I can't find a solution to this. I have 3 links that when clicked I want to change an image below using jQuery. Does anyone know of a really simple script to show me how this might work? Thanks in advance.
Answer can be found in this question, though they're using hover i... | common-pile/stackexchange_filtered |
Unable to connect to SQL Server from Excel to generate reports. Named pipes and tcp/ip are enabled. using trusted connection
Trying to connect to SQL Server from Excel by using >>Data tab, >>From other sources >> from SQL server. It came back with the attached message
I made sure named pipes and TCP/IP are enabled in t... | common-pile/stackexchange_filtered |
Refactoring Javascript Function: Array transformation
I have a constant array like this:
const pie_values = [20,10,5,5,10];
The challenge is to transform the above array based on integer input.
(5) => [5, 15, 10, 5, 5, 10]
(21) => [20, 1, 9, 5, 5, 10]
(31) => [20, 10, 1, 4, 5, 10]
An input of 5 takes 5 from the first... | common-pile/stackexchange_filtered |
Finding the domain of this trigonometric function
how can I find the domain of this function?
f(x) = (xsin(x) + cos(x) / 1 - cos(x)) + (|X| - 2 / x^2 -4)
I assume we don't want the dominator to be zero so f(x)1 1 - cos(x) != 0 and x^2 - 4 != 0?
What is the next step
go to help and look for FunctionDomain
| common-pile/stackexchange_filtered |
Airflow DAG fails when PythonOperator tries to call API and download data
I'm trying to configure Airflow on my laptop for the first time (without using docker, just following documentation). My goal is to set up a simple ETL job.
I've written the simplest possible DAG with one PythonOperator:
from datetime import time... | common-pile/stackexchange_filtered |
the_content() Returns post content when I want page content
I'm very new to WordPress, but I'm currently doing work on a site built on the platform. I'm making my way through, but I've run into a bit of a problem.
I'm trying to add content from the text editor of the site's blog page, which uses the standard index.php... | common-pile/stackexchange_filtered |
Coupling and Total variational distance
Suppose we have two distributions: $\mu$ and $\upsilon$ on $\{1,2,3\}$. $\mu(1) = 1/2, \mu(2) = 1/3, \mu(3) = 1/6,\upsilon(1) = 1/3, \upsilon(2) = 1/6, \upsilon(3) = 1/2$. Could anyone explain to me (as simply as possible since I'm at a beginner level in stats) how I can compute ... | common-pile/stackexchange_filtered |
How to replace a specific Word in a Text File in Python?
I know this Question is already answered, but for me the Answers are not working and I dont know why.
First of all this is my Code:
c = open('Tasks//Task_Counter.txt', 'r+')
okay = c.read().splitlines()
which_task = int(okay[0])
this_task = which_task + 1
whic... | common-pile/stackexchange_filtered |
Can $\sin(1/x)$ be approximated pointwise by polynomials over $(0,\infty)$
Can the function $f(x)=\sin(1/x)$ on $(0,\infty)$ be approximated by a sequence of polynomials pointwise on the domain?I am sure that uniform approximation is not possible because $\lim_{x\to 0+}\sin(1/x)$ does not exist.But is there a possibili... | common-pile/stackexchange_filtered |
How can I authorise second Html page in App Script?
I am building a web app for work on App Script that renders different Html views for certain tasks. It is published as a private app and anyone from our domain should have access.
The users can access the main app page no problem, which is 'MantraCMS' from the code pa... | common-pile/stackexchange_filtered |
Enable Shared Pager Cache in sqlite using PHP PDO
I'm studying sqlite features and I've discovered the SQLite Shared-Cache Mode which is disabled by default.
Shared-Cache is:
intended for use in embedded servers
because it shares a single data and schema cache between threads or processes.
I'm interested in using sql... | common-pile/stackexchange_filtered |
The error comes when I host my project done in codigniter
My project worked in localhost, but showing error on server:
check for white space before php tag or some output is generating before exicuting code
Look at the fatal error first. Figure out why mysqli failed.
It could be your hosting does not support the wh... | common-pile/stackexchange_filtered |
delete detail from database using spring-data-jpa
Now I am using spring-data-jpa & hibernate. I want to delete a courseDetail from the course, But after I run my code below the courseDetail is still in the database.
Who can tell me how this happened?
thanks in advance.
@Transactional(readOnly = false)
public void delet... | common-pile/stackexchange_filtered |
400 error with bing news search api
I'm having a couple of problems with the bing news search api, the strangest one is searching by category, according to the documentation, the category must be a string, I found multiple resources for which values it accepts so i decided to go with console (https://dev.cognitive.micr... | common-pile/stackexchange_filtered |
How can I update the 'City' dropdown based on the selected 'Country'?
How can I update the 'City' dropdown based on the selected 'Country'? Is there anything built on Django to facilitate this?
class Country(models.Model):
name = models.CharField(max_length=50)
...
class City(models.Model):
name... | common-pile/stackexchange_filtered |
Hypernym for "movie" and "TV series"
What is the hypernym for movie and TV series?
I read that medium might be possible, but it doesn't sound that good.
You need to be more specific about what you're asking about. Are movie and series the same thing here? Would examples be Harry Potter, Star Wars, and Pirates of the C... | common-pile/stackexchange_filtered |
compare hashes,print values of keys having same values
I want to implement this algorithm in perl
11000, 67676, -7878, 9898
11001, 67676, -7878, 7673
11789, 56565, -0909, 5555
17654, 67676, -7654, 3214
18776, 99999, -55, 4444
17765, 67676, 7878, 9898
scan *nodes
hash1{node}=x,y,z
invert_y=y*-1
che... | common-pile/stackexchange_filtered |
Odoo - How add a field to view from another wizard model?
I want the use a field from wizard to my form view.
Let me explain with code:
class CancelAppointmentWizard(models.Model):
_name = "cancel.appointment.wizard"
_description = "Cancel Appointment Wizard"
reason = fields.Text(string="Reason")
and i wa... | common-pile/stackexchange_filtered |
Setting environment variable in /usr/bin/env hangs process on Linux
While the man for env on Linux seems to indicate that you can set new environment variables before executing a command. Unfortunately, when I set new variables in a file's shebang on Linux systems, the file never executes.
#!/usr/bin/env VAR1=foo bash
... | common-pile/stackexchange_filtered |
automated text for reproducible research
I am using RStudio, R Markdown, Latex, and Pandoc to clean data, construct variables, run my analysis, and report the results. I'm new to the concept of reproducible research, but I'm hooked. Makes a lot of sense.
Dynamic tables and figures are no problem. Dynamic text, however,... | common-pile/stackexchange_filtered |
How to prevent Vim from loading a specific system-wide ftplugin?
I'm writing a custom ftplugin for handling systemd file type. I've copied parts of code from vim's own systemd ftplugin and now the latter conflicts with my own code:
Error detected while processing BufRead Autocommands for "*/etc/systemd/*.conf"..FileTyp... | common-pile/stackexchange_filtered |
How import jar apache commons cli
I have a project that I need to run, but I can't run it because IntelliJ Idea can't find the apache commons jar. The issue is importing
import org.apache.commons.cli.*;
I know the issue is that IntelliJ can't recognize it. I added the jar to my project, but it can't still able to fi... | common-pile/stackexchange_filtered |
How can someone infer something does not exist?
First, I came across the Penrose triangle and then a variety of impossible objects. I understand that an object might not exist in a specific domain. For example, Penrose triangle does not exist in 3 dimensional Euclidean space. However, I have difficulty to understand ho... | common-pile/stackexchange_filtered |
Separate internet router from LAN wifi
I have a Linksys WRT54GL router running Tomato that I've been happy with for quite a while. I just purchased a TP-Link WDR3600 a/b/g/n + 4-port Gigabit ethernet router for better LAN throughput, and while it seems like a great performer so far, I'm quite disappointed with the fact... | common-pile/stackexchange_filtered |
Debugging for loop in palindrome numbers code
This code gets an integer n and displays all palindrome numbers less than n.
But seems the for loop doesn't work; because when I enter a number except 0, 1 and negatives, nothing happens.
I tried debugging, but couldn't find the problem!
Sample input: 30
Sample output: 1 2... | common-pile/stackexchange_filtered |
Overflow-y not working in javascript?
I want to make an onClick event on the link.
the code:
<a onclick="document.getElementById('myBodyID').style.overflow-y='hidden'" title="my title">Anchor text</a>
Why isn't this working? I want to disable vertical scrolling when the link is clicked.
How could I fix this code? It ... | common-pile/stackexchange_filtered |
ASP.net - Static site search
We have a static website in asp.net with about 50 pages and need to implement a site search. Any suggestions/links will be appreciated.
Thanks,
K
From the ASP.Net website - http://www.asp.net/web-pages/tutorials/email-and-search
If you're looking for a quick way to get search functionalit... | common-pile/stackexchange_filtered |
how to reverse a string of type char *?
I am using the reverse function.
void reverse(char s[]) {
int i, j;
char c;
for (i = 0, j = strlen(s) - 1; i < j; i++, j--) {
c = s[i];
s[i] = s[j];
s[j] = c;
}
}
If I pass a string of type char a[] = "abcd" then I get on the output dcb... | common-pile/stackexchange_filtered |
Is WCF a good fit for this problem?
I'm working to implement a data service solution that has 2 request functions but can respond with one of 3 transmission types:
x12 EDI
HTTP MIME multipart
SOAP/XML + WSDL
I would also need to include logging and username/password authentication to the services. I'm in the very ... | common-pile/stackexchange_filtered |
How do I make the text in this menu appear on the right and the items on the left?
By default, the menu label is on the left and the menu items are on the right. I want to reverse this and make the menu label on the right and the menu items on the left. How can I achieve this using SwiftUI?
Menu {
... | common-pile/stackexchange_filtered |
How to access C# MessageHeader Concrete types
I receive a System.ServiceModel.Channels.Message from a WCF service, it has a message header that at runtime is of type System.ServiceModel.Channels.ToHeader but I can't find this type anywhere to upcast it to use the ToHeaders properties.
Is this a dynamic type that can o... | common-pile/stackexchange_filtered |
OG Meta tags not working as intended
I see the OG Meta tags in the source of the rendered homepage of my site.
I see the correct image/location displayed in the code.
But, when I hit the LIKE button > the displayed image on the Facebook page is incorrect.
Also, I have individual settings for "Liking" individual product... | common-pile/stackexchange_filtered |
Android app start up animation
i just need to know how is it possible to create a start-up animation in your app. When the app is launched I would like it to go through custom animation and then it reaches the content of the app (main activity) ...
Thanks for all your help
It is possible, but kittens and unicorns die... | common-pile/stackexchange_filtered |
WP8 App Not correctly reading from isolated storage
I currently have this code.
This is the code I actually use to read the file:
public ObservableCollection<Esame> rigaEsame = new ObservableCollection<Esame>();
private void ReadFile()
{
Esami.ItemsSource = rigaEsame;
Iso... | common-pile/stackexchange_filtered |
How can I split up a really long application form on a mobile website?
If the number of questions this form asks is fixed by legal/business reasons (it's a loan application form for a bank), what is a good way to break it down into bite sized chunks?
The two options I see are either paged or something like a vertical a... | common-pile/stackexchange_filtered |
The method parseInt(String) in the type Integer is not applicable for the arguments (boolean)
I am getting the error The method parseInt(String) in the type Integer is not applicable for the arguments (boolean)
Here is the code
} else if (Integer.parseInt(answerField.getText() == null)) {
JOptionPan... | common-pile/stackexchange_filtered |
How to round numbers given by cmath
For the sake of practice, I am trying to build a simple function that solves quadratic roots - including complex roots and returns a nice and rounded result. However, neither the round() function or f-string formatting seems to work.
Here is the code I wrote:
from cmath import sqrt
... | common-pile/stackexchange_filtered |
When do Blue Jays form their crests?
I've noticed that not all Blue Jays appear to have a crest. I know that at certain times the crest may be down and less visible, but I notice in most images of juvenile Blue Jays they don't appear to have a crest. I'm curious if the crest forms later on or if Blue Jays are born with... | common-pile/stackexchange_filtered |
Open Graph in posts loop page
I have a loop where all the posts have their own like button, when i click it the facebook window appears but it does not show the right post thumbnail.
I think this is normal because in a posts loop the thumbnails are multiple so the script can not figure which one goes where - on the con... | common-pile/stackexchange_filtered |
How to store data in Bixby
Here are the steps that I want to be able to do in Bixby:
1. User says an utterance.
2. The Capsule then makes an API Call.
3. Store the returned data from the API Call locally.
4. User says a different utterance.
5. The API Call will send a piece of the stored data to the Endpoint.
I want to... | common-pile/stackexchange_filtered |
Eigen3: How to access matrix coefficients in performance critical operations?
I am trying to optimize critical operations in C++ which rely on Eigen3. It is not clear for me what type of coefficient access operations would lead to runtime performance costs, or when would the compiler will make a good job. To try to pin... | common-pile/stackexchange_filtered |
Execute Python code in new environment
Some time ago I've written an IDE for Python on iOS for my iPod Touch using PyObjC (ported to iOS by Saurik, installed via Cydia).
I use the 'exec' statement to evaluate the code that I entered in the Textfield.
But when subclassing an Objective-C class, i run into trouble when ex... | common-pile/stackexchange_filtered |
Modify Windows Form with treeview or radiobutton
I'm creating a GUI and I would like an app that changes on based which item in a treeview or which item is selected on a radio button.
I know how to know which item is selected, but how do i change the interface based on the item?
What should I try? Multiple panels? So... | common-pile/stackexchange_filtered |
Compiling a groovy scripts that come from a Database
Groovy scripts are placed in a Database entry (data type BLOB). I can read the bytes and convert to a String object. How can I use GroovyClassLoader or GroovyScriptEngine to compile and execute the script? I need to track dependencies between scripts so that if any d... | common-pile/stackexchange_filtered |
Why are British Airways wings so dirty?
I often fly through Heathrow, and British Airways airplanes, particularly their 777s, always look so dirty. For example, there is often a kind of dark oily stain on the wings and flight surface. So - why are BA planes so dirty compared to the others? And what exactly is this dirt... | common-pile/stackexchange_filtered |
How to check for field existance in Thymeleaf?
<nav th:if="${page} and ${page?.totalPages != null} and ${page?.totalPages > 1}"/>
What if the page object does not have a getTotalPages() method or totalPages field?
Then I get the following error:
Caused by: org.thymeleaf.exceptions.TemplateProcessingException:
... | common-pile/stackexchange_filtered |
Graph for derivative function
Please help. I can't display a graph for the derivative of a function.
Ls = 1.27; Is = 1.1; S = 3.6; B = 0.136;
A = 2;
i[t_] := A Sin[2 50 \[Pi] t];
\[Psi][t_] := Ls i[t]/Is (1 + (Abs[i[t]/Is])^S)^(-1/(S + B)) ;
d\[Psi][t_] := D[\[Psi][t], t];
Plot[{\[Psi]'[t]}, {t, 0.001, 0.04}]
Plot[{d\[... | common-pile/stackexchange_filtered |
impossible lengths of a train toy made by two types of wooden pieces.
A train toy is made of a series of any number of wooden pieces, each piece is either 6 cm or 7 cm long. how can I -mathematically- prove that the train can never be 29 cm long?
Any thoughts? If nothing else, $29$ is a very small number. Brute forc... | common-pile/stackexchange_filtered |
Exposed and private/local members in CommonJS modules
I was testing this framework and got these issues, idk why they happen and couldn't find the answer neither in Node.js docs nor in global search.
init.js
const { f1, v1, v2, f2 } = require('./1.js')
f2()
1.js
module.exports = {
f1: function (v1) { f1(v1) ... | common-pile/stackexchange_filtered |
How to do Silverlight Validation in a web service
I am currently trying to implement the built-in Silverlight 3 validation against objects that are accessed via a web service. I have tried to follow the examples listed on SilverLight.net (Jesse Liberty's tutorial)
and have had no luck. In fact, I could not get the tu... | common-pile/stackexchange_filtered |
How to detect position of Vive base stations?
So I'm completely new to Unity and VR but for a project I need to detect the positions of the base stations.
I tried googling, but since I don't know all the lingo I don't really know where and what to look for.
All I can find is how to detect the controllers.
I doubt this... | common-pile/stackexchange_filtered |
Doctrine querybuilder :parameter BETWEEN prop1 AND prop2
Hey i have a question about the querybuilder.
I´m inside an EntityRepository
this code finds all between from and to
public function getBySpan($from,$to)
{
$from = new \DateTime($from->format("Y-m-d")." 00:00:00");
$to = new \DateTime($to->format("Y-m-... | common-pile/stackexchange_filtered |
Why do I get a error in leetcode submission but pass in IDE using the same code?
I am solving LeetCode question: 234. Palindrome Linked List:
Given the head of a singly linked list, return true if it is a palindrome.
Example 1:
Input: head = [1,2,2,1]
Output: true
Example 2:
Input: head = [1,2]
Output: false
Const... | common-pile/stackexchange_filtered |
Fastapi - Correct way of validating fields on crud level
I'm working on small fast api project (pizza delivery).
At some point I need to validate things on database level before I create new object. For instance pizza order - the pizza name comming from that order (if this pizza exists in database).
I've noticed that s... | common-pile/stackexchange_filtered |
Java code is seems to be ignored
I have a problem with Java/HIBERNATE.
Here is some lines of code:
quickOrder.setResultUrl(resultUrl);
quickOrder.setStatus(QuickOrder.OrderedCampaignStatus.READY);
quickOrder.setPerformDate(DateTime.now());
em.merge(quickOrder)
In 99% cases it works fine. Everything is changed and writ... | common-pile/stackexchange_filtered |
Filter using lodash
I want to add element to array if there is no element with the same type and format.
I did it with for loop, but it looks bad.
for (i = 0; i < this.model.array.length; i++) {
const selectedElement = this.model.array[ i ]
if (selectedElement.value.format === item.value.format && selectedE... | common-pile/stackexchange_filtered |
How to configure PHP basedir for Joomla running on IIS shared hosting
I have the following setup:
IIS 10 with Plesk Onyx 17.8.11.
Joomla 3.8.13/PHP 7.2.10. The website is hosted in shared hosting provider.
After installing Gantry 5 I get the following warning on the Joomla Control Panel page:
SplFileInfo::isFile(): ... | common-pile/stackexchange_filtered |
Nifi convertRecord CSV to JSON truncate number values
I have the following CSV file in entry and I convert CSV to JSON using a convertRecord with csvReader and JsonRecordSetWriter
key,x,y,latitude,longitude
123,722052.172555174,6555555.17858555,42.0422004518503,2.21755344237117
but my float values are truncated
{"key"... | common-pile/stackexchange_filtered |
Texture management / pointer question
I'm working on a texture management and animation solution for a small side project of mine. Although the project uses Allegro for rendering and input, my question mostly revolves around C and memory management. I wanted to post it here to get thoughts and insight into the approach... | common-pile/stackexchange_filtered |
Neo4j: Trying to find strings that follow a specific word or pattern in different blocks of data but can't figure out the right query to achieve that
I'm trying to find the values of a particular attribute contained inside the data of a particular type of node in our database. I think what I need in order to do that is... | common-pile/stackexchange_filtered |
Force trailing slash before an anchor tag
I'm looking for a way to force adding a trailing slash before an anchor tag whenever there is an anchor tag without a trailing slash . Could it be achieved with htaccess?
Example :
localhost/pp/pages#edit/12
localhost/pp/pages/manage#edit/file/12
--->
localhost/pp/pages/#ed... | common-pile/stackexchange_filtered |
'RelatedManager' object has no attribute 'pk'
I have a model that looks like this
class Connections(models.Model):
following = models.ForeignKey(
User, related_name='following'
)
followers = models.ForeignKey(
User, related_name='followers'
)
def __unicode__(self):
return u'%... | common-pile/stackexchange_filtered |
Holder of German National Visa (Type D). Can my first point of entry be through Switzerland?
We are moving to Germany on a long-stay national visa (Type D). The easiest route would be to land in Basel, Switzerland, where someone would pick us up from there.
Are there any restrictions which would require the first count... | common-pile/stackexchange_filtered |
CloudFormation - Attached VPC Lambda stuck in DELETE_IN_PROGRESS - can't delete ENI
I have a Lambda attached to a VPC in a CF stack and when I try to delete the stack the lambda will get stuck in DELETE_IN_PROGRESS for hours.
If I try to manually delete the ENI it won't let me, with an error message eni is use by anoth... | common-pile/stackexchange_filtered |
How to clear form behind modal window with javascript?
Just like the question says, I'm trying to clear a form from a modal window while the modal stays up. I've tried:
if (myDocument.title == "Modal Window") {
parent.document.getElementById("textbox")
}
(I need it to do more than 1 tb, but used that just to try t... | common-pile/stackexchange_filtered |
Pyomo Blocks: Performance of indexed blocks
I am setting up a big time-dependent energy optimization problem over many timesteps with pyomo.The problem is formulated using indexed blocks, as proposed in the Pyomo Book in chapter 8.6.2., where the model object contains a block for each timestep.
I notice now that the mo... | common-pile/stackexchange_filtered |
Re-ordering Columns in Datagridview VB.net
I'm trying to swap columns 1&2 with columns 6&7 for display. This is the code I have but it doesn't work?
dgvListings.Columns(1).DisplayIndex = 6
dgvListings.Columns(2).DisplayIndex = 7
dgvListings.Columns(6).DisplayIndex = 1
dgvListings.Columns(7).DisplayIndex = 2
You need ... | common-pile/stackexchange_filtered |
ASPxGridView and LinqServerModeDataSource: Inserting and updating rows without showing all columns in grid
How do I use a LinqServerModeDataSource to insert or edit rows of the underlying data table when I do not show all fields of that table in the ASPxGridView?
Similar questions have been asked, but this is not a dup... | common-pile/stackexchange_filtered |
AutoFixture AutoMoq adding items to an ObservableCollection does not raise CollectionChanged event
I'm just starting out using AutoFixture and I'm enjoying the features just now. But I've just created an AutoMoqDataAttribute as Mark Seemann describes here.
But now I'm trying to mock an object that contains an Observabl... | common-pile/stackexchange_filtered |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.