title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
i want to swap 2x2 matrix elements using beautiful-dnd ,but when i map them them it makes 2 colum
<p>I want to swap two arrays item using dnd or beautiful dnd I need help with it</p> <pre><code>const [state, setState] = useState([ [&quot;1&quot;, &quot;2&quot;], [&quot;3&quot;, &quot;4&quot;], ]); </code></pre> <p>here's my code when I map it creates tow columns and in each column, it shows 2 elements, there a...
3
1,210
How do I call 2 or more asynchronous methods in Actions on Google intent fulfilment V2
<p>I had managed to call these 2 methods (geocoder.reverse, timezone.data) one after the other successfully in V1 DialogflowApp, but I am now upgrading to V2, and can't seem to get both asynchronous method calls right. Please help. I use these packages respectively </p> <ul> <li><a href="https://www.npmjs.com/package/...
3
1,622
jquery submit() ignores changes to input tags
<p>I have a jquery.submit() event handler. What I am trying to do is to catch the submit, and based on certain criteria, modify some of the values (actually, wipe them blank) of the input tags on the submitted form. When I step through with a debugger, I see that the fields are correctly being modified, but once the fo...
3
1,995
Matlab: how I can reduce the execution time of this program?
<p>How can I reduce the execution time of this program:</p> <pre><code>h=50; w=10000; output=zeros(h,w); i=1; while i&lt;=w temp=randsample(numel(prob),h,true,prob); check=all(any(ismember(vec,temp))); if check~=0 output(:,i)=temp; i=i+1; end end </code></pre> <p><code>vec</code> is a ...
3
1,926
How to get STM32F446 running at 180 Mhz?
<p>I'm trying to get the STM32F446 running at full speed, following this tutorial: <a href="https://www.youtube.com/watch?v=GJ_LFAlOlSk&amp;t=826s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=GJ_LFAlOlSk&amp;t=826s</a> i did everything he does, but the clock speed of my timers is DEADLY slow, like literal...
3
1,082
Dash plotly Datatable column filtering or cropping
<p>I have implemented a live-update datatable to correspond with a live-update graph. Functionally, both work very well. I do have a problem with filtering the datatable to include certain columns and exclude others. For ex. If the graph is zoomed in for certain x-value (09:00-10:00), is there any way I can also crop t...
3
1,904
How can I create columns from rows in a pandas dataframe (Python 3.7)?
<p>I would like to restructure a pandas dataframe from long to wide according to the data in the dataframe rows. I have a pandas dataframe of the following form:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>item_type</th> <th>item_content</th> <th>meet_mins_content</th> </tr> </thead> <t...
3
1,642
sharey by row in pandas df
<p>I use pandas dataframe to plot various histograms with function:</p> <pre><code>result_number.plot.hist(subplots=True,legend=False, layout=(6,2), bins=35, figsize=(10,13), sort_columns=False, color="gray") </code></pre> <p><a href="https://i.stack.imgur.com/pjJDe.png" rel="nofollow noreferrer"><img src="https://i....
3
1,270
Perl CGI::Simple under PSGI
<p>I am using CGI::Simple in a simple application that I want it to support PSGI, I am not going to use any ready made frameworks, I did a lot of search a bout PSGI support for CGI::Simple but did not find any module on CPAN. By luck I found someone on <a href="http://d.hatena.ne.jp/tociyuki/20100131/1264918747" rel="n...
3
2,974
On select duplicate complete fieldset of form with select and checkboxes
<p>There is an order form with a fieldset called "Samenstelling". That fieldset contains a dropdown select with numbers called "How Much".</p> <p>If the number 2 is selected all other fields in that fieldset must appear twice, if the number 3 is selected all fields must appear in triple.</p> <p>The fieldset that must...
3
3,721
Set new reference-column after matching values
<p>i have problems finding a solution.</p> <p>lets assume i have the following input.</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Identicator</th> <th>Description</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>A</td> <td>Acc1</td> <td>30</td> </tr> <tr> <td>A</td> <td>Acc2</td> <td...
3
1,522
No adapter attached skipping layout in recyclerview using fragment
<p>I got an error in recycler view using fragment. I have read stackoverflow answers but it not solve. PLease help me. </p> <p>Recycler reference tutorial <a href="http://www.android-examples.com/android-recyclerview-listview-with-imageview-textview-json/" rel="nofollow noreferrer">http://www.android-examples.com/andr...
3
2,732
Uncaught syntax error in fizz buzz code in Ruby
<p>Can't figure out my syntax error. From my reading it's expecting an end keyword?</p> <p>I've include the rspec file that is testing my code in addition to the error statement and code. thanks any and all who help!</p> <pre><code>def fizzbuzz(int) if int % 3 == 0; puts "Fizz"; if int % 5 == 0; puts ...
3
1,397
Web API runs on Visual Studio but not when deployed on IIS
<p>I'm doing some research on integration with CIDR/Aadhaar systems (Indian system for unique identification of individuals). I chose the Nuget package which was the only available option that I found. The package data is present <a href="http://souvikdc9.github.io/aadhaarapi.net/" rel="nofollow noreferrer">here</a>.</...
3
1,495
MediaWiki Query and/or WikidataQuery to find Wikipedia article
<p>This isn't so much a question abut AngularJS as it is about the Wikimedia and Wikidata query API's. </p> <p>Although I am trying to display the content of a Wikipedia article in AngularJS after doing a certain query that isn't the problem. I already know how to display it... the problem is the search for an article...
3
2,444
Is it possible to open a file using a similar name from a database?
<p>So when I click a button ("Open Lesson") a JFrame from a different class will appear (using .setVisible(true)). In that JFrame there is a JTable (tblOpenLesson), and two buttons (btnOpenLesson and btnCancel).</p> <p>now what I want to happen is that when I click the Open Lesson Button it will do the following: 1. U...
3
2,966
OpenMP double for loop array with stored results
<p>I've spent time going over other posts but I still can't get this simple program to go. </p> <pre><code>#include&lt;iostream&gt; #include&lt;cmath&gt; #include&lt;omp.h&gt; using namespace std; int main() { int threadnum =4;//want manual control int steps=100000,cumulative=0, counter; int a,b,c; float dum1, dum2, ...
3
1,172
Replacement Character appearing in my colored output
<p>I've got a strange problem I can't seem to diagnose effectively. I wanted a simple tool that could take a BufferedImage and print it to a console for my class. In relpit, the console's font uses perfect 2-1 characters, so to print a pixel, you only need to print two spaces with a certain background color.</p> <p>Thi...
3
1,327
Can't call class functions from main, "is not a function" error
<p>I'm attempting to learn react by creating a simple weather app which uses api requests to get the data. The api requires a location key which can be obtained through another function. this means i have to return and then pass the key along to the next function but I seem to be having some trouble doing this!</p> <b...
3
1,129
Python - Shift/Delete Elements in a 2-Dimensional Array
<p>I need help with shifting and deleting elements in a 2-dimensional array. </p> <ol> <li><p>If the value in a list is negative and their is a list above it with positive values in the same location. It should shift everything down, causing the negative values to disappear. </p></li> <li><p>If there isn't any list ab...
3
1,113
Mongoose Foregin Key mapping
<p>I'm new to MongoDB/Mongoose and trying to figure out how to map relationships between Schema. I don't think issue is with .populate(). At creation of new user and clients, I do not see the relationship reflected in collection</p> <p>User (login via local/social) has many Clients. A set of Clients belong to 1 User <...
3
1,171
Without Regex: String Between Quotes?
<p>I'm creating a word-replacement script. I've run into a roadblock with ignoring strings between quotes and haven't been able to find a decent solution here that didn't involve Regex.</p> <p>I have a working snippet that cycles through every character in the string and figures out whether the most recent quotation w...
3
1,899
Why does my heap sort not work when I use the array of more than 10? c#
<p>Code:</p> <pre><code>class Program { static void HeapSort(int[] array, int n) { for (int i = n / 2 - 1; i &gt;= 0; i--) Heapify(array, n, i); for (int i = n - 1; i &gt;= 0; i--) { int temp = array[0]; array[0] = array[i]; array...
3
1,271
Qt cross compilation from x86 Ubuntu to ARM Beagle Bone almost finished with strange mistake R_ARM_THM_MOVW_ABS_NC
<p>I already spent lots of time on trying to crosscompile Qt 5.2.1 (as a recommended and stable one) from my x86 Ubuntu to ARM Beagle Bone Black. After about 20 minutes the compilation ends with a strange mistake. This is the end of the compilation console output:</p> <pre><code>rm -f libQt5Core.so.5.2.1 libQt5Core.so...
3
3,916
Database context didn't see any records in datatable in base
<p>I'm creating an ASP.NET MVC application which uses a PostgreSql database. Model classes are in a different class library. For access to database I'm using Entity Framework + Npgsql.Entityframework in the class library. Also i added same links to main project. Configuration settints are in web.config of main project...
3
1,144
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client - Nodejs, Nginx, SSL, Unbuntu
<p>Some posts address the solution to add a return statement to the request handlers. I tried to apply this advice without success. when running server.js, I am getting the data of the GET request before the error is thrown. In the browser application, only the property (q.questionid and q.question) is displayed.</p> <...
3
1,946
AVX calculation precision
<p>I wrote a program to display the mandelbrot set. To speed it up, I used AVX (really AVX2) instructions through the <code>&lt;immintrin.h&gt;</code> header.<br> The problem is: The result of the AVX computation (with double precision) has artifacts, and it differs to the result when computed using "normal" doubles.<b...
3
2,457
How to get swimming data using samsung health app
<p>I want to get <code>swimming</code> data from <code>Samsung Health App</code> but not get any proper solution. Below is my code.</p> <pre><code> public class SwimmingReport { private final HealthDataStore mStore; private SwimObserver swimObserver; private static final long ONE_DAY_IN_MILLIS = 24 * 6...
3
1,113
Flutter stopped suddenly with error Dart:core is missing
<p>My flutter sdk on Android studio suddenly stopped working without any changes made. I am using mac book pro and the error is:</p> <blockquote> <p>Required library 'dat:core' is missing.</p> </blockquote> <p>I have tried downloading new flutter sdk and also update Android studio but still the same problem</p> <p...
3
1,310
Python/C API can't import urllib2 library
<p>I have to parse a HTML url and return a list of url to use a recursive method of parsing. I'm using BeautifulSoup on Mac OS and I have a problem to import <code>html_parser.py</code></p> <p>html_parser.py :</p> <pre><code>#!/usr/local/bin/python2.7 from bs4 import BeautifulSoup import urllib2 def link_list(urlSt...
3
1,475
Formatting parsed output perl
<p>I have this file - all I need is the last five lines from the file. I know that I am not supposed to parse html without a html module. but this is not really like a program strict - I mean all I really need is the last five lines or so. Besides I cannot download any modules. I do have access to the proxy server whic...
3
1,912
React Table not displaying new data
<p>I am retrieving data from mongoDb via GET API for different values. But when the data gets populated for one value, it does not populate the table with new data for new value. The table just displays old data for old value, even if I am receiving new data for new value from the back end. Below is my code :</p> <p><s...
3
3,733
How to use Apache Beam DSL APIs?
<p>I am trying to implement the DSL API example from the <a href="https://beam.apache.org/documentation/dsls/sql" rel="nofollow noreferrer">Apache Beam documentation</a>. I am using the newest versions of the apache beam libraries (2.4.0)</p> <p>The code I am running is the same as in the docs:</p> <pre><code>@Rule p...
3
1,739
Android: error in putting open gl object on camera view
<p>I'm trying to put an object on camera view using open gl, it works good on emulator but when I test it on real android device the camera view or open gl object does not be shown.</p> <p>this is my MainActivity class</p> <pre><code>public class MainActivity extends Activity { // Our variables CameraPreview cv; GLS...
3
2,170
Translating Windows absolute path to Java
<p>I have a file named dog.jpg that resides in c:\Temp. So its full Windows path is C:\Temp\dog.jpg</p> <p>Every answer on this site suggests to replace the \ with a /, but none of these statements I tried seems to work:</p> <pre><code>Image image = new Image("C:\\Temp\\dog.jpg"); Image image = new Image("C://Temp//d...
3
1,092
Query Indicator column group by condition and value column
<p>I have a table shown below:</p> <pre><code>id | aspect | indicator | condition | value | description 1 | Aspek 1| indicator1 | condition A | 1 | Poor 2 | Aspek 1| indicator1 | condition B | 2 | Good 3 | Aspek 1| indicator1 | condition C | 3 | Perfect 4 | Aspek 1| indicator2 | condition ...
3
2,404
Java Multithread, Multi-Client Server- Client not executing run method
<p>Trying to get better at Java, I'm attempting to create a mutlithreaded Client &amp; Server messenger, in which a Client sends a message to the Server, and the Server then redirects &amp; sends the message to the user the first client wanted to send it to. I've also been researching a lot about concurrency and multit...
3
2,609
Python Traceback (most recent call last)
<p><strong>Craps is a popular dice game played in casinos.</strong></p> <p><strong>Write a python program to play a variation of the game as follows:</strong> <em>Roll two dice. Each die has six faces representing values 1, 2, 3, 4, 5, and 6. Check the sum of the two dice. If the sum is 2, 3, or 12 (called craps), you ...
3
1,221
method does not work after publication (asp.net-core)
<p>I have a method that does not work after publication on Windows Server 2016.</p> <p>ASP.NET CORE 2.0 - MVC</p> <p>Publish method: File system.</p> <p>So my reputation is low and i cant added image...</p> <p>I have DataBase with table:</p> <pre><code> ETP_Main (ETP_MainId , ..., ... ) ETP_Title (ETP_TitleId, ET...
3
1,421
Cannot fetch data from room database to Spinner
<p>This app is to fetch data from api.github.com/users and reflect on spinner </p> <p>I am getting data in logs on <code>Splash.java</code> but unable to reflect data on <code>Home.java</code></p> <p>MyAppDatabase.java</p> <pre><code>@Database(entities = {Users.class}, version = 1, exportSchema = false) public abstr...
3
2,723
How to display modal instead of alert
<p>This is the modal pop-up I want to show when a user selects on a button and he is not logged in. </p> <pre><code> &lt;!--You must be logged in--&gt; &lt;div class="modal fade" id="must-be-logged-in" tabindex="-1" role="dialog" aria-labelledby="Log-In" aria-hidden="true"&gt; &lt;div class="modal-...
3
1,300
fix_location_header in Django causes wrong redirection to LOGIN_URL
<p>I am trying to send an oauth request from another application to Django. Django is hosted on 8000 port and the application on 8080. Here is the URL called from the application:</p> <pre><code>http://localhost:8000/o/authorize/?client_id=MM8i27ROetg3OQv60tDcJwp7JKXi28FqkuQgetyG&amp;response_type=token&amp;redirect_u...
3
1,855
Dynamic graph out of realtime data in python
<p>I have a pandas dataframe (<code>total_df</code>) that combines a static dataframe (<code>df0</code>) with a dataframe (<code>reduced_rdf</code>) created out of realtime dictionaries (<code>d1</code>). The code is:</p> <pre><code>rdf = pd.DataFrame() while True: for D in (d1): rdf1 = pd.DataFrame(d1).T red...
3
1,961
Azure Devops: Universal Publish uploads 0 mb
<p>What's the best way to verify that a universal publish task actually uploads an artifact &gt; 0mb, instead of an empty artifact?</p> <p>For example, I had a job that was downloading a pipeline artifact from a previous job, then checking for various criteria, then uploading the previous job's artifact as a universal ...
3
1,049
ast.py error when Caching Web tiles from a service
<p>I am working on creating cached tiles from our server, for people to load into mobile apps and use offline.</p> <p>I keep running into ast.py errors on line 44, which is the finishtime = time.clock(). But even when i remove the line for creating reports, i continue to get other ast.py errors.</p> <pre><code>SyntaxE...
3
1,105
Issues with a single image skybox
<p>I've been searching a lot for a way to create a skybox using one single image as a texture map. </p> <p>I found a UV Mapping tutorial, but the results generated black lines in the edges of positiveY and negativeY planes in the box, as shown <a href="http://i.stack.imgur.com/7NPq9.jpg" rel="nofollow">here</a> and <a...
3
2,436
How to display all posts in a blog application using Rails 3?
<p>I am trying to implement a blog application in my app.But i am getting the following error after saving the posts.</p> <h1>Error:</h1> <pre><code>NoMethodError in Homes#blog Showing C:/Site/library_management1/app/views/homes/blog.html.erb where line #19 raised: undefined method `name' for #&lt;Array:0x21896a0&...
3
2,915
Upload images using form data and return to front end in React js
<p>I am using nestjs and react js to make an image uploader. For react i use this:</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-js lang-js prettyprint-override"><code> const props = { onChange({ file, fil...
3
1,340
How do I convert a scrolling view into a ListView in Flutter?
<p>I have a scrolling view of a few cards in a stack. Upon scrolling the card selected disappears. I want to retain this card and the consequent card and have all of them displayed in a ListView and not disappear. I saw this feature implemented in this repository and it looks like this: </p> <p><a href="https://i.sta...
3
1,872
How to set different sounds to different notification?
<p>I want to set a different notification sound to a notification depending on it's content. I have set a working sound if the title of the notification contains number "1", "2", or "3". However, the sound must be different if the title contains "acknowledge", but it's not working, the alarmsound is still the one ringi...
3
1,199
I Used A Method Before, and Now That Same Method isn't working
<p>Here is my code.</p> <pre><code>string HCoffees; cout &lt;&lt; &quot;\nPlease choose one of these hot coffees. Type your selection here: &quot; &lt;&lt; flush; while (cin.get() != '\n') ; getline(cin, HCoffees); cout &lt;&lt; &quot;\nNow at...
3
1,225
How to get Wordpress frontent widget get/post example working on the front end and back end?
<p>I was unable to get my wordpress widget to post forms correctly. I took the advice on this website and researched the issue (see relevant links at the bottom of the post) to see what the problem was. The first issue was that I could not use "name" for a field. I needed to make sure that the posted name was unique...
3
9,813
Java swing applet freezes when button run
<p>This is code I wrote for an applet using swing. The program lets the user enter any extra items (peripherals), which shipping method they want to use, and then allows them to push buttons that calculate their total costs either with or without shipping depending on the button they push. The problem is, when I run i...
3
1,924
Set Actionbar overlay from SherlockFragment
<p>I want to set <code>ActionbarOverlay</code> feature from within my <code>SherlockFragment</code> class. Can any one please tell me, how can I do this?</p> <p>I've tried by adding line <code>getSherlockActivity().requestWindowFeature(Window.FEATURE_ACTION_MODE_OVERLAY);</code> in <code>OnCreateView</code> method.</p...
3
1,109
NullPointException error when setting attributes
<p>I'm getting a NullPointerException error at line 77 <strong><code>lblNewLabel.setVisible(false);</code></strong> which is called from line 65 <strong><code>runTest();</code></strong> in the following code. (This is a dummy project I wrote to simulate a problem I'm having in a larger project). What I'm trying to d...
3
1,573
JavaFX - Had java.lang.reflect.InvocationTargetException when executing JavaFX WebView Example code
<p>I want to try out the feature of webview in my javafx project, but I kept having java.lang.reflect.InvocationTargetException, so I even tried out the sample code for WebView from jenkov.com, I still couldn't run the application. Is there anything wrong with my configurations or is it something else? </p> <pre><code...
3
2,337
Parsing xml in C# with attribute name
<p>I have a xml which i get in response but sometimes some attributes are not coming so I am facing exception while parsing as I am using childnode I don't know how to parse using attribute can anyone help.</p> <p>xml is:</p> <pre><code> &lt;?xml version="1.0"?&gt; &lt;aws:UrlInfoResponse xmlns:aws="http://ale...
3
13,206
Fail2Ban unbans after 10 minutes. bantime none warning?
<p>having a bit of an issue with fail2ban filters, for some reason it unbans after 10 minutes even though I set the ban length to one year. Could you assist a brother out?</p> <p>jail.local declaration for filters:</p> <pre><code>[nginx-proxy] enabled = true #port = http,https action = iptables-multiport[name=N...
3
1,028
Gmail contextual Gadget - does not support reference JS and CSS?
<p>I was trying to create a Gmail Contextual Gadget and get to know that it doesn't support referencing JS and CSS files. It doesn't load Javascripts and CSS. I have to copy paste the whole CSS and Javascript then only it works. </p> <p>Please find my code below : It is just to display tabbed layout in gadget. </p> <...
3
3,071
resample and groupby on big dask array with xarray - using map_blocks?
<p>I have a custom workflow, that requires using <code>resample</code> to get to a higher temporal frequency, applying a <code>ufunc</code>, and <code>groupby</code> + <code>mean</code> to compute the final result.</p> <p>I would like to apply this to a big <code>xarray</code> dataset, which is backed by a chunked <cod...
3
1,517
How can I fully parse json into ElasticSearch?
<p>I'm parsing a mongodb input into logstash, the config file is as follows:</p> <pre><code>input { mongodb { uri =&gt; &quot;&lt;mongouri&gt;&quot; placeholder_db_dir =&gt; &quot;&lt;path&gt;&quot; collection =&gt; &quot;modules&quot; batch_size =&gt; 5000 } } filter { m...
3
1,613
Pinterest API: Cannot access 'Metadata' object property, even though other properties are accessible
<p>I am working with the Pinterest API. I can access all of the data returned from my response EXCEPT the metadata object property. This is my code to get the Pins Data:</p> <pre><code>let boarddata = []; axios .get(`PINTEREST_API_URL`) .then( function(response) { boarddata = response.data.data; ...
3
1,502
Changing ControlTemplate when button clicked Wpf
<p>I have the following simple XAML file:</p> <pre><code>&lt;Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WpfApplication4" Height="300" Width="300"&gt; &lt;Window.Resources&gt; &lt;ControlTempl...
3
1,285
XHR For Loop - Unexpected End of Input Error
<p>I am attempting to make multiple XHR requests to download a total of 3 JSON feeds. Unfortunately I am only able to get one transferComplete() to execute before I get hit with a unexpected end of input error. I have checked my syntax and as far as I can tell it looks good. Why is this happening?</p> <pre><code>funct...
3
1,051
Update PayPal Express Checkout Payment with orderId before executing payment
<p>So I made my research online, but I can't find any great explanation on how to use <code>Patch</code> method from the classes PayPal give for express checkout.</p> <p>My checkout process work in 3Steps. </p> <p><strong>Step1</strong> The page where everything begin is a simple "Cart Viewer page", Where there is a ...
3
1,128
cx freeze and multiprocessing.map_async spawning main thread instead of function
<p>I have an multiprocess GUI application that works flawlessly when invoked using python on Mac. <br> For spawning my processes, and running the function <code>func</code> asynchronously, I'm using <code>multiprocessing.pools</code>:</p> <pre class="lang-py prettyprint-override"><code>def worker(self): calula...
3
2,783
Linq Where clause eventually results in NullReferenceException
<p>I have a website hosted in IIS. I am caching values in a repository to save numerous trips to the database. The cache is instantiated at the top of the repo like so:</p> <pre><code>protected static List&lt;MaxDeposit&gt; _cached_values = new List&lt;MaxDeposit&gt;(); </code></pre> <p>When a call is made to retrieve ...
3
1,128
Returning a 2D dynamic array from a fuction
<p>I need some help with returning a 2d dynamic array(matrix) from a function. The function takes the matrix inputted and finds the transpose and returns the matrix. My main takes the number of rows and columns the user wants and then takes the entries for the matrix. Then I call my function and try to hold it in anoth...
3
1,197
Auto resize pyqt widget without putting it in a layout
<p>I'm trying to overlay two QWidgets and have them both resize automatically when the window size is altered.</p> <p>The background QWidget shows a grid with co-ordinates, the foreground QWidget contains other widgets (buttons etc). These are both set as children to the same QWidget. If I don't use a layout I can ge...
3
1,247
Missing argument in Class
<p>i am quite new at Object oriented Programming and i can't manage to find why this practice project I have is wrong. It keeps giving me the folliwng error message:</p> <p>"Warning: Missing argument 2 for Character::__construct(), called in C:\Users\User\Documents\NetBeansProjects\PhpProject3\poo_bdd\connect_bdd.php ...
3
2,572
Random character generating instead of GS character, in swing when scanning GS1 data matrix barcode with a small delay
<p>I have created a simple swing app with input text to read the barcode and print the GS character position in output text.</p> <p>EX:</p> <p>input : 01070462616434291722010010Y0238921MA3W7J59UC2W111 (get from barcode scanner)</p> <p>output: GS1 on position = 32</p> <p>Normal swing app its working properly but when cr...
3
1,964
How to toggle between two components by using v-if directives in vue.js?
<p>i have two components Register.vue and Login.vue ,Register.vue is responsible for registration it will contain two headings like Login and Signup ,if the user clicks on Login heading inside the Register page it's automatically hide the Signup(Register.vue) component and it displays the Login.vue , upto this it's wor...
3
5,546
Mapping two arrays of hashes to a new data structure
<p>I am trying to take two arrays of hashes, and convert them to a single data structure. This new structure will be hashref, where the value to each key is an array of hashes.</p> <p>Below are the two structures I'm converting - which are the result of selectall_arrayref with the slice parameter on two seperate querie...
3
4,691
Method pow does not exist error Pyspark error
<p>This is a bit strange.</p> <p>When I create a dataframe and then do some transformations with the function pow, it works. But when I push it to run in a real world scenario, it does not. The datatype of columns in my dummy and the real world scenario is the same</p> <p>Error</p> <pre><code>Method pow([class java.lan...
3
2,734
php dom create element but self-closing
<p>I want to create a html block, like this:</p> <pre><code>&lt;media&gt; &lt;media-reference source='15.jpg' /&gt; &lt;media-caption&gt;caption&lt;/media-caption&gt; &lt;hasSyndicationRights&gt;1&lt;/hasSyndicationRights&gt; &lt;licenseId&gt;1&lt;/licenseId&gt; &lt;licensorName&gt;name&lt;/licenso...
3
1,029
Runnable wont stop
<p>I am making a game where if the player intersects with bear, it will stop the runnable thread. but somehow it wont stop at all. So when player intersects with bear, the player should be dead. the dead loop is called but it will not stop the runnable. I made the runnable loop as below </p> <pre><code>protected vo...
3
1,337
jQuery mobile Listview overflow not working
<p>I have this HTML page. (I use jQuery mobile 1.3.1)</p> <p>It should be something like a little chat-window. The problem I have is that, when you look at the <code>&lt;li&gt;</code> elements, this <code>&lt;ul data-role="listview"&gt;</code> element should be scrollable. But, for some reason it simply isn't scrolla...
3
1,294
OpenMP parallelize but not accelerate code
<p>I've been trying to accelerate the following code</p> <pre><code> void calcstiffTestOMP(TPZCompMesh *cmesh,int nthread){ int64_t nelem = cmesh-&gt;NElements(); omp_set_num_threads(nthread); auto beginCalcStiff = std::chrono::high_resolution_clock::now(); int s=0; #pragma omp parallel for reduction(+...
3
2,682
different behavior es6 Proxy on NodeJs and Web when return in class constructor that extends
<pre class="lang-js prettyprint-override"><code>import * as Parse from 'parse'; import { Object as ParseObject } from 'parse'; export interface IItem { num: number; } export class Item extends ParseObject&lt;IItem&gt; implements IItem { num = 1; constructor(attributes?: IItem) { super('Item', attributes!); ...
3
1,251
How to get the before and after of selected text input
<p>I am trying to implement <strong>Bold</strong> and <em>Italic</em> in Jquery with stars and underscores (like in whatsapp). By using <a href="https://github.com/madapaja/jquery.selection" rel="nofollow noreferrer">Madapaja's Selection Library</a>, I can add stars or underscores, but I cannot figure out how to remove...
3
1,408
Retrieve specific field based on structure of file, awk
<p>MyFile:</p> <pre><code> 1 Cufflinks exon 162752 163607 . + . gene_id "XLOC_000001"; transcript_id "TCONS_00000001"; exon_number "1"; oId "CUFF.1.1"; class_code "u"; tss_id "TSS1"; 1 Cufflinks exon 177199 177399 . + . gene_id "XLOC_000002";...
3
1,343
Bracket Error in New User Sequence
<p>I Am currently working on a small project for myself which allows me to create new user to a database. Everything was going well until I noticed that one of my brackets on the code is displaying an error. Which is strange due to I checked I closed all of my brackets. If someone could see the missing bracket or help ...
3
1,028
Php Goo.gl Url Shortener In Mysql_Fetch_Array
<p>im trying to use Goo.gl class(url shortener) in my mysql query.</p> <p>im getting 10 line from database via mysql_fetch_array; and need to create url for all lines.</p> <p>as like this:</p> <pre><code>while ($f = mysql_fetch_array($q)) { $short_url = $googl-&gt;shorten("http://www.example.com/$f[news]"); echo $s...
3
1,174
Jquery AJAX post to PHP not work
<p>This is jquery</p> <pre><code>$(document).ready(function () { $('#Main').change(function () { var Sel = $(this).val(); console.log(Sel); $(".Subselect").hide(); $(".lastSel").hide(); $("#" + Sel).show(); $.ajax({ type: "POST", url: "test.ph...
3
1,683
Docker 1.7 consuming more space than Docker 1.5 for images
<p>Initially i had docker 1.5 installed in <code>ubuntu Trusty</code> via Vagrant.</p> <p>Then i created new <code>Ubuntu Trusty</code> and now the docker version is <code>1.7</code>.</p> <p>I tried building Image of my Postgres Container with this Dockerfile</p> <pre><code>FROM ubuntu:trusty RUN echo "deb http://...
3
1,039
How to deploy "Verily Pathfinder Virtual Agent Template for COVID-19"
<p>I would like to try &quot;Verily Pathfinder Virtual Agent Template for COVID-19&quot; (<a href="https://github.com/GoogleCloudPlatform/covid19-rapid-response-demo" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/covid19-rapid-response-demo</a>)</p> <p>I tried it, but had some difficulties. Could you...
3
8,467
Relative position in andengine
<p>Im trying to make a body move when you touch the screen. Left if you touch left from the sprite and right if you touch right. The bug i have is that that the body only moves a distance equal to the distance of the touch from the Sprite.</p> <p>And the way to fix this i understand is by modifing the touch event by t...
3
1,038
PayPal C# .Net SDK Credit Card payment sample null reference exception
<p>Thank you for looking at my question.</p> <p>I'm trying to make use of the PayPal SDK. As soon as:</p> <pre class="lang-cs prettyprint-override"><code>payment.Create(apiContext) </code></pre> <p>executes, it crashes stating:</p> <pre class="lang-none prettyprint-override"><code>An exception of type 'PayPal.PayPa...
3
3,875
Send an acknowledgment to the method call using a Boolean variable (here sent) in Kafka Producer
<p>I'm implementing a sendStringMessage method that returns true if the message is being sent to the topic. But I'm getting error( as indicated in code) Local variable sent defined in an enclosing scope must be final or effectively final. Or can we create a custom callback function that returns a boolean when the messa...
3
1,132
How to structure the code to return certain members only
<p>I would like to ask how can I structure the code so that when user (main program) indicates no apple (<code>hasApple = false</code>), user will not be able to access <code>fruitMenu.Apple</code> or <code>fruitMenu.ApplePrice</code>.</p> <p>I wanna make the program to behave in a scenario that if there is not apple, ...
3
1,330
Javascript in <th> element
<p>I have a HTML and I want to put 2 TH, the second one will be to select all the checkboxes of the rows. But when I click nothing happens.</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-html lang-html prettyprint...
3
1,063
Java Socket - Inverse Communication
<p>I have many clients that are waiting for server messages. So the client make accept() and wait for server. When server have messages, open a connection to the client and send messages, after that, close the communication and the cycle restart.</p> <p>I've seen usually the inverse approach, where the server do accep...
3
1,235
How can I release a CVPixelBuffer after passing it to CoreImage/UIKit in Swift?
<p>I'm using <code>CVPixelBufferCreateWithBytes(_:_:_:_:_:_:_:_:_:_:)</code> to read a 24-bit BMP from disk:</p> <pre><code>var data = try! Data(contentsOf: url.appendingPathExtension(for: .bmp)) data.withUnsafeMutableBytes { (unsafeMutableRawBufferPointer: UnsafeMutableRawBufferPointer) in var pixelBuffer: CVPixelBu...
3
1,132
User Input from HTML form being cut off
<p>We have an HTML form that takes in user input for an application, and uses PHP to process and send it to HR. The issue is it cutting off the text in the final result (picture below). There are no text limits set anywhere. Any help or ideas would be greatly appreciated.</p> <p>Parts being cut off: <a href="https://i....
3
1,956
Don't display conditionalPanel when condition is wrong
<p>I try to create some shinyapp. I need to update sidebarPanel depends on condition received in server.R. The current code is shown below.<br> <strong>ui.R</strong></p> <pre><code>library(shiny) main_mat &lt;- matrix(data = c(1, 11, 3, 13, 12, 4, 8, 2, 3, 5, 14,...
3
1,127
How to select the divs with the same class name using the jQuery?
<p>I have this code, I am trying to add an additional class &quot;active&quot; to all of the elements with the same class inside the experts-list div.</p> <p>I want if someone clicks on the heading Athletes then an additional class &quot;active&quot; should be applied on Athlete One, Athlete Two, Athlete Three, and Ath...
3
1,144
Gradle script which selects a build variant of the Android library
<p>I am using Eclipse and working with Android projects. I cannot use Android Studio for many reasons. Unfortunately, Eclipse is not capable to work with AAR archives. After a long struggle we decided to make Eclipse projects NON-GRADLE (eliminate gradle nature from all Eclipse projects) and prepare a list of dependenc...
3
11,752
complex merge pandas numpy with Aggregation
<p>I want to merge two dataframe and calculate the 3 columns witch an avergage of the past observation for a GIVEN ID . </p> <p>Here is an example :</p> <pre><code>contracts_data = np.array([ [1, '2015-01-01', 15000], [2, '2015-01-01', 1500], [1,...
3
3,232
Make a simple sub-menu using HTML, PHP
<p>I have a yii2 application, and this is a part of my layouts/main.php view:</p> <pre><code>&lt;?php /* @var $this \yii\web\View */ /* @var $content string */ ... &lt;body&gt; &lt;?php $this-&gt;beginBody() ?&gt; &lt;div class="wrap"&gt; &lt;?php NavBar::begin([ 'brandLabel' =&gt; Yii::t('app', Yi...
3
1,289
How to create subgroups using JSON as datasource?
<p>I would like to have a report where shows my <code>Orders</code> classified, grouped, by <code>Currency</code>, and by <code>Country</code>.</p> <p>It should look like this:</p> <pre><code>EUR - Germany - (only orders with EUR as currency and order made in Germany) - France - (only orders with EUR as curre...
3
5,401