Browsing 7239 questions and answers with Jon Skeet
Look at your addWord method: public void addWord(String word) { words = new ArrayList<String>(); words.add(word); ... more 12/3/2017 8:18:21 PM
Currently you're checking whether it's all letters, or all hyphens. You just need to check whether it matches letters or hyphens: public static boolean istName(String a) { return a.matches("[a-zA-Z-]+"); } The - at the end means "a... more 12/3/2017 6:38:55 PM
The first argument to PadRight is the total length you want. You've specified 6 - array1[i].Length - and as all your strings start off with at least 3 characters, you're padding to at most 3 characters, so it's not doing anything. You... more 12/3/2017 6:08:31 PM
Yes, absolutely - assuming you know the two names involved, you can just index twice, once to get the object for R27, then once within that object to get the value of DEVX: using System; using Newtonsoft.Json.Linq; public class Test { ... more 12/3/2017 8:47:46 AM
You're looking at the reference assemblies. That's not the real implementation - it's just a placeholder to compile against, effectively. You'll see the assembly only has the public/protected members, and every code-based member... more 12/1/2017 11:42:45 AM
No, streaming in Google Cloud Speech API requires gRPC, and gRPC isn't supported in Unity at the moment. Once gRPC is supported, I'd expect the client library to port very easily - or just work out of the box, potentially. Supporting gRPC... more 12/1/2017 10:35:21 AM
I wouldn't personally call dynamic, decimal, object or string primitive types. I'd use Type.IsPrimitive for the canonical source there. Note that dynamic isn't even a type in the CLR sense. The C# 5 MS specification only uses the word... more 12/1/2017 8:57:24 AM
It means that you don't have a suitable entry point for your application at the moment. That code will nearly work with C# 7.1, but you do need to explicitly enable C# 7.1 in your project... more 12/1/2017 7:28:54 AM
That's just parameterizing the SQL. If you look at the parameters passed to the query, you'll see that :p__linq__0 has a value of 53f8372c. This parameterization is helpful, as the server can cache the query plan and reuse it for the same... more 11/30/2017 6:15:27 PM
It sounds like you just want a lock, using a static field for an object whose monitor you lock on: private static readonly object lockForSharedMethod = new object(); ... private static void SharedMethod() { lock(lockForSharedMethod) ... more 11/30/2017 7:10:11 AM