title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
how use margin auto in flexbox
<p>I'm making a navbar. but I have problem. I want to redirect 2 items to the right but 1 of them go right 1 of them go middle I cant use float because I use flexbox I search to google He say use margin auto I use margin auto but one of them go middle I want both of them go right with small margin between them (link &a...
3
1,697
compare two different DataFrames
<p>i'm newbie in Pandas, please help. I got two DataFrames to compare DF1:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Code</th> <th>Product</th> <th>Day</th> <th>C_Code</th> <th>Name</th> <th>Qty</th> </tr> </thead> <tbody> <tr> <td>001</td> <td>Prod_X</td> <td>01.01.2022</td> <td>C_00...
3
1,633
Can not create super user, because foreign key can not be null
<p>How to assign foreign key value, when creating super user in Django?</p> <p>I want to make new superuser using python manage.py createsuperuser command, but I get an error: ValueError: Cannot assign &quot;&lt;QuerySet [&lt;Company: Company object (1)&gt;]&gt;&quot;: &quot;Worker.company&quot; must be a &quot;Company...
3
1,070
svelte customising bootstrap5 using sass
<p>I am new to scss and I am trying to make use of bootstrap 5. so far I have managed to define a primary color, i seem to have run into this problem here <a href="https://stackoverflow.com/questions/67952873/customizing-bootstrap-5-button-colors-and-properties-in-it">Customizing bootstrap 5 button colors and propertie...
3
2,417
DXGF model not showing in the scene
<p><p> 3D model is not displaying <p> Loading DXF model with dxf loader from GIT. Model is not displaying, only black screen is showing. It might be the camera, the model problem or any other problem. I am loading preprepared model. Im a newby in Three.js</p> <pre><code> &lt;div id="webgl-output"&gt;&lt;/div...
3
1,184
Output bindings not picked up or present in Javascript Azure Functions
<p>I'm having a bit of difficulty getting my simple Azure Function to dump a JSON payload into a CosmosDB. Here is the desired setup:</p> <pre><code>[HTTP TRIGGER] -&gt; [JS FUNCTION] -&gt; [INSERT JSON TO COSMOS DB] </code></pre> <p>I've added a cosmosDB output binding via <strong>Integrate</strong> in the web conso...
3
1,214
Getting conflicting ClassCastException when calling getChildAt from LinearLayout
<p>The system I'm currently working on relies on the layout being built from a <code>JsonArray</code> returned from an API, it does this by primarily using several different <code>ViewHolder</code>s in the adapter class.</p> <p>The problem I'm having is trying to build a <code>RadioGroup</code> that can only have one ...
3
5,427
Javafx/Fxml - Error trying to save a value externally on program close
<p>I'm currently trying to create a basic money saver program for a school project using javafx/fxml so i'm still learning. I am currently trying to set up a way in which when the user closes the program, it runs some code to save the value currently displayed in a textField <code>endGoal</code>. The problem is the Tex...
3
4,566
Android youtube-api cancels FLAG_FULLSCREEN in Activity
<p>i have designed my application to work in fullscreen mode. No status bar and no action bars are visible. This suppose a problem since every time a load a video from youtube ussing YoutubeAndroidPlayerAPI the status bar appears.</p> <p>My activity:</p> <pre><code>@Override protected void onCreate(Bundle savedInstan...
3
3,150
Microsoft Graph API calls through Express app
<p>I am trying to follow this tutorial here: <a href="https://github.com/Azure-Samples/ms-identity-javascript-nodejs-tutorial/tree/main/2-Authorization/1-call-graph" rel="nofollow noreferrer">https://github.com/Azure-Samples/ms-identity-javascript-nodejs-tutorial/tree/main/2-Authorization/1-call-graph</a>. It uses the ...
3
1,782
React - Global styles
<p>(I think this is not opinion based, I am asking for the common use of something, in order to achieve a good refactored code)</p> <p>How to properly use global styles in a React Project? I have seen lot of people using it, but what's the idea? I mean, is this a module to define ultra-generalized styles, or just a fil...
3
1,113
Not getting the correct output through procedure execution
<p>I am writing one recursive procedure for the below table(sample_table): Consider each column has varchar2 datatype:</p> <pre><code>PARENT_DATA CHILD_DATA PARENT_VERSION CHILD_VERSION ---------------------------------------------------------------- 20-10 40-01 -A11 -A11 20-10 40-02 ...
3
1,451
Google Guice + TestNG(v6.14.3) groups throws java.lang.RuntimeException: Unable to instantiate resource
<p>I have below hierarchy </p> <pre><code>@Guice(modules = ServiceModule.class) public abstract class BaseTest { @Inject protected FooBarService _fooBarService; //some generic stuff here //used TestNG @BeforeSuite etc tags here } </code></pre> <p>Then I inherit <code>BaseTest</code> in <code>NextBase</code> ...
3
2,462
Why do all my radio buttons share a single selection?
<p>I'm trying to build a survey app and I've hit a roadblock. When I'm submitting a response to a survey, all my answers share the same radio button selection id which means that I can <strong>only select one radio button across multiple questions</strong> whereas I want this to be one radio button <em>per</em> questio...
3
2,351
postgres: Error querying database
<p>Project run for some time after the database connection is not found, the error message is as follows:</p> <p>2017-05-02 10:02:17,224 ERROR [main] (line:com.unis.license.agent.management.aop.ManagementServicesAop.afterThrowing(ManagementServicesAop.java:47)) - BeforeMethod:com.unis.license.agent.management.service....
3
2,201
Take a value in PHP page sent with a jQuery function
<p>In this HTML page at the begin of the script I send the value of variable fin at the PHP page (<a href="http://sat3.altervista.org/index.php?valore=" rel="nofollow">http://sat3.altervista.org/index.php?valore=</a>"+ fin). In this PHP page I tried to take the value of variable but I didn't have success. </p> <pre><c...
3
1,226
tuple index out of range in tensorflow Concatenate
<p>This is my first time using concatenate, I am building a NN for a deep learning project, one class defines the concatenate, and that class runs fine.</p> <p>The next def includes concatenate, and it is giving me a ' tuple index out of range&quot; I am fairly confused of where to fix this.. I m uploading parts of my ...
3
1,126
Input type file activeform Yii2 generate another input type hidden
<p>I have some problem when using activeform type file. When i try to send my input in registration controller the validation from model always return it false because there is input type file that empty. After i checking from html inspect elements, it turns out that the form I created on the register page generates a ...
3
1,727
Passing a script from runspacepool
<p>I am trying to work on an existing script that I had some assistance from in another thread. With some member assistance I was able to get my script to run using the &quot;ThreadJob&quot; module, however I was hoping I can also make use of runspacepools in conjunction with the ThreadJob to make it run faster.</p> <p...
3
5,390
Attempts to reset javascript form make form disappear
<p>I created a form that randomly selects 12 T/F questions from an array of 16, displays them in a random order and will score it all at the end. The problem is that I cannot get the form to clear on refresh. When I try with nearly any method, the form, questions and all disappears.</p> <p>The reset button, however, d...
3
1,463
Scaling a big integer by a double
<p>I need to scale big integers (several hundred bits) by a double. In particular, I need to compute </p> <p><strong>(M * factor) mod M</strong> </p> <p>where <strong>M</strong> is a big integer and <strong>factor</strong> is a double. I won't be using any libraries unless you want to call a dozen lines of code in a ...
3
1,255
output two commands on same line
<p>I have seen this question a few times, but the solutions I cannot get to work.</p> <p>I have the following command:</p> <pre><code>printf '%s\n' "${fa[@]}" | xargs -n 3 bash -c 'cat *-$2.ss | sed -n 11,1p ; echo $0 $1 $2;' </code></pre> <p>where</p> <pre><code>printf '%s\n' "${fa[@]}" O00238 115 03 O00238 126 0...
3
1,064
SVG: text over a shape disables animation on background shape
<p>As I have demonstrated in <a href="https://jsfiddle.net/kaustubhajitshukla/34rknk1d/1/" rel="nofollow">this</a> fiddle, I want SVG Cirlce to enlarge when hovered over it. But at the same time, I want to write some text over the circle (Eg. in the fiddle, "Hello" and "World"). </p> <p>I want that for user, <strong>t...
3
1,175
size an image to relative div
<p>Hello I have a question about how I make the image have the same height as the div. I tried changing the height to 100% without succes and making use of object-fit. Here I have a little bit of code. If you run the code block you see some text above an image and if you select the text you see it goes under the image....
3
1,646
This is correct when using onClick in onBindViewHolder to avoid "do not treat position as fixed only use immediately and call holder"?
<p>I am working on an application that on the main screen uses RecyclerView to show attendance information of different groups of people, each element contains a list of the last 3 saved records (&quot;Latest records&quot; in the image):</p> <p><a href="https://i.stack.imgur.com/6YZfS.jpg" rel="nofollow noreferrer"><im...
3
1,158
C# WPF - Problem changing color of image in realtime
<p>I'm having some problems changing the color of images in realtime. My vision is that the user of my main project should be able to adjust the colors by adjusting 3 sliders for RGB channels.</p> <p>I found a good algorithm that does the job perfectly but the problem I'm facing now is that the color will only change o...
3
2,091
UICollectionViewCompositionalLayout equal item height using autolayout
<p>I'm using a UICollectionViewCompositionalLayout to create a grid. Each cell contains a multi-line label. My goal is that, when 1 item in a group/row grows, all others in that group/row grow to the same height e.g. in the attached pic, I would like the cells in column 2 and 3, row 2, to match the height of the first ...
3
1,039
How to get the exit status and the output of a $(shell command) before make 4.2?
<p>On <a href="https://fossies.org/diffs/make/4.1_vs_4.2/NEWS-diff.html" rel="nofollow noreferrer">make version 4.2 {2016}</a> was added the variable <code>.SHELLSTATUS</code>. But my most linux are using make version <code>4.1</code>. How I can I get the exit status and the output results of the make $(shell ...) comm...
3
2,515
How to use key fields with Java Arrays?
<p>I'm trying to use a key field with my array with Java but I'm confused on where to begin. My program is supposed to be that the user enters a name which would be the unique identifier and all this information would show up relating to the name kind of a mini Google. I have two classes, one is my abstract class and m...
3
1,792
jquery tagit: prepoluate with tags not working if there's a custom autocomplete source
<p>I read the docs and if you want to prepoulate with some tags, you can use an ul element:</p> <pre><code>&lt;ul id="myULTags"&gt; &lt;li&gt;Tag1&lt;/li&gt; &lt;li&gt;Tag2&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>But the thing is that i use a custom autocomplete source like this:</p> <pre><code>$("#myULTags"...
3
1,241
Merge all values of a node's child nodes
<p>I'm completely new to XSLT. In a large text corpus, I should merge all values of a node's child nodes:</p> <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt; &lt;Informations&gt; &lt;Information lang="de" type="a"&gt; &lt;title&gt;Product&lt;/title&gt; &lt;Holder&gt;Big Comp...
3
3,365
ModelAndView not rending via JQuery
<p>I am trying to render ModelAndView from an AJAX call. The hit goes to the controller and it is returning ModelAndView. However, when I try to render that object via $(#div).html(response), it simply displays a blank page. I used $(#div).text(response) to check if I am receiving HTML response and I do. The HTML respo...
3
2,203
How can I remove an element from local storage and html by accessing its id
<p>This is a very basic flashcard game where you type a question and an answer to a main card and by clicking the save button a new flash card is created in storage as an object inside cards array with an id for example</p> <pre class="lang-json prettyprint-override"><code>[{id: 218, question: &quot;who won the NBA fin...
3
1,344
Entity Draw with Understand Python API
<p>I am trying to get each entity to draw a certain type of graph using the Understand Python API. All the inputs are good and the database is opened but the the single item is not drawn. There is no error and no output file. The code is listed below. The Python code is called from a C# application which calls upython....
3
1,462
JavaScript Dragscroll Not Working With HTML Table
<p>I'm trying to create a table with a fixed header and left column that I can freely scroll around. I want to be able to implement the scroll using the drag to scroll method with the client mouse. Whenever I try to implement the dragscroll function, I cannot get it to work. How would I implement the dragscroll correct...
3
1,067
Cannot Resolve a 500 (Internal Server Error) Code
<p>I have run into a 500 error that I cannot resolve while practicing with making a To Do app with various lists &amp; to do items that all have full CRUD options.</p> <p>To Do List code:</p> <pre><code>class TodoList (db.Model): __tablename__ = 'todolists' id = db.Column(db.Integer, primary_key=True) nam...
3
3,126
How make TableView calculate its preferred width to display all columns
<p>Consider the following example:</p> <pre><code>import javafx.application.Application; import javafx.beans.property.SimpleStringProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene.control.TableColumn; import javafx.scene.control....
3
1,737
Owin hosted web app using Token authentication
<p>I am trying to create an owin web app using token authentication, my startup does not have any special setup like the example in </p> <p><a href="https://github.com/NancyFx/Nancy/wiki/Token-Authentication" rel="nofollow">https://github.com/NancyFx/Nancy/wiki/Token-Authentication</a></p> <pre><code>public class Boo...
3
1,271
Accessing to components of derived types which extends main derived type by using inheritance rule
<p>I need a little help about using inheritance rules. My intention is to use one derived type array for storaging results of calculation but i want to use that array also for storaging components values from main and extended derived types. For example, this is my example code which I want to transform:</p> <pre><co...
3
1,063
what is the absolute path of output.mp4 generated from these jcodec sample codes?
<p>I am using the following codes from <a href="http://jcodec.org/" rel="nofollow noreferrer">JCodec</a> in the MainActivity which extends AppCompatActivity to make a video with a set of images from memory in android, but getting confused about the actual path:</p> <pre><code> Bitmap[] bitmaps = new Bitmap[3]; ...
3
1,129
Optimizing GROUP BY of jsonb array values in Postgres
<p><strong>Updated for better hardware</strong></p> <p>I have the following simplified schema in Postgres12 whereby a <em>dataset</em> has many <em>cfiles</em> and each cfile has <em>property_values</em> stored as jsonb:</p> <pre class="lang-sql prettyprint-override"><code>SELECT * FROM cfiles; id | dataset_id | ...
3
11,871
Control ribbon buttons for each opened window separately
<p>I'm writing an Outlook add-in that has its own ribbon with buttons defined in an xml manifest. Besides the main Outlook window (explorer), separate windows can be opened (inspectors) and all of them have the same ribbon. I would like to control the properties of ribbon buttons independently. But in my <code>getPress...
3
2,158
making script run for specific tabs in google spreadsheets
<p>I need some help with my code. I'm new to appscripts. I have a script that works wonderful. But i want to make it work in multiple tabs which will be duplicates of 'Layout 1'.</p> <p>I only want to make this script work in those 'Layout x' tabs. I have other tabs also. I made this script with help of a youtbe video...
3
1,229
thrift segmentation fault in TNonblockingIOThread::notify(TNonblockingServer::TConnection* conn)
<p>The bt log:</p> <pre><code>signal 11 (Segmentation fault), address is (nil) from 0x7f0280708196 [bt]: (1) /lib/x86_64-linux-gnu/libc.so.6(abort+0x2d6) [0x7f0280708196] [bt]: (2) /lib/x86_64-linux-gnu/libc.so.6(abort+0x2d6) [0x7f0280708196] [bt]: (3) /lib/x86_64-linux-gnu/libc.so.6(+0x777ea) [0x7f02807487ea] [bt]: (...
3
1,109
JQuery find element in script
<p>I am really not great at web stuff, so I am apologizing in advance for a potentially poor explanation of my problem.</p> <p>Basically, I have a webpage which utilizes the handlebars js templating. Unfortunately, this means that many of my div elements are contained within javascript tags like the following:</p> <p...
3
1,778
Is it possible to derive a key from a shared secret (BCryptSecretAgreement) without exposing the derived key (using the TPM)?
<p>From a high level, I'm trying to implement a ECDH key agreement scheme that results in the final ephemeral key being <strong>stored on the TPM</strong>. It seems that the <code>bcrypt</code>/<code>ncrypt</code> interfaces have <em>almost</em> everything that I need. I can perform the ECDH secret agreement and then...
3
1,859
How can I get the "hiRes" field in script ? Python Scraping Bs4
<p><strong>I want to get a all high quality images url of the product from the amazon page. I access the data in the script with this code. But I failed to get hiRes Url in the script. How can I break this script and get the url you want? Is it possible to do this with Json?</strong></p> <pre><code>from bs4 import Beau...
3
5,372
Qt + external library gaves glibc malloc(): memory corruption
<p>I’m doing a gui app with Qt 4.8.5 and c++ on a fedora 18. For that I am using also some external libraries compiled with eclipse.</p> <p>Until last week it worked all okey, I could call and use that external library functions with no problem.</p> <p>The first error ocurred last week when a memorry corruption appea...
3
1,722
Validation plugin files are not working
<p>I am doing my form validation with jquery validation plugin. Everything seems fine but its not working. No message appears. Or may be its due to files that I have included. files included</p> <pre><code>&lt;script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js"&gt;&lt;/script&gt; &lt;...
3
1,862
multiprocessing spawning processes without pooling
<p>I am trying to use the multiprocessing library to spawn new processes without using a Pool and without creating zombies.</p> <blockquote> <p>On Unix when a process finishes but has not been joined it becomes a zombie. There should never be very many because each time a new process starts (or <code>active_children()<...
3
1,410
C# clock not working cause there is no negative coordinates in wpf
<p>I'm trying to make a simple clock and it isn't working because sin and cos give negative values which wpf doesnt have!</p> <pre><code>namespace Desenho { /// &lt;summary&gt; /// Interaction logic for MainWindow.xaml /// &lt;/summary&gt; public partial class MainWindow : Window { [DllImpo...
3
1,256
Error in autowiring Beans despite declare in the xml file when testing
<p>I have the beans.xml as follows:</p> <pre><code> &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:s...
3
10,657
Making a multiple field search in Django
<p>I am trying to make a search page that searches for model objects using three fields corresponding to different pieces of data. Here is my code below:</p> <p>models.py</p> <pre><code>class Schedules(models.Model): course_name = models.CharField(max_length=128, choices=COURSE_NAME_CHOICES, default='a-plus') ...
3
2,193
Only build one TargetFramework while defining multiple <TargetFrameworks> to support custom builds for other TargetFramework
<p>The idea is simple: I want to have a single project file, that can build multiple target frameworks and have references to different DLLs based on the framework used.</p> <p>The issue that I am running into, is that when I select build on the project, it will build all frameworks defined in - but the .DLL reference...
3
1,698
How to sort list of dictrionaries in the right way Python
<p>I have list as follows:</p> <pre><code>data = [ {'items': [ {'key': u'3', 'id': 1, 'name': u'Typeplaatje'}, {'key': u'2', 'id': 2, 'name': u'Aanduiding van het chassisnummer '}, {'key': u'1', 'id': 3, 'name': u'Kilometerteller: Kilometerstand '}, {'key': u'5', 'id': 4, 'name': u'Inschrijvingsbewij...
3
1,088
Script Conflict Onchange and table row selection
<p>So the script is to allow me to click the row in the table and set the input value in the form whatever the data of the selected row. However, this script is not working when I incorporate the solution for the onchange. I was thinking if there's conflict on the scripts? This is just a follow-up on this query: <a hr...
3
1,218
Can't get form to submit information to PHP page
<p>I'm working on a web form that allows people to input user information into a reservations page, which will submit to a different page using PHP. As of now, when I click my submit button, it takes me straight to my PHP page but it just displays the PHP code, and not the information they submitted. I want to be able ...
3
5,675
Is there any method to insert a row with pad a number with leading zeros in NodeJS-MySQL?
<p>I'm doing a NodeJs-Angular project and I want to register a user with custom auto increment id in MySQL table(like BM-0000118,MG-0000119). So after checking the user register or not, I started to insert a query with non-primary column value, then get the last inserted value using "results. inserted" and customized i...
3
1,236
Registration data not being sent to my database
<p>My login is working properly, but my registration seems to not add the data to my database. I have tried to solve the problem for a long time with no luck. Maybe some of you "bright" people can help my dumb ass lol! Nevertheless here is everything: If you do help me, thanks in advance, btw I think it is a problem in...
3
4,212
Constrained max using Rglpk in R, not conformable
<p>I have a question regarding constrained maximization using the Rglpk packaged in R. </p> <p>In the code below, we generate a dataframe 'df'. I am trying to max the sum of column z, subject to:</p> <ul> <li>The COUNT of the total number of F's to be >= 3 and &lt;=5</li> <li>The COUNT of the total number of G's to...
3
1,406
python library directory structure to separate code
<p>I want to have the following directory structure:</p> <pre class="lang-py prettyprint-override"><code>project_name (unfortunate, I did not think to name the git repo something different) | ... | |--project_name | |-- __init__.py | |-- module1 | | |-- __init__.py | | |-- pyfile1.py | | #contains cla...
3
1,678
My code functions with a printf statement, but not without it
<p>Adding the printf("Hi!\n") statements allows the code to work. It also works if the bound initial bound is improper and the user enters a new one. When I ran some tests calculate divers sometimes returned a character instead of an integer. I'm thinking it has something to do with my memory allocation. I also noticed...
3
1,260
How to optimize my mysql request to work with large database
<p>I'm working on a project with php/mysql(mariaDB) that generates statistics with some data as input. The system that filled the DB is an electric powerplant and specifically the alarm system.</p> <p>My DB has three fields: <code>DeviceTime</code>, <code>VariableName</code> and <code>alarmState</code></p> <p>The ala...
3
3,515
assets compilation in Canvas LMS on ubuntu
<p>I am trying to setup Canvas-LMS on my system but during assets compilation I am facing some problems. These are my node versions: </p> <ul> <li><p>node-gyp -v v3.0.3</p></li> <li><p>node -v v4.2.1</p></li> <li><p>npm -v 2.10.1</p></li> </ul> <p>This is my console screen while I am trying to compile my assets.</p> ...
3
3,854
Not able to relogin facebook after logging out
<p>I integrated facebook login to my Android App. I was able to login when I launch the Application, but when I logout and come back to initial screen to login again ,it does not login I was taken to Home screen of mobile . But when I relaunch the app again from launcher and try to login, I am able to login.But with in...
3
1,700
Why does an instance variable have a different value inside of a closure?
<pre><code>func loadYelpComments(){ guard let business = business else {return} guard let _ = tableView else {return} guard let businessID = business.id else {return} let dateFormatter = DateFormatter() dateFormatter.dateStyle = .full HTTPHelper.getYelpComments(for: busi...
3
1,241
make ATIDAQ C Library
<p>For whatever reason after <a href="http://www.ati-ia.com/library/software/daq_ft/ATIDAQ%20C%20Library.zip" rel="nofollow">download</a>ing the <a href="http://www.ati-ia.com/Products/ft/software/daq_software.aspx" rel="nofollow">ATIDAQ C Library</a> I am not able to even make their stock examples. The file structure ...
3
1,504
Fastest and most effective way of comparing two array of hashes of different format
<p>I have two arrays of hashes with the format:</p> <p>hash1</p> <pre><code>[{:root =&gt; root_value, :child1 =&gt; child1_value, :subchild1 =&gt; subchild1_value, bases =&gt; hit1,hit2,hit3}...] </code></pre> <p>hash2</p> <pre><code>[{:path =&gt; root_value/child1_value/subchild1_value, :hit1_exist =&gt; t ,hit2_e...
3
2,197
Why modal won't show from table data when button clicked?
<p>I don't know which the cause but I properly assigned the <code>data-toggle</code> and <code>data-target</code> to my button. My modal won't show after click the corresponding button that has listener. Any help why it won't show?</p> <pre><code>@section ('content') &lt;div class = "row"&gt; &lt;div class = "col-...
3
1,382
How to compare single columned two Excel files which are having 500,000k rows
<p>Goal: Compare two excel files, each excel is having only one column but having half million rows. I just want to see the un-common values between two excels. </p> <p>Column: only 1 Rows: 500,000</p> <p>Language: JAVA </p> <p>What I tried so far: </p> <ol> <li>Apache POI used (please see below program-1)</li> <...
3
1,442
Trying to Develop PostFix Notation in Tree Using Perl
<p>I'm using Perl to run through a tree, and then calculate the leaf nodes of the tree using the internal nodes as operators. I want to be able to print this in a postfix manner, and I managed to this this fairly easily with the basic operands (simply call the left and right nodes respectively before calling the parent...
3
2,012
content shrinks with narrow width and scrollbar has extra little space from the div
<p>I have the made the following layout and i want the div columns with and without scrollbar to not shrink when screen gets narrowed, i tried min-width by using that div stay the same width and the layout breaks at a certain point because the screen cant fit the whole interface with the avaliable screen width. is ther...
3
6,308
NPOI C# set columns to fit on one page
<p>I am using NPOI Version 2.5.3 in my C# application and am trying to set the scaling option (<strong>Fit All Columns on 1 Page</strong>). Which seems easy enough to do from these questions <a href="https://stackoverflow.com/questions/36432953/how-can-it-set-the-file-for-fit-all-columns-on-one-page-setting">here</a> a...
3
1,226
How can I collapse border of only one row in table HTML
<p>I've been trying to collapse borders in my last two rows of Table, but I can't get the result I want, I already tried using <code>border:hidden, border: 0, border-collapse: collapse</code>. But nothing seems to work, I'm very new at this, If you guys have any solution for me, I'd be really glad.</p> <p>Here is my HT...
3
1,424
Why do "score.backward()" return a gradient tensor with all zeros?
<p>When I tried to modify a CNN visualization method named gradient CAM to work for my yolo v3 model, I met a problem that the gradient calculated contains all zeros which cannot be used for following process after calling score.backward(). The score is the bounding box's confidence regarding to that class and this val...
3
1,619
Why is my output from a subprocess delayed, when it is generated from a Python thread?
<p>This an extension to my posting from yesterday, which is still unsolved: <a href="https://stackoverflow.com/questions/46688923/why-does-my-python-thread-with-subprocess-not-work-as-expected">Why does my Python thread with subprocess not work as expected?</a></p> <p>In the meantime I found some interesting details, ...
3
2,027
Design polymorphism without downcasting
<p>I have a class which works with a hardware device. This device supports a number of commands, and I want to implement a common <em>SendCommand</em> function. Commands might or might not have input parameters and/or output result. </p> <p>What I can do is to write an abstract command type class, and a number of deri...
3
1,720
CMake error building Openmvg in Ubuntu 16.04
<p>I'm trying to set up a free photogrammety workflow on Ubuntu 16.04. When trying to install Openmvg and while I'm following this steps <a href="https://github.com/openMVG/openMVG/blob/master/BUILD.md#linux" rel="nofollow noreferrer">https://github.com/openMVG/openMVG/blob/master/BUILD.md#linux</a> I got an error when...
3
8,348
-[UIDragSession loadObjectsOfClass:completion:] completionBlock not being called
<p>I'm learning iOS11 new APIs Drag and Drop, but I have some questions. I have two collectionViews which share same type (<strong>DataEntity</strong>) of dataSource array. One is for drag and the other is for drop. That means I want to drag item which contains data (<strong>DataEntity</strong>) from one collectionView...
3
1,342
C# HTML Table Button not visible
<p>I have created a table from a class using a string builder that takes the data from a data table. Now I added a HTML button inside a field named 'Stadium Name' and it is not showing up. </p> <p>Here is my code: </p> <pre><code> StringBuilder html = new StringBuilder(); html.Append("&lt;table border =...
3
1,055
I want to run machine learning algorithm using django but django is not taking csv file path
<p>I am creating spam detection system in django in my application from homepage i will enter any string and that string will go to ml function and that function return either string is spam or ham and that result will print on next page but i am not able to define pata of csv file in pd.read_csv function. it is showin...
3
1,308
Node forever says program is running, but evidence suggests not
<p>I'm attempting to run a simple twitterbot using the <a href="https://github.com/ttezel/twit" rel="nofollow noreferrer">twit</a> library and <a href="https://github.com/foreverjs/forever" rel="nofollow noreferrer">forever</a>. The bot essentially watches another twitter account, and copies its tweets with some modifi...
3
1,994
Update local database all modified data to server database
<p>I'm facing a problem when I want to update data from local database to server data, replacing everything that has been modified at local database. I know it might be simple but I got no idea about this, so any help will be appreciate.</p> <blockquote> <p>In my situation, I want to use a button to upload all modif...
3
1,404
Double Buffering dramatically slows performance
<p>Edit: I know this code isn't good, I'm just curious as to Why exactly it is SO bad, when it was taken from an ostensibly reputable source: <a href="https://rads.stackoverflow.com/amzn/click/com/0596007302" rel="nofollow noreferrer" rel="nofollow noreferrer">http://www.amazon.com/Killer-Game-Programming-Andrew-Daviso...
3
1,045
How to make a JOIN with table containing attribute value zero?
<p>I have a table that I defined one column to receive zero 0 as value. I did this because zero 0 represents all values. The table's name is <code>agendas</code> and the column it's <code>turmas_id</code>, this column has relationship with table <code>turmas</code> but <code>turmas_id</code> in <code>agendas</code> it'...
3
2,881
update CheckBoxTreeCell styles from outside process
<p>I am building my first javafx (2.2) application. The user selects a number of tasks to execute, by selecting checkboxes in a treeview.</p> <p>I am trying to figure out how, after a task completes, to change the style of the related TreeCell.</p> <pre><code>public class WorkbenchSscce extends Application { pu...
3
1,103
Ruby beginner: class, instance variable, accessor, rspec
<p>So I'm in the process of trying to recreate a board game called Ciao Ciao. I'm not anywhere near done but I keep getting stuck and would really appreciate some help. So far I've made the following 3 classes and rspec file:</p> <p>The Player class</p> <pre><code>require_relative 'die' class Player attr_reader :nam...
3
1,487
How to limit number of colors in an image to a specific set in python
<p>I'm trying to create a python script that will take an image with n number of colors and reduce it to be f where f is a specified number of colors chosen by me, I found in similar questions how to get the major colors in an image, compare each pixel to them and assign the closest one. I was able to implement that bu...
3
5,579
How to make dynamic labels from a spatial polygons dataframe for Polygons on a Leaflet map in R
<p>With this script, I am displaying a map with three isochrones. I would like the map to have labels containing the max time represented by each isochrone/polygon.</p> <p>How should I reference the spatial data frames (iso1/2/3) in the addPolygons() section?</p> <p>In each of the three addPolygons() bellow I tried a...
3
1,106
Aysnc method still blocking the ui interface
<p>I have this method which is using ODBC and executes the reader async but the method is still blocking my UI for some reason it's loading 4000 records but I am wondering if someone can look at my code see where I am going wrong.</p> <pre><code>async Task&lt;BindingList&lt;PurchaseLinkHeaderC&gt;&gt; GetPurchaseOrder...
3
2,274
TextView moving out of screen in RTL Layout in RelativeLayout - Android
<p>I have a text view inside a RelativeLayout. It's working fine in LTR layout. But when I change it to RTL the view inside a RelativeLayout moves out of visible screen. I was checking it in Layout inspector and I could see it being out of the screen visible area. The view is visible but it's not in the screen.</p> <pr...
3
1,741
How to copy one object from a vector to another vector in C++?
<p>I have a Product class which represents a single product object, each new Product object is stored inside a vector that is part of the Catalog class. I want the user to be able to add products that exist inside the catalog vector to his shopping cart, which is another class that has a vector to save the products he ...
3
1,400
How to add within an array information using findOneAndUpdate without deleting information that was previously contained
<p>does anyone know how I can add an object to an array called worker_info without "replacing" all the information it contains? (I'm learning the mean stack) I have this code but what it does is replace all the information and erase the other data I already had. With the code I got this, summarizing what I want is that...
3
1,578
CSS transform property is not working properly
<p>here is my HTML and CSS code for showing texts in two blocks in dl element I tried to change my ▶ symbol to a different shape using css transform scale property. But in some browser only show the triangle in first column ? Why it is like that ? also I tried webkit , moz prefix for rendering the code in all browser</...
3
1,153
Full width Responsive Images Overlap Bootstrap 3
<p>I created a grid with col-md-7 on the left and col-md-5 on the right. And I put images to the col-md-5, which are responsive and in col-md-12 width - full width</p> <pre><code>&lt;div class="container"&gt; &lt;div class="row"&gt; &lt;div class="col-md-12"&gt; &lt;div class="row"&gt; ...
3
1,972
Why am i encountering an Uncaught ReferenceError in Jquery?
<p>Iam creating a js function that will switch the content of the body of my page as follows:</p> <pre><code> var BodySwitcher = { initBodySwitcher : function(){ var self = this; $(document).on("click", ".bodySwitcher", function() { var action = $(this).attr("id"); ...
3
1,306
My Third "Grab Object in Django" Post
<p>Clearly I am struggling with various permutations of grabbing objects in Django. Here's another.</p> <p>This is for the same library app I've been working on (in case you have seen my other questions). </p> <p>On the home page, I display the active user's name and information (this works fine). Then I wish to disp...
3
1,235
Decoding array of numbers from database in python
<p>I read the variable x from a column in a database using SQLAlchemy. I know that this string represents 60 (float or float16) numbers. I had no luck in using np.fromstring. I wonder how to cast this to a list of numbers in SQLAlchemy. </p> <p>The following page is to insert a byte to specific column in pymssql. <...
3
1,534
JTextArea (line wrapping) as TableCellRender to multiple colums
<p>Title says it all. I have a table where in each cell there is the possibility of having long text. What <code>TableCellRenderer</code> should i use in order to display the data - text of each cell with proper line wrap? I have tried a lot of variations messing with renderer's size and <code>setRowHeight</code> but n...
3
2,635
Text editor is RTL but Printed Page is LRT
<p>I found an amazing text editor script on <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content#Example_A_simple_but_complete_rich_text_editor" rel="nofollow noreferrer">Mozilla</a></p> <p>and i modify it for my needs and i make it RTL by doing this </p> <p><div class="snippet" data-lan...
3
6,095