title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
?Help command not doing what is intended and message logger returning false errors in discord.js
<p>so here is my code in events/messages:</p> <pre class="lang-java prettyprint-override"><code>module.exports = { name: 'message', execute(message) { console.log(`\nServer: ${message.guild.name}\nChannel #${message.channel.name}\nUser: ${message.author.tag}\nContent:\n${message.content}`); }, }; </...
3
2,037
C++ issue with LZW decoding
<p>I'm writing a LZW algorithm and I'm having trouble with decoding the encoded file. The encoding function works fine,the issues is as far as I know in the building of the dictionary in the decoding function. Edit: The size of the decoding dictionary is for 1 bigger than the encoding dictionary. Also the decoding dic...
3
2,023
Not Able to Cast the Object to Custom Object
<p>I have the APIResponse class which extends the Object class like <code>&lt;T extends Object&gt;</code> but while getting the response body from the rest template getting the data into the Object class, not to the Book class.</p> <p>If I try to fetch the data into the Book class it gives the null. </p> <p><strong>I...
3
1,214
Vigenere Square Decryption in C
<p>I'm trying to encrypt and decrypt a message using a passphrase and a vigenere square stored in an array. I am able to encrypt the message successfully however I can't work out how to decrypt it again afterwards. Any ideas? </p> <pre><code>#include &lt;stdio.h&gt; #include &lt;string.h&gt; #include &lt;ctype.h&gt; ...
3
1,529
Elastic search more like this Query score issue in 5.x
<p>Recently we have changed <strong>Elasticsearch</strong> version from <strong>2.4 to 5.4</strong> .</p> <p>we found one issue in more like this query in version 5.x .</p> <p>following query is used to find out similar documents by text </p> <blockquote> <p><strong>INPUT Query</strong></p> </blockquote> <pre><c...
3
1,793
Not able to pick the value of dynamically created Second textbox with the same name
<p>I have a page in which i am creating a dynamic textbox element(newComment) box by iterating a loop inside getMessages() method so my loop is creating two text boxes and calling addComment() method in the loop and trying to fetch the value of second textbox inside addcomment() . but i am not able to get the value of...
3
3,236
Oracle Query don't see what's wrong
<p>I am trying to run this Query but somehow the bottom part Label B doesn't work.</p> <p>I am new to oracle and I just don't see what's wrong. Can anyone Please Help me? It would be much appreciated. </p> <p>Its not returning any data when a salesperson is not tied to it. This should still return the information abo...
3
2,133
Typerror (Singleton array...) when using train_test_split within a custom class
<blockquote> <p>TypeError: Singleton array array(&lt;__main__.AZHU_EmailClassifier_2 object at 0x000001D6E7A680D0&gt;, dtype=object) cannot be considered a valid collection.</p> </blockquote> <p>I get this error when I try to run the train_test_split function within my custom AZHU_EmailClassifier_2 class.</p> <p>My cla...
3
1,784
How to use functionalities of multiple files in different directories in a WordPress theme being developed using MVC architecture
<p>I am developing a custom theme using the child theme Astra. I am developing a very modular system i.e. as highly cohesive and loosely coupled as I can. At first, I am developing a custom signup system as it is my need for the system. My directory structure is like this:</p> <pre><code>+astra-child-theme -functions...
3
1,071
Set axis tick and label to include maximum value on bar plot
<p>I am using base R to create multiple side-by-side bar plots (I prefer to avoid using <code>ggplot</code> because I am often limited in functionality). I find the result not visually pleasing because the axis ticks don't line up at all : sometimes the top of the axis is well below the maximum value and sometimes it i...
3
1,381
Package org.apache.flink.api.java.io.jdbc does not exist
<p>I want to use the JDBC connector in an Apache Flink application. But maven doesn't find the flink JDBC package. I added the following dependency to my pom.xml in the &quot;build-jar&quot; section:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.apache.flink&lt;/groupId&gt; &lt;artifactId&gt;flink-connec...
3
1,265
142^23%187 modulo RSA should be 65 but is 53 any idea why?
<p>As in title, 142^23%187 should be 65 not 53. It is part of RSA encrypting/decrypting algorithm.</p> <p>Previous modulo operation is correct but secon one is not.</p> <p>If u type 142^23%187 in wolphram alpha is correct 65 - and 65 is indeed A after decrypting.</p> <p>Any ideas? Code below:</p> <pre><code>using S...
3
1,384
What is efficient way to read stale data in Spanner using node or java client?
<p>our use case allows to read stale data (between 10 to 15s) so exploring staleness read using node or java client. In node we have <code>Database.getSnapshot</code> or <code>Database.runStream(sql, option)</code> -option we can mention different staleness strategy.</p> <p><code>Snapshot</code> - we can have database...
3
1,024
TweenLite animation suddenly changing elements' position?
<p>First of all, you can find a simplified demo of my code in this <a href="https://jsfiddle.net/JocaPinto/o6uo658d/7/" rel="nofollow">JSFiddle</a> and also below the question. I found that my problem happens the way I describe it in Google Chrome, so if you plan to try and fix the bug, please use that browser. I apolo...
3
1,630
Send Multiple Parameters to SOAP Service via Angular $http POST
<p>I am creating one basic Angular js application. There is one simple basic form with 4 parameters. Now i want the details of this form to get saved in my Access Database.</p> <p>Below is my SOAP Service Method Code :</p> <pre><code>[WebMethod] public void RegisterMember(string strFirstName, string strLastNa...
3
1,352
Universal form submitting function for all forms in a page
<p>I'm trying to write a universal jquery function to submit all forms in a table when their submit button is clicked.</p> <p>What I've got so far is this:</p> <pre><code>&lt;div class="tabelaportes"&gt; &lt;div class="galltitle"&gt;Tabela de Portes de Envio&lt;/div&gt; &lt;table cellpaddi...
3
2,498
Help with XSLT Transformation
<p>I was hoping I could get a little assistance with an XSLT transform. I can't seem to get it right.</p> <p>Here is a sample of the source xml document:</p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;Locations&gt; &lt;header&gt; &lt;location&gt;Location Field&lt;/location&gt; ...
3
1,343
How to implement tree nodes toggling in Vega JS?
<p>I'm using <a href="https://vega.github.io/vega" rel="nofollow noreferrer">Vega JS</a> for building a tree chart. In general, my question is the following:</p> <p><strong>Vega documentation has a great <a href="https://vega.github.io/vega/examples/tree-layout/" rel="nofollow noreferrer">example of tree layout</a>. Ho...
3
3,712
How to animate an svg along path with conditional pausing using animateMotion and ReactJs?
<p>I am trying to animate an svg element along an svg path, but it needs to pause multiple times at certain positions and continue when click a button.</p> <p>I made an svg path, here is the code</p> <pre><code>&lt;path d=&quot;M6.25 100 L6.25 100 L6.25 66.75 Q6.25 56.25 25 56.25 L26.25 56.25 Q31.25 56.25 31.25 50 L31....
3
2,532
Efficiently read CSV file into array of doubles in C
<p>Looking for a more efficient method of reading a CSV file into a 2D array of doubles. My current code works okay but takes 2 minutes to read into the array.</p> <p>The CSV file being read is as follows. The entire file contains 28,325,381 lines and is 1.8GB.</p> <pre><code>CoordinateX,CoordinateY,CoordinateZ,Press...
3
1,106
unable to show name on each entry asp.net mvc
<p>I'm having an issue when I select an employee name; the last name that was selected it is what is shown on the view but I would like the employee name to be change. Say for example I enter Trev and I click add, add another name Trudan; it should show all the names and not only Trudan. I suspect it is because of the ...
3
3,248
how to map String on Radio
<p>I've faced the next issue:</p> <p>I want to create CRUD-perations in gxt grid, but I've run into a such situation: I made <code>sex</code> field as a <code>RadioGroup</code> on the form and wrote a converter for <code>create</code> operation(code below), so it works normally(entity and converter code below):</p> <...
3
1,462
Lazy loading after page reload cannot find some module declarations
<p>My app consists of </p> <ul> <li>Route /home -> app module </li> <li>Route /dashboard -> Dashboard module </li> <li>Route /profile -> profile module </li> <li>Route /event -> event module </li> <li>Route /services -> services module </li> </ul> <p>I am using lazy loading and all works well </p> <p>All navigation ...
3
1,345
How to add more then 2 file parameter in multipartFormData in swift
<p>I am new in swift and I want to add more then one file parameter in multipart my code is like this</p> <pre><code> func uploadWithAlamofirePDFAPI() { var paradict = NSMutableDictionary() let UrlPost = Url var Patientidstring = String() var Useridstring = String() ...
3
1,819
transferring data through tcp sockets on a remote server using nodejs
<p>I’m building a Nodejs TCP module, a server/client application to send data through tcp sockets. I have this module working on my localhost with no issues but when I send data from my localhost to a remote server It doesn’t work. I’m getting weird results because I can see the header of my data in my nginx access log...
3
1,255
Use regular expression to replace character in specific position
<p>I want to replace the dash(-) to space from a string at position 12. I cannot use replace(&quot;-&quot;,&quot; &quot;) because there may a negative number in the string.</p> <p>I had try (?&lt;=^(?:.{11})). but it only get the result at first line.</p> <p>Are there any solution?</p> <pre><code> K120613763-01 ...
3
1,826
Parcelable object is Null on receiving activity and good in other
<p>Thanks to those who will try to help me!</p> <p>First time I sent a message. I'm stuck with my parcel. I try to send an object Neighbour in a recyclerView for a class <code>DetailedNeighbour</code>. After I send my variable to <code>DetailedActivity.putExtra("DNeighbour", neighbour);</code> is well equal to what I ...
3
2,878
onClickListener for a button text to change based on edit text
<p>I have the following code but it changes the button text to empty. I'm basically trying to change the the button's text when it clicked to whatever the user types into the edit text field I have. Everything seems to work, however, when I click on either buttons I have the button's text changes to empty/null and sinc...
3
2,764
Transitions for clicking and displaying content
<p>So, I've been trying to figure out some stuff with react and semantic-react-ui, I am new to react, so pardon the "oh you're doing it wrongs".</p> <p>Below are key components to my code, what I am trying to do, is when a user clicks on an item in the list, the related content to that list item will display to the ri...
3
2,716
Can not update table field onchange of select
<p>I have table structure is like:</p> <pre><code>&lt;table&gt; &lt;tr class="selected"&gt;&lt;th&gt;number&lt;/th&gt;&lt;td&gt;&lt;input type="number"/&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;th&gt;name&lt;/th&gt;&lt;td&gt;&lt;input type="text"/&gt;&lt;/td&gt;&lt;/tr&gt; ... &lt;/table&gt; </code></pre> <p>I have cr...
3
2,760
Not sure how to reference stringArray in main thread
<p>As you can see I've been chopping and altering snippets of code I've found all over the place, and it's taken ages! </p> <p>I'm stuck on the context menu which isn't capturing the touch selection when an item is selected, and eclipse is showing an error which I'm not sure how to correct. </p> <p>I'm not sure how t...
3
1,226
Why does this sendmsg() call I injected via ptrace not work?
<p>I am trying to inject commands into a process I own - specifically, I'm currently trying to pass a file descriptor of the ptraced process to the ptracing process. I successfully created a unix domain socket and connected it (as far as I can see) like this:</p> <pre><code>#define stack_pointer(regs) regs.uregs[13] #...
3
2,616
How to recognize and differentiate between single, double, and triple clicks in Arduino?
<p>I'm trying to make a sketch for Arduino that differentiates between single, double, triple, maybe quadruple clicks, and hold clicks with a push button.</p> <p>I've tried making my own program that uses a variable that increments with each click but haven't had much success. I then found this Arduino sketch that most...
3
2,327
iOS Crash GameObject::IsActive() const
<p>I found XCode Organizer Crash Report many crashes.The Top is Following:</p> <pre><code>Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000156 Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [0...
3
2,278
why is some space is remaining after swipe left and right in Listview
<p>I swipe both side in Listview it successfully done but when when i swipe any side some space is vacant I can't find why is space is renaming: -</p> <p><a href="https://i.stack.imgur.com/jrjQ0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jrjQ0.png" alt="enter image description here"></a> </p>...
3
4,214
how to Improve the speed matlab
<p>This is my matlab code. It runs too slow and I had no clue how to improve it.</p> <p>Could you help me to improve the speed?</p> <p>What I would like to do is to create some random points and then remove the random points to make them similar to my target points.</p> <pre><code>syms Dx Dy p q; a = 0; num = 10; ...
3
2,067
Find the value attribute of an active button
<p>I am trying to do a simple calculation based on a few inputs, however I am unable to get the value from the currently active HTML button class using Javascript.</p> <p>The code loops through the buttons and adds the active class to the current/clicked button. I then want the calculation to be based off the value of ...
3
1,880
If statement in terraform, using 2 different code blocks
<p>I have this codeblock</p> <pre><code> launchpad_tmpl = { apiVersion = &quot;&lt;Link for the API&gt;&quot; kind = &quot;mke&quot; spec = { mke = { adminUsername = &quot;admin&quot; adminPassword = var.admin_password installFlags : [ &quot;--default-node-orch...
3
1,527
LCD not working properly with PIC16F877A using mikroc development
<p>I've been designing a simple traffic signal code using a PIC microcontroller, it's supposed to have a control panel with which you input the timing for each traffic light, to make it more secure I added a password to stop anyone from messing with the timing.</p> <p>I used Proteus 8 for simulation. The problem happe...
3
2,584
Error allocating memory for temp in queue push in c invalid write size of 8 from valgrind
<p>This is my push function</p> <pre><code>void push(struct Map *map, struct Location location){ struct Node *temp = map-&gt;front; temp-&gt;loc = location; //this line causes the error temp-&gt;next = NULL; if(map-&gt;rear == NULL) { // if queue empty map-&gt;front = temp; // First NODE ...
3
4,004
Acunetix scan of Laravel login page
<p>I have an application written using Laravel 5.1 framework. Recently, one of my clients ran an Acunetix security scan on the application and found <a href="http://i.stack.imgur.com/oRXUJ.png" rel="nofollow">HTML form with no apparent CSRF protection</a> on my login page.</p> <p>However, the login form DOES have CSRF...
3
1,053
Performing Prim's Algorithm using a class and a given starting point/node
<p>I have written a class Graph which takes a graph object and returns an adjacency list of the said graph object. I am using the graph_str from this class to construct a function which - given a point to start from - perform's prim's algorithm and outputs a parent's array as a result (a list of the parents of each nod...
3
2,593
Passing a pointer to an object in C++ & error: no matching function for call to
<p>I'm trying to pass a pointer to a <code>vector</code> from one free floating function to another. This all works good, however, when trying to add something to this vector I get a strange compilation error.</p> <pre><code>$ g++ PeekClientRMS.cpp PeekClientRMS.cpp: In function ‘void testNewWord(std::string, std::vec...
3
1,125
function cannot read new x y coordinate value by MouseMove function in React
<p>I am using react and drawing a fire works.</p> <p>There is a mousemove function to get new x y coordinate. Also, there is a function init(). It pushes new object into array.</p> <p>console.log(MousePosition.left, MousePosition.top) shown the x y coordinate value. Therefore, the mousemove function is worked.</p> <p>H...
3
2,219
Mongodb: how to group by key and save additional information for items in group
<p>I have messages system in mongodb. Messages object looks like this:</p> <pre><code>{ who: String, whom: String, when: Date } </code></pre> <p>So, for example, when user <strong>1</strong> sends message to user <strong>2</strong> I have:</p> <pre><code>{ who: &quot;1&quot;, whom: &quot;2&quot;, when: MSG_...
3
1,260
Error: [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()
<p>I am building a Flutter application and I have integrated Firebase, but I keep getting this error when I click on the login button. I have come across people with similar problem, but none seems to work for me. I am using VS Code as my IDE. How can I fix this problem?</p> <p>Here is my code for each file...</p> <p><...
3
4,328
CSS media query content changing its position
<p>so i have a little react todo app, in the phone or tablet or whatever device i want it to look the same i dont really know mediaqueries really good if its only case to fix it ? or are there any other ways? also i would be very happy to see media query solution too because i have no idea how to do it</p> <pre><code>i...
3
1,779
Can this sql query be written better
<p>I have got this SQL query and I was wondering if there's a better way to write the queries.</p> <p>The query below creates the first table and selects attributes where cacount=1, second_ca selects attribute where cacount= 2, exams select attributes from the exams table. Finally, create the total score table that co...
3
1,056
Game of craps looping more than once after quitting the game
<p>I am trying to make a program to play a game of craps where the user enters a bet amount, then they roll 2 six sided dice. If the sum of the dice s 2,3 or 12 they lose. 7 or 11 they win. if any other number is rolled the player keeps rolling until they get the point number to win or 7 to lose. However for some reaso...
3
1,114
Bootstrap 4, one of the nav-items in my navbar-collapse class not changing background color when it's active
<p>I'm trying to change the background color of an active item in my dropdown menu. So what I'm targetting is the aisles nav-item, which has a dropdown for 8 different categories. So for example, when I'm on Fruits and Vegetables, I would like for a color surrounding that category to be fixed on it so that it indicates...
3
1,525
How do i force a table row with 100% width to use a scroll bar if it's children are overflowing?
<p>I have a CSS layout problem. <a href="https://jsfiddle.net/jayseeare/gq68q7f7/" rel="nofollow">Here's a fiddle</a></p> <p>I want a header and footer on the page, with the "content" taking up the rest of the available space. I was doing it with a JQUery plugin that calculated and set the height of the relevant eleme...
3
1,150
Meteor collection updated from server, not getting sorted reactively on client
<p>In my meteor project i have a collection where i put some logs and i want to display the latest added log from server on the client always first in the list.</p> <p>My log collection is subscribed in <code>autorun</code>, to control the number of the logs loaded by the limit:</p> <pre><code>Template.statistics.onC...
3
1,113
Swift - changing app when banner loads. - xcode 6 GM
<p>I have been working on a mainly text-based application with an Iadbanner in the bottom.</p> <p>However as we all know, Iads aren't always there. So I would like to be able to dynamically update the height of my textView, so when the banner is hidden, the textView takes up the wasted space. And resize it when a bann...
3
1,058
Condensing jQuery script
<p>Looking to condense the jQuery I have here into a few lines, I know it can be done but I can't seem to get it to work looking at other posts and round the web... </p> <p>HTML</p> <pre><code> &lt;h2&gt;Meet The Team&lt;/h2&gt; &lt;img src="img/1.png" id="team" class="team" /&gt; &lt;img src="img/1...
3
1,571
C++ using a member function from from one class in the main function?
<p>I have my main and im setting up input but im using getters/setters too use a method from InputHander to my main but doing so is causing a stack overflow as there is just an infinite loop going on.</p> <p>The warning i get:</p> <pre><code>warning C4717: 'key_callback' : recursive on all control paths, function wil...
3
1,532
Extending Nginx config on Beanstalk doesn't rewrite urls properly
<p>I have an existing Laravel API application running on Beanstalk. It's been lagging in updates on EBS, so currently I'm in the process of upgrading the platforms and CI/CD for this app. There one remaining problem I'm running into, which leaves me scratching my head at the 'but it <em>should</em> work'-level.</p> <p>...
3
1,138
Rake assets in Rails app Heroku
<p>I am trying rake assets:precompile with command "heroku run rake assets:precompile" but I have this error:</p> <pre><code>Running rake assets:precompile on ⬢ infinite-meadow-50968... up, run.9141 (Free) yarn install v1.8.0 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Bu...
3
2,840
ABPeoplePickerNavigationController Facebook vs local data
<p>I have an ABPeoplePickerNavigationController that was working perfectly, but now it is not grabbing the values from my contacts and there have been no code changes.</p> <p>The contact has multiple phone numbers and in the past the people picker was seeing all of them, but now it is just seeing the information that ...
3
2,618
Annotations on Spring while using Shiro , NullPointerException
<pre><code>@DependsOn(value="userService") public class AuthcRealm implements Realm { @Autowired @Lazy(value=false) @Qualifier(value="userService") private UserServiceImpl userService;//here I did the injection public AuthcRealm() { System.out.print("realm constructor"); } public String getName() { return "A...
3
1,261
iOS 7 - TableView not displaying values properly
<p>Sorry but I've been stuck in this problem for quite some time and I can't figure out why. I have a ViewController that has 2 TableViews, it took me some time to manage the functions but it's running well now. Initially, I had some static strings as display for the table cells just to check if I can make it run. Afte...
3
1,933
google authenticator implementation java android
<p>i building an Android application that must have an Google authenticator code(Password) to access to it. the problem that i generate the serial code of 16 characters but when i try to write the validation code the application told me always that is wrong validation code... the time of the phone and the computer are ...
3
2,733
Getting lots of warnings and errors in keras.sequential
<p>I have the following function that used to work, but now when I run it, after upgrading to Tensorflow 2.3, I am getting lots of warnings and dtypes confusing notices. I am not sure how to repair my function to properly run the keras sequential code to generate a proper prediction.</p> <p>Here is my implementation:<...
3
9,002
WooCommerce - Custom cart - How to add AJAX function?
<p>I coded my own mini-shopping-cart for a website I'm currently working on and it's working fine. Now I need a way to add AJAX to said cart. Here's the code so far:</p> <pre><code>&lt;div class="custom-cart-container"&gt; &lt;div class="shopping_cart_link"&gt; &lt;a class="shopping_cart_link_text" href="h...
3
1,340
useLocation not rending props - Gatsby routing
<p>I'm trying to render a blog as a card then open it up as a page , but its proving to be difficult using Gatsby. I did the same thing fine with react using React router and useLocation but it doesn't seem to be working with Gatsby.</p> <p>I switched to reach router as suggested in another post but that doesnt work. I...
3
1,996
Content not displaying while using wagtailtrans package on the page
<p>In my models.py file I have defined <strong>StandardPage class</strong> to which I want to add trans<code>enter code here</code>lations.In this class I have defined these:</p> <pre><code>class StandardPage(TranslatablePage,Page): introduction = models.TextField( help_text='Text to describe the page', ...
3
1,777
Refresh sticky mobile leaderboard ad slot by changing the content URL in infinite scroll
<p>I want to refresh sticky mobile leaderboard slot when the URL changes in infinite scroll. What do you think is the best way to go? Please let me know if you have any suggestions.</p> <pre><code>class DFPAds { constructor() { this.slots = []; this.onScroll = throttle(this.loopAds, 300); this.addEvents(...
3
4,768
Discrepancy between T-SQL and SSRS results
<p>I created the following code in T-SQL(see below) It is working good in SSMS environment, but, when I post it into SSRS (Reporting Services) the numbers for <strong>[Total]</strong> and <strong>[Completed]</strong> fields are very different in SSRS than it is in SSMS - much higher than in SSMS</p> <p>This is my code...
3
3,239
Debug proving something isn't null but issue still occurs [Minecraft]
<p>I am trying to make my plugin monitor kills and hp of a player but I am currently getting issues with both health and kills with the same error. I have even tried using null selection to check if it is null and not use it but that wouldn't work as I need the information to show. I basically need to set the players h...
3
1,061
Unable to determine spinner value
<p>I have been on here for over an hour now reading related questions, but have not yet found a solution that fixes my issue, so I will ask. </p> <p>I have a Spinner. I would like to use the selected city in that spinner to set a latitude and longitude variable. I am unable to figure out how to either directly call th...
3
2,560
Adding J Table content to MySQL database in Java
<p>I coded for setting JTable contents to the MySQL database. Invoice no is getting by a text field. Other data is in the J table.</p> <p>The code is available below;</p> <pre><code> String invoice = InvoiceNo_txt.getText(); String id = (String) tableSale.getValueAt(i, 0); String name = (Strin...
3
1,144
How do I make my treeview fit the frame in my notebook in tkinter?
<p>I'm actually new to using python. I just wanted to ask if how am I going to be able to make my treeview fit/expand automatically on the frame inside a notebook widget without resorting to a fixed width and height for the treeview container (frame)? I'm not sure if what I'm doing wrong here. Here is my progress so fa...
3
2,057
TypeError: (-0.7481077572209469+0j) is not JSON serializable in LIT package
<p>I am using LIT api to visualise my attention weights. Here is the link: <a href="https://github.com/PAIR-code/lit" rel="nofollow noreferrer">https://github.com/PAIR-code/lit</a></p> <p>If I change to <code>PCA</code> in the web interface of output. It throws me this error:</p> <pre><code>TypeError: (-0.748107757220...
3
3,828
Joining multiple tables and getting MAX value in subquery PostgreSQL
<p>I have 4 Tables in PostgreSQL with the following structure as you can see below:</p> <pre><code> &quot;Customers&quot; ID | NAME 101 Max 102 Peter 103 Alex &quot;orders&quot; ID | customer_id | CREATED_AT 1 101 2022-05-12 2 101 ...
3
1,905
XML Validation error. I would like to know which part is not correct?
<pre><code>&lt;?xml version="1.0" ?&gt; &lt;!-- Superstar Movies: Catalog of Movie and Actor Info. Author: Randy White Date: 6/28/2011 Filename: catalog.xml --&gt; &lt;!DOCTYPE catalog SYSTEM "catalog.dtd"&gt; &lt;catalog&gt; &lt;movie movieID="m0100" genre="drama"&gt; &lt;title&gt;Monster&amp;apos;s B...
3
2,036
Pomm Bundle same spl_object_hash but object different
<p>I use Pomm bundle for my symfony Project and i have a problem I have create a complex query and my result instance same object with different attributes. It's just for example but this request have relation one -> many </p> <p>I know that this request (1 -> many) is not correct from a relational point of view howev...
3
2,039
How to extract a directory recursively?
<p>I'm trying to extract a directory recursively using the function below. When I run the program it is able to create a root directory and the files inside of it but it is not able to completely write the files inside of the sub directories. </p> <p>My code is able to compile but I keep getting a segmentation fault e...
3
1,268
How to make a list with nested loops
<p>I am trying to make a list of all the competitions with their competitors (riders). Competitions are saved in <code>tbl_GAME</code> and all the competitors in <code>tblRider</code>.</p> <p>I tried the code below but it didn't work. Is the problem that I put a <code>while</code> loop in a <code>while</code> loop?</p...
3
1,730
ActivityResultLauncher not working with fragment?
<p>I'm writing an app using Kotlin. I'am using ActivityResultLauncher for get permission. I can use ActivityResultLauncher on Activity clearly but when I try to get permission on fragment with ActivityResultLauncher, the app goint to background without getting any error. I will put my code below. Please help me :)</p> ...
3
1,884
AVAssetExportSession fails to export videos downloaded from iCloud
<p>I'm trying to create a scaled down version of a video selected from the users photo album. The max dimensions of the output will be 720p. Therefore, when retrieving the video, I'm using the <code>.mediumQualityFormat</code> as the <code>deliveryMode</code>. This causes iOS to retrieve a 720p video from iCloud if the...
3
1,148
How do I import my own object in vs studio code?
<p>I'm trying to import the <em>Human</em> object I created for my contact book program and im doing it in VS Studio Code but it gives me an error:</p> <pre><code>Import &quot;Human&quot; could not be resolved </code></pre> <p>I tried to make the program in pycharm instead and it imported just fine and I even finished ...
3
1,891
Toggle button and search bar occasionally show misaligned
<p>When I refresh the page sometimes, the toggle button and search bar will be misaligned but then another refresh will fix it, not sure what causes this behavior.</p> <p><a href="https://imgur.com/rP4WZ18" rel="nofollow">https://imgur.com/rP4WZ18</a></p> <p><div class="snippet" data-lang="js" data-hide="true"> <div ...
3
1,684
To UNION or Not to UNION
<p>I am currently running into an issue with my UNION clause. I am trying to figure out how many orders I am import via each day. The problem is, I have two tables that these orders are stored in OLDORDERHEADER and ORDERHEADER. After an order is completed, it moves from the ORDERHEADER table into the OLD. Both have the...
3
1,906
Image Isn't Properly Sizing in GridBagLayout
<p>I am attempting to resize an ImageIcon and use it in my GridBagLayout JPanel. It does resize... but it still also displays at full size. So you have a resized image inside of the larger image. Anyone see anything glaringly wrong with the code below? Thank you! </p> <pre><code>public CharacterPage(WikiDB db) throws ...
3
1,155
undefined is not an object global.performance.now in expo react native project
<p><a href="https://i.stack.imgur.com/qp4cu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qp4cu.png" alt="1" /></a></p> <p>I'm trying to run the app using the expo start command. It worked fine so far but today it's showing like this.</p> <p>Any help would be greatly appreciated! :)</p> <p>These ar...
3
2,511
Dropzone getAcceptedFiles content data?
<p>How can I get the content of a file when processing files manually with getAcceptedFiles in a separate function? Every image returns a dataURL with base64 which is good and allows me to upload photos to my node serer successfully. But any other file (ie: video, pdf, doc, etc), returns no dataURL. I found and did tr...
3
7,272
How to change the color of result text dynamically by adding if-else statement? currently I am not able to add if-else inside text widget
<p>This is where I'm sending the result texts to Result class:</p> <pre><code>calculateButton( btnColor: _BtnColor, txtColor: Colors.white, text: buttonText, width: ScreenUtil().screenWidth, height: 0.06.sh, ...
3
1,467
Detecting cardboard Box and Text on it using OpenCV
<p>I want to count cardboard boxes and read a specific label which will only contain 3 words with white background on a conveyer belt using OpenCV and Python. Attached is the image I am using for experiments. The problem so far is that I am unable to detect the complete box due to noise and if I try to check w and h in...
3
1,803
How should I reconfigure the arrow "->" to not print when done with with my pathing?
<p>I'm trying to create an optimal path to collect as many 1's as I can but after I execute my code, I still have an arrow pointing to nothing as there are no more places to go. How would I remove the arrow at the end of the code?</p> <pre><code>import java.util.Arrays; import java.util.Scanner; public class Main{ p...
3
1,288
How to select a record from an array in MongoDB collection
<p>I'm new to MongoDB.</p> <p>Just created a collection named as <code>datasets</code> and inserted one big json in it.</p> <p><strong>Document :</strong></p> <pre><code>{ "_id":ObjectId( "5e1f2b248eebbe6d289d53c6" ), "countries":{ "country":[ { "area":9596960, "citie...
3
6,244
My Android App is crashing when downloaded from the Playstore but when I run it from Android Studio into any device it works normally
<p>During development I changed the android dependencies from android to androidx</p> <p>If I install the app from Android Studio to any device the app work just fine, but when I download the same version of the app from the playstore it crashes on the First Activity OnCreate method when setting the content layout</p>...
3
2,860
how do i print out array values in outside a function it has been modified
<pre><code>void sort(int values[], int n); void modify_all_aray_values_to_0(int value[], int array_size); int main(void) { int aray[] = {4,2,56,2,1,7,20,9,3,5,6,4,3,2,44,57}; int size_of_aray = sizeof(aray)/sizeof(aray[0]); sort(aray, size_of_aray); printf("\n"); } void sort(int values[], int n) { ...
3
1,568
div:hover works oddly in IE-8
<p>I know that this might be ridiculous and you might say why you are trying to invent the wheel but this is what I am currently doing as an experiment which will help me in future projects and currently it is totally of no financial profit for me.</p> <p>the whole concept is:</p> <ul> <li><p>I wrote a piece of code ...
3
1,094
how to call a fragment on menu drawer?
<p>I am new at android and i am making a dictionary app with youtube tutorials, android.com, stackoverflow etc. for trainig. Now i have an issue with main drawer. I am gonna try explain with pics.</p> <p><a href="https://i.imgur.com/s9EjAna.jpg" rel="nofollow noreferrer">https://i.imgur.com/s9EjAna.jpg</a></p> <p>Whe...
3
5,102
Layout Manager and Positioning
<ul> <li><p>how to stick JLabel in GlassPane to rellative, floating coordinates from JProgressBar without using ComponentListener or another listener, </p></li> <li><p>is there built_in notifiers in Standard LayoutManagers that can notify about its internal state, and can be accesible for override, instead my attempt w...
3
1,404
MapView ClassCastException
<p>Here's the LogCat content :</p> <pre><code>02-25 15:57:42.481: E/AndroidRuntime(1327): FATAL EXCEPTION: main 02-25 15:57:42.481: E/AndroidRuntime(1327): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hs.hospitalfinder/com.hs.hospitalfinder.MainActivity}: android.view.InflateException: Binary...
3
1,860
Javascript merge two objects
<p>I am looking for a javascript <code>function</code> like PHP <code>array_merge_recursive()</code>. From what I've read, there is no such thing in javascript, and I want to know how I can implement something similar.</p> <p><strong>The problem:</strong></p> <p>I have two <code>objects</code>:</p> <pre><code> var o...
3
1,676
Cycling through an Access recordset provides an incorrect count
<p>I've added VBA code (below) to cycle through the results of an Access query. The intent of this code is to count the number of times 500 appears in a specific column. Once it hits 500, it grabs the time and adds 30 minutes. The client doesn't want any 500 counted again in they appear in a 30 minute window.</p> <p...
3
1,047
How to push selected objects from an array of objects into one array of objects
<p>I have this object which has many elements such as a couple other objects within the array.</p> <p>There are Two Arrays:</p> <p>array of objects1:</p> <p><a href="https://i.stack.imgur.com/WJDZQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WJDZQ.png" alt="enter image description here" /></a></p...
3
2,182
Identifying the columns having duplicate column value with Different column name in python
<p>How to identify the columns in a data frame with same column_value But with different column name , we need to list both the column , here i am able to list only one of them. </p> <pre><code> from pandas import DataFrame import numpy as np import pandas as pd raw_data = { 'id': ['1', '2', '2', ...
3
1,066
Can't Play mp3 file with JavaFX
<p>I'm trying to play a mp3 file on click of a button but <code>com.sun.media.jfxmedia.MediaException: Could not create player!</code> gets thrown.</p> <p>When I tried this with a song with spaces in it's file name it threw an <code>illegal character</code> exception</p> <p>Here's the code: </p> <pre><code>@FXML voi...
3
2,875