id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23504400 |
//these are from two different class files
//fileUpload.ts
export class FileUpload {
name: string;
Url: string;
File: File;
constructor(prdFile: File) {
this.prdFile = prdFile;
}
}
//product.ts
export class Product {
$prdKey: string;
prdName: string;
prdImage: string;
prdDescr... | |
doc_23504401 | I'm using Intellij IDEA 2020.1.1 with Windows 10 Enterprise LTSB 2016 and the plugin:Azure DevOps.
I would appreciate when I get some tips to fix this problem.
A: In Intellij IDEA with the Azure DevOps extension installed, the repositories are not shown as a tree structure . They are shown in the same level in the Sel... | |
doc_23504402 | DECLARE @referenceDate DATETIME
SET @referenceDate = '20171123';
DECLARE @intervalDays INT
SET @intervalDays = 30
DECLARE @weekMonday DATETIME
SET @weekMonday = '20171204';
DECLARE @weekSunday DATETIME
SET @weekSunday = '20171210';
Something important is happening at exactly these dates:
@referenceDate
DATEADD(day, 1 ... | |
doc_23504403 | <Semesters>
<Row SemesterID="60" SequentialOrderNumber="1" />
<Row SemesterID="61" SequentialOrderNumber="2" />
<Row SemesterID="54" SequentialOrderNumber="3" />
<Row SemesterID="" SequentialOrderNumber="4" />
<Row SemesterID="" SequentialOrderNumber="5" />
</Semesters>
I want to be able to select ... | |
doc_23504404 | All that is under the quiz page is the template with a name of quiz and a h1 tag inside of it stating its the quiz page. i can see this page for a second before it reverts me back to the home page.
Here is my home page js file:
if (Meteor.isClient) {
Template.home.events({
"click .btn-success": function(even... | |
doc_23504405 | My code allows me to list the elements of a JSON document as well as their types, and concatenate all its in a string donnees_types.
The problem is that the typeof in JavaScript returns only number for a number and string for a string. I want to return double instead of number and varchar instead of string in order to ... | |
doc_23504406 | The script scrapes all the items versions and languages, which are around 80,000 items and this takes a while.
Is there a way to add a delay until the list of all items is generated, or any other workaround ?
Source code:
$RichTextContentID = "";
$internalLinkPattern = '<a href="~\/link\.aspx\?_id=(?<sitecoreid>[a-zA-Z... | |
doc_23504407 | my controller looks like:
/**
* @Route("/testing")
*/
public function trackingNewsletter() {
$filename = 'T:\wamp\www\trendytouristmx\web\uploads\establishments\1-37.jpg';
$response = new \Symfony\Component\HttpFoundation\Response();
$response->headers->set('Cache-Control', 'private');
$response-... | |
doc_23504408 | So I deleted Python from /usr/local/lib and now nothing is working. When I do which python it shows ``usr/local/bin/pythonand bothpythonandpython3` runs.
But when I do pip install coursera it throws error as follows:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources im... | |
doc_23504409 | var entity = _db.Entity.AsNoTracking()
.AsSplitQuery()
.Include(x => x.Prop1)
.Include(x => x.Prop2)
.Include(x => x.Prop3)
.Include(x => x.Prop4)
.FirstOrDefault(x => x.Id == id);
Something like:
var entity = _db.Entity.AsNoTracking()
... | |
doc_23504410 | I have all the navigation stuff working and have set up an action inside my dashboard to get data from an API on fetch button click.
https://github.com/starchand/SampleNavigation/blob/master/app/containers/dashboard/views/Dashboard.js
This is working - I am getting the data, however I am also getting an random action b... | |
doc_23504411 | Let say we have a C++ code:
int main(int argc, char* argv[])
{
L<A>* pA = 0;
L<B>* pB = 0;
pA = pB;
}
What should we add so this actually compiles?
In other words, how should we define L, A and B classes? Please do not use preprocessor's directives.
I have only idea how to solve it:
template<class T> stru... | |
doc_23504412 | Basically the pattern I'm looking for is this.
Say I have an array of 8 objects.
First loop:
Return objects at index 0 to 3 from the array.
Second loop:
return objects at index 4 to 7 from the array.
Third loop:
Back to the beginning so return objects at 0 to 3 again.
Ad infinitum.....
I'd love to see a jquery based so... | |
doc_23504413 | INSERT INTO myStagingTable
SELECT col1, col2, col3
FROM myRealTable
I need to put a conditional in there somehow to determine if the value from col1 for example already exists on myStagingTable, then don't insert it, just skip that row from myRealTable.
is this possible? If so, how would I structure that?
TIA
A: INS... | |
doc_23504414 | From given code, second function taking UI values and passing to first one. from log, first two lines shows command list and command string.
What's irritating me is, if I copied second line from log (dos cmd) and paste it in a cmd prompt, it works successfully and produces video correctly. but running it via gui subpro... | |
doc_23504415 | 9:1 error 'describe' is not defined no-undef
12:5 error 'beforeEach' is not defined no-undef
16:5 error 'afterEach' is not defined no-undef
20:5 error 'test' is not defined no-undef
28:17 error 'fail' is not defined no-undef
30:13 error 'expect' is not defined no-un... | |
doc_23504416 | Long time reader, first time poster! I have been having a lovely time trying to modify a working batch file to account for variability. The situation is that I have a variable-size text document that normally would be able to be split into sections of 252 lines. The code below worked like a champ:
@echo off & setloc... | |
doc_23504417 | driver.find_elements_by_xpath("//*[@class='input-content' or @class='style-scope' or @class='paper-input-container']").click()
error:
AttributeError: 'list' object has no attribute 'click'
and we tried:
driver.find_element_by_class_name('ytd-commentbox').click()
error:
selenium.common.exceptions.ElementNotInteract... | |
doc_23504418 | I use the cellForRowAtIndexPath to create a table with cells. In the UIView that takes the user to the UITableViewController the user specifies how many rows they wish to have. When the user goes back and forth the UITextField text seems to be lost and does not appear in the UITableView
Basically, I cannot get the text... | |
doc_23504419 | http://www.pdfsharp.net/wiki/MigraDocHelloWorld-sample.ashx
The problem is that in the original text there are tabs and whitespace that yields a document with centered text, as well as sections of text separated by spaces. It looks this way in notepad as well as in the string viewer in Visual Studio.
When the PDF is ge... | |
doc_23504420 | $stmt->free_result();
$stmt->close();
After a database call using prepared statments like this:
$mysqli=new mysqli("database", "db", "pass", "user");
$stmt = $mysqli->prepare("SELECT email FROM users WHERE id=? ");
$stmt->bind_param('i',$_SESSION['id']);
$stmt->execute();
$stmt->bind_result($email);
while($stmt->... | |
doc_23504421 | template <typename A, typename... B>
struct ComponentTupleAccessor:
public ComponentArray<A>,
public ComponentTupleAccessor<B...>
{
ComponentTupleAccessor(const uint32_t capacity):
ComponentArray<A>(capacity),
ComponentTupleAccessor<B...>(capacity)
{}
};
template <typename A>
stru... | |
doc_23504422 | This is the raw Postman request.
Request Headers
Content-Type: application/json
User-Agent: PostmanRuntime/7.29.2
Accept: */*
Cache-Control: no-cache
Postman-Token: e3239924-6e8a-48b9-bc03-3216ea6da544
Host: localhost:4000
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 94
Request Body
query: ... | |
doc_23504423 | I am able to ssh into the machine with GIT bash:
$ ssh git@fe80::14fc:cec5:c174:d88
Last login: Sat Nov 17 14:09:53 2018 from fe80::e119:5811:40e5:becf%en8
ord2-jims14:~ git$
And PuTTY also works.
For GIT, I've tried to set a remote in a number of ways.
ssh://git@[fe80::14fc:cec5:c174:d88]/repos/repo.git
ssh://git@%5B... | |
doc_23504424 | Thanks in advance
| |
doc_23504425 | #loading the Excel File and the sheet
pxl_doc = openpyxl.load_workbook(excel_file_path)
sheet = pxl_doc["Mud Motor Report "]
# calling the image_loader
image_loader = SheetImageLoader(sheet)
# get the image (put the cell you need instead of 'A1')
image_number = ... | |
doc_23504426 | Now i have the problem, when i create a Unit Test Project and want to load the Mapping Attributes, that my domain objects are in the other project!
This is my Unit Test:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
namespace Tests
{
[TestClass]
... | |
doc_23504427 | http://jsfiddle.net/2kLanjwn/2/
It should work in this way.
*
*Clicking the button DOWN, carousel scrolls and resize always div in the center.
I am not able to apply the same logic on the reverse, so when I click button UP I need to contract the central div, and sliding up.
I kindly you what I am doing wrong and ... | |
doc_23504428 | data = [["player1", 10]. ["player2", 8], ["player3", 7], ["player4", 9]];
var teamA = [];
var teamB = [];
var remaining = [];
for (item in data) {
remaining.push(data[item].slice());
}
for (i in data) {
var max = 0;
var selection = [,];
var index = -1;
for (k in remaining) {
if (remaining[k][1] > max)... | |
doc_23504429 | require 'os'
module Project
module Helper
# ...
def serviceExists?(service_name)
if os.windows?
puts 'Windows detected'
# ... etc ...
else
raise 'Unimplemented..'
end
end
# ...
end
end
This didn't work. Instead I received an error:
LoadError
---------
... | |
doc_23504430 | /*...*/
@DirtiesContext( classMode = AFTER_EACH_TEST_METHOD )
public class MyTestClass {
@Nested
class MyNestedClass_1 {
@Test
void test_1() {
/*...*/
}
@Test
void test_2() {
/*...*/
}
}
@Nested
class MyNestedClass_2 {
... | |
doc_23504431 | I want to find out All Anchor tags in webbrowse Loaded page.
Following is my code.
webChatPage.Navigate(ConfigurationManager.AppSettings["ServerURL"].ToString() + "/somepage.php?someparameter=" + sessionId);
HtmlDocument hDoc = webChatPage.Document; //hDoc = NULL in debugging
HtmlElementCollection a... | |
doc_23504432 | The print should look like "XYZ"
I need this for my own JSON style which will be used in an app..
Thanks in advance :)
A: You can concate "" using in echo as
echo '"'.$row['time'].'"';
A: Try this
print json_encode($row['time']);
A: You Probably want this:
$result = mysql_query("SELECT * FROM table");
if($result)... | |
doc_23504433 | var vm = this,
apiUrl = appConfig.getItem('BASE_API_URL'), // base url;
vm.uploader = $scope.uploader = new FileUploader({
url: apiUrl + '/invoices/upload',
headers: {
"Content-Type": undefined
}
});
// this function is triggered by a button outside
vm.uploadAll = function () {
vm.uploader.up... | |
doc_23504434 | Thanks in advance.
A: Set the org.mortbay.jetty.servlet.SessionURL parameter to none in either the application web.xml or the context configuration.
See the Jetty jsessionId documentation.
A: You can do that by Setting Session Characteristics. Set the context parameter org.eclipse.jetty.servlet.SessionIdPathParameter... | |
doc_23504435 |
duration:Number — Duration in seconds (or in frames for frames-based tweens)
I don't understand what that means for the following snippet:
var PARAM = 1;
superscrollorama_controller.addTween (
200,
TweenMax.to(element, PARAM, {backgroundColor: '#0033bb'}),
300,
0
);
If PARAM is set to 1, the twe... | |
doc_23504436 | Imagine a 2-dimensional board with a grid of square cells. Each cell is an independent instance of a class.
This would be the Pseudocode:
class Board {
int width;
int height;
Array cells;
}
class Cell {
Board parent;
int x;
int y;
int value;
}
(To make the example a bit more clear: Imagine... | |
doc_23504437 | So, when a client comes with a request give me page 1 of pdf 123.pdf this cache is checked, if there is no pdf file in there, it's downloaded from S3 and stored at the local cache and then a process generates this page 1 and sends the image back to the client.
The client itself does not know it's connected to a special... | |
doc_23504438 | Below is some line of code of components. that is tried by me
<div className="container">
<Image className="container-img1" src={img1}/>
<Image className="container-img2" src={img2}/>
</div>
below is a style in scss
.container{
text-align: center;
.container-img1{
position: inherit;
left: 0;
top... | |
doc_23504439 | Relevant fact: i'm using a Isometric Tilemap
I want the camera limits to stay aligned with the borders of the map just like the games cited above but i'm having difficulty and i have spent so much time on this that i start to question myself if it's worth to use Isometric Tilemap or do the usual approach and just make ... | |
doc_23504440 | I need to be to initialize a non-serializable class, TravelTimeDataArray, from a serialized data container. The TravelTimeDataArray cannot be serialized because it does not implement the Serializable interface, lacks an empty constructor, and uses a non-serializable field of type Link.
public class TravelTimeDataArray... | |
doc_23504441 | I used domReady but still ain't working, how can I accomplish this probably? This is what I got so far:
main.js
requirejs.config({
baseUrl: 'js/modules',
shim: {
// 'jquery.colorize': ['jquery'],
// 'jquery.scroll': {
// deps: ['jquery'],
// exports: 'jQuery.fn.colorize'
... | |
doc_23504442 | Chrome Dev Tools is showing all my styles in styles.scss in a <style>...</style> tag in the element inspector.
I've setup Chrome Dev Tools workspaces similar to how @vt5491 did it in their SO here: https://stackoverflow.com/a/37627935/1762493 and that is working for the .ts files I believe but element styles don't li... | |
doc_23504443 | But, I'm not good at handling data.
So, I need some help.
df1
>>> df1
stamp id col1 col2
0 100000 1 100 60
1 100000 2 100 30
2 100001 1 10 10
3 100001 1 20 30
4 100001 2 20 10
5 100001 2 20 90
6 100001 3 30 10
7 100002 1 300 30
8 100002 4 ... | |
doc_23504444 | Given this image, how could I filter responses such that I only receive results where 'meta.fred' is equal to 'jackson' ?
Have been poking around docs/testing but haven't been able to find an answer, thanks!
A: You can type meta.fred: jackson in the search input box.
Entry doc for basic queries and filters: https://w... | |
doc_23504445 | I have a course table:
A subject table:
And a separate table with relations between subjects and courses because the relation is many-to-many - a course can have many subjects but a subject can belong to multiple courses too. Each "belonging" is saved as a row in this table:
In my C# code I got EF to generate all th... | |
doc_23504446 | This code works but when I set a new number, the previous inputs aren't deleted. It just generates more input fields.
My code:
$("#child").change(function () {
if($("#child").val() > 0){
var num = $(this).val();
var i =1
console.log(num)
for(i ; i<=num ; i++){
var div=doc... | |
doc_23504447 | true
base64: 35.758ms
true
string: 12.811ms
true
buffer: 127.691ms
Code:
let n = 1000000;
let uuid = require("node-uuid");
let uuidaString = uuid.v4(),
uuidbString = uuidaString.slice(0),
uuidaBuffer = uuid.parse(uuidaString, new Buffer(16)),
uuidbBuffer = uuid.parse(uuidbString, new Buffer(16)),
u... | |
doc_23504448 |
*
*the client has a specific ip
*or the client needs to be logged in
So, I need to give two rule for a single URL, using something like the or method below:
.antMatchers("/url/**").authenticated().or().hasIpAddress("192.bla.bla")
Is there a way to accomplish that?
A: You can combine them using SPEL.
String express... | |
doc_23504449 | I wanted to know how can I go about submitting this query from my app in rails. And also, if there are any gems which let you do the same?
Thanks!
A: The BOSSMan gem created by Jay Pignata should work.
http://www.rubyinside.com/ruby-and-yahoo-boss-with-bossman-1047.html
| |
doc_23504450 | These functions are very fast, the only problem is the quality. If I scale or rotate the same image with any image editor the quality is much better. With Allegro I clearly see jagged edges and pixels.
With GIMP, for example, for scaling an image, there are three options: "Linear", "Cubic" and "Sinc (Lanczos 3)". Aren'... | |
doc_23504451 | <form class="form-inline">
<div class="form-group">
<select id="limitControl" class="form-control"
[(ngModel)]="limit" (change)="limitChanged($event)">
<option value="5">5</option>
<option value="10">10</option>
<option value="25">25</option>
... | |
doc_23504452 | This example illustrates the problem:
#include <wx/string.h>
#include <wx/wxsqlite3.h>
int main() {
wxSQLite3Database::InitializeSQLite();
//create in-memory test database & populate it
wxSQLite3Database db;
db.Open(wxT(":memory:"));
db.ExecuteUpdate(wxT("CREATE TABLE SimpleTable (id INT PRIMARY K... | |
doc_23504453 | This is what i have now as a standard get products and search on them.
query getProducts($limit: Int, $offset: Int, $searchQuery: String) {
products_products(limit: $limit, offset: $offset, where: {_or: [{title: {_ilike: $searchQuery}}, {shortDescription: {_ilike: $searchQuery}}], active: {_eq: true}}) {
__typena... | |
doc_23504454 | thanks.
A: Assuming your web service is deployed in the context of SharePoint in the /_vti_bin virtual directory of your SharePoint site, you can use the SharePoint object model like below to check if the calling user has specific privileges to your document. Unfortunately, the CheckPermissions call will throw an Una... | |
doc_23504455 | All my responses should be accommodated within the following structure;
public class ResponseDto {
private Object data;
private int statusCode;
private String error;
private String message;
}
Currently spring-boot returns error responses in a different format. How to achieve this using filter.
Error me... | |
doc_23504456 |
Type 'State' does not satisfy the constraint '(state: any, ...args: any[]) => any'.
Here is the code fragement of my sagas.ts where the error occurs
function* loadPageFull(action: Actions.LoadPageFullAction ) {
if (!action.id)
return;
const currentPageFull: Interfaces.PageFull =
yield (select<T... | |
doc_23504457 | My plain php code:
function server_com($data, $api_host) {
$xml = "xml=".($data);
$host = $api_host;
//curl initialization
$cpt = curl_init();
//curl url
curl_setopt($cpt, CURLOPT_URL, "https://$host");
curl_setopt($cpt, CURLOPT_SSL_VERIFYHOST, 1);
... | |
doc_23504458 | CREATE TABLE IF NOT EXISTS TEST_ACTIVITY(
pet_id INT(11) UNSIGNED NOT NULL,
simple_sleep_time INT(11),
deep_sleep_time INT(11),
mild_movement_time INT(11),
moderate_movement_time INT(11),
severe_movement_time INT(11),
start_time INT(11) NOT NULL,
date DATE NOT NULL,
PRIMARY KEY (pet_... | |
doc_23504459 | I noticed that this app saves .webarchives to the iOS device and loads them.
A: To quote http://en.wikipedia.org/wiki/Webarchive :
"The webarchive format is a concatenation of source files with
filenames saved in the binary plist format using NSKeyedEncoder"
As jbat100 mentions, the ASIWebPageRequest code is likel... | |
doc_23504460 | java MyProgram C:\Path\To\My\File
When I do this and output the contents of the first argument, it outputs:
C:PathToMyFile
This works, however:
java MyProgram "C:\Path\To\My\File"
But I want to be able to do the first command instead of the second. How can I achieve this?
A: The \ charecter is used to "escape" spec... | |
doc_23504461 |
the upper border above "add to contacts" is thicker as the lower border as you can see. when man clicks on it, it becomes the same as the lower border. Can anyone tell me how i can make the upper always the same as the lower?
above the cell "add to contacts" is another cell with height 0 and i tried the code
... | |
doc_23504462 |
*
*Does this statement means if the pointer is not volatile, std::fill may be optimized too?
*How we can get a volatile pointer to a container, for example vector? Does something like this work?
vector<int> v;
volatile auto ptr = v.data();
A: Yes, this will work:
volatile int* ptr = vec.data();
std::fill(ptr, ptr... | |
doc_23504463 | import pyglet
from pyglet.gl import *
import shaderpy
# image
image = pyglet.image.load('image.png')
# window
window = pyglet.window.Window(1280,720)
pyglet.gl.glClearColor(0.5,0,0,1)
# shader
shader = shaderpy.Shader([('shader.vs', GL_VERTEX_SHADER),
('shader.fs', GL_FRAGMENT_SHADER)])
@window.event
def on_draw()... | |
doc_23504464 |
A: If you have more than one instance of your app running, then you have more than one instance of cron running (I'm assuming you are referring to the npm module in your case). Both are going to activate on the same schedule since it's coded into both apps. And of course if you scale beyond that, you would have three,... | |
doc_23504465 | eg ResultSet rs4 = stm4.executeQuery("select imageTime from image_data where imageName like '%" + value3 + "%' or imageTime like '%" + value3 + "%' or imageLocation like '" + value3 + "'" );
i am trying to return ALL the rows in the result set as search results.
but if i have Resultset.next commanded when there is no m... | |
doc_23504466 | #include <stdio.h>
#include <stdlib.h>
typedef struct sample {
int a;
int b;
} SAMPLE_T;
int main() {
int i, max = 4;
for (i = 0; i < max; i++)
{
SAMPLE_T * newsamp = (SAMPLE_T *)malloc(sizeof(SAMPLE_T));
printf("addr: %x\n", &newsamp);
}
}
I'm trying to 'create' a new variable each time I go t... | |
doc_23504467 | <div data-role="select">
<select id="js-data-example-ajax" name="js-data-example-ajax">
@foreach (var item in Model)
{
<option value=" 3620194">
@Html.ActionLink(@item.ProductName, "GetByID", new { Area = "Common", ID = item.ProductID })
</option>
}
</select>
</div>
OR
<div data-role="selec... | |
doc_23504468 | Admin will choose option from combobox and then click at save to update the MYSQL records.
How to do this using AJAX or jquery?
My coding:
<?php
include('config.php');
$per_page = 9;
if($_GET)
{
$page=$_GET['page'];
}
//get table contents
$start = ($page-1)*$per_page;
$sql = "SELECT bookingID,eventinfo.eventTitl... | |
doc_23504469 | /api/loanoffer/
{
"mobile": "+23498234",
"offer": "$ 23443"
}
We want to show this loan offer immediately to all our connected clients (by matching the mobile number of the offer and connected client).
We save mobile information of the users in client cookies. How can we relay this information from mysql database... | |
doc_23504470 | Here's example pic of
Saved Search.
Now for the suitescript
var filter = new Array();
var d = '3/8/2016';
var date = nlapiStringToDate(d);
filter[0] = new nlobjSearchFilter('trandate', null, 'on', date);
var search = nlapiSearchRecord('salesorder', null, filter);
Here's what the result search array looks like.
... | |
doc_23504471 | Is there any way to do so? Below is my html code and I have those two functions in the component.
<button matRipple type="button" class="btn btn-outline-success my-sm-0 mx-2 d-flex shadow-none"
(click)="userSubscribtions(selectedTab)" [disabled]="this.loading">
<ng-container *ngIf="User.subscriptions.in... | |
doc_23504472 | I have a simple-keyboard plugin loading in the same way as the others, it loads fine locally but after I run nuxt generate and upload my dist folder to the s3 bucket, the keyboard/plugin does not show up. There are also no errors in console. I'm not sure what is removing it?
I have created a file in the plugins direct... | |
doc_23504473 | insert_in_tree(&tree->root,&tree->root,a, b);
I know how to accept integers till empty line is added which i do in the following way:
AVLTree *CreateAVLTree(const char *filename)
{
// put your code here
AVLTree *tree = newAVLTree();
int key, value;
if(strcmp(filename, "stdin") == 0){
char str[1... | |
doc_23504474 | I want to change
"format": null
to
"format": {
"dateFormat": "dayShortMonthYear"
}
Using the code below, I get the following result for "format": (which I don't think is correct):
"format": "{\"dateFormat\": \"dayShortMonthYear\"}",
This is my code. Any help will be greatly apreciated.
import json
data_from_... | |
doc_23504475 | What i would like to do is use in these parent pages some kind of helper that prints the name of these child pages if in the querystring appears debug=1 using something like:
@Html.AutodiscoverWidgets()
Its possible to do this? I would like to avoid put in every child page something like:
@Html.AutodiscoverWidgets("Na... | |
doc_23504476 | thanks
A: Hi you can read this article http://msdn.microsoft.com/en-us/library/69644x60(v=vs.80).aspx and this one in class
A: There are two types of thread in MFC:
*
*worker threads simply perform a task in the background then exit
*user-interface threads which have a message pump i.e. you can PostMessage to it... | |
doc_23504477 | Here is my code:
isMIP = False
while True:
model.optimize()
if isMIP:
print("Optimal value:", model.getObjVal())
break
else:
print("Intermediate value:", model.getObjVal())
x,y,u = model.data
fracvars = []
for j in y:
w = model.getVal(y[j])
if w > 0.001 a... | |
doc_23504478 | The code below prints the counts:
import random
c_true = 0
c_false = 0
for i in range(100):
a = random.getrandbits(1)
if a == 1:
c_true += 1
else:
c_false += 1
print "true_count:",c_true
print "false_count:",c_false
The output is:
true_count: 56
false_count: 44
I want the counts to be eq... | |
doc_23504479 | I've tried everything and checked everywhere but other answers seem to say that the solution to my problem is to delegate my click call with .on but it doesn't work.
So here is the html code.
<button id="reloadtweet" class="btn btn-info mt-4 new">Reload to get new tweets</button>
<div id="newtweet" class="newt"></div>
... | |
doc_23504480 | var Class = function() {
};
Class.prototype.add = function(a, b) {
return a + " + " + b;
};
Class.prototype.api = function(callback) {
callback.apply(this);
};
var ClosedStuff = new Class();
ClosedStuff.api(function() {
console.log(this.add(2, 2));
});
This stuff works, but is there a way to omit this.... | |
doc_23504481 | I guess that if i set 1000 impressions on a 5 days campaign , there will be 1000/5=200 impressions per day.
But what about within a day ? Are the 200 impressions "equally" spread over 24 hours ? Or will the 200 ads be displayed during the first minutes or hours of the day ?
Thanks so much for any tip on that!
A: The ... | |
doc_23504482 | a {
-o-transition:.3s;
-ms-transition:.3s;
-moz-transition:.3s;
-webkit-transition:.3s;
transition:.3s;
text-decoration: none;
color: #ffffff;
}
a:hover {
text-decoration: none;
color: #66caff;
}
It's working fine when I hover, but after I visit the link, I'm getting unwanted underlines, and it ch... | |
doc_23504483 | Let's say that I have 6 items in the folder, I need to get all the items
but only the first 2 of the image tags.
Is that possible?
Here's my code,
@{
string folderPath = Server.MapPath("/media");
string[] files = Directory.GetFiles(folderPath + "/" + Model.Content.GetPropertyValue("Name"));
}
@foreach (string i... | |
doc_23504484 | I would like to show the user the list of "students" and if user chooses an student, show his teachers.
Conversely, user may opt to see list of teachers and he/she can select a teacher to see all the students that teacher is teaching.
I am looking to have a java collection class (java built in or 3rd party) to represen... | |
doc_23504485 | How it looks currently
Navbar code:
<nav
class="flex items-center justify-between flex-wrap bg-gray-900 py-4 lg:px-12 shadow border-solid border-t-2 border-gradi border-gradient-purple">
<div class="flex justify-between lg:w-auto w-full lg:border-b-0 pl-6 pr-2 border-solid border-b-1 border-gray-800 lg:pb... | |
doc_23504486 | I am not sure what to get in order to get that information?
<?php
$args1 = array(
'role' => 'committee',
'orderby' => 'user_nicename',
'order' => 'ASC'
);
$committee = get_users($args1);
echo '
<table>
<tr>
<th style="padding: 10px;">Title</th>
<th style="padd... | |
doc_23504487 |
Thanks a lot !
A: chart.getLegend().setEnabled(false)
| |
doc_23504488 | I found that statecharts are used for modeling reactive system behavior such as avionics systems as originally used bu its creator David Harel with the complex task of designing software for the LAVI fighter, built by Israel Aircraft Industries; IAI to clearly and precisely specifying aircraft control behavior. He want... | |
doc_23504489 | npm install mysql
mysql@2.7.0 node_modules\mysql
├── require-all@1.0.0
├── bignumber.js@2.0.7
└── readable-stream@1.1.13 (isarray@0.0.1, inherits@2.0.1, string_decoder@0.10.3
1, core-util-is@1.0.1)
It doesn't do anything; when I check if the module has been installed, it just isn't. What can I do?
| |
doc_23504490 | SELECT DATEPART(isowk, '20141229');
But now I need an easy way to get the year this week is assigned to. What I currently do is not that elegant:
DECLARE @week int, @year int, @date char(8)
--set @date = '20150101'
set @date = '20141229'
SET @week = cast(datepart(isowk, @date) as int)
if @week = 1
begin
if D... | |
doc_23504491 | So my question is: How can you run a node specific command as part of the qunit tests?
Thanks.
A: Create your own grunt task and call the qunit task from inside it:
var exec = require('child_process').exec;
grunt.registerTask('qunit-plus', 'Custom qunit task', function() {
exec('/usr/bin/mycmd', function(err, std... | |
doc_23504492 | A similar HTML ->
(although each td inside the tr has a different class in my case).
Let's just say if I want to get all the age from the Age column in the table.
I've tried a couple of approaches but all of them end up with Promise rejected or Promise waiting and the test times out.
Eg -
let table_row = page.locator(... | |
doc_23504493 | The box I want the blocks to stay in is 160x280 (width x height), and the bottom left-hand side is at (0,0). Each block is 20x20. Here's the code:
private float previousTime;
public float fallTime = 0.8f;
public static int height = 280;
public static int width = 160;
// Start is called before the first... | |
doc_23504494 | package Audio;
import java.io.File;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import sun.audio.AudioPlayer;
public class MenuAudio {
public static boolean stopped = false;
public static void Start(){
System.out.println(stopped);
try{
Fil... | |
doc_23504495 |
A: I just recognized I forgot to copy the .dll File to my project folder.
| |
doc_23504496 | Code:
<script type="text/javascript" language="javascript">
<!--
...javascript code here
-->
</script>
Compared to this:
<script type="text/javascript" language="javascript">
...javascript code here
</script>
A: They used to be put as a fallback for browsers that didn't support javascript. You might fi... | |
doc_23504497 | You can see the working example here on cssdeck link
http://cssdeck.com/labs/wpj8sl4k
As you can see the bottom part of the text is cut, when the padding is removed everything gets back to normal.
Suggestions are appreciated.
A: #content2 also follows the same CSS rules, so it will appear above #content. This is espe... | |
doc_23504498 | I'm trying to make a geo_distance filter in nodejs, but the typing doesn't seem to be recognized, maybe it's because of the 'nested' type, because I tested the documentation example and it worked, follow the link:
(https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html)
the in... | |
doc_23504499 | Note: upgraded lxml and bs4 to latest version, same issue.
I am parsing english wikipedia. I have used wikiextractor.py to break my dump up into several xml documents, containing about 100 articles each, seperated into <doc> tags. Within each article are the anchor tags, which I am attempting to capture and store in a ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.