title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Keep showing dropdown menu on father element hover state | <p>I' ve been dealing with this all day and i can't find the way to make it work. I'm trying to show a submenu when hovering over the father element. The problem is that as soon as i try to move outside the father element the submenu dissapear, even when the submenu is wrapped but the father element. I've tried the adj... | 3 | 7,033 |
PHP proxy only functioning at certain URLs | <p>I am trying to get around the cross-domain issue involved in hosting Geoserver map layers on one domain and an html file accessing them via OpenLayers WMSGetFeatureInfo on <a href="http://greengeography.org/projects/oregonwild/or_wild_webmap18.html" rel="nofollow">another domain</a>. This works fine, of course, when... | 3 | 1,480 |
Jackson parse different level fields to one java class | <p>I have the following JSON string and java class.
Json:</p>
<pre class="lang-json prettyprint-override"><code>{
"records": [
{
"metadata": {
"id": "1129836408668",
"partition": "ecp:9-ca69437a-2ad5-4233-bfc4... | 3 | 1,503 |
How can I update the UI without skipping frames | <p>So I am developing and android app in Kotlin with coroutines and no matter what change I make, I still keep getting the message:</p>
<pre><code>I/Choreographer: Skipped 59 frames! The application may be doing too much work on its main thread.
</code></pre>
<p>How can I get rid of it. I mean like I am only displayin... | 3 | 11,700 |
Interpreting callbacks and cb_kwargs with scrapy | <p>I'm in reach of a personal milestone with <code>scrapy</code>. The aim is to properly understand the <code>callback</code> and <code>cb_kwargs</code>, I've read the documentation countless times but I learn best with visual code, practice and an explanation.</p>
<p>I have an example scraper, the aim is to grab the b... | 3 | 1,310 |
I've created this simple JS dice game where I run 2 dice | <p>I want to hear suggestions on how to improve this code, there's probably a way that I can call the same function to get 2 different results? When I tried that, I got 2 dices printing the same result. Any other suggestion on how to make this look better would be nice.</p>
<p>I already figured out how to do it by usin... | 3 | 1,476 |
Checking values in SparseBooleanArray | <p>I'm trying to stop the user from adding more than four checked items. I obtain the selections using getCheckedItemPositions for my listview. Once a selection is checked, I place the selections in another SparseBooleanArray named OldCheckedItems. The goal is to compare the new list to the old list to determine which ... | 3 | 1,976 |
Making an API request for an image using Axios, receiving unknown characters as response | <p>I'm attempting to make an API call to my Node/Express backend where I send it the location of a stored avatar image along with a jwt, and it sends me the image (a jpeg) in response. The request goes out and returns successfully but rather than receiving the image, I get this string of text/unknown characters: </p>
... | 3 | 6,792 |
Creating Yocto Mender for Raspberrypi 3 | <p>I need help creating Mender for Raspberry Pi3. I can create the image, but when using Win32Image to burn the Disk Image it doesn't boot.</p>
<p>Here is my additional conf.log </p>
<pre><code>MENDER_ARTIFACT_NAME = "release-1"
INHERIT += "mender-full"
MACHINE ?= "raspberrypi3"
RPI_USE_U_BOOT = "1"
MENDER_PARTITION_... | 3 | 1,403 |
Android - Getting user Current location in certain time interval | <p>I need to get the user current location using gps in certain time interval even after closing the application. i have done using service.<br>
here is my service class. </p>
<pre><code>public class MyService extends Service {
private static final Stri... | 3 | 1,506 |
How to load records dynamically in listview with help of Bottom progressbar | <p>Hi i am very new for android and in my case i have 200 above records i have to show in my list-view that's why i request to server offset value </p>
<p>so that based on offset value server sending records for this i wrote below code but duplicate records also adding in my ArrayList how can we resolve please help</... | 3 | 2,201 |
Docker container can’t startup with a 166G(nfs/efs) volume | <p>my docker container can’t startup with a 166G (nfs/efs) volume, I use the EFS mounted to the EC2 with amazon-efs-utils tool, and then volume to the docker, below is my docker-compose file</p>
<pre><code>services:
app:
image: xxxx
restart: always
environment:
- ASPNETCORE... | 3 | 1,190 |
ExtJs Date Picker display problem 3.1.0 with Ext.form.DateField | <p>I am new to ExtJs and have issues with the display of the date picker.
The actual date picker functionality works, but first 2 columns overlaps as per picture attached.</p>
<p>I have added a date picker to a new Ext.FormPanel() and added panel to a window using ExtJs 3.1.0 as per code below:</p>
<pre><code>function ... | 3 | 1,519 |
read html code made by arduino at android | <p>I want to read <code>html</code> code of <code>arduino</code> web server.<br>
I can make web server simply with from <a href="http://wiki.seeedstudio.com/Wifi_Shield_V2.0/#example-6-wifi-shield-and-android-app" rel="nofollow noreferrer">example 4</a>. code is below.</p>
<pre><code>#include <SoftwareSerial.h>
... | 3 | 3,150 |
Doubts with animate() jquery... open and close column | <p>I know very little about jquery, so I come to your advice, I'm trying to animate two columns that I have, this by clicking on a button in any of the two columns, what I need is that by clicking on the button in the column left, it grows and the right column becomes small until it disappears, and when you click on th... | 3 | 1,802 |
How to get JavaScript to display in my browser | <p>After extensively studying HTML & CSS, I've just started to learn JavaScript & Python. This is about JavaScript. I'm following a book asking me to start a 'script' tag within a 'div' element which itself is within the 'body' section of a new HTML document. I'm using Notepad++, but I've also tried this on Tri... | 3 | 1,332 |
Why is react repeatedly calling setState() when i call it with an eventHandler | <p>I'm creating a Tetras game with react, all was working well and executing as expected till is added a <em><strong>Keyboard EventListener</strong></em> which majorly listens for the the Right and Left arrow key to move the component
The Problem is, every time I call <em>setState()</em> in the function i assigned to t... | 3 | 1,525 |
how to print quantiles using plotnine in python | <p>I have the following <code>dataframe</code>:</p>
<pre><code>import pandas as pd
import numpy as np
from plotnine import *
df = pd.DataFrame.from_dict({'variable': {0: 'intercept', 1: 'intercept', 2: 'intercept', 3: 'intercept', 4: 'intercept', 5: 'intercept', 6: 'intercept', 7: 'intercept', 8: 'intercept', 9: 'int... | 3 | 6,397 |
What is causing these characters? | <p>I have a PHP page that loops through a CSV file and encrypts the 'email' column using the following function:</p>
<pre><code>function my_encrypt($data, $key)
{
// Remove the base64 encoding from our key
$encryption_key = base64_decode($key);
// Generate an initialization vector
$iv = openssl_random_p... | 3 | 1,438 |
How to calculate reaction time? | <p>I have developed an app that has two buttons (left and right) and a Textview that will pop up on the screen.Each button has it's corresponding word.<br>
The user has to click the button that corresponds to TextView's word as quickly as possible when it shows. I want to calculate it's reaction time on clicking the bu... | 3 | 6,931 |
How to merge JSON two indexes and then Parse information | <p>I am trying to iterate both index of <strong>JSON</strong>(Players and Buildings), so that i can a get new result in <strong>jQuery</strong> </p>
<p>I have two index of <strong>JSON</strong> one having information of Players and second index having information of Building related Player.</p>
<p>I want to Parse it ... | 3 | 1,278 |
Build a Continous side scrolling TextView in Android | <p>I am trying to build a <code>TextView</code> that scrolls continuously sideways. I found some code on <code>stackoverflow</code> and used it as is. I want it such that beginning and end are wrapped together and not having a gap as it is now.</p>
<p><strong>Here is the code I used:</strong></p>
<pre><code>public cl... | 3 | 1,686 |
validateEmail requires lowercase values? | <p>Not sure If I am missing something here but appears that when I use 'validateEmail' it requires the email address to be in lowercase. If you run my code below and type in your name and an email address with on uppercase value it will not submit. However, if you remove all uppercase values to lower it works fine. ... | 3 | 1,155 |
LDAP connection response server unavailable | <p>I am trying to authenticate with LDAP with various code snippet but always getting ldap server unavailable.
While same connection when i tried to connect with LDAP browser then it worked.
<a href="http://btechintegrator.com/index.php/2020/01/22/free-online-cloud-ldap/" rel="nofollow noreferrer">http://btechintegrato... | 3 | 1,946 |
Is it possible to make html table column text cropped with three dots by CSS only when there is overflow in the table? | <p>I have a basic HTML table with 4 columns and 4 rows.Basically width:0 given to first three columns to make them as wide as length of the text inside the column and the last one is free to fill the available space like below (Sorry for bad drawing)</p>
<p><a href="https://i.stack.imgur.com/RYZuj.png" rel="nofollow no... | 3 | 1,881 |
How can I reduce 3 blocks of code to 1 in iOS | <p>I created a fun little AR app that allows me to point my phone at index cards, that contain 2D images of Christmas items drawn by my niece, and have 3D versions of the images pop up.</p>
<p>However, I have limited my app to just 3 images for now, as each picture/3D combo has its own block of code (shown below) but I... | 3 | 3,390 |
Gradually slow down audio file from normal speed to half speed? | <p>I'm trying to get the contents from an audio file and write them into another audio file--except the output should start at the normal speed and then slow down as time progresses and finish at half its original speed. I'm trying the Lagrange interpolation approach but can't seem to get it quite right. I held off on ... | 3 | 1,811 |
Regex that matches a string but only if another string is not present anywhere on the same line | <p>I am using many different Regex implementations as this happens on several systems (Linux, Windows, VS, notepad++, etc.); it's just where I have a customer who wants to remove auto sizing. The intent is to use regex in which ever tool to find any line that has a width but doesn't have an autowidth and then <strong>a... | 3 | 2,503 |
numpy's QR appears faster than scipy's - why? | <p>For some reason, numpy's QR decomposition is always faster than scipy's which seems strange because scipy is supposed to include all of numpy plus more advanced features. Any idea why?</p>
<pre><code>import numpy.linalg as nla
import scipy.linalg as la
A = np.random.randn(4000,4000)
%timeit -n 3 -r 3 Q,R = nla.qr(... | 3 | 1,887 |
Wen I click on a movie it still apears the lsit of movies . PHP | <p>So I was making a PHP site and it's done but I want to change something , when I click on one movie I don't want to still show me the list of movies I want only the details about that movie and the 'back to home' button.I greatly appreciate your help.</p>
<pre><code><?php
//An array ith movies
$movie... | 3 | 2,097 |
SetDate on jquery Datepicker onClose does not change value | <p>i have a table and each row has a datepicker. Datepickers are only selecting months and on close i set the first day of the month except if this day is before the minDate so i want to set minDate there. </p>
<p>SetDate function does not work. My log gives me that properDate is set correctly but when i pass it in th... | 3 | 1,487 |
why i get An error occurred while executing doInBackground() | <p>im trying to create an app that pulls info from the web using api and JSONObject.
I learned that i need to use asyncTask to do it, so i create a class that extends asyncTask.
but the app keep crashing.</p>
<p>my asynTask:</p>
<pre><code>public class MyDownloadTask extends AsyncTask<String, String, String> {
... | 3 | 4,955 |
How to resolve "invalid operands of types" in an Arduino program? | <p>It's a manipulation of two codes.</p>
<p>First I send the latitude and longitude value found from the gps module by sms(arduino,gsm module), then by another code I send it to a php file in the server by using http protocol(arduino+gps/gsm/gprs shield). Now when I am merging two codes, it's showing errors like below... | 3 | 3,081 |
clipboard animation on click | <p>In the <code>CSS</code> I have a <code>:focus</code> <code>animation</code> that you can see is only running when I <em>click and hold</em> the box. How do I get it to run when the <code>.active</code> class is added on click?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-bab... | 3 | 1,031 |
How to sort a Grid using Viewmodel not ViewBag? | <p>I have my code working and sorting correctly but I am using ViewBag to do so. I would like to clean up my code and use ViewModel instead to sort my grid but I'm stumped in how to do so. Any help would be greatly appreciated. Thank you.</p>
<p><strong>Model</strong></p>
<pre><code>public partial class Asset
{
... | 3 | 2,771 |
PHP: array int compare error? | <p>I don't know why I cannot get the expected result.
The result shows 2 > 10 > 1 but I want 10 > 2 > 1
Can anyone help me? Thanks</p>
<pre><code><?
function reorder($a, $b)
{
$a = substr($a, strlen("a/"));
$a = substr($a, 0, -strlen(".php"));
$b = substr($b, strlen("a/"));
$b = ... | 3 | 2,230 |
How to update session array in laravel 4 - updated with new items | <p>I'm using ajax and laravel 4 and I upload files that are arrays - they are multiple. But I'm not sure how to update session array withe the new array. I've tried array_merge but it's overwrited.</p>
<p>My method looks like that:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-... | 3 | 1,142 |
Spring Integration no output-channel or replyChannel | <p>I am working on a scenario where I have to get token in 1st call and then validate that token in the 2nd call.</p>
<p>My spring integration files looks like</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
x... | 3 | 4,441 |
How to use use Pin rather than Arc to pass a Vec<u8> by reference to an async block? | <p>I want to do an operation on a <code>Vec<u8></code> multiple times using an <code>Arc</code>:</p>
<pre><code>use futures::{
executor::{block_on, ThreadPool},
task::SpawnExt,
}; // 0.3.4
use std::{pin::*, sync::Arc};
fn foo(b: Arc<Vec<u8>>) {
println!("{:?}", b);
}
#[test]
fn pin_test... | 3 | 1,092 |
@click vue calls form validate in laravel | <p>I've got a problem which I cannot explain myself:
In my Laravel view I include a form as follows</p>
<pre><code>{!! Form::open(array('route' => ['reports.store', $project->id], 'data-parsley-validate' => '','class' => 'form-horizontal')) !!}
... Some <div class="form-group"> ...
</code></pre>
<p>... | 3 | 2,058 |
Persist all the fields properly in the MySQL | <p>I work with a small API where I have all the data before I persist in the database and I can print them accordingly. So, it seems the code works as intended, but, I wasn't able to persist them in the MySQL. The entity classes are provided, </p>
<pre><code>@Entity
public class Product {
@Id
@Column(name = "... | 3 | 1,808 |
When reading bytes from a file, reads it like a list | <p>When I'm reading bytes from file using
<code>open("file.txt", "rb"")</code> python adds brackets in the beginning and end of the bytes, like list.</p>
<p>I've tried to manually cut the brackets using <code>re.sub</code> but because it is a list, I got an error code saying <code>TypeError: ex... | 3 | 1,106 |
Login Password Keeps Getting Error PHP, PDO, Salt | <pre><code><?php
require_once "pdo.php";
session_start();
// Redirect to index.php if use clicks cancel button
if ( isset($_POST['cancel'] ) ) {
header("Location: index.php");
return;
}
// salt and hash
$salt = 'XyZzy12*_';
// Check to see if we have some POST data, if we do process it
if ( isset($_POST['... | 3 | 1,377 |
Controls disabled after code executed XCode 4.5 iOS 6 | <p>I've created an app which uses the following:</p>
<p>SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook
SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter</p>
<p>The code seems to work OK and makes the posts to Facebook and Twitter but then once the posts have been complete... | 3 | 1,302 |
CSS hover result | <p><a href="http://home.scarlet.be/makhout/CarsDeluxe/wagens.html" rel="nofollow">webPage</a> </p>
<p><strong>Question #1</strong><br>
When hovering over the 'cars menu' it will fade a bit to black. I did this with jQuery.</p>
<ul>
<li>Is it possible to do that same effect with CSS(3)?</li>
<li>and is it possible to ... | 3 | 3,537 |
Angular factory.factory is not a function | <p>I am working on a recipe app with angular, and trying to set up communication with backend services using HTTP. I have been following along with angular documentation to set this up, here is the link <a href="https://angular.io/guide/http#sending-data-to-a-server" rel="nofollow noreferrer">https://angular.io/guide/h... | 3 | 2,315 |
Loader with use NotificationCenter | <p>I have code:</p>
<p>MainView.swift:</p>
<pre><code>override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(true)
// Register to receive notification
NotificationCenter.default.addObserver(self, selector: #selector(MainViewControler.StartUpdatingSplash), name: NSNotification.Na... | 3 | 1,965 |
C++, OOP, operator overloading errors? | <p>When I try using the <code>+</code> and <code>*</code>operators for both of my classes, I get errors.
For overloading <code>+</code> I get: <code>Invalid operands of types nod* and nod* to binary operator+.</code>
Same for <code>*</code>,and for the overloaded operators in my matrice class.</p>
<pre><code>#include&... | 3 | 5,119 |
how to set UI on 5.4'',7'' and 10.1'' screens in android? | <p>I am trying to set user interface in android on extra large screens that is 5.4'',7'' and 10.1''. I am unable to set the user interface on the following Screens. Because i am setting its interface in layout-xhdpi but it is picking the layout-mdpi. Please guide me how can i fix this problem.</p>
<p>this one is layou... | 3 | 3,694 |
Library Project - How to Pull an Object from an Array and Display it on HTML element? | <p>Im building a small Library App/Project. I have a form that when you enter in a "Book Title" the javascript searches through the Array of object with a match and then Displays all of the Books info to the HTML "Library Card"</p>
<p>However it isnt working, but I think my logic is good. Can you he... | 3 | 1,782 |
How do I segue from a tableviewcell and pass different data from each cell to the next tableview? | <p>I'm trying to practice making list apps with models by making a class to represent each list item. I have a Category class which contains three properties - two strings and one array of strings. Here is the class:</p>
<pre><code>class Category {
var name: String
var emoji: String
var topics: [String]
/... | 3 | 1,074 |
Form navigation confusion in Spring | <p>I am working on a Spring project </p>
<p>From the Controller AddForm.java a request is forwarded to a Form.jsp & onsubmit from there comes back to the same controller. </p>
<p>Code below</p>
<p>Form.jsp</p>
<pre><code><%@ include file="/WEB-INF/view/include.jsp" %>
<%@ include file="/WEB-INF/view/he... | 3 | 1,679 |
Android JSONObject issue | <p>I have splash activity that downloads JSON data from URL using asynctask and pass it to new activity witch needs to parse it and fill the listview , but after downloading application crashes, in the log chat said that it canot convert string to json object , here is code of splash activity </p>
<pre><code>public cl... | 3 | 4,239 |
Is it possible to clear objects with the get property after calling the class? | <p>this below to sample code;</p>
<pre><code> private ExampleStatus _status;
public ExampleStatus status
{
get
{
if (_status == null) _status = new ExampleStatus();
//if (_status.receivedData) _status.receivedData = false; //this line is incorrect !
ret... | 3 | 1,048 |
Move lambda to a new vpc in stack update | <p>I have a stack that I can make multiple copies of by using an identifier and a second one that interfaces with it by a lambda if that is given an identifier.</p>
<p>If I attempt to update the interfacing stack to a new identifier which would involve the lambda moving to a new VPC, subnet and security group it fails.... | 3 | 1,067 |
Android - LiveData is not unsubscribed when fragment is refreshed | <p>So I have a weird scenario. I implemented an app which has a single Activity and two fragments. Both fragments have a filter option where they can select a category. </p>
<p>Based on the category, the current fragment will refresh & fetch data with the new category. </p>
<p>I am using ViewModel to fetch the da... | 3 | 1,862 |
throwing error on placing a new order | <p>i have create a new store and add some item on that store. more than 2 or 3 times i can place order but now when i checkout my cart it shows me error.</p>
<pre><code>at VirtoCommerce.Client.Api.OrderModuleApi.<OrderModuleProcessOrderPaymentsAsyncWithHttpInfo>d__52.MoveNext() in C:\inetpub\wwwroot\vc-community... | 3 | 1,381 |
HTML table doesn’t refresh after Jquery ajax request | <p>I want to cancel all user changes in the html form ( id=”edit_cat_frm”) (edit cells in tables, delete rows in table( id ‘cat_list’) and changes order with drag’n’drop) with reset button (id=”reset_edit_cat”), so I decide to do this with AJAX.</p>
<p>Jquery ajax request is OK, but my main HTML table with id ‘cat_l... | 3 | 19,539 |
jQuery trigger to fire a method when a <li> is added to <ul> | <p>I have a PHP page that uses <code>flush()</code> and <code>ob_flush()</code> to output progress to a browser. The page is outputting a styled <code><ul class="progresslog"></code> where individual <code><li class="{success|warning|error}"></code> elements are being flushed to the browser. </p>
<p>I woul... | 3 | 1,089 |
React DOM update on fetch | <p>I'm working on a typescript react project to add and display some accounts on a wallet..
I have created a useAPI function that makes my calls and returns the state of the call as well as the retrieved data</p>
<p><strong>api/index.ts</strong></p>
<pre><code>import { useCallback, useEffect, useState } from "reac... | 3 | 5,812 |
malloc() is returning the same address multiple times, even when I haven't used free() | <p>EDIT: I did use free(), ignore the title. </p>
<p>The gist is that every time <code>malloc()</code> is called, the address <strong>0x8403620</strong>
is returned, which I found out using Gdb. </p>
<pre><code>tellers[i] = create_teller(0, i, NULL);
</code></pre>
<p>I first use <code>malloc()</code> on line 72 to c... | 3 | 2,847 |
I cannot load the kernel of a Raspberry Pi and use modprobe afterward in order to use i2c_stub | <p>I am trying to read from virtual sensors on a Raspberry Pi B3. I want to create the virtual sensors on the i2c port. The first thing I did was enable the i2c port of course. With the commands below I can see if the i2c interface is working:</p>
<pre><code># i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c ... | 3 | 1,394 |
How to get the last URL link element using BeautifulSoup | <p>How do I get the last html link from a given page using BeautifulSoup? I am trying to get a link that contains lenta.ru in it. However, if a webpage contains more than one lenta.ru it prints every lenta.ru. However I would like to just get the last lenta.ru link which is the pointer link for the translation.</p>
<p>... | 3 | 1,480 |
VS17 not initializing pointer | <p>My problem is that this code is not working in VS 2017 while in CLion it works.
VS says:</p>
<blockquote>
<p>Severity Code Description Project File Line Suppression State
Error (active) E0144<br>
a value of type <code>void *</code> cannot be used to initialize an entity of type <code>queue_t*</code... | 3 | 2,839 |
Slideshow Gallery made into automatic gallery | <p>Trying to make this slideshow gallery automatically rotate. I have posted the HTML, CSS and Javascript to this question for you to understand what the slideshow is doing. I am new to javascript and need a little bit of guidance if you are able to lend a hand on this project.</p>
<p><div class="snippet" data-lang="j... | 3 | 2,959 |
Location in Android 6.0.1 returns 0.0, but works in 4.0.1 | <p>I've searched for solutions to this and tried the ones I could find that were pertinent, but still can't get this to work. A specific section of code is not running. The issue I'm having is that this all works on my old NEC Terrain (4.0.1, API 15), but will not work on my new Blackberry Priv (6.0.1, API 23). In t... | 3 | 2,990 |
How to make a element follow another element when dragging with jquery? | <p>I need make a element follow another element when dragging, but with delay in the animation, is similar to "Chat heads of facebook's messenger", you know, the bubbles on Android.</p>
<p>This is my jQuery plugin:</p>
<pre><code>// Draggable plugin
(function($) {
$.fn.drag = function(options) {
options = $.exten... | 3 | 1,640 |
No refresh on Ng-repeat after a $http deletion | <p>After deleting an entry from my collection, values of the deleted object are gone, but the <strong> line (blank) remains.</strong> (tried apply()...no success)</p>
<p>I have a typical CRUD ui with a view of expenses.</p>
<pre><code> <table class="table table-striped">
<tr>
<td>Titre&l... | 3 | 1,032 |
Need Help Figuring Out Some clang-format Options | <p>While using clang-format (8.0.0) I am encountering weird formatting issues that I feel may be bugs. I don't want to jump the gun and report them as bugs without knowing if I'm doing something incorrectly or missed a configuration setting though. I have a few examples of where I feel my settings are not being adhered... | 3 | 2,285 |
Tensorflow - training weights via GD by hand | <p>I am new to Tensorflow and I want to train a toy neural network to solve the xor problem. I want to be able to pass in two bits as inputs and have 1 bit as an output. I will have 4 training examples: <code>[0,0], [0,1], [1,0], [1,1]</code></p>
<p>I understand how the forward feed works but I do not exactly know how... | 3 | 1,360 |
Android: ListView, at the same time remembering and forgetting its getCheckedItemPosition after rotation/configuration change | <p>I really can't make this up so I'd be thankful for any hint. I must make some mistake here (4.1.2).</p>
<p>I have an <code>Activity</code> which, in <code>onCreate()</code>, sets up a subclassed <code>ArrayAdapter</code> for <code>ListView</code> items which render as a <code>Checkable</code> <code>ViewGroup</code>... | 3 | 1,199 |
Trouble writing and reading SQLite database in Android | <p>I am writing an App that will read data from an xml file on a remote server and then place it into an SQLite database on the phone/tab. I know it is successfully reading the data from the xml and placing it into the SQLite .db file. However, the problem is the rest of my app acts as though the SQLite .db file is emp... | 3 | 1,091 |
Automatically resizing font-size in ng-repeat | <p>I am currently trying to resize font-size to fit inside a fixed size div. I found this interesting piece of javascript code doing the job very well</p>
<pre><code> $('#defect-text div').css('font-size', '1em');
while ($('#defect-text div').height() > $('#defect-text').height()) {
... | 3 | 1,029 |
Fill area for different series in highcharter for opposite directions | <p>So I have 5 series all between -1 and 1, 4 of those series are boundries. I want to plot the bottom two series (i.e the two that are between 0 and -1) with their area filled down to the x-axis foot. Then exactly the opposite for the two series (between 0 an +1) filled up to the x-axis head. While the last series is... | 3 | 1,964 |
Why does parameterized constructor with vector of strings as argument does fail to compile? | <p>In below code default constructor as well as parameterized constructor with int argument are creating temporary objects. But vector of string as a parameter to constructor is not even compiling. Can anybody explain this behavior?</p>
<pre><code>#include <vector>
#include <string>
class C { ... | 3 | 3,011 |
Why does a Try work here when the parameter does not expect a Try? | <p>I'm reading <a href="http://danielwestheide.com/blog/2013/01/09/the-neophytes-guide-to-scala-part-8-welcome-to-the-future.html" rel="nofollow">The Neophyte's Guide to Scala Part 8: Welcome to the Future</a> and one part of code I'm confused about is this:</p>
<pre><code>import scala.util.Try
object CoffeeSync exte... | 3 | 1,119 |
UI Gird filter - Invalid regular expression | <p>I'm using Angular UI grid to show fields.</p>
<p>I have a textbox that user can filter for all columns in the grid. But when the user put text like "(" or "*" is generated a error: Invalid regular expression</p>
<p>Below is the code:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true"... | 3 | 1,606 |
Having trouble POSTing nested JSON using PHP | <p>I'm trying to send some form data as a JSON object to a <a href="https://cmsamp.secure.force.com/GenericApp/services/apexrest/GenericApp" rel="nofollow">sample app on Force.com</a>. I get the form data using jQuery and POST it to a PHP file on my server which then sends it to the sample app linked above. The respons... | 3 | 1,160 |
TickLabels are missing in Jfreechart | <p>I am using eclipse e4 and JfreeChart. The ticklabels in both xaxis and y axis are not visible. </p>
<p>The following is the code snippet I have used.</p>
<pre><code>public class showGraph {
String title = null;
final TimeSeriesCollection dataset = new TimeSeriesCollection();
Map<String,Map<String,Map<Stri... | 3 | 1,092 |
How to customize the ImageButton style? | <p>I am making a numeric keyboard.
<a href="https://i.stack.imgur.com/m8los.png" rel="nofollow noreferrer">keyboard appearance</a></p>
<p>I have a problem with the decoration of the return button.
If I use ImageButton, then I get an indent from the top, as in the picture:</p>
<p><a href="https://i.stack.imgur.com/KQEPj... | 3 | 1,970 |
Django nginx invalid HTTP_HOST header | <p>I am getting emails every day from bots hitting my server with the wrong http_header. I followed the steps here:
<a href="https://stackoverflow.com/questions/25370868/django-error-invalid-http-host-header-u-run-myprojectname-gunicorn-sock/44118369#44118369">Django ERROR: Invalid HTTP_HOST header: u'/run/myprojec... | 3 | 1,029 |
blazor-webassembly upload file can't show progress? | <p>i want realize a big file upload progress demo,but below code can't working normal.
if remove the code "await Task.Delay(1)" in ProgressableStreamContent class,and id "mybar" element not refresh UI.
if add "await Task.Delay(1)" ,it's work normal.can refresh UI,show progress. why?
Has... | 3 | 2,128 |
Writing and reading data between two nodejs servers using node serial port | <p>I would like to send "Hello world" from one nodejs server to another using node-serialport. I have verified that the radios connecting the two are connected and sending info because they keep displaying buffer information after running my current code.<br />
here is what I have so far.</p>
<p>server1</p>
... | 3 | 1,082 |
How to filter rows that satisfy condition based on consecutive sequence? | <p>I want to subset rows in a dataframe on the condition that a specific sequence of values happen in one row. For example, if in one of the variables there was a pattern 2 | 4 | 5 one after another row by row, that these three rows would be retained, then the search would continue until it found another set of rows th... | 3 | 1,936 |
How is my TicTacToe game returning the winner as X when it was O | <p>I am a relatively new programmer and I have created a Tic Tac Toe game with a way to alert the user who won the game. The problem is, when O wins diagonally, It retaines an alert when X won the game. I can't seem to find a problem in the code.</p>
<p>My source code is at this URL: <a href="https://justpaste.it/6t0zo... | 3 | 1,243 |
why a command in makefile is always executed even of all Prerequisites is nothing change? | <p>I have a C project , the struct is as the last part of this questions,<br />
there is a main makefile in root and 3 makefile in AppCode\Comp2 AppCode\Comp3 AppCode\headlamp</p>
<p>I want to :</p>
<ol>
<li><p>compile all c file in AppCode\Comp2 to object files , then archinve these object file to a library file ... | 3 | 3,490 |
Find distance between line segments expressed using spherical coordinates | <p>I am trying to find Distance between two linesegments expressed in degrees(latitude, longitude). For example,</p>
<pre><code>LINESTRING1 is ((4.42553, -124.159), (4.42553, -124.159)) and
LINESTRING2 is ((-0.061225, -128.428), (-0.059107, -128.428))
</code></pre>
<p>However, the usual way to find this distance is g... | 3 | 2,603 |
Showing image from imageURL in UICollectionView using server response | <p>What I am trying to do is render image in a <code>UICollectionView</code> from <code>imageUrl</code> which is coming from server as response. There is no issue with <code>UICollectionView</code> as I have already tested it with <code>hardcoded URL</code>. The problem starts when I try to load it with the <code>array... | 3 | 1,337 |
how to retrieve Json as string from url? | <p>I have a URL which returns JSON. I am developing an app in windows phone where I want to get that json data by sending the url and then convert it into string and extract data from it. I have downloaded json.net to read the json data.<br>
Do I have to deserialize the data.. Is that necessary?<br>
Can't I just get th... | 3 | 1,061 |
I have a below array with some same keys with different values. How can I combine same keys values with that key in PHP? I am using WAMP, Codeigniter | <p>I am getting these data from importing CSV file. In CSV file I have 1st column is Years and all other columns are Make. I am using csvreader library for parsing data from CSV file.</p>
<p>My CSVReader Library.</p>
<pre><code>class CI_Csvreader {
var $fields; /** columns names retrieved after parsing */... | 3 | 2,884 |
Display data in new row using Excel VBA from SQL Server | <p>I want to display max(value) of the different oven in a column.</p>
<p>I tried working on it but it is overwriting the next max(value) and feeding it into the same cell instead of displaying it in different rows in the column.</p>
<pre class="lang-vb prettyprint-override"><code>Sub TakeDataFromServer()
Dim co... | 3 | 1,459 |
Register Form not saving to database: Django? | <p><em>Weird issue with by registration form, not sure i am doing wrong.</em></p>
<p>I have <code>StudentProfile</code> Model, that I am trying to save data from <code>StudentResistrationForm</code> but the <strong>data is not being saved into database</strong></p>
<blockquote>
<p>ERROR: NameError at /register/ nam... | 3 | 1,372 |
openerp7 module conversion for odoo8 | <p>I'm not a programmer so I would really appreciate if anyone could correct the code for a module to work in odoo 8 that was built for openerp 6.1 & 7
The module should retrieve the incoterms from suppliers and display them on the purchase order.</p>
<p>Here is the code of the module.py:</p>
<pre><code>import ti... | 3 | 1,467 |
How to toggle change background of a list item in android | <p>What's wrong there? I have a listview and I want to change the background of an item on clicking list item.If I select an item and then click on different item then toggle the background to the another. This is the single selection process</p>
<pre><code>if (convertView == null)
{
convertView = mInflater.inflat... | 3 | 1,592 |
How To Display Number In Post Wordpress | <p>I want to display the sequence number in the wordpress loop in the sidebar by category Software but the number in the sequence is not showing, I don't know how to display it.</p>
<p>i want to show number like this</p>
<p><img src="https://i.stack.imgur.com/Vy5M1.png" alt="enter image description here" /></p>
<p>this... | 3 | 1,267 |
Laravel Ajax does not get the value from the form to Controller | <p>In Ajax code I have <code>action = 'contact';</code>, contact is used in route file:</p>
<pre><code>Route::post('contact', array('uses' => 'FormsController@send', 'as' => 'post_form'));
</code></pre>
<p>In route file I have <code>FormsController@send</code> it is file php to send email:</p>
<pre><code>$name... | 3 | 1,644 |
Python3: Can't get Gtk.SpinButton value | <p>I'm trying to create a Program in <code>Gtk3+</code>.
However, I can't work out how to call my <code>Gtk.SpinButton</code> value to use to drive the number of actions to perform later in the code (not written yet). </p>
<p>The class <code>initiate()</code> at the end of the code is where I will execute commands ba... | 3 | 1,534 |
Implementing Google Pay Android Application using BlueSnap sdk | <p>I have downloaded BlueSnap Demo App from <a href="https://github.com/bluesnap/bluesnap-android-int" rel="nofollow noreferrer">https://github.com/bluesnap/bluesnap-android-int</a>. I have created sandbox account. I want Google Pay as a payment method. When I am selecting card payment through bluesnap it successfully ... | 3 | 2,847 |
Assigning passive values or constants to a user-defined type | <p>So I'm working on an automatic differentiation toolbox in Fortran using operator overloading. I have previously implemented this in C++ but really need to get it to work in Fortran.</p>
<p>I have the following module defined in Fortran:</p>
<pre><code> module adopov
integer :: indexcount
... | 3 | 1,243 |
Uncaught SyntaxError: Unexpected token JSON | <p>Hi Every one I'm trying to get this json file from a web service from this website : "http://172.20.192.218:8080/DC_Local/rest/datacorrelation?type=/soccer/football_team&limit=20&callback=?"</p>
<p>However I'm getting this "Uncaught SyntaxError: Unexpected token"
But I dunno whats wrong.</p>
<p>this is my... | 3 | 1,129 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.