title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
URLError with SPARQLWrapper at sparql.query().convert() | <p>I try a small python script to test my SPARQL request. However, just the next simple code doesn't work.</p>
<pre><code>from SPARQLWrapper import SPARQLWrapper, JSON
import rdflib
#connect to the sparql point
sparql = SPARQLWrapper("http://localhost:3030/sparql")
#SPARQL request
sparql.setQuery("""
PREFIX rdf: <h... | 2 | 1,942 |
Calling Excel Macro from C# throwing Compile Error : Sub Or Function not defined | <p>I am creating a web application to replace the current Excel Macro Application. The Excel macro has several forms and modules in it. When I call a macro function in the C# using xlApp.Run method, the function is getting called but throwing error when the function calls other sub functions and uses global public vari... | 2 | 1,083 |
Protractor afterEach extract browser.manage().logs() to a helper function | <p>My overall goal is to extract the browser.manage().logs() to a helper function. I'm stepping towards this goal by including the <code>browser.manage().logs()</code> functionality inside the <code>afterEach</code> call inside the test. </p>
<p>I know that my test is throwing a console error. </p>
<p>The inline v... | 2 | 1,467 |
Volley android "javax.net.ssl.SSLHandshakeException: Handshake failed" | <p>Hi I'm rebuilding a API call using volley library</p>
<p>this is my test code to send XML data and receive xml response (I just need to successfully receive response in string format)</p>
<pre><code>String url ="https://prdesb1.singpost.com/ma/FilterOverseasPostalInfo";
final String payload = "<Overseas... | 2 | 2,092 |
sqlserver datetime to oracle timestamp problems | <p>So I am working on a project to move data from a sql server db to an oracle db and the dates are giving me a hard time. To do data movement I have a python script that pulls data from the sql server db and and then runs an insert query. </p>
<p>The problem is that the dates look like this <code>2016-06-01 05:45:06.... | 2 | 1,305 |
Using the jQuery validate plugin to check if one or more checkboxes (with different names) are selected | <p>Ok, so I am implementing the jQuery validate plugin for a Drupal 7 site. The problem I am running into is that one part of the form generates multiple checkboxes with slightly different names. Because of this there does not seem to be a direct way to check, using the validator plugin, if at least one of these checkb... | 2 | 1,149 |
Strange glitch with RecyclerView and expandable cards | <p>I am trying to get into Android app development with a small walk-duration per route app.<br>
But a little glitch is stopping me from continuing.<br>
I tried to google it many times with no result, here's the thing:</p>
<p>My <code>RecyclerView</code> with <code>onClick-expand cards</code> shows strange behavior of... | 2 | 1,718 |
Updating creates new child object instead of updating the existing one Hibernate | <p>In my spring boot app I have a Workout object with a list of Exercise objects. The problem is when I try to update Workout, the Exercise that belongs to the Workout is not being updated. Instead it’s creating new Exercise objects in the database. I've added my Workout Entity and the Exercise Entity Below. Any help w... | 2 | 1,397 |
FFmpeg library: modified muxing sample for FLTP input and FLTP audio, loses audio | <p>Based on muxing sample that comes with FFmpeg docs, I have modified it, from input format as S16 to FLTP (planar stereo), and outputting to webm format (stereo).</p>
<p>Since input is now FLTP, I am filling two arrays, then encoding again to FLTP. There are no obvious errors given on screen, but the resulting webm ... | 2 | 1,774 |
Issue with EditText in Listview softkeyboard | <p>I have a Listview with row layout contains two textviews and a edittext
In my activity i use </p>
<p>android:windowSoftInputMode="adjustResize|stateHidden"</p>
<p>and in edittext arguments are:</p>
<pre><code><EditText
android:id="@+id/et_quantity_test"
android:layout_width="0dp"
android:layout_wei... | 2 | 2,039 |
NullPointerException with Textfield in fxml | <p>I've got a problem with a NullPointerException.</p>
<p>This is my Controller:</p>
<pre><code> public class Controller implements Initializable{
public Label lbTitle;
public Label lbAuthor;
public Label lbChapters;
public TextField tfTitle;
public TextField tfAuthor;
public TextArea taCh... | 2 | 3,059 |
Django filter query from many to many fields | <p><strong>models.py</strong></p>
<pre><code>class Keyword(models.Model):
name=models.CharField(max_length=500,unique=True)
image = models.ImageField(upload_to='keywords/', blank=True, null=True)
mood=models.ManyToManyField(Mood,blank=True)
def __str__(self):
return str(self... | 2 | 1,223 |
How to run Android robolectric tests with parallel mode enabled | <p>I am finding troubles in running Robolectric tests with parallel mode on over a clean Gradle and Maven cache.</p>
<p>This is build.gradle:</p>
<pre><code>apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.robole... | 2 | 2,821 |
How to reverse the MoveMouseRelative to exact first position when releasing LMB | <p>I am trying to make a script for Logitech mouse that:</p>
<ol>
<li>Step 1: When LMB is pressed -> do recoil pattern</li>
<li>Step 2: When LMB is released -> MoveMouseRelative to exact position before pressed</li>
</ol>
<p>So is there any way to try out step 2? This is the script:</p>
<pre><code>local Recoil_Patte... | 2 | 1,768 |
How do I solve Could not find method in a parent or ancestor Context for android:onClick attribute? | <p>I am trying to launch a foreground service and notification when the user clicks on a button. This button is called "startBtn". It is meant to show the number of steps that the user takes. </p>
<p>I have 3 files, StepsFragment.java, fragment_steps.xml and StepsService.java.</p>
<p>I encountered this error in Logca... | 2 | 1,917 |
naivebayes Mahout 0.7 | <p>I am working on sentiment analysis of tweets.
I am using mahout naive bayes classifier for it.I am making a directory "data".Inside "data" I am making three more directories named "positive","negative","uncertain"..Then I kept 151 files(total 151Mb) on each of these positive,negatie and uncertain directory..Then I ... | 2 | 1,107 |
Using AWS WAF with Serverless Associate WAF | <p>I have created a Web ACL in my AWS account in the AWS WAF and assigned it some rules. In my serverless.yml file I have used the - <a href="https://www.serverless.com/plugins/serverless-associate-waf" rel="nofollow noreferrer">serverless-associate-waf</a> plugin.</p>
<p>But when I go to my Web ACLs > my acl > A... | 2 | 2,908 |
How to validate textbox based on checkbox value | <p>Iam trying to validate textbox based on checkbox value. please view my model class and IsValid override method.</p>
<pre><code>public class Product
{
//Below property value(HaveExperiance)
[MustBeProductEntered(HaveExperiance)]
public string ProductName { get; set; }
public bool HaveExperiance { g... | 2 | 2,056 |
Group by one column and see all unique results of another column of uneven lengths | <p>I want to create sort my dataframe by all unique sites and list all of the values in another column (without performing any function on those values). The values for each site will be of different lengths. I want to keep the values numerical so I can do some data manipulation afterwards (such as box plots among othe... | 2 | 1,037 |
GKE with Ingress setup always gives status UNHEALTHY | <p>To start of I have tested the tutorial at <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer" rel="noreferrer">https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer</a></p>
<p>which works fine. I also tested the same tutorial but added a tls secret as well to test htt... | 2 | 3,208 |
datatables warning: table id=laravel datatable -exception message undefined index yajra | <p>good morning,
I have the following error when inserting data to my datatable.</p>
<p>this is my query from my controller</p>
<pre><code>if(request()->ajax()) {
$user = auth()->id();
$queja = Queja::join("reportes","reportes.id_reporte","=","quejas.id_reporte")->where('reportes.id','=',$u... | 2 | 2,504 |
Python - Is there a way to add an "as" alias to a for loop? | <p>Note: <code>python --version</code> yields <code>Python 3.6.4 :: Anaconda, Inc.</code></p>
<p>I'm working with some <code>itertools</code> code that seems pretty intent on putting out tuples, but I want to loop over each result as a <code>numpy.array</code>. Use case: Have a data set with ~10 features and I'm curio... | 2 | 1,035 |
For Loop in SQL Server - is this the right logic? | <p>I'm trying to take transactional data and cleanse it to meet my analysis needs. There are some limitations to how transactions are recorded into the database, and I am trying to get around those limitations. </p>
<p>When a customer places an order with more than 1 product, the transactional database doesn't link ... | 2 | 1,482 |
AES encryption result only part of data are correct (using mcrypt lib) | <p>I download a sample code of AES encryption from <a href="https://gist.github.com/2436364" rel="nofollow">https://gist.github.com/2436364</a>
I modified part of the source code to meet my project requirement as below:</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#includ... | 2 | 1,074 |
Unable generating module-info for legacy jar via jdeps using Java 11 | <p>I need to generate <em>module-info</em> file for legacy jar which named as:
<em>selenium-chrome-driver-3.141.59.jar</em> using the command:</p>
<pre><code>jdeps --module-path modules --generate-module-info out selenium-chrome-driver-3.141.59.jar
</code></pre>
<p>But I'm getting as result:</p>
<pre><code>Missing d... | 2 | 2,064 |
Validate dynamic radio buttons jQuery | <p><strong>Problem:</strong> I can´t validate dynamically created radio buttons.</p>
<p><strong>Question:</strong> how do I use jQuery to validate the radio buttons?</p>
<p>Is it possible to customise the jQuery to validate dynamically created radio buttons? </p>
<p>Any suggestions?</p>
<p><strong>HTML and PHP from... | 2 | 2,875 |
How to get primery key value to foreign key | <p>I have 3 tables one is <code>User</code> and <code>doctor</code>, <code>patient</code>. <code>User</code> table has common attributes such as <code>ID</code>, <code>Name</code>, <code>Email</code>. I have connected both tables using primary key of the user table and foreign key of the doctor table. I use 2 SQL serve... | 2 | 1,531 |
Outlook HTML Signature in GMail App: Gap between <td> Elements | <p>I am facing a strange behavior of the GMail App on Android when displaying an HTML Signature created with Outlook 2017 from Mac OS.</p>
<p>First of all, here is what I did:</p>
<ol>
<li>I created an HTML signature with a simple table layout and opened in a Browser</li>
<li>I copied the content from the Browser Win... | 2 | 3,421 |
JavaScript - Separating Axis Theorem - Collision working, but not Response? | <p>So, I am trying to apply response to my SAT, Circle - Poly, Poly - Poly collisions. I ported this code on this article to JavaScript:</p>
<p><a href="http://rocketmandevelopment.com/blog/separation-of-axis-theorem-for-collision-detection/" rel="nofollow">http://rocketmandevelopment.com/blog/separation-of-axis-theor... | 2 | 1,050 |
Why aren't RSpec matchers working? | <p>When I run this simple RSpec with any basic matcher, it doesn't work:</p>
<p>File: <a href="https://gist.github.com/trinitronx/5580164" rel="nofollow noreferrer"><code>matcher_spec.rb</code></a></p>
<pre><code>describe "a simple RSpec matcher" do
true.should be_true
end
</code></pre>
<p>The output for ... | 2 | 1,029 |
cuSparse vs. cuBlas triangular solvers | <p>Actually I posted a relevant question a few days ago, but I got zeros answers, however, I came to a very strange finding yesterday, as mentioned in my previous question: <a href="https://stackoverflow.com/q/11382346/1501149">Very slow performance of cusparse csrsv_analysis</a>, the analysis phase of the sparse tria... | 2 | 1,241 |
Add Custom Contact row in Phonebook like Whatsapp | <p>Basically what I need to achieve is very clear but I am having many doubts in my implementation. I went through R & D about this topic but didn't find satisfied answer. Hope you guys will understand me and help me further.</p>
<p>So here is screen shot for what I want to do:</p>
<p>Contact detail page</p>
<p>... | 2 | 3,781 |
How to change default response of express-jwt for a custom response? | <p>i want to know how to change de response of express-jwt when is unauthorized, i tried with handlers but doesnt work</p>
<p>i need help</p>
<pre><code>// Authorization
const auth = require('express-jwt');
router.get('/', auth({secret: config.secretKey}),async(req,res,next)=>{
console.log('hola')
})
</code></... | 2 | 1,163 |
is there a better way to select correct method overload? | <p>Is this really the only way to get the correct address for an instance function:</p>
<pre><code>typedef CBitmap * (CDC::* SelectObjectBitmap)(CBitmap*);
SelectObjectBitmap pmf = (SelectObjectBitmap)&CDC::SelectObject;
</code></pre>
<p>First, one has to create a typedef, and then one has to use that to force the ... | 2 | 1,428 |
Fail to import a module's css file | <p>In my React project, I am using this gem for creating a dashboard: <a href="https://github.com/luqin/react-icheck" rel="nofollow">https://github.com/luqin/react-icheck</a></p>
<p>I copy pasted their first example in my code.</p>
<p>On the Github page, it says I should have import the <code>css</code> like this:</p... | 2 | 1,259 |
Selenium & PhantomJS error [Java] | <p>We are implementing functional tests with cucumber and selenium. Our front-end application is based on backbones and marionette. And when we run the tests with Chrome driver everything goes great. But when we change the driver and we use phantomjs, we get the folloging error:</p>
<pre><code>[INFO - 2016-05-25T07:2... | 2 | 1,464 |
How to plot with X-axis ranging from -X to X in R | <p>I have a data frame that looks like this:</p>
<pre><code>> dataf
gene_name log.pval log.fc
1 TNIP3 0.631094308480128 1.1506542453426
2 NP_808217.1 0.772551410812959 -0.808513121902601
3 Q6ZQS7_HUMAN 0.120675567248996 1.20907596997608
4 Q8TA88_HUMAN 1.44494939509263 ... | 2 | 2,268 |
Simulate touch input on Microsoft Surface Window | <p>i am trying to use a Anoto-Pen as a <code>TouchDevice</code> with <code>SurfaceInkCanvas</code>.<br>
The pen uses a coordinate-system printed on a sheet of paper to derive its position and this positional data then is send to my application. There i try to transform it to <code>TouchInput</code> by subclassing <code... | 2 | 1,727 |
Firebase iOS Swift: Prevent Duplicate Usernames | <p>I am building an app that uses Firebase's email and password login feature. I am having the user register with a username, email, and password. I am struggling with how to stop the user from being created if the username is not unique. I have been reading other questions (specifically <a href="https://stackoverflow.... | 2 | 2,281 |
SVG injection with template literals doesn't work in browser | <p>My idea is to inject inline SVG to my HTML using template literals.
The purpose is simply use benefits of styling inline SVG icons with CSS but avoid bloating html code with SVG stuff. Also it's very easy to reuse repeating icons by just adding corresponding class. Also all icons or vector stuff like logo can be st... | 2 | 2,093 |
Webpack with Svelte component style using Tailwindcss+postcss | <p>I am working on a project with Svelte and Tailwindcss. I use Webpack as my bundle. I obviously use postcss and purgess to reduce the size of my css.</p>
<p>While in development mode, I don't purge anything, it works just fine but when I want to build the project everything breaks.</p>
<p><strong>The tailwind class... | 2 | 1,745 |
AJAX Wordpress ACF update with button click id | <blockquote>
<p>I using ACF wordpress to update acf field for user to populate with button id click.
I am getting Error as admin-ajax.php with 400
<strong>Error POST <a href="https://domainname/wp-admin/admin-ajax.php" rel="nofollow noreferrer">https://domainname/wp-admin/admin-ajax.php</a> 400 ()</strong></p>
... | 2 | 1,288 |
Update only works in debug mode | <p>I'm new to using entity as a data layer between MVC and SQL Server, so I apologize up front if what I'm doing is bad practice. </p>
<p>Let me start by sharing the code that is handling the update.</p>
<p>Update Delivery:</p>
<pre><code>public bool One(Delivery toUpdate)
{
using (var dbContext = new FDb())
... | 2 | 3,685 |
ASP MVC 5 Html.EditorFor not working / Unable to access/use Default Editor Templates | <p>While attempting access/use the default editor templates in MVC5.</p>
<p>I receive the error:</p>
<blockquote>
<p>The model item passed into the dictionary is of type 'System.String',
but this dictionary requires a model item of type
'MvcContrib.UI.InputBuilder.Views.PropertyViewModel`1[System.Object]'.</p>
... | 2 | 1,239 |
What is the difference between Node.SelectNodes(/*) and Node.childNodes? | <pre><code> string XML1 = "<Root><InsertHere></InsertHere></Root>";
string XML2 = "<Root><child1><childnodes>data</childnodes><childnodes>data1</childnodes></child1><child2><childnodes>data</childnodes><childnodes>d... | 2 | 1,432 |
ggplot2: change break points of discrete scale to be between two break points | <p>I have the following dataset:</p>
<pre><code>df <- data.frame(dens = rnorm(5000),
split = as.factor(sample(1:2, 5000, replace = T)),
method = as.factor(sample(c("A","B"), 5000, replace = T)),
counts = sample(c(1, 10, 100, 1000, 10000), 5000, replace = T))
</code></pre>
<p>... | 2 | 2,318 |
Left recursive ANTLR grammar | <p>I have written a grammar but getting a left recursive error.</p>
<pre><code>grammar Lang;
options
{
output = AST;
language = C;
ASTLabelType= pANTLR3_BASE_TREE;
backtrack = true;
}
start : primary_expression+
;
primary_expression
: '{' expression '}'
| ... | 2 | 1,288 |
Cython - Exposing C++ (vector and non-vector) objects returned by C++ function to Python | <p>I am working on a project where I have a large C++ code base available which I want to wrap with cython and made available in python.</p>
<p>In doing so, I am facing a situation where some of my C++ functions returns Vector object or simple object (with multiple attributes). I want to return this object to Python s... | 2 | 2,282 |
Swift UIButton and IBAction crashing in Objective C | <p>I am creating a reachability alert that I wrote in Swift and is being called in the app that is written originally in objective C. I have all my bridged-header-.h setup correctly. The problem is happening when I click on a UIButton created in Swift and an IBAction that is also written in swift. below is the error a... | 2 | 1,047 |
How to center CardView inside LinearLayout? | <p>I have a portrait display and I want to translate it to landscape mode. </p>
<p>In landscape mode, first child of encompassing LinearLayout, which is also a LinearLayout, should contain CardView with ImageView (rounded, I'm not sure how is that gonna turn out). In second LinearLayout, I would like to have Username ... | 2 | 1,206 |
Generic switch statement to initialize derived types | <p>I'm creating a DNS name resolver. While parsing the returned packet I read the RR type then pass it through switch to initialize a derived type of class Record. Record types is a large enum type. I map the enum to a struct using template specialization.</p>
<pre><code>template < QueryType n >
struct Struct;
... | 2 | 1,195 |
openmp segmentation fault - strange behaviour | <p>I'm quite new at c++ and openmp in general. I have a part of my program that is causing segmentation faults in strange circumstances (strange to me at least).</p>
<p>It doesn't occur when using the g++ compiler, but does with intel compiler, however there are no faults in serial.</p>
<p>It also doesnt segfault whe... | 2 | 2,083 |
Tensorflow Eager Execution does not work with Learning Rate decay | <p>trying here to make an eager exec model work with LR decay, but no success. It seems to be a bug, since it appear that the learning rate decay tensor does not get updated. If I am missing something can you land a hand here. Thanks.</p>
<p>The code bellow is learning some word embeddings. However, the <strong>learni... | 2 | 2,051 |
How to show thumbnail from a folder using javascript in asp.net | <p>I have uploaded some images using uploadify and saving the original file in "uploads" folder and thumbnails in "uploads\thumbs" folder now what I need is I have a div element on the main.aspx page where I need to show thumbnail image.After clicking the thumbnail I need to give a lightbox effect to it.</p>
<p>1.I ha... | 2 | 1,157 |
PrimeFaces get all row value of datatable | <p>I am new for prime face. I had a checkbox and textbox value on dataTable.And dataTable will load data from database. Please see my code below</p>
<p>text.xhtml</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/... | 2 | 3,904 |
java.sql.SQLException: No value specified for parameter | <p>I am getting following error while using Spring MVC with hibernate Annotations. I am trying to insert the record in the database using <code>AUTO_INCREMENT</code> on the mysql database table Employee. On the model class I have the entry as below -</p>
<pre><code>@Entity
@Table(name="EMPLOYEES")
public class Employe... | 2 | 3,297 |
onPress not working in menu for ios devices | <p>I want to mention that this problem only occurs on ios devices android just works fine. </p>
<p>I have menu userMenu class </p>
<pre><code> import Menu, {MenuItem, MenuDivider} from 'react-native-material-menu';
class UserMenu extends React.Component {
logout() {
this.props.logout().th... | 2 | 1,430 |
Spark job returns a different result on each run | <p>I am working on a scala code which performs Linear Regression on certain datasets. Right now I am using 20 cores and 25 executors and everytime I run a Spark job I get a different result.</p>
<p>The input size of the files are 2GB and 400 MB.However, when I run the job with 20 cores and 1 executor, I get consistent... | 2 | 2,971 |
Rotate bitmap on canvas in android | <p>I have a problem to rotate bitmap on canvas ,I am drawing bitmap on canvas by using canvas.drawline and use following code to rotate image</p>
<p>It rotate but it shows two image now ?How to remove previous image from canvas? What to do?</p>
<pre><code>bitmap = Bitmap.createBitmap((int) /*getWindowManager()
... | 2 | 1,221 |
How to destroy or clear Bean object state in every use in spring boot | <p>I'm new in spring boot and trying to figure out when we create a bean using @Bean and tries to access that bean where ever it requires using @Autowired. But i know @Bean is by default singleton and it will save its state but i want to clear its state so that it will give new newly append data or null if no data was ... | 2 | 1,571 |
avgOver in Quicksight | <p>I have data from every month in 2019 but only through September in 2020. Each row contains a <code>MonthNo.</code>, corresponding to the calendar month, and a user <code>ID</code> entry. It looks like this</p>
<pre><code>| Month | Year | ID | MonthNo. |
|-----------|------|--------|----------|
| January | ... | 2 | 1,967 |
Can't restore my GPU after bad_alloc with `cudaDeviceReset()` from the CUDA library | <p>The following program does 3 successive calls to the "test" function where some thrust operations are executed. Each one of these 3 calls provides a different size to the problem: </p>
<ul>
<li>3,000 for the first call; </li>
<li>300,000,000 for the second call;</li>
<li>3,000 again for the third call. </li>
</ul>
... | 2 | 1,614 |
Filtering dropdown based on another dropdown selection Javascript | <p>I have 2 separate dropdown lists and submit button which takes the visitor to a unique URL based on selections.</p>
<p>I need to get each dropdown to filter each other.</p>
<p>for example: When someone chooses "Volvo" from the first dropdown menu, then the second drop-down menu shows only "Red" & "White" and s... | 2 | 1,268 |
FBConnect: session:didLogin never called starting from the second time the user tries to login? | <p>I am trying to use the FBConnect SDK to connect to Facebook. Everything works fine the first time the user tries to login: the delegate method <code>session:didLogin</code> gets called, then I am able to acquire the extended permission to update the user's status and to upload a picture.
However, when the user taps ... | 2 | 1,348 |
Hibernate error: one-to-one mapping on superclass and subclass | <p>I'm working on a project with Hibernate and MySQL, use annotation for mapping database to data object model. I need to mapping one-to-one between superclass and subclass on ID primary key of their classes. I've modified the sample of this tutorial: <a href="http://www.mkyong.com/hibernate/hibernate-one-to-one-relati... | 2 | 3,076 |
Core data bulk insert suddenly slows to 1/10th the speed | <p>I am bulk inserting into core data. I have a person object, and this person object has a relationship called "otherPeople" that is an NSSet of people. When bulk inserting data from a download, things were great until about 10,000 people are read in at which point the bulk insert speed slows down to a crawl. I am sav... | 2 | 1,283 |
Creating a table in Azure Table fails without exception | <p>I'm trying to create a table in Windows Azure Table service, using the example <a href="https://github.com/Azure-Samples/storage-table-dotnet-getting-started" rel="nofollow noreferrer">https://github.com/Azure-Samples/storage-table-dotnet-getting-started</a></p>
<p>While running this example, I have no problem : th... | 2 | 1,824 |
FlinkKafkaConsumer - Scala consume json message | <p>I am new to scala and flink. I am using the following code to consume a json message from a kafka stream. </p>
<pre><code>object Job {
def main(args: Array[String]) {
val properties = new Properties()
properties.setProperty("bootstrap.servers", "localhost:9092")
// only required for Kafka 0.8
prop... | 2 | 1,201 |
Data binding returning null | <p>I might be doing this all wrong, but I have the same exact implementation in another fragment/viewmodel with no problems. Maybe because it's a dialog? Every time I log message or message.messagebody it returns null. Can anyone maybe point out why? Currently learning mvvm.</p>
<p>xml: (the important bit since it's l... | 2 | 1,813 |
Spring Boot test configuration for multiple datasources | <p>So I am trying to introduce some unit tests for my Spring Boot application and I am having a hard time trying to setup the config for the test environment. My application is configured to connect to two different Postgres databases as follows:</p>
<p><strong>application.properties</strong></p>
<pre><code>spring.db1-... | 2 | 1,316 |
Mac OS LION 10.7 In-App Purchase | <p>I'm testing the in-app Purchase new feature available on Mac OS Lion,I'm stuck at the receipt validation part, My code always fail at this part as if i'm not connected to sandbox or the application receipt never send me the receipt as the <strong>"exit(173);"</strong> is supposed to work.</p>
<p>Those are My steps:... | 2 | 1,204 |
Java Spring exception: No property xxx found for type class xxx | <p>I wanted to add a new repository method, to retrieve a list of elements.</p>
<p>Main Problem is: </p>
<pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'insulinGTService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.facto... | 2 | 2,024 |
Scrolling a ListView CollectionViewSource to a group of items based on a search textbox's text in C# | <p>I am working on a Windows Phone 8.1 app in XAML and C#.</p>
<p>I have a listview, whose item source is set to a <code>CollectionViewSource</code> called <code>MusicSource</code>. On the backend in C#, I have an <code>ObservableCollection</code> called <code>source</code> and the following code populates it by getti... | 2 | 1,643 |
Vulkan demo does not compile on Nvidia Jetson TX2 | <p>I have downloaded the Vulkan SDK from LunarG here: </p>
<p><a href="https://github.com/LunarG/VulkanTools/" rel="nofollow noreferrer">https://github.com/LunarG/VulkanTools/</a></p>
<p>I have compiled it successfully using the instructions in BUILDvt.md and have a "vulkan" directory which has the vulkan.h and vulka... | 2 | 5,025 |
Running a Hello World program (basic) in Sencha touch | <p>I have 2 questions, regarding <code>Sencha touch</code> and <code>phone gap</code> ;</p>
<p>I am reading SenchaTouch CookBook by Ajith kumar. I am following the example programs given in the 1st chapter. So according to that i did the following.</p>
<p>THis is my <code>index.html</code> </p>
<pre><code><!DO... | 2 | 1,997 |
INSERT a comment to youtube by API PHP | <p>I am trying to insert a youtube video comment to a particular video but it keeps on redirecting and inserting my text many times to the video.please help me solve this problem and here's my code and I use <a href="https://github.com/google/google-api-php-client" rel="nofollow">google api library</a></p>
<pre><code>... | 2 | 1,155 |
Building a looping sequencer with AVAudioEngine | <p>I'm building a simple drum machine using the new AVAudioEngine capabilities in iOS 8, but am having trouble thinking through how I might build the looping mechanism.</p>
<p>It seems like the only way to do this is to have a rotating buffer of <code>AVAudioPlayerNodes</code> and have some sort of job that constantly... | 2 | 1,179 |
How is this causing an endless loop? | <p>Some legacy code I'm stuck maintaining is stuck in an infinite loop (and thus I myself seem to be in one); I can't figure out why/how, though.</p>
<p>Here's the app's entry point, where it instantiates the main form (frmCentral):</p>
<p><strong>CODE EXHIBIT A</strong></p>
<pre><code>public static int Main(string ... | 2 | 3,655 |
Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; | <p>My Spring boot app hosted in AKS Azure, while hitting the redis cache in Azure, getting <code>Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connec... | 2 | 1,169 |
GhostDriver with PhantomJS and Selenium (Python) - "Connection Refused" | <p><strong>The Goal:</strong></p>
<p>I am trying to perform some scraping in Python using a headless browser: Selenium with PhantomJs and GhostDriver.</p>
<p>I am using Python 2.7 on a Mac running Mavericks. I work within emacs (although it also didn't work from Terminal).
I have already overcome some errors such as ... | 2 | 1,134 |
Record audio, store in buffer and then write bytes to sound card via PulseAudio | <p>I am trying to record audio with following lines of code:</p>
<pre><code>// The sample type to use
static const pa_sample_spec ss = {
.format = PA_SAMPLE_S32LE , //PA_SAMPLE_S16BE, ??? Which one to us here ??? BE...Big Endian
.rate = 44100, // That are samples per second
.channels = 2
};
// Create the recording st... | 2 | 1,220 |
Safari 11 / YouTube API bug. Rapid play/pause and failure to autoplay | <p>This just started getting reported to me by users. I spent a bunch of time exploring my own code for bugs, but it seems like it's related specifically to <strong>Safari 11</strong> <em>(newest)</em>.</p>
<p>When using a simple example of the YouTube IFrame Embed API, Safari will rapidly switch between states of pla... | 2 | 2,043 |
file_get_contents php and json_decode error | <p>I am facing a weird problem with <strong>file_get_contents</strong> and decoding to json the result. I have to tell you that this code was fully functional in other server.</p>
<p>I am trying to decode this json:
<a href="http://mediarupt.com/GET/categorized_services_for_supplier.php?suppliersID=10" rel="nofollow"... | 2 | 1,213 |
div above navbar-fixed-top in bootstrap | <p>I am trying to put a div above navbar-fixed-top in bootstrap, but for some reason the div with its content does not show. I dont know what else to write here, it is asking for detail all is in a code</p>
<p>here is the code</p>
<pre><code> <div class="nav-top">
<div class="container">
<div class="... | 2 | 1,400 |
Laravel 3 Eloquent ORM for 3 level relation & filter | <p>I had 3 models:</p>
<p><strong>model A</strong>:</p>
<pre><code>class A extends \Eloquent {
...
public function Bs() {
return $this->belongsTo('B','B_id','id');
}
public function Xs() {
return $this->belongsTo('X','X_id','id');
}
public function Ys() {
return $... | 2 | 1,138 |
Android: ProgressDialog.show() WindowManager token, not valid | <pre><code>public class MainActivity extends Activity {
private static String State = "STOP";
final String address = "http://XXXX.co.uk:9994";
private ImageView Player;
private ProgressDialog progress;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(saved... | 2 | 2,335 |
Testing included views with Espresso | <p>I'm trying to reach a TextView and an ImageView within an included view with Espresso, but I always get the following error:</p>
<pre><code>No views in hierarchy found matching: with id: ???:id/llMenuBtnSearch
If the target view is not part of the view hierarchy, you may need to use Espresso.onData to load it from ... | 2 | 1,642 |
How to make dropdown list in Yii2 with ArrayHelper | <p>I want to make dropdownlist <strong>from single record</strong>, I have two table like this:</p>
<p><a href="https://i.stack.imgur.com/PTSTL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PTSTL.png" alt="the tables"></a></p>
<p>Column <code>prodi_pilihan_1_id</code> and <code>prodi_pilihan_2_id... | 2 | 1,435 |
Why is the output different for code ported from MATLAB to Python? | <p><strong>EDIT:</strong> <em>After some more testing and a response form the scipy mailing list, the issue appears to be with fspecial(). To get the same output I need to generate the same kind of kernel in Python as the Matlab fspecial command is producing. For now I will try to export the kernel from matlab and w... | 2 | 1,278 |
How to Simulate a Tab Key Press with Code in UWP | <p>I am trying to use buttons on the screen to perform the function of Tab and reverse Tab. I want the app to tab through the Segment buttons with these other buttons and then the user be able to select one with the Enter key. Trying to make the program fully navigable by keyboard.</p>
<p><img src="https://i.imgur.com... | 2 | 1,095 |
create-react-app integrate with storybook 6.1.6 and build has error | <p>create-react-app version</p>
<pre><code>react: v17.0.1
react-scripts: v4.0.1
</code></pre>
<p>storybook version</p>
<pre><code>@storybook/react: v6.1.6
@storybook/addon-docs: v6.1.6
@storybook/core: v6.1.6
</code></pre>
<p>and i could run <code>yarn start</code> to run react app and could run <code>start-storybook ... | 2 | 1,551 |
ListView chat message for Firebase | <p>I have created an app which involves chatting with other people, and to make the chat activity more pleasing to the eye I created a <code>ListView</code> to change the UI of each message. When I send a message the first message appears and displays correctly but if I send another message it overrides the previous me... | 2 | 1,272 |
how to add 3 legend for a single series barchart?? JAVAFX | <p>Here is my code to generate 10 bars of different colors. I want to add legend respectively but it only shows yellow legend i can change its color but i want 3 legend. </p>
<p>I think it shows only 1 color because there is only 1 series. Is it possible to add more than 1 legend for a single series?</p>
<p>output:<i... | 2 | 1,060 |
gatling-3.0.0: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate | <p>i am using Gatling 3.0.0 as a plugin in SBT i am configuring the browser as given in the <a href="https://gatling.io/docs/current/http/recorder/#recorder" rel="noreferrer">https://gatling.io/docs/current/http/recorder/#recorder</a> under configuration heading after then when i start the recorder using <code>gatling:... | 2 | 2,028 |
EXC_BAD_ACCESS on array allocation (CIDetector featuresInImage) | <p>I am following a facial recognition app example from Pro iOS 5 Augmented Reality book. I even downloaded the source code... I ran it from there and the problem persists with his code. Here is the problem: It crashes on the assignment of an array that takes the featuresInImage of a CGImage for a CIDetector that is de... | 2 | 1,342 |
Query nodes of an xml document - Visual Basic | <p>I have an XML document that Im trying to read but my query keeps returning no result.
the query im using is...</p>
<pre><code>Dim products = From product In doc.Descendants("DeviceInstance") _
Select product.Attribute("ProductRefId").Value
For Each result In products
MessageBox.Show(result.ToString())
Nex... | 2 | 1,225 |
Deserialize Json to java object | <p>I am using Lombok to create builder pattern for my java object and I want to convert json into this object but it keeps saying cannot deserialize object.</p>
<pre><code>@Builder
@Getter
@Setter
@Value
@NoArgConstructor
@JsonDeserialize()
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown... | 2 | 3,476 |
Group By same or similar string sql | <p><strong>1)</strong> Suppose i have a table like this:-</p>
<pre><code>| id | color_code | fruit |
|:------|--------------|----------------:|
| 1 | 000001 | apple |
| 2 | 000001 | apple |
| 3 | 000001 | apple |
| 4 | 00000... | 2 | 1,777 |
R - Subseting data by searching a list with wildcards across multiple columns | <p>I am a relatively new R user who is doing analysis of administrative health data.</p>
<p>This community has been a great help at advancing my own understanding of R and its' functions - however after spending an entire day stuck with this issue, and without being able to find a solution (thus far), I have decided t... | 2 | 1,251 |
I am trying to learn Flask, but UserMixin seems not to work | <p>So to be more exact. I am currently learning Flask from <a href="https://www.youtube.com/watch?v=MwZwr5Tvyxo&list=PL-osiE80TeTs4UjLw5MM6OjgkjFeUxCYH" rel="nofollow noreferrer"><strong>Corey Schafers</strong></a> tutorial series and I am in the phase of Login Authentication, everything seemed to be fine, but then... | 2 | 1,992 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.