title stringlengths 13 150 | body stringlengths 749 64.2k | label int64 0 3 | token_count int64 1.02k 28.5k |
|---|---|---|---|
How to order an array only after it has been filled | <pre><code> func getOkToDownload(response:AcloseCarsToDownload?, error : Error?) -> Void {
if let response = response {
self.response = response
if response.status == "OK" {
if let carsDownloaded = response.cars {
var number = numberCars / (catego... | 3 | 1,222 |
it just keep loading the same page with angular ngRoute? | <p>I am learning angular by building a simple bookstore web app using nodejs as a restful api server. I built the server and it works fine, but once it comes to the front end I face an issue. I built the main page using angular ngRoute to get the data from the server and presented as following:</p>
<p><a href="https:/... | 3 | 2,341 |
How to hide/show text with Javascript - link behavior | <p>I have just started learning JavaScript and I need some help.
I have got an HTML file and a CSS file in which I am NOT to make any changes.
With Javascript I have to add 2 links which will hide and show the paragraphs with class "show" .<br>
When you open the HTML file in your browser , the paragraphs in question ... | 3 | 1,510 |
How can I align these HTML components? | <p>I've got 2 views, one for logged in and one for logged out. The logged out view I think is OK:</p>
<p><img src="https://i.stack.imgur.com/ALk8X.png" alt="enter image description here"></p>
<p>When logged in, the components do not align properly, as can be seen the user picture displays too far to the left:</p>
<p... | 3 | 1,387 |
Cannot Fetch Postgres 9.0 Package For Install in Ubuntu/CloudFoundry | <p>I'm trying to install CloudFoundry (VCAP) on an ubuntu 10.04 server instance.<br>
Following these directions: <a href="http://blog.modeltwozero.com/2011/05/running-cloud-foundry-on-amazon-ec2-or.html" rel="nofollow">http://blog.modeltwozero.com/2011/05/running-cloud-foundry-on-amazon-ec2-or.html</a></p>
<p>Unfortun... | 3 | 1,903 |
Storing multiple numbers in an array (As3) | <pre><code> private var hitArray:Array = new Array [ 10, 20, 30, 40, 50, 60];
</code></pre>
<p>Hello. </p>
<p>I have stored multiple numbers in an array and it appears flash does not like this, I am guessing that I am telling the array that it will either have 10 spaces, 20 spaces, etc...or the array needs to... | 3 | 1,088 |
WCF 5.0 and Firebird .NET Provider: $expand broken | <p>The problem described in the link below (WCF 5.0 & DevArt provider) seems to be also true for the Firebird .NET Provider:</p>
<p><a href="http://social.msdn.microsoft.com/Forums/en/adodotnetdataservices/thread/e74ea4d1-a262-4326-8529-c146a3acfb6d" rel="nofollow">http://social.msdn.microsoft.com/Forums/en/adodot... | 3 | 2,961 |
CSS code problem that shows the navigation bar incorrectly | <p>There is something wrong with my CSS code, once I added the CSS code of the products (starting from #lap) the navigation bar showed incorrectly, and when I remove the "}" that close "@keyframe slide" the navigation bar shows correctly but ofc the products CSS code doesn't render cuz "@keyfr... | 3 | 5,404 |
How i can fix 400 (Bad Request) ajax error on.change form jquery? | <p>Hello guys I have a problem when I'm trying to send data by ajax and it's said that I have 400 (Bad Request) ajax errors and this is my code:</p>
<p>This is Html code:
the rows is data of my database
$row['attributes'] it has (size,brand,color......)</p>
<pre><code> <form id="form">
<?php fore... | 3 | 1,195 |
JSF Dynamic Image as div Background | <p>I generate dynamic images from a backend database using streamed content. They work fine when used with p:graphicImage.</p>
<p>The issue comes when such a dynamic image needs to be the background of div.</p>
<p>How can I use dynamic images created with stream content as a background of a div element?</p>
<p>JSF C... | 3 | 1,081 |
MySQL Query Select from table count total and used, calculate remaining | <p>I have two tables :</p>
<pre><code>-- **phones**
CREATE TABLE IF NOT EXISTS `phones` (
`phone_id` int(11) NOT NULL AUTO_INCREMENT,
`phone_type_id` int(11) NOT NULL,
`phone_mac` varchar(255) NOT NULL,
`office_id` int(11) DEFAULT NULL,
`did_id` int(11) DEFAULT NULL,
`virtual_extension_id` int(11) DEFAULT NULL,
PRIMA... | 3 | 1,460 |
using a swift loop that waits on functions to complete | <p>I'm new and trying to learn and code my first app. A simple app to get started...So I'm trying to make a loop that will perform a series of functions completely for a certain number of times (rounds). I've figured out the body of code and I'm trying to implement DispatchGroup() to wait on the functions to perform:</... | 3 | 1,125 |
Unity 5 c# Navigation | <p>My problem is that my </p>
<pre><code>var tempTarget RtsManager.Current.ScreenPointToMapPosition(Input.mousePosition);
</code></pre>
<p>get value null for some reason even that i told it to get the value on mouseclick</p>
<p>i tried to see why it doesnt get a value but cant seem to figured out the problem</p>
<... | 3 | 1,066 |
Ionic splash screen is being skipped | <p>I need some help with my Ionic splash screen. I've tried code from a lot of Google and Stack Overflow results and I can't get any of them to work (the latest one I tried: <a href="https://stackoverflow.com/a/27687209/5424240">https://stackoverflow.com/a/27687209/5424240</a>).</p>
<p>I did everything using an offici... | 3 | 2,498 |
Optimizing a MySQL query with several joins | <p>One of the queries used by a web app we're running is as follows:</p>
<pre><code>SELECT
p.id, r.id AS report_id, tr.result_id,
r.report_date, r.department, r.reportStatus, rs.specimen,
tr.name, tr.value, tr.flag, tr.unit, tr.reference_range
FROM patients AS p
INNER JOIN
patients_reports AS ... | 3 | 3,397 |
dispatch not working in function it's triggered in | <p>I am using react-redux with redux toolkit in my app, and I'm dispatching a change of state (boolean) to the opposite of its existing state each time I trigger the event.</p>
<p>The state successfully changes each time in Redux DevTools and also in a separate useEffect() function in the same component, but not workin... | 3 | 1,422 |
Last element in nav not in center | <p>I have centered all text within the <code>li</code> tags but, for some reason, the last one is slightly closer to the bottom. Here is the code and the picture:</p>
<p><img src="https://i.stack.imgur.com/FiZff.png" alt="Picture of result" /></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="t... | 3 | 1,197 |
ASIHTTPRequest causes crash after interrupting Internet connection | <p>I'm using ASIHTTPRequest to download data from the internet. If I lose my internet connection, and I try to load the data the app crashes.</p>
<p>Code: </p>
<pre><code>- (IBAction)load:(id)sender {
if ([act isAnimating]) {
NSLog(@"Request already being processed!");
}
else {
ASINetworkQueu... | 3 | 1,284 |
streamz exception on dask gather | <p>i am trying to use streamz to manage an image processing pipeline.
I am simulating a camera using the class Camera and have set up the pipeline below. </p>
<pre><code>import time
from skimage.io import imread
from skimage.color import rgb2gray
class Camera(object):
imgs = [imread(f + '.jpg') for f in ['1', '2... | 3 | 2,677 |
card turn canvas draw | <p>I want to have twelve (images of) cards facing down next to each other and be able to flip them when clicking on one. To display a random (image of a) card from a selection of twelve without repeating the same image twice.</p>
<p>Also whenever you click on a card I want to have a corresponding part of a numbered ca... | 3 | 1,289 |
How to add AjaxControlToolkit's Gravatar Control before or after checkbox in checkboxlist control | <p>I have a CheckBoxList control that contains dynamically generated checkbox items. This checkboxlist will contain usernames. I am using Gravatar control from AjaxControlToolkit to allow users to have their own profile pictures. What I want is that when a checkbox with username as a text is added to the CheckBoxList, ... | 3 | 1,220 |
Magento - memory error trying to get thumbnail | <p><strong>Edit</strong>: I'm using Magento 1.6.2 (community)</p>
<p>I want to iterate over products. I run the following code (althought this is not a full file, it is part of a SOAP service's class definition - methods not described here are not important to my issue):</p>
<pre><code>//ok
private function _listProd... | 3 | 2,271 |
javacc bug ?? it gave me a token I never wrote in the input | <p>I gave this input string to my javacc-based parser: </p>
<pre><code>" SELECT a\n.run_id,\nx.*"
</code></pre>
<p>but it gave me an exception:</p>
<pre><code>net.sf.jsqlparser.parser.ParseException: Encountered " ";" "; "" at line 3, column 1.
Was expecting one of:
"*" ...
"*" ...
at net.sf.jsqlparse... | 3 | 2,159 |
qml Chartview append to AreaSeries | <p>I am new to QML and took following examle as a learning base for ChartView.
Later on I want to use similar methods to add data dynmically during runtime</p>
<pre><code> import QtQuick 2.2
import QtQuick.Window 2.1
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.0
import QtQuick.Dialogs 1.0
... | 3 | 1,493 |
How to determine the winner in a race? | <p>I have created a program that places several nodes (which act as animals) on the screen; they're supposed to race eachother. Animal.js is the parent object of the four subclasses: cheetah.js, leopard.js and other subclasses which are similar</p>
<p>This is the animal.js class, the constructor takes three arguments, ... | 3 | 2,872 |
Select only certain images with Python image webscraper | <p>I'm trying to create a simple webscraper in python that find, download and create a pdf of certain images found in the website. For now I only created the webscraping part of the code:</p>
<pre><code>import requests
from bs4 import BeautifulSoup
import numpy as np
url = 'website url'
page = requests.get(url)
print(... | 3 | 1,081 |
What is the time complexity for this proposed solution | <p><strong>Question</strong></p>
<p><em>Given an integer array nums, return the maximum result of nums[i] XOR nums[j], where 0 <= i <= j < n.</em></p>
<p><strong>Example 1:</strong></p>
<p><em>Input:</em> nums = [3,10,5,25,2,8] <br/>
<em>Output</em>: 28 <br/>
<em>Explanation:</em> The maximum result is 5 XOR 2... | 3 | 1,273 |
DeviceIoControl Invalid access to memory location | <p>I am getting invalid access to memory location when I run the following code</p>
<pre><code>WIN32_FIND_DATAW FD;
WCHAR cPath[MAX_PATH], cFindPath[MAX_PATH];
if (!GetCurrentDirectoryW(MAX_PATH, cPath))
ErrorExit("GetCurrentDirectory");
else
printf("Current Path: %s\n", cPath);
StringCchCopyW(cFindPath, MAX... | 3 | 4,352 |
findFragmentByTag returns null on all fragments except one | <p>I know there are some questions that cover this issue, but mines kind of different because it doesn't use <code>fragment</code> transition (I don't know how it works so I didnt use it).</p>
<p>What my <code>MainActivity</code> does is, it adds <code>fragments</code> on the <code>tabBar</code> and creates functions ... | 3 | 1,067 |
Failing to generate a filter on debezium connector with error: "op is not a valid field name" | <p>I have created a debezium connector to a docker MySQL container.
I tried to set a filter for messages:</p>
<pre><code> {
"name": "my_connector",
"config": {
"name": "my_connector",
"connector.class": "io.debez... | 3 | 2,667 |
Golang to elastic- build dynamic query | <p>I'm new to Goleng and Elastic.
I have a static query that I took out of the Kibana, now I want to use this query to build a dynamic query code according to the parameters that the customer will send</p>
<p>how i add or remove "event_state.status" according to user parameters.
how i convert this json to <c... | 3 | 2,850 |
Rust lifetimes, data flows into other references | <p>I wrote the following code that filters a stream of data which worked fine until I changed from parsing simple numbers to also have types that are bound to lifetimes like <code>&str</code> and <code>&[u8]</code>.</p>
<pre class="lang-rust prettyprint-override"><code>use wirefilter::{ExecutionContext, Filter... | 3 | 1,788 |
Selenium Project Will not connect to Firefox | <p>Error: </p>
<blockquote>
<p>org.openqa.selenium.firefox.NotConnectedException: Unable to connect
to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
ons.xpi DEBUG Calling bootstrap method startup on
onboarding@mozilla.org version 1.0
1531840048588 addons.xpi DEBUG Registering man... | 3 | 2,392 |
Application crashes on selecting spinner item? | <p>In my application, I'm providing various <code>Templates</code> for the <code>Text Message Body</code>, as <code>spinner list items</code> , that can be selected and user can send them instead of typing <code>message</code>, But the problem is when user open the menu item to select template the <code>application cra... | 3 | 1,252 |
Passing a Facebook Places id, from placesPicker in iOS... to postParams for a feed publish | <p>This has been driving me bananas! I'm trying to get my app to publish a message to the users facebook feed, and a checkin to a facebook Place after selecting a local place from the placesPicker in iOS.</p>
<p>I've pretty much got everything working in testing, meaning when I just hand type string values for all th... | 3 | 1,069 |
Loading different data in array | <p>So I got this array setup called tableDateArray, which is defined in <strong>SubClass.h</strong>. Now im trying to change the data of the array on wether or not a button is selected.</p>
<p>My code in <strong>MainView.m</strong>:</p>
<pre><code>- (IBAction)dateSpecifiedButtonTouch:(id)sender {
if (monthly.enabled... | 3 | 1,156 |
R - map vector of unique values to dataframe column with duplicates | <p>I have a column in a dataframe that is a character vector. I would like to add to my dataframe a column containing unique ID values/codes corresponding to each unique value in said column. Here is some toy data:</p>
<pre><code>fnames <- c("joey", "joey", "joey", "jimmy", &... | 3 | 1,108 |
fetch all members of a server inside a funtion | property members undefined | package: discord-giveaways | <p>So i am using the package "discord-giveaways" and i want to use the "exemptMembers" option which is a function and with which i can set who is not allowed to take part in a giveaway and i want that people who haven't joined a specific server cannot take part but i am not sure if coded that right and also there is th... | 3 | 2,158 |
Remove groups based on multiple conditions | <p>I have a table similar to the below. My goal is to remove groups for each date where the status moves to either 'Cancelled' or 'Failed', while retaining groups per day that contain other status changes.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Group</th>
<th>Status</th>
<th>Date</... | 3 | 1,406 |
Program stops working after entering the value for more than 6 users | <p>I have a school project which asks me to write a code using struct and functions, regarding sales in Greek cities. You are prompted to enter the values of 'em. The program works just fine if I enter that there's 6 salesmen, but a number larger than that makes it stop after entering all the values.. An example would ... | 3 | 1,184 |
passing value from service to component | <p>I am having a real problem passing a variable from a service (LibraryService) down to a component which is one level deeper in the directory structure (ReadingPaneComponent). This is after I won a pitched battle getting this variable into the service from a component which is TWO levels deeper (AuthorsComponent). Ef... | 3 | 1,061 |
Reload Localized Layout After Locale Changed in Service | <p>I have a keyboard service which displays a soft keyboard input to the end user. I am planning on expanding this to support multiple languages, though I am running into a problem when attempting to reload the layout file with a new localization.</p>
<p>My problem is that when a configuration change is triggered, the... | 3 | 1,421 |
Rails Many-to-Many Debugging | <p>Im writing a rails application for pairing people up when they want to play videogames together. I have a User model, and a Game model. Then I have a UserGame model for the many to many relationship.</p>
<p>The User may choose which games they are willing to play on sign up or in a profile edit page, and their game... | 3 | 1,641 |
Changing text evertime user presses the button using textview | <p>I am making an Facts based application. I want it to show new fact every time the user presses the button and i also want that when the user exits the app and restart it, it would resume from the same fact that user was reading.
Help me guys... I have included the java and xml code that i am using
Thanks in advance... | 3 | 1,107 |
How to run a js script only if the other one is valid | <p>Hello i have a validation script of a form and i want to run the animation only when all fields are validated and seems i dont manage to make it working. i'll post my two scripts:</p>
<pre><code><script>
$(document).ready(function() {
// validate signup form on keyup and submit
$("#msform").validate(... | 3 | 2,175 |
Returning List of sub elements when extending a interface | <p>I'm developing a library and i have a faced an issue when overriding the return type as a List of sub elements.</p>
<p>Initially its looked like this,</p>
<pre><code> Class Student {
}
public interface A {
public Student isCurrentStudent(String name);
public List<Student> getStude... | 3 | 1,165 |
How to get a specific queryset in Django | <p>I am building a hospital management app and I am currently building the Nurse's webpage. In that webpage, I would like the following to display: a list of all employed nurses, a list of their workshifts, and what departments they work for.</p>
<p>I am trying to get the department section to display but I keep gettin... | 3 | 3,501 |
Store Main storyboard in a Swift Package | <p>I'm playing around with Swift Packages in Xcode. I was wondering if it's possible to move your app's "main storyboard" into a Swift Package. By "main storyboard", I mean the one that's set in your <code>info.plist</code> under the key <code>NSMainStoryboardFile</code> (the human-readable name is ... | 3 | 1,050 |
Gridview not filling body in landscape | <p>I am using building a view that needs to be responsive on both landscape and portrait modes, I am using a gridview when I change to landscape however when in landscape the gridview doesnt fill the entire body </p>
<p>Gridview doesn't seem to have a default padding or anything</p>
<p><a href="https://i.stack.imgur... | 3 | 2,060 |
Function works as intended but when converted into an onEdit() function it doesn't run till the end | <p>I have made this nice code which does the job if I fire it from the script editor, which is to check some dates and send out some e-mails if some dates are too close to each other, but if I convert it into an onEdit() function and do an edit it launched but doesn't finishes which is such a shame. The code I am using... | 3 | 1,753 |
fprintf in File not found | <p>I have a problem in the fprintf in the function "menor" because the data is not visible in the file selected, i dont know what is the problem, please help, i think is the reference file, but not idea.</p>
<p>I have a problem in the fprintf in the function "menor" because the data is not visible in the file selected... | 3 | 1,472 |
How to share multilple images via email | <p>Im showing some images from internet to my listview using an image dowloader.The images are stored in sd card using hashcode.How can i share those images from via email.In the default Gmail client shows i have attached the images.But in actual main i could not see any attachment.Only email body is availble . Here is... | 3 | 7,532 |
Getting RuntimeException: A facade root has not been set. in /var/www/html/vendor/.../Illuminate/Support/Facades/Facade.php | <p>I am trying to setup the PHP, MYSQL, NGINX using Docker . I followed the udemy tutorial by Maximillian and
my kept all my docker files in a dockerfiles folder.</p>
<p>The php.dockerfile is as follows:</p>
<pre><code>FROM php:8.0-fpm-alpine
WORKDIR /var/www/html
COPY src .
RUN docker-php-ext-install pdo pdo_mysql
... | 3 | 1,284 |
R :: How to generate cases in a table that can occurr different times and with different names? | <p>I am trying to automatize an analysis of deltaCT for qPCR in my lab, basically I need to process a dataframe made like this</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>gene_id</th>
<th>target_id</th>
<th>Cq</th>
</tr>
</thead>
<tbody>
<tr>
<td>TATAB</td>
<td>EtOH</td>
<td>26.03</td>
... | 3 | 1,097 |
Disable Text is not working on webpage for IE and Microsoft Edge | <p>I have written CSS to disable the selection of numbers (CSS class "table_border") in the webpage. It is working as expected for Chrome and Firefox. However, I am still able to select the numbers when we drag from top in Edge and IE browsers. Please find the below snippet for more details.</p>
<p><div class="snippet... | 3 | 1,101 |
Using LSTM layers in combination with CNN | <p>I am trying to improve the accuracy of an EEG classifier. Currently I was only classifying with conv layers and fully connected ones. In the literature I found people using LSTM layers in their CNN model. I would like to try this out but I get following error.</p>
<p>The data that I'm using is time series EEG data ... | 3 | 1,483 |
How to fully delete plots from subplot and properly resize? | <p>I am trying to create a corner plot for an upcoming paper, but I'm running into difficulty. I am creating an N x N array of subplots (currently, N = 6) and then deleting a bit over half of them. The issue is that the figure doesn't seem to resize itself after I delete the extraneous subplots, so when I later add a... | 3 | 1,281 |
Error when i deploying Laravel project on free host (000webhostapp.com) | <p>When I deploying my Laravel project on free host called <strong>000webhostapp.com</strong>,
I got this error:</p>
<blockquote>
<p>SQLSTATE[HY000] [2002] Connection refused (SQL: select * from <code>posts</code>
order by <code>created_at</code> desc limit 10)</p>
</blockquote>
<p>I tried by creating a database ... | 3 | 2,204 |
Reload collectionview with two types custom cells using segmented control | <p>I'm trying to achieve the following behaviour with 2 types of custom collection-view cells, lets call it A and B:</p>
<p>I have a segmented control with 2 options, images and music. When I click on the images option, the collection-view will show me the images by using custom cell A, when I click on music, it will ... | 3 | 1,108 |
auth problems (security filters) in sfGuardUser Symfony | <p>I'm using Symfony 1.2.7, and sfGuardUser Plugin. I'm able to view all the pages, login and logout. However when I try to edit (just going to the form) or update an object (saving the changes) <strong>sometimes</strong> I have problems of auth, and symfony redirects me to the edit form page again. I put some emphasys... | 3 | 1,203 |
KeyError: 'column name' | <p>The data in the excel file is already displayed as a table. The printed head is just like a normal one.</p>
<pre><code>import pandas as pd
data1=pd.read_excel('Données production auto A00 MCMA final.xlsx')
data2=pd.read_excel('Données sinistres auto A00 MCMA final.xlsx')
df=data2.merge(data1, on="clé")
pri... | 3 | 2,518 |
Join 2 pandas dataframes by adding rows with the same index | <p>I am struggling to join two dataframes by index (I've made column FileName an index for both tables) which look like this:</p>
<p>Table 1</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>FileName</th>
<th>Transcriber</th>
<th>Transcription</th>
</tr>
</thead>
<tbody>
<tr>
<td>612_000002.w... | 3 | 1,027 |
Can You have iterative Ajax forms in ASP.NET? | <p>I'd like to have X number of <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" rel="nofollow noreferrer">Ajax</a> panels on my list page which is inside a master Page for site consistency. </p>
<p>The tutorials I'm coming across on <a href="http://www.asp.net/ajax/" rel="nofollow noreferrer">ASP.NET Aja... | 3 | 2,014 |
Collection of list of integer changing number to access the different variable names | <pre><code>Public p1 = New List(Of Integer)({1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
Public p2 = New List(Of Integer)({5, 4, 6, 7, 3, 8, 9, 10, 2, 11})
Public p3 = New List(Of Integer)({11, 8, 10, 9, 7, 12, 6, 13, 14, 15})
</code></pre>
<p>I want to display the list p depending on how much is A. if a is 1 then it will be p1, i... | 3 | 1,599 |
flask-cache TypeError: can't pickle CompiledFFI objects | <p>i am using <a href="https://github.com/IdentityPython/pysaml2" rel="nofollow noreferrer">pysaml2</a> library in python. which has a <a href="https://github.com/IdentityPython/pysaml2/blob/master/example/idp2/idp_uwsgi.py#L335" rel="nofollow noreferrer">method defined as below</a>:</p>
<pre><code>def _store_request(... | 3 | 2,266 |
How do I access current location in fragments? | <p>I want to access my current location in fragments. I wrote this program. There are no errors in the code, but it just show Google map only; it does not show my current location and marker.</p>
<p>I'm confused in accessing permission from manifest and in getApplicationContext because I use <code>getActivty()</code> ... | 3 | 1,861 |
How to get a text file into an array and search for specific values but being limited to One-Dimensional arrays | <p>As the title says, I'm trying to get this <a href="https://i.stack.imgur.com/0rDy6.png" rel="nofollow noreferrer">Weather Station Data File</a> into an array and be able to search for specific values in the file via a menu system. I built the menu system but have no clue on how to import the file to such an array or... | 3 | 1,390 |
IE, XML, zone security, XMLhttprequest | <p>MSDN has an article that describes native xmlhttp. </p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#_id" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#_id</a></p>
<p>As the article describes, I have enabled native xml http. But this xml demo still do... | 3 | 4,890 |
non standard XML file parse in php | <p>I have problem with phrasing XML file in PHP. Tried diffent approaches, but no luck, can You help with that?
Here is the file:</p>
<pre><code> <?xml version="1.0" encoding="iso-8859-2"?>
<Nadawca Struktura="1.6" Nazwa="Gospodarstwo Szk&#56202;&#56993;rskie Izabela i Ryszard Kie3kowski" Nazwa... | 3 | 3,032 |
Configuring WCF JSONP and SOAP Endpoints Listening at the same URI | <p>I JSONP enabled my WCF ServiceContract. Client is successfully calling the JSONP Service (OperationContract). I have a number of other OperationContracts (using the same ServiceContract) that I want to expose using basicHttpBinding (SOAP) endpoint - using the same URI. I think my Service WebConfig is set up corre... | 3 | 1,151 |
GridView goes blank after notifyDataSetChanged() | <p>I set a refresh button to update my gridview.
Fragment will get <strong>newData</strong> and set photos from <strong>Fragment->RecyclerView->GridView.</strong></p>
<pre class="lang-java prettyprint-override"><code>public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
... | 3 | 1,260 |
Unable to set input value with JS DOM when input is in a table also constructed with JS DOM | <p>I'm building an HTML table with JS DOM.
Some of the cells have text inputs, and I want to set the value of those text inputs in the same block of JS. It seems that no matter what I do, the browser refuses to render the value that I set. For some context on the following code, this takes place in a method of a class.... | 3 | 1,683 |
How do I put EditText into an array? | <p>I want to use numbers separated by commas or spaces and return statistics like mean median mode std dev, etc. How would I go about making an array and using the contents of the array after the use inputs them and do a simple statistical calculation? I'm new to android developing right now, so I'm not too familiar wi... | 3 | 1,068 |
ffmpeg filter dev get_video_buffer function usage | <p>I'm writing a mosaic ffmpeg filter.
copy code from vf_vflip.c, I register a callback function get_video_buffer
and implement it as follows:</p>
<pre><code>static AVFrame *get_video_buffer(AVFilterLink *link, int w, int h)
{
MosaicContext *s = link->dst->priv;
AVFrame *frame;
int i;
int j,k;
... | 3 | 1,216 |
How to optimize this moving average calculation, in F# | <p>I have a moving average that has the following particularities:</p>
<ul>
<li>Each entry has a timestamp, the values are not evenly distributed in time and the queue length can vary significantly.</li>
<li>I do not have a fixed period, so the code must be flexible as several periods will be requested.</li>
<li>The pe... | 3 | 1,456 |
Issue while using a timer function in a threading context | <p>While working on a game for my final project in a class I’m taking I was trying to figure out how to use a timer but still be able to interact with other running code, in my research I came across threading and it’s worked so far, but the issue is that when it comes to practice, the timer doesn’t work but it rather ... | 3 | 2,198 |
How can I make it so on keydown my decks of cards swap? | <p>I followed a tutorial for the codes below. On click or touch the card decks, the keyframe animation will swap the cards. I am trying to add on keydown and make the card swap but I am unable to get it working. I tried replacing eventlistener("keydown", swap) and adding onkeydown the the div but was not su... | 3 | 2,188 |
How to display two different arrays in a single table in parallel like Left and Right in Php | <p>I've 2 array $expense and $income.</p>
<p><strong>Income array</strong></p>
<pre><code>Array
(
[0] => Array
(
[head] => chitty_installment
[amount] => 500.00
)
[1] => Array
(
[head] => sales
[amount] => 100000.00
... | 3 | 1,543 |
Drools worker Thread taking too much time, throwing sun.nio.fs.UnixException | <p>I have an application where in which I use drools workbench(KIE) for rule validations in Java.
Now I am facing something odd with this drool worker thread which gets created while firing rules. On an average, response time for the rule execution is less than 500ms in my application. Recently, I could observe that oc... | 3 | 1,759 |
ANTLR: handle emoji characters | <p>I'm using following EmojiLexer.g4 together with ANTLR 4.7.2</p>
<pre><code>lexer grammar EmojiLexer;
String
: '"' StringChar* '"'
;
fragment StringChar
: ~["\r\n]
;
Punctuation
: ( '['
| ':'
| ']'
| ';'
| '@'
)
;
fragment IdentifierNonDigit
... | 3 | 1,334 |
WKWebView Basic auth pop-up appears twice and app crushes | <p>I'm trying to add basic auth feature to my iOS app's WKWebView. The basic auth pop-up appears in a right way.<br>
But after I enter the correct information, the pop-up appears once more, and when I enter information again the app crushes. The console says <code>'NSInternalInconsistencyException', reason: 'Completion... | 3 | 1,567 |
Javascript getElementsByTagName - include embedded elements | <p>I am using a fragment of javascript from the internet to collect all the <code><small></small></code> elements within a div id 'footnotes' and append them as an ordered list at the end of my document, with links and back links (i.e Easy HTML Footnotes), Footnotes.js:</p>
<pre><code>var DOMsupport = docu... | 3 | 1,447 |
jQuery adding pages | <p>I have made an really ugly code, but i was going to fix it when i was done with it.. But i didn't come that far >_<</p>
<p>i post my code here and some information under it.</p>
<pre><code>$(document).on('click', '.cogwheel', function() {
var link = $(this).data('pageid');
$(".pages").not(".pag... | 3 | 1,889 |
Get specific element from header of file? | <p>So I have data in this format: </p>
<pre><code>#NUMBER OF AGES=37 MAGS= 5
#----------------------------------------------------
#MIX-LEN Y Z Zeff [Fe/H] [a/Fe]
# 1.9380 0.3300 3.1125E-04 1.5843E-04 -1.99 0.40
#----------------------------------------------------
#**PHOTOMETRI... | 3 | 1,776 |
Scanner needs inputs twice before continuing | <p>Hey guys i have got a small weird problem here, i am asking the user to input their menu choice and depending on what they choose it calls a certain method.</p>
<p>I have used scanner.next() after some googling but for some reason only when i enter 1 or 2, i press enter and then press say 1 again and then it actual... | 3 | 1,173 |
Print all table data from mysql into a html table | <p>I've been trying to print all users into a html table. The objective is that the site administrator can edit the information.
I've done the following code so far, but I can't understand how I will print User1_Name, User1_Email and password into a table row. I want this for every user on the database.</p>
<pre><code... | 3 | 1,130 |
MySQL - Why can't I add a foreign key here? | <p>I'm not sure why I'm not able to add a particular foreign key here. These tables were generated via MySQL Workbench, and based on the MySQL documentation and on searching for other similar problems / solutions, I <em>think</em> everything is in order...yet I can't add one foreign key in particular:</p>
<p><code>in... | 3 | 1,320 |
Node js - How to correctly use make async network calls within a module | <p>So for part of a project I am working on I have created a module that uses the Facebook graph API to make calls and return JSON data. I can console.log() the data within the method out fine and it's all good.</p>
<p>But I can not return the values from the methods, so I tried to use the 'async' npm module. I have f... | 3 | 1,551 |
Highcharts x-range chart datetime type for x and y axis | <p>I have created an x-range chart to represent some ranges. I want to make both x-axis and the y-axis as DateTime types. Currently, both the x and y-axis are numbers. I have created a fiddle to show my current behavior.</p>
<p>How can I make the x and the axis DateTime type?</p>
<p><a href="https://jsfiddle.net/bonyfu... | 3 | 1,511 |
How to get use `callCabal2nix` to supply package list to 'ghcWithPackages'? | <p>I have a list of ~46 dependencies.</p>
<p>I produce a shell using among other things a call to:</p>
<pre class="lang-hs prettyprint-override"><code>server = pkgs.haskellPackages.callCabal2nix "server" ./server.cabal { };
</code></pre>
<p>within an override of <code>pkgs.haskellPackages</code> that goes int... | 3 | 8,404 |
django prefetch within a prefetch - must be a Model, Manager, or QuerySet, not 'QuerySet' | <p>Im trying to do a prefetch within a prefetch in django but am getting the below error:</p>
<pre><code>First argument to get_object_or_404() must be a Model, Manager, or QuerySet, not 'QuerySet'.
</code></pre>
<p>this is the query:</p>
<pre><code>site = get_object_or_404(SiteData.objects.prefetch_related(
... | 3 | 1,396 |
Failure @ Application Start Method (JavaFX 11, JDK 14 & Intellij) | <p>I'll try to keep this short but include as many details as I can, basically i'm trying to create a simple MPG calculator using Javafx but I've ran into a snag, whenever I attempt to run the main file some errors appear regarding the FXMLLoader but I cant for the life of me figure out why, I researched as many Q&... | 3 | 5,547 |
How to pass parameter of a class based array-list in java.util program | <p>Can anyone help me to correct the /* ... */ code i.e. the function static void display so as to get the passed arraylist as parameter and display it accordingly there, which I am getting error everytime. Please help me I am a novice in java program using util class</p>
<hr>
<pre><code>import java.util.ArrayList;
... | 3 | 1,353 |
Get the value of all checkbox when checkall checkbox is checked | <p><a href="https://i.stack.imgur.com/eH1Y6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eH1Y6.png" alt="pic"></a>
I'am new to angularjs, I'm creating an application of attendance. When i check the checkall checkbox all the checkbox of name is also check and What i really wanted to achieve is to g... | 3 | 1,324 |
cannot access localhost to run my php projects | <p>im trying to load a php program and i get an http 404 error. ive been looking on the internet and i found in the zend forums, a person who had the same problem and he solved it by changing the httpd.conf file setting "ALLOWOVERRIDE" from "None" to "All". here is the link: <a href="http://forums.zend.com/viewtopic.ph... | 3 | 6,096 |
Saving text and checkbox state in custom list | <p>I am making a custom list and I want to save the text of some TextFile which is in R.id.quantity.</p>
<p>I also want to save the state of a checkbox. I tried to manage checked state of a checkbox in a list.</p>
<p>The List contains other view controls. I have put them in a Viewholder class. I am initializing qtyTx... | 3 | 2,154 |
producing "unhandled exception X at memory location Y" when checking every pixel of an grayscale image | <p>I am trying to solve a problem where I have to check every pixel from a 640x480 cv::Mat (Greyscale Video Image -> cv::Mat MainImageSW (global)) and check if the pixel above, below, to the left and to the right is equal or below the Threshholdvalue ( GetTreshholdSW() ).</p>
<p>My target matrix XY_ThreshholdMat is ... | 3 | 1,108 |
ASP Web API custom authentication. Always getting a 401 Unauthorized response | <p>I am trying to implement an authentication/authorization process which when user signs in, generates a JWT and places it in a cookie (while implementing I was mainly using this article - thought it's for .NET Core and I am using .NET 4.6: <a href="https://stormpath.com/blog/token-authentication-asp-net-core" rel="no... | 3 | 2,158 |
Strange error message whatever way I try to aggregate mean in R | <p>I am making a model to measure Brand and drivers. I do that by using a survey and factor analysis. To validate the stability of the model I have made a routine to bootstrap the whole survey. THe problem is when I try to aggregate. I have used the package (hmisc) and (doBy). Whatever I have tried it did not work. Now... | 3 | 1,258 |
powershell script that uses existing assemblies in memory crashes ISE | <p>This is a PowerShell script that executes the shellcode which provides a reverse shell. The useful thing about this script is that it is executed using the assemblies already in memory. There is a good chance it won't get detected by anti-virus.</p>
<pre><code>function LookupFunc {
Param ($moduleName, $functionNam... | 3 | 3,115 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.