Show running activity

I have an android activity that downloads content from the web. The activity have progress bar and some indications about download. The user can press back and go to the main activity app. How can i make button that will show the download activity? T

How do I use bind.FileVersion when harvesting using heat?

I've previously used... <?define PRODUCTVERSION="!(bind.FileVersion.MyLibrary.dll)" ?> ... to define a version variable for use in my installers. For the first time I'm using Heat.exe to harvest the files/folders I need in my installer (wh

Query MySQL database with timestamp

I have a timestamp field [SubmissionDate], which defaults to current_timestamp, and i was wondering how do i query my database in such a fashion that for example i get only shown all entries submitted on a certain year and month? Something like: SELE

Pause on thread creation in Visual Studio debugger

Can I set the Visual Studio debugger to break on thread creation? (Note this is not the same as breaking on context switch as asked for in this other question: Can I set a breakpoint in Visual Studio (c++) to break on a thread context switch?)I've fo

For a loop in a batch file reading a File Paths file

I want to write a Windows batch file script that will loop through a text file of FILE PATHS, do some work using data from each file path, then ultimately delete the file. I started by running the FORFILES command and sending its output (the @PATH pa

Error while using Google Cloud Storage

I'm trying to use Cloud Storage with App Engine. But I get the following error. Traceback (most recent call last): File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/", line 1535, in __call__ rv = s

How to get these images alt tag url with regex

I have a bunch of HTML code which contain these images: <img alt=\"\" width=\"100%\"> <img alt=\"\" width=\"100%\"> <img alt=

CSS Center of Like Button

I have done my research and haven't found any good information on my problem. If you go to, you will see that I placed a "Like" button on the top of the page, and set the <DIV> background color to red. I did thi

Best practices for defining your own exception classes?

I have some special exception cases that I want to throw and catch, so I want to define my own exception classes. What are the best practices for that? Should I inherit from std::exception or std::runtime_error?Yes, it's good practice to inherit from

Using the .NET Library from PowerShell

I have a PowerShell snap-in for manipulating a database. The snap-in itself is just a wrapper for the main library implemented in a separate .NET DLL all written in c#. I have registered both the snap-in and the implementation DLLs with the GAC using

Obtaining data from the mysql database in clojure

I am trying to get some text from a database and use it in a function in clojure. (defn getSelectedText [id] (j/query mysql-db ["select timesRead, text from news where id=?" id])) When I println this it shows ( {:timesRead 6, :text "Some te

Association template in simple_form_for

Is there a way to put association model in simple_form_for? I have a below code = simple_form_for(@booth.chats, remote: true) do |f| But this gives me below error: NoMethodError at /booths/1 undefined method `model_name' for #<Class:0x86f6418> Entir

How to write on a specific column?

i have an excel file with 3 columns. i already store the "B" columns to array list and check it if the value is duplicate or not. now i have problem to write the "Duplicate" value to "C" columns. how to write on specific colu

Skip the page in the wp7 navigation stack

Let's say I have a code protected override void OnNavigatedTo(NavigationEventArgs e) { var userInfo = SettingsManager.Read<User>(SettingsManager.UserInfoSetting); if (e.NavigationMode == NavigationMode.Back && userInfo == null) { _mainViewMo

History.pushState how do I get rid of the settings?

I am using history.pushState('id','myTitle','myURL'); to manipulate the displayed URL and the history stack. At some point I am pushing get parameters like so: history.pushState('id','myTitle','?mySubLinkedStuff=hotSubLinkedStuff'); Now when I do his

Java can display only one image on JFrame

I am trying to display two different images on my screen. one of which is a banner that goes at the top of my JFrame, and another that I just placed randomly below the banner for testing purposes. The issue I am having is that while I can display a s

JQuery UI widgets in TypeScript

I am using a jQuery UI slider in a TypeScript application, using TypeScript 0.9 and the latest jqueryui.d.ts definition file downloaded from DefinitelyTyped: /// <reference path="jquery/jquery.d.ts" /> /// <reference path="jqueryui

Mono-service2 does not create locking file on OSX

I'm running OSX 10.9 with mono 3.2.4. I have a simple app I would like to run as a Daemon but mono-service does not create a lock file with the PID in it. I have tried searching in /tmp and also the temp path I get when using: Path.GetTempPath(); Whi

My Ajax does not work

I'm learning Ajax, which is great, but I encounter some difficulties on the implementation of it. I would like to call a fadeOut the element #group_box when a user click on a button #rem_req_btn. My code is working only on the first element of my lis

Matlab double-matrix loop construction

I have a question about how can I construct a loop. I have a double array and I want to code that process. This is the array where I want to apply the process and the length is 4x4 (I'm doing only the first, but the original was 4x4x3). b1= (:,:,1);

Google Line Chart - Refresh database automatically

I'm working on an interface which display data retrieved from my database thanks to a Google Line Chart. However, new data is stored in my database every 10 seconds and I can not refresh the chart automatically. I need something really basic and I've

Comparing jQuery and jQuery Mobile

In my job I was asked to do a comparison table between these two libraries ... So I started reading about this but all I found was people saying "mobile its for ... mobile and jQuery its for desktop browsers" so ... Any one can help me to do a c

Maximum reuse: Web service, Android client, Web client, how?

I need to build a simple web service in Java, the context is Google Application Engine. Two clients are needed as well: Android and Web Page, for browser. I consider something like Restlet, and want to re-use from it Android and GWT clients. Could, y