ShowUserLocation with Disabled Location Services

I have an MKMapView in my app and have a button that turns on showsUserLocation for the map, while the map is finding the location I display a spinner so the user knows its working. I know when to stop the spinner by adding NSKeyValueObserver to the

Why does Url.Action return null during the unit test?

I'm trying to make a Unit Test which also includes Moq Version 4.5.9. Simply put, I only want to get the Url.Action just like in Mvc Controllers. Here is what I've done: var Cntrlr = new ErrorController(); var HttpCnt = new Mock<HttpContextHelper>(U

Async Targeting Pack

There appear to be two NuGet packages to use async/await in Silverlight applications. I've used so far, but this didn't show up in the search anymore. Instead I found http://nuge

Using facelet1.1.15 (external facelet) in JSF2

I have upgrated to JSF2 but still running with facelet1.1.15. I have these parameters in web.xml: <context-param> <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> <param-value>com.sun.facelets.FaceletViewHandler</param-value&

How to use a switch?

My question is, which one is better to use? How to properly use a switch statement. Should I use variables or not etc. I thank you in advance for your reply. "random text because I need a lot of explanation or else it won't let me post." switch(

Index of the article in a list of a list in python

I got the following problem: I'm writing a script for Ensight (a program for visualizing CFD computations) in python. The program Ensight gives me a list for the time values like: print ensight.query(ensight.TIMEVALS)['timevalues'] [[0, 0.0], [1, 9.9

Generating the connection string for the first EF code program

I'm using code first approach with EF. Need to generate connection string from user input when program is started for first time. Here's simple method to check if it can connect right now I'm trying to get some data because it happened that it was po

AlertDialog does not dismiss

I'm making a small game and I'm trying to show an AlertDialog, the problem is, when the user clicks on an option the AlertDialog won't dissapear. I'm using loopers so my game thread stops (looper) when my AlertDialog appears and when the user clicks

Python: accessing class variables via the instance

In Python, class variables can be accessed via that class instance: >>> class A(object): ... x = 4 ... >>> a = A() >>> a.x 4 It's easy to show that a.x is really resolved to A.x, not copied to an instance during construction: &g

border style in unusual design css3

My goal is to get such effects with borders in pure css. I want to ask You is it possible (or I have to use images)? Do I have to use so kind of span attribute or a outline or something else? Maybe You know were I can find tutorial how to do it? Anot

Pandas: Incremental accounting in a column

I have a DataFrame (df) which contains a 'Name' column. In a column labeled 'Occ_Number' I would like to keep a running tally on the number of appearances of each value in 'Name'. For example: Name Occ_Number abc 1 def 1 ghi 1 abc 2 abc 3 def 2 jkl 1

A simple polygonal curve generation algorithm

I need an algorithm to generate a closed simple (no self-intersections) polygonal curve. It would make a perfect labyrinth for my game. Can you please point me to the correct keywords?One idea: generate a bunch of random points, then enclose them usi

MVC Models - Controllers and Views

When using the MVC pattern, should I implement a seperate controller for each view?Create a new one if you need to. Don't if you don't. Patterns are not about data structures, they're about organizational patterns among communicating components. If t

Mysql select where

Mysql select where value 90 and 45 but not 90 with type 1 here is my sample table value | type | status 90 1 0 90 1 1 90 0 0 90 0 1 45 1 0 45 1 1 My code didn't get the desired output SELECT * FROM table WHERE type IN (1, 0) AND value != 90 Desired o

Closing paragraphs creating undesirable line breaks

I am trying to make it so all the circles align across the page, but instead they are stacking vertically. Is there any way to remove the line break, or any other tools that will allow for the same CSS attributes that the CSS in my paragraph has? Wou

Load table saved in the text file in javascript

I would like to load a text file with an array like the one below so it is accessible within javascript, how can I do that via an ajax call to access the text file? This is the text file artists.txt: ["Fally ipupa","Radio & Weasel"

Dynamic CRM Test Connection Integration with .NET

I need to create POC applicaiton which make API call to Dynamic CRM from .NET. For time being, I don't have CRM actual account, it will be avaibale after POC. Can any one share me how it could possible ? it is possibel through trial login of CRM and

How can I animate between the points of view

I have a little Adobe Air app and I want to have several 'views' within it. I can achieve these views using a ViewStack but am having difficulty finding a nice way to animate between them. This is what I have tried and although it works, one view dis

Using the cursor to create a temporary login and password

I'm trying to get the cursor to create logins, passwords, and usernames for names in a table. I have everything working correctly except the temporary password, which is the first four of the login name with 9999 tacked on the end. I've coded that co

Install Numpy on Mac OS X Lion 10.7

I need to install Numpy on my Mac OS X Lion 10.7. I googled a little bit, it seems like there are a lot of stuff needs to be installed. And some says I need install Xcode before I install Numpy. But the official website of Numpy doesn't give much inf

Disable the pluralisation of class names in cakephp

How to Turn off pluralization altogether in cakephp2.2 This is the source code of my page: <form action="/scores/exam2014s/aview" id="exam2014AviewForm" method="post" accept-charset="utf-8"> In the above code

Best way to store chat messages and files

I would like to know what do you think about storing chat messages in a database? I need to be able to bind other stuff to them (like files, or contacts) and using a database is the best way I see for now. The same question comes for files, because t