title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Adding Subroot elements in XML
<p>I'm making an XML Document which contains subroot nodes. I'm using <code>XmlDocument</code> and adding the child nodes.</p> <p>This is my code:</p> <pre><code> XmlDocument doc = new XmlDocument(); XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", null, null); doc.AppendChild(dec); XmlElement root = doc....
2
2,633
Unexpected end of Stream, the content may have already been read by another component
<p>I have some weird problem which happens to only 1 user of let's say 50. AFAIK He's using Chrome</p> <p>When he uploads file there's <code>Unexpected end of Stream, the content may have already been read by another component.</code> being thrown</p> <p>Here's my endpoint:</p> <pre><code>[HttpPost] public async Tas...
2
1,945
DiffUtil issues : old and new list are the same
<p>Context :<br> <code>MainActivity</code> launches, create a list of <code>ItemObject</code>, and call <code>ListFragment</code>. When the user clicks on <code>button</code> (which is in <code>MainActivity</code>), it modify the list, then call the <code>listFragment</code> to update it.</p> <p>Issues found :<br> In ...
2
3,996
Using Plotly in shinydashboard, buttons too large to see plot
<p>I'm using Plotly's tutorial for shiny in my shinydashboard app (<a href="https://plot.ly/r/shiny-tutorial/" rel="nofollow noreferrer">https://plot.ly/r/shiny-tutorial/</a>).</p> <p>For some reason, whenever I run the app and go to the Plotly tab, if I try to interact with the plot the buttons usually located on the...
2
8,740
CodeIgniter/PHP/GD2 Image Manipulation is playing up
<p>I have a website going that takes a user's uploaded image, and makes three copies - a 'full' copy to print with (downsized to 1500x1125), a 'web' copy to display online (not coded yet), and finally a thumbnail.</p> <p>So here's the code - _imageformat() is passed the parameters (which I've confirmed to be correct) ...
2
1,159
Xamarin.Forms (IOS) build list view items dynamically (ObservableCollection and Task.Factory)
<p>Directly to the point. My list view looks like the following xaml (Not 100% the same but should be detailed enough)</p> <pre><code>&lt;ListView ItemsSource="{Binding Result}" SelectedItem="{Binding Selected}" HasUnevenRows="True"&gt;My content...&lt;/ListView&gt; ...
2
2,062
The value to the property that is set in the spring bean is getting null when using
<p>This is my beans.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.o...
2
1,895
Linux C Serial Program Freezes
<p>I'm working on a small Linux server (Ubuntu Server 13.04 running on a Beagleboard xM ARM computer) that will be communicating between a laptop wirelessly and an Arduino. The issue I seem to be having is regarding the communication between the Arduino and the Beagleboard. The program will run just fine for a certai...
2
1,320
android - How to show multi words page tile of ViewPager using IconPagerAdapter without getting second word being hidden?
<p>How can I show a page title with more than one word without getting the second one being hidden ?</p> <p>Here is the explanation:</p> <p><img src="https://i.stack.imgur.com/wn33C.png" alt="enter image description here"></p> <p><strong>The blue tab title is a normal title with one word. The red title label contain...
2
1,048
Error: The function either returned None or ended without a return statement. but not found where?
<p>I am trying to update my database data based on data submitted from the form a user fills out, but I am receiving this <strong>error</strong>:</p> <blockquote> <p>[TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement.]</p> </blockquote...
2
3,619
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY
<p>I am trying to parse the incoming Json (given below) to Java object using Gson. The Json request seems to be a valid one, but I am getting the following exception while parsing it.</p> <pre><code>com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 5 co...
2
1,150
Null reference on Cache class issue
<p>I have code as following inside of method:</p> <pre><code>var currency = new Dictionary&lt;string, List&lt;Currency&gt;&gt;(); if (Cache["Currency"] == null) { //here I fill currency with data and then set it to Cache. Cache["Currency"] = currency ; } else { var currency = Cache["Currency"] as Diction...
2
2,333
Strange characters reading PDF with iTextSharp
<p>I'm using iTextSharp to read a PDF file. I try to read the full text in the first page with this simple code:</p> <pre><code>var pdfReader = new PdfReader("&lt;fileName&gt;"); var pageText = PdfTextExtractor.GetTextFromPage(pdfReader, 1, new SimpleTextExtractionStrategy()); </code></pre> <p>It returns a string lik...
2
1,163
CakePHP find() and related models and conditions
<p>I am calling find() on my Game model in order to get the reviews of that game for a particular platform. The problem is that the find() call doesn't seem to be paying attention to my conditions array. The call returns all the reviews for a game regardless of the platform_id.</p> <p>I have these model associations:<...
2
2,090
Application crash after taking a photo
<p>I am using this code to create a simple camera apps. I can take a photo. However, the application crash after taking the photo. </p> <pre><code>{ Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); File imageFile = new File(Environment.getExternalStorag...
2
1,695
Custom action bar
<p>I created a layout for a custom action bar:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/contacts_action_bar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="ho...
2
2,743
Customising the search algorithm of Elasticsearch
<p><em>I originally tried posting a similar post to the elasticsearch mailing list (<a href="https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch/BZLFJSEpl78" rel="nofollow">https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch/BZLFJSEpl78</a>) but didn't get any helpful responses so I though I...
2
1,076
why does menu option does not appear
<p>i tried to make an independent code to check if menu will appear and it appeared on other programs but in this code, it does not appear, what could be the problem?</p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); dp = new Panel(this); dp.s...
2
3,748
Timer example using timer.Reset() not working as described
<p>I've been working with examples trying to get my first "go routine" running and while I got it running, it won't work as prescribed by the go documentation with the timer.Reset() function.</p> <p>In my case I believe that the way I am doing it is just fine because I don't actually care what's in the chan buffer, if...
2
1,556
sequence item 0: expected str instance, bytes found
<p>This question has been asked before but I am not getting where I went wrong. basically I have one many to many table. and am executing complex query on that so I have written views.pay like this</p> <pre><code>def flightBooking(request): if request.method=='POST': form= SearchForm(request.POST) ...
2
1,294
Tomcat 6 customized Realm
<p>I'm trying to write my own Realm to authenticate my users. I have written a class extending org.apache.catalina.realm.RealmBase, compiled to a .jar file and put it in the /lib library. Then I added this to server.xml:</p> <pre><code>&lt;Realm className="wstest.tomcat.security.MyRealm" resourceName="myr...
2
1,126
Notice: Undefined index: qty in.. on line 165
<p>this error appears</p> <blockquote> <p><b>Notice</b>: Undefined index: qty in <b>C:\xampp\htdocs\ecommerce\cart.php</b> on line <b>165</b></p> </blockquote> <p>and also when i press update the cart just refreshes. its when i'm updating cart and pressing remove button and press the update the product is not remo...
2
3,525
PHP File Download stops
<p>I am writing a basic license-validated PHP download script. The target file is about 50MB, and it works for some. Others can't finish it, sometimes retrying it works.</p> <p>Here is the script: </p> <pre><code>$method = $_GET['method']; if($method == "webdownload") { $airlineid = $_GET['airline']; ...
2
1,144
ExoPlayer doesn't play video
<p>I've done the next implementation of ExoPlayer for playing HLS:</p> <pre><code>SimpleExoPlayer player; player = ExoPlayerFactory.newSimpleInstance(mContext, trackSelector, loadControl); Handler mHandler = new Handler(); String userAgent = Util.getUserAgent(mContext, "appNam...
2
1,116
Google Scripts Returning Undefined
<p>My goal is to create a portal where I can accept file uploads to a folder named after the person submitting, then log their name to a spreadsheet.</p> <p>The function “uploadFiles()” uploads and organizes the uploads in a new file just fine. However when I run the function “saveToSpreadsheet()” it publishes an “und...
2
1,425
Linear pass over an array has me stumped
<p>Hi I'm trying to do a single linear pass over two arrays, here is my problem: I have it working with the commented code but it's not correct. I've tried to solve this problem for a whole night before asking for help - here is what I've tried:</p> <pre><code>////////////////////////////// PROBLEM STATEMENT /////////...
2
1,185
Exception while getting data from Service Now using Rest API (Table API)
<p>I am using ServiceNow Table API - JAVA to fetch data (GET request). I am following the example provided in the below service now wiki link:</p> <p>URL: <a href="http://wiki.servicenow.com/index.php?title=Table_API_Java_Examples#gsc.tab=0" rel="nofollow noreferrer">http://wiki.servicenow.com/index.php?title=Table_AP...
2
6,789
Bing Maps / JavaScript - trying to open InfoBox with the PushPin click event
<p>I am experimenting with the sample code on the Bing SDK site but am unable to get the click event to work with the pushpins I am adding in a JS .each loop that pulls in longitude, latitude coordinates from a sql server. I can get the push pins to display fine, I can get the InfoBoxes to display fine if I set their v...
2
1,068
Deploying an NGINX Ingress Controller on AWS
<p>I have tried to deploy an nginx-ingress controller on AWS using this guide:</p> <pre><code>https://github.com/kubernetes/ingress-nginx/blob/master/deploy/README.md </code></pre> <p>Everything seems to be working fine until this step:</p> <pre><code>kubectl patch deployment -n ingress-nginx nginx-ingress-controlle...
2
2,874
Is there a way to call a function in a parent class in java?
<p>I'm making a base class for my androids screen, it is has a list control. Is there a way for when the base class's onListItemClick gets called, saying a list item was selected. It could call a function in the parent class??</p> <p>Code:</p> <pre><code>public class cHome extends cBase { String[] MyItems={ ...
2
1,282
How to put Transparent HTML form on the top of sliding image in background using Angular JS
<p>I have created HTML Page which I will be make dynamic using Spring MVC. I am new to HTML, CSS,JS as well but I need to create banner images which will slide with certain internal. </p> <p><strong>I need to do following things:</strong></p> <ol> <li>Bannner Image shoule slide with certain interval.</li> <li>I need...
2
2,134
PowerShell - Calling and Executing a Function with param from another Script file
<p>I am having trouble getting a Script to load and execute a function from another file. Right now the Function is using a "dummy" string variable which is given a value in the main script (so the param in the function itself is just a empty placeholder string that is given value in the main script. Thanks in advance!...
2
1,352
Effective way of calculating Correlation/Covariance Matrix row-wise
<p>I have around 3000 files. Each file has a around 55000 rows/identifier and around ~100 columns. I need to calculate row-wise correlation or weighted covariance for each file (depending upon the number of columns in the file). The number of rows are same in all the files. I would like to know what is the most effecti...
2
1,266
Spark cannot find given python environment
<p>I'm trying to submit a spark application to a remote hadoop cluster. I'm following article <a href="https://community.hortonworks.com/articles/58418/running-pyspark-with-conda-env.html" rel="nofollow noreferrer">here</a>.</p> <p>Here how I submit job:</p> <pre><code>PYSPARK_PYTHON=./PY_ENV/prod_env3/bin/python /ho...
2
3,022
selenium python dynamic dropdown menu
<p>I want to fill form from a website automatically, everything goes well until I need to choose an option from dynamic dropdown menu.</p> <pre><code>&lt;div id="field_type_group" class="field trigger-option group0" style=""&gt; &lt;div class="label"&gt;&lt;label&gt;Input Type&lt;/label&gt;&lt;/div&gt; &lt;div cla...
2
1,428
Iterating and processing JSON Object in recursive loop causes Stack Exceeded Error
<p>I am trying to build a HTML page using JS. The details of what needs to go into the HTML are sent in a json object from the server. Now the json object is structured in such a way that basically mimics the dom structure and I iterate through the object and fetch individual html element data from it and render the HT...
2
4,075
Glassfish embedded Fails to deploy EJB modules
<p>Does somebody can help me to solve this error with JUnit4.12 and glassfish4.1?</p> <p>I'm trying to test EJB using JUnit but I got this message from JUnit trace:</p> <pre><code>javax.ejb.EJBException: Failed to deploy EJB modules - see log for details at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContai...
2
1,803
Angular 6 mat-sidenav toggle menu not working
<p>I have created a sidebar nav menu in Angular 6 something like.</p> <p><strong>UPDATE:</strong></p> <p>But when I click on the toggle menu icon sidebar nav should not be fullwidth expand.</p> <p>But on click of toggle menu icon in sidebar (from sidebar component), I'm not sure where the mistake is made.</p> <p>...
2
1,500
Get span value with no class name using VBA
<p>Am stuck with this,</p> <p>VBA code:</p> <pre><code>Set html = IE.document Set elements = html.getElementsByClassName("dropdown dropdown-toggle editable-field-title-wrapper") Dim count As Long Dim erow As Long count = 0 For Each element In elements If element.className = "dropdown dropdown-toggle editable-field-...
2
1,312
ESLint: Parsing error: Cannot read file tsconfig.json on WebStorm IDE on WSL2
<p>When cloning my repo and doing npm install on WSL2, I am getting this ESLint error on my IDE for all .ts files in my project:</p> <blockquote> <p>ESLint: Parsing error: Cannot read file <code>\\wsl$\ubuntu-20.04\home\project_directory\tsconfig.json</code></p> </blockquote> <p>This is showing up because of my <code>p...
2
3,998
Hibernate @ManyToOne with join table with extra column seems generate infinite loop
<p>I have 3 entities : Contract, Person and ContractPerson. ContractPerson is a join table between Contract and Person with extra fields so I created a separate entity.</p> <p>Contract.java:</p> <pre><code> import lombok.Data; import javax.persistence.*; import java.util.HashSet; import java.util.Set; ...
2
2,277
Angular2: Very vague error when using angular-http RequestOptions where Angular-http Headers works fine
<p>I am busy with a small ngCli angular2 web app where i'm trying to use a RestService to post to a API... I have a few other get functions in the Rest Service where I use Headers instead of RequestOptions which works fine. I am trying to use RequestOptions with the post method but keep getting the following error in...
2
3,019
parse xml and binding data to listbox
<p>It's very simple task, but I struggle for hours. I have parse xml from web sources and bind them to listbox. Now I want to make an index for each items binded to list box, something like this:</p> <pre> 1.Title 2.Title 3.Title Author Author Author Date Date Date </pre> <p>Here is what I hav...
2
1,424
How to write NSPredicate Custom Object (CGFloat var) BETWEEN operation
<p>I want to do <strong>Number comparison</strong> using <strong>BETWEEN</strong> through <em>my custom object.</em> I have done string comparison, however Number comparison shouts error as in the code below.</p> <pre><code>class CustomClass: NSObject { var name : String? var aWidth : CGFloat! } </...
2
1,081
Yii2 sendFile() - Trying to get property of non-object
<p>Hey guys I am trying to set a download button where a user can download a file, which is uploaded using kartik's File Input Widget(single upload).</p> <p>The codes resides inside the CRUD generated view/controllers/models.</p> <p>This is the view button code,</p> <pre><code> &lt;?= Html::a('Download Upload...
2
1,066
Wordpress admin-ajax.php error 400 bad request
<p>hello im doing save for later feature in my website but i get admin-ajax bad request when i click the button </p> <p>functions.php</p> <pre><code>function zumra_scripts() { wp_register_script( 'remove-prodduct-from-list', get_template_directory_uri() . '/js/remove-product.js', array('jquery'), false, true )...
2
1,148
giving different color to each map icon after fetching the location from database
<p>My program fetches the location from the database and locates in the map with same icon color. How can i give a different colour for each result. My code is given below please help. </p> <pre><code> &lt;script type="text/javascript"&gt; //&lt;![CDATA[ var map; // Ban Je...
2
2,325
Converting currency using exchange rate
<p>I have written a class to provide two utility functions on Monetary data. It is workingn fine but I would like to know if i can improve it any way? What I read was BigDecimal should be used when working with currency as precision is imiport.</p> <pre><code>public class Money { /** * @param Currency type * @param...
2
1,556
Multiple Concurrency access to DbContext in Webapi
<p>I have a WebApi that that uses EFCore2.0 and 2 client trying to access to an action method at a same time ... Everything is working fine with one client. But when 2 or more trying to access to a one particular action method at a same time, I got this error at Microsoft.EntityFrameworkCore :</p> <blockquote> <p>A ...
2
10,212
android.view.InflateException: Binary XML file line #65: Error inflating class ImageView
<p>I know there are other questions on SO asking the same thing. I have already looked at most of them.</p> <p>Most answers call about memory errors. But I think I have already check it. Here is mu logcat:</p> <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{a.batteryalarm/a.batteryalarm....
2
10,573
WPF: ListView SelectedItem binding works for a split second, then changes back
<p>let me start by introducing my current setup: I have a ListView that binds its SelectedItem property to the ViewModel, like this:</p> <pre><code> &lt;ListView Name="FileListView" ItemsSource="{Binding ImageList}" SelectionChanged="ImageSelectionChanged" SelectedItem="{Binding Selecte...
2
1,056
Service freezing the UI
<p>I have a service which counts steps from the sensor data. It's a continuously running service. My service is running and also doing the desired task but my main problem is its freezing my UI. How can I update the UI without freezing it.</p> <p>Here is my service class:</p> <pre><code>public class StepCounterServic...
2
2,622
Apollo GraphQL Android Cannot resolve "Failed to parse http response" error
<p>The problem I am facing is that it throws a <code>Failed to parse http response</code> error. I am not sure what is broken here? I followed the documentation but it seem that it is outdated.</p> <p><strong>Code</strong>: </p> <pre><code>public class AniList { private static final String BASE_URL = "https://gra...
2
1,805
Container xxx encountered an error during CreateContainer: failure in a Windows system call: The system cannot find the file specified. (0x2)
<p>Why will all my containers not start? Everytime I get the following error:</p> <pre><code>PS C:\temp&gt; docker run hello-world:nanoserver C:\Program Files\Docker\docker.exe: Error response from daemon: container cec0e5f7f4036b1131a0bac64fd4584b1a5a4e281c328e 1469b552d2a71a573d encountered an error during CreateCon...
2
1,210
Function is never called inside a switchMap with unit test angular + jasmine and SpyOn
<p>i'm trying do a test to know if a function of a service is called, but always it returns me that is not calling. I do not know what I'm doing wrong. The function that i want know if it's called this inside a switchMap, this function is a service. (this.heroSearchService.search(term))</p> <p>This is the message tha...
2
1,360
OpenCV/C++ program slower than its numpy counterpart, what should I do?
<p>I implemented some time ago the Procrustes Analysis algorithm in Python and was told to port it to OpenCV/C++ recently. After finishing it I ran some tests and for the same input/instances, the C++ code is taking twice the time the Python code does (roughly 8 vs 4 seconds, respectively. I'm repeating the tests a tho...
2
1,960
mips program to calculate sin(x)
<p>I have this equation: <a href="http://i.stack.imgur.com/YtC9a.png" rel="nofollow">Summation of sin(x)</a></p> <p>I am trying to calculate this by creating a program on MIPS. However, it outputs incorrect BIG numbers! I have no idea where is the stupid mistake I have made. I had created three functions, one that ca...
2
1,182
"TypeError: hashpw() argument 1 must be str, not bytes" when trying to register a user with flask-security
<p>I'm trying to create a small flask application using the <a href="http://enferno.io/" rel="nofollow">Enferno framework</a>, but when I try to register a user I get an error that seems to be generated by the passlib library. I can't understand if it's something I did or if it is an error in the library itself.</p> <...
2
1,398
How to scroll info windows in map v2?
<p>i make a one app like a see data on a info windows my data is very long and i used scroll view for scroll info windows but not getting scroll event in map v2 so, tell me is it possible to scroll data on info windows in map.</p> <p>i tried google but not getting any out put so i put my query here.</p> <p>please see...
2
3,274
AngularFire2 returning [object Object]
<p>I am trying to figure out where everything's gone wrong. All my observables return [object Object]. </p> <p>My <strong>sunshine.component.html</strong></p> <pre><code>&lt;h4&gt;Welcome {{username$}}&lt;/h4&gt; &lt;ul&gt; &lt;li *ngFor="let addsnote of addsnotes$ | async"&gt;{{ addsnote }}&lt;/li&gt; &lt;/ul&gt; </...
2
1,136
Split string into variables and use output as element
<p>Well.. I'm stuck again. I've read up quite a few topic with similar problems but not finding a solution for mine. I have a ; delimited csv file and the strings at the 8th column ($elements[7]) is as following: "aaaa;bb;cccc;ddddd;eeee;fffff;gg;". What i'm trying is to split the string based on ; and capture the outp...
2
1,437
Deserializing inner class when using GSON and Retrofit
<p>My api response is like:</p> <pre><code> "stories": [ { "id": 3509, "title": "Greece financial crises ", "isBreaking": "0", "updated": "1435719565", "readers": "0", "feed": [ { "feed_id": "2", "title": "cnn", "logo_url": "http:\\/\\/cnn....
2
1,838
Django static url auto prefixes
<p>I've seen quite alot of questions &amp; answers on this topic, but none helped me. So, the problem is: none of static files are served till i manually add '/' before any adress in adresses in html. And i always get double static files folder prefix on adresses, like this: 'content/static/content/static/js/my.js'</p>...
2
2,461
Using a struct from a different library in Cython
<p>I am trying to call a C function in Cython and the header looks like this:</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdint.h&gt; #include &lt;inttypes.h&gt; #include &lt;ctype.h&gt; #include &lt;unistd.h&gt; #include &lt;math.h&gt; #include &lt;apriltag.h&gt; #include &lt;tag36h11.h&gt; #include &lt;c...
2
2,200
Populating a ListView with firebase data
<p>I'm trying to populate my ListView but I can't seem to figure it out. I'm able to print the values and also toast then they just wont populate my ListView. Is there anyone that can help me populate it?</p> <p>MainActivity</p> <pre><code>package uk.co.jaunt_app.jaunt; import android.content.Intent; import android....
2
1,835
Tensor-Flow error: Failed to convert object of type <class 'dict'> to Tensor
<p>I'm trying to build and train an AutoEncoder using the following code. The error of cannot convert dict to tensor shows up when I train the model. I think it has something to do with my model but I cannot locate the error. Can anyone help me with this? Thank you.</p> <pre><code>X = tf.placeholder("float", [None, nu...
2
1,391
Spring with JPA pure approch
<p>I have a problem with Spring and JPA. Basically I try to use JPA with Spring with a pure approach, or better, without explicit references in the code to Spring framework with the exception of the @Transactional. So I wanted to know where wrong. My persistence.xml is:</p> <pre><code>&lt;persistence xmlns="http://jav...
2
2,773
mySQL C++ connector Visual Studio 2017
<p>I am pretty new to Visual Studio.. Couldn't find similar topic so starting the new one. I'm developig an MFC app and I'd like to use mySQL database engine. I believe I have followed instructions from the official site to install the C++ connector: <a href="https://dev.mysql.com/doc/connector-cpp/8.0/en/connector-cpp...
2
1,337
NullPointerException occurred when put something into map concurrently
<p>I use a map to store data by running several sqls. Recently I wanna improve the efficiency of searching, so I create some threads, each thread corresponds to each sql, then put query results into the map at the same time. When running the code, I get NullPointerExceptions but do not know why. Here is my code:</p> ...
2
1,587
KendoUI TreeView binding issue
<p>I am facing an issue , below code bind the tree for first time , but not working binding the tree on second time :( but when i request third its bind again.</p> <p>Means even request work .</p> <p>please help me </p> <p>Thanks in advance </p> <p>Mobeen</p> <p>// My Example Data</p> <p>{"d":[{"_<em>type":"Mana...
2
1,426
V8 ArrayBuffer from int array?
<p>I've seen <a href="https://stackoverflow.com/questions/39796251/copy-data-into-v8arraybuffer">Copy data into v8::ArrayBuffer</a> which is able to create an array buffer based on data like the following:</p> <pre><code>QByteArray data_buffer(file.readAll().data(), file.size()); v8::Handle&lt;v8::ArrayBuffer&gt; ab =...
2
1,601
Bulk insert attribute sets in Magento database
<p>I need to insert 30,000 attribute sets in Magento database. I tried it as follows</p> <pre><code>set_time_limit(0); function createAttributeSet($setName) { $entityTypeId = Mage::getModel('eav/entity') -&gt;setType('catalog_product') -&gt;getTypeId(); // 4 - Default $newSet = Mage::getModel('eav/ent...
2
5,034
Trouble Building a Scroll-able Page with a bottom-navigation-Bar
<p>When I am adding a bottomNavigationBar to my Page, the body of my Page will disappear. I believe the porblem to be sourced with my use of SingleChildScrollView from other posts that I have read</p> <p>It does not appear to matter where I call in the bottom navigation Bar the page stops working</p> <pre><code>-home...
2
7,450
How to fix sending e-mail Thai language text?
<p>I've try to send Thai language e-mail through .asp (classic) page. The code is below</p> <pre><code>&lt;% response.write(GetLocale() &amp; "&lt;br /&gt;") SetLocale(1054) response.write(GetLocale()) Set Mail = CreateObject("CDO.Message") Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configura...
2
1,224
Zend_Form_Element fails when i addElements
<p>I have been having trouble adding a hidden zend form element.</p> <p>when i invoke addElements the form fails and prints the following error to the page. but only when i try and add $formContactID and $formCustomerID.</p> <blockquote> <p>Fatal error: Call to a member function getOrder() on a non-object in /home/...
2
1,390
Android Parse.com query relation
<p>I have a custom Employee table and custom Organization table. Employee table has a column Relation&lt; Organization >. I want to query organizations of an employee object.</p> <pre><code>// I have an employee object ParseObject employee = ParseUser.getCurrentUser().getParseObject("employee"); // I get relation quer...
2
1,231
Any tips for making Hive run faster on Hadoop?
<p>I'm new to Hive and Hadoop. I have Hadoop configured for pseudo-distributed operation with one data node and one name node, all on localhost.</p> <p>I have a trivial employee table containing 4 records. I can select the records in a reasonable amount of time, but anything beyond that takes really long. For example:...
2
2,530
AttributeError: 'int' object has no attribute '_compiler_dispatch'
<p>I am using the <code>flask-sqlalchemy</code> extension with <code>alembic</code> for migrations. When I try to add a new migration file and upgrade the schema to the latest one, I get the following error:</p> <pre><code>AttributeError: 'int' object has no attribute '_compiler_dispatch' </code></pre> <p>The content...
2
2,757
Java, Integer.parseInt( ) does not parse "117" string
<p>Could somebody help me to figure out how to solve a weird (for me) issue. The idea is we get a short String from file (to be precise string is "117_63_", where "_" are space symbols and the file itself is UTF-8 encoded) we split this string into integers "117" and "63" but when we conver them using Inetger.parseint(...
2
1,263
How to fix Header new line error
<p>I am receiving the following error message "Header may not contain more than a single header, new line detected" I know it says that a new line has been detected, but I cannot figure where this line is coming from. I have tried to trim the variables..I have re-written the header line in different ways, without any r...
2
1,395
My app keeps creating database connections, how do I trace the reason?
<p>I have a Ruby on Rails application running on Heroku. I keep getting these messages in the log:</p> <pre><code>2015-05-05T16:11:14Z app[postgres.27102]: [AQUA] connection received: host=xx.xxx.xx.26 port=60278 2015-05-05T16:11:14Z app[postgres.27102]: [AQUA] connection authorized: user=postgres database=somedb 2015...
2
1,650
Directory name must not be empty
<p>I got the below error when i tried to run <code>composer update</code> I tried to do <code>composer clear</code> and that didn't help. Works on my local windows machine but doesnt work i deploy it to a centos machine. I'n not running laravel, just composer.</p> <p>My composer.json file:</p> <pre><code>{ "autoloa...
2
1,096
Error when drawing rectangle with color sent as a parameter OpenCV Python
<p>I have an 1000x1000px image which I want to divide into 10x10 px squares. I have the variable &quot;coordenada&quot; to track the coords of the current 10x10 square (that's why when trying to get the x and y values I multiply by 10).</p> <p>I want to draw a rectangle surrounding the &quot;current&quot; 10x10 square ...
2
2,126
How would I convert this table layout to divs/css?
<p>I'm really trying to work with div's and I can't seem to get the equivalent to the following simple table layout:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&g...
2
1,213
Numpy-compatible image drawing library
<p>I need to overplot general coordinate grids on images in python. I can compute the pixel coordinates of the grid lines, so I just need a module capable of drawing them as <em>dashed lines</em> on top of an image. The image comes in the form of a <code>numpy</code> array, so I need to be able to convert between those...
2
1,373
Failed to execute 'appendChild' on 'Node': The new child element contains the parent
<p>While i am upgrading my polymer project to 2.0 at very first element i am getting the error <strong>Uncaught (in promise) DOMException: Failed to execute 'appendChild' on 'Node': The new child element contains the parent</strong></p> <p>I tried the element in both hybrid style and 2.0 style.</p> <p>Here is my elem...
2
5,612
Setup pjsip for Python
<p>I'm trying to install pjsip's Python binding but am running into a build error that I feel is environmental but am just not able to figure out what's wrong.</p> <p>I'm able to build pjsip without issue but run into a problem when trying to build the python bindings -- I'm getting an error from ld about a bad value ...
2
1,486
inserting pandas dataframe in oracle extremely slow
<p>I am working on <code>pandas</code> dataframes. The goal of my application is to perform certain analysis on a csv file, and once that is done, insert this csv file into an <code>oracle</code> database.</p> <p>To insert into an oracle database, I used <code>to_sql</code> command of <code>pandas</code> library. But ...
2
2,569
Google Anlaytics Embed API demo not working
<p>I followed the steps from the webite below: <a href="https://developers.google.com/analytics/devguides/reporting/embed/v1/devguide#client-id" rel="nofollow">https://developers.google.com/analytics/devguides/reporting/embed/v1/devguide#client-id</a></p> <p>when I execute the code below I get the error message in my ...
2
1,156
search in php mysql with multiple search box
<p>I want to create a search with multiple search box. i already created on with the help of this tutorial <a href="https://www.youtube.com/watch?v=2XuxFi85GTw" rel="nofollow">https://www.youtube.com/watch?v=2XuxFi85GTw</a>. so I make it 2 text box for the search. Here's what i done:</p> <p><div class="snippet" data-l...
2
2,095
Yii2 - RBAC Control Not working
<p>I am trying to develop a yii2 app where members have two roles: admin and member. So, I was following the default role method as described in <a href="http://www.yiiframework.com/doc-2.0/guide-security-authorization.html" rel="nofollow noreferrer">yii2 documentation</a>.I have a table called 'member' in db which I'm...
2
1,090
Can't get the time picker to grey out the dates in the Past
<p>I have a JSP Page where i want the time picker to grey out the past days and only show the dates from today to furture . i have tried the endDate option but it is not working .</p> <p>Heres my jsp page</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="...
2
6,158
Draw a convex hull on a google map
<p>I am new to javascript and working with google maps API for javascript.</p> <p>This is an asignment for school and we were provided with a working script and some php code to display a map, get the position, update the position and so on.</p> <p>Our task is to implement a convex hull algorithm.</p> <p>These are t...
2
2,860
Getting AWS cognito authenticated user in post-authentication lambda trigger
<p>I'm using Amplify with the Cognito backend to authenticate my users, essentially as an LDAP impl. This is all configured and working just fine. The users are setup in the user pool, and authenticated properly. (Note: I'm using the default Amplify controls, so it works as expected).</p> <p>However, now I want to be a...
2
1,075
socket closed exception after transferring one file from server to client
<p>I am implementing two programs; Client and Server, and client asks for a file from server to download in local file system.</p> <p>After downloading one file, the client should be able to download another file if it wishes to..</p> <p>However after it downloads the file, Server gives me an exception says</p> <pre...
2
1,859
SSRS Expression - #Error in an obviously correct expression
<p>I have an SSRS expression with this in it:</p> <pre><code>=IIF( Fields!CUT.Value.ToString().Length &gt; 1 ,IIF( Fields!CUT.Value.ToString().Contains(","), Fields!CUT.Value.ToString().Substring(0, Fields!CUT.Value.ToString().IndexOf(",")), Fields!CUT.Value.ToString() ) ,"" ) ...
2
1,154
AltBeacon scanning iBeacon on Android
<p>I want to scan an iBeacon UUID = "2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6" from Android phone Nexus5</p> <p>I have followed <a href="http://altbeacon.github.io/android-beacon-library/samples.html" rel="nofollow noreferrer">example</a> from AltBeacon and <a href="https://stackoverflow.com/questions/25027983/is-this-the...
2
1,084
Highlights subString in the TableCell(s) which is using for JTable filetering
<p>how is possible to synchonize text typed into <code>JTextField</code> (then by <code>DocumentListener</code> passed <code>String</code> to the <code>RowFilter</code>) with <code>TableCell</code> if contains same as String value in JTextField/Document, </p> <p>and then highlights (meaning f.e. change text <code>Colo...
2
3,162
Multi-line bash script in yaml for EC2 Image Builder
<p>I'm trying to create a custom component document. While I've tested the yaml file using various yaml linters, EC2 Image builder is complaining with the below error</p> <pre><code>Failed to create component. Fix the error(s) and try again: The value supplied for parameter 'data' is not valid. Parsing step 'ConfigureM...
2
1,155
Error ------ unexpected EOF while parsing
<p>I am running this code on Python 3(IDLE) on my raspberry pi 3 whith the latest raspbian software. With this code I am trying to obtain temperature data through ds18b20 sensor and sending that same data towards the mysql database I created. </p> <p>From the try: to the end of the if connection.is_connected(), I am e...
2
1,439