title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How to disable the next button in slick plugin? | <p>Basically i am trying to create the quiz, I'm using slick plugin for carousel effect. Only on the selection of the answer the next button should be enabled.On page load the next button gets disabled after selecting the answer for that particular question the next button gets enabled. If we click on next we will get ... | 2 | 5,211 |
How to determine how many times will a statement inside a loop will be executed with conditional statements | <p>There is a test that consists of 12 questions. each question must have a value greater than 4 points. all the question must add to 100. also all the questions must have an integer value.
so a possible combination may be 5,5,5,5,5,5,5,5,5,5,5,45</p>
<p>there is a method that theoretically will give this result:</p>... | 2 | 1,703 |
WPF Caliburn Micro: Exchanging UserControls in a Window dynamically using ContentControl | <p>This question is related to <a href="https://stackoverflow.com/questions/10971253/add-a-usercontrol-to-caliburm-micro-dynamically">Add a usercontrol to caliburm micro dynamically</a>.
I have read any other related threads before open this new thread, but I still don't understand and find no solution. Please accept ... | 2 | 1,477 |
Create a wrapper around a third party dll to abstract the dll and to be able to unit test my code | <p>I have been assigned to help out on a legacy system; this system has a reference to a third party library throughout the application(more than 2000 times). There isn’t a single unit test within the application and this is a mission critical system.</p>
<p>What I would like to do is refactor the code so that the thi... | 2 | 2,483 |
Windows service starts on Windows 7 but fails to start on Windows Server 2008 R2 | <p>I have created a wcf service which is deployed via a managed windows service. what the onstart() does is it creates and opens a tcp host for the wcf serice.</p>
<p>everything works fine in windows 7 but when I try to install the service in windows server 2008 R2 the service starts and then stops with the error that... | 2 | 1,167 |
kotlinx.android.synthetic not found when running gradle | <p>I'm using Kotlin Android Extensions.
My project gradle:</p>
<pre><code>buildscript {
ext.kotlin_version = '1.2.41'
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
...
</code></pre>
<p>My app gradle:</p>
<pre>... | 2 | 1,198 |
Convert geojson to geopandas dataframe | <p>I am using OpenRouteService API and I am trying to convert the GeoJSON result of the GET Directions service to a GeoPandas dataframe and, in the end, store it as a spatial PostGIS table. My code so far is: </p>
<pre><code>import pandas as pd
import geopandas as gpd
import sqlalchemy as sa
import openrouteservice
d... | 2 | 2,782 |
Change background color to a limited area of a view - Android | <p>I am trying to develop a BarcodeReader using Google play services, and i would like to get a camera surface background like Zxing sample.<a href="https://i.stack.imgur.com/psKB0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/psKB0.png" alt="zxing sample image"></a></p>
<p>Actually I view with a ... | 2 | 2,832 |
An object reference is required for the non-static field, method, or property 'HttpContext.Request' | <p>I don't know how to solve the following problem:</p>
<p><code>An object reference is required for the non-static field, method, or property 'HttpContext.Request'</code></p>
<p>I am using the new Visual Studio 2015 with ASP.NET 5 MVC 6. In that Version the HttpContext.Request is an abstract method and i dont't know h... | 2 | 2,431 |
SwiftUI Can't Extract Subview, Core Data, Custom Modifier | <p>I have a SwiftUI list/detail app with many data fields that are all the same except of
course for the data. I am trying to extract a view but cannot seem to get the
connections correct.</p>
<p>The data is in Core Data and the entity of note is Patient. I pass a patient record to
the detail view. Everything works wh... | 2 | 1,744 |
jQuery UI Sortable - Strange behaviour - items falling from the top of window on move | <p>I'm experiencing some very strange behaviour with jQuery UI sortable.</p>
<p>I'm using jQuery 1.10.2 and jQuery UI 1.10.3.</p>
<p>In FF the first time you move an item, it works fine but after you have moved it once, when you move it again, it jumps and falls from the top of the window to under your cursor rather ... | 2 | 1,461 |
Returning related data records in yii2 using relations | <p>I would like to get data of a user and his roles but it returns an error of:</p>
<blockquote>
<p>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'auth_item.user_id' in 'on clause'
The SQL being executed was: SELECT COUNT(*) FROM `tblusers` LEFT JOIN `auth_item` ON `tblusers`.`id` = `auth_item`.`us... | 2 | 1,976 |
How to implement Audio calling on sockets in Android | <p>I have searched and found a code of voice streaming or audio calling between two android phones on simple sockets. I have implemented this , but this code is not working. I am unable to hear any voice.</p>
<p>Receiver Code :</p>
<pre><code> private int sampleRate = 44100;
private int channelConfig = AudioFo... | 2 | 2,026 |
How to delete Many - Many Relationship (Only Joining Table) | <p>I'm using Entity Framework Core in an ASP.NET Core application. I want to be able to delete the joining linking row in a many to many relationship table (where you only have table1Id & table2Id columns linking the many to many relationship) but the only options I have are </p>
<p>1) SetNull (which I'm assuming ... | 2 | 1,548 |
Webpage background image won't load | <p>I'm using the following css to define my background:</p>
<pre><code>body
{
background-image: url('background.png');
font-size: 12pt;
font-family: Veranda, Arial, Helvetica, sans-serif;
}
</code></pre>
<p>The image <code>background.png</code> is stored in the root directory, but whenever I refresh the w... | 2 | 1,026 |
Progress bar loading before I select the Tab | <p>Here is my code for Tab Initialization:</p>
<pre><code> private void initTabs() {
serviceTabs.addTab(serviceTabs.newTab().setText("Request Appointment"));
serviceTabs.addTab(serviceTabs.newTab().setText("Online Booking"));
serviceTabs.addTab(serviceTabs.newTab().setText("Feedback")); ... | 2 | 1,899 |
Memory leak with SWIG | <p>I have a class that upon initialization, reserves an array of pointers with "new". Upon destruction, that array of pointers is released with "delete[]".</p>
<p>There's no problem when running the code <em>without</em> python. However, when I "swig'it" and use it as a python module, something weird happens. The d... | 2 | 2,418 |
Not able to get location using GPS | <p>I am developing one app. In which, I need to get the current location of the user. I am getting current location using Network but when I start the GPS its not showing me current location. What coubld be the problem? </p>
<pre><code>public Location getLocation() {
try {
locationManager = (LocationManage... | 2 | 1,821 |
SliverGrid not working with CustomScrollView, SliverAppBar and TabBar/TabBarView | <p>I am trying to implement a SliverAppBar with a TabBar. In one tab I want to put the SliverGrid and in another I want to put a SliverList. The base code to get the SliverAppBar and TabBar is as follows. The tab content is just the Text() element. What I want is an expanded app bar which contains an image and some oth... | 2 | 1,912 |
EF Core - Not loading all child entities | <p>I have 3 entities: </p>
<pre><code>public partial class Category
{
public int CategoryID { get; set; }
public string? CategoryName { get; set; }
public ICollection<BookCategory> BookCategory { get; set; }
}
public partial class BookCategory
{
public int CategoryID { get; set; }
public in... | 2 | 2,106 |
Writing a sync application using Windows Service to process files in Parallel | <p>I have a folder on my windows server, where people will be uploading CSV files to, <code>C:\Uploads</code>.</p>
<p>I want to write a simple windows service application that will scan this uploads folder (every 5 seconds) and collect the files in and process them in parallel (Thread /per File?). However, the main sc... | 2 | 1,037 |
Uploading xml file to server using Android Service | <p>I am developing an application in android wrein I call a service that will upload a xml file to the server on click of a button.Problem is when I click the button first time it dosent get uploaded but when I click the button second time its gets uploaded...so let me know if there is any solution..pls help me.</p>
<... | 2 | 5,554 |
COM - Access is denied | <p>I have been stuck now for about 5 days with this problem now. </p>
<p>Basically I'm trying to connect to an OPC server (Kepware) from a remote pc. The code I have written works if I run it on the server where Kepware is installed (in this example 192.168.102.104).</p>
<p>However if I run it from a remote PC I get ... | 2 | 1,548 |
WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0003: Could not index class | <p>I have following pom.xml</p>
<pre><code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mk... | 2 | 3,299 |
Execute ffmpeg command from python with subprocess | <p>The following command works fine from the command line:</p>
<pre><code>ffmpeg -y -threads 4 -i /dev/video0 -filter_complex "[v:0]scale=-2:720:force_original_aspect_ratio=decrease[vout001]" -c:v libx264 -b:v 2800k -maxrate:v 2996k -bufsize:v 4200k -c:a aac -b:a 128k -ac 2 -ar 48000 -preset veryfast -x264opts keyint=... | 2 | 1,113 |
hide command usage argument on browser of shell_exec PHP in windows | <p>I make the traceroute web based. I use shell_exec to execute the process and show the output via browser. I have problem with the first I call the page on browser. There is usage of tracert command show. I try to hide it by place the script inside the function. yes, it works but another element like map when I start... | 2 | 1,663 |
Raspberry Pi and Edimax 7811UN incompatibility in ad-hoc mode | <p>I am using the <strong>Raspberry Pi Model 2 B</strong> with 1 GB RAM with the <strong>EDIMAX nano USB Adapter</strong>. At first I was using <strong>NOOBS</strong> on the Rapsberry Pi and wanted to set up an ad-hoc network between two such Pi's.</p>
<p>I tried configuring one of the RPi with the same configurations... | 2 | 1,138 |
To call a Self Hosted WCF service from another Net.Tcp WCF service running on IIS 7 | <p>I have a NetTcp Self Hosting service running on my client machine, and there is another NetTcp service running on IIS on the server. I am trying to consume the self hosted service from the service in IIS. It is throwing an exception with a timeout error.</p>
<p>I used the WCF Test Client to test the self hosted ser... | 2 | 1,214 |
Reading values from SQLite Database for Google Map Markers | <p>I'm trying to read position (Latitude, Longitude) values and a title from a pre-made SQLite database. The problem I'm getting is that it seems to display a Marker on the map, but has nothing to do with the values in the DB - it's almost as if they're being read incorrectly.</p>
<p>My MonumentsDatabase.java class (w... | 2 | 6,982 |
Gtk, Glade and OpenGL issue | <p>I've got some problems with Gtk+, Glade and GtkGlext.</p>
<p>The code:</p>
<pre><code>#include <gtk-2.0/gtk/gtk.h>
#include <gtkglext-1.0/gtk/gtkgl.h>
#include <GL/gl.h>
GtkBuilder* mBuilder;
GtkWidget* mWindow;
GtkWidget* mAbout;
GtkWidget* mGlArea;
GdkGLConfig *mGlConfig;
GdkGLConfigMode mGlCo... | 2 | 1,423 |
Libcpmt.lib: Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' | <p>While compiling a current project I get a bunch (about 80) of Linker errors that I don't know anymore how to debug further.</p>
<p>I am using Visual Studio 2019. It's a C++ project compiled on Windows 10.</p>
<p>A lot of them come from a library called libcpmt.lib.
There are 2 types of error related to the library:<... | 2 | 3,661 |
Update Side menu after logging in ionic 5 | <p>I have to update the data in sidemenu after user logs in. I'm using Ionic 5. This is my app.component.ts which has the side menu.</p>
<pre><code> import { Component, OnInit, Inject, NgZone } from '@angular/core';
import { Router } from '@angular/router';
import { Platform } from '@ionic/angular';
import {... | 2 | 3,603 |
How to put value in textbox getting as a parameter in request object | <p>I have a textbox whose value I want to set with the value I get as a parameter in the request from user. </p>
<p>For example, the request is :
localhost:8084/quiz/login.jsp?uname=manish
I want to display "manish" in the textbox in the form.</p>
<p>How can I do that?
Here is the full code of my login.jsp</p>
<pre>... | 2 | 1,314 |
What can cause Phong specular shading to produce gamut overflows? | <p>I am currently implementing a basic raytracer in c++. Works pretty well so far, matte materials (with ambient and diffuse brdf) work as expected so far.</p>
<p>Adding specular highlights would result in the full <a href="http://en.wikipedia.org/wiki/Phong_shading" rel="nofollow noreferrer">Phong Model</a> and that'... | 2 | 2,195 |
Jogl Applet with JNLP runs in eclipse but not in the browser | <p>I am developing an applet for some OpenGL ES stuff using JOGL. In eclipse I can start the applet but in the browser I have trouble because the java console prints a NoSuchMethodError in my line where I create an instance of GLCanvas.</p>
<pre><code>GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
GLCapabilities ca... | 2 | 2,047 |
Webpack Compilation Error with Typescript and JSForce | <p>I am using JSForce with Typescript with CypressIO however each time i attempt to run my code i receive the following:</p>
<pre><code>Error: Webpack Compilation Error
./node_modules/csv-parse/lib/es5/sync.d.ts 3:7
Module parse failed: Unexpected token (3:7)
You may need an appropriate loader to handle this file type... | 2 | 1,391 |
Blazor server page with parameters throwing "404 not found " on manual refreshes | <p>I have a Blazor Server app with a page that takes in parameters in the uri. When I click on an anchor tag that has the route setup to hit that page with params (like below) the link works fine, and the page loads.</p>
<pre class="lang-html prettyprint-override"><code><a href="/MyPage/{@Param1}/{@Param2}"... | 2 | 1,266 |
how to join to files with awk/sed/grep/bash similar to SQL JOIN | <p><strong>how to join to files with awk/sed/grep/bash similar to SQL JOIN?</strong></p>
<p>I have a file that looks like this:</p>
<p><img src="https://i.stack.imgur.com/s83g5.png" alt="enter image description here"></p>
<p>and another one that looks like this:</p>
<p><img src="https://i.stack.imgur.com/9G0q5.png"... | 2 | 2,850 |
Port Audio Won't Install Due to Deprecated Core Audio Functions | <p>I've been trying to install Port Audio onto my Mac for a little bit and I've hit a brick wall. Every time I try to install it using:</p>
<pre><code>./configure --disable-mac-universal && make
</code></pre>
<p>It exits with an error code of 1 because CoreAudio has deprecated functions. I heard that CoreAudi... | 2 | 2,818 |
Setting text in EditText with input type number | <p>I am using a TextEdit that only accepts numbers as input type and I would like to set the value of the TextEdit when a button is pressed. However, I can't get this to work.</p>
<p>When I just do textWithAmount.setText(balance), with balance being a long, I get a squiggly line saying that this doesn't conform the set... | 2 | 1,190 |
Android unable to add getByName | <p>I'm trying to add getByName to get the IP address of a hostname and use it in my POST command
the problem is wherever i insert this code it crashes
i tried to insert in doInBackground it also crashes So where should i insert it ??</p>
<pre><code>package com.example.loginad;
import java.net.InetAddress;
import j... | 2 | 3,661 |
Conditionally redirect users after login in laravel backpack | <p>I have some roles asigned to users. I would like to have a user redirected after login to different urls in order the role that user belongs to.
I have followed this post but it didn't work to me. I don't know if using backpack it would be different.</p>
<p>Best regards.</p>
<p>Edit.</p>
<p>This is the code in th... | 2 | 1,185 |
docutils/sphinx custom directive creating sibling section rather than child | <p>Consider a reStructuredText document with this skeleton:</p>
<pre class="lang-none prettyprint-override"><code>Main Title
==========
text text text text text
Subsection
----------
text text text text text
.. my-import-from:: file1
.. my-import-from:: file2
</code></pre>
<p>The <code>my-import-from</code> direc... | 2 | 1,246 |
Combine Time-series with time-invariant data in RNN/LSTM using Keras Functional API | <p><em>Update: As <a href="https://stackoverflow.com/users/5140223/rvinas">rvinas</a> pointed out, I had forgotten to add inputs_aux as second <code>input</code> in <code>Model</code>. Fixed now, and it works. So ConditionalRNN can readily be used to do what I want.</em></p>
<p>I'd like to treat time-series together w... | 2 | 1,529 |
IdentityServer and ADFS | <p>I'm trying to setup IdentityServer to use ADFS for authentication. The flow will be:</p>
<p><strong><em>User -> Custom app -> IS -> ADFS</em></strong></p>
<p>I've setup almost everything, but I'm stuck at the communication between IS and ADFS. The user seems to login successfully in ADFS, but I get an error:</p>
... | 2 | 2,706 |
Can't redirect with REACT-ROUTER-DOM | <p>I've got this search method where I want to redirect the user after searching. The issue is that it does not do anything and I don't know why. this.props.history IS defined but the "location" property of the object "history" does not seem to change accordingly to what i put in the parameters of the push method ('./c... | 2 | 2,330 |
Cmake Regenerate on variable change | <p>Y Part:</p>
<p>I've got a CMake macro that runs an external program and creates project specific variables. What I'd like to have CMake do is to run this script on every build, check if the variables have changed, and iff they have (to prevent full project rebuild when it has not), regenerate a CONFIGURE_FILE heade... | 2 | 3,439 |
Is there a way to convert tables of text into a PowerShell Object | <p>There are many tools that output their data in in a table format. One such example is diskpart. Shaving off some extraneous output, you would get something like this.</p>
<pre><code>Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 136 ... | 2 | 1,507 |
Show PDF in iOS from pdf data | <p>I'm trying to show a pdf in my iOS app using Swift. The response I get from the server is the pdf data and it's looking like this:</p>
<blockquote>
<p>%PDF-1.4 %ÓôÌá 1 0 obj << /CreationDate(D:20180403085232+02'00') /Creator(PDFsharp 1.32.3057-g (www.pdfsharp.net)) /Producer(PDFsharp 1.32.3057-g (www.pdfsha... | 2 | 1,235 |
CORS Issue with Rails 4, omniauth-facebook, rack-cors, Heroku | <p>Summary:</p>
<p>I have a CORS problem. I'm trying to authenticate with Facebook from a React app with a Rails API.</p>
<p>My app runs on localhost:8080 and my api runs on Heroku.</p>
<p>I'm able to login to facebook and create a session on callback, but the cookie set by facebook isn't picked up by omniauth. I us... | 2 | 1,614 |
Spring Security CORS Issue: "OPTIONS http://localhost:8080/ 403 ()" | <p>I've been working on a project using spring + spring security on my backend and have recently run into an issue with cors specifically:</p>
<p><a href="https://i.stack.imgur.com/NAmzp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NAmzp.png" alt="The first two lines you can see successful api ca... | 2 | 1,057 |
Kendo UI Grid Basic implementation | <p>I’m trying to implement the basic functionality of the Grid, in that while compiling my project I’m getting an error saying “Object Expected”</p>
<p>With the below lines of code:</p>
<pre><code> $(document).ready(function() {
$("#grid").kendoGrid({
dataSource: {
... | 2 | 1,794 |
RadioButton change state during listview scolling | <p>I have a ListView, which has a TextView and a RadioGroup with 2 RadioButtons as Children in each row. Now i can select a RadioButton in each row. But if i scroll the ListView, my Selection is gone or it does not show correctly. For example, i choose the RadioButton A in the first row, if i scroll the ListView and th... | 2 | 2,546 |
Uploading files in varbinary(MAX) | <p>I have a database table with two field of type varbinary(max), which i use to store files. </p>
<p>However, I am unable to upload the files as expected. I've been stumped for this problem for a long time and I'm not sure what I can do to resolve it. There is an error message:</p>
<pre><code>An exception of type 'S... | 2 | 2,089 |
heroku run rake db:migrate, undefined method | <p>When I try to migrate my db over to heroku, I get this error. I think it may have something to do with Paperclip. When I rake my db locally on my computer, it works fine though. </p>
<p><strong>Error message</strong></p>
<pre><code>Running `rake db:migrate` attached to terminal... up, run.2870
(705.4ms) CREATE... | 2 | 3,989 |
How to get first row value from table? | <pre><code><table class="table table-bordered table-striped">
<thead>
<tr>
<td>
<a href="#" ng-click="sortType = 'date'; sortReverse = !sortReverse">
Date-Time
</a>
</td>
<td><a>Amount</a></... | 2 | 1,535 |
SAML2 using Thinktecture and WCF | <p>I'm setting up a SAML2 STS using Thinktecture IdentityServer and a WCF Service.
The idea is to have Thinktecture supply the Assertions that are then used in the WCF Service.</p>
<p>Now, I have it running all fine with SAML 11 Assertions - urn:oasis:names:tc:SAML:1.0:assertion</p>
<p>The assertions are something li... | 2 | 5,050 |
Error while compiling cocos2d-x v3 IOS project,on integrating AdMob (IOS) framework | <p>When i compile my cocos2d-x V3 project in Xcode, it runs fine but on including AdMob framework, it displays following linker error.</p>
<p>I already have included "-ObjC" in "Other linker" section under Build Settings.</p>
<blockquote>
<p>Undefined symbols for architecture armv7:
"_kCMTimeZero", referenced f... | 2 | 1,180 |
WPF - Observable Sorted Dictionary | <p>I have a requirement to push high volumes of data into a DataGrid (I would prefer a DataGrid as it is fit for purpose for the requirement I have). To make the UI more responsive while the data is being loaded and as the data is coming in after the initial load is complete, something fairly high performance is requi... | 2 | 6,052 |
Retrieving value from Asp.Net TextBox | <p>Problem: I have an asp.net Textbox that I am putting text into and on text change it should assign its value to a variable, this does not happens.</p>
<p>Question: What is the best method to retrieve the value from the Textbox?</p>
<p>C# Code:</p>
<pre><code>protected void btnSourceConnect_Click(object sender, Ev... | 2 | 1,781 |
Bash script working but fails in crontab | <p>I am having issues with this script/cron. I am running on a Raspberry pi and I have other cronjobs working just fine(so I know its not cron on the system). </p>
<p>My script:</p>
<pre><code>#!/bin/bash
rm -f /var/www/output/*
</code></pre>
<p>This script is working just fine in the command line
<code>bash clear... | 2 | 1,182 |
JasperReports does not maintain fonts when exports in pdf | <p>My Java application generates a pdf file filling a JasperReports's report, but when i open the pdf file the fonts it's allways "Arial", in report is set to "DejaVu Sans". </p>
<p>When I use the JasperReports functions to export to pdf file everything works good (after that i've imported the .ttf file of DejaVu Sans... | 2 | 1,669 |
Google Sheets Sidebar User Input Drop-down Menu w/ Values from Spreadsheet Range | <p>I have read a bunch of forum posts about using drop-down menus in Google Sheets, but I'm really not familiar enough with scripting to modify those solutions to meet my needs. I would really appreciate any help I can get with this!</p>
<p>This sidebar adds a new entry to the end of my Job Log sheet. It currently wor... | 2 | 2,531 |
Error occurred during initialization of boot layer java.lang.module.ResolutionException: Module A contains package B, module B exports package B to A | <p>I'm migrating my app from <strong>Java 1.8</strong> to <strong>Java 11</strong>, got the following error on one of my external jar at runtime. </p>
<blockquote>
<p>Error occurred during initialization of boot layer
java.lang.module.ResolutionException: Module image.viewer contains
package jcuda, module jcuda ... | 2 | 1,066 |
Registering click event on Google Maps Infowindow | <p>I am building a hotel website and working on the map to show hotels.
<a href="https://i.stack.imgur.com/Jif1J.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jif1J.jpg" alt="enter image description here"></a>
I am using a mix of AngularJS code and the example codes provided by Google Maps Javascr... | 2 | 1,317 |
Play & Pause Video from form control winform | <p>I want to make a form control which be able to start, pause, stop, close quiz presentation (count down time will run when start is pressed). The problem is in some presentations, there is available video (each slide can only contain a maximum of 1 video, and not every slide contains it).</p>
<p>These are some code ... | 2 | 1,701 |
C# Dividing a Matrix into Sub Blocks | <p>i have a matrix came from an image 1600x1600. now i need to assign this matrix into 4x4 blocks. As an example:</p>
<pre><code> 00 01 02 03
IMAGE = 04 05 06 07 BLOCK(i) = 00 01 BLOCK(i+1) = 02 03
08 09 0A 0B 04 05 06 07
... | 2 | 1,283 |
SonarQube:java.lang.IllegalStateException: Webapp did not start | <p>I was trying to deploy SonarQube at a local virtual Ubuntu machine.Everything was done.But when I use <code>/etc/init.d/sonar start</code> to start sonar server, it failed.</p>
<h3>web.log:</h3>
<pre><code>`2017.03.29 01:33:04 WARN web[][o.s.p.ProcessEntryPoint] Fail to start web
java.lang.IllegalStateException: We... | 2 | 1,410 |
Python 8 puzzle BFS infinite loop | <p>I am trying to solve the 8 puzzle problem using BFS search, however, my code seems to get stuck in an infinite loop where it only moves the zero tile back and forth until the memory of the queue ends the program in an error.</p>
<pre><code>import collections
import queue
class Node:
def __init__(self, puzzle, las... | 2 | 2,028 |
Chrome Web Push Notification with Encrypted Payload in Python | <p>Can someone please explain how to send Web Push Notification with Payload for Chrome using Curl/Python ?</p>
<p>This is the code I am trying: </p>
<p>Code: </p>
<pre><code>fcm_url = "https://fcm.googleapis.com/fcm/send"
headers = {'Content-Type': 'application/json'}
headers.update({'Authorization': 'key=' + f... | 2 | 1,397 |
Cannot import xls/xlsx files | <p>I am importing an excel file into MySQL using PHP. The following code works for csv files but not for xls/xlsx file formats.</p>
<pre><code><html>
<head>
<meta charset="utf-8">
<title>Import Excel to MySQL using PHP </title>
<link rel="stylesheet" href="https://maxcdn.... | 2 | 1,318 |
Android findViewById() with onFling in ListView problem | <p>I have a class that extend ListActivity.
This class show a AbsListView filled with bus IDs and a bus Names on each row...
I try to handle the bus Name of a row when I make a swipe gesture on...('onFling') but when I do that, the gesture is handled correctly but I can just get the Views (with findViewByID()) of the f... | 2 | 2,887 |
Upgrading to laravel 5.7 giving error in npm install or update? | <p>After upgrading from laravel 5.6 to 5.7, running <code>npm install</code> or <code>npm update</code> is giving the following error:</p>
<pre><code>npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist@1.7.7: Br... | 2 | 1,609 |
JAVA: error: unexpected type | <pre><code>public abstract class Character{
public enum Type{ ROGUE, PALADIN, JACKIE_CHEN, SKELETON, GOBLIN, WIZARD}
private String name;
private int hitPoints;
private int strength;
private Weapon weapon;
//other attributes
//methods
public Character(Type characterType){
switch(characterType){
case ROG... | 2 | 2,524 |
How can I write a report (custom agenda view) of org-mode tasks and logbook notes that were recorded in a given time period? | <p>I use org-mode to manage my time whilst doing project work.</p>
<p>I break the task into TODO items and clock my work on them (<code>org-clock-in</code> and <code>org-clock-out</code>). Whilst I am working I use <code>org-add-note</code> to keep record of my thoughts and progress.</p>
<p>I want a report for any gi... | 2 | 1,048 |
error: container_linux.go:235: starting container process caused keycloak/keycloak-gatekeeper | <p>in Centos7, I'm trying to start 2 containers by docker-compose when I get this error:</p>
<pre><code>error: container_linux.go:235: starting container process caused keycloak/keycloak-gatekeeper
</code></pre>
<pre><code># ls
docker-compose.yml Dockerfile gatekeeper-be.conf gatekeeper-fe.conf nginx-conf.d READ... | 2 | 1,305 |
I need to insert Data in Grid view dynamically without using database | <p>I have created a web form in ASP.NET in which i'm taking some data from the user through the form so that when he/she will click the submit button then that data will be shown there in a gridview which will be binded using empty data table and a view state variable.But when i fill all the data and press the submit b... | 2 | 8,012 |
Enabling/Disabling MVC controls with jQuery | <p>I've got a table with multiple editable fields that correspond to an MVC model object. Currently, I've got a cell in each row with two buttons that will toggle between an edit/save function when they are clicked. I've got the buttons working now to where it will switch between the two buttons so that only one is vis... | 2 | 1,357 |
RuntimeError: The size of tensor a (64) must match the size of tensor b (128) at non-singleton dimension 3 | <p>I want to train the model. In the model vgg16 with first ten (10) layers has been used as a frontend. Now I want to change its network from 10 to 13 layers of vgg16. the following error has occurred.
Runtime Error: The size of tensor a (64) must match the size of tensor b (128) at non-singleton dimension 3</p>
<p>He... | 2 | 5,509 |
$onChanges not triggered | <h3>Get updated by model but don't update the model. Should I use the $onChanges function</h3>
<p>I have a <strong>model</strong>:</p>
<pre><code>class Model {
constructor(data) {
this.data = data;
}
getData() {
return this;
}
}
</code></pre>
<p>2 nested components:</p>
<pre><code>var parentComponent = ... | 2 | 1,208 |
How to make working CUDA 11.6 with CMake 3.23 and MSVC 2019 | <p>I cannot find a solution to manage how to use the langage CUDA in a CMake project on Windows with the standard MSVC 2019 compiler.</p>
<p>I am trying to configure and compile <a href="https://gitlab.com/dominoc925/hello-cuda-cmake" rel="nofollow noreferrer">this <code>hello-cmake-cuda</code> repository</a> (also des... | 2 | 6,080 |
In Django 1.61 shell using Aptana 3.4 the setup_environ(settings) is missing | <p>I am trying to use the Django 1.61 shell with python3.3 in Aptana 3.4 and immediately upon launch an error occurs and I am unable to import from my own project.</p>
<p>Here is how the Django shell looks like: </p>
<blockquote>
<p>import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
/Libra... | 2 | 1,178 |
Update Div Hidden Field on jQuery Sortable Drag and Drop Update | <p>I am using an HTML5 jQuery Sortable library. Not jQuery UI Sortable but this one here <a href="http://farhadi.ir/projects/html5sortable/" rel="nofollow">http://farhadi.ir/projects/html5sortable/</a></p>
<p>I have used it on many projects in the past and generally I use AJAX to save the sort order as a string of ID... | 2 | 1,825 |
Powershell - Calling Stored Procedure - Works with System.Data.SqlClient.SqlConnection but not with System.Data.Odbc.OdbcConnection | <p>I have a strange problem. I have a powershell script that I've been trying to get to work with an ODBC connection after having been designed to work with a direct SQLConnection. </p>
<p>When $odbc is false, this code runs fine, when it is $true I get the following error:</p>
<pre><code>Exception calling "Fill" wit... | 2 | 1,148 |
Laravel/Vuejs app does not update after deploying to Heroku | <p>I have a Laravel/Vuejs app that works well on localhost. After deploying to Heroku, I realized that styles added to app.scss does not compile into my public/css file, thus have no effect. Also, modifications to my vuejs components does not update the app after I push to Heroku with <code>git push heroku master</code... | 2 | 1,218 |
How can I create an array from the values of DOM elements with AngularJS? | <p>I have a number of hidden input fields on a page. I want to read the values of these input fields into an array. The input fields have this structure:</p>
<pre><code> <div class="loadedFood" ng-model="savedFood">
<div class="foodItem">
<input type="hidden"... | 2 | 1,147 |
ApacheDS and Apache Directory Studio | <p>i installed ApacheDS and Apache Directory Studio on my pc for the first time and i have installed JDK10 but when i start ApacheDS and Apache Directory Studio ,they cannot start .The ApacheDS.bat tells me i must change the default password and the service did not start. When i open the Apache Directory Studio ,... | 2 | 7,064 |
Material-UI table Row height to fixed height even content is lengthy in ReactJS | <p>I'm working with a listing component and I'm using material UI table in ReactJS. I've a ResumeUrl field in table which spans over to 3, 4 lines but I want to keep it only on 2 lines (fixed height for whole row) and show dots for rest of content. I'm unable to change height of Row. I've tried different ways. <a href=... | 2 | 1,556 |
Summing over columns with if statement in R | <p>I have a data that looks like this.</p>
<pre><code>bankname bankid year totass corresbankname1 corresbankloc1 corresdepoin1 corresbankname2 corresbankloc2 corresdepoin2 corresbankname3 corresbankloc3 corresdepoin3
BankA 1 1881 244789 First Bank New York 7250.32 Third National Bank Phil... | 2 | 1,248 |
IndexOutOfBoundsException in SpannableStringBuilder Android | <p>I am trying to insert multiple textview with imageview in Android . That is why I have the following code : </p>
<pre><code>public void onItemClick (AdapterView<?> parent, View view, int position, long id) {
PhoneContactInfo phoneContactInfo = adapter.getItem(position);
String contactname = ... | 2 | 2,470 |
Spring, Websphere, JMS and Eclipselink Issue | <p>I have an application that runs inside of Websphere, and I am having an issue with persisting JPA entities.</p>
<p>Previously, the application was setup with RESOURCE_LOCAL persistence units, with the Spring JpaTransactionManager, and transactions that were committed explicitly in code.</p>
<pre><code> Transactio... | 2 | 1,252 |
HSQLDB: I'm trying to populate a table with some data from temp table, but the data is getting erased | <p>I'm using HSQLDB. Inside a java function I'm creating a temporary table and populating it with some data. Right after I'm updating a regular table with the data from the temporary table. </p>
<p>If I debug the code inside the function and perform <code>SELECT</code> I can see that the data was indeed updated in bot... | 2 | 1,247 |
set every 1st and fourth element with a class | <p>I have a jquery carousel set to 620px wide. I am using the grid 960 to place the images inside. I show 4 images at a time.</p>
<p>In order to do that I set the every first image class to 'grid_2 alpha' and every fourth to 'grid_2 omega' in the group of 4 shown while all in between I set to just grid_2.</p>
<p>This... | 2 | 1,054 |
Laravel: redirecting to a controller@store method redirects to the index instead | <p>I am trying to redirect to PostsController@store but the page redirects to PostsController@index:</p>
<p>In routes.php:</p>
<pre><code>Route::Resource('posts', 'PostsController');
Route::Resource('reviews', 'ReviewsController');
</code></pre>
<p>ReviewsController</p>
<pre><code>class ReviewsController extends Co... | 2 | 1,613 |
Upgrading existing app to iOS 6 | <p>while compiling/upgrading one of my existing apps to iOS 6 beta 4, it's crashing on device, however with simulator it's working fine.If anyone has tried it before, that will be really helpful.</p>
<p>Here is the crash log:</p>
<pre><code>Incident Identifier: CC4112AC-DB73-489B-A64D-C946B6B25422
CrashReporter Key: ... | 2 | 1,443 |
SwiftUI: loading images with .fileImporter | <p>Goal is to load 2 different images (image 1 and 2) with the new .fileImporter modifier.</p>
<p>Problem is I get the same image loaded to both thumbnails (image 1 and 2).</p>
<p>Have anyone managed to do that with .fileImporter modifier?</p>
<pre><code>import SwiftUI
struct ContentView: View {
@State var op... | 2 | 1,269 |
VPython Object Revolution | <p>Having to use VPython currently, and I want to make a model of the Solar System.</p>
<p>Currently I have all the Planets and the orbital Rings, however, the actual <em>orbit</em> is what I'm finding very difficult.</p>
<pre><code>GlowScript 2.7 VPython
from visual import *
# Declaring Celestial Body Objects
Sun... | 2 | 1,180 |
Manual creation of nodes and ng-model | <p>In more attempts to DRY bootstrap and AngularJS, I'm attempting to create a form and children while maintaining the <code>ng-model</code> relationships. I'm getting the correct HTML output, but something isn't connecting correctly with the model relationships, and the model isn't being updated:</p>
<h3>Vanilla HTML... | 2 | 1,666 |
how to Django dumpdata nested models in yaml | <p>So I have this awesome Django app which gives me satisfaction and such.
But now the problem, I want to use <code>dumpdata</code> (or something that does the same) to export a model with a nested other model in yaml format.</p>
<p>Lets say I have two models, <code>Project</code> and <code>Questions</code>. Each <cod... | 2 | 2,897 |
Is it necessary to check if a handler exists in a delegate chain before removing it? | <p>I have a small snippet of a delegate-based messaging system, you could <code>Subscribe</code> and <code>Unsubscribe</code> event handlers, and <code>Raise</code> new events.</p>
<p>In my <code>Unsubscribe</code> method, I check to make sure that the handler exist first, before removing it.</p>
<p>My question is: i... | 2 | 1,665 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.