title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
ProgressBar in fragment
<p>I have <code>+</code> and <code>-</code> buttons in fragment and by pressing them i need to change the progress of <code>ProgressBar</code>, but instead i get NullPointException</p> <p>In MainActivity:</p> <pre><code>public void selectVentilatorFunction(View view) { prg = (ProgressBar)view.findViewById(R.id.v...
0
4,032
Honeypot implementation
<p>Trying to filter out spam from an online form. I have a hidden div with an input. The idea is that if something goes into the field, the form will ID the user as a bot and reject the submission. After trying to implement this method, the bots are still getting through. I'm not very familiar with javascript (or ...
0
1,043
Detect a button click in the browser_action form of a Google Chrome Extension
<p>How can something so simple be so impossible?</p> <p>All I want to do is click the browser_action button of my extension, open a form with a couple of settings, and then click the button on the form to kick off a process.</p> <p>I cannot for the life of me get the button click in the background form to work.</p> ...
0
2,024
Spring jUnit Testing - either can not autowire or can not find appContext.xml
<p>I am unittesting a spring based application atm. First the problem is, that if I haven't started the app once on a server the unittests all fail. If I do start the app on the server first (and stop it), my unit tests are working.</p> <p>Without starting the server I get the following error:</p> <pre><code>... jav...
0
1,125
Kendo excel export - how do I export columns with a custom template?
<p>I have a kendo grid that I define declaritively. I enable the excel export toolbar via <code>data-toolbar='["excel"]'</code></p> <p>The problem is that this only exports the fields that do not have a template defined. (the first 3 in the grid below: Checkpoint, Location, Patrolled By), the other columns show up in ...
0
1,201
React - Ability to control fill color of an SVG through props
<p>I have a SVG, here called "example.svg", that's being called and created as a component, like so:</p> <pre><code>import { ReactComponent as Example } from './example.svg'; import styles from './index.module.css'; const ExampleImg = ({ ...otherProps }) =&gt; ( &lt;Example className={styles.image} {...otherProps} ...
0
1,849
Insert Data into MySQL From Excel JDBC - POI Example Program
<p>I would like to insert data into MySQL database table from Excel using JDBC manager with Apache POI. Here is my code: </p> <p>TestApp.java</p> <pre><code>package testapp; import java.io.FileInputStream; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.Prepare...
0
1,246
zookeeper - [NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 1195725856
<p>I am trying to insttall zookeeper in my Windows. I am getting the error bellow no matter which suggestion I followed in <a href="https://stackoverflow.com/questions/35561723/zookeeper-kafka-unable-to-create-data-directory">zookeeper + Kafka - Unable to create data directory</a>.</p> <p>I am running it as Administra...
0
3,152
C++ STL Range Container
<p>I'm looking for a container that maps from a double to object pointers. However, each key is simply a range of doubles that would correspond to that object.</p> <p>For example, there could be a key/value pair that's &lt;(0.0 3.0), ptr>, or &lt;(3.5 10.0), ptr2></p> <p>container[1.0] should return ptr, container[3....
0
2,858
Kivy - Trying to Understand Clock.schedule_interval
<p>I'm new to Kivy, I was doing pong tutorial and everything was going great, I adapted it to 4 players, each paddle has its own color and if the ball hits a paddle it gets the color of it, this way if the ball gets off the screen the last-hitter gets a score point.</p> <p>I'm running in Ubuntu 14,04, with a virtualen...
0
4,226
PhaseScriptExecution [CP-User] error in React Native
<p>Nowadays everytime I create a new project <code>react-native init ProjectName</code> and after it is created I do <code>npx pod-install</code> and then <code>react-native run-ios</code> it gives me error. It happens with every project that I create new.</p> <p>I'm not sure if there is an update that I have to do but...
0
7,855
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory Spring boot 1.5.2 maven
<p>i'm following this tutorial <a href="https://spring.io/guides/gs/rest-service/" rel="nofollow noreferrer">https://spring.io/guides/gs/rest-service/</a> to build a restful application. when i run this app (run as spring boot application) from spring tool suite it throwing error :</p> <pre><code>Caused by: java.lang....
0
3,405
Really trying to like CodeContracts in C#
<p>I am finally playing catchup with everything new that has been added in to the .NET 3.5/4.0 Frameworks. The last few days I have been working with CodeContracts and I am really trying hard to like them. I am curious what other people think of the implementation of CodeContracts in C#? Specifically, how are people or...
0
1,128
remote procedure call (RPC) protocol stream is incorrect
<p>I use entityframework 5.0. I have so many test. If I run a test alone it passes, if I run this with the others eachother in the same time, it does not pass. There is no contact between the tests. Everytime one same query was sent. It would not be modified.</p> <pre><code>**query:** insert [dbo].[Patient] ([...
0
2,345
Setter not found for property class
<p>Now,I write sample application with jsf, spring and ibatis.I use facelets and write template.xhtml, header.xhtml, menu.xml, login.xhtml and home page. After login, I found this error.</p> <p>In browser,</p> <pre><code>Setter not found for property class + Stack Trace + Component Tree + Scoped Variables </cod...
0
4,267
HTTP Error 405.0 - Method Not Allowed in IIS Express
<p>When issuing a perfectly cromulent verb to a local IIS Express web-site under Visual Studio 2013:</p> <pre><code>CROMULENT http://localhost:7579/Handler.ashx HTTP/1.1 Host: localhost:7579 </code></pre> <p>the server responds with the error:</p> <pre><code>HTTP/1.1 405 Method Not Allowed Allow: GET, HEAD, OPTIONS,...
0
3,691
Sidebar Transitions
<p>I did a sidebar menu with transition effect.</p> <p>the problem is, when I click in the Icon the sidebar kinda squash sandwiching letters.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint...
0
1,272
Connection timed out error in intellij Idea
<p>I am trying to make a simple http request using HttpURLConnection. I am getting this error, connection timed out. I am using intellij IDEA, and set the proxy properly. Check connection in the settings, says the connection is success. What might have gone wrong? Here is my code.</p> <pre><code>import java.io.*; impo...
0
1,991
Using X-ALT-DESC / Applying HTML to calendar invites in Outlook
<p>I'm a beginner in C# (and any networking code to be honest). I'm trying to send a calendar invite, that will be wired when you click a button on the company's website. This is a typical n-tier system, using asp.net/C# and SQL. </p> <p>We used to simply generate an ics that the user would then have to know to ope...
0
1,908
How to get ReferenceField data in mongoengine?
<p>I'm have a problem that query set retrieving <code>oid</code> in json, and I would like to retrieve actual username of that User collection I have below:</p> <pre><code>class User(db.Document): username = db.StringField(required=True) password_hash = db.StringField() is_admin = db.IntField(def...
0
1,570
Text Labels to Google Map Markers
<p>Currently working on a map tracking GPS coords around the UK, however I'm finding it hard to how each point uniquely, I would normally do this by adding a form of label but it seems Google Map API V3 only allows a max of 1 char, is there anything else I can try? I've tried the various scripts but nothing seems to wo...
0
1,753
Data binding: set property if it isn't null
<p>Cannot understand... How to set some property of view only if variable field isn't null? <br>For example</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;layout xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;data&gt; &lt;variable name="item" ty...
0
1,243
ValueError: Number of features of the model must match the input
<p>I'm getting this error when trying to predict using a model I built in scikit learn. I know that there are a bunch of questions about this but mine seems different from them because I am wildly off between my input and model features. Here is my code for training my model (FYI the .csv file has 45 columns with one b...
0
1,080
Simple primefaces application not working
<p>I am trying to build simple JSF application using primefaces but somehow primefaces components are not getting rendered properly. I dont understand what is going wrong. </p> <p>I am trying to display following Facelet file :</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun...
0
1,995
Handling AccessDenied with Method Level Security
<p>i have a method secured with spring security as follows:</p> <pre><code>@PreAuthorize("hasRole('add_user')") public void addUser(User user) ; </code></pre> <p>and if a user with no enoguh permissions is trying to invoke it , an accessDenied exception is thrown:</p> <pre><code>org.springframework.security.access....
0
2,371
Get data in select-box dropdown when editing form - Laravel 5.2
<p>How would I keep my data in my select box when going back and editing a product?</p> <p>Here is my form with parent and sub-categories:</p> <pre class="lang-html prettyprint-override"><code> &lt;form role="form" method="POST" action="{{ route('admin.product.update', $product-&gt;id) }}"&gt; ...
0
2,419
Show loading gif while waiting for ajax response
<p>I have a seat chart. When i click a seat, i want to show a loading gif. Seat chart comes from svg document. Seats are svg elements. When ajax response returned, i want to hide loading gif. I wrote code below but it doesnt work. </p> <pre><code>&lt;section&gt; &lt;div class="parent" style="text-align: center;"&g...
0
4,392
Electron with node-notifier display windows 10 notification
<p>I'm trying to make a simple app that should display notification when button is clicked. The problem is that the notification does not show, but console.logs are showing. Should the notification work on development mode? (meaning just running <code>electron .</code>, and I don't have to build and install the app)</p...
0
1,048
Python sockets how to handle the client closing unexpectedly
<p>My python socket server listens and then connects to a client that will then send a indeterminate number of strings from a user. The client may then close or lose connection to the server.</p> <p>This causes an error.</p> <p>[Errno 10053] An established connection was aborted by the software in your host machine. ...
0
1,152
R applying a function to a subset of a data frame
<p>I looked online extensively and did not see an answer to this particular question (I think).</p> <p>The best way for me to explain myself will be with some code that replicates my problem. I made some temp data:</p> <pre><code>x &lt;- runif(100,1,2) y &lt;- runif(100,2,3) z &lt;- c(rep(1,100)) temp &lt;- cbind(x...
0
1,258
Creating a Timeline in R
<p>So my intention here is to show a timeline of concurrent health technologies, with their duration as a rectangle or tile geom, who's width represents duration over a specified time interval on the x-axis, and by manufacturer along the Y-axis.</p> <p>I have 16 cases, from 4 different manufacturers over a time from 2...
0
1,094
JS SDK FB.login() works but pop-up dialog is staying open after logged in
<p>I am using the JS SDK for Facebook based on the NEW GraphAPI for Auth/Login.</p> <p>Has anyone had this issue when logging in after <code>FB.login()</code> was called via the JS SDK?</p> <p><strong>The problem:</strong> after I initialize by calling <code>FB.Init()</code> asynchronously (because this all wrapped i...
0
1,041
For-in loop requires '[UserVehicles]?' to conform to 'Sequence'; did you mean to unwrap optional? Swift
<p>I have a data model which I made for API returns, it is something like this:</p> <pre><code>struct VehicleData: Codable { let _embedded: Embedded } struct Embedded: Codable { let userVehicles: [UserVehicles] } struct UserVehicles: Codable { let id: String let images: [String] let us...
0
1,044
OpenSSL: How to create a certificate with an empty subject?
<p>I need to generate certificate with empty Subject field. I have tried to use config:</p> <pre><code>[ req ] default_bits = 1024 # Size of keys default_md = md5 algorithm string_mask = nomb...
0
1,177
Writing an array to a range. Only getting first value of array
<p>I am trying to write an array to a range and I have tried several ways but no matter what, I always get only the FIRST value of the array over and over again.</p> <p>Here is the code:</p> <pre><code>Option Explicit Sub test() ActiveWorkbook.Worksheets("Sheet1").Cells.Clear Dim arrayData() As Variant ...
0
1,542
UnsupportedClassVersionError on running play application with JDK 1.7
<p>Just now started learning Play framework for my project requirement and my project only build on <strong>JDK 1.7</strong> so I have downloaded <strong>Play 2.3.9</strong> version and created a sample project by typing <code>activator new</code>. Then moved into the sample project directory and executed <code>activat...
0
1,902
Capistrano v3 could not find a Bundler
<p>I have a problem in deploying my App with Capistrano v3. When I run '$ cap production deploy' I see an error...</p> <pre><code> INFO [825ad68d] Running /usr/bin/env bundle --gemfile /home/username/www/myapp/releases/20131026181031/Gemfile --path /home/username/www/myapp/shared/bundle --deployment --quiet --binstubs...
0
1,862
Couldn't quit R session or couldn't quit RStudio
<p>New to R and RStudio, got problem in operating RStudio.</p> <p>I have a code sample about 53 lines, I could quit by typing "q()" or "quit()", but after I run any code(selected section or all codes), "q()" will not work as pic showing below <a href="https://i.stack.imgur.com/nOw7K.jpg" rel="noreferrer"><img src="ht...
0
1,216
Ivy not installing some JARs
<p>I'm using Ivy for project dependency management and it's been working well aside from one issue which I've always had. There are certain dependencies that Ivy is downloading but it's not installing them into my project. For example, log4j.jar is not being put in the project's lib folder even though it's listed as ...
0
5,301
How to control references between elements in XML
<p>In my previous question (<a href="https://stackoverflow.com/questions/29365082/how-create-references-between-elements-in-xml">How create references between elements in XML</a>) I asked how to create, in an XML Schema, references between elements.</p> <p>Ok, but now I noticed something. For example, defining these ...
0
2,967
Finding out whether a number is a palindrome or not in C#
<p>I am new to C# and was doing this program as an exercise. I have managed to get my program to print the reversed number of the input given by the user, but when I move onto checking whether it is a palindrome or not, it does not calculate the answer correctly. It always prints 'not a palindrome'. </p> <p>After some...
0
1,072
dplyr object not found error
<p>I am not quite sure why this piece of code isn't working. </p> <p>Here's how my data looks like:</p> <pre><code>head(test) Fiscal.Year Fiscal.Quarter Seller Product.Revenue Product.Quantity Product.Family Sales.Level.1 Group Fiscal.Week 1 2015 2015Q3 ABCD1234 4000 ...
0
1,169
keystore not found for signing config 'release'.-- React native
<p>I'm trying to generate a <code>Signed APK</code> for react native project. Followed steps from android and react-native documentation.</p> <p>my <code>Build.gradle</code> file</p> <pre><code>android { compileSdkVersion 23 buildToolsVersion '26.0.2' defaultConfig { applicationId &quot;com.appmobile&quot; min...
0
1,202
jQuery serialize how to eliminate empty fields
<p>In this form users can add some info for Authors (music, lyric authors)</p> <p>The users have the option to add 1 or more authors.</p> <p>The problem is that when the user enters only 1 author all the other inputs remain empty, but the jQuery serialize function will put them anyway in the URL and the server gives ...
0
1,226
How to estimate the progress of a GridSearchCV from verbose output in Scikit-Learn?
<p>Right now I'm running a pretty aggressive grid search. I have <code>n=135 samples</code> and I am running <code>23 folds</code> using a custom cross-validation train/test list. I have my <code>verbose=2</code>. </p> <p>The following is what I ran:</p> <pre><code>param_test = {"loss":["deviance"], 'lear...
0
1,174
Object doesn't support property or method 'values'
<p>I am trying to write some codes to get json file and read. But this codes works in chrome, doesn't works in IE11 and I need to use IE, What is the real solution for solve this problem actually. I changed some value names but same problem still seems.</p> <p><a href="https://i.stack.imgur.com/pB0CJ.jpg" rel="norefer...
0
1,315
ios how to read a crash log
<p>I've never had to read a crash log before so I'm admittedly a n00b in these waters.</p> <p>I can tell there was an <code>EXC_BAD_ACCESS</code>. How can I tell which object was released before it was supposed to be?</p> <p>*note this happens after waking the device while the app is active. It doesn't always happen,...
0
1,520
React Native Focus Text Input On Next Press
<p>Note: I am aware there are a lot of similiar questions and I have tried to implement answers on them but have not been successful.</p> <p>In my React Native app, I have a form that accepts a finite amount of custom text input components. I am trying to find a solution for moving to the next input when a user presse...
0
1,924
Use own IComparer<T> with Linq OrderBy
<p>I have a generic</p> <pre><code>List&lt;MyClass&gt; </code></pre> <p>where <code>MyClass</code> has a property <code>InvoiceNumber</code> which contains values such as:</p> <p>200906/1<br> 200906/2<br> ..<br> 200906/10<br> 200906/11<br> 200906/12<br></p> <p>My list is bound to a</p> <pre><code>BindingList&lt;T&...
0
1,026
Can not get ScrollView to scroll when soft keyboard is shown
<p>I have been trying to get this scrollview to scroll, and have not had any luck in doing so. I have tried many types of fixes but cant seem to get one working. I would like to be able to scroll through my page when an edit box is selected and the keyboard takes up half the screen. This way i can navigate to the rest ...
0
10,263
Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference on Volley while executing Swiperefresh Android
<p>i am having this error <code>java.lang.NullPointerException:</code> Attempt to invoke virtual method <code>int java.lang.String.length()</code> on a null object reference while executing the <code>onRefresh</code> in Android. when i fetch data outside <code>onRefresh</code> method it is fine.</p> <p>here is my Voll...
0
1,835
Update fragment from activity
<p>I do not understand how can I transfer data from fragmentactivity to fragment, i have:</p> <p>MainScreen.class</p> <pre><code>public class MainScreen extends FragmentActivity { CollectionPagerAdapter mCollectionPagerAdapter; ViewPager mViewPager; public static String currentCityId; @Override public void onCreate...
0
2,274
Flutter | The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher
<p>I am trying to add firebase dependencies. When I run <code>flutter run</code> I get</p> <pre><code>The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher. The following dependencies do not satisfy the required version: project ':google_api_availability' -&gt; org.jetbrains.kotlin:kotl...
0
1,313
How to pass id to React Js path link?
<p>I'm trying to create path for component like this &quot;/products?id=uniqueId&quot; for my React Js Project. Unique id is taken from database and depends on which product was chosen. My code is</p> <p><a href="https://codesandbox.io/s/rough-dawn-ufho9?file=/src/Home.js" rel="nofollow noreferrer">CodeSandbox</a></p>...
0
1,634
Spring boot Model mapper Unsatisfied Dependency exception
<p>I have the spring boot application that runs without exception when I remove the basic application test. But it shows the following exception when I add the application test class</p> <pre><code>{"@timestamp":"2018-04-23T18:10:39.421+05:30","@version":1,"message":"The following profiles are active: development","lo...
0
8,885
IndexError: index 3 is out of bounds for axis 0 with size 3
<p>So this is my code to plot a Bézier curve:</p> <pre><code>def bezier(a): n = np.shape(a)[0]-1 # initialise arrays B = np.zeros([101, 2]) terms = np.zeros([n+1, 2]) # create an array of values for t from 0 to 1 in 101 steps t = np.linspace(0, 1, 101) # loop through all t value...
0
1,058
bash:scripts/mysql_install_db: No such file or directory
<p>I am installing mysql-5.5.13.tar.gz in debian 6.0.4. I am following the steps from <a href="http://dev.mysql.com/doc/refman/5.0/en/binary-installation.html" rel="nofollow">here</a> When I run the step <pre>scripts/mysql_install_db --user=mysql</pre> I get the exception that </p> <pre>bash: scripts/mysql_install_db...
0
1,328
how to use onclicklistener for grid view
<p>i used gridview to display numbers, so if i click on any number the next activity should start. i tried this code but the app crashes</p> <pre><code> private GridView gridView = null; gridView.setOnClickListener(new OnClickListener() { public void onClick(View v5) { ...
0
1,510
Rounded transparent _smooth_ corners using imagecopyresampled() PHP GD
<p>I need a script which makes rounded transparent corners on supplied image. I've found one and it works good except the one thing: the applied corners do not look smooth. The <a href="http://php.net/manual/en/function.imageantialias.php" rel="nofollow noreferrer"><code>imageantialias()</code></a> throws Fatal Error s...
0
1,821
EntityFramework insert speed is very slow with large quantity of data
<p>I am trying to insert about 50.000 rows to MS Sql Server db via Entity Framework 6.1.3 but it takes too long. I followed <a href="https://stackoverflow.com/a/5942176/2956448">this answer</a>. Disabled AutoDetectChangesEnabled and calling SaveChanges after adding every 1000 entities. It still takes about 7-8 minutes....
0
2,300
Uploading Image from android to PHP server
<p>In my app i am uploading an image from my device to a local web server... after executing the code a .jpg file gets created in the server but it does not gets opened. And the size of the file in server is different from the original file.</p> <p><strong>Android activity:--</strong></p> <pre><code>public class Main...
0
2,684
node.js mysql query in a for loop
<p>I have two queries.<br /> The first,</p> <pre><code>SELECT auctions.name, wowitemdata.itemName, auctions.itemId, auctions.buyout, auctions.quantity FROM auctions INNER JOIN wowitemdata ON auctions.itemId = wowitemdata.itemID; </code></pre> <p>returns data like this:</p> <pre><code>{ name: 'somename', itemName: 'som...
0
1,424
How to get the sum of two n-dimensional arrays in Java?
<h1>Adding two n-dimensional arrays in Java</h1> <h2>addVectors</h2> <p>Two 1-dimensional arrays / vectors in Java can be added like this:</p> <pre><code>public static int[] addVectors( int[] a, int[] b ) { int[] c = new int[a.length]; for ( int i = 0; i &lt; a.length; i++ ) { c[i] = a[i] + b[i]...
0
5,383
Apple rejects app because of AppTrackingTransparency.framework (can't find it included in the app)
<p>Just got this message from Apple this morning:</p> <pre><code>We noticed that your Kids Category app includes analytics, advertising and collects, transmits, or has the ability to share personal information or device information with third parties. Specifically: - Your app implements the App Tracking Transparency f...
0
4,047
SpringBoot2 - jpa entity is not a managed type
<p>I have a class marked with <code>javax.persistence.Entity</code> which <code>SpringBoot</code> says is not a managed type. </p> <p>The class is as follows</p> <pre><code>@Entity @Table(name="users") public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; private String name; ...
0
2,014
java.lang.LinkageError: loader constraint violation: when resolving method
<p>I have the following:</p> <h1>1. EJB in business tier</h1> <pre><code>package ejb.x.y; @Stateless public class FileFormatConvertor { public byte[] fromExcelToCsv(Workbook workbook, Sheet sheet, String delimiter) throws Exception { ... } </code></pre> <h1>2. Bean in the web tier</h1> <pre><code>pac...
0
13,423
nginx docker container: 502 bad gateway response
<p>I've a service listening to 8080 port. This one is not a container.</p> <p>Then, I've created a nginx container using official image:</p> <pre><code>docker run --name nginx -d -v /root/nginx/conf:/etc/nginx/conf.d -p 443:443 -p 80:80 nginx </code></pre> <p>After all:</p> <pre><code># netstat -tupln | grep 443 tcp6 ...
0
1,470
i18next/i18n Change Language not working with the whole website
<p>I'm doing a react-typescript app where I need to be able to translate the site. I'm using the i18next library. In the main page the user can change the language using a button which runs this method.</p> <pre><code>changeLang(lang:string):any{ i18next.changeLanguage(lang).then(() =&gt; { this.pro...
0
1,491
please enter a valid value the two nearest valid value is?
<p>my assignment is to make weight calculator but due to limitations of university I am not able to use all tags so I write code it works fine but gives me a error of <code>please enter a valid value the two nearest valid value are ***number*** and ***number***</code>.</p> <p>I think that is because of the <em>number</...
0
1,587
Maven assembly - Error reading assemblies
<p>I have defined a personalized jar-with-dependencies assembly descriptor. However, when I execute it with mvn assembly:assembly, I get :</p> <pre><code>... [INFO] META-INF/ already added, skipping [INFO] META-INF/MANIFEST.MF already added, skipping [INFO] javax/ already added, skipping [INFO] META-INF/ already added...
0
2,524
Fastest method to define whether a number is a triangular number
<p>A triangular number is the sum of the n natural numbers from 1 to n. What is the fastest method to find whether a given positive integer number is a triangular one? <p>Here is a cut of the first 1200th up to 1300th triangular numbers, you can easily see a bit-pattern here (if not, try to zoom out):</p> <pre><cod...
0
1,619
Invoking a web service with WS Security from .NET
<p>I need to consume a web service secured with WS-Security from ASP.NET.</p> <p>I'm testing the service with SoapUI, being the envelop request:</p> <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://aduana.gov.py/webservices"&gt; &lt;soapenv:Header/&gt; ...
0
5,741
React handling multiple checkboxes
<p>I made a PoC to see how to handle my change detection on a dynamic list of checkboxes (note, i do not know beforehand how many checkboxes i have.) I created a n ES6 map (Dictionary) that tracks the checked state of each individual checkbox. but for some reason I get the following error:</p> <pre><code> A component ...
0
2,488
ADC single conversion on STM32
<p>I'm studying ADC programming on STM32 F103x and starting with the simplest case - single conversion. The internal temperature sensor (connected to ADC1) value is measured and sending it to COM port by using USART. A target seems clear but when I try to download source code to flash, it doesn't send any data to COM ...
0
1,711
"Join" two collection in MongoDB using node js
<p>I'm trying to make a query between two collections in mongodb using node js.</p> <p>I have these two collection in the db:</p> <p><strong>Trip</strong></p> <pre><code>{ "_id":ObjectId("55a922531e35772c1b17d4a0"), "name":"trip_name", "waypoints":[ "4c828999d8086dcb03877752", ...
0
2,194
Design UITableView's section header in Interface Builder
<p>I have a <code>xib</code> file with a <code>UITableView</code> for which I want to add a custom section header view using the delegate method <code>tableView:viewForHeaderInSection:</code>. Is there any possibility to design it in <code>Interface Builder</code> and then change some of it's subview's properties progr...
0
1,852
UITableView cell.contentView.bounds.size.width Changes With Cell Reuse
<p>I use <code>cell.contentView.bounds.size.width</code> to calculate the position of a text field in a UITableView cell. When the cell is created, debug code reports the width as 302. When the cell scrolls off the screen and then back on, the debug code reports that the it is 280--every time. It doesn't seem to want t...
0
2,216
Using max in a variable in XSLT 1.0
<p>can I use max function in a variable in XSLT 1? I need to find a maximum value inside some nodes and I'll need to call this from more places. So I tried to create a template:</p> <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xs...
0
1,167
Laravel 5: SQLSTATE[23000]: Integrity constraint violation
<p>I have a form with the following fields: name, fullname, description, email, password, state, city (filled through Ajax when the state is chosen) and photo (a image upload). Here's my schema:</p> <pre><code>public function up() { Schema::create('states', function(Blueprint $table) { $table-&gt;incre...
0
1,363
How to show "Sliding Menu" on Activity launch?
<p>I am trying to use excellent library <a href="https://github.com/jfeinstein10/SlidingMenu" rel="nofollow noreferrer">Sliding Menu</a> by Jeremy Feinstein. </p> <p>For my case it will be great if the activity is launched with Sliding Menu open like</p> <p><img src="https://i.stack.imgur.com/QwlYm.png" alt="enter im...
0
2,763
Trouble with MySQL - InnoDB: Operating system error number 2 in a file operation
<p>I'm developing locally and using Mamp Pro. Basically MySQL is having trouble starting and here's the error message from the error log:</p> <p>Any idea how to resolve this?</p> <pre><code>2017-03-02 00:39:08 9518 [Note] Plugin 'FEDERATED' is disabled. 2017-03-02 00:39:08 9518 [Note] InnoDB: Using atomics to ref cou...
0
1,153
Can't get spring-security.xml right
<p>I have my spring security set up to do basic authentication to a database with no issues, however I would like to add custom login/logout and admin pages as well as md5 encryption on passwords w/ salt.</p> <p>I keep hitting walls trying to get either of these features to work, and all the examples online seem to be...
0
3,468
How to use setuptools to install in a custom directory?
<p>I have a Python package that I need to install in the <code>/usr/lib/python2.7/dist-packages</code> or any other specific directory for that matter.</p> <p>Whenever I run the <code>setup.py</code> script it gives the following output:</p> <pre><code>root@abc44:~/som_dir/plugins/abc$python setup.py install running ...
0
1,124
maven ear plugin not picking up application.xml
<p>I am using jbosscc-seam-archtype 1.2 and I am putting the application.xml in EAR project, under <code>/src/main/application/META-INF/</code> but the <code>maven-ear-plugin</code> is not picking it up. any suggestion?</p> <p>Here is the snippet of my maven EAR plugin:</p> <pre><code>&lt;plugins&gt; &lt;plugin&g...
0
1,458
BeanNotOfRequiredTypeException due to autowired fields
<p>I'm still new to Spring MVC and while building my test project, I got this message from Tomcat logs:</p> <pre><code>SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error c...
0
5,960
Syntax error in INSERT INTO Statement in vb.net
<p>I am getting and syntax error in insert into statement. <code>IF</code> statement is working just fine just getting this error when it's trying to save the information</p> <pre><code>Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click If txt12Per.Text ...
0
1,076
How to create multiple infowindow in google map api
<p>I create 3 markers in the map whose data comes from a json. but when I click on a marker and try to open the Info window only the last marker will response correctly.. please help me.... this the code....</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF...
0
1,471
Using User32.dll SendMessage To Send Keys With ALT Modifier
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/3080466/c-sharp-and-sendmessage-keys-is-not-working">C# and SendMessage (keys) is not working</a> </p> </blockquote> <p>I am writing an application that sends keystrokes to another application using the SendMes...
0
1,820
struts2 Unable to load configuration
<pre><code>SEVERE: Exception starting filter struts2 Unable to load configuration. - bean - jar:file:/C:/Users/vaio/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/StrutsCRUD/WEB-INF/lib/struts2-core-2.3.4.1.jar!/struts-default.xml:29:72 at org.apache.struts2.dispatcher.Dispatcher.init(Dispa...
0
1,475
Implementing Unit Testing with iOS
<p>I've followed <a href="http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html#//apple_ref/doc/uid/TP40007959-CH20-SW3" rel="nofollow noreferrer">this tutorial</a> to setup unit testing on my app when I got a little stuc...
0
1,520
How to handle network change between wifi and mobile data?
<p>I am building a VoIP app.During a VoIP call when user switches between WiFi to mobile data i have a problem handling the scenario.</p> <p>In my call screen activity I have registered for receiver which helps me get notified about the network change scenarios.</p> <p>This is the code which I am using for detecting ...
0
1,038
How can I bind a DataSource to an InitialContext for JUnit testing?
<p>I'm trying to run JUnit tests on database "worker" classes that do a jndi lookup on an <code>InitialContext</code> to get a <code>DataSource</code>. The worker classes are usually running on a Glassfish v3 App Server which has the appropriate jdbc resources defined.</p> <p>The code runs just fine when deployed on t...
0
1,107
java.util.zip.ZipException: duplicate entry: android/support/v4/view/MotionEventCompatEclair.class
<p>I'm new to android studio and am trying to import a project from eclipse but I feel like i am running into every single problem possible. The error I'm currently getting is:</p> <pre><code>Error:Execution failed for task ':jobFlexwithInvoice:packageAllDebugClassesForMultiDex'. &gt; java.util.zip.ZipException: dupli...
0
1,041
Nuget restore fails on Azure Devops with message "unable to load the service index for source"
<p>I have a build for a .NET solution that is running in a private agent. The solution contains both .NET Core 2.1 and .NET Standard 2.0 projects. </p> <p>Some of the nuget packages installed are the following:</p> <ul> <li>NETStandard.Library v2.0.3</li> <li>Microsoft.AspNetCore.Mvc v2.0.0</li> <li>Microsoft.NETCore...
0
1,360
how to get selected row value in the KendoUI
<p>I have a kendoUI grid.</p> <pre><code> @(Html.Kendo().Grid&lt;EntityVM&gt;() .Name("EntitesGrid") .HtmlAttributes(new { style = "height:750px;width:100%;scrollbar-face-color: #eff7fc;" }) .Columns(columns =&gt; ...
0
1,255
libc abi.dylib: terminating with uncaught exception of type NSException CollectionView
<p>when i run my app, i received this error :<br></p> <p><pre>2014-08-11 10:52:10.546 ControlViewTest[918:60b] -[UIViewController collectionView:numberOfItemsInSection:]: unrecognized selector sent to instance 0x8c862f0 2014-08-11 10:52:10.605 ControlViewTest[918:60b] <strong>* Terminating app due to uncaught exceptio...
0
3,085
cannot connect to cassandra docker with cqlsh
<p>I'm run Cassandra docker container:</p> <pre><code>docker pull cassandra run --name cassandra -p 9042:9042 -p 9160:9160 -d cassandra </code></pre> <p>The netstat -tpln is:</p> <pre><code>Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name LISTEN - tcp6 0 0 [::]:9160 ...
0
1,141
Get Tx Power of BLE Beacon in Android
<p>I want to get the Tx power of a BLE beacon with an Android device.</p> <p>I defined the assigned number for Tx power here.</p> <pre><code>public class AssignedNumbers { ... public static final byte TXPOWER = 0x0A; ... } </code></pre> <p>Then I made a function to get Tx power here.</p> <pre><code>publ...
0
1,059
How to force Sonatype Nexus to update?
<p>I am trying to use onejar-maven-plugin in my pom.xml:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.dstovall&lt;/groupId&gt; &lt;artifactId&gt;onejar-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.4.4&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;configuration&gt;...
0
2,224
Code generation from WSDL causes exception
<p>I'm using Axis2 1.5.1 (wsdl2java) for code generation (client stubs) from a given WSDL file.<br> The webservice is provided by an external application.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis...
0
3,527