Georgi Stoyanov

1

votes
1

answer
45

views

Access variable modified in function in render method

I have the following code (trimmed the form and some other boilerplate): import React, { Component } from 'react'; import Modal from 'react-modal'; var responseMessages; export default class ContactForm extends Component { handleSubmit(event) { responseMessages = [] fetch('http://127.0.0.1:4000/test...
Georgi Stoyanov
1

votes
2

answer
502

views

Error 500: .htaccess RewriteCond: bad flag delimiters

I've noticed many questions about that problem, but in my case the htaccess is very simple: RewriteEngine on #somecomment RewriteBase /restAPI/ #continue if condition is true: RewriteCond %{REQUEST_FILENAME} !-f # somecomment RewriteCond %{REQUEST_FILENAME} !-d # somecomment RewriteRule...
Georgi Stoyanov
1

votes
3

answer
1.3k

views

Drop down list with foreach iteration PHP

all I'm having little problem with : I want to make dynamic drop down list and I write this: The problem is that foreach doesen't work properly: enters only 1 time. I need to mark that when i dump categories list it shows all items. Any suggestions why is this happen? Is that a right way to make dr...
Georgi Stoyanov
2

votes
1

answer
851

views

jXLS jx:image ends with java.lang.IllegalArgumentException: imgBean value must contain image bytes

I want to put an image in XLS file template with jXLS 2.2.3 XLS template is defined as follows: Cell A1, added comment: jx:area(lastCell='L10') Cell A10, added comment: jx:each(items='rows' var='r' lastCell='L10') Cell D10, add comment: jx:image(imgBean='r.barcodeJpgImage' imageType='JPEG' lastCell...
Georgi Stoyanov
1

votes
2

answer
180

views

jQuery/JS won't redirect after validation of form

I'm trying to validate a password from a form using jQuery/JavaScript. Post-validation, I want the script to redirect me. However, this isn't currently working. Note: this is only an exercise from my university, so that's why the code is very simple: HTML: !DOCTYPE html> Password: JS/jQuery: 'use st...
Georgi Stoyanov
2

votes
1

answer
226

views

adding jXLS to my pom.xml seems to affect hibernate log level

Adding jXLS to my pom seems to affect my app Hibernate log level. The app will log hibernate DEBUG info at every second in the tomcat console (using eclipse). I add these two dependencies: org.jxls jxls 2.2.5 org.jxls jxls-jexcel 1.0.3 When I remove both, then everything will be ok. If I add any of...
Georgi Stoyanov
2

votes
3

answer
9.1k

views

Connection to database with JdbcTemplate

I'm trying to create table (h2) with jdbcTemplate. Everything is ok when I execute different queries in UsersDAOImpl class, but when I try to create table first in Application class, the JdbcTemplate can't connect to the database. I read that I need to add dependency group spring-boot-starter-jdbc t...
Georgi Stoyanov
3

votes
0

answer
461

views

Web Management Service failing at random

so we have a custom deploy script that looks similar to this msdeploy.exe ^ -source:manifest='path_to_manifest' ^ -dest:auto,ComputerName='https://host:port/msdeploy.axd?site=sitename',UserName='domain\user',Password='muhpass',IncludeAcls='False',AuthType='Basic' ^ -verb:sync ^ -enableRule:DoNotDele...
Georgi Stoyanov
2

votes
1

answer
477

views

Converting Integer to BigDecimal in Groovy

Let's assume that we have a function in groovy that takes as a parameter BigDecimal: void func(BigDecimal bd) {...} And calling it again in other class on groovy var.func(0) This is working fine, but in java it will not compile at all. I know that there is a constructor in BigDecimal that will work...
Georgi Stoyanov
72

votes
1

answer
18.1k

views

How to keep the client credentials confidential, while using OAuth2's Resource Owner Password Credentials grant type

We are building a rest service and we want to use OAauth 2 for authorization. The current draft (v2-16 from May 19th) describes four grant types. They are mechanisms or flows for obtaining authorization (an access token). Authorization Code Implicit Grant Resource Owner Credentials Client Credenti...
3

votes
2

answer
124

views

Server doesn't work with more than one connection

I've got a working simple client-server app. The problem is it works fine just with one started client, but not with two or more. It establish connection, but when you try to enter text in first or second, the server breakes. I think that problem may be at the function broadcast() in Server.java. Se...
Georgi Stoyanov
1

votes
3

answer
864

views

Python integer arithmetic: not all arguments converted during string formatting

I just write this algorithm that searches for prime palindromic (both binary and decimal) number, but I got an error: Traceback (most recent call last): File 'python', line 25, in File 'python', line 10, in isPalindromic TypeError: not all arguments converted during string formatting' I can't under...
Georgi Stoyanov
5

votes
2

answer
2.4k

views

Can I use Elastic Beanstalk to deploy workers?

By workers I mean a python script that runs some task in an infinite loop. This script should be deployed to a separate EC2 instance and run forever (perhaps using supervisor). I'm successfully using Elastic Beanstalk to deploy the web app with git aws.push and that works fine. However, the set-up f...
Georgi Stoyanov
7

votes
2

answer
4.1k

views

Tinting ImageView not working on Android 5.0. Ideas how to make it work again?

In an application I've built I noticed that the ImageViews are not tinted on devices running the new Android Lollipop. This is the code that used to work correctly on older versions of the OS: and this is the drawable that is loaded in the ImageView: Once again, this is working correctly on devices...
Georgi Stoyanov