Quantcast
Channel: User LuckyLuke - Stack Overflow
Browsing latest articles
Browse All 37 View Live
↧

Comment by LuckyLuke on Handling errors in Swift

Yes, you mean that I should pass the error object to the completion handler as is. But how do I know, in the other end, which error it was?? Do I need to run into the error first then, log it and then...

View Article


Comment by LuckyLuke on How to keep Quotes For Making proper SQL Query

Use prepared statements

View Article


Comment by LuckyLuke on Checkmarks in UITableViewCells showing incorrectly

Do you want only one cell to be checked at the same time?

View Article

Comment by LuckyLuke on Handling errors in Swift

So what about the situation where the moveItemAtURL fails? How do you handle that, what should I do with it. How would the code example I gave look for the caller? What should the code look like. I...

View Article

Comment by LuckyLuke on Handling errors in Swift

Thank you for answering. So do you create one huge Enum with all the error codes in the application, no matter where they come from? And how should I know which error codes to catch if there are nested...

View Article


Comment by LuckyLuke on Handling errors in Swift

Thank you, many good points that I will bring with me when I am experimenting. However, I have some questions. It seems like it is the handleError method that do "all" the error handling, am I correct?...

View Article

Comment by LuckyLuke on Internationalization/localization of data in Parse?

Didn't you read my question? I am stating that I am using Parse and I wonder how to add localization for my data.

View Article

What is a graphic context? (iOS)

What exactly is a graphic context? When drawing with Core Graphic we get a reference to the context. When I look at the documentation it seems like it is an object or so that take care of the correct...

View Article


Answer by LuckyLuke for Using a regular expression to validate email addresses

What you have written works with some small modifications if that is what you want to use, however you miss a '+' at the end.1) ^[a-zA-Z0-9]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]+$ The caret and dollar character...

View Article


JPA @GeneratedValue(strategy=GenerationType.AUTO) does not work on MySQL

I have an entity that is supposed to get an id from the database automatically. I use MySQL so I would expect annotating that @GeneratedValue(strategy=GenerationType.AUTO) would resolve to IDENTITY...

View Article

JBoss 7.x or JBoss EAP 6.x

I am installing JBoss but I don't understand which version to choose. Should I download JBoss 7.x or the JBoss EAP 6.x? What is the difference?

View Article

Generate tables from entities in IntelliJ 11 IDEA

Are there no option to generate tables from entities in IntelliJ? Using JPA and eclipselink as implementation. Trying to generate tables for MySQL. All I see is options for importing.Do I have to use...

View Article

Where to find all available Java mail properties?

Where do I find a list of all available Java mail properties that I can pass to the Session object? I am only able to find basic properties in the API. Browsing blogs to find some more properties isn't...

View Article


URIs for composite objects in RESTful web service

I have created the paths:POST /books/4/chapters The Chapter entity is part of the Book composition. It can not exist in the system without a book. Now after creating a chapter by posting to the URI...

View Article

How to add placeholder attribute to JSF input component?

Shouldn't this line of code render a inputtext field with the placeholder text "fill me" when using html5? <h:inputText placeholder="fill me" />I do not see any placeholder text. I thought...

View Article


How to use enum values in f:selectItem(s)

I want to make a selectOneMenu dropdown so I can select a status on my question. Is it possible to make the f:selectItem more flexible considering what happens if the order of the enums changes, and if...

View Article

Granting permission in Spring Security Acl

I am using Spring Security ACL. When I save an object I also create a new ACE (Access Control Entry). I am using this method:acl.insertAce(acl.getEntries().size(), BasePermission.CREATE, recipient,...

View Article


Shards and replicas in Elasticsearch

I am trying to understand what shard and replica is in Elasticsearch, but I didn't manage to understand it. If I download Elasticsearch and run the script, then from what I know I have started a...

View Article

Unable to embed YouTube video with YTPlayerView NSCocoaErrorDomain Code=258

Embedding YouTube videos with YTPlayerView doesn't work. It only gives me this error in the log:2015-12-12 20:19:45.229 Wax-room[8545:3426005] Received error rendering template: Error...

View Article

What are the purpose of intent categories?

Could someone please explain me the purpose of Intent categories? When should I make my own and so on? The only thing thats written about Intent categories in my book is that they can group intents?.

View Article

Image may be NSFW.
Clik here to view.

Jenkins does not start properly after reboot on GCE

If I need to restart Jenkins due to installing a plugin for instance the slaves are never turned on. I am using Google Compute Engine. I followed this...

View Article


When to use a "has_many :through" relation in Rails?

I am trying to understand what has_many :through is and when to use it (and how). However, I am not getting it. I am reading Beginning Rails 3 and I tried Googling, but I am not able to understand.

View Article


MultipleBagFetchException thrown by Hibernate

I want to have an option in my repository layer to eager load entites, so I tried adding a method that should eager load a question entity with all the relationships, but it throws...

View Article

Why do we use a DataSource instead of a DriverManager?

I am reading the Java JDBC specification (vr. 4) and I encountred this statement:DataSource — this interface was introduced in the JDBC 2.0 Optional Package API. It is preferred over DriverManager...

View Article

Docker: Multiple Dockerfiles in project

How do you organize the Dockerfiles belonging to a project when you have one Dockerfile for the database, one for the application server, and so on? Do you create some sort of hierachy in the source?A...

View Article


Margin/padding in GridBagLayout Java

Is it possible to set an margin/padding in GridBagLayout for the whole row/column? I use the inset on the constraints-object however, using this approach I need to set padding from bottom on every...

View Article

Using Spring MVC Test to unit test multipart POST request

I have the following request handler for saving autos. I have verified that this works when I use e.g. cURL. Now I want to unit test the method with Spring MVC Test. I have tried to use the...

View Article

How does apply-templates work?

I have just started learning XSL(T) and I wonder how apply-templates work? I do not understand the recursively applies templates part of it as it is written in my book.I understand the XPath-part of...

View Article

Difference between one-to-one and one-to-many relationship in a database

When having a one-to-one relationship in a database the other table has a foreign key ID (in this example). And in a one-to-many relationship the table contains many foreign keys.But does the database...

View Article



What is an index in Elasticsearch

What is an index in Elasticsearch? Does one application have multiple indexes or just one?Let's say you built a system for some car manufacturer. It deals with people, cars, spare parts, etc. Do you...

View Article

How to POST JSON and a file to web service with Angular?

How do I send a POST request with AngularJS? The JSON part is required but the file is not. I have tried this based on other blog posts but it does not work. I get a Bad request 400 error.var test = {...

View Article

Equal height of UICollectionViewCell's and UICollectionView

How am I supposed to set the height of the cells in UICollectionView equal to the height of whatever the collection view is? The code below doesn't work because the collection views height is not known...

View Article

Should I use @EJB or @Inject

I have found this question: What is the difference between @Inject and @EJB but I did not get any wiser. I have not done Java EE before nor do I have experience with dependency injection so I do not...

View Article


How to get URL for application's document directory iPhone

This code is a part of Core Data. The URLsForDirectory....method does not run on iOS < 4 so I need to know some other methods/objects to call. I would also appriciate documentation for future...

View Article

What are "connecting characters" in Java identifiers?

I am reading for SCJP and I have a question regarding this line:Identifiers must start with a letter, a currency character ($), or a connecting character such as the underscore ( _ ). Identifiers...

View Article

Where is my app placed when deploying to Tomcat using IntelliJ IDEA?

I am deploying an application from IntelliJ IDEA to the local Tomcat server. I thought the apps you deploy are placed in the webapps folder, however it does not turn up there.Is this correct? Where is it?

View Article


Problems with making a query when using Enum in entity

I have the following in a Question entity:@NamedQuery(name = "Question.allApproved", query = "SELECT q FROM Question q WHERE q.status = 'APPROVED'")and@Enumerated(EnumType.STRING)private Status...

View Article

Browsing latest articles
Browse All 37 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>