title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Type mismatch: inferred type is LoginActivity but LifecycleOwner was expected
<p>I am playing with the preview version of <code>AndroidStudio - 3.4 Canary 9</code>.</p> <p>I selected the default login activity option from <code>Configure your project</code> window and provided, selected below options:</p> <p><a href="https://i.stack.imgur.com/mYobT.png" rel="noreferrer"><img src="https://i.sta...
1
1,394
Mapping coordinates from 3D perspective projection to 2D orthographic projection in OpenGL in C++
<p>I have written a simple openGL program in C++. This program draws a sphere in 3D perspective projection and tries to draw a line joining the center of the sphere to the current cursor position in 2D orthographic projection. Now for drawing the line I can't figure out the coordinate of center of the sphere.</p> <p>T...
1
1,058
error: expected declaration before } token (when trying to compile)
<p>I'm having a problem. I have the template and implementation for a stack in files <strong>stack.h</strong> and <strong>stack.hpp</strong>. Then I have an <strong>in2out.cpp</strong> file that converts infix expressions to outfix expressions and evaluates them. At the beginning of in2out.cpp I "#include stack.h". And...
1
2,364
How to pass multiple arguments to a smarty function?
<p>I've a following code snippet from smarty template:</p> <pre><code>&lt;div class="pagination"&gt; {pagination_link_01 values=$pagination_links} &lt;/div&gt; </code></pre> <p>The following is the function body:</p> <pre><code>&lt;?php function smarty_function_pagination_link_01($params, &amp;$smarty) { if ...
1
1,227
Performance of FirstOrDefault()
<p>Looking at a section of the webapp I work on today with a performance profiler. I thought that a Union was causing some delays, but found other surprising results instead.</p> <p>One of the causes of slowdown appeared to be FirstOrDefault.</p> <p>It was a very simple LINQ query that looked like this:</p> <pre><co...
1
1,418
ASP.Net MVC switching Cultures after compile for initial load
<p>I have a hybrid ASP.Net web forms/MVC app. On one of the MVC "pages"/views, I have it render a bunch of dates using the ToShortDateString() and ToLongDateString(). These work correctly most of the time, but the first time I load the view after compiling the app, they are formatted incorrectly.</p> <p>I traced this ...
1
1,054
You have an error in your SQL syntax - hibernate and mysql
<p>I'm learning Hibernate, and during simple demo application, I encounter problem, I can't overcame. There are only two tables, two entity classes and main app. Project is in maven.</p> <p>Github: github.com/fangirsan/maruszka.git</p> <p>Batch.class:</p> <pre><code>package com.maruszka.entity; import java.util.Arr...
1
9,601
Error Installing php-devel on centos 6.5 and php 5.4
<p>Server is running Centos 6.5 with PHP 5.4.40.</p> <p>Entering:</p> <pre><code>yum install php-devel </code></pre> <p>Results in the following:</p> <pre><code>Loaded plugins: fastestmirror, refresh-packagekit, replace, security Loading mirror speeds from cached hostfile * base: mirror.tngwebhost.com * epel: fed...
1
1,784
Python plot base64 string as image
<p>I am attempting to convert a jpg, which is encoded as a base64 string that I receive over the server into an RGB image that I can use with numpy, but also plot with matplot lib. I am unable to find docs on how to take a raw base64 string and plot that using python.</p> <p>I also have the option to receive as a png...
1
2,000
Segmentation fault in OpenGL under Linux
<p>I am following some tutorials and came up with the following code:</p> <pre><code>// rendering.cpp #include "rendering.h" #include &lt;GL/gl.h&gt; #include &lt;GL/freeglut.h&gt; void DrawGLScene() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); } int InitGL(int argc, char** argv) ...
1
1,078
Adding Table.Row fadeout transition
<p>I've built a simple add-your-todos system in React using Semantic-UI-React. It currently looks like this:</p> <p><a href="https://i.stack.imgur.com/h1u43.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h1u43.gif" alt="before-transition-attempt"></a></p> <h2>Problem description, and my attempt</h...
1
3,555
Remember Me with Spring Security 3.1.3 - deprecated default constructors
<p>I'm doing a login with Spring Security 3.1 but I get a warning to deprecated and I could not get erased, it seems that this configuration is for version 3.0</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www....
1
1,295
How to right align a <img> in Bootstrap 4 card-body?
<p>I am trying to right-align a in a Bootstrap 4 <code>card-body</code>, I tried to leverage the <code>float-right</code> class but it does not seem to work. Is there anything special in regard to images alignment in <code>card-body</code>?</p> <pre><code>&lt;div class="card border-primary m-3" *ngIf='product'&gt; ...
1
1,550
Create Shiny Presentation from Shiny App?
<p>I found this - <a href="http://shiny.rstudio.com/gallery/download-knitr-reports.html" rel="nofollow">http://shiny.rstudio.com/gallery/download-knitr-reports.html</a> - awesome example that can create static PDFs, HTMLs, and Word Docs.</p> <p>What I want to be able to do is upload a data set that can then generate a...
1
1,813
Configuring Oozie- java NoClassDefFoundError
<p>I have been trying to run Oozie server on my machine, but am unable to do so. Following is the output of various commands and configuration I have done so far. Please explain what I am missing.</p> <pre><code>INDhruvk:oozie-3.3.2-cdh4.5.0 Dhruv$ bin/oozie-start.sh WARN: Use of this script is deprecated; use 'oozied...
1
6,963
LDAP authentication using passport-ldapauth on Node.js
<p>I've been struggling with passport-ldapauth for a couple of days, and I have no more ideas left what am I doing wrong.</p> <p>Briefly, I have a project that uses two passport strategies: local and LDAP. Local strategy works perfectly for me, but LDAP is the problematic one.</p> <p>I have a read-only user for AD (l...
1
2,381
Node Js Steam Trade Offers Bot Items
<p>This bot accept all trades but it need to accept only trade offers which contains [type: 'Consumer Grade SMG',] item in itemsToReceive. I was trying to do something like: If itemsToReceive contains Consumer Grade SMG then accpet offer else cancel offer but i failed. Im newby and i dont have any idea how to do that. ...
1
1,949
Make the PHP MySql Search Engine and Pagination work
<p>I don't know how to make the search through another table. how should i do that? the table name is comments and i want to search for all the post stored in the column name kom</p> <p>Another thing is that i cant get the pagination start working... I started the pagination within an else statment because i only need...
1
1,480
Spring LDAP Context.REFERRAL to follow
<p>How do I set the LDAP Context.REFERRAL to follow in a Spring Security configuration? This is related to a problem I already reported and for which I found an unsatisfactory solution before discovering the real solution I am seeking for involve setting this environment attribute in the LDAP context to follow the refe...
1
1,794
I cannot send a mail in mule
<p>I get that error message when I try to execute my muleproject </p> <blockquote> <p>"The endpoint is malformed an cannot be parsed" and this is the endpoint </p> </blockquote> <p>Here's the code:</p> <pre><code>&lt;smtp:outbound-endpoint host="smtp.gmail.com" user="mymail@gmail.com" password="mypass" to="desti...
1
1,608
Need jquery code to disable Drop downs and people pickers when a option in dropdown is selected in sharepoint
<p>I am working with moss 2007. I created a drop down column in which has 3 options. If option1 and option 2 are selected the Dropdowns and People pickers should be disabled and if option 3 selected the Dropdowns and People picker columns should be enabled. I provided the page source code, could someone help me out wit...
1
4,946
Unable to generate call to cell phone using asterisk
<p>I'm currently working on a project 'email to voice call'. Using python i'v extracted the email &amp; converted it into speech and saved in a WAV file. Now using asterisk (I'v installed Asterisk 10.2.1 on my ubuntu 10.10 os) i want to generate call to the cell phone (say 919833000000 india's no.) of the user through ...
1
1,185
WorkManager stops scheduling periodic Worker after the app closes
<p>maybe this is yet another question about WorkManager, but I really can't find a solution...</p> <p>I'm trying, as the title suggests, to run a periodic work every 15 minutes. Actually in the worker I'm polling some data every minute. After every poll, every almost 1 second I check if the worker is being stopped and...
1
1,266
Linq group by parent property order by child
<p>Basicly what i am trying to do is getting the parent grouped by Parent.type where their Child.type has status 'y' ordered by child.Date</p> <p>As an example i created these classes:</p> <pre><code>public class Collection { public IEnumerable&lt;Parent&gt; Parents { get; set; } public int Id { get; set; } }...
1
3,334
Check if value in Firebase Realtime Database is equal to String
<p>When a user logs in on my application, I want to check if the userType is a "Customer" or a "Venue Owner". This decides which activity is run next. Currently, the application crashes when attempting to log in.</p> <p>Here is my Firebase Realtime database structure:</p> <p><img src="https://i.imgur.com/V5evylH.jpg"...
1
4,140
Test servlet API with Mockito
<p>I have <code>AddBookController</code>:</p> <pre><code>public class BookAddController extends HttpServlet { @EJB(name = "BuyerServiceEJB") private BuyerServiceInterface buyerService; @EJB(name = "AuthorServiceEJB") private AuthorServiceInterface authorService; @Override public void doPost(...
1
1,862
how receive arraylist in fragment
<p>I need to know how to get array list using Bundle in fragment , in the <a href="https://stackoverflow.com/questions/9245408/best-practice-for-instantiating-a-new-android-fragment">examples</a> I have seen they are using ints or strings. how to get fragments ? In my activity it was working good getting the arraylist ...
1
2,821
Getting session and SFTP channel in Java using JSch library
<p>I am using JSch library for SFTP. I need to do several operations on SFTP server like move remote files in other directory, pull files, etc. For all these operations I need <code>Session</code> and from it I get <code>Channel</code> an then cast it to <code>ChannelSftp</code>. This is redundant step. So I thought of...
1
1,028
React Apollo Testing is not working. Query data is always coming undefined
<p>I am getting loading state only and data as undefined in testing. I don't know why I am following everything in the given example. Please help.</p> <p>Testing file. When i am waiting thsi line toexecute <code>await wait(() =&gt; getByTestId('edit-category'));</code>. It is giving response data of query as undefined...
1
1,891
Oracle procedure to kill jobs that do not complete in given time
<p>I have created an oracle procedure to reschedule job that do not complete in a given amount of time:</p> <pre><code>create or replace procedure kill_stuck_jobs as begin for x in ( select j.sid, s.spid, s.serial#, j.log_user, ...
1
1,574
Unable to Open Connection to Zebra Printer
<p>I am currently in the process of creating an android application that requires the ability to print tickets/receipts from a mobile printer. The organization I am currently with has decided to purchase android tablets that are currently running 7.0 as well as Zebra Mobile Printers (ZQ510). We determined that using t...
1
2,428
Unable to parse document faces-config.xml in JSF application
<p>I'm developing a JSF web app. I use JSF 2.2 with Apache Tomcat 8.0.27.0. When I press clean &amp; build it works ok, but when I try to run my app I get this exception:</p> <pre><code> com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationExceptio...
1
5,564
PHP Make a simple calculator - Code doesnt work
<p>I am trying to make a simple calculator like this :</p> <p>input1 select input2 = input3</p> <ul> <li>input1,input2 is first and second value</li> <li>select have 4 operator : + - * /</li> <li>input3 show the result</li> </ul> <p>This is my code and it doesnt work as expected,can someone help me out ?</p> <pre><...
1
1,230
Spring Hibernate Lazy loading - no session
<p>i have a lazy loading problem at a service call or at least i thought i just have a lazy loading problem... it seems to be, that i have a session problem => the session is not available during the hole service call.</p> <p>This is my service-source:</p> <pre><code>@Service public class MyServiceImpl implements M...
1
11,152
How to fix '_react["default"].memo is not a function. (In '_react["default"].memo(connectFunction)' error in React native?
<p>I am trying to connect Redux mapStateToProps() and mapActionCreators() to Login Screen through Container and I am using React navigation.</p> <p>After build my app the following error message appears:</p> <blockquote> <p>_react["default"].memo is not a function. (In '_react["defaults"].memo(connectFunction)', '_...
1
1,101
auto closing bootstrap alerts after form submission
<p>I have an ajax form that submits data into a database, and it uses bootstrap alerts for when it has been successful, I would like the alerts to close after a period of time has passed, but this needs to happen everytime.</p> <p>For example if I load the form and make some changes and press submit it will show the s...
1
1,541
Cannot remove Fragment attached to a different FragmentManager. Fragment SupportMapFragment
<p>Android Studio 3.4.</p> <p>in gradle.properties:</p> <pre><code>android.useAndroidX=true android.enableJetifier=true </code></pre> <p>in <strong>app/build.gradle</strong>:</p> <pre><code>def AAVersion = '4.6.0' dependencies { annotationProcessor "org.androidannotations:androidannotations:$AAVersion" im...
1
1,863
MySQL Group Replication plugin not found in version 5.7.19, 5.7.21
<p>I am attempting to enable the MySQL group replication plugin on MySQL 5.7.21, which should be available in 5.7 as per the documentation (<a href="https://dev.mysql.com/doc/refman/5.7/en/group-replication.html" rel="noreferrer">https://dev.mysql.com/doc/refman/5.7/en/group-replication.html</a>)</p> <pre><code>$ mysq...
1
4,950
Destructor causing segmentation fault
<p>I have implemented a class string, similar to std::string one. I have a problem when the destructor is called: the field length has the length of the characters allocated in field. This is the class:</p> <pre><code>class indexException:public std::exception { public: virtual const char* what() { ...
1
2,008
Active Admin on Heroku doesn't work properly
<p>Hi I had active admin working fine before but I think it got messed up when I tried merging my github + heroku repositories. It seems to work fine locally but on Heroku I get the generic We're sorry, but something went wrong message. Here is the output of my heroku logs</p> <blockquote> <p>2012-05-08T08:20:16+00...
1
7,071
Error when using a DropDownListFor in a foreach loop in an MVC Razor view
<p>I am trying to create a simple form in ASP.MVC which shows a list of quotes, and allows the user to create work orders by selecting a person from a drop down list to assign that quote to, and then submitting the form all in one go.</p> <p>My problem is that my use of DropDownListFor within a foreach loop is causing...
1
1,711
Change color during writing a string into an image with drawstring
<p>I'm creating a string out of three smaller strings which I read in from three different text-files and then write the string into an image. I'd like to change the color for the paragraph in the middle of a created image. I can create the image with its three paragraphes, which looks like <a href="http://i50.tinypic....
1
2,325
What is this error? cannot convert 'char**' to 'char*' for argument '1' to 'char* strcpy(char*, const char*)
<pre><code>#define NAME_LEN 20 #include "stdio.h" #include "stdlib.h" #include "string.h" #pragma warning(disable:4996) typedef struct bank { char *name[NAME_LEN]; int id; int money; struct bank *next; } bank; bank *head, *tail; // 노드의 처음과 끝 void Init_account(FILE *fp); // 노드의 처음과 끝에 메모리 할당하고, 파일...
1
3,310
CSS selector is selecting all p elements in page
<p>I have a page and I want to style all the <code>&lt;p&gt;</code> elements inside a class. The problem is that, instead styling only the selected <code>&lt;p&gt;</code>, it's styling all the <code>&lt;p&gt;</code> elements in the page. I didn't find any open tags, so I don't know what's going on. Here's the commented...
1
2,099
InvalidSelectorException: Message: invalid selector: An invalid or illegal selector was specified error clicking on div ng-click element with Selenium
<p>I am trying to select </p> <pre><code>&lt;div ng-click="select('expert')" class="select-exp__item select-exp__item_active" ng-class="{'select-exp__item_active': 'expert'===selected}" style=""&gt; </code></pre> <p>I have tried a few things</p> <pre><code>driver.find_element_by_css_selector("div[ng-click='select('e...
1
1,404
Blocked while scraping goodreads.com
<p>I am trying to scrape a large sample (100k+) of the books available at "<a href="https://www.goodreads.com/book/show/" rel="nofollow noreferrer">https://www.goodreads.com/book/show/</a>", but I get continuously blocked. So far I have tried to implement the following solutions in my code:</p> <ul> <li><p>Check the r...
1
1,415
DOMDocument::loadXML() error
<p>When I use DOMDocument in PHP file, I get the following errors:</p> <blockquote> <p>Warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag nodes line 7 in Entity, line: 7 in D:\wamp\www\dom1.php on line 77</p> <p>Warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature en...
1
2,438
Howto call method from OSGI bundle?
<p>I have written this OSGI bundle:</p> <pre><code>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package CryptoLib; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class cryptoSha { public cryptoSha() { } /*...
1
1,137
Android - How to set color of a TextView and background together with SharedPreferences
<p>in my app I have a menu button called "Settings" in which I can choose what colours set up to the background of some layout. Unfortunately I combine two layouts together to show what I want to show, and the problem is that I can only set background colour (that is in a layout) but not the the colour of TextView (tha...
1
1,926
Refused to execute script from '.../bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled
<p>I have an application with React/webpack frontend and Django/python backend. It has deployed successfully to heroku in the past. It has been sometime since I did anything in the application and after some recent updates I wanted to update the deployed version. Heroku reports that the application deployed successf...
1
4,934
ERROR: Failed to resolve: espresso-core and ERROR: Failed to resolve: runner
<p>I'm going to build a project. When I create the project, I encounter the following error</p> <pre><code>ERROR: Failed to resolve: espresso-core Affected Modules: mvp-app ERROR: Failed to resolve: runner Affected Modules: mvp-app </code></pre> <p>and my build.gradle(module) file </p> <pre><code>apply plugin: 'c...
1
1,128
How to find RC4 key from decrypted and encrypted data?
<p>I have some dump analysis in a documentation showing a bunch of encrypted data, and the resulting decrypted data. The algorithm used is explained (simple RC4). The only piece of information missing is the key used to get from the encrypted to the decrypted data.</p> <p>I'm writing an automated test from this docume...
1
1,111
Remove space between yAxis and data in highcharts
<p>I would like to remove the space between y-axis and the chart as shown below: <img src="https://i.stack.imgur.com/emwkE.png" alt="enter image description here"></p> <p>Here is a fiddle used to create this chart : <a href="http://jsfiddle.net/basarat/pfkbX/" rel="noreferrer">jsFiddle for this chart</a></p> <p>Her...
1
1,796
GWT compiler doesn't find javax libraries
<p>I'm new to GWT and trying to run my fist GWT app. I have classes that uses API from javax.persistence package. When I try to compile the code using GWT compiler it fails for not being able to find the mentioned package in the classpath. I have the libraries added to the class though.</p> <pre><code>&lt;property nam...
1
1,514
Java signing files with BouncyCastle - Create signature of a file using secret keyring
<p>I'm trying to write a Java program that signs a file with a private key. The program takes 3 arguments - file, secret keyring and a password. The output should be in a detached file *.bpg. The problem is that I get the following errors when I try to compile my code:</p> <pre><code>C:\CNS3\BCastle&gt;javac Sign.java...
1
1,080
Equality operator overloads: Is (x!=y) == (!(x==y))?
<p>Does the C++ standard guarantee that <code>(x!=y)</code> always has the same truth value as <code>!(x==y)</code>?</p> <hr /> <p>I know there are <em>many</em> subtleties involved here: The operators <code>==</code> and <code>!=</code> may be overloaded. They may be overloaded to have different return types (which on...
1
1,166
post to SQL Server api with Express.js
<p>I´ve been testing Apis with Express.js from SQL Server database. With get i have no problems, but i cannot post.</p> <p>This is y code so far:</p> <pre><code> const express = require('express'); const bodyParser = require('body-parser'); const sql = require('mssql'); const app = express(); app.use(bodyParser.j...
1
2,294
ORA-02070: database does not support in this context Via DB LINK
<p>I have a View and want to insert this via DB Link. But it's give error "ORA-02070: database does not support in this context". How can I solve this error ?</p> <pre><code>CREATE OR REPLACE FORCE VIEW V_TEST ( OBJECT_ID, SEQUENCE, SCHEMA_NAME, OBJECT_NAME, OBJECT_TYPE_NAME, LINE, POSITION, ER...
1
1,442
iPhone Programming from book. incomplete implementation of class 'InstatwitViewController'
<p>Hey everyone, im doing an independent study of iphone programming in my high school. i got a book from a teacher "Head First Iphone Programming". I got through the first lesson (hello world with a button) without any problems, but now im onto the second lesson. It is a twitter application that uses a UIPickerview...
1
3,111
How to integrate stripe using paymentIntent and confirmCardPayment
<p>I am attempting to integrate stripe into my application. I have completed the following steps so far.</p> <ol> <li>Ceate PaymentIntent on the server</li> <li>Pass client secret to frontend</li> <li><p>Use Stripe Elements to collect card info</p></li> <li><p>Use Stripe.js handleCardPayment to process the payment</p>...
1
1,683
Airflow webserver suddenly stopped starting
<p>My airflow webserver suddenly stopped starting. When I try to start webserver it does not come up with UI. </p> <p>I tried reseting db as <code>airflow resetdb</code> and <code>airflow initdb</code> restarting all the services. Downgrading Gunicorn and upgrading it again. Restarting my linux machine, however, nothi...
1
1,048
Why is my PayPal IPN script failing?
<p>I'm developing a lightweight e-commerce solution that uses <em>PayPal</em> as the payment gateway. However, my IPN callback is constantly returning an <code>INVALID</code> response. I even tried using the sample PHP script provided by <em>PayPal</em>:</p> <pre><code>// read the post from PayPal system and add 'cmd'...
1
1,117
SharePoint Foundation 2013 - Order of loading sp.js and sp.runtime.js
<p>I have problem with an order in which I am loading </p> <pre><code>&lt;script type="text/javascript" src="/_layouts/15/sp.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/_layouts/15/sp.runtime.js"&gt;&lt;/script&gt; </code></pre> <p>on my page</p> <p>This is the whole head section on my master page...
1
1,684
Update multiple rows in mysql with php
<p>Here is my code below. The problem is when I try to update info it instead clears all records and does not update. How can I get this script to update and not clear. Also, I have used this before and it worked fine but all the sudden it doesn't.. I might have removed something important.</p> <pre><code>&lt;strong&g...
1
1,112
Managed Type equivalent of [MarshalAs(UnmanagedType.I8)]
<p>I have inherited a dll written in C that I access from a windows application (Framework 2.0) in C#. Recently some machines have been upgraded to 64-bit Windows 7, and the dll is no longer returning the correct values on those machines. I believe this is because the C function has parameter types that are expected to...
1
1,057
Ajax, PHP, MySQL retrieve data
<p>i'm trying to auto retrieve data from mysql server in specific DIV without manual refresh the web page.</p> <p>My PHP code is:</p> <pre><code>function lastCodes(){ include('mysql.php'); include('config.php'); echo "&lt;div id='content_data'&gt;"; $get = mysql_query("SELECT * FROM scripts ORDER by dat...
1
1,319
PySide: Drag and drop files into QListWidget
<p>This is my first entry here so apologies for any newbie mistakes. I've searched both here and Google with no luck before posting.</p> <p>I want to be able to add images to a QListWidget, using drag and drop from a file browser. Dropping a valid file on the list widget also needs to trigger a function in the main cl...
1
1,283
Fetch data from mysql database using drop down list and then use search function to filter data from selected drop down list option
<p>I want to comebine the use of a drop down list (with filters/options) with a search function (a search bar and a "Ok" button).</p> <p>When I select a filter/option in the drop down list, as for example "Team". The drop down list then should be aware of that the list has changed to filter/option "Team". After this, ...
1
1,773
How to use multiple JPA persistence contexts with Spring Data JPA?
<p>I need two persistence contexts to manage entities in separate databases. </p> <p>I am using java based config with spring 4.1.4, hibernate 4.3.7 and spring data 1.2. </p> <p>Basically, CompanyApplicationContext imports two persistence contexts: PersistenceContext and SharedDbPersistenceContext. Each persistence c...
1
1,709
Why is Nmap Scripting Engine returning an error?
<p>When ever I try to run the following Nmap Command: <code>nmap -sA -sV -T5 -O -A -v -Pn --script afp-brute,ajp-brute,backorifice-brute,cassandra-brute,cvs-brute,dns-brute,domcon-brute,dpap-brute,drda-brute,ftp-brute,http-adobe-coldfusion-apsa1301,http-affiliate-id,http-apache-negotiation,http-apache-server-status,htt...
1
2,003
Can I use parent-child relationships on Kibana?
<p>On a relational DB, I have two tables connected by a foreign key, on a typical one-to-many relationship. I would like to translate this schema into ElasticSearch, so I researched and found two options: the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/1.3/mapping-nested-type.html" rel="noreferrer"...
1
1,046
Why is XMLHttpRequest readystate not equal to 4?
<p>I'm learning AJAX for the first time and I'm trying to create a simple application that calculates the grade a person needs to get on their final exam based on their previous assessment results. </p> <p>The user inputs their grades into the form and then using ajax I calculate the response in response.php which sho...
1
2,598
Cannot resolve scoped service dbcontext from root provider
<p>I have created an API Logging middleware to log request to DB and to Azure Microsoft insight however for some reason the Dependency Injection for the Database context is not found (gives cannot resolve scoped service from root provider).</p> <p>API Logging MiddleWare</p> <pre><code>public class APILoggingMiddlewar...
1
1,088
How to test if a .txt file is already open by anyone?
<p>I am trying to test if a .txt or .ini file is open already by anyone. I have several versions of IsFileOpen. Here is one taken directly from <a href="http://www.cpearson.com/excel/ISFILEOPEN.ASPX" rel="nofollow noreferrer">http://www.cpearson.com/excel/ISFILEOPEN.ASPX</a></p> <pre><code>Option Explicit Option Compa...
1
1,300
Post Multiple Data from View to Controller MVC
<p>I want to post quantity property to Controller (It's an edit action). I'm editing OrderedProductSet which is connected with ProductSet in my SQL Database (I get the name and price from there). How to pass multiple data from the view to controller? How to write method in controller class to receive the data (I'm ask...
1
1,083
JPA dynamic criteria-api query
<p>I wonder if there is a generic way to use the criteria api in combination with a little more complex model?</p> <p>I have an entity class that has one-to-one relationships to other entities. My service wrapper that does the database query via the criteria api gets the parameters from front end to figure out paginat...
1
2,064
Symfony; SQLSTATE[HY000] [2002] No such file or directory while using 127.0.0.1 as database_host
<p>The full error is <code>Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory in /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 113</code>, but that's too long for the title.</p> <p>I'm trying to set up a Sy...
1
1,524
<access origin="http://*" launch-external="yes" /> not working for iOS
<p>launch-external does not seems to work for iOS. but it works perfectly for android.</p> <p>I am looking for a 'launch-external' equivalent for iOS, i am using cardova (version 3.7.0) and phoneGap online build tool.</p> <p>below is my config.xml </p> <pre><code>&lt;widget xmlns="http://www.w3.org/ns/widgets" xmlns...
1
2,320
Update MSI package via Wix bootstrapper
<p>I have wix bootstapper which includes 4 components: tree exe packages and one msi package. I want to do major update of msi package using bootstrapper below (only main code):</p> <pre><code>&lt;Bundle Name="$(var.Name)" Version="$(var.Version)" Manufacturer="$(var.Manufacture)" UpgradeCode="$(var.UpgradCode)" Copyr...
1
1,220
Display:inline for creating a horizontal navigation bar not working
<p>I am relatively new to <code>CSS</code> and I'm having trouble getting my navigation bar aligned horizontally. I tried the display:inline; function with no success. When using the float:left function, I get all the li aligned horizontally, but in this case, I cannot center it on the page. Also the margin:0 auto; doe...
1
1,269
prevent php mail sent going to spam gmail
<p>this is my complete code that I use to send emails from a contact form on a website. Despite all the best practices used (headers etc), the results are:</p> <p>1) the confirmation email to users goes in gmail spam every time and it is flaged as phishing</p> <p>2) the admin email is flagged as phishing</p> <p>Coul...
1
1,418
C#.NET Using isAuthenticated
<p>Im using the MVC format to create a website. Right now all it does is manage users from an SQL server. What i'm trying to do now is have the user log in and then be able to manage the Users. From the Login page it should go to the Index of the Account but I only want this page to be viewable by authenticated users. ...
1
1,842
Java List to Excel Columns
<p>Correct me where I'm going wrong. </p> <p>I'm have written a program in Java which will get list of files from two different directories and make two (Java list) with the file names. I want to transfer the both the list (downloaded files list and Uploaded files list) to an excel. </p> <p>What the result i'm gettin...
1
1,490
jQuery Roundabout: changing the number of items shown
<p>I am using the jQuery Roundabout plugin. I am wondering if there is a way to choose the number of pictures that are shown. I have ten pictures, but only three of them should be visible as shown in the second (extention) link within the "square" example.</p> <p>How is that possible?</p> <p>Edit with further infor...
1
1,490
Sending VCF files (Vcard) is failing over WhatsApp or SMS, what am I doing wrong?
<p>I'm sending a VCard (VCF file) in the Media URL field of a Send Message Widget but it doesn't work, it happens too with curl.</p> <p>I'm creating a VCF file, storing it in a bucket and sending that URL with Content-Type text/vcard in the headers. If I try with stock VCF files it doesn't work either. What I'm expe...
1
1,240
Evaluating a postfix expression using expression tree in C
<p>I can't seem to get this program to work, it is a doubly linked list representation of expression tree. After creating the tree I need to evaluate the result but I can't seem to figure out how.</p> <pre><code>#include&lt;stdio.h&gt; #include&lt;stdlib.h&gt; #include&lt;math.h&gt; typedef struct node { char item...
1
4,856
Kendo UI multi select drop down with filter and select all options
<p>I need a kendo ui dropdown list with the following features.</p> <blockquote> <ol> <li>Multi select dropdown with a select check box to check multiple options at at time.</li> <li>Select all checkbox as a header template, on which when I click on it, all the <strong>filtered</strong> search results of the opt...
1
2,305
Create Image from imageview and textview?
<p>I'm making an app that will allow the user to add a photo to an imageview from the gallery of their phone which I have already been able to code successfully. I now want to be able to allow the user to add text on top of the photo and then save the text and image as one back into the gallery. Is there any way to do ...
1
1,501
Tensorflow 2.1 Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
<p>I am using anaconda python 3.7 and tensorflow 2.1 with cuda 10.1 and cudnn 7.6.5, and trying to run the retinaset (<a href="https://github.com/fizyr/keras-retinanet" rel="nofollow noreferrer">https://github.com/fizyr/keras-retinanet</a>): </p> <pre><code>python keras_retinanet/bin/train.py --freeze-backbone --rando...
1
1,348
Django REST framework url regex patterns not being matched
<p>I am writing a RESTful API as an application for a django project. I have two end points in my application (with urls imported into the main project's urls.py), which are defined as shown below below:</p> <h2>testrest/urls.py</h2> <pre><code>from django.conf.urls import url from . import views urlpatterns = [ ...
1
1,648
Errors installing mysqlclient on Max OSX
<p>I am trying to install mysqlclient on Mac OSX, as required by Django to use MySql rather than sqlite DB.</p> <p>I originally tried <code>pip3 install mysqlclient</code> but I was getting an error like this:</p> <pre><code>Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3f/1z_bg4...
1
3,156
Rust diesel orm queries
<p>I am new to rust and diesel orm. I am trying to execute below things on my query:</p> <ul> <li>count</li> <li>select</li> <li>order</li> <li>limit</li> </ul> <p>but I am getting error.<br> I am using postgres database.<br></p> <p>I have added the exact error above the queries in comment.<br> Here are my code:</p> <p...
1
2,137
How can I update/delete data in Spark-hive?
<p>I don't think my title can explain the problem so here is the problem:</p> <p>Details build.sbt:</p> <pre><code>name := "Hello" scalaVersion := "2.11.8" version := "1.0" libraryDependencies += "org.apache.spark" %% "spark-core" % "2.1.0" libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.1.0" lib...
1
1,830
C# technique for deleting a file from web server immediately after closing
<p>I'm creating PDF invoices in a C# MVC application that I'm attaching to an email and sending, ideally, once the email is sent I'd like to delete the invoice to free up server space and improve privacy/security. I've written code to do it but it fails 50% of the time because the file is locked by another process (I'm...
1
1,808
How to handle ECONNRESET when proxied response includes `connection: close` header?
<p>I am attempting to implement a MITM proxy.</p> <p>I am handing a CONNECT request which is then used to create a connection with an internal HTTPS server.</p> <p>Upon request, HTTPS server responds with:</p> <pre><code>connection: close foo </code></pre> <p>I expect the client to receive the response and proxy to...
1
4,212
jQuery Expanding & Collapsing lists
<p>The code expands and collapses a list in which list items can have sublists. Any ideas to refactor this code - especially the toggling part. Is it necessary to use closures here ? </p> <pre><code>$(function() { $('li:has(ul)') .click(function(event){ if (this == event.target) { ...
1
1,212
Radio Buttons getting deselected when dragging item using jQuery Sortables
<p>I'm using the <a href="http://docs.jquery.com/UI/Sortables" rel="noreferrer">jQuery UI sortables</a> plugin to allow re-ordering of some list items. Inside each list item, I've got a couple of radio buttons which allow the item to be enabled or disabled.</p> <p>When the item is dragged, both radio buttons get dese...
1
1,299
Panel data fixed effect issue with R, I don't see my all dummy variables in the summary
<p>I'm running a data panel regression with R. I use those <a href="https://docs.google.com/spreadsheets/d/1fXzrKS0ABn-ygKWnGhKskmoCLNikZCsY_u1yu08uSq4/edit?usp=sharing" rel="nofollow noreferrer">data</a>(sheet 2).</p> <p>I want to use a fixed effect for my panel data. Please, find below the code for my fixed effect</...
1
2,754
In .Net Core 2.1 Web API for PUT and DELETE only why "No 'Access-Control-Allow-Origin' header is present on the requested resource"
<p>I am using .NET Core 2.1. I have configured Startup.cs as follow: </p> <pre><code>public class Startup { public static IConfiguration Configuration { get; private set; } public Startup(IConfiguration configuration) { Configuration = configuration; } public void ConfigureServi...
1
1,378
Deserialize Json to class object using restsharp
<p>I have checked out the documentation for restsharp and also googled for a solution, but unable to find a solution for this problem:</p> <p>I have an asp.net mvc3 app and need to connect to quizlet.com to access public flashcards. I have added a reference to restsharp and created the following classes:</p> <pre><co...
1
1,838