title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How can I create a table using Mybatis and SQLite? | <p>I am trying to create a new database and new table using Mybatis and SQLite. I found from previous answers (<a href="https://stackoverflow.com/questions/46355690/is-it-possible-to-use-mybatis-to-issue-ddl">1</a>, <a href="https://stackoverflow.com/questions/18786560/does-mybatis-support-ddl/18849402#18849402">2</a>,... | 3 | 1,089 |
Uploading File from HDFS to S3 using FileUtil.copy in Spark causing DiskErrorException: Directory is not writable error? | <p>I am trying to write a parquet file to HDFS and then copying it to s3.</p>
<p>I wrote the code in Zeppelin and it worked well.
Without any issue it added the file to the s3 file path.</p>
<pre><code> var outputFolder = "buckent_name/path"
println("\n ---- TASK 1 ----- \n writing with path " + ... | 3 | 3,668 |
Amazon S3 gzipped files getting incorrect metadata and causing error | <p>My static files are being served from Amazon S3. I am using circleci for my CI/CD to deploy my files. The files are getting added to the s3 bucket as expected, but when I go to the static website link I see a blank page with the console error "Uncaught SyntaxError: Unexpected token ILLEGAL".</p>
<p>Through some sle... | 3 | 1,112 |
Turn Base battle game python | <p>I created a turn based battle game in python and it just won't work, I have tried multiple ways, and yet it is still the same.
The situation is this: both players (player1 = me, player 2 = pc) will choose 3 units to attack each other, if one of us killed all of the units, the player wins.</p>
<p>My main issue is whe... | 3 | 3,822 |
How to combine duplicates in associative array? | <p>What is the most concise and efficient way to find out if a JavaScript array contains duplicates and merge them into new array please ?</p>
<p>I tried Lodash / d3 / underscoreJs but none of them generate clean result so I tried this code -></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console=... | 3 | 4,740 |
Java ConcurrentModificationException error | <p>I'm trying to write a minimax algorithm for connect 4 in Java, but am getting an error while trying to iterate through a list of possible moves. </p>
<p>It says that </p>
<blockquote>
<p>Exception in thread "main" java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unk... | 3 | 1,310 |
Is double/nested variadic template expansion allowed in modern C++? | <p>I've been trying to use C++ metaprogramming to build constructs such as</p>
<pre><code>f(g<0>(args...), g<1>(args...), ... g<n-1>(args...))
</code></pre>
<p>given callables <code>f</code> and <code>g</code>, integer n and variadic arguments args...</p>
<p>However I turn the problem, at some poin... | 3 | 1,118 |
SQL server Pivot on Multiple Columns- Another dimension | <p>I am trying to use a pivot on multiple columns. Currently, I am able to achieve this with just one column. My current method returns:</p>
<pre><code>Membership Item1
DO1 400
Neither 21
Plan A 69
Plan B 53
</code></pre>
<p>But here is what I am trying to achieve:</p>
<pre><code>Member... | 3 | 2,352 |
CellForRowAt not called when adding TableView Programmatically | <p>I'm creating a UI (programmatically) that will show two main parts <br/></p>
<ul>
<li><p>The first part will show a video Player</p>
</li>
<li><p>The second part will show a UITableView with more videos</p>
</li>
</ul>
<p>I have successfully worked on the first part, it's working and it's occupying a small portion o... | 3 | 3,616 |
Is there a way to make mtom + validation work in spring ws? | <p>I've been looking for a while and couldn't find any solution to this problem, is there a way to make mtom + validation work in spring ws?</p>
<pre><code>public class WebServiceConfiguration extends WsConfigurerAdapter {
@Override
public void addInterceptors(final List<EndpointInterceptor> interceptors... | 3 | 1,327 |
Writing program in C++ using Microsoft VS, but I get a debug assertion message here. It runs on cpp.sh and repl.it fine, but not on VS. What can I do? | <p>This function is meant to remove all special characters, numbers, and whitespace from the char array.</p>
<pre><code>// Michael E. Torres II
// Vigenere Cipher
// February 4, 2018
// C++ code to implement Vigenere Cipher
#include <iostream>
#include <string>
#include <iomanip>
#include <fstrea... | 3 | 1,730 |
XML Unit - Using custom element selectors on different xml elements | <p>I'm having a problem comparing various elements in my xml document with XMLUnit (2.2.1). In my document there are several xml elements and I want to
know, whether they differ from each other. However, I don't want to compare all xml elements the same way. Sometimes I just want to compare them by their name.In other... | 3 | 1,454 |
Redmine (1.4.7) error in executing server in development mode | <p>While running redmine 1.4.7 in development mode using the command <code>rails s</code>, I have got error like below</p>
<pre><code> /usr/local/lib/ruby/gems/2.0.0/gems/rails-2.3.15/lib/rails_generator/options.rb:32:in
`default_options': undefined method `write_inheritable_attribute' for
Rails::Generator::Base:C... | 3 | 1,159 |
Android Studio errors after adding external library | <p>I've got the following problem:</p>
<p>I'm programming an app which is using Google Maps and I wanted to add this external lib</p>
<p><a href="https://github.com/route360/r360-java" rel="nofollow">https://github.com/route360/r360-java</a></p>
<p>I wanted to add the lib as .jar file into Android Studio, so I compi... | 3 | 1,482 |
Capture a still image on iOS7 through a console app | <p>I am attempting to capture a still image on my Jailbroken iPhone through a console.</p>
<p>Disclaimer: I am a objective-c newbie - most of this code is from: <a href="https://stackoverflow.com/questions/12445403/avcapturestillimageoutput-never-calls-completition-handler">AVCaptureStillImageOutput never calls comple... | 3 | 2,317 |
Maximum number of fields support to be included in _source.includes in Elastic search for _search api? | <p>While querying an index with more than 1500 fields included inside _source.includes, I'm getting following error from ES.</p>
<p><strong>Error Log:</strong></p>
<pre><code>{
"took": 154,
"timed_out": false,
"_shards": {
"total": 28,
"successful": 15,
... | 3 | 1,437 |
How to get a value in a database and display on django form | <p>I have a <strong>DuesLevy</strong> model with a field called <strong>user</strong> which happen to be a foreign key to my <strong>User</strong> model. I want to display email value from the User model to my form <strong>AddMemberDuesForm()</strong></p>
<p>The reason is this I want to get the email and amount value a... | 3 | 2,245 |
Mark plot at specific x-axis point using seaborn | <p>I have been trying to fix this for hours now and I am really frustrated. The only thing I want to do is highlight my plot at the timepoints 2,6 and 10 (as shown in the image)<a href="https://i.stack.imgur.com/gZVTE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gZVTE.jpg" alt="light blue is where... | 3 | 11,065 |
Sidebar not scrolling full content | <p>I have a layout in which i have header, sidebar and main section.</p>
<p>I have a fixed sidebar. Inside that have 35 section. Scroll bar is not covering all content. My scroll bar is visible till 32 section.</p>
<p>I have tried a lot but unable to do. i think problem is with <code>.sidenav</code> property <code>to... | 3 | 4,270 |
how to get value from selected (checkbox) listview and uplaod to server jquery mobile | <p><a href="https://i.stack.imgur.com/Hd1g1.png" rel="nofollow noreferrer">enter image description here</a></p>
<p>I just want to upload particular selected value (checked) in listview on server.
There are any values in list with checkbox so I want to select few of them and wants to upload to server.
//below code usin... | 3 | 1,065 |
I want to download the contents of table after giving search criteria into a file in html format using selenium webdriver with python | <p>I want to download the contents of table after giving search criteria into a file in html format using selenium webdriver with python.</p>
<p><a href="https://www.tis.bizfile.gov.sg//ngbtisinternet/faces/oracle/webcenter/portalapp/pages/productlisting/ishopProductListing.jspx?EntityNo=201228154Z&producttype=ALL... | 3 | 1,491 |
java.lang.NullPointerException with a custom class in Processing | <p>Alright, I am a newbie at programming so I don't have the basics very clear (also my english is pretty bad). When I started this code, I wanted it to draw some points, keep them moving and if they were closer than X between them, then draw a line. But I wanted to make it a little bit more complicated and then add an... | 3 | 3,897 |
Why can't I aggregate data.frame with FUN = shapiro.test | <p>Here's the data.frame in question :</p>
<pre><code>sample <- dput(df)
structure(c(6, 5, 5, 4, 4, 7, 5, 4, 6, 6, 5, 6, 8, 6, 3, 5, 8,
4, 7, 6, 4, 4, 2, 5, 4, 7, 2, 5, 5, 4, 6, 4, 5, 8, 6, 4, 7, 7,
4, 4, 5, 8, 4, 6, 9, 3, 7, 6, 8, 6, 6, 3, 3, 6, 7, 7, 6, 6, 7,
7, 6, 7, 8, 3, 5, 5, 4, 6, 4, 7, 3, 4, 6, 3, 5, 5, ... | 3 | 1,234 |
Layout CSS Panel | <p>I have a HTML page that needs to take up the full height and width of the screen. In short, I'm trying to make it look like the following:</p>
<pre><code>--------------------------------------------------------+
| | |
| HELLO! | MAIN CONTENT WILL GO HERE ... | 3 | 1,717 |
send object/var from php server to app android | <p>i have some trouble here with my server and app.. so i want to pass object/var from server with php..and i having trouble how to retrieve it.. in this case i want to pass id,username to my app..</p>
<p>this is my code <strong>user.java</strong></p>
<pre><code>public class User {
private String username="";
... | 3 | 1,514 |
I need to extract data from a webpage which is within a script tag using python | <p>The String I have contains</p>
<pre><code><script type="text/javascript">!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enu... | 3 | 2,031 |
how to submit a <form action=" " > using sweet alert. because it must be use "action". I usually using href | <p>I get trouble when using sweet alert on my submit a form, I usually use a href but it must use form action <br>
I don't know :(</p>
<pre><code><form class="form-horizontal text-right m-b-1" action="<?php echo base_url('pegawai/editfoto') ?>" method="POST">
<div class="col-9 "... | 3 | 1,757 |
Delete a child record from a specific parent record | <p>I am pretty new to mongodb. I have 3 levels of documents. </p>
<p>Parent > Child > Child, all having _id field.</p>
<pre><code>{
"_id" : "n2qw5sojs4bajrj",
"Title" : "Mr",
"Instance" : "HQ",
"FirstName" : "ppp",
"LastName" : "uuuu",
"Position" : "BF",
"EmailAddress" : "xxx@ppp.com",
... | 3 | 1,623 |
ggmap with coordinates with curved arrows between cities in R | <p>I would like to make a map of the Netherlands with curved lines between cities. I have two dataframes number one called: <code>df_verticles</code> which contains 24 cities with their lat/lon combination. The second dataframe called: <code>df</code> i want to use to draw a curved line between lat/lon from combination... | 3 | 1,209 |
PostgreSQL SELECT null values from two tables | <p>I have problem to solve.</p>
<p>I have two tables, institutions and documents, they joins throught documents owner_id and institution id:</p>
<p>institution</p>
<pre><code> id | name
----+-----
1 | a
2 | b
3 | c
4 | d
</code></pre>
<p>and </p>
<p>documents</p>
<pre><code> id | owner | value
----+--... | 3 | 1,078 |
CSS How to make element in the middle to shrink before its sibling jumps down | <p>I have 3 <code><divs></code> in a parent <code><div></code> they all are <code>inline-block</code></p>
<p><a href="https://i.stack.imgur.com/vUdyS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vUdyS.png" alt="enter image description here"></a></p>
<p><a href="http://jsfiddle.net/5b... | 3 | 4,989 |
Creating table with Many-to-One relationship gives error in Spring Boot | <p>I am trying to create a Many-to-One One-to-Many relationship in Spring Boot using JPA and Hibernate. Unfortunatly I keep getting an exception when starting the application.</p>
<p>This is what my Loan entity looks like:</p>
<pre><code>@Entity
public class Loan {
@Id
@GeneratedValue(strategy = GenerationType... | 3 | 7,309 |
Material UI DataGrid: Button to Delete Individual Row | <p>I am making a React component using MaterialUI, that uses a Datagrid to store a queue of files. It looks like this:
<a href="https://i.stack.imgur.com/oh0GH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oh0GH.png" alt="enter image description here" /></a></p>
<p>So one feature I am trying to wor... | 3 | 1,642 |
Redux Thunk, Modifying state: Unhandled promise rejection: Error: [Immer] Immer only supports setting array indices and the 'length' property] | <p>While working on a React Native application with a persistent Redux store (in TypeScript) I ran into the following problem:</p>
<p>I built a Thunk that queries an API, this API sends back a set of question data in a fetch. This fetch works fine, but when trying to save any data to the Redux Store using <code>extraRe... | 3 | 1,713 |
Passing values between activity | <p>I should show 2 <code>TextView</code> in <code>MainActivity</code> "stringadaA" and "numerodaB" , namely the string and the number put in the 2 activities A and B.These values must not be lost in the transition between the activities but must change only when they are changed by the user. I managed to do it but when... | 3 | 4,170 |
QtRemoteObjects autogenerated replica header complaining about undefined vtable | <p>Started using QtRO and generated files inherently complain about vtable:</p>
<pre><code>#ifndef REP_REMOTEEXAMPLE_H
#define REP_REMOTEEXAMPLE_H
// This is an autogenerated file.
// Do not edit this file, any changes made will be lost the next time it is generated.
#include <QtCore/qobject.h>
#include <Qt... | 3 | 1,117 |
combobox selectionchanged event doesn't update datagrid in Silverlight mvvm | <p>I am creating one project in silverlight 5 with mvvm.
I have one combobox and one datagrid in one page. here wat's the problem means,"If i select any value in combobox it doesn't update the selected row to the datagrid.
I bind three fields Fname, Sname, Dept in datagrid. and i bind all the dept value to<br>
combo... | 3 | 2,367 |
App not working upgrading sencha touch from 2.0 to 2.1.1 | <pre><code>Ext.define('Test.view.Main', {
extend: 'Ext.Container',
xtype: 'mainview',
config: {
scrollable:'vertical',
fullscreen: true,
items: [{
xtype:'toolbar',
title:'Timesheets',
docked:'top',
cls:'toolbarcls',
items:... | 3 | 1,063 |
regex to extract data from xml nodes in php | <p>Here is the XML</p>
<pre class="lang-js prettyprint-override"><code><us:ItemMaster>
<us:ItemMasterHeader>
<oa:ItemID agencyRole="Product_Number">
<oa:ID>9227950</oa:ID>
</oa:ItemID>
<oa:ItemID agencyRole="Prefix_Number">
&l... | 3 | 1,371 |
Cannot import compiler/typescript.ts | <p>The one line program helloworld </p>
<pre><code>///<reference path='/Users/tadams/git/typescript/src/compiler/typescript.ts'/>
</code></pre>
<p>breaks typescript-0.9.0</p>
<p>the error is
bash-3.2$ tsc helloworld.ts </p>
<pre><code>/Users/tadams/git/typescript/bin/tsc.js:42270
comparisonIn... | 3 | 1,450 |
Unable to Plot Serial Data on Y2 Axis Zedgraph | <p>I am making a GUI that reads in serial data, and I want to have the option to choose to plot the data on either the left or right Y axis. I can plot the data on the left y axis, but I am unable to plot it on the Left axis. What is wrong with my code?</p>
<p>Here is the relevant Code:</p>
<pre><code>GraphPane myP... | 3 | 1,529 |
jQuery running the function combobox populate for multiple combobox | <p>I have combobox</p>
<pre><code> <select name="search_category[]" id="search_category_id">
<option value="" selected="selected"></option>
<?php
$query = "SELECT * FROM t_category ORDER BY category_name ASC";
$results = mysql_query($query);
while ($rows = mysql_fetch_assoc(@... | 3 | 1,105 |
JavaFX - Why does changing the header text of a dialog make the button bar invisible? | <p>Here is a small sample from my custom dialog, which is meant to display the progress of a running <code>javafx.concurrent.Task</code>.</p>
<pre class="lang-java prettyprint-override"><code>DialogPane pane = this.getDialogPane()
pane.getButtonTypes().addAll(ButtonType.CANCEL);
pane.headerTextProperty().bind(task.tit... | 3 | 1,101 |
How to add the values in a dictionary with a condition? | <p>Here I have a dictionary of multiples stocks, where I have a token number as the main key.</p>
<pre class="lang-py prettyprint-override"><code>
{14350850: {'name': 'ACC19DEC1360CE', 'Strike': 1360, 'LTP': 87.85},
14351106: {'name': 'ACC19DEC1360PE', 'Strike': 1360, 'LTP': 1.2},
14351362: {'name': 'ACC1... | 3 | 1,555 |
sinon stub does not recognise a call to a stub | <p>This is the code to test:</p>
<pre><code> const AWS = require('aws-sdk');
const { APPLICATIONS, NOTIFICATION_FREQUENCIES } = require('./config');
exports.createHandler = ({ notificationService }) => async (event, context) => {
try{
Object.values(APPLICATIONS).forEach(async appId => {
cons... | 3 | 1,078 |
updating datagridview with background worker c#, parsing "RunWorkerCompleted" to each row | <p>I am currently new to using background worker and have implemented a simple update script for my process. The background worker starts my process -- python script, webdriver that launches google then "driver.quits()" (where the process is considered complete).</p>
<p>The background worker is connected to a... | 3 | 1,349 |
using "row" and "column" under Angular (Flexbox) creates a lot of vertical space between HTML input fields | <p>I am trying to have 2 input fields on the <strong>same line</strong>. To do this, I have been using Flexbox. I have noticed that when using <code>row</code> and <code>column</code> with Flex creates additional spacing as seen in the picture below:</p>
<p><a href="https://i.stack.imgur.com/fmEeJ.png" rel="nofollow n... | 3 | 2,197 |
Searching for duplicate records within a text file where the duplicate is determined by only two fields | <p>First, Python Newbie; be patient/kind.</p>
<p>Next, once a month I receive a large text file (think 7 Million records) to test for duplicate values. This is catalog information. I get 7 fields, but the two I'm interested in are a supplier code and a full orderable part number. To determine if the record is dupli... | 3 | 1,089 |
PHP - how to search a single column specified in a drop down menu | <p>I have a SQL database which is implemented onto a HTML webpage. I want the user to be able to type in a value into a searchbox and search a column of the table specified in a drop down menu.</p>
<p>For example: there are 3 columns on the table - 'first name', 'second name' and 'surname'. The user can choose one of ... | 3 | 3,934 |
Retrieving Mail via Microsoft Graph is slower than EWS | <p>We want to retrieve emails from our Office365 Inbox from a C# Application.
We used to use EWS but want to change to Graph. However, if we retrieve an email via Graph it takes twice the time as with EWS (~400ms vs ~200ms).</p>
<p>Here is the EWS code:</p>
<pre><code>ExchangeService service = <...>;
PropertySet ... | 3 | 1,265 |
Python/Selenium- Class element cannot be clicked | <p>I am trying to scrape data from this page: <a href="https://www.oddsportal.com/soccer/chile/primera-division/curico-unido-o-higgins-CtsLggl6/#over-under;2" rel="nofollow noreferrer">https://www.oddsportal.com/soccer/chile/primera-division/curico-unido-o-higgins-CtsLggl6/#over-under;2</a></p>
<p>Here I am trying to e... | 3 | 1,598 |
Remove mean image from tf.data.Dataset of complex-valued images | <p>I have a tf.data.Dataset called train_dataset such that -</p>
<pre><code>a, b = next(iter(train_dataset))
print(a.shape, b.shape)
output - (100, 128, 128, 2) (100, 128, 128, 1)
</code></pre>
<p>That is, my batch size is 100, input images are 128*128 sized complex-valued images such that first channel represents the... | 3 | 1,157 |
Removing rows in R where the contiguous values of rows in one column are further than 1 numeric value apart, whilst accounting for participant ID? | <p>I am trying to clean up a timeseries with multiple data points. The data is arranged by day and by 'beep'. I want to only keep items that are 1 beep away from each other on the same day.</p>
<p>In order to do this I have created a dummy variable by multiplying day number by 10 and adding the beep number to it.</p>
<... | 3 | 1,293 |
Recyclerview Not showing firstTime item | <p>I have Recycler view in app I use recycler view in navigation drawer means fragment
when reyclerview is empty and when I add item in recycler view that not show but after I refresh fragment and after I add item then is showing immediately but not show first time why. I am stuck.</p>
<p>here is my code-:</p>
<pre><... | 3 | 4,131 |
Unit Test: Replicating Heavy Server Load With Local Server | <p>I'm trying to test my site under heavy load. I have found that the incorrect title appears on some occassions which indicates to me that i have a possible threading issue. To help solve this i've setup the following test:</p>
<pre><code>[TestMethod]
public void Test1() {
var isValid = true;
for (var i = 0;... | 3 | 1,074 |
Sending intent to MainActivity through (From) AsyncTask | <p>I looked for a couple of questions asked on Stack Overflow for sending a <strong>int</strong> to my MainActivity and displaying it on my <strong>TextView</strong>. But trying to initialize activity or context don't work..
The latest error I get is this: </p>
<blockquote>
<p>FATAL EXCEPTION: AsyncTask #1
... | 3 | 5,238 |
Passing data from HTTP request to a Sub-component VueJS | <p>i'm running into a bit of an issue with my VueJS <strong>(Vue 2)</strong> application.</p>
<p>I i have a login component, which has a Sub-component called 'error' which is just a bootstrap alert showing a message which should come from the backend (via an HTTP request) the problem is i don't quite know how i can po... | 3 | 1,074 |
Same source, different env. Why can't read same js? | <p>I'm making Rails app.
Despite of same program source, it seems like different js reading between local pc and staging.</p>
<p>Here's the result.</p>
<p><a href="https://i.stack.imgur.com/LkTOE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LkTOE.png" alt="Staging"></a></p>
<p><a href="https://... | 3 | 1,125 |
Content Control in PHP | <p>I am trying to find an api or php technique that can read a docx document, remove some MS Content Control Values, and then recreate the same docx document while preserving all MSWord content and styling elements.</p>
<p>You might be wondering how this could be useful. For example, you could set a question in MSWor... | 3 | 1,334 |
Add constructor logic here | <p>I am trying to finish this piece of code so my smtp web.config code will send an email. I never made this code so I am unsure of what has to go at the top. I'm very new to coding and have never done web development before getting the job I have now. Right after <code>public EmailHelper()</code> in comments it says <... | 3 | 5,400 |
Getting error while mixing dependencies versions | <p>I am getting an error as seen below image <a href="https://i.stack.imgur.com/Y5Y4C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y5Y4C.png" alt="Error Conflict Image "></a>.</p>
<p>I have tried many links and checked out stuffs on stackoverflow and managed to resolved most part but not in entir... | 3 | 1,882 |
java script load issue with ng build --prod | <p>my javascript file for multiple email(multiple_emails.js plugin) is working fine with <code>ng serve</code> my code :</p>
<pre><code>(function( $ ){
$.fn.multiple_emails = function(options) {
// Default options
var defaults = {
checkDupEmail: true,
theme: "Bootstrap",... | 3 | 6,104 |
Float object has no attribute | <p>How can I fix the error in my code. Whenever I try to run it, the 'float' object has no attribute '<strong>getitem</strong>' keeps on appearing. I am trying to put all the computed values in a table-like format but the error keeps on appearing.
Here is the code. It's a bit longer than I imagine. The error is at the... | 3 | 1,379 |
How to access and confirm the transfer of my SelectedListItem TEXT from my dropdownlist from one view to another? | <p>I start the INDEX page by filling up the <code>IEnumerable</code> list for a <code>DropDownListFor()</code>. Then I send the model to the INDEX View.
The photo in the bottom shows what the INDEX looks like with the two textboxs and the dropdownlist.</p>
<p>Once the submit button is pressed I want the information to... | 3 | 2,377 |
How can i make a random sound array with objective c? | <p>So i've done the tutorial where you code a button so that when you press it a sound plays. I'm trying to modify it so that when the button is pressed, a random sound plays.</p>
<p>here is the code:</p>
<p>viewcontroller.h</p>
<pre><code>#import <UIKit/UIKit.h>
#import <AudioToolbox/AudioToolbox.h>
@i... | 3 | 1,044 |
LCD doesn't work in a simulated enviroment | <p>I'm using Tinkercad, and since it's my first time programming an LCD I just copied the procedure to connect the pins and make it work.</p>
<p>The thing is that it just lights up without displaying anything, I tried both wiring and unwiring the R/W pin but that doesn't work either, nothing will be displayed.</p>
<p>W... | 3 | 1,049 |
HwndHost leaks memory | <p>we have an external video player to which i need to give a reference to a HwndHost, and then the external video player renders into it.</p>
<p>all works fine, but i cant find out why memory is leaked, as new HwndHosts are created.</p>
<p>here is my HwndHost implementation:</p>
<pre><code>namespace WpfApp2
{
usin... | 3 | 3,520 |
Connect application to postgresql cluster using tls | <p>I have sucecssfully installed a crunchy data postgres cluster with tls certificates from cert-manager on kubernetes by following this tutorial.
<a href="https://blog.crunchydata.com/blog/using-cert-manager-to-deploy-tls-for-postgres-on-kubernetes" rel="nofollow noreferrer">https://blog.crunchydata.com/blog/using-cer... | 3 | 2,623 |
Custom keras model with custom loss function gives error | <p>I'm building a custom three layered neural network with a custom loss and activation function. However it gives me the following error:</p>
<pre><code>File "C:\Users\untitled1.py", line 196, in <module>
cModel.fit(X_train, y_train, batch_size=64, epochs=2)
File "C:\Users\\Anaconda3\lib\si... | 3 | 2,461 |
Javascript (Electron) 'TypeError: Cannot set property 'checked' of undefined' | <p>I am creating a tray application with Electron but I can't figure out why this wouldn't work. I am very new to JavaScript. I looked through answers on here but most of them don't work/are confusing to me.</p>
<p>Basically, what I want the application to do is load settings from <code>electron-store</code> into the a... | 3 | 1,762 |
How to replace the current sprites with an image | <p>I am confused as to how I would replace the sprite with an image I have uploaded. Is there a way to simply replace it with another image (In this case racecar.png)? Can someone also help me be able to move the sprite continuously when I hold the key down instead of just moving once and stopping. Any help would be gr... | 3 | 3,317 |
Is there a way in word VBA to find an embedded picture (inlineShape) extension (jpeg, png, emf...)? | <p>I am trying to determine in a docx document the extension of the embedded images.
This open xml document may have been generated by another user, with Microsoft Word or OpenOffice.
Images have been embedded through the ribbon, or drag and drop, and they can be inlineShape (mose of the time), or Shape.
I need to acce... | 3 | 1,501 |
XSLT 1.0 multiple call of a template | <p>I need to replace strings in an XML file. I'm trying to use XSLT to do it. I want to use call-template for each string I need to replace. </p>
<p>When I make multiple call to the template, only the last call works fine. </p>
<p>The XML file I need to change : I want to replace the strings </p>
<pre><code>&#14... | 3 | 1,447 |
Can I find and replace multiple field codes with plain text, while retaining the value that the field refers to? | <p>By 'the value which the field refers to', I am referring to the text which is between the { }.</p>
<p><strong>What I have</strong></p>
<p>Currently, I have many hyperlinks in pages of text like this:</p>
<p><a href="http://www.google.com" rel="nofollow noreferrer">Testing 123</a> and test <a href="http://www.yaho... | 3 | 1,600 |
Connecting element to part of state in react | <p>I'm currently learning some react and some of you might think I go about this the wrong way but I want to try and build something in pure react, no redux, no plugins (well react-dom doesn't count as a plugin)</p>
<p>however I've sort of hit a snag, I want to connect a element to a part of the state so that I on mou... | 3 | 1,432 |
Move moon orbit from sun to planet | <p>yesterday @prisoner849 help me very well with the plante Orbit: Create a planet orbit</p>
<p>But now i have the problem to modify the script to create the orbit for the moons around the planets. I test to modify the start Point, but allways the Obrits are created at 0,0,0 around the sun not around the planet.</p>
... | 3 | 3,084 |
JS console error- object not defined | <p>I have the following JS function, which I'm using to detect whether a 'draggable' image on my HTML5 canvas is dragged on top of a static 'description box' image, also displayed on the canvas:</p>
<pre><code>function isHit(mouseX, mouseY){
if(draggingImage == true){
console.log("if dragging image == true statmen... | 3 | 1,952 |
R data frame column to list (matrix row names) | <p>I need to update my matrix row names according to the values coming from a data frame column. I know that I can update my matrix row names like that:</p>
<pre><code>dimnames(A) = list(
+ c("row1", "row2"), # row names
+ c("col1", "col2", "col3")) # column names
</code></pre>
<p>However, the name... | 3 | 4,717 |
take out name of dynamically created cards react | <p>I had created some cards from an array of objects, now I want to show popup data for each card differently.
here is my code of printing</p>
<pre><code>{data.carData.map( single=>(<li>{ <div onClick={handleClick}><Card single={single}/></div>} </li>))}
</code></pre>
<p>for this, I wa... | 3 | 1,071 |
How to add another axis in a parallel coordinate plot in d3 | <p>In <a href="https://jsfiddle.net/cswj20du/2/" rel="nofollow noreferrer">this</a> parallel coordinate plot you can see another axis at the end called "species" but it is not attached to the other axis. I wanted to make it work just like in the other axis but this is not working because it has non numeric data therefo... | 3 | 1,617 |
SQL HTML Email Column Format instead of row format | <p>I'm trying to figure out how to flip this from a table format to a column format. </p>
<p>Hi, I know how to create a SQL HTML Email via table format: i.e</p>
<pre><code>Customer Address City
Joe 123 Here Oakland
</code></pre>
<p>but i need to be able to flip this to look like</p>
<pre... | 3 | 2,244 |
I'm having sudden unauthorized/internal server errors | <p>I'm creating this webpage in Angular with .NET as my backend. Everything was working just fine, but today (all of a sudden) I'm getting Unauthorized errors (401). When I remove my authorization, I'm getting internal server errors (meaning my 'User.Identity.Name') does not work. So I'm guessing there is a problem wit... | 3 | 1,164 |
Java multithreading task | <p><strong>I've got task like this</strong></p>
<p>Build class StringTask, simulating long-term calculations, here consisting of the concatenation of strings.</p>
<p>The class constructor receives as argument the string to duplicate, and the number indicating how many times the string is to be amplified.</p>
<p>Clas... | 3 | 1,878 |
Rollback not working in jdbc spring programatic transaction | <p>Im unable to get a rollback working in my spring (3.0.5) jdbc application, running on Oracle 11.2</p>
<p>When I throw <code>NoClassesException</code> in the Controller below the row inserted by updatedB() remains in the dB.
I think this is because autoCommit is on (by default) in my dataSource so the commit has alr... | 3 | 2,427 |
Ruby rails 3 Nested Form fails to save because before_save method accesses a parent model whose object is nil | <p>I have a nested form/model in my rails app that would work ok except a before_save method does not have access to the parent @user object when working with the nested form.. It works fine though when saving the sub model itself though..</p>
<p>So here is the simplified code</p>
<pre><code>class Forum < ActiveRe... | 3 | 1,080 |
How to make a pyarrow.DictionaryArray with ExtensionType? Using from_buffers? Using cast? | <p>Ultimately, my goal is to make a <a href="https://arrow.apache.org/docs/python/generated/pyarrow.DictionaryArray.html" rel="nofollow noreferrer">pyarrow.DictionaryArray</a> with an <a href="https://arrow.apache.org/docs/python/generated/pyarrow.ExtensionType.html" rel="nofollow noreferrer">ExtensionType</a>.</p>
<p>... | 3 | 2,332 |
Spring Boot REST API will not start when importing a dependency from a different application module | <p>I am building a REST API with Spring Boot as our other API uses Drop-wizard and does not use Spring. I need to use some code, specifically JMS code to send messages to various different parts of an application, hence the build of a new API so we can import dependencies from different modules. I have the API working ... | 3 | 3,363 |
WPF Send combox's selected value to another window's identical combobox | <p>I have a window at startup where you select an Interface and Port from 2 comboboxs. When you click Done, it takes you to the main window, where you can see 2 more comboxes that are identical. These have the selected values as what you just picked in the popup window. Can I do this in the code behind? </p>
<p>Here's... | 3 | 1,066 |
Routing issue on post between controller : Right page loaded but wrong URL | <p>When I click on my first page submit button, the right destination page is displayed but with the wrong URL. It's still the URL of the first page : Indeed the htm page displayed is the right one : <code>topologieInstanceCouloir.html</code> but the url is <a href="http://localhost:8990/bus/topologie" rel="nofollow no... | 3 | 1,975 |
How to get Pillow images into Tkinter dynamically | <p>From what I've read, <code>ImageTk</code> should convert a Pillow image into a format that Tkinter can display. (Indeed, when I don't, Tkinter fails with an error.) However, when I run this program on my Windows computer, the Tkinter box says it's not responding and does not display the images.</p>
<pre><code>from ... | 3 | 1,461 |
How to use two MongoDB collections in my Express router? | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>router.get('/home', ensureAuthenticated, (req, res) => res.render('home', {user_mv: req.user, post_mv: req.post1}));
//Create to... | 3 | 1,231 |
How can I find out if my user has an admin permission? | <p>I'm currently coding a blog to get experience with php in which I can log in. In the table:</p>
<pre><code>user( id, username, password, permission)
</code></pre>
<p>there is one user that has the permission "admin", every other user has the permission "normal".</p>
<p>I want that only an admin can edit posts, so... | 3 | 1,208 |
Xaml Listbox stretching the whole usercontrol | <p>So I'm having a listbox showing some data in a usercontrol :</p>
<pre><code><UserControl x:Class="FSBEM.UCs.SomeUC"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<Grid Margin="7,0,9,0">
<Grid.RowDefinitions>
<RowDefinition Height... | 3 | 1,737 |
d3 choropleth map colors | <p>I'm trying to recreate the map shown <a href="https://s23.postimg.org/47evvful7/fertility_rates_in_europe_2013.png" rel="nofollow noreferrer">here</a> using D3 but I'm having trouble binning the values from my data and mapping them to colors. Currently I'm using scale.quantile that I believe sets the number of bins ... | 3 | 1,478 |
Why is this method not sorting the XML parser? | <p>I would like to sort my list by Clinic name, the parser works fortunately. However the sorting technique I have used does not. Have I implemented it incorrectly?</p>
<pre><code> public class BookScreen extends Activity {
//array
ArrayList<HashMap<String, String>> songsList;
P... | 3 | 3,048 |
Printing Result based on Input from JOptionPane | <p>I am student, trying to finish a homework lab. Right now I am struggling to use the input from JOptionPane to display the results based on the input. There are two files to my lab, the CoinCounterTester.java and the CoinCounter.java. Both compile but it should print the total numbers of dollars and the total number ... | 3 | 1,397 |
Thread 1: EXC_BAD_INSTRUCTION when fetching data | <p>I get this Error -> <code>Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)</code> randomly. I don't quite understand when exactly it happens. Most of the times it is when the view refreshes. The Error appears at the line where <code>group.leave()</code> gets executed.</p>
<p>What am I trying to do... | 3 | 2,268 |
OnItemClickListener on Fragment not work after exit from Activity | <p>I have a <strong>Fragment</strong> that display item using <strong>GridView</strong>. When the item get click it will open new <strong>Activity</strong> and bring some Intent key from the Fragment.</p>
<blockquote>
<p>The problem is after i return from Activity to Fragment GridView
OnItemClickListener not working. O... | 3 | 1,854 |
How to save drag moves into database | <p>happy new year!!!</p>
<pre><code> <!DOCTYPE html>
<html>
<head>
<style>
html,
body {
margin: 0;
}
table {
border-collapse: collapse;
}
td span {
display: flex;
align-items: center;
justify-content: cent... | 3 | 5,065 |
Save R output as an object | <p>Suppose, I have fitted my data to a multivariate DCC model and do the forecasting to get mean returns. Below is my reproducible code.</p>
<pre><code># load libraries
library(rugarch)
library(rmgarch)
library(FinTS)
library(tseries)
library(fPortfolio)
data(dji30retw)
for (i in 1:2)
{ Dat.Initial = dji30retw[, 1:8,... | 3 | 1,138 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.