internal

Can I make a type “sealed except for internal types”

落爺英雄遲暮 提交于 2019-12-08 15:50:35
问题 I want to make a type that can be inherited from by types in the same assembly, but cannot be inherited from outside of the assembly. I do want the type to be visible outside of the assembly. Is this possible? 回答1: You can make the constructor internal: public class MyClass { internal MyClass() { } } Every class that derives from a base class must call a constructor of the base class in its constructor. Since it can't call the constructor if the base class is in a different assembly, the

'C:\Users\' is not recognized as an internal or external command,operable program or batch file

南楼画角 提交于 2019-12-08 12:23:00
问题 i have this error in building in atmel studio 6 : C:\Program Files\Atmel\Atmel Studio 6.1\shellUtils\make.exe all 'C:\Users\' is not recognized as an internal or external command, operable program or batch file. 回答1: The entire string you show needs to be in quotes. Unfortunately you did not show any code... so we are left to guess. 1. It may appear as a string where it is used. 2. More likely you have something like this: set SomeVariable=C:\Program Files\Atmel\Atmel Studio 6.1\shellUtils

Spark executor & tasks concurrency

假装没事ソ 提交于 2019-12-08 06:38:16
问题 In Spark, an executor may run many tasks concurrently maybe 2 or 5 or 6 . How Spark figures out (or calculate) the number of tasks to be run in the same executor concurrently i.e how many tasks can run in an executor concurrently? An executor may be executing one task but one more task maybe be placed to run concurrently on same executor? What's the criteria for that? An executor has fixed number of cores & memory. As we do not specify memory & cores requirements for task in Spark, how to

indexes in sql server, internal working and structure of indexes

好久不见. 提交于 2019-12-08 04:20:01
问题 when we create a clustered index CIX_FirstNames on a column , say, FirstNames , then what actually happens internally in SQL Server? i have read that clustered indexes create copy of the data. so, does sql server creates a new index table, IndexTable , and copies all the FirstNames from the table into IndexTable , and when a firstname is searched, then it displays it from the index table? is this the actual working of clustered indexes ? 回答1: This is way too big a topic to handle here in a

Access files on internal and external storage

不打扰是莪最后的温柔 提交于 2019-12-08 00:29:35
问题 I have an Xperia Neo V that does not have any internal storage - only an SD card as external storage, while the Galaxy S3 has both internal and external storage. When using this function Environment.getExternalStorageDirectory(); I can access files only on internal storage(S3) but there is no problem with Xperia Neo V. How can I access files on both internal and external storage? 回答1: I have an Xperia Neo V that does not have any internal storage All Android devices have internal storage,

Instantiating an Internal class and casting it as a given type

痞子三分冷 提交于 2019-12-08 00:08:01
问题 Following up on InternalsVisibleTo. I have looked at c# Instantiating Internal class with private constructor, and this has helped but I'm trying to cast the returned object as the internal type and, honestly I'm not 100% that that is possible. I'm trying the route of Reflection to fix this issue, but I'm having a tough time trying to figure out how to instantiate an internal type with private methods using reflection. I can go as far as pulling the type and getting the constructor and

Instantiating an Internal class and casting it as a given type

十年热恋 提交于 2019-12-06 11:45:45
Following up on InternalsVisibleTo . I have looked at c# Instantiating Internal class with private constructor , and this has helped but I'm trying to cast the returned object as the internal type and, honestly I'm not 100% that that is possible. I'm trying the route of Reflection to fix this issue, but I'm having a tough time trying to figure out how to instantiate an internal type with private methods using reflection. I can go as far as pulling the type and getting the constructor and creating an object. How would I preform the cast of the object if the type I wish to cast is an internal

Android saving data in Internal Storage NullPointerException

限于喜欢 提交于 2019-12-06 11:40:27
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 create and write this file is not an Activity , it's just some kind of helper class and that's why it's

Access files on internal and external storage

与世无争的帅哥 提交于 2019-12-06 09:05:07
I have an Xperia Neo V that does not have any internal storage - only an SD card as external storage, while the Galaxy S3 has both internal and external storage. When using this function Environment.getExternalStorageDirectory(); I can access files only on internal storage(S3) but there is no problem with Xperia Neo V. How can I access files on both internal and external storage? I have an Xperia Neo V that does not have any internal storage All Android devices have internal storage, including the Xperia Neo V. Internal storage is where the OS and application data is stored -- without it, your

Can you store data inside a .jar?

狂风中的少年 提交于 2019-12-06 08:22:48
问题 I'm learning java and am currently trying to develop a simple application. My question is can you store data about settings, etc in a text file internal to a .jar? If so how would you go about accessing this within java? Sorry if this is a really stupid idea. 回答1: InputStream is = this.getClass().getResourceAsStream("/data/file.txt"); The resources you are getting need to be on the classpath 回答2: Yes you can, and it's not a stupid question we all need to start somewhere. There are two parts