title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How to read JSON data instead of a line from socket? | <p>My application connects to a sensor over WiFi direct. Then it connects to a socket and is supposed to read data. The data is JSON and looks like {"d":{temp_mC";33416,"humidity_ppm"...more data....}}. The sensor sends data every 2 minutes. Before I only have been able to read lines that are sent by a server but since... | 2 | 1,538 |
Filtered Unique Index causing UPDATE to fail because incorrect 'QUOTED_IDENTIFIER' settings | <p>We've put in place the following filtered index on a table in our SQL Server 2016 database:</p>
<pre><code> CREATE UNIQUE NONCLUSTERED INDEX [fix_SystemPKeyExecutionOrder] ON [DataInt].[TaskMaster]
(
[SystemPkey] ASC,
[ExecutionOrder] ASC
)
WHERE ([ExecutionOrder] IS NOT NULL)
WITH (PAD_INDEX = OFF, STAT... | 2 | 1,593 |
using .map (or another stdlib feature) to create a hash not array | <p>I'm trying to target JMS servers in the cloud, the puppet module init.pp needs to add a key to a hash. </p>
<p>I'm reading a block of hiera and having to extract parts of it to form a new hash. .each doesn't return any values so I'm using .map.
The values I'm getting out are exactly as I want, however when I trie... | 2 | 1,529 |
Why pthread slow down the code? | <p>I new to pthreads and I write this code for testing. I don't understand why if I run the code with only 1 pthread it complete faster than when I run with multiple pthreads.
The code is the setting part of a genetic algoritm to resolve a TSP.
I have 3 linear arrays (city_x, city_y, city_id) that save the data: </p>
... | 2 | 4,150 |
how to upload an image with a text post AJAX, php, and html | <p>Hi i am trying to upload an image with comments added to it into a database using php ajax and html.</p>
<p>here is the html part:</p>
<pre><code><form name="form1" enctype="multipart/form-data" action="">
<h2></h2>
<div class="form-group">
<textarea n... | 2 | 1,204 |
How to progate an event to a children | <p>I have code like this:</p>
<pre><code>public void handle(MouseEvent event) {
//if (event.getEventType() == MouseEvent.MOUSE_CLICKED) {
if ( ( event.getEventType() == MouseEvent.MOUSE_PRESSED )&&
(event.isPrimaryButtonDown()) ) {
x1 = x2 = event.getX();
... | 2 | 1,237 |
Remove datasource binding | <p>I have a page like this</p>
<pre><code><Page.Resources>
<!--
這個頁面顯示的群組項目集合,繫結到完整項目
清單的子集,因為群組中的項目無法虛擬化
-->
<CollectionViewSource
x:Name="groupedItemsViewSource"
Source="{Binding Groups}"
IsSourceGrouped="true"
ItemsPath="TopItems"
d:... | 2 | 1,981 |
the object is already closed in integration test | <p>I am using <code>spring-test-dbunit</code> to run integration tests. I want to use different datasets inside one class.</p>
<p>I have <code>BaseRepositoryTest</code> class</p>
<pre><code>@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(value = {
"classpath:path/to/context/context.xml"})
@Dirti... | 2 | 1,093 |
Can't Get the selected value of spinner from my custom listview adapter in xamarin. C# | <p>Xamarin Help .</p>
<p>Can't Get selected value for spinner in my custom listview adapter.</p>
<p>MyListViewAdapter.cs</p>
<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using Android.App;
using Android.Content;
using Android.OS;
usin... | 2 | 1,593 |
Why am I getting the error data.findIndex is not a function in my React with Redux project? | <p>I have an ASP.NET Core project with React and Redux, I'm also using the Kendo React UI. I'm trying to return data to one of my Kendo widgets but I'm getting an error when I try to do so and I need help identifying what I've done wrong. </p>
<p>When I run my application I get the error of:</p>
<blockquote>
<p>1... | 2 | 1,500 |
C++: Heap corruption detected after normal block | <p>I am assigned with a task in which I should create some functions that does some tricks on char arrays. So I created those functions and I was trying to see if they are working correctly when I got stuck with this "HEAP CORRUCPTION DETECTED" error. </p>
<p>Here is the code of my function</p>
<pre><code>void cagi... | 2 | 1,204 |
An index with name 'primary' was already defined on table 'sites' | <p>I am using Doctrine 2 with ZF2.</p>
<p>I have a sites entity with the following primary key field.</p>
<pre><code>/**
* @var string
* @ORM\Column(name="site_id", type="string", length=10, nullable=false)
* @ORM\Id
*/
private $siteId;
</code></pre>
<p>And the following index's</p>
<pre><code>* @ORM\Table(na... | 2 | 3,406 |
Xamarin Forms - Using SQLite and SQLite Extensions to implement foreign keys | <p>I'm new to Xamarin forms and am up to the point where I now want to be persisting data entered by the user to an Sqlite db. Thankfully, there all plenty of examples to <strong>get you started</strong>, but thats as far as the help goes... I'm trying to implement a relationship between two entities <strong>'Session'<... | 2 | 1,839 |
How to implement an alert dialog inside adapter in RecyclerView adater list Kotlin? | <p>what I am trying to do is implement an alert dialog on an adapter item. I managed to make it on java but I am trying to make it in kotlin. </p>
<p>This is the main class where I start the adapter.</p>
<pre><code>fun buildDetailsAdapter() {
//recicler view saleDetails
val saleDetail = SaleDetail()
... | 2 | 1,453 |
Modal window blocks my page | <p>I have a modal window but when I close the modal my page is blocked. I can not do anything. I need to refresh the page to get everything working again!
The strange is that sometimes everything works well or sometimes everything is blocked!</p>
<p>The button that opens the model:</p>
<pre><code><button type="but... | 2 | 1,214 |
Resetting form in popup div | <p>I have a page that lists previously entries made by a user with a link to each that will call a function that opens an edit page in a pop-up div.</p>
<p>The edit page just contains a form with update and reset buttons but whenever I select the reset button to return the form to its initial state nothing happens.</p... | 2 | 6,333 |
Change HTML text by URL using *.ini config file | <p>I am trying to find out a good way to change HTML text by the URL currently displayed. I've got a list of all addresses what could appear in the URL line and corresponding text stored in *.ini file.</p>
<p><strong>HTML</strong></p>
<pre><code>...
<?php $conf = parse_ini_file('config.ini.php'); ?>
<script ... | 2 | 1,087 |
java how to make character follow Pathfinding | <p>After few days trying to understand and coding the A star pathfinding alogrithm wich i do understand now.
I finally code it and make it work</p>
<p>so now what i would like to know is how can i make my hero follow the path.
any code snipet or example would be appreciated.
i had an idea on how to do it but it didn... | 2 | 6,846 |
Old question: how to kill a thread immediately in c# | <p>I am writing a chess game which allows two programs compete, the player needs to write a DLL and expose a function to tell the main application where this player will move in the next, suppose the function looks like </p>
<pre><code>public static void MoveNext(out int x, out int y, out int discKind);
</code></pre>
... | 2 | 1,087 |
Random NullReferenceException on Asp.Net Core 2.1.1 View | <p>I have an Asp.Net Core web site with a view that is bound to a simple view model. <strong>.NET Framework 4.6.1 Microsoft.AspNetCore 2.1.1</strong></p>
<p>For the majority of requests it works as expected. <strong>Randomly (approximately 1-5 out of 100 requests) it results in a NullReferenceException</strong>.</p>... | 2 | 4,088 |
Delphi TJSONArray Memory Leaks: Cannot FreeandNil JSON containers/objects | <p>The image below lists the memory leaks introduced by the following code:</p>
<p>METHOD:</p>
<pre><code> procedure TInformationSource.SetConfig;
var
vJSONConfigList : TStringList;
vCurrentFileName : string;
vDebugString : string;
begin
if iCJSONByteStream = nil then
iCJSONByteStream := TBytesSt... | 2 | 1,485 |
Using A WrapPanel in a TreeView | <p>I want to display data with level of detail, so i use a TreeView, but each detail is quite short, so i would like to use a WrapPanel (horizontal) to have many details per line.</p>
<p>Something like :</p>
<ul>
<li><p>This is an unexpanded item</p></li>
<li><p>This is The Header of an expanded item</p>
<p>Info 1 ... | 2 | 1,908 |
Web3.js returned error: execution reverted | <p>I'm new to blockchain programming and web3 and I don't really understand the error.
I'm trying to call a function from my smart contract (on BSC test net)</p>
<p>Function is called <code>getRandom</code></p>
<p>app.js</p>
<pre class="lang-js prettyprint-override"><code>const Web3 = require("web3");
const w... | 2 | 1,124 |
R Shiny - Vertically aligning a label and input in a horizontal form | <p>I am trying to vertically align an input and its label in a horizontal form. I'm not sure if it's possible to vertically align inline divs of different heights though. </p>
<p>The code below gives me the following:</p>
<p><a href="https://i.stack.imgur.com/QURcU.png" rel="nofollow noreferrer"><img src="https://i.s... | 2 | 1,214 |
How do I get a react leaflet map to pan to a new center? | <p>I am using react with leaflet. When a user lands on the page, current location is ascertained and the map then renders with a center on the map that is the user location.</p>
<p>However, after that, when I pan the map left and right and then click a button to ascertain my location again (with the purpose of recenter... | 2 | 1,278 |
Embed Intel Assembly Merge Sort Code in C++ (Inline assembly) | <p>I want to embed this merge sort code (please see below) into my C++ Program (please see below as well) so that I can have a merge sort in my program that uses assembly. Yes, I am aware that I can write merge sort in C++, but it is very important that I embed this assembly instead. </p>
<p>Merge Sort Code:</p>
<pre... | 2 | 2,363 |
I can't get android jsoup to work | <p>Hi i need help with a tutorial i tried from ( <a href="http://xjaphx.wordpress.com/2012/02/04/android-xml-adventure-parsing-html-using-jsoup/" rel="nofollow">http://xjaphx.wordpress.com/2012/02/04/android-xml-adventure-parsing-html-using-jsoup/</a> ). It's about jsoup but i can't get it to work i only get a lott of ... | 2 | 1,330 |
util.inspect/JSON.stringify doesn't work on arrays in objects | <p>I am retrieving documents from a mongodb using various comands, find, findones, findoneandupdates, etc. Most of these will return the entire document saved, which i do want. When doing find or findOne mongoose allows for the use of population. I am trying to pass back the entire object that was passed to me or view ... | 2 | 1,867 |
Error while trying to extend MVCPortlet | <p>I'm trying to do a portlet! In additional, I install Liferay IDE on my Eclipse kepler. I created a portlet like this:</p>
<p><strong>Pom.xml</strong></p>
<pre class="lang-xml prettyprint-override"><code><dependencies>
<dependency>
<groupId>com.liferay.portal</groupId>
&l... | 2 | 1,273 |
SSRS chart does not show | <p>I am writing a small sales status report in SSRS. The top has monthly and daily summaries in four small tables. I added a couple charts, and then I added a pie chart. It looked great. I have never added map, so I tried that (using local state data that came with SSRS). Unfortunately, the map didn't show up even thou... | 2 | 7,883 |
2 d interpolation with the arrays with different dimensions in python | <p>I have three two dimesional arrays which have shape of (100,100).
Each array looks like:</p>
<pre><code>x =
[[-104.09417725 -104.08866882 -104.0831604 ..., -103.8795166 -103.87399292
-103.86849976]
...,
[-104.11058044 -104.10507202 -104.09954834 ..., -103.89535522
-103.88983154 -103.88430786]
[-104.11141968 -10... | 2 | 1,161 |
How to solve "Service has gone away" error and Page not found in Drupal 8? | <p>I was building my first Drupal site. After creating some stuff such as views, blocks, etc... at some point this warnings and errors happened. I been trying to google every warning and error and no luck yet. I also checked the "Report Logs" and the only thing I see is <code>Page not found</code>, it shows the same... | 2 | 1,591 |
How disable Ctrl+A,Ctrl+C key functions in iframe | <p>I need to disable ctrl+c and other ctrl options inside iframe how to achieve this </p>
<p>i got code for disabling in webpage but its not working inside iframe. How to change this </p>
<pre><code> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitio... | 2 | 1,166 |
github runner on Windows not finding executables on PowerShell | <p>I am trying to use a self-hosted Windows-VM to run west for repo management, python to run some scripts, and git to push back to the repo.</p>
<p>The work is to generate files using python from <code>repo-A</code> as artifacts to check-into <code>repo-B</code>. I had to use Windows because the file generation tools ... | 2 | 1,851 |
Extjs: How to populate form with values from grid row selection | <p>I have a form and a grid. I'm trying to allow the user to select one of the rows in the grid then click a button in order to load the data from the row into the form.</p>
<p>Here is my view so far:</p>
<pre><code>Ext.define('Project.view.main.Main', {
extend: 'Ext.panel.Panel',
autoScroll: true,
height... | 2 | 9,583 |
jquery tablesorter not sorting | <p>hello
i am stuck with jquery tablesorter:
<a href="http://tablesorter.com/docs/index.html#Examples" rel="nofollow">http://tablesorter.com/docs/index.html#Examples</a></p>
<p>and would be grateful if some jquery guru could check my code to see where i am going wrong. instead of displaying 10 records per page it is d... | 2 | 1,300 |
Django Rest Framework - Query for exact match on two fields in a mapping table | <p>I'm using DRF and trying to search a mapping table for exact matches so I can update that record.</p>
<p>I have the following tables:</p>
<pre><code>site
- id
- location
- address
circuit
- id
- name
- ref
sitecircuits
- site_id
- circuit_id
- active_link
</code></pre>
<p>my current DRF config as below:</p>
<p... | 2 | 1,932 |
Terraform cannot read from remote state | <h3>Terraform version</h3>
<p>v0.12.1</p>
<h3>AWS provider version</h3>
<p>v2.16.0</p>
<p>I've Terraform workspace configured, as for now my workspace is pointing to <code>dev</code> where I've a tfstate file for my VPCs and Subnets and a different one for my security groups, however when I'm trying to refer <code>... | 2 | 1,442 |
No route to host : connect | <p>I am getting my public IP from the website, but sometimes I get this error:</p>
<pre><code>java.net.NoRouteToHostException: No route to host: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainS... | 2 | 1,289 |
React with Google Maps Api, how to recenter map | <p>I'm using react and using the map as a functional component. (tbh I'm still unsure as to when to use classes v. functions when it comes to classes). however my main issue is that I'm using the google Maps API to present a map and I'm trying to center a map on the users current location. also, I wanted it to update a... | 2 | 1,356 |
Explicit Wait for automating windows application using winappdriver | <p>I am a newbie to Windows Application Driver and my project demands automating the desktop application, so I decided to use winappdriver as it is similar to selenium, on which I am pretty confident about using.</p>
<p>speaking of the issue,
Just wondering if there is a way to achieve explicit wait and implicit wait ... | 2 | 1,196 |
Python - codec encoding ascii to unicode: error | <p>:) I am trying to go about the process of reversing transliteration of an input file(currently in english) back to its original form(in hindi)</p>
<p>A sample or a part of the input file looks like this:</p>
<pre><code>E-k- b-u-d-z*dhi-m-aan- p-ksii#
E-k- ghn-e- j-ngg-l- m-e-ng E-k- b-h-u-t- UUNNc-aa p-e-dr thaa#... | 2 | 2,724 |
Set ReaderQuotas.MaxStringContentLength, in WCF via reflection WSHttpBinding | <p>I need to consume WCF when I don't know the type of binding, it could be BasicHttpBinding or WSHttpBinding. I created a simple solution to test without reflection and it works. But when I try use it in another project via reflection, when I use WSHttpBinding, I get this exception (Spanish):</p>
<pre><code>{System.X... | 2 | 3,203 |
Laravel horizon remains inactive after a new deploy | <p>We have Horizon running for quite some time now, and have no issues with it.
But after our most recent deploy on production, it remains inactive and there are no workers being started.</p>
<p>I fail to see the problem, nor do we get any errors logged into bugsnag, so I'm a bit lost here.</p>
<p>What would be the b... | 2 | 1,531 |
Creating nested association records Ruby on Rails | <p>Apparently I am overlooking something very simple in the example I have done below where I am attempting to create nested association records while instantiating a new parent record.</p>
<p>I'm hoping a fresh set of eyes my help find what has been eating at me for days. Thanks in advance!
What am I missing/messing ... | 2 | 1,686 |
Why can't I use interpolation with a directive? | <p>I have searched and found a few articles that address "How does one assign a scoped variable to the value of an html attribute tag". See:</p>
<p><a href="https://docs.angularjs.org/guide/interpolation" rel="nofollow noreferrer">https://docs.angularjs.org/guide/interpolation</a> </p>
<p><a href="https://stackoverfl... | 2 | 1,035 |
Getting a "bound method" error with my login form | <p>So my register form works fine, it successfully creates a new user. However my login form cannot log a user in. So when I log in with username/password entered correctly, and <code>print(form.non_field_errors)</code> in my view, I get this error:</p>
<pre><code><bound method BaseForm.non_field_errors of <User... | 2 | 1,863 |
Emscripten OpenGL (3) gives versions errors | <p>OS X - Chrome.</p>
<p>Im new to OpenGL / emscripten and trying to setup a simple script that uses WebGL 2, OpenGL 3+ and gets build through emscripten into webassembly. </p>
<p>Compiling of WebGL 1 / OpenGL 2 worked without a problem. And setting the canvas to WebGL 2 / OpenGL 3 also seems to work. When I check th... | 2 | 1,395 |
Android - Make new view attribute and pass to its children in XML compound view component - data binding in layout | <h2>Full answer:</h2>
<p><strong>1. Enable data binding in <em>app/build.gradle</em>:</strong></p>
<pre class="lang-xml prettyprint-override"><code>dataBinding {
enabled true
}
</code></pre>
<p><strong>2. Use <em>DataBindingUtil</em> to set content view</strong></p>
<p><strong>java</strong></p>
<pre class="lang... | 2 | 2,388 |
Akka remote actor system timeout: "The remote system has quarantined this system" | <p>I have 3 akka nodes(akka 2.4.8 actor systems) <strong>based on remoting(NOT cluster).</strong> When a remote actor is created and performs long task(take more than 30 minutes), I will get error from remote actor system(on remote machine): The remote system has quarantined this system: </p>
<p><strong>From local sys... | 2 | 3,581 |
Angular - async/await Observable toPromise update broadcast new BehaviorSubject data return Promise | <p>I have a project with this code that I inherited and for the life of me, I cannot understand what exactly is going on and there are some bugs with the teacher profile so I'm trying to sort out what the developer may have been trying to do. If you can please help review and provide any tips or issues that you see. ... | 2 | 1,779 |
Print JSON response on Android Screen | <p>I have my Android emulator for the time being connecting to my local computer. It contacts the PHP and posts an IP address to be run. It then echoes a JSON result. I want to print the result, but am having trouble getting the android screen to change.</p>
<p>Here's my activity:</p>
<pre><code>public class MainActi... | 2 | 1,398 |
Watermark a pdf document with itext 7 instead of iTextSharp | <p>This was my code for itextsharp which worked ok. It displayed "Quote Only" in the middle of each page in a pdf file.</p>
<pre><code> iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance(Server.MapPath(@"~\Content\WaterMarkQuoteOnly.png"));
PdfReader readerOriginalDoc = new PdfReader(File(a... | 2 | 1,928 |
how to add and delete a row in a table using jquery + node js | <p>I have created a table with two select boxes and a single text box in jade.</p>
<p>When I click my button to add more rows, after the user has changed the second select box, by changing a selection in the first using ajax, my row addition code stops working.</p>
<p>Can anyone see in the following code where I may ... | 2 | 1,729 |
Spring Security + CAS SSO AuthenticationManager | <p>I build a java application using Spring/Spring-Security.
Without the CAS-SSO Spring implementation my application works fine.
But when i implement the CAS configuration into my application and build it, i get at startup the following exception.</p>
<pre><code>localhost-startStop-1 30.09.2015 13:34:48 WARN [org.sp... | 2 | 4,748 |
PHP file download gives garbage for anything BUT .pdf files | <p>I am having an issue in which the only filetype capable of being downloaded correctly from the server is ".pdf". Other files of other file types exist in the same location, upload perfectly fine, have the correct permissions, and load just fine when I scp them off to my local machine. I can't show the entirety of ... | 2 | 1,320 |
How to Subscribe to a ActiveMQ topic using its Ajax feature. | <p>I am using ActiveMQ as my JMS provider and JSP to build up a real-time web application. The web application should subscribe to a topic produced in some other applications. </p>
<p>I have successfully deploy my we web application in Tomcat. Also, I have put all needed jar files in the lib directory. However, I stil... | 2 | 1,081 |
Why does this C++ member function call fail with a segmentation fault? | <p>I have followed this forum for years and found it extremely helpful, answered all of my questions so far. But today I seem to be stuck.</p>
<p>Being new to C++ I attempted to code some classes that help me to connect to a website through a proxy server. I therefore call a function of a class that encapsulates some ... | 2 | 1,198 |
How to get delivery reports inside BroadcastReceiver | <p>I am creating an app which receives SMS and sending in specific number. I want to get status report (for sending and delivering) inside the BroadcastReceiver class. </p>
<p>Here is the code for BroadcastReceiver:</p>
<pre><code>public class SmsReceiver extends BroadcastReceiver {
@Override
public void on... | 2 | 2,090 |
Android Custom View Edge Clipping with ripple animation | <p>I'm using a custom view to get ripple effect for the pre-lollipop devices. But I also need to customize the container shape like a curved shape.I want to be the button like this. <a href="https://i.stack.imgur.com/ZUjcr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZUjcr.png" alt="I want to be t... | 2 | 4,916 |
Android ui lag when scrolling multiple recyclerviews | <p>My question is quite simple, why does it lag?</p>
<p>This layout:</p>
<pre><code> <ScrollView>
<RelativeLayout>
<RecyclerView1/>
<RecyclerView2/>
<RecyclerView3/>
</RelativeLayout>
</ScrollView>
</code></pre>
... | 2 | 2,013 |
WSDL adds unwanted prefix to SOAP action's paramters | <p>Im facing an issue when I try to import my WSDL into Salesforce and generate APEX code from this one. The issue is targeting Salesforce, but my general question has nothing to do with Salesforce since I believe that there is a general solution to my question. When I add a targetnamespace to my second schema in the f... | 2 | 3,327 |
@typescript-eslint/parser parserOptions.ecmaVersion ignored / not linting | <p>I configured ecmaVersion 6 for my test files but it does not lint features that are not available in ecma6. Rules are working fine.</p>
<p>.eslintrc.js</p>
<pre><code>module.exports = {
root: true,
extends: ['airbnb-base', '.eslintrc.airbnbonlywarnings.js'],
parser: '@typescript-eslint/parser',
pa... | 2 | 1,399 |
Force Google maps v2 api to refresh custom icon image | <p>I am using the <a href="https://developers.google.com/maps/documentation/maps-static/intro?csw=1#CustomIcons" rel="nofollow noreferrer">Google static maps API V2</a> to create a map with a custom blue marker icon: </p>
<p><a href="https://i.stack.imgur.com/8Pwup.png" rel="nofollow noreferrer"><img src="https://i.st... | 2 | 1,067 |
Using AzureCredentialsFactory.FromServicePrincipal with a certificate throws System.NullReferenceException | <p>I created a console application using .NET framework 4.7.2 to connect to the Azure Resource Manager API using these nuget packages:</p>
<ul>
<li>Microsoft.Azure.Management.ResourceManager.Fluent: v1.18.0 | <a href="https://www.nuget.org/packages/Microsoft.Azure.Management.ResourceManager.Fluent/" rel="nofollow nore... | 2 | 5,136 |
Android: Alarm not being triggered through AlarmManager | <p>I am writing a simple Android program that triggers an alarm 15 seconds after the application initialization (plays the default ringtone and pushes a notification) through <code>AlarmManager</code>. Below is my code:</p>
<p><strong>MainActivity.java</strong>:</p>
<pre><code>package com.example.basicalarmsetter;
imp... | 2 | 2,474 |
Count of models lists shows 0 when sending a Model List Collection From View to Controller- Asp Net MVC? | <p>I need to delete the selected rows. Here when I click on delete, the controller action method shows 0 counts for the model item list. Below is my code of HTML and Controller Action </p>
<pre><code>@model IEnumerable<XonetPlus_V3.Admin.Models.Articles.ArticleDisplayViewModel>
@{
ViewData["Title"] = "Index";
}... | 2 | 1,769 |
Erlang accepting SSL connection is really slow (comparing to C++) | <p>I'm currently testing extreme condition on a piece of code written with Erlang.</p>
<p>I have implemented <a href="http://learnyousomeerlang.com/buckets-of-sockets#sockserv-revisited">learnyousomeerlang.com</a>'s technique of supervisor to have multiple accept capability.</p>
<p>Here the code slightly modified to ... | 2 | 1,565 |
HttpContext is null in the controller during Unit Testing in Asp.net MVC | <p>Here is my Asp.net Controller Property and Method</p>
<pre><code> public ApplicationSignInManager SignInManager
{
get
{
return _signInManager ?? HttpContext.GetOwinContext().Get<ApplicationSignInManager>();
}
private set { _signInManager = value; }
}
... | 2 | 1,024 |
How to plot loudness vs time real time graph for audio file in android studio | <p>I am new to android. I have an audio file (mp3 file). I want to create an android app using android studio that plots a graph between loudness(dB) and time of the music file when it is played.How to implement this.</p>
<p>PS: Implementation for the same in HTML is<br>
<code>http://seapip.com/canvas/visualizer3/</co... | 2 | 1,471 |
Button Press To Shutdown Raspberry Pi Python | <p>I am writing a script for a surveillance camera. I have programmed it to take a picture when motion is detected (PIR sensor) then attach the photo to an email, to a chosen recipient. However because I am running this without a screen, mouse or keyboard attached I had no way to turn the device off without pulling the... | 2 | 1,561 |
D3 tooltip not updating correctly in a React Component | <p>I spent quite a while making this code snippet to highlight a very frustrating issue I've run into using d3 and react together, in particular with trying to dynamically update tooltips based on component state.</p>
<p>First, the code snippet, which I've tried my best to keep short and complete (for brevity, you can... | 2 | 2,857 |
Debugging jquery or javascript using firebug | <p>I wrote a code in jquery. I was not running initially, then i checked online <a href="http://www.javascriptlint.com/online_lint.php" rel="nofollow">jslint</a> for syntax errors. I caught some errors. Now still the code was not working as expected. So i went for firebug. I haven't done a lot of debugging. I am new to... | 2 | 1,877 |
ImportError: DLL load failed: The specified module could not be found.No module named '_pywrap_tensorflow_internal' | <p>I am trying to set up the tensorflow-gpu1.3 on windows10 64 bit. I have followed all the instructions provided in <a href="https://www.tensorflow.org/install/install_windows" rel="nofollow noreferrer">https://www.tensorflow.org/install/install_windows</a>. I have CUDA path setup with cudnn64_5.dll, python version is... | 2 | 1,835 |
How to add OnClickListener on ViewHolder 's TextView of RecyclerView.Adapter to execute AsyncTask | <p>Firstly I have seen many solutions here but unable to understand it.
I am confused about how i can execute AsyncTask inside OnTextClick().
and want to know how we can implement this.<br>
please do help.</p>
<p>DownloadFormActivity.</p>
<pre><code>public class DownloadFormActivity extends AppCompatActivity
{... | 2 | 3,552 |
Using spring + jpa + hibernate but can't persist entity and never throws exception , tests passed | <p>I've been testing for a long time and searching for hours. Since there' re some similar questions, but after trying, it still doesn't work , I am using spring MVC and jpa with hibernate to set up a base project, but the problem is I cannot persist entity into database when I put it into jetty. What's strange is that... | 2 | 3,181 |
Removing the blank spaces on left and right side of the UISearchBar | <p>I am creating a UI component that should display a <code>UILabel</code> and a <code>UISearchBar</code> below.</p>
<p>However, I am not able to align them, the <code>UISearchBar</code> always has extra space on both left and right side (highlighted RED).</p>
<p>I was trying to set the dimensions of <code>searchBarT... | 2 | 1,232 |
Databinding crashes onCreateViewHolder | <p>After moving to a single-activity app databinding crashes as follows when creating a viewHolder for a recyclerView.</p>
<p>The problem is that there is little information on what causes the crash (see log below).</p>
<p>I have tried rebuildin and invalidating gradle and android studio caches with no success.</p>
... | 2 | 4,302 |
REST API Embedded Signing -Docusign | <p>I'm using REST API for Embedded Signing. I have created the template with tags and set them as required fields, but while embedding the document in the website for signing I couldn`t see the tags I have set in the template. I have created this envelope by setting the template ID in the API code(<a href="http://iodoc... | 2 | 2,463 |
Nested subsetting with "[" | <p>I recently discovered that, after subsetting an object (i.e. a data frame) with "[", the resulting object could be subset with "[" on the same line of code (I should have realized it earlier!). Here is an example:</p>
<pre><code># Create a data frame
df1 <- as.data.frame(matrix(1:9, nrow = 3))
# Take a look at ... | 2 | 1,115 |
Resolve duplicate versions of dependency | <p>This has been very annoying. I have 2 projects, project <code>A</code> and <code>B</code>, <code>B</code> with dependency on <code>A</code> as a JAR file. So a 3rd library <code>X</code> in A has a dependency on another 3rd party library <code>Y</code>, the problem is maven resolves <code>Y</code> in project <code>A... | 2 | 1,036 |
How to execute server side file handling operations in Meteor? | <p>I'm storing Word(.docx) files using <a href="https://docs.mongodb.com/manual/core/gridfs/" rel="nofollow noreferrer">GridFS</a> on the server. I'd like to be able to merge the documents into one Word file by using the <a href="https://github.com/raulbojalil/docx-builder" rel="nofollow noreferrer">docx-builder</a> NP... | 2 | 1,842 |
Listener class not executing while server startup || tomcat || eclipse | <p>I am working on eclipse gallileo,struts and tomcat.
following is my web.xml file</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:s... | 2 | 3,105 |
Remap org-shiftmetaright | org-shiftmetaleft to [shift-select-meta]left-word | [shift-select-meta]right-word] | <p>Could someone please give me a hand remapping <code>org-shiftmetaright</code> | <code>org-shiftmetaleft</code> to <code>[shift-select-meta]left-word</code> | <code>[shift-select-meta]right-word]</code>. The goal is to highlight select region being a whole word (right or left) in one fell swoop in org-mode instead o... | 2 | 1,122 |
Pass data to VC when google maps marker is selected Swift | <p>Im using the Google Maps SDK in my iOS app (in Swift) which presents a marker on the location that a user searches for (using the Google Places API), when a user then selects that marker it presents a new view controller to the screen, the problem I'm having is passing data (co-ordinates of the marker) to the new Vi... | 2 | 1,109 |
tomee webservice doesn't deploy - asm error - Unable to create annotation scanner for web module simple-webservice: 43626 | <p>I am trying to deploy basic webservice template to tomee, I have tried windows 7 64 bit and windows 8 64 bit with java versions 1.8.0_25(64bit), 1.8.0_91(64bit) (this java version used to build code and run tomee). The webservice is basic example taken from internet - suorce code is below and well as the stack trace... | 2 | 3,260 |
Maven branch update projects version automating release workflow | <p>I have a difficult case to solve regarding the Maven automated projects versioning, I hope I'll find a proper solution based on your experience and advices.</p>
<p>The problem is like that:
We have a huge mavenized java product which comprise of ~200 very interdependent different projects.
We agreed that... | 2 | 1,802 |
Jasmine: How to test a jQuery plugin | <p>I'm very new to unit testing with Jasmine and I do have a question.
I have a simple button that add'toggle's a class on mousedown and mouseup:</p>
<pre><code>$(function() {
$('#OfficeUI a.button').on('mousedown mouseup', function(e) {
$(this).addClass('ie-fix');
});
});
</code></pre>
<p>My karma co... | 2 | 1,836 |
Clicking a button within a specific row | <p>I currently have a test that adds an entry to the table below, generating a random location name and value. I'm now trying to click on the edit icon within the table. </p>
<p><a href="https://i.stack.imgur.com/BLReL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BLReL.jpg" alt="Table"></a></p>
... | 2 | 3,938 |
Normalisation in recurrent network PyTorch LSTM | <p>I am trying to normalise between layers of my stacked LSTM network in PyTorch. The network looks something like this:</p>
<pre><code>class LSTMClassifier(nn.Module):
def __init__(self, input_dim, hidden_dim, layer_dim, output_dim):
super().__init__()
self.hidden_dim = hidden_dim
self.laye... | 2 | 1,244 |
Exception 'Cannot get a connection, pool error Timeout waiting for idle object' when using 'DBCPConnectionPoolLookup' service in Nifi | <p>I'm trying to use 'DBCPConnectionPoolLookup' service in 'ExecuteGroovyScript' to dynamically query the required database based on 'database.name' parameter in the input flow file.</p>
<p>The processor is successfully able to get the corresponding 'DBCPConnectionPool' service for querying but I'm getting the an exce... | 2 | 4,016 |
Why is boost::asio::read buffer data size lesser than read size? | <p>I have a simple file transfer application, which transfers 4096 bytes per write from the client. In the server end, I am using the following call read</p>
<p>tempLen = boost::asio::read(l_Socket, boost::asio::buffer(buf, bufSize), boost::asio::transfer_all(), error);</p>
<p>The templen is 1440 bytes, but when I re... | 2 | 1,181 |
Angular Material - table mat-table not rendering data from rest api | <p>I have been trying to implement mat-table in angular 8.
I don't understand what I'm doing wrong, the data which is being provided by my REST endpoint is clearly visible on the console output.</p>
<p>my admin.component.html file</p>
<pre><code> <table mat-table [dataSource]="dataSource">
<!-- &l... | 2 | 2,937 |
Show/hide jquery plugin - my previous div stays open | <p>I´m using this jquery Show/hide plugin <a href="http://papermashup.com/jquery-show-hide-plugin/" rel="nofollow">http://papermashup.com/jquery-show-hide-plugin/</a></p>
<p>I intend to close previous div <strong>on click any link</strong> on my page, but as I click on a new link my previous div stays open.</p>
<p>My... | 2 | 1,232 |
Tomcat Server 6 won't start on eclipse | <p>i am currently taking a course on Openbravo ERP and i run it through my Tomcat server, and as per requirement i downloaded iReports and did some exercises (i don't know if it has anything to do with it) and out of the blue, my server wouldn't start, this is the log i get:</p>
<pre><code> Feb 06, 2014 12:29:56 PM... | 2 | 5,732 |
Error getting a new token with a valid refresh token with authorization code flow | <p>I am using WSO2 API manager 1.10.0 with WSO2 Identity Server 5.1.0 configured as the key manager and MySQL Community Server 5.6 for the databases. When I try to refresh a token (refresh_token grant type) obtained with the authorization code grant type, I’m getting a 400 Bad Request error (invalid_grant - Provided Au... | 2 | 2,178 |
Embed powershell script in VBA macro and run it from there | <p>I am trying to write this neat little bit of code and am having some massive issues with the last bit of it. So the intention was to write a code that would go into all the .zip files in a folder, find a folder in each by name, go inside, find a file ending in "_nl.inp" and copy it outside the archive.</p>
<p>While... | 2 | 1,801 |
Could not resolve all files for configuration ':app:debugCompileClasspath'. when trying to implement image picker library | <p>I am trying to use a library that can choose images from gallery, but i am having the following error. Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app: debugCompileClasspath'.</p>
<p>The library that I a... | 2 | 2,282 |
FindContour OpenCV C++ | <p>I have trouble when using <code>findContour()</code> function from opencv. It crash and output the following error:</p>
<p><a href="https://i.stack.imgur.com/Hq6I6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hq6I6.png" alt="enter image description here"></a></p>
<p>Here is my code:</p>
<pre... | 2 | 1,152 |
Could not find my javascript classes built from Typescript | <h2>Situation</h2>
<p>I am working on the frontsside of a webapp with typescript that I compile into JS. I want to run qunit test on the js that is generated. My typescript is merge in one file using <a href="http://browserify.org/" rel="nofollow noreferrer">browserify</a> I want to run test upon my js object. I am r... | 2 | 1,600 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.