id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_25600 | However, instead of uploading, I am trying to download a file. What's strange is that I do get the file contents and data, but the response code is a 401.
Any idea why? Of course, I would like to be receiving a 200 and not have to ignore the response code.
As far as my Azure AD app permissions go, I am allowing pretty... | |
doc_25601 |
function par(idF, idM) {
this.IDOvna = idM;
this.IDOvce = idF;
}
function breeding() {
let idOvce = [];
let brOvce = [];
let mesecOvce = [];
let godinaOvce = [];
let istorija1 = [];
let istorija2 = [];
let idOvna = [];
let brOvna = [];
let mesecOvna = [];
let godinaOvna = [];
let y = 0;... | |
doc_25602 | All work is done using ajax. But problem is if I mention dataType to json nothing return and if don't than it work as expected and I know that I am receiving valid Json.
Here is jQuery code:
jQuery(document).ready(function($) {
var select = $('#main_cat');
select.on('change', function(){
... | |
doc_25603 |
A: This is a useful function I use, taken from here:
Explode Dates Between Dates, check and adjust parameter
Just send it Date-30 and Date+30
CREATE FUNCTION [dbo].[ExplodeDates] (@startdate DATETIME, @enddate DATETIME)
RETURNS TABLE
AS
RETURN (
WITH
N0 AS (SELECT 1 AS n UNION ALL SELECT 1)
... | |
doc_25604 | file = csv.reader(file('20184329:2143.csv'))
for row in file:
sql_insert_table = ("""INSERT INTO STAGING(ADRESSE_1600 ,
ADRESSE_1601, ADRESSE_1602, ADRESSE_1603)
VALUES ('%s', '%d', '%d', '%s')""", row)
cursor.execute(sql_insert_table)
And here is the problem:
T... | |
doc_25605 | ALTER Proc [dbo].[sp_RenameAll] @Id nvarchar(MAx), @Captionn nvarchar(20)
as
begin
DECLARE @List VARCHAR(MAX)
SELECT @List = @Id
EXEC(
'update
tbl_Images set Caption='+@Captionn+'
WHERE Serial IN (' + @List + ')'
)
end
But when i execute this stored procedure with values
EXEC @return_value = [dbo].[sp_Renam... | |
doc_25606 | currently i am converting JSON object into String then publishing it.
But i don't want to convert it into String.I don't want to convert it into String instead of that i want to send as it is JSON Object as a Message.
Below is my code
public void sendMessage(final JSONObject msg) {
logger.info("Producer sends-... | |
doc_25607 | def +(s: String) = s.headOption
val foo = +("hello")
When trying to compile it , I get a compiler error:
Error: value unary_+ is not a member of String
val foo = +("hello")
How can I prevent the compiler from inserting a call to String.unary_-, but instead call the method in scope?
A: val foo = this.+("hello") ... | |
doc_25608 | As a result, I execute the following private method upon creation of the object:
def save_stock_image
image_path = Dir.glob(<list-of-images-from-directory>).sample
File.open(image_path) do |file|
self.image = file
self.save!
end
end
However, after 6 RSpec tests, I begin to receive the following error:
F... | |
doc_25609 | As expected this shuts also my test application down.
Is there a possibility to catch the exit signal in this particular unit test, so the shutdown of the test application can be avoided?
A: Since there is no way to prevent exit() from ending the program, you will have to change the legacy application in some way or a... | |
doc_25610 | Map<String, Integer> doubleCount= new HashMap<>();
SortedMap<String,Integer> newMap= new TreeMap<>(doubleCount);
Map<String,Integer> newDouble40 = newMap.headMap("40");
System.out.println(newDouble40);
this is giving me an empty list, and more than that it does not sort it.... so I sorted it :
public static <K extend... | |
doc_25611 | My question is how can I do this without having a zillion checks for:
if ((x>0)&&(x<ARRAY_SIZE))
for x, y, and z?
Thanks
A: Very easy: make your erray 2 elements bigger in every dimension and then make a 0-frame around it. Your loops all run from 1 to ARRAY_SIZE-1 and accesss to index-1 and index+1 do not make any ... | |
doc_25612 | Here is my code snippet
package main
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
)
func main() {
currentDir, _ := os.Getwd()
sourceImg := os.Args[1]
sourceName := filepath.Base(sourceImg)
sourceExt := filepath.Ext(sourceImg)
imgNameWithoutExt := stri... | |
doc_25613 | here is my html:
<form class="form-horizontal" id="whereEntry" method='post' action=''>
<fieldset>
<div class="control-group">
<div class="controls controls-row">
<input type="text" class="span3 register_input" id="main_activity" name="main_activity" placeholder="Company's main activity">
... | |
doc_25614 | public void ConfigureServices(IServiceCollection services)
{
...
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "APIs", Version = "v1" });
c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{
... | |
doc_25615 | The content of the canvas is stored in the database with the code of the draw which I got from Illustrator (a lot of code).
What I did first was to change the data from a script tag by id where I created the function that paints the canvas.
It worked well, it painted the draw correctly. The problem is that when I selec... | |
doc_25616 | $current_user = wp_get_current_user();
$johnny = $current_user->user_login;
$subs = 'illinois';
global $wpdb;
$wpdb->query(
"
UPDATE $wpdb->wp_Customers
SET BuyersAddress = $subs
WHERE UserName = $johnny
");
A: Try this code
A simple WordPress Update query
WP Update
$current_user = wp_get_c... | |
doc_25617 |
The Controller:
public function checkLogIn(){
//Gets the posted values
$tempUsername = $this->input->post('username');
$tempPassword = $this->input->post('password');
if($this->validateInput()==false){ //If the form data isn't accepted, loads back to login
$this->load->view('bigphloginv');
... | |
doc_25618 | We are building a project that uses WordPress for the marketing(normal pages, blogs, etc) and angular for the more functional side of this project. My current issue is we use the wordpress side for registration, subscribing to newsletter, and logging in. Newsletter and registration is now okay but I have a problem with... | |
doc_25619 | geocoded_by :full_street_address
after_validation :geocode
...
def full_street_address
[address, city, 'Ontario', 'Canada'].compact.join(', ')
end
And then in db/seeds.rb I have something in this format:
Rink.create([
{
name: 'Alexander Park',
address: '259 Whitney Ave.',
city: 'Hamilton',
rink_type: 'outd... | |
doc_25620 |
'Are you sure?', :method => :delete %>
Seems like this should work, but it doesnt:
true, :confirm => 'Are you sure?', :method => :post %>
A: There's no automatic way to do this through a view helper such as link_to. Your actions in your controller need to actually do this for you.
If you never want to delete a... | |
doc_25621 | $servers = "192.168.2.10","192.168.2.80","192.168.2.254"
$collection = $()
foreach ($server in $servers)
{
$status = @{ "ServerName" = $server; "TimeStamp" = (Get-Date -f s) }
$testconnection = (Test-Connection $server -Count 1 -ea 0)
$response = ($testconnection | select ResponseTime)
if ($response)
... | |
doc_25622 | There are two problems though:
*
*When executed for first time it waits for 12 seconds to start. How to get rid of this initial delay?
*Only first cycle goes fully. All the next runs starts from the halfway, not from the beginning.
Whereas I could live with the initial delay, this go-from-the-middle thing is kil... | |
doc_25623 | https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference#connecting-to-host-storage-with-an-identity
I used the guidance here https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/quickstart-create-bicep-use-visual-studio-code?tabs=PowerShell , for deployment.
New-AzResourceGroup -Name... | |
doc_25624 | I've read through several "answers" like
http://obroll.com/install-python-pil-python-image-library-on-ubuntu-11-10-oneiric/
which essentially tells me the same thing: Install PIL after libjpeg.
I still can't get it to work.
(I'm a novice with ubuntu)
Any ideas?
Copy/Paste from the summary:
-----------------------------... | |
doc_25625 | I can develop the functionality with numpy array's, but my code with Theano won't work.
numpy: code
a = np.asarray([[0.1,0.5,0.7,0.9,0,1],
[0.7,0.5,0.3,0.9,0,7]])
t = np.asarray([[0,1,1],
[0,1,1]])
def obj(predictions,targets):
pred = predictions.reshape(predictions.shape[0],3,2)
pred ... | |
doc_25626 | dic = {(0, 0, 255): [(255, 255, 0), (0, 255, 255)],
(255, 0, 0): [(0, 0, 255), (0, 255, 0), (255, 255, 0), (0, 255, 255)],
(0, 255, 0): [(0, 0, 255), (255, 255, 0), (0, 255, 255)],
(255, 255, 0): [],
(0, 255, 255): [(255, 255, 0)]}
My purpose is to delete the key that corresponds to the emp... | |
doc_25627 | $_tierPrices = Array
(
Array
(
"price_qty" => "4",
"price" => "143.00",
"savePercent" => "8"
),
Array
(
"price_qty" => "12",
"price" => "133.0000",
"savePercent" => "15"
),
Array
... | |
doc_25628 | Im using Spring Boot. I created Executeable JAR file and how can i deploy it? without IDE..
A: if you have web dependency on class path you get tomcat support along with it so you could
just run following command on console
java -jar yourjarfilename.jar
| |
doc_25629 | CREATE LANGUAGE plperl;
I get an error:
The specified module could not be found.
Running Windows 10 - Postgres 10 - Strawberry Perl 5.24
| |
doc_25630 | Possible Duplicate:
sqlite is not working.
i am tried hard to connect sqlite database using php. after lot of search, i found to include the below lines in php.ini. i am not sure where to include.
extension=php_pdo.dll
extension=php_sqlite.dll
i could't find even a word called sqlite in php.ini. can any give the s... | |
doc_25631 | I want to draw lines of various lengths after some text to a specific point in a block
This works with the number after the indent right class being the %age of padding=right applied to extend the border bottom:
<span class="kimmeridgedescription1841">County of<span class="italic"><span class="kimmeridgenameinsert">D</... | |
doc_25632 | I tried List/ArrayList and HashMap as store structure but the memory usage is TOO much when the filesystem contains 1.000.000+ files.
How can i store and fast retrieve those 'strings' without use an half of my RAM (8 GB)?
A: In the global hashmap instead of storing the full paths as Strings you can store pointers to ... | |
doc_25633 | I don’t have xcode 11 on my mac because it cannot run Mojave (required osx for Xcode 11).
Can I create the app on my computer in Xcode 10, then send the project file to a friend with Xcode 11, and then publish the app to App Store from my friend’s computer? What problems can I expect? Swift 4/5 incompatability? Is ther... | |
doc_25634 | I had low latency monitoring and recording solution with FFmpeg.
After the upgrade, Logitech camera switched from yuv420p to yuyv422 and I lost 30 fps support at 1280x720. Now it is only limited to 10 FPS.
Tried different drivers, it still yuyv422
Here is a code i use.
ffmpeg -y -loglevel panic -hwaccel qsv -threads 1 ... | |
doc_25635 | LOAD DATA LOCAL INFILE 'allCountries.txt'
INTO TABLE geoname
CHARACTER SET 'UTF8'
(geonameid, name, asciiname, alternatenames, latitude, longitude, fclass, fcode, country, cc2, admin1, admin2, admin3, admin4, population, elevation, gtopo30, timezone, moddate);
However, if I execute the query, I always get
Lock wait t... | |
doc_25636 | I using the CamemBERT model for French language.
I have tried the following code:
class CamemBERTQA(nn.Module):
# the initialization of the model
def __init__(self, do_lower_case: bool = True):
super(CamemBERTQA, self).__init__()
self.config_keys = ['do_lower_case']
self.do_lower_case = do_lowe... | |
doc_25637 | Please help to read this file.
I'm block at starting level only. after creating spark session how to read the .DBF file.
dbfread is the library available in python to read dbf files. But I need to read in PySpark and not only using Python.
Code :
from pyspark.sql import SparkSession
spark = (SparkSession.builder
.mas... | |
doc_25638 |
Year
Month
2019
7
2019
10
2020
11
2020
3
2021
1
A: In most RDBMS platforms, you can CONCAT both values, while using a bit of string manipulation trickery on the Month field to get it to conform to the format by adding a leading 0 in the event of a single-digit month value:
SELECT CONCAT(Year, RIGHT(... | |
doc_25639 | #include <stdio.h>
int main()
{
int l, b, a;
printf("Enter the length of the rectangle: ");
scanf("%f", &l);
printf("Enter the breadth of the rectangle: ");
scanf("%f", &b);
printf("Area of rectangle is %f", l * b);
return 0;
}
When I give any input it doesn't show me its product, but 0.... | |
doc_25640 | from itertools import count
from platform import platform
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#import the csv file
data = pd.read_csv("video_game.csv")
#clean the data converting str to numbers where needed + drop unwanted columns
data = data.drop(columns=["NA_players", "EU_players"... | |
doc_25641 | I have tried creating a map.
<img src="workplace.png" alt="Workplace" useMap="#workmap" style={{maxwidth:`99%`}}>
<map name="workmap">
<area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
<area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
<area shape="circle" coord... | |
doc_25642 | HTML:
<a name="test">An anchor.</a>
JavaScript:
var top = $("a [name=test]").position().top;
Returns empty object.
var top = $("a").position().top;
and
var top = $("[name=test]").position().top;
finds it. How do I write it to get an anchor element with name "test"?
A: You don't need space after a in your selector... | |
doc_25643 |
A: Sadly, this library isn't designed to work with other frameworks such as Vue or Angular. see docs here: https://sendbird.com/docs/uikit/v1/react/quickstart/send-first-message
| |
doc_25644 | manager = new CacheManager(EHCACHE_CONFIG_LOCATION);
cache = manager.getCache(CACHE_NAME);
cache.setMemoryStoreEvictionPolicy(new MyPolicy());
but if I used spring, use @cacheable and xml files like
<bean id="cacheManagerFactory" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="... | |
doc_25645 | In a nutshell, AWS CodePipelines only support listening to changes within a single Git branch. I want to listen to GitHub events relating to the creation of repos and branches and create CodePipeline instances in response to these events so that there is a Pipeline for each branch of each Git repository. I want a Lam... | |
doc_25646 | /var/www/html/webpage/
|-stands/
. |-header.php
.
|-images/
. |-picture.png
.
|-login/
. |-login.php
.
|-... | |
doc_25647 | func main() {
var a byte = 100
var b byte = 9
var r byte = (a << b) >> b
fmt.Println(r)
}
This prints 0, as all the bits are shifted out of the bounds of a byte during the initial << 9 operation, then zeroes are shifted back in during the >> 9 operation.
However, this isn't the case in C:
int main() {
... | |
doc_25648 | Thanks a lot for your help :)
A: You’re currently on the branch “origin” (that’s an odd name for a branch btw). That branch is ahead of the branch “MASTER” and the remote branches “MASTER” of both your bitbucket and origin remote. So merging any of those branches from the current situation will not do anything since ... | |
doc_25649 | I defined the maximum range of these cells - 20 in the row, but not all of them will have the values. I want the new sheets to be created only from these cells, where value is provided.
I used the following code:
Sub Namedsheetsadding()
Dim wsr As Worksheet, wso As Worksheet
Dim i As Long, xCount As Long
Dim Sheet... | |
doc_25650 | a) Table metadata columns( 2 columns)
b) Data columns( 3 columns)
for example :
table_id , creation_time , col_id1 , col2_id2, col3_id3
tbl_20180424, 1524641477022, 1, 2, 3
tbl_20180524, 1524647897022, 11, 12, 13
I tried below query but it is not working:
SELECT
table_id,
creation_time,
year,
Week,
id1,
id2,
id3
F... | |
doc_25651 | First, I dispatch the form data:
//component.js
const form = new FormData();
form.append('email', 'eray@serviceUser.com')
form.append('password', '12121212')
dispatch(FetchLogin.action(form))
Second, I prepare api call;
//loginService.js
import api from '@/Services'
export default async form => {
const response... | |
doc_25652 |
A: Let the project indexing and Python interpreter update complete. At some point, the pytest gets enabled.
Intellj indexing takes too long so need to be extra patient, or switch to another IDE.
| |
doc_25653 | Why do we create the pixel buffers, only to create a bitmap context to make a movie, and then draw using drawRectInViewHierarchy?
A: I'm not sure what information you're basing your question on, but I'll try to explain the basics.
First, CVPixelBuffer is a CoreVideo object that stores image data. All of the AVFounda... | |
doc_25654 | Id Name Address DOB Phone
1 abcd efg 1/16/2021 987654323
2 hijkl mno 2/16/2021 678987652
The contents of the info1.txt file are as follows:
Id:1
Name:abcd
Address:efg
DOB:1/16/2021 3:31:22 PM
Phone:987654323
And the info2.txt would be like above table format that I ... | |
doc_25655 | So the person is on our site. They have completed their order and I prompt them brag to their friends about their savings today...Click Here.
When they "click here" I would post to their newsfeed (is this the right place I'm not a big facebook user)
So which app type would I use (I'll google tutorials once I know what ... | |
doc_25656 | I just exported my EasyPHPV13 databases into EasyPHPV14 on another computer.
When I try to run my php code I get this error :
mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in
The odd thing, it's that on the old computer it works, and on the new computer with EasyPHP V14, with imported datab... | |
doc_25657 |
*
*I am not sure if I need to use .force() method to flush the content to disk or not. It seems like without .force(), the .getInt() can still work perfectly (well, since this is a memory-mapped buffer, i assume .getInt() fetches the data from disk, which means the data has been flushed into disk already.
*Is the .... | |
doc_25658 | Contest in models.py
class Contest(models.Model):
is_winners_announced = models.BooleanField(default=False)
...
ContestEntry in models.py
class ContestEntry(models.Model):
contest = models.ForeignKey(Contest, on_delete=models.CASCADE,
related_name='entries')
submitted_at... | |
doc_25659 | For some background, I'm trying to script the installation of an application for our clients. As part of that I will need to create a JDBC provider and a shared library along with my Application. IBM's documentation is fairly clear on how to create shared library with a particular classpath, and a JDBC Provider, and We... | |
doc_25660 | #define BULK_EP_OUT 0x02
#define BULK_EP_IN 0x82
QByteArray readFirmware()
{
QByteArray array;
array.append(sendByte(0xFF)); //class
array.append(sendByte(0x00)); //INS
array.append(sendByte(0x48)); //P1
array.append(sendByte(0x00)); //P2
array.append(sendByte(0x00)); //Le
/*for(int ... | |
doc_25661 | A initial exercise was first to print the lynx dataset:
> print(lynx)
Time Series:
Start = 1821
End = 1934
Frequency = 1
[1] 269 321 585 871 1475 2821 3928 5943 4950 2577 523 98 184 279 409 2285
[17] 2685 3409 1824 409 151 45 68 213 546 1033 2129 2536 957 361 377 225
[33] 360 731 1638 272... | |
doc_25662 | <?php
require 'mysql_connect.php';
$randnumber1 = $_GET['randnumber'];
echo "$randnumber1";
$result = mysqli_query($con, "select * from login_rocord where randnumber='$randnumber1'");
$row = mysqli_fetch_array($result);
if ($row['username'] != "")
echo "true";
else
echo "false";
?>
index.php
<script>
f... | |
doc_25663 | So I need to get the last part 'geo' out of the url.
Here's my code:
var testUrl = 'https://xyz.abc.org.com/v1.5/wth/data/analysis/geo?run=run1&aaa=some';
console.log(testUrl.substring(testUrl.lastIndexOf('/')));
But, this returns - 'geo?run=run1&aaa=some', while I want 'geo'.
How do I fix this?
Also, I can't use some... | |
doc_25664 | 1. Using the list of countries by continent from World Atlas data, load in the countries.csv file into a pandas DataFrame and name this data set as countries.
2. Using the data available on Gapminder, load in the Income per person (GDP/capita, PPP$ inflation-adjusted) as a pandas DataFrame and name this data set as inc... | |
doc_25665 | Specifically, what is the difference between using
__table_args__ = (CheckConstraint('to_node_id != from_node_id'), )
and
@validates('from_node', 'to_node')
def validate_nodes_are_different(self, key, field):
if key == 'to_node' and field and field is self.from_node:
raise ValueError
elif key == 'f... | |
doc_25666 | And when I clicking access goes here:
Forbidden
You don't have permission to access /blog/wp-login.php on this server.
I have permissions in folder 755 and files 644, and I check all if i can, any help?
Thanks
A: The solution is to add this to the beginning of your .htaccess
<Files wp-login.php>
Order Deny,Allow
Den... | |
doc_25667 |
It's easy to exclude the transparent parts in Fourier analysis if they are rectangles. However, how to exclude the transparent parts which are not rectangles in Fourier analysis (using fft2)?
In this case, how to use the maps of transparent degree in conducting Fourier analysis?
| |
doc_25668 | <record model="ir.ui.view" id="view_bill_clients_form">
<field name="name">bills.clients.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="name" />
... | |
doc_25669 | I would like to make a top-5 selection based on the count field with only one query.
So I need to merge the query:
select title, date, video_url, count from episode order by count desc
and the same query with "from topic".
A: select top 5 *
from
(
select title, date, video_url, count from episode
unio... | |
doc_25670 | We are have noticed that in production and in some staging environments, that the onClick handlers on a SSR page are failing to be called. By comparing working and non-working (npm run start) deployments we've determined that the non-working deployments are not calling the render() methods of the components on the pa... | |
doc_25671 | In the following example, if I forget to include the header file containing FOO definition, the compiler will print "world!", while I would like instead that it generated an error.
//in the configuration header file
#define FOO 1
//in a cpp file
#if FOO //I would like this to generate an error if I forgot to include ... | |
doc_25672 | When the number of EC2 instances is more than one some of Socket.IO connections are failing with HTTP 400. The same issue is resolved when there is only one instance.
I have also tried enabling sticky sessions in the ALB and have also created a Redis adapter which connects to my Redis instance in ElasticCache.
Unable t... | |
doc_25673 | //loop invoking
//cv::Point3f p; p.x=..; p.y=..; p.z=.. and data.push_back(p)
std::ofstream myFile("data.bin", ios::out || ios::binary);
myFile.write(reinterpret_cast<char*> (&data[0]), sizeof(cv::Point3f)*data.size());
myFile.close();
int size = data.size();
ifstream input("data.bin", ios::binary);
input.read(reint... | |
doc_25674 | from forwind.lidarapi.api import MCLidarGUIPlugin
class MCLidarActions( Handler ):
tcp_send = Event
def object__updated_changed( self, info ):
print info;
pass;
def _tcp_send_changed( self ):
print( "Click" )
and
from forwind.lidarapi.actions.api import MCLidarActions
clas... | |
doc_25675 |
*
*How can I do it in OSX, preferably without resorting to Objective C?
*If I can't do it without Objective C, how can I do it at all?
A: You can get a user's own home directory by looking at the environment variable HOME (for example, "echo $HOME" from a shell or getenv from C). For the home directory of other u... | |
doc_25676 | sum of a field value of another file.
so I have one list (named list_file) that contains many feature classes, name each one as small_file. name of each file already contains the ID (name it 'ID') that we need to locate. each file has a field named 'field_value'. 'ID' is not a field, just name of feature class.
note t... | |
doc_25677 | If File.Exists(pathSN) Then
Dim Findstring = IO.File.ReadAllText(pathSN)
If Findstring.Contains(Lookfor) Then
Dim msg = "Serial number has already been used"
Dim title = "Error"
Dim style = MsgBoxStyle.YesNo Or MsgBoxStyle.DefaultButton2 Or _
MsgBoxStyle.Critical
... | |
doc_25678 | My code:
import datetime as dt
import gspread
from oauth2client.service_account import ServiceAccountCredentials
def googlesheet():
# use creds to create a client to interact with the Google Drive API
scope = ['https://spreadsheets.google.com/feeds']
creds = ServiceAccountCredentials.from_json_keyfile_... | |
doc_25679 | Y(t) = αX(t) + βY(t-1)
*
*Y(t) <- years from 1900 to 2000.
*X <- a score measure from 0 to 100.
*Y(t-1) <- lagged value of order 1 for Y.
Thanks in advance.
A: Your model is an AR(1) time series for y with covariate x. We can just use arima0 (no missing value) or arima (missing value allowed) from R base:
fit <- ... | |
doc_25680 |
A: You should be able to find the path to the GC root of those arrays, this should tell you what they are used for.
| |
doc_25681 | I'm trying a new storyboard app with Xcode and just asked myself why there is a second declaration of the @interface in my implementation file?
.h
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController {
}
@end
.m
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewCon... | |
doc_25682 | I did the following:
crontab -e # To edit a crontab job
After the cron file opened, I added the following line:
@reboot /usr/bin/python /home/pi/path/to/file/example.py > /home/pi/cronlogs/mylog.log # JOB_ID_!
If I understand the documentation correctly, this cron job should be executed every time after the system bo... | |
doc_25683 | private OnItemClickListener itemClickListener=new OnItemClickListener() {
@SuppressWarnings("rawtypes")
public void onItemClick(AdapterView parent, View arg1, int position, long arg3) {
int i=position;
pdf=pdfarray[i];
/*******************************/
AlertDialog.Builder builder = new AlertDialog.Bu... | |
doc_25684 | (Matplotlib figure facecolor (background color))
...i.e., you need to use the figure object name: e.g.,
rect.set_facecolor('red')
I have read that imshow creates a figure automatically.
(matplotlib plot and imshow)
Therefore, how can I tell what the automatically-created figure's name is, so that I can use set_face... | |
doc_25685 | SELECT geoid as destination,
lehd_graph.h_geocode asorigin,lehd_graph.S000 as population,
(ST_buffer(ST_Transform(ST_SetSRID(ST_Point(-74.01128768920898, 40.739843698929995), 4326), 3857), 500))) /
ST_area(lehd_map.the_geom_webmercator)) as fraction
FROM lehd LEFT JOIN lehd_graph
ON lehd.w_geocode = lehd_g... | |
doc_25686 | At the moment we implement the first component as a blueprint. The component should encapsulate a Material input (matInput) with label, mat-errors, some validators etc. so that the developer just needs to write s.th. like
<our-input max-length="5" required label="fancy field" [formControlName]="fancyField">
to get a f... | |
doc_25687 | var icon = ge.createIcon('');
icon.setHref('<url here>');
var style = ge.createStyle('');
style.getIconStyle().setIcon(icon);
style.getIconStyle().setScale(0.65);
var pm = ge.createPlacemark('');
pm.setStyleSelector(style);
pm.setName("Type1"); // <-- NEED ANOTHER METHOD (ex. pm.SetId(... | |
doc_25688 | I have made some changes on local but my team mate also made some changes and committed them in Master. Now, Git is not allowing me to pull those changes saying i have to stash my local changes first. Now I have a question;
If I stash my changes and pull the changes made by other team member and then apply my stash, wi... | |
doc_25689 | My code:
class Membership < ActiveRecord::Base
belongs_to :user, inverse_of: :memberships
belongs_to :team, inverse_of: :memberships
validate :user_cannot_have_same_team_name
protected
def user_cannot_have_same_team_name
if User.find(user.id).teams.map(&:name).include? team.name
errors.add :base,... | |
doc_25690 |
A: This is the minified version :
And here goes the unminified one :
A: Under the sources tab, just click on the "{ }" button.
| |
doc_25691 | This is what I have tried so far:
sudo apt install python3-pip
This is the error I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsole... | |
doc_25692 | The problem in spring is that it requires a "model" for a table which is a pre-written java class that has variables which is the same as the "unknown columns". Do I need to dynamically create java classes for each tables during CREATE TABLE statement? Or is there any other way to handle this problem?
Example:
(? is a ... | |
doc_25693 | [RoutePrefix("side-navigation")]
public class SideNavigationController : BaseController
{
[Route("{pathname}")]
public ActionResult Index(string pathname)
{
SideNavigationPopoutModel model = _sideNavFactory.Value.CreatePopout(pathname);
if (model != null)
{
return View(m... | |
doc_25694 | I have no experience in C# would like to know what do I need to change to make this code work in webforms.
<img src="@Url.Action("ResizeImage", "Controller", new { urlImage = "<url_image>", width = 35 })" />
public ActionResult ResizeImage(string imageUrl, int width)
{
WebImage wImage = new WebImage(imageUrl);
... | |
doc_25695 | def post(self):
user = users.get_current_user()
if user:
logging.warning('User nickname %s', user.nickname())
logging.warning('User email %s', user.email())
email = user.email()
else:
logging.warning('Go login again?')
users.create_login_url("/")
I am using a brows... | |
doc_25696 | +-------+-----------+
| Name | Attribute |
+-------+-----------+
| James | Tall |
| James | Bald |
| Lily | Fat |
| Lily | Tall |
+-------+-----------+
and my expect output is
+------+------+------+-----+
| Name | Tall | Bald | Fat |
+------+------+------+-----+
| James| 1 | 1 | 0 |
| ... | |
doc_25697 | <div id="data"></div>
<div id="item1212">...</div>
<div id="item2323">...</div>
<div id="item3434">...</div>
<div id="item4545">...</div>
an Ajaxrequest gives me back a certain ID
$('#data').load('http://someURL');
fills the #data:
<div id="data">2323</div>
width this lines I make my correspondig... | |
doc_25698 | How to display indian rupee symbol in iText PDF in MVC3. This is the code I have used.
BaseFont rupee =BaseFont.createFont( "assets/arial .ttf", BaseFont.IDENTITY_H,BaseFont.EMBEDDED);
createHeadings(cb,495,60,": " +edt_total.getText().toString(),12,rupee);
private void createHeadings(PdfContentByte cb, float x, fl... | |
doc_25699 | I tried to find it but in every example that I saw the second parameter is an integer and it doesn't work.
TwitterService service = new TwitterService(consumerKey, consumerSecret);
service.AuthenticateWith(accessToken, tokenSecret);
var options = new SearchOptions { Q = "stackoverflow" };
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.