id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_37000 | Is there a way to do it?
This is what I have:
li {float: left; clear: left;}
span {float: left;}
<ul class="c2">
<div>
<span>
<li>line1</li>
<li>line2</li>
<li>line3</li>
<li>line4</li>
</span>
<span>I want this in same line as line4</span>... | |
doc_37001 | I was wondering if there is a better way to do the following:
$query = 'SELECT * FROM pages WHERE id = ? AND language = ?';
$values = array('1', 'en');
foreach ($values as $value) {
$query = preg_replace('/\?/', '\''.$value.'\'', $query, 1);
}
echo '<pre>'.print_r($query, true).'</pre>';
Would like to do that with... | |
doc_37002 | Means i want to make one license per user type application.
I want to make this application using Java.
Any help on this would be appreciated.
Thanks in advance.
A: Yes, it's easy. Just grab your hardware informations and generate a hash. This will be synched on each start with a server. It will return a hash which ca... | |
doc_37003 | Total
2.03
2.00
2.00
1.38
1.33
1.32
1.21
Expected result
Total Count column
2.03 3
2.00
2.00
1.38
1.33
1.32
1.21
I have looked at SUMIF and COUNTIF
=Sum(IIf(Fields!Total.Value >= "2" , 1, 0)
But i just g... | |
doc_37004 | I'm trying to preprocess the data by building a ColumnTransformer so that I can perform specific preprocessing steps on the numerical and the categorical columns. The last step of the ColumnTransformer is a One Hot Encoder to one hot encode the categorical data. I then add this ColumnTransformer to a Pipeline with a Lo... | |
doc_37005 | <html>
<head>
<title>Ex2</title>
</head>
<body>
<script>
var body = document.querySelector('body');
body.append('Name Age');
</script>
</body>
</html>
A: You can try the below snippet
function addList(arr) {
var body = document.getElementsByTagName('body')[... | |
doc_37006 | public class Shape {
public void draw() {
...
}
}
I'd like to be able to run something to add a before method, such as this:
(attach-to-method Shape/draw :before
(println "... about to draw a shape"))
And after evaluating that form, all subsequent calls to draw would start printing a string before... | |
doc_37007 | Is this possible without rebuilding the combobox?
A: Just use the Insert method of the Items property of the combo box:
myComboBox.Items.Insert(0, "New item at top");
A: Yes, you can use the Insert() method on the Items property of your ComboBox object.
var comboBox = new ComboBox();
comboBox.Items.Add("1");
comboBo... | |
doc_37008 | import java.io.*;
import java.util.*;
class Ride {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new FileReader("ride.in"));
PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("ride.out")));
StringTokenizer st = new String... | |
doc_37009 |
Forbidden (403)
CSRF verification failed. Request aborted.
You are seeing this message because this HTTPS site requires a 'Referer header' to be sent by your Web browser, but none was sent.
Here is my Cloud Code httpRequest on Parse (I'm not very familiar with requests so something is probably flawed on... | |
doc_37010 | import pandas as pd
import yfinance as yf
from datetime import date, timedelta
from matplotlib import pyplot as plt
import numpy as np
plt.style.use('fivethirtyeight')
#Get Albemarle Information
ALBINFO = yf.Ticker("ALB")
# Valid options are 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y,
# 5y, 10y and ytd.
print(ALBINFO.history(per... | |
doc_37011 | const map = { small: 1, large: 2 };
const closestSize = ['small', 'large'].find((size) => !!map[size]);
// errors Type 'undefined' cannot be used as an index type.ts(2538) but we know that either small or large will be found
return map[closestSize];
A: The definition of find function is:
find(predicate: (value: T,... | |
doc_37012 | Here's what I mean:
Google research has lead me to conclude that this is due to Surface's high resolution and Win8's zooming to let some items appear a little larger. So I reset that zoom to 100% and it actually fixed the bad scaling.
Unfortunately, this doesn't really fix my problem. Everything is far too small witho... | |
doc_37013 |
I would like a place holder to say manufacture and model on their respected fields.
I cant find much online about doing this. The only post I can find relates to using the choice field on the model which wont work for me.
filter
class CarFilterForm(forms.Form):
def __init__(self, *args, **kwargs):
super()... | |
doc_37014 | The connections start transactions in different isolation levels and I test which modifications are visible to which connection after which actions:
public static void main(String args[]) {
final Connection con1 = DriverManager.getConnection(url, user, passwd);
con1.setTransactionIsolation(Connection.TRANSACTI... | |
doc_37015 | Below is the code for theme-options.php. Any help is much appreciated, I can provide more code if necessary (options.php? functions.php?).
<?php
/**
* Somewhere In Between Theme Options
*
* @package WordPress
* @subpackage Somewhere_In_Between
* @since Somewhere In Between 1.0
*/
/**
* Properly enqueue styl... | |
doc_37016 | byte[] data = new byte[1024];
string input, stringData;
UdpClient server = new UdpClient("127.0.0.1", 9050);
IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
while (true)
{
data = server.Receive(ref sender);
stringData = Encoding.ASCII.GetSt... | |
doc_37017 | The error message says "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE Project SET Hours = 0.0 where Project.Pnumber = p end if; end' "
delimiter &
create procedure init(in p int(11))
begin
declare attNum int;
SELECT ... | |
doc_37018 | POST /?q=rest/file HTTP/1.1
Host: localhost:8888
Language: en-us,en;q=0.5Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Connection: keep-alive
Accept-Charset: ISO-8859-1,utf-8
Cookie: SESSdc0685ed01f285dab628a3700259e6bc=UAdNJUsQL5TpqEXIWFtXEcLw3wooEwqW9e0JxSz2ZHw
Content-Length: 389
Content-Ty... | |
doc_37019 |
A: "In the same Apache server", No. node.js does not run in Apache. It runs by itself.
But, you can use multiple technologies on the same server. For starters, you could have two completely separate web servers running on separate ports, one that was Apache + PHP + webSocket and another that was node.js + webSocket... | |
doc_37020 | const Sequelize = require('sequelize');
const sequelize = require('./../common/db-config');
const MovieModel = require ("./movie-model");
const UserModel = require("./user-model");
const Model = Sequelize.Model;
class ToWatch extends Model{}
ToWatch.init({
id: {
type: Sequelize.INTEGER,
allowNull: false,
... | |
doc_37021 | The user may choose option A, B, or C. I want to draw a histogram if user selects option A, bar graph for B, and a pie chart for option C but I don't know how to code the condition? Is it like an if-else statement? I've been struggling for hours! Here's my code sample:
output$plots <- renderPlot({
if selection =... | |
doc_37022 | "Create a new string called passwd formed by concatenating every alternate non-space character in sentence ('sentence' is a string she had us create earlier in the assignment) starting with the first. To do this, you need to a loop to go through the string sentence and retrieve characters from alternate index positions... | |
doc_37023 | Component:
import React, { useEffect, useRef } from "react";
import { IIcon } from './IIcon';
import {
DEFAULT_ASSET_ICON_FOLDER,
} from '@/constants/default';
function Icon({name}: IIcon) {
const ImportedIconRef = useRef();
useEffect(() => {
const importIcon = async () => {
try {
ImportedIc... | |
doc_37024 | However, it seems like the only built-in option is to use a MySQL database table (ci_sessions). Is this true?
Why doesn't CodeIgniter offer the option to plug in to the session auto-global ($_SESSION) and then let you pick your storage engine?
It seems this would be much easier than baking in their own solution.
If ... | |
doc_37025 | "<select id='myidxxx'><option>" + default + "</option></select>"
And then add other elements later. The problem is, whether I add other elements or not, there is always a blank element selected at start. I can't get it to not have one, or to select the default value. I've tried
<option selected='selected'>
but with n... | |
doc_37026 | I am using magento 1.7.0.2
Its working fine on my PC,
but when I am using it from my tablet, Add to cart not working in tablet.
What can be issue?
Can anyone suggest?
A: Try increasing the Session Cookie Cache Cookie Lifetime
System > Configuration > Web > Session Cookie Cache
Per default it's 3600,
try with increasin... | |
doc_37027 | for (var i = 0, iln = projects.length; i < iln; i++){
var thumb = projects[i].get('thumb');
thumb.replace("200.jpg", "640.jpg");
console.log(thumb) //200.jpg not replaced
}
The full thumb value should look like this:
http://b.vimeocdn.com/ts/160/895/160895498_200.jpg
Is there a better way to find and repl... | |
doc_37028 |
A: Assuming you are using Windows Forms, you could present the user with a dialog box allowing the user to change the directory and pick a file with extension such as accdb (for MS-Access 2007 for example). After the user selects a file you can use that file name to form the connection string. For example:
Dim openFil... | |
doc_37029 | I have written a little Filemover which will recursively move every file from a directory and place them in the top level of another directory. But for some reason, the code doesn't move all the files. I switched to using Files.move() but while definitely worth while the code is still not walking the directory tree pro... | |
doc_37030 |
List<Map<String,String>> tmp = //blahblahblah//(for my privacy)
int size = tmp.size();
String[] linearr = new String[size];
String[] numarr= new String[size];
String[] namearr= new String[size];
String[] datearr= new String[size];
int i = 0;
for (i = 0; i < size; i++) {... | |
doc_37031 | Let's say I have a hidden input element like this:
<input type="hidden" value="10" id="myInput" />
so I can access it in JavaScript :
console.log(myInput.value);
I tried it in chrome and firefox, and it worked for me.
My question is :
*
*Is this issue new in JavaScript ?
*Is it the best practice to get an element... | |
doc_37032 | However, I'm not sure how to structure much less design applications. I'm used to the one-class-per-file and class-noun/function-verb ideas in OO programming. How do you design and structure functional applications?
A: How to Design Programs is all about this (at tiresome length, using Scheme instead of F#, but the pr... | |
doc_37033 |
Connection error: SQLSTATE[HY000]: [Microsoft][ODBC Driver 17 for SQL
Server] Protocol error in TDS stream.
I curently have this error for a week and decided to ask here for help.
Just for a bit off information I use:
*
*Internet Information Services (IIS) Manager (Version: 10.0.18362.1)
*Microsoft SQL Server Mana... | |
doc_37034 | My simplified model:
public class PersonViewModel
{
public long ID { get; set; }
private List<PersonNameViewModel> names = new List<PersonNameViewModel>();
[Display(Name = "Names")]
public List<PersonNameViewModel> Names { get { return names; } set { names = value; } }
}
and Names:
public c... | |
doc_37035 | $sql = "Select * from Users";
$result = mysql_query($sql, $db);
$rows = array();
while($list = mysql_fetch_assoc($result)) {
$rows['customKey'] = array(0, 1, 2, 3);
$rows[] = $list;
}
Then I pass this to another array
foreach($rows as $row) {
$array = array (
'test' => $row,
'test2' => $row['userName']
)
}
T... | |
doc_37036 | Col1 Col2 Col3
A 10 x1
B 100 x2
C 1000 x3
The python code I have right now is -
data = pd.read_csv('input.csv')
# print (data)
arr = list(itertools.chain.from_iterable(
[[j for i in el for j in i] for el in itertools.combinations(data.values.tolist(),i)]
for i in range(1,... | |
doc_37037 |
A: I'd check first the --no-data and --compatible=name options of mysqldump.
| |
doc_37038 |
in my code ive included
<!-- bxSlider CSS file -->
<link rel="stylesheet" href="<c:url value="/resources/css/jquery.bxslider.css" />" type="text/css" />
<script type="text/javascript" language="javascript" src="<c:url value="/resources/js/jquery.js" />"></script>
<!-- bxSlider Javascript file -... | |
doc_37039 |
A
B
aaa
bbbb
ccccc
NaN
NaN
NaN
dddd
ffff
eeee
NaN
gg
NaN
I hope to merge the value of each row to its next rows unless it is blank and get a data frame like:
A
B
aaacccc
bbbb
ddddeeeegg
ffff
Is there an efficient way to convert the dataframe in python?
A: You can create a mask and g... | |
doc_37040 | Specifically, the photos do not load in the correct order and you can see each photo load. When the slideshow is loading the photos, the last photo loads first then quickly jumps to the first photo when it loads. I'd rather hide the Nivo slideshow until all the photos load (there are only 4 at the most).
We are using j... | |
doc_37041 | Some peace of code:
JS with angular directive:
(function () {
'use strict';
var module = angular.module('feedApp');
module.directive('datetimepicker', [
'$timeout',
function ($timeout) {
return {
require: '?ngModel',
restrict: 'EA',
... | |
doc_37042 |
A: After a long analysis finally i found out The equivalent xml tag in 3.x is <persistence directory="java.io.tmpdir/ehcache/" />
A: You have to reference "java.io.tmpdir" as a variable:
<persistence directory="${java.io.tmpdir}/ehcache/" />
| |
doc_37043 | lets say i have two model, category and product
class Category {
static hasMany = [products : Product]
String name
}
..
class Product {
String name
}
now, i want to delete product, which happens to exist in many category. i came up with these lines in my product beforeDelete methods
def beforeDelete = {
Catego... | |
doc_37044 | I am open for any solution or changes in my code
I have tried to use normal javaScript but it is not working at all with React. such as getElementByClass("className").value
Here is my code
class Counter extends Component {
constructor() {
super();
this.state = {
totalPrice: "Total Price... | |
doc_37045 | The problem that the menu that not have sub its align is different than other and to fix that must add image to the li that have no image close and open to fix the align here a screenshot for what I mean
This mean is create demoniacally with js here the code I can't fix it with css because it will effect the whole me... | |
doc_37046 | lets assume I have a Fruit class and then additional Orange(Fruit) and Apple(Fruit) classes.
Apple's have a color attribute and the class is aware of the face that "red apples" are different then "green" or "yellow" Apples.
now I want to be able to:
1) represent quantities of a specific fruit instance.
e.g. 3 red Ap... | |
doc_37047 | Any help or tips will be apreciated, thank you :)
main.py
from random import randint
from kivy.app import App
from kivy.uix.label import Label
from kivy.clock import Clock
from kivy.graphics import Color, Rectangle
from kivy.uix.recycleview import RecycleView
from kivy.uix.boxlayout import BoxLayout
from kivy.properti... | |
doc_37048 | usr/lib/node_modules/mysql/lib/protocol/sequences/Sequence.js:96
this._callback.apply(this, arguments);
^
TypeError: this._callback.apply is not a function
at Query.Sequence.end (/usr/lib/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at /usr/lib/node_modules/mysql/... | |
doc_37049 |
*
*prefix: "tmp/"
*expiration: 3
The problem is, while the files inside tmp are removed on schedule, tmp itself also matches this prefix (dispite the trailing slash) and gets deleted every three days.
Is there any prefix that will match the contents of tmp, but not tmp itself? Something like "tmp/*" (though that ... | |
doc_37050 | int main()
{
int a;
std::cout << a;
}
A: It's undefined behavior. You are printing whatever occupies the memory of a, which in this case happens to be 32767.
A: That is because variables with automatic storage duration are not automatically initialized to zero in C++. In C++, you don't pay for what you don... | |
doc_37051 | java.lang.OutOfMemoryError: Java heap space
I've tried increasing heap size for Eclipse multiple times, but I still end up running out of memory. I'm using the Hybris/Eclipse plugin to do this.
It appears that the smartedit module has significantly increased in size and seems to be the culprit in getting the platform ... | |
doc_37052 | Is it possible to do anything like that?
A: Yes it's possible,
as pointed in this answer:
GridView shows a grid of Views. It can show anything that extends View
class. It can show a LinearLayout with an ImageView and an ImageButton
inside it.
but the only possible thing to achieve what you looking for is by crea... | |
doc_37053 | Right now I have several helper methods that I have copied and pasted into different javascript files. I'm not all that experienced with javascript, so my apologies if this is a stupid question.
As an example, let's say I want to use this function in more than one file:
function GetGuid( objectPtr )
{
return Execu... | |
doc_37054 | I have a ftplugin/javascript.vim file with the following content:
augroup javascript_pluginName
au!
echom "The plugin is loaded for JS"
au FileType javascript nnoremap <buffer> <localleader>j :call pluginName#pluginName#funName()<cr>
augroup END
When I open a javascript file, the message is printed, but then che... | |
doc_37055 | SerialPort myPort = new SerialPort("COM6");
myPort.BaudRate = 9600;
myPort.Parity = Parity.None;
myPort.StopBits = StopBits.One;
myPort.DataBits = 8;
myPort.Handshake = Handshake.None;
myPort.Open();
I am sending data as HEX. Here is my program
var sendData = ... | |
doc_37056 | I wrote this but it doesn't work:
import matplotlib.pyplot as plt
import matplotlib as mpl
dict1 = {'Pb': [53.0, 56.0, 56.0, 57.0, 57.0, 57.0, 46.0], 'Pa': [56.0, 55.0], 'Pg': [57.0, 57.0, 58.0, 57.0, 57.0, 57.0, 57.0, 57.0,53.0, 57.0, 55.0, 58.0, 58.0, 58.0, 57.0, 57.0, 57.0, 57.0, 57.0, 55.0, 55.0, 57.0, 57.0, 55.... | |
doc_37057 | For that, I have added a service project reference to HelloWorldAPI.dll in the MSTest project.
After this, I created an automated build definition in Visual Studio Team Services (was VSO), and I'm trying to execute Visual Studio Test cases through this build. However, I am getting the below error:
> Starting task: Tes... | |
doc_37058 | My problem is that I work with change event. That is when the user selects a file and the files end up in my list, and the user wants to select the same file again does not work.
Example
jQuery(form).find("input[type='file']").on("change", checkSelectedFile);
function checkSelectedFile (e) { console.log(e); }
If fir... | |
doc_37059 | I want to pick properties from resource/... in say local-dev profile and use cloud-config only with a profile where there would be a config-server running.
A: You can disable using config-server for a specific profile. Please try to define the properties in bootstrap.yml like below. Please note, we should configure th... | |
doc_37060 | Presently, I've got this, which works but doesn't contain all the calls:
SELECT `asterisk`.`queue_log`.`agent`, count(`asterisk`.`queue_log`.`event`) AS 'calls_taken', AVG(`asterisk`.`queue_log`.`data2`) AS 'aht'
FROM `asterisk`.`queue_log`
WHERE `asterisk`.`queue_log`.`event` IN ("COMPLETEAGENT", "COMPLETECALLER") AN... | |
doc_37061 | I created the lesson without any problem.
But when creating the exercises, my attributes (Question and answer) are not created and I have the error
more details about my approach:
Form Error:
You will notice the presence of errors on Question and Anwser
routes.rb
Rails.application.routes.draw do
resources :course... | |
doc_37062 | #include <stdio.h>
#include <process.h>
main()
{
int array[][3] = {11, 22, 33, 44, 55, 66, 77, 88, 99};
int * pArr = &array;
int i=0;
printf("Addr\tValue\n");
for(i=0 ; i<9 ; i++)
{
printf("%d\t%d\n", &pArr[i], pArr[i]);
}
system("PAUSE");
}
Output
Addr Value
2358344 11
2... | |
doc_37063 | The following code is saving the records correctly, but due to the asynchronous nature of javascript, when the outer function returns the inner function has not completed yet and the array of ids is still empty.
How do I get this function to return the returnIDs array AFTER it has been filled?
create: function(req,... | |
doc_37064 | field_1,field_2,field_3.
I want to compute difference between field_2 of different documents. What is the solar query for this case?
A: You can't compare the fields of two different documents, that has to be done on the client side or at index time (which may not be feasible given the large of the documents)
| |
doc_37065 |
$(function() {
$('#brad_button_770103363').click(function() {
//alert($(this).text());
var paypal = $(this).text();
//$('#paypal_donate_amount').val(paypal).trigger('change');
$('#paypal_donate_amount').val(paypal);
var paypal = null;
console.log(paypal);
});
});
<script src="ht... | |
doc_37066 | Is there an official or at least cleaner way?
A: You can try browserify and put all your js files (Node modules) in a folder, for more details checkout his awesome article:
http://substack.net/posts/24ab8c/browserify-browser-side-require-for-your-node-js
A: underscore-min.js really has nothing to do with node. It's a... | |
doc_37067 | I want to use following formate, as I need all elements having the id
for Ex:
jQuery('[id=activities/_terp_count]') //returns null
Note that ,
jQuery('#activities/_terp_count') //returns null
A: The above solution works for me, but it's worth noting that there are advantages to the native method of getting an e... | |
doc_37068 | The object I have is something like this:
public double A { get; set; }
public double B { get; set; }
public short C { get; set; }
public bool D { get; set; }
public double E { get; set; }
public double F { get; set; }
public double G { get; set; }
public double H { get; set; }
publi... | |
doc_37069 | $var = "<link rel=\"stylesheet\" href=\"" . GLOBAL_PATH . "system/modules/" . $path . "/" . $css . "\" media=\"screen\">"
I'm opening it into a then saving it back to the server. When I save back to the server using fwrite() and then reopen I get this:
$var = "<link rel="stylesheet" href="" . GLOBAL_PATH . "system/mo... | |
doc_37070 | There is such a code - a new class (view)
Ext.define('FormApp.view.ElementContainer', {
extend: 'Ext.Container',
alias: 'widget.elemcontainer',
initComponent: function() {
this.items = [{
layout: {
type: 'hbox',
align: 'middle'
},
items: [
... | |
doc_37071 | ./init.sh: 2: ipfs: Permission denied
cp: cannot create regular file '/home/root/.ipfs': No such file or directory
./init.sh: 4: ipfs: Permission denied
./init.sh: 5: ipfs: Permission denied
./init.sh: 6: ipfs: Permission denied
./init.sh: 7: ipfs: Permission denied
./init.sh: 8: ipfs: Permission denied
./init.sh: 9: i... | |
doc_37072 | include
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
return 0;
}
At the linking stage, as a normal user, I get:
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol main referenced in function __tmainCRTStartup
However, if I run the same project as administrator, it builds (links) fine a... | |
doc_37073 | Since the compiler merely sees a user-level swapcontext as a function call, the example below demonstrates the problem with a simple function call.
#include <stdio.h>
struct Foo {
int x;
int y;
};
__thread Foo* volatile foo;
void bar() {
asm("nop");
}
void f() {
foo->x = 5;
bar();
asm volatil... | |
doc_37074 |
at org.apache.spark.SparkContext.(SparkContext.scala:185)
at org.apache.spark.streaming.StreamingContext$.createNewSparkContext(StreamingContext.scala:571)
at org.apache.spark.streaming.StreamingContext.(StreamingContext.scala:74)
at org.apache.spark.streaming.api.java.JavaStreamingContext.(JavaStrea... | |
doc_37075 | df = pd.read_csv('Data/file.csv', parse_dates=['Date'], index_col='Date', dayfirst=True)
Unfortunately, when doing type(df.index), the function says the index of df is a "pandas.core.indexes.base.Index"... not a "datetime64[ns]"
I have also tried this:
pd.to_datetime(df.index, errors='ignore')
But again, type(df.inde... | |
doc_37076 |
I need to get smth like this:
[
["Queen"],
["Pink Floyd"],
["Elvis Presley", "Pink Floyd"],
]
So, as result we get arrays of artist's names grouped by Proxy objects. Please, help!
A: There are two levels of arrays, so you'll need two loops (or map functions). Give this a try
const names = artists.map(grp => g... | |
doc_37077 | Based on the documentation it seems something like this should work in theory:
//input stream
NSURL *url = [[NSURL alloc] initWithString:@"10.252.1.1:8080"];
iStream = [NSInputStream inputStreamWithURL:url];
[iStream setDelegate:self];
[iStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode... | |
doc_37078 | In our case, most pub/sub is local, but it will be convenient for our developers to all subscribe to a shared publisher on a remote machine.
All the examples I see appear to be local: http://docs.masstransit-project.com/en/latest/configuration/sub_config_api.html
It appears that RabbitMQ federation may be an option, bu... | |
doc_37079 | (function($) {
$.fn.MyjQueryPlugin = function(options) {
var defaults = {
onEnd: function(e) {}
};
var settings = $.extend({}, defaults, options);
return this.each(function() {
// do stuff (complete() gets called here)
});
};
function comp... | |
doc_37080 | My app requires two JDBC data sources and I was following the example at http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-two-datasources how to set it up.
My Spring beans configuration class is annotated with @EnableConfigurationProperties and my first bean is defined as
@Primary
@Bean
@Con... | |
doc_37081 | This is filter mapping I have in my web.xml:
<filter-mapping>
<filter-name>statTrackingFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
That url-pattern will match requests for pages ending in ".html", but I'd also like to capture requests with query parameters.
I've tried the following... | |
doc_37082 | But I can't find a solution for this way.
I have 6 checkboxes, and when I check any of them they show (ng-show) one of 6 charts.
The problem is my backend sends me array for pre-checked checkboxes in this way with API.
graphs_config:"["graph.batteryVoltage","graph.internetUserCount","graph.usbAndWirelessCharging"]"
I... | |
doc_37083 | import spacy
nlp = spacy.load("en_core_web_sm")
doc = nlp("This is some country. Another sentence")
doc.ents = [Span(doc, 2, 4, "GPE")] #doc[2:4] = "some country"
print(doc[1:6].ents)
#[some country]
However, that is not the case with an extension attribute:
Doc.set_extension('my_extension', default=None)
Span.set_... | |
doc_37084 | Function Get-DefaultParameterValuesHC {
[OutputType([hashtable])]
Param (
[Parameter(Mandatory)]
[String]$Path
)
$ast = (Get-Command $Path).ScriptBlock.Ast
$selectParams = @{
Property = @{
Name = 'Name';
Expression = { $_.Name.VariablePath.Use... | |
doc_37085 | <xsl:choose>
<xsl:when test="number((ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(ddwrt:Today())))- (ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@Date_x0020_only))))) div 864000000000) > 7 div 864000000000 and <= 14 div 864000000000">
<h2> <strong><span style="font-size: 8pt"> WEEK 1 </span></st... | |
doc_37086 | <div style="width:100%;height:100%;background-color:gray">
bla
</div>
But the div does not stretch across the page.
See jsfiddle
Why does this not work and how can I make it work ?
A: <div style="width:100%;height:100%;background-color:gray;position:absolute;top:0;left:0;">
bla
</div>
Divs are relative to their pare... | |
doc_37087 | func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
if locations.count > 0 {
let location = locations[locations.count-1]
let maxAge:TimeInterval = 60;
let requiredAccuracy:CLLocationAccuracy = 80;
let locationIsValid:Bool = Date().timeInte... | |
doc_37088 | The problem is when deploying an app that uses this private repo to Heroku, I'm getting this output:
Retrying source fetch due to error (2/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://mygemserver.com/.
There is a chance you are experiencing a man-in-the-middle attack,... | |
doc_37089 |
Warning:
require_once(/Applications/MAMP/htdocs/crud_app/public/vendor/autoload.php):
Failed to open stream: No such file or directory in
/Applications/MAMP/htdocs/crud_app/public/index.php on line 6
The thing is that if I echo __DIR__.'/../vendor/autoload.php'; it shows /Applications/MAMP/htdocs/crud_app/public and ... | |
doc_37090 | I have my desktop HP notebook at home that's connected to a regular Huawei router that's LTE enabled. In this notebook, I have a VPN setup to be able to view specific pages (Corpo-internal like). One page has a bug, but I can reproduce it using the android device only.
I don't have (and I will not have) a VPN on this a... | |
doc_37091 | //m/d/y;year_is_private_variable
Date(unsigned m, unsigned d, unsigned y){
year=y;
for(unsigned i=0;i<12;++i){
if(m==yVector.mPlace.at(i)){
monthName=yVector.mName.at(i);
}
}
A: You can use values stored by internal parts of class/structure to ini... | |
doc_37092 | Dim randString As String = ""
textbox.text = "(Remove this) - Keep this"
randString = textbox.text.... ' Trim/Split the first portion off somehow?
combobox.items.add(randString)
' Result should look like " - Keep this"
I've tried Trim/Split without any luck. Could anyone point me in the right direction? Thanks.
A: I... | |
doc_37093 | I moved the connection strings from web.config to app.config so that it can be used by other DLLs.
Now, when I call ConfigurationManager.GetSection("SomeSection") , the application looks for a web.config, when it should be looking for the app.config. It doesn't make sense why it does it because web.config is in a sep... | |
doc_37094 | I would like to exclude all other file changes from notifications as I am only interested in monitoring any possible changes in dependencies (hence the POM). Is there any Mercurial Extension or workaround using Jenkins to subscribe to the change history for one individual file inside a Mercurial repo?
A: The notify ex... | |
doc_37095 | 111.222.3333.4444 example.com www.example.com
These are example, but after doing this, it worked. My question is, is how? If I visit the IP directly in my browser I get a 403 Forbidden error. Does the host have a way to resolve this IP to a location on their server if resolved from a domain name? I'm just confused as ... | |
doc_37096 | Here is the code:
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedWriter;
import java.io... | |
doc_37097 | i have some like
this
but the coding only combines the last value in the first array, not all values
is it possible to make it like that?
so that I can take arrays easily
A: Use array_merge (doc) and ... (which break array to separate arrays):
function flatten($arr) {
return array_merge(...$arr);
}
$arr = [[["AA... | |
doc_37098 | I was using following command: sudo yum install mssql-server
And I get this error:
Error: Package: mssql-server-14.0.3076.1-2.x86_64 (packages-microsoft-com-mssql-server-2017)
Requires: systemd-units
Error: Package: mssql-server-14.0.3076.1-2.x86_64 (packages-microsoft-com-mssql-server-2017)
Requi... | |
doc_37099 | I am new to jQuery and Javascript. I am creating a general object to navigate database tables (NavDb). It works perfectly if I create 1 instance. When I run multiple instances it fails. I traced the problem to how I use 'this'. One routine that initializes/handles ajax requests fails. A form can have any number of se... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.