id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23514200 | I'm trying to take the string myname, and add Mr. to the start of it. I know I could do it simply as just myname = "Mr. " + myname however I'm trying to understand how to use methods to change the values of variables. So, why doesn't this change?
public class Program
{
public static void Main(string[] args)... | |
doc_23514201 | listBox.ItemsSource = SomeController.GetSomeList();
Status field is a boolean field in my class model and I want to display open and close in Status fields rather than showing true and false but i dont find any event where I can do this. We dont have any event like onrowcreated or something like this where I can change... | |
doc_23514202 | In the AndroidManifest.xml the 2 http lines and all the android: are all red and the the activity opening tag has a red squiggly line under it also. I have zero idea what i have done wrong! Almost like internet has gone? Just a noob so i have no idea please help!
<manifest xmlns:android="http://schemas.android.com/apk... | |
doc_23514203 |
A: It is a good practice(as you have rightly mentioned) to gradually "retire" an existing API in favor of a new one; in the meantime continuing to provide the older API for backward compatibility.
Currently you need to mark the function(s) part of the existing older API as deprecated. This can be done by specifying th... | |
doc_23514204 |
A: Ignore the constraints set in the following code, but the concept should go like this:
containerView = GradientView.init()
self.view.addSubview(containerView)
containerView.translatesAutoresizingMaskIntoConstraints = false
containerView.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant... | |
doc_23514205 | Build started...
1>Starting deployment to SUNMI V2 ...
1>Deploying to SUNMI V2 ...
Build started.
Project "JamliteDeliveryPOS.Android.csproj" (Install target(s)):
Found Java SDK version 1.8.0.
Found Java SDK version 1.8.0.
Looking for Android NDK...
Looking for Android SDK...
Dex Fast Deployment Enabled: False
MonoAn... | |
doc_23514206 | The following code silently ignores read-only files in "C:\Temp" directory:
task cleanTempDir(type: Delete) {
delete fileTree(dir: "C:\\Temp")
}
A: You could remove the readonly flag prior to performing the delete.
task cleanTempDir << {
ant.attrib(readonly: false) {
fileset(dir: 'C:/Temp')
}
... | |
doc_23514207 | #define def_name(delim, ...) ??? // how will this variadic macro concatenate its parameters to define a new variable?
// Calling `def_name` as follows should define a new variable.
def_name("_", "abc", "def", "ghi");
// The following code should be generated after invoking the above macro.
inline constexpr char con... | |
doc_23514208 | export const MyComponent: ng.IComponentOptions = {
templateUrl: 'MyView.html',
bindings: {
myVariable: '<',
},
controller: common.createController(MyController)
};
export class MyController {
public myVariable: MyVariable;
constructor($scope) {
this.scope = $scope;
thi... | |
doc_23514209 | import com.sun.syndication.feed.atom.Feed;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.feed.synd.SyndCategory;
import com.sun.syndication.feed.synd.SyndContent;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.feed.sy... | |
doc_23514210 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
...
...
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
[self configureCell:cell index:indexPath];
return [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompr... | |
doc_23514211 | I got this so far:
I basically want the highlighted div to cover your device screen no matter how big the device screen is. now i see 2 different divs when i open this on my phone. i only want to see the one that is highlighted. How do I achieve this?
Thanks in advance,
kevin
A: You can probably do that by setting... | |
doc_23514212 | <?php
try{
ini_set('soap.wsdl_cache_enabled', false);
$url = 'https://webservicexx:10443/Service.asmx?WSDL';
$wsdl = get_wsdl($url);
$client = new SoapClient($wsdl);
print_r($client);
} catch (SoapFault $e) {
echo $e;
}
function get_wsdl($url) {
clearstatcache();
$cache_file ... | |
doc_23514213 | On click, a new empty field should get pushed to the array and a textbox should display. However, the addField function doesn't fire when inside the form/jquery steps. If I take it out, it does. Is there a way to prevent jQuery steps from interfering with the binding? Here's a condensed version of the code:
function ... | |
doc_23514214 | pm.environment.set("variable", Math.floor(Math.random() * 50.50));
Tried the above code but no use
A: it's simple
Just add "true" as third parameter of random's function
Ex: var decimalRandom = _.random(1,10,true));
Returns "8.886340078880954" i.e
A: You can just use Lodash for this as it's a built-in module:
pm.en... | |
doc_23514215 | here is the conf part :
filter {
if [path] =~ "error" {
mutate {
replace => { "type" => "ERROR_LOGS"}
}
grok {
match => {"error_examiner" => "%{GREEDYDATA:err}"}
}
if [err] =~ "9999" {
if [err] =~ "invalid offset" {
mutate {... | |
doc_23514216 | here is the hystrix config in my application.yaml
hystrix:
command.StoreSubmission.execution.isolation.thread.timeoutInMilliseconds: 30000
command.StoreSubmission.circuitBreaker.requestVolumeThreshold: 4
command.StoreSubmission.circuitBreaker.sleepWindowInMilliseconds: 60000
command.StoreSubmission.metrics.... | |
doc_23514217 | Can some one suggest how can I access this optional object { foo: 'foo' } inside the target routed component?
<a [routerLink]="['/profile/1', { foo: 'foo' }]">Profile</a>
A: You can use ActivatedRoute to access that object.
import { ActivatedRoute } from '@angular/router';
constructor(private route: ActivatedRoute) ... | |
doc_23514218 |
A: Fluentd uses a buffering mechanism, once it receive a set of events they are stored either in memory or in the file system, the latest is what is used for reliability. The events are stored in chunks, then upon a certain period of time it flush the chunks to the destination. If a chunk failed, it will retry later. ... | |
doc_23514219 |
404 : Not Found
You are requesting a page that does not exist!
(In the browser's bar, there is http://localhost:8888/tree - don't know if that helps).
This is what my console is showing:
What am I missing? Do I need to change directory or set up anything?
A: Your error message says "Refusing to serve hidden direct... | |
doc_23514220 | My question: is there any standard mechanism in Java for converting async code to sync one. For example (from, surprisingly, real code), its in Scala, but my question about Java, think of this as of pseudocode (btw in Scala it wont work):
var finalWorld:WorldModel = null
LifeActors.run(world, new WorldModelListener {
... | |
doc_23514221 | I used Replace, but this error appeared to me:
attributeError: 'list' object has no attribute 'replace'
How can i solve it?
codes.py:
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.stem import PorterStemmer
import os
# 1-stop word processing
stop_words_list = stopwords.words('engl... | |
doc_23514222 | FROM ubuntu:latest AS base
RUN set -ex; \
apt-get update; \
apt-get install -y build-essential libcap-dev
FROM base as build
RUN set -ex; \
mkdir -p /usr/src
COPY . /usr/src/ctuna
RUN set -ex; \
cd /usr/src/ctuna; \
make; \
make install
FROM base as run
COPY --from=build /usr/local/bin /u... | |
doc_23514223 | val df1 = Seq("tamil", "telugu", "hindi").toDF("language")
val df2 = Seq(
(101, Seq("tamildiary", "tamilkeyboard", "telugumovie")),
(102, Seq("tamilmovie")),
(103, Seq("hindirhymes", "hindimovie"))
).toDF("id", "keywords")
val pattern = concat(lit("^"), df1("language"), lit(".*"))
import org.apache.spark.sql.R... | |
doc_23514224 |
but I can't seem to group my data correctly, Please help.
Here's my sample json data.
[
[
'male',
'05-09'
],
[
'female',
'05-09'
],
[
'male',
'05-09'
],
]
and I am creating my datatable using
function createDataTable(rawData, $tableHeader) {
try {
... | |
doc_23514225 |
A: I think you html footer might be more useful to you.
<footer>
<p>Developed by: user2740323</p>
<p>Contact information: <a href="mailto:someone@example.com">
someone@example.com</a>.</p>
</footer>
A: you can add a footerPlaceHolder to your masterpage like this:
<asp:ContentPlaceHolder ID="FooterPlaceHolder... | |
doc_23514226 | foreach (var req in listRequestMasters)
{
var customReq = _mapper.Map<GridModel>(req);
}
by below line of code getting success assertion but not as expected result, the one record getting twice
_mockMapper.Setup(x => x.Map<GridModel>(It.IsAny<RequestMaster>())).Returns(requestGridModelMockData.FirstOrDefault());
... | |
doc_23514227 | After installing all prerequisites, the article describes the steps to create a sample application. On the step to create the stateless workflow, an error is shown in visual studio code in the bottom right corner of the application:
You must have the .NET Core SDK installed to perform this operation. See herefor suppor... | |
doc_23514228 | data A = (>>>) A A
I would like to declare
infixl 4 >>>
Looking at the data type extensions documentation it seems one can only declare fixity for the type constructor. But even that does not seem to work, at least in the way I tried:
infixl 7 A
data A = (>>>) A A
Can this be done at all?
A: You can do this allrigh... | |
doc_23514229 | class ATM(
val AccountName:String="",
val Pin:Int=0,
val IntialDeposit:Double=0.0
)
fun main(args: Array<String>) {
mainmenu()
}
fun mainmenu(){
println("WELCOME TO BANK AL BILAL ATM MACHINE")
println("1- Add Account\n2- Login Account\n3-Exit")
var input1= readLine()!!.toInt()
when(input1){
1->add()
... | |
doc_23514230 | Here is the AndroidManifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp.package"
android:versionCode="2"
android:versionName="1.1" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<permission
android:name="... | |
doc_23514231 | I have attached the image of what i mean and will gladly paste any part of my code if needed at all!
My create account fragment:
package com.example.soulforge.fragments;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fr... | |
doc_23514232 | In Eclipse we use Team Project Set files for that, but I have not found any Visual Studio alternative to this feature.
The motivation for this is the following: it should be possible for every developer to switch context easily and start working as quickly as possible. Suppose a new developer is joining the project. If... | |
doc_23514233 | I'm following along the 'Ruby on Rails 3 Tutorial: Learn Rails by Example' by Michael Hartl.
I'm at location 4503 in the ebook, chapter 7.
I'm trying to push my rails app to heroku and then view the corresponding web page. When I visit heroku web page all i see is error message "we're sorry but something went wrong".
c... | |
doc_23514234 | http://broken-links.com/tests/media/BigBuck.m4v
But as soon as I try to play it from the local dir it does not work!!
<video id="video" autobuffer height="240" width="360">
<source src="http://broken-links.com/tests/media/BigBuck.m4v" />
</video>
<video id="video" autobuffer height="240" width="360">
<source s... | |
doc_23514235 | var reactivityResults = new List<ReactivityResultViewModel>();
var reactivityResults2 = new List<ReactivityResultViewModel>();
var classifications = GetMaterialClassifications(test.TestType);
var antigens = _db.Antigens.ToList();
if (test.ResultSets.Any())
{
v... | |
doc_23514236 | We have a screen where it loads the following details:
*
*User details
*Recent orders placed
*Recent orders Approved
When the client is not able to connect to the server (Ex: Web service not working or IIS site stopped), we get communication exception alert.
Since there are multiple parallel calls, we will get C... | |
doc_23514237 | <javaObject>
<attr1>value1</attr1>
<attr2>${property.name}</attr2>
<attr3>value3</attr3>
</javaObject>
My goal is to get the attr2 from the property file, I've tried ${property.name} but it's not working, I've also tried
<property name="property.name" value="${property.name} />
At runtime, I get a NULL wh... | |
doc_23514238 | I know this is not possible, but I have no idea on how to replace the subquery filtering with the typical joins in the outer query.
I'll take a typical example to illustrate my issue.
It's the Olympic games, I have several teams (say table tennis teams) in which there are 1 to N players.
A match between two teams is fi... | |
doc_23514239 | I have tested various settings to see if they work but none have yet worked. Im completely new to coding.
jQuery(document).ready(function($) {
$('#fullpage').fullpage({
//options here
scrollingSpeed: 1000,
autoScrolling: true,
navigation: true,
slidesNavigation: true,
css3: false,
fitToSect... | |
doc_23514240 | I have a script that is run by a root cron job.
The script executes, but there is a script inside the script that wont execute.
Here is what we will call scriptA
#!/bin/bash
lines=`wc -l < /var/www/log/addme`;
DATE=`date +%Y-%m-%d`
if [[ $lines > 4 ]];
then
echo " " > /var/www/log/addme
RESTART=/var/www/log/restart.sh... | |
doc_23514241 | def load_image_from_url(self):
image_file = NamedTemporaryFile(delete=True, dir='project/media')
with urlopen(self.extra_large_url) as uo:
assert uo.status == 200
image_file.write(uo.read())
image_file.flush()
image = File(image_file)
self.image.save(image.name, image)
When I cr... | |
doc_23514242 | I have Pipe delimited string as -
v_input = '1111|2222|3333|4444'
I need output base on position of delimited part -
select seperate_string(v_input,pos) from dummy;
for e.g.
select seperate_string('1111|2222|3333|4444',1 ) from dummy; --1111
select seperate_string('1111|2222|3333|4444',2 ) from dummy; --2222
select ... | |
doc_23514243 | <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
... | |
doc_23514244 | #include <cs50.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
// argument count, array of strings
int main (int argc, string argv[])
{
//checking there is only one command line argument, checking if digit
if (argc == 2 && isdigit(*argv[1]))
{ //atoi converts string ... | |
doc_23514245 | winstonServer.js
var Consumer = {
start: function() {
var logger = new(winston.Logger)({
level: null,
transports: [
new(winston.transports.Console)(),
new(winston.transports.File)({
filename: './logs/dit/server.log',
... | |
doc_23514246 | public class BuyRequestViewModel
{
public IEnumerable<BuyRequest> BuyRequestVM { get; set; }
public IEnumerable<string> PlatesVM { get; set; }
}
My problem is, as my viewmodel is not of type Ienumerable, I'm getting error in foreach in the razor view. The error is like the following:
ForEach statement can not ... | |
doc_23514247 | My table with two columns and 4 rows is like:
date users
2011-01-01 1
2011-02-02 1
2011-03-02 2
2011-04-02 4
and I want the users to be shown like below , and add every row to it's previous row value:
users:
1
2
4
8
Is there a function in for MS SQL Server to do that?
thanks
A: In SQL S... | |
doc_23514248 |
A: If you are importing from Excel to a database and the target table is being created automatically, then the import wizard looks up the first rows to determine the type and length of the fields. The problem is that it might underestimate the actual length of some fields or might incorrectly assume incorrect data t... | |
doc_23514249 | What my app does : Enter the PersonalDataScreen, the screen is shown, disable internet, go again to the screen, it showing me the ErrorScreen for No Internet connection, enable the internet again, going back, keep showing me the same screen ( No Internet Screen ) .
What my app needs to do : When enable the internet aga... | |
doc_23514250 | and on the rigt side.
It`s caused by: class="the_content_wraper"
Is there a possibility to remove it with css code?
<div class="section_wrapper">
<div class="the_content_wrapper">
<iframe src="https://www.xxxxx.xx" width="100%" height="100%" frameborder="0">
</iframe>
</div>
</div>
A: Finally it worked:
... | |
doc_23514251 | My ffmpeg command:
ffmpeg -f mjpeg -y -use_wallclock_as_timestamps 1 -i 'http://x.x.x.x:8090/test1?.mjpg' -r 3 -reconnect 1 -loglevel 16 -c:v mjpeg -an -qscale 10 -copyts '1.mp4'
50 command like that take my computer (4 core) 200% CPU
I want this computer can run for 150 camera, any advise?
=========================... | |
doc_23514252 | -users
--articles
---tags
**Collection**
user:
[
{
_id : ID,
username : "u1",
articles:
[
{_id : ID,title:"",url: "",tags:["a", "b", "c"]},
{_id : ID,title:"",url: "",tags:["a1", "b1", "c3"]},
...
]
},
{
_id : ID,
... | |
doc_23514253 | My code is below:
var testEl = createEl('div', 'testClass', 'testId');
function createEl(node, theClass, id) {
var newNode = document.createElement(node);
newNode.classList.add(theClass);
newNode.id = id;
return newNode;
}
document.getElementsByTagName('p')[0].innerHTML = testEl.outerHTML; // fails... | |
doc_23514254 |
vertx runmod myModule -Dconfig.location=myConfigLocation
In my code I'm using the following
String configLocation = System.getProperty("config.location");
But I'm getting null for configLocation. Anybody know whats wrong here?
A: I just had to do this myself.
I found from the vertx script that JAVA_OPT and VERTX_... | |
doc_23514255 | I have an Ember application that is communicating with an API that does not adhere to JSONAPI standards, thus I have begun writing my own serializers in order to use Ember Data. However I am finding that when I make multiple requests to the same resource, the data is having trouble writing to the store. Consecutive req... | |
doc_23514256 | POST /{parent_comment_id}/comments?message={message}, but couldn't just post a reply to a specific comment. Please help.
Please have a look at the screenshot:
A: Remove the {} from your url. It should be graph.facebook.com/v2.12/5568669414690512/comments?message=Hello
A: Just make a POST request to
https://graph.fac... | |
doc_23514257 | Language is C# with .net 3.5.
Responding to comment: Color format is (Alpha)RGB. With values as bytes or floats.
Marking answer: For the context of my use (a few simple UI effects), the answer I'm marking as accepted is actually the most simple for this context. However, I've given up votes to the more complex and accu... | |
doc_23514258 | public void putFile(String name, InputStream is) {
try {
OutputStream output = new FileOutputStream("D:\\TEMP\\" + name);
byte[] buf = new byte[1024];
int count = is.read(buf);
while( count >0) {
output.write(buf, 0, count);
count = is.read(buf);
... | |
doc_23514259 | I'm trying to use the default provided Bing Map control from Windows Phone controls.
Specifically I'm trying to use a custom TileSource to provide a custom made tiled map that will be stored in the project as a folder (Content files) or in isolate storage.
Down I present the custom class I try to use with map tiles/ima... | |
doc_23514260 | import qualified Data.ByteString.Lazy.Char8 as BS
main = do
wc <- length . BS.words <$> BS.getContents
print wc
Build for speed:
ghc -fllvm -O2 -threaded -rtsopts Words.hs
More CPUs means more slowly?
$ time ./Words +RTS -qa -N1 < big.txt
331041862
real 0m25.963s
user 0m21.747s
sys 0m1.528s
$ time ./Words +RT... | |
doc_23514261 | [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
But any way to monitor the whole process of downloading? How should I know all downloads are finished?
And I tried start download request with
[afhttpClient enqueueBatchOfHTTPRequestOperations:operationArray
... | |
doc_23514262 | struct StudentTxt
{
int ID;
string lname;
string fname;
string initial;
int age;
double balance;
};
struct StudentBin
{
int ID;
int age;
double balance;
char fullname[50];
};
i read the file and store all the data into the first structure, and after that i combined the lname, f... | |
doc_23514263 | Modal component
*
*This component simply displays his slot content.
*In this modal I have two methods submit and cancel.
ContractForm Component
*
*This is a simple component who displays a form.
What I want ?
In my ContractForm component, I want to define the submit method of Modal component, this method mus... | |
doc_23514264 | const arr = ["another world", "foo", "bar", "foo-another-bar", "another"]
I can filter the array based on the regex /another/ like this
const reg = new RegExp(/another/)
const filteredArr = arr.filter(item => item.match(reg))
and this returns [ 'another world', 'foo-another-bar', 'another' ]
What I now want is to sor... | |
doc_23514265 | I have several variables: "Do you go to restaurant", "Do you go to grocery store ?" ... All the values are "yes" or "no". I want to create a barplot with x = "yes" and "no" and y = count, fill = all the variable.
But I don't understand how to do it, I search on the internet but my problem is due to my x.
I tried this :... | |
doc_23514266 | [ValidateInput(false)]
[HttpPost]
public ActionResult Index(FormCollection dataColl)
{
Test datgrp = new Test();
datgrp.fname = dataColl[0].ToString();
datgrp.lname = dataColl[1].ToString();
if (!this.IsC... | |
doc_23514267 | NSString *lc1 = @"Bosnië-Herzegovina";
NSString *lc2 = [lc1 lowercaseString];
NSString *uc3 = [lc1 uppercaseString];
NSLog( @"\nlc1=%@\nlc2=%@\nuc3=%@ ", lc1,lc2,uc3);
The "ë" is simply typed as "opt-u e", the source code file is regular UTF Unicode.
lc1 looks as expected in the debugger. But, lc2 and uc3 strings have... | |
doc_23514268 | so that I can search the department name regarding to the value I inserted.
I don't know the right Query for this "SELECT * FROM department where department_name ='"%search%"'"
Here is my jsp file below:
<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib uri="http://java... | |
doc_23514269 | The fake cursor is just an HTML element like anything else.
Since the fake cursor (element) is under the real cursor, CSS thinks you're always hovering it.
So if I hover/click a button, it will ignore both events.
What I imagine it to do is pass through the fake cursor, and go to the button event.
Here's a screenshot:
... | |
doc_23514270 | Code
Abstract Class:
public abstract class Models implements Serializable {
public Models(Object id) throws Exception {
this.find(id);
}
public <T extends Models> T find(Object id) throws Exception {
Map<String, T> data = new HashMap<>();
Long idSerialized = Long.parseLong(String.... | |
doc_23514271 | I need to implement watermark dynamically when uploading or retrieving images
Controller Code
public function store(storeNewspaperJobFormValidation $request)
{
$values = $request->input();
list($city, $catagory) = $this->_gettingValues($values);
unset($values['city_id']);
unset($va... | |
doc_23514272 |
A: You should be able to get the image's bounding box (bbox) by calling bbox = canvas.bbox(imageID). Then you can use canvas.find_overlapping(*bbox).
A: The coordinates it returns should be the coordinates of the top left corner of the image. So if the coordinates you got were (x, y), and your image object (assuming... | |
doc_23514273 | The reason for this is I am trying to force spotlight to receive automatic updates when invisible files and folders are added/removed. This behavior I believe is a side effect of not indexing the meta-data (but I could be wrong). I came to this conclusion from this SO question.
Is the solution writing a mdimporter? Wil... | |
doc_23514274 | I have a ajax powered social chat application allowing comments and likes etc built with php, mysql and jquery. But when I post a comment the ajax returns a duplicate post with comment updated, so when you comment again you end up with mutiple duplicate posts. The Msql entries are fine (ie no duplication). All my other... | |
doc_23514275 | The screen is composed of the clasification fields, plus two lists (the categories) filled up with items (words). There, you can drag and drop items between lists to assign them to another one.
I need to have a "new item" button and I thought of rendering a blank Word in a third column and then drop it into the desired... | |
doc_23514276 | <?php
namespace App\Http\Middleware;
use Closure;
use App\Service\PageService;
class frontMenu
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
... | |
doc_23514277 | When I am testing this I want to mock the dynamic connection string builder to return a specific customer string object. The problem I am running into is C# keeps erroring on the connection string as a constant.
private const string connectionString =
@"metadata=res://Data/CustomerModel.csdl|res://Data/CustomerModel... | |
doc_23514278 | I would like to run integration tests on a embedded jetty server.
For that purpose I have a maven project (just for running integration tests).
For deploying I use cargo-maven2-plugin. But while jetty startup I receive following:
java.lang.ClassCastException: org.mortbay.jetty.webapp.WebInfConfiguration cannot be cas... | |
doc_23514279 | <attr format="color" name="item_background" />
Then, I created both themes, like this:
<style name="ThemeA">
<item name="item_background">#123456</item>
</style>
<style name="ThemeB">
<item name="item_background">#ABCDEF</item>
</style>
This method works great, allowing me to create and modify severa... | |
doc_23514280 | JSONObject jobject = new JSONObject(response);
JSONArray jsonArray = jobject.getJSONArray("variety");
for (int i =0; i<=jsonArray.length();i++){
jobject= jsonArray.getJSONObject(i);
txt_today_671.setText(jobject.getString("variety.coc671"));
}
{
"status": 200,
"variety":... | |
doc_23514281 | So firstly I wrote some codes as below :
private void computeLongestDistance()
{
double big = 0;
double small = 0;
double result;
Points point1 = new Points();
Points point2 = new Points();
for(int i = 0; i < Int32.Parse(textBox1.Text); i++ )
{
f... | |
doc_23514282 | I've set this method in my user model like self.forgot_password
I'm trying to call this method in a form just under the login form in sessions/new but I think I don't have the good way to do it.
Here is my form code :
<%= form_for :user, :url=>{:action=>"forgot_password"} do |f| %>
<p>Réintialiser mon mot de passe en... | |
doc_23514283 | How could I configure my WORKSPACE and how I can refer to it?
Thanks a lot.
| |
doc_23514284 | Array
(
[2019] => Array
(
[2019] => Array
(
[year] => 2019
[amount] => 3269.93
[type] => charge
)
)
[2018] => Array
(
[2018] => Array
(
... | |
doc_23514285 | <?php use carbon/carbon;?>
@extends('main_layout')
@foreach ($myquery as $mytask)
<tr>
<td >
{{($mytask->firstname)}}
</td>
<td >
{{($mytask->lastname)}}
</td>
<td>
... | |
doc_23514286 | 1. http://example.com#hash0
2. http://example.com#hash0#hash1
3. http://example.com#hash0/sample.net/
4. http://example.com#hash0/sample.net/#hash1
5. http://example.com#hash0/image.jpg
6. http://example.com#hash0/image.jpg#hash1
7. something.php#?type=abc&id=123
8. something.php#?type=abc&id=123#hash0
9. something.php... | |
doc_23514287 | I load my df in:
df1 = pd.read_csv("DATA.CSV", index_col="DT")
df1.head(5)
df1 example
This looks fine, but the datatype is object and I need to convert to date time. So I tried:
df1.index = pd.to_datetime(df1.index)
df1.head(5)
Which does work in changing the datatype, but the index has now lost its time component:
... | |
doc_23514288 | I am using Wordpress 4.0 version. So please advise how I achieve this.
A: If you can include a JavaScript and know the exact wordpress cookie you can use following code to detect on close event and inside clear the cookie
window.onbeforeunload = function () {
// Clear cookie here
};
A: Why don't you use... | |
doc_23514289 | const productSchema = new Schema({
title: String,
name: String,
price: String,
color: String,
image: {
type: Buffer
},
image2: {
type: Buffer
}
})
const Product = mongoose.model('Product', productSchema)
A: You can parse the data using formidable or multer before storing it on mongodb
Personally, I'l... | |
doc_23514290 | I am using following code for encryption in Android project:
SecretKeyFactory kf = SecretKeyFactory.getInstance("DES");
String key = "abcdefg";
DESKeySpec keySpec = new DESKeySpec(key.getBytes());
SecretKey _key = kf.generateSecret(keySpec);
String xform = "DES";
Cipher cipher = Cipher.getInstance(xform);
byte[] IV = {... | |
doc_23514291 | TypeError: http.ServerResponse is undefined
I was in the process of adding a delete comment functionality that sends off a delete request using axios, if that makes a difference.
I'm new to React and have no idea what to do, now. How do I debug this?
Help very much appreciated!
I'm using axios if that helps, node backe... | |
doc_23514292 | <!doctype html>
<html lang="en-US">
<head>
<title>Welcome - Home</title>
<link type="text/css" rel="stylesheet" href="Home.css">
<link rel="icon" href="KLOGO.png" type="image/png"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script>
<script src="Home.js"></script>
... | |
doc_23514293 | $error = "Not enough balance to submit. \nBalance available : " . $balance;
header('location:info-page.php?error=' . $error);
When I submit, it will give this error:
Warning: Header may not contain more than a single header, new line detected.
UPDATE CODES
$error = urlencode("Not enough balance to submit. \nBalan... | |
doc_23514294 | http://localhost:8888/z-jquery/view
http://localhost:8888/z-jquery/search
so it is removing .php extension and also redirecting if they are typed in manually which is perfect but I also need my other urls like:
http://localhost:8888/z-jquery/edit?client=dane+kasbo
to be like this if possible:
http://localhost:8888/z-... | |
doc_23514295 | var today = new Date();
today.setDate(today.getDate() - 1);
var DATE1 = new TextBox({
applyTo: 'DATE1',
defaultValue: today.getFullYear() + "-" + ("0" + (today.getMonth() + 1)).slice(-2) +
"-" + ("0" + today.getDate()).slice(-2) +" " + "00:00:00",
width: 150
... | |
doc_23514296 | Currently, in a google sheet, I have a formula that looks like this: =SORT(ARRAYFORMULA({IMPORTRANGE(C3,$E$1);IMPORTRANGE(C4,$E$1);IMPORTRANGE(C5,$E$1);IMPORTRANGE..." where spreadsheet urls are in Col C and a range (same for every imported sheet) is in E1.
Typing it all in was fine when I only had about a dozen spread... | |
doc_23514297 | var runningSum = function(nums) {
let result = [];
nums.forEach(function(num, idx) {
if (idx === 0) {
result.push(num);
} else {
result.push(num + nums[idx - 1]);
}
});
return result;
}
Leet code stated that this was a fairly easy problem, so I fig... | |
doc_23514298 | http://plnkr.co/edit/MbNMZQdnuuvwb0G5amKo?p=preview
<button type="button" class="btn btn-default" ng-model="selectedIcon" data-html="1" bs-options="icon.value as icon.label for icon in icons" data-trigger="click" bs-select>
Action <span class="caret"></span>
</button>
Any help is appreciated, thanks.
| |
doc_23514299 | Everything seems to be working but when i try to execute any php file by putting it on path (/var/www/html), the file gets downloaded.
Below are the commands which are already looked up and tried, but I couldn't get it to work.
sudo apt-get install php7.0
sudo apt-get install libapache2-mod-php7.0
sudo a2enmod php7.0
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.