id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_34600 | Here is my code.
public string AddUser(string UserName, string FirstName, string LastName, string Gender, string EmailID, string Password, string Mobile, string SecurityQuestion, string SecurityAnswer)
{
MembershipCreateStatus CreateStatus;
MembershipUser newUser = Membership.CreateUser(UserName, P... | |
doc_34601 | 28.10.2018 10:09
I would like the date to change if its past days , past week, past year etc
so if input was entered yesterday I would like to display something like this:
1d meaning one day ago , the same goes for year (1y) , for week (1w) etc.
Here is what I have tried so far:
Here is the function for grabing the dat... | |
doc_34602 | I have named my model estimator and trained it with X_train:
estimator = GaussianMixture(covariance_type='full', init_params='kmeans', max_iter=100,
means_init=array([[ 0.41297, 3.39635, 2.68793],
[ 0.33418, 3.82157, 4.47384],
[ 0.29792, 3.98821, 5.78627]]),
n_components=3, n_init=1,... | |
doc_34603 | Currently I am using UserDefaults to store core current logged-in user properties as per below to use through the app. I also have the requirement track other properties such as email, name, birthday, etc.
What/How is the best practice approach to managing a current logged-in user, is it UserDefaults, Singleton User cl... | |
doc_34604 | package main
import (
"fmt"
"time"
)
func myFunc() error {
for i := 1; i < 10; i++ {
fmt.Printf("i = %+v\n", i)
if i%3 == 0 {
return fmt.Errorf("error")
}
}
return nil
}
func main() {
run := make(chan struct{}, 1)
run <- struct{}{}
for {
... | |
doc_34605 | Here is an example:
Ext.define('TEST.view.transaction.TransactionEditor', {
extend: 'Ext.form.Panel',
...
items: [{
...
labelWidth:80,
width: 230,
tdAttrs: { style: 'padding: 10px 20px 10px 20px;' },
...
},{
...
labelWidth:80,
width: 230,
... | |
doc_34606 | package g.login;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AccountManagerCallback;
import android.accounts.AccountManagerFuture;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View... | |
doc_34607 | In my game i decided to use the input manager as its there to save time allowing easy configuration of cross platform controls etc. However i have a lot of in game prompts such as "Press "E" to pick up" and so on.
What i would like is to be able access for example my interact button in the input manager so i can displa... | |
doc_34608 | loans.boxplot(columns="RevolvingUtilizationOfUnsecuredLines")
on running the above i am getting the below error
TypeError Traceback (most recent call last)
<ipython-input-20-3237ef4a136d> in <module>
----> 1 loans.boxplot(columns="RevolvingUtilizationOfUnsecuredLines")
~\anaconda3\lib\... | |
doc_34609 | gc function:\mkdir
I get some code which contains this:
try {
$steppablePipeline.End()
} catch {
throw
}
What's the idea of try/catch/throw here?
A: When you create a proxy function, a function that is a wrapper around another (or a cmdlet), with the inbuilt tools (see here for an example) the generated code... | |
doc_34610 | Something like a Self Join ?
A: No problems. Just create an entity like Person, then you can create a Manager which is a Person, and Coworkers as Many People. I know this example is contrived, but this is straight forward.
Remember that unlike strings which are stored in the object, the Person in manager and coworker... | |
doc_34611 | Here is my code:
from datetime import datetime
from pytz import timezone
def get_uk_time(time_zone):
try:
country_tz = timezone(time_zone)
format = "%Y, %m, %d, %H, %M, %S"
time_now = datetime.now(timezone(time_zone))
format_time = time_now.strftime(format)
london_tz = timez... | |
doc_34612 | Bucket A:
fields: F1, F2, F3,...
Bucket B:
fields: F1, F2
I want to do the following thing in Couchbase:
Let A.F3=B.F2, when A.F1=B.F1
But I don't know how to achieve this using either n1ql or python sdk
I've tried "merge into" using n1ql, however I'm quite confused about the "on"
clause which requires the k... | |
doc_34613 | I can see in my logs that data are loaded
I can't display value in my template (need to reload browser to be displayed)
As can be seen bottom my template is very simple selectedCategories.name in the title and events values
First is displayed after reloaded page, second never.
Thanks for your help
Factory :
.factory('s... | |
doc_34614 | Update: My coworker has reproduced the issue on a different computer and iPad, so it's probably not just a quirk with my setup.
This is strange.
I recently noticed the Leaks instrument reporting memory leaks in my application and NEVER pointing to my code in the stack traces, just various built-in libraries. Fortunatel... | |
doc_34615 | share.getMedia = function (arrClassList) {
var mediaType;
if (arrClassList.length > 1) {
for (var i = 0; arrClassList.length >= i; i++) {
if (typeof arrClassList[i] != "undefined") {
var currentString = arrClassList[i].substr(2);
if (currentString.indexOf(arrT... | |
doc_34616 | undefined method `current_user' for Teacher:0x00000004fcac48
@rating = @teacher.current_user.ratings.build
Here is my ratings_controller.rb:
class RatingsController < ApplicationController
def new
get_teacher
@rating = @teacher.current_user.ratings.build
end
def create
get_teacher
@rating = @tea... | |
doc_34617 | X1<-c(1,1,2,2,2,3,3,4,4,4,4,4) #ID
X2<c(Day1,Day2,Day1,Day2,Day3,Day1,Day2,Day1,Day2,Day3,Day4,Day5) #Time
X3<-c(1.2, 2.2, 4.6, 1.5, 4.4, 5.2, 3.4, 2.1, 3, 5, 1.1, 3) #Variable one
X4<- c( a,b,b,a,c,a,c,c,a,b,b,c) #Variable of interest
X5<- c(11,12,21,22,32,12,16,18,17,16,13,15) #Age
data<-data.frame(X1,X2,X3,X4... | |
doc_34618 |
mongodb mongodb-clients mongodb-dev mongodb-server
Can anyone please tell me the difference between mongodb and mongodb-server?
A: Package mongodb installs full set of packages - client, admin tools, development files, mongod (mongodb daemon) and mongos (shard routing service), while mongodb-server in... | |
doc_34619 | =INDEX(B5:B14,MATCH(MAX(C5:C14),C5:C14,FALSE),)
to choose the name with the highest number against it. However in the event of a tie, the result defaults to the name nearest the top of the table, rather than picking at random.
I've tried using the RANDBETWEEN() function, however can't seem to get it to pick the max ... | |
doc_34620 | Thank you.
A: All of the non-hidden syntaxes in Sublime are automatically added to the View > Syntax main menu, which is the same menu that appears when you click on the file type in the bottom of the window. Additionally all syntaxes are added to the Command Palette as commands that start with Set Syntax:.
So the ea... | |
doc_34621 | [products] => Array
(
[149] => Array
(
[name] => Ichikami1
[qty] => 2
)
[150] => Array
(
[name] => Ichi... | |
doc_34622 | As an example, consider the following code:
class Timer extends Component {
constructor(props) {
super(props);
this.state = { seconds: 0 };
}
tick() {
this.setState(state => ({ seconds: state.seconds + 1 }));
}
componentDidMount() {
this.interval = setInterval(() => this.tick(), 1000);
}
c... | |
doc_34623 | if ((isset($a['key']) && ($a['key'] == 'value')) {
echo 'equal';
// more code
}
else {
echo 'not equal';
// more code
}
I need to test lots of values on an array that can or cannot exist. I feel that this method is too verbose.
I could remove the isset() and mute the notices... but then I feel dirty.
Edit:
Ans... | |
doc_34624 | <?php
$connection = mysql_connect("localhost", "root", ""); // Establishing Connection with Server
$db = mysql_select_db("vdl", $connection); // Selecting Database
//MySQL Query to read data
$query = mysql_query("select * from digital_library", $connection);
while ($row = mysql_fetch_array($query)) {
echo '<ul>';
echo ... | |
doc_34625 | Building DAG of jobs...
Provided cores: 8
Rules claiming more threads will be scaled down.
Job stats:
job count min threads max threads
------------------- ------- ------------- -------------
all 1 1 1
build 2 ... | |
doc_34626 | can someone guide me how can alternativily can import file without MANAGE_EXTERNAL_STORAGE, which changes i have to do to do so.
here's ConfigImportFileActivity.java that is used to list and import .anon files also can delete .anon files
package com.agn.injector.activities;
import static android.Manifest.permission.RE... | |
doc_34627 | Failed: Template parse errors:
'router-outlet' is not a known element:
1. If 'router-outlet' is an Angular component, then verify that it is part of this module.
2. If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
</div>
<d... | |
doc_34628 |
<View style={styles.formContainer}>
<View style={styles.textInputBackground}>
<Text style={styles.textInputLabelText}>Name</Text>
<TextInput style={styles.textInput} />
</View>
<View style={styles.textInputBackground}>
<Text style={styles.textInputLabelText}>Email... | |
doc_34629 | i have retrieve by directly specifying the path of data which is applicable for single retrieval for multiple sets of data i'm getting failed ,i had tried to pass TextView to stingview and called it at path in which i'm failing too.
public class smartphone extends AppCompatActivity {
Button fetch,accept;
TextV... | |
doc_34630 | I would like to chat add the new message notification, but only if the user is on another Tab.
A: You can use the chat box as the function.
Get its focus or blur event and then add the function for the notification.
If you still want to stick to that, try these: window.onblur or window.onfocus events and add the func... | |
doc_34631 |
*
*The user changed some data and pressed the button.
*(client-side) Alert to retrieve old password from the user.
*(client-side) Pass the old password in NODE to check if correct.
*(server-side) Change the data from step 1.
The above sequence of events may not be the best way of achieving this, so I'm happy to h... | |
doc_34632 | import numpy as np
for m in np.arange(0, 4, 1):
for n in np.arange(1, 4, 1):
coef = 2*m/n
print coef
The results of this is:
0
0
0
2
1
0
4
2
1
6
3
2
I want to get this
0 0 0
2 1 0
4 2 1
6 3 2
or get directly the column, which is the sum of values of the rows
0 + 0 + 0 = 0
2 + 1 + 0 = 3
4 + 2 + 1 =... | |
doc_34633 | Also, the function Array.sort() is the fast compared to what we write in code?
// I am merging the arrays here into a new integer array called newarray3
int[] newarray3= new int[input1.length + input2.length];
System.arraycopy(input1, 0, newarray3, 0, input1.length);
System.arraycopy(input2, 0, newarray3,... | |
doc_34634 | In collection view cell contains product image and name. is it possible to add collection view arscnview.
Result which i got :
here is the code i treid so far:
let newCollection: UICollectionView = {
let layout = UICollectionViewFlowLayout()
let collection = UICollectionView(frame: CGRect(x: 0, y: 0, widt... | |
doc_34635 | Anyone knows how to proceed?
Thanks
A: Is OT the field you want to sum? If so, let's assume the field for year is simply called YEAR. You want last year. So it would look something like this in the calculation you create. Let's assume you name the custom calculation CALC:
case [YEAR]
when year(now()) - 1
then ... | |
doc_34636 | This is the Error it throws
(1/1) FatalErrorException
Cannot declare class Bitcoin, because the name is already in use in
easybitcoin.php line 4
Line 4 is
class Bitcoin {
If someone could point me in the right direction. Everytime i go to click Generate New Wallet Address. Laravel throws this error
<?php
class... | |
doc_34637 | I am getting 6 errors and 2 warning all with my class that gets included. I think my problem lies with the class itself and the header file.
AnalogButtons.cpp
#include <Arduino.h>
#include "AnalogButtons.h"
AnalogButtons::AnalogButtons(int pin, int *btns){
m_pin = pin;
*m_btns = *btns;
}
int AnalogButtons::ch... | |
doc_34638 | Note: The do-while loop is simulated by a for loop
A=zeros(100,?);
for i=1:inf
A(:,i)=some computation ;
*condition*
end
A: Although the code here below works, you may consider @Sardar_Usama suggestion, working with cells. But I'm not too good with those...
A = zeros(100, 20); % initial number of columns is 20, but ... | |
doc_34639 | Can somebody provide an equivalent XSLT to perform the same job ?
This is an example input file:
<beatles>
<beatle>
<name>
<first>John</first>
<last>Lennon</last>
</name>
</beatle>
<beatle>
<name>
<first>Paul</first>
<last>McCartney</last>
</name>
</beatle>
<beatle>
... | |
doc_34640 | I am following a tutorial to use a package called Plum in R (https://github.com/maquinolopez/Plum).
My system set-up on R is as follows: R (3.5.1), with rPython (R package; Python 2.7), numpy (python package), scipy (python package), matplotlib (python package).
library(devtools)
install_github("maquinolopez/Plum")
l... | |
doc_34641 | The CSS files contains images as a relative path to the image location.
My image folder contains sub folders like
1./images/home/banner.jpg
2./images/home/fb/like.png
I dont want to change the relative path of the images in css files.
How can i upload my images to CDN (Rack Space Cloud) So that i don't need to change ... | |
doc_34642 | Assert.Equal(2000000.0, table.Convert("g", "mcg", 2.0)); // Pass
Assert.Equal(3200000.0, table.Convert("g", "mcg", 3.2)); // Fail
// The failing one is equal to doing the following calculation, which fails also:
Assert.Equal(3200000.0, 3.2 * 1.0 / (1.0 / 1000000.0)); // Fail
Assert.Equal(3200000.0, 3.2 * (1.0 / (1.0 /... | |
doc_34643 | Look at this standart gdi+ C style code:
Gdiplus::Graphics* graphics = Gdiplus::Graphics::FromImage(image);
graphics->DrawRectangle(/* parameters */); // Working
I know that I can use a std::unique_ptr as follows:
std::unique_ptr<Gdiplus::Graphics> graphics(Gdiplus::Graphics::FromImage(image));
graphics->DrawRectangle... | |
doc_34644 | <script>
$(document).ready(function() {
$("#head").load("../header.html");
$("#foot").load("../footer.html");
});
</script>
With this code header & footer are showing, but images are not showing, navigation menu isn't working.
A: In your #head div just use get_header();
In your #foot div just use get_foote... | |
doc_34645 | the multiple images i am getting from another ios app, how to insert the images into database with different name and display it?
<?php
$myparam = $_POST['userfile']; //getting multiple image Here
//$mytextLabel= $_POST['filenames'] //getting textLabe Here
//echo $myparam;
//echo $mytextLabel;
$target_path = "... | |
doc_34646 | df
id_ente_competenza_tipo | INOLTRO_PSAP2
3 S
3 S
3 N
2 S
i have another dataframe static table:
df_ente
id_ente_competenza_tipo| des_ente_competenza_tipo
1 ... | |
doc_34647 | if let gifImageData = UIImagePNGRepresentation(image!) {
try gifImageData.write(to: fileURL, options: .atomic)
}
and also
if let jpegImageData = UIImageJPEGRepresentation(image!, 1.0) {
try jpegImageData.write(to: fileURL, options: .atomic)
}
But this image is saving as a single png/jpg image and not as anim... | |
doc_34648 | import pandas as pd
data = [('name1', 2200, 2200), ('name2', 450, 450)]
column_list = ['name', '2021-01', '2021-02']
df = pd.DataFrame(data, columns=[column_list])
date1 = '2021-01'
total = df[date1].sum()
print(total)
The df looks like this:
name 2021-01 2021-02
0 name1 2200 2200
1 name2 450 ... | |
doc_34649 | The code is below.
/* Css Code */
.macbook {
width: 300px;
margin: 50px auto;
-webkit-perspective: 750;
-webkit-perspective-origin: 50% bottom;
-webkit-transform-style: preserve-3d;
-moz-perspective: 750px;
-moz-perspective-origin: 50% bottom;
-moz-transfor... | |
doc_34650 | My textbook prefers the uncommon function definition format:
let foo = fun x -> let f = (fun x y -> x +y ) in f x
So that I translated in #light syntax:
let foo x =
let f y =
x + y
f x
If I set foo 4 it returns me 8. Why? I cannot comprehend what actually happens inside the function, even with the... | |
doc_34651 | Does anyone know how I can fix this?
This is the code: https://jsfiddle.net/9a0cfae0/3/
JavaScript:
var ticks = [11000, 10000, 7000, 3000, 1000, 500, 100];
var ctx = document.getElementById("myChart");
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10... | |
doc_34652 | How does the javasdk know, which company the api is referring?
A: Each request to the API is made with an access token; that access token is specific to an organisation for which the user has authorised your app.
If your app is a private app, this authorisation is made during the app creation process in the developer ... | |
doc_34653 | \begin{equation}
P^+=\[ \left( \begin{array}{ccc}
1 & 0\\
0 & 0\end{array} \right)\]
P^-=\[ \left( \begin{array}{ccc}
0 & 0\\
0 & 1\end{array} \right)\]
\end{equation}
any hints or suggestions would be welcome
A: Get rid of all the \[ and \], and add some space between them:
\begin{equation}
P^+= \left( \begin{array... | |
doc_34654 |
When I run it on this page for example, it doesn't focus the first input field. Is it not meant to actually focus the element? I would need something that does that.
The reason I am not using .focus() is because I would like to send additional variables to the callback function triggered on focus and .trigger() is abl... | |
doc_34655 | One of the problems I'm facing is I don't have a security certificate. My client can connect to the server, but it does so in an unsecured mode. This results in not being able to access the databases on the server. I believe I'm missing a client side (and possibly also server side) certificate.
I have full access to t... | |
doc_34656 | <form id="form'.$mailing_recipients[$i][recipient_id].'"><td>
<input type="text" class="text_note" name="note_text" value="'.$mailing_recipients[$i][recipient_note].'">
<button type="submit" class="btn_note save" id="'.$mailing_recipients[$i][recipient_id].'" value="'.$mailing_recipient... | |
doc_34657 | If the parameter is a name (I can determine this by the number of '=' characters in the string) then I can go to the config file and get the actual connectionString as well as the providerName - there is no issue.
But if I was passed a connectionString, how do I determine the which providerName to use, is there a param... | |
doc_34658 | "<aa v={<dd>sop</dd>} z={ <bb y={ <cc x={st}>ABC</cc> }></bb> }></aa>"
How can I write general purpose regex (tag names change, attribute names change) to match content inside {}, either <dd>sop</dd> or <bb y={ <cc x={st}>ABC</cc> }></bb>.
Regex I wrote "(\s*\w*=\s*\{)\s*(<.*>)\s*(\})" matches
"<dd>sop</dd>} z={ <bb y... | |
doc_34659 | Is there any way to receive email notifications when a new tag is pushed to the remote repo, i.e.:
git push origin <tag>
Thanks!
A: The post-receive hook gets (on its standard input) a list of all updated refs, which includes new tags. (See also the githooks manpage).
You can thereby easily get a list of new tags by ... | |
doc_34660 | So far I've only been able to get it to work on the first level of any directory. In other words, it doesn't seem to scan any sub-directories for old files. I've been trying to find a way to recursively look through subs with os.walk and the filecmp module, but have yet to resolve the issue.
Here's what I have so far:
... | |
doc_34661 | function Generate() {
//Do something
$.ajax({data:{Svc: 'cpMain',
Cmd: 'Generate'
},
dataType: "text",
context: this,
success: genSuccess()
});
}
function genSuccess() {
//Do something
}
and in my c#, on Page_Init() I pick up the parameters from my AJAX callback ... | |
doc_34662 | This is my CheckoutController
public function destroy($id)
{
Temp_order::where('id',$id)->delete();
return redirect('checkout')->with('success','Product deleted successfully');
}
And this is the code for the table
<tbody>
@forelse ($order as $item)
<tr>
... | |
doc_34663 | > dput(df)
structure(list(`0` = c(6.08, 7.91, 5.14, 2.23, 0.72, 0.19, 0.04,
0.01, 0, 0, 0), `1` = c(9.12, 11.86, 7.71, 3.34, 1.09, 0.28,
0.06, 0.01, 0, 0, 0), `2` = c(6.84, 8.89, 5.78, 2.5, 0.81, 0.21,
0.05, 0.01, 0, 0, 0), `3` = c(3.42, 4.45, 2.89, 1.25, 0.41, 0.11,
0.02, 0, 0, 0, 0), `4` = c(1.28, 1.67, 1.08, 0.4... | |
doc_34664 | I have an EC2 instance with elastic IP, in VPC as my webserver . This elastic IP is mapped to my website address in R53. Now if I create auto scaling group with the same AMI, which I used to create my first ec2 instance, with say two instances, then two new instances are created with new IP addresses. How these new in... | |
doc_34665 | Error: Minified React error #301
I can revert the code to get it working again but I'm not sure what I'm doing wrong to get this error.
NOTE: The last thing I added was:
const [openDialog, setOpenDialog] = useState(false);
So perhaps I can't use this...
Does React have a list of error codes and explanations?
Searching ... | |
doc_34666 | I tried creating the AAD app registration using the following 2 methods:
1. "Azure Powershell script task"
2. Azure commands
Following is inline script that I used in case of azure powershell task:
Import-Module AzureRM
Import-Module AzureAD
# Register an AAD app
$appURI = "https://knaabdapp123.azurewebsites.net"
$app... | |
doc_34667 | I have used request.subdomain over my application to access the sub-domain, but when i tried the same its results in an error.
This is how i access the local copy of gem in my project Gemfile
gem 'i18n-active_record', :path => '/home/myname/Downloads/i18n-active_record-master' ,:require => 'i18n/active_record'
This i... | |
doc_34668 | library(httr)
url <- "https://extract-news.p.rapidapi.com/v0/article"
queryString <- list(url = "https://www.theverge.com/2020/4/17/21224728/bill-gates-coronavirus-lies-5g-covid-19")
response <- VERB("GET", url, addheaders(x_rapidapi_key ="my-api-key", x_rapidapi_host = "extract-news.p.rapidapi.com"), query = queryStri... | |
doc_34669 | My ViewModel
public class EditUtilisateurViewModel
{
public long Id { get; set; }
[Required(AllowEmptyStrings = false, ErrorMessage = " Required ")]
[Display(Name = "Login")]
public string UserName { get; set; }
[Required(AllowEmptyStrings = false, ErrorMessage = "Required")]
[Display(Name = "Email")]
[EmailAddress (... | |
doc_34670 | In StartupActivity i am inserting some data in a table and staring the MainActivity by using intent.
Code inside StartupActivity :
db.addFriend("userNameTest"); //db is a DataBase handler class and has been initialized inside onCreate()
Intent home = new Intent(StartUp.this, MainActivity.class);
startActivity(home);
f... | |
doc_34671 | I'm building a messaging app which uses Rails, Actionacable, Turbolinks, and jQuery
The problem (because of Turbolinks):
Chat is working great, however, each time I navigate away from the chatroom and back, any subsequent new message will appear multiple times.
Anyhow, I finally managed to solve the problem with Preve... | |
doc_34672 | import cv2
import numpy as np
import copy
import imutils
def test(red,green,blue):
mask = np.zeros((480,360,3),dtype=np.uint8)
for i in range(0,360):
for j in range(0,480):
a=blue[i][j]
b=green[i][j]
c=red[i][j]
mask[j,i]=(110,23,245);
mask[0:480,0:360]=(110,23,24... | |
doc_34673 | Like for example, when I update something in the object in which the scroll bar is assigned, I want it to automatically scroll to the rightmost side.
I tried:
pnlGraph.HorizontalScroll.Value = pnlGraph.HorizontalScroll.Maximum;
but it becomes permanent to the Maximum value.
Any answers to this?
A: Don't assign the sc... | |
doc_34674 |
A: See: https://github.com/keyboardsurfer/Crouton/issues/84
which leads to https://github.com/keyboardsurfer/Crouton/pull/132
which leads to https://github.com/keyboardsurfer/Crouton/issues/169 :(
In short: not available yet but you'd simply need to take the proposed pull request and format it to the new Android Studi... | |
doc_34675 | I have a login page here where once the user logs in successfully i am setting the userId in the session and navigating the user to dashboard.
In the dashboard i have added a function to check whether session set with value of userId. If the session is not set then i am navigating user back to login page. This is to bl... | |
doc_34676 | Dim line as integer = 0
read= io.file ("local\teste.txt")
line =read.lines()
read.readlines(lines)
| |
doc_34677 | Would it be possible to automatically screen and get those folders with only one csv file and import the data into R or other statistical packages?
A: getwd()
all_files<-list.files()
split_all_files<-sapply(all_files,function(x) strsplit(x, "\\.")[1])
for(i in seq(1,length(all_files))){
if(split_all_files[[i]][2]=... | |
doc_34678 |
You can ignore the expiration date, which is not currently used; session tokens effectively do not expire.
Would someone care to explain how a non-expiring token is not a security issue? What does "effectively not expire" really mean? Theoretically if a malicious application manages to obtain one of these tokens, c... | |
doc_34679 | var awesomeSauce = (
function () {
var secretCode = "Zorb!";
function privateCheckCode(code) {
if (secretCode == code) {
alert("You are awesome!");
} else {
alert("Try again!");
}
}
// the public metho... | |
doc_34680 | Its working on all browsers except IE.
Here is the code
<img alt="" src="http://techcrunch.com/favicon.ico">
Can you please help me to figure out the issue?
A: I can't find an official list of image types supported by Internet Explorer, but ICO indeed doesn't seem to be supported as an image format (which is ironic be... | |
doc_34681 |
*
*I've tried static linking via my cmakelists, but it doesn't seem to work and still looks for the dylibs.
*I've tried to build my own OpenCV but I can't get the project to link to it.
The project is a terminal utility, how can I package it and the dylibs so that they can be installed on a client system? Where the... | |
doc_34682 | <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:viewmodels="clr-namespace:Pricing051721.ViewModels"
x:Class="Pricing051721.MainPage" Title="KR Pricing"
x:Name="This">
... | |
doc_34683 | The problem is though that the App stops sometimes if i have open some other Apps and switch to them.
I would love to have it still running or even better have it in the Notification Bar like the Google Play Music App.
Can somebody hint me into the right direction? I have not found anything for my problem so far becaus... | |
doc_34684 | def reduceByKey(func: (V, V) ⇒ V): RDD[(K, V)]
In a word count program I am practicing, I see this code,
val counts = words.map(word => (word, 1)).reduceByKey{case (x, y) => x + y}
The application works with (x, y) instead of case(x, y). What is the use of case here. I did also check the answer from @ghik here. but ... | |
doc_34685 | "Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: duplicate entry: android/support/v4/content/ContextCompatKitKat.class"
I am using apache jars for httpclient and android-support-v4.jar.
I am really new to this and am not sure why i am getting this error.
my build.... | |
doc_34686 | The page is a memory concept. Why file system use it as the unit of read-modify-write cycle?
| |
doc_34687 | func printdata(){
let myJsonDict: [String:AnyObject] = [
"action": "Websites",
"method":"school_webpage",
"tid":2,
"data":["schoolId":14273],
"type":"rpc"
]
do{
let jsonObject = try NSJSONSerialization.dataWithJSONObject(myJsonDict, options: ... | |
doc_34688 | I've attempted the following, but lutimes() complains.
const struct timespec ts; // originally provided as function parameter from FUSE
struct timeval tv;
tv.tv_sec = ts.tv_sec;
tv.tv_usec = ts.tv_nsec / 1000;
lutimes(path, tv); // returns -1; errno=EINVAL
Now EINVAL from lutimes means the usec component was outside o... | |
doc_34689 | So far I have setup Vuex, where I am sending a a post request with axios. however I keep getting an error 419. which apparently means its a CSRF token problem.
*
*How would I parse the CSRF token to my backend the current method in my code does not work.
*is there a alternative route that would be easier.
Route in ... | |
doc_34690 | For reference, the original file code is
<a class="portfolio-item" style="background-image: url(img/portfolio8.jpg);" href="">
I am trying to import portfolio8.jpg that is originaly present in the img folder in static files in django. I changed the code to:
<a class="portfolio-item" style="background-image: url({% st... | |
doc_34691 | Code:
let xyz = String(JSON.stringify(data[property].Users__c));
let arr = xyz.split("\r\n");
console.log('XYZ :' + xyz);
console.log('ARR: ' + arr);
SS of Edge:
A: When calling JSON.stringify on a string, newline characters are escaped and the string is wrapped in quotes. It look... | |
doc_34692 | example
and the output should be like this
A: Since the OP says in his comment that he uses MYSQL this should work
SELECT data,COUNT(data)
FROM
(
SELECT COL1 data
FROM tableso
UNION ALL
SELECT COL2
FROM tableso
UNION ALL
SELECT COL3
FROM tableso
UNION ALL
SELECT COL4
FROM tableso
... | |
doc_34693 | col1 col2 col3
1 0.5 10
1 0.3 11
5 1.4 1
3 1.5 2
1 0.9 10
3 0.4 7
1 1.2 9
3 0.1 11
Sample result (due to randomness, the outputs might be different, but this serves as an example):
set1
col1 col2 col3
... | |
doc_34694 | I'm working on pathfinding now.
The path has been found correctly in the Array List and the Object can move according to the path with a constant speed.
Then, I want to improvise, where when the path found is a straight line, the object will increase its speed. Meanwhile, when the path turns the object will reduce its ... | |
doc_34695 | I am a content ruby user and am looking to find out a fix for a bug I have encountered in my marking program. I plan to convert it to rails later so my community can use it. The code is open source.
The problem is that it seems to be that I can’t output this code.
It returns the error “undefined method: /“ when I try t... | |
doc_34696 | private Button b1;
private Button b2;
private ProgressBar bar;
private MediaRecorder mRecorder = null;
private MediaPlayer mPlayer = null;
private boolean recording = false;
private boolean playing = false;
public AudioRecordDialog(Context context, final MainActivity main) {
super(context);
setTitle(R.strin... | |
doc_34697 | {
Flouer:'12',
Milk:'3',
Oil:'11',
Salt:'',
Eggs:'',
Tomatos:'',
Meat:''
}
A: Simply iterate on the object and check for the emptiness of the value
e.g: on nodejs console:
> const st = {
... Flouer:'12',
... Milk:'3',
... Oil:'11',
... Salt:'',
... Eggs:'',
... T... | |
doc_34698 | set.seed(10)
xvar = runif(10, 0, 1)
yvar = runif(10, 0, 1)
start = c(1, 1, 1, 9)
end = c(2, 4, 6, 10)
plot(xvar, yvar)
segments(xvar[start], yvar[start], xvar[end],yvar[end], col= 'blue')
I would like to achieve the same type of idea, but with using ggplot2. My reasoning for this is that I may want to add aesthetics... | |
doc_34699 | for (int i = 0; i < dtOrdersDetail.Rows.Count; i++)
{
DataRow dtItemRow = dtOrderReceipt.NewRow();
dtItemRow["FinalAmount"] = dtOrdersDetail.Rows[i]["ComboAmount"] + dtOrdersDetail.Rows[i]["TotalPrice"];
}
A: In this Case you have to correct the code in two place.
*
*Cast the source data table Columns.
dtItemR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.