title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Html.DropDownListFor selecting item based on ModelState rather than Model
<p>In asp.net mvc (v5 in my case), when you post a model back to a controller, and then render a view <em>with a model other than the one that was posted back</em>, then Html.DropDownListFor will select the selected item based on the data from the model that was posted back, rather than the model that was passed to the...
3
1,385
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at .../Signature.asmx/SendIdDocuments
<p>I have created a webservice using vb.net. It as an asmx class that contain:</p> <pre><code>'To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. &lt;System.Web.Script.Services.ScriptService()&gt; &lt;System.Web.Services.WebService(Namespace:=&quot;http://tempuri.org/...
3
1,079
How to create random slug in Django
<p>I have a Django app that will create a contract between two people. The <code>user</code> creates the contract and, upon creation, a random url-safe string is generated using <code>secrets</code>. </p> <p>However, when I create more than one instance of a <code>Contract</code>, the slugs are the same. The only way ...
3
1,064
SQL trigger before delete not properly inserting rows into audit table
<p>I've been staring at this code and looking online to see what's been going on but I can't seem to find what is wrong.</p> <p>When I run the code below the update trigger works as intended and inserts data into audit table. When I try to test the delete trigger the delete happens as intended but no rows are added to ...
3
1,298
Android content height below collapsing toolbar
<p>I have an app with a navigation drawer and several fragments. The app has a collapsing toolbar, and the fragments have various content. Some of them are static from XML, others are generated in a recyclerview. Some have a FAB, others don't.</p> <p>My problem is whatever layout I have below the toolbar, the container...
3
1,762
OpenCL for-loop only working once
<p>The program is an Android application and needs to progress an mp4 image. The initialization can be found in this question: <a href="https://stackoverflow.com/questions/23696901/android-with-opencl-video-processing" title="init code">init code</a></p> <p>But I found out that the init code works with kernels who do ...
3
1,158
jquery mobile & php
<p>When I pressed submit, but its value should not try to go over to php.</p> <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt; &lt;/script&gt; &lt;Link rel = "stylesheet" href = "https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.mi...
3
1,454
Returning value of the Type passed in the function
<p>I am writing a random-value generator in C#, this generic function should return value of <code>Type</code> <code>Bool</code>, <code>Int64</code>, <code>Int32</code>, <code>Double</code> depending on the Type passed. So, I can pass the <code>System.Type</code> as a method parameter, but how should I define the retur...
3
1,360
Mule 3.3.1 CE integration with Twitter
<p>I get the following stack trace when I run the order discounter example application from Mule Studio 1.3.2 x64 (Mule 3.3.1 CE runtime) on JDK 1.6.0_21 (32-bit) Windows 7 x64 :</p> <pre> INFO 2013-06-25 10:29:13,507 [[orderdiscounter].order_management.async1.02] org.mule.lifecycle.AbstractLifecycleManager: Starting...
3
2,301
IllegalAccessError after a few queries when using script filter in elasticsearch query
<p>I have a 'users' elasticsearch index, where a user looks like:</p> <pre><code>{ "id" : 1, "name" : "Jeroen", "hours": [8,9,10,11,12,19,20,21,22,23], "country": "NL", "utc_offset": 1.0 } </code></pre> <p>I want to find all users of which the 'hours' field contains the current hour in their local time. So ...
3
1,072
How do I optimize this SQL query?
<p>The following query gets all the forum posts of a category. And I also need to display the latest comment time for each post. But the query seem to take more time to make because of it. (which makes sense).</p> <p>But I am not able to figure out how I can optimize it, and I'm not sure where to look for information o...
3
1,172
Unable To Permanently Increase The Position Property of My Custom Slider
<p>I am designing a Slider component which keeps track of the current <code>position</code> of its contents so it can properly display the current slide. It seems like I'm hard stuck with a simple problem, the <code>position</code> remains the same. I don't get what is the problem, since the <code>position</code> is de...
3
1,335
Not able pass array value in wso2 BPS
<p>My Input Request is:</p> <pre><code> &lt;body&gt; &lt;p:UpdateEntID xmlns:p="http://tempuri.org/"&gt; &lt;!--1 or more occurrences--&gt; &lt;xs:OldID xmlns:xs="http://tempuri.org/"&gt;GenreID_002&lt;/xs:OldID&gt; &lt;xs:OldID xmlns:xs="http://tempuri.org/"&gt;GenreID_0021&lt;/xs:OldID&gt; &lt;!--Exactly...
3
2,174
Flask SQLAlchemy Heroku error: duplicate key value violates unique constraint
<p>I have a Flask application which uses SQLAlchemy to store its data</p> <p>I have a model AdminModel as shown below:</p> <p>admin.py</p> <pre><code>class AdminModel(database.db.Model): __tablename__ = &quot;admins&quot; id = database.db.Column(database.db.Integer, primary_key=True) email = database.db.Column(databas...
3
1,679
Why don't my buttons go?
<p>I'm setting up two buttons inside UITableViewCells. The cell itself shouldn't ever respond to selection, just my two buttons.</p> <p>Here's the code in question:</p> <pre><code>-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *ident = @"Re...
3
1,721
Understanding FFT output from Jtransform and ColumbiaFFT
<p>I obtain a result that I don't understand when I apply the FFT of Jtransform.</p> <p>The output frequency I get, is different from what I expect.</p> <p>Currently I try to use Jtransform. From this library, I used <a href="http://wendykierp.github.io/JTransforms/apidocs/org/jtransforms/fft/DoubleFFT_1D.html#realFo...
3
1,235
Understanding sequences and returning arrays in WSDL
<p>So my web service is supposed to take one column of data (IDs) and return 2-column table of corresponding data to requested ID's. I understood that I should use a sequence for that purpose so I've made this schema:</p> <pre><code>&lt;wsdl:types&gt; &lt;xsd:schema targetNamespace="urn:myurn" xmlns:xsd="http://www.w3...
3
1,306
User input issue
<p>I need a way to allow user to input the team name and team members names. I tried using scanner but it does not seam to work due to my inexperience with java. I just want to ask a user to input a team name and names for the four team members. I trued by making those variables public but I do not know the way to inpt...
3
1,673
tr:nth-child css zebra striping after xml jquery parsing
<p>How do I apply styling to a table after parsing XML data into the table? In the code below I Created the first three rows of a table using html, then the additional rows were created by parsing XML. however the Zebra stripe styling was not applied to the table after the jquery call. I've tried my best to find the pr...
3
1,625
Operations on Nodes
<p>I am learning the Java XML API. I am using DOM. </p> <p>I have a problem with even basic navigation inside the document. Here is the XML files I am working with:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;company&gt; &lt;staff&gt; &lt;firstname&gt;test&lt;/firstname&gt; &lt;lastname&gt;test...
3
1,098
When using a GET request to a PHP script the echoed result is not the right variable, its outputting the HTML of the page
<p>I am trying to check an email as a duplicate using a GET request to a PHP script. I have already gotten it to work for usernames on a different page. The sign-up page sends a request via the email type input box on blur.</p> <p>The HTML</p> <pre><code>&lt;div id=&quot;email-container&quot;&gt; &lt;label id=&qu...
3
2,537
Issue retrieving ValueError: `decode_predictions` expects a batch of predictions
<p>I have the following code took it from Github to run a pre-trained model mobilenet_v2 <a href="https://github.com/vvigilante/mobilenet_v2_keras/blob/master/mobilenet_v2_keras.py" rel="nofollow noreferrer">https://github.com/vvigilante/mobilenet_v2_keras/blob/master/mobilenet_v2_keras.py</a> and trying to run it, how...
3
2,137
Direct input or Formula
<p>I have a spreadsheet where I would like the end user to be able to enter a value OR the spreadsheet will automatically populate a formula. I would also like it to re-populate the formula if the direct input is deleted. Currently the below code does nothing. Any help would be greatly appreciated!</p> <pre><code>Priv...
3
1,630
Box not vertically aligned with I add a navigation bar on top
<p><strong>UPD</strong> : <em>Take a look at the snippe below please</em></p> <p>I am trying to create a homepage with a navigation bar on top and a box in the center of the homepage screen. I took the idea from a template. </p> <p>My problem is that I cannot make the box look in the center. </p> <p>The original scr...
3
6,976
Wget Curl - Download entire site and run concordance
<p>This might be a strange question but I'm giving it my best shot.</p> <p>Summary: I have a program (written in Bash and Julia) which will outputs the concordance output for a given set of text (in a file) i.e. you pass the file(s) and it'll output the concordance output like (indentation of the bullet#s I'll take ca...
3
1,245
AsyncTask on Android stops working after 2-5 minutes
<p>Currently building an Android app and checking it on Genymotion running 4.1.1. I'm using <code>AsyncTask</code> to call the Bing Translate API to translate from text:</p> <pre><code>class TranslateFacebookText extends AsyncTask&lt;String, Integer, String&gt; { @Override protected String doInBackground(Strin...
3
1,440
Session variable to show a form or not
<p>I want to show a form only if the previous form is filled and submitted. So, I created a session variable which is initialized when I submit the first form. Like this :</p> <pre><code>if( $flag) { $_SESSION['id_essai'] = $id_essai; echo $_SESSION['id_essai']; ...
3
1,817
Q: [Symfony 4] How may i access to my form's data using session from my controller?
<p>I am building a shopping cart application using symfony4.</p> <p>I have to create a shopping cart using session in order to store the data of the purchase.</p> <p>I created a form that store the item selected. But i don't know how to get this item from my controller.</p> <p>First, i have my twig view where i select ...
3
1,434
why the autolayout is not updated if I use IBDesignable file when i run the app?
<p>here is the project of this problem in the google drive: <a href="https://drive.google.com/file/d/1Js0t-stoerWy8O8uIOJl_bDw-bnWAZPr/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1Js0t-stoerWy8O8uIOJl_bDw-bnWAZPr/view?usp=sharing</a></p> <p>I make a custom navigation bar (the red view i...
3
1,141
extracting Array data from SharedObject
<p>Im having a game where after I finish a certain level I put that level`s name In an Array and save that array to an SharedObject(SO). But somehow/somewhere I mess up things, because after closing and opening the game again, I load the SO data (to unlock the levels that I have passed) and it is (the loaded data) alw...
3
1,721
Minikube Ingress Controller has no address
<p>Specs:</p> <ul> <li>OS: MacOs Big Sur (ARM)</li> <li>Docker: 4.0.1</li> <li>Minikube version: v1.23.0</li> </ul> <h1>controller-hpa.yaml</h1> <pre><code>apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: {{ .Release.Name }}-autoscaling spec: scaleTargetRef: apiVersion: apps/v2beta1...
3
1,910
Create array from multi-dimensional one with jq
<p>I would like to use 'jq' json processor to transform a json structure to an array of simple objects.</p> <p>My structure is like this:</p> <pre><code>{"nsgs": [ { "comments": "text1", "properties": { "securityRules": [ { "name": "1", ...
3
1,118
StreamWriter not appending to file, instead creating a new file in different directory
<p>I am attempting to write from one file to a temp file after making certain changes to some of the data in the source file. This was working until I extracted this logic into its own function.</p> <p>After running some tests I noticed that only the first line was being saved to the file in the location I specified. ...
3
1,459
Get an item value from a nested dictionary inside the rows of a pandas df and get rid off the rest
<p>I implemented <a href="https://demo.allennlp.org/open-information-extraction" rel="nofollow noreferrer">allennlp's OIE</a>, which extracts subject, predicate, object information (in the form of ARG0, V, ARG1 etc) embedded in nested strings. However, I need to make sure that each output is linked to the given <code>I...
3
1,209
how to sort the data from json for the different different routes?
<p>this is my app.js The app.js file render the Leaderboard component for each route like /rank,/point,/age,/name</p> <pre><code> &lt;Router&gt; &lt;Switch&gt; &lt;Route path=&quot;/&quot;&gt; &lt;div className=&quot;App&quot;&gt; &lt;h8k-navbar...
3
3,354
display data in table from given string of array in javascript
<p>I have to display data in html table in <strong>value</strong> column from given textarea field. The string value should be converted into an array and all data will execute through loop and display by sequence of order. <a href="https://i.stack.imgur.com/lj0Af.png" rel="nofollow noreferrer"><img src="https://i.stac...
3
8,962
Arrays not merging together
<p>So I have the following two arrays which I try to merge together, the first one as $weekDays:</p> <pre><code>Array ( [0] =&gt; Array ( [id] =&gt; 1 [start] =&gt; 11:00:00 [end] =&gt; 17:00:00 ) [1] =&gt; Array ( [id] =&gt; 2 [start] =&gt; 09:00:00 [end] =...
3
1,558
Getting props from parent component state to render data
<p>I am building a weather app. The behavior would be to have a Button in my main menu. This Button should display the current weather. When clicking this button it should display a card with all the weather informations. This is pretty similar to Momentum <a href="https://i.stack.imgur.com/HPPuU.png" rel="nofollow nor...
3
1,980
CipherOutputStream not working
<p>I have a problem with the following code.</p> <p>If I use the ObjectOutputStream everything runs fine but when I try to use the CipherOutputStream I get the following error in the server side.</p> <p>If I send one file I don't receive it fully. If I send more than one file the last one to be sended is not received...
3
1,044
EvalPortalTicket returns error code 9 when parsing SAP Login Ticket in a .NET application
<p>I'm trying to parse SAP Login Ticket (I'm getting ticket string from MYSAPSSO2 cookie) in a .NET application following the sample provided by SAP. Both <code>sapssoext.dll</code> and <code>sapsecu.dll</code> are placed in System32 folder but I'm getting an error which number is 9.</p> <p>Here is the ticket string</...
3
1,156
How To change the imageview of an appwidget (remoteview) multiple times with a short break between?
<p>I am new to Android Development and im stuck with a Problem. I hope you guys can help me ;) Im am working on an Appwidget, a remoteview with a linearlayout that is containing multiple imageviews. I worked myself through some tutorials and examples and i was able to build up a first app , that detects a clicked image...
3
1,426
Accessing data in a ViewModel
<p>I have the following entity framework code snippet which has a "Groups" table and a child "ApplicationsGroupsLK" table that contains an ApplicationID field that I need.</p> <pre><code>IEnumerable&lt;Groups&gt; Groups = DbContext.Groups.Include("ApplicationsGroupsLK").Where(p =&gt; p.GroupNumber &gt; 0); </code></pr...
3
4,790
Java using "this" with non-static methods
<p>I had a question about using "this" for classes with methods. Here is a snippet of code I wrote that is giving me an error. I am confused about how to use class non-static class methods while referencing the object using "this". Can someone please help me?</p> <p>update, here is all my code</p> <pre><code>public c...
3
1,497
sort data pulled from API with Javascript
<p>I am currently pulling data from an API using ROR and displaying the results in my app using Jquery Masonry. I am trying to now allow a user to sort the data pulled in a few different ways after the page loads. I would like someone to be able to sort data by: "this week", "next week", and "next month". Also, I would...
3
7,590
using Microsoft.ServiceBus.Messaging.MessageSession Many messages Complete(), Abort(), Etc
<p>I am having a problem closing out the MessageSession when there are more than one messages to be received... I wait for all of the sequence to come in and then I try and "Complete()" all of the messages in the session. I have tried lots of different ways from iterating through the messages received and "Complete()"-...
3
3,591
MediaRecorder, getMaxAmplitude always returns 0
<p>I have developed this small MediaRecorder application. I have 3 buttons- <code>Play</code> (for Start Recording), <code>Pause</code> (for stop recording), <code>Max</code> (for finding Max Amplitude). I Googled to get it correct, but nothing worked fine for me.</p> <p>The problem is it always give me 0 for <code>ge...
3
1,409
association query issue
<p>I'm using mybatis , I encounter a association query issue, pls take a look at table structures first.</p> <pre><code>DROP TABLE IF EXISTS `comp_items_spec`; CREATE TABLE `comp_items_spec` ( `id` int(11) NOT NULL AUTO_INCREMENT, `comp_id` int(11) NOT NULL, `content_type_id` int(11) NOT NULL, `in_list_flag` ...
3
5,366
iPhone: sqlite db open is not working
<p>I am new to iOS sqlite. I am working on xcode 4.2. Here is my code:</p> <p>.h file</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; #import &lt;/usr/include/sqlite3.h&gt; @interface RpTestViewController : UIViewController { sqlite3 *db; NSString *dbPath; } @end </code></pre> <p>.m file</p> <pre><code>- (vo...
3
1,315
Is that possible the copy all table on same schema in plsql
<p>Is that possible to write copy all table include <strong>(data ,pk , fk .....)</strong> scripts on same schema with all object ? When I run the code below<br> <code>create table testmember as (select * from member);</code></p> <p>I can only bring table data . When i executed this code i did not see table keys ( FK...
3
1,443
How to destroy an object on Javascript from a class
<p>Ok I have this object from class</p> <pre class="lang-js prettyprint-override"><code>//Classes for actors ingame //Runtime actors class Actor { //public ActorHealth = 100; constructor(name, x, y, team, mainTexture, InternalTexture, ActorHealth, ActorState ) { this.name = name; this.x...
3
1,069
Nodejs Function is returning undefined
<p>I have 2 files index.js and models.js</p> <p>my index.js file requires the model.js file</p> <pre><code>const models = require(&quot;./modules/models.js&quot;); app.post('/message', (req, res) =&gt; { const _lead = models.createLead(req.body) _lead.then(l =&gt; { console.log(&quot;resulted in lead&q...
3
1,383
Startup animation from left to right in google line chart
<pre><code> google.charts.load('current', { packages: ['corechart', 'controls'] }).then(function () { var dashboard = new google.visualization.Dashboard( document.getElementById('dashboard') ); var control = new google.visualization.ControlWrapper({ 'controlType': 'Cha...
3
1,680
CSS Transition with Radio Button and JS
<p>With my jQuery code I am able to get the attributes from the .item but my css transitions aren't working. You can see the intended transition by replacing <code>.item</code> with <code>.item-tile</code>.</p> <p>How do get my CSS transitions to work with my <code>jQuery</code> code?</p> <p><div class="snippet" data...
3
1,214
mnist train and test accuracy only 0.49
<p>I am trying to implement the basic ANN on MNIST dataset, and I use the same code in tensorflow: <a href="https://www.tensorflow.org/tutorials/" rel="nofollow noreferrer">https://www.tensorflow.org/tutorials/</a>, but I get very low accuracy on training and testing dataset. I can't see what cause the problem. below i...
3
1,500
Hibernate Self join query wont parse to json
<p>I am using Hibernate to persist the data into a HSQLDB file.<br> I'd created a method similar to a tester and it "populates" and "query" the data that i'd stored.</p> <p>But when i query the data, in debug mode it's like an infinite array something like:</p> <p>Product (instance1 of product)<br> -> ParentProduc...
3
1,759
C++ help with compiler error
<p>i'm new to c++ and have been trying to implement the bellman ford algorithm, my program doesnt compile i get the following compiler error which is rather cryptic.</p> <pre><code>D:\ME\MCA\Sem2\LAB\DS\graph_algorithms&gt;g++ bellman_ford.cpp -o bellman.exe In file included from bellman_ford.cpp:8:0: graph.h: In memb...
3
2,056
A responsive dropdown menu doesn't redirect to external sites
<p>I have one more question about my website <a href="http://www.springtribe.de" rel="nofollow noreferrer">www.springtribe.de</a> .</p> <p>I have programmed the small responsive dropdown menu for the mobile site - the problem is that the menu doesn't direct me to the third-party websites even though I have put those th...
3
1,622
useReducer value not being updated properly
<p>I'm trying to update a state of a component with useReducer. I'm grabbing some info from mongodb in useEffect and there I am calling my useReducer dispatch so I can set my state as soon as the component mounts. Unfortunately, my state isn't being affected and my UI isn't changing. The console.log statement at the en...
3
3,277
How to upgrade Spring Security and Spring Security Oauth2 to the latest without breaking the application
<p>I have a spring rest application that uses spring-security-core version 4.0.3.RELEASE and spring-security-oauth2 version 2.0.8.RELEASE. The main Spring security core library version is 4.2.3.RELEASE.</p> <p>My security.xml file uses the following schemas:</p> <pre><code>&lt;beans:beans xmlns:sec="http://www.spring...
3
1,277
How to remove autocomplete from input?
<p>I have tried autocomplete=&quot;off&quot;, autocomplete=&quot;none&quot; , autocomplete=&quot;/&quot; ,autocomplete=&quot;new-text&quot; but still it shows autocomplete</p> <p>browser autocomplete overlaps typehead autocomplete popup</p> <p>I don't Know how to remove this autocomplete</p> <p>Thank you in advance!!</...
3
1,222
Print the arithmetic average, the youngest and oldest age
<p>This Python program should read a birth year until the number zero is entered.<br> The program should then print out the average age and how old the youngest and oldest is.</p> <p>I need help with two things.</p> <ol> <li>Print &quot;Unreasonable age, please try again&quot; when input year is -N, like &quot;-45&quot...
3
1,490
How to get value from another class's inside of if-else statements?
<p>When I call <code>dnanumber</code> variable from another class it seems <code>0</code> in console. How can I fix this problem?</p> <pre><code>class DNAgenerator { public int dnanumber; public int dna; public int dna2; public int dna3; public int dna4; pub...
3
1,638
How to call Pinch and Zoom class on am ImageView?
<p>I am a newbie to android development. Here I am trying to add pinch and zoom an image in my image view. The image is loaded on an activity called FullScreenView</p> <p>Here is my FullScreenView.java file</p> <pre><code>public class FullScreenViewActivity extends Activity implements OnClickListener { private st...
3
6,467
Code is not getting inside the $.getJson method because it's getting a 404
<p>Cannot figure out how to actually fix this issue. I have a print line to the console before and after the <code>getJson</code> method and only getting the before.</p> <p>Here is the error I'm getting on the console:</p> <p><img src="https://i.imgur.com/2WokHCH.png" alt=""></p> <p>I have already messed with the pa...
3
1,301
Using ADXL345 accelerometer sensor with ESP8266
<p>I am extremely new to working with sensors and Arduino and IoT equipment altogether. I am using an Arduino Uno. I need to use an ADXL345 sensor with an ESP8266 Wifi module for a project. The two devices work on their own just fine. But when I connect them together, with the Generic ESP8266 Module board, the ADXL345...
3
2,554
RabbitMQ Add an object to another one coming from queue in Spring
<p>I have this json object that is mapped to this model class:</p> <p>Json:</p> <pre><code>{ &quot;type&quot;: &quot;NEW&quot;, &quot;operation&quot;: &quot;NEW&quot;, &quot;id&quot;: 1, &quot;entity&quot;: &quot;DOCUMENT&quot;, &quot;entityType&quot;: &quot;NIE&quot;, &quot;documents&quot;: { ...
3
1,486
How to randomly filter rows to achieve desired proportions of a grouping variable
<p>I have data with a group variable, and I want to sample rows to end up with certain proportions in the group variable. This might require filtering rows, as the following example shows.</p> <p><strong>Simulating data</strong></p> <pre class="lang-r prettyprint-override"><code>set.seed(2021) my_df &lt;- data.frame...
3
1,499
How to query mongodb dynamically with interface{}
<p>Am trying to make a dynamic mongodb query using a Go interface as shown bellow</p> <pre><code>func (m *NfInstanceDataAccess) FindIp(preferredNfInstances string, args ...interface{}) ([]model.NfProfile, bool) { var ip []model.NfProfile pipeline := bson.M{"nfType": preferredNfInstances, "allowedNssais.sst": a...
3
1,131
How to remove double quotes from json converted through php queries
<p>I have a string in a json format, but this is giving invalid json format as i am querying it via php loops</p> <pre><code>{"a":"" works our ‘T’ logo into an intricately perforated pattern. logo — pattern. Height: .36"" (.9 cm) Length: .29"" (.7 cm) " " } </code></pre> <p>I need the output as </p> <pre><code...
3
1,542
Show XAML on Condition
<p>The context is I have a Listbox that is outputting items with quite a lot of styling (more than i've put here)... I went to use a DataTemplateSelector to show either one image or another based on a condition but it was stupid to have to re-write the whole tempalte with just this one difference in it.</p> <p>I have ...
3
2,062
Error encountered: Value does not fall within the expected range
<p>I'm accessing oracle database which I'm a beginner on my api C#, when I try to execute my code, I'm encountering this error message according my exception handler &quot;Value does not fall within the expected range&quot;. Would appreciate any inputs/corrections.</p> <p>Oracle Code:</p> <pre><code> create or replac...
3
1,373
Calling java class (managedBeans) functions in JSF files
<p>I have questions about working with managedBean and JSF files. I am a beginner in this concept, my apology if my question is very basic. Here is my main function in my managedBean java file.</p> <pre><code>ArrayList&lt;ArrayList&lt;Object&gt;&gt; processDataSources(String mainFile, String comparingFile, int mainFil...
3
1,103
Inconsistent page count of a PDF document
<p>I'm trying to get the number of pages in the PDF document. Some of my PDFs are created in Word (saved as PDF), some of them are Xeroxed into the directory (not sure if this matters).</p> <p>After hours of research I've come to find out that this is easier said than done. <strong>The page count rarely comes back giv...
3
1,265
Subroutes done right with app-route
<p>I have this in my app.js in terms of routing:</p> <pre><code>&lt;app-location route="{{route}}"&gt;&lt;/app-location&gt; &lt;app-route route="{{route}}" pattern="/page/:page" data="{{routeData}}" tail="{{subRoute}}"&gt; &lt;/app-route&gt; </code></pre> <p>As in the starter kit, I observe <code>routeData....
3
1,142
Convert inregular obejct to sipmle object
<p>I wan to convert irregular object ({{}, [] ...}) to an object consisting only of simple objects</p> <p>I have this:</p> <pre><code>{ "mname": "u1", "tab": [ { "sname": "u2", "intab": [ { "l": 1, "m": 3 }...
3
1,145
NDepend query methods/types in framework assembly being used by other assemblies/types
<p>I am trying to determine which types or methods in a base framework assembly are being used by other assemblies in the application system. I cannot seem to find a straight-cut query to do that.</p> <p>What i have to do is first determine which assemblies are directly using the framework assembly, then manually list...
3
7,072
Python - Assign one element in list to every element in another list within a loop
<p>I´m trying to sort through some files, where i first find the filename in my <code>dir</code> with <code>glob.glob</code> ex. (filename1, filename2, filename3) so i get this list of files [(Filename1,), (Filename2,), (Filename3,)]</p> <p>After this i have a for loop that with <code>.readline()</code> extracts a st...
3
1,088
objc_getAssociatedObject returning null
<p>I'm trying to pass an object using <code>objc_setAssociatedObject</code> </p> <p>I'm trying to pass <code>Evento</code> using the following code: </p> <pre><code>Evento *evento = (Evento*)[secAtt objectAtIndex:indexPath.row]; objc_setAssociatedObject(evento, @"evento", self, OBJC_ASSOCIATION_RETAIN); </code></pre...
3
1,806
Dictionary changes without obvious reason
<p>I am trying to create a trivia game for learning reasons but something odd happens with my dictionary that I cannot understand. </p> <p>The code that I generally tested to see how things work is this: </p> <pre><code>cat = { 'easy': { 'books': 'https://opentdb.com/api.php?amount=50&amp;category=10&amp;...
3
1,812
Registration in codeigniter
<p>I am trying to register in the following code. But when i register i got the error message undefined variable base.</p> <p>View:</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt; &lt;link rel=...
3
2,121
CSS Grid have sections inside different columns start at the same (row) height
<p>I am stuck with a css-grid problem: I have a grid which contains of 1-3 columns, depending on the screen size.<br /> Each column is made out of 1 block who contains 2 sections(red and blue border).<br /> Both sections can vary in height.<br /> Within each block, the height of section 1 should always be the same, whi...
3
1,306
I am trying to make the obstacles appear on the screen a random distance apart in my game but can't figure out how?
<h1>Getting images from the file</h1> <pre><code>start = pygame.image.load(os.path.join(&quot;Images/Dino&quot;, &quot;DinoStart.png&quot;)) dead = pygame.image.load(os.path.join(&quot;Images/Dino&quot;, &quot;DinoDead.png&quot;)) running = [pygame.image.load(os.path.join(&quot;Images/Dino&quot;, &quot;DinoRun1.png&quo...
3
4,639
Where to place JOptionPaneShowInputDialog code?
<p>Where to place JOptionPaneShowInputDialog code? Where to place JOptionPaneShowInputDialog code?Where to place JOptionPaneShowInputDialog code? Where to place JOptionPaneShowInputDialog code? Where to place JOptionPaneShowInputDialog code? I would like to add a JoptionPaneShowInputDialog()(not in code yet) inside the...
3
1,502
how to redirect user from login to dashboard REACTJS
<p>I'm trying to redirect to my user-dashboard page after the user is successfully logged in. I've already tried using push('/dashboard') but even if the credentials were false it redirect to the dashboard page any help please ! So I want when I submit the email and the password correct to login, it will be redirected ...
3
1,473
Delete method doesn't work rails controller
<p>I've made some updates to my app, but then It can't destroy existing category.</p> <p>I just want to destroy existing category with confirmation.</p> <p>Here my code</p> <p>index.html.erb generating list of existing categories</p> <pre><code>&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Category&lt;/t...
3
1,253
Foreach loop for fotorama
<p>im trying to use a foreach loop with the plugin fotorama.</p> <p>What im trying to do is load one half sized image for the main gallery image. Which i have working in a foreach, but i want to use a full image for the data-full tag but i cant get it to work.</p> <p>This is the working code.</p> <pre><code>&lt;div ...
3
1,139
Adding tables in mysql
<p>I've been trying to add this table but all data is embedded in one column in the SQL matrix. For example:</p> <pre><code>mysql&gt; describe genomas; +--------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+--------------+------+-----+---------+-----...
3
1,058
How to make a validation and show message if default value is selected in dropdown in vue
<p>I have a dropdown that I want to give a validation.</p> <p>So here is my dropdown component:</p> <pre><code>&lt;template&gt; &lt;div class=&quot;custom-select&quot; :tabindex=&quot;tabindex&quot; @blur=&quot;open = false&quot;&gt; &lt;div class=&quot;selected&quot; :class=&quot;{ open: open }&quot; @clic...
3
1,495
Quite new to Node JS and I am trying to post to a specific request but it get me error
<p>This is my function to fetch data:</p> <pre><code>let a = showbtn.addEventListener('click',function(){ list.innerHTML=''; fetch('http://localhost:3000/products') .then ( response =&gt;response.json()) .then( data =&gt; { data.forEach( product =&gt; { let li =document.createEl...
3
1,332
Issue with user defined key in Hadoop Mapreduce
<p>I have a NewYork stock exchange Dataset in Tab separated format and my data looks something like this</p> <pre><code>exchange stock_symbol date stock_price_open stock_price_high stock_price_low stock_price_close stock_volume stock_price_adj_close NYSE ASP 2001-12-31 12.55 12.8 12.42...
3
3,067
How to Change 2 Math.floor random numbers if they are equal
<p>I'm trying to replicate the Monty Hall Problem, if you've heard of it, and I need to add in a system that will change one of two Math.floor random numbers when they are equal. My question is how do I change a variable that is random into another if it is equal to a second random variable. If you look into the Monty ...
3
1,552
Clear circles in google maps
<p>I'm trying to remove some circles from a map but isn't working as expected. Here are my code.</p> <p>Function I have used to draw circles:</p> <pre><code>for (var city in citymap) { var circleOptions = { map: GoogleMap, radius: distance, //In meters strokeColor: circleColor, fillOpacity...
3
1,528
One single value returning null in POST request
<p>I'm sending this JSON in my Postman:</p> <pre><code>{ &quot;restaurant&quot;: &quot;Restaurant test&quot;, &quot;address&quot;: &quot;Address test&quot;, &quot;website&quot;: &quot;Website test&quot;, &quot;description&quot;: &quot;Descriptionn test&quot; } </code></pre> <p>And for some reason, in my...
3
2,449
set/update position of element in a dynamically loaded div
<p>I have a parent div and a child div. In the parent Div I dynamically load a table with unknown dynamic data length and in my child div, onload the position is set to <code>bottom: 0%;</code>. Now the problem is I want the child div to be set to the parent's bottom 0% every time but every time a new table is added to...
3
1,322
Issue with trying to dynamically resize a python multiprocessing array
<p>Edit: Added Minimal Reproducible Problem Example</p> <p>I'm trying to create a wrapper class to emulate an ArrayList that is thread-safe. All methods seem to work fine, but the resizeBackingArray method isn't working. I've gathered that this is because I'm reassigning the value that belongs to the object, not the c...
3
1,571
Firebase ArrayList with buttons update firebase data
<p>I'm creating an appointment management system for students and lecturers. I have an array listview which retrieves data from firebase. I included two buttons to change the status of the appointment to accepted or rejected. I could not find a code to update the firebase data on the listview when the buttons are press...
3
2,238
when pid column of sys.session will be null in mysql?
<p>Am using mysql 5.7.19-log server, i am working on application monitor tool where i need to monitor session details of a mysql server. In the process came to know that pid column can be null in sys.session table. i want to know what are the cases in which pid can be null?</p> <p>when i exec desc session in mysql she...
3
2,246
Unable to store stripe webhook data in mysql database
<p>I have set webhook in my <code>stripe</code> account and while doing test webhook from stripe dashboard, I am getting success result from the stripe. I can see the response in preview.</p> <p>But while doing that thing from the browser and hitting the same webhook url, I am getting nothing in my response .</p> <p>...
3
2,503
How to make one div covering another div in different rows
<p><strong>Bootstrap</strong> framework and <strong>jQuery</strong> library are been used.</p> <p>I have multiple <code>div</code>s in two different <code>row</code>s. I am using jQuery to change the div height in first row when mouse hover. Use of <strong>z-index</strong> and <strong>absolute position</strong> break ...
3
1,754
Invalid cast exception is raised when insert is performed into column of type SYSTIMESTAMP WITH TIME ZONE with default value
<p>Could you please assist with next: I have a table with column of type SYSTIMESTAMP WITH TIME ZONE and with default value - SYSTIMESTAMP. I use Entity Framework 5 database first. When I try to insert entity in this table I get an exception. The exception message is “A store-generated value of type 'System.DateTime' ...
3
2,044