title
stringlengths
13
150
body
stringlengths
749
64.2k
label
int64
0
3
token_count
int64
1.02k
28.5k
Authentication with JWT Lumen without password
<p>I am using JWT in lumen and am unable to get token without password only With Email and i am using this code form <a href="https://stackoverflow.com/questions/33028630/authentication-with-jwt-laravel-5-without-password">stack overflow</a> --</p> <pre><code> $user=User::where('email','=','user2@gmail.com')-&gt;firs...
1
3,380
React Redux promise error - (...).then is not a function
<p>Had a look for this in the questions that offered but <a href="https://stackoverflow.com/questions/42081085/react-uncaught-typeerror-then-is-not-a-function">this</a> was the closest and it didnt really address my problem.</p> <p>I have a code block (detailed a little way down the page) as part of a larger fetch blo...
1
2,759
How to override a C++ virtual method (not in an interface class) in C# via C++/CLI
<p>For reference, this question deals with accessing the C++ NaturalPoint Camera SDK via C#.</p> <p>I am trying to pass along the implementation of a virtual method from C++ to C#. The trouble I am having is that the C++ virtual method is not in an interface class and I am not able to change that. Here is the class de...
1
1,030
SyntaxError: Unexpected token : when running jest test with Aurelia in TypeScript
<p>Just created a new TypeScript Aurelia project using aurelia-cli . Installed bootstrap and included bootstrap css in the app.ts using import.</p> <pre><code>import 'bootstrap/dist/css/bootstrap.min.css'; import '../../static/assets/css/app.scss'; import { routes } from './routes'; interface IApp { message: strin...
1
1,237
Xamdatagrid set the selected backgroud color when alternate reocrd is true
<p>i am currently facing issue to set the backgroud color to yellow when alternate row is true </p> <p>i have grid in which few columns background is set to different colour. i have set highlightlight alterate row is to true. i have also set the yellow background when record is selected.</p> <pre><code> &lt;Window....
1
3,624
Which hashing algorithm to use for Password PHP
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/401656/secure-hash-and-salt-for-php-passwords">Secure hash and salt for PHP passwords</a> </p> </blockquote> <p>For the encrypting of the password in the php file, I want to change to <strong><em>sha256</em></s...
1
1,335
Error Merging Large PDF Files with PDFBox - Missing end of file marker '%%EOF'
<p>I have a successfully implemented a pdf merge solution using PDFBox using <code>InputStreams</code>. However, when I try to merge a document that is of a very large size I receive the following error:</p> <pre><code>Caused by: java.io.IOException: Missing root object specification in trailer. at org.apache.pdfbox....
1
2,219
Webpack Plugin: run command after assets are written to file system
<p>I've seen this question: <a href="https://stackoverflow.com/questions/30312715/run-command-after-webpack-build">Run command after webpack build</a> and I modified the sample code provided there.</p> <p>To describe my scenario, I'm trying to take the assets output by webpack and deploy them to a mounted network driv...
1
1,283
How to send POST and GET requests from Sails app to outside Sails API
<p>I am beginning to use SailsJS and i found it wonderful and powerful.</p> <p>Can anybody please explain me how to send POST and GET requests to an API outside Sails and where do i actually write this request?</p> <p>Thanks a lot and Happy 2016 everyone!!!</p> <p><strong>Edit:</strong></p> <p>Hello @arcseldon, tha...
1
1,139
Tomcat apps fail to deploy with STRICT_SERVLET_COMPLIANCE=true
<p>I am trying to deploy an application on Tomcat 8.0.39 with option STRICT_SERVLET_COMPLIANCE=true by updating apache-tomcat-8.0.39\conf\catalina.properties but as soon as I do that my application deployment fails. i.e. I start getting errors: SEVERE [localhost-startStop-1] org.apache.tomcat.util.digester.Digester.err...
1
2,143
IllegalStateException in MediaRecorder.start()
<p>I saw this question asked many times. But I didn't find a solution.</p> <p>I have a broadcast receiver in which I record calls. recorder.start() is throwing IllegalStateException. I gave all permissions in Manifest. I called recorder.prepare() (It doesn't throw any exception.)</p> <p>Did I miss anything?</p> <p>Here...
1
3,086
log in with browser and then ruby/mechanize takes it over?
<p>Is that even possible? what I need to pass to mechanize? With what url I can start then?</p> <p>I cannot manage (so far) to log into one website using mechanize so I was thinking if I can do this little workaround. I believe I can capture all cookies and everything else and then pass it to ruby/mechanize to do the ...
1
3,539
Problems with BluetoothServerSocket.accept() returning unconnected BluetoothSocket
<p>I'm working on making an Android application (EDIT1: developing on 4.0.3 on Nexsus S's) that shares data P2P over Bluetooth and have run into a nasty snag on making the two devices connect. Our app uses NFC to pass the MAC address of one device to another. The sender then creates a BlueToothServer socket instance an...
1
2,248
How can I search for substring in a buffer that contains null?
<p>Using C, I need to find a substring inside a buffer that may contain nulls.</p> <pre><code>haystack = "Some text\0\0\0\0 that has embedded nulls". needle = "has embedded"r </code></pre> <p>I need to return the start of the substring, or null, similat to strstr():</p> <pre><code>request_segment_end = mystrstr(r...
1
1,173
react-router V6 "url changes but component does not render"
<p>Despite checking all the answers already posted on stack overflow I coudn't find the solution for my case, so I'll post it.</p> <p>I'm using <strong>{Router} from 'react-router (v6)</strong> to be able to use a custom history object to be able to navigate in my redux actions.</p> <p>Here are my files:</p> <p><em>in...
1
1,217
How to set password to Active Directory account using vbscript and excel worksheet
<p>I've created a script that will export data from an excel worksheet and create an AD user. Everything works perfectly if I set the password inside the script; but I do not want to place the password in the script, I need it to pull the password from the worksheet. Every time i try to reference the cell that contains...
1
1,818
How to add Dojo tree right click context menu only for the root? not for remaining children
<p>I have created a tree using dojo. I want to add right click context menu on the root of the tree. Following is the code</p> <p> </p> <pre><code>&lt;head&gt; &lt;link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.3/dijit/themes/tundra/tundra.css"&gt; &lt;style type="text...
1
1,447
Drastic performance differences: debug vs release
<p>I have a simple algorithm which converts a bayer image channel (BGGR,RGGB,GBRG,GRBG) to rgb (demosaicing but without neighbors). In my implementation I have pre-set offset vectors which help me to translate the bayer channel index to its corresponding rgb channel indices. Only problem is I'm getting awful performanc...
1
1,430
Cannot push to remote git repo over ssh, stuck at "Writing objects: 11%"
<p>I'm having a problem where trying to do a git push hangs up while "Writing objects". This is not the common scenario of Windows and git-daemon that I have seen answered elsewhere. This is Linux to Linux, using ssh. On both the client and server, git version is 1.7.8.6.</p> <p>I've tried doing the following:</p> ...
1
1,672
How to displays image assets while migration a flutter app to flutter web?
<p><a href="https://i.stack.imgur.com/x4AEp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x4AEp.png" alt="enter image description here"></a> Trying to migrate an shrine app to flutter web but while migration unable to display images (shrine logo placed in the assets folder) at <strong>localhost</st...
1
2,103
Help with do/while and switch statements in C
<p>Trying to compile a simple switch statement with 5 choices. 1-4 produce calculations and output while #5 exits the program. I made a do/while loop so if choice 5 is entered the program will end. I get an error: </p> <pre><code>4_19.c: In function ‘main’: 4_19.c:95: error: ‘choice’ undeclared (first use in this func...
1
2,426
Error on starting weblogic server in jdeveloper
<p>Can anyone please help me to resolve this error?</p> <p>Below is the weblogic server log...</p> <p>I'm using Jdk 7, and Java Developer for ADF</p> <pre><code>Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Unrecognized option: -jrockit Process exited. ...
1
2,336
java.lang.RuntimeException: Unable to start activity ComponentInfo{...EditCity}: java.lang.NullPointerException
<p>this is the xml file. </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layou...
1
4,139
Crypto API RSA public key can decrypt data, is not asymmetric as expected
<p>The problem I am encountering is that I am able to decrypt data using the same RSA 2048-bit public key that was used to encrypt the data. It seems to me that this defeats the entire purpose of encrypting the data in the first place, if a public key can decrypt it. The only thing I can consider at this time is that I...
1
3,883
Getting rid of the 'b' in front of Python strings
<p><strong>EDIT:</strong> To save people the trouble of scrolling, the problem stemmed from the "decode" operation needing an output variable; my script failed to do this. I thought that the "for" loop would modify the variable in-situ, but this isn't the case.</p> <p>To make a long story short, I have some netCDF fil...
1
1,831
PyOpenCL Matrix multiplication
<p>I have this code for matrix multiplication using pyopenCL. My problem is that the result is wrong in some matrices, and I dont understand why. After some research i think its related with global size of something like that but i dont understand how to set that values.</p> <p>For example:</p> <p>matrices using nump...
1
1,165
php update multiple select option values in the database
<p>I have a database like this</p> <pre><code>CREATE TABLE IF NOT EXISTS `ia_pages` ( `pages_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `page_name` varchar(255) NOT NULL, `search_type` varchar(120) NOT NULL, `search_block_position` varchar(255) NOT NULL, PRIMARY KEY (`alphabet_search_id`) ) ENGINE=InnoDB ...
1
1,805
jQuery/Ajax SQL live update via PHP help
<p>I have a table that outputs all my contacts via a while loop from my database.</p> <p>my syntax is like this:</p> <pre><code>SELECT * FROM contacts WHERE id = $_SESSION['user_id'] ORDER BY name ASC LIMIT 5 </code></pre> <p>that pulls out all my data and only gives me 5 results.</p> <p>Now my goal is to have a li...
1
1,267
Failed to fetch Java packages for oracle-java8-installer
<p>We have a Vagrant Debian box with the option of installing Java and Solr 6.6. This installation setup was working until last month. Now we can not install Java.</p> <p>Installation process:</p> <p><strong>java-8-debian.list</strong></p> <pre><code>deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main d...
1
2,441
Onclick on normal button is submitting form
<p><strong>SCENARIO</strong></p> <p>I have a <code>java</code> JSP view with a long form. This was working nice. I can submit my form by pressing enter in any input field or with submit button.</p> <p><strong>NEW REQUIREMENT</strong></p> <p>In a part, I must add buttons to replace some <code>&lt;label&gt;</code> for...
1
1,227
AWS API Gateway and static HTML: "Execution failed due to configuration error: statusCode should be an integer which defined in request template"
<p>I am trying to serve a static content using AWS API Gateway. When I attempt to invoke the URL, both from the test page and from <code>curl</code>, I get the error: </p> <blockquote> <p>"Execution failed due to configuration error: statusCode should be an integer which defined in request template".</p> </blockquo...
1
1,881
Loading more rows after click event in Sortable Table Material UI table and React
<p>I'm making a sortable table component using Material UI and React. The functionality that I want to implement is </p> <ul> <li>Sortable table with 4 rows </li> <li>When user click a 'LOAD MORE', 4 more rows will be shown up below the default data.</li> </ul> <p>Currently, I added another <code>renderRows()</code> ...
1
1,969
MVC 4 postback empty viewmodel
<p>Ok so there are lots of questions regarding this, but I can't seem to get this to work. It should be simple, but I'm left scratching my head.</p> <p><strong>Controller:</strong></p> <pre><code>[HttpPost] public ActionResult Edit(BookingIndexViewModel vm) // Also tried BookingViewModel { return View(); } </code...
1
1,905
How to force download files using Laravel 5?
<p>Yes I have read the documentation. :)</p> <p>My controller method looks like:</p> <pre><code>public function download($id) { $file = $this-&gt;fileRepo-&gt;find($id); $randomDir = md5(time() . $file-&gt;id . $file-&gt;user-&gt;id . str_random()); mkdir(public_path() . '/files/' . $randomDir); $p...
1
1,130
How to save files with File API to a user-selected location in Android 11?
<p>I am very confused with <code>Scoped Storage</code> and <code>Storage Access Framework</code> (SAF) and all restrictions.. I need to use <code>File API</code>, not <code>Uri</code>, so:<br /> Android API level &lt;= 29 (Android 10) save to <code>/storage/emulated/0</code> works (with <code>requestLegacyExternalStora...
1
1,071
Firebase signInWithEmailAndPassword gives "com.google.firebase.auth not found"
<p>I am using firebase as baackend for my android studio. And also fallowed eatch and every step provided by firebase console. I created 3 Activity's</p> <ol> <li>MainActivity</li> <li>LoginActivity</li> <li>RigisterActivity</li> </ol> <p>I am able to register the user successfully but when i try to login user with e...
1
1,629
Realm throws RLMException, Only 'object' properties can be made optional, and property 'name' is of type 'string'
<pre>'RLMException', reason: 'Only 'object' properties can be made optional, and property 'name' is of type 'string'.' `First throw call stack: ( 0 CoreFoundation 0x0000000102e01c65 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010496cbb7 objc_excepti...
1
1,467
Class Cast Exception problems with TreeSet
<p>Ok, I have this problem to solve: </p> <p>Create a generic class called <code>VirtualLibrary</code> with a single attribute, <code>totalNumberOfEntries</code>, and with methods which enables the user to set and return an entry. The types of entries are <code>Book</code>, <code>Article</code>, <code>MediaResource</c...
1
1,257
JQuery and Ajax.BeginForm() posting same data twice
<p>Ok I'm a total web newbie but I must admit I'm totally hooked now. Here's my problem: </p> <p>I have a page with an MVCContrib grid and a "Add Accounts" link that brings up an Ajax form wrapped in a JQuery dialog. When I go through the workflow the first time everything works great. I can add a new item and refr...
1
2,750
How can I get hot reloading (HMR) running with Webpack 5?
<p>I am trying to get HMR running with webpack v5, but it does not work. When I modify and save a file, webpack re-compiles the project correctly, but the frontend does not update.</p> <p>I read this article and followed the instructions: <a href="https://webpack.js.org/guides/hot-module-replacement/" rel="noreferrer">...
1
1,687
Is it possible to combine @Lock with @Modifying @Query in Spring Data JPA together with Hibernate?
<p>I have a <strong>problem when using the @Lock annotation together with @Modifying @Query</strong> and the <strong>query itself performing an update statement</strong>. My test setup looks like this:</p> <ul> <li>Spring Boot Starter 1.5.3.RELEASE</li> <li>Hibernate 5.2.10.Final</li> <li>Spring Data JPA 1.11.3.RELEAS...
1
5,205
show marker only on zoom level 15 google map api v3
<p>As you can see on the map i want to hide the text (image) on all zoom level but in 15. Can you please help me? Here some exemples for zoom_changed <a href="https://developers.google.com/maps/documentation/javascript/events" rel="nofollow">https://developers.google.com/maps/documentation/javascript/events</a></p> <p...
1
4,419
Android App crashes with UnsatisfiedLinkError when using SQLCipher and Crashlytics for x86_64 and arm84_v8a
<p>I created a very minimal application, just showing "Hello World". The main activity makes a call to load the SQLCipher libraries.<br></p> <pre><code>package companydomain.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import net.sqlcipher.database.SQLiteDatabase; public ...
1
1,899
Android gradle: Exclude file from external dependencies
<p>I added <code>com.eftimoff:android-pathview:1.0.8@aar</code> to my project but when i run app i got this error:</p> <blockquote> <p>Cause: duplicate entry: META-INF/MANIFEST.MF</p> </blockquote> <p>This is <code>pathview</code> file in external libraries :</p> <p><a href="https://i.stack.imgur.com/il5er.png" re...
1
2,358
Angularjs routing: TypeError: Cannot read property 'path' of undefined
<p>I'm new to AngularJS. Can someone help me why the following routing will not work? I have a custom directive that submits a user form. After submission, it should navigate to the success page.(views/success.html).</p> <blockquote> <p>I'm getting an error upon submission. TypeError: Cannot read property 'path' o...
1
1,120
Svg animation not working in Firefox - working in chrome, opera
<p>I am using the following code for svg animation it is perfectly working in chrome and opera , but its not working in Mozilla Firefox.</p> <p>Note that all my browsers are updated. </p> <p> </p> <pre><code> &lt;defs&gt; &lt;style type="text/css"&gt; .st0{fill:#fff;;stroke:#282828;stroke-width:3;stroke-miter...
1
1,417
Custom SimpleAdapter only shows Sample Text Android
<p>Before making my own SimpleAdapter object because I wanted to change the color of the rows, I was just using new SimpleAdapter(...). Now that I am using my own custom SimpleAdapter, the row color is changing, but my text is not getting updated. I have called adapter.notifyDataSetChanged(), but it is still showing on...
1
1,297
python3 manage.py migrate exceptions
<p>I am new to django 1.7 and python3. I am using OSX. As I was following the django 1.7 documentation online,</p> <p>I tried</p> <pre><code>python3 manage.py migrate </code></pre> <p>and it resulted</p> <pre><code>Operations to perform: Apply all migrations: auth, contenttypes, sessions, admin Running migrations: ...
1
6,098
Spring microservice instance is not registering with Eureka running in port other than 8761
<p>application.yml of my microservice (client to Eureka)</p> <pre><code>spring: application: name: queue1 eureka: client: registerWithEureka: true fetchRegistry: true serviceUrl: defaultZone: http://localhost:8762/ server: port: 7777 app: id: ${random.uuid} </code></pre> <p>applicat...
1
2,679
Why a NullPointer Exception from adding to a Collection?
<p>I am doing some experimentation on why I'm getting a NullPointerException when I try to add an object to a List. Below is my code, and the StackTrace. Do you know why I'm getting a NullPointerException when I try to add an object to a List?</p> <p>This is my test class.</p> <pre><code>package com.greathouse.aggreg...
1
1,264
Align Buttons horizontally with equal spacing in linearlayout
<p>i am trying to make a Linear Layout with 5 buttons horizontally placed with equal spacing, but all the buttons size (width) should be 40dp only.</p> <p>i tried this :</p> <pre><code>&lt;LinearLayout android:id="@+id/button_layout" android:background="#DCE1DC" android:orien...
1
1,205
How to insert billing details into Woocommerce email?
<p>I am wondering how could I insert billing details (name, email and phone number) into Woocommerce email?</p> <p>Here is the code from Woocommerce-appointment plugin I'm using to send emails:</p> <pre><code>&lt;?php do_action( 'woocommerce_email_header', $email_heading ); ?&gt; &lt;?php if ( $appointment-&gt;get_o...
1
1,165
How to increase ng-repeat performance using Smart-Table?
<p>I have a problem of performance and i don't find the solution.</p> <p>Context: I need to display a lot of data ( 500 lines, 8 columns ) in a table. To displayed this data i chosed to use Smart-table because it offers good functionality but the problem is that i have a lot of data and the time of displaying data is ...
1
1,597
Validating observableArray against a condition
<p>I am trying to experiment and see if there are any clever solutions for creating custom validators that can be abstracted for neatness and reuse.</p> <p>In the jsfiddle below, I just put together a simple parent model that stores and array of Measurements (just a value and a date). In this example, I put in two req...
1
1,369
Why JSON Response is 200
<p>a) Actually I have 1 endpoint which will post to a server using volley. Also my api also have custom header &amp; custom body.The problem is when I want to get the response of JSON it will not display it. Instead it will display 200.For this I am not using form but I just get the body data from shared preference.</p...
1
1,915
How to add Markers on Google maps v3 API asynchronously?
<p>I've been following the <a href="https://developers.google.com/maps/documentation/javascript/overlays?hl=en#Markers" rel="nofollow">official documentation on how to add markers</a> on the map so far</p> <p>Nevertheless, I can see only one marker at a time max. If I try to add another one, then it doesn't work (I ca...
1
1,739
Ruby on Rails - adding CSS to text_field
<p>I created a form in Rails and when I add a CSS class to a text_field the form will not submit. </p> <p>I am still new to rails so any help would be much appreciated. </p> <p>This is my form: </p> <pre><code>&lt;% @page_title = "Contact" %&gt; &lt;hr&gt; &lt;div class="col-lg-12"&gt; &lt;h1...
1
1,208
Unknown provider: toasterProvider <- toaster <- RugHttpInterceptor <- $http <- ng1UIRouter
<p>I am working on Interceptors to display a toast msg if my app caught a http error in responseError code. I am using <strong>AngularJS Interceptor</strong>. It is an MEAN.JS app.</p> <p><strong>Interceptor Code</strong></p> <pre><code>angular.module('rugCoPro') .factory('RugHttpInterceptor', ['$q', 'Session', '$st...
1
2,711
heroku toolbelt breaks rails
<p>I'm in the middle of learning rails, and I'm trying to get heroku up and running. When I install the heroku toolbelt, though, produces a number of errors. If i try to run any rails command, I get something like this:</p> <pre><code>C:\Users\Ezra\Desktop\Sites\demo_app&gt;rails -v C:/Program Files (x86)/ruby-1.9.3/...
1
1,633
React Passing state to sibling component and up to parent class
<p>Very very new to React and I seem to be stuck. This is a simple Todo app, I basically have 3 components, the base component, an input component and a task component. I have figured out how to edit the state within each component but I am having trouble passing state from component to component. </p> <pre><code>clas...
1
1,330
Windows Task Manager Schedule VBA Macro to Send An Email Using OutLook Daily Running Manually and Not Automatically
<p>I have my macro which is running, &amp; for this I created a vb script and used windows task manager to schedule its run every day.</p> <p>Whenever I run manually or attempt changing the time in the trigger, I always make sure that both excel and outlook are not running. If I run the macro in Excel VBA, it sends th...
1
1,108
How to read dynamic properties from database
<p>I will try to explain my scenario the best way I can. I have the following tables in my database:</p> <pre><code>Products{ProductId, CategoryId ...} Categories{CategoryId ...} CategoryProperties{CategoryPropertyId, CategoryId, Name ...} PropertyValues{ProductId, CategoryPropertyId, Value ...} </code></pre> <p>So t...
1
1,390
java.lang.IllegalArgumentException: java.text.ParseException: End of header
<p>I encounter <code>IllegalArgumentException</code> while sending a post request to the restful web-service. If i comment the method for post request(<code>getEmplByPostReqParam()</code>) then, code works fine for get request but with <code>getEmplByPostReqParam()</code>, all request throws <code>IllegalArgumentExcept...
1
3,627
VHDL Simulation Stopping by itself
<p>I dont get this, simulation just stops after "taster" signal becomes "1", no idea why. In Xilinx IDE package testbench.</p> <pre><code>entity komb is Port ( reset : in STD_LOGIC; clk : in STD_LOGIC; levo_ndesno : in STD_LOGIC; dogadjaj : in STD_LOGIC; taster : in ...
1
5,737
Sending protobuf from C++ to Java
<p>I am trying to send a protobuf from a C++ application to a Java application via a socket. I am using a simple socket on mu C++ program to send the protobuf. I have serialized it to a char buffer before I send it via the network. On my Java(server) program, I use a ServerSocket to receive the data. </p> <p>I have ...
1
3,559
ReDraw AMChart on dropdown select
<p>What is the best way to redraw a line graph when selecting an option from a dropdown? You can see I have 3 variables that match up to the 3 options in my dropdown but I cant figure out how to change the dataProvider and redraw the chart when I select a different option.</p> <h3>View</h3> <pre><code>&lt;select id="...
1
1,526
React input checkbox checked
<p>I have use React-redux and styled components for my app. I store my initial state theme as a string which is light and dark. then I connect my styled components intial light theme and dark theme in my root app. My dark mood works fine when i used select options but when i used input checkbox it does not work. I neve...
1
1,429
java.lang.IllegalStateException: You cannot call Glide.get() in registerComponents(), use the provided Glide instance instead -- Glide Version 4.9.0
<p>Migrated from Gilde 3.7.0 to Glide 4.9.0.</p> <p>Defined my MyAppGlideModule as below.</p> <pre><code>@GlideModule public class MyAppGlideModule extends AppGlideModule { private static final int IMAGE_DISK_CACHE_MAX_SIZE = 250 * 1024 * 1024; @Override public void applyOptions(@NonNull final Context c...
1
2,369
key map sublimeREPL commands in Sublime Text 2
<p>I'm trying to map keyboard shortcuts for SublimeREPL plugin commands. Looking at SublimeREPL it looks like a menu item command is defined as:</p> <p><a href="https://github.com/wuub/SublimeREPL/blob/master/config/Scala/Default.sublime-commands" rel="nofollow">Default.sublime-commands</a> { "caption": "S...
1
1,745
SVG to PDF conversion working for Plotly.js but not for C3.js
<p>I am using css2pdf for saving my svg chart to pdf after onclick event. It works nicely for plotly.js, but not for c3.js - please see my fiddle: <a href="http://jsfiddle.net/3hs7cs4f/" rel="nofollow noreferrer">http://jsfiddle.net/3hs7cs4f/</a></p> <p>I am sure it has to do something with the c3.js svg properties, b...
1
1,254
Dynamic Page/Replacing Content with a twist (wordpress)
<p>I'm wondering how hard it would be to dynamically replace content in a wordpress site through the use of JQuery. This is the article I'm going off of: <a href="http://css-tricks.com/6336-dynamic-page-replacing-content/" rel="nofollow">http://css-tricks.com/6336-dynamic-page-replacing-content/</a></p> <p>My basic id...
1
2,012
[Jmeter]exception in phase 'semantic analysis' in source unit 'Script1.groovy' Unsupported class file major version 61
<p>i have installed the latest version of jmeter using brew install jmeter</p> <p>and i have installed the jmeter plugin manager too.</p> <p>When i start to run the test i get the following errors.</p> <pre><code>2021-09-29 20:09:47,167 INFO o.a.j.u.JMeterUtils: Setting Locale to en_EN 2021-09-29 20:09:47,190 INFO o.a....
1
6,517
ERROR 2006 (HY000) at line MySQL server has gone away
<h1>Problem</h1> <p>I encountered this error during a Mysql DB dump and restore. None of the solutions posted anywhere solved my problem, so I thought I post my own answer I found on my own for posterity.</p> <ul> <li><b>Source Env:</b> CentOS 4 i386 ext3, Mysql 5.5 dump, Most tables engines are MySIAM, with a few In...
1
1,140
parsing email with mime4j
<p>I encountered a problem when parsing email with mime4j. The email has an attachment, and I use MimeStreamParser to parse it. The parser does not call startMultipart method at all. Instead, it only calls body method once, and the BodyDescriptor is "text/plain".</p> <p>I do not know the root of this problem, the emai...
1
2,771
Is it possible to use Kibana generated query to delete from Elasticsearch?
<p>I have accidentally loaded some data into Elasticsearch from Logstash. </p> <p>Basically, I forgot to include <code>start_position =&gt; "beginning"</code> in the Logstash config, so if I delete <code>.sincedb_*</code> and re-run I'll have a small portion of data that is duplicated.</p> <p>I've used Kibana to see...
1
1,433
How do I use filter_map() rather then filter() combined with map() without performance decreasing?
<p>I would like to use <code>filter_map()</code> instead of <code>unwrap()</code> in the <code>map()</code> and <code>filter()</code> but I see a performance decrease when doing this. How do I write the code using <code>filter_map()</code> without losing performance? Why is there a loss of performance in the first plac...
1
1,710
Make every tab the same width and also expandable
<p>I'm trying to achieve something like the tabs from a Browser. All tabs must have the same width and also be expandable so when there are a lot of them they need to resize and fit the window (exactly like Chrome or Firefox does).</p> <hr> <p><strong>The Problem:</strong></p> <p>If a tab have more text then the oth...
1
1,533
Having troubles compiling Java programs
<p>Sorry I couldn't be more specific with the question itself. Here's what I'm running: Windows 7 64bit, JDK v7, JRE v7 (64 bit), and JRE v6 (32 bit). I'm pretty new when it comes to Java, however I do know how to compile a program and all that stuff. I kept getting an error when I tried running my compiled programs:</...
1
1,969
Error when updating my Ruby version using RVM on Mac OS X 10.6.6
<p>I tried to update Ruby in my Mac OS X 10.6.6 system. Now I have 1.8.7, and I want to update to 1.9.2. When I typed <code>rvm install 1.9.2</code> I got:</p> <pre><code>gal-harths-iMac:~ galharth$ rvm install 1.9.2 /Users/galharth/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)... ruby-1...
1
1,066
"bundler: failed to load command: thin" on Heroku
<p>I'm using Ruby 2.2.7, and Rails 3.2.21, and trying to deploy an with gem: <code>locomotive_cms</code> of version: <code>~&gt; 2.5.7</code> on Heroku, and it gets deployed successfully, but I'm facing the following error:</p> <blockquote> <p>2017-08-12T23:33:13.732440+00:00 app[web.1]: bundler: failed to load com...
1
1,047
Assembly program that finds second largest value in array
<p>I wrote a assembly program that finds the max value in an array, but now I would like it to find the second largest number in the array. How would I modify my program to do this? </p> <p>This is the program I wrote and it does work. The program prints all the values in the array and then finds the max value of the ...
1
1,354
How to move inline Javascript from HTML to .js files
<p>I'm working on creating a basic web based game using the HTML5 canvas and JavaScript. Although I have done some work with the HTML5 canvas before, it hasn't been too extensive and so it hasn't required too much JavaScript- meaning I wrote the JavaScript in script tags in my .html file.</p> <p>With the file I'm curr...
1
1,541
React index.html rendered but react component does not
<p>i couldn't figure out why ReactDOM does't render my simple component but seems to keep and render just the plain index.html</p> <p><a href="https://i.stack.imgur.com/XjaZm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XjaZm.png" alt="enter image description here"></a></p> <p>package.json</p> ...
1
1,630
LinearLayout onclick does not translate after TranslateAnimation
<p>Here is my problem. I have a LinearLayout that has clickable=true for an onTouch Event so that when the LinearLayout is touched, it slides up the screen. This works, but afterward when the onTouch Event is fired from the new location nothing happens. </p> <p>Steps:</p> <ol> <li>I touch the LinearLayout and it...
1
3,783
ItemsControl clickable items
<p>I've made an app that streams video from a video device and added the ability to take screenshots of the video, when a capture is taken it shows up in the ItemsControl with the rest of the captures taken.</p> <p>My question is how can i make each item "image" shown in the ItemsControl clickable so i can preview it ...
1
4,255
iterate over items in QTableWidget
<p>I have created a simple table with the <code>QTableWidget</code> class and inserted some data. </p> <p>I thought iterating over the table would be fairly easy like</p> <pre><code> for item in self.table_widget.items(): print(item) </code></pre> <p>this code obviously doesnt work, but is there a pytho...
1
1,085
Loop unrolling to achieve maximum throughput with Ivy Bridge and Haswell
<p>I am computing eight dot products at once with AVX. In my current code I do something like this (before unrolling):</p> <p>Ivy-Bridge/Sandy-Bridge</p> <pre><code>__m256 areg0 = _mm256_set1_ps(a[m]); for(int i=0; i&lt;n; i++) { __m256 breg0 = _mm256_load_ps(&amp;b[8*i]); tmp0 = _mm256_add_ps(_mm256...
1
2,486
Error including <vector> in Netbeans (C++)
<p>This is odd. I'm getting errors for including <code>&lt;vector&gt;</code>: (edit: works fine with <code>&lt;list&gt;</code> but I don't want to forsake vectors)</p> <pre><code>g++.exe -c -g -MMD -MP -MF build/Debug/Cygwin-Windows/main.o.d -o build/Debug/Cygwin-Windows/main.o main.cpp from Memory...
1
1,784
Verify X-Hub-Signature from Facebook
<p>I'm something of a beginner with the Play Framework (2.5 and Scala in this case) - and I'm trying to learn by building a bot for Facebook messenger. However I've gotten stuck trying to verify the signature of the messages.</p> <p>I've followed the Facebook documentation and created a webhook. Which handles POST req...
1
1,076
Using JSR-303 with custom validation
<p>Dear Spring community,</p> <p>What I am trying to implement is the following:</p> <ul> <li>I would like to have a custom validator per controller (<a href="http://forum.springsource.org/showthread.php?103761-Spring-validation" rel="nofollow">via <code>@InitBinder</code></a>)</li> <li>I would like Spring to call <c...
1
1,394
How to generate a word search grid that enables words using the same letter
<p>I'm trying to make a word-search grid with a list of given words. My problem is that some of the words don't appear properly.</p> <p><strong>I have updated the code, see below</strong></p> <p>I have tried to fix the previous error and now I am getting an out of range error that i cant fix, if anyone can help I wou...
1
1,123
Django REST Framework @detail_route not working as expected
<p>I can't get @detail_route to work as I think it is supposed to.</p> <p>I have two API calls I want to handle:</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>/movie/ /movie/highlight</code></pre> </div> </div> ...
1
1,187
WICKET: Can't instantiate page using constructor when using DatePicker
<p>This time I have problem on putting DatePicker on my wicket Page. <br><br> My code is follows:<br></p> <pre><code>public class StateDB extends BasePage { private Date date = new Date(); public StateDB() { Form form = new Form("form"); DateTextField birthDate = new DateTextField("birthDate", ...
1
2,272
Keyboard Event - Pygame
<p>Does anyone know how I can make it so my code only fires a bullet if the space bar is pressed? Right now any key makes my character shoot a bullet but I want to change it if possible, heres my code so far:</p> <pre><code>import pygame, sys, random pygame.init() screen_width = 800 screen_height = 600 screen = pyga...
1
1,448
Fixed table header does not match column width of the body
<p>I just want my table to have a vertical scrollbar and I ended up containing the whole table in a div, make the table head in a fixed position and this was the result. Is there a easy way to have a simple scrollbar in a table and does not cut the width of my table while keeping the table at the middle of the page.</p...
1
1,893
Rmarkdown not working on Win 10 machine: openBinaryFile: does not exist (No such file or directory)
<p>I am not able to knit html, pdf, or word. Same error each time: </p> <pre><code>"C:/Users/bosr/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to docx --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+smart --output test.docx --highlight-style tango pandoc.exe: test.utf8....
1
1,995
error starting pm2 in cluster mode in windows
<p>I am getting an error while starting pm2 in cluster mode. I ran this command -</p> <p><code>pm2 start &lt;filename&gt; -i 4</code></p> <p>Only one instance gets created. I am using Windows 7, Node 0.12.0 and pm2 0.14.0</p> <p>This is my error log</p> <blockquote> <p>2015-06-18 10:52:04: [PM2][WORKER] Started ...
1
1,712
spring-boot Autowired DiscoveryClient RestTemplate UnknownHostException
<p>I'm using spring boot 1.3.3</p> <pre><code>&lt;parent&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt; &lt;version&gt;1.3.3.RELEASE&lt;/version&gt; &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt; &lt;/paren...
1
1,206
PHP iconv greek/cyrillic transliteration does not work
<p>i have the following test code:</p> <pre><code>setlocale(LC_ALL, 'en_US.UTF8'); function t($text) { echo "$text\n"; echo "encoding: ", mb_detect_encoding($text), "\n"; // transliterate $text = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $text); echo "iconv: ", $text, "\n"; } // Latvian alphabet ...
1
1,238
Simple docker-compose with two services: nginx and php
<p>I'm beginning with <a href="https://en.wikipedia.org/wiki/Docker_%28software%29" rel="nofollow noreferrer">Docker</a> and <a href="http://en.wikipedia.org/wiki/Nginx" rel="nofollow noreferrer">nginx</a>, and I'm trying to setup a two container environment running:</p> <ul> <li><code>nginx:latest</code> on one side<...
1
1,488