usr

1

votes
1

answer
158

views

Issue with Jackson's polymorphic serialization of AtomicLong

I need to do a polymorphic-serialization of a Java class containing an AtomicLong is its tree. I initialize ObjectMapper of Jackson 2.9.2 as follows private final static ObjectMapper objectMapper = new ObjectMapper()/// .findAndRegisterModules()// .enableDefaultTyping(DefaultTyping.NON_FINAL, As.WRA...
1

votes
0

answer
26

views

Correct way of annotation-caching with multiple entry points

I am starting to use JSR 107/Spring cache annotations. I am preferring JSR annotation over Spring-specific for the moment, simply because they are standard-ish. I have a lookup entity that I can query and modify in different ways. The concept is that I want to cache data found on database at least u...
1

votes
1

answer
933

views

boto s3 - write a csv file using array

I want to upload a file to s3 without writing the file on my local system, so I am using set_contents_from_string of boto library. I am able to upload this file back to s3. But how to write an array to a csv file using boto library. arrlist = [[2, 'jack'], [3, 'john'], [4, 'robert']] file_name = 'te...
usr_11
1

votes
0

answer
41

views

Cross origin error while posting data - ajax

I am testing my api as below: Send function sendData(){ var sendInfo = { 'name' : 'test' }; $.ajax({ //headers: { 'Access-Control-Allow-Origin': '*' }, beforeSend: function(xhr) { xhr.setRequestHeader('Access-Control-Allow-Origin', '*'); xhr.setRequestHeader('Content-Type','application/json'); xh...
usr_11
1

votes
0

answer
804

views

“Cannot dispatch without an AsyncContext” when serving files

I need to write a 'disposable file download' MVC controller on top of a 'file download controller'. Once a file has been transferred to the client, it must be deleted from the server. Initially, the code was written to serve files import org.springframework.core.io.Resource @GetMapping('/get/{somePa...
1

votes
2

answer
35

views

Json object from BeanShellPreprocessor is not replaced in HTTP Request

This is the Hierarchy i have on my Testplan I have Beanshell preprocessor as below: import org.json.JSONArray; import org.json.JSONObject; JSONObject obj = new JSONObject(); obj.put('customerId', '1234'); obj.put('dataSourceName', 'ABCD'); JSONArray relateddata = new JSONArray(); relateddata.add('ab...
Usr_Dev
1

votes
2

answer
227

views

How to read the redirect target of an ASP.NET request

For logging purposes i want to log the redirect target of the current request to a database. how can i read the readirect target of the current request. keep in mind that i do not want to log on every Response.Redirect. I want the logging to take place in a central location. this location might be A...
usr
1

votes
1

answer
128

views

HTTP file upload: Can I rely on the browser always sending a file name?

According to this great article about HTTP uploads by Scott Hanselman, the browser typically sends a file name with the file's contents. Can I rely on the file name always being transmitted or do I have to give the user the option to enter a name if none was submitted? (If a name was submitted I do...
usr
1

votes
3

answer
3.5k

views

Making UDP lose less messages in .NET/Mono

we are currently performing some benchmarks for an open source academic project, Logbus-ng. It basically implements Syslog protocol over UDP (RFC 5426) and TLS (RFC 5425). We know that the advantage of TLS is reliability (ie. we won't lose messages) but with the drawback of performance. We have a be...
1

votes
1

answer
306

views

Logging frameworks, formats and protocols available on the market?

I need to complete an academic work by citing and possibly comparing the available logging frameworks, formats (and protocols) available in Internet, both open and proprietary. My work deeply covers Syslog 2009 protocol, and I also mention Apache logging frameworks such as log4net, log4j, log4php, l...
1

votes
5

answer
3.8k

views

Handling DateTime? in NHibernate/LINQ queries

this is a follow-up to question Better DateTime? or use default(DateTime) for NULL? I tried to implement a simple query that works with DateTime? with a different example rather than the one of the other question. In my case I have public virtual DateTime? Expiration property mapped as Now my LINQ q...
1

votes
1

answer
830

views

Configuring Chainsaw to read logs from file via network share

I need to to read a Log4j log that is stored on a remote location via Windows network share. I tried to mount that share as local drive in Windows (L:, what a fantasy...) and then tried to configure the LogFilePatternReceiver in Chainsaw with the pattern I know. The problem is that, while I'm still...
1

votes
1

answer
168

views

How to write 'after next tuesday at 11:59PM' in mysql 'where' clause

I've found this difficult to search for because the requirements are sort of ambiguous, but what I'm after is I'd like to have a where clause in a mysql query that is: where START_DATE > next Tuesday at 11:59 PM I'm using this for Crystal Reports and want the report to be dynamic to where it can be...
usr_ports
1

votes
1

answer
582

views

Data validation in Silverlight with multiple objects

My Silverlight form requires to input values for fields in objects of 3 classes that together will make the request for the web service to be invoked Code-in-progress for the GUI is the following As you see, in the grid I have several fields, all required (with txtCodiceFiscale being 16 alphanumeric...
1

votes
1

answer
564

views

Javascript HTTPS-Frame Access to Parent HTTP-Frame

How can an IFRAME with URL https://domain/ access the DOM of the parent frame which has URL http://domain/ (HTTPS calls HTTP)? Both frames will cooperate. The domain is the same in both frames, just the protocol is different. Setting document.domain is not allowed as that would allow for XSS attacks...
usr
1

votes
1

answer
221

views

What is a permanent broadcast? [duplicate]

Possible Duplicate: What is a Sticky Intent? [Android] I've found that some applications require a special permission to 'send permanent broadcasts'. I don't know what they are and how can those be helpful. First, I don't know if I'm talinkg about public static final String BROADCAST_STICKY, and se...
1

votes
1

answer
241

views

Vb.net draw horizontal zebra lines [closed]

How can i draw horizontal zebra lines all over my form? 1px Black 1px White 1px Black 1px White 1px Black 1px White 1px Black 1px White
Usr
1

votes
1

answer
979

views

Workaround for Bundling under Virtual Path Providers

I found that under ASP.NET MVC 4 you can't define a bundle of Javascripts or CSSs if their virtual path is managed by a VirtualPathProvider. I mean, if directory '~/Static/' is mapped to a VPP you can't Include('~/Static/Stylesheets/themes/dark-blue.css') because it will simply and silently fail. Fr...
1

votes
1

answer
711

views

Inserting a NHibernate object without obtaining references to all of its children objects

Let's pick an example model as a reference: public class Cat{ public long Id; public string Name; public IEnumerable Friends; //ManyToMany } Note that this is the simplest possible model I can describe. Currently, in order to insert a new Cat with its Friends I must first obtain their full persisted...
1

votes
1

answer
48

views

SVN code organization: How to have a filtered branch?

We are using SVN branches to implement our deployment workflow. Development happens in /trunk. When we want to deploy a release, we merge everything into /production. Before /production is deployed the code is reviewed and approved. Goal of the code review is to guarantee that the code is 'safe' acc...
usr
1

votes
1

answer
40

views

Is it legal to Interrupt() a Z3 context that is idle?

Is it legal to call Interrupt on a Z3 Context with the managed API when that context is idle (i.e. no solvers are running)?
usr
1

votes
2

answer
281

views

Setting an array property from a single ${property} in Spring bean

I'm using property-based configuration using PropertyPlaceholderConfigurer One of my Spring beans requires an array of String. Since I can't know the exact size of the array, and I want to avoid to change the Spring beans file (otherwise I wouldn't use properties), is there a way to define something...
1

votes
1

answer
1k

views

Can I ask if the OpenID principal did pass a two-factor authentication?

I'm designing an authentication scheme for a new project. People will be able to authenticate via Google / Facebook / Microsoft etc. accounts using OpenID. All these providers do support two-factor authentication. My goal is simple: when a user registers or logs in using an OpenID principal, I want...
1

votes
2

answer
125

views

Is compliance level sufficient to run on Java 6?

I have set Java Compiler Compliance Level to 1.6 in Eclipse. A coworker ran some binaries on a machine that runs only Java 6 and execution failed for Unsupported major.minor version: 51. We do not have (yet*) an automated build/CI system: an Ant task builds a JAR from the bare bin/ directory content...
1

votes
2

answer
2.4k

views

Localization not working in jQuery UI datePicker

I have performed several modifications to the UI of a web application I am maintaining. These include fetching JS libraries from NuGet and aligning them to a more recent version than the previous. The old version, running jQuery 1.8.2 and jQuery UI 1.8.24 (customized, minified, re-beautified by Fire...
1

votes
1

answer
170

views

Hibernate and Lambdaj issue with grouping

I want to perform a tree-grouping from query result set using Lambdaj. Results come from Hibernate. I can do aggregation successfully, but then code fails on grouping: List list = myDao.findByProperty(value); Integer intAvg = avg(list, on(MyClass.class).getIntProperty()); //OK Group group = group(li...
1

votes
1

answer
288

views

Eclipse/STS dependency hell

I was having few troubles installing new software from Marketplace, so today I decided to start from a fresh install of STS 3.6.4 from spring.io. I wanted to install some plugins like Subversive, but then I stumbled again into the dependency hell problem. When I try to install any software, I get an...
1

votes
1

answer
41

views

LINQ to Entites grouping by columns belonging to multiple entities

I am performing a SQL to LINQ rework on code now. I have to translate to LINQ a query like the following: SELECT COUNT(*) AS NUM, A.a1, GROUP_CONCAT(A.a2)... A.an, B.b1... B.bn... etc FROM A LEFT JOIN B ON ... LEFT JOIN C ON ... GROUP BY A.a1, A.a3.....B.b1 HAVING NUM > 1 Note that I omitted A.a2 on...
1

votes
1

answer
212

views

Package-based controller resolving in Spring MVC

I would like to know if it is possible to make Spring MVC work like Stripes when resolving controller classes. Normally I can annotate a controller with a @RequestMapping in order to map it to its URL. However my boss asked for a convention-over-configuration mechanism derived from Stripes, which we...
1

votes
2

answer
634

views

Jackson ignores ACCEPT_EMPTY_STRING_AS_NULL_OBJECT [duplicate]

This question already has an answer here: Jackson ObjectMapper DeserializationConfig.Feature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT 1 answer I need to treat the empty string ('') as null in Spring MVC. This because I found that when I edit a form field (with Angular's ng-model) that was originally unde...
1

votes
1

answer
178

views

Mapping a date, without time, in Joda/Hibernate

I was looking at this page in order to get an alternate class than java.util.Date for DATE columns in my Hibernate mapping. I found that no one of the non-outdated types map to a DATE column in SQL. I want to ask what is the Joda type that maps to SQL DATE. Additional info: we are considering Joda a...
1

votes
3

answer
205

views

Backporting a git branch with rebase

Let's take the following scenario into consideration m1-m2------m3-------m4--------m5 (master) \ \ \ \ \ \---f1-f2-f3(feature) \ \ \ \-P1-P2-P3(patch) \ \ r1-r2-r3-r4 (release) Master is at m5 commit as people are contributin...
1

votes
1

answer
338

views

Disable all conventions in EF6

Today I have had, and possibly still have more problems with EF6 built-in conventions. By debugging, I saw that code first EF6 enables all the default conventions available. Since I have generated a good-looking model mapping with mapper classes, I just don't want conventions to someway alter my dat...
1

votes
1

answer
41

views

How do I build a lambda-based fluent builder?

I would like to create a Java fluent builder that is based on java.util.Optional to simplify my life I would like to be able to call it like: Person person = Optional.supply(Person::new) .with(Person::setName,'Andrew') .with(Person::setAge,32) .with(Person::setAddress,'10 Downing Street') .get(); In...
1

votes
1

answer
197

views

Release of a SELECT… FOR UPDATE lock

My question is very simple: what is the inverse SQL statement for SELECT ID FROM TABLE FOR UPDATE NOWAIT? How do I release a lock during the same transaction that acquired it before committing? Expanding: I am writing portable API code that leverages Hibernate to apply row-level locks to entities. T...
1

votes
2

answer
83

views

Cassandra loads no rows from CSV file

I want to test the import by only importing three columns, namely bla, typesand location, but 0 rows are imported. Sample data: bla,types,location 1,Warning,90 S 1ST ST 2,Warning,730 W STASSNEY LN CREATE TABLE data.table ( bla int PRIMARY KEY, types text, location text); Inserting data copy data.tab...
usr
1

votes
1

answer
111

views

How to seek to a certain frame_no in VideoCapture object (C++)?

Is there a way to seek to a certain index in a VideoCapture object? I want to start reading the stream at a specific position.
cht_usr
1

votes
1

answer
84

views

Convert Object to Class Type

I have Class type returned by one function and want to cast my object to that type. Below is the code: Object valueData; //This is holding some data as Object Class className = getClassFromFunction(); //className = MyValueClass //Object val = (className.getClass()) valueData; boolean validate = vali...
usr_11
1

votes
1

answer
106

views

Jooq Java SpringBoot - Unable to auto generate classes

I have created one new table in Postgres db & I am trying to auto generate the jooq classes using the below command: java -classpath jooq-3.9.5.jar:jooq-codegen-3.9.5.jar:jooq-meta-3.9.5.jar:postgresql-42.2.2.jar:.org.jooq.util.GenerationTool library.xml But I am getting error as : Error: Could not...
usr_11
1

votes
1

answer
2k

views

Developing for iOS on PC [duplicate]

Possible Duplicate: iPhone development on Windows I would like to know if and how is it possible to (legally, read further) develop an application for iPhone/iPad using a PC rather than a Mac, only having to buy the physical mobile device for final testing and deployment. I know that the illegal wa...

View additional