text stringlengths 70 452k | dataset stringclasses 2
values |
|---|---|
How to increase the line height of RStudio editor?
I wonder if there are any ways to increase the line height of the coding in RStudio.
Someone said that the following seems to work in the active.rstheme:
#rstudio_source_text_editor div { line-height: 1.3 !important; }
So I added it to the end of the active.rstheme b... | common-pile/stackexchange_filtered |
How to remove gaussian noise from an image in MATLAB?
I'm trying to remove a Gaussian noise from an image. I've added the noise myself using:
nImg = imnoise(img,'gaussian',0,0.01);
I now need to remove the noise using my own filter, or at least reduce it. In theory, as I understand, using a convolution matrix of ones(... | common-pile/stackexchange_filtered |
How to copy all hlsearch text to clipboard in Vim
file.txt
abc123
456efg
hi789j
command
:set hlsearch
/\d\+
I want to copy highlighted text bellow to clipboard (or register):
123
456
789
Just like
egrep -o '[0-9]+' file.txt
Thanks.
One can follow the below procedure.
Empty a register (for instance, "a).
qaq
or
:... | common-pile/stackexchange_filtered |
Application of Seifert-van Kampen Theorem
I am trying to wrap my head around the following problem: I have three objects lined up horizontally, a $2$-sphere, a circle, and another $2$-sphere. It is the wedge sum $S^2 \vee S^1 \vee S^2$. I am trying to find the fundamental group of this space as well as the covering s... | common-pile/stackexchange_filtered |
Foreign key use with user model upload
These are my models and one user can upload multiple videos but one video belongs only to one user. How do I use the foreign key concept over here? When I add a user, does this automatically add a username in the Video model? If not, how do I do that? I'm very new to django over h... | common-pile/stackexchange_filtered |
Numba @jit fails to optimise simple function
I have a pretty simple function which uses Numpy arrays and for loops, but adding the Numba @jit decorator gives absolutely no speed up:
# @jit(float64[:](int32,float64,float64,float64,int32))
@jit
def Ising_model_1D(N=200,J=1,T=1e-2,H=0,n_iter=1e6):
beta = 1/T
s = r... | common-pile/stackexchange_filtered |
Efficiently removing missing values from the start and end of multiple time series in 1 data frame
Using R, I'm trying to trim NA values from the start and end of a data frame that contains multiple time series. I have achieved my goal using a for loop and the zoo package, but as expected it is extremely inefficient on... | common-pile/stackexchange_filtered |
lot of internal links to one not relevant internal page may distort google's opinion of site content?
if I have a lot of pages talking about cars, and nearly any of them point to
/gray-cars.htm or /city-cars.htm
because they are the most sold ones... do you think that
/red-cars.htm and /super-cars.htm
will appear les... | common-pile/stackexchange_filtered |
Store specific value in javascript when multiple forms are present
I've got a list of 10-20 objects on each page creating these forms:
<div id="routeTable">
{% for route in route_list %}
<div id="routeDone">
<form class="doneForm" action="/route/complete/" method="post">
<input type="hidden" name="route_i... | common-pile/stackexchange_filtered |
Rent Increase for Section 8 tenants
We live on a property managed by a non-profit housing cooperation claiming to promote quality affordable housing.
We receive Section 8 and when we moved here in 2008, the rent was $1110.00/month, and in December 2015, the rent was $1300.00/month. Effective January 2016, management ... | common-pile/stackexchange_filtered |
SQL Append criteria
I need to know where Xy Street can be found and I have 3 tables.
select t.nev
from hospital.person sz, hospital.place t, hospital.member ti
where 1=1
and sz.residence_placeid=t.placeid
and sz.residence_placeid=ti.placeid
and t.placeid=ti.placeid
and t.street like 'Xy Street %'
o... | common-pile/stackexchange_filtered |
Transforming data frame to a selection list in selectInput (Shiny)
I've a data frame corresponding to the sample below:
df = data.frame(subject=c("Subject A", "Subject B", "Subject C", "Subject D"),id=c(1:4))
I would like to transform this data frame to a list object that could be conveniently implemented in selectInp... | common-pile/stackexchange_filtered |
How to make all the error responses for API access in Content-Type of application/json instead of Content-Type of text/html in Flask?
I am building a Flask app that support access by human users and through API. The /api path and its subpaths are dedicated for API access. All API access should receive a response in JSO... | common-pile/stackexchange_filtered |
How to include (a) multipage pdf in the background
I want to include one/several multipage PDFs as a background to print additional information on it (header, page number, ...)
Save the mwe Package documentation in the directory in order to work
\documentclass[oneside]{book}
\usepackage{mwe}
\usepackage{pdfpages}
\new... | common-pile/stackexchange_filtered |
Stuck at proving convergence of the series that is dependent on a converging series
Suppose $\sum_{n=1}^{\infty}{a_n}$ converges, and $a_n > 0$. Does $$\sum_{n=1}^{\infty}{\dfrac{\sin(\sqrt{a_n})}{\sqrt{n}+na_n}}$$ converge or diverge?
Attempt: I was able to prove that it diverges, as shown below, but could not find an... | common-pile/stackexchange_filtered |
Spring REST controller partial update existing resource
I want to perform a partial update for a resource. I had an idea that I could combine @ModelAttribute (to load the existing resource) and @RequestBody to populate it with the provided fields and then run @Valid. As I understand @ModelAttribute is invoked before an... | common-pile/stackexchange_filtered |
best way to compare sequence of letters inside file?
I have a file, that have lots of sequences of letters.
Some of these sequences might be equal, so I would like to compare them, all to all.
I'm doing something like this but this isn't exactly want I wanted:
for line in fl:
line = line.split()
for elem in line:
... | common-pile/stackexchange_filtered |
How POSIX compliant is "/path/file/.."?
I wanted to change current directory into shell script into directory, containing specific regular file. I found that following trick works in mksh and busybox sh:
path=/path/to/regular/file
cd $path/..
but not in GNU Bash:
bash: cd: /path/to/regular/file/..: Not a directory
I... | common-pile/stackexchange_filtered |
Convert a full address to a separated by, city, region, zip code, etc
I have been searched by the internet, however I didn't find a perfect solution, so I faith that someone already did something like this.
So my issue is, I'm using a webservice were you send the VAT number and if is valid you got the Company info. How... | common-pile/stackexchange_filtered |
VB 2010 play wav files randomly Windows 8 RP
I need 5 wav files to play randomly at the end of my program. I know how to get it to play one song, and I found a code on this site already but it doesn't work for me, it just plays the same song every time. Here is the code:
Public Sub PlayRandomTrack()
Dim trac... | common-pile/stackexchange_filtered |
SQL query to count secondary keys
For a given table, if I count the keys (other then the primary key) which are having NOT NULL and UNIQUE, both the constraints, will that give me count of secondary keys for that table?
If not, how to get count of secondary keys for a table by using SQL query?
Can you add an example t... | common-pile/stackexchange_filtered |
Use one JavaScript function with two forms
I have a JavaScript function for checking form input which sends an AJAX request to a PHP script. Here is the HTML:
<form method="post" id="textform35" action="insert_text.php">
<textarea id="text" cols="80" rows="3" placeholder="forecast text"></textarea>
<input type=... | common-pile/stackexchange_filtered |
System.QueryException: List has more than 1 row for assignment to SObject3
In the test class I am getting the error as above one?
Class.TW_RestAPI.getTwiML: Class.TW_RestAPITest.testPostRestService
@istest
public class TW_RestAPITest {
static testMethod void testPostRestService() {
Account acc=new Accou... | common-pile/stackexchange_filtered |
Text messages no longer associated with contact
My neighbour has a Nokia Lumia 520 and accidentally linked an existing contact ("Person A") with a new contact that he created ("Person B").
This has had some side-effect where Windows Phone seemed to get confused about text messages associated with Person A (the original... | common-pile/stackexchange_filtered |
How to convert datetime from decimal to “%y-%m-%d %H:%M:%S” given the time origin?
I did my search around but I couldn't find an answer that satisfies my problem.
I am using python 3.7 and I need to convert a series of decimal numbers into datetime object in the form %Y-%m-%d %H:%M:%S. While doing so I need to consider... | common-pile/stackexchange_filtered |
Is there a proof of the Hawking bound for the efficiency of a black holes merger?
Consider two black holes with masses $m_1,m_2$ and zero angular momenta
merging to form a single one with the mass $m$ and the rotation parameter $a=J/m$. Hawking, in "Black Holes in General Relativity" Commun. math. Phys. 25 (1972), ... | common-pile/stackexchange_filtered |
Ambush meeting for silly plan
This morning I was invited to a 9.30am meeting by my boss (I normally start work at 9am although I am perfectly permitted to start as late as 10am if I so decide on the day and I have no earlier meeting to attend as far as I know).
This meeting was to decide whether to move a system from a... | common-pile/stackexchange_filtered |
Face recognition in Android without opencv
I wanted to develop a face recognition app in android. While searching, all i come up with is, the Opencv method, which i think is using C or C++. Can someone post the code or method for android? I am a newbie, so trying new stuff. Thanks!
OpenCV indeed uses C and C++ (and al... | common-pile/stackexchange_filtered |
How to query Metadata from a WebDAV server
I am trying to create an iPhone App that will talk to a WebDAV Server. I have no idea on this.
Specifically in reference to:
How to upload a file to the WebDAV Server
How to download a file from the WebDAV server
How to retrieve / Add MetaData on the WebDAV server
How to enum... | common-pile/stackexchange_filtered |
Topological Embedding Which is Neither Open nor Closed
I'm having trouble coming up with an example of an embedding which is neither open nor closed.
My attempts have included trying to find such a map from $\mathbb{R}$ (given the usual Euclidean topology, of course) to some subset of $\mathbb{R}$, which I now believe ... | common-pile/stackexchange_filtered |
Django model filter avoid join when filtering by relation id
Django ORM query
projects = Project.objects.filter(category__id=1111)
This generates following sql query, [join used]
""""
select *
FROM "project"
INNER JOIN "category" ON ( "project"."category_id" = "category"."id" )
WHERE "project"."category_id" = 1111
... | common-pile/stackexchange_filtered |
how to detect circles of symbolic links in haskell
i understand that i can find circles in symbolic links with the
find . -follow -printf ""
command (and other similar methods on the command line as previously previously suggested. but i cannot find a command in haskell to achieve the same.
there are several operati... | common-pile/stackexchange_filtered |
Oracle LogMiner Results Inconsistent
I'm working on a LogMiner-based solution for capturing changes and I've uncovered what appears to either an unusual set of expectations when attempting to mine redo events that pertain to CLOB or BLOB operations.
In my use case, I've inserted record into a table that contains 3 CLOB... | common-pile/stackexchange_filtered |
ESC Control with PS3 Controller using Python
I have connected my PS3 controller to the raspberry pi using a bluetooth dongle. I am not sure about how to structure the code to control the ESC with the left joystick (axis 1). Could anyone advise me on tutorials or information which can aid the coding for this.
I want to ... | common-pile/stackexchange_filtered |
How to automatically create virtual methods from inherited class in Qt Creator?
I am using QT4.8.4 + Qt Creator 2.8.1. Now I need to create several classes Child_X that inherit from another class Parent. In Parent I have several virtual methods.
Now I have to implement them in all of my Child_X classes. To save editing... | common-pile/stackexchange_filtered |
Create an Image of a disk having software raid partitions
I want to create a bootable backup image/clone of my centos7 server "A" having software raid partitions and use this backup to create new servers with same configurations.
my partitions are
sda
--> sda1
----> md120 /
--> sda2
----> md121 swap
--> sda3
----> md12... | common-pile/stackexchange_filtered |
Do dogs "understand" breeds or size among other dogs?
In posts where people look for a dog walker I often read things like "my dog is afraid of big dogs" or "my dog is afraid of (e.g.) German Shepherds". Does science support these claims? I.e., that dogs understand the size of other dogs and can distinguish between (hu... | common-pile/stackexchange_filtered |
How can I fetch the data from PHP backend making a HTTP get request from angular
I have PHP on server side, and angular at frontend. I need to make a HTTP get request from frontend by passing one parameter fetched from a form. Using that parameter there are couple of third party API calls happening in backend which wil... | common-pile/stackexchange_filtered |
Mutual fund rating predictions
I am working on a dataset with aim to predict the MF ratings. There are cols like, 10 yr, 7 yr, 5 yr etc returns. I also have commencement date of MFs, the question is there are MFs with commencements dates only 3 yrs back, so would it be prudent to impute the returns for them for 10 yrs ... | common-pile/stackexchange_filtered |
Recommended build system for latex?
I'm trying to figure out the best build system for latex.
Currently, I use latex-makefile, editing in vim, and viewing changes in Okular or gv. The major problem is that it sometimes gets hides errors on me, and I have to run latex manually. The major advantages are that it does all ... | common-pile/stackexchange_filtered |
Probability Density of Returns of Bonus Certificates
Could anyone please help me with the following?
I need to generate a histogram (resp. probability density) of returns of a bonus-certificate.
A bonus-certificate can be replicated by an underlying and a down-and-out-put option.
I tried to do that with Matlab but not ... | common-pile/stackexchange_filtered |
Optimise javascript and css requests for wordpress plugins
I'm building several WordPress themes in which I like to use a number of plugins like Jetpack and Gravity Forms, unfortunately they add a number of extra javascript and css requests to the site. Which causes a fair amount of added loading time to the server on ... | common-pile/stackexchange_filtered |
Why couldn't Snape and McGonagall prevent what Fudge did at the end of Goblet of Fire?
In Goblet of Fire (The Parting of the Ways), Dumbledore says to Snape:
“Then go down into the grounds, find Cornelius Fudge, and bring him up to this office. He will undoubtedly want to question Crouch himself. Tell him I will be in... | common-pile/stackexchange_filtered |
N-Epsilon proof
I was working on the questions seen below. Namely question 7 and 8. I was able to figure them both out but noticed that in question 7 we do not include the absolute value sign after where it says "implies, $0 \lt $ ..." as per the definition.
Now I know that $\sqrt[n]{a} -1$ is always positive, but so t... | common-pile/stackexchange_filtered |
Getting errors on Generate Signed APK in Android Studio 2
When I try to run project it works fine but when i try to generate signed apk i got this error.
I was try to clean project and rebuild it but none of them works for me.
My Problem is not related to duplicate libraries in Build:Gradle
> Error:warning: Ignoring I... | common-pile/stackexchange_filtered |
WebServer - moving MySQL to another server on LAN for gaining more processing power?
I have website with high traffic hosted on dedicated machine. This machine running out of resources.
Will moving MySQL database to another dedicated machine on LAN give more resources to website (considering that MySQL queries are fulf... | common-pile/stackexchange_filtered |
node.js email doesn't get sent with gmail smtp
I'm trying to send the email gmail smtp but I'm getting the error:
My email and password is correct I'm using the nodemailer for sending the mail;
var nodemailer = require('nodemailer');
// create reusable transporter object using SMTP transport
... | common-pile/stackexchange_filtered |
Election vs Poll
Can election be used in place of poll? Like when you vote for your favourite actor for the best actor of the decade can it be called an election? Or does election strictly mean a formal appointment of a politician for a position for example? Would it sound too weird if I called it an election?
Here is ... | common-pile/stackexchange_filtered |
Questions about ruby's nil class and rescue
Ruby Koans exercises has a file about_nil.rb. Below is its code:
def test_you_dont_get_null_pointer_errors_when_calling_methods_on_nil
begin
nil.some_method_nil_doesnt_know_about
rescue Exception => ex
assert_equal NoMethodError, ex.class
assert_match(/undefined method... | common-pile/stackexchange_filtered |
Author with email in tikzposter with affiliation index in name
I am customizing a theme using as base tikzposter. My authors here have each one some shared affiliations and the emails will not look good with the affiliation since would be confusing the relation between affiliation markers and the email (an email might ... | common-pile/stackexchange_filtered |
Opening QFile fails when path is dynamically generated
Im currently working on a project in QT Designer and I'm totally confused when it comes to file paths.
Im using a QString to save my directory/file path,
QString filePath;
fill it with a QFileDialog and then I generate the filename in a stringstream, convert that i... | common-pile/stackexchange_filtered |
'npm' is not recognized as an internal or external command, operable program or batch file after installing Node.js - Windows
I was looking for this topic but none of the founded solutions works for me.
I'm working on a Laptop with Windows 10 OS, where I do not have admin rights.
I'm trying to run my Angular + NodeJS a... | common-pile/stackexchange_filtered |
how to BOLD a fragment of the linkText in an Html.ActionLink?
I have this:
<li><%:Html.ActionLink(user.Email.Replace(Model.SearchString, "<b>" + Model.SearchString + "</b>"), "LoginEdit", "Admin", new { area = "Staff", webUserKey = user.WebUserKey }, null)%>, last login: <%:loginString%></li>
As you can see, I want th... | common-pile/stackexchange_filtered |
How to prevent UILabel to fill the entire screen?
I am trying to display a UILabel that may take up multiple lines but I'm having problem with how the height is resized.
Here is what it looks when I have text over a single line, displaying correctly:
When the text spans multiple lines however this happens:
Here's t... | common-pile/stackexchange_filtered |
Why did the Soviet Union name their strongest bomb Tsar Bomba?
The Soviet Union has/had the most powerful (Hydrogen) Bomb ever, the Tsar Bomb.
Why did they name it Tsar Bomb, when they had freed themself from the Tsars before, and even executed Tsar Nicholas II?
Welcome to History:SE. That looks like an interesting qu... | common-pile/stackexchange_filtered |
The 'pattern' parameter (undef) to DateTime::Format::Strptime::new was an 'undef', which is not one of the allowed types: scalar scalar
I'm currently running into an issue getting perl cgi script browser display on my local machine (http://localhost:8080/Monitoring/www/user_status.xml.pl?user=xxxxxx). As it was a first... | common-pile/stackexchange_filtered |
Change frame caption forecolor
I have a radio button within a frame (frame1). On frame 2, I have a number of checkboxes. This frame (frame2) becomes editable when the radio button is selected from frame1. How can I modify my code so the Caption of frame2's forecolor changes also?
I've tried adding the following to t... | common-pile/stackexchange_filtered |
HTML5 hide code like Flash
I was wondering, if I have a proprietary flash code (e.g: some cool animation which is really just client side stuff, its just example), and about to rewrite it using HTML5, is it possible to hide the code? or at least make it harder to see (unlike right click, view source, then you can just ... | common-pile/stackexchange_filtered |
VB - Excel checking previous value give an error
I am trying to learn a bit of VB and there is an exercise to change a value and check the previous value and if it is different do something. I eventually found a solution I could understand and get to work from : How do I get the old value of a changed cell in Excel VBA... | common-pile/stackexchange_filtered |
Emscripten SDL Compilation faliure
I'm new to emscripten; several days ago I've downloaded it just to try to make a port of a game to JS.
Anyway, after some steps, I'm having this issue now (on Ubuntu 16.04 STL).
By following build steps here, first of all, I've set environment variables with
source ./emsdk_env.sh and ... | common-pile/stackexchange_filtered |
Whatever happened to Hiroko Ai in Kim Stanley Robinson's Mars Trilogy?
After her disappearance, Sax thought he saw her in a blizzard (or maybe sandstorm), and remains convinced that he really has. But she is never seen by anyone again. What really happened with her?
I think that what happened to Hiroki is that she bec... | common-pile/stackexchange_filtered |
Doctrine 2: multiple tables - one entity
How can I map multiple tables with identical structure to entity?
For example we have these tables :
Object_001 (id, name, lat, long)
Object_002 (id, name, lat, long)
Object_003 (id, name, lat, long)
..........
Object_41000 (id, name, lat, long)
..........
Object_xxxxx (id, nam... | common-pile/stackexchange_filtered |
How to design an optimistic/eager multi-step form?
An app that I'm building has a comprehensive onboarding process, involving a multi-step form with 5 steps. It's already a pretty boring process to fill out 5 forms with a bunch of image attachments, and the users also have to wait for each step to submit before moving ... | common-pile/stackexchange_filtered |
How do I merge many similar tables?
I have many tables that all have identical structure and similar table names and am looking for a way to merge a few columns from them all into a new table with two additional columns: an auto-generated integer PK, and the name of the source table. e.g.,
UniqueID SourceID, Xcoord, ... | common-pile/stackexchange_filtered |
How do I see the cost of a specific Dataflow streaming job in GCP?
I have multiple streaming jobs running in the same project, and the GCP billing page isn't very granular - I'd like to break things out per job. Is there a way to do this?
Currently, the dataflow UI does not provide a per-job breakdown of costs. You ca... | common-pile/stackexchange_filtered |
convert data frames in nested lists to large data frame
I have a large nested List with 3 levels:
the elements are data frames with the same name.
List:
[[1]]
[[1]][[1]]
[[1]][[1]][[1]]
"name1" "name2" "name3" "name4" "name5"
numeric1 numeric2 string3 string4 string5
[[1]][[1]][[2]]
"name1" "name2" "name3" "name4... | common-pile/stackexchange_filtered |
Mysterious "undefined is not a function"
I'm pulling my hair out trying to resolve this error. This is causing a Uncaught TypeError: undefined is not a function:
trange[abs][i] = BENTON(e1, z1, pa1, pI_pot, pz2, pa2);
Here's my function:
function BENTON(e1f, z1f, a1f, I_potf, z2f, a2f) {
//my stuff
BENTON_return ... | common-pile/stackexchange_filtered |
How do I prevent duplicate entries in my Access database?
I am a first time coder with VBA and I am creating a database for data entry at a Psych Lab I work at. Currently the database is created, but I want to prevent duplicate entries from being put into the database (namely by have a code look for the participant num... | common-pile/stackexchange_filtered |
Custom search filter in the react-admin
I have some data presented in List (react-admin component). I can add SearchInput into my Filter component that is used as filter in the List, type source in it and then data will be filtered by full match of the "source" field with text typped into the SearchInput. Is it possibl... | common-pile/stackexchange_filtered |
FindNextPrinterChangeNotification misses events?
I am using FindFirstPrinterChangeNotification and FindNextPrinterChangeNotification to catch printing events. However I have noticed that FindNextPrinterChangeNotification does not reliably returns all the events. I have found a guy with the same problem in this article.... | common-pile/stackexchange_filtered |
Should Vow of Enmity or Hexblade's Curse be deployed first?
Imagine an Oath of Vengeance Paladin 3 / Hexblade 1. This is the big boss, and the character wants to use both Vow of Enmity and Hexblade's Curse on the same target.
Vow of Enmity gives advantage on all attack rolls against the target. Hexblade's Curse gives +... | common-pile/stackexchange_filtered |
Why the values are continuously getting printed since no loop or no next call is given to the PHP file?
Following is an demo example of 'Server Sent Events(SSE)':
HTML code(index.html) :
<!DOCTYPE html>
<html>
<body>
<h1>Getting server updates</h1>
<div id="result"></div>
<script>
if(typeof(EventSource) !== "undefined... | common-pile/stackexchange_filtered |
How to register DI services for specific Interface type?
I have interface IServiceHandlerAsync<T> and I have following service registrations
services.AddScoped<SoftwareTestService>();
services.AddScoped<SoftwareTestCaseService>();
services.AddScoped<SoftwareTestCaseStepService>();
services.AddScoped<SoftwareTestCaseSte... | common-pile/stackexchange_filtered |
Webcam software for "work area"
How can I produce a time-lapse video of a workarea (mostly of a project board).
The post Time-lapse software for Windows 7 pointed at some software, but they generate too much video or are images only.
Willing Webcam (http://www.willingsoftware.com/) meets most of what I am looking for, ... | common-pile/stackexchange_filtered |
FIX API quickfix multithreading
What is the proper way of connecting to mulitple servers/acceptors using quickfix?
Create a thread for each session under the fix application
Create a seperate application for each session, create multiple initiators, start each initiator in a seperate thread
And another related issue ... | common-pile/stackexchange_filtered |
Trying to parameterize a connection, parameters not displaying
I am trying to parameterize a connection, but when I go to 'use existing parameter' none of my parameters are showing up (it is empty).
What is the reason for this?
Note: This package was using package configuration before
Steps:
Right-click on one of conn... | common-pile/stackexchange_filtered |
if i inside an if statement checks if a method returns true, will the actual code in the method be executed?
Okay so.. i have a method that basically checks if the player can buy the field and if he can then sets him as the owner and return true. the method i am referring to is buyFieldFromBank in the if statement.
But... | common-pile/stackexchange_filtered |
i18next best practice
I've successfully implemented i18next, which by the way is a great library! Though I'm still in search for the "best practice". This is the setup I have right now, which in general I like:
var userLanguage = 'en'; // set at runtime
i18n.init({
lng : userLanguage,
shortcutF... | common-pile/stackexchange_filtered |
What is the range of expectation value in quantum machine learning
If I want to build a quantum circuit to solve a regression problem in machine learning, and the target value is 200~300. In qiskit, we can use VQR to easily implement it, and it will output the expectation value as the prediction, but I found the expect... | common-pile/stackexchange_filtered |
Sorting list in java and looking for max percentage
In my task I need to sort list in Java but I only sorted list by population. In class City I also have number of obese people. How to return perctentage.
class CovidSorter implements Comparator<City> {
@Override
public int compare(City o1, City o2) {
Inte... | common-pile/stackexchange_filtered |
How to prevent landscape orientation in phonegap(html)?
I am using following code to prevent landscape orientation in phonegap(html) not pure android.
1.First i am installed "cordova-plugin-screen-orientation" plugin in my project folder and then i am include cordova.js and in my program i am include the following line... | common-pile/stackexchange_filtered |
Does an explicit expression exist for the moments of the residuals in least squares regression?
Consider the linear regression model is
$$
Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i,
$$
where $X$ is a random variable and the error has finite variance $\sigma^2$.
When we solve this with least squares we find $\hat \bet... | common-pile/stackexchange_filtered |
Wrong syntax highlight for shell script in vim
I'm new to vim and shell script. I'm not sure if there is a real problem or it is just me not understanding vim or shell script, but I did search through the google and got no answer. Anyway, this is what I got when I doing shell script in vim. And I think the syntax highl... | common-pile/stackexchange_filtered |
HTML5 video tag not displaying mp4 video in Microsoft Edge - "This type of video file isn't supported"
I have a simple HTML5 video tag in a website.
<video id="myVideo" controls="controls">
<source src="MyVideoPath/MyVideoFileName.mp4" type="video/mp4" />
</video>
It plays the video fine when I use Chrome, Firef... | common-pile/stackexchange_filtered |
Can someone provide a scenario where a prepared statement is beneficial for efficiency?
Not for sql injection protection. I am aware of that benefit, but as far as the compiled part and it being more efficient, I cannot find a scenario where it would benefit for efficiency. I was hoping for that here. Vague I know, ... | common-pile/stackexchange_filtered |
Calculated Redoxpotential is too far away from experimental value
I calculated the redox potential with Gaussian for hydroquinone with different combinations of functional/basis sets always values like 5.4V (B3LYP/6-311G+(2d,p) and SMD model). The experimental value is about 1.1V according to [1], so I'm missing by a d... | common-pile/stackexchange_filtered |
Using session variables in php
I have 2 pages: index.php (where I input brand name in a textbox and on clicking submit I need to view the brands I added in drop down box in same page) and product page (where I can edit the brands I select in the index page).
I am not using database, instead I'm trying to store value i... | common-pile/stackexchange_filtered |
finding a pair with given sum in BST
struct node
{
int val;
struct node *left, *right;
};
// Stack type
struct Stack
{
int size;
int top;
struct node* *array;
};
struct Stack* createStack(int size)
{
struct Stack* stack =
(struct Stack*) malloc(sizeof(struct Stack));
stack->size ... | common-pile/stackexchange_filtered |
How do you use approx() inside of mutate_at()?
I'm having issues getting approx() to work inside of a mutate_at(). I did manage to get what I want using a very long mutate() function, but for future reference I was wondering if there was a more graceful and less copy-pasting mutate_at() way to do this.
The overarching ... | common-pile/stackexchange_filtered |
jest mocking functions without passing as a callback
I have some code like:
module.exports = {
idCheck: function(errors) {
errors.some( (error) => {
if (error.parentSchema.regexp === '/^((?!\\bMyId\\b).)*$/i') {
this._recordError('IDCHECK');
}
});
}
};
I am trying to test it using jest ... | common-pile/stackexchange_filtered |
Can I ask a question about bicycle culture in the Southwest?
I am an avid bicyclist who is new to the Texas/Southwestern United States area. I am wondering if its okay to ask questions about bicycle culture in this forum?
I have tried to do so in the travel stack exchange forum, but I find that bicycle culture seems to... | common-pile/stackexchange_filtered |
Which is the custom, by-the-book way to get user local time / time zone? (Or: How might Google / Facebook do it?)
I know this has been asked here several times, but the 'by-the-book' custom way to do it still remains unclear to me.
I'm designing an app which requires knowing the exact user's local-time.
I got really co... | common-pile/stackexchange_filtered |
iPhone SDK Copy File to Main System
Many thanks to @fabkk2002 who helped me adjust the Helvetica font on my iPhone to fully support Indic glyphs and rendering on my iPhone for an app I am creating. This leaves me with another problem. Now that I have adjusted the font on my phone, how will my users get the full suppo... | common-pile/stackexchange_filtered |
Where are text files in my Xcode project?
I've created a simple program to write in a text file, and it seems as if it works. I just cannot find where to locate the text file it created in my Xcode project.
FILE *fptr;
fptr= fopen("testawesome.txt", "w");
fputs("I love programming!", fptr);
f... | common-pile/stackexchange_filtered |
How to make an undirected and unweighted graph in the shape of a grid in C++
I'm trying to implement a for loop to initialize a graph in the shape of a grid, including diagonals. Basically, I have an array that is initialized with values that I want to replicate in the graph. So I have a nested for-loop that has severa... | common-pile/stackexchange_filtered |
C# UWP Live Charts Create CartesianChart dynamically in a Windows Runtime Application
I am trying to create a CartesianChart dynamically in a Windows Runtime Application.
The code:
CartesianChart ch = new CartesianChart
{
Series = new SeriesCollection
{
new LineSeries
{
Title = "",
... | common-pile/stackexchange_filtered |
In Go, is it possible to perform type conversions on the multiple return values of a function?
type Node int
node, err := strconv.Atoi(num)
Foo(Node(node)) // Foo takes a Node, not an int
Is it possible to avoid the ugly "Node(node)" in the above example? Is there a more idiomatic way to force the compiler to consid... | common-pile/stackexchange_filtered |
Solve the memory management problems by proving program correctness like with coq?
I just wanted to ask if it would be possible to construct a language with a type system that can solve the memory management problems (memory leaks, dangling pointers, double free(), etc.) by automatically trying to prove the correctness... | common-pile/stackexchange_filtered |
Can't Integrate youtube to fragment
youTubePlayerFragment = YouTubePlayerSupportFragment.newInstance();
Unreachable statement:
public class TabFragment2 extends Fragment {
private FragmentActivity myContext;
YouTubePlayerSupportFragment youTubePlayerFragment;
private YouTubePlayer YPlayer;
private static final String ... | common-pile/stackexchange_filtered |
Access SQL by server name in different segment
I have 2 server, that is server A and server B and both are currently using SQL Server 2016.Server A is in 192.168.10.xxx network and I can connect to it via IP address from server B but not via server name because it is in different network.
And server B is in 192.168.2.x... | common-pile/stackexchange_filtered |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.