title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Checking Internet connection in WebView
<p>Hello programmers out there!</p> <p>I'm haveing a problem with my WebView-App...</p> <p>I want to add a "Connection-check" on startup that's popping up an error when no Internet-connection is aviable or the WebView is timed out. I can't get it done by myself because I'm new in Android-programming.</p> <p>I also w...
0
1,645
Zsh doesn't autocomplete correctly my ssh command
<p>I have some problem with ssh autocompletion. I would like for my zsh to autcomplete on my .ssh/config file but until now it is only doing it with the /etc/hosts files. I've found how to not use the hosts file by adding this configuration </p> <pre><code>zstyle ':completion:*:ssh:*' hosts off </code></pre> <p>But...
0
1,648
Fastest way to convert a possibly-null-terminated ascii byte[] to a string?
<p>I need to convert a (possibly) null terminated array of ascii bytes to a string in C# and the fastest way I've found to do it is by using my UnsafeAsciiBytesToString method shown below. This method uses the String.String(sbyte*) constructor which contains a warning in it's remarks:</p> <p>"The value parameter is as...
0
1,241
AngularJS error sending form data to server with $http.put()
<p>I have the following controller:</p> <pre><code>function EditCtrl($scope,$http,$routeParams,$location) { $scope.master = {}; $scope.actviePath = null; $http.get("/employeeApp/assets/php/index.php/users/" + $routeParams.id).success(function (data) { $scope.users = data; $scope.user = { ...
0
1,520
create JSON object from another JSON object
<p>I don't know if the title is the right one for what I want to do.</p> <p>I have the following array of objects</p> <pre><code> array([0]: {category: "10", question: "101"}, [1]: {category: "10", question: "102"}, [2]: {category: "20", question:...
0
1,049
dictionary update sequence element #0 has length 15; 2 is required
<p>I am upgrading my python/django application from 1.6.5 to 1.7. I'm having trouble solving the following error: dictionary update sequence element #0 has length 15; 2 is required</p> <p>Here is the traceback output:</p> <pre><code>Request Method: GET Request URL: http://127.0.0.1:8000/dashboard/ Django Version: 1....
0
1,271
Both login and registration form on one view MVC3 Razor
<p>My task is create both login and registration form on one view!</p> <p>I have home view. On a home view I have two forms, login and register. They rendered by @Html.RenderPartial(partial view name, model). That forms relates to Account controller (Login and Register actions).</p> <p>Let me first provide you with s...
0
1,847
How to parse a BIG JSON file in python
<p>I am working with a very big dataset and I got a problem that could not find any answer for that. I am trying to parse the data from JSON and here is what I did for a piece of data from the whole dataset and works:</p> <pre><code>import json s = set() with open("data.raw", "r") as f: for line in f: ...
0
1,751
How to avoid IllegalMonitorStateException when using lockInterruptibly on Reentrantlock
<p>I want to replace a <code>syncronized</code> block with a <code>ReentrantLock</code> to support interruption of waiting for the lock. For this, I use the <code>lockInterruptibly()</code> method and the idiomatic try/finally block:</p> <pre><code>private ReentrantLock lock = new ReentrantLock(); try { lock.lockIn...
0
1,608
chart.js adjust height in mobile view
<p>I need to get chart.js to adjust the height of the chart when I switch my site to mobile view, I'm using bootstrap as my framework which is working fine.</p> <p>The issue with mobile view of the site is that the graphs are too small to interact with.</p> <p>I've tried adding attributes in var options = {} but no l...
0
1,926
Is there a better way to load a dll in C++?
<p>Right now I do something like this and it seems messy if I end having a lot of functions I want to reference in my DLL. Is there a better and cleaner way of accessing the functions without having to create a typedef for each function definition so that it will compile and load the function properly. I mean the funct...
0
1,034
Attempt to invoke virtual method in Resources res = getResources();
<p>I am trying to change the background color of an activity using a handler, but I am getting an error "Attempt to invoke virtual method".</p> <p>Here is my code</p> <pre><code>public class MainActivity extends AppCompatActivity { private EditText editTextUser, editTextPass; private RelativeLayout relativeLayoutMai...
0
1,924
Handling errors in Promise.all
<p>I have an array of Promises that I'm resolving with <code>Promise.all(arrayOfPromises);</code></p> <p>I go on to continue the promise chain. Looks something like this</p> <pre><code>existingPromiseChain = existingPromiseChain.then(function() { var arrayOfPromises = state.routes.map(function(route){ return ro...
0
1,077
How do I click an li inside a ul using Selenium Webdriver
<p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>public void testHolidayLink() { // login driver.findElement(By.id("ctl00_MCPH_MainLogin_UserNameTextBox")).sendKeys("username"); driver.findElement(By.id("ctl00_MCPH...
0
1,777
Dynamic Carousel in Laravel not working displays only one image
<p>I'm trying to create a dynamic carousel in laravel but i see only one image. I have looking for solutions from many hours but still i'm stucked</p> <p>I have tried to change my code from this solution <a href="https://stackoverflow.com/questions/56246476/dynamic-carousel-in-php-laravel-only-shows-one-image?noredire...
0
1,369
JPA Cascade Persist Error
<p>I have a One-to-Many relationship: A ProductCategory can contains many Product. This is the code:</p> <pre><code>@Entity public class Product implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private String id; @Column(name="ProductName") private String name; p...
0
1,071
How to insert row at end of table with HTMLTableElement.insertRow
<h3>Background and Setup</h3> <p>I'm trying to create a table from tabular data in javascript, but when I try inserting rows into a table element, it inserts in the opposite order from what I expect and the opposite order of what you get from using <code>appendChild</code>. (Here's <a href="http://jsfiddle.net/jtratne...
0
1,264
Paging in a Rest Collection
<p>I'm interested in exposing a direct REST interface to collections of JSON documents (think <a href="http://couchdb.apache.org/" rel="nofollow noreferrer">CouchDB</a> or <a href="http://persvr.org/" rel="nofollow noreferrer">Persevere</a>). The problem I'm running into is how to handle the <code>GET</code> operation ...
0
1,157
Rake mysql2 "unknown database" error
<p>I'm following instructions from a hand-over package from a previous group. I don't know too much about rails or mysql2. I am on Windows.</p> <p>When I do:</p> <pre><code>rake db:migrate RAILS_ENV=production </code></pre> <p>This is the output:</p> <pre><code>C:\jcccf-goslowserver-e30bf00&gt;rake db:migrate RAILS...
0
2,351
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated
<p>I have many users on my web site (20000-60000 per day), which is a download site for mobile files. I have remote access to my server (windows server 2008-R2). <br/> I've received <em>&quot;Server is unavailable&quot;</em> errors before, but I am now seeing a connection timeout error. <br/> I'm not familiar with t...
0
1,560
Why is IE9/Firefox showing a different font size in relation to other browsers?
<p>I'm programming the CSS of a site, and realized that the Internet Explorer 9 is showing different font size in relation to other browsers (Firefox, Chrome, Safari, IE7 and IE8).</p> <p>I've tried using some RESETS, and I am specifying the font in <code>px</code>, but IE9 still shows the difference in font size.</p>...
0
1,137
How to specify only particular fields using read.schema in JSON : SPARK Scala
<p>I am trying to programmatically enforce schema(json) on textFile which looks like json. I tried with jsonFile but the issue is for creating a dataframe from a list of json files, spark has to do a 1 pass through the data to create a schema for the dataframe. So it needs to parse all the data which is taking longer t...
0
1,647
PHP script to import csv data into mysql
<p>I have tried the following code but getting some errors. Here I can read the input file but I am getting the following error:Deprecated: Function split() is deprecated in C:\wamp\www\aaj2\index.php on line 63. O/P: Found a total of 5124 records in this csv file.</p> <pre><code>&lt;?php $databasehost = "localhost"; ...
0
1,078
Java - How to import external packages?
<p>I'm still relatively new to Java. I've tried searching for a solution, but I think I don't know enough Java yet to even know exactly what I should be searching for.</p> <p>I wanted to try playing around with voice recognition, so I downloaded CMU's Sphinx-4 source code and compiled it. Once I had everything working...
0
7,576
WCF RESTful web service with JSON.Net: avoid double serialization
<p>Long time lurcher, first time poster here. I've been grappling with this problem for a few days now and would appreciate any tips. I break down the issue here below.</p> <p><strong>What I'm trying to achieve:</strong><br> I want to set up a JSON WCF web service but I want to use the JSON.net serializer instead of t...
0
3,693
How can I deploy a zip file created with the maven-antrun-plugin?
<p>I'm using the maven-antrun-plugin to do a bunch of work with Ant, which ultimately results in a zip file. I'd like to deploy the zip file to our maven server (Artifactory). The maven-antrun-portion works as intended and successfully creates the zip file; however deployment fails with the following error message:</...
0
2,512
Owl Carousel - Items are stacking on top of each other
<p>I'm trying to group images into groups of 8, and use each grouping as a separate slide for Owl Carousel. However, rather than stacking horizontally like normal, the groupings are just stacked vertically.</p> <p>My owl settings:</p> <pre class="lang-js prettyprint-override"><code>//Gallery carousel gallery(); funct...
0
1,117
How can LocationMatch and ProxyPassMatch be Combined?
<p>I am setting up an Apache 2.4.6 server on an internal machine for testing purposes. One of the things that Apache server is supposed to do is act as a reverse-proxy for another server found on localhost:3030.</p> <p>The server on localhost:3030 expects one out of a few dataset names on its first path level (for now...
0
1,418
Rails console doesn't work "You may have encountered a bug"
<p>I search if the question had been already asked but I didn't find anything. I have create an application using ruby version 2.3.0 and rails version 5.0.0.1,</p> <p>When I run this commande</p> <pre><code>rails console </code></pre> <p>And I try to access db like that : </p> <pre><code>Post.all User.all </code></...
0
1,547
ANSIBLE - Json_Query - Filter result
<p>Inside my ansible playbook, I' m trying to filter a json result but for now, it doesn't work.</p> <p><strong>1/ Playbook</strong><br> <em>Below My ansible playbook to query and filter the result:</em></p> <hr> <pre><code>tasks: - name: "Query Attributes" ... ... register: query_resu...
0
1,331
iOS Simulator (11.1) that comes with Xcode 11.1 GM Seed seems to be unable to boot iOS 13.1 devices
<p>I am running Mac OS X Mojave 10.14.6. The only app I have installed is a freshly downloaded Xcode 11.1 GM Seed (11A1027). There are no prior files, projects or apps on this system, as I just wanted to start learning Swift programming.</p> <p>In Xcode, I have created a fresh project for a single view iOS app. I comp...
0
2,731
Rails 6.1, Ruby 3.0.0: tests error as they cannot load rexml
<p>I've created a new Rails 6.1 application from scratch with Ruby 3.0.0.</p> <p>I've run <code>db:create</code> and generated a single model with some string columns, followed by <code>rails db:migrate</code>.</p> <p>I ran <code>rails test</code> but got this require rexml error:</p> <pre><code>/Users/froop/.rvm/gems/...
0
2,940
gRPC C++ on Windows
<p>I have been trying for 3 days by now to find how to install and use gRPC on windows with no luck. I am using Visual Studio 2015, Win7 64-bit. To be safe, I'll write step by step of what I am doing. It might not be necessary but I am a beginner with C++ and with VS so I am not at all sure I am doing it correctly:</...
0
8,904
Python Opencv SolvePnP yields wrong translation vector
<p>I am attempting to calibrate and find the location and rotation of a single virtual camera in Blender 3d using homography. I am using Blender so that I can double check my results before I move on to the real world where that is more difficult.</p> <p>I rendered ten pictures of a chess board in various locations an...
0
1,789
Retain Checkbox values in Yii gridview pagination
<p>I have a gridview which contains a checkbox column and also uses pagination. When I check some checkboxes in the first page and navigate to the second page and check another one in the second page, the options I checked in the first page is not retained there. Is it posssible to retain the checkbox values during pag...
0
1,130
Is there a shorter way to write a border on only one side?
<p>I got borders on all the edges by doing something like:</p> <p>It is actually a mistake, but at the time of the question I believe I can draw a line only to the TOP with the following code. (Actually, lines are drawn on all edges.)</p> <pre><code>&lt;div class=&quot;border border-blue-900 border-t-1&quot;&gt;foo&lt;...
0
1,155
Changing SliverAppBar title color in Flutter application
<p>I'm using a SliverAppBar including a background Image and Title. Title text is white and I need to change the color to black on the AppBar is 'reduced' (since tabbar is white as well).</p> <p>How to do that ?</p> <pre><code>NestedScrollView( headerSliverBuilder: (BuildContext context, bool innerBoxIsScro...
0
1,087
removing RecyclerView items
<p>I have a RecyclerView which is adding items each certain period. When adding objects, if list items are more than (lets say) 500, then the first items will be removed and the new items will be added.</p> <p>If the RecyclerView cannot scroll down any more <code>!recyclerView.canScrollVertically(1);</code> then, afte...
0
2,305
Parse Error: "Trailing Garbage" while trying to parse JSON column in data frame
<p>I have a log file that look like <a href="http://pastebin.com/raw/MMPMwNZv" rel="nofollow noreferrer">this</a>. This is a text document that looks like:</p> <pre><code>Id,Date,Level,Message 35054,2016-06-17 19:29:43 +0000,INFO,&quot;{ &quot;&quot;id&quot;&quot;: -2, &quot;&quot;ipAddress&quot;&quot;: &quot;&quot...
0
1,276
Manage toolbar's navigation and back button from fragment in android
<p>All of my fragments are controlled through <code>ActionBarActivity</code> (mainActivity), inside mainActivity a <code>DrawerLayout</code> is implemented and all the child fragments are pushed through drawerLayout's list item click. The problem that I'm facing is after pushing a fragment through drawerLayout I want t...
0
2,425
plpgsql: No function matches the given name and argument types. You might need to add explicit type casts
<p>I've created a stored procedure in PostgreSQL using DBeaver. &amp; I'm trying to insert data into table by calling the procedure from DBeaver. But it's giving me an error </p> <blockquote> <p>SQL Error [42883]: ERROR: function public.proc_insert_test(integer, unknown, unknown, unknown, unknown, timestamp with tim...
0
1,299
pm2 start app.js is exiting after 15 restarts
<p>npm start will start my app just fine but when I do:</p> <pre><code>pm2 start app.js </code></pre> <p>I get:</p> <pre><code>[PM2] Spawning PM2 daemon [PM2] PM2 Successfully daemonized [PM2] Process app.js launched ┌──────────┬────┬──────┬──────┬────────┬─────────┬────────┬─────────────┬──────────┐ │ App name │ id...
0
1,230
HighCharts reading from CSV basic example
<p>Am new to highcharts and JS and am trying to plot data from a csv file (data3.csv).</p> <p>Here is the code at the moment:</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content...
0
1,535
disable css style for certain elements
<p>I used css to create a style for a menu which has links but now that style applies to all the links on the page. how can i disable that css style for some links? Here is the css code:</p> <pre><code>ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; } li { font-size: 35px; display: inline-block; ...
0
2,175
Gruntjs: How to make copy task to copy only changed files on watch
<p>So on grunt-contrib-watch plugin info page, there is an example on how to make jshint run only for changed file.</p> <pre class="lang-js prettyprint-override"><code>grunt.initConfig({ watch: { scripts: { files: ['lib/*.js'], tasks: ['jshint'], options: { nospawn: true, }, }...
0
1,358
BufferOverflowException when building application
<p>Everytime i want to run my Android application i get a error:</p> <pre><code>[2013-11-02 13:05:36 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. [2013-11-02 13:05:36 - **********] Conversion to Dalvik format failed: Unable to execute dex: java.nio.Buffe...
0
1,215
Asynchronous update to ObservableCollection items
<p>I'm new to multithreading and WPF.</p> <p>I have an <code>ObservableCollection&lt;RSSFeed&gt;</code>, at app startup items are added to this collection from UI thread. Properties of RSSFeed are bind to WPF ListView. Later, I want to update each RSSFeed asynchronously. So I'm thinking of implementing something like ...
0
1,766
add items to ArrayAdapter<String>
<p>I feel like this question has been asked a million times, and answered a million times. I've read and reviewed a dozen answers and I still can't get this to work. It seems very simple to me, but I've spent a pretty long time on it and I'm only seeing the first item of my array-adapter no matter what I do. I expec...
0
1,281
jersey servlet exception tomcat
<p>Am going nuts trying to start up a simple Jersey - Spring webapp. The error I get from Tomcat upon trying to access the web resources is:</p> <pre><code>HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. excepti...
0
1,570
android TabHost inside a LinearLayout
<p>After searching for a solution I decided to re-ask a question <a href="https://stackoverflow.com/questions/3745305/android-tabhost-inside-linearlayout">already asked here</a>.</p> <p>I have a TabHost control, and I need to put it inside other Layout (LinearLayout). I tuck the example that google gives us (<a href="...
0
3,266
Value does not fall within the expected range
<p>Error when trying to display the form designer.</p> <p><strong>See picture of the error:</strong></p> <p><img src="https://i.stack.imgur.com/gl13f.jpg" alt="enter image description here"></p> <p><strong>Code of the screen:</strong></p> <pre><code>public partial class frmCanalVenda : frmEdit { public frmCanal...
0
1,177
R: making tick marks at specified intervals on x-axis when number are large
<p>I know this seems trivial, but for some reason, I cannot figure out how to do this.</p> <p>I have made this plot</p> <p><img src="https://i.imgur.com/rZVOizm.png" alt="plot"> </p> <p>using these commands: </p> <pre><code>data1 &lt;- read.table("data_for_question.txt", sep="\t", header=TRUE) plot(data1, type="l"...
0
2,834
Creating multiple HTTP sections in Spring Security Java Config
<p>Using Spring Security XML configuration, you can define multiple HTTP elements to specify different access rules for different parts of your application. The example given in <a href="http://docs.spring.io/spring-security/site/docs/3.2.x/reference/html/security-filter-chain.html#filter-chains-with-ns">8.6 Advanced N...
0
1,261
Uncaught More context objects were passed than there are dynamic segments for the route: post
<p>I'm trying to follow <a href="http://www.youtube.com/watch?v=Ga99hMi7wfY#at=329">this basic Ember.js tutorial</a> but having no luck with the "posts" model. I have everything set up according to the demonstration, however I am getting the error: </p> <p><code>Uncaught More context objects were passed than there are...
0
1,379
checkboxlist selectedindexchanged event c# not working
<p>I've got a checkboxlist on my asp.net page. I'm populating it with countries. I've added a "SelectedIndexChanged" event that is supposed to check that if one of the selected countries is Africa, it should make a textbox visible, otherwise visible=false if it is not selected. I have changed the AutoPostback to true. ...
0
1,925
How can I add a share button on my android app
<p>I want to add a share button on my app.</p> <p>If users use the app there would be an option that they can share my app, but unfortunately it's not happening.</p> <p>Here is my code:</p> <p>MainActivity.java</p> <pre><code>package com.vvhvb.hesselfeenstra.vvheerenveenseboys; import android.content.Intent; impor...
0
5,077
Error: ValueError: The last dimension of the inputs to `Dense` should be defined. Found `None`
<p>I'm trying to build a lstm model for text classification and I'm receiving an error. This is my entire code that I've tried.</p> <p>Please let me know what's the reason behind the error and how to fix it. </p> <pre><code>input1.shape # text data integer coded (37788, 130) input2.shape # multiple category columns(o...
0
1,292
Convert String of ASCII digits to int in MIPS/Assembler
<p>Im writing some MIPS code to take a string of ASCII digits and convert the string into an integer. The string is entered by the user and can be at most 10 digits in length. My code works fine and uses the obvious method of performing looped addition after multiplying the Least Significant number in the string by a...
0
1,811
Index out of Range exception in C# when iterating through an array
<p>I have this code I'm using to create a program that takes a a range and outputs to the Console the prime numbers. I have one problem, I'm trying to iterate through the array I built so the loop should only write to the console the values that are prime using my method's return value. The problem I'm having is that I...
0
1,093
ASP.NET Core CORS WebAPI: no Access-Control-Allow-Origin header
<p>I have deployed my ASP.NET Core web API to Azure, and I can access its endpoints using Swagger or a web debugger like Fiddler. In both cases (same origin in Swagger, different origin using Fiddler from my computer), when accessing the APIs I get the expected result, with CORS enabled as follows in my <code>Startup.c...
0
2,533
How to center the title of an appbar
<p>I'm trying to center the title text in an app bar that has both a leading and trailing actions.</p> <pre><code>@override Widget build(BuildContext context) { final menuButton = new PopupMenuButton&lt;int&gt;( onSelected: (int i) {}, itemBuilder: (BuildContext ctx) {}, child: new Icon( Icons.dashb...
0
1,046
Angular JS - Having an empty array
<p>I have a form that submits data into a function called <code>ng-submit="newBirthday()</code> this pushes data - <code>$scope.bdayname, $scope.bdaydate;</code> into an array called <code>bdaes</code> </p> <p>My issue is that with all of the tutorials I have seen the array has predefined data is there a way that i...
0
1,109
Angular Unit testing : Error: Cannot match any routes. URL Segment: 'home/advisor'
<p>Am working on unit testing under my angular 4.0.0 app , some method in my real component is calling manual routing via : </p> <pre><code>method(){ .... this.navigateTo('/home/advisor'); .... } </code></pre> <p>with <strong>navigateTo</strong> is a custom routing method calling this :</p> <pre><code> public...
0
2,520
CodeIgniter: How do I fix "Trying to get property of non-object" and "Array to string conversion" errors and the reason for them to come?
<p>In 'new_payment' table and the 'new_reservation' table, each row (payment) has a res_id (PK in new_reservation and a reser, FK in new_payment, CASCADE, CASCADE). I have to fill 3 input boxes.</p> <p>Total Bill: [ ]</p> <p>Previously Paid: [ ]</p> <p>Due Amount: [ ]</p> <p>When user enters a room number ...
0
1,680
Adding bound combobox to datagridview
<p>The scenario is almost the same as <a href="http://arsalantamiz.blogspot.com/2008/09/binding-datagridview-combobox-column.html" rel="nofollow">http://arsalantamiz.blogspot.com/2008/09/binding-datagridview-combobox-column.html</a>. but I can't get it working on c#...</p> <p>I have mySql db with two tables: 1. protoc...
0
2,118
jquery-steps missing CSS file
<p>I'm using jquery-steps plugin to create a wizard in my application. I followed the instructions here: <a href="https://github.com/rstaib/jquery-steps" rel="noreferrer">https://github.com/rstaib/jquery-steps</a> I load the js files, created my markup, called the <code>.steps(settings)</code> function with the setting...
0
1,731
Entity Framework "The wait operation timed out" on simple DeleteAll
<p>We have an MVC web application that I inherited that loads, let's call it MyCategory and all of its children into a webform, takes edit, then saves on save clicked. The way the application works is to first delete all data for the parent level entity in the model, then add everything back. We have pretty low concurr...
0
1,301
Authentication is null on the SecurityContextHolder.getContext();
<p>I am trying to add Facebook authorization using Spring Security in Spring Boot app. Currently, my problem is extracting data from Principal.</p> <p>Here is my security config:</p> <pre><code>public class SecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure (HttpSecurity...
0
1,066
Null pointer error with hideSoftInputFromWindow
<p>I get a null pointer exception at this row:</p> <pre><code>public void hideKeyboard(){ InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), ...
0
2,107
StackExchange.Redis with Azure Redis is unusably slow or throws timeout errors
<p>I'm moving all of my existing Azure In-Role cache use to Redis and decided to use the Azure Redis preview along with the StackExchange.Redis library (<a href="https://github.com/StackExchange/StackExchange.Redis" rel="noreferrer">https://github.com/StackExchange/StackExchange.Redis</a>). I wrote all the code for it...
0
1,970
Simple PL/SQL to check if table exists is not working
<p>I'm in the process of converting some stored procedures from Sybase TSQL to Oracle PL/SQL and I've already come across a problem which I'm struggling to resolve!</p> <p>The below code will not run:</p> <pre><code>DECLARE t INT := 0; t_error EXCEPTION; v_line VARCHAR2(100); BEGIN SELECT COUNT(*) INTO t FROM user...
0
1,055
Bootstrap 3.3.7 hidden-lg-up not working
<p>I'm trying to design a a mobile version of a game I've been working on. Apologies for the messy code, it's nothing serious. I've decided to use a hamburger-menu for the mobile version and want to hide it on desktop devices. For this I found "hidden-lg-up" in the bootstrap documentation but it doesn't seem to be work...
0
16,187
How to place widgets into different frames in Tkinter, using OOP
<p><strong>Background</strong></p> <p>Hello everyone! I am currently working on a basic GUI text editor which can load and save text files. I want to use multiple frames for the toolbar and the textbox as I learned <a href="https://stackoverflow.com/questions/14846063/what-is-a-better-tkinter-geometry-manager-than-gri...
0
1,599
Selenium - how to get element and its subelements text
<p>Short version: I can get the chat message (using selenium's By.xpath in java) but I want to include smiles into proper places.</p> <p>Longer version: Hello, I've been tackling this interesting issue where I need to parse a chat message from the web browser and recreate it using java and selenium. I got no problem p...
0
1,261
Is "x < y < z" faster than "x < y and y < z"?
<p>From <a href="https://wiki.python.org/moin/PythonSpeed#Take_advantage_of_interpreter_optimizations" rel="nofollow noreferrer">this page</a>, we know that:</p> <blockquote> <p>Chained comparisons are faster than using the <code>and</code> operator. Write <code>x &lt; y &lt; z</code> instead of <code>x &lt; y and...
0
2,083
How to I load JSON data into Angular2 component
<p>After running through many tutorials on tinterweb I have finally started to try and build something useful to me using Angular2 and I have come across my first issue. I cannot seem to load JSON data into my service component.</p> <p>my people.json file is stored in a folder called data in the top folder.</p> <p>p...
0
2,559
WPF datagrid: converter and StringFormat
<p>I have a standard (WPF toolkit) data grid. Some of the columns (which are explicitly defined) have to be shown as percentages. Some columns have to be shown in red if the values are below 0. (The two sets of columns are not the same). I tried to implement these requirements using a <code>StringFormat</code> and ...
0
1,437
Tensorflow: Attempting to use uninitialized value beta1_power
<p>I got the following error when I try to run the code at the end of the post. But it is not clear to me what is wrong with my code. Could anybody let me know the tricks in debugging a tensorflow program?</p> <pre><code>$ ./main.py Extracting /tmp/data/train-images-idx3-ubyte.gz Extracting /tmp/data/train-labels-idx...
0
2,404
androidx.navigation.fragment.NavHostFragment is not accessible from xml file
<p>I am trying to use androidx navigation with bottom navigation view.So when i put fragment with android:name = "androidx.navigation.fragment.NavHostFragment" in xml file it gives me an error. I guess that xml doesn't see this library or this Fragment</p> <pre><code>Here is xml file : &lt;?xml version="1.0" encoding=...
0
3,375
Replacing HTML form with success message after submit, form sends mail using separate php file
<p>I have an html contact form which is built into index.html, and then I have a mail.php file that sends a mail and also uses some Javascript. When I fill in form and submit, I have coded it to send the mail and then it pops up with a success message box and then redirects back to index.html.</p> <p>What I would like...
0
1,233
ERROR: Error cloning remote repo 'origin'
<p>Tried with the configure option, not able to find the tools configuration option and the git executable section. Seems like it occurs after a successful build only. Please help.</p> <p>Here's the output I receive after building the project on the console output section:</p> <pre><code> Building in workspace C:\Us...
0
1,311
Remove white space from the sides and top of my navbar
<p>I have looked around for many solutions and I am currently redoing the code of a website I own as I had all of my CSS individually laid out on each HTML page. Eventually I had too many pages to handle, and I decided to make a stylesheet to clean it all up but my EVERYTHING was a mess. Indentation, comments, etc...</...
0
1,454
Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query and without using SET FORCEPLAN
<p>I am running following:</p> <pre><code>DECLARE @g geography; declare @point nvarchar(50) ='' declare @i int =0, @lat decimal(8,6) =0.0, @long decimal(8,6) =0.0, @start datetime = getdate() set @lat =(select (0.9 -Rand()*1.8)*100) set @long =(select (0.9 -Rand()*1.8)*100) set @point = (selec...
0
1,280
How do I split a string by strings and include the delimiters using .NET?
<p>There are many similar questions, but apparently no perfect match, that's why I'm asking.</p> <p>I'd like to split a random string (e.g. <code>123xx456yy789</code>) by a list of string delimiters (e.g. <code>xx</code>, <code>yy</code>) and include the delimiters in the result (here: <code>123</code>, <code>xx</code...
0
4,623
Vue 2 : Cannot read property id of null
<p>I'm having a list of orders, where each of them is clickable to view the orderdetails. </p> <p>I have used hours of debugging to try understanding why the id property is null at the landing page, but looks fine through the store, and api call functions. </p> <p>The best way to describe this is through code, so tak...
0
1,408
Laravel - Integrity constraint violation: 1062 Duplicate entry
<p>i have a problem when i try to create a new user in my database, if I add the users in phpmyadmin i have no problems, but when i try create users in my laravel web, the users has created with this error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '15.236.964-5' for key 'PRIMARY' I dont ha...
0
1,522
No default Instance is registered and cannot be automatically determined for type
<p>The definition of my interface is as follows:</p> <pre><code>public interface IApplicationSettings { string LoggerName { get; } string NumberOfResultsPerPage { get; } string EmailAddress { get; } string Credential { get; } } </code></pre> <p>The implementation of this interface is given below:</p> <pr...
0
1,087
What's the difference between __builtin__ and __builtins__?
<p>I was coding today and noticed something. If I open a new interpreter session (IDLE) and check what's defined with the <code>dir</code> function I get this:</p> <pre><code>$ python &gt;&gt;&gt; dir() ['__builtins__', '__doc__', '__name__', '__package__'] &gt;&gt;&gt; dir(__builtins__) ['ArithmeticError', 'Assertion...
0
1,514
Copy files over network via file share, user authentication
<p>I am building a .net C# console program to deploy file to a windows file share server (folder that is being shared). The path is :: <code>\\192.168.0.76\htdocs\public</code> </p> <p>On running I am getting the error:</p> <pre><code>[09:35:29]: [Step 1/3] Unhandled Exception: System.UnauthorizedAccessException: Acc...
0
1,240
Database design with dynamic fields: single table vs many tables - many indexes
<p>I have to choose the structure of a database that will store content types (eg. Blog articles, Pages, Documents, Invoices, Estimates, etc..) with dynamic fields: for example, the <code>Estimate</code> content type should have the fields <code>title</code>, <code>date</code> and <code>total price</code>.</p> <p>Howe...
0
1,662
display flash and error message after ajax request Laravel
<p>After a successful ajax request, I want to send a flash message to my view (For example, upon editing, I'd like to redirect the user to the homepage with $flash = "Your shop has been update" ). Within the controller, it is easy but I don't know what to do within JavaScript. Do any of you know how to figure it out? I...
0
1,866
How to pass list from view to controller
<p>I have problem when pass a list in an object from view to controller, the list is always null. How should I do this?</p> <p>My model:</p> <pre><code>public class ImageModel { public int id { get; set; } public string url { get; set; } public bool delete { get; set; } } public class SchoolImages { ...
0
1,397
Initializing Singly Linked List Java
<p>I am trying to implement an abstract data type of NumList in class NumLinkedList as a singly linked list. </p> <pre><code>public class NumLinkedList implements NumList { Node head; int nItem; private class Node { public Node next; public double value; public Node(double i, Node j) { value ...
0
1,053
Spring JPA with native query and data projection mapping the wrong columns into the projected interface
<p>I've got a bit of a bizarre problem that I can't figure out why it's happening. I'm sure I did something wrong, because this is my first time using a data projection and I've never had such problems using DTOs.</p> <p>Pretty much I have a SELECT statemen that is returning certain columns of various data types. And ...
0
1,101
how to send data from broadcast receiver to activity in android
<p>Here is what I want to do. I have created a broadcastreceiver class which detects incoming calls through callrecieve activity. Now as soon as a call comes I want to find its current time and display it through another activity. I have used intents for this. But still I am not getting the time value as required, dis...
0
1,653
Error in View : undefined columns selected
<p>Below is a subsample of my data set (only 2 rows by 215 columns). I am trying to view them on RStudio but it gives me the following error:</p> <pre><code>Error in View : undefined columns selected </code></pre> <p>Do not really know what is going on. The whole set is 7786 rows by 215 columns. Viewing it works fine...
0
4,041
DRF: Validate nested serializer data when creating, but not when updating
<p>When using writable nested serializers in DRF there is the known problem with validating eventual unique fields and preventing the updating of the parent serializer. This issue has been asked many times in questions like these:</p> <ol> <li><a href="https://stackoverflow.com/questions/38438167/unique-validation-on-...
0
1,116
Spring: How to get the "ACTUAL" / "CURRENT" locale like it works for messages?
<p>I am a bit puzzled, as I have a working system but I cannot get the actual/current locale.</p> <p>The working system is about this:</p> <p>For example from: <a href="http://www.mkyong.com/spring-mvc/spring-mvc-internationalization-example/" rel="nofollow noreferrer">http://www.mkyong.com/spring-mvc/spring-mvc-inte...
0
1,986
Firebase Crashlytics crashes not being reported to the Firebase Console in Flutter
<p>I tried to setup Firebase Crashlytics for the iOS part of the flutter app. I get the following messages in my console, but I do not see anything in the Firebase Dashboard.</p> <blockquote> <p>2019-08-23 14:31:33.648772+0530 Runner[87816:826824] flutter: Flutter error caught by Crashlytics plugin:</p> <p>2019...
0
5,366
WPF UI is not updating
<p>I have developed a simple wpf application using MVVM model and code as below.I debug the code and found that collection is updating but UI is not updating even I don't see any record in listbox.</p> <p><strong>EDIT</strong></p> <p><img src="https://i.stack.imgur.com/xQUcw.jpg" alt="enter image description here"></...
0
2,554