title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
django - TypeError: expected string or buffer
<p>Hello I added a field to a model and when I try to do <code>migrate</code> in terminal it give me this error, does anyone know what this might be?</p> <p>=========================================================================</p> <pre><code> File "manage.py", line 10, in &lt;module&gt; execute_from_command_...
0
2,003
Error in configuring hibernate 5.0.1 and MySQL
<p>I have problem configuring the hibernate 5.0.1 with MySQL, I saw some questions here stating there is a bug in the version 4, I am not sure weather this is the same bug or I am doing something wrong.</p> <p>Here is my configuration file hibernate.cfg.xml</p> <pre><code>&lt;hibernate-configuration xmlns="ht...
0
1,197
Bootstrap 4 dropdown menu appears behind other elements
<p>I´m having problems with <code>bootstrap 4 dropdown menu</code>, if there is enough space and the dropdown is opened from bottom to top all menu appears fine, but if the menu is opened from top to bottom some <code>menu items</code> do appear behind the other divs. How can I fix that and why it happens only in a cer...
0
9,675
No qualifying bean of type [javax.persistence.EntityManager]
<p>I am attempting to build a brand new Spring Framework 4.0 project without all of the magical gradle stuff, but simply kicking it old school.</p> <p>I am following the tutorial here: <a href="http://spring.io/guides/tutorials/data/" rel="noreferrer">http://spring.io/guides/tutorials/data/</a> and am having some succ...
0
3,278
Scroll bar in the main section of a v-app
<p>I have copied one of the pre-defined layouts from <a href="https://vuetifyjs.com/layout/pre-defined" rel="nofollow noreferrer">https://vuetifyjs.com/layout/pre-defined</a>.</p> <p>However when the content of the main section overflows it cause a scroll to appear for the whole app, rather than a local scroll to the ...
0
1,165
Backstack management : Restarter must be created only during owner's initialization stage
<p>I am using a bottom navigation bar in my MainActivity to handle some fragments. This is the code used for switching between them:</p> <pre><code>private val mOnNavigationItemSelectedListener = BottomNavigationView.OnNavigationItemSelectedListener { item -&gt; if (item.isChecked &amp;&amp; supportFragmen...
0
1,555
401 Unauthorized : WWW-Authenticate: Bearer
<p>I've seen similar threads to this issue, but I had no luck solving it. LogIn worked successfuly but when I try to GET data of the user loggedIn in my home page I receive this error 401 Unauthorized the same erroe is showen also in Postman</p> <p>My startup.cs</p> <pre><code> public class Startup { priv...
0
4,290
Passing An ObservedObject To Nested Child Views SwiftUI (SwiftUI Data Flow)
<p>I'm trying to understand why passing an @ObservedObject variable does not work for nested child views. The data is able to be passed but the changes only reflects at the root view where the @ObservedObject variable was created. The changes don't show in the subviews. Looking at Apple documentation (which has been up...
0
1,181
OutOfMemory when reading big amounts of data using hibernate
<p>I need to export big amount of data from database. Here is classes that represents my data:</p> <pre><code>public class Product{ ... @OneToMany @JoinColumn(name = "product_id") @Cascade({SAVE_UPDATE, DELETE_ORPHAN}) List&lt;ProductHtmlSource&gt; htmlSources = new ArrayList&lt;ProductHtmlSource&gt;(...
0
1,540
splash screen application and hide action bar
<p>I'm trying to figure out how is it possible to hide the action bar for a splash screen activity. I did something which hide my action bar on my splash screen, but there is one problem: before my splash screen appears, there is like an activity with an action bar who appears briefly... and I don't know how to hide it...
0
2,907
Cucumber cannot be resolved to a type
<p>I created a RunTest class to run my test scenarios using Cucumber with JUnit. To run the tests before, I need to import into my project the RunWith class (@RunWith) and pass as parameter the Cucumber.class. Then, the RunWith parameter of the class recognizes more of the parameter that is passed to it, no. The eclips...
0
1,247
Problems with Windows Installer package
<p>I have a client that is having problems with our the .msi installer for our application. WiX was used to create this installer. The application has installed just fine on dozens of other machines, but on his machine it displays the message:</p> <blockquote> <p>This installation package could not be opened. Cont...
0
1,478
Multinomial regression using multinom function in R
<p>I was thinking about posting my question in Cross-Validated, but decided to come here. I am using the multinom() function from the nnet package to estimate the odds of becoming employed, unemployed, or out of labor force conditioned on age and education. I need some help with the interpretation.</p> <p>I have the f...
0
2,168
How to add phpmyadmin to laravel 8 sail docker-compose.yml
<p>I'm trying to add <code>phpmyadmin</code> to <strong>laravel 8</strong> <code>docker-compose.yml</code> file.</p> <p>Now, I can access <code>phpmyadmin</code> on &quot;http://localhost:8080&quot; but the user is not got <strong>Cannot log</strong>:</p> <pre><code>Cannot log in to the MySQL server mysqli::real_conne...
0
1,788
Android SSL https post
<p>I've seen a lot of similar question here but couldn't find the solution. I have a webservice PHP file hosted at x10 premium. I bought an SSL certificate from them and can access my webpage via https on a browser and on the iPhone app. I'm having trouble doing the same on the Android app.</p> <p>I tried many solutio...
0
2,422
C# Windows forms Blink label
<p>In a windows forms dialog I have a <code>Listview</code> that contains almost 2000 rows. Each row has a checkbox. To make it easy for the user I have two <code>Labels</code> above the Listview to show any active filter AND how many rows are selected (checked).</p> <p>To emphasize when a filter or selection is chang...
0
1,327
A required header representing a Message Addressing Property is not present
<p>I am getting this error in SOAPUI:</p> <pre><code>&lt;env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing"&gt; &lt;env:Header&gt; &lt;wsa:Action&gt;http://www.w3.org/2005/08/addressing/fault&lt;/wsa:Action&gt; &lt;/env:Header&gt; &lt;env:...
0
3,071
Compile fortran module with f2py and Python 3.6 on Windows 10
<p>I'm trying (and failing) to compile a fortran module (specifically <a href="https://www.ngdc.noaa.gov/IAGA/vmod/igrf12.f" rel="noreferrer">igrf12.f</a> from the BGS) using f2py and Python 3.6 on Windows 10. Python was installed using Anaconda 4.4.10.</p> <p><strong>My setup:</strong></p> <ul> <li>Python 3.6.3 |Anaco...
0
4,670
TypeError: match.loader.options.plugins is not a function
<p>I am trying to use tailwindCSS in a ReactJS app</p> <p>These are the scripts commands in <code>package.json</code> file</p> <pre><code> &quot;scripts&quot;: { &quot;start&quot;: &quot;craco start&quot;, &quot;build&quot;: &quot;craco build&quot;, &quot;test&quot;: &quot;craco test&quot;, &quot;eject...
0
1,146
VSCode Prettier not formatting PHP
<p>So I've set up vscode with Prettier, but it will not format .php files. .html files are working fine with Prettier. So when I have a .php with HTML code then it will be formatted differently, because I am using Beautify as last option.</p> <p>How can I make Prettier automatically format .php files and the html code ...
0
2,798
How to display base64 encoded image in html
<p>I have image URL, so I downloaded the image and converted image into base 64 by online converter.</p> <p>base 64 code:</p> <pre><code>iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2Voa...
0
1,406
Windows Service started and then stopped using Topshelf
<p>I am using Quartz.net and I am trying to get the Quartz server to start-off in a Windows Service. I have created a Windows Service Project and included the Quartz.net libraries. In my Service class I have:</p> <pre><code>protected override void OnStart(string[] args) { try { Host host = HostFactory....
0
1,854
Cannot read properties of undefined (reading 'app')
<p>Im trying to implement the firebase SDK to my Flutter web project.</p> <p>But as i try to start to application the following error appear:</p> <pre><code>TypeError: Cannot read properties of undefined (reading 'app') at Object.app$ [as app] (http://localhost:49235/packages/firebase_core_web/src/interop/core.dart...
0
1,638
Google Play Developer API - Query purchase token returns Invalid Value
<p>I am trying to set up a web service to query Google Play purchases. We store the order information for customers and this service would call Google Play API to query the subscription details.</p> <p>Every time i try to query a purchase, it gives me the error:</p> <pre><code>HTTP/1.1 400 Bad Request { "error"...
0
1,647
React handle form submit
<p>I'm trying to create a form in React/Redux. For now I just want the form to trigger my function handleSubmit when the form is submitted. However at the moment it looks like the function is triggered instantly on page load ...</p> <pre><code>export default class AssetsAdd extends React.Component { componentDidMou...
0
1,086
Property does not exist issue running Angular2 ver.2.0.0-alpha.44
<p>New to Angular2, trying to get <a href="http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5?p=linter" rel="nofollow">this plunkr</a> project running on my local system. I'm getting the following errors:</p> <p>Error:(25, 23) TS2339: Property 'people' does not exist on type 'PeopleService'. Error:(26, 39) TS2339: Proper...
0
4,708
jqGrid row vertical alignment not middle
<p>For some reason on our grid the vertical alignment of the rows is not middle. It appears to be top. Is there something specific you have to do to achieve vertical alignment?</p> <p>Here's an example of the alignment: <img src="https://i.stack.imgur.com/qouTc.png" alt="alt text"></p> <p>Our grid definitions:</p> ...
0
1,140
Bootstrap collapse isn't working; hamburger menu not showing up
<p>I am making an Angular application, and installed all my libs with Bower. When I check the console, all the sheets/scripts are loading up properly. I also have bootstrap and jQuery defined in my head. I copied the code from Bootstrap's site.</p> <p>The issue that I'm having is that the hamburger menu never comes up...
0
1,147
How to Know Which HTML Element is Causing Vertical Scroll Bar
<p>I am learning <a href="http://getbootstrap.com/2.3.2/getting-started.html">Bootstrap</a>. On the getting started menu, there are few templates given. I am playing with that. One example is about fixed Footer. I used nav from previous example and wanted to adjust that with fixed footer. But vertical scrollbar is comi...
0
3,545
Get list of sheets and latest sheet in google spreadsheet api v4 in Python
<p>I am trying to read and write values of different sheets in python 3 following the <a href="https://developers.google.com/sheets/quickstart/python" rel="noreferrer">google official documentation</a>. Though I am able to read values from certain sheets using range property in <code>rangeName = 'Class Data!A2:E'</code...
0
1,034
Invalid Operands to binary Expression (C++ operator overload)
<p>I just implemented my own matrix class that has some functions, i wrote <code>=</code> and <code>*</code> operator overload functions for copying and multiplying matrices, however when i run a test program i got the following error:</p> <blockquote> <blockquote> <p>Invalid Operands to binary Expression (Matr...
0
1,860
I'm having trouble positioning this button nicely
<p>I've been goin at it now for an 1.5hrs and I just can't figure out a way to make it the way I want. I'm kind of new with all things web, and it takes about as much time (maybe more?) trying to get things where I want and doing it in a way that is elegant.</p> <p>Anyways, I have two text boxes, with two labels above...
0
4,009
Displaying text in an android studio project
<p>Trying to get a program similar to this to work on the android platform. The trouble is I'm not sure on using xml to display text/read user input. I'm fairly new to mobile software development but from the code below, I'm only trying to display the print statements and obviously get user input too.</p> <pre><code> ...
0
3,737
npm throwing an error at the end of the eslint report
<p>I have an issue when running eslint on my typescript project. I have the following package.json, where I wrote a script to run eslint:</p> <pre><code>{ "name": "ts-tutorial", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "transpile": "tsc", "lint": "eslint src --ext ts" ...
0
1,614
MultiPartParserError :- Invalid boundary
<p>Im trying to send some data and file using Python requests module to my django rest application but get the below error.</p> <pre><code> raise MultiPartParserError('Invalid boundary in multipart: %s' % boundary) MultiPartParserError: Invalid boundary in multipart: None </code></pre> <p>Code:-</p> <pre><code>im...
0
1,081
FATAL EXCEPTION: main KotlinNullPointerException
<p>This is my first time building an android application. However when i run the app on my Virtual Device, it stopped working and keeps crashing. The error says something about null pointer exception. This is my first time using Kotlin and I coded in Java and changed to Kotlin.</p> <pre><code> override fun onCreate(sa...
0
3,596
Mocking static methods with Powermockito
<p>I am trying to mock static method with <code>PowerMockito</code>. I have referred to various stackoverflow answers such as this:<a href="https://stackoverflow.com/questions/21105403/mocking-static-methods-with-mockito%20.">Mocking static methods with PowerMock and Mockito</a></p> <p>But I am getting : <code>org.moc...
0
1,636
resources in a Spring Boot application are missing from jar file when using Spring Boot Maven Plugin
<p>I am using Spring-Boot v1.3.0.M5 with Maven v3.3.3. I used to be able to run my Spring Boot (boot) application from the console with this command.</p> <p><code>mvn clean package spring-boot:run</code></p> <p>However, I've had to revise my <code>pom.xml</code> to account for different environment builds. In particu...
0
1,799
Drawing Polygon in google map using javascript
<p>I want to draw polygon in google map and i am using the example code at <a href="http://jsfiddle.net/rvsMH/1/" rel="noreferrer">http://jsfiddle.net/rvsMH/1/</a> but its not working and not getting array or lat long value.I don't know whats the problem. I am new to google maps please help anybody. Thanks in advance. ...
0
1,537
jQuery DataTables: how to change pagination active color?
<p>I am using the jQuery DataTables plugin and would like to change the color of the pagination.</p> <p>With CSS I would like to change both font color 、hover font color and active page color .</p> <p><strong>The pagination code looks as follows:</strong></p> <pre><code>&lt;script&gt; $(document).ready(function() ...
0
1,197
Why am I getting a "cross-database references are not implemented"?
<p>very simple update to a postgresql database, and it's not working. The sql select statement is fine, and returns the right values. </p> <p>It's when i get to the update, it throws the error: </p> <pre><code> {"ERROR [0A000] ERROR: cross-database references are not implemented: "openerp.public.product_template"; Er...
0
1,916
how to loop through rows columns in excel VBA Macro
<p><strong>Hi, I am trying to create a macro that has a loop which copies a function down column 1 (VOL) and another function down column 2 (CAPACITY) for each Station. This is what I have so far:</strong></p> <pre><code>Sub TieOut() Dim i As Integer Dim j As Integer For i = 1 To 3 For j = 1 To 3...
0
1,418
Java Record Mic to Byte Array and Play sound
<p>I want to make a live voice chatting program in Java, but I know nothing about recording/playing sound in Java, so with the help of Google, I think I have been able to record from my mic to a byte array with the following:</p> <pre><code>AudioFormat format = new AudioFormat(8000.0f, 16, 1, true, true); TargetDataLi...
0
1,653
Update form in rails - No route matches [PUT]
<p>I have a form to create adverts. </p> <p>Controllers:</p> <pre><code> def edit @engines = Engine.all @car = Car.find(params[:id]) end def update @car = Car.find(params[:id]) if @car.save redirect_to root_path end end </code></pre> <p>My routes:</p> <pre><code>resources :adverts...
0
1,145
CloudLinux 7.8 error installing postgresql 11 Requires: llvm-toolset-7-clang >= 4.0.1
<p>I've got a CloudLinux 7.8 (based on CentOS 7) machine and I'm trying to install postgresql11-devel onto the system and it fails due to 'llvm-toolset-7-clang >= 4.0.1'.</p> <p>Here is the full error</p> <pre><code>[map7@ded94686 testapp]$ sudo yum install postgresql11 postgresql11-devel postgresql11-libs postgresql...
0
2,426
Java EE javax.xml.bind.MarshalException
<p>I am getting <code>javax.xml.bind.MarshalException</code> error. I am sending List from my webservice to the backingbean and I have this error.</p> <pre><code>WARNING: invocation error on ejb endpoint Login_webservice at /Login_webserviceService/Login_webservice : javax.xml.bind.MarshalException - with linked exce...
0
1,302
Kendo UI Grid- - Default Sort Date Asc
<p>I'm using kendo UI, and am looking to default sort my grid by ascending date, but can't figure out how to modify this. My understanding is that it is part of the data-source section:</p> <pre><code>@(Html.Kendo().Grid&lt;CustomerAnimalViewModel&gt;() .Name(gridId) .HtmlAttributes(new...
0
1,381
How to use knockout.js with ASP.NET MVC ViewModels?
<p><strong>Bounty</strong></p> <p>It's been awhile and I still have a couple outstanding questions. I hope by adding a bounty maybe these questions will get answered.</p> <ol> <li>How do you use html helpers with knockout.js</li> <li><p>Why was document ready needed to make it work(see first edit for more information...
0
3,870
html5 canvas array of images- draw image to canvas
<p>I'm using the HTML5 canvas and JavaScript to make a basic game, and I have an array of images for the numbers 1-10, and then have another array for the Welsh words for the numbers 1-10.</p> <p>What I want to do is select a random element from the images array and a random element from the words array and display th...
0
1,318
Getting associated type synonyms with template Haskell
<p>Can Template Haskell find out the names and/or the declarations of the associated type synonyms declared in a type class? I expected <a href="http://hackage.haskell.org/packages/archive/template-haskell/latest/doc/html/Language-Haskell-TH.html#v:reify"><code>reify</code></a> would do what I want, but it doesn't see...
0
1,724
SELECT TOP N with UNION and ORDER BY
<p>Given the example below, why does using using <code>UNION ALL</code> with two <code>SELECT TOP 5</code> statements in Query 2 below seemingly not respect the <code>ORDER BY</code> clause?</p> <p>Query 1 returns the expected results but does not include the required union. Query 2 demonstrates the unexpected behavio...
0
1,106
Backbone: Adding a model to Collection and render a View
<p>I'm building a simple Backbone app where I mainly have a view with a list of books (book name + cover image) and another view where I want to add new books to the list. </p> <p>When I use a sample data the view with the books renders properly, but when I try to add books to the list it doesn't work and I don't know...
0
2,336
How to record video of particular width and height on samsung device android?
<p>Hello I am making an android application in which I am using custom camera for recording camera.I am having problem on samsung device.I can not set the profile of Media recorder to <code>CamcorderProfile.get(cameraid, CamcorderProfile.QUALITY_HIGH)</code></p> <p>also when try to use </p> <pre><code>profile = Camco...
0
1,827
Symfony2 - array to string conversion error
<p>I've read the other subjects but it doesn't solve my problem so:</p> <p>I've got this </p> <pre><code>-&gt;add('role', 'choice', array( 'label' =&gt; 'I am:', 'mapped' =&gt; true, 'expanded' =&gt; true, 'multiple' =&gt; false, 'choices...
0
1,570
Can't install pygame with pip as there is an error whilst runningvsetup.py bdist_wheel for pygame
<p>I am trying to install pygame for Python 3 on an anaconda install.</p> <p>I run <code>pip install pygame</code>, and it outputs the following:</p> <pre><code>Collecting pygame Using cached pygame-1.9.3.tar.gz Building wheels for collected packages: pygame Running setup.py bdist_wheel for pygame ... error Com...
0
13,279
Failed to apply plugin class 'com.google.gms.googleservices.GoogleServicesPlugin'
<h2>Heading #### error</h2> <pre><code>+----------------------------------------------------------------- | cordova-android-play-services-gradle-release: 11.+ +----------------------------------------------------------------- The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gra...
0
7,418
Error : "501 5.5.4 Invalid domain name" when I attempt to send an email using PHP + Swiftmailer
<p>I'm writing a very simple contact form that will allow blue collar workers to submit safety concern notices over our intranet. Contact form is displayed in HTML and asks for a Name, a From email, and the message to be sent. It always sends to our safety email.</p> <p>The server and port are correct. It's an Exchang...
0
1,551
How to reload my view in iOS
<p>I have a imageView embedded in a scrollView. The imageView needs to be downloaded from the Internet (through flickr api), so I add a thread to handle this. But what am I supposed to do after I finished downloading the image? How can I reload my imageView?Here's my code.</p> <p>In fact, it is working fine. but the i...
0
1,122
How to save this rtmp flash video stream?
<p>My sister wanted me to save <a href="http://esewingworkshop.com/video-lesson/overview-zipper-types" rel="nofollow">http://esewingworkshop.com/video-lesson/overview-zipper-types</a> flash video &amp; couple more for offline viewing purposes and asked me how to save it.</p> <p>I immediately fired firebug in firefox b...
0
1,450
How to display data table in JSF page with database data
<p>I have a table in a database which is used for storing application configuration data.</p> <p>This is the table structure - it's very simple example:</p> <pre><code>SessionTTL MaxActiveUsers ---------------------- ---------------------- 30 787 </code></...
0
1,678
Retrieve file and parameters in jsp from POST request
<p>I have the following form inside a modal:</p> <pre><code> &lt;div id="sazModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="sazModalLabel" aria-hidden="true"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&...
0
1,639
snmpwalk with PySNMP
<p>I’d like to reproduce the comportment of the following SNMP command :</p> <pre><code>snmpwalk -v2c -cpublic 192.168.0.10 1.3.6.1.2.1.25.2.3.1.3 </code></pre> <p>which gives me this output :</p> <pre><code>iso.3.6.1.2.1.25.2.3.1.3.1 = STRING: "Physical memory" iso.3.6.1.2.1.25.2.3.1.3.3 = STRING: "Virtual memory" ...
0
1,151
What sets up sys.path with Python, and when?
<p>When I run </p> <pre><code>import sys print sys.path </code></pre> <p>on my Mac (Mac OS X 10.6.5, Python 2.6.1), I get the following results.</p> <pre> /Library/Python/2.6/site-packages/ply-3.3-py2.6.egg ... /Library/Python/2.6/site-packages/ipython-0.10.1-py2.6.egg /System/Library/Frameworks/Python.framework/Ve...
0
1,127
Qt error: undefined reference to 'gluOrtho2D'
<p>I have the same error than <a href="https://stackoverflow.com/questions/9326380/undefined-reference-to-gluortho2d">here</a>. There's no solution there and also I'm gonna try to explain it more clearly so hopefully someone has the solution. Also I've installed everything from the answer to <a href="https://stackoverf...
0
2,830
Fitting a Poisson distribution to data in statsmodels
<p>I am trying to fit a Poisson distribution to my data using statsmodels but I am confused by the results that I am getting and how to use the library.</p> <p>My real data will be a series of numbers that I think that I should be able to describe as having a poisson distribution plus some outliers so eventually I wou...
0
1,145
Spring : @Transactional @Scheduled method throws TransactionException
<p>(Still a bit new to Spring)</p> <p>I need to have a service method that is at the same time <code>@Scheduled</code> and <code>@Transactional</code>, so that I get to call a DAO in it.</p> <p>Declarative transactions are enabled, the transaction manager is a <code>org.springframework.orm.hibernate3.HibernateTransac...
0
1,797
Inconsistent orientation sensor values on Android for azimuth/yaw and roll
<p>I’m having trouble getting good orientation sensor readings. The sensor readings seemed unreliable, so I tested my code against two free sensor test apps (<a href="https://play.google.com/store/apps/details?id=com.dicotomica.sensortester&amp;hl=en">Sensor Tester (Dicotomica)</a> and <a href="https://play.google.com...
0
2,057
DynamoDB List type
<p>I have problems understanding how to create a List for dynamoDB from my Android app. I can store and load the <code>{ "deviceId": "920e185a-63ed-46ca-bfca-f7a484ccb708" }</code> from my app. But then to add the List and store my JSON objects as Map in the List is were i struggle.</p> <p>The dynamoDB structure I w...
0
1,212
What am I missing about express sessions and cookies?
<p>I've gotten pretty far with express and express-session and express-sql-session. I've got it creating a row in the database for a session when a user logs in. This is how I set it:</p> <pre><code>//login route handler this.bcrypt.compare(password, row.hashed, function(err, passwordsMatch) { if (passwordsMatch =...
0
1,172
How to logout user when token expires in react app
<p>I am working on a app where I am using React as my front-end and <code>React-apollo-graphql</code> for my API calling.</p> <p>I am using <code>react-hooks</code> i.e in React 16.8 +.</p> <p><strong>What I am doing</strong></p> <p>I have crated a <code>auth.js</code> file where I am storing my values when user is log...
0
1,699
Error: Failed to load plugin import: Cannot find module 'eslint-plugin-import' when deploying a create-react-app
<p>I'm new to create-react-app. I just made a quick setup with <code>redux</code> and <code>react-router-dom</code> which builds nicely on my computer using <code>yarn build</code>, but when pushing to Scalingo or Heroku the build fails with the following error:</p> <pre><code> ./src/index.jsx Error: Failed to l...
0
2,786
SignalR .Net client: How do I send a message to a Group?
<p>I am using the sample Chat application from the SignalR Wiki Getting Started Hubs page. I have extended it to add Group support and it is working fine. </p> <p>However, now I want to send a message to the group from an external Console application. Here is my code for the Console app and below that my code for G...
0
1,402
how to convert formcollection to model in mvc
<p>Is it possible to convert <code>formcollection</code> to a 'model' known?</p> <pre><code>[HttpPost] public ActionResult Settings(FormCollection fc) { var model=(Student)fc; // Error: Can't convert type 'FormCollection' to 'Student' } </code></pre> <p>NOTE : for some reasons i can't use ViewModel in...
0
1,367
Insert OpenCv Mat to C++ std::vector
<p>I am pushing Mat objects into a std::vector.</p> <p>But, when I try to access the elements (Mat) after that, it did not give me the images pushed in earlier, depending on frameOrientation.</p> <p>E.g., in the case below,i get "after_push_rotated2.jpg" same as "before_push_rotated3.jpg", which should not be. </p> ...
0
1,334
calculate mean median mode c programming array
<p>I have this homework assignment where the user is asked to input numbers and then calculates the mean median and mode, followed by asking if he/she wants to play again, and either repeating the program or quitting. Everything compiles, but I can seem to figure out the few things going wrong: </p> <p>The mean works....
0
1,833
Insert/Update to another table using trigger
<p>I have 2 tables, tableA and tableB.</p> <pre><code>tableA: id | status | Flag | ResultOfAction | ExternalId | Customer 1 200 2 0 332 C1 2 200 0 0 333 C1...
0
1,656
Key Error when key is in dictionary
<p>Just trying to pull some lat/lon info from EXIF data on a bunch of photos, but code is throwing a <code>KeyError</code> even though that key is used (successfully) later on to print specific coordinates. </p> <p>Dictionary in question is "<code>tags</code>" - <code>'GPS GPSLatitude'</code> and <code>'GPS GPSLongitu...
0
1,576
How to get all contacts from phonebook & SIM card in Android?
<p>I am working to get all the contacts from phone book and SIM card in my application. I want to store those all contacts in my application SQLite DB. The code with which I am working is working fine in normal conditions. Getting problem in below conditions:</p> <ol> <li>with a contact without name, that is only numb...
0
5,435
Steganography in C
<p>Trying to do basic Steganography on a PPM Image.</p> <p>I have the basic algorithm completed. Read in the file, check the header starts with P6, get the image width and height, and the pixel data.</p> <p>I need to have a total of four methods: ReadPPM, WritePPM, WriteMsg and ReadMsg.</p> <p>I have the ReadImg and...
0
2,628
Access to the resource https://sqs.us-east-1.amazonaws.com/ is denied
<p>There are many references to this error, but,</p> <p>Below is the execution role created for lambda(<code>AWS::Serverless::Function</code>):</p> <pre><code>{ "permissionsBoundary": { "permissionsBoundaryArn": "arn:aws:iam::111222333444:policy/some-permission-boundary", "permissionsBoundaryType": "Policy"...
0
1,208
Ajax not working in android webview
<p>I am loading a website in webview,we have used Ajax in website and its working fine on web browser and mobile browser also but in android webview ajax is not working no error is there in the console.Here is my code:-</p> <pre><code>public class Activity_WebView extends AppCompatActivity implements ConnectivityRe...
0
1,073
Form validation fails due missing CSRF
<p>A few days ago I have reset my local flask environment without having captured the dependencies via a <code>pip freeze</code> before I deleted it. Hence I had to re-install the latest version of the entire stack.</p> <p>Now out of the blue I am no longer able to validate with forms. Flask claims CSRF would be miss...
0
1,205
How to get cookie value from a WebDriver using selenium?
<p>/<em>I am using the following code to get the cookie value but I am only getting 1st and 2nd part.But not getting 3rd and 4th part(null as you can see). Please help me with this.I have attached the screenshot of the cookies i get manually</em>/ <a href="https://i.stack.imgur.com/QzPz9.png" rel="nofollow noreferrer">...
0
1,260
c++ program for reading an unknown size csv file (filled only with floats) with constant (but unknown) number of columns into an array
<p>was wondering if someone could give me a hand im trying to build a program that reads in a big data block of floats with unknown size from a csv file. I already wrote this in MATLAB but want to compile and distribute this so moving to c++.</p> <p>Im just learning and trying to read in this to start</p> <pre><code>...
0
1,341
java.lang.NoClassDefFoundError: javax/faces/context/FacesContextFactory
<p>All similar questions didn't help me, so I'm creating my own:</p> <p>I'm creating a JSF Webapp with Maven in Eclipse. To test it, I run it as a Maven build with the war:war goal, this works without errors. However, when I deploy the war-file to my local tomcat to test it, I get the following error message during st...
0
2,140
Cannot find libcrypto library error
<p>When i am trying to compile a <code>C</code> code which uses openssl 'crypto' library functions with comand line <code>-lcrypto</code> with <code>gcc 4.4.3</code> it gives an error </p> <pre><code>`@ubu:$ gcc -ggdb aes_m.c -Werror -Wall -I /usr/local/ssl/include/ -lcrypto -o aes /usr/bin/ld: cannot find -lcrypto ...
0
1,222
How to put FloatingActionButton to Fragment?
<p>How can I put my <code>fab</code> on my fragment? help please I'm getting errors such as.</p> <blockquote> <p>android.view.InflateException: Binary XML file line #13: Error inflating class fragment</p> </blockquote> <p>in my fragment acticity. Well here are my codes.</p> <p>well the problem is in the <code>g...
0
3,626
preloading images in html5/javascript
<p>I've seen example of preloading using multiple images, however I dont know how to apply them to my situation where I only have one image and I'm swapping out frames using the src.</p> <p>I have a sprite animation that I'm doing, but since there so many images I want to use, I'll have to load them before beginning.<...
0
2,219
Asynchronous Socket Server in C#, client to client communication through socket server
<p>I am trying to develop server/client Asynchronous sockets using c#. I have followed guide on <a href="https://docs.microsoft.com/en-us/dotnet/framework/network-programming/asynchronous-server-socket-example" rel="nofollow noreferrer">MSDN</a> Link. In my case, socket server listening on particular endpoint, many cli...
0
3,457
Radio Button findViewById within a Fragment
<p>I have looked around and implemented some of the things that I have found in order to get the findViewById to work inside my Fragment. However, I get either the cannot resolve method findViewById or I get "Unreachable Statement." I am not entirely sure where I am going wrong.</p> <p>Here is the code for my Fragment...
0
1,154
Class loader error - unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader
<p>I am quite new to Spring and Java as a whole and I am currently working on an API. I've got this code which accesses MSSQL database, retrieves the results and IS SUPPOSED TO visualize it, but it doesn't work. I mean, if I would only call the procedure and visualize the result set, it would work normally. The problem...
0
1,329
How to properly integrate OData with ASP.net Core
<p>I'm trying to create a new ASP.NET Core project with a "simple" web api using OData and EntityFramework. I have previously used OData with older versions of ASP.NET.</p> <p>I have set up a controller with only a simple get function. I've managed to get it working with basic OData commands as filter and top, but I c...
0
2,608
ImportError: No module named zbar on Linux Mint
<p>I want to use zbar with python on Linux Mint.</p> <p>I tried apt-get zbar and I didn't find any packages.</p> <p>So I tried to use </p> <pre><code>apt-get install zbar-tools </code></pre> <p>and that seemed to work.</p> <p>I tried to run basic example code that starts with:</p> <pre><code>#!/usr/bin/python fr...
0
2,782
Any openssl command line to verify ECDSA prime256v1 certificate and private key match?
<p>I'm now testing the hyperledger/fabric/core/comm/testdata/certs/generate.go to get the ECDSA prime256v1 certificate(Org1-cert.pem) and private key(Org1-key.pem). I want to use a openssl command line to test if the Org1-cert.pem mathes the Org1-key.pem, but don't know how? Any help appreciated. I've used the command...
0
2,070
keeping a java socket open?
<p>i'm making a program/game that will update automatically. i have the update part down, but not the checking of the version. i would have thought that it'd be pretty easy. heres what i've done. i wrote an updater for the game, and i wrote a server. the server starts a thread every time a client/updater connects. the ...
0
2,559
Maven, Access denied to: http://repo1.maven.org/maven2
<p>I have just downloaded last version of Maven.</p> <p>And when i am trying to run</p> <blockquote> <p>mvn archetype:generate</p> </blockquote> <p>i get error message</p> <blockquote> <p>[WARNING] Error reading archetype catalog <a href="http://repo1.maven.org/maven2" rel="nofollow noreferrer">http://repo1.m...
0
2,156
Vue warn: Unknown custom element: <myCompont> - did you register the component correctly?
<p>I'm a freshman, when i use use custom components, it gives me this error:</p> <blockquote> <p>Vue warn: Unknown custom element: - did you register the component correctly?</p> </blockquote> <p>The <code>ModalBase</code> compontent used in the components <code>NoticeModal.vue</code> and <code>NoticeModal</code> com...
0
1,062
tomcat7-maven-plugin: run multiple webapps but port 8080 already in use
<p>I'm trying to use <code>tomcat7-maven-plugin</code> to setup an embedded tomcat container, run webapps in <code>pre-integration-test</code> phase, run integration tests, then shutdown tomcat in <code>post-integration-test</code> phase. The project is a multi-module maven project (contains <code>app1</code>, <code>ap...
0
2,233
Why does GCC generate 15-20% faster code if I optimize for size instead of speed?
<p>I first noticed in 2009 that GCC (at least on my projects and on my machines) have the tendency to generate noticeably faster code if I optimize for <strong>size</strong> (<code>-Os</code>) instead of speed (<code>-O2</code> or <code>-O3</code>), and I have been wondering ever since why.</p> <p>I have managed to cr...
0
3,565
Can't install Python 3.10.0 with pyenv on MacOS
<p>Trying to install Python 3.10.0 on MacOS 11.6 (Intel) with pyenv 2.1.0 (from homebrew) fails with:</p> <pre><code>python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Downloading Python-3.10.0.tar.xz... -&gt; https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tar.xz Installing Pyt...
0
12,598