title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How to create a single function that handles checkbox selection? | <p>I'm working on this simple checkbox selection that works just fine when selecting a single row or selecting all the rows. However, I would like to have only one function that handles the checkbox selection. As of right now I have 3 functions called: customer_name_func , customer_lastname_func and customer_email_func... | 3 | 1,280 |
Memory leak when using threads and tkinter | <p>I have this "game thing" I've been working on for a while. It works perfectly, except that when I close the GUI whithout having finished the game, it keeps running on the background, (like if it was memory leaking, even though "real" memory leaking doesn't work that way).</p>
<p>This game runs (or in theory it shou... | 3 | 1,625 |
Rails 3.2.9 Routes to incorrect controller | <p>I am using devise and cancan in my app. Both are working. </p>
<p>I have a <code>User</code> model and I have just added <em>(using scaffolding)</em> a new model called <code>Purchase</code>. </p>
<p>Before the Purchase model was added i also have a dashboard controller <em>(which just shows a single page at the m... | 3 | 2,192 |
Adding Buttons to an Array | <p>I have 208 Buttons and I want to assign numbers to them by using an array. These buttons have different images on top of them and I want them to appear on the screen when I put the according number, which represents the Button on the screen. The 2D Array can be ignored. I know that I have to get rid of this code and... | 3 | 10,804 |
as3 why is my public var changing? | <p>I have a var called "currentMystery" I have reduced the issue down to these two functions
I believe. Anyway, the first time through it works and traces a var from an Array... but the second time through something is changing it to [Event type="soundComplete" bubbles=false cancelable=false eventPhase=2]</p>
<p>What ... | 3 | 2,597 |
MySQL/SQL query for multiple tables | <p>I have multiple tables and I’m trying to do a query on searching student by their IDs “studentID”. When I run the query below, MySQL or SQL Server freezes(loading…). Any suggestion? Not all the tables are listed. Thanks.</p>
<p><strong>TABLES:</strong></p>
<p><strong><em>students</em></strong></p>
<pre><code>• ... | 3 | 1,445 |
User Registration after mobile verification | <p>I want the user to submit the registration form and then redirect to another page to verify the number he entered in the mobile number field. If the verification is successful, my user should be created otherwise an error.</p>
<p>Currently my Register View looks like this:</p>
<pre><code>def register_view(request)... | 3 | 1,256 |
Meteor Apollo not updating UI when we update collection from Mongo console | <p>I started using meteor apollo starter kit <a href="https://github.com/apollostack/meteor-starter-kit" rel="nofollow noreferrer">https://github.com/apollostack/meteor-starter-kit</a>
, and I created a collection "Posts" and I am able to pull data in to the UI. But when I update collection from mongo console, it is n... | 3 | 1,390 |
Optimize Memory Usage from LINQ Query in Entity Framework 4.1 | <p>I currently have a system where users can register and bet the scores from soccer games.
Right now i Have over 20k users, and more than 3 million bets. Every week I have to generate a ranking, so I have a query that loads on the memory all the users with bets just like this:</p>
<pre><code>from u in context.Set<... | 3 | 1,234 |
How to use ServerXMLHTTP60 and a client SSL certificate in Excel using VBA? | <p>I cannot get it to work in VBA - Excel. I use the same header and XML-body in Postman - fine! Good response. I need to use a client certificate to identify myself, but I cannot get it done in VBA. The code needs to post some data (the XMLPostMessage) and then it receives some data from the server (a XML message as w... | 3 | 1,382 |
HTML Java CSS make list appear in different div after box checked | <p>I am pretty new to HTML, Java, and CSS and have been working on getting hovering elements to appear in different regions in a webpage. I have created this jfiddle which shows what I have thus far:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet... | 3 | 2,150 |
How to split data in a column into some separate columns in Python? | <p>So, I have a data frame given below:</p>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
df = pd.DataFrame(
{
"id": [8233037, 8233313],
"geometry": [
"{'type': 'MultiLineString', 'coordinates': [[[107.612018, -6.921755], [107.611888, -6.92... | 3 | 3,337 |
mysqli_connect() vs new PDO connecting and queries | <p><strong>//-------------The story so far-------------\</strong></p>
<p>Hi all I am used to developing using the <code>mysqli_connect()</code> function to connect to the db like so:</p>
<pre><code><?php
$db_host = "localhost";
$db_username = "root";
$db_pass = "pass";
$db_name = "db";
$connect = mysqli_con... | 3 | 1,213 |
google maps api key not found (but i put) | <p>The error is:</p>
<pre><code>Caused by: android.view.InflateException: Binary XML file line #18: Error inflating class fragment
Caused by: java.lang.RuntimeException: API key not found. Check that <meta-data android:name="com.google.android.geo.API_KEY" android:value="your API key"/> is in the <applicatio... | 3 | 1,941 |
animating the constant in nslayoutconstraint - ambiguous layout | <p>This is probably a dumb question, but looking at people's examples, I'd think that animating the NSLayoutConstraint.constant in one direction would be pretty straight forward. I keep getting ambiguous layout and I'm not sure why. I have a label that I have these constraints set up for in viewDidLoad.</p>
<pre><co... | 3 | 1,482 |
How to implement ACTION (move/rename, set permissions) operation in J2ME Bluetooth OBEX? | <p>Bluetooth FTP specification says I need to use ACTION operation, here's a page
<a href="https://i.stack.imgur.com/5OADQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5OADQ.png" alt=""></a>
</p>
<p>But the <a href="http://library.developer.nokia.com/index.jsp?topic=/Java_Developers_Library/GUID-... | 3 | 1,347 |
html form not posting from javascript and php | <p>I have a html form that posts the data to a php file for processing, on this form there is a dynamically produced combo box that is produced from a php file using javascript. The combo box displays and functions fine when the page is loaded but when the form is submitted the value from this box isn't posted.</p>
<p... | 3 | 1,169 |
CSS rules not applied if filename is taken from user | <p>I am trying to HTML/javascript program that takes in a filename, parses the file and displays its contents in a table. The issue I am facing is that the if I take the filename as a user input via HTML forms, my CSS rules are not applied to the table I create via javascript to display the parsed contents. But if I ha... | 3 | 1,925 |
Removing a certain marker in angular2+ | <p>I am trying to remove a certain marker(when I click on it, it will pop-up an info-window and there I will have a delete button which will remove that marker from the map)</p>
<p>I also want that these markers to be kept in a localstorage to remain in the same position even if I refresh the page.</p>
<p>The problem... | 3 | 1,444 |
Strange interaction between slider (input range) and combo box (select) when syncing them with jQuery and using up/down arrow keys | <p>I am working on a project where I needed to sync a slider value with a combo box value. The code seemed to works. But I observed something odd when I tried the two controls on Firefox. I would move the slider and in the process, gain focus on the combobox. Then I would use the up/down arrow keys on my keyboard a... | 3 | 1,398 |
How to check if Button Color is same as square color in java Graphics and increase the points | <p>I am trying to create a game where there a 2 buttons <strong>red</strong> and <strong>blue</strong>. The square shape randomly picks a color from Color array. Thus if we press any of the 2 buttons and the color of that button is same as the random color in square we score a point. Here is my code-</p>
<pre><code>im... | 3 | 1,675 |
Saving image to SD card then displaying in imageview | <p><strong>UPDATE!!</strong></p>
<p>So Lokesh put me on the right path, and showed me that the problem was the size of the file being too large to show in the imageview. I was able to fix the imageview preview problem with the following code under my onActivityResult:</p>
<pre><code>try {
Bitmap p... | 3 | 1,345 |
I get a tensor of 600 values instead of 3 values for mean and std of train_loader in PyTorch | <p>I am trying to Normalize my images data and for that I need to find the mean and std for train_loader.</p>
<pre><code>mean = 0.0
std = 0.0
nb_samples = 0.0
for data in train_loader:
images, landmarks = data["image"], data["landmarks"]
batch_samples = images.size(0)
images_data = image... | 3 | 2,299 |
How to pass props around with React Router | <p>I have this class here call <em>UtilityCard</em>:</p>
<pre><code>import React, { Component } from "react";
import { Link } from "react-router-dom";
import "./UtilityCard.css";
export class UtilityCard extends Component {
render() {
const {
map,
type,
start_... | 3 | 2,573 |
Increase the time on the progress bar | <p>I have a website that does subtitle translation but before translating the subtitle progress bar finishes loading and shows a download button so my visitors save the incomplete subtitle.</p>
<p>Is there any possibility for me to extend the time of the progres bar or after translation of subtitle that make a countd... | 3 | 2,388 |
Show HTML DIV between two other DIVs | <p>I have build with SO help a HTML CSS Grid/Flexbox compbined Layout with quite progress. But now i have a problem with showing an additionall div named class <code>mobile_nav</code>.</p>
<p>It should be activated when the user clicks on <code>SWITCH</code> (i can google this, therefore not part of question) and been... | 3 | 2,014 |
Returned Rowversion data from a POST is not valid base64 | <p>I am sending Rowversion data to my view in order to test for Concurrency issue for Update/Delete of a record to SQL Server. The Rowversion data in the record is Byte[] which has to be converted to a Base64 string so it can be serialized. This is being done by a getter in my ViewModel. The returned Base64 data is bei... | 3 | 1,064 |
Heroku: Spring Boot Gradle app with https tomcat server and certificate pinning | <p>I have a Spring Boot java app that uses a self-signed certificate to communicate with the android front-end.</p>
<p>I use a tomcat server as my container for the app:</p>
<pre><code>compile 'org.springframework.boot:spring-boot-starter-tomcat'
</code></pre>
<p>Now, I have enabled https / ssl:</p>
<pre><code> ... | 3 | 1,037 |
XSLT 2.0, templates and node/value sets | <p>XSLT newbie (so I apologize in advance)</p>
<p>I have an XML file containing payment data. I am trying to transform it into an xml format used by a bank. The XML needs to be different if it's a non USD payment vs a USD payment. Multiple payments are possible in a given file
here is a sample of the source XML (simpl... | 3 | 2,322 |
Maven plugin jsonschema2pojo returns ClassNotFoundException | <p>I need to generate java pojos from JSON schema. I'm trying to use jsonschema2pojo maven plugin for this purpose. I wrote custom rule factory and I want to use it for pojos generation.
Here is my jsonschema2pojo plugin configuration:</p>
<pre><code> <plugin>
<dependencies>
... | 3 | 1,141 |
How to groupby in subquery SQL | <p>I have the following query:</p>
<pre><code>SELECT "IMPORTACIONCOLUMN3", "role", COUNT("IMPORTACIONCOLUMN1")
FROM MYTABLE
WHERE ID = 9
GROUP BY "IMPORTACIONCOLUMN3", "role"
</code></pre>
<p>This gives me the following result:</p>
<p><a href="https://i.stack.imgur.com/... | 3 | 1,180 |
Generate PDF file and attach to e-mail | <p>first post here.</p>
<p>I have read all similar posts without finding any answer, i'm a newbie at dev in general.</p>
<p>Here is what i'm looking for: </p>
<p>On button click, the code generates a PDF with some info, and i just want to send the created pdf by mail.
First problem is when i choose an email app to s... | 3 | 3,905 |
Initializing a ListAdapter in Kivy file | <p>I'm new to Kivy and really like the separation between the code and the UI spec in the Kivy file. I was hitting a roadblock in understanding how I might define a ListAdapter inside the Kivy file. For example, here is a ListAdapter that is fully defined in the Python code:</p>
<pre><code>class TestPop(Popup):
... | 3 | 1,605 |
Python - lambdas, not weakrefs, not pointers, not sure what | <p>I have this hobbyist pubsub library I put together that uses extensive <code>weakref</code> but I recently noticed that lambdas appear to be very similar in their execution, save some differences which strike me as... counter-intuitive. (if only because I'm not sure what lambdas are actually doing)</p>
<p>Take the ... | 3 | 1,338 |
Looking for unnecessary buffer copies in assembly code | <p>I am using Visual Studio 2008 C++ for Windows Mobile 6 ARMV4I and I'm trying to learn to read the ARM assembly code generated by VS to minimize unneessary buffer copies within an application. So, I've created a test application that looks like this:</p>
<pre><code>#include <vector>
typedef std::vector< BY... | 3 | 1,896 |
HTTPURLConnection returning gibberish | <p>I'm modifying some working code to work with a different provider's API (we are switching helpdesk providers).</p>
<p>I am trying to look at the xml coming back to see if I am even on the right track, but all I see coming back is gibberish. I've looked at <a href="https://stackoverflow.com/questions/5188382/trying... | 3 | 1,958 |
Bundle static files in NextJs | <p>I am using NextJS for serverside rending of my ReactJS pages to get better SEO results. After building with <code>yarn next build</code> i receive this output:</p>
<pre><code>First Load JS shared by all 127 kB
├ chunks/2a8530436833c39e06d280d82bbcefd1b28bdcf0.725aa5.js 6.35 kB
├... | 3 | 2,541 |
seg fault static class member pointer used with dynamic allocation | <p>I am running into seg fault as shown</p>
<pre><code>cluster_init: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_dereference<T>::type boost::shared_ptr<T>::operator*() const [with T = pcl::PointCloud<pcl::PointXYZ>; typename boost::detail::sp_dereference<T>::type ... | 3 | 2,212 |
C3js - Show circle only at the last point of the graph | <p>My chart currently has all the hidden points (the points I'm referring to are "balls" circles), but I need them to show the ball only at the last point.</p>
<p>Look at this image to see exactly what I need.</p>
<p><a href="https://i.stack.imgur.com/jEed5.jpg" rel="nofollow noreferrer">Picture</a></p>
<p>As you ca... | 3 | 1,232 |
Change Backcolor of button, based on Button name | <p>I'm currently writing a program for laboratory weighing.
On my form there is a grid of 42 positions (7 rows of 6 samples = 1 rack), where each position is a button, with name "Buttonxx" (where xx stands for position number, e.g. Button01, Button02, ... , Button42)</p>
<p>All the information comes from a Oracle Data... | 3 | 1,217 |
The view hierarchy is not prepared for the constraint? | <p>I am receiving the following error, even though I have set the table view footer before adding the button and applying the constraints. I have tried calling the below method after setting and footer view in <code>-viewDidLoad</code> and also in <code>-viewDidAppear</code>. I cannot seem to isolate the problem. </p>
... | 3 | 2,103 |
how to Send records within the loop individually with Ajax | <p>I want to send and save the records inside the loop one by one with Ajax.Each record has a button to send information.
But when I want to send the record to the action method, only the information of the first record is sent.
I also want to make a Condition that if the user selects an item from dropdown,can send the... | 3 | 2,556 |
UITableViewController does not show info after adding | <p>I'm tried to find solution on my own, but...so, to be short:</p>
<p>After adding information (in this case - String and Date type's) to the AddTaskViewController and press "Save" button the TableViewController is appears without any information. But, ViewController passed the information to a TableViewCont... | 3 | 2,138 |
VANET simple CBR application, no output (empty pcap files)? | <p>I have a problem ..
i wanted to simulate a VANET network (only two nodes), that use <strong>OnOffApplication</strong> (in order to simulte video streaming traffic)
I tried the following code, no error appear, however, the pcap files are empty ? and not packets were sent at all. Any suggestion please ?</p>
<pre><co... | 3 | 1,329 |
Angular 4 Datatable | <p>I'm using <strong>angular4</strong> datatable with ajax from here : <a href="https://l-lin.github.io/angular-datatables/#/basic/with-ajax" rel="nofollow noreferrer">github</a></p>
<p>All the stuff works fine but i can not <strong>bind</strong> dynamic <code>ngModel</code> to the my elements</p>
<p>Is there any way... | 3 | 2,301 |
Keras, multi-layer autoencoder, the same accuracy for different amount of hidden layers | <p>I'm currently trying to implement a multi-layer autoencoder using Keras, but I'm starting to believe that my implementation is wrong, since I don't get any difference in accuracy nor variance by using 2 or 3 hidden layers. I tried using two hidden layers with 400/180 and then I tried using three hidden layers with n... | 3 | 1,688 |
group by clause issue | <p>I have written a query in access and now I am trying to write the same in SQL Server I am getting following error:</p>
<blockquote>
<p>Msg 164, Level 15, State 1, Procedure OQRY_STEP_1_1, Line 15
Each GROUP BY expression must contain at least one column that is not an outer reference.</p>
</blockquote>
<p>My S... | 3 | 1,130 |
SupportManager.getFragmentById returns null | <p>hi all I have been stuck with this getFragment by id returning null</p>
<p>xml file</p>
<pre><code><android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"... | 3 | 1,849 |
Vue how to display the edit button only when a field in a table is false | <p>I have a table with users' holidays and I would like the edit button to appear only when the confirmed field is false. And when vacation is already confirmed then button should not be visible</p>
<p>Vacation request table <strong>:</strong></p>
<p><a href="https://i.stack.imgur.com/6csCV.png" rel="nofollow noreferre... | 3 | 2,070 |
vue-star-rating TypeError: Cannot read property 'length' of undefined at listToStyles.js:26 | <p>Getting this error while calling getRating function in Vue. I'm using the Vue-star-rating package in laravel. don't understand what is the problem.</p>
<pre><code> getRating(){
var pathArray = location.pathname.split('/');
var pid = pathArray[2];
fetch(`/a... | 3 | 1,667 |
Why doesn't IIS release files on the server? | <p>I have ASP.NET Web Forms application for fill e-warranty pdf. When I open file for first time and fill filds everything is OK. But if I want to open file again and fill it, throw me exception on <code>File.WriteAllBytes(pdfDirectory, pdfContent);</code>:</p>
<blockquote>
<p>System.IO.IOException: The process cann... | 3 | 1,379 |
iOS tableView not displaying sections | <p>I have a table view that is embedded inside a regular view controller (which is embedded inside a navigation controller.)</p>
<p>Generally speaking, calling methods such as <code>tableView:numberOfRowsInSection:</code>, <code>tableView:titleForHeaderInSection</code> and <code>tableView:cellForRowAtIndexPath:</code>... | 3 | 1,208 |
How can I make Bode plot working properly? | <p>I work on application for control engineering students. It can draw step and impulse plots, compute transfer function, check if object is stable etc. I want it to draw a Bode plot, and when I try to do it, I just can't set the <code>chart1.ChartAreas[0].AxisX.IsLogarithmic</code> property to <code>true</code>. It ca... | 3 | 1,869 |
Is it possible to mock a variable value for a method for CakePHP tests (PHP Unit)? | <p>I'm testing my API and there's a login method for OAuth that I can't seem to properly test due to how it will not read $_GET values of a variable when POSTing. </p>
<p>The login method. Basically $OAuthParams doesn't get set when using POST because getAuthorizeParams() uses $_GET. <strong>So I want to fill/mock eit... | 3 | 3,063 |
Why is SVG preserveAspectRatio not working? rsvg-convert | <p>I am using SVG graphics to create images for an app I'm working on. As an example I will use one of my simplest images.</p>
<pre><code><?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphic... | 3 | 1,184 |
why can't pd.drop() by index number row | <pre><code>Wave 4003.767578 4003.1308590000003 4002.4941409999997 4001.857422 4001.219727 4000.5830079999996 3999.945313 3999.3085939999996 3998.670898 3998.033203 ... 113.323242 112.00585900000002 110.6875 109.36914099999998 108.049805 106.731445 105.41210900000002 104.092773 102.77246099999999 y
P+1... | 3 | 1,059 |
Setup a session in PHP | <p>I don't seem to understand how I can setup a session. I wrote this code: </p>
<pre><code><?php
require_once '../database/Database.php';
session_start();
$database = new Database('localhost', 'root', '');
if(isset($_POST['login'])){
$username = $_POST['username'];
$password = $_POST['password'];
if(... | 3 | 1,847 |
All drop-down menus' text content change at the same time instead of updating separately | <p>I have three drop-down menus on my site that I created via Bootstrap.
<a href="https://i.stack.imgur.com/M7sTF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M7sTF.png" alt="enter image description here" /></a>
Ideally, when a user clicks on a drop-down menu and selects one of the inner menu item... | 3 | 1,598 |
Consume SOAP XML in Rest WebService | <p>I am able to consume xml based request in rest webservice. Below is the sample code how I am consuming XML request in my rest webservice.</p>
<p>Now, I want to consume soap request XML and I know SOAP is a messaging protocol. It can only be consumed by SOAP based webservices but it uses an XML data format to declare... | 3 | 1,407 |
Why does a Cloud Function for Firebase (deployed without errors), throw "Uncaught (in promise) FirebaseError: internal" when called? | <p>I am making an onCall function to do crud operations with the admin-sdk, create, read, update and delete users, and customClaims, but when calling the deployed function it throws the following errors in the browser console (the client is web):</p>
<p><em>POST http://localhost:5001//southamerica-east1/usersCrud net::... | 3 | 1,582 |
Ruby on Rails NoMethodError in Posts#show | <p>I have been attempting to write a web blog application based off this <a href="http://railsinstallfest.org/guides/installfest4/getting_started/" rel="nofollow">link</a>. I am getting a
Ruby on Rails NoMethodError in Posts#show error when I got to click on a post. </p>
<p>The error states: <code>"undefined method p... | 3 | 1,167 |
open a jquerymobile popup programmatically in an if-statement | <p>I want to open a jquerymobile popup in an if-statement. If I run that page in my browser I get following error in my console: Uncaught TypeError: undefined is not a function.</p>
<p>Here is my code:</p>
<pre><code> <!DOCTYPE html>
<html>
<head>
<title>PopUp</titl... | 3 | 1,096 |
How i can convert array of object into array then a unique count of array | <pre><code>const form = [
{
"_id": "61436aa8deef0390dcfdea79",
"user": "613f92eb98da0c5facc1b4ca",
"registerName": "Edwin",
"email": "edwin@asng.space",
"category": "Urusan Lain Lai... | 3 | 1,418 |
Problems rendering a list of threeJs renderers | <p>I'm attempting to display a list of renderer/scene/camera "groups" on the same html page. I ran into problems when trying to implement a render loop on all of them, using requestAnimationFrame. I am, however, unable to successfully render even a single frame by looping over the list.</p>
<p>calling renderer.render ... | 3 | 1,391 |
FFT Code Break Down | <p>I am trying to implement the FFT in one of my projects. Unfortunately I feel like every site I go to is explaining things way over my head. I have looked at many different sites for clarification but alas it has so far eluded me.</p>
<p>Each of the sites that I have so far went to has either had the code written we... | 3 | 1,027 |
AF_XDP: invalid indirect read from stack | <p>I tried to implement the mapping I talked about in this post: <a href="https://stackoverflow.com/questions/60599317/af-xdp-map-src-ip-dst-ip-dst-port-to-index-to-bpf-map-type-xskmap?noredirect=1#comment107210482_60599317">AF_XDP: map `(SRC-IP, DST-IP, DST-Port)` to index to `BPF_MAP_TYPE_XSKMAP`</a></p>
<p>My Kerne... | 3 | 3,251 |
ServletFileUpload.parseRequest() return 0 items for HttpClient file upload request | <p>Server Code use ServletFileUpload:</p>
<pre><code>public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
this.createLog("F:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\webapps\\photolistservice\\log\\", "test.txt", "... | 3 | 1,336 |
Calling function to fetch data repeatedly is giving overlapping responses despite trying to use promises | <p>I have a function that takes a url and data, gets json from an API, creates an object with data in it and returns it. I'm trying to call this function to get different data with different urls, but the responses are overlapping.</p>
<p>I've tried a bunch of different ways to save the data but the answers all come b... | 3 | 1,353 |
I was on Terminal and I typed swift and errors appear | <p>I opened up Terminal on my MacBook, and I typed in Swift and errors appear, and I don't know what to do. If anyone can help me with this situation, it will be appreciated. Below this paragraph will be the errors. </p>
<pre><code>Groshvins-MBP:~ P.W$ swift
warning: Swift error in module repl_swift.
Debug info from t... | 3 | 4,916 |
Issue with Python implementation of Kruskal's maze algorithm | <p>I decided to make a variable-size binary tree maze generator. I am trying to use Kruskal's maze algorithm, and I need to create a program that sees if there is a way for the player to get from cell x to cell y. I was having trouble figuring out the maze solving. I decided to implement a maze solver into the binar... | 3 | 1,926 |
Why does the route not draw on the map with the following code? | <p>Could anyone help - the following code works in all regards except the route polyline is not drawn on the map - could you tell me what i am missing?</p>
<p>I have been going around this particular tree for a VERY long time - LOL</p>
<pre><code>import UIKit
import MapKit
protocol HandleMapSearch: class {
func drop... | 3 | 1,718 |
When running a generated loopback REST app that connects to MongoDB, my GET fails | <p><strong>When running a generated loopback REST app that uses an unauthenticated MongoDB datasource, my query fails to return any documents; calling curl produces output complaining about an authentication and/or dns issue</strong></p>
<p>I generated (using slc, on a Windows 7 PC) a Loopback REST server app that use... | 3 | 1,447 |
Inconsistent results between glm() in R and manual implementation of logistic regression in Excel | <p>You'll find a manual implementation of <strong>logistic regression in Excel</strong> at: <a href="http://blog.excelmasterseries.com/2014/06/logistic-regression-performed-in-excel.html" rel="nofollow noreferrer">http://blog.excelmasterseries.com/2014/06/logistic-regression-performed-in-excel.html</a>.</p>
<p>This imp... | 3 | 1,058 |
How to push and error from mongodb routes to validator, user signup form | <p>I have a user sign up page in react, if a user tries to signup with an already taken screenname I get a mongodb error, since i set the scheme to screenname unique, Im validating the form using validator, how can i push "this username has already been taken" in errors.screenname in my validator file</p>
<p>/validato... | 3 | 1,249 |
My ScrollView won't scroll | <p>I've made two graphs using the <code>GraphView</code> API and put them each inside two <code>LinearLayout</code>. Both layouts are inside a <code>ScrollView</code> which is inside a <code>Relativelayout</code>. For some reason, the <code>ScrollView</code> won't scroll:</p>
<p>XML:</p>
<pre><code><RelativeLayout... | 3 | 2,698 |
Solving MINLP with PYOMO/PYSP | <p>team,</p>
<p>currently I am working on a nonlinear stochastic optimization problem. So far, the toolbox has been really helpful, thank you! However, adding a nonlinear constraint has caused an error. I use the gurobi solver. The problem results from the following constraint.</p>
<pre><code>def max_pcr_power_rule(m... | 3 | 2,300 |
Error InflateException Android 6.0 | <p>I get de Error when i try run my app. I tried to change the class to <code>extends Fragment</code> and <code>extends FragmentActivity</code> with the imports but did not work.
For I have added some additional information in my Manifest, I think you might have something that might be causing the problem reported.</p>... | 3 | 2,867 |
Failed to Inflate error tring to run android app | <p>I tried the google speech recognition sample code, however, the app crashed and logcat reported the Failed to inflate exception. </p>
<p>Here is my code:</p>
<p><strong>MainActivity.java</strong></p>
<pre><code>/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Vers... | 3 | 3,099 |
select not getting updated on ajax call | <p>I have an ajax call to dynamically create select elements. the amount of selects is dependent on another select. This works fine. for my test 3 select menus should be created dynamically which works fine. the dynamically created selects will make ajax calls on their own to create some options dynamically, this is wh... | 3 | 1,083 |
MySQL Using Derived Tables WITHIN subQueries without re-defining them | <p>I have a system that generates a SQL query with lots of derived table within sub queries. Here is a typical example:</p>
<pre><code>SELECT
COUNT(`temp_table_main`.`person_id`) AS "resp_count",
`temp_table_main`.`SAMPLE`,
SUM(`temp_table_main`.`WT`) AS "resp_count_weight" ,
SUM(`temp_table_main`.`f... | 3 | 1,448 |
script only works on the first time (id is repeating) | <p>I have this uploading script and the form in the loop..it all works but the the <code>document.getElementById(div_id).innerHTML = "Uploading...";</code> only works on the first iteration can any one help ?</p>
<pre><code><script language="Javascript">
function fileUpload(form, action_url, div_id) {
// Cr... | 3 | 1,164 |
App unfortunately Crashing | <pre><code>//I'm new to programming and android studio
package com.example.calc;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import static com.example.calc.R.id.editTex... | 3 | 5,342 |
Open Bootstrap accordion panel from menu bar | <p>my menu put in header.html which will be loaded in all pages. </p>
<p>If I click the menu from index.html, it will open the corresponding accordion panel in product.html by using below js code (which place in the end of product.html markup ).</p>
<p>But if I click the menu from product.html, no respond from the ac... | 3 | 1,380 |
PHPunit expectation on Mock object is not fulfilled | <p>Here is my class:</p>
<pre><code>public function __construct(Manager $moduleManager, Source\Yesno $yesNo)
{
$this->moduleManager = $moduleManager;
$this->yesNo = $yesNo;
}
public function my1()
{
$this->moduleManager->isOutputEnabled('');
$this->yesNo->toOptionArray();
}
public f... | 3 | 1,417 |
FS writeFile(Sync) causing ws.broadcast to not work | <p>I was trying to learn the <code>WebSocket</code> API by writing a simple chat application in NodeJS. I needed to save the messages in a file called <code>messages.json</code> that would look something like this:</p>
<pre class="lang-json prettyprint-override"><code>[
[
"username",
"message&q... | 3 | 2,290 |
How to output data on one line per ID in Oracle SQL? | <p>This works to get me all the data I need, but outputs a separate row for each side of the UNION when what I really want is to get all parent contacts on the same row as the student ID. That is, I want a row with <strong>a.id</strong> and then all the info for <strong>contact_1, contact_2, contact_3 and contact_4</st... | 3 | 4,033 |
Using regex formulas in SQL Server SSMS IDE | <p>I have the following query after Script table as INSERT: </p>
<pre><code>INSERT INTO [DWH].[DimSharedDimensionEmployee]
([EmployeeId]
,[AdminFileId]
,[ManagerId]
,[EmployeeLastname]
,[EmployeeFirstname]
,[ManagerFirstname]
,[ManagerLastname]
,[EmployeeEmail]
... | 3 | 1,631 |
vuejs npm dev server does not show updated output | <p>I am using vuejs in wordpress theme, everything is properly setup and working.</p>
<p><code>npm run build</code> works perfectly and creates dist and wordpress picks up all content from it.</p>
<p>What's the issue then?</p>
<p><code>npm run dev</code> also works in the console but when I made any change in a vue ... | 3 | 4,029 |
Why is this set of F rotating in this locus | <p>In this code , I am not able to understand why the rotation is not in circular locus. This may be basic logic behind this but i can't understand why this so random locus.</p>
<p>I am rotating camera in orbital motion but it is not following it.</p>
<p>In my knowledge, i created a orbital motion camera and inverse of... | 3 | 6,532 |
error running AGStoShapefile.js | <p>I have successfully installed the AGStoShapefile, which is a node.js script that converts ESRI Geoservices to geojson and shapefile formats. </p>
<p>The github repository is here <a href="https://github.com/tannerjt/AGStoShapefile" rel="nofollow">https://github.com/tannerjt/AGStoShapefile</a>
and the specific .js f... | 3 | 3,436 |
Can't run Proguard on Android maven project | <p>I have got a problem with running proguard on maven project. I have test and release version of the project. Release version sign and obfuscate the code. When I run my android project in test mode everything goes well however when I switch to release mode exception is thrown.
My Maven vesrion is Maven 3.2.1, Android... | 3 | 2,799 |
WebSphere Liberty and Eclipselink SDO | <p>I am porting an old IBM Process Server application to IBM WebSphere Liberty. It contains a lot of code based on Service Data Objects (SDO). I have some good working code, running as standalone Java, using JDK8. I am using eclipselink 2.7.7, specifically 2 jar files;</p>
<pre><code>eclipselink.jar
commonj.sdo_2.1.1v... | 3 | 1,100 |
502 bad gateway because of permissions denied | <p>I am trying to deploy django project on digitalocean using nginx and gunicorn.
My project have the following structure</p>
<pre><code>projects
|_isli
|_isli
|_forecast #project directory
|_manage.py
|_forecast.sock
|_forecast
|_wsgi.py
|_settings.py
|_urls.py
</code>... | 3 | 1,697 |
How to use variables in xsl:for-each but create the output later? | <p>I'm struggling to get the output to display as required.</p>
<p>I run an xslt 1.0 file that parses every 5 seconds a xml file that contains statistical information.
every 15 minutes we get an additional file to parse which is pulled in as external source.
The parsing is fine but displaying the information fails mis... | 3 | 4,244 |
Ionic structure same as Angularjs | <p>I know a little bit about Angularjs (I'm still learning) and now I want to learn Ionic too. I tried to have same structure approach for code organization, but it seems that I don't know how to make same code works on Ionic. Can someone helps me, I will write my code first and then explain what is the problem.</p>
<... | 3 | 1,555 |
Access property in nested form | <p>So I've this code:
TS</p>
<pre><code>import { Component, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators, FormBuilder }
from '@angular/forms';
@Component({
selector: 'app-hotel',
templateUrl: './hotel.component.html',
styleUrls: ['./hotel.component.scss']
})
export class HotelC... | 3 | 2,611 |
ANDROID - how to show/display JSONArray into TextView | <p>i try to display JSONArray from this <a href="http://www.zxccvvv.cuccfree.com/send_data.php" rel="nofollow">link</a>,,
but when i try to running the app, that app popup an error like this
<a href="https://postimg.org/image/g60r8gk4j/" rel="nofollow"><img src="https://s13.postimg.org/fghyw3jl3/Screenshot_2016_10_22_1... | 3 | 3,727 |
Check if all the field are filled, if yes then login via Google and save records of the fields PHP | <p>I have a form in PHP HTML in which the user fills some fields on button press I want to check if all the fields are filled, if yes then check if the user is logged in, if yes then save records if no then proceed to google login procedure save user credentials and save the input filed records</p>
<p>input page as ev... | 3 | 7,546 |
Setting up package migrations with Behat 3 and Laravel | <p>I'm working on including Behat 3 in a new Laravel based API, and I'm using the lucadegasperi/oauth2-server-laravel package to handle authentication.</p>
<p>Been having a time getting the Behat setup working (it is now). I don't get why, but seems like I need to migrate the packages both in the beforeSuite and befor... | 3 | 1,286 |
Iterate on req.body.objectName to test whether the key-value pairs are valid or not in node js | <p>the problem statement is something like this :
<strong>"the node js webservice server application should first validate whether the req.body.object contains valid key-value pairs, if its present then only go to mongodb specific method and do some CRUD operation and send response otherwise send response as key-value ... | 3 | 1,245 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.