Walmart has also jumped the Node.js bandwagon and put a lot of effort in moving (parts of?) their sites to the async JS framework. In that course they encountered a memory that apparently was located in the Node.js core. After Eran Hammer of Walmart “had been tracking [the bug] down for months” (!) the turned to cloud provider Joyent, who went to employ Node.js founder Ryan Dahl and sponsoring Node.js development.
There are two types of file access in Windows Phone applications. One is about creating files from within an app that can be read after an application restart. The files are saved in a kind of sandbox that isolates the application specific data from access by another application (hence the name IsolatedStorage). Another way of accessing files is about reading files you ship with an application, such as XML or text files.
To hide the Title Bar in Android Apps you need to change the android.theme property of the activity in AndroidManifest.xml to “@android:style/Theme.Black.NoTitleBar.Fullscreen”:
Instead of using the pre-made Android GUI elements you can create your own drawables in XML. There’s some documentation on the Android documentation website, but it is not very detailed. Let’s say you want to create a drawable called “tile”, which works similar to a button, but has a toggle state, that is, it remains in either state until it is clicked again. The first thing you do is create an XML file called “tile.
With Android 3 Google has introduced the ActionBar and more or less deprecated the Options Menu. However when you want to support older devices (the majority of existing devices still run Android 2.3) you might want to use the Options Menu. When you implement an Options Menu in an Android App, you run it on a Tablet with Android 4.0 and press the Options button, nothing happens. The only way to make it work is to set the SDK versions in the AndroidManifest.
Navigation between Pages is the predominant application paradigm for Windows Phone apps, when you are not creating a panorama app. Very often you will want to pass data between the individual items, for instance when the user selects an item from a list and the application navigates to a detailed view of that item. There are several solutions to that problem:
Define a variable in the static Application object. Use the query string (forward navigation only) Use PhoneApplicationService Use delegates Number 1 is simple.
Not only did they use Node.js but they developed several modules that are available under an Open Source license and the umbrella Kraken.
Suppose you got a List of Strings (any other will work, too) and you want to pick a random element from it. The first thing you do is initialize a new Random object. The you can use the Next() method of the Random object, passing the number of objects in the List as the upper bound:
List<String> AllStrings = new List<String>();
// add elements to List here
Random rndObj = new Random();
Let’s say you have a list of words in a file that is saved as a static resource in your app. Now you want to read each line and append it to a List. The solution is simple: you just use the ReadLine() method in a loop and Add() to a List of Strings.
List<String> RandomStrings = new List<String>();
StreamResourceInfo fileres =
Application.GetResourceStream(new Uri(“strings.txt”, UriKind.Relative));
using (System.IO.Stream isoFileStream = fileres.