id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23536100 | I want to write the following, keeping both namespace A and B on a single line, to receive a single indent for the namespace block.
namespace A { namespace B {
class
{
....
}
}// end B
}// end A
The problem is that as soon as I auto format (CTRL K-D), Visual Studio reformat this to
namespace A
{ ... | |
doc_23536101 | EDIT
From the docs:
The Firebase Admin SDKs automatically connect to the Cloud Firestore
emulator when the FIRESTORE_EMULATOR_HOST environment variable is set
I do have that environment variable set but I'm trying to connect to production. How can I instruct the SDK to do this?
index.js
const admin = require("fireba... | |
doc_23536102 | On adding ADT plugin to in software update I got following some dependency error.
Cannot complete the install because one or more required items could
not be found. Software being installed: Android Development Tools
16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534... | |
doc_23536103 | can anyone help me to find where I am wrong. for help the code is given below.
<mx:DataGrid id="userlist"
horizontalGridLines="true"
horizontalGridLineColor="0xeeeeee"
dataChange="dataChanged();"
... | |
doc_23536104 | Here is the command :
bash <(curl -s https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/master/install.sh) '1.0.0'
I am able to execute the command in shell without the version like this:
/bin/bash -c "$(curl -s https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/master/install.sh)"
but... | |
doc_23536105 | Category: Foresatt
Among them:
Name: 'foresatt epost', type:email, number: multiple values
I would like to list these values using Google Script. I used this:
https://developers.google.com/admin-sdk/directory/v1/quickstart/apps-script
To write this code:
function listUsers() {
var optionalArgs = {
customer: 'my_... | |
doc_23536106 | Upon building the image with docker-compose up --build with the following Dockerfile
FROM php:7.3-apache-stretch
RUN apt-get update -y && apt-get install -y libpng-dev
RUN docker-php-ext-install pdo pdo_mysql gd
FROM composer:1.9.0 as build
WORKDIR /app
COPY . /app
RUN composer global require hirak/prestissimo && comp... | |
doc_23536107 | public partial class Service1 : ServiceBase {
It seems to be an application, on properties we see:
Output type: Windows Application
Target framework: .NET Framework 4
This somehow translates to a SearchUpdater.exe file we have on the web server which is run every day. The code deletes a search index text file and th... | |
doc_23536108 | "value1:value2::value3".split(":");
Problem is that I want it to include the blank results.
It returns: [value1, value2, value3]
It should be: [value1, value2, , value3]
Does anyone know the regexp to fix this?
Ok I found cause of problem. I'm actually reading a text file and it contains this line:
123:;~\&:ST02:M:te... | |
doc_23536109 | CSS
#element{
margin-left: 10%;
}
Javascript
$('#element').css('margin-left'); // returns 29px in Firefox, but 10% in Chrome
getComputedStyle(document.getElementById('element')).getPropertyValue('margin-left'); // returns 29px in Firefox, but 10% in Chrome
A: This example is using css width, but the principle ca... | |
doc_23536110 | var dataModel = {name1:"value1", name2:"value2"};
$.ajax({
url: "/testURL",
type: "POST",
async: false,
contentType: "application/json",
data: dataModel,
success: function(response) {
}
})
Here is my relevant snipp... | |
doc_23536111 | A number can also be prepended to the format of the examine command
to examine multiple units at the target address.
source: hacking the art of exploration
(gdb) x/2x $eip
0x8048384 <main+16>: 0x00fc45c7 0x83000000
(gdb) x/x $eip
0x8048384 <main+16>: 0x00fc45c7
I know that the second examine command returns th... | |
doc_23536112 | From TokenInterface $token, i can print with $token->getUser(), it works correctly. I'm stuck really do not know where the problem is. I will give u some suspecious codes that maybe has error.
security.yaml
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
... | |
doc_23536113 | Kind regards
| |
doc_23536114 | I want a 100% width div, with 1 row of elements. I need to scroll through this div, just like: http://jqueryfordesigners.com/demo/scrollable-timelines.html
So with a hidden overflow and such.
But now I want some sort of smooth ease when I let go of the mouseclick, so it'll be like a sort sweep. So when I drag the scr... | |
doc_23536115 | IServiceCollection services = ...
services.AddScoped<IEmailService, EmailService>();
Then I know that for each HTTP request a new scope will be created and a new instance of Email service will be reused. Moreover, the same scope will persist for the lifetime of a request.
Now, imagine I add a Hangfire Background Job l... | |
doc_23536116 | Image a box, or a cube, all sides right.
If we were to put the box on a flat surface, the face touching the bottom, would be the floor or base. if the base had an inside, which most boxes do, from the outside you would not be able to see it right.
Unfortunately, in my code you can. instead of a box, you have a room, in... | |
doc_23536117 |
Too few arguments to function
FOS\UserBundle\Controller\ResettingController::__construct(), 0 passed
in
/var/www/project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php
on line 200 and exactly 6 expected
that happens when i open the link in the automatic Mail of FosUserBundle... | |
doc_23536118 | I've created an IAM user, and have the access key and secret access key ID associated with the user, but I'm struggling to figure out how to grant that user permissions to an S3 bucket. I'd like to grant them write access (but not read) to the bucket, but am starting with all access to see if I can get permissions work... | |
doc_23536119 | If I do this, it works:
Restrictions.like("DBFieldName", object.getFieldName());
Now, I need to add the %, but if I do something like:
Restrictions.like("DBFieldName", "%" + object.getFieldName());
I get this error:
java.lang.ClassCastException: java.lang.String cannot be cast to java.sql.Blob
What should I do?
Than... | |
doc_23536120 | The code I'm using is:
req = urllib2.Request(url)
fh = urllib2.urlopen(req)
with contextlib.closing(ZipFile("test.csv.zip", "w", zipfile.ZIP_STORED)) as f:
f.write(fh.read())
f.close()
What this does is to print the contents of the csv file to stdout and create an empty zipfile.
Any ideas of what could be wron... | |
doc_23536121 | WhatI have done so far:
func startBlink() {
UIView.animate(withDuration: 0.8,//Time duration
delay:0.0,
options:[.allowUserInteraction, .curveEaseInOut, .autoreverse, .repeat],
animations: { self.alpha = 0... | |
doc_23536122 | But before I go about receiving and sending payments I want to make sure that any new user signing up to my website already has a paypal account. IE when they sign up to my website I'd like to first of all check that the email address they supplied me with is already linked to a valid paypal account.
I've never had to ... | |
doc_23536123 | I Have just created a new big method which also adds a lot more data to the database.
When I call this, it appears to work fine the first time it has run, but, if I run it again within a few minutes of the previous attempt, I get the following error:
The changes to the database were committed successfully, but an erro... | |
doc_23536124 | I added icudt46l.zip to the assets folder and *.so to the libs/armeabi folder.
As it's an upgrade, I want to encrypt the unencrypted database.
I tested the code on a Samsung S2 (Android 2.3.3) and a Sony Z1 (Android 4.4.2) and it works correctly, the update from an unencrypted database as well with a new encrypted data... | |
doc_23536125 | Possible Duplicate:
How to get screenshot to include the invoking window (on XP)
I'm currently using CopyFromScreen(0, 0, 0, 0, imageSize) to capture the desktop but unfortunately, there is a particular winform's contents which it didn't capture (the rest are alright).
This winform's job is pretty simple; it's just ... | |
doc_23536126 | I think that the code is simple.
async onSubmit() {
try {
const user = await Auth.signIn(this.loginForm['username'].value,
this.loginForm['password'].value);
} catch (error) {
console.log('error signing in', error);
}
}
Here is my DEMO, however it says that I miss some packages such http and ... | |
doc_23536127 | my app.scss code
.my-nav .toolbar .toolbar-background {
background-color: blue;
}
how I am trying to override It in the other screen where I want it to be black
home.scss
.my-nav .toolbar .toolbar-background {
background-color: black;
}
Any help would be appreciated
A: The order of the imports should be... | |
doc_23536128 | I am on win 7. I have successfully setup everything using this tutorial:
http://www.kgx.net.nz/2010/03/cygwin-sshd-and-windows-7/
I am up to this command:
ssh-host-config
..but I receive the error in the title. I have searched google and many other places. I cannot find one instance of somebody having this problem.
Any... | |
doc_23536129 | Axis2-web runs fine, but when I request the WSDL of my service I just get an expcetion:
Caused by: java.lang.NoClassDefFoundError: javax/lang/model/element/Element
at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.<init>(WebServiceWrapperGenerator.java:130)
at com.sun.tools.ws.processo... | |
doc_23536130 |
A: You should be able to use this snippet:
((RemoteEndpointMessageProperty)OperationContext.Current.IncomingMessageProperties[RemoteEndpointMessageProperty.Name]).Address;
| |
doc_23536131 | For example: if I type "user" for the username and "pass" for the password the view should display "Dog, Cat, Mouse, Parrot, Goldfish" in a list.
The JSON file can be modified if my syntax is incorrect.
JSON:
[
{
"username": "user",
"password": "pass",
"type": "Animals",
"items": ["D... | |
doc_23536132 | The PostgreSQL one starts successfully, but when the Keycloak one tries to connect to PostgreSQL returns a connection refused.
I put all the environment variables to Keycloak to connect to that PostgreSQL container
withEnv("DB_VENDOR", "postgres");
withEnv("DB_DATABASE", KeycloakDS);
withEnv("DB_SCHEMA", test);
withEnv... | |
doc_23536133 |
A: in your case it could be:
class XY : Object {
@Getter(fluent = true)
public boolean hasObject;
}
OR
@Accessors(fluent = true)
class XY : Object {
public boolean hasObject;
}
according to the docs:
fluent - A boolean. If true, the getter for pepper is just pepper(), and the setter is pepper... | |
doc_23536134 | I have used following two methods but they doesnt seem to work,
input = gzopen (argv[i], "r");
Second method.
arg = argv[1];
cmd = malloc(sizeof(prefix) + strlen(arg) + 1);
if (!cmd) {
fprintf(stderr, "%s: malloc: %s\n", argv[i], strerror(errno));
return 1;
}
sprintf(cmd, "%s%s", prefix, ... | |
doc_23536135 | Link to text that is distorted on windows Firefox and Windows Chrome:
http://dansdemos.info/prelaunch/hitch/20140219_1735/bk_promos/mergecopy
You've already invested in creating a great book...
Link to sample that is supposed to have same styles, but does not distort in windows Firefox and Windows Chrome:
http://dansde... | |
doc_23536136 | After inspecting the page I see the following errors:
A: Try this...and you check this also
you must add check package.json and delete "test" "echo \"Error: no test specified\" && exit 1" inside "scripts" object.
Let's add the start command instead.
"start": "webpack-dev-server --hot"
And also check your node_modul... | |
doc_23536137 | public class BusinessLogicRegex : ValidationAttribute, IClientValidatable
{
private const string _defaultErrorMessage = "Invalid Password. {0}";
private string _description;
//Other private members
...
public BusinessLogicRegex(string getMember, Type getMemberType, string descriptionMember, Type de... | |
doc_23536138 | .table-cell-required-field {
-fx-control-inner-background: -sif-required_field-color;
-fx-background-color:-fx-table-cell-border-color, -fx-control-inner-background;
-fx-border-color: deepskyblue deepskyblue deepskyblue deepskyblue ;
-fx-background-insets: 0, 0 0 1 0;
-fx-padding: 0.0em;
-fx-... | |
doc_23536139 | String manipulation when given an integer parameter Python
I'll explan. I have this SVG image (just an example):
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4000 4000">
<defs>
<style>.cls-1{opacity:0.05;}.cls-2{opacity:0.1;}.cls-3{opacity:0.2;}.cls-4{opacity:0.08;}</style>
</defs>
<title>shader</title>
<g ... | |
doc_23536140 |
CSS
@font-face {
font-family: themify;
src: url({{ asset('admin_assets/icons/themify-icons/fonts/themify.eot@-fvbane') }});
src: url({{ asset('admin_assets/icons/themify-icons/fonts/themify.eot@') }})
format("embedded-opentype"),
url({{ asset('admin_assets/icons/themify-icons/fonts/them... | |
doc_23536141 | I would like to know why my last example writes 0 ms:
private Task<List<ACTION>> GetActions()
{
return Task.Factory.StartNew(() =>
{
using (var context = new DbContext())
{
return context.ACTION.ToList();
}
});
}
-
var sw1 = new Stopwatch();
sw1.Start();
var sync1 = contex... | |
doc_23536142 | So the camera table has entries id(INT) which is unique, name(VARCHAR), reviewRank(INT), price(INT), and failRate(INT). Here is an example of the TABLE setup and inserts code:
CREATE TABLE CAMERA(
id INTEGER,
name VARCHAR(30),
reviewRank INT,
price INT,
failRate INT,
PRIMARY KEY(id))ENGINE=INNODB;
INSERT INTO CAMERA V... | |
doc_23536143 | i have a form that has many text boxes and combo boxes
some of this controls - not all of them - can not be empty
if the user click on save button i want the labels of that empty controls turns to red ....
i tried
if (cmbNyaba.SelectedIndex == -1)
{
lblNyaba.ForeColor = Color.Red;
retur... | |
doc_23536144 | I'm assuming it would be something like adding an image above the navbar to show the bump but that doesn't seem right since the actual button in the navbar wouldn't extend into the curved area.
Here's a link to an image of the navbar in question:
| |
doc_23536145 | I read that using Javascript/JQuery we can do that, but on googling I didn't find a simple example of doing that, any example/reference will be of great help.
A: The short answer goes like this: jQuery is for DOM manipulation. Headers and footers are DOM elements. That's why you can use jQuery to create them.
Somethi... | |
doc_23536146 | {"list_of_something":[
{"first_name": "name",
"property_one": "property",
"property_two": "property"
},
{"first_name": "name",
"property_one": "property",
"property_two": "property"
},
....
I want to put it in one item. I tried this
if json_data.get(... | |
doc_23536147 | <img src={src} alt="">
is the same as:
<img {src} alt="">
My question is whether there is a possibility to do the same in React.js? E.g.:
<button {type}>Click me!</button>
A: No, you can't do it. But you can use spread operator to pass the list props.
const props = {src, type};
<button {...props}>Click me!</button... | |
doc_23536148 | Here is my stack trace
[SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.] System.Security.CodeAccessSecurityEngine.Check(Object
demand, StackCrawlMark& stackMark, Boolean i... | |
doc_23536149 | When the application runs in VNC client viewer, the terminal windows will not be opened since the display port is not 0.
In order to fix this issue, I need to know where my application is running at either on Server or Client, so I can set it to the correct display port.
Thanks!
Tom
| |
doc_23536150 | TID: [46] [] [2016-09-04 19:09:10,344] @tenant1.edu [46] [IS]ERROR {org.wso2.carbon.core.util.AnonymousSessionUtil} - Error occurred while getting tenant user realm for tenant id : 46
org.wso2.carbon.registry.core.exceptions.RegistryException: Error occurred while getting tenant user realm for tenant id : 46
... | |
doc_23536151 | pod 'SnowplowTracker', '~> 1.3'
However I am getting this error when I run my pod install:
[!] CocoaPods could not find compatible versions for pod "SnowplowTracker":
In Podfile:
RNVideo (from `../node_modules/react-native-video`) was resolved to 3.9.2, which depends on
MCTracker (~> 1.1.0) was resolved to... | |
doc_23536152 | const content = await axios.request(getData(id)).then(res => res.data)
Where getData returns a configuration object.
I am importing axios like so:
import * as axios from 'axios'
A: When we look at axios type definition file, we can see that it uses default export. So, instead of using import * as axios from axios, th... | |
doc_23536153 | ...
textInputElement.onKeyDown.listen((KeyboardEvent ev) {
if (new String.fromCharCode(ev.keyCode).length > 0) {
callAFunction();
}
});
...
(+ the same change for the onKeyUp event)
When I tested this in Dartium I saw that by focusing the input element and then pressing any key, a keydown event is triggered ... | |
doc_23536154 | The app only writes periodically some data to a file on a volume mounted to the container (defined in my docker-compose.yml)
I try to use fs.writeSync and fs.writeFileSync
Both ways results with correct data in the file. However, if I use the second way, docker stats have incorrect (zero) data for output (Block IO) for... | |
doc_23536155 | here is the screenshot
and noticed some errors after checking the version of angular cli.
When i'm trying to create a project using "ng-new my-app"(without quote) it gives me this error
here is the screenshot
A: You are not using the correct command name. Use:
ng new my-app
A: Make sure you installed Angular CLI gl... | |
doc_23536156 | For Table 4, make sure your program actually prints the table based on the length of the longest title. You will have to write code to find the length of the longest title, then use that number. For instance, if the data only had CS 208 and MA 311, the table would look like
CS 208 Discrete Mathematics 24
MA 311 Linea... | |
doc_23536157 | const data = [
{
category: 'Techonology',
subcategory: 'laptop',
sale: 19000,
profit: 909049,
},
{
category: 'Furniture',
subcategory: 'badge',
sale: 2009900,
profit: 699600,
},
{
category: 'Techonology',
subcategory: 'chair',
sale: 30000,
profit: 500,
},
{
... | |
doc_23536158 | In this example, column a is dtype object, but the first item is string while all the others are int:
import numpy as np, pandas as pd
df=pd.DataFrame()
df['a']=np.arange(0,9)
df.iloc[0,0]='test'
print(df.dtypes)
print(type(df.iloc[0,0]))
print(type(df.iloc[1,0]))
My question is: is there a quick way to identify which... | |
doc_23536159 | $bills = Bill::leftJoin('important_dates', 'important_dates.id', '=', 'bills.important_date_id')
->selectRaw("IF(bills.credit_card_id IS NULL AND important_dates.sent_at IS NOT NULL, important_dates.sent_at, bills.date) AS 'constructed_date'")
->havingRaw('constructed_date BETWEEN \''.$data_model['date_from'].... | |
doc_23536160 | https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/list
But I dont see it in the azure package
https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/compute/arm-compute/src/computeManagementClient.ts
Am I overlooking how they're translating the restful pattern to the JS SDK?
A: They do! I don't know... | |
doc_23536161 | Currently my code in the view is:
%td= collection_select(:schedule, "subject_id[#{i}]", Subject.all, :id, :prefix, prompt: true)
%td= grouped_collection_select(:schedule, "course_ids[#{i}]", Subject.all, :courses, :prefix, :id, :coursetitle, prompt: true)
The grouped collection select has everything separated by subje... | |
doc_23536162 | This works fine:
require_once("PHPMailer_Loader.php");
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
SendEmailWindows("foo@bar.com", "smtp test", "test body");
function SendEmailWindows($emailTo, $subject, $body){
$mail = new PHPMailer;
[... all the rest of the function code]
}
Yet w... | |
doc_23536163 | router.post('/register', [
check('email').custom((value, {req}) => {
return new Promise((resolve, reject) => {
Users.findOne({email:req.body.email}, function(err, user){
if(err) {
reject(new Error('Server Error'))
}
if(Boolean(user)) {
... | |
doc_23536164 | import netCDF4 as nc
import numpy as np
import matplotlib.pyplot as plt
import csv as cs
import pandas as pd
ncfile = nc.Dataset('C:\Users\mmso2\Google Drive\ENVI_I-PAC_2007_10_21_21_22_47.nc')#office machine
SARwind = ncfile.variables['sar_wind']
ModelWind = ncfile.variables['model_speed']
LON = ncfile.variable... | |
doc_23536165 | NSString *htmlString = [NSString stringWithFormat:@"<html><head> <meta name = \"viewport\" content = \"initial-scale = 1.0, user-scalable = no, width = %@\"/></head> <body style=\"background:#F00;margin-top:0px;margin-left:0px\"> <div><object width=\"%@\" height=\"%@\"> <param name=\"movie\" value=\"%@\"></param> <par... | |
doc_23536166 | def func(arg):
if arg in precomputed:
return precomputed[arg]
else:
return expensive_function(arg)
Now it would be a bit cleaner if I could do something like this using dict.get() default values:
def func(arg):
return precomputed.get(arg, expensive_function(arg))
The problem is, expensive_... | |
doc_23536167 | <div class="col-lg-8 col-xs-12" style="background-color:#F30;height:150px;">Second Section</div>
<div class="col-lg-4 col-xs-12" style="background-color:#F90;height:150px;">Third Column</div>
<div class="col-lg-8 col-xs-12 col-xs-pu11-12"style="background-color:#CF0;height:150px;">Fourth Column</div>
On mobile view I... | |
doc_23536168 | $("#first_name").change(function() {
$('.showvalue').text("First Name Successfully Updated.");
});
$("#last_name").change(function() {
$('.showvalue').text("last Name Successfully Updated.");
});
A: This will show "First Name Successfully Updated." for the first name and "Last Name Successfully Updated." for the... | |
doc_23536169 | What I want to do:
*
*[In C#] Read variable from graphic memory to cpu memory
*[In C#] Set variable to zero
*[In C#] Execute normal drawing of my scene
*[In Shader] One of the fragment passes writes something to the variable (UPDATE)
*Restart the loop
(UPDATE)
I pass the current mouse coordinates to the fragm... | |
doc_23536170 | userid1_userid2/image.bmp
OR
userid2_userid1/image.bmp
How do I grant access to those images only to users with userid1 or userid2? I tried several things but the documentation is not really clear to me.
A: Solved by using these rules:
service firebase.storage {
match /b/{bucket}/o {
match /{path}/{spath} {
... | |
doc_23536171 | For example if file contains
12 10
10 should be the value on index 12. How can I do that in Java?
A: To store in an array is not a good idea as you don’t know what would be the largest index in a given file and you would end up with ArrayIndexOutOfBoundException.
Use HashMap<Integer, Integer> to store the data from t... | |
doc_23536172 | I was able to flash my Nexbox A95X (s905x) 2Gb Ram 8gb storage once yesterday. The next day I tried to flash my second box which is a 2gb Ram 16gb storage same model. But before I plug in the box by USB transfer cable, I have to import the .img firmware file into the USB burning tool program. When I import any .img fil... | |
doc_23536173 | Since the fragment creation chain (onCreate(), onCreateView() etc) are called in a different thread than the onPostNetworkRequestWithCode() which repaints the views, I am having a race condition sometimes when the onPostNetworkRequestWithCode() method does not find a view to paint. How can I ask it to wait till the vie... | |
doc_23536174 | console.log("Caller Function Name"+arguments.callee.caller.name);
A: You can override qInstallMessageHandler default function and provide your custom function which also prints line number / caller. You can find an example in the linked documentation. Another partial example:
void loggingMessageHandler(QtMsgType typ... | |
doc_23536175 | Each line represent a row in the data base and there are 500-1000 rows to be inserted at a time.
Is is better to insert the data in the database directly by calling store procedure(the procedure contain the logic to call log file and insert data)
OR
Is it better to parse it in the application and insert data.
29 ... | |
doc_23536176 | struct hashElem
{
int freq;
int error;
};
//basically this function adds some value to to the error field of each element
struct hashErrorAdd{
const int error;
hashErrorAdd(int _error): error(_error){}
__host__ __device__
struct hashElem operator()(const hashElem& o1,const int& o2)
{
... | |
doc_23536177 | I tried assigning the enterprise app owner using graph API, output shows success. unfortunately from GUI my user is still not an owner of that app.
I guess this issue is with the role I got for the user. Any input to solve this issue?
A: I tried adding owner to a enterprise application using the below API for a owner ... | |
doc_23536178 | before
function test () {
return 'test' ;
}
after
function test() {
return 'test';
}
A: At the moment it's formatted to:
function test() {
return 'test';
}
As I can see the only problem is with the number of spaces after return. I've created a new issue for it, please star/vote. If you find other cases w... | |
doc_23536179 | jdk.nashorn.api.scripting.NashornScriptEngine scriptEngine =(NashornScriptEngine) factory.getEngineByName("nashorn");
ScriptContext context = scriptEngine.getContext();
Bindings bindings = context.getBindings(ScriptContext.ENGINE_SCOPE);
bindings.put("x","Guest");
engine.eval("Hello, ${x}",context);
But I'm getting j... | |
doc_23536180 | I have a main component that controls state. It has all of the functions to update state and passes these down to child components via props. I've simplified the code to focus on one of these functions.
Here's the component now, all works as it should:
ManageMenu.js
import React from 'react'
class ManageMenu extends R... | |
doc_23536181 | using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
... | |
doc_23536182 |
function_1 : This is a the first
function, and usually the next
function is the second function. How
do I increment the next function.
function_2 : This is the second
function. Here I stop.
How do I create a macro that would search through the whole word document, determined that the next number is functio... | |
doc_23536183 | I have a batch job that is kicked off by quartz daily at midnight. The job tries to read one or more flat files and processes them. Sometimes the file the job reads is NOT where it needs to be. so getting FileNotFoundException. We would like to email the production support team that the required data file was not a... | |
doc_23536184 | Please assist if anyone has a solution
| |
doc_23536185 | ||
doc_23536186 | https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start?view=aspnetcore-6.0&tabs=visual-studio
Now first problem is decimal handeling
In my model->Movies I have this property:
Column(TypeName = "decimal(18, 2)")]
public decimal Price { get; set; }
When I create a new item and give it a p... | |
doc_23536187 | Notice: Undefined index: v in C:\inetpub\ts61\show.php on line 67161
I just want to default to a set behaviour if none of the conditions are able to be met.
It seems to be from this call (but I can't be certain):
if (($_GET['v']) == NULL){}`
In this code:
if (!isset($_GET['v'])) {
echo("<script>alert('I'm okay!!!');<... | |
doc_23536188 |
A: MyFile = Dir(CurDir() & "\" & "*.frm")
Do While MyFile <> ""
' do stuff to file
MyFile = Dir
Loop
| |
doc_23536189 | From a performance standpoint, I know that always opening a connection to a database every time I execute a query may not be a very good practice (and also that when I try to use mysql_real_escape_string() to filter input, it doesn't work, because there's no active database connection). But I would like to be more clar... | |
doc_23536190 | import java.util.Properties
import org.apache.spark.SparkConf
import org.apache.spark.streaming.StreamingContext
import org.apache.spark.streaming.Seconds
import twitter4j.conf.ConfigurationBuilder
import twitter4j.auth.OAuthAuthorization
import twitter4j.Status
import org.apache.spark.streaming.twitter.TwitterUtils
im... | |
doc_23536191 | In the pod spec, I set the ephemeral-storage to be at least 100Gi (see resource description below). However, when I run $ df -h in the pod, the ephemeral storage (of type emptyDir) has a size of 124G. I would have expected it to have 100G like I requested. The overlay storage I would have expected to be close to 1474Gb... | |
doc_23536192 | Here's the code for the SmartPTR so far:
template <typename TYPE>
class SmartPointer
{
TYPE* pData;
public:
SmartPointer(void)
: pData(0)
{
std::cout << "DEFAULT CTOR" << std::endl;
}
SmartPointer(TYPE* data)
: pData(data)
{
std::cout << "CTOR WITH TYPE*" << std:... | |
doc_23536193 | Why?
What I should do ?
var Request = require("sdk/request").Request;
var quijote = Request({
url: "http://www.latin1files.org/",
onComplete: function (response) {
console.log(response.text);
}
});
quijote.get();
Addon:
https://addons.cdn.mozilla.net/_files/478037/proxylist-initial.rev19-fx.xpi
So the add... | |
doc_23536194 | https://www.woolworths.co.za/prod/Food/Fruit-Vegetables-Salads/Salads-Herbs/Cucumbers/English-Cucumber-300-g-650-g/_/A-20004019
using scrapy and scrapy-splash.
The problem that I am running into is that it seems like the price and image are fetched from somewhere using javascript (if I load the webiste in chrome and di... | |
doc_23536195 | swich(i){
case 1:
break;
case 2:
break;
}
I want to insert "case", but how do I create PsiSwitchLabelStatement?
A: You can create any Java statement using this method:
PsiElementFactory.SERVICE.getInstance(project).createStatementFromText(text, null)
| |
doc_23536196 | (Below is the picture of the output:)
Input: >>> from nltk.book import *
Output (After I hit 'Enter'):
So now my questions are what is the error about and if there is a way to solve it, then what should I need to do?
Thanks for looking into my problem.
A: This appears to be a known bug with nltk and Python 3. It seem... | |
doc_23536197 | Example:
Enter name: james231
output:
james231
james231
james231
james231
james231
Mang Jose
Mang Jose
Mang Jose
Correct output should be:
Enter Name: james231
output:
Mang Jose
for(int i=0; i< name.length(); i++) {
if(!(name.charAt(i) >='A' && name.charAt(i) <= 'Z' || name.charAt(i) >='a' && name.charAt(i) <=... | |
doc_23536198 |
I'm trying to set up a force directed graph with groups that can expand or collapse on click, similar to GerHobbelt's example for d3.js. I'm using cola.js with d3 because I need geometric constraints.
I've set up a script that works fine in both Chrome and Firefox (versions 44.0.2403.125 and 39.0 respectively). That s... | |
doc_23536199 | *
*Hi, i don't undestand why this doesn't work, i am trying to retrieve whatever comes after "offer" in the specified url and then display it but when i click on the Offer button on android screen nothing happens. Please help if you could. I have the internet permission in manifest.
import java.io.BufferedReader;
impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.