id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_33800 | Then how to assign that datatable to list<> (is it possible to assign datatable to list<>) ??
public DataTable Vehiclelist(string Vehicle)
{
SqlCommand newCmd = conn.CreateCommand();
newCmd.Connection = conn;
newCmd.CommandType = CommandType.Text;
newCmd.Comman... | |
doc_33801 | f = plt.figure(figsize=(6,6))
ax = plt.axes()
for column in X_data:
ax.plot(y_data, X_data[column],
marker = 'o', ls='', ms = 3.0)
A: You need to include the creation of a figure inside the loop. Create a list of figures, then append to the list each individual figure:
figures = []
for column in X_data:
... | |
doc_33802 | import pandas as pd
import numpy as np
a = ['a', 'b']
b = ['i', 'ii']
mi = pd.MultiIndex.from_product([a,b], names=['first', 'second'])
A = pd.DataFrame(np.zeros([3,4]), columns=mi)
first a b
second i ii i ii
0 0.0 0.0 0.0 0.0
1 0.0 0.0 0.0 0.0
2 0.0 0.0 0.0 0.0
I wo... | |
doc_33803 | <?xml version="1.0" encoding="UTF-8"?>
<!-- !DOCTYPE removes the warning:
No grammar constraints (DTD or XML schema) detected for the document.
-->
<!DOCTYPE project>
<project name="Audiclave" default="Deploy" basedir=".">
<property name="src.dir" location="src" />
<property name="build.dir" location="build" />... | |
doc_33804 | the html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div class="container">
content that goes brrrrrrrrrrrr... | |
doc_33805 | Problem: Beside my Button the rest(label,tb,listbox) are all displayed in another frame.. Is there a way to open and display all in just 1 frame?
from Tkinter import *
import webbrowser
import tkMessageBox
import Tkinter as Tk
def actionDirectory():
webbrowser.open('C:\AgmPlots')
def actionOpenFile():
print "... | |
doc_33806 | I'm attaching my javaScript code. The code in comments are some of the attempts I made to make it work, although I have tried other methods.
var enemy_position = [];
var positiony = 100;
function preload() {
backgroundImg = loadImage("http://127.0.0.1:8080/img/extra/map1.png");
moneyImg = loadImage("http://127... | |
doc_33807 | Because org.apache.catalina.realm.GenericPrincipal is not serializable, I tried to write my own class that implements Principal and Serializable. This seems to be fine except if then try to use
request.isUserInRole("user")
I get false for that, and any other role which the user should have. If I swap out GenericPri... | |
doc_33808 | Error:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'database ( ID INTEGER NOT NULL, QUESTION varchar(100) NOT NULL, ANSWER varchar(5' at line 1
Code:
public void createTa... | |
doc_33809 | Here I used 2 "intent-filter" tags.
<activity
android:name=".MyBrowserActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
... | |
doc_33810 | I want to randomly pick 2 different objects from the list, but make sure that there is a higher chance of picking a value that has a higher score. Basically the higher the score the more chance of being picked. I was thinking of doing a roulette style, where I take a sum of all scores, and then getting a perfect of eac... | |
doc_33811 | If a developer preview of OSX shows me that a certain API is now part of the AppKit where I previously had to implement the API as a category of the class how do I arrange things so something built and linked against that future SDK will still run on on the current OS.
So in an abstract sense in the current SDK for Lio... | |
doc_33812 | I am looking for a way to convert any given polygon on a map, to a serpentine line string. I would like to pass the polygon as a geography data type (it could be a poly string) which then takes the polygon, and generates a line string covering the entire area of the polygon.
The below images illustrates perfectly what ... | |
doc_33813 |
underlinefunction();
focusfunction();
.nav li {
display: block;
padding-bottom: 8px;
}
.nav li a {
position: relative;
padding: 4px 2px 2px 0px;
text-decoration: none;
color: blue;
text-align: left;
}
.nav li a:after {
content: "";
position: absolute;
bottom: 0;
left: 0px;
... | |
doc_33814 | in this given code, checkboxes's length is 0 after getting deacTraining's value.
html code snippet
<c:forEach var="acBatch" items="${batchBeanAll}" varStatus="loop">
<c:if test="${acBatch.getBatchStatus() == 'Active'}">
<c:set var="counter" value="${counter + 1}" scope="page"/>
<tr>
<td scope='col'><inp... | |
doc_33815 |
*
*registerHandler
*forgotPasswordHandler
*setPasswordHandler
(https://www.stackage.org/haddock/lts-7.18/yesod-auth-1.4.15/Yesod-Auth-Email.html#g:5)
But there is no one for the login handler, which default widget seems to be defined in the non-exported function emailLoginHandler here: https://www.stackage.org/h... | |
doc_33816 | Here is my code:
import tensorflow as tf
import pickle
import numpy as np
import random
image_size= 32*32*3 # because 3 channels
n_classes = 10
lay1_size = 50
batch_size = 100
def unpickle(filename):
with open(filename,'rb') as f:
data = pickle.load(f, encoding='latin1')
x = data['data']
y = data[... | |
doc_33817 |
A: add_action( 'woocommerce_before_cart', 'woocommerce_checkout_coupon_form', 10 );
You will probably need to alter the js to trigger the dropdown
A: This will help you !!
add_action('woocommerce_cart_coupon', 'woocommerce_cart_coupon_list');
function woocommerce_cart_coupon_list() {
$args... | |
doc_33818 | I have tried moving xmlns:android="http://schemas.android.com/apk/res/android" but still getting the same error.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:id="@+i... | |
doc_33819 | If singeton="false" then does it means that spring bean scope has become "Prototype"?
A: You can use @Scope for specifying prototype bean.
Example:
@Bean @Scope("prototype")
public Person personPrototype() {
return new Person();
}
for further reading follow link
A: As far as I remember, singleton=false was kept... | |
doc_33820 | Article.search({
"match_all": {}
}, function (err, results) {
console.log(results.hits.hits);
Post.search({
"match_all": {}
}, function (err, results) {
console.log(results.hits.hits);
return next();
});
});
Here i am making two requests to retrieve data from two different collections. I would li... | |
doc_33821 | Now my queries are getting slow because of the growing amount of data. Here is my query
SELECT *
FROM my_table
WHERE my_table.is_deleted = $1
AND my_table.id NOT IN (SELECT my_table_user_actions.qurb_id AS my_table_user_actions_qurb_id
FROM my_table_user_actions
WH... | |
doc_33822 | library(tidyverse)
#Function to produce contingency table
countTable1 <- function(d,col1,col2){ #This function works correctly
d %>% group_by({{col1}},{{col2}}) %>% summarize(n=n()) %>%
pivot_wider(names_from={{col1}},values_from=n,values_fill=0)
}
countTable2 <- function(d,col1,col2){ #This function fails
... | |
doc_33823 | There was no problem creating shared instance:
import UIKit
import CoreLocation
protocol LocationHandlerDelegate: class {
func locationHandlerDidUpdateLocation(location: CLLocation?)
func locationHandlerDidFailWithError(error: NSError)
}
class LocationHandler: NSObject, CLLocationManagerDelegate {
var lo... | |
doc_33824 | However, this does not allow deeplinks to trigger.
I tested my deeplinking works when I use static values in the AndroidManifest.xml.
// AndroidManifest.xml
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.catego... | |
doc_33825 | public class MyApplication extends WebApplication {
private Folder uploadFolder = null;
@Override
public Class getHomePage() {
return UserHome.class;
}
public Folder getUploadFolder()
{
return uploadFolder;
}
@Override
protected void init() {
super.init();... | |
doc_33826 | ERROR: Floating Point Overflow.
ERROR: Termination due to Floating Point Exception
I'm not sure why this is happening and was wondering if anyone has any ideas to fix it. Many thanks!
proc sgplot data=output.base;
xaxis values=(0 to 50 by 5);
title "Distribution - Product A +";
histogram fare_distance_in_km;
where prod... | |
doc_33827 |
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
public class CheckJdbc {
private static final String DB_... | |
doc_33828 | Match (n:"Indicator")
return properties(n), ID(n)
I'm unsure of the syntax and couldn't find the answer in the refcard or docs.
A: At the moment you can't do this using cypher but it is on the top five on the ideas board.
A: MATCH (n)
RETURN DISTINCT keys(n), size(keys(n))
ORDER BY size(keys(n)) DESC
A: Propert... | |
doc_33829 | String dateString = ((JSONObject)ar.get(i)).get("created_at").toString();
// Ej: "Tue May 12 19:58:26 +0000 2015"
String TWITTER="EEE MMM dd HH:mm:ss ZZZZZ yyyy";
SimpleDateFormat sf = new SimpleDateFormat(TWITTER);
Date d = sf.parse(dateString);
LocalDate localDate = LocalDate.parse( new SimpleDateFormat("yyyy-MM-dd")... | |
doc_33830 | I recently migrated my DSN from Godaddy to AWS Route 53. When doing the process I had checked "automatically import....". So I thought everything would propagate automatically.
Now after 7+ days when Godaddy finally released me, nothing is working. I am not an expert on DNS. And Site is down. Priority now is get... | |
doc_33831 | EDIT
Based on your answers so far, I believe my threading implementation (taken from: http://www.albahari.com/threading/part2.aspx#_AutoResetEvent) below is not using polling. Please correct me if I am wrong.
using System;
using System.Threading;
using System.Collections.Generic;
class ProducerConsumerQueue : IDisposa... | |
doc_33832 | import com.google.common.graph.Graph
or
import edu.uci.ics.jung.graph.Graph;
Syed
A: JUNG 2.1.1 has its own graph type: edu.uci.ics.jung.graph.Graph
The JUNG 3.0 snapshot (not yet released, but currently at head on the Github repo) uses Guava's graph type: com.google.common.graph.Graph (and its sibling types ValueGrap... | |
doc_33833 | I'm working on a script and run into some issues so I:
*
*Move the script to the interactive console (shift+alt+e on Mac)
*Run a few queries against my variables to figure things out. This step is over when I find a line of code that works.
*Use a keyboard shortcut to add it to the end of the file I have open.
*R... | |
doc_33834 | The data frame looks like this.
df1 <- data.frame(TP1.expression =c(3, 8, 2),
TP1.pval = c(0.04, 0.03, 0.01),
TP1.log2fc = c(1, 0.3, 2.1),
TP2.expression =c(2, 4, 2.1),
TP2.pval = c(0.024, 0.02, 0.01),
TP2.log2fc = c(-1, 0.1, 3.1... | |
doc_33835 | <XMLSnippet>
<data>
<stuff value="stuff" />
<stuff value="more stuff" />
<stuff value="even more stuff" />
<widget value="you expected stuff didn't you" />
<stuff value="great, we've got stuff again" />
</data>
</XMLSnippet>
And I would like to loop through all the data ... | |
doc_33836 | <?xml version="1.0" encoding="utf-8"?>
<Search>
<Pages Count="40">
<Page Number="1">Data in page1</Page>
<Page Number="2">Data in page2</Page>
<Page Number="3">Data in page3</Page>
<Page Number="4">Data in page4</Page>
<Page Number="5">Data in page5</Page>
</Pages>
</Search>
How to show data in my xml file using PHP
i... | |
doc_33837 | It's a trivial request but ...
It seems adding anything which isn't a character or else to the end of .HTMLBody is ignored/trimmed off.
We want our mail message to end with a new line but we're finding:
tried 1
x.HTMLBody = CustomerName & "," & "<p>"
and
x.HTMLBody = CustomerName & "," & "<br>"
and
x.HT... | |
doc_33838 |
A: Have you try this link?
Create a new folder called basic-eclipse.
Inside the folder, create folders src/main/java.
Create the Gradle build file in the basic-eclipse folder with the following contents:
apply plugin: 'java'
apply plugin: 'eclipse'
repositories {
mavenCentral()
}
target... | |
doc_33839 | I have a unit test class with witch I want to test methods of my 'controller' class. The unit test class looks like this:
import unittest
from Controller import Controller
class ControllerUnitTests(unittest.TestCase):
def test_no_ants_must_be_in_own_dead_ants_list(self):
controller = Controller()
... | |
doc_33840 | Now when I try to build and target my device (with the mobileprovision file), I get the error that
com.companyname.AppName doesn't com.companyname.appname.
How can I fix this in XCode4 so it matches the App ID I've setup on the portal?
A: If you click on your target(blue icon in top left corner) go under info and you... | |
doc_33841 | std::string s = "Ceci est le test du StrnCpy";
char buffer_standard[5];
strncpy( buffer_standard, s.c_str(), 5 );
assert( strncmp( buffer_standard, "Ceci ", 5 ) == 0 );
But, compiler reports that strncpy is insecure, because I don't want to set _CRT_SECURE_NO_WARNINGS (because they may be right, it's insecure), I try ... | |
doc_33842 | When I run the code I get the error "value cant be null" at this line
Bitmap afbeelding = new Bitmap(resolutie, resolutie, g);
Here's what I've tried:
public void draw(Array array)
{
Bitmap afbeelding = new Bitmap(resolutie, resolutie, g);
for(int x = 0; x < array.Length; x++)
{
for (int y = 0; y... | |
doc_33843 | Extremly simple example
switch ($cartItem->cart_item_type) {
case 'RA':
$wireTransferData['pending-RA'] = true;
break;
case 'FT':
$wireTransferData['pending-FT'] = true;
break;
default:// MF
$wireTransferData['pending-MF'] = true;
break;
}
VS
$wireTransferD... | |
doc_33844 | All is well until I try to access a popup dialog which contains a table with data that I need.
On main page is the following:
<div class="className" rel="/url-of-popup.htm?section=212">Link</div>
This is a button which links to new page as a popup.
Using the web inspector, I have tried to drill down through all eleme... | |
doc_33845 | Code 1:
import smtplib, ssl
port = 465
smtp_server = "myserver.com"
sender_email = "sender@myserver.com"
receiver_email = "receiver@gmail.com"
password = "mypassword"
message = """\
Subject: Hi there
This message is sent from Python."""
try:
context = ssl.create_default_context()
with smtplib.SMTP_SSL(smtp_s... | |
doc_33846 | I tried this too:
$ brew install mysql
$ pip install mysqlclient
and it returned me the following error:
Collecting mysqlclient
Using cached mysqlclient-1.4.6.tar.gz (85 kB)
Could not build wheels for mysqlclient, since package 'wheel' is not installed.
Installing collected packages: mysqlclient
Running setup.p... | |
doc_33847 | Does anyone have any good resources on how to make a good transition from Java/C# to C++? Obviously pointers are going to be a big issue, but any other things I should be looking out for? Any tutorials, guides, etc. would be very helpful!
Thanks!
A: Yeah, I got bit by the same bug. The university tended to lean on ... | |
doc_33848 | ranking_date ranking player_id ranking_points
------------ ------- --------- ---------------
1980-12-22 3 100284 0
1980-12-22 21 100676 0
1980-12-22 44 100653 0
1980-12-22 136 100713 0
1980-12-22 182 100757 0
1980-12-22 211 100800 0
1980-1... | |
doc_33849 | We compare the coming values with the current ones, update them accordingly on the Adapter and finally calling notifyDataSetChanged() if needed
The thing is that the redraw gets really slow thus hanging the whole UI when we got more than 3 update rows at once. Of course we are using all ListView well-known optimization... | |
doc_33850 |
site_Name
tool1
tool2
tool3
site1
0
1
0
site2
1
0
0
site3
0
0
1
site4
0
1
1
I have tried to convert the dataset into numpy array, transposed the dataset, dropping columns, etc
A: You could try a seaborn heatmap:
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as... | |
doc_33851 | I am trying to concatnet the text and the id into the view.
I am using the below code...
@foreach (var item in Model)
{
<input type="button" id= 'comment' @item.Id class="deleteComment" value="Delete" />
}
but when I inspect the elment in chrome, it looks like...
<input type="button" id="comment" 134="" class=... | |
doc_33852 | #include <iostream>
using namespace std;
inline int f1(int a,int b){
a=a+b;
while(a!=0)
a--;
cout<<"inline";
return a;
}
the second one:
int main(){
extern void f1(int a,int b);
f1(1,2);
}
g++ frist.cc second.cc
undefined reference to `f1(int, int)'
linker raise a error, as i expect the inline funct... | |
doc_33853 | I have the following function which initializes spark :
def init_spark():
global sc, sqlContext, sqlCtx, sql, spark
spark = SparkSession.builder.config(
'spark.driver.extraClassPath', 'path/to/mysql-connector-java.jar'
).getOrCreate()
sc = spark.sparkContext
sql = spark.sql
atexit.reg... | |
doc_33854 | But for the newest keycloak version 17+ which uses Quarkus instead of Wildfly?
Edit 1:
After I have successfully added logstash feature to my keycloak+quarkus build, and logging-gelf shows under installed features
I can still not see logs on kibana, as if the logs are not being sent but the feature is installed.
Am I c... | |
doc_33855 | /**
* do the foo
* @param bar preprocess object baz
* @param baz the object we are working on
*/
public void foo(boolean bar, Object baz) {}
/**
* do the foo, with preprocessing.
* See {@link #foo(boolean, Object)}
* @param baz the object we are working on
*/
public void foo(Object baz) {
foo(true, baz);
}... | |
doc_33856 | I tried this:
abc[] <- lapply(abc, function(x){
x[is.finite(log10(x))] <- log10(x)
})
where abc is:
a = c(0, 3, 5)
b = c(0, 3, 5)
c = c(2, 3, 5)
abc <- data.frame(a,b,c)
But I get the below error:
In FUN(X[[i]], ...) : NaNs produced
Any help would be much appreciated.
A: As was pointed out in a comment, you... | |
doc_33857 | And I get some warnings:
WARNING:Xst:2677 - Node <cur_val1_0> of sequential type is unconnected in block <top>.
WARNING:Xst:2677 - Node <cur_val1_1> of sequential type is unconnected in block <top>.
WARNING:Xst:2677 - Node <cur_val1_2> of sequential type is unconnected in block <top>.
WARNING:Xst:2677 - Node <cur_val1_... | |
doc_33858 | InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name.
Here is the code of PageDetail.tsx line 685 of render method mentioned in the error log:
public render(): React.ReactNode {
return (
<FormWithReduxPage
setItem={this.props.pageDeta... | |
doc_33859 | I want to somehow keep track of latest search queries and show them to the users in another page. What comes to my mind is:
*
*Most straightforward way would be to save the queries in the database in the search action: I think it's not a good idea to hit the database for every single query.
*Saving the log for the ... | |
doc_33860 | See - https://www.moneynest.co.uk/how-to-increase-your-income-fast/
ID = genesis-sidebar-primary
Using the Genesis framework - I believe the change occurred after a recent automatic update.
A: change your css
.content {float:left;}
A: Float your content left.
.content{
float: left;
}
This should do it.
A: I've h... | |
doc_33861 | Here is my code:
var $regex = new RegExp("<a\shref=\"(\#\d+|(https?|ftp):\/\/[-a-z0-9+&@#\/%?=~_|!:,.;\\(\\)]+)\"(\stitle=\"[^\"<>]+\")?\s?>|<\/a>");
var $test = new Array();
$test[0] = '<a href="http://www.nytimes.com/imagepages/2010/09/02/us/HURRICANE.html">';
$test[1] = '<a href="http://www.msnbc.msn.com/id/3887730... | |
doc_33862 | As far as I know MongoDb provides atomicity when it comes to a single collection, but it does not when we need to write into multiple collections.
So I'd like to know a way of emulating this a transaction in nodejs/mongodb in order to avoid writing into one collection if the other failed and also getting the possibili... | |
doc_33863 | override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
//if accelerometer can be used, start it
if (motionManager.accelerometerAvailable) {
motionManager.accelerometerUpdateInterval = 0.1
motionManager.startAccelerome... | |
doc_33864 | var d = new Date('2015-05-05Z');
alert(d); // Invalid Date
But things work OK in Chrome:
var d = new Date('2015-05-05Z');
alert(d); // Tue May 05 2015 01:00:00 GMT +0100 (BST)
Demo:
https://jsfiddle.net/z50LL4he/
Is there a way to create a JavaScript date instance from an ISO 8601 date that works in FireFox? Please n... | |
doc_33865 | My object is:
routerData={"User-Name":
{"type":"string","value":["\u0000\u0000\u0000\u0000"]},
"NAS-IP-Address":
{"type":"ipaddr","value":["10.1.0.1"]}
},
My collection schema is:
var model = new Schema({
routerData:{
"User-Name": {
"type": String,
"value": []
},
"NAS-IP-Address": {... | |
doc_33866 | But then if you enter http://twitter.com/#!/yourusername/following in your address bar the following tab is showed. How does this work exactly?
A: "Ajax" is used to grab new content and that is appended to the page. location.hash is manipulated after each request/internal link.
Github uses a more advanced technique by... | |
doc_33867 | Easiest way to explain what I'm going for, in brief :
SELECT a.id, a.name, (SELECT b.id, b.name) AS rel
FROM table_a AS a
JOIN table_b AS b ON b.name LIKE a.name;
Easy peasy.
So, say I have these three documents :
{ id : 1, name : "Robert" }
{ id : 2, name : "Jeffrey" }
{ id : 3, name : "Rob" }
What I'm looking for i... | |
doc_33868 | Then I want to set the last modified time on another file to the same value as the variable.
A: Use the .DateLastModified property/attribute of the (object corresponding to the) file:
>> WScript.Echo goFS.GetFile(WScript.ScriptFullName).DateLastModified
>>
22.11.2013 13:09:53
>>
| |
doc_33869 | @IBAction func deleteAccountButtonIsTapped(_ sender: Any) {
let db = Firestore.firestore()
let userID = Auth.auth().currentUser?.uid
let username = usernameTextField.placeholder
Auth.auth().currentUser?.delete(completion: { (error) in
if error != nil {
print("ERROR MAIN SETTINGS... | |
doc_33870 | function extractDistinct(data, fieldName) {
const uniques = data.reduce(
(set, x) => set.add(x[fieldName]), new Set()
);
return [...uniques];
}
This function simplify extract a list of unique values for property fieldName in a an array of items. While the JavaScript code actually allows for a collection of p... | |
doc_33871 | We have a server with 4 internal hard disks. We have created a Postgres database with a few tables. We want to be able to spread our data across these 4 disks.
We want to specify somewhere (eg table space creation stage) that the data loaded into a set of tables should be distributed across the 4 disks.
Can you kindly ... | |
doc_33872 |
My goal is to create a query which filters the result in the Group Set (to like "Default") , and then sorts by priority and then filters the results to those where loggedIn == true and status == idle.
In SQL it would be something like
SELECT *
FROM userstatustable
WHERE group == "default"
AND loggedIn == true AND... | |
doc_33873 | $columns= (Get-Content $csvfile -First 1).Split($csvdelimiter)
But some of our production servers use PowerShell version 2.0.I am getting "parameter cannot be found that matches parameter name-First" because 2.0 does not have this "-First" method.
so how can I convert the above code that supports PowerShell 2.0
A: ... | |
doc_33874 | def deploy_daemon():
while 1:
time.sleep(1)
job = Deploy.query.filter_by(status=0).first()
if job is None:
continue
job.status = 1
db.session.commit()
The issue is if a new deploy row comes in it only picks it up if I kill the process and restart it. Is there ... | |
doc_33875 | In the Service : onStartCommannd
realmResults= realm.where(MeetingsModel.class).findAll();
Intent intent = new Intent(this, LocalBroadCastReceiver.class);
if(realmResults!=null && realmResults.size()>0){
for(int i=0;i<realmResults.size();i++){
// here i am getting endTime of meeting
... | |
doc_33876 | public abstract class BaseUnitOfWork : DbContext, IUnitOfWork
{
...
public IDbSet<User> Users
{
get
{
return Set<User>();
}
}
...
}
User is simple POCO with three properties: Id, Login, Password.
And here is the code of the DbInitializ... | |
doc_33877 | The name of the app is facesnap
facesnap.models.ts :
export class FaceSnap {
title!: string;
description!: string;
createDate!: Date;
snaps!: number;
imageUrl!: string;
location?: string;
}
facensnaps.component.ts :
import { OnInit } from '@angular/core';
import { Input } from '@angular/core';
import { ... | |
doc_33878 | @POST
public void post(@BeanParam MyBeanParam beanParam, @BeanParam AnotherBean anotherBean /*other params*/) {
...
}
But it doesn't show any URI pattern for @Path annotation to access the method.
In particular I need to implement a GET service for multiple beans and access their query parameters, like so:
@GET
pu... | |
doc_33879 | For the most part, this works well, however, there is a non-0 chance that the original (edit)tableViewController (/edit) gets released and I get zombie calls.
So the question is in 2 parts:
*
*Is it possible to have a delegate from the background thread without retaining the object?
*Is this just a bad design? Sho... | |
doc_33880 | So I want to write a completion function that would complete the name of the command and would complete the arguments for that command.
So I can complete the name of the command like this
if [[ "$COMP_CWORD" == 1 ]]; then
COMPREPLY=( $( compgen -c ${COMP_WORDS[COMP_CWORD]} ))
else
#Don't know what to write here... | |
doc_33881 | ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service() exception thrown by servlet action: java.lang.AbstractMethodError: org/w3c/dom/Node.lookupNamespaceURI(Ljava/lang/String;)Ljava/lang/String;
at org.apache.ws.commons.schema.utils.NodeNamespaceContext.getNamespaceURIDomLevel3(NodeN... | |
doc_33882 | import numpy as np
import matplotlib.pyplot as plt
# data ----------------------------------
data = {"Dev": [0, 30, 60], "Bor": [1.750, 2.875, 4.125, 6.125, 8.500, 12.250],
"Poi": [0, 0.1, 0.2, 0.3, 0.4, 0.5], "Str": [0, 0.33, 0.5, 1]}
units = [["(deg)", "(in)"], ["(unitless)"], ["(psi)"]]
Inputs = list(da... | |
doc_33883 | For example, if the user input is 0018, then the data I need to display are :
*
*Hooghly as is the value of district in the object where the match was made.
*8 as is the value of ward
*general as is key which holds the array where the match was made.
This here is the JSON
[
{
"district": "Kolkata",
... | |
doc_33884 | Intent i = new Intent();
i.putExtra("BonusScore", score);
setResult(Activity.RESULT_OK, i);
Now i want BonusScore in previous activity.
public void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == Activi... | |
doc_33885 | in my Main class :
public class XadesTest{
public static void main(String[] args) throws Exception {
SignerCTest signerCTest = new SignerCTest();
System.out.println("signerCTest : " + signerCTest.toString());
signerCTest.testSignC();
}
In my SignerCTest.class :
... | |
doc_33886 | with onto:
class Drug(Thing):
pass
but with having class name
className = "Drug"
How to do that?
I have created ontology with protege, now want it open, add some classes and save back. I am failing in many ways. For examples the code
from owlready2 import *
import types
ontology_name = "http://www.seman... | |
doc_33887 | For example
Route::get('projects/{slug}','Admin\ProjectController@project');
I know how to translate the slug, but I don't know how can I translate 'projects' without using files. I don't want to use files, because it's a trick here.. The admin can add how many languages he wants, and I'm trying to avoid creation o... | |
doc_33888 | All works fine when the code is executed inside Eclipse IDE, the configuration is correctly loaded from the external file, passed as parameter by the user.
Once i build the jar file, the same piece of code does not work and configuration of the external file is not correctly loaded for my logs.
The path to the log file... | |
doc_33889 |
*Navigating back from Activity A to a non-React Activity or to the home screen will trigger two events: onHostPause and onHostDestroy.
I have tried switching to the home screen from a React Activity, but only onHostPause is called. Shouldn't both onHostPause and onHostDestroy be called? Is this a bug?
I'm on r... | |
doc_33890 | I have followed a Xamarin Tutorial on how to create splash screen, when building the app, it gave me this error:
Error retrieving parent for item: No resource found that matches the
given name (Theme.AppCompat.Light)
in my Style.xml.
Here is my Style.xml file:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<... | |
doc_33891 | using this link in Eclipse with no compilation errors.
I pressed ctrl-F11. It does not run.
A window to convert to ordinal desktop and android projects appeared.
I did it.
I imported them to Eclipse as help screen required.
It seems I should hit ctrl-F11 for this new project.
But I can't run it because of error
"libgd... | |
doc_33892 | After that, I don't remember exactly if I disabled banner module or just tried to enter its configuration, but anyway the site crashed.
On debug mode it says:
CRITICAL 13:00:38 php Uncaught Exception: No decimal pattern found for numbering system:
CRITICAL 13:00:38 request Uncaught PHP Exception PrestaShop\... | |
doc_33893 | I think I need to be looking at absolute and relative views for my states. Let me paint the picture for my issue, probably better with an explanation.
I have a number of high level components (using angular 1.5 components). Some of the high level components have child components but I didn't want to tightly couple thes... | |
doc_33894 | I want to suppress all of the Text Object whenever {table.field} = 0.
I tried the following formula under Format Text > Common > Suppress
if {table.field} = 0 then true else false
What I get is the field value within the text object either on or off while the text is always suppressed. What do I need to do to make thi... | |
doc_33895 | My problem looks like that:
I have a list of points consisting of geo coordinates (latitude, longitude) in format as (49.074454444, 22.72638888889). Theses points form a polygon but a concave one and what I want to achieve is find concave hull of this polygon.
My idea is to achieve it with use of openCV by drawing this... | |
doc_33896 |
SELECT c.clientid, c.fname, c.lname, count(cr.relativeid) as relativecount FROM {client} AS c INNER JOIN {client_relative} cr on c.clientid = cr.clientid
This isn't working. Any ideas?
A: select c.*, cc.relativecount
from client c
inner join (
select clientid, count(*) as relativecount
from client_relativ... | |
doc_33897 | If you know about some better option for playing videos in React web app with supported thumbnails, that would be also great.
<ReactPlayer
className="videoFrame"
url={url}
playing
controls
/>
Thanks
Edit: I ended up using the video itself as thumbnail and blockin... | |
doc_33898 | emoji_regexp = u'[\U00002600-\U000026FF]|[\U00002700-\U000027BF]|[\U0001f300-\U0001f5fF]|[\U0001f600-\U0001f64F]|' \
u'[\U0001f680-\U0001f6FF]'
re.findall(emoji_regexp, text, re.UNICODE)
But currently there are some cases where it doesn't detect new emojis (check out new emojis in this table), such as t... | |
doc_33899 | Example:
Here, the plate has a base-shape of rectangular (2d-array are used). The z coordinates are derived by some function f=f(x,y).
What I would like achieve is shown in the picture below (made by hand ;)). One idea is to turn-off a single cell. But how to make the cells transparent?
A: What you'd like is to ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.