title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Clean URLs messing up relative links | <p>I have set up clean URLs and for those most part they work fabulously. However some of the relative paths for css, images, etc. are getting messed up, using the fake clean-URL root.</p>
<p>To start, here's my .htaccess file:</p>
<pre><code>RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_... | 2 | 1,027 |
C# - Check if can access / read folder | <h2>Before closing my question, please see what I checked and <strong>doesn't work</strong> at the end of this question</h2>
<hr>
<h2>Question</h2>
<p>I've been trying all sorts of SO answers and all of them brings me a an exception, besides many of them sounding overcomplicated for something that should be very sim... | 2 | 1,168 |
Powershell script to list all open Explorer windows | <p><a href="https://stackoverflow.com/questions/31347905/get-report-of-all-open-explorer-windows">This question</a> shows a Powershell script to generate a list of open File Explorer windows and their path.
My goal is to capture the currently open set of explorer windows, and write out a CMD file with commands like: C... | 2 | 1,191 |
How can I create a CRUD with Codeigniter using SQLite? | <p>I'm starting a new project where I want to use Codeigniter with SQLite. I searched information about this and I managed to conect and get data from my SQLite database but I have no idea of how can I create a CRUD for a table with this, I'm trying to do it the same way I did in the past with MySQL buy it is not worki... | 2 | 1,699 |
Could not load file or assembly 'System.Web.Http, Version=4.0.0.0' after upgrading from vs2013 to vs2017 | <p>we recently upgraded from Visual Studio Community 2013 to Community 2017. My REST Service project started breaking after starting it (build passes). This is only happening on one out of 3 machines.
We are using Microsoft.AspNet.WebApi.Owin for creating our REST endpoints.</p>
<p>The issue seems to be on loading Sys... | 2 | 1,441 |
How to pause Bootstrap 2 carousel while a video plays in a slider | <p>Here is my Bootstrap 2 carousel that contains one html5 video and 2 images (I have to use Bootstrap 2 and jQuery 1.9.1 in this project): </p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-o... | 2 | 1,589 |
How to use autocompleteTextview widget on android to return string from an arraylist | <p>This is my current app, I am able to return the String name of different countries</p>
<pre><code>package com.example.autocompletetutorial;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
public clas... | 2 | 4,109 |
Will Prism OnDemand module loading work in an OOB scenerio? | <p>Should the loading of OnDemand Prism modules work in an OOB scenerio? If so, I cannot seem to make it work. Everything is currently working in browser without any problems. Specifically I:
register my modules in code:</p>
<pre><code> protected override IModuleCatalog GetModuleCatalog() {
var catalog = ne... | 2 | 1,048 |
How to make repository findBy() with more than one field in Spring Boot? | <p>I want to make restcontroller findbyProductIdandYear in Spring Boot java aplication, but I get error, How to make it in great way?</p>
<p>Here is my model:</p>
<pre><code> @Entity
@Table(name="view_disbursement_by_project")
public class ViewDisbursement {
@Id
@GeneratedValue(strategy = GenerationType.IDEN... | 2 | 2,622 |
JSON stringify converts 0 to null | <p>I am trying to convert my object to JSON but it doesn't convert my enum to 0. When I print the enum I get 0 but when I use inside the object it becomes null. If I use string, instead of integer it works.</p>
<pre><code>(function () {
'use strict';
var ItemStatus = {
'Prepared': 0,
'Ongoing':... | 2 | 1,171 |
Creating a controller to manage site navigation angularjs | <p>I'm trying to use <code>ng-repeat</code> to easily manage navigation on my site. Here's my code for the navigation:</p>
<p>html:</p>
<pre><code><div class="collapse navbar-collapse" id="js-navbar-collapse" ng-controller="Navigation as AppNav">
<ul class="nav navbar-nav">
<li ng-repeat="app... | 2 | 1,390 |
Accessing Golang struct that implements error interface causes function to never return | <h1>Background</h1>
<p>I'm unmarshalling JSON data from an HTTP API to the following Golang structs:</p>
<pre><code>type ResponseBody struct {
Version string `json:"jsonrpc"`
Result Result `json:"result"`
Error Error `json:"error"`
Id int `json:"id"`
}
type Result struct {
Random stru... | 2 | 1,613 |
NeDB didn't update the records | <p>Hi I don't know why this function didn't do anything, even don't show anything on the console, and the callback function didn't work , Sorry if I made an obvious mistake I'm new with node js and NeDb.</p>
<p>here is my update function:</p>
<pre><code>var Datastore = require('nedb'),
db = {
games: new D... | 2 | 1,864 |
Most efficient method for persisting complex types with variable schemas in SQL | <p><strong>What I'm doing</strong></p>
<p>I am creating an SQL table that will provide the back-end storage mechanism for complex-typed objects. I am trying to determine how to accomplish this with the best performance. I need to be able to query on each individual simple type value of the complex type (e.g. the Str... | 2 | 1,626 |
SQLAlchemy session.query(Table) command is too slow. What's wrong with my code? | <p>Try to select all rows in a database table with about 300,000 rows</p>
<p>(Tablename = 'test_table', I'm using Aurora Mysql)</p>
<pre><code>from sqlalchemy.engine import create_engine, url
from sqlalchemy.orm import Session, sessionmaker
# Create a connection pool and get a session object as a property.
class Poo... | 2 | 1,124 |
Access 2013 - "Query too complex" error when searching on 18 fields | <p>I'm using Access for searching in the database using multiple (around 18) criteria. All those criteria need to be combined to deliver the right results. The search query is being evaluated as being too complex. </p>
<p>In the query, I use the filled in search fields (the temporary variables) to find the contacts th... | 2 | 1,095 |
Flutter - Drawer menu behind WebViewScaffold | <p>i have class stateLessWidget, where i would like:</p>
<p>1) Load a web page with a URL (it works well)
2) Use a Drawer Menu (it works well)</p>
<p><strong>THE ISSUE:</strong> My drawer menu is behind the view :( . </p>
<p>Maybe because the WebviewScaffold load later drawer menu ?</p>
<p>Thank you guys! </p>
<p>... | 2 | 1,312 |
Cannot run Bundle Install on Mac OS Mountain Lion due to JSON v(1.7.3) gem error | <p>first thing is first, I HAVE the command line tools from xcode installed on my mac, so that is not the issue. Please don't point me to the 50 other posts about this, as they all just say "install the command line tools".</p>
<p>This is the error I get when I run <code>bundle install</code></p>
<pre><code>Installin... | 2 | 1,681 |
Pure CSS Sub Dropdown Menu | <p>I am trying to create a menu that has 3 sub menus and I have successfully created the first 2. My issue is with the 3rd drop-down menu, It is only showing one <code><li></code> when there is multiple available.</p>
<p><strong>CSS</strong></p>
<pre><code> /*Reset */
html, body, h1, h2, h3, h4, h5, h6, for... | 2 | 2,321 |
Querying Exchange Web Services fails with 400 Bad Request | <p>I am trying to get some information from a specific calendar using EWS and Powershell.
I have a powershell function that I use to query EWS</p>
<pre><code> Function EWSSoapRequest
{
param (
$soapRequest,
$exchangeServerAddress
)
# Create the request
$webRequest = [System.Net.WebR... | 2 | 1,943 |
Wrapping sets of elements from a list in DIVs using jQuery | <p>I have a very long list of names, each of which will be wrapped in <code>span</code> tags.</p>
<p>Example:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><span>... | 2 | 1,892 |
Symfony 2.3 Composer Requested Package Not Found | <p>I receive the following error every time I try to run composer update:</p>
<blockquote>
<p>Your requirements could not be resolved to an installable set of packages.</p>
<p>Problem 1
- The requested package doctrine/data-fixtures dev-master could not be found.</p>
<p>Problem 2
- The requested... | 2 | 1,245 |
Split windows form to 4 window | <p>i hope any one can can help me , i use WPF to split the window to 4 window i built this code </p>
<pre><code><Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height=... | 2 | 1,065 |
Express & NodeJS : Accessing response parameters from Multipart form POST | <p>I have a simple form that allows the user to upload a file type image, and append the "category" type of the file to the response body, via a radio input selection.</p>
<p>The file processing itself is handled as expected on the backend - however, when it comes to accessing parameters in the response body, I am rec... | 2 | 1,440 |
Asset_Sync not pushing to S3 | <p>I am building a rails app on heroku, and want to deploy the js, css, and image files to a bucket on Amazon. I haven't found many resources for this, but I am using this (2012) tutorial for guidance; <a href="https://firmhouse.com/blog/complete-guide-to-serving-your-rails-assets-over-s3-with-asset_sync" rel="nofollow... | 2 | 1,216 |
C++ OpenGL rendering two rectangles with different colors | <p>I have tried to create two rectangle objects with two different colors and moving in opposite direction. However, I am stuck in rendering the two rectangle with different colors (currently they are the same color).</p>
<p>What is the way to do it?</p>
<p>Here is the code:</p>
<pre><code>#include <stdio.h>
#... | 2 | 2,390 |
Kendo Menu binding menu dynamically via JSON | <p>I'm trying to bind the JSON data object retrieved from the servlet.</p>
<pre><code>$("#mainVerticalMenu").kendoMenu({
dataSource : new kendo.data.DataSource({
transport: {
read: {
url: "net/samso/action/MenuAction?func_flag=getMenu&us... | 2 | 2,742 |
APM Java Agent Data received was not shown in in Agent Status of APM in Kibana | <p>I have ELK running in a ec2 instance and installed the apm-server in it</p>
<p>APM-server version: 7.x</p>
<p>I have a springboot application with npm for load testing in other ec2 instance
Also installed the apm agent in it</p>
<p>APM Agent version: 1.x</p>
<p>In APMserver.yml:</p>
<p>I have given the private ip fo... | 2 | 1,175 |
ValueError: zero-size array to reduction operation maximum which has no identity | <p>I am using some scripts from Github for a Telecine project, and am running into the following error (traceback included:)</p>
<pre><code>/usr/lib/python2.7/dist-packages/picamera/encoders.py:544:
PiCameraResolutionRounded: frame size rounded up from 3280x2464 to 3296x2464
width, height, fwidth, fheight)))
Traceba... | 2 | 1,132 |
ehCache configuration for disk storage not working | <p>I cant get my ehCache working with diskStorage. I want a persistent cache that exists after i restart my app.
So i tried ehCache and this is my ehCache configuration file:</p>
<pre><code><diskStore path="C:\Temp\ehCache"/>
<cache
name="testCache"
eternal="true"
... | 2 | 5,509 |
Multiple 'foreach' loops in one knockout JS | <p>I'll start by saying that I am working within the context of DotNetNuke7, which is essentially ASP.net based framework, and that i am fairly new to KO.</p>
<p>I am trying to have one ko viewmodel and have two foreach loops in it. Each loop renders an array which is part of the view model definition like so:</p>
<p... | 2 | 1,714 |
Haskell forkIO threads writing on top of each other with putStrLn | <p>I was playing around with Haskell lightweight threads (<code>forkIO</code>) with the following code:</p>
<pre><code>import Control.Concurrent
beginTest :: IO ()
beginTest = go
where
go = do
putStrLn "Very interesting string"
go
return ()
main = do
threadID1 <- forkIO $ begin... | 2 | 1,024 |
gatsby-react-helmet generating empty <title> on SSR | <p>My Gatsby website is not generating proper title tags on SSR. When I build the website all I get on my generated files are <code><title data-react-helmet="true"></title></code>. I'd appreciate help to find the problem and solve as I have no idea which might be the issue after a long debugging process.</p... | 2 | 1,461 |
Android dynamic background change | <p>I am relatively new to Android platform so I don't know if there exists some specific way for doing this. Here goes my problem</p>
<p>I have a layout with a background image. On that background image I have 2 text views (one for header and other for sub header). Also I have four other image view for 4 very small im... | 2 | 1,684 |
Android Navigation-Drawer NullPointerException when drawer close | <p>I'm making my own navigation-drawer by adapting the "sample app" code at <a href="http://developer.android.com/training/implementing-navigation/nav-drawer.html" rel="nofollow">http://developer.android.com/training/implementing-navigation/nav-drawer.html</a></p>
<p>I don't want to use fragments. I simply want to go ... | 2 | 6,051 |
UITableViewCell with a UIView subclass creates multiple layers on cell | <p>I have an custom UITableViewCell created with (.xib) and have UIView subclass instance inside cell created from code</p>
<p>table delegate method :</p>
<pre><code> func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableC... | 2 | 1,196 |
Laravel custom validation messages not working | <p>I am using repository pattern using <a href="https://github.com/andersao/l5-repository#validators" rel="nofollow">L5-repository validation</a>. This is my </p>
<h2>controller</h2>
<pre><code><?php
namespace App\Api\V1\Controllers;
use Request;
use Dingo;
use App\Http\Controllers\Controller;
use App\Repositori... | 2 | 1,239 |
External Component Thew An Exception | <p>I am having a very weird error on one of my websites. This error only happens on this particular website even though it uses a CMS that is being used by many others. This error also doesn't happen on my test machine, it only happens on the live server.</p>
<p>The error is as follows:</p>
<pre><code>System.Web.Http... | 2 | 2,789 |
How to target container in GitHub actions? | <p>I am trying to use GitHub Actions to fire up a Postgres container for my tests. I have a script called <code>build.sh</code> that gets called when <code>npm run build</code> is called via GitHub actions. This script calls upon <code>restore-schema.sh</code> (shown below).</p>
<p>The issue here is when <code>restore-... | 2 | 1,156 |
ASP.NET: HttpRuntime.Cache getting flushed when saving WebConfigurationManager -- Is this a bug? | <p>Recently, I've been experimenting with caching objects with <code>HttpRuntime.Cache</code> and I was generally under the impression that if I "added" something to the cache like this:</p>
<pre><code>HttpRuntime.Cache.Insert("Test", "This is a test!", null,
Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration... | 2 | 1,072 |
Android NFC tag ID identify different nfc card type | <p>I want to use NFC reading in my app, where I read the ID of an NFC card.
I have 2 different NFC cards.
When I read them with my USB NFC reader in my computer, I get a 9 digit number for both cards, which is cool. I can identify the cards based on that number.</p>
<p>Tthe problem occurs, when I want to read them in m... | 2 | 1,086 |
How to fix Unknown compiler option 'importsNotUsedAsValues'. error? | <p>I have a project with following config files:</p>
<p><strong>tsconfig.json</strong> file</p>
<pre><code>{
"compilerOptions": {
"outDir": "./dist",
"module": "esnext",
"target": "es5",
"lib": ["es6... | 2 | 6,155 |
How to get from Canvas back to MIDlet | <p>I am trying to figure out, while inside the commandAction method in the Canvas, how do I make my command button take me back to the start of the MIDlet? (Basically starting over).</p>
<p>When the key fires, I have it taking me to a new List page. On that page I have a back button that I need ideally to take me bac... | 2 | 5,266 |
Saving data to 2 tables in the database in CakePHP | <p>I have a simple sample project created to test how to add data to 2 tables from one controller in <code>CakePHP</code>, I have a tables called <code>Student</code>, <code>Users</code>, <code>Admin</code> and <code>UserGroups</code>. I need to add a Student to the database table and also add the students username and... | 2 | 1,846 |
Can't bind to 'rangePicker' since it isn't a known property of 'mat-date-range-input' & 'mat-date-range-input' is not a known element | <p>I installed Angular Material datepicker in my project and used date range picker and got the following error:</p>
<pre><code> compiler.js:2175 Uncaught Error: Template parse errors:
Can't bind to 'rangePicker' since it isn't a known property of 'mat-date-range-input'.
1. If 'mat-date-range-input' is an Angula... | 2 | 1,307 |
Unable to cast object of type 'System.Collections.Generic.List`1[' to type 'System.Collections.Generic.IEnumerable`1[' | <p>The error I get at Runtime is</p>
<pre class="lang-none prettyprint-override"><code>Unable to cast object of type
'System.Collections.Generic.List`1[TCPClientClean.ChatClient+LogTime]'
to type
'System.Collections.Generic.IEnumerable`1[TCPClientClean.TimeLogLabel+LogTime]'.
</code></pre>
<p>I have a class that is u... | 2 | 2,742 |
PySpark feature vector to allow NULL values | <p>I would like to use a classifier in PySpark on a dataset that includes NULL values. The NULL values appear in features I have created, such as Success Percentage. I need to keep the NULL value, because I have shown via pandas that keeping the NULL values results in a stronger model. I therefore don’t want to impute... | 2 | 2,347 |
Data Passing Issue adapter to fragment in android (The default value <null> was returned) | <p>I was trying to pass some data through an <strong>intent and bundle</strong> from one activity ** (actually it is Adapter of the activity) ** to fragment. All the string values passing without any issue to the fragment, <strong>but integer and double values are passed as null.</strong></p>
<p><strong>It shows this ... | 2 | 3,107 |
How to enable diagnostic logs on Virtual Machine Scale Set or Load Balancer created by AKS cluster resource in terraform? | <p>The following terraform resource creates an AKS cluster with a Virtual Machine Scale Set (VMSS) and a Load Balancer (LB) resource. Currently, diagnostic logs are enabled on the cluster resource by adding <code>oms_agent</code> section under <code>addon_profile</code>.</p>
<p>However, the documentation does not menti... | 2 | 1,475 |
How to get private key from jks keystore for signing the message with privatekey using shal256rsa in java | <p>I want to encrypt the message with signed private key.and verify the signature but getting error in verify signature</p>
<blockquote>
<p>//importing the crt and key into p12 file and importing into jks file</p>
</blockquote>
<blockquote>
<p>openssl pkcs12 -export -in D:\cedge_uat\STAR_cedgenetbanking_in.crt -inkey ... | 2 | 2,099 |
GeoServer:How to create label Postion(Horizontal and Vertical) only on for outside boundary from layer Properties | <p>I have the grid shapefile that contains properties of the Polygon Grid.I imported into GeoServer and created the grid layer.And for the style of the layer, I created SLD File with LabelPlacement contains Anchor X and Y position for the label to display in the middle of the polygon.It's working fine.
The following is... | 2 | 1,858 |
Can't install Laravel Telescope in ubuntu 18 | <p>I am creating a new project in Laravel 5.8 and I also want to install Telescope, but when I execute the command in my project:</p>
<pre><code>composer require laravel/telescope
</code></pre>
<p>output:</p>
<pre><code>./composer.json has been updated Loading composer repositories with package information Updating ... | 2 | 1,624 |
PHP/MySQL Multidimensional/Associative Arrays 3 Trial Balance | <p>I'm currently working on an accounting code that will print out a Trial Balance based on data stored in MySql. I can't seem to get my head around the arrays that should get the trial balance displayed correctly. The data-set looks somewhat like this:</p>
<p>id | account | &n... | 2 | 1,849 |
force notes user to change password / internet password on next login using lotus script | <p>Actually i already create an agent to create user ID with default password. I want to force user change the internet password and Notes ID password for the next login. Is there a way using lotus script method to change it? or Admin still need to go each of the user profile to tick that function.</p>
<p>Here is my a... | 2 | 1,754 |
Django Internationalization - Gettext error | <p>Am building a site with Django. After downloading gettext-0.19.8.tar.gz ---> /Users/cohen/Downloads/gettext-0.19.8 and running all of the steps ./configure make and sudo make installation I received this error during it's installation python manage.py makemessages -l en</p>
<p>Everything ran smoothly with the Gette... | 2 | 1,155 |
Dependency name inconsistent in google protobuf 2.5.0 | <p>I have an web application which I run in windows and linux environment. In linux and <em>only</em> linux I'm getting following exception:</p>
<pre><code>Caused by:
java.lang.IllegalArgumentException: Invalid embedded descriptor for "moop_shared.proto".
at com.google.protobuf.Descriptors$FileDescriptor.inter... | 2 | 1,111 |
Use Bean from an another module | <p>I am creating a Batch application to put some data from a web-service on the database.
To do this I need to convert DTO's received by the web-service on utilizable classes. This is possible using some mapper defined in an other module.</p>
<p>When I tried to <strong>@Autowired</strong> the mapper I have an Exception... | 2 | 2,841 |
An object with the same key already exists in the ObjectStateManager. when using AsNoTracking | <p>There are many errors here in SO, but this scenario I think its different.</p>
<p>I had some code that was working fine, I update one entity, etc. But the problem is that it was being cached, when I disabled caching with AsNoTracking(), then it started to throw this exception;</p>
<p>What I do its the following:
... | 2 | 1,456 |
How to call CLAPACK from C? | <p>I am trying to call a CLAPACK function from C. I downloaded CLAPACK-3.2.1 (from <a href="http://www.netlib.org/clapack/clapack.tgz" rel="nofollow">http://www.netlib.org/clapack/clapack.tgz</a>) and followed instructions here (<a href="http://people.sc.fsu.edu/~%20jburkardt/c_src/clapack/clapack.html" rel="nofollow">... | 2 | 1,053 |
testDeviceId's are not working in google-mobile-ads flutter | <p>I was trying to set my test device id with the requestConfiguration. For checking whether setup for testdevice is successful, I filtered <code>logcat</code> in android studio with <code>setTestDeviceIds</code> but it's showing me the following log</p>
<pre><code>2021-03-31 04:17:36.907 27185-27185/? I/Ads: Use Reque... | 2 | 3,664 |
How to validate form using jquery validation on submit? | <p>I am trying to validate my form using jQuery validation js but the problem is I'm not receiving any error message in the toastr.</p>
<p>I followed this <a href="https://stackoverflow.com/questions/47955882/jquery-validate-show-messages-with-toastr">link</a> for implementing the error in toastr. The error I am gettin... | 2 | 2,526 |
Multithreading: Why two programs is better than one? | <p><em>Shortly about my problem:</em> </p>
<p>I have a computer with 2 sockets of AMD Opteron 6272 and 64GB RAM.</p>
<p>I run one multithread program on all 32 cores and get speed 15% less in comparison with the case when I run 2 programs, each on one 16 cores socket.</p>
<p><strong>How do I make one-program version... | 2 | 1,266 |
Breadth First Search Pruning and Memory Leak C++ | <p>I'm doing a project that requires me to solve a maze where you cannot turn left. The program is working fine, except for in cases with very large input. </p>
<p>My general strategy was to make each spot in the maze 4 nodes in the graph, corresponding to UP, DOWN, LEFT, and RIGHT, where each node has an edge going... | 2 | 1,161 |
Select entities where referenced objects property is equals value | <p>Right now i try to wrap my head around Doctrine2.</p>
<p>So i have the following structure:</p>
<p>I have an article entity:</p>
<pre><code>/**
* @ORM\Entity
* @ORM\HasLifecycleCallbacks
* @ORM\Table(name="article")
*/
class Article extends BaseEntity {
/**
* @ORM\Id
* @ORM\GeneratedValue(strat... | 2 | 2,968 |
Best CPUs for Numpy | <p>Which CPU for an Intel Windows system would give the best performance for this example Python code?</p>
<pre><code>import numpy as np
X = np.random.randn( 1e7, 10 )
Y = np.random.randn( 1e7, 1 )
%timeit I = X>Y
np.show_config()
</code></pre>
<p>The example code does not use multiple cores, so I am not sure i... | 2 | 1,198 |
How to copy and paste data from excel to another excel using python | <p>I would like to copy excel data from source excel file to destination excel file. However, I am not just simply copy whole data from source file.</p>
<p>I need keep copying ONLY certain rows and columns like the first 5 rows by 4 columns (this data covered, row: 1st to 5th, column: A to D) from source file and past... | 2 | 1,119 |
Graceful shutdown on SIGINT | <p>I would like to handle SIGINT signal from the kernel in order to call a function that grecefully shutdown my process.<br>
Here's a working example, a thread is waiting the signal and then call the function handle_stop:</p>
<pre><code>#include <iostream>
#include <boost/asio.hpp>
#include <boost/threa... | 2 | 1,335 |
Malformed Reply from SOCKS Server when fetching proxy server details dynamically | <p>I am trying to access a website through proxy server.I am using httpclient.</p>
<p><strong>This is the code which is working fine:</strong></p>
<pre><code>import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.HostConfiguration;
import org.apache.commons.httpclient.HttpClient;
impor... | 2 | 1,091 |
TypeError when using Google Vision API in Firebase Cloud Functions | <p>I'm trying to get a sample for the use of the Google Vision API within Firebase Cloud Functions to work but it fails.</p>
<p>I'm using the unmodified sample provided on Github: <a href="https://github.com/firebase/functions-samples/tree/master/moderate-images" rel="nofollow noreferrer">https://github.com/firebase/f... | 2 | 2,034 |
Draw multiple rectangle on canvas | <p>I am trying to add multiple rectangle on canvas on mouse move. But when I am drawing rectangle on image, back image on canvas is also cleared. I don't want to remove it. I want multiple rectangle on canvas without clearing canvas image. Please check below JavaScript code.</p>
<p><div class="snippet" data-lang="js"... | 2 | 3,019 |
Append text in exclusively opened file | <p>I am trying to implement locking scenario where same file is accessed by multiple threads at same time or at different time. While testing it seems code is overwriting the existing line instead of appending new line. </p>
<pre><code>namespace SMPPService
{
public static class LogFile
{
public static void WriteE... | 2 | 1,803 |
materializecss navigation dropdown | <p>I try to use materializecss dropdown menu feature but out of four dropdown menu items, I am only seeing two of the items in the dropdown menu. Here is my HTML code</p>
<pre class="lang-html prettyprint-override"><code><nav class="white blue-text">
<div class="navbar-wrapper container">
<!-- &... | 2 | 1,661 |
flutter build runner not working - The getter 'uri' was called on null | <p>I was using flutter with build runner perfectly , but today it just getting this null error .
Even thought I reverted my code changes but still the same error .</p>
<p>the error :</p>
<pre><code>>[SEVERE] json_serializable:json_serializable on test/widget_test.dart:
>NoSuchMethodError: The getter 'uri' was ca... | 2 | 1,057 |
Python Flask and SQLAlchemy, selecting all data from a column | <p>I am attempting to query all rows for a column called <code>show_id</code>. I would then like to compare each potential item to be added to the DB with the results. Now the simplest way I can think of doing that is by checking if each show is in the results. If so pass etc. However the results from the below snippet... | 2 | 1,382 |
Openlayers3: tile grid incorrect with pixelratio=3 using Geoserver/Geowebcache as backend | <p>I'm developing a small webmap using Openlayers3 and geoserver/geowebcache as backend.</p>
<p>My goal is to support browsers/displays with pixelratio=1, pixelratio=2 and pixelratio=3.</p>
<p>For that I defined in geoserver backend 3 gridsets with tiles sizes 256x256, 512x512 and 768x768.
I assume that:</p>
<ul>
<l... | 2 | 2,270 |
Create react app template module not found when creating from custom template | <p>I am trying to create a custom cra-template file for my team to use, but keep hitting an issue where I receive the following error when running <code>npx create-react-app test-app --template my-custom-template</code>.</p>
<pre><code>internal/modules/cjs/loader.js:796
throw err;
^
Error: Cannot find module ... | 2 | 1,238 |
Start Timer in other viewcontroller in swift | <p>I have a problem with my timer functions. I start a timer when clicking on a btn <em>(startBtn)</em> and I show a new viewcontroller as a popover when hitting another btn <em>(restBtn)</em> Right now it start the timer correctly and opens the new viewcontroller as popover with the time counting down. </p>
<p>The pr... | 2 | 1,148 |
VB ItemTemplate DataBinder.Eval Container.DataItem in C# | <p>This is the HTML in the VB project that is being ported to a new C# app:</p>
<pre><code><asp:DataGrid id="DG1" runat="server" HorizontalAlign="center" AutoGenerateColumns="False" width="850" AllowSorting="True" OnSortCommand="LawSortEvent" ShowFooter="true" onItemDataBound="LawDG_ItemDataBound" FooterStyle-Font-... | 2 | 1,082 |
How to resize a canvas without anti-aliasing? | <p><strong>Update</strong></p>
<p>It's definitely to do with how I'm rescaling the canvas. If I draw the same scene onto a canvas and I don't change it's width and height to fill the screen, it works perfectly.</p>
<p><img src="https://i.stack.imgur.com/yI5zL.jpg" alt="Working"></p>
<p>What is the correct way to res... | 2 | 1,065 |
In Android, AutoCompleteTextView is not centered while using Exposed Dropdown Menus in Material Design Component | <p>In newly published Material Design Component, there is no Spinner component. That's why I want to use <a href="https://material.io/develop/android/components/menu/#exposed-dropdown-menus" rel="nofollow noreferrer">Exposed Dropdown Menus</a> to implement something similar like Spinner. The Problem I am facing is Auto... | 2 | 1,398 |
8051 Timers + Interrupts | <p>I am new to working assembly code and I am trying to make a program that will read in values from ROM and depending on what values they are play a certain note for a certain length of time. The code itself compiles just fine, but when I go to send the code to the 8051, nothing happens. I think I have the timers se... | 2 | 1,450 |
Base64 Decryption with given encryption algorithm (DES base64, secretKey, Cipher) | <p>When I encrypt the password <strong>!QAZxdr5</strong> by the code below:</p>
<pre><code>public static String encryptPassword(String msg) {
try {
KeySpec keySpec = new DESKeySpec(msg.getBytes());
SecretKey key = SecretKeyFactory.getInstance("DES").generateSecret(keySpec);
Cipher ecipher =... | 2 | 1,123 |
Python get pytorch tensor size | <p>I wanna know how to get the shape of this tensor in Python ? I have tried this :</p>
<pre><code>> len(x)
</code></pre>
<p>But this prints 1, why ? I want to print the number of tuples here which is 3. Using len(x) prints only 1.</p>
<p>What's the problem ?</p>
<p>Here's the tensor :</p>
<pre><code> (x=array(... | 2 | 1,537 |
HttpPost retrieve on server, using volley library and overriding getParams doesn't retrieve | <p>According to <a href="http://www.androidhive.info/2014/05/android-working-with-volley-library-1/" rel="nofollow">http://www.androidhive.info/2014/05/android-working-with-volley-library-1/</a> , part 6, I want to send user and password, and retrieve status of login; as same as description of part 6!</p>
<p>I'm using... | 2 | 1,552 |
QML Label Crashes App under OpenGL Core Profile | <p>Starting with a new QtQuick2 project, using Ubuntu 12.04 and Mac OSX. I've tried this on Qt 5.3.1 and 5.3.2. </p>
<p>I use this code to create a QQuickView set to OpenGL 4.1 Core Profile</p>
<pre><code>QApplication app(argc, argv);
QQuickView * m_pMainView = new QQuickView;
QSurfaceFormat f;
f.setProfile(QSurf... | 2 | 1,543 |
Cannot deploy Spring Security SAML sample application correctly | <p>I'm trying to deploy the sample application that's part of the Spring Security SAML extension, using SSOCircle as the IDP, but I've run into a number of problems. I'd really appreciate some help fixing this.</p>
<p>Here's what I've done.</p>
<p>I downloaded the source from: <a href="https://github.com/spring-proje... | 2 | 3,304 |
How To Send the xml file to .net web service in android | <p>I want to send the xml file to .net web service but it did not work. In my project i have created xml file by using DOM Object. I want to send that Dom object to the server but It doent work.</p>
<p>I also used Ksoap2 jar file in my project. Please help me how to send the xml file to .net server. Here is my code:</... | 2 | 2,292 |
Get x-values corresponding to y-value on non-monotonic curves | <p>First, I'm not sure SO is the good place to ask this kind of question.<br>
If not please tell me where to ask and I'll remove it.</p>
<p>However, since I not found any post that address my problem, my question and my code below may be useful to other people ...</p>
<p>The code part is a bit long, although I tried ... | 2 | 3,655 |
how to disable timestamp in WCF "wsHTTPBinding"? | <p>I want to disable timestamp in WCF wsHTTPBinding because if I have client has different time more than 10 min it give me exception that the time is in the future how I can disable it or if there is another solution ?
code example in client :in app.config </p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
... | 2 | 1,137 |
ASP.net JQuery: Div in a dialog | <p>I am trying to create an email share thing for a website. In the master page I have a link for which I have a jquery click event firing. In the click event, a div in master page is opened in jquery dialog. The div has some textboxes for email, sender name and message thing. Then it includes two buttons: one foe send... | 2 | 3,511 |
Sequelize: refer a foreign key between 2 models | <p>I'm trying to refer a foreign key between 2 models. but I'm getting this error:</p>
<blockquote>
<p>throw new AssociationError(`${source.name}.belongsToMany(${target.name}) requires through option, pass either a string or a model`);</p>
<p>AssociationError [SequelizeAssociationError]: Order.belongsToMany(User) requi... | 2 | 1,549 |
Imagick Installation issue with PHP : 5.3.3 & ImageMagick : 6.8.1 Q16 | <p>I'm having an issue installing Imagick as i have just installed ImageMagick 6.8.1 Q16 onto our CentOS 6.3 system</p>
<p>Please note i am running all comands as root</p>
<p>I then am trying the following: pecl install imagick and the following error appear (full error):</p>
<pre><code>[root@T1600-904 /]# pecl inst... | 2 | 3,954 |
Aws-amplify not working with react-native and expo version 36.0.0 | <p>I'm currently working on a react-native-app using expoSdk which is supposed to run on web,ios and android. The most challenging part till now has been to setup the navigation which I finally did. Now I added amplify to my project but the project stops working whenever I run it on any mobile device but it works just ... | 2 | 1,646 |
Qt program only receiving UDP from certain IP addresses | <p>I have a problem with a Qt program only receiving UDP [Artnet] datagrams from my STM32 modules when the STM32 is set to some seemingly random, but specific IP addresses. </p>
<p>So, I have the following:</p>
<ol>
<li>Linux Machine Running Qt program with dynamic IP address</li>
<li>STM32 Running FreeRTOS Module ma... | 2 | 2,030 |
amCharts group by Date | <p>I use amCharts but I need to group data results by Date:
<a href="https://www.amcharts.com/demos/date-based-data/?theme=none" rel="nofollow noreferrer">Demo example</a> </p>
<p>I have 5 visits by one day and chart need to group results.</p>
<p>My code:</p>
<pre><code>var chart = AmCharts.makeChart("chartdiv", {
... | 2 | 1,792 |
Table in react bootstrap. How can i make it fit inside a container? | <p>I am using react bootstrap table to show my data. The table is not responsive and has a over-proportioned size on the right side.</p>
<p>Look also at the picture showing that the table is much larger than the other components.</p>
<p>I have tried to include a few css elements such as container, width, max-width, amo... | 2 | 3,071 |
React\Redux render() not being called after change in state | <p>I am attempting to populate a dropdown list from the server in a React/Redux project. The dropdown list in defined as a component and embedded in a parent component.</p>
<p>Parent component:</p>
<pre><code>import React from 'react';
import Form from 'components/Form';
import { reduxForm } from 'redux-form';
import... | 2 | 1,465 |
Deep autoencoder keeping constant accuracy in keras | <p>I'm new in keras and deep learning field. In fact, I built a deep autoencoder using keras library based on ionosphere data set, which contains a mixed data frame (float, strings"objects", integers..) so I tried to replace all object colunms to float or integer type since the autoencoder refuses being fed with object... | 2 | 4,461 |
Process order form with php to send email | <p>I have the following code:</p>
<pre><code> <table class="table table-striped" id="itemsTable">
<thead>
<tr>
<th></th>
<th>Item Code</th>
<th>Description</th>
... | 2 | 1,797 |
Multiple matplotlib plots sharing X Axis and Navigation Toolbar | <p>I'm coding an UI where I want to have three separated plots, all sharing the same X Axis and the same Navigation Toolbar, so when I zoom one of them the X axis changes for all of them (to see the same time dataframe).</p>
<p><a href="https://i.stack.imgur.com/z5ryX.png" rel="nofollow noreferrer"><img src="https://i... | 2 | 2,050 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.