Some Of The Best Answers From Latest Asked Questions

1

answers

strange error in my Animation Drawable

A strange error when trying to start Activity. i think the error in my Animation Drawable LogCat: 12-31 06:37:45.138: E/AndroidRuntime(922): FATAL EXCEPTION: main 12-31 06:37:45.138: E/Andr..

1

answers

How to execute an action before close metro app WinJS

I want to trigger a function before closing my metro app but I don't know where such as app.onactivated = function (args){ //all the actions here will be executed on app's activation } I want som..

1

answers

Two Page Login with Spring Security 3.2.x

We are brand new to Java, Spring, and Spring Security, but not new to development. We've been able to create a Spring Security-based Thymeleaf login page that uses a JNDI datasource to connect to our ..

1

answers

Hadoop MapReduce: Strange Result when Storing Previous Value in Memory in a Reduce Class (Java)

If I wish to store the current value of an iterator to compare to the next value of the iterator in a Reduce method, Hadoop requires that I clone it instead of simply assigning its reference to a temp..

2

answers

javascript, for loop defines a dynamic variable name

Folks, Not sure if eval() or window() is the answer, but I am trying to loop through an array, and create variables for each item in that array dynamically. My myArray looks like: ['foo','bar','ba..

1

answers

How can compare-and-swap be used for a wait-free mutual exclusion for any shared data structure?

Being new to multi-threading and mutexes I was going through the wikipedia for starters. I came across this portion: CAS can be used to achieve wait-free mutual exclusion for any shared data struc..

3

answers

How do I hide the PHP explode delimiter from submitted form results?

I have created a form which utilizes a .txt file to pull the names of the EMPLOYEES from and breaks them up in the SELECT form option using the PHP explode function. <select name="FakeName" id="Fa..

3

answers

Got a NumberFormatException while trying to parse a text file for objects

While trying to create objects and add them to an ArrayList using data from a text file, the program threw a NumberFormatException and I have absolutely no clue why, everything seemed OK to me. Here's..

1

answers

Best way for storing Java application name and version properties

Using Eclipse IDE. I need to store my application's name and version as they are used by the app itself. I could hard-code them as static final fields somewhere in the codebase. A better solution I k..

1

answers

Problems with installation of Google App Engine SDK for php in OS X

I'm trying to create Google App Engine environment in my Mac OS X Mountain Lion. Downloaded the Googleapplauncher.dmg file. While I tried to unzip the file it shows "the following disk images couldn't..

1

answers

How is VIP swapping + CNAMEs better than IP swapping + A records?

I'm in the middle of updating my DNS setup to use all CNAMEs instead of A records, because I need support for VIP swaps between Staging and Production. I can't use A records for this because that put..

1

answers

Get Public URL for File - Google Cloud Storage - App Engine (Python)

Is there a python equivalent to the getPublicUrl PHP method? $public_url = CloudStorageTools::getPublicUrl("gs://my_bucket/some_file.txt", true); I am storing some files using the Google Cloud Clie..

1

answers

Access And/Or exclusions

I have some sample data like: |H.RISK|NOTE|NORMAL| The | are actually in the data, it's a String. I am using Access, and am trying to exclude records that contain RISK in the String. Sample query..

1

answers

Querying date field in MongoDB with Mongoose

I'm trying to query documents in MongoDB using findOne(), but it's not working. The field I'm trying to filter by is 'date', and I'm not sure if perhaps it's a special word I shouldn't be using when i..

1

answers

Uploading into folder in FTP?

I am using the following code to learn how to load files with FTP. How do I set the path or folder into which my file will be uploaded ? using System; using System.IO; using System.Net; using System...

1

answers

Speech input for visually impaired users without the need to tap the screen

We're working on a app for blind and visually impaired users. We've been experimenting with a third party library to get spoken user input and convert it to text, which we then parse as commands to co..

1

answers

Image steganography that could survive jpeg compression

I am trying to implement a steganographic algorithm where hidden message could survive jpeg compression. The typical scenario is the following: Hide data in image Compress image using jpeg The hidd..

1

answers

Getting all files in directory with ajax

Backstory: I am creating a development tool for web development. This tool loads a users webpage into an iframe, this allows the program to resize the iframe and simulate mobile screen sizes. I also w..

1

answers

how to put image in a bundle and pass it to another activity

is there a way to put an image in a bundle and pass it to another activity? i've done my research and came up with putParcelable but i don't know how to get the passed image from the other activity an..

1

answers

Call japplet from jframe

I Designed JApplet class manually and I designed main class by using Netbean Builder which generate the code automatically by default the class will be extends JFrame. so how can I run the JApplet cla..

1

answers

FragmentActivity to Fragment

I haven't found any question like this on here so I wanted to ask. Please keep in mind that I'm new to Fragments & FragmentActivity (not Android) and I don't really know how to work with them quit..

1

answers

RegisterStartupScript from code behind not working when Update Panel is used

I have created a radiobutton list followed by one button. I can select one of the item from the radiobutton list and then click the button to execute something. And I want the page to pop up a window ..

1

answers

How to integrate Dart into a Rails app

How should I go about integrating my Dart application, into my rails application. I'm having a hard time with the whole, 'packages' structure that has to exist on every directory. Because the subdire..

1

answers

Why does calling sumr on a stream with 50 tuples not complete

While investigating a bug today, I noticed that calling sumr on a stream with 50 (Int, Int) tuples never completes, but it does on a smaller stream. Calling .toList on the larger stream first complete..

1

answers

Real time face detection OpenCV, Python

I am trying to make a basic program for a real time face detection. Here's my code (I am a newbie in OpenCV) : import numpy as np import cv2 cam = cv2.VideoCapture(0) name = 'detect' face_cascade = c..

1

answers

vagrant primary box defined but commands still run against all boxes

I am trying to set my "dev" VM as primary so most commands such as vagrant up, vagrant halt, etc operate on the "dev" VM and ignore the "stage" VM unless the "stage" VM name is explicitly listed on th..

1

answers

500 Error on AppHarbor but downloaded build works on my machine

I'm using Visual Studio 2013 on Windows 8. I have a web service built off ServiceStack. Everything works fine on my machine but when deploying it to AppHarbor I get a 500 error. I set customErrors mod..

2

answers

Are these methods thread safe?

i have the following static class with generic methods and i'm wondering if it's safe to use it from different threads and with different objects? i'm not sure how this works below the covers so an ex..

1

answers

Laravel 4 with Sentry 2 add user to a group on Registration

So, I'm trying to implement Sentry 2 with Laravel 4.1. I'm using this resource for it https://github.com/rydurham/L4withSentry Everything works fine, but now I want to assign user to a group automat..

1

answers

Drag and drop menuitems

I want to rearrange menuitems by drag and drop in my firefox addon like the bookmarks in the Bookmarks menu. Specifically, I want the blue insertion marker to appear while dragging a menuitem over val..

1

answers

make UITableViewCell selectable only while editing

I have a UITableView where the selectionStyle is set to UITableViewCellSelectionStyleNone because I don't want any visible change when a cell is tapped, but when it is in editing mode I do want the th..

1

answers

Rails 2.3.4 Persisting Model on Validation Failure

I have a standard html form post that is being persisted and validated with a rails model on the server side. For the sake of discussion, lets call this a "car" model. When car.save is invoked ..

1

answers

Is it possible to execute multiple _addItem calls asynchronously using Google Analytics?

Would the following code work? _gaq.push(['_addTrans', '7171717117', // order ID - required '', // affiliation or store name '2222', // total - required '', ..

4

answers

php & mysql query not echoing in html with tags?

<?php require 'db.php'; ?> <?php if (isset($_POST['search'])) { $limit = $_POST['limit']; $country = $_POST['country']; $state = $_POST['state']; $city = $_POST['city']; $data = mysqli_query..

2

answers

Comparing two joda DateTime instances

I have a problem with the comparing two DateTime objects. System.out.println(response.getCreationDate().toString()); // will return "2013-12-31T22:59:21.000+01:00", but... assertThat(response.getCre..

1

answers

How do I show a message in the foreach loop?

A user goes to the URL: http://mywebsite.com/index.php?company=walmart Once the page loads i want to check if the registered user can access this people. To do that i check with an array save in ses..