As a developer you want to ping and access the webserver on your virtual machine. This is a very simple solution to enable the bridge to the guest VM.
- VirtualBox (latest version)
- A guest operation system (e.g. Ubuntu)
| public static IList<TRes> ListAs<TRes>(this IQueryOver qry, TRes resultByExample) | |
| { | |
| var ctor = typeof (TRes).GetConstructors().First(); | |
| return qry.UnderlyingCriteria | |
| .SetResultTransformer(Transformers.AliasToBeanConstructor(ctor)) | |
| .List<TRes>(); | |
| } | |
| [Fact] | |
| public void ListAs_Should_CastQueryOverResultToTypeSameAsSupliedExampleInstance() |
| #region Hide System.Object inherited methods | |
| /// <summary> | |
| /// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>. | |
| /// </summary> | |
| /// <returns> | |
| /// true if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, false. | |
| /// </returns> | |
| /// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>. </param><filterpriority>2</filterpriority> | |
| [EditorBrowsable(EditorBrowsableState.Never)] |
| // Get all users | |
| var url = "http://localhost:8080/api/v1/users"; | |
| var xhr = new XMLHttpRequest() | |
| xhr.open('GET', url, true) | |
| xhr.onload = function () { | |
| var users = JSON.parse(xhr.responseText); | |
| if (xhr.readyState == 4 && xhr.status == "200") { | |
| console.table(users); | |
| } else { | |
| console.error(users); |
| inAppBrowser | |
| http://ngcordova.com/docs/plugins/inAppBrowser/ | |
| Force download our open file Pdf: | |
| var options = { | |
| location: 'yes', | |
| clearcache: 'yes' | |
| }; |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |