title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
C++ use std::chrono to measure execution of member functions in a nice way
<p>I want to optimize my application, especially the execution speed of certain functions.</p> <p>Imagine there is a class with some member functions</p> <pre><code>class Test { public: Test(); virtual ~Test(); int init(int arg1, double arg2); private: [...] </code></pre> <p>and in my constructor I ...
2
1,221
Reformat data to plot a calibration curve using geom_errorbar() in ggplot2
<p><strong>Intro:</strong></p> <p>I have a dataframe of summary statistics for three different air quality measurements. The instrument names are <code>aa34</code>, <code>aa35</code>, and <code>48c</code>. They each measure carbon monoxide in ppm. I have the data in wide format, where each vector is the mean, standard...
2
2,248
Zend_Navigation XML structure (Dashboard page)
<p>is there any method to create page strucutere with Zend_Navigation (xml) like this:</p> <pre><code>- 1. Dashboard - - 1.1 New article - - 1.2 New user - - 1.3 New products - 2. Articles - - 2.1 New article - - 2.2 Reviews - 3. User - - 3.1 New user - - 3.2 Etc Etc... - - </code></pre> <p>- I'am trying to do by thi...
2
1,227
Refresh DropDownList Based on Value From Input Field
<p>Is it possible to refresh a <code>@Html.DropDownList</code> based on value from an input field on the same form?</p> <p>For example, I have a field <code>@Html.TextBoxFor(m =&gt; m.CustomerFunds)</code> to which a value such as 50 would be entered, as soon as the user exits the field such as TAB for example, a func...
2
1,679
Convert Annotated Image to Binary Mask Image using Polygon Co-ordinate
<p>I am trying to Convert Annotated image to Binary mask Image using cordinates present in json file.<br /> Image is Annotated using VGG annotation.</p> <p>Below are the Actual image, Json data, and the result i want.</p> <p><a href="https://i.stack.imgur.com/uG2F6.jpg" rel="nofollow noreferrer"><img src="https://i.sta...
2
1,532
Gradle fails at task transformClassesAndResourcesWithSyncLibJarsForDebug
<p>Gradle build fails after my AS updated to 3.1 Canary 5. Below is the error I am getting: I don't have any clue what is the problem.</p> <pre><code>org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':ceeutil:transformClassesAndResourcesWithSyncLibJarsForDebug'. at org.gradle.api.internal.tas...
2
2,177
How to prevent adding whitespace into java xml signature and certificate?
<p>I'm signing part of an xml document but the resulting signature and certificate have unwanted whitespace in them. For example, here is the signature:</p> <pre><code> &lt;SignatureValue&gt;QcjPfiZcmqE8aMNH5AKVk+oFBYQ4LynV3a5YlJIxuf0y22QQ0NA2BTkRriI85dd/6Qcezf5xFguJ&amp;#13; V+Mlk44c0uZD7TE+NlsFz3q1vtHHPi/9ygc2kJ...
2
2,131
nginx not loadbalancing in case of ip_hash
<p>I am trying to use <code>nginx</code> for loadbalancing. I have to use <code>ip_hash</code> because I work with websockets. Following is the configuration:</p> <pre><code>#user nobody; worker_processes 3; events { worker_connections 1024; } http { include mime.types; default_type applicatio...
2
1,268
C picture rotation optimization
<p>This is for all you C experts out there..</p> <p>The first function takes a two-dimensional matrix src[dim][dim] representing pixels of an image, and rotates it 90 degrees into a destination matrix dst[dim][dim]. The second function takes the same src[dim][dim] and smoothens the image by replacing every pixel valu...
2
1,225
Chef Cookbook Compilation Error While Bootstrapping The Node
<p>I am using chef to bootstrap a node. I have created encrypted data bags and copied the secret key on the node as /etc/chef/encrypted_data_bag_secret.</p> <p>When I try to bootstrap the node, I am getting the following error:</p> <pre><code>===========================================================================...
2
1,972
Android custom listView click - how to call an intent to another activity
<p>Some one help please. I'm trying to create an app with a custom list view which has text view and image view. the list items are filtered and on clicking on the list item it should open up an associated activity. However the app crashes when i click on an item giving message,"thread exiting with uncaught exception"....
2
4,455
GRPC Severe Memory Leak With Netty
<p>I'm getting an exception sometimes on GRPC using netty.</p> <p>I'm creating a bunch of servers like so:</p> <pre><code> for(int i = 0; i &lt; 4; i++) { var executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(1); var eventGroup = new NioEventLoopGroup(1); //One thread for eac...
2
1,522
How can I base my Spring Boot app on an external Servlet?
<p>I'm trying to turn <a href="https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-jpaserver-examples/hapi-fhir-jpaserver-example-postgres/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java" rel="nofollow noreferrer">this example</a> into a Spring Boot application, the problem lying in that <code>RestfulSe...
2
2,186
PostgreSQL and pllua
<p>I'm trying to build the pllua module but I'm having some trouble.</p> <p>I think that the problem is on the wrong PostgreSQL version but I'm not sure, I'd be grateful if someone could help me.</p> <p>Postgres location: <strong>/opt/PostgreSQL/9.3/bin</strong> (is the enterpricedb version without support)</p> <p>...
2
2,949
Swig wrapping C++ to python is using default Python rather than Anaconda python in Mac OS X
<p>I am trying to wrap c++ functions into python using swig. I am using following commands </p> <pre><code>swig -c++ -python helloworld.i g++ -O2 -fPIC -c hello.cpp g++ -O2 -fPIC -c helloworld_wrap.cxx -I//anaconda/include/python2.7 g++ -lpython -dynamclib hello.o helloworld_wrap.o -o _helloworld.so </code></pre> <p...
2
1,148
Additional information: Couldn't read cluster state for indices graylog_*
<p>I tried following commands to set graylog server up properly on local:</p> <pre><code>$ docker run --name mongo -d mongo:3 $ docker run --name elasticsearch \ -e "http.host=0.0.0.0" \ -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \ -d docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.4 $ docker run --link mon...
2
4,461
Heroku app deployment error(code: H12)
<p>I'm trying to deploy a simple blogging app but seem to have run into a problem. I'm using mlab for my production database and I am using a local mongodb database for development purposes. I'm using cloud9 as my development IDE. When I deploy, it shows an application error. Heroku logs show this:</p> <pre><code> ...
2
2,277
errors: -undefined reference to `_imp__GetStockObject@4' and undefined reference to `_imp__SetBkMode@8'
<p>i wrote a code in visual studio code in windows10 in c++ to get simple window but unable to build and run all the files used to debug are provided like task.json,launch.json and cpp-properties.json plz tell me how to make windows project in visual studio code. </p> <p>Errors are </p> <pre><code>&gt; Executing task...
2
3,865
How to make Twilio Client Sdk compatible with latest android versions?
<p>I am using twilioclient-android-1.1.2-3635733 in my application, the MonkeyPhone Class file seems like - </p> <pre><code>package com.twilio.example.hellomonkey; import java.util.HashMap; import java.util.Map; import android.content.Context; import android.util.Log; import com.twilio.client.Connection; import co...
2
2,536
Sitecore Load all items into an MVC model?
<p>I have created a bunch of custom templates to store items (such as <code>Industries</code>, <code>Subindustries</code>, etc.) in Sitecore. I now want to go about loading these into my Sitecore MVC model.</p> <hr> <p>The lists are located in <em>sitecore > Content > Lists</em>. For example inside the <em>Lists</e...
2
1,235
Modifying a Trigger for Opportunity so it will not update Manager if's it's been Closed/Won
<p>I was wondering if someone could help me modifying this trigger. I'm having issues Opportunities are being updated after they are Closed/Won, which is overwriting the old (correct manager) with the rep's current manager. This is an issue because I have a trigger that create Actuals and it's editting Actuals and wr...
2
1,218
Python Multithreaded Matrix Multiplication
<p>I am doing a project for the end of the semester and I need to be able to take a matrix to a power and I need to make the problem multithreaded.</p> <p>This code works in some situations and does not in other situations. I believe that it has to do with the logic in the nested loops in the process_data function but...
2
1,038
Automate process SSAS tabular model using Azure
<p>I have process that uses Azure Data Factory for pulling data, processing and pumping data on Azure SQL database. At the end the data from Azure SQL is used by a SSAS tabular model. As of now the entire process till pumping data to Azure SQL is automated using Azure Data Factory v2 but I am unable to find a way to au...
2
2,924
Insert JSON formatted string into JSON structure
<p>I have a question about inserting a json formatted string into a json structure and having the final version be a combined JSON formatted string that can be serialized into a JSON structure. I am using the newtonsofts Json.NET</p> <p>I have the following JSON structure:</p> <pre><code>public class ResponseJson { ...
2
1,089
Vuetify Nuxt.js : how to add url link in image tag
<p>i am new in Nuxt.js and Vuetifiy i want to add url link in image tag. if i press image it should open other page link</p> <p><strong>my page layout</strong></p> <p><a href="https://i.stack.imgur.com/CR0MC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CR0MC.png" alt="enter image description here"...
2
1,161
What is the best way to represent characters in C?
<p>I know that a <code>char</code> is allowed to be signed or unsigned depending on the implementation. This doesn't really bother me if all I want to do is manipulate bytes. (In fact, I don't think of the <code>char</code> datatype as a character, but a byte).</p> <p>But, if I understand, string literals are <code>si...
2
1,281
ElasticSearch: Host Responding with 403 Error for a Single Website
<p>We have a production box with several sites running on it, all of them using ElasticSearch. All the sites have an http and https binding with a host, <code>www.&lt;sitename&gt;.co.za</code>, with their own ElasticSearch index, <code>&lt;sitename&gt;_index</code>. The ElasticSearch is setup as an application, <code>/...
2
1,030
Why Uncaught TypeError: Cannot read property 'length' of undefined?
<pre><code>&lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;script src="dist/localforage.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; "use strict" var value1; var $id = function(id) { return document.getElementById(id); } var certArr;...
2
1,812
Android TextView with maxwidth
<p>I have an TextView with a variable width, but maximum is 250dp. But somehow Android sets it always to maxwidth.</p> <p>With a shorter text and without maxwidth it works, but then the text is long enough that the field exceeds the screen width, it overlaps the arrow.</p> <p><img src="https://i.stack.imgur.com/1S6ba...
2
1,674
React / Redux: focus input field in componentWillReceiveProps not working
<p>I have two components. When in component A somebody clicks a button, I want to focus an input field in component B.</p> <p>I am using Redux, and in my Redux store I save <code>dataInputFocus</code>, and whenever this is set true, I re-render my component &amp; want to focus the input field. This does not work howev...
2
1,103
Serialized objects disappearing (BinaryFormatter)
<p><strong>Background</strong></p> <p>I have an object which I need to serialize in order to transfer to a high performance computing cluster for later use</p> <p>Previously, I've used the out-of-the-box binary formatter for my object which represents a statistical shape model and all worked happily</p> <p>My object...
2
4,094
How to make GET API calls that has large JSON response in Swift 5?
<p>I am trying to fetch the Covid 19 data of all countries and their states from <a href="https://disease.sh/v3/covid-19/jhucsse" rel="nofollow noreferrer">disease.sh</a>.</p> <p>I have previously fetched json data from different APIs using this method. The response in those cases were shorter compared to this.</p> <p>...
2
1,671
Insert custom classes into WYSIWIG output rendered by tinyMCE via jQuery (handling images with captions in Wordpress)
<h2>Preface / the initial problem:</h2> <p>I want users to be able to apply custom classes to images in Wordpress posts using the visual editor (i.e. the "classic editor" / tinyMCE - I can't use Gutenberg since these are are custom post types created with PODS where the block editor isn't available). These classes are...
2
1,871
Timepicker seems to crash My App on Samsung Devices With Android Version 6.0.1
<p>I am facing a very annoying situation. I am trying display an alert dialog with DatePicker and TimePicker. It works on every device except some Samsung Devices (And according to the crash reports I received, all of them are Android Version 6.0.1).</p> <p>Here is the crash report:</p> <pre class="lang-none prettypr...
2
6,229
ZF2 - How to Listen for Events and Trigger a Service because of it?
<p>Have been trying to learn how to implement Services because they get Triggered by a Listener. <a href="https://framework.zend.com/manual/2.4/en/in-depth-guide/services-and-servicemanager.html" rel="nofollow noreferrer">Have</a> <a href="https://framework.zend.com/manual/2.4/en/modules/zend.event-manager.event-manage...
2
4,372
Nuxt.js infinite-loading triggered immediately after page load
<p>I'm using Nuxt.js with <a href="https://peachscript.github.io/vue-infinite-loading/old/#!/properties" rel="nofollow noreferrer">Infinite loading</a> in order to serve more list articles as the users scrolls down the page. I've placed the infinite-loading plugin at the bottom of my list of articles (which lists, from...
2
1,366
Rust lazy_static and tokio::sync::mpsc::channel in tokio::select
<p>I started coding with rust lately and I'm loving it. I'm coding on a project where I want to &quot;wrap&quot; a C-API. In one case I have to define callbacks in Rust, which C can call. I let bindgen created the callbacks. Since the code need to run somewhat asynchronous, I'm using tokio for that.</p> <h2>What I want...
2
4,143
How to properly link object files written in Haskell?
<p>Roughly following <a href="https://idontgetoutmuch.wordpress.com/2017/01/14/calling-haskell-from-c/" rel="noreferrer">this tutorial</a>, I managed to get this toy project working. It calls a Haskell function from a C++ program.</p> <ul> <li><p><code>Foo.hs</code> </p> <pre><code>{-# LANGUAGE ForeignFunctionInterfa...
2
2,499
setting the recordsource of a subform control using VBA
<p>Boring background, I'm trying to how to implement VBA correctly with Access - on the side - to hopefully improve a very primitive Access "application" at my place of employment. Management is of the mindset, if "it" works (no matter how poorly) why try to improve "it"?</p> <p>All of that being said, a form is bein...
2
2,847
Why won't Log4Net work on Azure with Table Storage?
<p>Desperately seeking a solution to get log4net working in a Azure Worker Role. Slowly driving me c-razy.</p> <p>I've followed the steps outlined on this blog <a href="http://blog.tylerdoerksen.com/2012/04/17/logging-in-azure-part-2table-storage" rel="nofollow">http://blog.tylerdoerksen.com/2012/04/17/logging-in-azur...
2
1,351
How to include only some modules in f2py via setup.py
<p>I have a very long piece of fortran code, some parts of which I would like to expose to python. It works fine from the command line, with</p> <pre><code>f2py -m extrpsf -c extract_psf.f95 only: extract_psf psfmany : </code></pre> <p>I'm hoping to distribute this, so am trying to get it to work with numpy.distutils...
2
1,369
Unsupported lookup 'product_name' for CharField or join on the field not permitted. Django Python ORM
<blockquote> <p>When i click on the provided link it must show the products related to the particular shop but i get an error <strong>Unsupported lookup 'product_name' for CharField or join on the field not permitted.</strong></p> </blockquote> <p>Please suggest on this </p> <p>product_name is the foreign key for P...
2
1,264
Google place search markers not showing on map
<p>I'm coding a demo of how I want a future search function to work. I want to query google on an address or area and return the area bounds as well as nearby places. To do this, I am using places autocomplete, geocode, and places search. </p> <p>So far I am successfully getting predicted search queries resulting in t...
2
1,359
Google Forms redirection after submission
<p>I'm looking for a solution that when the form is submitted, under the submitted button appears a thank you message appears as oppose to it being redirected to the same web page as i currently have it now.</p> <p>I'm a novice so please provide an example, thanks.</p> <p>The relevant bit of script is: </p> <pre><co...
2
1,359
ZeroMQ Poll - Resource temporarily unavailable
<p>I am trying to run a small ZeroMQ application.<br> <strong>I am working on an Ubuntu machine</strong> with also a QT framework used in my code.<br> First of all, I create a <code>test_class</code>. This class creates a socket and a context, than establishes a connection.<br> Here is my test class :</p> <p><strong>H...
2
1,501
VBA Word Macro to Allow User to Select and Copy Text Multiple Times
<p>I am working on a VBA script with Microsoft Word that allows the user to select text that will be be copied to the clipboard so that it can exported to an Excel file. The user will make a number of selections and finally indicate he/she is done when the contents of the clipboard will be copied to a template Excel fi...
2
1,547
ContextNotActiveException in simple Faces Flow with CDI
<p>Hy all !</p> <p>I'm on a simple faces flow tutorial (<a href="http://www.mastertheboss.com/jsf/faces-flow-tutorial" rel="nofollow">Tutorial</a>) but can't solve following error:</p> <pre><code>20:43:32,085 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (default task-14) Error Rendering View[/commo...
2
4,426
How to combine multidimensional array values and key?
<p>I have this following array</p> <pre><code>array ( 1 =&gt; array ( 't' =&gt; array ( 0 =&gt; 't1', 1 =&gt; 't2', 2 =&gt; 't3', ), 'c' =&gt; array ( 0 =&gt; 'c1', 1 =&gt; 'c2', 2 =&gt; 'c3', ), 'd' =&gt; array ( 0 =&gt; 'd1', 1 =...
2
1,341
Razor custom error page ignores it's OnGet handler
<p>There is custom error page:</p> <pre><code>public sealed class ErrorModel : PageModel { public ErrorModel() { // app stops at breakpoint inside ctor } public IActionResult OnGet() { // app doesn't stop here, why? // this is for debugging purposes only return BadR...
2
1,264
SQL Server 2014 JDBC Drivers needed for IBM Maximo 7.5 / Websphere Installation
<p>Virgin post, please be gentle. :)</p> <p>First of all, I'm not even sure if this is the correct forum.</p> <p>TLDR: My mission is to set up Maximo 7.5 with IBM Websphere / Microsoft SQL Server 2014. And I need the SQL Server 2014 JDBC Drivers</p> <p>--</p> <p>As above, during the installations, Websphere / SQL ...
2
1,121
Cannot cast OneTimeEnumerable to System.Collections.Generic.List
<p>So, I'm currently working on a small client application with an MSSQL database backend. </p> <p>I've been making use of Linq to SQL, and therein <code>CompiledQuery</code>. However, when retrieving a list of objects from the database, I'm getting an <code>InvalidCastException</code> with the message:</p> <pre><cod...
2
1,750
Update Kendo Grid selected cell value with the value in a Kendo Editor
<p>I have a Kendo Grid on my project</p> <pre><code>@(Html.Kendo().Grid&lt;TekstenViewModel.Tekst&gt;() .Name("Grid") .Columns(columns =&gt; { columns.Template(@&lt;text&gt;&lt;/text&gt;).ClientTemplate("&lt;input type='checkbox' class='checkbox' /&gt;").Width(10).Title("Verwijderen...
2
2,603
Can't get model bones to animate independently in XNA
<p>I am trying to programmatically animate my character model in XNA. I started by looking at the code example here: <a href="http://create.msdn.com/en-US/education/catalog/sample/skinned_model" rel="nofollow">http://create.msdn.com/en-US/education/catalog/sample/skinned_model</a> By editing the code in this example I ...
2
1,609
Initial value of primitive data-types
<pre><code>#include &lt;iostream&gt; class MyClass { public: MyClass() : mFirst() { } int mFirst; int mSecond; }; int main() { MyClass mc; std::cout &lt;&lt; "mc.mFirst: " &lt;&lt; mc.mFirst &lt;&lt; std::endl; std::cout &lt;&lt; "mc.mSecond: " &lt;&lt; mc.mSecond &lt;&lt; st...
2
1,173
Request.Form giving extra values from Dynamic Textboxes
<p>i am working with dynamic TextBoxes and then Getting their Values in code behind file. I am creating these boxes using Javascript. my asp.net page code is </p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function () { var counter = 1; $("#addButton").cli...
2
1,117
SQLSTATE[HY093]: Invalid parameter number [string:Exception:private]
<blockquote> <p>PDOException Object ( [message:protected] => SQLSTATE[HY093]: Invalid parameter number [string:Exception:private] => [code:protected] => HY093 [file:protected] => /home/unfed/public_html/src/php/auth/login.php [line:protected] => 74 [trace:Exception:private] => Array ( [0] => Array ( [file] => /home/u...
2
1,370
Access the service layer from the controller
<p>I am using a REST web service that queries data from Apache Solr. I'm using Spring boot + data with Solr repositories. I do not know how to interconnect as service, repository, and controller layers.</p> <p><a href="https://i.stack.imgur.com/PmEJX.png" rel="nofollow noreferrer">I have the following structure</a></p...
2
1,836
NullPointerException in onCreate(), but not in onLocationChanged()
<p>I am developing an android app and find something weird about NullPointerException. The same method retrieveCampusFromXml() can run in onLocationChanged() but it throws NPE in onCreate(). Does someone know why?</p> <p>If I put it in onCreate() :</p> <pre><code>public class XXXX extends Activity { XmlResourceP...
2
2,097
Storm missing resources folder when deploying JAR topology
<p>I'm trying to deploy a topology that uses a MultiLang Bolt (written in Python):</p> <pre><code>builder.setBolt("avro-parser", new AvroBolt(), 3).shuffleGrouping("main-kafka-spout"); builder.setBolt("nlp-analyzer", new NLPBolt("/python/analyzer/audio_parser.py"), 2).shuffleGrouping("avro-parser"); </code></pre> <p>...
2
1,845
Issue when preprocessing text with Ktrain and DistilBERT
<p>Following the example notebook here:</p> <p><a href="https://github.com/amaiya/ktrain/blob/master/examples/text/20newsgroup-distilbert.ipynb" rel="nofollow noreferrer">https://github.com/amaiya/ktrain/blob/master/examples/text/20newsgroup-distilbert.ipynb</a></p> <p>At STEP 1: Preprocess Data, I run into the error...
2
1,751
Initializing cuda global variable
<pre><code> __constant__ const unsigned int *ff = (const unsigned int[]){90, 50, 100}; int main() { } </code></pre> <p>Compiling:</p> <pre><code>nvcc ./test.cu ./test.cu(1): error: identifier "__T20" is undefined in device code 1 error detected in the compilation of "/tmp/tmpxft_0000785f_00000000-10_test.cpp2.i"...
2
1,338
Issues with obfuscation in Java using ZKM
<p>Im trying to obfuscate an eclipse based java application. We are using ZKM script for Obfuscation.we recently added a new feature to the existing application where we have used the poi-3.9-20121203.jar third party jar and there are around 3 to 4 dependent jars for this. Im getting the below error when trying to obfu...
2
1,113
Google Service Account domain wide delegation set service account using JSON key file instead of p12
<p>I'm able to use a Google Service account with domain wide delegation using the .p12 key file just fine. </p> <p>I'd like to use the JSON key file instead of the p12 file, but I can't figure out how to set the service account id when using the JSON key. </p> <p>How do you set the user to impersonate using the JSON ...
2
1,523
Marshalling of a c++ struct which contains pointers to another c++ struct
<p>I have an issue concerning the correct marshalling of c++ structs into c#. These are defined as follows:</p> <pre><code>extern "C" { //Geometry forms that could be used for envelope calculation enum GeometryForms {RECTANGLE, TRIANGLE, ELLIPSE, CIRCLESECTOR}; //Structure for coordinates 3D typedef ...
2
3,154
Google Map is only showing a grey background and not the map
<p>I'm currently working on an app that uses the Google Maps API v2. But the MapView only displays a grey background, the Google logo and the zoom-buttons.</p> <p>Here are the error messages: </p> <pre><code>10-27 10:50:25.309: D/REQUEST(18335): Connection opened to:https://clients4.google.com/glm/mmap/api 10-27 10:5...
2
1,459
How do I set focus on a Picker after selecting an item from another Picker using Prism and the MVVM way?
<p><strong>Scenario</strong> Two invisible but enabled pickers. One is for org.units, the other is for the users in the selected org.unit. The first picker is focused when the user taps on an Add (plus sign) in the ToolBar. When the user chooses an org.unit I need to set focus on the other picker.</p> <p><strong>Probl...
2
1,731
ImageMagick (Magick.NET) 's Pdf to Jpg/Tiff operation gives me wrong color for CMYK to CMYK
<p><strong>Issue</strong></p> <p>When converting to Jpg/Tiff (CMYK), output images has different CMYK values for same areas from the input:</p> <ul> <li>(100)C become (76)C, (7)M, (14)Y</li> <li>(100)M become (87)M, (5)Y</li> <li>(100)Y become (85)Y</li> <li>(100)K become (72)C, (67)M, (67)Y, (88)K</li> <li>Pure white ...
2
1,579
WCF + TransactionScopeRequired + async + throw fault => ProtocolException "transaction under which method was executing was asynchronously aborted"
<p>Calling a WCF operation marked with "TransactionScopeRequired = true" on a service that uses an asynchronous host implementation (in my case using Tasks) and throws an exception asynchronously (i.e. from a continuation), always seems to result in the following exception (instead of the exception I threw) being recei...
2
1,200
How to remove Location Box of Google Maps (top left)?
<p>I'm trying to list out all of the warehouse locations from Google Maps on my website by using Google Map's iframe:</p> <pre><code>&lt;iframe src="http://maps.google.com/maps?q=118+Lamington+Rd.+–+Bateman+Student+Center,+Branchburg,+NJ+08876&amp;amp;output=embed" frameborder="0" style="border:0" allowfullscreen=""&g...
2
3,203
Python: How do we parallelize a python program to take advantage of a GPU server?
<p>In our lab, we have <strong>NVIDIA Tesla K80 GPU accelerator computing</strong> with the following characteristics: <code>Intel(R) Xeon(R) CPU E5-2670 v3 @2.30GHz, 48 CPU processors, 128GB RAM, 12 CPU cores</code>running under Linux 64-bit.</p> <p>I am running the following code which does <code>GridSearchCV</code>...
2
1,372
class constructor precedence with a variadic template constructor for a value wrapper
<p>Today I've discovered that I don't understand the C++ constructor precedence rules.</p> <p>Please, see the following template <code>struct wrapper</code></p> <pre><code>template &lt;typename T&gt; struct wrapper { T value; wrapper (T const &amp; v0) : value{v0} { std::cout &lt;&lt; "value copy construc...
2
1,210
Connection refused - Laravel, remote database
<p>In my local environment inserting data into my database works. However on my remote server it does not work.</p> <p>I have changed my remote .env and database.php files so that my remote database and server should work. I am able to connect to the database via <code>mysqlworkbench</code>, without any problems.</p> ...
2
1,096
How to test PHP socket TCP/IP Server using Terminal/PHP?
<p>I have a server up online, and I made a simple TCP/IP Server using PHP to handle a certain port. The code I use is found below:</p> <pre><code>&lt;?php error_reporting(E_ALL); /* Allow the script to wait for connections. */ set_time_limit(0); /* Activate the implicit exit dump, so we'll see what we're getting * w...
2
1,506
PHP/MySQL convert timestamp with a data type of text to usuable date format
<p>I have a page that allows users to sign up for an orientation date and time. I have created error checking to check if the email address exists in the database. If the email address does exist, I give an error message to the student saying: "You have already registered. You are registered for ("timestamp from or...
2
5,538
I can't color my OpenGL circle properly
<p>I am supposed to draw 6 different 2D shapes (dot, line, triangle, square, star, circle) and assign them each a different color. I managed to draw all of them and color them, except for my circle. The color i gave (g_colors_circle) the circle however is drawn from the center of the circle but does not reach the edges...
2
5,572
Cannot access elements in object returned by Javascript Function in AngularJS
<p>Thanks to @asgoth, I am able to use AngularJS $http service to retrieve stock prices from Yahoo as described here: <a href="https://stackoverflow.com/questions/13963192/cannot-read-response-from-angularjs-resource-jsonp-get-from-yahoo-finance">Cannot read response from AngularJS $resource JSONP get from Yahoo Finan...
2
1,130
php artisan migrate. Multiple primary key defined
<p><strong>My Problem</strong></p> <p>I'm building my first api using laravel and am getting a multiple primary key defined error while trying to run <code>php artisan migrate</code> I don't understand how I have defined multiple primary keys. Every time I run a migrate I get these errors <a href="https://i.stack.img...
2
1,320
Why Socket.AcceptAsync isn't firing SocketAsyncEventArgs Completed event?
<p>I'm developing a Server application which will receive messages and respond. Nothing really new. So, actually I'm following <a href="https://stackoverflow.com/questions/869744/how-to-write-a-scalable-tcp-ip-based-server">this answer</a> and <a href="http://www.codeproject.com/Articles/83102/C-SocketAsyncEventArgs-Hi...
2
1,848
AutoMapper - Reuse mapping via Interfaces
<p>I have a base class and a variety of derived classes that I want to use AutoMapper to map to EF entities that are in a TPH structure.</p> <p>Example, let's say I have the following simple model:</p> <pre><code>public abstract class VehicleBase { public readonly VehicleType VehicleType; public readonly int...
2
1,554
executing commands via sockets with popen()
<p>Can anybody give me a hand trying to implement the following server and client?:</p> <p>The server:</p> <pre><code>#include &lt;stdlib.h&gt; #include &lt;unistd.h&gt; #include &lt;sys/socket.h&gt; #include &lt;netinet/in.h&gt; #include &lt;stdio.h&gt; #include &lt;string.h&gt; int main(void) { int sock = sock...
2
1,201
Spring Security with OAuth2 losing session
<p>We have a Spring Boot-based Gateway using Spring Security, OAuth2 login, and Zuul routing. It is also using Spring Session to store sessions in Redis. This Gateway stores an OAuth2 token in the session and forwards the OAuth2 Bearer token to backend services.</p> <p>We have an issue where users are being signed out ...
2
2,007
Spring @Autowired of @Service classes works on Tomcat but not Resin
<p>I have a 100% working solution in Tomcat 8.0.20 packaged as a WAR using Spring restful services and spring core libraries.</p> <p>When I take the same WAR and drop it into Resin 4.0.36 (and also 4.0.43) my @Autowired @Services are not recognized whatsoever. </p> <p>This leads me to believe that there is an enviro...
2
4,659
issue while using d3 brush in a line+bar chart (zoom in line+bar chart)
<p>I am trying to use brush to zoom my custom chart in d3.js but its not behaving the way it should.Any idea what could be wrong here is js fiddle <a href="http://fiddle.jshell.net/saurabh_nitc10/od8gfsd3/9/">http://fiddle.jshell.net/saurabh_nitc10/od8gfsd3/9/</a></p> <p>like in this fiddle <a href="http://fiddle.jsh...
2
5,955
How to display progress of AVPlayer playback of audio
<p>I'm building a music app that will have a feed of posts that contain url to music files. When a cell in UITableView becomes fully visible playback of a corresponding music track starts. This is a layout I have now.</p> <p><a href="https://i.stack.imgur.com/CnMih.png" rel="nofollow noreferrer"><img src="https://i.s...
2
1,989
Status 500 Internal Server Error between droplet with nginx and google cloud storage
<p>I have a web system in a droplet with Digital Ocean, the droplet has installed nginx, the system has an option to upload files, these files are sent to a Google Cloud Storage bucket. When I am in the localhost the files are sent correctly, but already in the system, I am receiving a Status 500 Internal Server Error....
2
1,246
React Forms : How to make input data as list objects with same input name?
<p>I'm Posting input data to API's where the API's structure as array list with n objects.</p> <p>Problem: The problem I'm facing is while handling the change, i'm replacing the data instead of inserting as an another object.</p> <p>My code as follows:</p> <p>the objects in the list is dynamic not limited to two</p> <p...
2
1,347
I am getting null when I am using (DropDownList)e.Row.FindControl
<p><strong>Here is my code where it's giving the value of ddl = null:</strong></p> <pre><code>//event handler to bind the data to the row before rendering the gridview protected void gridview1_RowDataBound(object sender ,GridViewRowEventArgs e) { if ((e.Row.RowType == DataControlRowType.DataRow)&amp;&amp;(e.Row.Da...
2
2,152
Error: Uncaught [Error: Passed an incorrect argument to a color function, please pass a string representation of a color
<p>I'm having an issue with a button react component using <code>opacify</code> function from <a href="https://polished.js.org/docs/" rel="nofollow noreferrer">Polished Library</a></p> <p>I'm using styled-components for styling and a theme using <code>ThemeProvider</code> to pass the theme to be used. When I test the ...
2
1,167
Why does my custom WP_List_Table not return any results?
<p>I have built a plugin to display results a custom table I have built in my Wordpress DB, following the tutorial found on <a href="https://www.smashingmagazine.com/2011/11/native-admin-tables-wordpress/" rel="nofollow noreferrer">Smashing Magazine</a> I have built the following code:</p> <pre><code>&lt;?php /* Plugi...
2
2,974
Using glColorPointer with glDrawElements results in nothing being drawn
<p>I'm working on just making uniformly colors spheres for a project and I'm running into an issue. The spheres run fine but when I try to color them with glColorPointer they stop appearing. OpenGL isn't showing any errors when I call glGetError so I'm at a loss for why this would happen.</p> <p>The code to generate t...
2
1,423
Dynamic post posting to page wall step-by-step what I did
<p>Ok so I finally managed to successfully link dynamic news posts on my website with my page's wall as Page (not user) through PHP. Still I'm wondering if my solution is correct, or if it'll work on the long-run. Having said that here's what I did:</p> <ul> <li>Created a profile to administrate the page</li> <li>Crea...
2
1,100
Custom Icons not showing up on google maps
<p>The problem I am having is only that I cannot get the custom icons to load. The markers themselves load but just with the default icon. I can get the custom icons to load if I set the icon: type manually in the marker object like this:</p> <pre><code> var marker = new google.maps.Marker({ positio...
2
5,796
j_spring_security_check is not available
<p>I upgraded Spring Security from 2 to 3 </p> <p>Previously Security.xml has <strong>AuthenticationProcessingFilter</strong> and <strong>AuthenticationProcessingFilterEntryPoint</strong> </p> <p>So my new Security.xml is </p> <pre><code>&lt;beans:beans xmlns="http://www.springframework.org/schema/security" xml...
2
1,234
How to correctly create a app wise ViewModel with SavedStateHandle as parameter
<p>I’m declaring a ViewModel with SavedStateHandle as parameter in koin modules</p> <ol> <li>in koin modules</li> </ol> <pre class="lang-kotlin prettyprint-override"><code>viewModel { (handle: SavedStateHandle) -&gt; CacheProvider(handle) } viewModel { SomeFragmentUsedViewModel(get()) } </code></pre> <ol start="2">...
2
1,619
TreeTableView Dilemma
<p>I have a data model of :<br> Client - Name<br> Map declared in the Client object class.</p> <p>Client<br> -Title - Value<br> -Title - Value<br> -Title - Value<br> Client<br> -Title - Value<br> -Title - Value<br> -Title - Value </p> <p>As far as I'm aware the <code>TreeTableView</code> must only abide to one data...
2
2,297
Reference netstandard Nuget Package in 4.7.2 Project Mono
<p>I am trying to reference a .net standard Nuget package in my .Net 4.7.2 Project in Mono. The build works fine in Windows, however under Ubuntu 18.04, I get the following error when using an Attribute from the library.</p> <pre><code> DataClassThing.cs(7, 10): [CS0012] The type 'Attribute' is defined in an assembly...
2
1,775
libsvm output prediction probability for multi-label classification
<p>I am trying to use libsvm (with Matlab interface) to run some multi-label classification problem. Here is some toy problem using IRIS data:</p> <pre><code>load fisheriris; featuresTraining = [meas(1:30,:); meas(51:80,:); meas(101:130,:)]; featureSelectedTraining = featuresTra...
2
1,160
Animations for a dropped pin not working
<p>When I drop a pin on my mkmapview the animation works fine and the pin drops from the top of the screen as expected. I color that pin red because I haven't verified it. However, if I verify the pin using some code that is called on calloutAccessoryControlTapped I change the color of the Pin to green.</p> <p>When I...
2
3,096
Visual Studio can't show the value of std::string
<p>At the company I am working at some of us have been affected by a bug/error in Visual Studio. The debugger fails to show the value/content of std::string. It says "Error reading characters of string."</p> <p>Some pics of the issue: <a href="https://i.stack.imgur.com/vFqE3.png" rel="nofollow noreferrer">Simple strin...
2
1,592
csrf token for ajax in django2
<p>I am learning Django2,and try to make a login page with csrf_token and ajax.</p> <p>I hope that if user hasn't lgoin,that will turn to the login page and send a variable <code>next</code> as a tag of the page before login.If user login successfully that I can turn to the homepage or page marked by <code>next</code>...
2
1,395