title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Print first 1 million primes in 1 sec with constraints program size 50000 bytes and limited Memory | <p>I tried sieve of Eratosthenes: Following is my code:</p>
<pre><code>void prime_eratos(int N) {
int root = (int)sqrt((double)N);
bool *A = new bool[N + 1];
memset(A, 0, sizeof(bool) * (N + 1));
for (int m = 2; m <= root; m++) {
if (!A[m]) {
printf("%d ",m);
for (in... | 2 | 1,242 |
C# ANTLR parser does not implement inherited abstract member TokenNames.get | <p>I'm trying to use an ANTLR 4.5.3 parser in C# on Mono (running from Xamarin Studio 6.1.2 on macOS 10.11.3), but the code generated by the <code>antlr4</code> Java command-line tool has one error which prevents compilation.</p>
<p>My grammar is as follows:</p>
<pre><code>grammar Hello;
HELLO: 'hello';
WORD: [a-z]+... | 2 | 2,228 |
Why am I getting Segmentation fault (core dumped) or bus error (core dumped) when trying to populate a struct? | <p>So I am trying to use a pointer to a struct of <code>MonsterAttacks</code> as the data that belongs to an element of a linked list. In order to do this I try to populate a struct of <code>MonsterAttacks</code> and then pass that along with a null ptr to a next node to a function called create. However somewhere in t... | 2 | 1,219 |
parboiled2 and Spray cause conflicting cross-version suffixes | <p>I'm trying to add parboiled2 as a dependency to my project, and follow the Calculator example but it conflicts with spray.</p>
<p>My current <code>build.sbt</code> file includes:</p>
<pre><code>"io.spray" %% "spray-json" % "1.3.1" withSources() withJavadoc(),
"io.spray" %% "spray-can" % sprayV withSources() withJa... | 2 | 1,531 |
TokenRelayGatewayFilterFactory protecting all URL's | <p>I have a project <a href="https://github.com/ndrone/sample-gateway-oauth2login/tree/feature/allowAllToHealth" rel="nofollow noreferrer">https://github.com/ndrone/sample-gateway-oauth2login/tree/feature/allowAllToHealth</a> That I am trying to allow specific URL's open to anyone that request it. In this case, it is t... | 2 | 1,054 |
How to reset the cornerstone viewport when new image is loaded | <p>I am trying to make a Dicom viewer app in react using Cornerstone.js library. I have two components in my react app. One is ImagePreview and the other is CornerStoneElement. CornerStoneElement is where I initialize the cornerstone library and it loads the current image in its state. When a new image is pushed to Cor... | 2 | 2,433 |
HttpClient Failing in asp.net web api | <p>I have a very strange scenario I keep experiencing on one of my systems.</p>
<p>I have an <code>asp.net web API</code> hosted in IIS. Web requests come into it from mobile devices, and then it posts HTTP requests to another server that executes the specific job and then returns the result. (see flow below) </p>
<p... | 2 | 1,180 |
Monte Carlo calculation of pi using randomly generated data in Java | <p>I'm working on a program that calculates <code>pi</code> based on randomly generated float numbers that represent x,y co-ordinates on a graph. Each x, y co-ordinate is raised by the power of 2 and stored in two separate arrays. The co-ordinates are distributed uniformly on a graph of interval of 0,1.</p>
<p>The pro... | 2 | 1,066 |
How to use boost program_options to read an integer array? | <p>I am using Ubuntu and boost v1.50.</p>
<p>Previously I used boost program_options to feed a set of options into a program like so:</p>
<pre><code>#!/bin/bash
./prog --arg1 1 --arg2 "2" --arg3 {1,2,3} --arg4 {1,2} --arg5 5
</code></pre>
<p>So I am dealing with a mix of single integers, strings and integer arrays.... | 2 | 1,081 |
RangeError: Maximum call stack size exceeded in Angular | <p>I get an error on my Angular app kind of a stackOverflow. <strong>(see updates at the end)</strong></p>
<p>Basically my component is a diagram that includes two components. The <code>equipment</code> component that includes the equipment information and the <code>socket</code> component, that includes the type of co... | 2 | 3,633 |
What is difference between clang -O1 and opt -O1? | <p>What is the difference between <code>clang -O1</code> and <code>opt -O1</code>?
I observed that these two commands behave in a significantly different way.</p>
<h2>Context</h2>
<p>I would like to test LLVM optimization passes. More specifically, I would like to pick a subset of <code>-O1</code> passes so that 1) t... | 2 | 1,042 |
Kivy- Where are screenshots[screenshot()] saved on Android? | <p>I am having a big problem where when I use screenshot() on my android phone, I don't know where the screenshot ends up. I have looked in /storage/emulated/0/Android/data but nothing to be found. There is not even a folder for my app there.</p>
<p>Also, is there a way to set where the screenshots are saved? Maybe to... | 2 | 1,266 |
Jqgrid subgrid json data not showing | <p>The main grid loads data fine, but the subgrid data is not displayed.</p>
<p>This is the json data returned by my java controller for the subgrid:</p>
<p>{"allTrackingNrs":null,"page":1,
"records":[{"reference":"DGL1008","shipUnitType":"CARTON","totalOfCartons":1,"trackingNr":"SLC160759060"},{"reference":"DGL-1008... | 2 | 2,728 |
refreshing div with dynamically created data via ajax | <p>I'm trying to reload a <code>div</code> that has been dynamically created data via AJAX, but I'm getting a 403 forbidden error. Maybe something is wrong in what I am doing. Would you mind to helping me please. Thanks in advance.</p>
<p>HTML:</p>
<pre><code><div id="curr-elem">
<div class="box-header"&... | 2 | 1,467 |
3d c2c fft with fftw library | <p>I am trying to do a 3D FFT with the FFTW library, but I have some difficulties with the inverse transformation.</p>
<p>At first I do the foreword transformation via:</p>
<pre><code>fftwf_plan_dft_3d(_dimensions[0], _dimensions[1], _dimensions[2], (fftwf_complex*)_inputBuffer, (fftwf_complex*)_outputBuffer, FFTW_FO... | 2 | 1,332 |
MassTransit 2.6.1 Request/Response pattern - Response times out | <p>I'm looking at MassTransit as a ServiceBus implementation to use in a web project.</p>
<p>I am playing with the <a href="http://docs.masstransit-project.com/en/latest/overview/request.html" rel="nofollow">Request/Response</a> pattern and am seeing a long delay between the consumer receiving the message and respondi... | 2 | 2,313 |
What's the correct way of using CSS3 font-face? | <p>Could someone please help me understand what's the correct way of using CSS3 font-face. Below are some font-face declarations, which one is correct and why?</p>
<pre><code>/* START OF SAMPLE CODE # 1 */
@font-face {
font-family: 'WebFont';
src: url('webfont.eot');
src: url('webfont.eot?#iefix') format('... | 2 | 1,536 |
Why don't the border-specific attributes seems to work on rows while displaying dynamic data using h:dataTable in JSF? | <p>Consider:</p>
<pre><code> <h:dataTable value="#{orderBean.orderList}" var="o"
styleClass="order-table"
headerClass="order-table-header"
rowClasses="order-table-odd-row,order-table-even-row" >
<h:column>
<... | 2 | 1,099 |
Make a C++ SDL2 standalone and cross-platform-development with CMake | <p>My goal is to build a C++ app with SDL2 that can run on <strong>both</strong> Linux and Windows which may <strong>not have SDL2 installed</strong>. <em>(I know that there are lot of posts about it, I'll come later)</em>.</p>
<p>So I'm going through my little project structure and I remember using CMake to make build... | 2 | 2,771 |
How to efficiently load large training data too big for RAM for training in tensorflow? | <p>I've got around 10 GB of training data in numpy array format. However, my RAM is not big enough to load the data and the tensorflow 2.0 model at the same time. I've done plenty of research into tf.data, tf.TFRecords and generators, but I'm stuck in the actual implementation of the training loop. I currently have the... | 2 | 1,810 |
Google Sign-in "check first time login" and "Logout" issues in android application | <p>I am making an android application, when the user installs the application, he/she needs to sign-in with google account, after successful logged-in , he/she will be redirected to the dashboard page. If he/she closes application and opens it again and if they are already logged in then dashboard activity should be sh... | 2 | 4,520 |
How can i solve this error "Too few arguments to function App\Http\Controllers\CtnController::show(), 0 passed and exactly 1 expected" | <p>I have reviewed similar questions but none of the solutions worked for me. I have show view that fetches data from the db which I want to display. I believe I have the right code for my show function on my CtnController but I keep getting this frustrating error. Ctn in this case is a type of form I'm trying to creat... | 2 | 1,232 |
Does ISO C allow aliasing of the argv[] pointers supplied to main()? | <p>ISO C requires that hosted implementations call a function named <code>main</code>. If the program receives arguments, they are received as an array of <code>char*</code> pointers, the second argument in <code>main</code>'s definition <code>int main(int argc, char* argv[])</code>.</p>
<p>ISO C also requires that th... | 2 | 1,225 |
angular 1.5.5 material design gives me Unknown provider: $$HashMapProvider <- $$HashMap <- $$animateQueue <- $animate error | <p>I am trying to use angular material 1.5.5 with angular 1.6.5. My code is as shown below:</p>
<p>index.html</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<title>xyz</title>
</head>
<body ng-app="xyz">
<ng-view></ng-view>
<script src="bower_compo... | 2 | 1,236 |
Sort multiple columns of Excel in VBA given the top-left and lowest-right cell | <p>I am trying to sort these three columns (<strong>Sort By Col-2</strong>) in excel using VBA.
Top-left (Row number and Column number e.g. 1,1) and lowest-right cell (Row number and Column number e.g. 9,3) are known.
Every cell contains the values of String type.</p>
<p><strong>Input:</strong></p>
<pre><code>Col-1 ... | 2 | 1,106 |
okhttp3 : writing to MySQL from Android | <p>I've spent a long time now trying to figure out how to write to MySQL on a web server from my Android application. I plan to execute an update in a table with data comming from Android. I have a PHP page that seems to work, at least when I call it from HTTRequester module in Firefox.</p>
<p>HttpRequest is set with ... | 2 | 2,175 |
Cookies saved using document.cookie getting deleted after closing the browser | <p>Using the common code for setting the username and password in cookie via javascript as below -</p>
<pre><code>function submitLogin(){
var uNameInCookie=checkCookie("username");
var passInCookie=checkCookie("password");
if(uNameInCookie!=="" && passInCookie!=""){
docume... | 2 | 1,132 |
Why doesn't transform-style: preserve-3d work? | <p>As far as I understand, <code>transform-style: preserve-3d;</code> property applies to the element and allows one to be positioned in a three-dimensional space. But I don't see any difference with and without <code>transform-style: preserve-3d;</code> property.</p>
<p>So, I have two examples.</p>
<ol>
<li>With using... | 2 | 1,078 |
Marginal effect of interaction variable in probit regression using Stata | <p>I am running a probit regression with an interaction between one continuous and one dummy variable. The coefficient is displayed in the regression output but when I look at the marginal effects the interaction is missing.</p>
<p>How can I get the marginal effect of the interaction variable?</p>
<pre><code>probit m... | 2 | 1,339 |
Cardview - fix view - attach to bottom | <p>my problem now:</p>
<p>I need to "attach" these two buttons to bottom - I do not want them to be available to be scrolled (only on bottom - always visible). But my Edittext needs to be <strong>scrollable</strong>, because there is long text. In android studio it looks good, but in APP not.</p>
<p>XML</p>
<pre><co... | 2 | 1,545 |
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project daily-installer: | <p>I am getting permission denied error. I have given permission to the folder as well. I have checked all over in Stack Overflow and nothing seems to be working. When I close and open Eclipse it works on Eclipse. The environment that I am using is Ubuntu 18.</p>
<p><div class="snippet" data-lang="js" data-hide="false... | 2 | 4,513 |
Firefox add-on drops WebSocket connection to Kodi after a few seconds | <p>I have decided to develop an add-on for Firefox to control <a href="https://kodi.tv/" rel="nofollow">Kodi</a> because I couldn't find any that already did everything I wanted. I have chosen to use <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API" rel="nofollow">WebSocket</a> to communicate wi... | 2 | 1,539 |
Spring Security Unit Test With Csrf causes HttpServletResponse to not be found | <p>I was unable to find this question asked anywhere else.</p>
<p>I have my unit test setup as follows: </p>
<pre><code>@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class)
//@DatabaseSetup("classpath:decks.xml")
@WebIntegrationTest
public class DeckControllerTest {
... | 2 | 1,066 |
WooCommerce - Retrieving the correct data value for select box after submitting | <p>I am using Woocommerce and I have built a select box in the Admin Panel. I populate the information in the select box via a flat file.
Everything works fine (almost).</p>
<p>The part I am stuck on is after I select the "choice" I want and the save I am getting the array <strong><code>$key</code></strong> position ... | 2 | 1,171 |
Displaying text from text file into boostrap modal | <p>I've created a modal inside my main page, and I use jQuery to get the data from the text file, I am able to successfully get the data from the text file and able to console log out the text file, but when I open my modal, the field was blank. May I know the reason why ??</p>
<p>Here is the code for getting the data... | 2 | 1,075 |
UITableView Scrolling Slow When Using Non-English (Arabic, Chinese, Hebrew, Urdu, etc.) Text | <p>I am using iOS 5 and making an iPad app. I have a UITableView in my app where every cell contains a UITextView. It experiences very slow scrolling, however, when non-English text is loaded into the text view.</p>
<p>This is a sample project I created to demonstrate the issue. This uses a UITableView where every UIT... | 2 | 1,904 |
How to evaluate the xgboost classification model stability | <p>I have:</p>
<ol>
<li>Python xgboost classification model</li>
<li>Weekly datasets (basis of classification) since the begining of 2018. Each of dataset has about 100 thousand rows and 70 columns (features).</li>
<li>weekly prediction results on datasets via xgboost model (using logistic regression) in the format:</... | 2 | 1,230 |
Camera pose estimation using QR codes in MATLAB | <p>i'm trying to learn camera pose estimation and have been been through quite a lot of material. I want to calculate the pose of the camera using QR codes (quick response code) set up like this on an standard A4:</p>
<p>A0 A1</p>
<p>B0 B1</p>
<p>C0 C1</p>
<ul>
<li>Took some photos of the QR codes which i printed o... | 2 | 4,136 |
ARM template to add custom hostname to a set of websites | <p>I'm trying to use this Azure Resource Manager template code snippet to add a custom domain to set of webapps. The web apps are being created correctly, as is the traffic manager profile. However, the ARM template is failing when adding the custom hostnames. Note that I'm using a variable parameter that is passed ... | 2 | 2,014 |
RegEx match for paragraphs | <p>I can not figure out the correct RegEx to use for parsing a text file and identifying paragraphs. </p>
<p>What I currently have:</p>
<pre><code>[\n\n]+
</code></pre>
<p>Sample Text:</p>
<blockquote>
<p>Das Pensionat Klinger war bereits etwas zusammengeschmolzen, als das
junge Ehepaar daselbst eintrat. Es ... | 2 | 1,075 |
Factory Girl create objects but objects not found in database | <p>I'm using cucumber with Factory Girl and here is the mysterious problem,</p>
<p>in my cucumber steps :</p>
<pre><code>fact = Factory.create(:fact,
:factable_type => "type_#{i}",
:factable_id => i.to_s,
:factable_action => "action_#{i}",
... | 2 | 1,639 |
Android custom row layout not showing up in listview | <p>I can't see the row that I've added to a list view and am wondering if it has something to do with my layout or ListViewAdapter. In debug I can see that my array is filled with the data passed to my ArrayList playerList, and I see the data in Toast but nothing shows up on screen.
MainActivity xml:</p>
<pre><code>... | 2 | 1,921 |
Disable other rows when editing one row - editing individual row of a table | <p>In the following html code, when one row is in an editing mode(the edit button on this row is clicked), the edit button on the rest of the rows shall be disabled. And when one row is in the edit mode, data will show up in a text input field.</p>
<pre><code> <table class="table">
<the... | 2 | 1,469 |
fields not in mapping are included in the search results returned by ElasticSearch | <p>I want to index pdf attachment using Tire gem as client for ElasticSearch. In my mapping, I exclude the attachment field from _source, so that the attachment is not stored in the index and <strong>not returned in the search results</strong>:</p>
<pre><code>mapping :_source => { :excludes => ['attachment_origi... | 2 | 2,588 |
Contact Form 7 input field wrapping using flexbox | <p>So I'm trying to create a form like this using WordPress Contact Form 7 plugin, I think it should work and is accurate, but apparently not:</p>
<p><a href="https://i.stack.imgur.com/VUD4R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VUD4R.png" alt="enter image description here" /></a></p>
<p>In... | 2 | 1,585 |
PHP curl sending message to Node.js returns no result | <p>I wanted to implement websockets to a complex web system to synchronize data properly. The idea was that all clients may make ajax-calls, php handles those calls, may edit data on a database and on success the php-backend sends some data to a websocket-server. That websocket server then sends the data to all subscri... | 2 | 1,081 |
Spring WS is not generating wsdl operations for all the public methods in the Endpoint class | <p>I have a Spring endpoint class with two public methods. But when Spring is auto-generating the wsdl it doesn't include the second public method. Could you pleas let me know what is wrong and what needs to be done. I am using Spring 4.3 and below are the classes.</p>
<p>Configuration class</p>
<pre><code>@EnableWs
... | 2 | 3,726 |
Empty error message with jQuery.jTable | <p>I'm having problems with the <a href="http://jtable.org/" rel="nofollow noreferrer">jquery.jtable.js</a> plugin.</p>
<p><strong>My problem:</strong></p>
<p>jTable continues to post this empty modal error message:</p>
<p><img src="https://i.stack.imgur.com/m0Kv3.png" alt="jTable error message on load"></p>
<p>For... | 2 | 1,114 |
virt-manager dual monitor mouse not working | <p>I set up a Windows 10 VM in virt-manager which works like a charm on my laptop. But when I'm at work I want to use my dual monitor setup. I tried adding a second QXL Monitor which I can activate in the windows settings but as soon as I do that, my cursor disappears and I don't know why.</p>
<p>Here is my VM config:... | 2 | 3,255 |
Why can't I create a vendor bill in SuiteScript? | <p>I am unable to save a vendor bill, as it will come up with an error that inventory details are required when I do not enter them. However, when I attempt to enter any values for the inventory-related fields, it will come up with an error of "You cannot create an inventory detail for this item.". The available item f... | 2 | 3,412 |
upload all images contained in folder to database ASP MVC 4 Razor | <p>By now I'm able to upload image by image and save it in Database , But since I've several images, I need to upload all the images contained in a folder one shot.
Here is my current controller :</p>
<pre><code> [HttpPost]
public ActionResult Form(HttpPostedFileBase file, DateTime dateParution, long IdJournal, s... | 2 | 2,655 |
Webpage with a Dynamic Header | <p>I have a webpage with a dynamic list. I want the headers to be configurable. To start with the headers are named as <code>column1</code>, <code>column2</code>, ... <code>columnnN</code>. Clicking on any of these header I open up a DHTML modal window where I select the header name from a predefined list so that I can... | 2 | 1,195 |
xmlhttprequest onlys gets to status 3 | <p>I have a simple search form with a search box and a result box. </p>
<p>When I type a search word a request is created like: <a href="http://www.site.com/php_handler.php?s=hello" rel="nofollow noreferrer">http://www.site.com/php_handler.php?s=hello</a>
In the php script and a result is given back to the script this... | 2 | 1,437 |
UniqueEntity doesn't work | <p>@UniqueEntity doesn't work for me. In controller I use $form->isValid() and form passes, but it shouldn't. Instead my own defined message, I got MySQL error:</p>
<blockquote>
<p>SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'media30' for key 'UNIQ_115E494BF47645AE'</p>
</blockquote>
<p>I ... | 2 | 1,273 |
MySQL Gem installation error on Rails | <p>I am deploying my Rails application using Chef. While </p>
<blockquote>
<p>gem install mysql </p>
</blockquote>
<p>am getting hte following error, </p>
<blockquote>
<p>Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.</p>
<p>/opt/chef/embedded/bin/ruby extconf.rb checki... | 2 | 1,245 |
Failed to run @QuarkusTest. Unsupported api 524288. After update quarkus plugin version | <p>when i run my test on intellij, it was returning</p>
<pre><code>[error]: Build step io.quarkus.jsonb.deployment.JsonbProcessor#generateCustomizer threw an exception:
java.lang.IllegalArgumentException: Unsupported api 524288
at org.objectweb.asm.ClassVisitor.
[error]: Build step io.quarkus.vertx.http.deploy... | 2 | 4,573 |
bootstrap modal doesn't work properly | <p>I've created a navigation bar and in this navigation bar I have login in option . I want a login in window pops out once I hit on it . So I created a modal bootstrap and the thing is it works but once it comes out the whole screen dims rather than the every thing but the pop up modal . Any idea where am I making my ... | 2 | 1,637 |
ASP.NET : Logic for Image Resizing proportionaly | <p>I have a C# function to REsize images.The parameters of the funciton would be orginal image path,new image path(path after saving the resizing of image).
Now i want to build a logic for the below requirement. </p>
<p>1 . If the orginal file's width is greater than 480 or lessthan 450 ,then i want to set the width ... | 2 | 1,271 |
Redirect to another page after GET call in modal form in React | <p>I am trying to redirect to another page after fetch GET call from Modal from in react using history.props and I redirected but I don't know what should write there to show my actual data. I editied somehting i added something in history.props and componentDidMount in Report Here is my code:</p>
<pre><code>import Re... | 2 | 4,012 |
UWP ScrollViewer and StackPanels don't work properly | <p>The UWP <code>ScrollViewer</code> element isn't scrolling at all with my <code>StackPanel</code>. I've tried <code>Grid</code>s and the row definitions but that didn't work either. Here is my current XAML.</p>
<p><a href="https://i.stack.imgur.com/Q9PFj.gif" rel="nofollow noreferrer">GIF showing scrolling not worki... | 2 | 1,331 |
Google Play Multiplayer Switching to Game Screen Libgdx | <p>I am using Libgdx to manage the screens, updates and rendering.</p>
<p>When I get a RESULT_OK from WAITING_ROOM i start the game screen, the following happens.</p>
<ol>
<li>in the waiting room, I can see ME who initiated the game room</li>
<li>I can see the auto matched player who joined the waiting room</li>
<li>... | 2 | 1,812 |
Intermittetly NPE during parseParameters in Tomcat's Request | <p>We have intermittet NPE during parseParemeters in org.apache.catalina.connector.Request. The more users are online, the more this NPE happens. After a JBoss restart, the NPEs disappear for a while. Within 24 hours we receive between one and over 400 of those NPE. It does not matter which service is called. Any servi... | 2 | 5,037 |
jQuery code organization and performance | <p>After doing some research on the subject, I've been experimenting a lot with patterns to organize my jQuery code (Rebecca Murphy did a <a href="http://blog.rebeccamurphey.com/organize-your-jquery" rel="nofollow noreferrer">presentation</a> on this at the jQuery Conference for example).</p>
<p>Yesterday I checked th... | 2 | 1,313 |
Cannot insert empty string in oracle table | <p>i am trying to insert data into one of my table.</p>
<pre><code>insert into t_transaction_query_log
(log_id,
posting_id,
fee_id,
fee_status,
fee_type,
pay_mode,
accounting_date,
policy_id,
money_id,
finish_time,
source_type,
fee_amount,
cr_seg,
dr... | 2 | 1,274 |
How to set different weight variables in multiple rnn layers in tensorflow? | <p>Hi I'm writing a "many(input) to many(output)" rnn code to deal with character prediction. For this, I set my hidden layer parameter as follows. Three hidden layers and each of them has 100, 200, and 300 hidden units.</p>
<pre><code>hidden layers= [100,200,300]
</code></pre>
<p>My code is this.</p>
<pre><code># ... | 2 | 1,206 |
How to show the selected plan value in a text box in vue js html? | <p>My json data is as follows</p>
<pre><code>{"status": true, "plans": [{"planId": 1, "name": "Baic", "cost": 500.0, "validity": 365}, {"planId": 3, "name": "free", "cost": 0.0, "validity": 999}, {"planId": 4, "name": "Premium", "cost": 500.0, "validity": 500}, {"planId": 5, "name": "Super Premium", "cost": 750.0, "va... | 2 | 1,676 |
Linker error with virtual functions c++ | <p>I am not sure what is wrong with this code, I am learning <a href="https://www.tutorialspoint.com/design_pattern/builder_pattern.htm" rel="nofollow noreferrer">Builder pattern</a>. The example code is in Java and I am trying to code the same in C++, butI am getting linker errors. I searched and read about it all and... | 2 | 2,703 |
Firebase database update is removing child data | <p>I am writing an event list app, It has a hierarchy of Event > Part > Step. After I've created an event, I can "go into" the event and see the list of "parts" which contain a list of "steps".</p>
<p>The way I've structured my database is so that I have an object sorted by user ID to show the events and its details,... | 2 | 2,380 |
jmockit of HttpURLConnection throws NullPointerException | <p>I am using JMockit to mock HttpURLConnection. My initial two test cases (fileNotFoundResponse, badMimeType) work find, but my third test case (contentDisposition) generates NPE within the Expectations block and I don't know why. </p>
<p>Here is the Junit test class:</p>
<pre><code>@RunWith(JMockit.class)
public ... | 2 | 2,055 |
Mapping an java object to a database | <p>I am tring to map a java object to database(i am using postgres). when i am runnig the java file (HibernateTest.java) it is showing lot of errors. i think all thing are correct. but i am doubtfull in my eclipse,bcoz it is not supporting xml ( i mean it is not showing color, it is not taking xml file as a know file )... | 2 | 2,544 |
NodeJS EventEmitter test with Mocha | <p>I have a problem testing <a href="http://ldapjs.org/client.html#search" rel="nofollow noreferrer">ldapjs</a> client search operation. It returns an EventEmitter that you have to make listen for some specific event. I wrapped this operations to promisify it and to define my logic and I would like to unit-test it. </p... | 2 | 1,543 |
check multiple checkbox based on database column value using jquery ajax | <p>i want to update my formin php using ajax jquery so i load textbox and checkbox value based on data stored in database textbox value is load but how checked checkbox value based on column value?</p>
<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang... | 2 | 1,563 |
Updating previous latitude and longitude | <p>Thank you so much for your help, knowledge and time, it is priceless for me. I am working on a GPS location application. The basic idea is the behaviour of a compass. If a walk towards the latitude, so I am going to receive a notification about my direction is going to the north or south and the same with longitude ... | 2 | 2,730 |
Webpack won't generate external css file | <p>my webpack setup won't generate the external css file. It bundles my .js just fine however. I am using the ExtractTextPlugin and it's still not working. No errors are generated. Any help would be greatly appreciated! :-)</p>
<p><strong>Here is my webpack.config.js</strong></p>
<pre><code>var ExtractTextPlugin = re... | 2 | 1,074 |
Antd Import on Demand get error: Variable @import is undefined by less-loader | <p>I want to config antd Import on Demand.But I get the error: Variable @import is undefined
<a href="https://i.stack.imgur.com/K0Y4N.png" rel="nofollow noreferrer">The error screenshots</a></p>
<p>Why less parse @import as a variable?</p>
<p>This is my package.json:</p>
<pre><code>"dependencies": {
"... | 2 | 2,040 |
C++/CLI Forward Declaration problems | <p>I have been trying to do forward declaration to allow access between classes. I have read here that:</p>
<ul>
<li>I can't include the "a.h" file when forward declaring A in b.h</li>
</ul>
<p>I haven't been able to find very much about namespaces during forward declaration. And I'm fairly certain I am messing this ... | 2 | 1,629 |
Waiting on WaitForMultipleObjects | <p>I'm trying to write a unit test for my <code>FileWatcher</code> class.</p>
<p><code>FileWatcher</code> derives from a Thread class and uses <code>WaitForMultipleObjects</code> to wait on two handles in its thread procedure:</p>
<ol>
<li>The handle returned from <code>FindFirstChangeNotification</code></li>
<li>A h... | 2 | 1,113 |
Facebook's 'like button' doesn't work as it should | <p>I know there are many threads on this subject; I read them all (I think) and none of them is an answer to my problem, so here goes:
I want a facebook 'like' button om my website; the kind which invites the liker to add a comment. It is working 'a bit', but not the way I'd expect. I use a special fb-account for testi... | 2 | 1,432 |
How to resolve discrepancy in 95% confidence intervals in survival function in R | <p>I'm in the process of writing some functions to extract information from the results of a survival analysis and I ran into a discrepancy between my extraction of the lower and upper survival time as specified by the 95% confidence interval and that which is reported from the package itself as a summary.</p>
<p>I'm ... | 2 | 2,895 |
Priority Queue using a Max-Heap Data Structure | <p>I am implementing a priority queue using a max-heap data structure in Python. I'm using several names that have numbers associated with them as their priority (9 being the highest and 1 being the lowest). The issue I am facing is that when I dequeue an item from the priority queue, it does not dequeue the item with ... | 2 | 2,622 |
How to display progress bar until whole aspx is loading in asp.net c# | <p>i want to display the progress bar until whole .aspx is loading in asp.netc#
but it is not working please help me out.progress bar is complete while page is loading.but i want How to show progress bar on web page until web page is fully loaded? on button click.
var size = 2;
... | 2 | 1,542 |
Web Deploy Publish asp.net webapp with nuget dependencies on TFS | <p>I am trying to publish a vs2013 asp.net webapp (the only project in the solution) on TFS 2012. On any developer box, it downloads, explodes and resolves nuget packages (using nuget 2.8.1,) and runs Web Deploy Publish just fine.</p>
<p>However I am unable to replicate that on the TFS box. MSBuild is not finding nuge... | 2 | 1,067 |
D3.js hierarchical edge bundling coloring by group | <p>I am trying to color the connections in my hierarchical edge bundling visualization based on the groups they are connecting to. An example of this can be seen <a href="https://www.seas.harvard.edu/academics#vis" rel="noreferrer">here</a>.</p>
<p><a href="https://i.stack.imgur.com/1FLQ9.jpg" rel="noreferrer"><img sr... | 2 | 5,838 |
Browser history needs a DOM when server side rendering | <p>I am trying to implement server-side-rendering in my react app (using the create-react-app environment). I am trying to follow the example shown here, which still maintaining my app's structure. Not much different, so I figured it wouldn't be an issue to follow along within my own app.
<a href="https://medium.com/... | 2 | 1,425 |
TypeScript fetch api with react | <p>I created a custom hook to fetch an API and I wanna pass the data to the component and getting this type of error. I'm new to react and typescript</p>
<p>my custom useFetch code:</p>
<pre class="lang-ts prettyprint-override"><code>import { useEffect, useState } from "react";
export interface IBlog {
d... | 2 | 2,054 |
Repeat statement for switch case | <p>So I want make the program that can input data many times, for example I choose case 1 again after I use case 1 to input data. Or I choose case 2 many times to see all data as I want.</p>
<p>Mostly said break statement bring the solution. But, when I using break statement after case, the program was terminated. So ... | 2 | 2,049 |
How to configure several child context in a Spring Boot 2 application? | <p>To learn more about multiple contexts usage in a same application I decided to create a very basic example application managing post resources and using 2 child contexts : one for Rest API and the other one for MVC.</p>
<p>The application is deployed in a separate Tomcat 8.5 server and is listening on port 8081.</p>... | 2 | 3,139 |
Background images display over pop up message | <p>I've been working a project for quite some time and part of the website application is a review function. That why some of you may have noticed I have posted quite a few times with problems, so far, this community has been super helpful and I thank you for that </p>
<p>So right now what is happening is that image a... | 2 | 4,007 |
my django website says "We're sorry, but something went wrong" in production | <p>my django website was working in debuging mode but when I put it on the server and turned it to production mode, my website shows me the error:</p>
<blockquote>
<p>We're sorry, but something went wrong. The issue has been logged for
investigation. Please try again later.</p>
</blockquote>
<p>I have checked out... | 2 | 2,496 |
register bundle for "jqgrid" in scriptmanager | <p>I am new to bundle and optimization and trying to understand.
I am creating bundle in site containing <strong>Webform</strong> and <strong>.Net Framework 4.0</strong>. I have created '<em>BundleConfig.cs</em>' in which i am creating bundles. it has following code:</p>
<pre><code> public static void RegisterBundles... | 2 | 1,209 |
jquery fullcalendar event with handler asp.net c# | <p>I am using jquery fullcalendar in my asp.net application.
pls see code-
ASPX code</p>
<pre><code>$('#calendar').fullCalendar({
editable: true,
events: "SchedulerJsonResponse.ashx",
eventDrop: function(event, delta) {
alert(event.title + ' was moved ' + delta + ' d... | 2 | 2,459 |
Jenkins String index out of range: -1 | <p>Updated Jenkins to latest version, updated all plugins and now get an String index out of range: -1 error (full log below).</p>
<p>When I change authorizationStrategy from hudson.security.ProjectMatrixAuthorizationStrategy to hudson.security.FullControlOnceLoggedInAuthorizationStrategy the error is gone. I can logi... | 2 | 4,151 |
Blocking incoming sms in iOS 7 | <p>I want to write a tweak for jailbroken devices that blocks messages from a phone number(in iOS 7). First I used the second answer of creker in <a href="https://stackoverflow.com/questions/16219799/block-sms-on-ios6">this link</a> for writing the tweak. Here is my code:</p>
<pre><code>#import <substrate.h>
#im... | 2 | 1,082 |
wpf dynamic window | <p>I am trying to create a window to act as a switch board for testing an application I'm working on, and having two problems doing so.</p>
<p>The first problem is trying to set the size & margin of buttons that need to be added to a stack panel dynamically. In XAML, the properties look like this:</p>
<pre><code>... | 2 | 1,320 |
Showing a MessageBox error whenever an entry box is empty | <p>I know that you can check if the entry box is empty by checking its length. I'm having a hard time implementing it though, because my entry boxes are dynamically created and you can't traverse in all of it in a single loop.</p>
<p>Here is my code:</p>
<pre><code>from tkinter import *
class Window(Canvas):
def... | 2 | 1,435 |
How to validate and if successful open a new tab using JSF 2.0 with Primefaces 3.5? | <p>So I've read several solutions, some of which have gotten me close but not close enough to the behavior I need to implement.</p>
<p>It feels like it should be simple and maybe it is but I am pretty new to JSF and Primefaces so it is not so easy for me.</p>
<p>DESIRED BEHAVIOUR: Upon a click on the 'Run Report' but... | 2 | 1,480 |
Create expression from string (null reference) | <p>Here is the problem:</p>
<p>We use table object to allow the users to perform some functionality like search, sort, pagination etc. Those tables works great. But there is a problem with one of the functionality :
The sort (=OrderBy).</p>
<p>In fact, to allow the sort, we set in every column a string that represent... | 2 | 1,305 |
Server error 500 when deploying NodeJS Express app on GCP App Engine | <p>I'm trying to deploy a NodeJS app on gcloud that runs my express api. When I run npm start locally I get this message:</p>
<pre><code>>npm start
> my_api@1.0.0 start E:\My_Project\My_API
> node index.js
Running API on port 8080
Connected to DB!
</code></pre>
<p>So I created an app.yaml file with the follo... | 2 | 1,034 |
How do I set the Name of Net Named Pipes in WCF when hosted in ASP .NET? | <p>First a bit of background:</p>
<p>I have a web server which runs 4 instances of the same ASP .NET application each one in a different culture (set in the web.config). The cultures are British (GBR), Australian (AUS), Irish (IRL), and New Zealander (NZL). Each of them has a webmethod "DoWork" which I would like to c... | 2 | 1,035 |
binutils cross-compile error | <p>I install cygwin-x86: source/binary binutils, flex, bison, source/binary gcc, etc..
In order to cross-compile binutils, I run the follwing commands:</p>
<pre><code>export PREFIX=/usr/cross
export TARGET=x86_64-pc-linux
cd /usr/src/binutils-2.23.51-1
./configure --target=$TARGET --prefix=$PREFIX --enable-64-bit-bfd ... | 2 | 2,234 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.