internal

Inconsistent accessibility with abstract classes

China☆狼群 提交于 2020-01-03 21:03:23
问题 I have an internal abstract class InternalClassBase and two (also internal) classes InternalClass1 and InternalClass2 , which inherit from InternalClassBase . I also have a public abstract class PublicClassBase and two (also public) classes PublicClass1 and PublicClass2 , which inherit from PublicClassBase . The PublicClassBase has a protected member XXX of type InternalClassBase , so both PublicClass1 and PublicClass2 can use it. This is my code: internal abstract class InternalClassBase { }

In .NET, what is the internal implementation of a delegate?

孤人 提交于 2019-12-29 03:30:07
问题 I understand that a declaration of a delegate is something like this: public delegate int PerformCalculation(int x, int y); However, there must be more going on. The purpose of the delegate is to provide a pointer to a method, and to do that you encapsulate the reference to the method in the delegate. What kind of structure is this reference held in (internally in the delegate)? I also understand that you can encapsulate a reference to multiple methods in a delegate. Does this mean that there

Helios Annoyance: Internal error occurred during: “Cache refresh” - NullPointerException

ε祈祈猫儿з 提交于 2019-12-24 19:55:17
问题 I am not sure what started this problem. I submitted it as a bug to Eclipse but they closed it, stating it is a JBoss extension problem. However, this problem doesn't occur in my other workspace (both utilize the JBoss tools). It occurs every time I hit Ctrl + Shift + T to open a new type. It only reports the "Cache Refresh" error. Then when I type in a search string and hit OK, it pops up both the "Cache Refresh" error and a "Items filtering" error. Both of these report NPEs. I inspected the

Java - Creating an Internal Clock

落花浮王杯 提交于 2019-12-23 20:15:59
问题 I wish to calculate the time passed in milliseconds from a specific time in Java. The classic way it to use System.currentTimeMillis(); for the starting time, and then use this again with the previous one to get the elapsed time. I wish to do something similar to this, but NOT rely on the system time for this. If I rely on the system time, the user of the program could manipulate the system clock to hack the program. I have tried using code similar to the following: int elapsed = 0; while

Why do structure definitions have internal linkage?

筅森魡賤 提交于 2019-12-23 15:39:39
问题 (I am talking about C, but it also applies to class templates in C++) In header file, it is a custom to put all the DECLARATIONS, not definitions. However, we usually put structure definitions or class templates in header file as well without actually knowing why we can. This doesn't really make sense because they are definitions as well -- ONE DEFINITION RULE. (Yes, structure definitions and class templates don't cause any storage to set, but you still get "redefinition" error below which

How do I resolve these Maven internal errors?

丶灬走出姿态 提交于 2019-12-23 08:56:38
问题 I am trying to build the popular zxing barcode scanner, following the directions listed here. I have used multiple versions of Maven, but regardless of what version I use, when I type the command mvn package android:apk as instructed, I get strange errors that have never been seen by man before. Errors: [ERROR] Internal error: com.google.inject.ProvisionException: Guice provision errors:[ERROR] [ERROR] 1) No implementation for org.eclipse.aether.impl.VersionResolver was bound. [ERROR] while

Entity Framework BuildContainsExpression Causes Internal .NET Framework Data Provider error 1025

天大地大妈咪最大 提交于 2019-12-23 07:38:11
问题 I'm trying to get the following LINQ query to work against the database (3.5 SP1): var labelIds = new List<int> { 1, 2 }; var customersAggregatedTransactionsByType = (from transactions in context.TransactionSet from customers in context.CustomerSet .Where(LinqTools.BuildContainsExpression<Billing.Customer, int>(u => u.LabelId, labelIds)) from accounts in context.AccountSet where customers == accounts.Customer && accounts.Id == transactions.Account.Id && transactions.DateTime >= fromDate &&

Android saving data in Internal Storage NullPointerException

隐身守侯 提交于 2019-12-22 18:13:57
问题 I have a little problem with writing a file in internal storage from my application.I'm gettin a null pointer exception,but can't find the way to fix it..and actually can't understand which one of the elements is null. Here is the code that I'm using : hash= jsonObj.getString("hash"); Log.w("CLIENT AUTH HASH","SHOW CLIENT AUTH HASH : "+hash); FileOutputStream out = context.openFileOutput("autohash",context.MODE_PRIVATE); out.write(hash.getBytes()); out.close(); The class where I'm trying to

Property Injection with internal setter

巧了我就是萌 提交于 2019-12-22 10:16:21
问题 I have an existing application that I am modifying to use Autofac Property Injection. It seems regardless of which method I use to register my types with properties, the properties are always null unless they have public setters. With other IoC containers (e.g. Structuremap) it's possible to scope the setter internal and make it available using the InternalsVisibleTo attribute on the assembly. This would seem nice to restrict clients from modifying the assignment. Is this possible with

Android: download file from internet using DownloadManager and save it to the internal memory

走远了吗. 提交于 2019-12-22 09:05:43
问题 I am downloading a file from the web to my Android device using DownloadManager . I am saving this file on the sdcard using: DownloadManager.Request req = new DownloadManager.Request(Uri.parse("file path")); req.setTitle("file title").setDescription("Downloading ....") // download the package at the /sdcard/download path. .setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "file name"+ "file extension"); I want to save it to the internal storage. How to do that? 回答1: use this