title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Passing template variable to parent in Django
<p>I have a number of apps that each have their own intro section. This intro section has quite a few lines of HTML and only a few lines are adjusted for each app (Think title and intro). I would like this intro section to live at the project level (where the navbar template lives), but I can't find a way to pass templ...
3
1,273
Django MTPP display recursive hierarchical category in REST API
<p>I am trying to display my recursive category model in my Django REST API list view. This is how it is now:</p> <pre><code>"results": [ { "pk": 3, "title": "Test", "category": 7, }, ... ]} </code></pre> <p>I want to achieve something like this:</p> <pre><code>"results": [ {...
3
1,202
Extract data from xml file in C#
<p>I need to extract data from a XML file for my project based on C#. The XML file is like this :</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;Chemicals&gt; &lt;Titrates&gt; &lt;Titrate Name="Hydrochloric Acid" Basisity="1" Molarity="10" Normality="10" &gt; &lt;Experiments&g...
3
1,290
Pg search gem doesn't work on Heroku
<p>I have problem with properly work pg_search gem on Heroku. On localhost works great, but when I try to search some expression on developer site always display empty result. I tried to inspect object of result, but nothing showed. In heroku console comand <em>PgSearch.multisearch("ruby")</em> working fine.</p> <p><s...
3
2,770
jquery next() returning nothing
<p>I was trying to select everything between adjacent <code>&lt;p&gt;</code>'s, the number of "p" changes every time. And contents in between p tag-pairs could be nothing to anything. Some thing like this:</p> <pre><code> &lt;p&gt;&lt;a href="x"&gt;...ABC...&lt;/a&gt;&lt;/p&gt; &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;...
3
1,211
Django: Warning: Incorrect integer value: 'UnlocksBranch' for column 'type_id' at row 1
<p>I am writing a Django app that pulls data from a Bugzilla database and I am having trouble getting the flags.</p> <pre><code>class Bugzilla_bugs(models.Model): class Meta: db_table = 'bugs' bug_id = models.IntegerField(primary_key=True) ... </code></pre> <p>The flagtypes table which d...
3
1,878
Intent Activity not firing?
<p>I'm doing a basic activity of moving from one page to another. Everything was going perfect until I get two pages deep into the app. I used the same exact code for each page class, put the activities in the manifest and made sure all words were spelled correctly, etc., but the intent doesn't do anything when I try ...
3
2,558
Different Ising Model results with Fortran and F2PY
<p>I am trying to implement my Fortran code in python using 'f2py'. I derived/extracted a Fortran subroutine from my original Fortran code of Ising model and did calculation using both with same lattice parameters/conditions, etc. But my results are different, which I am unable to understand. Since both should result i...
3
3,635
Keypress detection wont work after seemingly unrelated code change
<p>I'm trying to have the Enter key cause a new 'map' to generate for my game, but for whatever reason after implementing full-screen in it the input check won't work anymore. I tried removing the new code and only pressing one key at a time, but it still won't work.</p> <p>Here's the check code and the method it uses...
3
1,397
Action Mailer Invites Rails 3.1
<p>Using Ryan Bate's RailsCasts #124 Beta Invites (as well as the updated rails 3.1 api) as a crutch, I'm trying to put together my first piece of Action Mailer functionality: inviting someone to collaborate with you on a project. </p> <p>My issue is that the <code>:recipient_email</code> isn't getting saved in the DB...
3
2,210
How to reach local server runing nightwatch tests against docker selenium and local app?
<h3>Nightwatch</h3> <p><strong>nightwatch --version</strong></p> <pre><code> v0.9.14 </code></pre> <p><strong>config</strong></p> <pre><code>{ "src_folders": [ "test/e2e" ], "selenium": { "start_process": false, "port": 4444 }, "test_settings": { "default": { ...
3
2,704
Swapping rows in 2-D array C++
<p>So yeah, I wrote a program which sort rows of two-dimensional array in ascending order according to sum of all positive even elements in every row, BUT it does not work properly. Sometimes it can swap rows correctly but mostly it feels like this program only swap two adjacent rows or something like that.</p> <p>Prob...
3
3,651
What is the best way to compare time periods and how do I structure my database for it?
<p>I'm looking for a way, that if my app says "Looking for person available from <strong>March 3rd, 2016 8:00 am to March 3rd, 2016 3:00 pm</strong>" to match it with a person that might be available from <strong>March 3rd, 2016 7:00 am to March 3rd, 2016 16:00 pm.</strong></p> <p>Now this is a just a snapshot, it has...
3
9,944
How to use REST API mark tests as fail?
<p>I use this <a href="https://www.browserstack.com/docs/automate/selenium/view-test-results/mark-tests-as-pass-fail" rel="nofollow noreferrer">https://www.browserstack.com/docs/automate/selenium/view-test-results/mark-tests-as-pass-fail</a> as reference. But I not able to let the REST API shows 'fail'. May I know what...
3
1,616
React/Redux Can't update initial state / undefined problem
<p>I am trying to update my state and getting it to render.</p> <p>Below I am calling my state from the reducer.js file and displaying the initial list fine.</p> <pre><code>&lt;div className={classes.resultborder}&gt; {this.props.transInput.map(data =&gt; { return ( ...
3
1,222
Hashing collision keys to next in the hashtable
<p>I have a problem in linking the collided keys, the latest key will override the previous key that was linked to the table. I have hard coded for a collision to see if the keys that collide are saved in the linked list correctly, but its not saved correctly. Here is the involved part of the code. </p> <pre><code>ty...
3
1,277
Screen does not appears after few seconds
<p>I want the GameOverScreen to appear after few seconds from when the plane collided with one of the rocks, but whenever I run the game , GameOverScreen appears immediately. please help me solve this. Here's the code.</p> <pre><code>package com.ravicake.motiontest; import java.util.Iterator; import com.badlogic.gdx...
3
3,355
Pellet reasoner crashes when classifying ontology with datatype restriction as pattern
<p>I have an ontology that defines a new data type as pattern restriction on string type. This data type is then used as a property range restriction. Then a class is defined as a restriction on this property:</p> <pre><code>@prefix : &lt;http://test.com/prop#&gt; . @prefix owl: &lt;http://www.w3.org/2002/07/owl#&gt; ...
3
1,877
android StringBuilder to save as .txt file on sdcard
<p>I need help! can someone see my line of codes here. Currently im writing a code to save calllogs into a .txt file and save it to sdcard. It can run but not saving the stringbuilder variable to sdcard. Im new to android programming. </p> <pre><code>package com.example.calllog; import java.io.File; import java.io...
3
1,372
Associations Setup Correctly Results in a Uninitialized Constant
<p>I have a simple <code>many_to_many</code> relationship between <code>User</code> and <code>Stake</code> through <code>UserStake</code>, everything seems to be setup correctly but results in a <code>NameError (uninitialized constant User::Stakes)</code>:</p> <pre class="lang-rb prettyprint-override"><code>#db/schema....
3
1,088
Rails Associations - Creating a new record through a form with belongs_to
<p>I have a Course model:</p> <pre><code>class Course &lt; ApplicationRecord has_many :sub_courses validates :title, presence: true # Course associated to SubCourse via 'sub_course_id' on Course table end </code></pre> <p>And a SubCourse model:</p> <pre><code>class SubCourse &lt; ApplicationRecord belongs_to ...
3
1,855
CALayer.draw(in:) and CALayer.needsDisplay(forKey:) not called when expected, presentation layer unexpectedly nil
<p>I'm trying to implement a layer with implicitly animated properties, and I am seeing some very strange behavior. Here's a simple layer that demonstrates what I mean:</p> <pre><code>class CustomLayer: CALayer { override init() { super.init() implcitlyAnimatedProperty = 0.0000 needsDispla...
3
1,113
Program doesn't compile when I include .h, works when I include .cpp
<p>I have these three files, main.cpp, DynamicArray.cpp, DynamicArray.h. In both cpp files I include DynamicArray.h and I get the following errors.</p> <pre><code>$ g++ main.cpp DynamicArray.cpp /tmp/ccDGRYws.o: In function `testDynamicArray()': main.cpp:(.text+0x11): undefined reference to `DynamicArray&lt;int&gt;::...
3
1,551
Getting autoincremented Id from JDBC
<p>Facing some exception without any clue message. </p> <p>Here is my JDBC</p> <pre><code> statement = con .getConnection() .prepareStatement( "insert into p3triplets set source_material= ? , process= ? ,target_material= ? , user_id = ?",...
3
1,573
JSON_Normalize (nested json) to csv
<p>I have been trying via pandas to extract data from a txt file containing json utf-8 encoded data.</p> <p>Direct link to data file - <a href="http://download.companieshouse.gov.uk/psc-snapshot-2022-02-06_8of20.zip" rel="nofollow noreferrer">http://download.companieshouse.gov.uk/psc-snapshot-2022-02-06_8of20.zip</a></...
3
1,775
Java, Apache POI, XSSFWorkbook extremly slow
<p>I use Apache POI to read an excel file (xlsx) This works fine in Eclipse. 30.000 rows and 20 cols are no problem. Loaded after around 5 seconds.</p> <p>If I generate a runnable JAR File it doesnt process the excel file</p> <pre><code> try { soeArraylist.clear(); //JOptionPane.showMessageDialog(nul...
3
1,343
How to Save Image URL and Image URL Read from SQL Server in android..?
<p>How to save Image(Image URL) in Sql server database with android application ,i have store/save images for base64 format in sql web server 2008,i want to image path(URL) store to database how to do i searched but not get in SQL Server with android concept help me please</p> <p>my code is:</p> <pre><code>Gallery se...
3
1,225
Expression Language not executing in facelets template and client
<p>How do I get the EL below to execute? I'm using Glassfish and Netbeans. I tried a few variations on the web.xml, but I'm not exactly sure that's the problem. Perhaps it's the imports for the client or template?</p> <p>output:</p> <pre><code>thufir@dur:~$ lynx http://localhost:8080/HelloExpressionLanguage/ -dump...
3
2,353
stack around the variable 'PiglatinText' was corrupted
<pre><code>**Source.c** #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;conio.h&gt; #include &lt;ctype.h&gt; #include &lt;string.h&gt; #define SIZE 80 #define SPACE ' ' extern int isVowel(char); extern void initialiseString(char[]); extern int copyString(char[], char[], int); int main() { char o...
3
1,297
Need to check for login username and password, and then bring data from previous entries
<p>Following this question I had asked previously (<a href="https://stackoverflow.com/questions/65717284/need-to-query-google-sheet-for-specific-data-from-google-apps-script">Need to Query Google Sheet for specific data from Google Apps Script</a>).</p> <p>I have created a web app to track the working hours of employee...
3
1,870
docker WordPress image not installing private composer package in web folder
<p>I'm trying to build an environnement with wordpress(php7 and apache) - git - composer.</p> <p>I use Docker desktop on Windows 10</p> <p>Dockerfile</p> <pre><code>FROM wordpress:5.3.2-php7.4-apache ## Install basic things RUN apt-get update; \ apt-get install -y --no-install-recommends \ gpg-agent \ l...
3
1,640
Save ArrayList of custom objects and add a new object to ArrayList
<p>I'm having an issue with saving the instance of an ArrayList of custom objects in an Activity and then retreiving it after doing some stuff in another Activity. Inside the first Activity (which has the ArrayList), there is a button to start a second activity. Inside this second Activity the user is asked to create a...
3
3,201
A comparison of different methods to condense a list of repetitive values in python (Maintaining order & count of repetitions)
<p>I needed a Python script to condense a list of values and wasn't sure of the best method to accomplish this. The functions below are a collection of the different approaches that were recommended to me and their associated runtimes. For reference, my source data for these benchmarks used 100 lists of approx 500,000 ...
3
1,811
Yeoman angular generator and bootstrap templates
<p>So, I have an application that I have built using <strong>yo angular</strong> and all has been working for a while. I have overridden some of the bootstrap templates (specifically the <strong>datepicker</strong>) and I have updated my grunt task to include these files when creating my templateCache:</p> <pre><code>...
3
1,232
Using JAVA to save data to Oracle table with TIMESTAMP WITH ZONED TIME column
<p>I am trying to find a Java Time Type that can be persisted to a column of type TIMESTAMP WITH TIME ZONE in the Oracle DB. The Java type needs to have the Time Zone as part of it. Because of the way the application was written, the Java Calendar type was used (also, the Java Calendar type has Time Zone that is part o...
3
1,525
JQGrid 5.1 - getCell returns entire html instead of selected Combo box value
<p>My project is Spring MVC + Hibernate + MySQL and JSP and JQGrid 5.1 as a front end. I am facing typical situation where, in JQGrid <strong>delete row</strong> functionality, I want to pass two more parameters to controller in addition to 'oper' and 'id'. One parameter is string and I am able to pass it without any i...
3
1,467
Error: ```Uncaught ReferenceError: am4core is not defined``` while creating Amcharts 4 chart
<p>when creating a column chart using the Amcharts4 library I get the following error message:</p> <p><code>Uncaught ReferenceError: am4core is not defined</code></p> <p>My code is as follows:</p> <p><strong>JS</strong></p> <pre><code>am4core.ready(function() { // Themes begin am4core.useTheme(am4themes_animated);...
3
2,255
change image in every three days using php
<p>I am creating a wordpress widget. This will allow user to upload the image url of eight different picture. Now I want to change the image everty three days and start from begining after eight one for infinite time.</p> <p>I manage to get the start of the first image. let sat that is : 2014/07/28</p> <p>I have appl...
3
1,172
OpenGL + Qt 4.8 is not drawing anything
<p>I've been trying to use OpenGL in Qt with shaders and a simple vertex array. I basically want a plain to be drawn in the middle of the screen but nothing appears when I run the program. I'm basing my code in the "Texture" example of Qt, everything looks the same to me, but It's not working!</p> <p>Here's the code o...
3
1,443
Array queries give wrong answer
<p>I have a problem and I have no idea how to start, here it is:</p> <blockquote> <p>You are given a permutation of 1,2,...,n. You will be given q queries, each query being one of 2 types:</p> <p>Type 1: swap elements at positions i and j<br> Type 2: given a position i, print the length of the longest subarray containi...
3
1,044
compiler says member function not defined however it is included in the header file c++
<p>Compiler says member function not defined however it is included in the header file c++. I have about 10 functions and one function find_similar the compiler says undeclared variable on the tester implementation file. The purpose of the program is to check the validity of two entries from the main.cpp/test file. I m...
3
3,195
list<lab_result_cash_view> does not contain a definition for 'Patient_Name ' and no extension method 'Patient_Name '
<p>I want to select data from multiple tables and view. I created the following class Orders tables:</p> <pre><code>public class Orders_Tables { public List&lt;Lab_Orders&gt; LabOrders { get; set; } public List&lt;Lab_orders_Cash&gt; LabOrdersCash { get; set; } public List&lt;Lab_Sample_st...
3
1,630
BOOST_ASSERT failure raised in boost::fiber on Visual Studio "Debug" build
<p>I run into issue with boost::fiber. My code is based on &quot;work_stealing.cpp&quot; example of boost::fiber. I decorated it a little bit. It can work now on Windows Subsystem Linux Ubuntu for both Debug and Release build. In fact, till last night it can work on Windows Visual Studio build... But today, we I attemp...
3
2,134
Setup torque/moab cluster to use multiple cores per node with a single loop
<p>This is a followup on [<a href="https://stackoverflow.com/questions/17288379/how-to-set-up-dosnow-and-sock-cluster-with-torque-moab-scheduler/17299302?noredirect=1#comment44364759_17299302]">How to set up doSNOW and SOCK cluster with Torque/MOAB scheduler?</a></p> <p>I have a memory limited script that only uses 1 ...
3
1,062
Flower: Set SSL 'verify_mode'
<p><em>Using:</em> Flower 0.9.5 (installed Tornado 6.0.4), Celery 4.4.6, Python 3.7</p> <p>When starting <code>Flower</code> with</p> <pre><code>celery -A myProj flower </code></pre> <p>everything works as expected. Flower serves at <code>http://localhost:5555</code>.</p> <p>When starting <code>Flower</code> with</p> <...
3
1,742
React Native navigating between two screens back & forth
<p>I have <strong>Home</strong> screen where we search for an ItemCode, after we search ItemCode it will get details from API &amp; screen will navigate to <strong>Screen 1</strong>(Item Details Screen) &amp; from Screen 1 we have a search for ItemNutrients and after search it will get Nutrients &amp; Navigate to <str...
3
2,099
SQL Populate a new table from a query
<p>​Hi Guys, I am really new to sql so i am sorry if this sounds stupid.</p> <p>I have a query that shows me all the female drivers from two tables (employee and role each table has 1000 rows in total)</p> <p><strong>employee table</strong></p> <pre><code> 1 Brendon Hayford Male 2 Appolonia Mawer Fem...
3
1,067
Why isn't my custom animation working correctly?
<p>My custom @keyframes animation is not working the way it should. </p> <p>There is no gap between <code>Block 1</code> and <code>Block 2</code> when rotating but there is a small gap between <code>Block 2</code> and <code>Block 3</code>, <code>Block 3</code> and <code>Block 4</code>, and, <code>Block 4</code> and <...
3
1,455
iTextSharp asp:DataGrid does not show up in PDF
<p>Converting a generated html page to pdf using iTextSharp, I cannot get the table created from the asp:DataGrid to show up in the PDF. The page's HTML output for the datagrid looks like this:</p> <pre><code>&lt;p&gt;Purchases:&lt;/p&gt; &lt;table rules="all" id="dg_Purchase" style="font-size: smaller; border-co...
3
1,969
mp.isPlaying() is throwing Fatal NullPointerException
<p>I have an application that plays sounds on button press.</p> <p>I'm trying to force the MediaPlayer to mute on incoming call and to continue at normal volume afterwards (in idle mode).</p> <p>I've wrote the below code to do exactly this, although it's crashing under NullPointerException on the following line.</p> ...
3
4,552
Gradle: Using includeFlat to let project depend on local project
<p>I've got the following setup, with workspace being a normal directory containing my programs and Lib/App being Gradle projects created with the <code>gradle init</code> wizard.</p> <pre><code>\-- workspace +-- Lib +-- settings.gradle \-- lib +-- src\main\java\com\msgprograms\lib ...
3
1,206
Getting errors when trying to compile program using boost and ncurses libraries
<p>I have just started to write a server and client for an assignment but can't get my client code to compile. The server compiles just fine using just the boost library but in my client code I am using boost and ncurses. </p> <p>I am using <code>g++ battleship_client.cc -lboost_system -lncurses</code> when trying to ...
3
1,948
Java - When updating JLabel's icon, the new icon is put behind the old icon
<p>What I am trying to do is create a gui that allows you to select an image, display the image, and then perfom actions on it for a school project. This is what happens on startup. <a href="https://i.stack.imgur.com/vuBNX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vuBNX.png" alt="enter image d...
3
1,148
Disable Scroll in Relation to Overlay
<p>Goal:<br> When you click on the picture a overlay should display and the scroll should not affect the user interface. </p> <p>Problem:<br> When the page is long and you disable the scroll the content of the page in relation to overlay will be moved towards to the right side. When you have many picture, it will not...
3
3,513
CGAL::Surface_mesh_parameterization: write the vertices to off in the original order
<p>I am trying to modify <code>CGAL-4.13/examples/Surface_mesh_parameterization/lscm.cpp</code> so that the order of the vertices in the resulting off file is the same as in the input file.</p> <h2> Update: Example </h2> <p>Take a file <code>input.off</code> with the following simple content:</p> <pre><code>OFF 4 2 ...
3
2,669
Slow sql select with index on postgres
<p>I have a production database which is replicated to a another host using londist. The table looks like</p> <pre><code># \d+ usermessage Table "public.usermessage" Column | Type | Modifiers | Description -------------------+-------------------+-----------+------------- id ...
3
1,871
WPF View-ModelView Binding Need Help Please
<p>I have been playing around and looking around on how to Bind a modelview to a view, but i cant seem to work it out. I have a view called Search and I want to bind it to SearchModelView. View has one button and one textbox and looks:</p> <p></p> <pre><code>&lt;Grid HorizontalAlignment="Stretch" VerticalAlignment="S...
3
1,303
List sort implementation
<p>Have some problems with my list and sorting feature. I create class Variation and Variations. I trade Variations class as collection list of my Variation to separate it. Now when i have create collection i would like to sort by Variation property position, hovever i get error. Can you help me out? Below all necessar...
3
2,552
PhpStorm print the script of php instead of html page
<p>I'm developping a project of a generator of CV in HTML/PHP/CSS/SQL on a local server. When I use the chrome option to run a php file on PHPStorm, it prints the code between the two php tags and not the html page. It started today, before that all worked perfecty well.</p> <pre><code> &lt;html lang=&quot;fr&quot;&gt...
3
1,417
jquery validate firing unhighlight function imediately after highlight
<p>despite my problem is similar <a href="https://stackoverflow.com/questions/22903707/jquery-validate-is-firing-both-highlight-and-unhighlight-in-chrome">with this</a></p> <p>the proposed solution did not work for me. Let me explain what happens. As the title suggests unhiglight is called right after highlight.</p> <p...
3
2,219
Execute non-query question with dataset results
<p>I have a fun project that involves VB.net winform app. This applications uses datasets for the forms. Three tables will be effected Shift_Log (SL), Problem_Log (PL) and Service_Request (SR). If the user changes the log dates on the (SL) so that the (PL) no longer agrees with the error time. I need to remove the for...
3
1,294
Adding trend lines across groups and setting tick labels in a grouped violin plot or box plot
<p>I have <code>xy</code> grouped data that I'm plotting using <code>R</code>'s <code>ggplot2</code> <code>geom_violin</code> adding regression trend lines:</p> <p>Here are the data:</p> <pre><code>library(dplyr) library(plotly) library(ggplot2) set.seed(1) df &lt;- data.frame(value = c(rnorm(500,8,1),rnorm(600,6,1.5)...
3
1,351
how to load child1.qml page on to main.qml page calling from another_child.qml page
<p><strong>In my MyHeader.qml cannot load the MyChild2.qml.</strong> How to load child qml page on to mmain.qml page calling from another child qml page as shown below.</p> <ul> <li><p>TestProject Folder</p> <ul> <li><p>qml Folder</p> <ul> <li>Main.qml</li> <li><p>MyChild1.qml</p></li> <li><p>mainui Folder</p> <ul>...
3
1,201
Button To Perform 2 Actions VIA PHP POST
<p>I have this PHP script that performs two functions:</p> <ol> <li>Increases the count in an XML tag of prayer_warriors by 1.</li> <li>Sends a push notification to the proper user.</li> </ol> <p>In my app, I can POST, and all the functions of the script get carried out. The script code is:</p> <pre><code>&lt;?php ...
3
1,057
Java lottery repeat program
<p>I need this lottery program to repeat itself a certain number of times and then stop, but I am having trouble on where to place the for loop (if that's what I should use). How can I display the percentage of times 0, 1, 2, 3, 4 or 5 numbers matched out of all the runs?</p> <pre><code> package assignment5; im...
3
2,341
Android Ksoap Passing Object as Parameter Error
<p>I am communicating with a web-service by sending an Object along with the request.</p> <p>This is the format of the request to the web-service.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XML...
3
3,084
php mysql: Duplicate entry on production but not on dev
<p>Oke, i've been busting my head on this one.</p> <p>I'm gonna try and keep things short, however, if you need more info, don't hesitate to ask.</p> <p>I've written an import repo for an external firm, so we can import their data into our service.</p> <h2>quick overview of implemented logic?</h2> <p>ftp, grab xml ...
3
1,038
Unnamed Pipes in UNIX child message doesn't get received by father while sending a string in C
<p>I have two processes that I have created with two unnamed pipes, but I can't figure out why I can't send messages from the sons to the father. It appears that the father doesn't receive the string. The son is sending the right string; it just doesn't reach destination, can't figure out why ... Can you explain to me?...
3
3,368
Required in contact form fails
<p>I have tried to create an simple contact form using AngularJS</p> <p>code >></p> <pre><code>&lt;div class='main'&gt; &lt;h2&gt;AngularJS Form Validation&lt;/h2&gt; &lt;form name="myForm" ng-controller="Ctrl"&gt; &lt;table&gt; &lt;tr&gt;&lt;td&gt;Username&...
3
2,261
Taking exception.stack prints correctly until attempting to parse the string in ReactJS
<p>I am working on a project where I am trying to parse an exception object which I retrieve from the exception object created in a catch, using <code>exception.stack</code>.</p> <p>Below is the code to parse the stacktrace</p> <pre><code>getLineNoFromStacktrace(stack) { console.log(&quot;The stack is&quot;...
3
1,894
How to use the OnClickListener attribute for button by its ID in android java
<p>I am trying to achieve the same result by id for every button, using onClickListener. This is the link to the original code where onClick is used for all buttons without creating id for reference. The reason why I intended to create id for every button unlike in the original code is I felt the original code is kind...
3
1,328
php cURL doesnt print out anything
<p>I am trying to send a HTML form POST data with a cURL, but it seems the response is always empty. I first save all the POST data in an array, and use an implode function. When I echo out the implode string it does return the values, but after the cURL it's just empty.</p> <p>This is the setup. I call this function ...
3
1,912
To setup bootstrap on yii
<p>I installed the Yii-Bootstrap and keep it in the protected/extensions folder. After that i extract the zip file and named it bootstrap. As the documentation of <a href="http://www.cniska.net/yii-bootstrap/setup.html" rel="nofollow">http://www.cniska.net/yii-bootstrap/setup.html</a>.</p> <p>I change the file config...
3
1,851
It doesn't load from Firebase on the Fragment Activity ('FragmentOne' is clear and it shouldn't be)
<p>I made a Recycler View on a Fragment , wired it with the Firebase, but it won't show anything on the activity , doesn't load from Firebase.. I verified the code and the procedure a thousand times , I really don't know what to do , maybe its a problem in my code or connections..</p> <p>Fragment class :</p> <pre><c...
3
1,260
Stop Gridview Value to change when I click on Edit buitton
<p>I need help with this Gridview issue. I build a dropdown search on the Gridview base on the ID as shown by the image below</p> <p><a href="https://i.stack.imgur.com/Jc964.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jc964.jpg" alt="enter image description here"></a></p> <p>The problem I have ...
3
1,968
XMLNodeList null reference even after checking the next innertext value in advance
<p>I am trying to get the value from the next item, for example, if the next item is null, or doesnt exist, it will proceed to printing. The main problem i am having lies only at this part</p> <p>Main Question : </p> <pre><code>try { numCheck = productList[j+1]["Number"].InnerText; } catch (Exception ex) { numCh...
3
3,973
Rendering Backbone.js view with template variable undefined in the model
<p>Is it possible from a backbone.js view to render an underscore.js template with a variable that is not defined in the related Backbone.js model?</p> <p>take the <code>can't find variable: username</code> error.</p> <p>the template to be rendered:</p> <pre><code>&lt;div class="content" id="content"&gt; ...
3
1,100
cannot insert any string into mysql
<p>I have a problem with inserting strings into mysql. I can insert numbers but cant strings. Can anybody look at this? Thanks for your help.</p> <p>My table(episodes) looks like</p> <pre><code>id int(11) notnull serie int(11) notnull name varchar(255) notnull comment varchar(2...
3
1,110
Video doesn't play first time on Android
<p>I have an Augmented Reality scene which downloads an AssetBundle containing a video. The video is set to Play on Awake so that it plays as soon as it is downloaded and instantiated. On iOS the all works perfectly, however on Android, the AssetBundle downloads and instantiates but only shows the white plane and doesn...
3
1,372
multiple model not load in same controller in codeigniter
<p>i want to run multiple model in same controller but its show below error </p> <blockquote> <p>Severity: Notice</p> <p>Message: Undefined property: Home::$Company</p> <p>Filename: controllers/Home.php</p> <p>Line Number: 23</p> </blockquote> <pre><code>&lt;?php defined('BASEPATH') OR exit('No direc...
3
1,086
Run plsql procedure from concurrent on Oracle
<p>I am trying to create a stored procedure that send parameter input into table. When I tried to compile my store procedure from SQL Developer it was running well,but i want to run this procedure from Concurrent in Oracle EBS 12. </p> <p>However, this is the Error Message :</p> <blockquote> <p>Cause: FDPSTP failed...
3
1,325
Reuseable button in vuejs
<p>BaseButton.vue is reuseable component event listeners This can be passed down to an inner component via v-on=&quot;$listeners&quot; that emits function value in the parent is trigger</p> <pre><code> &lt;div&gt; &lt;button v-bind=&quot;$attrs&quot; v-on=&quot;$listeners&quot;&gt; &lt;slot name=&quot;icon...
3
13,090
How to Join Multiple Reference Tables Based on a String
<p>Suppose that I am given three sheets to pull data from and I need to get repeating data back from those sheets. Essentially for each user in a user group, find all the permissions associated from another group and display given permissions. My sheets are setup as such. <strong>(Assume top left is A1)</strong></p> <...
3
1,516
craft cms command line update to version 3.5.12.1 or greater fails
<p>I am running the following command to update craft cms:</p> <pre><code>php craft update craft </code></pre> <p>However upgrading to version 3.5.12.1 or greater fails with the following error:</p> <pre><code>Performing update with Composer ... done Applying new migrations ... error: The command &quot;'/var/www/craft'...
3
3,680
SemanticModel GetSymbolInfo().Symbol is Null in Constructed Code but not Parsed Code
<p>Given the following code</p> <pre><code>var forText = "int i;for(i=0;i&lt;3;i++){}"; </code></pre> <p>I wish to grab a reference to the <code>i</code> in <code>i=0</code>, and then request its symbol info to see where it was declared, if anywhere! To do this using the string above, you would do the following</p> ...
3
1,683
Remove Padding with SlideToogle
<p>I have some code that expands the rows. The table has padding for each td. Which is fine but the table when collapsed still shows this padding,</p> <p><a href="http://jsfiddle.net/0Lh5ozyb/55/">http://jsfiddle.net/0Lh5ozyb/55/</a></p> <p>Below is the <strong>jquery</strong></p> <pre><code>$('tr.parent') .css(...
3
1,668
Apply random value to animation-duration using jQuery
<p>I have a page that generates 20 randomly sized div elements and places them in random locations within a div container. Using CSS @keyframe animations I can apply a very simple scale and color animation to each element.</p> <p>I would like to set the animation-duration CSS property to a random number for each eleme...
3
1,038
While sorting lower case and upper case letters are treated seperately
<p>While sorting String field</p> <ul> <li>If field is empty then it should go at the top in desc and at the bottom in asc (This is working fine)</li> <li>For Integer behaviour is fine (It considers null/undefined values and do sorting)</li> </ul> <p><strong>Only problem is with 'Case sensitivity'</strong></p> <blockqu...
3
1,088
problem including gtk/gtk.h file not found windows 10 Visual Studio Code
<p>There seems to be a problem floating around for some people using VSCode. I have confirmed the installation of GTK with the terminal window and everything went well.</p> <p>I wrote a quick program in C to read an address and print it back. It compiles and runs (<strong>without the &quot;#include &lt;gtk.gtk.h&quot...
3
1,636
React: Build Connections Among Component
<p>I am a beginner of React JS. Messing around to achieve VanJS event listeners.</p> <p>For layout, I decide to store things like <code>a panel, a button</code> as individual component.</p> <p>Now, I have a component <code>Movie</code> and another component <code>Button</code>, how can I <b>trigger state change of Movi...
3
1,675
Jquery is not working properly in asp.net AsyncPostBackTrigger
<p>net.</p> <p>Recently I have tried to validate some asp controls with my jquery functions in the content page.</p> <p>Below I have given some code where i want to validate one dropdown list which will check that the selected Index of the dropdown list is 0. If it is zero then the background of the dropdown list wil...
3
1,908
Uncaught TypeError with my script
<p>I need some help, I don't know why in some websites it not error, but some websites it is error show up.</p> <p>Its show up the error notice in my console: Uncaught TypeError: Cannot read property 'length' of undefined.</p> <p>Any advice is thanks so much.</p> <pre><code>jQuery(document).ready(function(){ jQuery(...
3
1,117
Binding MVC4 to An Object Containing Arrays
<p>I am creating a form to allow employees to submit timesheets online. The form consists of a number of sections, each representing a day of the week. Within each section, the user can add multiple rows, each row reflecting a task undertaken that day.</p> <pre><code>function AddRow(day) { var count = $("#RowCount...
3
1,788
How to start a new activity from a fragment calss by clicking on Linearlayout within fragment? below is my code but this is not working
<p>when i click on linearlayout within a fragment it dose't give any error but do not start new activity. Is there any error in my code? please someone help me. This fragment xml file code of my project. </p> <p>Fragment_one.xml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:a...
3
2,724
Spring & Hibernate @Valid doing nothing
<p>I have annotated my fields in my model and am using the @Valid annotation on my post controller but it appears to be performing no validation (result.errors is empty)</p> <p>Any ideas what might be causing this?</p> <p>Java based configuration:</p> <pre><code>@FeatureConfiguration public class MvcFeatures { ...
3
6,100
line color change based on logic in apache echarts
<p><strong>Due to the company policy I can't share any kind of code</strong> but I have been struggling with apche echarts. The requirement is I have a line whose color should change at certain points based on logic. I tried achieving using linestyle and piecewise using dimension. I came pretty close to visualmap but t...
3
1,268
submit register form of user in react
<p>I want to submit this registeration form with unique names.</p> <p><strong>First Problem</strong> : I can't seem to map third time. The error shows <strong>array is not iterable</strong>.</p> <p><strong>Second Problem</strong> : I cant change the setArray state in (<strong>array not empty</strong>) <strong>section</...
3
2,376
Function to check if text is emoji dont recognize all the emojis
<p>I have a function that check if the string is emoji. the <code>function</code>:</p> <pre><code>function has_emojis( $string ) { preg_match( '/[\x{1F600}-\x{1F64F}]/u', $string, $matches_emo ); return !empty( $matches_emo[0] ) ? true : false; } </code></pre> <p>the problem: its not recognize all the emojis,...
3
12,146
Pattern matching case when
<p>I write simple math tokenizer and try to use new C# <code>pattern matching</code> feature.</p> <p>Tokenizer is quite simple:</p> <pre><code> public IEnumerable&lt;IToken&gt; Tokenize(string input) { const char decimalSeparator = '.'; string inputWithoutSpaces = input.Replace(" ", string.Empt...
3
1,069
Java Websocket client lib issue: nv-websocket-client sendBinary
<p>When using sendBinary of this lib from client I got all 0 in the server ;(</p> <p>this page asks me to to add more description but the code bellow is simple and straight forward and should be self explainable...</p> <p>client side code:</p> <pre><code>private WebSocket connect() throws IOException, WebSocketExcep...
3
1,282