title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
Converting factor to integer | <p>Converting factor to integer from a .csv using RStudio.</p>
<p>Hi, I know this question has been asked frequently but I've been trying to wrap my head around things for an hour with no success.</p>
<p>In my .csv file 'Weighted.average' is a calculation of Weighted.count/count (before conversion), but when I use th... | 3 | 1,503 |
How to create a new column with values from previous row in exsisting column, in a tibble, in R | <p>I want to create a new column, that consists of the last value from a previous period for the same ID, placed in the same row as the first value for the next period. If there is no previous period NA should be applied.</p>
<p>However, I can't find any functions in any packages to solve this issue for me, so I expect... | 3 | 1,745 |
SwiftUI how to make hstack with rounded corners and above bottom side of screen? | <p>I would like to make such buttons bar:</p>
<p><a href="https://i.stack.imgur.com/9lDly.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9lDly.png" alt="enter image description here" /></a></p>
<p>for this purpose I decided to use hstack (not sure whether it is a good idea). I did it in such way:</p... | 3 | 1,866 |
how to fill the container with background image in css? | <p>so as you can see I have used a background image for my Container but it isn't filling up the container fully, I have tried the object-fit property but it isn't working, the image is still sticking on the left side of the container, what should I do.</p>
<p>here is the screenshot for the image (1st problem): <a href... | 3 | 5,741 |
Unbox + Realm native "List" object | <p><strong>Update</strong></p>
<blockquote>
<p>Finally author of the <code>Unbox</code> library answer my question.
<a href="https://github.com/JohnSundell/Unbox/issues/156" rel="nofollow noreferrer">https://github.com/JohnSundell/Unbox/issues/156</a></p>
</blockquote>
<hr>
<p>I'm trying to use <code>Unbox</code... | 3 | 1,299 |
pyrebase4 AttributeError: 'function' object has no attribute 'sign_in_with_email_and_password' | <p>I couldn't make a login screen with pyrebase4. I'm getting this error:</p>
<blockquote>
<p>AttributeError: 'function' object has no attribute
'sign_in_with_email_and_password'</p>
</blockquote>
<p>Creating user is also not possible and it gives the error:</p>
<blockquote>
<p>AttributeError: 'function' object has no ... | 3 | 1,420 |
Formatting authentication request object from VueJS properly | <p>I have a VueJS/Vuex frontend consuming an express/postgres api. </p>
<p>In Postman, both registration and login work with a request like:</p>
<pre><code>{ "user": { "email": "user@gmail", "password":...}}
</code></pre>
<p>From the Vue app, registration works as expected, but for login, instead of sending a reques... | 3 | 3,499 |
Fun with US and UK dates on a new server | <p>I have just had the task of moving an old ASP website / SQL DB to a new dedicated OVH server (French - all defaults set to US-Eng).</p>
<p>The DB has moved from SQL 2005 to SQL 2012 (web edition 64 bit).</p>
<p>I am having the old issue of date formats showing up as US format on the website e.g <code>8/3/2016</code>... | 3 | 1,325 |
mongodb GeoJSON coordinates must be an array | <p>There's a requirement to search some locations in a given region. And here is an example of my test data in mongo:</p>
<pre><code>{
"_id" : "insititution_NPqTrcysjKV",
"phone" : "18080808088",
"name" : "Insititution 1",
"address" : "xxxxxxxxx... | 3 | 1,047 |
Android Studio loses files after git branch change | <p>As the title says, Android studio loses/removes project directories on branch change. This happens for the same branch every time. It's a flutter project, repository is hosted on github. I tried creating a new branch from this one and the same thing happens. When checking out other branches, the project directories ... | 3 | 1,224 |
How to display current date in php? | <p>I am using the wordpress plugin "<a href="https://de.wordpress.org/plugins/woocommerce-gift-coupon/" rel="nofollow noreferrer">WooCommerce Gift Coupon</a>" which generates a PDF sent as attachment to the customer via mail. I want to display the current date in that PDF and already found the php file to edi... | 3 | 8,991 |
How to display a dynamic map using Tabs and SliverGrid | <p>I have a Model called service provider that contains a the following data:</p>
<pre><code>class ServiceProvider {
final String logoUrl;
final int lowerPrice;
final String name;
final int numberOfOrders;
final int onTime;
final int ordersPercentage;
final int upperPrice;
final double r... | 3 | 4,803 |
Input should be equal to a list, but isn't | <p>A friend gave me the idea to write a program that asks you English words and you have to translate them in German and reverse. </p>
<p>So the program asks a word and checks the input if it matches the actual translation.</p>
<p>So the user gives an input of which Unit he/she wants to study. This input is stored in... | 3 | 1,338 |
Hash password not saved in the password column | <p>I am trying to store hash password in my <code>users</code> table while registration. Please see my code:</p>
<p><strong>users_controller.rb</strong></p>
<pre><code>def login
@title = 'Login'
#render layout: 'login'
end
def create_login
user = User.authenticate(params[:user][:username], params[:user][:passwo... | 3 | 2,193 |
Drawing a line after an arbitrary number of SVG tspan elements | <p>I'd like to use SVG to create an XSLT template to generate PDFs of orders placed in a system. The idea is that I have N order positions (say between 3 and 10) which I want displayed row by row and with a horizontal line after the bottom-most row and the usual total row.</p>
<p>Here's is an illustration:
<a href="ht... | 3 | 1,511 |
Constant label updation from different class in javafx-fxml | <p>I am unable to change the text of my label from other class.
I need to constantly update date and time on the main screen, while I may be able to perform other functions too, simultaneously.
I have used a <em>TimeSetting</em> class, which extends Thread and in it's run() method, I've called the updation command in a... | 3 | 2,155 |
Web browser navigation Not occurring | <p>I am trying to navigate to different url links stored in TrimedPages but each time I try to navigate it to the TrimedPages[0] index it does not get navigated to new url instead it just navigate on old url :/</p>
<pre><code>private void webBrowser1_DocumentCompleted_1(object sender, WebBrowserDocumentCompletedEventA... | 3 | 1,653 |
I get an Error when setting PCROP STM32H7 (STM32H743) | <h2>Goal</h2>
<p>I'm trying to set a PCROP area on my STM32H743VI microcontroller, but I'm getting the error code <em>HAL_FLASH_ERROR_OB_CHANGE</em> when executing <em>HAL_FLASH_OB_Launch()</em> and my PCROP area is not set.</p>
<p>The relevant part of the code I'm using should be the following sections</p>
<h2>My code... | 3 | 1,176 |
D3 selection.html() , copy tooltip | <p>I have an svg element containing a circle with tooltip applied.</p>
<p>I am using D3 <code>selection.html()</code> to clone this element and its contents into a new div. This works but the tooltip isn't copied across. How can I add the tooltip functionality to the new div?</p>
<p><div class="snippet" data-lang="js... | 3 | 1,252 |
Java LWJGL/Slick Util Java Null Pointer Exception Error (Texture Loading) | <p>I have been having some issues with loading Textures in LWJGL/Slick Util. I am receiving this error in the <code>texture.bind()</code> method. I would also like advice as to how to improve my code if improvement is needed. Here it is: </p>
<p>The Sprite Class:</p>
<pre><code>package geniushour.engine.animation;
... | 3 | 3,853 |
how to identify the element that was clicked? | <p>please help to fix the <a href="http://jsfiddle.net/hfoeja7f/" rel="nofollow">script</a>. </p>
<p>after the user clicks on an item .menu_button, there is a call function initForm(). This function should print one </p>
<pre><code>console.log(N)
</code></pre>
<p>but displays 3:</p>
<pre><code>console.log(1)
consol... | 3 | 1,193 |
Swift - Consecutive fetch request to Core Data are unsuccessful | <p>I'm trying to make 3 consecutive fetch requests to core data based on the result from the previous fetch such as follow:</p>
<pre><code>func myFunction(info: Info ? , completionHandler : (selectedTop: MyObject ? , selectedMiddle : MyObject ? , selectedBottom : MyObject ? , error : NSError ? ) - > Void) {
sel... | 3 | 1,907 |
Trie permutations not found | <p>I'm running into a problem while using a Trie in Java for an anagram solver. The following code is for Android and does not give me any permutation results for the letters that are given and passed in. However, if I implement the same code in a Java desktop application, it returns the correct results for me. I'm ... | 3 | 1,460 |
Excel VBA non contiguous range more than 255 characters error | <p>I have code which worked fine. But suddenly when I changed range of cells for copying to another sheet I'm getting the error message "Excel VBA Runtime error '1004' - Method 'Range' of object '_Worksheet' failed". I guess it's related to character limitation. So I tried to split the range to several zones ... | 3 | 1,898 |
Why does my regex fail when trying to indicate beginning of string in replace()? | <p>Moving from Perl to Node I'm confused why given the passed object <code>data</code> of:</p>
<pre class="lang-js prettyprint-override"><code>{
xAxis: 'string',
yAxis: 'string',
zAxis: 'string',
data: '\n' +
'p.foo {\n' +
'\tcolor:#000000;\n' +
'\tfont-family:"Open Sans";\n' +
'\tfont... | 3 | 2,482 |
Java Pong game bounce ball from paddle | <p>I'm trying to make a Pong game in Java and I have a little problem with bouncing the ball from the paddle.</p>
<p>I have two paddles: left paddle1, right paddle2.</p>
<p>My idea is the following: <code>ball_Y</code> should be between the height of the paddle and <code>ball_X</code> touching point should be <code>p... | 3 | 3,802 |
Feeding highchart with x and y values from ajax | <p>I'm trying to feed my highchart from a database using ajax. From my ajax request, I want to return both x and y values (the x value is like that: year-week, ie 2020-16; the y value is a random number). My chart remains blank, I have a silent error that I cannot figure out. I'm pretty sure it comes from the strucure ... | 3 | 3,013 |
How to create array of nested comments out of flat array from DB | <p>After querying the DB for comments that are nested in a closure table, like Bill Karwin suggests here <a href="https://stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/192462#192462">What is the most efficient/elegant way to parse a flat table into a tree?</... | 3 | 1,814 |
How can I automatically switch to a Spring profile to another one during the execution of an application? (to change the DB on which a DAO work) | <p>I am working on a batch application developed using Spring. This application have to read on a database and then have to write on another database.</p>
<p>So I know that I can create 2 different DAO with 2 different connections but I am trying to do it using Spring profiles.</p>
<p>So I have the following situation,... | 3 | 1,993 |
Uncaught type error : Cannot read value 'name' of undefined | <p>Actually I am having a global JSON, when I am trying to parse its value in loop, it is showing me error "uncaught type error : Cannot read value 'name' of undefined". I have tried a lot but I am still not able to figure out any solution for it.</p>
<pre><code> $(document).ready(function(){
var productJSON = ... | 3 | 1,417 |
How to call me function in laravel based jwt , Its giving 401 error when hit from my react application? | <p>Below is my auth controller and api routes file
login function is working well no issue in that but getting issue on me() function or /me post route please help me to solve it out.</p>
<p><strong>AuthController</strong></p>
<pre><code><?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
us... | 3 | 1,738 |
Large space above navigationTitle (Swift / SwiftUI) | <p>My view has this massive space above the title text and I was am not sure how to get rid of it as everything I've tried seems to do nothing. How can I remove this space? Initially, I intended to just hide the navigation bar, however, I want to the back button for demonstrative purposes.</p>
<p>Apologies for all the ... | 3 | 3,212 |
Getting ValueError while fitting ANN | <p>I am trying to fit ANN on Kaggle's Titanic dataset but getting ValueError. When I used RandomForest, there was no problem and when I am trying to use Artificial Neural Network, the code is throwing below error. Can you point out why I am getting the below error. I have pasted the code below</p>
<pre><code> impor... | 3 | 1,485 |
Swing error ClassCastException | <p>This is the Code I typed</p>
<pre><code>// loading all distict age on to list bix from student table
private void b1ActionPerformed(java.awt.event.ActionEvent evt) {
DefaultTableModel tb = (DefaultTableModel)tb1.getModel();
tb.setRowCount(0);
String sql = "select * from student";... | 3 | 1,533 |
Replace dt element with jQuery (phpBB) | <p>I tried searching, but all the examples and answers I found I couldn't get to work.</p>
<p>phpBB has the following lines of code:</p>
<pre><code> <!-- IF topicrow.S_FIRST_ROW or not topicrow.S_TOPIC_TYPE_SWITCH -->
<div class="forumbg<!-- IF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNO... | 3 | 1,206 |
How to add relationships in Django fixtures by explicitly adding object's fields? | <p>I'm working with Django Framework. I have two models: Component and ComponentProperty.</p>
<pre><code>class Component(models.Model):
name = models.CharField(unique=True, max_length=255)
component_properties = models.ManyToManyField(ComponentProperty)
class ComponentProperty(models.Model):
label = model... | 3 | 1,130 |
C- Server/clients, Wait for an other client and then exit | <p>I have a server and a client, when I open the server I must open 2 Terminals, one for products selection and one for pay these products. I made this code for the client but I can't find out this: When I open the first client by typing <code>./client localhost</code> I want to select a product from the vending machin... | 3 | 1,029 |
how do I pass the values after each iteration of the loop to a separate variable, or to an array for subsequent use/ use in the loop? | <pre><code>public static void Run()
{
public static string desktop = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop);
//List<string> found = new List<string>();
//MemoryStream memoryone = default;
using (var result = new MemoryStream())
{
using (var a... | 3 | 1,454 |
Calculating the angle between two vectors using a needle-like triangle | <p>I implemented a function (<code>angle_between</code>) to calculate the angle between two vectors. It makes use of needle-like triangles and is based on <a href="https://people.eecs.berkeley.edu/%7Ewkahan/Triangle.pdf" rel="nofollow noreferrer">Miscalculating Area and Angles of a Needle-like Triangle</a> and <a href=... | 3 | 1,372 |
PointCloud2 Storage Format | <p>I am trying to implement in FPGA a ROS publisher node of PointCloud2 messages. As a first step, i have already implemented a publisher node on the FPGA that is publishing strings. Now, i am trying to do the same but for the PointCloud2 message format.</p>
<p>It is very simple to understand how a string is stored, ba... | 3 | 1,218 |
unable to return json from django view to axios | <p>I want to make a Visual search interface with keywords and category to search sth. Obviously, It needs front-end and back-end data interaction. So after weighing some tools, I have choosed <strong>Vue</strong> and <strong>axios</strong> to implement data interaction in the <strong>front-end</strong>, and <strong>dja... | 3 | 2,702 |
Mockito not working when method start Observable | <p>im trying to test a presenter, but the test only pass when things are outside of Observable, my presenter:</p>
<pre><code>class CompManCodePresenter @Inject constructor(val apiBag: ServiceModule.ApiBag, disposable: CompositeDisposable, scheduler: SchedulerProvider) : BasePresenter<CompManCodeView>(disposable,... | 3 | 1,657 |
Creating new fields in serializer that access another model's attributes | <p>My API call to <code>api/business-review/3abe3a1e-199c-4a4b-9d3b-e7cb522d6bed/</code> currently returns the following:</p>
<pre><code>[
{
"id": "3abe3a1e-199c-4a4b-9d3b-e7cb522d6bed",
"date_time": "2016-05-31T19:18:24Z",
"review": "Another quality job, Anna has a no fuss approach to his ... | 3 | 1,065 |
Handling only images with thumbnail creator Azure Function | <p>I created a simple Azure Function that creates thumbnails for images uploaded to a container on Azure which gets triggered by a <code>BlobTrigger</code>.</p>
<p>It's working fine but because my container has both image files as well as other types e.g. PDF, Excel, Word, etc., the function gets triggered by all these... | 3 | 1,098 |
recvfrom() hangs when I try to get time from NTP server | <p>I'm currently figuring out why my recvfrom() doesn't return anything.
I've suspected whether socket or NTP Ip address is wrong, but both seems right so far.</p>
<p>The following is the code:</p>
<pre><code> int sntp_client(ST_VOID)
{
struct sockaddr_in saddr, myaddr;
struct timeval tv, tp;
int sntp_f... | 3 | 2,641 |
Select duplicate persons with duplicate memberships | <p><a href="http://sqlfiddle.com/#!18/93065/2" rel="nofollow noreferrer">SQL Fiddle</a> with schema and my intial attempt.</p>
<pre><code>CREATE TABLE person
([firstname] varchar(10), [surname] varchar(10), [dob] date, [personid] int);
INSERT INTO person
([firstname], [surname], [dob] ,[personid])
VALUES
... | 3 | 1,100 |
Why do I get a BufferOverflowException when running a TensorFlowLite Model? | <p>I want to run a custom tflite model on Android using TensorFlowLite (and using Kotlin).
Despite using the TFLite support library to create a supposedly correctly shaped input and output buffer I get the following error message everytime I'm calling my <code>run()</code> method.</p>
<p>Here is my class:</p>
<pre><cod... | 3 | 1,103 |
Cant figure out joins | <p>So I am making a Businesses web app with the <code>filters</code> feature. There are two filters that I have problem with: <strong>Order By</strong> and <strong>Attributes</strong>(Has following attributes) features. Which looks like this:</p>
<p>Order By</p>
<ul>
<li>Highest Rated (<em>radio button</em>)</li>
<li>M... | 3 | 1,681 |
No mapping found for HTTP Spring MVC | <p>I'm doing a little demo with spring mvc and I have a problem when deploying the application. I'm using wildfly 10.0.0</p>
<p>In don't understand what is happening</p>
<p>in My web.xml </p>
<pre><code><web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
... | 3 | 1,101 |
GEOS-Chem compilation error and then Segmentation fault | <pre><code>Bareword found where operator expected at -e line 1, near "2ubuntu1"
(Missing operator before ubuntu1?)
syntax error at -e line 1, near "2ubuntu1"
Execution of -e aborted due to compilation errors.
make[5]: Entering directory `/home/caecivil10/Desktop/GC_V11-01/Code.v11-01/HEMCO'
Bareword found where operato... | 3 | 1,188 |
Tried building a sample app where the fragments inside the Grid layout while drag and dropping would swap their place | <p>This is my Activity.xml file.</p>
<pre><code>
' <?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"... | 3 | 5,046 |
background-repeat: no-repeat; is not working | <p>Restricting the height of the body to 100% of the screen height you will see background-repeat: no-repeat; not working.</p>
<p>How is, or would this be fixed in the code? <a href="https://jsfiddle.net/z3gq0y5x/" rel="nofollow noreferrer">https://jsfiddle.net/z3gq0y5x/</a></p>
<p>Why is the background still repeating... | 3 | 2,140 |
How to make WorkManager.cancel() immediate? | <p>I have duplicated data backednd side due to the fact that WorkManager.cancel() isn't immediate.</p>
<p>I tried to maked the cancellation immediate by making it a Single. but it doesn't work.</p>
<pre><code>private fun cancelSendEventsWorkManager(): Single<Boolean> =
Single.fromCallable {
... | 3 | 1,950 |
can't verify selected checkbox, Selenium Webdriver Java | <p>In my test I want to verify selected checkbox. Below is my code</p>
<pre><code>if (CheckboxForFirstCitizenship.isSelected()) {
System.out.println("Checkbox selected");
} else {
System.out.println("Checkbox not selected");
}
if (CheckboxForSecondCitizenship.isSelected()) {
System.... | 3 | 1,363 |
Swift Audio Playback speed | <p>I am developing a game where the main sprite is a spinning wheel. I would like to associate audio to the spinning wheel that changes pitch as the wheel slows down. When the wheel stops spinning I would like the sound effect to stop. Can someone point me in the right direction?</p>
<p>In my game scene I have the fol... | 3 | 1,314 |
Is there a way to avoid documentation duplication when documenting setters/getters, properties and constructors in JavaDoc? | <p>I really like well documented code. But there are lots of duplications in the documentation, since the basic information and examples should be available for the properties, the setters/getters and in constructors (also see <a href="https://stackoverflow.com/questions/1028967/simple-getter-setter-comments">Simple Ge... | 3 | 1,047 |
How can I display the data from a foreign table in a table cell using django-tables2 (custom table)? | <p>The value on the table cell is empty. This column contains the data from foreign table.</p>
<p>Here is the snippet of my models.</p>
<p>model.py</p>
<pre><code>class DailyRecord(models.Model):
date_organised = models.DateField('Ogransied Date', help_text=('Enter Date when the program is organised: CCYY-MM-DD'... | 3 | 1,456 |
Download PDF Files - Socket Error | <p>I have a little problem, I have this method to download files in two formats (. Txt and. PDF). </p>
<p>For files in. Txt'm not having problems. </p>
<p>But for PDF files when I cancel download or when he opens the download window and I make no action, the code is giving this exception: </p>
<p>For Time waiting a ... | 3 | 3,013 |
Spark submit hangs after writing from Cassandra to json | <p>I have a driver program where I write read data in from Cassandra using spark, perform some operations, and then write out to JSON on S3. The program runs fine when I use Spark 1.6.1 and the spark-cassandra-connector 1.6.0-M1.</p>
<p>However, if I try to upgrade to Spark 2.0.1 (hadoop 2.7.1) and spark-cassandra-con... | 3 | 1,743 |
Python - Update XML row in SqlServer (TypeError: 'type' object has no attribute '__getitem__') | <p>I've been saving xml in a <strong>SQLServer</strong> database from python like this:</p>
<pre><code>import pypyodbc as pyodbc
import urllib
from xml.dom.minidom import Document
doc = Document()
base = doc.createElement('PERSONA')
doc.appendChild(base)
entry = doc.createElement('INFORMACION')
base.appendChild(entry... | 3 | 1,399 |
Using MPI's Scatterv returns different data than data sent | <p>I am trying to partially solve the Travelling Salesman Problem for 10 cities to show the best tour and its cost. The first part of the solution using mpi4py should have the root process=0 share partial tours equally between the other processes using Scatterv.
This is the code that attempts to do that below:</p>
<pre... | 3 | 2,338 |
Overload RequestMappings - Java | <p>I am using Java with Spring Security and i wanna Overload my RequestMapping but i found errors:</p>
<pre><code>@RequestMapping("/")
public ModelAndView index(OAuth2AuthenticationToken authentication) {
Map<String, Object> userInfo = authentication.getPrincipal().getAttributes();
String nom... | 3 | 2,744 |
Combine two onEdit() functions in google app script | <p>I have a two simple scripts two make a dynamic dependent drop-down lists based on two different data sources in google sheet. In my sheet value in column B depends on the A, and value in column I depends on H. If I run one script, second doesn't work. I know I have to combine them into one function but I am totally... | 3 | 1,065 |
Rails form_with (remote: true) errors | <p>I need some help here,</p>
<p>I'm getting a error when I try to update a model using ajax from Rails (form_with / remote: true). I was able to work fine with XHR requests for urls that were resources by Rails (see routes below), but with custom urls I'm getting a error.</p>
<h3>controller:</h3>
<pre><code>def cri... | 3 | 1,052 |
Pandas DataFrame : How to groupby and sort "by blocks"? | <p>I'm working with a DataFrame containing data as follows, and group the data two different ways.</p>
<pre><code>>>> d = {
"A": [100]*7 + [200]*7,
"B": ["one"]*4 + ["two"]*3 + ["one"]*3 + ["two"]*4,
"C": ["foo"]*3 +... | 3 | 1,869 |
Exception in thread django-main-thread, SECRET_KEY already installed | <p>I cloned my own repository in GitHub and after installing the necessary dependencies I tried to run my project with:</p>
<pre><code>python3 manage.py runserver
</code></pre>
<p>But when I do that, I get this exception in the thread and I can't see any particular error</p>
<pre><code>Exception in thread django-main-t... | 3 | 1,579 |
How to refer the foriegnkey which is an identity column in ASP.Net WebAPI models | <p>This is how my ASP.Net REST Web API models looks like and their DataTransferObject models are just a replica of these models without any attributes. I didn't mention ModelDto classes since they look very similar to Models. And I want to populate the database with Entity Framework Code First approach in c#.</p>
<pr... | 3 | 1,073 |
keycloak Spring Security : Unable to login with Bearer token as null | <p>I have integrated the Keylock with Spring boot using @KeycloakConfiguration in SecurityConfig Class,</p>
<pre><code>@KeycloakConfiguration
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true, jsr250Enabled = true)
public class SecurityConfig extends KeycloakWebSecurityConfigurerAdapter {
/... | 3 | 1,328 |
Rails: Finding records where a nested association is empty | <p>In a Rails application I'm working on, I've got a few different models associated like this (condensed for clarity):</p>
<p><code>group.rb</code></p>
<pre><code>class Group < ApplicationRecord
has_many :members, class_name: 'GroupMember'
has_many :newsletters
end
</code></pre>
<p><code>group_member.rb</code><... | 3 | 1,026 |
Issue with state update approach for nested objects | <p><em>Major EDIT</em></p>
<p>I have quite huge object which is 3 level deep. I use it as a template to generate components on the page and to store the values which later are utilized, eg:</p>
<pre><code>obj =
{
"group": {
"subgroup1": {
"value": {
"type": ... | 3 | 1,971 |
Custom QueryVars and pretty URL with Wordpress | <p>I have working 'solution' but I'm not able to make a clean URL.</p>
<p>My Setup:
Two CPT 'objekte' and 'onlineauktion'.</p>
<pre><code> register_post_type( 'objekte',
array(
'labels' => array(
'name' => __( 'Objekte'),
'singular_name' => __( 'Objekt' )
),
... | 3 | 1,154 |
Fill in table after form submit in vuejs | <p>I need the table to populate after I submit a form to an api in ASP.NET c#, the api request send the data back and then the table needs to fill.</p>
<p>At the moment I tried to check if the form value is null or not, and after the submit it does show the table, but not the data inside the table.</p>
<p>How do you ... | 3 | 1,480 |
how to delete all records excluding 0th record in array index | <p>As per the code I don't want to delete 0th record and delete rest of the record. But it is deleting all the records!</p>
<p>Kindly assist where I am making the mistake.</p>
<p>Here is the code:</p>
<pre><code>list<account> scope = [Select Id,(Select id,CreatedDate,ebMobile__FileType__c,ebMobile__Account__c ... | 3 | 1,303 |
Controller to write contents or msg varaibles to specific iframe | <p>I am using an JSP page which has two iframe, one of the iframe in the left pane shows the link's and iframe in the right pane is the display window, when I click on the link in the left iframe, the controller is called, to display the content in the right pane/iframe, but it always display the content in the same pa... | 3 | 2,747 |
Asp.net how to correct the error | <pre><code> using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml... | 3 | 1,241 |
Why are old variables reused when using event handler functions with Javascript? | <p>I'm trying to create a Simon game (project from a Udemy course) where you have to memorize a pattern sequence and click the right buttons. At each level, the pattern sequence increases by one. You have to repeat the entire sequence each time. If you lose, you have to press a key to restart the game. Here is an examp... | 3 | 1,309 |
Changing user preferences in a flutter app when navigating to new screen | <p>I have 2 screens in my flutter app and they're defined as follows:</p>
<ol>
<li><p><code>allFriends</code>: has a list of users on cards, which when clicked on will bring up a full view of the user (<code>otherUserProfileView</code>).</p>
</li>
<li><p><code>otherUserProfileView</code>: shows the profile view (inform... | 3 | 2,905 |
Make image of slider fit 100% parent container | <p>I have an <code>slider</code> with Bootstrap. In the <code>XL</code> version shows good, but when you resize the Window and the right <code>container</code> of text grow his <code>height</code>, the image didn't fit the <code>parent container</code> to adapt his <code>height</code> to make the same height that the <... | 3 | 1,317 |
OpenSSL EVP_DecryptFinal_ex returns "wrong final block length" error when decrypting a file | <p>I am using the <code>EVP Symmetric Encryption and Decryption</code> algorithm to encrypt and decrypt a file of text.</p>
<p>The encryption works file, a new encrypted file is generated, but when I try to decrypt the file back it always crashes when <code>EVP_DecryptFinal_ex</code> is called the first time.</p>
<p>... | 3 | 1,627 |
Shell Script to find JPG and MOV files | <p><strong>Background</strong></p>
<p>iPhone has live photo's, i thought i could use VLC on Windows or some iPhone app to take a still of the desired frame. Long story short, you can but the quality of the image as well as the resolution is drastically lowered. So i gave up on this.</p>
<p><strong>Problem</strong></p>
... | 3 | 1,174 |
Python CSV: How to extract data with condition from Dataframe, edit the extracted data then put it back into the Dataframe | <p>Sample csv data:</p>
<pre><code>ID,AC_Input_Voltage,AC_Input_Current,DC_Output_Voltage,DC_Output_Current,DC_Output_Power,Input_Active_Power,Input_Reactive_Power,Input_Apparent_Power,Line_Frequency,DC_Ref,AC_Ref,Time_Stamp
8301,418,13.2,34.4,136,4673,1,-1,5524.5,0,49,0,22/6/2017 05:11:00
8301,419.3,2.3,0.7,-0.9,-0.6... | 3 | 2,216 |
Android client server won't show object | <p>I made simple Client server to android.
I have problem when I send an object from server to the client.
The object is received ok and when I check the log, it shows me the the object was sent successfully.</p>
<p>The problem occurs when I'm trying to get this object and put it in my <code>ListView</code> adapter.
T... | 3 | 2,111 |
Properly echo a bunch of CSS options using PHP? | <p>Consider a following function with <b>one option</b> echoed out:</p>
<pre><code>function dynamic_options() {
$getheadercolor = get_header_textcolor();
$options_social = get_option('sandbox_theme_social_options');
$wrapper_background_color = get_option('wrapper_background_color');
if($getheadercolor !='blank'){
... | 3 | 1,773 |
TCPDF doesn't show a static Google Map | <p>When I generate a PDF content is displayed but not the image. Why?</p>
<p>I think the PDF is generated before the image is loaded. Is there any way to slow down the operation?</p>
<pre><code><?php
// Include the main TCPDF library (search for installation path).
include('tcpdf/tcpdf.php');
// Variables gl... | 3 | 1,733 |
how to show pdf in android emulator | <p>i want to show pdf in emulator.the following code i use.</p>
<pre><code>public class PdfActivity extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
URL url;
Button btn;
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
System.setProperty("http.proxyHost","... | 3 | 1,338 |
Laravel controller returning index view instead of json response | <p>I am using apache2 and php artisan serve command to test my project.</p>
<p>Have the next controller:</p>
<pre><code><?php
// file: Http\Controllers\AuthCtrl.php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User; // <--
use Illuminate\Support\Facades\Auth;
class AuthCtrl extends Cont... | 3 | 4,174 |
Access/ Excel integration:How to avoid conflicts between simultaneous users? | <p>I'm developing an excel tool which connects to an Access database through VBA, and data is transferred between excel and the DB upon user requests. Each user have his own version of the excel workbook, which connects to the central db. In most cases this works fine, but i have discovered some conflicts when two user... | 3 | 1,663 |
react-native (js) : generalise a function | <p>I have two functions which I would like to condense into one (with another argument). They are called like so:</p>
<pre><code><ListView
automaticallyAdjustContentInsets={false}
dataSource={this.state.dataSource_proj}
renderRow={this.renderProjRow.bind(this)}/>
<ListView
automaticallyAdjustC... | 3 | 1,247 |
Serialising a string which contains backslashes with Json.Net | <p>I am trying to serialise an object which contains a UNC-Windows path to a shared ressource.</p>
<p>My code:</p>
<pre><code> public class NetworkConnection
{
public String LocalName { get; private set; }
public String RemotePath { get; private set; }
public String ResourceType { get... | 3 | 1,284 |
If statement on a sub array of an object | <p>Hope that title made sense but my issue is i have an object with an array like this, this is just 1 from the array as an example</p>
<pre><code> object(stdClass)#6 (3) {
["items"]=>
array(40) {
[0]=>
object(stdClass)#7 (22) {
["id"]=>
int(46)
["parentId"]=>
int(0)
... | 3 | 1,777 |
How to connect to Mongo DB in Docker from Scala Play Framework? | <p>I have a Mongo DB Docker container running on <code>192.168.0.229</code>. From another computer, I can access it via:</p>
<p><code>> mongo "mongodb://192.168.0.229:27017/test" </code></p>
<p>But when I add that configuration string (<code>host="192.168.0.229"</code>) to my Play Framework app, ... | 3 | 2,397 |
Dismiss Rg.Plugins.Popup on scroll down in Xamarin forms | <p>I am using <a href="https://github.com/rotorgames/Rg.Plugins.Popup/issues" rel="nofollow noreferrer">Rg.Plugins.Popup</a> plugin in my xamarin forms app. It is a nice plugin for modal dialogs. However, I am looking to dismiss the dialog when user scrolls down. (Most dialogs in iOS has this behavior of closing with s... | 3 | 1,157 |
Why I am getting such a message:java.lang.NoSuchMethodError: No virtual method fetchProvidersForEmail(Ljava/lang/String;) | <p>I am trying to create an Android program, and met an error of which I have no idea how to solve.
My app crashes after I put in the email. I suspect that the problem is related with firebase. I have tried different ways of solving of this problem, such as changing the versions of firebase implementations, but without... | 3 | 2,998 |
INSERT INTO with dynamic pivot statement yields Unknown Table error in certain circumstances | <p>I'm using SQL Server and I have a dynamically built INSERT INTO statement in a stored procedure. The code works without a problem when I execute it manually, but when I execute the SP it returns an Unknown Table error where it tries to create the table from the select statement.</p>
<p>The problem is only on the pro... | 3 | 1,444 |
I can't set the time in a date picker in xcode | <p>I have made the following window in Xcode:</p>
<p><a href="https://i.stack.imgur.com/U96pY.jpg" rel="nofollow noreferrer">Window for logging assingments</a></p>
<p>And I have written this to go along with that window</p>
<pre><code>class logHomeworkViewController: UIViewController {
@IBOutlet var dueDatePic... | 3 | 1,051 |
PHP password_hash and password_verify weird issue not verifying | <p>Here is my scenario:</p>
<p>I have a function that gives out json response when called for. Its inside a class that has the Signup.class.php included which has the <code>Signup</code> class. Where the GET param <code>pass</code> is being accessed inside the <code>gen_hash()</code> function as shown above. The code i... | 3 | 1,562 |
How to set DataChangePolicy Azure search sdk 3.0.3 | <p>I have enabled change policy my db</p>
<pre><code>ALTER Database EMR
SET CHANGE_TRACKING = ON
(CHANGE_RETENTION = 2 DAYS, AUTO_CLEANUP = ON)
ALTER TABLE EMR.dbo.ICDCodePCS
ENABLE CHANGE_TRACKING
WITH (TRACK_COLUMNS_UPDATED = OFF)
</code></pre>
<p>and on azure index side i use below for Datasource.AzureS... | 3 | 2,385 |
Accordion is not working with latest version of ui-bootstrap-tpls.js | <p>I have an accordion which is working with older version(0.13.0) of ui-bootstrap-tpls.js,but its not working with latest version(2.5.0) of ui-bootstrap-tpls.js. Due to older version its effecting other component to work correctly. I need to work with latest version only. Can anyone please help me on it? Below is my c... | 3 | 1,329 |
Mozilla WebExtension API storage - Debugging with and without breakpoints leads to different output | <p><br/>
Hello guys,
<br/>
i am trying to implement an add-on for the Mozilla-Firefox Browser.
The following script shows one backgorund script I already successfully integrated. It uses the Mozilla WebExtension API storage. It gets executed but the log on the browser console suprises me.
I get alternating logged nothi... | 3 | 1,616 |
How to convert li navbar dropdown with dropUp | <p>It's a simple bootstrap navbar with some li links. I want to convert dropdown to dropup.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.navbar {
background-color: #34... | 3 | 4,372 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.