Check if variable exist in laravel's blade directive
I'm trying to create blade directive which echo variable (if variable defined) or echo "no data" if variable undefined. This is my code in `AppServiceProvider.php`: ``` <?php namespace App\Provider...
Unreported exception java.lang.Exception; must be caught or declared to be thrown
I tried compiling the below but get the following around m16h(x): ``` Line: 16 unreported exception java.lang.Exception; must be caught or declared to be thrown ``` Not sure why though. I've tried ...
- Modified
- 25 May at 11:55
Why do I have to place () around null-conditional expression to use the correct method overload?
I have these extension methods and enum type: ``` public static bool IsOneOf<T>(this T thing, params T[] things) { return things.Contains(thing); } public static bool IsOneOf<T>(this T? thing, p...
- Modified
- 24 May at 21:3
Moq Expression with Constraint ... It.Is<Expression<Func<T, bool>>>
Ok, I am having a hard time trying to figure out how to setup a moq for a method that takes in an expression. There are a lot of examples out there of how to to It.IsAny<>... that is not what I am aft...
If async-await doesn't create any additional threads, then how does it make applications responsive?
Time and time again, I see it said that using `async`-`await` doesn't create any additional threads. That doesn't make sense because the only ways that a computer can appear to be doing more than 1 th...
- Modified
- 24 May at 16:51
readFileSync is not a function
I am relatively new to Node.js and have been looking around but cannot find a solution. I did check the require javascript file and it does not seem to have a method for "readFileSync". Perhaps I don'...
- Modified
- 1 Jul at 10:6
Height of Windows in WPF Application when Touch Keyboard appears
I'm in the process of writing an 'touch-able' WPF Application for Windows 10. Imagine a window containing the following grid: ``` <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"...
How do I join 2 tables in ServiceStack OrmLite and select both classes?
I'd like to do a simple SQL join in ServiceStack OrmLite and get both tables as the corresponding .NET objects. In LINQ-to-Entities it would be something like this: ``` Claim.Join(Policy, c => c.Pol...
- Modified
- 7 Jul at 13:44
Error: Node Sass does not yet support your current environment: Windows 64-bit with false
``` E:\A Prem World\Team_Work_Tasks\Anjali\Anjali_20160524\QuizApp_20160524_01_Anj>ionic serve -l (node:4772) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs...
- Modified
- 30 Dec at 18:14
Is there a YSOD in ServiceStack for Unhandled Exceptions?
Is there a built-in renderer for unhandled exceptions when using the RazorFormat plugin? Our service is throwing an exception, but ServiceStack is rendering the corresponding Razor view anyway (just ...
- Modified
- 24 May at 14:13
Add a PDF viewer to a WPF application
I am new to WPF, and am trying to add a PDF viewer to my WPF application, but can't seem to work out how to do it... I have tried following a couple of tutorials/ examples that I have found online, bu...
- Modified
- 20 Jun at 09:12
Xamarin Android how to get Java class name for passing into ComponentName
I need the Java class's name in the Constructor for `Android.Content.ComponentName` as Xamarin doesn't have an overloaded constructor that takes `typeof(ClrType)` like it does for some other things.
- Modified
- 24 May at 12:55
Send push to Android by C# using FCM (Firebase Cloud Messaging)
I am using this code to send notification message by C# with GCM, using Winforms, Webforms, whatever. Now I want to send to FCM (Firebase Cloud Messaging). Should I update my code? : ``` public class...
- Modified
- 24 May at 12:0
How to Subscribe with async method in Rx?
I have following code: ``` IObservable<Data> _source; ... _source.Subscribe(StoreToDatabase); private async Task StoreToDatabase(Data data) { await dbstuff(data); } ``` However, this does no...
- Modified
- 23 May at 12:24
Change Spinner dropdown icon
The solutions I found to change the spinner dropdown icon where all: ``` <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android...
- Modified
- 1 Aug at 23:37
"The located assembly's manifest definition does not match the assembly reference"
I have deployed an .NET WebAPI app (compiled against .NET 4.5.2, and running locally) into an Azure App Service. The error thrown there is > Could not load file or assembly 'System.Web.Mvc, Version...
- Modified
- 24 May at 10:30
How to use ServiceStack OrmLite Sql.Count
I'm trying to use the Sql.Count, the compiler raised a type issue: it returns the result with type T, but I want an int or long type. ``` var UsedTimesCount = conn.Scalar<AgencyFee,int>( f => Sq...
- Modified
- 24 May at 19:4
How to implement the field decimal(5,2) in EntityFrameworkCore 1.0 rc2?
How to implement the field `decimal(5,2)` in `EntityFrameworkCore 1.0 rc2` ? `HasPrecision` seems to be not available anymore?
- Modified
- 23 May at 21:25
How can I validate a JWT passed via cookies?
The `UseJwtBearerAuthentication` middleware in ASP.NET Core makes it easy to validate incoming JSON Web Tokens in `Authorization` headers. How do I authenticate a JWT passed via cookies, instead of ...
- Modified
- 17 Jan at 19:47
EF7 Migrations - The corresponding CLR type for entity type '' is not instantiable
I'm trying to use EF7 migrations and got stuck when I modeled an `Organization` model with inheritance. `Organization` is an abstract class. There are two concrete classes that inherit from it called...
- Modified
- 9 Dec at 19:3
Get GraphQL whole schema query
I want to get the schema from the server. I can get all entities with the types but I'm unable to get the properties. Getting all types: ``` query { __schema { queryType { fields { ...
Using ServiceStack Autoquery With Value Types that don't implement IConvertible
I was trying to use [AutoQuery](https://github.com/ServiceStack/ServiceStack/wiki/Auto-Query) with a `NodaTime.LocalDate` on a query parameter and I get the following exception when I try to filter us...
- Modified
- 23 May at 17:12
Simple token based authentication/authorization in asp.net core for Mongodb datastore
I need to implement pretty simple auth mechanizm with basically 2 roles: `Owners` and `Users`. And I think that having Enum for that will be enough. App itself is SPA with webapi implemented via Asp.n...
- Modified
- 23 May at 17:17
finding first day of the month in python
I'm trying to find the first day of the month in python with one condition: if my current date passed the 25th of the month, then the first date variable will hold the first date of the next month ins...
How to hide a mobile browser's address bar?
Safari and Chrome on mobile devices both include a visible address bar when a page loads. As the `body` of the page scrolls, these browsers will scroll the address bar off screen to give more real est...
- Modified
- 23 May at 12:10