Vlad Schnakovszki

1

votes
2

answer
1.1k

views

H2 determining if String value is numeric

This is my first time using H2 and I'm trying to select only the records that DO NOT have a numerical ID (e.g. H27384WK would be valid, but 398453 would not). After researching this online, I couldn't find any solutions for this and none of the functions mentioned here seem to be helpful. How could...
1

votes
1

answer
1.1k

views

How to tell when a Crystal Report has loaded

I am building a Winforms C# application that uses Crystal Reports. I am loading a dummy report so that the Crystal Reports components are loaded when the user opens a Report. I do this because it takes a lot of time to load the report the first time. I open a minimized, 0% opacity form containing th...
1

votes
2

answer
783

views

C# Winforms application secure connection to Access DB

I have a C# 2010 Winforms application that uses OleDb to connect to an Access 2010 database which is password protected. This is not an online application! I currently store the password in plain text in the connection string [I know this is horribly insecure] which is obfuscated using Eazfuscator.N...
1

votes
1

answer
937

views

Adding a different last page in Crystal Reports

I have a C# 2010 application that contains a report created using Crystal Reports for VS2010. Its purpose is printing an invoice for a client. I need to add a page (same for each invoice) that shows the methods by which the client can pay the invoice. This would basically require me to add a page th...
1

votes
1

answer
684

views

Crystal Reports Exception in C# Designer

I am creating a WinForms application using C# (.NET 4.5) and Crystal Reports (13.0.5.891). I am using Visual Studio 2012. I have made a few modifications to a Crystal Report (mostly renaming fields). When I go to the form that holds the report viewer, the following thing happens: The error message d...
Vlad Schnakovszki
1

votes
3

answer
2.6k

views

How to populate a DataGridViewCombobBoxColumn with values

I am using a DataGridView in a C# WinForms application and want to let the user choose between a set of values that will be the same in each cell. I suppose there needs to be a way to populate all the cells with a list of values. Using the GUI designer, I have added COL_BUSINESS_INDUSTRY, which is a...
Vlad Schnakovszki
1

votes
1

answer
401

views

Generating Excel file with Pre-poulated Dropdown Values with C#'s Microsoft.Office.Interop.Excel

I want to generate an Excel file from my C# application, which users will be able to fill in later on. I'm using Microsoft.Office.Interop.Excel. I'm launching Excel and populating the header cells using the below code: var excelApp = new Excel.Application {Visible = true}; var workbook = excelApp.Wo...
Vlad Schnakovszki
1

votes
2

answer
8.4k

views

Update DataSet in Crystal Reports

I have little to no experience in using Datasets and Crystal Reports so please don't bash me if the answer is really obvious, I didn't manage to find the answer on-line. I have a C# Winforms application, containing a Crystal Report that takes its data from a DataSet. I populate the DataSet dynamical...
1

votes
2

answer
1.3k

views

django forms: could not convert string to float

I am trying to validate a form using django forms. I have the following model: class Session(models.Model): # id = AutoField(primary_key=True) added automatically. sport = models.ForeignKey('Sport', unique=False, blank=False, null=False, to_field='sport', on_delete=models.CASCADE, ) hostplayer = mod...
Vlad Schnakovszki
1

votes
1

answer
237

views

Editing XSD or XML Files in IntelliJ IDEA is Really Slow

I'm trying to edit an XSD file in IntelliJ IDEA but it's extremely slow to the point that it freezes for a couple of seconds after typing a character. The file is about 500 lines long so size shouldn't be the issue. What is causing this and how can I fix it? Note: I'm using IntelliJ IDEA Community E...
Vlad Schnakovszki
1

votes
1

answer
134

views

'not in' not working but 'minus' working fine in Oracle DB [duplicate]

This question already has an answer here: NOT IN selection with NULL values 2 answers I am trying to get the entries from one table that are not in another, using Oracle DB. The following query does not return any records: select distinct FOO from TABLE_A where FOO not in (select distinct FOO from...
Vlad Schnakovszki
1

votes
1

answer
1.4k

views

Valgrind: Invalid read / write of size 1

I am trying to build a very basic web server using C. I have solved all of the problems reported by valgrind except this one. This is the relevant piece of code that causes it. I have added x>> to the lines that valgrind suggests: /* Set the response header. */ char *response_header = 'HTTP/1.1 404...
Vlad Schnakovszki
1

votes
1

answer
408

views

Using Django User object in Android

I have an Android application, interacting with a Django API, which also hosts a website. On the Django website, the user logs in with Google+/Facebook/Twitter (using django-social-auth) and all subsequent requests contain a user object, which identifies the user. I assume this is done via cookies....
Vlad Schnakovszki
16

votes
3

answer
31.3k

views

Django [Errno 13] Permission denied: '/var/www/media/animals/user_uploads'

I am developing a django API which will be running on top of Apache2 via WSGI on a server running Ubuntu. Users will be able to upload pictures they take to the server using a POST request. The API processes this request and then attempts to write the image to /var/www/media/animals/user_uploads//....
Vlad Schnakovszki
6

votes
1

answer
1.7k

views

Undoing git update-index --assume-unchanged

I have used the following command to add a file to the repository with some default settings, then change the settings locally without pushing them to the repo every single time: git update-index --assume-unchanged Now I need to push my local changes to the repo so I would need to undo this command...
Vlad Schnakovszki
5

votes
1

answer
1.2k

views

Clickable url value in ag-grid with react

I'm currently giving ag-grid a try and trying to build a table where if the user clicks a column value, they are taken to a page containing that entry's details. How can I make a cell value clickable in ag-grid? I've tried using valueGetter: this.urlValueGetter with columnDefs and: urlValueGetter(pa...
3

votes
3

answer
113

views

What are some examples where programmers might want to use csrf_exempt?

By default, Django offers protection against Cross-Site Request Forgery (CSRF) attacks by sending a CSRF token to webpages it generates, which is then sent back with requests to validate them. This is detailed here. Django provides the csrf_exempt decorator to disable this behaviour. What are some g...
Vlad Schnakovszki
12

votes
3

answer
4.5k

views

Java JUnit Parameterized error

I am creating a Java application based on JRE 6. I use JUnit 4 to generate parameterized tests. I am receiving this error: The annotation @Parameterized.Parameters must define the attribute value on the line containing the annotation: @Parameterized.Parameters Below is the code I believe to be relev...
Vlad Schnakovszki
2

votes
2

answer
664

views

Access database connection fails first time

I have a C# 2010 WinForms application, running on .Net Framework 3.5. This application, when launched, connects to an Access 2007 accdb database which is located in the same folder as the executable. Here is the code used to connect: public static OleDbConnection con = new OleDbConnection('Provider=...
Vlad Schnakovszki
2

votes
0

answer
144

views

Do not allow same value in different columns for the same record in django

I am building a website in django that will allow players to be matched with other players. I have the following model: class Session(models.Model): # id = AutoField(primary_key=True) added automatically. sport = models.ForeignKey('Sport', unique=False, blank=False, null=False, on_delete=models.CASC...
Vlad Schnakovszki
6

votes
2

answer
895

views

DateTime weird behaviour

I have created a C# WinForms application. On my computer the following works: DateTime.ParseExact('13/05/2012', 'dd/mm/yyyy', null) but this doesn't: DateTime.Parse('13/05/2012') On my client's computers it's reversed. This works: DateTime.Parse('13/05/2012') but this doesn't: DateTime.ParseExact('...
2

votes
3

answer
2.9k

views

“java.io.FileNotFoundException: Permission denied” in Android Internal Cache Dir

I am trying to take a picture and save it to the application's internal cache as it is going to be deleted as soon as it is uploaded. I am using the following code to create the file: public static File createInternalCacheImageFile(Context context, String imageFileName) throws IOException { return F...
1

votes
2

answer
609

views

Error Running SpringBoot Jar using init.d

I have a SpringBoot application, for which I use gradle :myapp:jar to generate an executable jar. In addition, I also had to use chmod 755 myapp.jar to make the jar executable. This is the gradle code for generating the jar, as described here: springBoot { executable = true } springBoot { executable...
Vlad Schnakovszki
2

votes
0

answer
775

views

Allow user to cancel adding of an entry in C# WinForms DataGridView

I have decided to use DataGridView in-place editing in my C# WinForms application. I want to let the user add a new row and when he moves away, store that row in the database. In this current situation, there is only one column. Also, each entry should be unique. If he enters some unique value in th...
Vlad Schnakovszki
2

votes
2

answer
1.2k

views

HTTP Parameters not being sent in Apache 2.4 breaking functionality

So let's start with some background. I have a 3-tier system, with an API implemented in django running with mod_wsgi on an Apache2 server. Today I decided to upgrade the server, running at DigitalOcean, from Ubuntu 12.04 to Ubuntu 14.04. Nothing special, only that Apache2 also got updated to version...
2

votes
1

answer
758

views

Change Crystal Reports object visibility programatically

I have a C# 2010 application which contains reports created with Crystal Reports for VS2010. For one of the reports, there is the option to print the report or e-mail it to someone [export and send via SMTP]. I want the watermark to be shown when viewing the report and also when e-mailing it. I do...
2

votes
2

answer
1k

views

AspectJ Handling of Multiple Matching Advices

I am using AspectJ in Java to log the calls to some methods. I've looked online but couldn't manage to find an answer to this: What happens when two @Around advices match for a method? Specifically, I am using two @Around advices, like this: @Around('condition1() && condition2() && condition3()') pu...
Vlad Schnakovszki
2

votes
1

answer
3.8k

views

Big Omega notation - what is f = Ω(g)?

I've been trying for the better part of an hour to find reference to the following: f = Ω(g) But I have had no luck at all. I need to answer a question for an assignment and I can't find references. The assignment is basically asking me to indicate what it (f = Ω(g)) means, in the context of the f...
5

votes
4

answer
4.2k

views

python-social-auth not getting correct Google OAuth2 details

I want to login a user using the python-social-auth functionality for Google Plus signin in Django. When logging in from my website, everything works fine and the correct details are added to the database. However, I want to authenticate from my Android application as well. The user logs in in the a...
Vlad Schnakovszki
3

votes
1

answer
75

views

Eclipse Intellisense is unreadable in Windows 8

I am using Eclipse on Windows 8 x64. The problem I have is that the Eclipse IntelliSense pop-up (not sure what its actual name is) is unreadable: This is because the background is cream and the foreground is white. I have only managed to find solutions for Ubuntu here but nothing for Windows. How ca...
2

votes
1

answer
1.5k

views

Moq mocked call returns null if using setup

I am writing tests for a C# application, using Moq. My test initialiser has the following code: UnityContainer unityContainer = new UnityContainer(); _serviceMock = new Mock(); _serviceMock.Setup(mock => mock.GetSearchInfoAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())).Callback(() => _count++...
Vlad Schnakovszki
2

votes
2

answer
1.8k

views

Hierarchical Queries in H2

I have the following query, which works fine in Oracle: SELECT ID FROM PEOPLE START WITH ID = CONNECT BY PRIOR PARENT_ID = ID; This works on a self-referencing table, which contains people. It finds the ids of all ancestors of a person. The issue is that I need this query to also work in H2, but H...
5

votes
3

answer
552

views

CellStyle based on RowStyle in WPF

I have a WPF DataGrid represented in XAML. I'm using a RowStyle for my grid's TableView but also need to set some properties for specific cells. I need those cells to have the properties of the row style and apply the extra properties from the cell style on top of those. What I would need is somethi...
Vlad Schnakovszki
4

votes
3

answer
2.6k

views

EAZfuscator not working automatically

I have a C# 2010 WinForms application using .Net Framework 4. I am using Eazfuscator.NET to obfuscate this application. If I obfuscate the executable manually, everything works fine. When I try to make the program obfuscate itself on every build by dragging the project onto the green part, everythi...
3

votes
2

answer
582

views

Where to get TwitterCore from?

I am trying to implement Twitter Login into my Android application. Apparently Twitter uses fabric in their tutorials. I have tried to sign up for fabric but I got an e-mail saying Demand is high at the moment. You’re on the list, and we’ll reach out shortly — stay tuned! Is there a way to ge...
Vlad Schnakovszki
3

votes
1

answer
468

views

Infinite loop in H2 query

I am executing the following query on an H2 database through a test ran using JUnit, on a table with 3 entries: WITH ancestors(ID, PARENT_ID) AS ( SELECT ID, PARENT_ID FROM PEOPLE WHERE ID = UNION ALL SELECT P1.ID, P1.PARENT_ID FROM PEOPLE P1, PEOPLE P2 WHERE P1.ID = P2.PARENT_ID ) SELECT ID FROM...
2

votes
1

answer
93

views

Why is Jackson Adding @ to Some JSON Attributes and How To Prevent It?

I am using Jackson in Java to return a JSON response from a REST endpoint. This is an example response that is generated: {'StatusCode':{'@statusCode':'OK'},'SomeElements':null} Questions: Why is Jackson adding the @ in? How can I stop it from adding it? Note: This question is different from this in...
Vlad Schnakovszki
4

votes
4

answer
2.3k

views

Form gets disposed on Hide()

I have a C# WinForms application running on .NET Framework 4.0. When the user is inactive for a certain period of time, I want it to hide all the displayed forms and show an icon in the notification area. When the user clicks that icon, a login form appears and if the credentials are valid, it open...
Vlad Schnakovszki
2

votes
1

answer
1.6k

views

Android Play Services Login: Google Plus cancel button is not working properly

I am trying to implement Google+ authentication in my Android application. In order to do this, I have followed this Google tutorial. When the permission dialog appears, if the user clicks SIGN IN, everything works fine. However, if he clicks CANCEL, the dialog closes for a couple of seconds and th...
Vlad Schnakovszki
1

votes
2

answer
10.2k

views

Directory.CreateDirectory does not work

I am creating an application using C# 2010 whose purpose is to copy files that have a specified extension. It uses .NET Framework 3.5 . I have the following piece of code: private void GetFiles() { bool validext; foreach (string filePath in Directory.GetFiles(SourcePath, '*.*', SearchOption.AllDirec...

View additional