I'm currently writing an app in Android that works with the GPS, at the moment I'm able to work out whether the GPS is enabled, my problem is that I want to enable the GPS on app startup if it is disabled, how can I do this programmaticaly?
I have a ruby on rails app running a server and sometimes it needs to be taken down for updates/etc. As of now, one way I see to have a general display screen during update periods (when the app is down) is to substitute the files within /srv/www/ directory to just have it display a general screen everywhere that the user could possibly navigate…
I have been trying to get activemq-maven-plugin to run activemq with configuration in classpath of the bundle. However, I don't have much luck. It seems that the activemq-maven-plugin just ignore resources (resources/main/conf/activemq.properties) the local bundle. I checked the jar and target/classes and they are built into the right local. I…
Hi!
I tried to write the following program in C# to calculate pi using infinite recursion, but I keep getting confused about integer/double/decimal division.
I really have no clue why this isn't working, so pardon me for my lack of understanding of strongly typed stuff, as I'm still learning C#.
Thanks in advance!
using System;
using…
Hi, I'm working on a project and need to create a screen similar to the iPhone home screen:
A scrollview with multiple pages
A bunch of icons
When not in edit mode, swipe through different pages (even I started the touch on an icon)
When not in edit mode, tap an icon to do something
When in edit mode, drag the icon to swap places, and…
Hi, I've created a custom class AnimalView which is a subclass of UIView containing a UILabel and a UIImageView.
@interface AnimalView : UIView {
UILabel *nameLabel;
UIImageView *picture;
}
Then I added in several AnimalView onto the ViewController.view. In the touchesBegan:withEvent: method, I wanted to detect if the…
I'm using Oracle Advanced Queues via JMS from within Websphere App Server.
Does anyone know what effect the following two properties have:-
- oracle.jms.useEmulatedXA
- oracle.jms.useNativeXA
I have seen mentioned in some blogs and quick start guides, usually in sentences along the lines of "Add…
I am trying to do a search with some criteria
FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery(finalQuery, KnowledgeBaseSolution.class).setCriteriaQuery(criteria);
and then page it
//Gives me around 700 results
result.setResultCount(fullTextQuery.getResultSize());
//Some pages…
Hi all,
I have the following codes in my page.
The style variable holds the custom style.
<cfchart chartheight="450" chartwidth="550" gridlines="9" yaxistitle="Score" scalefrom="20" scaleto="100" style="#style#" format="png" >
<cfchartseries query="variables.chart_query"…
I'm not sure if the title makes sense. Hard question to ask.
I have an application running on a server under my network account, and it's scheduled to run daily.
I can remote in with my user credentials and check on the application.
What if I want more than one person to be able to remote in…
Hi all,
I am trying to retrieve information from a web service call. The following is what I have so far. In my text view, it is showing
Map {item=anyType{key=TestKey; value=2;}; item=anyType{key=TestField; value=adsfasd; };}
When I ran that in the debugger, I can see the information above in…
Hi,
I have been googling to figure out how I can customize the Date format when I use jax-rs on apache CXF. I looked at the codes, and it seems that it only support primitives, enum and a special hack that assume the type associated with @ForumParam has a constructor with a single string…
I have the following code:
[SetUp]
public void SetMeUp()
{
Mapper.CreateMap<SourceObject, DestinationObject>();
}
[Test]
public void Testing()
{
var source = new SourceObject {Id = 123};
var destination1 = Mapper.Map<SourceObject, DestinationObject>(source);
…
We generate an unique token for each user and store it on database.
Everything is working fine in the local environment. However, after we upload the codes to the production server on Engine Yard, things become weird.
We tried to register an account right after the deploy. It is working…
I am trying to create a application that includes a Imagebutton and by clicking on the imagebutton, the application will start to run another java class that is within the package itself. I try using this method, however the program stopped working immediately? how should i code the codes…
In our application we're using acts_as_solr for search. Everything seems to be running smoothly except for the fact that using the model name as the search query returns every single row in the table.
For example, let's say we have a users table. We specify acts_as_solr in our model…
I'd like to traverse a JSON object tree, but cannot find any library for that. It doesn't seem difficult but it feels like reinventing the wheel.
In XML there are so many tutorials showing how to traverse an XML tree with DOM :(
I want to copy a sql result set and paste it in Excel. But the data I paste in to the spreadsheet doesn't want to recognize Excel formatting. So if I change a column to currency, it doesn't do anything. But...if I double click on a cell, THEN it applies the currency format. But only…
Hi Gurus,
We are using 2.x spring security right now. I am asked to build an admin tool so that the ROLE_ADMIN can change to any user in the site and view the site as that person (each person on the site may see different stuff depending on the role which is dynamically granted base on…
I am making a POS like system. I wonder how to map subclass using JPA (this is for my DAO). Product class has product details and OrderProduct class has information about the Product and details about the order.
@Entity
@Table(name="products")
public class Product implements…
Hi all, I want to generate a matrix of NxN to test some code that I have where each row contains floats as the elements and has to add up to 1 (i.e. a row with a set of probabilities).
Where it gets tricky is that I want to make sure that randomly some of the elements…
I'm developing an app that would display images and change them according to the user's action. I've created a subclass of UIView to contain an image, an index number and an array of image names. The code is like this:
@interface CustomPic : UIView {
UIImageView…
Hi Guru,
I want to use a property as a param of an object's method.
<s:property value="orderProductId" />
returns correct value (e.g. 1)
<s:iterator value="%{order.getProductById(1).activations}">
gives me correct value too. But
<s:iterator…
Hi, I have a simple question regarding xcode coding but don't know why things are not performing as I think. I have an array of objects (custom objects). I just want to check if this one is within the array. I used the following code:
NSArray *collection =…