title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How to get to next object in foreach | <p>Im making a quizz app in android studio.I have a slight issue. I display the questions and answers fine, but when the user click on a button, be it right or wrong answer, i want the next question to come.
I feel its really stupid, but heres what i did.</p>
<pre><code>private void getListe() {
new Th... | 3 | 1,443 |
javascript remove tr from table | <p>I saw this question before but I cannont get it to work. I have the following code</p>
<pre><code><script type="text/javascript">
var scntDiv = $('#p_scents');
var i = $('#p_scents tr').size() + 1;
$('#addScnt').click(function() {
scntDiv.append('<tr><td> <input type="text" name="model"... | 3 | 1,657 |
Alamofire 5 - DataRequest with SwiftyJSON as response | <p>Before you tell me to use <code>Decodable</code> for all the models, and you would be right, I am trying to fix a project in the time the client has allocated. Changing all models to <code>Decodable</code>, and all the places where the models get used, would take a number of days.</p>
<p>The project intercepts calls... | 3 | 1,438 |
React.js child state not re-rendering even after calling setState? | <p>I have an app with one child component that I would like to re-render when setState updates the bookInput in the parent's state. I am using axios to request info from google's book api. For some reason, even though the state is updating, the child is not re-rendering. Please help if you can! Thank you!</p>
<pre><co... | 3 | 2,131 |
Fixed Side Bar with appearing image | <p>I've got my side bar working almost as I want it, but am having issues at certain page heights:</p>
<p>The side bar should work as follows:</p>
<ol>
<li><p>When the "menu" hits the top of the page, an image appears about the menu and the entire side is fixed - working!</p></li>
<li><p>If the footer collides with t... | 3 | 1,030 |
Blank HTTP request to localhost server | <p>I was looking to learn more about web servers and so I followed <a href="http://www.codeguru.com/csharp/.net/net_general/article.php/c4603/Creating-your-own-web-server-using-C.htm" rel="nofollow noreferrer">this tutorial on codeguru</a> to build a sample one. However, whenever I run it and load the default page, I g... | 3 | 2,341 |
How to limit maximum 1 file upload in jQuery-File-Upload from backend in PHP | <p>I am using <a href="https://github.com/blueimp/jQuery-File-Upload" rel="nofollow noreferrer">jQuery-File-Upload</a> and trying to limit the maximum image uploads to 1 (single image upload).</p>
<p>I am using example php file from the demo version itself which is located in <code>server/php/</code> as <a href="https... | 3 | 1,184 |
iPhone application query | <p>I am building simple data adding app using UITabBarController, the data from firstviewcontroller is stored and shown at secondviecontroller through customcell, but the problem is stored data is not shown when I choose secondviewcontroller from tabbar. How to solve this? </p>
<p>here is the coding of FirstViewContro... | 3 | 1,290 |
Saving mp3 file to client? | <p>I'm trying to save a mp3 file from the server to the client and play it after that. I am loading the playlist and after that trying to play a song(The song is supposed to be saved on the client PC and played after that). I am building the application with JavaFXpackage main;</p>
<p>Controller class:</p>
<p>public ... | 3 | 2,616 |
python still prints line if I specify for it to not do that | <p>I don't think the title really says what my problem is but I don't know how to formulate it.<br />
Anyway, I am printing from a log file all lines then I remember the last line in a variable. I then use a for loop to again go trough the whole file, but I use the fact that it has the time at the beginning of every li... | 3 | 1,254 |
Adjust ViewBounds of ImageView when parent layout contents overflow | <p>I've a vertical LinearLayout containing following widgets displayed in center with LinearLayout's gravity set to "center":</p>
<ul>
<li>ImageView</li>
<li>TextInputLayout</li>
<li>TextInputLayout</li>
<li>Button</li>
</ul>
<p>This looks fine normally when when on smaller screen devices, the button in bottom is goi... | 3 | 1,412 |
Different URL's to the same controller ASP MVC Core | <p>I need to generate a navigation that has 'System' and 'Category' archons or buttons. System and Category are using the same controller. I would like to use <code>[Route()]</code> instead of the <code>Startup</code> file for routing.</p>
<p>For category archon works great:</p>
<pre><code><a asp-area="Admin" asp-... | 3 | 1,283 |
StackoverflowException Unhandled -Know the cause, don't know how to fix | <p>I currently have 3 .cs files for my game, these being Game1.cs (main file), Player.cs and HUD.cs, currently I am stuck in a loop whereby the Game1.cs class creates a new HUD object that creates a new Game1 object etc. Code below (working w/ XNA framework btw).</p>
<p>HUD.cs</p>
<pre><code>public class HUD
{
pu... | 3 | 2,503 |
Precipitation to Mean Temperature Relationship | <p>Based on the data below, I am trying to see if there is any relationship between <code>Precipitation</code> and <code>Mean Temperature</code>. Now the <code>lm</code> plot shows <code>precipitation</code> to <code>increase</code> with <code>increasing</code> temperature. However, the <code>p-value</code> is greater ... | 3 | 1,404 |
Using malloc on structs / arrays in other files | <p>UPDATE: <em>The problem with the segmentation fault is not within this function as described below, it is within another function of the same program.</em></p>
<p>Im trying to make a program that animates bouncing balls, however I am quite stuck and can't figur out what I am doing wrong. I believe I have isolated t... | 3 | 1,079 |
Set Dataframe values to values in another Dataframe | <p>I am attempting to merge two dataframes about movies on their title columns. Unfortunately they don't share indices, are ordered differently, and do not contain all the same movies. I have cleaned up the titles enough to the point where I can compare them and determine whether they are acceptably similar to be calle... | 3 | 1,865 |
AsyncTask connection timeout | <p>I wanna put timeout on connection attempt, for instance 10 seconds. But I'm not really good with threading or anything with the web technologies. And I don't know what should I do next.</p>
<p>This is my class:</p>
<pre><code> class JSONAsyncTask extends AsyncTask<String, Void, Boolean> {
ProgressDialog... | 3 | 1,139 |
Reload and Randomise content on click angularjs | <p>I have built the following simple app which loads in some media from the instagram API using angularjs. What I would like to do is add a button at the bottom which when you click reloads and randomises the content. Say for example the length of pics is now 20, and only 6 are shown, I just want to show a random 6 of ... | 3 | 1,248 |
Can select from but not insert into database mysql C# ASP.NET | <p>I have a connection to my db and I can retrieve data no problem but I'm unable to insert. The alert also isn't being displayed so I'm sure the query isn't being executed and it's just redirecting to the aspx page. I've tried many different solutions but I assume the problem is not where I'm looking. Here's the code,... | 3 | 2,063 |
Web Form code behind not creating Partial Class, page inherits "ProjectName.ClassName" instead of just "ClassName". Visual Studio 2013 | <p>So I'm trying to make an "About" page that can be shared across many web applications that we use. To do this, I'm going to be saving the "AboutBox.aspx" and "AboutBox.aspx.vb" files on our web server. Then, from each application, I'll open a pop-up window that will call the AboutBox page by its url. The Problem I'm... | 3 | 1,616 |
Fixing a 500 Internal Server Error on large image process | <p><strong>Information:</strong> I have already looked around for answers on SO, Google and other places with no avail. Please do not redirect me to other answers or websites unless it involves new information.</p>
<p>I am building a huge website which converts thousands of images in one go and uploads details of thes... | 3 | 5,828 |
How to override Sizzle() | <p><strong>Having problem overriding Sizzle()</strong></p>
<p>We encountered "SCRIPT70: Permission denied" exception in IE apparently, our fix is to hack our current version of jquery however we dont want to modify original Sizzle() </p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" d... | 3 | 2,579 |
Chartjs 3 doughnut chart rounded corners | <p>I am using chart js version 3 and I want to draw doughnut with rounded edges I find the solution with the version 2 of chart js however due to breaking changes in chart js 3 I couldn't make the solution compatible with version 3.<br />
Here is the working solution in version 2</p>
<pre><code>Chart.defaults.RoundedDo... | 3 | 1,274 |
ECONNREFUSED when attempting to POST to emulator from within local Docker container | <h1>TLDR:</h1>
<p>Can't <code>post</code> to local Cosmos Emulator. Can <code>post</code> to Azure Cosmos, but not with <a href="https://www.npmjs.com/package/@azure/cosmos-sign" rel="nofollow noreferrer">@azure/cosmos-sign</a>, only with <a href="https://www.npmjs.com/package/@azure/cosmos" rel="nofollow noreferrer">... | 3 | 4,550 |
Can I reversing these buttons easier on myself? | <p>So, I'm wondering if i can make this any simpler (less repetition in the javascript) and whether or not I can make it so the title only turns black when hitting a button if it is that buttons color. If the second part of the question is possible it doesn't need to be simpler I'm just trying to figure out how to make... | 3 | 1,525 |
How to store and use closures that use a common region of memory? | <p>I'm writing a piece of Rust code that simulates a small (typed) toy language with closures, but I'm not sure how I should store them in an <code>enum</code> so that they are still able to access/use a common heap when I evaluate the closures.</p>
<p>I'd like the program's data to be stored on a heap, and I allow al... | 3 | 1,851 |
How to disable OpenSSL version verification | <p>I'm using <a href="https://docker-py.readthedocs.io/en/latest/api/" rel="nofollow">docker-py</a> and <a href="https://github.com/d11wtq/dockerpty" rel="nofollow">dockerpty</a> to connect and execute commands in a container in <code>ucp</code>. Everything works correctly, except when I try to hijack the pseudo-termin... | 3 | 1,112 |
Constructing a link list in python | <p>Hey guys so I'm making a linklist and I'm getting this error</p>
<pre><code>Traceback (most recent call last):
File "python", line 144, in <module>
File "python", line 93, in get
AttributeError: 'NoneType' object has no attribute 'next'
</code></pre>
<p>Does this mean that I'm not using next or could it ... | 3 | 1,050 |
Make middle column take all the remaining space | <p>I've made a usercontrol where my rootcontainer is a grid. </p>
<p>The grid has 3 columns, and I want to make the first and last column a fixed size of 30.
The middle column should take all the remaining space.</p>
<p>But my code is not working.. </p>
<p>Here is my code:</p>
<pre><code><UserControl
xmlns="http... | 3 | 2,042 |
ReactJS + MySQL cannot create new object using api | <p>I am beginner in web dev and trying to create a Full stack project using Mysql Express React Node.js. I tried creating a new device using parameter like serialno(Primary key for db),brand and Modelname. When I ran the api in Postman it didn't read the input and gave message from Contoller js( message: "Content ... | 3 | 2,653 |
When solving nonlinear regression problem over a long data set, the Objective value comes high? As a result estimation fails | <p>I am trying to minimize the average root mean squared error of the following form in a class file using Gekko:</p>
<pre><code>objective = np.sqrt((np.sum((ym-np.array(y))**2))/N/
(np.sum((ym-np.mean(ym))**2))/N)
</code></pre>
<p>Here is the code:</p>
<pre class="lang-py prettyprint-override"><cod... | 3 | 2,872 |
Laminas Cache config issue after updated to PHP 8.1 from zend3 | <p>I work on a project which is recently updated to Laminas and PHP 8.1 from Zend3 and PHP 7.4.</p>
<p>in config/autoload/global.php</p>
<pre><code> 'caches' => require __DIR__ . '/caches.php',
</code></pre>
<p>and this is caches.php</p>
<pre><code>$cacheDefault = [
'adapter' => [
'name' => 'Mem... | 3 | 1,196 |
'UICollectionView must be initialized with a non-nil layout parameter' problem arises even when layout parameter is set | <p>You can see from the code below that layout parameter has been set inside <code>ViewDidLoad()</code>, but it gives me an error:</p>
<blockquote>
<p>Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'UICollectionView must be
initialized with a non-nil layout parameter'</p>
</block... | 3 | 1,112 |
How do I integrate wit.ai and hubot? | <p>I want to integrate wit.ai with hubot. Besides that I have hubot running on a discourse forum server via an adapter. That is secondary.</p>
<p>I installed <a href="https://github.com/guillaumewuip/hubot-wit-helper" rel="nofollow noreferrer">https://github.com/guillaumewuip/hubot-wit-helper</a>, installed the npm ... | 3 | 1,042 |
access properties in v-repeat over array from objects in vue.js | <p>I have a json-result with 5 categories that I want to loop over with v-repeat. I use the push-method to pass the result to my vue-model.</p>
<p>The setup is 5 different categories to which my records belong. Each category must be shown in a different tab (I removed the category-filter on my results cause is not rel... | 3 | 1,215 |
Send large string from Android to MVC | <p>I'm trying to send a very large string from android to my mvc application and back to android. Below is my codes for the MVC application. </p>
<pre><code>[HttpPost]
public HttpResponseMessage RetrieveString(String longString)
{
var resp = new HttpResponseMessage()
{
Content = ... | 3 | 1,232 |
I want click and drag cursor to draw in grid using vue | <p>i want to create something like <a href="https://qiao.github.io/PathFinding.js/visual/" rel="nofollow noreferrer">pathfinding</a> using vue. So when i click and drag in the grid i want to get all the data-x and data-y value in array and change the color of those cells,
and when i click on obstacle button then it sho... | 3 | 2,317 |
How to fix 'Unable to determine the relationship represented by navigation X' of type X error in Entity Framework Core | <p>I'm working on an ASP.NET Core 5 project using Entity Framework Core.</p>
<p>I have these entities</p>
<pre><code>public class StudentTrainingMark
{
public int Id { get; set; }
public decimal TheoreticalMark { get; set; }
public decimal ... | 3 | 1,399 |
'The association between entites has been severed' error when deleting child, with relationship defined in terms of compound key | <p>So the preface: I have a pair of models, one that's defined as a 'parent' that has its own ID, properties, and fields for child components:</p>
<pre class="lang-cs prettyprint-override"><code>public class SearchDesign
{
[Key]
[DataMember]
public int Id {get; set;}
// ... more properties
... | 3 | 1,321 |
code flows to unexpected overloaded method | <p>I got an assignment for a course i am taking in CS.</p>
<p>One of the questions has has some classes and a main method and i am asked what will be the output and through which method the code will go.</p>
<p>I worked it out in my head by following the code. After that i ran the code to see what would happen. and w... | 3 | 1,389 |
QTcpServer with android client unable to print or use data received from client | <p>I am developing Client-Server application in C++ using Qt framework, but the clients can be android phones and computers(Qt client app)
Now i'm having troubles to handle Reception of data on the server side; the server is not receiving data properly.</p>
<p>First, I got things working nicely between the server(Qt a... | 3 | 1,933 |
Get Categories (multiple levels) | <p>I am making a script which will load all categories from a database. I just don't know how I can do this in a way which is shorter.
I am trying to figure out a way in which I can theoretically load infinite levels of categories.</p>
<pre><code>$stmt1 = $db->query("SELECT * FROM Rubriek WHERE Hoofdrubriek IS NULL... | 3 | 1,403 |
How to retrieve data using email from firebase realtime databse? | <p>I have a database from firebase. I want to retrieve some data using a user's email. suppose user put his/her email if the email exists in the firebase database then it shows his/her username and password. I am not using firebase authentication, I am using firebase realtime database.
here is my database structure:
<a... | 3 | 1,418 |
Getting White Lable Error with This application has no explicit mapping for /error, so you are seeing this as a fallback in Spring boot | <p>I am using Spring boot. I am trying to use thymeleaf template. I have used lombok. I am getting WhiteLabel error while running the project that says There was an unexpected error (type=Internal Server Error, status=500).
An error happened during template parsing (template: "class path resource [templates/design.html... | 3 | 1,750 |
Rails 4 error - rails Couldn't find User with 'id'=index | <p>I am trying to make an app in Rails 4.</p>
<p>I'm trying to follow CyberDude's advice in this post:</p>
<p><a href="https://stackoverflow.com/questions/33950172/defining-roles-with-rolify">Defining Roles with Rolify</a></p>
<p>I'm getting stuck at the part where I make an index for users in the user/views file.</... | 3 | 1,703 |
Python - requests.get() return wrong html code | <p>I am trying to get the html code of one marketplace, I am getting the correct code for one category but for another one I am getting wrong result.</p>
<p>For this one</p>
<pre><code>k = requests.get('https://www.skroutz.gr/plus-deals').text
soup1=BeautifulSoup(k,'html.parser')
soup1
</code></pre>
<p>I am getting the... | 3 | 8,841 |
Spinner use IF else | <p>i want to take the value in spinner and user press the ok Button and then start new activity from against the value of spinner. The string array is just like that.</p>
<pre><code> public class Menu extends Activity implements View.OnClickListener {
private String[] array_spinner = {"Select Here", "Honda", "Toyo... | 3 | 1,390 |
Meteor / python / mongoDB - How do I update the mongoDB from a background running process? | <p>I've started creating a meteor app and I want to insert Documents in one of the mongoDB Collections I define using a background task.</p>
<p>Think for example that every day I'm reading an rss feed and scraping a website for news-titles.</p>
<p><strong>Requirement</strong></p>
<ol>
<li>Read the rss feed and scrap... | 3 | 2,057 |
AngularJS : Adding animation when div tag is updated | <p>I am stuck in this problem where I have a div tag which updates and shows a list of images. I want to add animation when the value in the div tag is updated in the transition from one set of images to another.</p>
<p><a href="https://i.stack.imgur.com/PFDHt.png" rel="nofollow noreferrer"><img src="https://i.stack.i... | 3 | 2,290 |
Filter issue with p:datatable with p:selectOneMenu | <p>I have a p:datatable with p:selectOneMenus in each row. The problem:</p>
<p>If I apply filter to one of the columns, the p:selectOneMenu gets an error class and also forgets the current selection(comes from bean).</p>
<p>What causes this problem?</p>
<p>Any ideas are welcome!</p>
<p>Thank you in advance!</p>
<p... | 3 | 4,014 |
Oracle XMLTYPE extract root prolog value | <pre><code>SELECT * FROM v$version;
*Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
"CORE 12.1.0.2.0 Production"
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production*
</code></pre>
<p>I have sample Query w... | 3 | 1,340 |
How can I create a table in a DOCX file with Python? | <p>I am trying to send selected values from radiobuttons into a <code>.docx</code> file</p>
<p>importing what I need, focus is on docx</p>
<pre><code>import tkinter as tk
from docx import Document
main = tk.Tk()
</code></pre>
<p>these are my options that I need to place into a word document on the left of the table,... | 3 | 1,280 |
Understanding explicit promise construction anti pattern | <p><a href="https://stackoverflow.com/users/9515207/certainperformance">CertainPerformance</a> highlighted in my <a href="https://stackoverflow.com/questions/53909391/destructuring-something-in-javascript?noredirect=1#comment94663454_53909391">previous post</a> advised me to <strong>avoid the explicit Promise construct... | 3 | 1,217 |
Knockout.js Binding param to Data-Target returning object instead of text (Accordion) | <p>New to Knockout.Js and just about getting my head around the data-bindings after three days...</p>
<p>I have created a dynamic accordion and when doing my data-bind with the attr: {'data-target': '#' + RecipeName' i get back Data-target=#[object object] I understand that i can get back the name
of the parameter if i... | 3 | 2,096 |
How to make only the child of a cardview clickable, and not the whole cardview itself? | <p>Here's the layout of the cardview in context:</p>
<pre><code><android.support.v7.widget.CardView
android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="1dp"
android:layout_marginRight="1dp"
android... | 3 | 1,178 |
How to fix 'The remote server returned an error: (401) Unauthorized' when using Web Deploy on IIS 10 with IIS Manager Credentials? | <p>I am attempting to deploy a web application to IIS 10 on Windows Server 2019. I have a PowerShell script that executes the MsDeploy.exe command using basic authentication. The username and password is provided in the query string POSTed to the web server for the deployment. After a little playing around, I was able ... | 3 | 1,226 |
Liberty and OpenLiberty console/messages encoding to UTF-8 | <p>I'm using OpenLiberty (automatically downloaded through its maven plugin) and my application is working fine (jax-rs and servlet/jsp outputs are fine).</p>
<p>But the console (and messages.log) output is messy. Here is one example:</p>
<pre><code>[INFORMAıåES] SRVE0253I: [io.openliberty.microprofile.health.3.0.inter... | 3 | 1,202 |
Python 3.5/Tkinter: Using Matplotlib in a multi-frame GUI (keeps crashing!) | <p>I am trying to achieve something very similar to this question (<a href="https://stackoverflow.com/questions/36928338/cannot-draw-matplotlib-chart-in-tkinter-gui-without-crashing">cannot draw matplotlib chart in tkinter GUI without crashing</a>). The only differences between the code shown in the link and my code ar... | 3 | 1,452 |
iOS Developer: the network Api Issue. How to put a image data in a dictionary? How to persuade the server? | <p>iOS develop: to upload images with POST network request.</p>
<p>I use AFN .Usually we configurate the HTTP headers and put the image data in the HTTP body.</p>
<p>After a lot googling , still not aware of it.</p>
<p>The server, JAVA, demands the image data shall be uploaded with a key.</p>
<p>I met a problem.</... | 3 | 1,852 |
TextInputEditText border disappear when setError() is called | <p>I'm using a style for <code>TextInputEditText</code> to put a border around the field and I'm using<code>TextInputLayout</code> to set error messages. But when <code>setError ()</code> is called the border disappears and remains only a space in place that should have a field.</p>
<p><strong>xml:</strong></p>
<pre>... | 3 | 1,203 |
What do large times spent in Thread#initialize and Thread#join mean in JRuby profiling? | <p>I'm trying to profile an application using JRuby's built-in profiler.</p>
<p>Most of the time is taken in <code>ClassIsOfInterest.method_that_is_of_interest</code>, which in turn has most of its time taken in <code>Thread#initialize</code> and <code>Thread#join</code></p>
<pre><code> total self child... | 3 | 1,803 |
Large object leaf node changes not detected by AngularJS | <p>I'm trying to get an example working where I have a large JSON object, and I want to enable editing the raw json source of small subsets of that object via a textarea (kind of an "advanced settings" area).</p>
<p>The JSON editor is working fine when you edit the top level element $scope.objects, and follows the sta... | 3 | 1,631 |
Problem generating signature with OAuth 1.0 | <p>I am having a problem generating a valid HMAC-SHA1 signature in powershell which I eventually would like to use with the Flickr API. I have been stuck on this for a couple of weeks, so if somebody please tell me what I a doing wrong, that would be much appreciated. Thank you :)</p>
<p>Here is the code I have writt... | 3 | 1,715 |
Spring Cloud Stub Runner Boot Application and Cloud Stream (Kafka) for Smoke Test | <p>In a microservice architecture I have three services. The first one creates a message in a kafka queue with spring cloud stream. In this service I use spring cloud contract to generate a contract. The second service is a spring cloud stub runner boot service that reads the contracts of the first service and exposes ... | 3 | 1,352 |
nginx-ingress pods keep crashing when request comes - AKS | <p>our nginx-controller pods keep crashing when a request comes. From the logs, it looks like it has timeout connecting to API server, any idea how to enable more detailed logs? </p>
<p><a href="https://i.stack.imgur.com/JjEcj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JjEcj.png" alt="enter ima... | 3 | 1,091 |
How to read out values of Indexset elements in SwiftUI? | <p>I've got a pretty straightforward ForEach List and deleting an entry with onDelete() works without issues. However since one of the variables in the element stores a file's url, that I don't want to leave behind, I'm looking to implement a clean up through FileManager. But for the life of me I can't seem to get acce... | 3 | 2,321 |
Concatenate an input argument into a splice call | <p>I am trying to reproduce the code lines:</p>
<pre><code>purchase = () => {
const eventDetails = {...this.state.events.event0002};
}
</code></pre>
<p>With the following, that takes "eventID" as an input (which at some point could have a value of "event0002") and adds it to "....state.events." to create "...s... | 3 | 1,254 |
How to Map array by removing duplicates | <p>I'm developing an application using React.js and using Relay.js for fetching data and have a JSON response for a component like this:</p>
<pre><code>{
outfit(id :"T3V0Zml0Tm9kZTo1") {
id
title
productvariant {
edges {
node {
id
title
product {
ed... | 3 | 1,260 |
Problems with layout in switch | <p>Seems like i haven't really figured out how the switch works, cause it is impossible (for me) to get it right.</p>
<p>I have this code:</p>
<pre><code>foreach ($this->timeofday as $key => $node) {
if (get_class($node) === 'DOMElement') {
if ($node->hasAttribute('class')) {
switch (... | 3 | 1,695 |
Converting a json schema to angular-tree-control treemodel | <p>I have a very large <a href="http://json-schema.org/" rel="nofollow">json schema</a> which I would like to display in an <a href="https://github.com/wix/angular-tree-control" rel="nofollow">Angular Tree Control</a>. However, the json schema is not exactly in the treemodel format supported by the Angular Tree Control... | 3 | 1,060 |
Salesforce Too many soql 101 | <ol>
<li><p>It works fine in sandBox but it causes too many soql 101 in Production. I tried to use 2. bulkified map with content distribution link with soql query but it always blocked bulk in MAP. any advise ?</p>
</li>
<li><p>Since I tried every thing with list customObject__c=[select... contentdistribution := ..id] ... | 3 | 3,231 |
Bootstrap 4: Is there a fix/workaround for false anti-aliasing in MS Edge for the border of sticky th | <p>I will be referencing <a href="https://codepen.io/balajidesigner/pen/YBKQBK?editors=1100" rel="nofollow noreferrer">this Pen</a> from Balaji731's answer in <a href="https://stackoverflow.com/questions/54286705/bootstrap-4-table-with-the-scrollable-body-and-header-fixed">Bootstrap 4 table with the scrollable body and... | 3 | 1,103 |
Javascript: How to target lightgallery.js on dynamic added elements | <p>I'm trying to target dynamic added elements to work with lightgallery.js. See the exemple bellow:</p>
<pre class="lang-html prettyprint-override"><code> <div id="animated-thumbs" class="page-divs-middle">
<!-- STATIC EXAMPLE -->
<div class="col-md-3 col-xs-3... | 3 | 1,154 |
Issues with React native video playback and image cover | <p>I am trying to recreate the snapchat discover, I have applied the code below and when I click on my cover image nothing happens. If I manually set my state to true, flatlist renders the video and I can play any of the videos. I would like to click on the image and switch to the video.</p>
<pre><code> class Games ex... | 3 | 1,409 |
What is a recommended way to optimize my app given this server log? | <p>Here is my server log for loading my <code>Dashboard#Index</code> action:</p>
<pre><code>Started GET "/" for 127.0.0.1 at 2014-10-27 03:26:56 -0500
User Load (1.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Processing by DashboardController#index as HTML
FamilyT... | 3 | 5,553 |
How to create a dbcontext query that returns the relational database structure in json | <p>My problem is I need to render the following structure from a dbcontext query because a library can render this format very nicely. Here the data in json.</p>
<pre>
{"Customer":{"Id":"BOLID","CompanyName":"Bólido Comidas preparadas","ContactName":"Martín Sommer","ContactTitle":"Owner","Address":"C/ Araquil, 67","Ci... | 3 | 1,315 |
Enable to execute gcc when installing pyodbc on Cygwin | <p>So I am using Cygwin on Windows and trying to install pyodbc but I have the following error. I have 2 questions:
1- How can I solve this error and install pyodbc
2- There is the possibility to install some packages on Cygwin at the time of installation. However I work in a company with high security and every time I... | 3 | 2,697 |
Access Random Forest Features Names Attribute in a scikit learn Pipeline after Feature Selection | <p>I'm running Random Forest Classifier in a Dataset, as a step of a sklearn pipeline.</p>
<pre><code># Numerical
numeric_cols = ['p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7']
numeric_transformer = Pipeline(
steps=[("scaler", StandardScaler())]
)
# Categorical
categ_cols = ['p8', 'p9', 'p10', 'p11', 'p12', '... | 3 | 1,261 |
Camera not working on first app run after install | <p>I've implemented a simple QR Scanner code in my Android App. The code seems to work fine but for some reason, upon installation, the first time you open the app, the <em>CameraView</em> remains black. It is only after the second time I start the app that it works (after closing, <em>onResume</em> won't change anythi... | 3 | 2,129 |
Can anyone tell me why my program is going in infinite Loop? | <p>Why my code is giving an Infinite loop and i have checked my code many times and I don't know where the mistake is but my output is 34 in an infinite loop and it is a code for doubly linked list!</p>
<p>So please tell me where the mistake is as well as why my loop is showing 34 instead of 77 in my code and is there... | 3 | 1,031 |
Issues with proper looping in a do while loop - Java | <p>I seem to be having some issues with my program. I was advised to use a do while loop by my instructor to keep the program running. However, it errors out when I type in an invalid password and restarts. When I input a valid password it only prints "Valid Password" and does <em>not</em> loop. Where have I gone wrong... | 3 | 1,826 |
Chrome doesn't send "if-none-match" header in HTTPS (but sends it in HTTP) | <p>tl;dr: Chrome is not sending "If-None-Match" header for HTTPS request but sends it for HTTP request. Firefox always send "If-None-Match", both in HTTPS and HTTP.</p>
<p>I was trying to optimize cookies management for my node server when I came across a weird behavior with Chrome. I will try to de... | 3 | 1,712 |
How to convert json key as attribute in java | <p>I'm very new working java with json. Couldn't find relevant solutions. That's why posting this question. I have json with property name as value in it. How to convert this property name as attribute and restructured in array. Any help would be much appreciated.</p>
<p>Following is my json file:</p>
<p><em><strong>IN... | 3 | 3,066 |
How do I keep view template from loading until all Promise data has resolved? [Angular2, JavaScript] | <p>I'm trying to get my app to render data that is the result of async http requests which return Promises. I've set up my code so that its executed in the <code>ngOnInit</code> method, so that all the logic will process before the view renders. However, I'm having an issue where most of the Promise data loads before i... | 3 | 1,096 |
Mainframe MQ to Standalone JMS in EBCDIC | <p>From a Java app I'm trying to browse messages from a mainframe IBM MQ queue (EBCDIC messages). I need to browse messages, not consume them. Here is the code:</p>
<pre class="lang-java prettyprint-override"><code>JmsFactoryFactory ff = JmsFactoryFactory.getInstance(WMQConstants.WMQ_PROVIDER);
JmsConnectionFactory cf... | 3 | 1,049 |
I have an Arduino Rs485 network, and am trying to add a in Raspberry Pi. The Pi is able to send messages to the Arduino's, but is unable to receive | <p>My network consists of multiple Arduino's connected to the <a href="https://hobbycomponents.com/wired-wireless/663-max485-rs485-transceiver-module" rel="nofollow noreferrer">Max485</a>. These Arduino's can talk perfectly between each other.</p>
<p>I am currently attempting to wire a Raspberry Pi into the network. I ... | 3 | 2,642 |
Java Array not removing or updating entry from array | <p>I wrote a java program that allows a user to input automobile data into an array. They also have the option to update that data or remove it, only those 2 functions are not working. I have been struggling with this for some time now, any help is greatly appreciated. At the end I also try to write all the data to a t... | 3 | 1,993 |
App Scanner crashing on uploading the app file | <p>I am facing issue with the private apis used in my application.So,I found that App Scanner application is a good tool for scanning those kind of issues.So i have installed it from <a href="https://github.com/ChimpStudios/App-Scanner" rel="nofollow">here</a> .When trying to test my application it crashes giving me fo... | 3 | 2,082 |
My app stopped logcat error | <p>I have this error and i don't know why!</p>
<blockquote>
<p>04-28 09:26:55.935: E/AndroidRuntime(1437): FATAL EXCEPTION: main</p>
<p>04-28 09:26:55.935: E/AndroidRuntime(1437): Process:
com.neurondigital.HighwaySpeed, PID: 1437</p>
<p>04-28 09:26:55.935: E/AndroidRuntime(1437):
java.lang.RuntimeExce... | 3 | 2,040 |
JQuery Mobile db success event not triggering function | <p>I am having a problem executing a success function within multiple success events, let me show you the code:</p>
<pre><code>$("#beneficiarios").one("pagebeforeshow", function(){
db.transaction( function(tx){ queryDBAll(tx, "Beneficiarios", 0, 10) }, onError ); //LOAD BENEFICIARIOS IN DB
$("#btn-add-ben").... | 3 | 1,702 |
Keeping nested anchor fixed while using width hover transition of div in CSS | <p>I am currently trying to achieve something when on hover, the background colour will change and animate as a "push" when the width changes from 0% to 100%. However, with my solution, setting the div to be 0% causes the anchor tag to not stay in a single line (breaks). How do I fix this?</p>
<p><strong>Fiddle</stron... | 3 | 1,106 |
Alamofire - asymmetric cryptography with elliptic curve key (SSL pinning) | <p>I have a problem with connecting to server using Alamofire.</p>
<p>I use this code (credits to cnoon):</p>
<pre><code>class NetworkManager {
public static var manager : Alamofire.SessionManager = {
// Create the server trust policies
let serverTrustPolicies: [String: ServerTrustPolicy] = [
... | 3 | 1,122 |
PHP Class not Returning Result | <p>I am working on an Item Inventory Web App. I want users should be able to add and assign item to a user. Each user is entitled to one item at a time. If, say, user a already has an item assigned and you want to add more item, the system should lodge an error that will tell you
to withdraw the item be issuing a new ... | 3 | 1,420 |
Fixing the view of display: table property | <p>I've tried to add a <code>display:table</code> to a parent element (rowcontainer) and <code>display:table-cell;</code> to the child element (div1, div2) for over 500px width on screen. This worked, but the padding on the child elements now have to left or right padding, and the bottom row has something off with it, ... | 3 | 1,074 |
PHP - script not being executed | <p>I have a html form which the user inputs values/selects options. After selecting, these values would be sent to the php script in the server. The script would be retrieving some data from mysql depending on the values the user selected. These values and data from mysql would then be collated together and used in a <... | 3 | 1,550 |
Will OAuth2RestTemplate refresh itself when token expires in the middle of multiple requests in 1 thread? | <p>so I will be still using the deprecated OAuth2RestTemplate for this 1 feature (in some time we will move to WebClient but as of now we need do use OAuth2RestTemplate).</p>
<p>The use case is that we do requests on behalf of the client, they send request to our API with their credentials for some other stuff and we u... | 3 | 1,077 |
Failure to compile Android application | <p>I am on a Linux Mint 20.X distro.</p>
<p>I installed open source Qt Creator by using the <a href="https://www.qt.io/download-qt-installer" rel="nofollow noreferrer">online installer</a> mainly targeting the building native Android applications with C/C++.</p>
<p>I had no experience with Qt Creator so I spent a coupl... | 3 | 2,120 |
R ggplot2 problems with fill and color | <p>I have 2 data frames</p>
<p>DF1</p>
<pre><code> NMDS1 NMDS2 NMDS3 id.type Cruzier Station Deep
1 -0.6408266 -0.60298057 0.22242583 Samples X6 G44 MAX
2 -0.6207177 -0.53097033 0.16097249 Samples X6 B12 MAX
5 -0.6000443 0.01716781 0.10680716 Samples X6 G44 MIN
8 -0... | 3 | 1,531 |
How to create new dictionaries from nested dictionary? | <p>I have a nested dictionary. How do I access them and get the result as follows:</p>
<pre><code>dict_lbl = {
"lbl1":{"name":"label1","item1":"Accounts", "item2":"kannagu", "shortcut":"F1","printitem":"You... | 3 | 1,117 |
How to properly convert a df to time-series and clean it in the same pipeline? | <p>I am trying to convert a dataframe to time-series object (<code>ts</code>) and then clean the noise of those time-series by using a filter (<code>bkfilter()</code>: this filter cleans time-series noise), these tasks are intended to be applied by group (<code>decil</code> df column).</p>
<p>Here's my attempt:</p>
<pr... | 3 | 13,004 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.