title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Laravel JWT Multi-Page Structure
<p>Its to my knowledge that a JWT based authorization system is usually reserved for SPA'S ( you know, one view, one React/Angular/Vue app, with one bloated app.js file), however I'm attempting to utilize the magic of JWT with a slightly separate structured application.</p> <p><strong>Structure</strong></p> <p>Rather...
2
1,082
Python project: Create a program that keeps track of the items that a wizard can carry
<p><code>show</code> doesn't work and it won't show any of my items</p> <p>In the first file of my code I have the following content:</p> <p>items.py:</p> <pre><code>list(inventory_list): inventory = ["a wooden staff", "a wizard hat", "a cloak of invisibility", "some elven bread", "an unknown potion", "a scroll of ...
2
1,195
Format data in Google Analytics API response and visualize with Charts API
<p>I am building a reports page for my clients to be able to view their data in a format they are already familiar with. Up to this point they receive a .pdf with select metrics and explanations. I want to automate this using Google Analytics Embed API. I am having trouble formatting data before drawing the charts. Spe...
2
1,068
CakePhp 2.x print sql query On Ajax Request
<p>I am trying to print the mysql query on Ajax Request but it is not showing .</p> <p>My View Page </p> <p><a href="https://i.stack.imgur.com/vnd0k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vnd0k.png" alt="enter image description here"></a></p> <p>Clicking the Search button will call one Aj...
2
1,671
How push to store data in Redis for Custom Map?
<p>I'm storing Data in Map and Fetching the Field values now instead of Map I want to store data in Redis. I'm new to Redis and using below code to store in Redis :</p> <pre><code> public class CachingRedis { private static HashMap&lt;String, UserFields&gt; Cache; private static JedisPool pool = null; private static f...
2
1,153
background color of cells in QTableview, PySide2
<p>Is it possible to conditionally change the background color of items in a QTableView, using PySide2? I've read a lot on the <a href="https://doc.qt.io/qt-5/model-view-programming.html#the-model-view-classes" rel="nofollow noreferrer">model view framework</a> . I cannot figure out if it is necessary to use a Delegat...
2
2,535
React Conditional Rendering with states
<p>I am working in a component where if i click on the <code>NavItem</code> i render an other list of elements</p> <p>Function changing the state</p> <pre><code>handleClick() { this.setState({ isActive: !this.state.isActive }); }; </code></pre> <p>The Conditional Rendering</p> <pre><code>if (isActive) { S...
2
1,189
Broken Pipe - Socket Exception - with latest version of Hibernate
<p>I didn't expect to see this even using the latest version of Hibernate. I am using Hibernate version 5.1.0.Final</p> <p>I am using it with spring and here is the config: </p> <pre><code>&lt;bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean" p:dataSource-ref="mySQL...
2
2,739
Using mouseClicked event (MouseListener) with multiple JLabels
<p>I have a GUI with about 26 different labels, but would like to be able to execute the same code for all of them when clicked, so I figured I would use a MouseListener and mouseClicked method to execute the code. The problem I'm having is that when I click on any of the labels, I get this error:</p> <pre><code>Excep...
2
1,263
PHP session_set_save_handler not saving to database
<p>I created a class to save the session data to a database. it is not saving to the database and there are no errors. Any idea why? here is the class.</p> <pre><code> &lt;?php class Session { public function __construct(){ //set handle to override SESSION $session_id = session_id(); $session_name = ses...
2
1,276
Implementing custom ListView for chat app
<p>I'm developing a kinda chat app and want to use a <code>ListView</code> for displaying messages. Currently I'm trying to get user's input and display it as an "outgoing message". My <code>row</code> layout is following: <code>TextView</code>(timestamp), <code>TextView</code>(message), <code>ImageView</code>(message ...
2
1,285
Unknown column in `where` clause
<p>I am getting the error described in title:</p> <pre><code>Unknown column 'FeedbackType' in 'where clause' </code></pre> <p>But I don't understand why. This is my query:</p> <pre><code>SELECT SQL_CALC_FOUND_ROWS `Appointments`.ID, FeedbackType, FeedbackSubType FROM `UserFeedback` INNER JOIN `Appointments` ON `App...
2
1,027
NoClassDefFoundError developing library with Android app, Maven, and Eclipse
<p>I'm developing an Android library (<a href="https://github.com/CUTR-at-USF/SiriRestClient/wiki" rel="nofollow noreferrer">SiriRestClient</a>) whose artifacts are managed via Maven, and I'm using Eclipse for development. I'm packaging the artifacts as a JAR file, since I don't have any assets in the project, only Ja...
2
1,704
I am trying to use Tab Row in Jetpack compose i increased the indicatior height, now my text is hidden behind it How to resolve it?
<p>I am trying to use Tab Row in Jetpack compose i increased the indicatior height, now my text is hidden behind it. Is there any to put my text on top on tab Indicatior or anything else</p> <p>This is my Main Activity i used Scaffold and called a function for creating TabLayout</p> <pre><code>Scaffold(backgroundColor ...
2
1,390
ReactJs & Styled components, Can't type anything in the input field
<p>I'm working on personal project using ReactJs &amp; styled Components.</p> <p>I started to move all old css code to use styled-components instead, however I applied it on the Inputs as well, but now it stopped working and I can't type anything in these inputs.</p> <p>I tried to search and read Styled-components Docs...
2
2,719
Android/Java: Code to calculate the average of values in an arrayList?
<p>In my application I am reading an external value (int) from an EEG headset. </p> <p>I thought that the value was read once a second but from my logcat report it seems that it is being read more than that. </p> <p>This is disrupting my intentions as I want to calculate the average of the values. I am trying to do s...
2
2,118
test count of react components within a component
<p>I have a form in which I have two Select Components. I am trying to write a test to check if Form is rendering both the components.</p> <p>short code snippet for <strong>FormComponent</strong>:</p> <pre><code>export class FormComponent extends Component { render() { return ( &lt;Form header="h...
2
1,078
php pdo connected to DB2 different CODEPAGE
<p>I'm connecting to DB2 DB </p> <pre><code>$sql = 'CALL procedures.name(1,1,'text',1,1,'2017-08-30','2017-08-31',?,?)'; try { $con = new PDO("idb:all_the_connections_stuu",'user','pass', [ PDO::ATTR_PERSISTENT =&gt; FALSE, PDO::ATTR_ERRMODE =&gt; PDO:ERRMODE_EXCEPTIO...
2
1,662
Click a <tr> tag object with only a class, autoit
<p>I am trying to click a tr tag object with Autoit</p> <p>Everything I tried failed..</p> <pre><code>&lt;tr class="auctionItemRow evenRow" itemGroup="extra" itemKey="item_hour_13" onclick="Auction.showItem(this)"&gt; </code></pre> <p>but I can't find the solution...</p> <p>Here is more code from the website:</p> ...
2
8,087
Solr query for same keyword returning different results?
<p>I am using text_general type to search in solr index with below configuration.</p> <pre class="lang-xml prettyprint-override"><code>&lt;fieldType name=&quot;text_general&quot; class=&quot;solr.TextField&quot; positionIncrementGap=&quot;100&quot;&gt; &lt;analyzer type=&quot;index&quot;&gt; &lt;tokenizer class=&...
2
1,295
Keras - weighted average of tensors
<p>If I've n tensors <code>T_i</code> of shape <code>(?, k)</code>, and one tensor <code>U</code> of shape <code>(?, n)</code>, how can I get the tensor <code>(?, k)</code> that is equal to <code>sum(T_i * U[i])</code> ?</p> <p>I've tried writing a layer to do so:</p> <pre><code>class WeightedAverage(_Merge): """...
2
4,543
How to reset multiple forms at once with one button
<p>Okay guys, im starting to learn HTML so im a newbie at the moment. I wrote this code to practice my input types (such as password, email, text etc). I would like to know how I can reset the whole form with one button. E.g.:</p> <pre><code>&lt;input type="reset" value="reset"&gt; </code></pre> <p>The above code sh...
2
1,481
Pandas read_csv: Columns are being imported as rows
<p><strong>Edit</strong>: I believe this was all user error. I have been typing <code>df.T</code> by default, and it just occurred to me that this is very likely the TRANSPOSE output. By typing <code>df</code>, the data frame is output normally (headers as columns). Thank you for those who stepped up to try and help. I...
2
1,383
category filter with ajax and symfony
<p>On a website made with symfony, I would like the user being able to display questions of a category by clicking on a button.</p> <p>For now, clicking on a category returns the all page. And, I don't have any errors in my console.</p> <p>Here's the code :</p> <p><strong>app.js</strong></p> <pre><code>function hel...
2
3,036
TypeError: Cannot read properties of undefined (reading 'toString')
<p>I am trying to do an onClick event in a react Modal. When I fire the onClick event I would like for it to issue a component form. The onClick event seems to work, but when it renders the component it is throwing the following error.</p> <p>TypeError: Cannot read properties of undefined (reading 'toString')</p> <p>Wh...
2
2,533
Mongoose getter function doesn't return updated array when making async calls
<p>I have an app which makes use of two models: Movie and Tag. The idea is that one can create a record of a movie and attach tags to it. A Movie references one or more Tag models via the Movie.tags attribute which is a array containing the ObjectId of corresponding Tags.</p> <p>When displaying the properties of a Mo...
2
1,487
tidytext, quanteda, and tm returning different tf-idf scores
<p>I am trying to work on tf-idf weighted corpus (where I expect tf to be a proportion by document rather than simple count). I would expect the same values to be returned by all the classic text mining libraries, but I am getting different values. Is there an error in my code (e.g. do I need to transpose an object?) o...
2
1,049
gulp-browserify error during compilation of jade in html
<p><strong>Sorry for possible mistakes in the writing - use the Google translator.</strong><br> I use the <a href="https://github.com/deepak1556/gulp-browserify" rel="nofollow"><strong>gulp-browserify</strong></a> </p> <p><strong>gulpfile.js</strong> -</p> <pre><code>gulp.task('jade', function(){ gulp.src('app/sr...
2
3,385
Firebase: Can't upload proguard mapping file with Gradle
<p>I'm trying to upload Proguard Mapping file of my application, but can't figure why this is not working.</p> <p><strong>$HOME/.gradle/gradle.properties</strong></p> <p><em>I tried in this file to use both absolute and relative paths, and when using absolute path, am 100% sure all files exists</em></p> <pre><code>F...
2
4,526
ListView's click listener does not work
<p>I have ListView with custom SimpleCursorAdapter in Activity:</p> <pre><code>public class MyListActivity extends Activity { ... } </code></pre> <hr> <pre><code>mCursorAdapter = new MyCursorAdapter(mContext, R.layout.listview_item01, mCursor, from, to); mainLayout = (RelativeLayout) findViewById(R.id.main_layo...
2
1,107
UILabel textColor Extension
<p>I want to create an extension for UILabel, I want to modify the UILabel class to automatically check if the text value is positiv/negativ/cero and then set the Color automatically.</p> <p>I want to activate it when I initialise UILabel in my code like this:</p> <pre><code>lazy var labelValue: UILabel! = { ...
2
1,300
DRF: AttributeError: 'str' object has no attribute 'pk'
<p>I am using Django Rest Framework. I have a model TestSuite which has Foreign key relations to the model Team and EmailTemplates. When I do a post() to Test Suite through postman, the data is inserted in the TestSuite table and request works successfully. However, when I do a get() or try to click on the url link fro...
2
3,866
Why does my call to ReadProcessMemory() fail?
<p>First off, I know this looks like a duplicate but I looked through the other questions and could not find a solution so please hear me out.</p> <p>I have a function to convert relative virtual addresses to dynamic memory addresses aka read multi level pointers (shown below). I call the function with a valid handle ...
2
1,265
Mongo $lookup filter using nested query
<p>I'm playing with mongoDB's $lookup function, specifically the pipeline syntax, to allow me to perform some more complex queries than the ORM I am using (Sails/Waterline) allows.</p> <p>A cut down version of my data looks like....</p> <pre class="lang-js prettyprint-override"><code> // 'job' collection { ...
2
1,411
Scrapy: Unhandled Error
<p>My scraper runs fine for about an hour. After a while I start seeing these errors:</p> <pre><code>2014-01-16 21:26:06+0100 [-] Unhandled Error Traceback (most recent call last): File "/home/scraper/.fakeroot/lib/python2.7/site-packages/Scrapy-0.20.2-py2.7.egg/scrapy/crawler.py", line 93, in start ...
2
1,268
Node.js For Loop async request
<p>I have for loop with a request (and another request in callback).</p> <p>I have problem with memory usage (when i am go through a lot of request at same time)</p> <p>here is the sample code : </p> <pre><code>var request = require('request'); for(var j=1;j&lt;=10;j++){ request({ method:...
2
2,061
Android - Jsoup - SocketTimeoutException
<p>I'm trying to develop an Android app which uses jsoup-1.7.1.jar core library. I included the jar-file as a library but now when I want to use it, I'll receive a SocketTimeoutException everytime. I'm working on Ubuntu 12.04, eclipse-juno Build id: 20120614-1722, emulator/avd has 100MB of sd, 512Ram and is on API-Leve...
2
3,198
React-table data flow between outside and inside of hooks.visibleColumns.push invocation
<p>I would like to create an array outside <code>useTable</code> invocation, manipulate the array, and based on the array state make checkbox checked or unchecked. After each click on a button, length of the array is increased by adding one element to the array. When length become greater than 3, the <code>input</code>...
2
1,765
How to call data table value to console.log Vue.js (vuetify)
<blockquote> <p>Hi, Just a newbie in Vue.js. I just want to call the name from data table using console.log. I've just copy the code from the vuetify website and i'm trying to manipulate. I want to call the desserts name from the sample table to the cons. Here's the code </p> </blockquote> <pre><code>&lt;template&...
2
1,384
Elementor Custom Widget from Scratch
<p>In a project I have to create a carousel in Elementor which should look like the one below:</p> <p><strong>carousel design</strong></p> <p><a href="https://i.stack.imgur.com/7zLNa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7zLNa.jpg" alt="enter image description here"></a></p> <p>Using the...
2
8,562
The right way to use gevent with sqlalchemy
<p>I simplify a complex system of gevent with sqlachemy to a simple <a href="https://gist.github.com/tonywangcn/6dadbd58d7778063b0c7969f62505537" rel="nofollow noreferrer">demo code</a>.</p> <p>Before using of sqlachemy, pymysql is my best choice for communication between MySql and gevent because of its easy and direc...
2
3,673
Sending HTTP request with SSL authontication using Apache HttpClient
<p>I am a newbie to the subject of SSL authontication and Httpclient requests in Java. And I need to perform a secured connection to service provider to be able to fetch some data from service provider api.</p> <h2>Where I am now:</h2> <p>I have made a .jks keystore containing private key and csr request which I have...
2
4,603
Read from raw paste in c++
<p>So, i was wondering if it is possible(most likely without the useage of a libary) to read the raw paste/or better say the html code of a website using c++. All the codes/tutorials i found wasn't really helpful, so i was wondering if some of you could help me out. I want to read of of this link:</p> <blockquote> <...
2
1,078
.net core 2.2, Reading setting from user secrets for serilog
<p>I have set up my solution and serilog reads the values from appsettings.json</p> <pre><code>public void Configure(IApplicationBuilder application, IHostingEnvironment environment, ILoggerFactory loggerFactory) { Logger log = new LoggerConfiguration() .ReadFrom.Configuration(Configuration) ...
2
1,272
How can i detect my digital camera connected to my pc usb ? Also the camera name
<p>In the top of form1:</p> <pre><code>class USBDeviceInfo { public USBDeviceInfo(string deviceID, string pnpDeviceID, string description) { this.DeviceID = deviceID; this.PnpDeviceID = pnpDeviceID; this.Description = description; ...
2
1,070
ListView: Selector drawables drawn in different sizes
<p>I'm using a custom ListView selector. Everything works fine, except that the drawables for state_focused and state_pressed are drawn bigger than the normal state.</p> <p>Instead of the default implementation, which uses 9-patch bitmaps, I'm using ShapeDrawables. They all use the same padding values (see below) It ...
2
1,502
How to set random colors and button rounded at the same time?
<p>I'm trying to make buttons rounded, random background color? When I tried the code below, the button isn't rounded.</p> <p>Here is the code: </p> <pre><code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.newtestament); LinearLayout layout =...
2
1,291
Overlay BIRT runtime into correct WAR locations
<p>I'm trying to get Maven to assemble a WAR with the BIRT runtime in a useful location within the WAR.</p> <p>The BIRT runtime is in the pom.xml as</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.eclipse.birt&lt;/groupId&gt; &lt;artifactId&gt;report-engine&lt;/artifactId&gt; &lt;version&gt;2.3.2&lt;/versi...
2
1,407
JPA Hibernate Lazy loading not working as expected
<p>I have following two entities with bidirectional relationship @OneToMany and @ManyToOne. When I query child table with join query as shown below, hibernate automatically query StandardDimension (Parent) table for each MinuteData (Child table) to load @ManyToOne relationship even though it is marked as lazy loading...
2
1,236
NestJS Heroku Deploy H10
<p>I deploy a NestJS Application to Heroku and get <code>H10 Error</code></p> <p>Log:</p> <pre class="lang-sh prettyprint-override"><code>2020-05-07T13:12:51.967622+00:00 heroku[web.1]: State changed from starting to crashed 2020-05-07T13:15:14.556288+00:00 heroku[router]: at=error code=H10 desc="App crashed" method...
2
1,350
Is this a good way to Deserialize Facebook JSON string?
<p>This is my first try to deserialize a JSON string returned by Facebook.<br> I want to make sure future developers can maintain my code comfortably so I would like to know if this is okay way to do it. I am concerned that if the JSON string change then I will need to rewrite some of my classes.<br> Is the JSON string...
2
1,222
Cube is not rendering in OpenGL
<p>I'm trying to write a basic OpenGL 3.3 program with shaders, buffers, etc. drawing a cube. The problem is that the cube is not drawn. Sorry for such an amout of code, but i feel like the error might be anywhere, because to me it all seems right: display function is looping, shaders are compiled, matrices are passed ...
2
2,407
Bus Error in MPI_Finalize
<p>I'm writing an MPI program for a parallel computing class. I've got the code working, and it outputs the correct result, but when I attempt to call MPI_Finalize with more than one process, I get a Buss Error. I'm running this on OS X through the PTP environment in Eclipse. The error is as follows:</p> <pre><code>[F...
2
2,273
Expanding/shrinking a dynamic array
<p>I have an assignment to create a template container class with a dynamic array that can be increased and decreased. When the array is displayed, I get either garbage numbers or no numbers at all for the elements in the array where it was expanded(so if it expanded on the fifth element, the value would turn to junk a...
2
1,643
Swift - How to use a class type as a parameter / variable
<p>I'm trying to create a somewhat generic function to sort file URLs based the value of an attribute</p> <p>My goal is to:</p> <p>1) Pass the URL and some parameters (Including the type) to a function. which will then loop through the file's attributes</p> <p>2) Add the matching file attribute and the URL to an ar...
2
1,077
Simple Java OpenGL Textures Manager
<p>I'm trying to make a simple textures manager for a 2D tile-based project.</p> <p>What I have is a class that has a hashmap of strings (texture name) and textures. If the name doesn't exist in the hashmap, it uses TextureIO.newTexture(..) to create it and store it into the hashmap.</p> <p>This is the error I get wh...
2
2,849
Spring Security Java Configuration. Rules are not applied
<p>I am starting to use Spring Security. I've always implement my own security. So this is new for me. I've followed few tutorials. I've read even Pro Spring Security Book (unfortunatelly everythink was configured with xml).</p> <p>I would like to write Rest Api base on Spring and Spring Security. I will have to main ...
2
2,895
How to make RecyclerView inside CardView and CardView have it's size when it has low items
<p>I have a <code>RecyclerView</code> inside a <code>CardView</code> but i have problem that i have 2 buttons in bottom of the <code>RecyclerView</code> so i put them at the end of <code>RelativeLayout</code> and give them <code>parent_bottom</code> true so i can make them visible but that makes the <code>CardView</cod...
2
2,452
org.redisson.client.RedisNodeNotFoundException: Node: NodeSource hasn't been discovered yet
<p>I am new to Redisson and I was trying to integrate the redisson + spring boot for distributed locks with the help of Redis cache.</p> <p>I am getting below error:</p> <p>org.redisson.client.RedisNodeNotFoundException: Node: NodeSource [slot=14577, addr=redis://10.150.77.93:6381, redisClient=null, redirect=MOVED, e...
2
1,083
Ag-grid tree data feature is not showing data
<p>I am trying to make this work for two days now. I am trying to show Tree data in Ag-grid in ReactJS using this article : <a href="https://www.ag-grid.com/javascript-grid-server-side-model-tree-data/" rel="nofollow noreferrer">https://www.ag-grid.com/javascript-grid-server-side-model-tree-data/</a></p> <p>Maybe I mi...
2
2,688
how to i connect my databse from oracle using this code in apex
<p>I am using apex 4.0 and built a report in a region using a pre-made report, HTML, jQuery JavaScript and CSS, and I want to retrieve data from my Oracle database.</p> <p>How can I retrieve data in this code from my Oracle database?</p> <pre><code> &lt;a class="offline-button" href="../index.html"&gt;Back&lt;/a&gt; ...
2
1,512
Auto Regex Generator - Similarity Between 2 strings c#
<p>I am trying to create a regex generator for scrapping purposes, and any guidance is appreciated.</p> <p>The idea is that we have a big text (html), we select 2 (at least) DOM elements that are always similar (like the first 2 results from google) and than we should generate a regular expression that will scrape (ma...
2
1,441
Error building maven multi module project with frontend-maven-plugin
<p>I am following <a href="https://dzone.com/articles/building-a-web-app-using-spring-boot-angular-6-and" rel="nofollow noreferrer">this</a> tutorial to build a project with Spring Boot backend and Angular frontend.</p> <p>The only changes I made are the versions in the web project .pom:</p> <pre><code>&lt;plugin&gt;...
2
9,525
AttributeError: 'bytes' object has no attribute 'close' when Tika parser is run
<p>Im trying to run a simple parse line of code using Tika to parse text from a PDF (named outputFileName in this example). This used to run without errors. I recently had my laptop sent in to our work IT for software updates and had to resintall Anaconda and import certain modules (such as Tika 1.22 released on 9 Nov ...
2
1,048
It is possible to use java with jwt and rs256 and auth0?
<p>This is the exception I get when trying to verify jwt token: <strong>Only RSAPublicKeySpec and X509EncodedKeySpec supported for RSA public keys</strong></p> <p>I am using com.nimbusds.jose.</p> <p>Here is doFilter method:</p> <pre><code> @Override public void doFilter(final ServletRequest req, ...
2
3,278
Eclipse Photon perspectives behave differently from Eclipse Mars (= weird)
<p>I've been using PyDev with Eclipse Mars for a long time, with basically a pydev and a debug perspective. Both showed different layout and views, but they were synchronized in the sense that when I loaded another source file into the pydev perspective, it would also show up in the debug perspective, along with the al...
2
1,062
OkHttp upload multiple files with names to Python Flask server
<p>At Server end I use Python flask:</p> <pre><code>from flask import Flask, request app = Flask(__name__) @app.route(&quot;/upload&quot;, methods=[&quot;POST&quot;]) def upload(): print request.files print request.form return &quot;200 ok&quot; if __name__ == '__main__': app.run(port=5000) </code></p...
2
1,628
Java Platform Game Collision
<p>I'm trying to make the player not be able to go through the platform from the left and right, and make the player stop on top of the platform. All I have for collision so far is left and right but the right isn't working and the left is bugging. I can't figure out how to do the basic collision of a platform game, ca...
2
2,390
Unable to run analysis on SonarQube after upgrade to version 6.2
<p>I’m trying to run the analysis on SonarQube 6.2 using MSBuild scanner but I'm receiving an error immediately on the first C# file analyzed.<br> The error occurs also on a very simple test solution containing only two C# files. The error is the following:<br></p> <pre><code>SonarAnalyzer for C# version 1.20.1.1275 0...
2
6,043
Use array to search for CASE values Excel VBA
<p>I'm trying to create an array from a list of variable values within one cell. </p> <p>For example: Cell B3 contains values: 1A, 2B, 3A, 4A, 5C. </p> <p>I want to convert that data so that: myarray=("1A", "2B", "3A", "4A", "5C")</p> <p>i.e. </p> <pre><code> myarray(1) = "1A" myarray(2) = "2B" myarray(3) = "3A"...
2
1,026
Separating IdentityUser from UserProfile
<p>I split my user-details into it's own table <strong>Profile</strong> with a foreign key to the ApplicationUser, but now my inserts fail.</p> <p>So I got the following tables:</p> <pre><code>AspNetUsers { Id UserName PasswordHash SecurityStamp Descriminator } </code></pre> <p>and</p> <pre><co...
2
1,315
CURL in PHP; sending post as array (CURLOPT_POSTFIELDS) or string
<p>CURL; sending post as array (CURLOPT_POSTFIELDS) or string. I am interfacing with an API for gamecrafter and CURLOPT_POSTFIELDS is behaving strangely for arrays. I got the API working in javascript (see index.html) but now I need to hide the username/password so I am switching to PHP. The new interface works except ...
2
1,148
While installing firebase-tools, NPM kept on giving dependency warnings despite they have been installed
<p>When I'm upgrading my <code>firebase-tools</code> from version 8.6.0 to 8.7.0 by running the command <code>sudo npm i -g firebase-tools</code> in my functions folder then I get these warnings:</p> <pre><code>npm WARN deprecated har-validator@5.1.5: this library is no longer supported /.npm/bin/firebase -&gt; /.npm/l...
2
1,342
Dynamically Created Textboxes not updating
<p>I'm creating textboxes in the Page_Load event and giving them values, however whenever I load the details I am getting the same output. I always seem to get the first output I got, even on subsequent searches.</p> <p>Here's what my code with the irrelevant information missing:</p> <pre><code>Textbox txtName = New...
2
2,043
How to use .so file generated from one Android application, and use it in another app?
<p>I am new in NDK development, I created project with C++ support. However i just added 1 cpp class and generated .SO file. And tried to access that so file in another project. I refer many <strong>stackoverflow links, Blogs and Google developer site</strong>. But not able to resolve it. Here is my code.</p> <p>local...
2
3,366
Fixing div width for screen resolution changes
<p>I have a problem with my css and html code. <a href="https://i.stack.imgur.com/8sUlS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8sUlS.png" alt="Width seems not to work"></a></p> <p>When I open the page normally it works, but when I change screen resolution, the .content-body class (the ligh...
2
11,233
Binding the CheckBox IsChecked Property to SelectedItems Property of a ListView
<p>I struggle with MVVM data binding.</p> <p>In my Example I have a <code>ListView</code> filled with items which contains a <code>CheckBox</code> and some other content.</p> <pre><code>&lt;ListView Background="#f0f0f0" Grid.Row="1" ItemsSource="{Binding ListViewCollection}" SelectedItem="{Binding Sel...
2
1,166
Geo searching with thinking sphinx
<p><strong>How do you pass multiple parameters into a search using thinking sphinx? Or how can you create advanced search fields using thinking sphinx?</strong></p> <p><em>Background: I am creating a website that allows manufacturers to post freight that they need moved across the country. Carriers need to be able to ...
2
1,140
how to sync time to android
<p>i have a url given to me to used for syncing the server time to my application, Question is how to do that? anyone can explain to me what to do here thank i really appreciate it.</p> <p>here's the URL = <a href="http://server10.instaforex.com:2012/TimeService/TimeService.svc/CurrentTime" rel="nofollow">http://serv...
2
1,024
Unable to display image from database - Laravel
<p>I have a relationship with product and images. The user can upload many images for a product so I have a product table and product_images table. </p> <p>When I try to get to fetch the image from the database, I get No image available in my view. But I am able to save to the path attribute in my database. </p> <p>W...
2
1,545
Setting ctrl with V4L2 on ov5640
<p>I would like to control various <code>ov5640</code> camera parameters by using <code>ioctl</code> and <code>VIDIOC_S_CTRL</code> from V4L2 in the following manner:</p> <pre><code>#include &lt;string&gt; #include &lt;iostream&gt; #include &lt;fcntl.h&gt; #include &lt;errno.h&gt; #include &lt;unistd.h&gt; #include &...
2
1,258
Custom Html Helper not working
<p>I am trying to learn MVC3 from Pro ASP.NET MVC3 Framework. But i am stuck at one place where we add custom Html Helper.</p> <p>I did every thing mentioned in the book, but i am not able to add the custom Html helper.</p> <p>Can somebody please help.</p> <p>Thanks </p> <p><strong>List.cshtml</strong></p> <pre><c...
2
1,356
Mocking objects that encapsulate collections
<p>I'm wondering how to go about checking that a method returns a container encapsulating some collection which is the aggregate of multiple other containers returned by mock objects. That is, it contains all the elements of the individual containers. I have some tests elsewhere that check the container 'works' (add/ad...
2
1,466
Berkeley DB: stuck at futex_wait because of previous abnormal quit during c api call
<p>I'm programming in C, using berkeley db 4.3 (/usr/lib64/libdb-4.3.so) on RHEL5.6 with kernel 2.6.18-238_xen_AMD64.</p> <p>In my tests (writing 1,000,000 key/value pairs), if one process quitted abnormally (ctrl + c, kill, or assert fails) while an operation on the db is in process, later operation on that db would ...
2
1,900
How can I Import my object with it's inherent textures from Blender to ThreeJS?
<p>I have used the STL Loader for threejs to import my object from Blender into threejs but for some reason, the textures don't appear. I assume it has to do with the object's MeshBasicMaterial. I tried changing it to Phong but the object turns black instead. </p> <p>Then I realized, instead of changing the material f...
2
3,018
TFS 2015: Publish artifact - "A task was canceled"
<p>Since shortly, I receive &quot;A task was canceled&quot; when running the build task &quot;Publish artifact&quot;. The tfs Server is running for a view weeks now and I never had problems with these tasks.</p> <p>I fixed this issue once with deleting the build output Folder but unfortunately this &quot;workaround&quo...
2
1,083
why does the mongo-java-driver DBCollection.aggregate() return NoSuchMethod
<p>Here is part of a stack trace I am getting when I call the aggregate method on mongodb's DBCollection object:</p> <pre><code>java.lang.NoSuchMethodError: com.mongodb.DBCollection.aggregate(Ljava/util/List;)Lcom/mongodb/AggregationOutput; at com.alpine.dao.AppEventDAO.getActiveDeviceIds(AppEventDAO.java:975) at son...
2
1,795
Scroll with navigation bar - Uncaught TypeError: Cannot read property 'top' of undefined
<p>I'm getting an error in console.log of my website saying</p> <p><code>Uncaught TypeError: Cannot read property 'top' of undefined</code></p> <p>If anyone can take a look at my code i've already got and give me a hand on finding the problem.</p> <p><strong>Current Code:</strong></p> <p><strong>HTML (Navigation ba...
2
1,077
Airflow 2 import exception
<p>I uninstalled airflow 1.10.12 and installed airflow 2 using python 3.6.9. When I start the webserver without custom DAGs I get warnings:</p> <pre><code>[2021-01-12 11:38:58,095] {dagbag.py:440} INFO - Filling up the DagBag from /dev/null [2021-01-12 11:38:59,049] {providers_manager.py:283} WARNING - Exception when i...
2
1,123
Styling prompt text separately from text in JFXTextField
<p>I am using JFoenix library elements. I have a simple login interface. I use JFXTextfields with a LabelFloat option. When the text field is empty the prompt text weight is normal. But when the text field is unfocused and non-empty I need the text weight to be changed to be bold and its size increased, I also need th...
2
1,732
Splitting schema.org Microdata over multiple divs or elements
<p>The basic <a href="http://www.w3.org/TR/2011/WD-microdata-20110405/#the-basic-syntax" rel="noreferrer">Microdata</a> should be something like:</p> <pre><code>&lt;div itemscope itemtype="http://schema.org/LocalBusiness"&gt; &lt;a itemprop="url" href="url"&gt;&lt;div itemprop="name"&gt;&lt;strong&gt;name&lt;/strong&g...
2
1,025
Case conditions are not exhaustive?
<p>I am writing two modules in NuSMV but I am receiving the error, "Case conditions are not exhaustive" This error points to the last case statement I have in the code. I am not sure how to fix this because the cases that I currently have there are the only cases that the variable requires. The first module "train" is ...
2
1,240
jQuery Supersized Background & Div multiple function
<p>I would like to use the jQuery Supersized plugin to create a full background and a function to put a different image in a DIV. In this way should 2 various images will be visible and change sync. Unfortunately i can't get it done.. How can I make this work or is this not possible? </p> <pre><code>&lt;!DOCTYPE html ...
2
2,195
Web.config system.webserver errors
<p>I'm trying to deploy my C# ASP.Net app to my hosting site. The problem is I have 2 C++ dlls that the app uses, but with shared hosting they can't be in the bin folder. They've been referenced in the project fom a folder called 'bin_native'. The app runs on my machine with using the probing privatePath in the runtime...
2
1,239
Dropdown hover enable/disable on window resize
<p>I'm wanting the dropdown to open on hover, only if the window is larger than 767px. I'm trying to call a function on page load and on window resize with the a width size condition. The enableHover() function only works on page load and not on window resize.</p> <p><a href="https://codepen.io/gabe1331/pen/mBjXNZ" re...
2
1,140
How to create a Binary Search Tree for strings instead of integers?
<p>There is this piece of code in my C book that explains how the BST works for integers, but my homework is about BST for strings. </p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdbool.h&gt; struct node { char data; struct node *left; struct node *right; }; struct node ...
2
3,309
Symfony2 functional test prints out redirect html and stops test execution
<p>I'm struggling to understand what is wrong with my functional testing or project settings: the phpunit execution just prints out the following information (I'm not printing this out in the test suite - i.e. it doesn't come from the client->getResponse() printing or anything). Additionally the whole test execution st...
2
1,266
Sending Database dropdown & jQuery DatePicker data to a mySQL Database
<p>I have encountered a problem recently and I am unable to solve it. I have a client booking form, where they get a dropdown menu which is connected to a database with treatments etc. that displays all the data, and I also have a jQuery DatePicker, and further plans to implement a jQuery TimePicker very soon. </p> <p...
2
1,586
Why does an asmx file have to have a webservice with just an int as a parameter?
<p>I have an asmx web service which requires a string and two ints to return data. When I run the asmx page directly and invoke it, I get a 500 error and on chrome get the following:</p> <pre><code>System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Web.Services.Protocols.HttpServerT...
2
1,025
Axis2(aar) + spring, without a servletContext
<p>Greetings dear Stackoverflow users, I have been lately in lots of pain with one specific problem with axis2 web services with Spring framework. I have read lots of different guides and read different forums but found people with the same problems but with no solutions. Basically ended up holding the monitor with bot...
2
2,011