title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
How to use "display: none;" on a span element which is inside a title attribute?
<p>Im using the social-share-button gem to share blog post on social media. I have internationalized the website meaning the website is bilingual (english and german). Everything works fine but I have an issue on the social share buttons if I switch to german: </p> <p><strong>show.html.erb</strong></p> <pre><code>&lt...
2
1,210
MQTT receiving message from topic
<p>i'm writing a program that receiving message from MQTT broker The server get ID from client and make it become name of topic: topic1, topic2 for examples. Then when subscribe, the server pass the topic's name and then read message from that topic. This is my server:</p> <pre><code>public class AnalyticServer { ...
2
2,549
valgrind output in C++ of "still reachable" and "possibly lost" blocks do not reference my sources
<p>I am having a hard time pinpointing where do I get memory leaks in my code.</p> <p>The valgrind command I run:</p> <pre><code>valgrind --leak-check=full --log-file=vg1.log --show-leak-kinds=all --leak-resolution=low --track-origins=yes --leak-check-heuristics=all ./enalu_dbg </code></pre> <p>and the output </p> ...
2
3,223
Deploying a specific image tag in OpenShift Origin from image stream
<p>I have configured my Gitlab CI pipelines so that they build an OCI image with Docker-in-Docker and upload it to Gitlab's own registry.</p> <p>Now, I want to deploy images built in my CI pipelines to OpenShift Origin. All images in the registry are tagged with <code>$CI_COMMIT_SHORT_SHA</code> (i.e.: I do not use "l...
2
1,599
Dynamically add new options to existing custom autocomplete
<p>How could I dynamically add a <code>label</code> to existing categories in jQuery UI custom autocomplete? I have made a custom <code>autocomplete</code> like <a href="https://jqueryui.com/autocomplete/#categories" rel="nofollow">described here (jQuery UI docs for autocomplete)</a>:</p> <pre><code>&lt;html lang="en"...
2
1,156
How do I get the eclipse-jetty plugin to scan for and recognize websocket classes?
<p>I'm attempting to start a simple java maven webapp from eclipse Indigo containing only one class, a basic annotated websocket. I would like annotation scanning to identify and register the class automatically using the sourceforge eclipse-jetty <a href="http://sourceforge.net/projects/eclipse-jetty/" rel="nofollow"...
2
1,169
Mechanize open function giving BadStatusLine: ' ' error
<p>I wrote this script to download the lyrics for my songs and store them in a text file :</p> <pre><code>&gt;&gt;&gt; lis = os.listdir('D:\Phone\Sounds') &gt;&gt;&gt; for i in lis: print i br.open('http://www.azlyrics.com/') # THE PROBLEM br.select_form(nr=0) track = eyed3.load(i).tag if(track.a...
2
1,940
React-Native: Android https images not showing on release
<p>I've been facing a problem for several weeks, which I still can't solve.</p> <h1>Summarize</h1> <p>I have an application developed with react native. This one loads images from the backend at various places, these images are accessible via an https url and everything works very well in development, whether on simula...
2
6,720
AppBarLayout hiding toolbar on scroll behavior, switching fragments
<p>I've implemented a <code>CoordinatorLayout</code> and wrapped my <code>Toolbar</code> inside an <code>AppBarLayout</code> so that the toolbar hides itself when scrolling. Most of the app consists of Fragments that are swapped in and out of the <code>@id/container</code> FrameLayout as seen below. Some of the Fragmen...
2
1,541
in_array() doesn't work as expected with associative array
<p>I don't know what's causing this issue, but I'll post the code below then go through what I've done so far and the results I've gotten.</p> <pre><code>$client_emails = array( 'email@ex-one.com' =&gt; null, // first array entry 'email@ex-two.com' =&gt; 'page_two', 'email@ex-three.com' =&gt; 'page_three...
2
1,237
Unable to receive data from serial port
<p>Currently I try to write a serial port communication in VC++ to transfer data from PC and robot via XBee transmitter. But after I wrote some commands to poll data from robot, I didn't receive anything from the robot (the output of filesize is 0 in the code.). Because my MATLAB interface works, so the problem should ...
2
1,064
Android volley login registration with password confirmation
<p>I'm currently found a problem in my android registration process, the validation seems not working fine. What i mean is that, when there is a blank field, and click register, it straight registered on my database with blank field. I'm not sure what causes it, i hope someone can help me. Below is my android java + ph...
2
5,172
Notification system in PHP
<p>I am building a responsive website same as social networking I have 4 tables <code>checkin</code> <code>friend</code> <code>post</code> <code>notification</code> </p> <p>Here is structure of <code>notification</code> table</p> <pre><code> Notification id user_id activity_type source_id created_date ...
2
1,120
Azure Pipelines YAML - dotnet nuget push fails with unexpected token error
<p>Setting up my first YAML pipeline I have an odd error when pushing my package to our internal Az DevOps feed.</p> <p>Here's the relevant lump of YAML.</p> <pre><code>- task: DotNetCoreCLI@2 displayName: 'Push this package to the feed' inputs: command: 'push' nuGetFeedType: 'internal' packagesToPush...
2
1,066
Android image loading in listview
<p>In my Android application an Asyntask is used for loading images from web in a list view.I want to show the center portion of the image and I have tried imageloader for loading images but the problem is image clarity is very poor but I have used it for loading thumbnails because thumbnail is very small.So that I hav...
2
1,213
Project Naming Convention Feedback Please
<p>I am creating a ASP.NET MVC 3 application using Entity Framework 4. I am using the Repository/Service Pattern and was looking for feedback.</p> <p>I currently have the following:</p> <p>MVC Application (GTG.dll)</p> <ul> <li>GTG</li> <li>GTG.Controllers</li> <li>GTG.ViewModels</li> </ul> <p>Business POCO's (GTG....
2
1,205
captcha validating in sign in page using Java code
<p>I have trying to login in the page with captcha in JSP and Servlet code using the google recaptcha code. I am getting the error as "Recaptcha V1 is shutdown" as follows:</p> <p><a href="https://i.stack.imgur.com/oK9EF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oK9EF.jpg" alt="enter image des...
2
1,306
ViewModel when implementing Room in Foreground Service
<p>I currently have an app with a ForegroundService for all server/API interactions, and a Room database for local persistence. I have been trying to implement an AndroidViewModel to help with data persistence and quick UI refreshes. </p> <p>However, as per the documentation, <a href="https://stackoverflow.com/questio...
2
1,370
Azure Devops Oauth authentication: Cannot get access token (BadRequest Failed to deserialize the JsonWebToken object)
<p>I'm trying to implement an OAUth 2.0 flow for custom webapplication for Azure Devops. I'm following this <a href="https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/a...
2
2,070
npm start error with create-react-app with react script version : "4.0.1"
<p>i create a react app it installs like normal i use the npx command for that. It is latest version of react &quot;17.0.1&quot;, and react-scripts 4.0.1 in window 10. find the error log.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre...
2
1,681
jQuery Timepicker - change the [hourMax] value based on the day selection
<p>I'm quite new to javascript and jQuery.</p> <p>What I have so far works nice but I now need to change the [hourMax] value based on the day selection. Mo-Thu will be 18, Fridays has to be 16 - I suspect the issue could be the function timemax(date). Also I need to remove the “Now” button.</p> <p>How can I do this? ...
2
1,047
Convert float NumPy array to big endian
<p>I wrote a script and in the end I need to convert this array which is in type float64 to big endian int (>2i):</p> <pre><code>[[ 0.92702157 1.03092008 0.9072934 ..., 0.71617331 1.02524888 1.07284994] [ 0.99573712 0.96416766 0.9230931 ..., 0.66935196 0.64930711 0.5357821 ] [ 0.98846306 1.03608056 0.7...
2
1,142
Denoising audio playback with pyaudio
<p>I'm writing a vocoder in Python for Raspberry Pi, something to change voice to be unrecognizable. I record audio and do a playback in real time with callback function - it works. Now I need to denoise the input, represented as a Numpy array (NOT .wav file like most tutorials and posts on SO do!). I've tried using se...
2
1,153
NodeJS, Express, how to update client side to display uploaded file
<p>I am a beginner when it comes to nodeJS, AJAX requests, and routing. I followed the tutorial here <a href="https://coligo.io/building-ajax-file-uploader-with-node/" rel="nofollow noreferrer">nodejs, express example</a>, and everything is working server-side. I cannot for the life of me however figure out how to disp...
2
2,536
How can i implement doPost() and doGet() request in the same servlet using ajax?
<p>I am doing a small project on jsp servlet.I want an example to implement doGet() and doPost() methods using same servlet and sending and posting via an ajax call in forms in a jsp page.</p> <p>Also specify why it is not recommendable to use doGet() and doPost() in the same servlet.How to implement the same using t...
2
1,330
Is it possible to create a reducer with dynamic states?
<p>React Application 16+, redux. </p> <p>I have <code>bookRoom</code> component in <code>bookRoom.js</code> which is used to render single rectangle(which represents room) with number, as on the screenhot below. </p> <p><strong>sample render</strong> <a href="https://i.stack.imgur.com/rGNKx.png" rel="nofollow norefer...
2
1,314
Jquery assign different id to form based on button click dynamically
<p>I have a comment form with reply button down to each comments.</p> <p>reply form has initially <code>display:none</code> when the page is loaded, the reply button will trigger to brings up the form (reply_form) when it was clicked:</p> <p><strong>reply form:</strong></p> <pre><code>&lt;div class="reply_form" styl...
2
1,956
Check for duplicate entry validation
<p>I have asked a similar question to this on here using MySQL, PHP and jQuery but I am now implementing a site in C#.NET and am using the built in ASP.NET Validation.</p> <p>In my user registration, I want to validate (using ajax, not after the form submit) that the users email is unique, i.e. I want to perform a sql...
2
1,451
python 3.9: Error upgrading pip from 22.0 to 22.0.2
<p>When trying to upgrade pip I receive below errors.</p> <pre><code>C:\Windows\system32&gt;py -m pip list --outdated Package Version Latest Type ------- ------- ------ ----- pip 22.0 22.0.2 wheel </code></pre> <p>Upgrading:</p> <pre><code>C:\Windows\system32&gt;py -m pip install --upgrade pip Requirement alread...
2
1,366
Why am I getting "network request failed" error?
<p>I'm trying to insert data into my MySQL database but I'm getting an error that says "Network request failed" on my simulator. I'm guessing <code>fetch()</code>'s it has something to do with my systems IP address (even though I entered the right one).</p> <p>The <code>App.js</code> file is my React Native code. The...
2
1,942
How to add custom seekbar in html5 video
<p>i am working on webapp. In this webapp i want add a seek bar, volume, current time/total time,play/pause, and a timer (time should start when the video is playing and should pause, video is paused) in this webapp i just want to calculate the total number to sec. video is played by user. thank you in advance.</p> <p...
2
1,145
Constructor undefined in custom adapter
<p>I made a custom adapter following this tutorial here:</p> <p><a href="http://www.ezzylearning.com/tutorial.aspx?tid=1763429" rel="nofollow">http://www.ezzylearning.com/tutorial.aspx?tid=1763429</a></p> <p>I changed my custom adapter to match my classes and need to look like this:</p> <p>package com.example.beerpo...
2
6,061
entity has no primary key attribute defined : JPA
<p>i am using Eclipse neon.i am new to JPA. i always getting this error. please help to fix this.</p> <p>below is my POJO class</p> <pre><code>package myJPA; import java.io.Serializable; import javax.persistence.*; import java.util.Date; /** * The persistent class for the user_online database table. * */ @Ent...
2
1,092
How to properly databind a gridview?
<p>So i have a page that contains a gridview, the girdview obtains it's data from an objectdatasource via web service. It contains 2 columns with itemtemplates. for each of these templates when in edit mode, contain dropdownlists which are stored under edititemtemplates. </p> <p>Everything seems to work fine, except w...
2
8,064
Faster performance with TIFF rendering in Java with JAI
<p>I have been working on software that analyzes microscopy data, which is stored as a multilayer tiff file. After looking through StackOverflow and through the JAI documentation, I hobbled together some code to store the tiff stack and render it correctly.</p> <p>However, it suffers from some pretty bad performance. ...
2
1,285
CodeMirror and JQuery tabs
<p>I have a problem with the jquery tabs and codemirror. By doing some searching here it was recommended to me to do call the codemirror refresh method on loading the tabs but unless I click on the area it remains hidden. Attached is sample html and script</p> <p>Any ideas?</p> <pre class="lang-js prettyprint-overrid...
2
1,231
Public Key Error WCF Client
<p>I am working on a WCF service. It is hosted in IIS and secured by SSL. I am using custom biding with Soap11. I have a private key for this service and it is referenced in the web.config file. I have exported the public key from the private key and plan to give this public key to a vendor who will call this service. ...
2
1,154
opcv videowriter, i don't know why it does'nt work
<p>I've just written a first program for videocaptur and videowriter. I copied the source from the wiki and changed the only video file name, but it made error. </p> <p>Here is the source from the wiki.</p> <p>The opencv is 2.1 and the compiler is visual c++ 2008 express.</p> <pre><code>#include "cv.h" #include "hig...
2
1,095
Image download from firebase storage
<p>I want to download an image file from firebase storage. But when I am clicking on download button it gives me an error that "failed to download the file from <a href="http://myimagedownloadlink" rel="nofollow">http://myimagedownloadlink</a>"</p> <p>This is my download button code</p> <pre><code> downloadbtn...
2
1,780
How to get started on using Bottle-Cork with MongoDB?
<p>I am pretty new to Bottle and Cork. I am working on a web app using Bottle as the framework and MongoDB as the backend. I am trying to figure out how to implement a user-login system using Cork. </p> <p>I read documents and examples of Cork, and I tried to set things up. I have successfully hooked up the cork insta...
2
1,044
C++ Dynamic Dispatch without Virtual Functions
<p>I've got some legacy code that, instead of virtual functions, uses a <code>kind</code> field to do dynamic dispatch. It looks something like this:</p> <pre><code>// Base struct shared by all subtypes // Plain-old data; can't use virtual functions struct POD { int kind; int GetFoo(); int GetBar(); ...
2
1,145
material ui modal slow and even crash
<p>I'm using Reactjs to create a table, the thing I want to do is every time I click one of the rows in the table, a modal will pop up and ask me if I want to print this row. I have added a modal using material-UI dialog, but it performs really bad, it's responded slowly and after a few click it will freeze the app and...
2
4,787
Knight Tour C++
<p>I am trying to solve Knight Tour Problem using recursive Backtracking. Can someone help me optimize my code. My code works till 6X6 board. . After N=7 it takes almost infinite time to solve . Here is my code :</p> <pre><code>#include &lt;iostream&gt; #include "genlib.h" #include "grid.h" #include "vector.h" #includ...
2
1,508
Why is this AngularJS ng-repeat example not working?
<p>Sorry for asking this. But I searched everywhere and I can't understand why this example is not working:</p> <p>HTML:</p> <pre><code>&lt;div ng-controller="VenuesController"&gt; &lt;div ng-repeat="field in fields"&gt; &lt;!-- Table --&gt; &lt;table class="table"&gt; ...
2
3,332
Creating a search tab which searches a text file in Android Studio
<p>Im trying to create an android app with two tabs. One tab will search for data then display it in a listview, when you select one item there it will redirect you to another tab showing the full item (more like a dictionary,showing a list of words and when you click a word it will show you the full meaning of a word ...
2
6,220
DialogPreference force close
<p>For a school project, I'm building an application using <code>PreferenceScreen</code>s as a framework.<br> I've created 2 new classes to suit my needs: <code>SeekBarDialogPreference</code> (designed to handle volumes and brightness) and <code>DigitalPreference</code> (for everything else).</p> <pre><code>class Seek...
2
2,334
Need crash dump translation
<p>The following is a crash dump I get which is resulted from an Java application crash. Does anyone have any idea of how to get around this situation? I can't get much out of this. It could be due to my limited experience.</p> <pre><code># # A fatal error has been detected by the Java Runtime Environment: # # EXC...
2
11,380
Ruby mechanize over SSH tunnel Socks5 proxy?
<p>I'm trying to get mechanize to go over a SSH tunnel SOCKS5 proxy. Some reason it keeps getting an error during the HTTP requests. Like it's getting an EOF before it should. If I turn off the proxy setting it works, I'm not sure why it would be receiving multiple connection requests from the proxy.</p> <p>What might...
2
1,813
Syntax for HTTP methods in same def using Swagger
<p>I am new to SwaggerUI. In my python code, I have an API called 'work' which supports POST, PUT and DELETE HTTP methods.</p> <p>Now I want to create Swagger Documentation for the same. I am using the following code:</p> <pre><code>@app.route('/work', methods=['POST', 'PUT', 'DELETE']) def work(): """ Micro Serv...
2
1,594
Java audio crackling
<p>When I am playing the audio on my Java desktop application, the sound begins to crackle and fuzz out. I don't know why, any suggestions? I am working on a Pokemon fan game.</p> <pre><code>static AudioInputStream audio = null; public static boolean change = false; static Clip clip = null; public static void music() ...
2
1,230
How to remove the attribute style of multiple tags using jQuery?
<p>this is my problem...I'm trying to copy the code from below this is the code:</p> <pre><code> &lt;div class="modalMask" id="ventana_factura_1"&gt; &lt;div class="modalContent"&gt; &lt;p style="text-align: right; color: red;" class="mini-1"&gt;Folio: 1&lt;/span&gt;&lt;span&gt;Serie: A&lt;/span&gt;&lt;/p&...
2
1,859
Javafx ExceptionInInitializerError
<p>The previous posts that I have seen haven't worked for me. Is the error because I haven't used any fxml loader. But it didn't work in any fxml file. Can you help me find the error and link me some resources to better understand all the errors similar to this. I keep getting similar errors. Thanks in advance.</p> <p...
2
3,363
Nesting data using D3.js (heatmap)
<p>So I am new to working with Javascript (especially the D3 library) and I am trying to do something not unlike the following example: <a href="http://mbostock.github.com/d3/talk/20111116/iris-splom.html" rel="nofollow">http://mbostock.github.com/d3/talk/20111116/iris-splom.html</a>. In my case though each cell is th...
2
1,440
Using accordion and "sexy combo" plugin
<p>I am pretty new and got a following problem... </p> <p>case: </p> <p>We got an accordion and within this accordion we got an sexy-combo-box </p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /&gt; &lt;script src=...
2
1,916
Flex token order
<p>I am having problem to declare the following tokens in flex: >, &lt;, >=, &lt;= >>,&lt;&lt;, >>=, &lt;&lt;=.</p> <p>I declared like this: (flex)</p> <pre><code>ID [_a-zA-Z][_a-zA-Z0-9]* "&gt;" { ultimo_token = "&gt;"; return BT_OP; } "&lt;" { ...
2
1,618
Ninject.ActivationException was unhandled by user code
<p>I'm stuck on this problem for the last 2 days, what I want to do is prevent creating an instance of DisplayWeatherAstronomy, I thought it was fixed last night with the help of Tadmas on another thread, but I ran into a problem with Ninject.</p> <p>So I modified my code and turned my class into an abstract class usi...
2
2,370
Pop-up js dialog box onclick table row and display php information
<p>I have a php site that displays table information from MySQL DB. I created a js that will pop-up upon clicking the row table. The problem is it will only function on the first row and nothing for the rest of it. And also I wanted to display the captured information from the row where it was clicked to the popup/dial...
2
1,137
How to debug an ApolloServer's context function?
<p>I'm trying to follow the GraphQL tutorial (<a href="https://www.apollographql.com/docs/tutorial/resolvers/" rel="nofollow noreferrer">https://www.apollographql.com/docs/tutorial/resolvers/</a>), but I'm getting an error in the playground when I try to book a trip, with a stack trace starting like this:</p> <pre><co...
2
1,028
Invokespecial Verify Error: Type is not assignable
<p>I've modified the line 15 of the bytecode below and changed it form invokevirtual to invokespecial (JAVA 8). Unfortunately I get a verify error ( Bad type on operand stack)</p> <p>I know that the value of the operand stack must be a subclass of the class specified in the objectref but in this case #18 is Type and n...
2
1,199
Multiple bluetooth socket connect/close operations reboot android phones
<p>We are using android phones to communicate with sensors via bluetooth. The phone needs to connect the sensor periodically to collect physiological data and between two connections the sensors can be switched off automatically to save power. </p> <p>Now the problem is: after around 500 times, the system reboots. We ...
2
4,698
I want to do peer to peer video Chat through webRTC by using pure javaScript
<p>I am new to webRTC i made a code for video Chat it is successfully executing by I don't want to use scaledrone.I want to use pure JavasCript. How will i do it please help me </p> <p><strong>html and css</strong></p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta name="viewport" cont...
2
2,047
Flutter [firebase_messaging] IOS Build Error
<p>I have a problem with Firebase Messaging (<a href="https://pub.dev/packages/firebase_messaging" rel="nofollow noreferrer">https://pub.dev/packages/firebase_messaging</a>). I can't build in IOS after add this to project.</p> <p>I tried:</p> <pre><code>flutter clean flutter precache pod deintegrate pod setup pod i...
2
9,804
Android Layout for a bordered-table containing bordered TextViews
<p>I want to create 5 equally sized outer squares across the top of the screen, side-by-side. Each outer square should contain 3 equally sized mini squares, side-by-side, across the top of each outer square. Each of the 3 mini squares are TextViews.</p> <p>The outer squares and the inner squares each need a border, wh...
2
1,126
How to handle activity lifecycle events for Mapbox Map in Jetpack Compose?
<p>in the official documentation for Mapbox SDK for android there is a simple example of map using standard UI library for Android. Full documentation for completeness of the question can be found <a href="https://docs.mapbox.com/android/maps/guides/install/" rel="nofollow noreferrer">here</a>.</p> <p>The code mentione...
2
1,724
java.lang.IllegalArgumentException: setShowActionsInCompactView: action 1 out of bounds (max 0)
<p>I am building media style notification for a radio app in android. Here's my code for notification :</p> <pre><code>NotificationCompat.Action action = new android.support.v4.app.NotificationCompat.Action.Builder(imgNotificationAction, "playPause", pendingIntent).build(); //create new notification Notificati...
2
2,449
Jquery - Autocomplete combobox - live()?
<p>I have a couple of autocomplete comboboxes in a div.<br> I have to cut it and put in into another div on some action. Upon doing so, it does not copy the events of autocomplete.</p> <p>I am aware of .live() that keeps events binded to elements all the time. But how to use .live for this autocomplete combobox widge...
2
4,724
Webpack Hot Module Replacement + React
<p>Probably it's one of thousands of similar questions, but I still didn't see any answer about how to make HMR <strong>REALLY</strong> work.</p> <p>I did all that manipulations, described in <a href="https://webpack.js.org/guides/hot-module-replacement/#enabling-hmr" rel="nofollow noreferrer">docs</a> and in every an...
2
1,365
Jquery calendar and tab sliding div clash
<p>Hey all, I am trying my best to figure out another way around this problem I seem to have encountered. On my website I have a jquery calendar and also a jquery div tab slider (this: <a href="http://www.queness.com/resources/html/tabmenu/jquery-tabbed-menu-queness.html" rel="nofollow noreferrer">http://www.queness.co...
2
1,332
X11 How to restore/raise another application window using xcb?
<p>I am writing a window list into my C application that shows all of the top level windows, including shaded, minimized, and on other desktops. I would like to restore unmapped (minimized) windows, raise the window, and switch to the window's desktop/workspace when one is selected.</p> <p>I had written something to ...
2
1,667
ScrollView to the left of the screen in qml
<p>I am trying to put scrollview to the leftside of a ListView in qml </p> <pre><code>import QtQuick 2.0 import QtQuick.Controls 1.4 Item { width: 1580 height: 687 Rectangle { anchors.fill: parent color: "Gray" } ListModel { id: phonecontactsModel Lis...
2
2,573
Azure Function Converting v1 to v2 DotNetStandard 'AzureWebJobsServiceBus' is missing or empty
<p>Sorry for the long post I just wanted to provide all the information I could and address questions before they come up.</p> <p>Working on converting an Azure Function v1 .NET Framework 4.6.1 to a DotNetStandard 2.0 for the Dependency Injection extension. At runtime I get an exception in the Console that reads an er...
2
1,616
Using relative redirect in spring boot fails
<h1>Scenario</h1> <p>I have an spring-boot application which is accessed using context instead domain root:</p> <ul> <li>domain root : <a href="http://app.com" rel="nofollow noreferrer">http://app.com</a></li> <li>my app : <a href="http://app.com/organization_a" rel="nofollow noreferrer">http://app.com/organization_a...
2
1,446
Why is the Body Onload not work with function
<p>I don't why this is happening and it probably just a basic mistake but my <code>body</code> is able to call a function because:</p> <p><code>Uncaught ReferenceError: changeImg is not defined</code></p> <p>Here is my relevant PHP/HTML:</p> <p><code>&lt;?php print("&lt;body onLoad='javascript:changeImg(year_" . $p_...
2
1,051
How to change pages on form submit with React?
<p>I have a registration form set up that is correctly sending data to my back-end on submit, but I can't seem to get the page to change when my handleSubmit function is called. </p> <p>My <code>register.js</code> component</p> <pre><code>import React from 'react'; import useForm from '../form/useForm'; import {Brows...
2
2,783
Laravel/Ardent - on save(), error: Relationship method must return an object of type Illuminate
<p>I'm having some trouble getting my Laravel relationships to work out. In my application, there is a one-to-many relationship between users and ideas. (A user may have multiple ideas.) I'm using Ardent. </p> <p>Here's my User model:</p> <pre> use Illuminate\Auth\UserTrait; use Illuminate\Auth\UserInterface; us...
2
1,488
'Memory stream is not expandable' but size of array is the same?
<p>I am trying to multithread AES in C# but I can't seem to fix this weird exception. My buffer sizes are exactly the same but it still says it can't expand maybe you can see the error this is for a file of size 101 bytes.</p> <p>In the while loop it will skip if and go inside the else creating (one thread?) that writ...
2
2,146
Using react-redux connect method in react-navigation show error "The component for route 'x' must be a React component
<p>I am using react-redux to connect redux to my react-native project, but when I use <code>export default connect(state =&gt; ({ count: state.count }))(Test) </code> method and importing to react navigation as <code>creactStackNavigator({test:Test})</code> it shows </p> <pre><code>The component for route 'test' must ...
2
1,202
Deploying a Django App to App Engine Flexible Environment
<p>I am trying to deploy a <a href="https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/flexible/django_cloudsql" rel="nofollow noreferrer">sample app</a> to the Google App Engine Flexible Environment based on <a href="https://cloud.google.com/python/django/flexible-environment" rel="nofoll...
2
1,067
Simple calculations in an MVC ASP.NET Database First Environment
<p>Hi there fellow coders, </p> <p>I'm pretty new to ASP.Net MVC and I'm finding it difficult to figure out how to do calculations using data from different entities. </p> <p>So I have 3 tables with their corresponding attributes:</p> <p><strong>Presenter</strong></p> <ul> <li>Name</li> <li>MinimumWage</li> <li>Tax...
2
1,908
Array of nested attributes given as a hash parameter
<p>I get an xml file which I have to parse. From it I take data for 2 models. Product and Attachment. An attachment is an image for product. This is how the code goes, I will follow it by an explanation: </p> <pre><code>def add_to_db_from_file transaction do save! xml = Nokogiri::XML(File.open(se...
2
1,130
Magento: object->save() does not insert to database
<p><code>model-&gt;save()</code> does not insert to database. Magento cache turned off.<br> I did not receive any issue, that is ok, but it does not insert to database.<br> My code below:</p> <pre><code>try { $cusSite = Mage::getModel('themeeditor/customersite'); $cusSite-&gt;setData(array("custome...
2
2,166
session does not save after fetch post request with express
<p>Im making a post request with fetch and saving a token to session in an express api backend. However, the token wont be saved in the session even though i set <code>credentials</code> to <code>include</code> in fetch. Can anybody identify the problem for me? Thanks.</p> <p>sending token to api server:</p> <pre><co...
2
1,146
Display message after countdown
<p>I have currently created a countdown timer using javascript. I want to display a message right after the countdown finishes. So, how do I display that text message if the countdown finishes?</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code...
2
1,044
Update state from inside a PanResponder
<p>I am making an app using react-native-svg and I am having trouble to update the component's state from inside a PanResponder. </p> <p>I have a &lt; Svg > element with a &lt; Circle > in it. The &lt; Circle >'s position is relative to a variable called originCoords (a state variable). I have used the PanResponder to...
2
1,168
How to configure amazon s3 client for multi region in .net core?
<p>I have asp.net core application. Given S3 urls, the application needs to download file. These S3 urls may belongs to different AWS regions in the US. </p> <pre><code> public class Downloader { public void DownloadFile(string s3Url, string destFolder) { //download files } } </code></...
2
1,960
Microsoft JScript runtime error using window.location in IE8
<p>I'm having a weird error in my code. I'm getting an error: Microsoft JScript runtime error: object doesn't support this action. I'm using fullcalendar and on an event click I want to open the even details in the same window. Oddly enough, this works fine in Chrome. I also want to note that on an XP system it works...
2
1,978
django channels websocket closes during handshake
<p>I'm trying to integrate a simple chat room into my current website project using this tutorial from the <code>channels</code> readthedocs <a href="https://channels.readthedocs.io/en/latest/tutorial/index.html" rel="nofollow noreferrer">https://channels.readthedocs.io/en/latest/tutorial/index.html</a></p> <p>When I t...
2
1,318
Minimal implementation of JavaFX TextInputArea
<p>I'm investigating the best way to write a rich text editor in JavaFX - don't mention the HTMLEditor to me: we've spent literally months hacking at it and I could write reams about why it isn't suitable for our purposes! Choice at the moment is to extend AnchorPane and do all of the layout, navigation etc. from scra...
2
1,250
How to use maven-exec-plugin for npm clean?
<p>I am using exec-maven-plugin. I have extensions for npm install and npm clean. Below is my plugin section in the pom file. It contains extension for npm install , tsc run and npm clean. </p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;exec-maven-plugin&lt;/ar...
2
1,154
Convert custom adapter to use generics in Java
<p>I have a Adapter in my Android app and I want to make it Generic.</p> <p>Basiclly the Adapter looks like that:</p> <pre><code>public class myAdapter extends FragmentStatePagerAdapter { DataTypaA myFragment; DataTypeB data; DataTypeC items; public myAdapter(FragmentManager fm, DataTypaA fragment) { data =...
2
1,175
Compilation error while running a spring boot application
<p>I have a Spring boot application which is not running in intellj and even if this application runs in eclipse I always have to move the "Jre library" in the build path up to the top and then run mvn install.</p> <p>The entire code can be found at - <a href="https://github.com/iftekharkhan09/SpringCaching.git" rel="...
2
3,035
Spring MVC : unable to display drop down
<p>I am not getting the drop down value in Profession. Actually I am getting exception</p> <pre><code>javax.servlet.ServletException: Type [java.lang.String] is not valid for option items org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848) org.apache.jasper.runtime.PageCo...
2
3,408
application crashes when trying loadLibrary(), issue with pthread_create on 4.1.1?
<p>I am trying to debug a crash with trying to load a library that I cross-compiled using System.loadLibrary(). I have been able to successfully load this library on any device running 4.0.4 (ICS), but it crashes on all of my devices running 4.1.1 (JB). It seems to crash when running in to pthread_create() in libc:</...
2
3,277
Full Text Search API for App Engine (Java)
<p>I have been trying to use the experimental Search API for the Google AppEngine. I am using SDK 1.6.6. So far, I could add entries to an index and search it in my development environment. When I deploy my application, I can still add entries to the index, but when I try to perform a search, I get the following except...
2
2,681
TicTacToe Problems
<p>I am stuck on my tictactoe problem. Define a calss called TicTacToe. An object of type TicTacToe is a single game of TicTacToe. Store the game board as a single 2d array of base type char that has three rows and three columns. Include methods to add a move, display the board, to tell whose turn it is, to tell whethe...
2
1,190
Change innerWidth and innerHeight to custom size THREEjs
<p>When I launch the code below it automatically calculate the height and width. Is there any way I can set the window where the function launches in to a custom size? </p> <p>I tried changing this part of the code but no luck so far: </p> <pre><code>renderer.setSize(window.innerWidth, window.innerHeight); </code></p...
2
1,296
Async fetch in loop
<p>I have an asynchronous operation, fetching an array of items:</p> <pre><code>Base.find({ creatorId: req.params.id }) </code></pre> <p>Each item in that array has an ID, with which I need to perform a fetch of messages and users for that item. For that I need a loop:</p> <pre><code>Base.find({ creatorId: req.para...
2
1,327
Wordpress - Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING)
<p>I have the following error with Wordpress using Woo-Commerce and Storefront theme.<br><br> Error is - Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING)<br><br> Can anyone help?<br><br> This is the standard code from the theme. No edits. It just started to not work.</p> ...
2
1,436
Powershell Speed Up Get-MessageTrackingLog
<p>Currently I am trying to get an output of all disabled users and their message counts in exchange. This is easy enough through a foreach loop:</p> <pre><code> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://aserversomewhere.local/PowerShell/ -Authentication Kerberos -Credenti...
2
2,419
How to sort RecyclerView elements with different types?
<p>I have a problem with sorting <code>RecyclerView</code> items with different types. For example i have such <code>RecyclerView.Adapter</code>:</p> <pre><code>public class StudyRVadapter extends RecyclerView.Adapter&lt;RecyclerView.ViewHolder&gt;{ private List&lt;Item&gt; data; public RVadapter(List&lt;Item&gt; sr...
2
1,219