title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
NestJS using Environment Variable
<p>I have my environment variable in the root of the director and the following config files to import as a module.</p> <p><strong>/config/config.service.ts</strong></p> <pre><code>// NPM Packages import * as dotenv from 'dotenv'; import * as fs from 'fs'; import * as Joi from '@hapi/joi'; export type EnvConfig = Re...
0
1,103
Exception java.sql.SQLException: Incorrect string value: '\xF0\x9F\x92\xBC' for column 'Rins' at row 1 at
<pre><code>2014-05-14 08:41:02 Error in : org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1215) org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1148) org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1154) org.hiberna...
0
2,954
Android, animation, How to sliding in and out a layout from screen?
<p>In my application I need to record by camera. During recording I show some items as menu on screen. I need to slide out menu from screen when user clicks an arrow and slide it in when user touched the screen.</p> <p>I have two problem. 1) It seems my animation doesn't work. 2) when i set RelativeLayout to visible/i...
0
2,808
Flutter Navigation and the requirement for dispose() in the mean time
<p>Trying to use <a href="https://pub.dartlang.org/packages/image_picker" rel="nofollow noreferrer"><code>image_picker</code></a> in Flutter, I have the following issue:</p> <p>When navigation is supposed to pop back to Widget Nr1, I can no longer call <code>setState()</code> inside Widget Nr1. This is due to the fact...
0
4,097
How do I use axios within ExpressJS?
<p>I want to be able to use my React app to make a GET request to my server, which is suppose to prompt my server to make an GET request to an external API. I'm using axios and tried using request but both are giving me ERRTIMEOUT. The request are definitely working as I've tried on my frontend application and the re...
0
2,505
ASP.NET MVC and Login Authentication
<p>I have searched many posts here regarding custom user authentication but none have addressed all of my concerns</p> <p>I am new to ASP.NET MVC and have used traditional ASP.NET (WebForms) but don't know how build a login / authentication mechanism for a user using ASP.NET MVC.</p> <pre><code>protected void Login1_...
0
1,488
Json to Jquery DataTable
<p>I have been trying to display Json response on Jquery datatable with no success. Basically once server returns the Json response i want it to be displayed on the table.I got the Json checked and it seems to valid Json response.</p> <p>JSON Response</p> <pre><code>[ { "pk": 7, "model": "software...
0
1,709
Chart JS +ng2-charts not working on Angular+2
<p>Hello developers i have been literally the whole day trying to implement charts on my proyect , but following the official docs there is not way i could rid off this error :</p> <pre><code>ERROR in ./node_modules/ng2-charts/__ivy_ngcc__/fesm2015/ng2-charts.js 317:8-21 &quot;export 'pluginService' was not found in 'c...
0
4,333
PowerShell - If Then: cannot call a method on a null-valued expression
<p>When I run the program this function is in I get a cryptic error that doesn't make sense to me. I wasn't aware I was running a method on a null-valued expression. It occures to me that this is either a scope issue or a value is not getting set. I however have not been able to figure it out and put it out to the comm...
0
1,507
Weird "Could not dispatch event" and "No subscribers registered for event" issue
<p>I've been trying to debug this thing for hours and I really can't see the issue here.</p> <p>This is my MainActivity. The main thing to look for here is the <code>ArrayList&lt;Servico&gt;</code>, being <code>Servico</code> a custom object. I've created a simple "event" class - <code>ServicoActual</code> - that has ...
0
6,280
Failed to execute 'appendChild' on 'Node': The new child element contains the parent dropdown issue
<p>I am creating an autocomplete <code>div</code> dropdown.</p> <pre><code>a = document.createElement("DIV"); a.setAttribute("id","autocomplete-list"); a.setAttribute("class", "autocomplete-items"); /*append the DIV element as a child of the autocomplete container:*/ b = document.createElement("DIV")...
0
1,102
HTTP Basic Authentication Doesn't Seem to Work with urllib2 in python
<p>I'm trying to download a page protected with basic authentication using urllib2. I'm using python 2.7 but I also tried it on another computer with python 2.5 and encountered the exact same behavior. I followed the example given in <a href="http://www.voidspace.org.uk/python/articles/authentication.shtml">this guide<...
0
2,261
Event delegation vs direct binding when adding complex elements to a page
<p>I have some markup like this (classes are just for explication):</p> <pre><code>&lt;ol id="root" class="sortable"&gt; &lt;li&gt; &lt;header class="show-after-collapse"&gt;Top-Line Info&lt;/header&gt; &lt;section class="hide-after-collapse"&gt; &lt;ol class="sortable-connected"&gt; &lt;li&gt;...
0
1,066
Hibernate not releasing connections from connection pool
<p>I'm creating an application with Hibernate JPA and I use c3p0 for connection pooling with MySQL. I have an issue with the number of connections to the MySQL database as it hits the 152 opened connections, this is not wanted since I define in my c3p0 config file the max pool size to 20, and of course I close every en...
0
4,553
How can I pass multiple textures to a single shader?
<p>I am using freeglut, GLEW <a href="http://r3dux.org/2011/09/simple-texture-loading-with-devil-revisited/">and DevIL</a> to <a href="http://www.lighthouse3d.com/tutorials/glsl-tutorial/combine-texture-fragment/">render a textured teapot</a> using a vertex and fragment shader. This is all working fine in OpenGL 2.0 an...
0
1,032
Convert Decimal to Hex using Recursive method Java
<p>I need to make a recursive method that converts a decimal into hexadecimal. I can't use <code>Integer.toHexString</code>. EDIT:I tried this code but it doesn't work properly</p> <pre><code>public static String Hexa(String s) { String result = ""; int n = Integer.parseInt(s); int remainder = n % 16; ...
0
1,298
Positioning views in Coordinator Layout
<p>I am trying to create a screen with coordinator layout that includes: </p> <ul> <li>Toolbar </li> <li>Fragment, which will be replaced for every page using navigation API </li> <li>Bottom App bar</li> </ul> <p>However, I am struggling with positioning views in a way so the app's bottom bar doesn't overlap what in ...
0
1,863
NoCredentialsError : Unable to locate credentials - python module boto3
<p>I am running <code>django</code> in a <code>python</code> virtual environment(<code>virtualenv</code>). The <code>django</code> website is served by <code>apache2</code> from an amazon ec2 instance(ubuntu 16.04). I use <code>boto3</code> module to write to amazon s3. </p> <p>I installed <code>awscli</code> and ran...
0
1,769
JSF 2 -- Composite component with optional listener attribute on f:ajax
<p>I have a composite component that looks something like this:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:dm="http://davemaple.com/dm-taglib" xmlns:rich="http://richfaces.org/rich" xmlns:cc="http://java.sun.com...
0
2,471
Failed to execute goal maven-compiler-plugin 3.8.0 - org/codehaus/plexus/compiler/manager/NoSuchCompilerException
<p>i am using Maven 3.5.3 with JDK 1.8. When i try to compile from cmd my project with <code>mvn clean compile</code>, the console return the following errors:</p> <pre><code>[INFO] Scanning for projects... [INFO] [INFO] ------------------&lt; com.dadopay:DadopayDAOAggregator &gt;------------------ [INFO] Building Dad...
0
4,355
admob getting an ad response. ErrorCode: 0 Failed to load ad:0
<p>I have followed many answers about that error here, but my problem is not solved. Every time I run my app no ads appear and I get this error message in Logcat:</p> <blockquote> <p>"There was a problem getting an ad response. ErrorCode: 0 Failed to load ad:0"</p> </blockquote> <p>Here is my java code. What did I ...
0
2,403
How to setup Access-Control-Allow-Origin filter problematically in Spring Security 3.2
<p>I am trying to setup my Spring server with Spring Security 3.2 to be able to do an ajax login request.</p> <p>I followed the <a href="https://www.youtube.com/watch?v=qoR6lY6biO4">Spring Security 3.2</a> video and couple of posts but the issue is that I am getting </p> <pre><code> No 'Access-Control-Allow-Origin' h...
0
1,958
CQRS: Command Return Values
<p>There seems to be endless confusion about whether commands should or should not have return values. I would like to know if the confusion is simply because the participants have not stated their context or circumstances.</p> <h1>The Confusion</h1> <p>Here are examples of the confusion...</p> <ul> <li><p>Udi Dahan s...
0
1,875
How to fix 'TypeError: __init__() got an unexpected keyword argument 'sender''
<p>I am trying to create a django model instance with a django-rest-framework serializer ModelSerializer class. This is my Serializer code: </p> <pre><code>class MessageSerializer(serializers.ModelSerializer): class Meta: model = Message fields = ['sender', 'chat_room', 'content', 'sending_date'] <...
0
1,638
Application using Pooled JDBC Connections
<p>I'm working with a legacy WebLogic application that contains a web-service application and a standalone, command-line application. Both need access to a common database and I would like to try and get the command-line application use a pooled connection to the web-server's JDBC connection. (The standalone applicat...
0
1,541
Return a value from window.open
<p>We recently discovered that Chrome no longer supports window.showModalDialog which is problematic because our enterprise application uses this method.</p> <p>There is, apparently, a short term workaround that allows you to restore showModalDialog but it involves modifying the registry which is too complicated (and ...
0
1,210
HTTP status code 401 even though I’m sending credentials in the request
<p>Recently i have introduced JWT authentication to my Springboot and Angualr2 based App. In There i tried to do a POST request by passing the JWT token as below in my Angualr code</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class...
0
1,297
android.view.InflateException: Binary XML file line #9: Error inflating class <unknown>
<p>I've been looking into this issue for hours and similar errors that had solutions didn't do the trick.</p> <p>I'm reusing this XML file for multiple ListViews in different activities (which I'm assuming has something to do with it) but I do not see why it would break. The XML file represents the individual items in...
0
6,650
PHP - Calling Private Function within the Class Displaying MySQL Data
<p>I have a class Club{} that has several public functions and private functions. The three private functions I have are used to get data from my database. Here is the following code:</p> <pre><code>private function Get_Members_From_DB() { $sql = "SELECT Email, FirstName, LastName, Gen...
0
2,080
How to test state update and component rerender after async call in react
<p>I am writing an simple app where after clicking the button, async call to spotify API should be performed and when promise resolves it should update component's state. I am using react hooks to manage state in my component.</p> <p>In my tests I mocked API call.</p> <p>spotify.jsx</p> <pre><code>export default cla...
0
1,201
How is font-size not working here?
<p>Following advice in <a href="http://trevordavis.net/blog/tutorial/the-6-most-important-css-techniques-you-need-to-know/" rel="noreferrer">The 6 Most Important CSS Techniques You Need To Know</a>, I set my body's <code>font-size</code> to <code>62.5%</code>, the <code>container</code> div's <code>font-size</code> to ...
0
5,339
Project ERROR: Cannot run compiler 'g++'. Maybe you forgot to setup the environment whithin gitlab env
<p>I've a strange phenomenom happening that I don't know how to investigate. I hope someone already encountered this an can provide tips</p> <p>I'm using gitlab CI to build some Qt based projects. gitlab runner calls a script named build.sh that works just fine when I run it manually as "me" in my env dev. However ru...
0
1,240
Java RMI, Port already in use when creating registry
<p>I'm getting my feet wet in RMI for the first time after working in Java for a number of years, and I'm following <a href="http://www.eg.bucknell.edu/~cs379/DistributedSystems/rmi_tut.html" rel="nofollow noreferrer">this</a> tutorial to get the basics down. The server code below is giving me the following exception s...
0
3,159
Passing multiple variables through json_encode
<p>I'm kinda making a mess now with my code, usually I'd make a PHP-AJAX script and pass one variable back to the JS script with json_encode. This time I would like to pass a few variables with json_encode, unfortunately I don't know how to separate the value in JS.</p> <p><strong>My JS code:</strong></p> <pre><code>...
0
1,669
Oracle SQL - Strange 'ORA-00907 Missing Right Parenthesis' error
<p>I've written a query to test out a simple linear regression to get the line of best-fit between two sets of weight measures. It should hopefully return results like below, but it's throwing a strange error</p> <p><strong>'ORA-00907 Missing Right Parenthesis'</strong> </p> <p>and TOAD is pointing towards the part w...
0
1,385
UIKeyboardDidShowNotification called multiple times, and sometimes with incorrect keyboard dimensions
<p>I am trying to move a UITextView above the keyboard whenever the keyboard appears/changes. Let's say I have the English keyboard displaying and then switch directly to the Chinese keyboard (which is taller than the standard English keyboard). In this scenario my text view always appears too high (to the naked eye, i...
0
1,683
How to style angular ng-template selector
<p>I am struggling with styling <code>ng-template</code> tag.<br/> what i have tried in my .css file until now:<br> </p> <ul> <li>using #other_content as ID in my .css file</li> <li>adding a class to <code>&lt;ng-template&gt;</code></li> <li>styling all <code>&lt;td&gt;</code> tags</li> </ul> <p>It's not working and...
0
1,336
Selecting a value from <md-select> tag using Selenium Webdriver
<p>I am using Selenium Webdriver and working on automating an AngularJS Web App on Chrome. It was going pretty well until I hit a dropdown list on the app. My test keeps crashing everytime I try to select a value from it. I have been doing my research on this and I have only seen 2 solutions (both of which I have tried...
0
1,209
Scala error "value map is not a member of Double"
<p>Explanation: I accepted <a href="https://stackoverflow.com/users/1149944/gzm0">gzm0's</a> answer because it rocked!</p> <p>@Eduardo did come in with a comment suggesting:</p> <pre><code>(for(i &lt;- 10..20; j=runTest(i)) yield i -&gt; j).toMap </code></pre> <p>which also lets me run build, he just never posted an...
0
1,563
Cannot find module 'webpack/lib/rules/BasicEffectRulePlugin'
<p><strong>I want to migrate my project to server-side render to make good SEO, I bit this error for three hours when I run the app. What is the problem I see anything resolve it please how can I fix this,I deleted node_module and package.lock and restart the problem is always there</strong></p> <pre><code>E:\reactjs\d...
0
2,698
Redux-form handleSubmit: How to access store state?
<p><strong>In a redux-form <code>handleSubmit</code> function, which makes an Ajax call, some properties from the Redux state are needed in the Ajax (e.g. user ID).</strong></p> <p>This would be easy enough if I wanted to define <code>handleSubmit</code> in the form's component: Just call <code>mapStateToProps</code> ...
0
1,084
Spring Boot with Spring Data JPA gives invalid character issue for findOne(…) on Oracle database
<p>My setup : Spring boot, using spring-data-jpa, Oracle 11g. I have same setup mentioned here on url,</p> <p><a href="http://spring.io/guides/gs/accessing-data-jpa/" rel="nofollow">http://spring.io/guides/gs/accessing-data-jpa/</a></p> <p>It works for hsqldb. I want to work with Oracle. So, I created the table in Or...
0
4,449
Transparent AlertDialog has black background
<p>I have a custom <code>AlertDialog</code> style that makes the <code>AlertDialog</code> box transparent. It works fine except that when I inflate my desired transparent layout into the alert dialog window, it shows up with a black background. My goal is to have a completely transparent <code>AlertDialog</code> to wh...
0
1,754
get selected checkboxlist list items value
<pre><code>$(document).ready(function () { var values = ''; $('#MainContent_ddl input[type=checkbox]:checked').each(function () { debugger; alert('hi'); if (values.length == 0) { values = this.parent().attr('Value'); ...
0
1,398
Uncaught TypeError: Cannot read property 'type' of undefined at start of switch function
<p>I'm trying to use move my app to redux-react from pure react. I made an action and reducer for onClick but after trying to start the app in dev mode I get this error</p> <pre><code>Uncaught TypeError: Cannot read property 'type' of undefined at reducerDomMethods (manMethodsReducers.js:12) </code></pre> <p>which i...
0
2,235
How to create a Listener to Preferences changes in Preferences activity?
<p>I have Preferences activity in my app that has ListPreference so the user can choose language for the app.</p> <p>The app displays the new language just after the user close the Preferences activity.</p> <p>I want to create a listener to the ListPreference so the app will restart when the Listener is triggers (jus...
0
2,002
ESLint not reporting TypeScript compiler type checking errors
<p>Looking for help in getting the type errors, reported by the TypeScript compiler, into the output of ESLint. The library typescript-eslint (<a href="https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md" rel="noreferrer">https://github.com/typescript-eslint/...
0
1,132
dbcontext loading related entities using select(), include() and where() not working
<p>I have the following relationship between the entities. Company 1 ---* Appointments *---1 Employee</p> <p>I have the .net asp membership in a separate database. Whenever a user is created it can be assigned to companies, employees, or administrators roles.</p> <p>in the Index action of my Company Controller, I che...
0
2,339
Unknown error nginx
<p>I have two configuration files for nginx both in my sites available folder. Both of them are listening on the same port (80), however I can not restart Nginx, I believe there's an error. When I tried to reload Nginx, I received this error:</p> <p><code>nginx: [emerg] duplicate listen options for [::]:80 in /etc/ngi...
0
2,677
Sending packets to 255.255.255.255 by Java DatagramSocket fails
<p>I'm programming a networking program in java , and I want to send some Packets to 255.255.255.255, but it fails , even when I send them to 192.168.1.255, which according to the output of ifconfig command , is the broadcast address. But when I send them to my mate's IP it works fine. </p> <p>Here's the code to my pr...
0
1,943
Entity Framework Core: How to solve Introducing FOREIGN KEY constraint may cause cycles or multiple cascade paths
<p>I'm using Entity Framework Core with Code First approach but recieve following error when updating the database:</p> <blockquote> <p>Introducing FOREIGN KEY constraint 'FK_AnEventUsers_Users_UserId' on table 'AnEventUsers' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACT...
0
1,245
Testing that custom Spring Boot AutoConfiguration is valid
<p>I've decided to write quite a trivial test to check that my Spring Boot auto-configuration works - all the needed beans are created along with their dependencies.</p> <p>AutoConfiguration is:</p> <pre><code>package org.project.module.autoconfigure; import org.project.module.SomeFactory; import org.project.module....
0
4,780
Trying to get selenium working in rails 3 - "WebMock::NetConnectNotAllowedError"
<p>I'm trying to use selenium for the first time in a rails 3 app. (I've used it before with rails 2). I'm in an rvm which of course has its own gemset. </p> <p>I first ran a task with capybara, without selenium:</p> <pre><code>#./spec/requests/homepage_spec.rb require 'spec_helper' describe 'home page', :type =&g...
0
3,398
Showing progress bar while loading a List
<p>Ok Now i admit that i am new to using progress bar infact i never use it but now i need to use it I have an activity (Main) and a menu which can start 6 new activity. From these activities there is an activity which load the data in a ListView it take 3-4 second to load .This activity parse the json and pass the da...
0
1,836
How to use JQuery selectors from dynamic Elements created from.Append function?
<p>I have this loop creating several divs with elements in it. I want to be able to attach a click event to every link with the "linky" class, and this link would read the contentID attribute.</p> <p>I've searching forever, find cases to use selectors in dynamic created elements but just can't apply to my case. Any ti...
0
1,528
Uncaught ReferenceError : Invalid left-hand side in assignment
<p>I'm trying to make a survey, and with each click, assign a variable a certain phrase. Then display it in the <code>div</code> when I click <code> span#display </code>. I get the "Uncaught ReferenceError: Invalid left-hand side in assignment" when I run this code:</p> <pre><code>var a = "none chosen"; function compa...
0
1,103
gstreamer appsrc test application
<p>I am trying to learn gstreamer appsrc plugin to play AV from a transport stream demultiplexer that I wrote (I know plugins are already available, I wanted to do it myself to learn). I have extracted audio and video elementary streams from the MPEG transport stream; now I have to push it to the appsrc plugin and play...
0
2,721
Angular 4 show popup onclick by other component
<p>i'm struggling about this problem and can't figure out. I simply need to show a popup div situated in the page clicking from a menu entry in my navbar.component. </p> <p>I added a property "show" in my popup which prints the "show" class on my div using the ngClass (with if) directive. I can get this working if the...
0
1,187
Add and show list product in cart codeigniter
<p>I have a problem when I add some products to cart, but then when I want to fetch contents of the cart I find it is empty.</p> <p>this is my controller : </p> <pre><code>public function add_to_cart(){ $insert_data = array( 'id' =&gt; $this-&gt;input-&gt;post('id'), 'name' =&gt; $this-&gt;input-&gt;p...
0
1,930
How to extract a specific section of an image using OpenCV in Python?
<p>I am trying to extract a portion of an image by performing Canny edge detection. I have succesfully created a mask of that object. But when I perform a <code>bitwise_and</code> operation with the original image, to extract the foreground section, I am getting the following error .</p> <pre><code>OpenCV Error: Asser...
0
1,393
Using TinyMCE in a Modal Dialog
<p>I am trying to use a jquery modal dialog class found at <a href="http://www.jqueryscript.net/demo/jQuery-Modal-Dialog-Plugin-For-Bootstrap-3-Bootstrap-3-Dialog/examples/" rel="noreferrer">http://www.jqueryscript.net/demo/jQuery-Modal-Dialog-Plugin-For-Bootstrap-3-Bootstrap-3-Dialog/examples/</a> and so far it is wor...
0
1,745
Installing numpy for Windows 10: Importing the multiarray numpy extension module failed
<p>I am new to <code>Python</code> and am attempting unsuccessfully to install <code>numpy</code>. The current problem is an error message reading, in part, <code>Importing the multiarray numpy extension module failed</code>. I cannot locate this error message on the internet and am asking for help. The complete err...
0
1,672
Linux: How to debug a SIGSEGV? How do I trace the error source?
<p>My firefox started crashing since today. I haven't changed anything on the system or on firefox config.</p> <p>I use<br> <strong><code>strace -ff -o dumpfile.txt firefox</code></strong><br> to trace the problem. It's not a big help.</p> <p>I see the segfault, in two of the generated process dumps, but how I can <s...
0
2,086
Missing operation for soapAction "" and body element "" with soap version 1.1 BW6
<p>I'm invoking Soap service via invoke activity with a reference binding, in the binding tab I'm using soapui Mock parameters (host, port : in the http client and URI), when debugging I'm facing this error :</p> <pre><code>[Fatal Error] :1:1: Content is not allowed in prolog. 11:15:58.805 ERROR [bwEngThread:In-Mem...
0
1,381
ERROR: Invalid value of sonar.sources
<p>Trying to running sonartest but it's getting failed saying :</p> <p>My jenkins console output:</p> <pre><code>Started by user Badal Singh Building on master in workspace C:\Program Files (x86)\Jenkins\workspace\DownStream-UpStream\SonaTest &gt; C:\Program Files (x86)\Git\bin\git.exe rev-parse --is-inside-work-tre...
0
1,225
Android FATAL EXCEPTION MAIN: java.lang.RuntimeException: Unable to start activity ComponentInfo
<p>This is my first project in Android, that means that I am newbie at programming it. I know here on forum is a lot of pages describing solution for my problem, but now I lost 2 days in still don't get the solution. Please help me!</p> <p>First of all my errors:</p> <pre><code>01-02 11:08:27.314: D/AndroidRuntime(1045...
0
4,171
NullPointerException: Attempt to invoke virtual method AlertDialog.setTitle(java.lang.CharSequence) on a null object reference
<p><strong>Here is the error:</strong></p> <blockquote> <p>04-01 10:37:47.077 2310-2326/zonup.asyc D/Create ResponseοΉ• {"success":"false","msg":"Please enter email!!!"} 04-01 10:37:47.084<br> 2310-2310/zonup.asyc D/AndroidRuntimeοΉ• Shutting down VM 04-01 10:37:47.084 2310-2310/zonup.asyc E/AndroidRuntimeοΉ• ...
0
2,007
"Undefined name 'context'. Try correcting the name to one that is defined, or defining the name." Flutter
<p>This is a snippet of my widgets.dart file where I defined a widget called see_all_cards and its only purpose is to show an extended list of all cards that I was initially displaying. It should just <strong>redirect to Trending.dart</strong>. That's my main goal here.</p> <pre><code>Widget see_all_cards(){ return ...
0
1,172
How to get text in a CATextLayer to be clear
<p>I've made a <code>CALayer</code> with an added <code>CATextLayer</code> and the text comes out blurry. In the docs, they talk about "sub-pixel antialiasing", but that doesn't mean much to me. Anyone have a code snippet that makes a <code>CATextLayer</code> with a bit of text that is clear?</p> <p>Here's the text ...
0
1,264
How to specify a particular JAXB implementation?
<p>It seems as though I have already done this once in the past, but I cannot find any reference to what I had done to get it to work.</p> <p>I have a web application in which I want to specify a different JAXB implementation than the one provided by my web server/jre. I downloaded the appropriate artifact from maven...
0
1,870
How to handle Parallel Execution C# for Database connection
<p>I have following code which will fire query on each database in SQL SERVER 2008R2,</p> <pre><code>public DataTable GetResultsOfAllDB(string query) { SqlConnection con = new SqlConnection(_ConnectionString); string locleQuery = "select name from [master].sys.sysdatabases"; ...
0
1,172
Possible reasons for NoClassDefFoundError
<p>I'm getting the following <code>NoClassDefFoundError</code>, which is weird because the class is already present in the library jar.</p> <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: abc/test/Test.java at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoa...
0
1,328
Cell Formatting In DataGridView On DataBindingComplete
<p>I am having problems with a requirement on one of my projects at work. What I am doing is binding a datatable to a DataGridView(DGV)'s datasource. I then loop through the DataGridView and check if the cell as either 1 * or 2 ** in its value and format those cells with a tooltip and a red background. If I use a bu...
0
3,996
A simple socket app in Android needs some special permissions to connect through the internet?
<p>A simple socket app in Android needs some special permissions to connect through the internet?</p> <p>Whats wrong with my code? It always get Exceptions when it tryes to connect to input text IP, or HOST.</p> <pre><code>package What.HTTPServer; import java.io.BufferedReader; import java.io.IOException; import jav...
0
1,950
Spark fail when running pi.py example with yarn-client mode
<p>I can successfully run the java version of pi example as follows. </p> <pre><code>./bin/spark-submit --class org.apache.spark.examples.SparkPi \ --master yarn-client \ --num-executors 3 \ --driver-memory 4g \ --executor-memory 2g \ --executor-cores 1 \ --queue thequeue \ lib/spark...
0
4,872
How to deserialize byte[] into generic object to be cast at method call
<p>I am working on an object encryption class. I have everything worked out but I want to be able to encrypt/decrypt any object type with one deserialize method. As of now the only thing holding me up is the deserialize method. I have the function returning type(object) in the hopes of returning a weak typed object. It...
0
1,327
Undefined Reference issues using Semaphores
<p>I am playing around with using Semaphores, but I keep encountering Undefined Reference warnings, thus causing my code not to work. I pulled example code from a text, but was having issues with some of their syntax, so I went to POSIX's semaphore tutorial and changed things around to their syntax and as a result am n...
0
1,111
Pandas Concat Giving "InvalidIndexError: Reindexing only valid with uniquely valued Index objects" Error
<p>I have two different dfs that I want to combine using:</p> <pre><code>pd.concat([df1, df2], 1) </code></pre> <p>The end result being a df with the date as the index and all of the cols.</p> <p><a href="http://pandas.pydata.org/pandas-docs/stable/merging.html#set-logic-on-the-other-axes" rel="nofollow noreferrer">...
0
1,154
How to resize the Morris Charts?
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>// Left Sidebar Toggle Menu JS $("#menu-toggle").click(function(e) { e.preventDefault(); $("#wrapper").toggleClass("toggled"); $(window).trigger(...
0
1,550
How can I mock a private property in a class I'm trying to test in jest
<p>I have a class method I want to test:</p> <pre><code>setStepResolution(resolution: stepResolution): void { switch (resolution) { case stepResolution.FULL_SETUP: this.stepperMotors.left.ms1Pin.digitalWrite(0) this.stepperMotors.left.ms2Pin.digitalWrite(0) ...
0
2,748
HTML email in outlook
<p>I'm making a template for email in html, it works fine in apple email clients, gmail, hotmail and windows mail 2006. It does not work in outlook, it stretches out, the font family is not working and because it stretches out it does not center on the page.</p> <p>This is my code;</p> <pre><code>&lt;!DOCTYPE html PU...
0
4,136
Flask: TypeError: 'int' object is not callable
<p>I'm new to Python and just learning it as I work on this project, and this issue is really confusing me. Here's my code:</p> <pre><code>from flask import Flask from datetime import datetime # Setup app app = Flask(__name__) # Initialize data dict data = {} # Pretty-formats a time difference def formatdifference(...
0
1,045
ElasticSearch Out Of Memory
<p>I have a blog (30 small articles) based on Symfony2.6 and running on a little Ubuntu14.04 VPS (4GB memory, 50GB disk space). I use ElasticSearch throw the FOS ElasticaBundle in order to allow users/readers to look for articles on this blog (by keywords and categories, that's it).</p> <p>Everything was going well fo...
0
4,286
error: request for member ... which is of non-class type
<p>I realize the error is coming from using vectors in a custom class, but I have been struggling how to fix them. How do I call vector methods when its part of the class object?</p> <p>These are the errors I am getting:</p> <pre><code>Word.cpp: In member function β€˜void Word::addPosition(int)’: Word.cpp:20: error: re...
0
1,438
Tkinter managing my event loops alongside my mainloop
<p>I've been slowly learning Tkinter and object-oriented programming but I've programmed myself into a corner with this one. please forgive my lack of critical thinking on this one, but i've asked everyone I know who knows python better than me and we can't get to a working solution here.</p> <p>I've got a gui app im ...
0
1,365
Tried To register two Views with the same name RTCVideoView in React Native
<p><a href="https://i.stack.imgur.com/un7Mx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/un7Mx.jpg" alt="enter image description here"></a></p> <p>I am trying to run my app on Android but I am getting this error I don't know why I am getting this, I don't know what is causing this error in my pro...
0
1,075
File upload using Asp.Net Core Web API file is always null
<p>I am implememting file upload using Angular 2 with ASP.NET core Web API to handle the request.</p> <p>My html code looks like :</p> <pre><code>&lt;input #fileInput type="file"/&gt; &lt;button (click)="addFile()"&gt;Add&lt;/button&gt; </code></pre> <p>and the angular2 code </p> <pre><code>addFile(): void { le...
0
1,288
scipy.optimize.fmin_l_bfgs_b returns 'ABNORMAL_TERMINATION_IN_LNSRCH'
<p>I am using scipy.optimize.fmin_l_bfgs_b to solve a gaussian mixture problem. The means of mixture distributions are modeled by regressions whose weights have to be optimized using EM algorithm.</p> <pre><code>sigma_sp_new, func_val, info_dict = fmin_l_bfgs_b(func_to_minimize, self.sigma_vector[si][pj], ...
0
1,344
jQuery media queries: Conditional function on certain device width (working on resize as well)
<p>I have a fluid grid layout. I need some of the columns (less necessary - like Twitter updates) to be "HIDDEN" on smaller resolutions and "SHOWN" on click to its heading.</p> <p>Here's what I have so far:</p> <p><strong>HTML</strong></p> <pre><code>&lt;div id="wrapper"&gt; &lt;div class="toggle"&gt; ...
0
1,035
How to add header names to the first column
<p>I have 2 txt file. first one have data and other one have variable name. I loaded data into R and Now I want add column names to the data frame which specified in <code>variable_names.txt</code> file. How can I do that.</p> <p>My steps :</p> <pre><code>mydata &lt;- read.table("wine.txt") # Read data mydata stru...
0
1,147
Vertically aligning a table in a page (ASP.NET)
<p>I have an iFrame which has it's source set to another aspx page.</p> <p>The child aspx page is simple, it just has a table with two rows and two columns (two labels and two controls inside the table).</p> <p>Problem is centering. The iFrame's height is 425 px. The table (in the child aspx page) is not that tall. I...
0
1,341
How to get ID from the GridView in GridView_RowDeleting event using C#?
<p>I want to delete one particular row in Gridview. So I need ID, How can I get the ID of the row in GridView_RowDeleting Event?</p> <p>Here is the column list of the GridView,</p> <pre><code>&lt;Columns&gt; &lt;asp:TemplateField HeaderText="S.No." ControlStyle-Width="100%" ItemStyle-Width="30px"&gt; &lt;ItemTe...
0
1,200
incompatible character encodings: ASCII-8BIT and UTF-8
<p>I use Ruby 1.9.2 and Rails 3.0.5</p> <p>I have the following error:</p> <blockquote> <p>incompatible character encodings: ASCII-8BIT and UTF-8</p> </blockquote> <p>It has nothing to do with the database i think.</p> <p>The error is happinging on this line in a view (just a div haml call):</p> <pre><code>#cont...
0
5,163
How can I use Nhibernate to retrieve data when the "WHERE IN()" have thousands of values? (too many parameters in the sql)
<p><strong>The problem</strong>: Nhibernate parses each value in the "WHERE IN()" sql as parameters and MS SQL server doesn't support enough parameters (over 2000).</p> <p>I am using Nhibernate with Linq to retrive my data from the SQL server and I need to load alot of entities based on already known ID's.</p> <p>My ...
0
1,142
Does GridSearchCV store all the scores for all parameter combinations?
<p>The GridSearchCV use 'scoring' to select best estimator. After train the GridSearchCV, I would like to see the score for each combination. Does GridSearchCV store all scores for each parameter combinations? If it does how to get the scores? Thanks.</p> <p>Here is an example code that I used in another post. </p> <...
0
1,041
Fixed height and width for bootstrap carousel
<p>I am using the bootstrap carousel but I want a fixed width and height so that all my images will auto fit to the defined height and width. Can someone please help me on achieving this.</p> <pre><code>&lt;div class="row"&gt; &lt;div class="span8"&gt; &lt;div id="myCarousel" class="carousel slide"&gt; ...
0
1,274
Dart/Flutter Web unit testing errors: Error: Not found: 'dart:html'
<p>I'm working on a Flutter web app and I'm having trouble running a test.</p> <pre><code>Flutter 1.7.8+hotfix.4 β€’ channel stable β€’ git@github.com:flutter/flutter.git Framework β€’ revision 20e59316b8 (9 weeks ago) β€’ 2019-07-18 20:04:33 -0700 Engine β€’ revision fee001c93f Tools β€’ Dart 2.4.0 </code></pre> <p>This is the ...
0
4,456
How to acess locally installed Oracle 11 g throught PL/SQL Developer 9
<p>I need to develop in PL SQL using PL/SQL developer but I don't have idea how to make both oracle 11g and pl/sql developer work in the same machine because pl/sql developer need 32 bit oracle client installed when oracle did not require client when we work in local machine. This is what I did:</p> <p>1) I installed...
0
1,991
Throwing ResourceAccessException vs HttpClientErrorException for RestTemplate client in Spring
<p>Using Spring 4.3.1 on Apache Tomcat 8.5, We have implemented a REST server that handles GET, POST &amp; PUT requests. The POST request is handled in the form:</p> <pre><code>@POST @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) @Transactional public Response postMethod(final MyDomain object) { ...
0
3,708
IndexOutOfBoundsException: Index: 7, Size: 7
<p>I am trying to figure out why I get this error. My code is as follows:</p> <pre><code> ArrayList lowestQuant = new ArrayList(); for (int i = 0; i &lt; aRes1.size(); i++) { int var = Math.min(casesQuant.get(i), mainboardQuant.get(i)); int var2 = Math.min(var, cpuQuant.get(i)); int var3 = ...
0
1,194