title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
error in simple RESTtful web service implementation
<p><strong>Softwares used</strong> :</p> <p>Java Version : &quot;1.7.0_21&quot;<br> Eclipse Version : Kepler<br> Application Server : wildfly-8.1.0.Final(with RESTeasy bundle)<br></p> <p><strong>My try</strong> :</p> <p>I want to implement REST web service. My resources is university.</p> <pre><code>package com.nagarro...
2
4,738
Why is my data binding not working and is always null?
<p>I am trying to add data to the database. I experimenting with <code>Blazor</code> and <code>.NET core</code>:</p> <p>This is my code in the controller:</p> <pre><code> [Route("AddCarBlazor")] [HttpPost] public IActionResult PostBlazor(Car car) { if (car.CarId == 0) { ...
2
1,734
Bolt-CMS not showing images (helios template)
<p>I just installed Bolt-CMS and I dont have much time to learn the entire CMS. All my images uploaded to the "files" are not showing even on the dashboard. They get renamed to <code>/1000x1000r/xxxx.xxx</code> and they don't show. Can anyone tell me what's going on, where to configure so that they start showing.</p> ...
2
1,339
AJAX/JQuery and PHP to send prompt without reload for a contact form
<p>Full website: <a href="http://adamginther.com" rel="nofollow">http://adamginther.com</a></p> <p>I've used two separate tutorials to build this, one for the PHP and one for the AJAX. My goal is to build a contact form that will check for errors. If there are no errors then it will prompt users with a message saying ...
2
1,840
Resolve Conflicts with Python 2.7 & 3.6 on MacOS Sierra
<p>I am just starting to teach myself Python. I'm having trouble getting it set up.</p> <p>I'm on a MacBook Pro/Sierra. I'm moderately comfortable in command line.</p> <p>What I'd like to do: run Python 3.6 through Geany. Also, I want to install some libraries (e.g., Requests) and have them work by default in 3.6.</p...
2
7,172
UTF-8 to UCS2 conversion using icu resulting in gibberish
<p>This is a follow up question to <a href="https://stackoverflow.com/questions/22209841/utf-8-to-ucs-2-conversion-with-icu-library">a previous one</a></p> <p>The issue in that question has been resolved, and now the code is proceeding as expected, however the final output of the utf-8 to ucs2 conversion is gibberish....
2
1,387
debugging logcat stack trace - no routine information
<p>I'm brand new to debugging logcat, so bear with me.</p> <p>My Android app SIGSEGVs on a shared library. Logcat tells me this:</p> <pre><code>04-24 05:36:53.781: D/dalvikvm(1945): threadid=1: still suspended after undo (sc=1 dc=1) 04-24 05:37:00.066: A/libc(1945): Fatal signal 11 (SIGSEGV) at 0x00001a85 (code=1) 04...
2
5,271
IllegalArgumentException: column _id doesn't exist
<p>I have been trying to display records from a database in ListView. i am able to add records as confirmed using adb shell commands. i can view the records there. but when i tried to implement a view button to display records it just crashes with the error : illegalArgumentException. column_id not existing is the root...
2
5,637
Adding/Removing row dynamically in html using javascript
<p>I have this particular snippet..</p> <pre><code>newcell.innerHTML = table.rows[0].cells[i].innerHTML; //alert(newcell.childNodes); switch(newcell.childNodes[0].type) { case "text": newcell.childNodes[0].value = ""; break; case "checkbox": newcell.childNodes[0].checked = false; break; case "select-on...
2
3,525
UWP Multiple VisualState Triggers in VisualStateManager
<p>I'm creating a Windows Universal App</p> <p>I want to do layout combined with 3 columns. Each column is showing different informations. </p> <p><strong>First</strong> column contains <code>ListView</code>. If you select an item, the <strong>Second</strong> column should show up.</p> <p><strong>Second</strong> col...
2
1,167
JTable height calculation
<p><strong>Solution</strong></p> <p>jtable.getHeight does not include header element</p> <p>jtable.getRowHeight include margin</p> <p>and the example has 15px actual height, not 14px</p> <p><strong>More clear example</strong></p> <pre><code>RO 16 R1 16 R2 16 HEIGHT 48 INTERCELL java.awt.Dimension[width=1,height=1]...
2
1,258
inter process communication using shared memory(mmap) and semaphores
<p>I am trying to improvise a program I had written for single producer multiple consumer multi threading using counting semaphores. I want to implement inter process communication using shared memory (mmap() system call). I want to use anonymous mapping with no backing file. </p> <p>This is the structure I want to sh...
2
1,395
Why my servlet doesn't run?
<p>Here is my html:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="ISO-8859-1"&gt; &lt;title&gt;Beer Selection Page&lt;/title&gt; &lt;/head&gt; &lt;body &gt; &lt;form method = "post" action = "SelectBeer.do"&gt; Select beer C...
2
1,347
WPF Caliburn.Micro and TabControl - changing tab, not changing model
<p>I'm kind of newbie in WPF&amp;MVVM&amp;Caliburn so I beg your indulgence :) </p> <p>I have a problem with binding TabControl with dynamically created models. Tabcontrol is being created correctly but changing tab is not switching viewmodel used to bind "view" (I'm using viewmodel first approach)</p> <p>I've made m...
2
3,574
How To Trigger Azure Automation Web Hook From A Web Browser AJAX Call?
<p>I have an Azure web hook on an Azure Automation script which accepts requests to do stuff from the web. </p> <p>The following little Powershell program tests the web hook and it works fine:</p> <pre><code>$uri = "https://s10events.azure-automation.net/webhooks?token=my_super_secret_token" $headers = @{"From"="jay@...
2
1,282
Encoding/Serialization issues when using ICacheClient and protobuf in ServiceStack
<p>I'm using the current ServiceStack with protobuf serialization.</p> <p>When adding an ICacheClient to cache my responses, the binary answer sent from the cache client has a different encoding/binary serialization than the original response without any cache client.</p> <p>This is leading to deserialization problem...
2
1,081
multithreading's performance is related to global queue's length if queue is not locked?
<p>The requirement is: Items to deal with are stored in a global queue. Several <strong>handler thread</strong>s get item from global queue to handle. <strong>Producer thread</strong> adds item to global queue <em>continuously</em> and <em>rapidly</em>(much faster than all dealer threads' processing speed. Also, <stron...
2
1,840
Creating a .wav file from PCM data
<p>I am trying to read the data from SPH0645LM4H-B <a href="https://www.knowles.com/docs/default-source/model-downloads/sph0645lm4h-b-datasheet-rev-c.pdf?sfvrsn=4" rel="nofollow noreferrer">https://www.knowles.com/docs/default-source/model-downloads/sph0645lm4h-b-datasheet-rev-c.pdf?sfvrsn=4</a> and convert it to .wav ...
2
1,815
Operands mismatch for mul when inserting asm into c
<p>I'm trying to make an assembly insert into C code. However when I try to multiply two registers inside it I get an error calling for operands mismatch. I tried <code>"mul %%bl, %%cl\n"</code> (double %% because it's in C code). From my past experience with asm I think this should work. I also tried <code>"mul %%cl\n...
2
1,314
how to fix the __delitem__ method
<pre><code>{'a': [{'c','d'}, {'d'} ], 'b': [{'c','d'}, set() ], 'c': [set(), {'a','b','d'}], 'd': [{'a','c'}, {'a','b'} ], 'e': [set(), set() ]} class Graph: def __init__(self,*args): self.edges = {} def __delitem__(self,item): if type(item) == tuple: ...
2
1,815
jQuery nestedSortable, save order to Database
<p>I'm using a plugin called <code>nestedSortable</code> to sort the order of the list, with nested (<code>ul li</code>) to the Database mySQL.</p> <p>However, I can't save the order when changed with this plugin. I previously used the sortable plugin, which does save the order to the database when changed, but doesn'...
2
1,557
Stack navigation and Drawer navigation in React Native
<p>In my app, I have buttons navigate to other screens and I have a drawer have buttons as well, I did the drawer and it works fine and also did stack navigation and also works fine, but in my app.js when I define one of them (drawer or stack) the other not working, I will provide my code, I think the problem is that I...
2
1,327
MVC asp.net PartialView causing No Parameterless constructor error?
<p>Having an issue with an MVC 2.0 application partial view that all of the sudden when accessed and stuff is actually in the ViewData, the dreaded No parameterless Constructor error. I Have followed the code as much as I can and I'm getting no where. Here is my code:</p> <p>Controller:</p> <pre><code> using System;...
2
8,486
how to set a selector for a child in LinearLayout
<p>I want to create this effect</p> <p>Initially</p> <p><img src="https://i.stack.imgur.com/949I0.png" alt="enter image description here"></p> <p>and when pressed to be shown like this.</p> <p><img src="https://i.stack.imgur.com/q1g4z.png" alt="enter image description here"></p> <p>I Know that the first thing that...
2
3,523
error MSB3644: The reference assemblies for framework ".NETFramework,Version=v3.5" were not found - ubuntu
<p>I'm running a <code>dotnet build</code> command on a legacy project originally created by someone else I don't know, under Windows some many years ago, but on my <code>Linux Ubuntu 16.04</code> laptop it gives me the error:</p> <pre><code>/home/stephane/programs/dotnet-sdk-2.2.204-linux-x64/sdk/2.2.204/Microsoft.Co...
2
3,222
Javascript, HTML5 Canvas, Score function
<p>So I have a simple snake game set up in which the score increments +1 every time the player collides with the right piece(you all the know the game). Anyway.</p> <p>I want the background to change image every multiple of 5 on the score to represent a new level. Is this possible? I'm assuming it would be something a...
2
3,731
JFreeChart X axis labels are going out of chart area
<p>I have a <code>JFreeChart</code> chart with <code>DateAxis</code> as domain. It looks very nice, however the last axis label sometimes goes out of the chart area. Here is the sample code to reproduce:</p> <pre><code>public class LineChart_AWT extends ApplicationFrame { public LineChart_AWT( String applicationT...
2
6,720
How to set config (or useValue) for imported modules from a component?
<p>We're well aware that there are various ways of setting config for imported modules. We have '.forRoot()', 'useValue', 'useClass' and such to be used in the importing module.</p> <p>Say for example, we want to use <a href="https://www.npmjs.com/package/ng2-currency-mask" rel="nofollow noreferrer">ng2-currency-mask<...
2
1,461
C# count consecutive duplicates in List<string>
<p>I have a List of strings and want to count the duplicates in it, to work with this information later. To simply count the duplicates would be very easy, but unfortunately I just want to count the consecutive duplicates.</p> <p>Let us say we have a list with this string items in it:</p> <blockquote> <p>"1A","3B",...
2
1,081
Using tabbar with animated list results in duplicate global key error
<p>I am trying to implement Flutter's Tab Bar with 3 tabs and an AnimatedList inside those tabs. I want to use the same list and filter the list according to each tab (past tasks, today's tasks, and future tasks), however during my implementation of the tab bar together with the animatedlist I am getting an error regar...
2
2,945
zend framework 2 ajax request error
<p>Im learning Zend framework 2. I found a post on how to make a Jquery modal window ajax request in zend. I made a little popup window with it where a user can add an album name and also an album type. When I'm running the scripts below <strong>without</strong> the Jquery modal window it saves perfectly to my database...
2
2,662
Sending Events to JavaScript from android react-native RCTDeviceEventEmitter
<p>I am trying to receive an event from android side on <strong>location</strong> update. Here is my code:</p> <pre><code>package com.prop; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.location.Location; imp...
2
3,703
How to test for multiple conditions in previous-sibling in XSLT
<p>I have XML data that was extracted from a legacy Lotus Notes application and that has embedded richtext formatting. I am trying to format each block of text based on attributes that appear in a previous sibling. I have XSLT inspired by <a href="https://stackoverflow.com/questions/40051134/how-to-grab-attributes-from...
2
4,063
Hyperparameter tuning one-class SVM
<p>I am looking for a package or a 'best practice' approach to automated hyper-parameter selection for one-class SVM using Gaussian(RBF) kernel. I am currently implementing libsvm's one-class svm in R so preferably an approach incorporating that or, at least, R would be best.</p> <hr /> <p>EDIT</p> <p>Just to give a mo...
2
2,036
How to use Wix Toolset's HarvestDirectory?
<p>I want to automatically add a folder, <code>C:\example\dir</code>, to a Wix Toolset MSI installer.</p> <p>I used the <a href="https://wixtoolset.org/documentation/manual/v3/msbuild/target_reference/harvestdirectory.html" rel="nofollow noreferrer">HarvestDirectory target</a> like this:</p> <pre class="lang-xml pretty...
2
1,131
ReactJS) how to get data with XMLHttpRequest from PHP and render that data inside sibling component
<p>I am currently developing a ReactJS web application.</p> <p>No JQuery is used.</p> <p>When ReactJS triggers onTouchEnd event, ReactJS will send XMLHttpRequest to my php server. PHP will loop through MYSQL database. After that, if looping through database was successful, PHP will send HTML data to javascript AND! I...
2
2,599
Evaluate PHP logic stored in arrays
<h2>Objective</h2> <p>I'm trying to store complex comparisons as PHP arrays. I then want to read the array to evaluate a group of variables and return whether the statement is true or false.</p> <h2>Question</h2> <p>How can I store complex comparisons so that they can later be read and evaluate the variables presen...
2
3,607
Nested Hibernate Entity
<p>I am creating a Spring JPA (PostgresSQL &amp; H2) service that deals with offices. I can have a stand-alone office, or an parent office (corporate) with children (remote) offices. Offices have an address and a list of employees (who can belong to more than one office). I am struggling with the design and would rea...
2
1,211
Flutter layout issue in ios devices, messed up layout in iOS devices
<p>I'm having a very weird problem with a layout. I've created a screen that is working absolutely fine in all android devices but when I run same code on iOS devices its it's messed up, am attaching screenshots of android and iOS. Here is the code for this screen. Same issue am facing in one more screen where I am hav...
2
7,472
Python script use while loop to keep updating job scripts and multiprocess the tasks in queue
<p>I am trying to write a python script scanning a folder and collect updated SQL script, and then automatically pull data for the SQL script. In the code, a while loop is scanning new SQL file, and send to data pull function. I am having trouble to understand how to make a dynamic queue with while loop, but also have ...
2
2,278
How to refresh Wicket DataTable after submitting the Search button
<p>I would like to refresh the Wicket DataTable after submitting the Search button. Here is the code:</p> <pre><code>public class SearchPanel extends Panel { private static final long serialVersionUID = 1L; private SearchService searchService; public SearchPanel(String id,final SearchService searchServic...
2
2,412
How to use AppImageTool to create package to run on older Linux
<p>I'm trying to use <code>appimagetool</code>(<a href="https://appimage.org/" rel="nofollow noreferrer">https://appimage.org/</a>) to create a single-binary executable of the OCR program <code>tesseract</code>(<a href="https://github.com/tesseract-ocr" rel="nofollow noreferrer">https://github.com/tesseract-ocr</a>). ...
2
2,472
php array pagination with mid range numbers
<p>I have an array pagination class. But that class displays all the page numbers. </p> <p>I mean if i have 100 pages, it displays all 100 page numbers. </p> <p>Can someone help me to implement mid range numbers in this pagination class</p> <pre><code>&lt;?php class pagination { /** * Properties array...
2
2,731
Multiple update buttons on single form
<p>Please forgive me for the terribly structured code. I'm attempting to update different customers on each line with an individual submit button. The delete function works great. I'm trying to pass the ID of the row when the submit button is clicked for each row. However, I'm getting the ID for the last row, no matter...
2
1,151
How to use Recyclerview in Recyclerview Adapter
<p>How to setup recyclerview in recyclerview adapter<br></p> <p><strong>Fragment_A</strong><br> Setup recyclerview Adapter_A in Fragment_A</p> <pre><code> @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout fo...
2
2,705
ListAdapter with multiple item types throws ClassCastException
<p>I am building an app for an event and one of the features is a message board. To do this I built a <code>ListView</code> and loaded it with messages. </p> <p>I have two types of message: messages you send, and messages the other send. The layout is slightly different, U use other XML files. I tried my code(below) a...
2
2,642
Issue with jssor slider
<p>I used a banner slider in my site from this link</p> <p>www.jssor.com/demos/banner-slider.html</p> <p>I use second one ,but when I zoom in the page in my browser the slider can't cover all width of page and its appearance become not good at all</p> <ul> <li>I but this slider in container but without benefit , and...
2
11,852
How to resize a Bootstrap Modal with a Carousel inside that has differing sized images, smoothly
<p>So I have a carousel inside of a modal... The carousel cycles through the images, but I have a video in there, so the sizing changes when I reach the video.<br> However, when the modal/carousel gets to the video from a picture (vice-versa) it has a horrible clunky resize. I would like a smooth transition between the...
2
1,758
finding the last visible row in a ListObject
<p>I am using the code below to find the Sheet.Row of the last visible row in a ListObject. It seems to work fine but am wondering if there might be a quicker way to do this when the ListObject is very large.</p> <p>Cheers</p> <pre><code>Function GetLastDataRowNumber(aListObj As ListObject, Optional bVisibleOnly As B...
2
1,100
GitHub Action workflow_call does not use up to date input values
<p>I am encountering a strange behaviour with GitHub Action <code>workflow_call</code>.</p> <p>Basically, everything works fine after the initial setup, but when I edit the input parameters of the workflow files it does not use the updated values. Hard to explain in words, so let me show you an example.</p> <p>Consider...
2
1,112
React Native Expo Push notification redirect not working properly
<p>I am successfully able to receive push notifications in my react native app but I am unable to make a redirect based on them. What happens is that on android, when I touch the notification, the app completely reloads and the notification data is lost. How can I handle this? </p> <p>This is my code</p> <pre><code>i...
2
1,162
How to change an image from ImageView when I'm in the different activity
<p>I'm working with my diploma thesis, but i can't do this one thing. </p> <p>This is my MainActivity and in there you have a picture of cars. <a href="https://imgur.com/WNFG48q" rel="nofollow noreferrer">https://imgur.com/WNFG48q</a> The User can change the car which he is using or he wants to use. There you have ano...
2
1,531
jquery Validate not validating input in IE 8
<p>I am using jquery validation and it is not catching instances where the validation conditions are not met? This is curious to me, partly, because it was working before (I am using IE 8 in compatibility mode now, would that affect something?)...<br> There don't seem to be any compilation exceptions off the top of my...
2
5,371
Unsatisfied dependency expressed through field 'sessionFactory'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
<p>Error creating bean with name 'trangchuController': Unsatisfied dependency expressed through field 'sessionFactory'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.hibernate.SessionFactory' available: expected at least 1 bean which qualifies as au...
2
1,719
Attempt to invoke virtual method 'boolean android.util.SparseBooleanArray.get(int)' on a null object reference
<p>I am creating an alert dialog that has some checkedtextviews and I want to take only the checked ones and add them through my Service class to my activity.</p> <p>Whenever I try to tun it it works fine until I click the ok in the dialog box. I get the following:</p> <p>Attempt to invoke virtual method 'boolean and...
2
1,211
Haskell Parsec - error messages are less helpful while using custom tokens
<p>I'm working on seperating lexing and parsing stages of a parser. After some tests, I realized error messages are less helpful when I'm using some tokens other than Parsec's Char tokens.</p> <p>Here are some examples of Parsec's error messages while using Char tokens:</p> <pre><code>ghci&gt; P.parseTest (string "as...
2
1,935
How to configure a custom domain for HttpApi using AWS SAM?
<p>I am developing an API using AWS Lambda, AWS API Gateway and aws-sam. I have implemented firebase authentication. I also use nested stacks.</p> <p>I am trying to use a custom domain for my API endpoints, so I can call like <code>api.mydomain.com/products</code>, <code>api.mydomain.com/sales</code> and so on. I have ...
2
2,639
java.lang.NoClassDefFoundError: com.sun.xml.ws.fault.SOAPFaultBuilder
<p>We are seeing an error when trying to invoke a getreports operation in an application. It is running inside a java 6 environment. Please let me know if I need to add in more details. </p> <pre><code> java.lang.NoClassDefFoundError: com.sun.xml.ws.fault.SOAPFaultBuilder (initialization failure)...
2
1,419
Making userform with vba, commandbutton does not work
<p>First of all I'm from Holland, so sorry for my bad English.</p> <p>I have an excelsheet with a lot of records (from 10 to 1000, depending on the user). My idea was to dynamically make a userform where a row of textboxes per record is created. Then I want to make a commandbutton per record to change the data in the ...
2
1,196
Why my CallBack function doesnt works?
<p>I'm trying to make some calls to a WebService</p> <p>I did exactly what is described in this article</p> <p><a href="http://viralsarvaiya.wordpress.com/2010/03/23/calling-web-service-from-java-script-in-asp-net-c/" rel="nofollow">http://viralsarvaiya.wordpress.com/2010/03/23/calling-web-service-from-java-script-in...
2
1,107
The scope and lifespan of temp table created in nested sp calls in TSQL
<p>I revised some of the sp with temp table to eliminate the dozends of <code>declare @vars</code> in each sps. Runing individually, they seem to work great, until I wrote a test case script, looping over the live records in production system to test these unreleased new sps (ATM, I can't think of better ways to loop ...
2
1,157
ASP.NET MVC newbie: getting/passing data in dropdown form for multiple objects in an edit View
<p>Using the Authors/Books catalog example, let's say I want to edit the info for the books of a specific author.</p> <p>When someone navigates to domain.com/Books/Edit/2, I want to display an edit view for all the books where Author_ID = 2. Among the various book info is the book category (fiction, non-fiction, text...
2
1,112
System.ArgumentOutOfRangeException StartIndex cannot be less than zero get On server, on localhost no error
<p>I have very strange problem, I'm downloading html from other website (it is not illegal). </p> <pre><code>string img_1 = startHTML.Substring(startHTML.IndexOf("img")); </code></pre> <p>It was working perfect, but suddanly it stop and show this error:</p> <blockquote> <p>System.ArgumentOutOfRangeException: Start...
2
1,271
Huge node leak in web app under Chrome - developer tools not reporting cause
<p>I have a rather complicated web-application that is leaking nodes at an incredibly fast rate. Using windows task manager, I can see the amount of memory used by the chrome process increasing by around 3MB a second. </p> <p>My initial approach was to disable parts of the application to isolate the area causing the p...
2
2,036
Asp.net MVC jQuery Ajax calls to JsonResult return no data
<p>I have this script loaded on a page: </p> <pre><code>(function() { window.alert('bookmarklet started'); function AjaxSuccess(data, textStatus, xmlHttpRequest) { if (typeof (data) == 'undefined') { return alert('Data is undefined'); } ...
2
1,233
Primefaces toggle color of dataGrid element by button click
<p>I would like to change the background color of an datgrid element by clicking on a commandbutton. I have no idea at the moment how to do this.</p> <p>When I click on the following button, the element of the grid item is added to a list and I want to change the color of the panel item to (for e.g. yellow), so that t...
2
1,905
How do scan an opened book with openCV and Python and take the page that is focused in?
<p>I need to scan an opened book, in fact it is an agenda; and apply to it a four point transform to crop it a save it but it only requires 4 points and it sometimes takes 6 or 5 points and draws an incomplete rectangle So it draws it and tries to close it... but it fails at applying the 4 point transform <a href="http...
2
1,536
How to read data with pagination from large xml file using c#
<p>I want to read data from <code>XML</code> file but i do not want to read all data and then sort and filter. basically i do not want to load all <code>XML</code> data into memory rather want to read small amount of data by pagination.</p> <p>we often read data from database with pagination and same way i want to rea...
2
1,028
OpenSSL CMS encrypt in C++ and Objective-c
<p>I'm encrypting a text (just a string) using OpenSSL's CMS library. I've implemented a cms encrypt method and when I call this in a C++ project (with the equal certificate and input string) it produces the following output:</p> <pre><code>MIME-Version: 1.0 Content-Disposition: attachment; filename="smime.p7m" Conten...
2
1,281
Yii2: Match excel column with master record
<p>I am working on <code>yii2</code>. I have a master table called <code>sims</code> in my DB and all the records are saved and updated in it. In my GUI these records are maintained in <code>SIM List</code>. Now, there is a use-case in which I am issuing the sims to a person. The issuance is done by two ways </p> <ol>...
2
4,338
How to create JSON using map in groovy
<p>In groovy how can I create ouput json in the below two structure by using the below input. I have done in java but I'm not getting how can I do in groovy.</p> <p>INPUT:</p> <pre><code>{ &quot;name&quot;: &quot;app&quot;, &quot;test2&quot;: [ { &quot;status&quot;: [ { &quot;id&quot;: 1...
2
2,913
Apple mach-o linker error - MoPubSDK
<p>I've added the MoPub iOS SDK to my rather simple project to allow advertisements from more than just iAd in the app.</p> <p>When I run the app on the simulator all is fine - but when I attempt to send/copy the app to my iPhone I get 18 'Apple Mach-O Linker Error' error messages saying:</p> <pre><code>"_MillennialM...
2
1,109
Place datasource password outside context.xml
<p>Here is my context.xml -</p> <pre><code>&lt;Context docBase=β€œmyDB” path="/myDB" reloadable="true"&gt; &lt;Resource name="jdbc/OracleDS" auth="Container" type="javax.sql.DataSource" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" driverClassName="oracle.jdbc...
2
1,394
how to convert com.mongodb.BasicDBList to something useful in Scala?
<p>So far, I am able to retrieve data from MongoDB using mongo-hadoop-core 1.4.2. The data I want to manipulate are values inside arrays inside an embed document inside each document in the collection I am querying, and I need these values as <code>Double</code>'s. The data retrieved from collections has type RDD[(Obje...
2
3,940
junit5 throws an unwanted exception
<p>I am about to write unit testcase with junit5 for my spring integration project. But when i am running a sample testcase, i am getting an exception. the below given code is my sample testcase,</p> <pre><code>@SpringBootTest class IntegrationUtilsTest { @Test @DisplayName(&quot;sample test&quot;) void sam...
2
2,877
New to Spring unable to get controller working
<p>I am new to Spring and have looked at countless examples and cannot figure out this problem. The issue that I have is that when I click the link from my index.jsp page it does not forward to the hello.jsp page. I do not know why. I have spent 2 days looking up examples and trying countless examples trying to determi...
2
2,297
Should I use SQL JOIN or IN Clause?
<p>I have a question about best approach. I am not sure which approach is best when data is considered variable in size.</p> <p>Consider the following 3 TABLES:</p> <p><strong>EMPLOYEE</strong> </p> <p>EMPLOYEE_ID, EMP_NAME</p> <p><strong>PROJECT</strong></p> <p>PROJECT_ID, PROJ_NAME</p> <p><strong>EMP_PROJ</stro...
2
1,706
NuxtJS - Cannot read property 'title' of undefined - Strange Behaviour
<p>I have a NuxtJS project linked to DatoCMS. A list of posts are displayed, click on a post title etc and get taken to the <code>_slug.vue</code> page displaying more information. When I click on the post title I get taken to the <code>_slug.vue</code> page, where I'm told 'Cannot read property 'title' of undefined'. ...
2
2,081
Powershell array correlation to SQL table dataset from powershell
<p>First off, I'm new to stack. I have referenced stack many times in the past, but recently I have been stuck on this issue for quite sometime. So here goes.</p> <p>My goal: I am attempting to correlate an array output from VMware that matches a custom value on each VM machine. ( an asset ID ) to a value ( I...
2
2,061
Running hadoop job: Class not found - org.apache.tools.ant.launch.AntMain
<p>I have locally installed Hadoop on Debian linux distribution in vmware and I am having difficulties running my test jobs.</p> <p>I can easily build create the package with IntelliJ Idea, even my mrunit tests pass as expected.</p> <p>Once I try to run the job, I get following exception: </p> <pre><code>Exception i...
2
1,700
KnockoutJS - UI not updating with built-in observableArray methods except push and pop
<p>When I do a push or pop operation on my observable array, it is reflected in the ui. However other operations on the array won't change anything in the UI. Here's an example of my case:</p> <pre><code>&lt;ul data-bind="foreach: addresses"&gt; &lt;!-- ko template: {name: 'AddressItemTemplate', data: {address: $...
2
1,493
Force close error on setOnClickListener (Example from hello Android book section 3.5)
<p>I am having problem in starting a new activity on clicking a button, here's my code:</p> <pre><code>package test.project; import android.app.Activity; import android.os.Bundle; import android.content.Intent; import android.view.View; import android.view.View.OnClickListener; public class TestActivity extends Acti...
2
1,067
Azure Pipeline runs not automatically deleting
<p>We have two build YAML pipelines to run tests on TFS one for front-end and one for back-end tests. We use two self-hosted windows agents to run these builds and we are on Azure DevOps Server 2020. Ever since we started running the pipeline we noticed our TFS database size ballooning up. We've tried editing our reten...
2
1,480
Why is the Vuetify autocomplete not showing the data in the component?
<p>I am creating a form inside a Vue component using Vue.js &amp; Vuetify but the list of schools I want to display in the autocomplete box are missing. I have included them as an array in the data function in the component but they are not showing up and the following error is thrown in the console.</p> <p>[Vuetify] U...
2
1,476
Creating Configurable product on import csv
<p>When a new simple product is added (via CSV or manually) we need to check if the appropriate configurable product has been added (where SKU = "item_number-item_colour_code" e.g. BLEA2606B-BK001). If the configurable product exists then associate the simple product. If the configurable product does not exist then cre...
2
2,252
How to add a custom hydrator strategy for doctrine Date hydrator
<p>I have a form which contains 3 field of type text and with a Date validator.</p> <p>This code is in a fieldset using doctrine hydrator (related to a doctrine entity)</p> <pre><code>$this-&gt;add( array( 'name' =&gt; 'endDate', 'type' =&gt; 'Zend\Form\Element\Text', 'opti...
2
1,239
Send email using smtp client in c#
<p>the following code gets recipients email, email subject and email body from a table and creates the emails and sends them to a pickup directory. there is a db connection class that I did not include here, but I invoke it in the code below. The code below runs fine however I am wondering if it could be improved to r...
2
1,973
.net Application hanging. Weird crash-dump
<p>A production server has an application running 24x7, and sometimes it starts consuming near 50% of CPU. I couldn't reproduce it locally, but I did a Memory Dump with adplus. The server has Windows 2008 Server 64bits, .NET 3.5. The application listens to a MSMQ and has a thread pool to execute operations, when I did ...
2
2,527
jQuery gallery error using asp.net repeater
<p>I am using asp.net repeater to display the photos and am following <a href="http://www.twospy.com/galleriffic/index.html" rel="nofollow">http://www.twospy.com/galleriffic/index.html</a> However, I am getting the following javascript error:</p> <pre><code> 'jQuery' is undefined jquery.galleriffic.js, line 10 chara...
2
6,071
Storing a score in Python
<p>So far I have made a short game in which you have to guess the area of the shape in question. Only the triangle works so far and the correct answer is B for testing.</p> <p>I am trying to store the user's progress by putting it into a text file, but when I call a function to update the score, it overwrites the file...
2
1,390
lifecycle of an object returned from a function
<p>When using a module-esq pattern to allow chaining of methods, how long do the returned objects last before being garbage collected? I really like the way jquery allows chaining methods but I'm concerned it will pollute the memory of the page with lots of unnecessary objects if I use th pattern for my code.</p> <p>h...
2
1,678
Issue with ConstraintLayout and TextView wrap_content
<p>Since I have updated to Android Studio 2.2 and start using <code>ConstraintLayout</code> with new UI Builder there is a problem, that I can't solve.</p> <p>I have a simple layout with <code>ImageView</code> and <code>TextView</code> to the right of <code>ImageView</code>. Text in <code>TextView</code> updates dynam...
2
1,427
composer require hangs and then returns KILLED
<p>I'm trying to simply install a package to my project by running</p> <pre><code>composer clearcache php -d memory_limit=8G /usr/local/bin/composer require ratchet/pawl -vvv </code></pre> <p>So it starts the process and then gets killed at same point everytime.</p> <pre><code>Reading ./composer.json Loading auth co...
2
4,356
PHP class unset/purge private array variable
<p>I'm trying to make an error logging class, I have some functions to set up various output methods like DB, file, return and screen. I want all errors to be stored into an array and when <code>__destruct()</code> is called, I want to stop the client from waiting for data and the log details about errors the user expe...
2
1,865
Plotting Partial Dependence Plots in R for binary target (mlr)
<p>I have a problem to get partial dependence plots with mlr to work properly for me. Somehow not the probability is plottet, but just the class label. I suspect, that the target may be lost during the creation of der partialdependence-data.</p> <p>Any ideas?</p> <pre><code>library(mlr) library(dplyr) library(ranger)...
2
4,049
Testing Socket.io listener in React with Enzyme
<p>I want to test if the <strong>messageListener</strong> appends the data to the <strong>messages</strong> array state. However I've gotten some blocks on this. 1. Can't test methods inside a stateless component 2. React hooks cannot be used outside a component function.</p> <p>I can't figure out how to get around t...
2
1,242
How to add delete in php script in my photo gallery
<p>I made a Photo gallery by php.<br> I am able to make upload image and show the image list. But i want to add a delete button where users can delete there unwanted image. But i was failed to add this button work. </p> <p>Someone please help to fix it?</p> <p>Here is my code on GitHub: <a href="https://github.com/sa...
2
1,678
Nginx reverse proxy uwsgi django intermittent 502
<p>I have a site setup with Nginx as load balancer (least_conn) that uses a seperate uwsgi/django server as its upstream. This is normally a pool of about 5 uwsgi/django servers but I've limited it to just one to make sure it's not a bad server. </p> <p>Under 'normal' user behavior, everything appears to be working fi...
2
1,127
Scrapy doesn't scrape items from my URLs : Crawled (200) / Referer : None
<p>I'm trying to <strong>scrape</strong> several pages from a website. For this, I've got different start URLs and a method to crawl the next pages. The issue is that the spider doesn't <strong>scrape</strong> the items and doesn't seem to crawl indicated pages. I've got no outcome. Do you have any idea to solve this ?...
2
1,399
Thick dynamic borders in table cause visual glitches in Chrome?
<p>I have a simple dynamic border that seems to work fine in IE and Firefox but in Chrome it <em>sometimes</em> seems to get an odd double-thick border. I can't see any difference in CSS and I can't seem to hone in on what exactly is causing that particular border to go double-thick but I have managed to create a Code...
2
2,728