title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Freeradius and PHP auth script
<p>I'm trying to authenticate freeradius users against a PHP script, with no success. I've been trying for hours to config this right, and all the threads I found with Google are either deadlinked or obsolete...</p> <p>radiusd.conf</p> <pre><code>prefix = /usr exec_prefix = /usr sysconfdir = /etc localstatedir = /var...
0
1,340
WPF Button Mouseover Image
<p>I am learning C# and XAML to build windows applications. I wanted to create a button that has an image as its background. But when hovering over the button, the background of the button should change to another "highlighted" image. I attempted to add the background images into Resources.resx. I had to create a custo...
0
2,183
Connecting with hibernate to a Microsoft SQL 2008 server
<p>I am trying to connect to a Microsoft SQL 2008 server via hibernate. The following is my hibernate.cfg.xml file:</p> <pre class="lang-xml prettyprint-override"><code>&lt;hibernate-configuration&gt; &lt;session-factory&gt; &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.SQLServer2008Dialec...
0
2,268
'datetime2' error when using entity framework in VS 2010 .net 4.0
<p>Getting this error:</p> <blockquote> <p>System.Data.SqlClient.SqlException : The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.</p> </blockquote> <p>My entity objects all line up to the DB objects.</p> <p>I found only a single reference to this error via Google:</...
0
1,051
EF4 POCO (not using T4): Mapping and metadata information could not be found for EntityType
<p>I have a pretty simple console project with an entity model (containing two simple entities), two handmade POCOs and a handmade Context class. The program fires a simple query against the DB and everything including LazyLoading works fine. </p> <p><em>The problem:</em> As soon as i add another Entity data model (ev...
0
7,358
Convert a JSON string to a struct column without schema in Spark
<p>Spark: 3.0.0<br /> Scala: 2.12.8</p> <p>My data frame has a column with JSON string, and I want to create a new column from it with the StructType.</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>temp_json_string</th> </tr> </thead> <tbody> <tr> <td>{&quot;name&quot;:&quot;test&quot;,&qu...
0
1,128
Python NetworkX -- set node color automatically based on number of attribute options
<p>I am using NetworkX to analyze and visualize social networks. Often, the nodes within the network have attribute information associated with them, such as division. However, I do not always know how many options there might be for the attribute division. For example, sometimes there might be only 3 divisions repr...
0
5,465
How to print elements from an array list
<p>I've looked online for help so far and nothing is working for me. This is what I have right now, can you please tell me what is wrong with it?</p> <p>import java.util.*;</p> <pre><code>class employeeProgram{ public static void main(String[] args){ for (int count = 0; count &lt; 1; ){ ...
0
1,101
Android Error Building Signed APK: keystore.jks not found for signing config 'externalOverride'
<p>I get this error when I try to Build Signed APK. I recently upgraded to API 23 but Generated APK:s successfully after that. Im confused. Asking for help and advise how to solve this problem. Here's the error</p> <pre><code>FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app...
0
1,101
Firebase not sending OTP
<p>I had registered a user in <code>firebase</code> using <code>Firebase</code> phone number <code>authentication</code>.For testing that functionality again, I deleted the user account from <code>Firebase</code> console. Now, i am trying to register that number again, its directly going to the <code>onVerificationComp...
0
2,215
jQuery, DataTables, ajax error handling: get rid of "Processing" message
<p>I am using jQuery DataTables, ajax and Bootstrap in a small project. It is mostly working and I am testing error states. I have setup my html for the DataTables table. There is a <code>table-responsive</code> div surrounding the <code>&lt;table&gt;</code>.</p> <pre><code>&lt;div id="errorDiv"&gt;&lt;/div&gt; ...
0
1,111
Spring FactoryBean and autowiring not working : expected single matching bean but found 2
<p>I have two classes, each one autowiring the same class through a factory :</p> <pre><code>@Service public class AnalyseDispensationNominativeMetierService implements IAnalyseDispensationNominativeMetierService { @Autowired @Qualifier("interfaceAutomateServiceFactory") private IInterfaceAutomateMetierService ...
0
2,030
EF Core - may cause cycles or multiple cascade paths
<p>I've set up what I thought was a pretty simple database.. However I am getting the following error.</p> <blockquote> <p>Introducing FOREIGN KEY constraint 'FK_User_Suburb_SuburbId' on table 'User' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREI...
0
2,473
content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'
<p>I've been trying for a long time to send right request to soap server. I'm keep getting error message. </p> <p>Here is my xml</p> <p>GET LAST REQUEST (newlines added):</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns...
0
1,691
How to get ValueMember value from ComboBox C# Winforms?
<p>I'm having some trouble trying to get the ValueMember value I've set. I'm trying to use a combobox to select a windows forms report. I can get the Name but not RptValue. Here's my code:</p> <pre><code> private class Data { public string Name { get; set; } public string RptValue { get; set...
0
1,106
Eclipse Theme - How to change the color of the main editor text
<p>To be clear, I am specifically looking for a way to change the text that is produced in the main editor as I am typing it (ie, it is black right now). For lack of a better term, I shall refer to this as 'typing text'. The version of Eclipse that I'm using is Kepler (4.3).</p> <p>The equivalent functionality can be ...
0
1,656
Need a fast way to count and sum an iterable in a single pass
<p>Can any one help me? I'm trying to come up with a way to compute </p> <pre><code>&gt;&gt;&gt; sum_widths = sum(col.width for col in cols if not col.hide) </code></pre> <p>and also count the number of items in this sum, without having to make two passes over <code>cols</code>. </p> <p>It seems unbelievable but aft...
0
1,443
WCF: The maximum array length quota (16384) has been exceeded while reading XML data
<p>I know this has been asked quite a few times, and trust me I've been looking at and trying many of them for half the afternoon, but still cannot get past this.</p> <p>I'm trying to submit some form contents (which can also include an attachment) over a web service, but keep getting the following error when I try to...
0
5,878
Keras RNN with LSTM cells for predicting multiple output time series based on multiple intput time series
<p>I would like to model RNN with LSTM cells in order to predict multiple output time series based on multiple input time series. To be specific, I have 4 output time series, y1[t], y2[t], y3[t], y4[t], each has a length 3,000 (t=0,...,2999). I also have 3 input time series, x1[t], x2[t], x3[t], and each has a length 3...
0
5,347
Handle touch event for items inside Recyclerview - android
<p>i'm building a simple recyclerview with custom layout (Text view and switch) and a custom adapter.</p> <p>My problem is i can't handle the click event for the switch (Which make it toggle its state), i have built a touch listener for the <code>RecyclerView</code> and it fires every time i click on the <code>Switch<...
0
2,116
HttpClient request throws IOException
<p>The following code throws a IOException with the message: "The specified registry key does not exist."</p> <pre><code>HttpClient client = new HttpClient(); Uri uri = new Uri("http://www.google.com"); client.GetAsync(uri); </code></pre> <p>This is just in a console app in Main. It looks like the error is being th...
0
1,204
How to change default "save as" directory path for excel?
<p>Hi I just embed this code into my vba macro, but how to change default directory when I use this macro.. for example when I click it is going to D:/myfolder</p> <p>I found this code at google : </p> <pre><code>Sub Copy_ActiveSheet_2() 'Working in Excel 2000-2013 Dim fname As Variant Dim NewWb As Workbook Dim FileF...
0
1,113
CodeIgniter and Bootstrap modal - passing data
<p>I have created a bootstrap modal mngCat that is inside views/modals folder, which I want to call in both cases, when I want to add a new category or when I want to edit an existing category.</p> <pre><code>&lt;div id="mngCat" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="addNewLabel" aria-hid...
0
1,112
Android: How to build tabs like the ones show on Android UI Page
<p>So android goes out of its way to build this nice UI guide for everyone to use. But I don't see anywhere where it shows code examples of how to build these elements. </p> <p>The UI guidelines for tabs can be found here. <a href="http://developer.android.com/design/building-blocks/tabs.html" rel="nofollow noreferr...
0
1,755
Swift - Expected expression in list of expressions
<p>I'm new to Swift been reading but have no clue what this means. On the line of code below, I have "Expected expression in list of expressions" after parameters[String]. AS well at the same point it is looking for "Expected ',' separator. I believe these are related.</p> <pre><code>AppDelegate.submitLacunaRequest(mo...
0
1,324
php imagecopyresampled poor quality
<p>I have a php script which saves the original image, then resizes it - one thumbnail and one larger image for web viewing. This works well except with some images the quality is terrible. It seems to be saved with a very low colour pallet. You can see the result at <a href="http://kalpaitch.com/index.php?filter=white...
0
1,224
Android Studio "IDE error occured" on create new Activity
<p><strong>(See update at the bottom)</strong></p> <p>Since Android Studio updated itself to v3.0, I can't make a new Activity.. I get this error reporting dialog showing 2 errors. I tried with a different project, tried cleaning the project, resyncing gradle, restarting my computer, uninstalling/reinstalling Android ...
0
6,785
How to POST an XML file using cURL on php?
<p>I am using a local server on my computer and i am trying to make 2 php scripts to send an xml file and receive it.</p> <p>To send the xml file i use this code :</p> <pre><code>&lt;?php /* * XML Sender/Client. */ // Get our XML. You can declare it here or even load a file. $file = 'http://localhost/iPM/...
0
1,029
MIPS function call with more than four arguments
<p>I understand that whenever I have a function that has more than four arguments in MIPS I should utilize the stack. However in my code below after saving the fifth argument at <code>sw $t0, 4($sp)</code> and do a <code>jal sad</code>, then right at the beginning of the <code>sad</code> function I adjust the stack poi...
0
1,510
What is the recommended way to align memory in C++11
<p>I am working on a single producer single consumer ring buffer implementation.I have two requirements:</p> <ol> <li>Align a single heap allocated instance of a ring buffer to a cache line.</li> <li>Align a field within a ring buffer to a cache line (to prevent false sharing).</li> </ol> <p>My class looks something li...
0
1,592
Extjs 4.0.7, Editor Grid - how to get updated cell value?
<p>I need to get(retrieve) updated cell value in controller. (MVC)</p> <p>So I tried this, </p> <pre><code>var modified = this.getItemGrid().getStore().getUpdatedRecords(); console.log(modified); // return [] empty array var modified = this.getItemList_Store().getUpdatedRecords(); console.log(modified); // return []...
0
1,456
vba: return page number from selection.find using text from array
<p>(Note: See below for solution.)</p> <p>I have been trying to retrieve the page numbers from pages that various headings reside on in a word document using VBA. My current code returns either 2 or 3, and not the correctly associated page numbers, depending on where and how I use it in my main Sub.</p> <pre><code>a...
0
3,055
Build gradle : Could not find method packagingOptions() for arguments root Project "fasterDev"
<p>I am using single build.gradle file in application. Regarding version 1.6 it's working properly. but I want to use this for location update with module.</p> <pre><code>apply plugin: 'com.android.application' ... dependencies { compile 'com.google.android.gms:play-services:fp9.0.0' } </code></pre> <p>Here is m...
0
1,036
Unable to instantiate fragment com.swmansion.rnscreens.Screen
<p>I have been developing an app for android and ios using React Native 0.60.4, and just recently I discovered that putting the app in split-screen or freeform mode (from being the only app on the screen) sometimes causes it to crash. </p> <p>I played with this further and found that I can launch the app into split sc...
0
3,257
Send SOAP with Groovy or Java
<p>I've red and try the multiples SOAP messages. I've tried to paste them in my solution but no way of getting the answer.</p> <p>I use this Groovy code to send SOAP request and get SOAP answer. And it works for 2 web services. I used SoapUI to write my XML and the XML I use here is working on SoapUI, I get the answer...
0
1,190
Hibernate exception: Duplicate entry for key 'PRIMARY'
<p>I've these (simplified) tables in my database</p> <p><a href="https://i.stack.imgur.com/2VmOg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2VmOg.png" alt="enter image description here"></a></p> <p>I've mapped the tables with these (simplified) two classes</p> <p><strong>COMPANY</strong></p> ...
0
3,239
How can I solve this "System.Data.Entity.DynamicProxies" error
<p>I am new to Linq and EF Code First and came across an issue that I just can't figure out. I am developing a proof of concept examination program using ASP.Net Web Forms, EF Code First and Linq. The ideas is that I generate the page's server controls dynamically based on the database. I've built this same applicat...
0
1,749
How to Display data from database with servlet/jsp
<p>I am trying to display a list of cars from my jsp. But i don't understand why nothing appears at the runtime :</p> <p>Servlet code: </p> <pre><code>public class SDisplayCar extends HttpServlet{ private static final long serialVersionUID = 1L; private Gestion gestion = Gestion.getInstance(); protected void doPost(...
0
1,738
twitter bootstrap make from source
<p>So I am trying to "build" twitter bootstrap from source git://github.com/twitter/bootstrap.git and I git clone it to my local machine.</p> <p>Obviously, on my local machine, I have had nodejs and npm installed and the required node packages less and uglify-js installed as well. And all node modules are in my system...
0
1,062
undefined reference to `pthread_create' Error when making C++11 application with ASIO and std::thread
<p>I set Eclipse (Actually Xilinx SDK but based on Eclipse), and g++4.9.2, to compile a project which uses standalone ASIO and I used -std=c++11 in the Properties -> C/C++ Build -> Settings -> Tool Settings -> Other flags so it can compile using all C++11 features.</p> <p>I also set <code>ASIO_HAS_STD_THREAD, ASIO_STA...
0
1,374
How to construct a SQLite query to GROUP by ORDER?
<p>I've got a rather interesting situation. I have a SQLite database full of addresses and messages (addresses are not unique; messages are). Each message also has a date associated with it. What I want to do is select <em>the first</em> message's address, message, date, and <em>how many messages</em> are associated wi...
0
1,110
Trusted Web Activity - Address bar not hide (Chrome for Android 72)
<p>I've followed <a href="https://developers.google.com/web/updates/2017/10/using-twa" rel="noreferrer">this</a> guide to learn how to use a Trusted Web Activity. All fine but the address bar still appear. At begin I think it was because when the app was looking for <em>assetlinks.json</em> the response was 404. Fixed ...
0
8,028
Spring Boot not able to create datasource
<p>I want to integrate Spring Boot in one of the existing application. So I decided to start with a POC first. I downloaded a sample working code from <a href="http://www.journaldev.com/3531/spring-mvc-hibernate-mysql-integration-crud-example-tutorial" rel="nofollow">http://www.journaldev.com/3531/spring-mvc-hibernate...
0
4,690
Error 403 : HTTP status code is not handled or not allowed in scrapy
<p>This is the code, I have written to scrape justdial website.</p> <pre><code>import scrapy from scrapy.http.request import Request class JustdialSpider(scrapy.Spider): name = 'justdial' # handle_httpstatus_list = [400] # headers={'User-Agent': "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTM...
0
1,074
TypeScript error TS5014: Unexpected token u in JSON at position 0
<p>I am trying to compile a .ts to .js</p> <p>I have <code>tsconfig.json</code> as below</p> <pre><code>{ &quot;compilerOptions&quot;: { &quot;target&quot;: &quot;es5&quot;, &quot;module&quot;: &quot;commonjs&quot;, &quot;sourceMap&quot;: true, &quot;outFile&quot;: &quot;build/test.js&quot; }, &quot;exc...
0
1,050
error TS2339: Property 'handleError' does not exist on type 'HeroService' with Angular
<p>Alright guys, sorry about this question, as I know there are several already about Typescript when it compiles, but I'm encountering a flavor of this issue that I can't connect the dots with.</p> <p>I'm trying to follow the Angular Tour of Heroes app, and am trying to finish it up with <a href="https://angular.io/d...
0
1,846
Closing Twitter Bootstrap Modal From Angular Controller
<p>I have a modal window that I use to present a form to users. They enter the information and then press a button the has an ng-click. The server processes the request and sends back a response. When the response is success I want to close the modal window from the controller. How can this be achieved?</p> <p>The...
0
1,367
Responsive SVG viewBox
<p>I made a "hamburger button" in SVG, as seen below.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>body { margin: 0; text-align: center; } svg#ham-btn { margin: 2r...
0
1,278
Linux socket: How to make send() wait for recv()
<p>I am making a simple client-server application using TCP protocal.</p> <p>I Know that by default. <code>recv()</code> will block until the other side call a <code>send()</code> to this socket. But is it possible that <code>send()</code> block itself until the other side has <code>recv()</code>ed the msg instead of ...
0
1,872
How to consume webservices over https
<p>I am trying to consume a webservices which are located at <a href="https://TestServices/ServiceList.asmx" rel="nofollow noreferrer">https://TestServices/ServiceList.asmx</a>. When I try to add a service reference to my C# library class project my app.config file looks like below:</p> <pre class="lang-xml prettyprin...
0
1,099
The model item passed into the ViewDataDictionary is of type '*',but this ViewDataDictionary instance requires a model item of type '..IEnumerable[*]'
<p>I looked at and implemented solutions on similar topics, but unfortunately they did not provide a solution for me.</p> <p>Error Message:</p> <blockquote> <p>InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'CMS.Models.Page', but this ViewDataDictionary instance requires a model...
0
3,684
Controling the angular material mat-drawer from another component
<p>I have two components, the AppNav component and the Machines component. The AppNav component has the toolbar and sidenav. I have also placed a filter button on the toolbar of the AppNav. In the Machines Component there's a mat-drawer which needs to be toggled after clicking on the filter button in the toolbar of the...
0
5,093
How to Reload Flask-based Webpage after form submission
<p>Here is my code currently (omitting libraries and other unnecessary parts):</p> <pre><code> app = Flask(__name__) class SearchForm(Form): inputString = TextAreaField('', [validators.DataRequired()]) @app.route('/') def index(): return render_template('Website.html') @app.route(...
0
1,027
How to append a node in the existing JSON string?
<p>I have a JSON String as below. </p> <pre><code> { "Filename":"mypage.html", "Info":{ "title":{ "Name":"title", "Values":[ "This is title" ], "NumericValues":[ ], "DateTimeValues":[ ], "LinkedComponentValues":[ ], "FieldType":0 } }, ...
0
1,130
Sum value of elements inside of a div using jquery
<p>I'm doing a sorting of a set of users, I have 4 groupings like so (2 shown):</p> <pre><code>&lt;div id="team1" class="groupWrapper"&gt; &lt;div id="p1" class="groupItem"&gt;&lt;div class="itemHeader"&gt;&lt;div class="first"&gt;John&lt;/div&gt;&lt;div class="skill"&gt;15&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;...
0
2,136
Inserting data from front end to mysql db in angularjs
<p>I am trying to insert data from front end to mysql db using angularjs. <strong>But it is not geting inserted to the db even though there are no error messages</strong>. Following is the code that I use.</p> <p><strong>index.html</strong></p> <pre><code>&lt;html ng-app="demoApp"&gt; &lt;head&gt; &lt;titl...
0
1,629
Wait until NSURLConnection sendAsynchronousRequest is finished
<p>I have the following problem. I have a Model, called User. When the user now logins with Facebook, my app checks if the user exists already in the database. To not freeze the UI (since I'm coming from Android) I thought to use <code>NSURLConnection sendAsynchronousRequest</code>. What worked at first was the followi...
0
3,147
Custom Glassfish Security Realm does not work (unable to find LoginModule)
<p>I'm trying to get a Custom Security Realm in Glassfish working (i tried 3.0.1 final and 3.1 B33). I read nearly all tutorials about this, but it doesn't not work on my System. I'm getting the error </p> <pre><code>Login failed: javax.security.auth.login.LoginException: unable to find LoginModule class: com.company....
0
2,443
How to save multiple objects via ArrayList in hibernate?
<p>I have a Student entity. My idea is to collect multiple student objects in an ArrayList and save all objects from that list to the database. When do you use @ElementCollection annotation? Does it apply to situations like this?</p> <p><strong>Student</strong>:</p> <pre><code>package basic; import javax.persistence...
0
1,213
jquery-mobile loaded into an android WebView
<p>I've not been able to get a webpage decorated by jquerymobile to load into an Android WebView.</p> <p>Consider the jquery mobile demo site: <a href="http://jquerymobile.com/demos/1.0a4.1/" rel="nofollow">http://jquerymobile.com/demos/1.0a4.1/</a></p> <pre><code>final WebView browser; browser = (WebView) findView...
0
1,309
Docker SQL bind: An attempt was made to access a socket in a way forbidden by its access permissions
<p>Error-message when creating container in Docker for SQL-server (with Admin-rights):</p> <blockquote> <p>"… Error response from daemon: driver failed programming external connectivity on endpoint SQL19b (cc372bb961fb8178c2461d26bf16c4232a62e01c5f48b8fcec273370506cc095): Error starting userland proxy: listen ...
0
2,594
Send email with attachment which contains byte[] via java mail
<p>I have following <code>byte[]</code> which comes from database.</p> <pre><code>0x255044462D312E330A25AAABAC </code></pre> <p><strong>Note: above byte array is sample full file is not here because of length.</strong> </p> <p><strong>UPDATE:</strong></p> <p>But I am getting like <code>[B@7ffd10fa</code> format</p>...
0
1,251
String to date groovy
<p>How to convert String to Date ?</p> <p>I tried this:</p> <pre><code>@RequestMapping("/data/{data}") String buscar(@PathVariable String data, Model model) { model.addAttribute 'dataBuscar', data def newDate = data def df1 = new SimpleDateFormat("dd/MM/yyyy 00:00:00") data = df1.parse(newDate)...
0
1,835
Angular 4 Reactive Forms Toggle Validation for Hidden Form Elements
<p>I have a reactive form where on load no fields are required. If an option is selected that will add additional form elements into the formGroup then the new shown fields will be all required. If the nickname field is hidden then you should be able to submit the form just fine. If the nickname is shown then the nick...
0
1,028
NullPointerException: Attempt to invoke virtual method android.content.Context.getApplicationContext()' on a null object reference
<p>I have a Main-Activity, which looks like:</p> <pre><code>public class MainActivity extends Activity { ExpandableListAdapter listAdapter; ExpandableListView expListView; WeaponList listData = new WeaponList(); public static StatusCheck checkBombStatus = new StatusCheck(); String weapon = null; Intent openGameplay...
0
2,543
How to get AngularJS BLOB to Download PDF?
<p>Hello everyone I am really new to developing with AngularJS and I am trying to figure out how to use BLOB to download a PDF locally to a machine. I already got it to work with a JSON and now I need a PDF. I have written some code but it doesn't seem to be working. </p> <p><strong>html</strong></p> <pre><code>&lt;!...
0
1,413
Unable to turn off chunked transfer encoding in nginx with gzip for static assets served from Node backend
<p>We have a <code>Node/express</code> web app that is serving static assets in addition to normal content, via <code>express.static()</code>. There is an <code>nginx</code> server in front of it that is currently configured to <code>gzip</code> these static asset requests, if the <code>user agent</code> is up for it.<...
0
1,264
What is the lshw equivalent in windows which can give me a tree structure of hardware as lshw does on Linux?
<p>I need hardware information just as listed below which was generated using lshw in linux. I need a windows equivalent without a GUI more preferably like a code or dll which can be used to extract the information in the same tree like structure. Please note Wmi is not a suitable option as it does not give me empty sl...
0
8,873
Google Maps Android API v2 Authorization failure
<p>My steps: </p> <ul> <li>got SHA1 code from debug.keystore </li> <li>create app in google apis console </li> <li>enabled google map api v2 </li> <li>input SHA1;my.package.name </li> <li>get API key </li> <li><p>created AndroidManifest file: </p> <p> </p> <pre><code> &lt;permission android:...
0
2,109
Drawing a route between 2 locations Google Maps API Android V2
<p>I was playing around with the Google Maps API V2 on android. Trying to get a path between 2 locations and doing this with the JSON Parsing.</p> <p>I am getting a route. and the route starts out how it should be. but then at one point it goes the wrong way. </p> <p>My end destination ends up wrong. And with some ot...
0
2,052
How to override GLTF materials in three.js
<p>I am trying to create a dynamic way to display solar data on a gltf imported model in three.js. The aim would be to associate different solid colours to different segments of the model and be able to switch these off and on. My current hurdle is changing the colour of the material in gltf.</p> <p>I have tried using...
0
1,136
Prevent bootstrap modal closing on postback in ASP.NET
<p>I have a bootstrap modal I want to show in order to perform a search and select funcionality in a ASP.NET Web form. The problem is when the user clicks on "Search" button, the modal closes. I want the modal keeps open to show search results on GridView below and closes when the user selects any GridView item. </p> ...
0
1,379
How to create multiple SparkContexts in a console
<p>I want to create more than one SparkContext in a console. According to a post in <a href="http://apache-spark-user-list.1001560.n3.nabble.com/Multiple-SparkContexts-in-same-Driver-JVM-td20037.html#a21454" rel="noreferrer">mailing list</a>, I need to do SparkConf.set( 'spark.driver.allowMultipleContexts' , true), it ...
0
1,037
R ggplot2 legend inside the figure
<p>So, I have the following data.frame, and I want to generate two plots in one graph for yval vs. xval, for each zval and type tp. The lef</p> <pre><code>&gt; df xval yval se zval cond 1 1.0 1.831564e-02 1.831564e-03 0 a 2 1.2 2.705185e-02 2.705185e-03 0 a 3 1.4 3.916390e-02...
0
5,927
How to bind to AD server in PHP with credentials from trusted domain?
<p>We have several AD servers with established forest trust between them, so Windows users from different domains are able to get access to restricted resources. Suppose we have domainA.com and domainB.com, so any user from the domain domainB.com can login to resource on domainA.com. For security reasons anonymous acce...
0
1,116
Maven : OSGI, bundles and multi-modules projects
<p>I'm currently developing an OSGi based application (using Equinox) by trying to mavenize a web tutorial I've found on OSGi+Equinox. In this project, there are bundles depending on other bundles (quote-service depends on quote). The compile phase does succeed, but the package phase does not. Maven complains the follo...
0
2,276
How to change Header in WebClient
<p>I am trying to upload images to ImageShack using the API. I think they require the form to be <code>multipart/form-data</code>. I tried to do the below ...</p> <pre><code>var wc = new WebClient(); wc.Headers.Add("Content-Type", "multipart/form-data"); ... var fs = new FileStream(@"filepath", FileMode.Open, FileAcce...
0
1,979
How to handle different authentication exceptions in Spring security 3.1?
<p><strong>First I want to comment that I already checked the other questions in Stack Overflow and implemented my own approach based on the answers: <a href="https://stackoverflow.com/a/14425801/2487263">https://stackoverflow.com/a/14425801/2487263</a> and <a href="https://stackoverflow.com/a/16101649/2487263">https:/...
0
2,589
Error when trying to write to hdfs: Server IPC version 9 cannot communicate with client version 4
<p>I am trying a write a file to hdfs using scala and I keep getting the following error </p> <pre><code>Caused by: org.apache.hadoop.ipc.RemoteException: Server IPC version 9 cannot communicate with client version 4 at org.apache.hadoop.ipc.Client.call(Client.java:1113) at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC...
0
1,069
SpingREST: Could not open JPA EntityManager for transaction; nested exception is org.hiberna
<p>When I start Postman to see my <code>SpringREST</code> service running I get following error:</p> <pre><code>{ "timestamp": 1506965117328, "status": 500, "error": "Internal Server Error", "exception": "org.springframework.transaction.CannotCreateTransactionException", "message": "Could not open ...
0
4,346
npm install: 'bower install' exited with error code 1
<p>I want to programm widgets for <strong>XBee ZigBee Cloud Kit</strong>.</p> <p>To do it, I need first to set up everything. I'm using this <a href="https://github.com/digidotcom/xbeezigbeecloudkit" rel="nofollow">guide</a>.</p> <p>After failing repeatedly the automated setup I started the <strong>Manual setup</stro...
0
1,075
requests.get in python giving connection timeout error
<p>Language Ver: Python 3.6.3<br> IDE Ver: PyCharm 2017.2.3 </p> <p>I was trying to parse a weather website to print weather for a place. As I am learning Python, previously I used <strong>urllib.request.urlopen(url).read()</strong> and it worked. Now, I am modifying the code to <strong>BeautifulSoup4</strong> and <s...
0
2,233
Angular Material 2 how to update table data after edit without refreshing page?
<p>I used angular material 2 to display a table of data as an order each row. I instantiated <code>currentTradesData = new MatTableDataSource();</code> then initialize it in <code>ngOnInit</code>. The next action is when I cancel an order, the api returned a successful result, but that order row still shows <code>cance...
0
1,468
Convert strings in column into categorical variable
<p>I'd like to transform columns filled with strings into categorical variables so that I could run statistics. However, I am having difficulty with this transformation because I'm fairly new to Python.</p> <p>Here is a sample of my code:</p> <pre><code># Open txt file and provide column names data = pd.read_csv('sam...
0
1,653
Set visibility of TextView in android not working
<p>My program runs into a runtime exception when I try to make the view 'GONE'. My code that handles it:</p> <pre><code>setContentView(R.layout.list_main); ... lv = getListView(); View header = (View) findViewById(R.id.header_layout_root); TextView tv = (TextView) header.findViewById(R.id....
0
1,165
Android - How to circular zoom/magnify part of image?
<p>I am trying to allow the user to touch the image and then basically a cirular magnifier will show that will allow the user to better select a certain area on the image. When the user releases the touch the magnified portion will dissapear. This is used on several photo editing apps and I am trying to implement my ...
0
1,276
Jackson @JsonProperty(required=true) doesn't throw an exception
<p>I am using jackson 2.2 annotation @JsonProperty with required set to true. While deserializing json file which doesn't contain that property via ObjectMapper readValue() method no exception is being thrown. Is it supposed to work in a different way or did I missed something?</p> <p>My dto class:</p> <pre><code>pub...
0
1,073
Phonegap Android internet not working
<p>I am writing my first app in Phonegap and I have been testing it on an Android device. I believe I have granted the appropriate permission:</p> <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt; </code></pre> <p>But the map is not showing up. I am trying to get a latitude and longitude...
0
2,285
cocktail party algorithm SVD implementation ... in one line of code?
<p>In a slide within the introductory lecture on machine learning by Stanford's Andrew Ng at Coursera, he gives the following one line Octave solution to the cocktail party problem given the audio sources are recorded by two spatially separated microphones:</p> <pre><code>[W,s,v]=svd((repmat(sum(x.*x,1),size(x,1),1).*...
0
1,620
How to display Double value on edittext- android
<p>I am creating an application which takes numerical vales from the edittext, does calculation on them like calculation of discount, change of currency etc and then display them on another edittext.</p> <p>I am converting values from string to Double and then again displaying it in the screen by converting double to ...
0
3,796
Call to a member function getClientOriginalName() on array laravel
<p>I'm trying to post an image from a one to many relationship while also doing the CRUD (create part), but I am having some trouble doing it. I keep on getting this error<code>,Call to a member function getClientOriginalName() on array</code>, whenever I try to use associate to define the relationship together with us...
0
1,356
Indicate required properties of complex input parameter object in Swagger UI
<p>In this method </p> <pre><code>/// &lt;summary&gt; /// Gets activity logs. /// &lt;/summary&gt; /// &lt;param name="locationId"&gt;Location id.&lt;/param&gt; /// &lt;param name="filter"&gt;Activity log filter options.&lt;/param&gt; /// &lt;response code="200"&gt;OK&lt;/respo...
0
1,027
JNI C++ DLL - 'UnsatisfiedLinkError: %1 is not a valid Win32 application'
<p>I am trying to actually get JNI working before I dive in with my actual code, but after I compile a DLL from C++ and run my Java application I get:</p> <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: &lt;snip&gt;\workspace\JNI test\native\jnitest.dll: %1 is not a valid Win32 application at...
0
1,262
Kubernetes Cluster-IP service not working as expected
<p>Ok, so currently I've got kubernetes master up and running on AWS EC2 instance, and a single worker running on my laptop:</p> <pre><code>$ kubectl get nodes NAME STATUS ROLES AGE VERSION master Ready master 34d v1.9.2 worker Ready &lt;none&gt; 20d ...
0
1,333
MVC main menu and selected submenu
<p>I am creating a menu for the MVC music store application. Currently it looks like this <img src="https://i.stack.imgur.com/t0yDn.png" alt="As you can see I have the index view CSS selected not the About view"></p> <p>As you can see I have the Home sub level menu selected when in fact I am on the About View.</p> <p...
0
1,589
how to close a frame when button clicks
<p>I am new to Java Swing. I am creating a frame with some components.</p> <p>I have to close the frame and open another frame when the button is clicked. I had tried <code>setVisible(false)</code> but it only hides the frame, not closing it. When I use <code>System.exit(0)</code>, it closed all the frames.</p> <p>I ...
0
2,996
mySQL password policy refuses all attempts to create user
<p>My current installation of mySQL/phpMyAdmin on my ubuntu server is refusing to allow any user to be created with any password I have tried. The error is always:</p> <p><code>ERROR 1819 (HY000): Your password does not satisfy the current policy requirements</code></p> <p>I have never had this error before with othe...
0
1,164
Laravel 5 - How to check username & password is match with table?
<p>I have created the below login form in <code>Laravel 5</code> and I want to simply check if the username &amp; password matches with that of the database table and if so, redirect to the dashboard page else stay on the login page. I am also trying to find the solution by myself but I am posting this question to get ...
0
1,904
Unparseable date error on Java
<pre><code>import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; import java.util.Scanner; import java.util.TreeMap; public class L10C { public static void main(String[] args) throws Exception { File f = new File("src/Birthdates.txt"); Scanner inp...
0
1,191
Postfix stack calculator
<p>I've created a stack calculator for my Java class to solve equations such as </p> <pre><code>2 + ( 2 * ( 10 – 4 ) / ( ( 4 * 2 / ( 3 + 4) ) + 2 ) – 9 ) 2 + { 2 * ( 10 – 4 ) / [ { 4 * 2 / ( 3 + 4) } + 2 ] – 9 } </code></pre> <p>We are suppose to implement <code>{ } [ ]</code> into our code. I did it with just parent...
0
3,610