id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_2200 | window.onload = function () {
var canvas=document.getElementById("can");
var img=canvas.toDataURL("image/png");
var button = document.getElementById('saveImage');
img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA'+
'AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO'+
... | |
doc_2201 | FHttpRequestRef Request = FHttpModule::Get().CreateRequest();
Request->SetURL(apiBaseUrl + "/api/url");
Request->SetVerb("POST");
Request->SetHeader("Authorization", "Bearer " + GetCurrentToken());
Request->SetHeader("Content-Type", "application/json");
Request->SetContentAsString("JSON_BOBY");
Request->OnProcessReques... | |
doc_2202 | The problem I am having is that I am trying to reuse this app for a different set of images (the app is basically a template). This includes the splash page. I have done everything I can think of to replace the splash page image including, of course, modifying the view in Interface Builder and loading a different image... | |
doc_2203 |
The numpy.ma module comes with a specific implementation of most ufuncs. Unary and binary functions that have a validity domain (such as log or divide) return the masked constant whenever the input is masked or falls outside the validity domain: e.g.:
ma.log([-1, 0, 1, 2])
masked_array(data = [-- -- 0.0 0.69314718056... | |
doc_2204 | I want to create a component to add it on all my proyects, just for fun.
thanks
UPDATE: I made a simple component, thanks to ZaBlanc
<?xml version="1.0" encoding="utf-8"?>
<mx:UIComponent xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
<mx:Metadata>
[Event(name="success", type="flash.ev... | |
doc_2205 | Here iam including the code snippet of the data
<td colspan=2>
<input type="submit" value="Login" class="submit3" onclick="return checknull()" tabindex="1">
<input type="button" value="Reset" class="submit3" onclick="call_reset()" tabindex="1">
<input type="button" value="Forgot Password ?" class="submit... | |
doc_2206 | I'm trying to write some tests, and I want to test that when I press enter in an input, the form does indeed post back. However, I can't get it to simulate this.
No matter which method I choose, the keypress event is being triggered--event listeners see it--but the form isn't being submitted.
jsFiddle link:
Html
<!-- ... | |
doc_2207 | (((?=.*\\d{2,20})(?=.*[a-z]{2,20})(?=.*[A-Z]{3,20})(?=.*[@#$%!@@%&*?_~,-]{2,20})).{9,20}[^<>'\"])
Basically what I want is that it contains all above given characters in password. But it needs those characters in sequence e.g
it validates 23aaAAA@!, but it does not validatea2@!AAAa.
A: Simply add nested capturing gro... | |
doc_2208 |
*
*Go into External Data -> New Data Source -> From Database -> From SQL Server
*Specify to link the data source
*Select a data source from Machine Data Source
This results in the error
"ODBC -- call failed.
Specified driver could not be loaded due to system error 126: The specified module could not be found (MySQ... | |
doc_2209 | In My controller:-
$this->session->set_flashdata('login_error','Your username or password is incorrect.');
redirect(base_url().'admin/login');
In My view
echo '<span>'.$this->session->flashdata('login_error').'</span>';
In Chrome and ie i'm getting blank span whereas in firefox it is displaying flash data.
There ar... | |
doc_2210 | The data in the XML is shown like this:
<is:Person>
<is:PersonId/>
<is:NationalIdentificationNumber/>
<is:Name>
<dg:Title/>
What I need is it to show up like this:
is:Person/is:PersonID
is:Person/is:NationalIdentificationNumber
is:Person/is:Name/
is:Person/is:Name/dg:Title
...
How do I do this?
A... | |
doc_2211 | Class Title(models.Model):
title = models.CharField(max_length=256)
slug = models.SlugField()
class Issue(models.Model):
title = models.ForeignKey(Title)
number = models.IntegerField(help_text="Do not include the '#'.")
slug = models.SlugField()
admin.py:
class IssueAdmin (admin.ModelAdmin): ... | |
doc_2212 | I hope it makes sense. I basically want to check the filetype of an uploaded file and then alter the template accordingly.
The code that I am thinking of implementing is something like this but I am kind of confused
models.py
class ScribbleMedia(models.Model):
media = models.FileField(upload_to=get_file_path)... | |
doc_2213 | date <- c("2012-05-06", "2013-07-09", "2007-01-03")
word_count <- c("17", "2", "390")
df1 <- data.frame(date, word_count)
I also have a separate dataframe with total word counts for every date and then a series of other dates as well. It looks like this:
date <- c("2012-05-06", "2013-07-09", "2007-01-03", "2004-11-03"... | |
doc_2214 | package com.example.soundrecordingexample2;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.Menu;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOExcepti... | |
doc_2215 | I make this code :
interpreter = tf.lite.Interpreter(model_save)
interpreter.allocate_tensors()
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
interpreter.resize_tensor_input(input_details[0]['index'], ((len(X_test)), 180,180, 3))
interpreter.resize_tensor_input(ou... | |
doc_2216 | Page 1
<script type="text/javascript" src="jscript.js">
<input type="button" value="change" onClick="changeAttr()">
Page 2
<script type="text/javascript" src="jscript.js">
<input type="text" value="Hello" id="dynamictext">
jscript.js
function changeAttr(){
document.getElemenyById('dynamictext').value="World";
}
Now ... | |
doc_2217 | From these lines of code:
H, xedges, yedges = np.histogram2d(coord[:, 0], coord[:, 1])
H = H.T
print(H)
I obtain the following histogram:
[[ 7. 20. 16. 14. 10. 8. 16. 7. 10. 7.]
[11. 11. 10. 10. 5. 10. 9. 12. 7. 7.]
[13. 11. 13. 9. 13. 10. 14. 6. 9. 9.]
[ 5. 5. 4. 5. 7. 13. 14. 11. 6. 10... | |
doc_2218 | app.controller('aboutController', function($scope, $route) {
$scope.$on('$routeChangeSuccess', function() {
// Just need this to run once
$('#about').particleground({
dotColor: '#666',
lineColor: '#666',
lineWidth: .3,
particleRadius: 3,
parallaxMultiplier: 3
});
});
A: Check ... | |
doc_2219 |
the script
#!/bin/bash
LOG_FILE=$homedir/logs/result.log
exec 3>&1
exec > >(tee -a ${LOG_FILE}) 2>&1
echo
end_shell_number=10
for script in `seq -f "%02g_*.sh" 0 $end_shell_number`; do
if ! bash $homedir/$script; then
printf 'Script "%s" failed, terminating...\n' "$script" >&2
exit 1
fi
... | |
doc_2220 | https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={CHANL000}&channelType=any&maxResults=25&order=date&key={XXXXX}
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={CHANL001}&channelType=any&maxResults=25&order=date&key={XXXXX}
https://www.googleapis.com/youtube/v3/search?part=snippe... | |
doc_2221 |
A: you should use the google language api, its free to use and supports gujarati. :)
http://code.google.com/apis/language/
Hope this helps,
Eamonn
A: take a look....
http://gu.wikipedia.org/wiki/%E0%AA%AE%E0%AB%81%E0%AA%96%E0%AA%AA%E0%AB%83%E0%AA%B7%E0%AB%8D%E0%AA%A0
take a look again....
http://gu.wikipedia.org/wiki... | |
doc_2222 | #panel { id = "test" } or #panel { id = test }
the generated html element looks like this:
<div class="wfid_test"></div>.
but what I want is:
<div id="test"></div>
so I can use an anchor link like <a href="#test">Scroll Down to Test</a> to reference the id.
This is basic HTML that has been around forever, so I'm sure ... | |
doc_2223 | C:\Users\animesh.vashistha\StudioProjects\MovieListApp\app\src\main\java\com\example\movielistapp\MainViewModel.kt: (21, 43): No type arguments expected for interface Callback
My MainViewModel looks like this:
package com.example.movielistapp
import android.graphics.Movie
import androidx.lifecycle.MutableLiveData
imp... | |
doc_2224 | I'm relatively new to Tkinter and my understanding of it is limited, so I'm sorry if it's an obvious problem.
Whenever I try to install I get the following:
Selecting previously unselected package python3-pil.imagetk:armhf.
dpkg: unrecoverable fatal error, aborting: files list file for package
'qdbus' is missing ... | |
doc_2225 | This is working correctly but how can I add the else condition ?
<li *ngFor="let product of categories; let num = index">
<div *ngIf="product.id === model.categoriesListDTO[num].id">
{{product.id}}
</div>
</li>
A: try “else” statement of Angular
<li *ngFor="let product of categories; ... | |
doc_2226 | create table illustrativeTable
(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
label VARCHAR(4),
reportingDate DATE,
attr_1 INT,
attr_2 INT,
attr_3 INT,
PRIMARY KEY(id)
);
I have populated the illustrative table as follows:
INSERT INTO illustrativeTable(label, reportingDate, attr_1, attr_2, attr_3) VALUES('A... | |
doc_2227 |
A: Here is the drop down list of the asp.net
<asp:DropDownList id="ddlCourse" runat="server" AutoPostBack="false"
Height="28px" title="Select Course" Width="290px"
></asp:DropDownList>
and here is the jquery method that is calling the web service method
function BindCourse... | |
doc_2228 | The error displayed is:
After some investigation I've found that it only occurs if there's also a textbox on the form. The error does not occur with labels, combo boxes, radio buttons etc. just textboxes.
To replicate this without any extra code, I've created a new Windows Form application, and added a single textbox ... | |
doc_2229 | Since I cannot show the actual classes here, I've tried to make an example identical to my problem, which is as follows.
I have a Company which has several property lists to Person. When I'm using EF to convert this into the database, I'm getting a new foreign key column for each instance of Person.
Company
public G... | |
doc_2230 | I'm trying to find out if I can have a Flutter app with an extra tab that seamlessly embeds a PWA on both Android and iOS, so that when you download the mobile app from an app store you get all the functionality of an existing PWA inside the larger mobile app.
A: Not sure about Google Play, but Apple Mobile store reje... | |
doc_2231 | for(int j=0;j<itemSize;j++){
if(!addItem[j].find(next)){
cout << addItem[j] << endl;//////why doesn't this work for multible words???
}
}
}
if(!next.find("@")){//////////////////////searching for @
for(int j=0;j<itemSize;j++){
if(!addItem[j].find(next)){
cout << addItem[j] << endl;//why doesn't this work fo... | |
doc_2232 | My models.py:
from django.db import models
from django.contrib.auth.models import User
class Flower(models.Model):
name = models.CharField(max_length=80)
water_time = models.IntegerField()
owner_id = models.ForeignKey(User, on_delete=models.CASCADE, default=1)
def __str__(self):
return self.name
My views.py (vi... | |
doc_2233 |
A: This is not a database related problem.
You can do this with authorization.
See the following links for more help.
http://www.asp.net/web-forms/tutorials/security/membership/user-based-authorization-cs
http://www.codeproject.com/Articles/98950/ASP-NET-authentication-and-authorization
| |
doc_2234 | The user_id is a foreign key of the table "BorrowedBooks".
package com.androidcss.jsonexample;
public class MainActivity extends AppCompatActivity {
// CONNECTION_TIMEOUT and READ_TIMEOUT are in milliseconds
public static final int CONNECTION_TIMEOUT = 10000;
public static final int READ_TIMEOUT = 15000;
private Rec... | |
doc_2235 | I already managed to talk to the printer via this code:
private void Print(string printer)
{
PrintDocument PrintDoc = new PrintDocument();
PrintDoc.PrinterSettings.PrinterName = printer;
PrintDoc.PrintPage += new PrintPageEventHandler(PrintPage);
PrintDoc.Print();
}
void P... | |
doc_2236 | int pageNumber = get from user; // for example 2 , 3 ,...
if pageNumber == 2
return records 20 to 29
Thanks!
A: What you want probably is the following:
var itemsToShow = items.OrderBy(p => p.Id)
.Skip((currentPage - 1) * numPerPage)
.Take(numPerPage);
Where you are o... | |
doc_2237 | mask_grid_navi_via_points = new Ext.LoadMask(grid_navi_via_points.getEl(), {msg: 'Text...<button>Cancel</button>'});
I want insert Ext.Button and if like:
var btn = new Ext.Button({
renderTo: id,
text: 'Cancel',
handler: function(){
mask_grid_navi_via_points.hide()... | |
doc_2238 | Places: No PlaceSelectionListener is set. No result will be delivered.
Not sure what am doing wrong
Here is how my method looks like
private fun setupPlacesAutoComplete(){
var placeFields = mutableListOf(Place.Field.ID, Place.Field.NAME, Place.Field.ADDRESS)
Places.initialize(view!!.context, getString... | |
doc_2239 | Example: {2,4,4,2,4,5,0,0,0,0,...} shift right by 4 -> {0,0,0,0,2,4,4,2,4,5,...}
A: If the shift distance is known at compile time, it’s relatively easy and quite fast. The only caveat, 32-byte byte shift instructions do that independently for 16-byte lanes, for shifts by less than 16 bytes need to propagate these few... | |
doc_2240 | here is my yacc file:sin.y
%{
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#define YYSTYPE double
YYSTYPE last_value=0;
extern int yylex(void);
%}
%token NUM
%token LAST
%left '+' '-'
%left '*' '/'
%left '^'
%left NEG
%left COS EXP SIN SQRT TAN
%%
stmt:
|stmt '\n'
|stmt expr '\n' {... | |
doc_2241 | Now I want to change the state when I click the mouse button down and change it back when the mouse button goes up. My button has to event "PreviewMouseLeftButtonDown" and "PreviewMouseLeftButtonUp" as you can see in the code below. In the SendStateMessage() method the state is send to a SCADA-Server and the server sen... | |
doc_2242 | Lets consider I have a SFC (I am using TypeScript) and export it like:
export const AppShell: React.SFC<Props> = (props: Props) => (
...
)
All fine. But now before I export my component I want to wrap it with a HOC like withStyles from MaterialUI. Now I want to do something like:
const AppShell: React.SFC<Props> = (... | |
doc_2243 | Is there some other configuration parameter that may affect the keyboard behavior I should consider?
Remmina 1.4.5 on Uqbuntu 20.04; connection with Windows 8.1
Possibly related question:
https://unix.stackexchange.com/questions/57725/remmina-doesnt-eat-keys
A: It seems that the 'Use the client keyboard layout' genera... | |
doc_2244 | function new_troop() {
var source = SpreadsheetApp.openById("***");
var target = SpreadsheetApp.openById("***");
var source_sheet = source.getSheetByName("***");
var target_sheet = target.getSheetByName("***");
var seller = source_sheet.getRange("B14").getValue();
var category = source_sheet.getRange("... | |
doc_2245 |
I applied opencv HoughLinesP to it and got the following result
Using the following code:
img = cv2.imread('./image.jpeg', 1)
img_gray = gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cannied = cv2.Canny(img_gray, threshold1=50, threshold2=200, apertureSize=3)
lines = cv2.HoughLinesP(cannied, rho=1, theta=np.pi / 180... | |
doc_2246 | Has someone ever achieved this and can give me a hint?
Thanks,
Matthias
A: You can do that, indeed. Please see an example for this here.
The result looks like
.
| |
doc_2247 | useEffect(() => {
if (show && inView) {
const timer = () => {
setCount(count + 1);
};
if (count >= number) {
const plus = setPlus('+');
return plus;
}
const interval = setInterval(timer, 800 / number);
return () => clearInterval(int... | |
doc_2248 | Im passing the string to the method like this :-
[self buildrawdata2:(const unsigned char *)"0ORANGE\0"];
Here is the method that works when the array uses a string set to "0ORANGE\0", the string I pass over is also missing the "\0" from the end, I believe this is because its a control character / escape sequence, i... | |
doc_2249 | I have two **div**'s: one for logo and another for menu, they are aligned using **flex**.
When I start decreasing the screen size, menu **div** starts shrinking until some point, when one of the menu item (ABOUT US) looses alignment. Then logo-**div** starts shrinking until the menu disappears.
Please advice, how can I... | |
doc_2250 | OAuth2Configuration.java
@Configuration
public class OAuth2Configuration {
@Configuration
@EnableResourceServer
protected static class ResourceServerConfiguration extends ResourceServerConfigurerAdapter {
@Autowired
private CustomAuthenticationEntryPoint customAuthenticationEntryPoint;
@Autowired
pri... | |
doc_2251 | I saw some answers on stack overflow for displaying download progress, but i want to notify my users about upload progress and did not find any solution.
Here is my code:
public static async Task<string> PostFileAsync (Stream filestream, string filename, int filesize) {
var progress = new System.Net.Http.Handle... | |
doc_2252 | type Review =
{ MovieName: string;
Rating: double }
type Critic =
{ Name: string;
Ratings: Review[] }
let theReviews = [{ MovieName = "First Movie"; Rating = 5.5 }; { MovieName = "Second Movie"; Rating = 7.5 };]
let theCritic = { Name = "The Critic"; Ratings = [{ MovieName = "First Movie"; Rating = 5.5... | |
doc_2253 | This does work when clicking the button, but the process I want is:
*
*Add an onClick to the button without downloading the file straight away
*In the onClick event, show a loader
*Then download the file
*Then hide the loader when the file has downloaded
<ExcelFile
filename="Companies"
element={<Butt... | |
doc_2254 | struct X
{
template <typename Iter>
X(Iter a, Iter b) {}
template <typename Iter>
auto f(Iter a, Iter b)
{
return X(a, b);
}
};
In the "C++ Templates, The Complete Guide" 2nd edition, there was the previous example about the subtitles of implicit deduction guides with injected class na... | |
doc_2255 | executing gpml startup script...
warning: addpath: /cov: No such file or directory
warning: called from
startup at line 8 column 15
/usr/local/Cellar/octave/4.2.2_1/share/octave/4.2.2/m/startup/octaverc at line 31 column 3
warning: addpath: /doc: No such file or directory
warning: called from
startup at lin... | |
doc_2256 | Place debug information in separate TDS file
Is there any different with the following combination when compile a project:
*
*Checked "Debug Information" and Checked "Place debug information in separate TDS file"
*Unchecked "Debug Information" and Checked "Place debug information in separate TDS file"
I feel tha... | |
doc_2257 | <table>
<tr>
<div id ="test1" style ="display:none">
<th>Test1>
<td><div class="test1"></div></td>
</div>
<div id ="test2" style ="display:none">
<th>Test2>
<td><div class="test2"></div></td>
</div>
</tr>
</table>
This is not hiding TH/td tags. If I try to create different ids for th and td (without using div) and t... | |
doc_2258 | <html>
<head>
<script src="JQuery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Team Search</title>
</head>
<body>
<form action="Student Search Results.php" method="Post">
<center>Team Name: <input type="text" name="TeamName" class="search" id="TeamN... | |
doc_2259 | fun=function(x,y) {x^2+y^2}
where x and y are vectors. I would like to to find the "x" such that x^2+y^2=z, numerically in R. How do I so? I tried using the solve command but I am not sure how to specify...keep vector y the same values, solve/minimize the distance/error from the function x^2+y^2 to z to 0.
A: Follow... | |
doc_2260 | location /pass/ {
proxy_pass http://localhost:9999/pass/;
proxy_redirect off;
proxy_set_header Host $host;
}
This is working as expected - /pass requests are forwarded to the app running on port 9999.
Now, what I want to do is make the port forwarding part dynamic as follows :
location /pass/<input> ... | |
doc_2261 | I thought I had found a solution, but c.bind_all won't call my function. I don't get any errors in the shell, and it will call other functions.
from tkinter import *
from random import randint
from time import sleep, time
# Window size
window_height = 500
window_width = 800
ship_speed = 10 # Sets how many pixels to ... | |
doc_2262 | client = bigquery.Client()
query = "DELETE FROM Sample_Dataset.Sample_Table WHERE Sample_Table_Id IN {}".format(primary_key_list)
query_job = client.query(query, location="us-west1")
Where primary_key_list is some python list contains a list of Sample_Table unique id like: [123, 124, 125, ...]
Things working good with... | |
doc_2263 | Does anyone knows what this problem could be?
I'm using Win7 x64
this is the traceback information displayed on interactive console:
Traceback (most recent call last):
File "C:\Python27\Scripts\xyhome.pyw", line 21, in <module>
xyhome.main()
File "C:\Python27\lib\site-packages\xy\xyhome.pyw", line 689, in main
... | |
doc_2264 | I thought that when the writer opens the file with FileShare.Read, the reader would be able to access the file, but it produces an error saying that the file is being used by another process.
Writer Application:
FileStream fs = new FileStream("file.log", FileMode.Open, FileAccess.Write, FileShare.Read);
BinaryWriter wr... | |
doc_2265 | Ultimately, I would like to select all factors in a df/tibble and exclude certain variables by name.
Example:
df <- tibble(A = factor(c(0,1,0,1)),
B = factor(c("Yes","No","Yes","No")),
C = c(1,2,3,4))
Various attempts:
Attempt 1
df %>%
select_if(function(col) is.factor(col) & !str_detect(... | |
doc_2266 | Example of dates:
String dateOne = "2018-10-10"
String dateTwo = "2019-12-20"
And in excel these become
Row One - 10/10/2018
Row Two - 20/12/2019
I've read some similar sort of questions and tried adding a ' to the strings, so:
String dateOne = "'2018-10-10"
String dateTwo = "'2019-12-20"
But in Excel, these ' ap... | |
doc_2267 |
A: If all you want to do is insert some content at the cursor, there's no need to find its position explicitly. The following function will insert a DOM node (element or text node) at the cursor position in all the mainstream desktop browsers:
function insertNodeAtCursor(node) {
var range, html;
if (window.get... | |
doc_2268 | My understanding of the problem is - I am missing out on the Command to open the file after selecting it.
Here is my Code,
thisYear = Year(Date)
'change the display name of the open file dialog
Application.FileDialog(msoFileDialogOpen).Title = _
"Select Input Report"
'Remove all other filters
Application.... | |
doc_2269 | package main
import (
"fmt"
"math/rand"
"time"
"log"
"database/sql"
_ "github.com/go-sql-driver/mysql"
)
func main() {
db, err := sql.Open("mysql", "username:password@tcp(55b5f18rtr8895.sh.cdb.myqcloud.com:7863)/bsk")
if err != nil {
log.... | |
doc_2270 | int ignored = 0;
StreamIgnore si;
si << "This part" << " should be" << ignored << std::endl;
I want that when this code runs si will simply ignore the rest of the stream.
The thing is I want this to be as efficient as possible.
One obvious solution would be to have:
template <typename T>
StreamIgnore& opertaor<<(cons... | |
doc_2271 | public class ReloadableWeapon {
private int numberofbullets;
public ReloadableWeapon(int numberofbullets){
this.numberofbullets = numberofbullets;
}
public void attack(){
numberofbullets--;
}
public void reload(int reloadBullets){
this.numberofbullets += r... | |
doc_2272 | Here is my code:
var map = L.map('map', {
crs: L.CRS.Simple,
attributionControl: false
}).setView([0, 0], 2)
L.tileLayer('/chunks/{x}.{y}.png', {
maxNativeZoom: 1,
minNativeZoom: 1,
}).addTo(map)
function ReloadTile(x,y){
// UPDATE TILE HERE Request for example /chunks/{1}.{1}.png depending on input
}
... | |
doc_2273 | +-------------------+
|Percentage Amount|
+-------------------+
|50 3000 |
|20 2000 |
|15 1500 |
|15 1500 |
+-------------------+
I want to update my amount of each row based on the TotalAmount i will pass in my procedure.
Example: If i give 50000 then it will re-calculate... | |
doc_2274 | I would like to ask you how to export each order on a Worksheet Worksheet within each piece of data is a commodity information
The following are examples
<Workbook>
<Worksheet ss:Name="order1">
<Table>
<Row>
<Cell><Data ss:Type="String">Order #</Data></Cell>
<Cell><Data ss:Type="Stri... | |
doc_2275 |
return the top 5 customer ids and their rankings based on their spend
for each store.
There are only 2 tables - payment and customer. There are 2 stores in total.
For the store_id = 2, the rank() gives repeating 1,2,2,3,4,5 values which is 6. I dont know how to choose the 5 with sql code. Since it is actually 6 - i c... | |
doc_2276 | File 1 has this format:
f 55 SE 0 0 0
re 13 SE 0 0 0
File 2 has this format:
fe 10 f
fe 02 h
fe 02 re
I need to first compare the files to see if the third column values of file 2 are present in the first column of file 1. If they are, I need the entire row, which contains the value present in both files, in fi... | |
doc_2277 |
*
*(void) publishFeedWithName:(NSString*)name
captionText:(NSString*)caption
imageurl:(NSString*)url
linkurl:(NSString*)href
userMessagePrompt:(NSString*)prompt
actionLabel:(NSString*)label
actionText:(NSString*)text
a... | |
doc_2278 | As you can see in the Ingress file bellow, we have the backend rules to route the traffic to specific services. The problem is that, most of the specific requests like /task/connections/update/advanced/ or /task/connections/update/advanced/ are being sent to the root path / that should only serve the front-end (which w... | |
doc_2279 | Here is my nginx config file (I have changed the IP and domains for privacy):
server {
listen 80;
server_name my.ip.address example.com www.example.com;
location = /facivon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/tony/vp/vp/config/;
}
location / {
... | |
doc_2280 | <form name="enrollmentform" #enrollmentform="ngForm" novalidate>
<div class='field-container'>
<input type="text" value="" size="25" maxlength="30" placeholder="fullname" [dir]="direction" name="fullname" required #first_name="ngModel" class="floating-input"/>
<div *ngIf="enrollmentform.submitted ... | |
doc_2281 | Sample xml file format is as following:
<shows>
<show>
<eventID>10025</eventID>
<name>MARCH Barrel</name>
<ticketURL></ticketURL>
<venue>
<venueID>3648</venueID>
<name>Double Bar... | |
doc_2282 |
A: Hi here is a basic example of what you want using :
*
*The HTML content editable property.
*A css class to append a focusout event to the table cell.
*A simple loop to sum all values when one value changes.
$('#tbodyTest >tr').on('focusout', 'td.editable', (e) => {
let target = $(e.target),
parent... | |
doc_2283 |
*
*Controller:
myapp.controller('ClientsCtrl', function ($scope, UserSvc) {
$scope.showForm = UserSvc.frmOpened;
$scope.$watch(function () {
return UserSvc.frmOpened;
}, function () {
$scope.showForm = UserSvc.frmOpened;
console.log('Changed... ' + $scope.showForm);
}... | |
doc_2284 | This is what I have at the moment;
function my_form_funnction() {
global $current_user;
$vat_no = get_user_meta( get_current_user_id(), 'vat_number', true );
?>
<form name="setPrices" action="" method="POST">
<label for="lowPrice">Vat Number: </label>
<input type="text" id="vat_number" name="vat_number" value="<?php... | |
doc_2285 | public class GenericClass<T> {
private final Class<T> type;
public GenericClass(Class<T> type) {
this.type = type;
}
public Class<T> getMyType() {
return this.type;
}
}
With that class code is easy to instantiate a new instance of the class with a non-generic type. For example:
GenericClass<String> ... | |
doc_2286 | library(sf)
library(plotly)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
plot_geo(nc, color = I("red"), fill=I("blue"))
| |
doc_2287 |
A: Easiest way it to add this style to the p enclosing them.
First add a class to the p, like this:
<p class="social-icons-footer">
Then add the style in your css file:
.social-icons-footer {
width: 250px;
display: block;
margin: 0 auto;
}
A: You could utilize
/* style for div parent of links */
div {
displa... | |
doc_2288 | import com.cloudbees.plugins.credentials.impl.*;
import com.cloudbees.plugins.credentials.*;
import com.cloudbees.plugins.credentials.domains.*;
Credentials c = (Credentials) new WhateverClassSecretText(
CredentialsScope.GLOBAL,
"my-credential-id",
"Secret Text for something",
"S3cr3t") // TODO find r... | |
doc_2289 | foreach x in File1 ; do grep $x File2.csv >> OUTPUT.csv ; done
bash: foreach: command not found
Here's what I'm working with:
File1
ABCD
EFGH
IJLK
...etc
File2.csv
NODENAME,ABCD,PORTID,LONGNAME,NODEIP,WORKGROUP,etc...
...a whole lot of other entries that might/don't match... etc...
OUTPUT.csv <-- Final file.
I'm l... | |
doc_2290 | Here is present code -
private ImplClass implObject;
private Future future;
for (Iterator iter = anArrayList.iterator(); iter.hasNext();) {
//Gets a GenericObjectPool Object
implObject = (ImplClass) this.getImplPool().borrowObject();
future = getExecutorServices().submit(implObject);
}
// Wait for Exe... | |
doc_2291 | I will be calling Javascript from Splunk UI.
What are the splunk configuration changes needs to be done ?
TIA.
| |
doc_2292 | hi everyone, I'm having trouble using the fullscreen overlay api and would like to ask for help!
follow the steps
*
*Using chrome on Android device, enter full screen overlay mode
*Rotary device.
*Use the back key to exit full screen overlay mode
*Refresh the page
*Wait for the page to load and wait for a few sec... | |
doc_2293 | ./foo.py train -a 1 -b 2
./foo.py test -a 3 -c 4
./foo.py train -a 1 -b 2 test -a 3 -c 4
I've been trying using two subparsers ('test','train') but it seems like only one can be parsed at the time. Also it would be great to have those subparsers parents of the main parser such that, e.g. command '-a' doesn't have to... | |
doc_2294 | The basic logic is that 1. animation should play at a default speed, and when it hits the end, come back at negative half speed. 2. If the animation is triggered again while it is going backwards, it should continue forward as in step 1.
The problem is that the animation gets stuck on the last frame about 20% of the ti... | |
doc_2295 | Any ideas why this can't happen?
if the code is like the following
@Path("/cars")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public interface CarService {
@POST
void create(Car car);
}
it works.
If it is like the below
@Path("/")
@Consumes(MediaType.APPLICATION_JSON)
@Produ... | |
doc_2296 | let averageReport: any = [1, 2, 3, 4, 5]
let maleData: Array<any> = [];
let femaleData: Array<any> = [];
I loop through average report and push values to maleData and femaleData. I declared the array types as any but still typescript is complaining that "Argument of type 'number' is not assignable to parameter of type... | |
doc_2297 | <div id="subscriberApp" class="row">
<div class="col-md-6">
<h2>Subscribers List</h2>
<table class="table">
<thead>
<tr>
<th>Login</th>
... | |
doc_2298 | till today it was working fine but now when I open my website on mobile it open popups of onclkds.com, I have searched for the solution and many of the forums have suggested that it is issue related to browser extensions.
But as I totally researched on it, may be its because of some free plugins which is dynamically cr... | |
doc_2299 | The middleware is attached to a specific spider and the logs show its attached successfully and detached the original one:
Debugging this, I can see that the breakpoint on the process_response function in the original retry middleware is stopped while in my custom one it does not stop.
Any ideas?
EDIT:
to reproduce:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.