title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Changing gradient style programatically in WP8
<p>I have a few custom controls in my app. One of those custom controls contains a gradient background, and I would like the user to be able to switch between linear and radial gradient style dynamically. How do I do this in code? My custom control XAML:</p> <pre><code>&lt;UserControl x:Class="App.tile" xmlns="http://...
1
1,614
OData / WCF Data Service not working with complex type
<p>I'm brand new to OData and WCF data services so this might be an easy problem. I'm using VS Web Developer Express 2010 where I have a very simple WCF Data Service hosted in a console app. It's returning an IQuerable collection of a simple 'Study' class from a repository (located in a separated dll project), which in...
1
1,372
Multi-module Maven POM
<p>I have a parent project with 2 maven modules a simple Java Application (generated with maven-archetype-quickstart) and a GWT Application (generated with gwt-maven-plugin).</p> <p>I am trying to set both modules' output directories to the parent /target/ folder, but while the application compiles with no errors, whe...
1
4,270
I need to navigate from one page to an another page on xamarin.Forms.app
<p>Because I'm new to Xamarin, I really have no idea how to switch between pages. so I refer to internet and found some solution. But there are some errors.Can anyone help to sort out this issue? Here's my code in app.cs file.I put comments to the codes that I'm not sure. When I click the btn1, that triggered an error ...
1
1,192
C# Creating PixelFormat.Format32bppArgb skewing image
<p>I am trying to combine 3 grayscale bitmaps into one color bitmap. All three grayscale images are the same size (this is based off of data from the Hubble). My logic is: Load "blue" image and convert to <code>PixelFormat.Format24bppRgb</code>. Based off of that create a new byte array that is 4 times as large as t...
1
4,026
Creating a custom databound tooltip in codebehind
<p>How would I create something like this in a code behind?</p> <pre><code>&lt;Style x:Key="{x:Type ToolTip}" TargetType="ToolTip"&gt; &lt;Setter Property="OverridesDefaultStyle" Value="true"/&gt; &lt;Setter Property="HasDropShadow" Value="True"/&gt; &lt;Setter Property="Template"&g...
1
2,554
RandomAccessFile issue
<p>I have to listern a file, when its content is added, I will read the new line, and work on the content of the new line. The file's length will never decrease.(in fact, it is the tomcat log file).</p> <p>I use the following codes:</p> <hr> <pre><code>import java.io.FileNotFoundException; import java.io.IOException...
1
1,747
How to execute SQL transaction Async in ASP.NET webservice
<p>I have webservice with many connections to it. I used this code:</p> <pre><code>IAsyncResult result = sqlCommand.BeginExecuteNonQuery(); while (!result.IsCompleted) { System.Threading.Thread.Sleep(500); } sqlCommand.EndExecuteNonQuery(result); </code></pre> <p>I think this is not a best method because I call <c...
1
1,337
nuxtjs issue with IE11 compatibility_ object assign
<p>I am suffered by IE compatibility. (my vue version is 3.1.0, nuxt is 2.3.4)</p> <p>It keeps error with <code>Object.assign</code>. Here is the list what I have tried.</p> <ul> <li><p>babel-preset-vue-app(<a href="https://www.npmjs.com/package/babel-preset-vue-app" rel="nofollow noreferrer">https://www.npmjs.com/pa...
1
1,723
Mocking the static method with Mockito
<p>I am trying to mock static method using powermock. Below is my code:</p> <pre><code>public class Helper{ public static User getLoggedInUser(HttpServletRequest request) throws NotFoundException { String access = request.getHeader("Authorization"); if(access == null || access.isEmpty()) { throw new E...
1
1,047
How to update my score text correctly in Phaser 3?
<p>I have my <code>score</code> variable updating in my Archery game. However, I cannot get the score to update correctly. Every time it updates, the new text just pastes over the old text. </p> <p>I have tried it inside of the <code>getMedal()</code> function, outside of the <code>getMedal()</code> function, inside t...
1
3,496
Exception while trying to get value from a json object in java webservice
<p>When i tried to get the value from my json object in my java webservice side i am getting some runtime exceptions,PLease find the exception i am getting below:<br> When i tried to get the value from my json object in my java webservice side i am getting some runtime exceptions, Please find my json object below:</p...
1
2,004
NSObject doesNotRecogniseSelector crashes program
<p>I am learning how to develop iPhone applications and I ran into an interesting problem. In my view controller class, I have a an <code>int</code> variable that I <code>@synthesize</code> and overload the setter (though) this is not needed. When I run the application, I get this trace back:</p> <p>*** Call stack at ...
1
1,390
symfony2 entity field type error
<p>I haven't found any solid example on how to do this.</p> <p>I have my entity Shield, which can have more than 1 ShieldTypes. What I want to do is, create a form that creates a new Shield with different Shieldtypes.</p> <p>This is my code, I honestly don't know where is my error:</p> <p>Error is:</p> <pre><code>E...
1
1,983
Patching list in kubernetes manifest with Kustomize
<p>I want to patch (overwrite) <strong>list</strong> in <strong>kubernetes</strong> manifest with <strong>Kustomize</strong>. I am using patchesStrategicMerge method. When I patch the parameters which are not in list the patching works as expected - only addressed parameters in patch.yaml are replaced, rest is untouche...
1
1,093
Pagination and INNER JOIN
<p>I have a situation which I need to do pagination along with <code>INNET JOIN</code>. Here is a similar scenario I have:</p> <pre><code>DECLARE @categories AS TABLE( CatID INT, CategoryName NVARCHAR(100) ); DECLARE @fooTable AS TABLE( ID INT, CatID INT, Name NVARCHAR(100), MinAllow INT, ...
1
1,114
Import a module from both within same package and from outside the package in Python 3
<p>Okay, the scenario is very simple. I have this file structure:</p> <pre><code>. ├── interface.py ├── pkg │   ├── __init__.py │   ├── mod1.py │   ├── mod2.py </code></pre> <p>Now, these are my conditions:</p> <ul> <li>mod2 needs to import mod1.</li> <li>both interface.py and mod2 needs to be run independently as a...
1
1,105
Cannot modify managed objects outside of a write transaction - React Native, Realm
<pre><code>onPressFavourites(item) { let realm = Realm.open({ path: RNFS.DocumentDirectoryPath +'/trees.realm', schema: [sightingSchema, treeSchema], schemaVersion: 7, }).then(realm =&gt; { if(item.favourites === 0) { realm.write(() =&gt; { item.favourites = 1; item.favourite...
1
2,600
jQuery load table from ajax and auto update
<p>I've been searching for a solution to this problem on Google for a while, but I'm either looking for the wrong thing, or I can't find something that accomplishes my needs.</p> <p>I need a jQuery table plugin or the respective functionality that can accomplish the following:</p> <ul> <li>Load table contents via AJA...
1
1,080
Can I read in binary data with istream in c++?
<p>Right now I am using istream to read in data. I have both text which I would like to read in as strings and numbers, and hashes which are read into character arrays. Since hashes are effectively random, I am hitting snags when I try to read it back in and hit EOF (which is part of the hash). Is there a way to acc...
1
1,194
All-Pairs Shortest Paths by Dijkstra
<p>I searched for the Java implementation of all-pairs shortest paths by Dijkstra. I found an algorithm for one source shortest path. I actually don't know Java, but I'm studying discrete mathematics, so maybe someone can help me. What I have to change to make it an all-pairs shortest path? </p> <p>----------Edit ----...
1
2,567
Reloading data and afterSubmit, aftersavefunc functions not working in jqGrid using MVC on inline RowAdd or RowSave
<p>I'm using jqGrid and doing inline editing and row adding. I'm setting everything up on the client side using Javascript and MVC using C# for the server side code. Everything seems to work fine, except when the inline save and add row functions return from the server. If the save fails or errors out, the client seems...
1
2,328
How to write a buffer-overflow exploit in GCC,windows XP,x86?
<pre><code>void function(int a, int b, int c) { char buffer1[5]; char buffer2[10]; int *ret; ret = buffer1 + 12; (*ret) += 8;//why is it 8?? } void main() { int x; x = 0; function(1,2,3); x = 1; printf("%d\n",x); } </code></pre> <p>The above demo is from here:</p> <p><a href="http://insecu...
1
1,928
Simple highlight text chrome extension
<p>I'm trying to make the most simple Chrome extension ever, but alas, I'm having big issues, would appreciate some help.</p> <p>This is what I want it to do:</p> <p>I select some text on a page and press the extension popup. When I do that, the background-color of the selected text is changed to yellow. When I click...
1
1,254
Error "Cannot read property 'name' of undefined" during serverless deploy deploy
<p>When i run command SLS_DEBUG=* serverless deploy, i get error <code>Cannot read property 'name' of undefined</code>, help please. logs and error:</p> <pre><code>Serverless: Load command interactiveCli Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command config:tabcompl...
1
2,563
correctly reading or writing serial port Windows API
<p>I have read alot of issues with serial port reading and writing. None so far have helped me figure out what my code is missing. The msdn example for c++ has undefined variables and missing brackets so although i can add brackets it still does not function. Here's what I've got at this point. It appears I can open th...
1
2,635
Handling blank lines with txt input file and Scanner
<p>I have my program complete. The one thing I need is a way for it to handle blank lines. I have read other posts but none have helped me implement them into my own code. I've tried various syntax within the loop that reads the file, but none have worked. Can someone help me please. This seems like it should be easier...
1
5,610
Reshaping a pandas correlation matrix
<p>I have the following correlation matrix which was created using pandas: <code>df.corr()</code></p> <pre><code>symbol aaa bbb ccc ddd eee symbol aaa 1.000000 0.346099 0.131874 -0.150910 0.177589 bbb 0.346099 1.000000 0.17730...
1
1,189
c# Serial Port Binary stream processing
<p>I have a serial device that has a binary output and I capture the data using the following.</p> <pre><code> private void port_DataReceived(object sender, SerialDataReceivedEventArgs e) { int count = sp.BytesToRead; byte[] data = new byte[count]; sp.Read(data, 0, da...
1
1,152
symbolicatecrash with XCode 4.2 not symbolicating system symbols
<p>This is a very weird problem. I think I must be doing something wrong, but I don't know what it is. I've been using symbolicatecrash for several years with no problems. The issue I'm seeing is that symbolicatecrash is not showing symbols for the system libraries, but it IS showing symbols for my application. I've tr...
1
3,520
Possible reasons for error: "The cast to value type 'Decimal' failed because the materialized value is null"
<p>I'm getting a report of errors from a production system. I don't have easy access to the production system. I will get all the data that I need for it in due course, but what I'm trying to do is expedite the process of resolution of this issue. I'm trying to eliminate as much guesswork as possible.</p> <p>The error...
1
1,064
"AudioClip " does not take a constructor that takes 0 arguments
<p>on this line, which is line 10 it says "AudioClip" does not take a constructor that takes 0 arguments. How to fix it? I know that AudioClip is a default class in Unity. What parameters shall I pass there or how to solve this issue?</p> <pre><code>AudioClip _clipRecord = new AudioClip() int _sampleWindow = 128; </c...
1
1,186
CXF Keystore security - org.apache.cxf.binding.soap.SoapFault: Empty username for specified action
<p>I'm trying to use keystore security but I'm, hitting the following problem and not sure how to proceed further. <strong><em>org.apache.cxf.binding.soap.SoapFault: Empty username for specified action</em></strong>. Here is my setup. </p> <p><strong>My Certificates are generated by the following commands</strong> </...
1
4,175
How do I sort items in a list by DateTime in Flutter/Dart?
<p>I'm making an app for my Uncle which he asked me to make to challenge me. I thought this was the perfect opportunity to learn Flutter/Dart. I have this code (below), but i need it to organise a list by DateTime (line 77). Each entry has a string id, a DateTime variable , a string name and some body text, at a bare m...
1
1,476
WCF IIS hosted service multiple Service Contracts implemented by a single service - how do I share uri between endpoints via config
<p>I have a set of Service Contracts which split up my service interface into chunks of related functionality. I am currently implementing all contracts using a single service class (may want to split these later but for now the single service class suffices).</p> <p>I am trying to use configure the endpoints using a ...
1
1,360
Android spinner don't show selected text while list appears in drop down
<p>i am newbie in android and i am trying to use two spinner views in an activity. entries are showing in drop down of spinner but when i select an entry, it doesn't appear in spinner control. I have searched all over but it didn't work for me. following is all i am doing/trying. My activity xml is as </p> <pre><code>...
1
2,833
Why am I getting a generic constraint violation at runtime?
<p>I'm getting the following exception while trying to create a new instance of a class that heavily relies on generics:</p> <pre><code>new TestServer(8888); System.TypeLoadException GenericArguments[0], 'TOutPacket', on 'Library.Net.Relay`4[TInPacket,TOutPacket,TCryptograph,TEndian]' violates the constraint o...
1
3,134
Android Extract Decode Encode Mux Audio
<p>I am trying to adapt the code found in <a href="https://android.googlesource.com/platform/cts/+/jb-mr2-release/tests/tests/media/src/android/media/cts/ExtractDecodeEditEncodeMuxTest.java">ExtractDecodeEditEncodeMuxTest.java</a> in order to extract audio and video from a mp4 recorded via Cordova's device.capture.capt...
1
9,515
Serializing Java Object without StackOverflowError
<p>I have a quite large Java object that represents a graph, with vertices and edges, in memory. Each vertex has an <code>ArrayList</code> of other vertices that it is connected to (and has a <code>HashMap</code> data structure as well for other purposes). The graph can have a few thousand vertices, and many more edges...
1
3,436
Scroll view is not working in list view
<p>I have multiple linear layout in this layout.The scroll view is working when i am fully scrolled the item, but not in list view.My list view have multiple list items it show only one list item at a time thanks help me.....</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;ScrollView xmlns:android="htt...
1
2,644
URL re-write not working with my Apache using PHP Slim Framework?
<p>Ok, I am not sure if this is me but I have just come across the Slim framework for PHP which looks very simple and easy to round about better apps with. I am sure its my .htaccess file and I am not sure what the hell I am doing wrong.</p> <p>So this works with Slim :</p> <pre><code> http://testvm/index.php/hello/...
1
1,036
setting background image to dynamic svg data?
<p>Originally i had some inline svg which works as i wanted.</p> <pre><code>&lt;svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"&gt; &lt;defs&gt; &lt;pattern id="smallGrid" width="10" height="10" patternUnits="userSpaceOnUse"&gt; &lt;path d="M 10 0 L 0 0 0 10" fill="none" stroke="gray" str...
1
1,053
Encoding raw YUV420P to h264 with AVCodec on iOS
<p>I am trying to encode a single YUV420P image gathered from a <code>CMSampleBuffer</code> to an <code>AVPacket</code> so that I can send h264 video over the network with RTMP.</p> <p>The posted code example seems to work as <code>avcodec_encode_video2</code> returns <code>0</code> (Success) however <code>got_output<...
1
1,106
How to log soap request and response with custom messages to file in Spring Boot?
<p>I have created rest service as wrapper for soap service in Spring Boot 2.1.7, and I need log soap request and response (also rest request) with date and custom message to file.</p> <p>I've tried to get some message from handleRequest method (System.out.println("message from handleRequest")), but no any message in c...
1
1,030
Cant draw multiple objects in opengl
<p>I cant work out why the following code doesn't work, I am attempting to draw 2 shapes, a triangle that is coloured red and a cube that is multi coloured, by themselves they draw perfectly but if I try to draw both at once it gives weird bugs, I have tried changing lines around changing variable's modifying my shader...
1
1,299
Create PDFMake table cells from angularjs .forEach loop over array
<p>The code below renders the following PDF: <a href="https://drive.google.com/file/d/0B9COonOvl5koM0hGSnhlRFpWSDQ/view?usp=sharing" rel="nofollow">Link to PDF on Google Docs</a>. (I was not allowed to paste a picture into this post)</p> <p>There are song titles and chord progressions for each song. What I am lookin...
1
1,129
databinding combobox in Dataform Silverlight using MVVM in Update
<p>I have Master/Detail – datagrid/dataform and after select item it shows in dataform for update, but I have a problem with databinding or populating combox with departments and set SelectedEmployee.departmentid as selectedvalue. </p> <p>Here 2 questions now:</p> <p><strong>1. In EmployeeViewModel this code just ...
1
4,599
Hibernate performance issue while inserting massive data
<p>We will migrate large amounts of data (a single type of entity) from Amazon's DynamoDB into a MySQL DB. We are using Hibernate to map this class into a mysql entity. There are around <strong>3 million entities (excluding rows of list property)</strong>. Here is our class mapping summary:</p> <pre><code>@Entity @Tab...
1
1,522
Adding markers to a unfolding map in Java
<p>I need to add code to display a marker at the location of each earthquake in the RSS feed and make the radius of each marker 10 by modifying the methods (and adding new helper methods as necessary). Then I need to add code to style each marker according to the magnitude of its earthquake.</p> <p>I know that I shoul...
1
1,852
java.lang.IllegalArgumentException: Unable to initialize due to invalid secret key
<p>I'm getting an encryption exception.</p> <p>I'm running </p> <ul> <li>OS X 10.11 </li> <li>Java 1.8 </li> <li>Groovy Version: 2.4.4 </li> <li>Gradle 2.3-20141027185330+0000; </li> <li>JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home</li> </ul> <p>I installed the Oracle JCE Policy jars in...
1
1,337
Windows Store-app with login-screen
<p>I need my program to start up with an login-screen, but I can not figure out how to make it look pretty. <br /> I tried with a code, that looks like the following, but I do not think it is the "true way" to do it</p> <pre><code>&lt;Page.Resources&gt; &lt;Grid Style="{StaticResource LayoutRootStyle}"&gt; &l...
1
1,044
Using Apache Rampart for Signature with JKS and Binary Security Token key identifier
<p>I have to call a web service that was provided by a customer (some information below is masked for this reason). I've been provided with a java keystore that contains the private key that I need to use to generate a signature to include in the WSSecurity header of my request.</p> <p>Additionally, I've been sent a w...
1
1,491
Python: ReportLab: How to include page numbers in table of contents?
<p>I'm using the Python package ReportLab to create PDF reports.</p> <p>Using the examples given in the user guide, reportlab website and forums, I've managed to achieve a dynamic table of contents with clickable links but the <strong>page numbers aren't appearing</strong> (in the table of contents).</p> <p>It would ...
1
2,363
pipe, fork and shell commands in C
<p>I am trying to reproduce the pipes in a shell. for example ls | sort At first I am trying the pipes but I can't get the parent to read the result of what the child has executed:</p> <pre><code>//pipes essai # include &lt;stdio.h&gt; # include &lt;stdlib.h&gt; # include &lt;unistd.h&gt; # include &lt;sys/types.h&gt;...
1
1,597
Direct State access with vertex buffers
<p>Looking at <a href="https://stackoverflow.com/questions/3776726/how-to-bind-a-element-buffer-array-to-vertex-array-object-using-direct-state-a">this question from 2010</a>, concerning vertex buffers in modern OpenGL, is it still the case that Direct State Access is unavailable with them? I've modified most of my gr...
1
1,230
Electron IPC excessive messages
<p>I am experimenting on the Electron (atom shell) platform for building a desktop app, currently on mac os x.</p> <p>I am trying its IPC (inter processes communication) module for sending and receiving sync and async messages in between two main electron processes, main and the renderer processes.</p> <p>However wit...
1
1,481
CUDA Makefile nvcc Error
<p>I'm attempting to compile a basic CUDA matrix multiplication program, but I'm running into this error:</p> <pre><code>nvcc -I. -I/usr/local/cuda/include -c matrixMult1.cu -o matrixMult1.o make: nvcc: Command not found make: *** [matrixMult1.o] Error 127 </code></pre> <p>I was getting another error originally an...
1
2,265
Display image from database in a php table
<p>I have got a simple form which someone fills out and then another form which runs a query to retrieve the data. </p> <p>Been toying around with the idea of including a images upload in the form and then getting the table to display the form data including this image. </p> <p>this is some of the code i have</p> <p...
1
1,685
How to plot predicted values with standard errors for lmer model results?
<p>I have a transplant experiment for four locations and four substrates (taken from each location). I have determined survival for each population in each location and substrate combination. This experiment was replicated three times.</p> <p>I have created a lmm as follows:</p> <pre><code>Survival.model &lt;- lmer(S...
1
1,386
How to create a rectangle with rounded corners with different sections in different colors
<p><strong>REQUIREMENT</strong></p> <p>How do I create a view looking like this.</p> <p><a href="https://i.stack.imgur.com/d3Kje.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d3Kje.png" alt="enter image description here"></a></p> <p>I would like to draw a view on the screen which is a line broke...
1
2,229
Laravel - How to send email to all users
<p>Im struggling to make a code that sends email to my subscribed users. I want to pass body to view according to users default language, can anyone help me ?</p> <p>My code:</p> <pre><code>if($newsletter-&gt;save()) { //get users to send to $users = User::where('newsletter...
1
1,077
getting error in Ant build junitreporting
<p>When I am trying to build without <code>junitreport</code> its working fine. However, I need the junit report in html format ultimately with all the successful or failed scripts. Please suggest where I am going wrong. Any help would be appreciated.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="...
1
2,393
Shopping Cart Application on Spring Boot with Hibernate/JPA
<p>I am creating shopping cart Spring Boot application with Hibernate and JPA. I have OneToMany mapping between CART and Product entity. My scenario is, User can add same product multiple times in the cart. If the same product is added more than once just need to increment the quantity by 1. I have created below entiti...
1
2,669
How to capture XML when calling web service from win apps
<p>in my solution i have three project. one is web service (ASMX), another is win form apps from where i am calling the web service. another class library where class has been design extending SoapExtension class.</p> <p>my objective is to capture response &amp; request xml when i am calling web service from my win fo...
1
2,818
setOnFocusChangeListener - Triggers after each character
<p>I have the following custom base adapter. I have a listview with a edittext on each item. I want to save that data as soon as the user leaves the edittext, but what happens now is that each time the user types in 1 char, the setOnFocusChangeListener triggers. I really don't know why this is happening.</p> <p>My cus...
1
2,343
How can I set a custom SSRS date parameter?
<p>I have a series of reports that require date ranges. To "help" the customer, we have a dropdown for quick dates (Last 7 days, this month, last month, etc.) One of the dropdown items is "Custom".</p> <p>When the user selects anything other than custom, we use a dataset within the Available Values and Default Values...
1
1,328
Dojo 1.9: placeAt automatically calls startup when parent widget has started up
<p><a href="http://dojotoolkit.org/" rel="nofollow">Dojo v1.9</a></p> <p>I am writing some code that progrommatically creates a widget that I need to place into a layout widget. The problem I currently have is that <code>startup</code> is automatically called over aggressively by dojo.</p> <p>If the layout widget has...
1
1,125
CsvReader to ignore blank column
<p>I am using CSVhelper for the first time. Another program is exporting a csv file the file looks like this</p> <pre><code>,"Employee","Earnings 1/Rate","Note" ,"John Doe","Regular 10.50", "Started Sep 1" </code></pre> <p>The problem is that I have a blank column to contend with at the start. I don't want the user t...
1
2,006
Netlogo, creating obstacle avoidance algorithm
<p>I am simulating pedestrian motion in NetLogo, and am having trouble creating an obstacle avoidance algorithm from scratch. There are algorithms online but they are not suited for moving obstacles (other pedestrians). In addition, my agents are moving from their spawnpoint (point A) to their goal (point B).</p> <p>T...
1
1,260
How to remove space in between Android Grid Layout
<p>As the title states, I simply want to have a layout with as little to no space between the columns/rows that are in a grid layout. Refer to the image below as the example. I simply want all the buttons to take up all the space of the cell they are in and the adjacent cells to go right up against each other. This wil...
1
1,826
Import Error : DLL module could not found, while importing pandas
<p>I am working on Python 3.5 and I am importing Pandas, Numpy, scikit-learn and pickle libraries in pycharm IDE. I have installed all the libraries as well, via pycharm IDE's package installer. When i execute following commands it gives me no "Syntax" errors in IDE.</p> <pre><code>import pickle from pathlib import Pa...
1
1,370
ExtJS 3 Slider: slider value always goes back to minimum value when the collapsed container expands again
<p>I defined two panels in viewport: a main panel which is non-floating, the other one is a floating panel with a slider in its bottom toolbar. When mouse clicks at the body of the main panel, it generates a random value which is used to set the new value of the slider bar; it works well when the floating window is not...
1
1,110
/usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
<p>I get this error:</p> <pre><code>(cv) jalal@klein:~/computer_vision/py-faster-rcnn/caffe-fast-rcnn$ make -j8 &amp;&amp; make pycaffe PROTOC src/caffe/proto/caffe.proto CXX src/caffe/blob.cpp CXX src/caffe/data_reader.cpp CXX src/caffe/layer.cpp CXX src/caffe/solvers/adadelta_solver.cpp CXX src/caffe/solvers/rmsprop...
1
2,912
Does PostgreSQL count nested BEGIN and END statements, even though it doesn't support autonomous transactions?
<p>I'm working on some C++ code that makes use of libpq to interact with a PostgreSQL database, and I've started writing some functions, each of which internally starts a transaction, applies several changes to the DB, then ends the transaction.</p> <p>I would now like to call one of these functions in combination wit...
1
1,677
Paypal PHP REST API
<p>I'm creating a Paypal checkout with PHP and this is the code so far:</p> <pre><code>$ch = curl_init(); $clientId = "clientID"; $secret = "secret"; curl_setopt($ch, CURLOPT_URL, "https://api.sandbox.paypal.com/v1/oauth2/token"); curl_setopt($ch, CURLOPT_HEADER, false); curl_s...
1
2,752
Dropwizard + Jersey : "Not inside a request scope" when creating custom annotation
<p>I have a simple Dropwizard 0.8.1 REST service that pulls in Jersey 2.17. Upstream of the REST/Jetty service I have some authentication service that adds some nice authorization information to the HTTP Header that gets passed to my Dropwizard app.</p> <p>I would <em>love</em> to be able to create a custom annotatio...
1
2,590
Dollar symbol ($) in React/ES2015
<p>I notice it seems that when rendering &quot;dynamic content&quot; in React I have to use the dollar symbol ($) in the JSX syntax.</p> <p>By &quot;dynamic content&quot;, I refer to the fact that a React component doesn't know anything about what it needs to render until &quot;render-time&quot;, something like passing...
1
1,228
Deserialize JSON to DataTable with JSON.Net
<p>I am trying to deserialize a JSON payload into a datatable using JSON.Net for .Net 3.5. My JSON string is in the format:</p> <pre><code>{"d":[{"__metadata":{"id":"http://testingurl.mydomain.net/Mysvc.svc/AccountingDate(datetime'2013-08-02T00%3A00%3A00')","uri":"http://testingurl.mydomain.net/Mysvc/AccountingDate(da...
1
1,487
Error in importing model in django
<p>Error in importing model in another file. Basically I want to use </p> <pre><code>&gt;&gt;&gt; from mysite.blog.models import Blog &gt;&gt;&gt; b = Blog(name='Beatles Blog', tagline='All the latest Beatles news.') &gt;&gt;&gt; b.save() </code></pre> <p>but in a python file[ scrap.py ] to add values to models but e...
1
1,052
create Json object in lua
<p>I have attempted to follow the following article and I keep getting module Json module not found. </p> <p><a href="https://stackoverflow.com/questions/24908199/convert-json-string-to-lua-table">Convert JSON String to Lua Table?</a></p> <p>I am installing Json-lua from luarocks as per the article. Then I am just ...
1
1,025
PHP MySQL update with multiple WHERE (syntax error)
<p>Here is query that works </p> <pre><code>UPDATE 18_6_TransactionPartners SET CompanyName = ?, VatCode = ? WHERE CompanyName = ? OR RegistrationNumber = ? </code></pre> <p>I just want in one query make multiple updates, like </p> <pre><code>UPDATE 18_6_TransactionPartners SET CompanyName = ?, VatCode = ? WHERE C...
1
1,199
Quaternion to Yaw pitch roll
<p>I am trying to convert a quaternion to yaw pitch roll euler angles. I am experiencing problems with the gimbal lock. The first strange thing that occurs is that errors already start to appear when the pitch angle is in the neighbourhood of +-pi/2. I thought problems should only occur at exactly pi/2.</p> <p>Secondl...
1
1,267
Java swagger-ui doesn't render allowableValues for parameter
<p>I have a SpringBoot, JAX-RS, and Maven app. I'm using Swagger annotations to provide info on the REST service interface. It basically works, but I'm having trouble with some parameters that I expect a limited set of values. I believe I'm specifying the &quot;@Api...&quot; annotations correctly, and I can see the ...
1
1,337
CSS3 translateZ doesn't work for chrome?
<p>Following simple POC code's translateZ works on Firefox, but it doesn't work on Chrome. The translateX, translateY part works on both browsers. What is wrong with the code? Thanks.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;link rel="stylesheet" type="text/css" href="reset.css" /&gt; &lt;style type="text/...
1
1,229
Spring Boot Integration test throws error "java.lang.IllegalStateException: Timeout on blocking read for 5000 MILLISECONDS"
<p>The issue happens on my project that uses Spring webflux via Spring boot 2.0.0.M3. Below is the dependencies of project,</p> <pre><code>dependencies { compile 'org.springframework.boot:spring-boot-starter-actuator', 'org.springframework.cloud:spring-cloud-starter-config', 'or...
1
3,141
How to search inside the array in primeNg p-table with multiselect?
<p>I am having the data points like an array. So I am trying to search the value inside the array but it is not working in primeng</p> <p>In the component file I am having the below part of code,</p> <pre><code>tableHeader = [ { field: 'name', header: 'Name' }, { field: 'skills', header: 'Skills' }, ]; model...
1
1,076
The source attachment does not contain the source for the file SQLiteOpenHelper.class
<p>I had a sample app in android version 4.2. I had set Breakpoints for each and every line. At the time of debugging, suddenly the debugging stopped saying that "The source attachment does not contain the source for the file SQLiteOpenHelper.class". </p> <p>I attached the jar file and still it reports the error. Inst...
1
2,838
What is the correct way to mount a hostpah volume with gitlab runner?
<p>I need to create a volume to expose the maven .m2 folder to be reused in all my projects but I can't do that at all.</p> <p>My gitlab runner is running inside my kuberentes cluster as a container.</p> <p>Follows Deployment and configmap</p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: na...
1
1,560
Magento new product widget image resize
<p>I'm running magento with a custom template. I have been trying for the past week to enlarge the image size of the new product widget (whether grid or list) to be 232px width and 280px length. I have successfully located the new_grid.phtml and new_list.phtml files at app/design/frontend/base/default/template/catalog/...
1
1,812
asmack - receiving custom XML messages
<p>I'm sending custom XML messages from server to clients. An Android is a client which should know how to handle custom XML messages. The problem with asmack (which I'm using for receiving/sending messages) is that it tries to parse the message itself. An example message of the playerlist is the following:</p> <pre><...
1
1,458
Why Apache beam can't infer the default coder when using KV<String, String>?
<p>I'm implementing the <a href="https://github.com/apache/beam/blob/master/examples/java/src/main/java/org/apache/beam/examples/cookbook/CombinePerKeyExamples.java" rel="nofollow noreferrer">CombinePerKeyExample</a> using a subclass of <code>CombineFn</code> instead of using an implementation of <code>SerializableFun...
1
2,489
Storing and reading files from Documents directory iOS 5
<p>In my game, when a level is completed the app stores a "1" in a file in the Documents directory of the app. When the game then loads, a player can only play a level if the previous level has been completed. When I test the game via Xcode and on a device the app works properly and a level cannot be played until th...
1
1,277
How do you configure prometheus.yml file to collect Prometheus metrics in a Spring-Boot application?
<p>I have a simple Maven Spring-Boot Application (Java) and am using Prometheus to collect metric information from it. I have all of the necessary Prometheus dependencies in my pom file, and I have included the @EnablePrometheusEndpoint annotation to my @SpringBootApplication class, and have included "metrics_path: '/p...
1
2,817
How can i optimize MariaDB's my.cnf file? (with mysqltuner result)
<p>I am using MariaDB &amp; Apache (LAMP) and my VPS Ram is 512MB.</p> <p>Now the problem is sometimes when i use <code>top</code>, the MariaDB process is using 506MB of RAM so i want to optimize my MariaDB.</p> <p>Here is my <code>./mysqltuner.pl</code>'s result:</p> <pre><code>[!!] Currently running unsupported My...
1
1,607
Spring Boot: Cannot determine embedded database driver class for database type NONE
<p>I have a SpringBoot app. with these dependencies:</p> <p></p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt; &lt;/dependency&gt; &lt;!-- https://mvnrepository.com/artifact/com.zaxxer/Hi...
1
2,951
Error "{"stateMachine":{"<>1__state":-2,"<>t__builder":{" when run project netcore
<p>When I run project netcore I get a message {"stateMachine":{"&lt;>1__state":-1,"&lt;>t__builder":{ and I don't know how to fix this. I see error in command line</p> <blockquote> <p>Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] An unhandled exception has occurred while executing the ...
1
2,314
JQuery validate within a Twitter Bootstrap modal with PHP
<p>I'm working on a transport planner and in my tasks table I have a button to sign a routenumber to a task. When a task haven't got a routenumber at all, the button will call a bootstrap modal to assign a new routenumber to that task which will also be the standard routenumber. </p> <p>When a task already has a route...
1
4,327
Rails form_tag and check_box_tag array for collection of selected objects
<p>Long time lurker but haven't posted yet. Despite hours of debugging I can't seem to figure out why my check_box_tag won't pass an array. Essentially I would like the check box behaviour to allow the user to select multiple records and then use a button to either discontinue or refill the record. </p> <p>View: </p> ...
1
1,371
Scrapy crawl error: [Error 123]The filename, directory name, or volume label syntax is incorrect
<p>I am programming using scrapy in windows, and I am entering in command</p> <blockquote> <p>C:\Users\David&gt;cd c:\python27\natliq</p> </blockquote> <p>which is the path where I have my spider. However, when I take my spider for a test run by running the crawl command I am getting the following error.</p> <blockquot...
1
1,806
Client-side SSL theoretical question
<p>I work at company X and we want to engage in a B2B transaction with company Y. In doing so, Y is requiring client side authentication; they already provide server-side authentication - so this would be a mutual SSL transaction.</p> <p>My understanding is that I simply need to provide my CA-signed cert as part of m...
1
1,230